Skip to content

Commit

Permalink
fix cancel and reorder methods
Browse files Browse the repository at this point in the history
  • Loading branch information
tatarco committed Mar 10, 2025
1 parent 7d1e02d commit 42fd2de
Show file tree
Hide file tree
Showing 22 changed files with 435 additions and 583 deletions.
3 changes: 1 addition & 2 deletions apps/api/src/app/events/events.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import {
ApiOkResponse,
ApiResponse,
} from '../shared/framework/response.decorator';
import { DataBooleanDto } from '../shared/dtos/data-wrapper-dto';
import { ThrottlerCategory, ThrottlerCost } from '../rate-limiting/guards';
import { UserAuthentication } from '../shared/framework/swagger/api.key.security';
import { SdkGroupName, SdkMethodName, SdkUsageExample } from '../shared/framework/swagger/sdk.decorators';
Expand Down Expand Up @@ -190,7 +189,7 @@ export class EventsController {
@UserAuthentication()
@Delete('/trigger/:transactionId')
@ApiOkResponse({
type: DataBooleanDto,
type: Boolean,
})
@ApiOperation({
summary: 'Cancel triggered event',
Expand Down
32 changes: 14 additions & 18 deletions libs/internal-sdk/src/models/components/channelsettingsdto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
/**
* The provider identifier for the credentials
*/
export const ChannelSettingsDtoProviderId = {
export const ProviderId = {
Slack: "slack",
Discord: "discord",
Msteams: "msteams",
Expand All @@ -40,15 +40,13 @@ export const ChannelSettingsDtoProviderId = {
/**
* The provider identifier for the credentials
*/
export type ChannelSettingsDtoProviderId = ClosedEnum<
typeof ChannelSettingsDtoProviderId
>;
export type ProviderId = ClosedEnum<typeof ProviderId>;

export type ChannelSettingsDto = {
/**
* The provider identifier for the credentials
*/
providerId: ChannelSettingsDtoProviderId;
providerId: ProviderId;
/**
* The integration identifier
*/
Expand All @@ -64,24 +62,22 @@ export type ChannelSettingsDto = {
};

/** @internal */
export const ChannelSettingsDtoProviderId$inboundSchema: z.ZodNativeEnum<
typeof ChannelSettingsDtoProviderId
> = z.nativeEnum(ChannelSettingsDtoProviderId);
export const ProviderId$inboundSchema: z.ZodNativeEnum<typeof ProviderId> = z
.nativeEnum(ProviderId);

/** @internal */
export const ChannelSettingsDtoProviderId$outboundSchema: z.ZodNativeEnum<
typeof ChannelSettingsDtoProviderId
> = ChannelSettingsDtoProviderId$inboundSchema;
export const ProviderId$outboundSchema: z.ZodNativeEnum<typeof ProviderId> =
ProviderId$inboundSchema;

/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace ChannelSettingsDtoProviderId$ {
/** @deprecated use `ChannelSettingsDtoProviderId$inboundSchema` instead. */
export const inboundSchema = ChannelSettingsDtoProviderId$inboundSchema;
/** @deprecated use `ChannelSettingsDtoProviderId$outboundSchema` instead. */
export const outboundSchema = ChannelSettingsDtoProviderId$outboundSchema;
export namespace ProviderId$ {
/** @deprecated use `ProviderId$inboundSchema` instead. */
export const inboundSchema = ProviderId$inboundSchema;
/** @deprecated use `ProviderId$outboundSchema` instead. */
export const outboundSchema = ProviderId$outboundSchema;
}

/** @internal */
Expand All @@ -90,7 +86,7 @@ export const ChannelSettingsDto$inboundSchema: z.ZodType<
z.ZodTypeDef,
unknown
> = z.object({
providerId: ChannelSettingsDtoProviderId$inboundSchema,
providerId: ProviderId$inboundSchema,
integrationIdentifier: z.string().optional(),
credentials: ChannelCredentials$inboundSchema,
_integrationId: z.string(),
Expand All @@ -114,7 +110,7 @@ export const ChannelSettingsDto$outboundSchema: z.ZodType<
z.ZodTypeDef,
ChannelSettingsDto
> = z.object({
providerId: ChannelSettingsDtoProviderId$outboundSchema,
providerId: ProviderId$outboundSchema,
integrationIdentifier: z.string().optional(),
credentials: ChannelCredentials$outboundSchema,
integrationId: z.string(),
Expand Down
62 changes: 0 additions & 62 deletions libs/internal-sdk/src/models/components/databooleandto.ts

This file was deleted.

88 changes: 0 additions & 88 deletions libs/internal-sdk/src/models/components/iapikeydto.ts

This file was deleted.

1 change: 0 additions & 1 deletion libs/internal-sdk/src/models/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export * from "./createsubscriberrequestdto.js";
export * from "./createtopicrequestdto.js";
export * from "./createtopicresponsedto.js";
export * from "./credentialsdto.js";
export * from "./databooleandto.js";
export * from "./delayregularmetadata.js";
export * from "./delayscheduledmetadata.js";
export * from "./deletemessageresponsedto.js";
Expand Down
32 changes: 18 additions & 14 deletions libs/internal-sdk/src/models/components/integrationresponsedto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
/**
* The channel type for the integration, which defines how the integration communicates (e.g., email, SMS).
*/
export const Channel = {
export const IntegrationResponseDtoChannel = {
InApp: "in_app",
Email: "email",
Sms: "sms",
Expand All @@ -34,7 +34,9 @@ export const Channel = {
/**
* The channel type for the integration, which defines how the integration communicates (e.g., email, SMS).
*/
export type Channel = ClosedEnum<typeof Channel>;
export type IntegrationResponseDtoChannel = ClosedEnum<
typeof IntegrationResponseDtoChannel
>;

export type IntegrationResponseDto = {
/**
Expand Down Expand Up @@ -64,7 +66,7 @@ export type IntegrationResponseDto = {
/**
* The channel type for the integration, which defines how the integration communicates (e.g., email, SMS).
*/
channel: Channel;
channel: IntegrationResponseDtoChannel;
/**
* The credentials required for the integration to function, including API keys and other sensitive information.
*/
Expand Down Expand Up @@ -96,22 +98,24 @@ export type IntegrationResponseDto = {
};

/** @internal */
export const Channel$inboundSchema: z.ZodNativeEnum<typeof Channel> = z
.nativeEnum(Channel);
export const IntegrationResponseDtoChannel$inboundSchema: z.ZodNativeEnum<
typeof IntegrationResponseDtoChannel
> = z.nativeEnum(IntegrationResponseDtoChannel);

/** @internal */
export const Channel$outboundSchema: z.ZodNativeEnum<typeof Channel> =
Channel$inboundSchema;
export const IntegrationResponseDtoChannel$outboundSchema: z.ZodNativeEnum<
typeof IntegrationResponseDtoChannel
> = IntegrationResponseDtoChannel$inboundSchema;

/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace Channel$ {
/** @deprecated use `Channel$inboundSchema` instead. */
export const inboundSchema = Channel$inboundSchema;
/** @deprecated use `Channel$outboundSchema` instead. */
export const outboundSchema = Channel$outboundSchema;
export namespace IntegrationResponseDtoChannel$ {
/** @deprecated use `IntegrationResponseDtoChannel$inboundSchema` instead. */
export const inboundSchema = IntegrationResponseDtoChannel$inboundSchema;
/** @deprecated use `IntegrationResponseDtoChannel$outboundSchema` instead. */
export const outboundSchema = IntegrationResponseDtoChannel$outboundSchema;
}

/** @internal */
Expand All @@ -126,7 +130,7 @@ export const IntegrationResponseDto$inboundSchema: z.ZodType<
name: z.string(),
identifier: z.string(),
providerId: z.string(),
channel: Channel$inboundSchema,
channel: IntegrationResponseDtoChannel$inboundSchema,
credentials: CredentialsDto$inboundSchema,
active: z.boolean(),
deleted: z.boolean(),
Expand Down Expand Up @@ -172,7 +176,7 @@ export const IntegrationResponseDto$outboundSchema: z.ZodType<
name: z.string(),
identifier: z.string(),
providerId: z.string(),
channel: Channel$outboundSchema,
channel: IntegrationResponseDtoChannel$outboundSchema,
credentials: CredentialsDto$outboundSchema,
active: z.boolean(),
deleted: z.boolean(),
Expand Down
Loading

0 comments on commit 42fd2de

Please sign in to comment.