@novu/api 3.14.1 → 3.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +3 -3
  3. package/lib/config.js +3 -3
  4. package/models/components/activitynotificationjobresponsedto.d.ts +1 -0
  5. package/models/components/activitynotificationjobresponsedto.d.ts.map +1 -1
  6. package/models/components/activitynotificationjobresponsedto.js +1 -0
  7. package/models/components/activitynotificationjobresponsedto.js.map +1 -1
  8. package/models/components/channelsettingsdto.d.ts +2 -2
  9. package/models/components/channelsettingsdto.d.ts.map +1 -1
  10. package/models/components/channelsettingsdto.js +2 -2
  11. package/models/components/channelsettingsdto.js.map +1 -1
  12. package/models/components/createworkflowdto.d.ts +5 -4
  13. package/models/components/createworkflowdto.d.ts.map +1 -1
  14. package/models/components/createworkflowdto.js +3 -0
  15. package/models/components/createworkflowdto.js.map +1 -1
  16. package/models/components/emailcontroldto.d.ts +0 -20
  17. package/models/components/emailcontroldto.d.ts.map +1 -1
  18. package/models/components/emailcontroldto.js +1 -14
  19. package/models/components/emailcontroldto.js.map +1 -1
  20. package/models/components/emailstepresponsedto.d.ts +0 -17
  21. package/models/components/emailstepresponsedto.d.ts.map +1 -1
  22. package/models/components/emailstepresponsedto.js +1 -11
  23. package/models/components/emailstepresponsedto.js.map +1 -1
  24. package/models/components/httpmethodenum.d.ts +21 -0
  25. package/models/components/httpmethodenum.d.ts.map +1 -0
  26. package/models/components/httpmethodenum.js +55 -0
  27. package/models/components/httpmethodenum.js.map +1 -0
  28. package/models/components/httprequestcontroldto.d.ts +56 -0
  29. package/models/components/httprequestcontroldto.d.ts.map +1 -0
  30. package/models/components/httprequestcontroldto.js +72 -0
  31. package/models/components/httprequestcontroldto.js.map +1 -0
  32. package/models/components/httprequestcontrolsmetadataresponsedto.d.ts +25 -0
  33. package/models/components/httprequestcontrolsmetadataresponsedto.d.ts.map +1 -0
  34. package/models/components/httprequestcontrolsmetadataresponsedto.js +54 -0
  35. package/models/components/httprequestcontrolsmetadataresponsedto.js.map +1 -0
  36. package/models/components/httprequestkeyvaluepairdto.d.ts +25 -0
  37. package/models/components/httprequestkeyvaluepairdto.d.ts.map +1 -0
  38. package/models/components/httprequestkeyvaluepairdto.js +60 -0
  39. package/models/components/httprequestkeyvaluepairdto.js.map +1 -0
  40. package/models/components/httprequeststepresponsedto.d.ts +109 -0
  41. package/models/components/httprequeststepresponsedto.d.ts.map +1 -0
  42. package/models/components/httprequeststepresponsedto.js +86 -0
  43. package/models/components/httprequeststepresponsedto.js.map +1 -0
  44. package/models/components/httprequeststepupsertdto.d.ts +53 -0
  45. package/models/components/httprequeststepupsertdto.d.ts.map +1 -0
  46. package/models/components/httprequeststepupsertdto.js +68 -0
  47. package/models/components/httprequeststepupsertdto.js.map +1 -0
  48. package/models/components/inappstepupsertdto.d.ts +4 -4
  49. package/models/components/inappstepupsertdto.d.ts.map +1 -1
  50. package/models/components/inappstepupsertdto.js +5 -5
  51. package/models/components/inappstepupsertdto.js.map +1 -1
  52. package/models/components/index.d.ts +6 -0
  53. package/models/components/index.d.ts.map +1 -1
  54. package/models/components/index.js +6 -0
  55. package/models/components/index.js.map +1 -1
  56. package/models/components/integrationresponsedto.d.ts +4 -4
  57. package/models/components/integrationresponsedto.d.ts.map +1 -1
  58. package/models/components/integrationresponsedto.js +2 -2
  59. package/models/components/integrationresponsedto.js.map +1 -1
  60. package/models/components/layoutcontrolvaluesdto.d.ts +9 -2
  61. package/models/components/layoutcontrolvaluesdto.d.ts.map +1 -1
  62. package/models/components/layoutcontrolvaluesdto.js +10 -2
  63. package/models/components/layoutcontrolvaluesdto.js.map +1 -1
  64. package/models/components/runtimeissuedto.d.ts +1 -16
  65. package/models/components/runtimeissuedto.d.ts.map +1 -1
  66. package/models/components/runtimeissuedto.js +2 -16
  67. package/models/components/runtimeissuedto.js.map +1 -1
  68. package/models/components/subscriberresponsedto.d.ts +4 -4
  69. package/models/components/subscriberresponsedto.d.ts.map +1 -1
  70. package/models/components/subscriberresponsedto.js +4 -4
  71. package/models/components/subscriberresponsedto.js.map +1 -1
  72. package/models/components/subscriberresponsedtooptional.d.ts +8 -8
  73. package/models/components/subscriberresponsedtooptional.d.ts.map +1 -1
  74. package/models/components/subscriberresponsedtooptional.js +8 -8
  75. package/models/components/subscriberresponsedtooptional.js.map +1 -1
  76. package/models/components/uicomponentenum.d.ts +8 -1
  77. package/models/components/uicomponentenum.d.ts.map +1 -1
  78. package/models/components/uicomponentenum.js +8 -1
  79. package/models/components/uicomponentenum.js.map +1 -1
  80. package/models/components/uischemagroupenum.d.ts +1 -0
  81. package/models/components/uischemagroupenum.d.ts.map +1 -1
  82. package/models/components/uischemagroupenum.js +1 -0
  83. package/models/components/uischemagroupenum.js.map +1 -1
  84. package/models/components/updatelayoutdto.d.ts +3 -19
  85. package/models/components/updatelayoutdto.d.ts.map +1 -1
  86. package/models/components/updatelayoutdto.js +3 -12
  87. package/models/components/updatelayoutdto.js.map +1 -1
  88. package/models/components/updatesubscriberchannelrequestdto.d.ts +2 -2
  89. package/models/components/updatesubscriberchannelrequestdto.d.ts.map +1 -1
  90. package/models/components/updatesubscriberchannelrequestdto.js +1 -1
  91. package/models/components/updatesubscriberchannelrequestdto.js.map +1 -1
  92. package/models/components/updateworkflowdto.d.ts +5 -4
  93. package/models/components/updateworkflowdto.d.ts.map +1 -1
  94. package/models/components/updateworkflowdto.js +3 -0
  95. package/models/components/updateworkflowdto.js.map +1 -1
  96. package/models/components/workflowresponsedto.d.ts +3 -2
  97. package/models/components/workflowresponsedto.d.ts.map +1 -1
  98. package/models/components/workflowresponsedto.js +3 -0
  99. package/models/components/workflowresponsedto.js.map +1 -1
  100. package/models/errors/subscriberresponsedto.d.ts +8 -8
  101. package/models/errors/subscriberresponsedto.d.ts.map +1 -1
  102. package/models/errors/subscriberresponsedto.js +8 -12
  103. package/models/errors/subscriberresponsedto.js.map +1 -1
  104. package/package.json +1 -1
  105. package/src/lib/config.ts +3 -3
  106. package/src/models/components/activitynotificationjobresponsedto.ts +1 -0
  107. package/src/models/components/channelsettingsdto.ts +4 -4
  108. package/src/models/components/createworkflowdto.ts +13 -2
  109. package/src/models/components/emailcontroldto.ts +0 -26
  110. package/src/models/components/emailstepresponsedto.ts +0 -26
  111. package/src/models/components/httpmethodenum.ts +30 -0
  112. package/src/models/components/httprequestcontroldto.ts +107 -0
  113. package/src/models/components/httprequestcontrolsmetadataresponsedto.ts +50 -0
  114. package/src/models/components/httprequestkeyvaluepairdto.ts +61 -0
  115. package/src/models/components/httprequeststepresponsedto.ts +191 -0
  116. package/src/models/components/httprequeststepupsertdto.ts +103 -0
  117. package/src/models/components/inappstepupsertdto.ts +9 -17
  118. package/src/models/components/index.ts +6 -0
  119. package/src/models/components/integrationresponsedto.ts +5 -5
  120. package/src/models/components/layoutcontrolvaluesdto.ts +24 -2
  121. package/src/models/components/runtimeissuedto.ts +2 -24
  122. package/src/models/components/subscriberresponsedto.ts +8 -8
  123. package/src/models/components/subscriberresponsedtooptional.ts +16 -16
  124. package/src/models/components/uicomponentenum.ts +8 -1
  125. package/src/models/components/uischemagroupenum.ts +1 -0
  126. package/src/models/components/updatelayoutdto.ts +7 -36
  127. package/src/models/components/updatesubscriberchannelrequestdto.ts +3 -3
  128. package/src/models/components/updateworkflowdto.ts +13 -2
  129. package/src/models/components/workflowresponsedto.ts +9 -1
  130. package/src/models/errors/subscriberresponsedto.ts +16 -16
