@novu/api 0.6.1 → 0.7.0
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.
- package/FUNCTIONS.md +12 -3
- package/README.md +145 -30
- package/bin/mcp-server.js +966 -518
- package/bin/mcp-server.js.map +60 -51
- package/docs/sdks/novu/README.md +142 -24
- package/docs/sdks/subscribers/README.md +113 -0
- package/funcs/subscribersSearch.js +1 -0
- package/funcs/subscribersSearch.js.map +1 -1
- package/funcs/subscribersUpsert.d.ts +18 -0
- package/funcs/subscribersUpsert.d.ts.map +1 -0
- package/funcs/subscribersUpsert.js +148 -0
- package/funcs/subscribersUpsert.js.map +1 -0
- package/hooks/types.d.ts +1 -1
- package/hooks/types.d.ts.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/lib/config.js.map +1 -1
- package/lib/matchers.d.ts +3 -1
- package/lib/matchers.d.ts.map +1 -1
- package/lib/matchers.js +13 -1
- package/lib/matchers.js.map +1 -1
- package/lib/sdks.d.ts +3 -1
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +13 -13
- package/lib/sdks.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/prompts.d.ts.map +1 -1
- package/mcp-server/prompts.js +5 -1
- package/mcp-server/prompts.js.map +1 -1
- package/mcp-server/resources.d.ts.map +1 -1
- package/mcp-server/resources.js +10 -2
- package/mcp-server/resources.js.map +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +4 -3
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/subscribersUpsert.d.ts +11 -0
- package/mcp-server/tools/subscribersUpsert.d.ts.map +1 -0
- package/mcp-server/tools/subscribersUpsert.js +57 -0
- package/mcp-server/tools/subscribersUpsert.js.map +1 -0
- package/mcp-server/tools.d.ts.map +1 -1
- package/mcp-server/tools.js +4 -3
- package/mcp-server/tools.js.map +1 -1
- package/models/components/activitynotificationjobresponsedto.d.ts +15 -15
- package/models/components/activitynotificationjobresponsedto.d.ts.map +1 -1
- package/models/components/activitynotificationjobresponsedto.js +19 -18
- package/models/components/activitynotificationjobresponsedto.js.map +1 -1
- package/models/components/activitynotificationstepresponsedto.d.ts +15 -15
- package/models/components/activitynotificationstepresponsedto.d.ts.map +1 -1
- package/models/components/activitynotificationstepresponsedto.js +18 -18
- package/models/components/activitynotificationstepresponsedto.js.map +1 -1
- package/models/components/channelsettingsdto.d.ts +2 -78
- package/models/components/channelsettingsdto.d.ts.map +1 -1
- package/models/components/channelsettingsdto.js +4 -41
- package/models/components/channelsettingsdto.js.map +1 -1
- package/models/components/chatorpushproviderenum.d.ts +79 -0
- package/models/components/chatorpushproviderenum.d.ts.map +1 -0
- package/models/components/chatorpushproviderenum.js +68 -0
- package/models/components/chatorpushproviderenum.js.map +1 -0
- package/models/components/constraintvalidation.d.ts +115 -0
- package/models/components/constraintvalidation.d.ts.map +1 -0
- package/models/components/constraintvalidation.js +157 -0
- package/models/components/constraintvalidation.js.map +1 -0
- package/models/components/digestmetadatadto.d.ts +8 -8
- package/models/components/digestmetadatadto.d.ts.map +1 -1
- package/models/components/digestmetadatadto.js +13 -13
- package/models/components/digestmetadatadto.js.map +1 -1
- package/models/components/digestregularmetadata.d.ts +16 -16
- package/models/components/digestregularmetadata.d.ts.map +1 -1
- package/models/components/digestregularmetadata.js +25 -25
- package/models/components/digestregularmetadata.js.map +1 -1
- package/models/components/digesttimedconfigdto.d.ts +8 -8
- package/models/components/digesttimedconfigdto.d.ts.map +1 -1
- package/models/components/digesttimedconfigdto.js +13 -14
- package/models/components/digesttimedconfigdto.js.map +1 -1
- package/models/components/getsubscriberpreferencesdto.d.ts +6 -6
- package/models/components/getsubscriberpreferencesdto.d.ts.map +1 -1
- package/models/components/getsubscriberpreferencesdto.js +6 -6
- package/models/components/getsubscriberpreferencesdto.js.map +1 -1
- package/models/components/index.d.ts +11 -5
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +11 -5
- package/models/components/index.js.map +1 -1
- package/models/components/integrationresponsedto.d.ts +8 -8
- package/models/components/integrationresponsedto.d.ts.map +1 -1
- package/models/components/integrationresponsedto.js +14 -13
- package/models/components/integrationresponsedto.js.map +1 -1
- package/models/components/messageactionresult.d.ts +15 -15
- package/models/components/messageactionresult.d.ts.map +1 -1
- package/models/components/messageactionresult.js +18 -18
- package/models/components/messageactionresult.js.map +1 -1
- package/models/components/messagecta.d.ts +2 -2
- package/models/components/messagecta.d.ts.map +1 -1
- package/models/components/messagecta.js +2 -2
- package/models/components/messagecta.js.map +1 -1
- package/models/components/messageresponsedto.d.ts +14 -4
- package/models/components/messageresponsedto.d.ts.map +1 -1
- package/models/components/messageresponsedto.js +8 -4
- package/models/components/messageresponsedto.js.map +1 -1
- package/models/components/messagesresponsedto.d.ts +53 -0
- package/models/components/messagesresponsedto.d.ts.map +1 -0
- package/models/components/messagesresponsedto.js +68 -0
- package/models/components/messagesresponsedto.js.map +1 -0
- package/models/components/notificationfeeditemdto.d.ts +0 -5
- package/models/components/notificationfeeditemdto.d.ts.map +1 -1
- package/models/components/notificationfeeditemdto.js +0 -2
- package/models/components/notificationfeeditemdto.js.map +1 -1
- package/models/components/notificationstepdto.d.ts +13 -13
- package/models/components/notificationstepdto.d.ts.map +1 -1
- package/models/components/notificationstepdto.js +16 -16
- package/models/components/notificationstepdto.js.map +1 -1
- package/models/components/notificationtriggerdto.d.ts +8 -8
- package/models/components/notificationtriggerdto.d.ts.map +1 -1
- package/models/components/notificationtriggerdto.js +13 -13
- package/models/components/notificationtriggerdto.js.map +1 -1
- package/models/components/patchsubscriberpreferencesdto.d.ts +1 -1
- package/models/components/preferenceoverridesourceenum.d.ts +37 -0
- package/models/components/preferenceoverridesourceenum.d.ts.map +1 -0
- package/models/components/preferenceoverridesourceenum.js +54 -0
- package/models/components/preferenceoverridesourceenum.js.map +1 -0
- package/models/components/providersidenum.d.ts +3 -0
- package/models/components/providersidenum.d.ts.map +1 -1
- package/models/components/providersidenum.js +1 -0
- package/models/components/providersidenum.js.map +1 -1
- package/models/components/stepfilterdto.d.ts +8 -8
- package/models/components/stepfilterdto.d.ts.map +1 -1
- package/models/components/stepfilterdto.js +13 -13
- package/models/components/stepfilterdto.js.map +1 -1
- package/models/components/stepsoverrides.d.ts +40 -0
- package/models/components/stepsoverrides.d.ts.map +1 -0
- package/models/components/{workflowinfodto.js → stepsoverrides.js} +19 -23
- package/models/components/stepsoverrides.js.map +1 -0
- package/models/components/steptypeenum.d.ts +2 -2
- package/models/components/steptypeenum.js +1 -1
- package/models/components/subscriberchanneldto.d.ts +8 -8
- package/models/components/subscriberchanneldto.d.ts.map +1 -1
- package/models/components/subscriberchanneldto.js +14 -13
- package/models/components/subscriberchanneldto.js.map +1 -1
- package/models/components/subscriberglobalpreferencedto.d.ts +38 -0
- package/models/components/subscriberglobalpreferencedto.d.ts.map +1 -0
- package/models/components/subscriberglobalpreferencedto.js +62 -0
- package/models/components/subscriberglobalpreferencedto.js.map +1 -0
- package/models/components/subscriberpreferencechannels.d.ts +52 -0
- package/models/components/subscriberpreferencechannels.d.ts.map +1 -0
- package/models/components/{preferencechannels.js → subscriberpreferencechannels.js} +17 -17
- package/models/components/subscriberpreferencechannels.js.map +1 -0
- package/models/components/subscriberpreferenceoverridedto.d.ts +39 -0
- package/models/components/subscriberpreferenceoverridedto.d.ts.map +1 -0
- package/models/components/subscriberpreferenceoverridedto.js +63 -0
- package/models/components/subscriberpreferenceoverridedto.js.map +1 -0
- package/models/components/subscriberpreferencesworkflowinfodto.d.ts +47 -0
- package/models/components/subscriberpreferencesworkflowinfodto.d.ts.map +1 -0
- package/models/components/subscriberpreferencesworkflowinfodto.js +65 -0
- package/models/components/subscriberpreferencesworkflowinfodto.js.map +1 -0
- package/models/components/subscriberresponsedto.d.ts +26 -26
- package/models/components/subscriberresponsedto.d.ts.map +1 -1
- package/models/components/subscriberresponsedto.js +12 -12
- package/models/components/subscriberresponsedto.js.map +1 -1
- package/models/components/subscriberworkflowpreferencedto.d.ts +50 -0
- package/models/components/subscriberworkflowpreferencedto.d.ts.map +1 -0
- package/models/components/subscriberworkflowpreferencedto.js +68 -0
- package/models/components/subscriberworkflowpreferencedto.js.map +1 -0
- package/models/components/timedconfig.d.ts +8 -8
- package/models/components/timedconfig.d.ts.map +1 -1
- package/models/components/timedconfig.js +14 -13
- package/models/components/timedconfig.js.map +1 -1
- package/models/components/triggereventrequestdto.d.ts +102 -10
- package/models/components/triggereventrequestdto.d.ts.map +1 -1
- package/models/components/triggereventrequestdto.js +43 -3
- package/models/components/triggereventrequestdto.js.map +1 -1
- package/models/components/triggereventtoallrequestdto.d.ts +84 -2
- package/models/components/triggereventtoallrequestdto.d.ts.map +1 -1
- package/models/components/triggereventtoallrequestdto.js +28 -2
- package/models/components/triggereventtoallrequestdto.js.map +1 -1
- package/models/components/updatesubscriberchannelrequestdto.d.ts +2 -78
- package/models/components/updatesubscriberchannelrequestdto.d.ts.map +1 -1
- package/models/components/updatesubscriberchannelrequestdto.js +4 -41
- package/models/components/updatesubscriberchannelrequestdto.js.map +1 -1
- package/models/components/updatesubscriberrequestdto.d.ts +72 -0
- package/models/components/updatesubscriberrequestdto.d.ts.map +1 -0
- package/models/components/updatesubscriberrequestdto.js +74 -0
- package/models/components/updatesubscriberrequestdto.js.map +1 -0
- package/models/components/workflowresponse.d.ts +3 -3
- package/models/components/workflowresponse.d.ts.map +1 -1
- package/models/components/workflowresponse.js +3 -3
- package/models/components/workflowresponse.js.map +1 -1
- package/models/errors/errordto.d.ts +83 -3
- package/models/errors/errordto.d.ts.map +1 -1
- package/models/errors/errordto.js +99 -3
- package/models/errors/errordto.js.map +1 -1
- package/models/errors/validationerrordto.d.ts +66 -51
- package/models/errors/validationerrordto.d.ts.map +1 -1
- package/models/errors/validationerrordto.js +83 -67
- package/models/errors/validationerrordto.js.map +1 -1
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/messagescontrollergetmessages.d.ts +2 -2
- package/models/operations/messagescontrollergetmessages.d.ts.map +1 -1
- package/models/operations/messagescontrollergetmessages.js +2 -2
- package/models/operations/messagescontrollergetmessages.js.map +1 -1
- package/models/operations/subscriberscontrollersearchsubscribers.d.ts +26 -6
- package/models/operations/subscriberscontrollersearchsubscribers.d.ts.map +1 -1
- package/models/operations/subscriberscontrollersearchsubscribers.js +11 -6
- package/models/operations/subscriberscontrollersearchsubscribers.js.map +1 -1
- package/models/operations/subscribersv1controllerupdatesubscriber.d.ts +68 -0
- package/models/operations/subscribersv1controllerupdatesubscriber.d.ts.map +1 -0
- package/models/operations/subscribersv1controllerupdatesubscriber.js +114 -0
- package/models/operations/subscribersv1controllerupdatesubscriber.js.map +1 -0
- package/package.json +3 -3
- package/sdk/subscribers.d.ts +7 -0
- package/sdk/subscribers.d.ts.map +1 -1
- package/sdk/subscribers.js +10 -0
- package/sdk/subscribers.js.map +1 -1
- package/sources/json-development.json +5818 -3516
- package/src/funcs/subscribersSearch.ts +1 -0
- package/src/funcs/subscribersUpsert.ts +240 -0
- package/src/hooks/types.ts +1 -1
- package/src/lib/config.ts +4 -4
- package/src/lib/matchers.ts +20 -0
- package/src/lib/sdks.ts +19 -13
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/prompts.ts +8 -1
- package/src/mcp-server/resources.ts +16 -2
- package/src/mcp-server/server.ts +5 -3
- package/src/mcp-server/tools/subscribersUpsert.ts +43 -0
- package/src/mcp-server/tools.ts +6 -3
- package/src/models/components/activitynotificationjobresponsedto.ts +48 -26
- package/src/models/components/activitynotificationstepresponsedto.ts +50 -29
- package/src/models/components/channelsettingsdto.ts +8 -50
- package/src/models/components/chatorpushproviderenum.ts +54 -0
- package/src/models/components/constraintvalidation.ts +270 -0
- package/src/models/components/digestmetadatadto.ts +16 -15
- package/src/models/components/digestregularmetadata.ts +30 -36
- package/src/models/components/digesttimedconfigdto.ts +18 -14
- package/src/models/components/getsubscriberpreferencesdto.ts +18 -18
- package/src/models/components/index.ts +11 -5
- package/src/models/components/integrationresponsedto.ts +14 -18
- package/src/models/components/messageactionresult.ts +24 -31
- package/src/models/components/messagecta.ts +4 -4
- package/src/models/components/messageresponsedto.ts +22 -8
- package/src/models/components/messagesresponsedto.ts +103 -0
- package/src/models/components/notificationfeeditemdto.ts +0 -7
- package/src/models/components/notificationstepdto.ts +20 -26
- package/src/models/components/notificationtriggerdto.ts +18 -15
- package/src/models/components/patchsubscriberpreferencesdto.ts +1 -1
- package/src/models/components/preferenceoverridesourceenum.ts +42 -0
- package/src/models/components/providersidenum.ts +1 -0
- package/src/models/components/stepfilterdto.ts +16 -15
- package/src/models/components/stepsoverrides.ts +65 -0
- package/src/models/components/steptypeenum.ts +2 -2
- package/src/models/components/subscriberchanneldto.ts +14 -18
- package/src/models/components/subscriberglobalpreferencedto.ts +84 -0
- package/src/models/components/subscriberpreferencechannels.ts +108 -0
- package/src/models/components/subscriberpreferenceoverridedto.ts +88 -0
- package/src/models/components/subscriberpreferencesworkflowinfodto.ts +95 -0
- package/src/models/components/subscriberresponsedto.ts +34 -34
- package/src/models/components/subscriberworkflowpreferencedto.ts +110 -0
- package/src/models/components/timedconfig.ts +14 -16
- package/src/models/components/triggereventrequestdto.ts +122 -4
- package/src/models/components/triggereventtoallrequestdto.ts +92 -5
- package/src/models/components/updatesubscriberchannelrequestdto.ts +8 -56
- package/src/models/components/updatesubscriberrequestdto.ts +124 -0
- package/src/models/components/workflowresponse.ts +9 -9
- package/src/models/errors/errordto.ts +202 -5
- package/src/models/errors/validationerrordto.ts +178 -110
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/messagescontrollergetmessages.ts +4 -4
- package/src/models/operations/subscriberscontrollersearchsubscribers.ts +34 -12
- package/src/models/operations/subscribersv1controllerupdatesubscriber.ts +191 -0
- package/src/sdk/subscribers.ts +22 -0
- package/models/components/globalpreferencedto.d.ts +0 -38
- package/models/components/globalpreferencedto.d.ts.map +0 -1
- package/models/components/globalpreferencedto.js +0 -62
- package/models/components/globalpreferencedto.js.map +0 -1
- package/models/components/overrides.d.ts +0 -112
- package/models/components/overrides.d.ts.map +0 -1
- package/models/components/overrides.js +0 -111
- package/models/components/overrides.js.map +0 -1
- package/models/components/preferencechannels.d.ts +0 -37
- package/models/components/preferencechannels.d.ts.map +0 -1
- package/models/components/preferencechannels.js.map +0 -1
- package/models/components/workflowinfodto.d.ts +0 -42
- package/models/components/workflowinfodto.d.ts.map +0 -1
- package/models/components/workflowinfodto.js.map +0 -1
- package/models/components/workflowpreferencedto.d.ts +0 -50
- package/models/components/workflowpreferencedto.d.ts.map +0 -1
- package/models/components/workflowpreferencedto.js +0 -68
- package/models/components/workflowpreferencedto.js.map +0 -1
- package/src/models/components/globalpreferencedto.ts +0 -82
- package/src/models/components/overrides.ts +0 -139
- package/src/models/components/preferencechannels.ts +0 -91
- package/src/models/components/workflowinfodto.ts +0 -81
- package/src/models/components/workflowpreferencedto.ts +0 -108
|
@@ -56,7 +56,7 @@ export type ActivityNotificationJobResponseDtoType = ClosedEnum<
|
|
|
56
56
|
/**
|
|
57
57
|
* Optional payload for the job
|
|
58
58
|
*/
|
|
59
|
-
export type
|
|
59
|
+
export type ActivityNotificationJobResponseDtoPayload = {};
|
|
60
60
|
|
|
61
61
|
export type ActivityNotificationJobResponseDto = {
|
|
62
62
|
/**
|
|
@@ -86,7 +86,7 @@ export type ActivityNotificationJobResponseDto = {
|
|
|
86
86
|
/**
|
|
87
87
|
* Optional payload for the job
|
|
88
88
|
*/
|
|
89
|
-
payload?:
|
|
89
|
+
payload?: ActivityNotificationJobResponseDtoPayload | undefined;
|
|
90
90
|
/**
|
|
91
91
|
* Provider ID of the job
|
|
92
92
|
*/
|
|
@@ -126,43 +126,62 @@ export namespace ActivityNotificationJobResponseDtoType$ {
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
/** @internal */
|
|
129
|
-
export const
|
|
130
|
-
|
|
129
|
+
export const ActivityNotificationJobResponseDtoPayload$inboundSchema: z.ZodType<
|
|
130
|
+
ActivityNotificationJobResponseDtoPayload,
|
|
131
|
+
z.ZodTypeDef,
|
|
132
|
+
unknown
|
|
133
|
+
> = z.object({});
|
|
131
134
|
|
|
132
135
|
/** @internal */
|
|
133
|
-
export type
|
|
136
|
+
export type ActivityNotificationJobResponseDtoPayload$Outbound = {};
|
|
134
137
|
|
|
135
138
|
/** @internal */
|
|
136
|
-
export const
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
export const ActivityNotificationJobResponseDtoPayload$outboundSchema:
|
|
140
|
+
z.ZodType<
|
|
141
|
+
ActivityNotificationJobResponseDtoPayload$Outbound,
|
|
142
|
+
z.ZodTypeDef,
|
|
143
|
+
ActivityNotificationJobResponseDtoPayload
|
|
144
|
+
> = z.object({});
|
|
141
145
|
|
|
142
146
|
/**
|
|
143
147
|
* @internal
|
|
144
148
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
145
149
|
*/
|
|
146
|
-
export namespace
|
|
147
|
-
/** @deprecated use `
|
|
148
|
-
export const inboundSchema =
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
export namespace ActivityNotificationJobResponseDtoPayload$ {
|
|
151
|
+
/** @deprecated use `ActivityNotificationJobResponseDtoPayload$inboundSchema` instead. */
|
|
152
|
+
export const inboundSchema =
|
|
153
|
+
ActivityNotificationJobResponseDtoPayload$inboundSchema;
|
|
154
|
+
/** @deprecated use `ActivityNotificationJobResponseDtoPayload$outboundSchema` instead. */
|
|
155
|
+
export const outboundSchema =
|
|
156
|
+
ActivityNotificationJobResponseDtoPayload$outboundSchema;
|
|
157
|
+
/** @deprecated use `ActivityNotificationJobResponseDtoPayload$Outbound` instead. */
|
|
158
|
+
export type Outbound = ActivityNotificationJobResponseDtoPayload$Outbound;
|
|
153
159
|
}
|
|
154
160
|
|
|
155
|
-
export function
|
|
156
|
-
|
|
161
|
+
export function activityNotificationJobResponseDtoPayloadToJSON(
|
|
162
|
+
activityNotificationJobResponseDtoPayload:
|
|
163
|
+
ActivityNotificationJobResponseDtoPayload,
|
|
164
|
+
): string {
|
|
165
|
+
return JSON.stringify(
|
|
166
|
+
ActivityNotificationJobResponseDtoPayload$outboundSchema.parse(
|
|
167
|
+
activityNotificationJobResponseDtoPayload,
|
|
168
|
+
),
|
|
169
|
+
);
|
|
157
170
|
}
|
|
158
171
|
|
|
159
|
-
export function
|
|
172
|
+
export function activityNotificationJobResponseDtoPayloadFromJSON(
|
|
160
173
|
jsonString: string,
|
|
161
|
-
): SafeParseResult<
|
|
174
|
+
): SafeParseResult<
|
|
175
|
+
ActivityNotificationJobResponseDtoPayload,
|
|
176
|
+
SDKValidationError
|
|
177
|
+
> {
|
|
162
178
|
return safeParse(
|
|
163
179
|
jsonString,
|
|
164
|
-
(x) =>
|
|
165
|
-
|
|
180
|
+
(x) =>
|
|
181
|
+
ActivityNotificationJobResponseDtoPayload$inboundSchema.parse(
|
|
182
|
+
JSON.parse(x),
|
|
183
|
+
),
|
|
184
|
+
`Failed to parse 'ActivityNotificationJobResponseDtoPayload' from JSON`,
|
|
166
185
|
);
|
|
167
186
|
}
|
|
168
187
|
|
|
@@ -180,7 +199,8 @@ export const ActivityNotificationJobResponseDto$inboundSchema: z.ZodType<
|
|
|
180
199
|
),
|
|
181
200
|
step: ActivityNotificationStepResponseDto$inboundSchema,
|
|
182
201
|
overrides: z.record(z.any()).optional(),
|
|
183
|
-
payload: z.lazy(() =>
|
|
202
|
+
payload: z.lazy(() => ActivityNotificationJobResponseDtoPayload$inboundSchema)
|
|
203
|
+
.optional(),
|
|
184
204
|
providerId: ProvidersIdEnum$inboundSchema,
|
|
185
205
|
status: z.string(),
|
|
186
206
|
updatedAt: z.string().optional(),
|
|
@@ -200,7 +220,7 @@ export type ActivityNotificationJobResponseDto$Outbound = {
|
|
|
200
220
|
>;
|
|
201
221
|
step: ActivityNotificationStepResponseDto$Outbound;
|
|
202
222
|
overrides?: { [k: string]: any } | undefined;
|
|
203
|
-
payload?:
|
|
223
|
+
payload?: ActivityNotificationJobResponseDtoPayload$Outbound | undefined;
|
|
204
224
|
providerId: string;
|
|
205
225
|
status: string;
|
|
206
226
|
updatedAt?: string | undefined;
|
|
@@ -220,7 +240,9 @@ export const ActivityNotificationJobResponseDto$outboundSchema: z.ZodType<
|
|
|
220
240
|
),
|
|
221
241
|
step: ActivityNotificationStepResponseDto$outboundSchema,
|
|
222
242
|
overrides: z.record(z.any()).optional(),
|
|
223
|
-
payload: z.lazy(() =>
|
|
243
|
+
payload: z.lazy(() =>
|
|
244
|
+
ActivityNotificationJobResponseDtoPayload$outboundSchema
|
|
245
|
+
).optional(),
|
|
224
246
|
providerId: ProvidersIdEnum$outboundSchema,
|
|
225
247
|
status: z.string(),
|
|
226
248
|
updatedAt: z.string().optional(),
|
|
@@ -33,7 +33,7 @@ export type ControlVariables = {};
|
|
|
33
33
|
/**
|
|
34
34
|
* Metadata for the workflow step
|
|
35
35
|
*/
|
|
36
|
-
export type
|
|
36
|
+
export type ActivityNotificationStepResponseDtoMetadata = {};
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* Step issues
|
|
@@ -60,7 +60,7 @@ export type ActivityNotificationStepResponseDto = {
|
|
|
60
60
|
/**
|
|
61
61
|
* Metadata for the workflow step
|
|
62
62
|
*/
|
|
63
|
-
metadata?:
|
|
63
|
+
metadata?: ActivityNotificationStepResponseDtoMetadata | undefined;
|
|
64
64
|
/**
|
|
65
65
|
* Step issues
|
|
66
66
|
*/
|
|
@@ -202,46 +202,63 @@ export function controlVariablesFromJSON(
|
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
/** @internal */
|
|
205
|
-
export const
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
205
|
+
export const ActivityNotificationStepResponseDtoMetadata$inboundSchema:
|
|
206
|
+
z.ZodType<
|
|
207
|
+
ActivityNotificationStepResponseDtoMetadata,
|
|
208
|
+
z.ZodTypeDef,
|
|
209
|
+
unknown
|
|
210
|
+
> = z.object({});
|
|
210
211
|
|
|
211
212
|
/** @internal */
|
|
212
|
-
export type
|
|
213
|
+
export type ActivityNotificationStepResponseDtoMetadata$Outbound = {};
|
|
213
214
|
|
|
214
215
|
/** @internal */
|
|
215
|
-
export const
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
216
|
+
export const ActivityNotificationStepResponseDtoMetadata$outboundSchema:
|
|
217
|
+
z.ZodType<
|
|
218
|
+
ActivityNotificationStepResponseDtoMetadata$Outbound,
|
|
219
|
+
z.ZodTypeDef,
|
|
220
|
+
ActivityNotificationStepResponseDtoMetadata
|
|
221
|
+
> = z.object({});
|
|
220
222
|
|
|
221
223
|
/**
|
|
222
224
|
* @internal
|
|
223
225
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
224
226
|
*/
|
|
225
|
-
export namespace
|
|
226
|
-
/** @deprecated use `
|
|
227
|
-
export const inboundSchema =
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
227
|
+
export namespace ActivityNotificationStepResponseDtoMetadata$ {
|
|
228
|
+
/** @deprecated use `ActivityNotificationStepResponseDtoMetadata$inboundSchema` instead. */
|
|
229
|
+
export const inboundSchema =
|
|
230
|
+
ActivityNotificationStepResponseDtoMetadata$inboundSchema;
|
|
231
|
+
/** @deprecated use `ActivityNotificationStepResponseDtoMetadata$outboundSchema` instead. */
|
|
232
|
+
export const outboundSchema =
|
|
233
|
+
ActivityNotificationStepResponseDtoMetadata$outboundSchema;
|
|
234
|
+
/** @deprecated use `ActivityNotificationStepResponseDtoMetadata$Outbound` instead. */
|
|
235
|
+
export type Outbound = ActivityNotificationStepResponseDtoMetadata$Outbound;
|
|
232
236
|
}
|
|
233
237
|
|
|
234
|
-
export function
|
|
235
|
-
|
|
238
|
+
export function activityNotificationStepResponseDtoMetadataToJSON(
|
|
239
|
+
activityNotificationStepResponseDtoMetadata:
|
|
240
|
+
ActivityNotificationStepResponseDtoMetadata,
|
|
241
|
+
): string {
|
|
242
|
+
return JSON.stringify(
|
|
243
|
+
ActivityNotificationStepResponseDtoMetadata$outboundSchema.parse(
|
|
244
|
+
activityNotificationStepResponseDtoMetadata,
|
|
245
|
+
),
|
|
246
|
+
);
|
|
236
247
|
}
|
|
237
248
|
|
|
238
|
-
export function
|
|
249
|
+
export function activityNotificationStepResponseDtoMetadataFromJSON(
|
|
239
250
|
jsonString: string,
|
|
240
|
-
): SafeParseResult<
|
|
251
|
+
): SafeParseResult<
|
|
252
|
+
ActivityNotificationStepResponseDtoMetadata,
|
|
253
|
+
SDKValidationError
|
|
254
|
+
> {
|
|
241
255
|
return safeParse(
|
|
242
256
|
jsonString,
|
|
243
|
-
(x) =>
|
|
244
|
-
|
|
257
|
+
(x) =>
|
|
258
|
+
ActivityNotificationStepResponseDtoMetadata$inboundSchema.parse(
|
|
259
|
+
JSON.parse(x),
|
|
260
|
+
),
|
|
261
|
+
`Failed to parse 'ActivityNotificationStepResponseDtoMetadata' from JSON`,
|
|
245
262
|
);
|
|
246
263
|
}
|
|
247
264
|
|
|
@@ -298,7 +315,9 @@ export const ActivityNotificationStepResponseDto$inboundSchema: z.ZodType<
|
|
|
298
315
|
ActivityNotificationStepResponseDtoReplyCallback$inboundSchema
|
|
299
316
|
).optional(),
|
|
300
317
|
controlVariables: z.lazy(() => ControlVariables$inboundSchema).optional(),
|
|
301
|
-
metadata: z.lazy(() =>
|
|
318
|
+
metadata: z.lazy(() =>
|
|
319
|
+
ActivityNotificationStepResponseDtoMetadata$inboundSchema
|
|
320
|
+
).optional(),
|
|
302
321
|
issues: z.lazy(() => Issues$inboundSchema).optional(),
|
|
303
322
|
filters: z.array(StepFilterDto$inboundSchema),
|
|
304
323
|
template: MessageTemplateDto$inboundSchema.optional(),
|
|
@@ -324,7 +343,7 @@ export type ActivityNotificationStepResponseDto$Outbound = {
|
|
|
324
343
|
| ActivityNotificationStepResponseDtoReplyCallback$Outbound
|
|
325
344
|
| undefined;
|
|
326
345
|
controlVariables?: ControlVariables$Outbound | undefined;
|
|
327
|
-
metadata?:
|
|
346
|
+
metadata?: ActivityNotificationStepResponseDtoMetadata$Outbound | undefined;
|
|
328
347
|
issues?: Issues$Outbound | undefined;
|
|
329
348
|
filters: Array<StepFilterDto$Outbound>;
|
|
330
349
|
template?: MessageTemplateDto$Outbound | undefined;
|
|
@@ -346,7 +365,9 @@ export const ActivityNotificationStepResponseDto$outboundSchema: z.ZodType<
|
|
|
346
365
|
ActivityNotificationStepResponseDtoReplyCallback$outboundSchema
|
|
347
366
|
).optional(),
|
|
348
367
|
controlVariables: z.lazy(() => ControlVariables$outboundSchema).optional(),
|
|
349
|
-
metadata: z.lazy(() =>
|
|
368
|
+
metadata: z.lazy(() =>
|
|
369
|
+
ActivityNotificationStepResponseDtoMetadata$outboundSchema
|
|
370
|
+
).optional(),
|
|
350
371
|
issues: z.lazy(() => Issues$outboundSchema).optional(),
|
|
351
372
|
filters: z.array(StepFilterDto$outboundSchema),
|
|
352
373
|
template: MessageTemplateDto$outboundSchema.optional(),
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
9
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
10
|
import {
|
|
@@ -14,39 +13,17 @@ import {
|
|
|
14
13
|
ChannelCredentials$Outbound,
|
|
15
14
|
ChannelCredentials$outboundSchema,
|
|
16
15
|
} from "./channelcredentials.js";
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Slack: "slack",
|
|
23
|
-
Discord: "discord",
|
|
24
|
-
Msteams: "msteams",
|
|
25
|
-
Mattermost: "mattermost",
|
|
26
|
-
Ryver: "ryver",
|
|
27
|
-
Zulip: "zulip",
|
|
28
|
-
GrafanaOnCall: "grafana-on-call",
|
|
29
|
-
Getstream: "getstream",
|
|
30
|
-
RocketChat: "rocket-chat",
|
|
31
|
-
WhatsappBusiness: "whatsapp-business",
|
|
32
|
-
Fcm: "fcm",
|
|
33
|
-
Apns: "apns",
|
|
34
|
-
Expo: "expo",
|
|
35
|
-
OneSignal: "one-signal",
|
|
36
|
-
Pushpad: "pushpad",
|
|
37
|
-
PushWebhook: "push-webhook",
|
|
38
|
-
PusherBeams: "pusher-beams",
|
|
39
|
-
} as const;
|
|
40
|
-
/**
|
|
41
|
-
* The provider identifier for the credentials
|
|
42
|
-
*/
|
|
43
|
-
export type ProviderId = ClosedEnum<typeof ProviderId>;
|
|
16
|
+
import {
|
|
17
|
+
ChatOrPushProviderEnum,
|
|
18
|
+
ChatOrPushProviderEnum$inboundSchema,
|
|
19
|
+
ChatOrPushProviderEnum$outboundSchema,
|
|
20
|
+
} from "./chatorpushproviderenum.js";
|
|
44
21
|
|
|
45
22
|
export type ChannelSettingsDto = {
|
|
46
23
|
/**
|
|
47
24
|
* The provider identifier for the credentials
|
|
48
25
|
*/
|
|
49
|
-
providerId:
|
|
26
|
+
providerId: ChatOrPushProviderEnum;
|
|
50
27
|
/**
|
|
51
28
|
* The integration identifier
|
|
52
29
|
*/
|
|
@@ -61,32 +38,13 @@ export type ChannelSettingsDto = {
|
|
|
61
38
|
integrationId: string;
|
|
62
39
|
};
|
|
63
40
|
|
|
64
|
-
/** @internal */
|
|
65
|
-
export const ProviderId$inboundSchema: z.ZodNativeEnum<typeof ProviderId> = z
|
|
66
|
-
.nativeEnum(ProviderId);
|
|
67
|
-
|
|
68
|
-
/** @internal */
|
|
69
|
-
export const ProviderId$outboundSchema: z.ZodNativeEnum<typeof ProviderId> =
|
|
70
|
-
ProviderId$inboundSchema;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* @internal
|
|
74
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
75
|
-
*/
|
|
76
|
-
export namespace ProviderId$ {
|
|
77
|
-
/** @deprecated use `ProviderId$inboundSchema` instead. */
|
|
78
|
-
export const inboundSchema = ProviderId$inboundSchema;
|
|
79
|
-
/** @deprecated use `ProviderId$outboundSchema` instead. */
|
|
80
|
-
export const outboundSchema = ProviderId$outboundSchema;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
41
|
/** @internal */
|
|
84
42
|
export const ChannelSettingsDto$inboundSchema: z.ZodType<
|
|
85
43
|
ChannelSettingsDto,
|
|
86
44
|
z.ZodTypeDef,
|
|
87
45
|
unknown
|
|
88
46
|
> = z.object({
|
|
89
|
-
providerId:
|
|
47
|
+
providerId: ChatOrPushProviderEnum$inboundSchema,
|
|
90
48
|
integrationIdentifier: z.string().optional(),
|
|
91
49
|
credentials: ChannelCredentials$inboundSchema,
|
|
92
50
|
_integrationId: z.string(),
|
|
@@ -110,7 +68,7 @@ export const ChannelSettingsDto$outboundSchema: z.ZodType<
|
|
|
110
68
|
z.ZodTypeDef,
|
|
111
69
|
ChannelSettingsDto
|
|
112
70
|
> = z.object({
|
|
113
|
-
providerId:
|
|
71
|
+
providerId: ChatOrPushProviderEnum$outboundSchema,
|
|
114
72
|
integrationIdentifier: z.string().optional(),
|
|
115
73
|
credentials: ChannelCredentials$outboundSchema,
|
|
116
74
|
integrationId: z.string(),
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The provider identifier for the credentials
|
|
10
|
+
*/
|
|
11
|
+
export const ChatOrPushProviderEnum = {
|
|
12
|
+
Slack: "slack",
|
|
13
|
+
Discord: "discord",
|
|
14
|
+
Msteams: "msteams",
|
|
15
|
+
Mattermost: "mattermost",
|
|
16
|
+
Ryver: "ryver",
|
|
17
|
+
Zulip: "zulip",
|
|
18
|
+
GrafanaOnCall: "grafana-on-call",
|
|
19
|
+
Getstream: "getstream",
|
|
20
|
+
RocketChat: "rocket-chat",
|
|
21
|
+
WhatsappBusiness: "whatsapp-business",
|
|
22
|
+
Fcm: "fcm",
|
|
23
|
+
Apns: "apns",
|
|
24
|
+
Expo: "expo",
|
|
25
|
+
OneSignal: "one-signal",
|
|
26
|
+
Pushpad: "pushpad",
|
|
27
|
+
PushWebhook: "push-webhook",
|
|
28
|
+
PusherBeams: "pusher-beams",
|
|
29
|
+
} as const;
|
|
30
|
+
/**
|
|
31
|
+
* The provider identifier for the credentials
|
|
32
|
+
*/
|
|
33
|
+
export type ChatOrPushProviderEnum = ClosedEnum<typeof ChatOrPushProviderEnum>;
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const ChatOrPushProviderEnum$inboundSchema: z.ZodNativeEnum<
|
|
37
|
+
typeof ChatOrPushProviderEnum
|
|
38
|
+
> = z.nativeEnum(ChatOrPushProviderEnum);
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const ChatOrPushProviderEnum$outboundSchema: z.ZodNativeEnum<
|
|
42
|
+
typeof ChatOrPushProviderEnum
|
|
43
|
+
> = ChatOrPushProviderEnum$inboundSchema;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
48
|
+
*/
|
|
49
|
+
export namespace ChatOrPushProviderEnum$ {
|
|
50
|
+
/** @deprecated use `ChatOrPushProviderEnum$inboundSchema` instead. */
|
|
51
|
+
export const inboundSchema = ChatOrPushProviderEnum$inboundSchema;
|
|
52
|
+
/** @deprecated use `ChatOrPushProviderEnum$outboundSchema` instead. */
|
|
53
|
+
export const outboundSchema = ChatOrPushProviderEnum$outboundSchema;
|
|
54
|
+
}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type Five = string | number | boolean | { [k: string]: any };
|
|
11
|
+
|
|
12
|
+
export type Four = {};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Value that failed validation
|
|
16
|
+
*/
|
|
17
|
+
export type Value =
|
|
18
|
+
| Four
|
|
19
|
+
| string
|
|
20
|
+
| number
|
|
21
|
+
| boolean
|
|
22
|
+
| Array<string | number | boolean | { [k: string]: any } | null>;
|
|
23
|
+
|
|
24
|
+
export type ConstraintValidation = {
|
|
25
|
+
/**
|
|
26
|
+
* List of validation error messages
|
|
27
|
+
*/
|
|
28
|
+
messages: Array<string>;
|
|
29
|
+
/**
|
|
30
|
+
* Value that failed validation
|
|
31
|
+
*/
|
|
32
|
+
value?:
|
|
33
|
+
| Four
|
|
34
|
+
| string
|
|
35
|
+
| number
|
|
36
|
+
| boolean
|
|
37
|
+
| Array<string | number | boolean | { [k: string]: any } | null>
|
|
38
|
+
| null
|
|
39
|
+
| undefined;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const Five$inboundSchema: z.ZodType<Five, z.ZodTypeDef, unknown> = z
|
|
44
|
+
.union([z.string(), z.number(), z.boolean(), z.record(z.any())]);
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export type Five$Outbound = string | number | boolean | { [k: string]: any };
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const Five$outboundSchema: z.ZodType<Five$Outbound, z.ZodTypeDef, Five> =
|
|
51
|
+
z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]);
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
56
|
+
*/
|
|
57
|
+
export namespace Five$ {
|
|
58
|
+
/** @deprecated use `Five$inboundSchema` instead. */
|
|
59
|
+
export const inboundSchema = Five$inboundSchema;
|
|
60
|
+
/** @deprecated use `Five$outboundSchema` instead. */
|
|
61
|
+
export const outboundSchema = Five$outboundSchema;
|
|
62
|
+
/** @deprecated use `Five$Outbound` instead. */
|
|
63
|
+
export type Outbound = Five$Outbound;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function fiveToJSON(five: Five): string {
|
|
67
|
+
return JSON.stringify(Five$outboundSchema.parse(five));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function fiveFromJSON(
|
|
71
|
+
jsonString: string,
|
|
72
|
+
): SafeParseResult<Five, SDKValidationError> {
|
|
73
|
+
return safeParse(
|
|
74
|
+
jsonString,
|
|
75
|
+
(x) => Five$inboundSchema.parse(JSON.parse(x)),
|
|
76
|
+
`Failed to parse 'Five' from JSON`,
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** @internal */
|
|
81
|
+
export const Four$inboundSchema: z.ZodType<Four, z.ZodTypeDef, unknown> = z
|
|
82
|
+
.object({});
|
|
83
|
+
|
|
84
|
+
/** @internal */
|
|
85
|
+
export type Four$Outbound = {};
|
|
86
|
+
|
|
87
|
+
/** @internal */
|
|
88
|
+
export const Four$outboundSchema: z.ZodType<Four$Outbound, z.ZodTypeDef, Four> =
|
|
89
|
+
z.object({});
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @internal
|
|
93
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
94
|
+
*/
|
|
95
|
+
export namespace Four$ {
|
|
96
|
+
/** @deprecated use `Four$inboundSchema` instead. */
|
|
97
|
+
export const inboundSchema = Four$inboundSchema;
|
|
98
|
+
/** @deprecated use `Four$outboundSchema` instead. */
|
|
99
|
+
export const outboundSchema = Four$outboundSchema;
|
|
100
|
+
/** @deprecated use `Four$Outbound` instead. */
|
|
101
|
+
export type Outbound = Four$Outbound;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function fourToJSON(four: Four): string {
|
|
105
|
+
return JSON.stringify(Four$outboundSchema.parse(four));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function fourFromJSON(
|
|
109
|
+
jsonString: string,
|
|
110
|
+
): SafeParseResult<Four, SDKValidationError> {
|
|
111
|
+
return safeParse(
|
|
112
|
+
jsonString,
|
|
113
|
+
(x) => Four$inboundSchema.parse(JSON.parse(x)),
|
|
114
|
+
`Failed to parse 'Four' from JSON`,
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** @internal */
|
|
119
|
+
export const Value$inboundSchema: z.ZodType<Value, z.ZodTypeDef, unknown> = z
|
|
120
|
+
.union([
|
|
121
|
+
z.lazy(() => Four$inboundSchema),
|
|
122
|
+
z.string(),
|
|
123
|
+
z.number(),
|
|
124
|
+
z.boolean(),
|
|
125
|
+
z.array(
|
|
126
|
+
z.nullable(
|
|
127
|
+
z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]),
|
|
128
|
+
),
|
|
129
|
+
),
|
|
130
|
+
]);
|
|
131
|
+
|
|
132
|
+
/** @internal */
|
|
133
|
+
export type Value$Outbound =
|
|
134
|
+
| Four$Outbound
|
|
135
|
+
| string
|
|
136
|
+
| number
|
|
137
|
+
| boolean
|
|
138
|
+
| Array<string | number | boolean | { [k: string]: any } | null>;
|
|
139
|
+
|
|
140
|
+
/** @internal */
|
|
141
|
+
export const Value$outboundSchema: z.ZodType<
|
|
142
|
+
Value$Outbound,
|
|
143
|
+
z.ZodTypeDef,
|
|
144
|
+
Value
|
|
145
|
+
> = z.union([
|
|
146
|
+
z.lazy(() => Four$outboundSchema),
|
|
147
|
+
z.string(),
|
|
148
|
+
z.number(),
|
|
149
|
+
z.boolean(),
|
|
150
|
+
z.array(
|
|
151
|
+
z.nullable(
|
|
152
|
+
z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]),
|
|
153
|
+
),
|
|
154
|
+
),
|
|
155
|
+
]);
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* @internal
|
|
159
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
160
|
+
*/
|
|
161
|
+
export namespace Value$ {
|
|
162
|
+
/** @deprecated use `Value$inboundSchema` instead. */
|
|
163
|
+
export const inboundSchema = Value$inboundSchema;
|
|
164
|
+
/** @deprecated use `Value$outboundSchema` instead. */
|
|
165
|
+
export const outboundSchema = Value$outboundSchema;
|
|
166
|
+
/** @deprecated use `Value$Outbound` instead. */
|
|
167
|
+
export type Outbound = Value$Outbound;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export function valueToJSON(value: Value): string {
|
|
171
|
+
return JSON.stringify(Value$outboundSchema.parse(value));
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export function valueFromJSON(
|
|
175
|
+
jsonString: string,
|
|
176
|
+
): SafeParseResult<Value, SDKValidationError> {
|
|
177
|
+
return safeParse(
|
|
178
|
+
jsonString,
|
|
179
|
+
(x) => Value$inboundSchema.parse(JSON.parse(x)),
|
|
180
|
+
`Failed to parse 'Value' from JSON`,
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/** @internal */
|
|
185
|
+
export const ConstraintValidation$inboundSchema: z.ZodType<
|
|
186
|
+
ConstraintValidation,
|
|
187
|
+
z.ZodTypeDef,
|
|
188
|
+
unknown
|
|
189
|
+
> = z.object({
|
|
190
|
+
messages: z.array(z.string()),
|
|
191
|
+
value: z.nullable(
|
|
192
|
+
z.union([
|
|
193
|
+
z.lazy(() => Four$inboundSchema),
|
|
194
|
+
z.string(),
|
|
195
|
+
z.number(),
|
|
196
|
+
z.boolean(),
|
|
197
|
+
z.array(
|
|
198
|
+
z.nullable(
|
|
199
|
+
z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]),
|
|
200
|
+
),
|
|
201
|
+
),
|
|
202
|
+
]),
|
|
203
|
+
).optional(),
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
/** @internal */
|
|
207
|
+
export type ConstraintValidation$Outbound = {
|
|
208
|
+
messages: Array<string>;
|
|
209
|
+
value?:
|
|
210
|
+
| Four$Outbound
|
|
211
|
+
| string
|
|
212
|
+
| number
|
|
213
|
+
| boolean
|
|
214
|
+
| Array<string | number | boolean | { [k: string]: any } | null>
|
|
215
|
+
| null
|
|
216
|
+
| undefined;
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
/** @internal */
|
|
220
|
+
export const ConstraintValidation$outboundSchema: z.ZodType<
|
|
221
|
+
ConstraintValidation$Outbound,
|
|
222
|
+
z.ZodTypeDef,
|
|
223
|
+
ConstraintValidation
|
|
224
|
+
> = z.object({
|
|
225
|
+
messages: z.array(z.string()),
|
|
226
|
+
value: z.nullable(
|
|
227
|
+
z.union([
|
|
228
|
+
z.lazy(() => Four$outboundSchema),
|
|
229
|
+
z.string(),
|
|
230
|
+
z.number(),
|
|
231
|
+
z.boolean(),
|
|
232
|
+
z.array(
|
|
233
|
+
z.nullable(
|
|
234
|
+
z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]),
|
|
235
|
+
),
|
|
236
|
+
),
|
|
237
|
+
]),
|
|
238
|
+
).optional(),
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* @internal
|
|
243
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
244
|
+
*/
|
|
245
|
+
export namespace ConstraintValidation$ {
|
|
246
|
+
/** @deprecated use `ConstraintValidation$inboundSchema` instead. */
|
|
247
|
+
export const inboundSchema = ConstraintValidation$inboundSchema;
|
|
248
|
+
/** @deprecated use `ConstraintValidation$outboundSchema` instead. */
|
|
249
|
+
export const outboundSchema = ConstraintValidation$outboundSchema;
|
|
250
|
+
/** @deprecated use `ConstraintValidation$Outbound` instead. */
|
|
251
|
+
export type Outbound = ConstraintValidation$Outbound;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export function constraintValidationToJSON(
|
|
255
|
+
constraintValidation: ConstraintValidation,
|
|
256
|
+
): string {
|
|
257
|
+
return JSON.stringify(
|
|
258
|
+
ConstraintValidation$outboundSchema.parse(constraintValidation),
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export function constraintValidationFromJSON(
|
|
263
|
+
jsonString: string,
|
|
264
|
+
): SafeParseResult<ConstraintValidation, SDKValidationError> {
|
|
265
|
+
return safeParse(
|
|
266
|
+
jsonString,
|
|
267
|
+
(x) => ConstraintValidation$inboundSchema.parse(JSON.parse(x)),
|
|
268
|
+
`Failed to parse 'ConstraintValidation' from JSON`,
|
|
269
|
+
);
|
|
270
|
+
}
|