@@ -13,9 +13,7 @@ import {
13
13
  /**
14
14
  * Control values for the In-App step.
15
15
  */
16
- export type InAppStepUpsertDtoControlValues = InAppControlDto | {
17
- [k: string]: any;
18
- };
16
+ export type ControlValues = InAppControlDto | { [k: string]: any };
19
17
 
20
18
  export type InAppStepUpsertDto = {
21
19
  /**
@@ -41,25 +39,19 @@ export type InAppStepUpsertDto = {
41
39
  };
42
40
 
43
41
  /** @internal */
44
- export type InAppStepUpsertDtoControlValues$Outbound =
45
- | InAppControlDto$Outbound
46
- | { [k: string]: any };
42
+ export type ControlValues$Outbound = InAppControlDto$Outbound | {
43
+ [k: string]: any;
44
+ };
47
45
 
48
46
  /** @internal */
49
- export const InAppStepUpsertDtoControlValues$outboundSchema: z.ZodType<
50
- InAppStepUpsertDtoControlValues$Outbound,
47
+ export const ControlValues$outboundSchema: z.ZodType<
48
+ ControlValues$Outbound,
51
49
  z.ZodTypeDef,
52
- InAppStepUpsertDtoControlValues
50
+ ControlValues
53
51
  > = z.union([InAppControlDto$outboundSchema, z.record(z.any())]);
54
52
 
55
- export function inAppStepUpsertDtoControlValuesToJSON(
56
- inAppStepUpsertDtoControlValues: InAppStepUpsertDtoControlValues,
57
- ): string {
58
- return JSON.stringify(
59
- InAppStepUpsertDtoControlValues$outboundSchema.parse(
60
- inAppStepUpsertDtoControlValues,
61
- ),
62
- );
53
+ export function controlValuesToJSON(controlValues: ControlValues): string {
54
+ return JSON.stringify(ControlValues$outboundSchema.parse(controlValues));
63
55
  }
64
56
 
65
57
  /** @internal */
@@ -122,6 +122,12 @@ export * from "./getpreferencesresponsedto.js";
122
122
  export * from "./getsubscriberpreferencesdto.js";
123
123
  export * from "./grouppreferencefilterdetailsdto.js";
124
124
  export * from "./grouppreferencefilterdto.js";
125
+ export * from "./httpmethodenum.js";
126
+ export * from "./httprequestcontroldto.js";
127
+ export * from "./httprequestcontrolsmetadataresponsedto.js";
128
+ export * from "./httprequestkeyvaluepairdto.js";
129
+ export * from "./httprequeststepresponsedto.js";
130
+ export * from "./httprequeststepupsertdto.js";
125
131
  export * from "./importmasterjsonrequestdto.js";
126
132
  export * from "./importmasterjsonresponsedto.js";
127
133
  export * from "./inappcontroldto.js";
@@ -19,7 +19,7 @@ import {
19
19
  import { StepFilterDto, StepFilterDto$inboundSchema } from "./stepfilterdto.js";
20
20
 
21
21
  /**
22
- * The channel type for the integration, which defines how the integration communicates (e.g., email, SMS).
22
+ * The channel type for the integration, which defines how it communicates (e.g., email, SMS).
23
23
  */
24
24
  export const IntegrationResponseDtoChannel = {
25
25
  InApp: "in_app",
@@ -29,7 +29,7 @@ export const IntegrationResponseDtoChannel = {
29
29
  Push: "push",
30
30
  } as const;
31
31
  /**
32
- * The channel type for the integration, which defines how the integration communicates (e.g., email, SMS).
32
+ * The channel type for the integration, which defines how it communicates (e.g., email, SMS).
33
33
  */
34
34
  export type IntegrationResponseDtoChannel = ClosedEnum<
35
35
  typeof IntegrationResponseDtoChannel
@@ -61,7 +61,7 @@ export type IntegrationResponseDto = {
61
61
  */
62
62
  providerId: string;
63
63
  /**
64
- * The channel type for the integration, which defines how the integration communicates (e.g., email, SMS).
64
+ * The channel type for the integration, which defines how it communicates (e.g., email, SMS).
65
65
  */
66
66
  channel: IntegrationResponseDtoChannel;
67
67
  /**
@@ -71,7 +71,7 @@ export type IntegrationResponseDto = {
71
71
  /**
72
72
  * The configurations required for enabling the additional configurations of the integration.
73
73
  */
74
- configurations?: ConfigurationsDto | undefined;
74
+ configurations: ConfigurationsDto;
75
75
  /**
76
76
  * Indicates whether the integration is currently active. An active integration will process events and messages.
77
77
  */
@@ -117,7 +117,7 @@ export const IntegrationResponseDto$inboundSchema: z.ZodType<
117
117
  providerId: z.string(),
118
118
  channel: IntegrationResponseDtoChannel$inboundSchema,
119
119
  credentials: CredentialsDto$inboundSchema,
120
- configurations: ConfigurationsDto$inboundSchema.optional(),
120
+ configurations: ConfigurationsDto$inboundSchema,
121
121
  active: z.boolean(),
122
122
  deleted: z.boolean(),
123
123
  deletedAt: z.string().optional(),
@@ -9,13 +9,15 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
9
  import {
10
10
  EmailControlsDto,
11
11
  EmailControlsDto$inboundSchema,
12
+ EmailControlsDto$Outbound,
13
+ EmailControlsDto$outboundSchema,
12
14
  } from "./emailcontrolsdto.js";
13
15
 
14
16
  export type LayoutControlValuesDto = {
15
17
  /**
16
18
  * Email layout controls
17
19
  */
18
- email?: EmailControlsDto | undefined;
20
+ email: EmailControlsDto;
19
21
  };
20
22
 
21
23
  /** @internal */
@@ -24,9 +26,29 @@ export const LayoutControlValuesDto$inboundSchema: z.ZodType<
24
26
  z.ZodTypeDef,
25
27
  unknown
26
28
  > = z.object({
27
- email: EmailControlsDto$inboundSchema.optional(),
29
+ email: EmailControlsDto$inboundSchema,
28
30
  });
31
+ /** @internal */
32
+ export type LayoutControlValuesDto$Outbound = {
33
+ email: EmailControlsDto$Outbound;
34
+ };
29
35
 
36
+ /** @internal */
37
+ export const LayoutControlValuesDto$outboundSchema: z.ZodType<
38
+ LayoutControlValuesDto$Outbound,
39
+ z.ZodTypeDef,
40
+ LayoutControlValuesDto
41
+ > = z.object({
42
+ email: EmailControlsDto$outboundSchema,
43
+ });
44
+
45
+ export function layoutControlValuesDtoToJSON(
46
+ layoutControlValuesDto: LayoutControlValuesDto,
47
+ ): string {
48
+ return JSON.stringify(
49
+ LayoutControlValuesDto$outboundSchema.parse(layoutControlValuesDto),
50
+ );
51
+ }
30
52
  export function layoutControlValuesDtoFromJSON(
31
53
  jsonString: string,
32
54
  ): SafeParseResult<LayoutControlValuesDto, SDKValidationError> {
@@ -4,39 +4,17 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
- import { ClosedEnum } from "../../types/enums.js";
8
7
  import { Result as SafeParseResult } from "../../types/fp.js";
9
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
9
 
11
- export const IssueType = {
12
- MissingValue: "MISSING_VALUE",
13
- MaxLengthAccessed: "MAX_LENGTH_ACCESSED",
14
- WorkflowIdAlreadyExists: "WORKFLOW_ID_ALREADY_EXISTS",
15
- DuplicatedValue: "DUPLICATED_VALUE",
16
- LimitReached: "LIMIT_REACHED",
17
- } as const;
18
- export type IssueType = ClosedEnum<typeof IssueType>;
19
-
20
- export type RuntimeIssueDto = {
21
- issueType: IssueType;
22
- variableName?: string | undefined;
23
- message: string;
24
- };
25
-
26
- /** @internal */
27
- export const IssueType$inboundSchema: z.ZodNativeEnum<typeof IssueType> = z
28
- .nativeEnum(IssueType);
10
+ export type RuntimeIssueDto = {};
29
11
 
30
12
  /** @internal */
31
13
  export const RuntimeIssueDto$inboundSchema: z.ZodType<
32
14
  RuntimeIssueDto,
33
15
  z.ZodTypeDef,
34
16
  unknown
35
- > = z.object({
36
- issueType: IssueType$inboundSchema,
37
- variableName: z.string().optional(),
38
- message: z.string(),
39
- });
17
+ > = z.object({});
40
18
 
41
19
  export function runtimeIssueDtoFromJSON(
42
20
  jsonString: string,
@@ -20,11 +20,11 @@ export type SubscriberResponseDto = {
20
20
  /**
21
21
  * The first name of the subscriber.
22
22
  */
23
- firstName?: string | null | undefined;
23
+ firstName: string | null;
24
24
  /**
25
25
  * The last name of the subscriber.
26
26
  */
27
- lastName?: string | null | undefined;
27
+ lastName: string | null;
28
28
  /**
29
29
  * The email address of the subscriber.
30
30
  */
@@ -54,11 +54,11 @@ export type SubscriberResponseDto = {
54
54
  /**
55
55
  * Indicates whether the subscriber is currently online.
56
56
  */
57
- isOnline?: boolean | null | undefined;
57
+ isOnline: boolean | null;
58
58
  /**
59
59
  * The timestamp indicating when the subscriber was last online, in ISO 8601 format.
60
60
  */
61
- lastOnlineAt?: string | null | undefined;
61
+ lastOnlineAt: string | null;
62
62
  /**
63
63
  * The version of the subscriber document.
64
64
  */
@@ -104,16 +104,16 @@ export const SubscriberResponseDto$inboundSchema: z.ZodType<
104
104
  unknown
105
105
  > = z.object({
106
106
  _id: z.string().optional(),
107
- firstName: z.nullable(z.string()).optional(),
108
- lastName: z.nullable(z.string()).optional(),
107
+ firstName: z.nullable(z.string()),
108
+ lastName: z.nullable(z.string()),
109
109
  email: z.nullable(z.string()).optional(),
110
110
  phone: z.nullable(z.string()).optional(),
111
111
  avatar: z.nullable(z.string()).optional(),
112
112
  locale: z.nullable(z.string()).optional(),
113
113
  channels: z.array(ChannelSettingsDto$inboundSchema).optional(),
114
114
  topics: z.array(z.string()).optional(),
115
- isOnline: z.nullable(z.boolean()).optional(),
116
- lastOnlineAt: z.nullable(z.string()).optional(),
115
+ isOnline: z.nullable(z.boolean()),
116
+ lastOnlineAt: z.nullable(z.string()),
117
117
  __v: z.number().optional(),
118
118
  data: z.nullable(z.record(z.any())).optional(),
119
119
  timezone: z.nullable(z.string()).optional(),
@@ -22,11 +22,11 @@ export type SubscriberResponseDtoOptional = {
22
22
  /**
23
23
  * The first name of the subscriber.
24
24
  */
25
- firstName?: string | null | undefined;
25
+ firstName: string | null;
26
26
  /**
27
27
  * The last name of the subscriber.
28
28
  */
29
- lastName?: string | null | undefined;
29
+ lastName: string | null;
30
30
  /**
31
31
  * The email address of the subscriber.
32
32
  */
@@ -56,11 +56,11 @@ export type SubscriberResponseDtoOptional = {
56
56
  /**
57
57
  * Indicates whether the subscriber is currently online.
58
58
  */
59
- isOnline?: boolean | null | undefined;
59
+ isOnline: boolean | null;
60
60
  /**
61
61
  * The timestamp indicating when the subscriber was last online, in ISO 8601 format.
62
62
  */
63
- lastOnlineAt?: string | null | undefined;
63
+ lastOnlineAt: string | null;
64
64
  /**
65
65
  * The version of the subscriber document.
66
66
  */
@@ -82,16 +82,16 @@ export const SubscriberResponseDtoOptional$inboundSchema: z.ZodType<
82
82
  unknown
83
83
  > = z.object({
84
84
  _id: z.string().optional(),
85
- firstName: z.nullable(z.string()).optional(),
86
- lastName: z.nullable(z.string()).optional(),
85
+ firstName: z.nullable(z.string()),
86
+ lastName: z.nullable(z.string()),
87
87
  email: z.nullable(z.string()).optional(),
88
88
  phone: z.nullable(z.string()).optional(),
89
89
  avatar: z.nullable(z.string()).optional(),
90
90
  locale: z.nullable(z.string()).optional(),
91
91
  channels: z.array(ChannelSettingsDto$inboundSchema).optional(),
92
92
  topics: z.array(z.string()).optional(),
93
- isOnline: z.nullable(z.boolean()).optional(),
94
- lastOnlineAt: z.nullable(z.string()).optional(),
93
+ isOnline: z.nullable(z.boolean()),
94
+ lastOnlineAt: z.nullable(z.string()),
95
95
  __v: z.number().optional(),
96
96
  data: z.nullable(z.record(z.any())).optional(),
97
97
  timezone: z.nullable(z.string()).optional(),
@@ -104,16 +104,16 @@ export const SubscriberResponseDtoOptional$inboundSchema: z.ZodType<
104
104
  /** @internal */
105
105
  export type SubscriberResponseDtoOptional$Outbound = {
106
106
  _id?: string | undefined;
107
- firstName?: string | null | undefined;
108
- lastName?: string | null | undefined;
107
+ firstName: string | null;
108
+ lastName: string | null;
109
109
  email?: string | null | undefined;
110
110
  phone?: string | null | undefined;
111
111
  avatar?: string | null | undefined;
112
112
  locale?: string | null | undefined;
113
113
  channels?: Array<ChannelSettingsDto$Outbound> | undefined;
114
114
  topics?: Array<string> | undefined;
115
- isOnline?: boolean | null | undefined;
116
- lastOnlineAt?: string | null | undefined;
115
+ isOnline: boolean | null;
116
+ lastOnlineAt: string | null;
117
117
  __v?: number | undefined;
118
118
  data?: { [k: string]: any } | null | undefined;
119
119
  timezone?: string | null | undefined;
@@ -126,16 +126,16 @@ export const SubscriberResponseDtoOptional$outboundSchema: z.ZodType<
126
126
  SubscriberResponseDtoOptional
127
127
  > = z.object({
128
128
  id: z.string().optional(),
129
- firstName: z.nullable(z.string()).optional(),
130
- lastName: z.nullable(z.string()).optional(),
129
+ firstName: z.nullable(z.string()),
130
+ lastName: z.nullable(z.string()),
131
131
  email: z.nullable(z.string()).optional(),
132
132
  phone: z.nullable(z.string()).optional(),
133
133
  avatar: z.nullable(z.string()).optional(),
134
134
  locale: z.nullable(z.string()).optional(),
135
135
  channels: z.array(ChannelSettingsDto$outboundSchema).optional(),
136
136
  topics: z.array(z.string()).optional(),
137
- isOnline: z.nullable(z.boolean()).optional(),
138
- lastOnlineAt: z.nullable(z.string()).optional(),
137
+ isOnline: z.nullable(z.boolean()),
138
+ lastOnlineAt: z.nullable(z.string()),
139
139
  v: z.number().optional(),
140
140
  data: z.nullable(z.record(z.any())).optional(),
141
141
  timezone: z.nullable(z.string()).optional(),
@@ -12,7 +12,6 @@ import { OpenEnum } from "../../types/enums.js";
12
12
  export const UiComponentEnum = {
13
13
  EmailEditorSelect: "EMAIL_EDITOR_SELECT",
14
14
  LayoutSelect: "LAYOUT_SELECT",
15
- EmailRendererSelect: "EMAIL_RENDERER_SELECT",
16
15
  BlockEditor: "BLOCK_EDITOR",
17
16
  EmailBody: "EMAIL_BODY",
18
17
  TextFullLine: "TEXT_FULL_LINE",
@@ -48,6 +47,14 @@ export const UiComponentEnum = {
48
47
  QueryEditor: "QUERY_EDITOR",
49
48
  Data: "DATA",
50
49
  LayoutEmail: "LAYOUT_EMAIL",
50
+ DestinationMethod: "DESTINATION_METHOD",
51
+ DestinationUrl: "DESTINATION_URL",
52
+ DestinationHeaders: "DESTINATION_HEADERS",
53
+ DestinationBody: "DESTINATION_BODY",
54
+ DestinationResponseBodySchema: "DESTINATION_RESPONSE_BODY_SCHEMA",
55
+ DestinationEnforceSchemaValidation: "DESTINATION_ENFORCE_SCHEMA_VALIDATION",
56
+ DestinationContinueOnFailure: "DESTINATION_CONTINUE_ON_FAILURE",
57
+ DestinationTimeout: "DESTINATION_TIMEOUT",
51
58
  } as const;
52
59
  /**
53
60
  * Component type for the UI Schema Property
@@ -19,6 +19,7 @@ export const UiSchemaGroupEnum = {
19
19
  Push: "PUSH",
20
20
  Skip: "SKIP",
21
21
  Layout: "LAYOUT",
22
+ HttpRequest: "HTTP_REQUEST",
22
23
  } as const;
23
24
  /**
24
25
  * Group of the UI Schema
@@ -4,20 +4,10 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import {
7
- EmailControlsDto,
8
- EmailControlsDto$Outbound,
9
- EmailControlsDto$outboundSchema,
10
- } from "./emailcontrolsdto.js";
11
-
12
- /**
13
- * Control values for the layout
14
- */
15
- export type ControlValues = {
16
- /**
17
- * Email layout controls
18
- */
19
- email?: EmailControlsDto | undefined;
20
- };
7
+ LayoutControlValuesDto,
8
+ LayoutControlValuesDto$Outbound,
9
+ LayoutControlValuesDto$outboundSchema,
10
+ } from "./layoutcontrolvaluesdto.js";
21
11
 
22
12
  export type UpdateLayoutDto = {
23
13
  /**
@@ -31,32 +21,14 @@ export type UpdateLayoutDto = {
31
21
  /**
32
22
  * Control values for the layout
33
23
  */
34
- controlValues?: ControlValues | null | undefined;
35
- };
36
-
37
- /** @internal */
38
- export type ControlValues$Outbound = {
39
- email?: EmailControlsDto$Outbound | undefined;
24
+ controlValues: LayoutControlValuesDto;
40
25
  };
41
26
 
42
- /** @internal */
43
- export const ControlValues$outboundSchema: z.ZodType<
44
- ControlValues$Outbound,
45
- z.ZodTypeDef,
46
- ControlValues
47
- > = z.object({
48
- email: EmailControlsDto$outboundSchema.optional(),
49
- });
50
-
51
- export function controlValuesToJSON(controlValues: ControlValues): string {
52
- return JSON.stringify(ControlValues$outboundSchema.parse(controlValues));
53
- }
54
-
55
27
  /** @internal */
56
28
  export type UpdateLayoutDto$Outbound = {
57
29
  name: string;
58
30
  isTranslationEnabled: boolean;
59
- controlValues?: ControlValues$Outbound | null | undefined;
31
+ controlValues: LayoutControlValuesDto$Outbound;
60
32
  };
61
33
 
62
34
  /** @internal */
@@ -67,8 +39,7 @@ export const UpdateLayoutDto$outboundSchema: z.ZodType<
67
39
  > = z.object({
68
40
  name: z.string(),
69
41
  isTranslationEnabled: z.boolean().default(false),
70
- controlValues: z.nullable(z.lazy(() => ControlValues$outboundSchema))
71
- .optional(),
42
+ controlValues: LayoutControlValuesDto$outboundSchema,
72
43
  });
73
44
 
74
45
  export function updateLayoutDtoToJSON(
@@ -21,7 +21,7 @@ export type UpdateSubscriberChannelRequestDto = {
21
21
  /**
22
22
  * The integration identifier
23
23
  */
24
- integrationIdentifier?: string | undefined;
24
+ integrationIdentifier: string;
25
25
  /**
26
26
  * Credentials payload for the specified provider
27
27
  */
@@ -31,7 +31,7 @@ export type UpdateSubscriberChannelRequestDto = {
31
31
  /** @internal */
32
32
  export type UpdateSubscriberChannelRequestDto$Outbound = {
33
33
  providerId: string;
34
- integrationIdentifier?: string | undefined;
34
+ integrationIdentifier: string;
35
35
  credentials: ChannelCredentials$Outbound;
36
36
  };
37
37
 
@@ -42,7 +42,7 @@ export const UpdateSubscriberChannelRequestDto$outboundSchema: z.ZodType<
42
42
  UpdateSubscriberChannelRequestDto
43
43
  > = z.object({
44
44
  providerId: ChatOrPushProviderEnum$outboundSchema,
45
- integrationIdentifier: z.string().optional(),
45
+ integrationIdentifier: z.string(),
46
46
  credentials: ChannelCredentials$outboundSchema,
47
47
  });
48
48
 
@@ -28,6 +28,11 @@ import {
28
28
  EmailStepUpsertDto$Outbound,
29
29
  EmailStepUpsertDto$outboundSchema,
30
30
  } from "./emailstepupsertdto.js";
31
+ import {
32
+ HttpRequestStepUpsertDto,
33
+ HttpRequestStepUpsertDto$Outbound,
34
+ HttpRequestStepUpsertDto$outboundSchema,
35
+ } from "./httprequeststepupsertdto.js";
31
36
  import {
32
37
  InAppStepUpsertDto,
33
38
  InAppStepUpsertDto$Outbound,
@@ -65,7 +70,8 @@ export type UpdateWorkflowDtoSteps =
65
70
  | ChatStepUpsertDto
66
71
  | DelayStepUpsertDto
67
72
  | DigestStepUpsertDto
68
- | CustomStepUpsertDto;
73
+ | CustomStepUpsertDto
74
+ | HttpRequestStepUpsertDto;
69
75
 
70
76
  export type UpdateWorkflowDto = {
71
77
  /**
@@ -112,6 +118,7 @@ export type UpdateWorkflowDto = {
112
118
  | DelayStepUpsertDto
113
119
  | DigestStepUpsertDto
114
120
  | CustomStepUpsertDto
121
+ | HttpRequestStepUpsertDto
115
122
  >;
116
123
  /**
117
124
  * Workflow preferences
@@ -136,7 +143,8 @@ export type UpdateWorkflowDtoSteps$Outbound =
136
143
  | ChatStepUpsertDto$Outbound
137
144
  | DelayStepUpsertDto$Outbound
138
145
  | DigestStepUpsertDto$Outbound
139
- | CustomStepUpsertDto$Outbound;
146
+ | CustomStepUpsertDto$Outbound
147
+ | HttpRequestStepUpsertDto$Outbound;
140
148
 
141
149
  /** @internal */
142
150
  export const UpdateWorkflowDtoSteps$outboundSchema: z.ZodType<
@@ -152,6 +160,7 @@ export const UpdateWorkflowDtoSteps$outboundSchema: z.ZodType<
152
160
  DelayStepUpsertDto$outboundSchema,
153
161
  DigestStepUpsertDto$outboundSchema,
154
162
  CustomStepUpsertDto$outboundSchema,
163
+ HttpRequestStepUpsertDto$outboundSchema,
155
164
  ]);
156
165
 
157
166
  export function updateWorkflowDtoStepsToJSON(
@@ -181,6 +190,7 @@ export type UpdateWorkflowDto$Outbound = {
181
190
  | DelayStepUpsertDto$Outbound
182
191
  | DigestStepUpsertDto$Outbound
183
192
  | CustomStepUpsertDto$Outbound
193
+ | HttpRequestStepUpsertDto$Outbound
184
194
  >;
185
195
  preferences: PreferencesRequestDto$Outbound;
186
196
  origin: string;
@@ -211,6 +221,7 @@ export const UpdateWorkflowDto$outboundSchema: z.ZodType<
211
221
  DelayStepUpsertDto$outboundSchema,
212
222
  DigestStepUpsertDto$outboundSchema,
213
223
  CustomStepUpsertDto$outboundSchema,
224
+ HttpRequestStepUpsertDto$outboundSchema,
214
225
  ]),
215
226
  ),
216
227
  preferences: PreferencesRequestDto$outboundSchema,
@@ -27,6 +27,10 @@ import {
27
27
  EmailStepResponseDto,
28
28
  EmailStepResponseDto$inboundSchema,
29
29
  } from "./emailstepresponsedto.js";
30
+ import {
31
+ HttpRequestStepResponseDto,
32
+ HttpRequestStepResponseDto$inboundSchema,
33
+ } from "./httprequeststepresponsedto.js";
30
34
  import {
31
35
  InAppStepResponseDto,
32
36
  InAppStepResponseDto$inboundSchema,
@@ -117,7 +121,8 @@ export type WorkflowResponseDtoSteps =
117
121
  | DelayStepResponseDto
118
122
  | DigestStepResponseDto
119
123
  | CustomStepResponseDto
120
- | ThrottleStepResponseDto;
124
+ | ThrottleStepResponseDto
125
+ | HttpRequestStepResponseDto;
121
126
 
122
127
  export type WorkflowResponseDto = {
123
128
  /**
@@ -193,6 +198,7 @@ export type WorkflowResponseDto = {
193
198
  | DigestStepResponseDto
194
199
  | CustomStepResponseDto
195
200
  | ThrottleStepResponseDto
201
+ | HttpRequestStepResponseDto
196
202
  >;
197
203
  /**
198
204
  * Origin of the layout
@@ -291,6 +297,7 @@ export const WorkflowResponseDtoSteps$inboundSchema: z.ZodType<
291
297
  DigestStepResponseDto$inboundSchema,
292
298
  CustomStepResponseDto$inboundSchema,
293
299
  ThrottleStepResponseDto$inboundSchema,
300
+ HttpRequestStepResponseDto$inboundSchema,
294
301
  ]);
295
302
 
296
303
  export function workflowResponseDtoStepsFromJSON(
@@ -338,6 +345,7 @@ export const WorkflowResponseDto$inboundSchema: z.ZodType<
338
345
  DigestStepResponseDto$inboundSchema,
339
346
  CustomStepResponseDto$inboundSchema,
340
347
  ThrottleStepResponseDto$inboundSchema,
348
+ HttpRequestStepResponseDto$inboundSchema,
341
349
  ]),
342
350
  ),
343
351
  origin: ResourceOriginEnum$inboundSchema,
@@ -15,11 +15,11 @@ export type SubscriberResponseDtoData = {
15
15
  /**
16
16
  * The first name of the subscriber.
17
17
  */
18
- firstName?: string | null | undefined;
18
+ firstName: string | null;
19
19
  /**
20
20
  * The last name of the subscriber.
21
21
  */
22
- lastName?: string | null | undefined;
22
+ lastName: string | null;
23
23
  /**
24
24
  * The email address of the subscriber.
25
25
  */
@@ -49,11 +49,11 @@ export type SubscriberResponseDtoData = {
49
49
  /**
50
50
  * Indicates whether the subscriber is currently online.
51
51
  */
52
- isOnline?: boolean | null | undefined;
52
+ isOnline: boolean | null;
53
53
  /**
54
54
  * The timestamp indicating when the subscriber was last online, in ISO 8601 format.
55
55
  */
56
- lastOnlineAt?: string | null | undefined;
56
+ lastOnlineAt: string | null;
57
57
  /**
58
58
  * The version of the subscriber document.
59
59
  */
@@ -100,11 +100,11 @@ export class SubscriberResponseDto extends NovuError {
100
100
  /**
101
101
  * The first name of the subscriber.
102
102
  */
103
- firstName?: string | null | undefined;
103
+ firstName: string | null;
104
104
  /**
105
105
  * The last name of the subscriber.
106
106
  */
107
- lastName?: string | null | undefined;
107
+ lastName: string | null;
108
108
  /**
109
109
  * The email address of the subscriber.
110
110
  */
@@ -134,11 +134,11 @@ export class SubscriberResponseDto extends NovuError {
134
134
  /**
135
135
  * Indicates whether the subscriber is currently online.
136
136
  */
137
- isOnline?: boolean | null | undefined;
137
+ isOnline: boolean | null;
138
138
  /**
139
139
  * The timestamp indicating when the subscriber was last online, in ISO 8601 format.
140
140
  */
141
- lastOnlineAt?: string | null | undefined;
141
+ lastOnlineAt: string | null;
142
142
  /**
143
143
  * The version of the subscriber document.
144
144
  */
@@ -189,16 +189,16 @@ export class SubscriberResponseDto extends NovuError {
189
189
  super(message, httpMeta);
190
190
  this.data$ = err;
191
191
  if (err.id != null) this.id = err.id;
192
- if (err.firstName != null) this.firstName = err.firstName;
193
- if (err.lastName != null) this.lastName = err.lastName;
192
+ this.firstName = err.firstName;
193
+ this.lastName = err.lastName;
194
194
  if (err.email != null) this.email = err.email;
195
195
  if (err.phone != null) this.phone = err.phone;
196
196
  if (err.avatar != null) this.avatar = err.avatar;
197
197
  if (err.locale != null) this.locale = err.locale;
198
198
  if (err.channels != null) this.channels = err.channels;
199
199
  if (err.topics != null) this.topics = err.topics;
200
- if (err.isOnline != null) this.isOnline = err.isOnline;
201
- if (err.lastOnlineAt != null) this.lastOnlineAt = err.lastOnlineAt;
200
+ this.isOnline = err.isOnline;
201
+ this.lastOnlineAt = err.lastOnlineAt;
202
202
  if (err.v != null) this.v = err.v;
203
203
  if (err.data != null) this.data = err.data;
204
204
  if (err.timezone != null) this.timezone = err.timezone;
@@ -220,16 +220,16 @@ export const SubscriberResponseDto$inboundSchema: z.ZodType<
220
220
  unknown
221
221
  > = z.object({
222
222
  _id: z.string().optional(),
223
- firstName: z.nullable(z.string()).optional(),
224
- lastName: z.nullable(z.string()).optional(),
223
+ firstName: z.nullable(z.string()),
224
+ lastName: z.nullable(z.string()),
225
225
  email: z.nullable(z.string()).optional(),
226
226
  phone: z.nullable(z.string()).optional(),
227
227
  avatar: z.nullable(z.string()).optional(),
228
228
  locale: z.nullable(z.string()).optional(),
229
229
  channels: z.array(components.ChannelSettingsDto$inboundSchema).optional(),
230
230
  topics: z.array(z.string()).optional(),
231
- isOnline: z.nullable(z.boolean()).optional(),
232
- lastOnlineAt: z.nullable(z.string()).optional(),
231
+ isOnline: z.nullable(z.boolean()),
232
+ lastOnlineAt: z.nullable(z.string()),
233
233
  __v: z.number().optional(),
234
234
  data: z.nullable(z.record(z.any())).optional(),
235
235
  timezone: z.nullable(z.string()).optional(),