@novu/api 3.12.0 → 3.14.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/README.md +41 -33
- package/examples/package-lock.json +3 -3
- package/funcs/environmentsGetTags.d.ts +1 -1
- package/funcs/environmentsGetTags.js +1 -1
- package/funcs/subscribersPreferencesList.d.ts +1 -1
- package/funcs/subscribersPreferencesList.d.ts.map +1 -1
- package/funcs/subscribersPreferencesList.js +5 -9
- package/funcs/subscribersPreferencesList.js.map +1 -1
- package/funcs/subscribersTopicsList.js +1 -0
- package/funcs/subscribersTopicsList.js.map +1 -1
- package/funcs/topicsSubscriptionsGetSubscription.d.ts +2 -2
- package/funcs/topicsSubscriptionsGetSubscription.js +2 -2
- package/funcs/topicsSubscriptionsList.js +1 -0
- package/funcs/topicsSubscriptionsList.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/lib/sdks.js +2 -2
- package/lib/sdks.js.map +1 -1
- package/models/components/activitynotificationjobresponsedto.d.ts +4 -4
- package/models/components/activitynotificationjobresponsedto.d.ts.map +1 -1
- package/models/components/activitynotificationjobresponsedto.js +6 -7
- package/models/components/activitynotificationjobresponsedto.js.map +1 -1
- package/models/components/bulkupdatesubscriberpreferencesdto.d.ts +34 -0
- package/models/components/bulkupdatesubscriberpreferencesdto.d.ts.map +1 -1
- package/models/components/bulkupdatesubscriberpreferencesdto.js +17 -1
- package/models/components/bulkupdatesubscriberpreferencesdto.js.map +1 -1
- package/models/components/createchannelconnectionrequestdto.d.ts +10 -10
- package/models/components/createchannelconnectionrequestdto.d.ts.map +1 -1
- package/models/components/createchannelconnectionrequestdto.js +16 -12
- package/models/components/createchannelconnectionrequestdto.js.map +1 -1
- package/models/components/createslackchannelendpointdto.d.ts +8 -8
- package/models/components/createslackchannelendpointdto.d.ts.map +1 -1
- package/models/components/createslackchannelendpointdto.js +13 -7
- package/models/components/createslackchannelendpointdto.js.map +1 -1
- package/models/components/createtopicsubscriptionsrequestdto.d.ts +34 -0
- package/models/components/createtopicsubscriptionsrequestdto.d.ts.map +1 -1
- package/models/components/createtopicsubscriptionsrequestdto.js +23 -1
- package/models/components/createtopicsubscriptionsrequestdto.js.map +1 -1
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/components/messageactionresult.d.ts +3 -8
- package/models/components/messageactionresult.d.ts.map +1 -1
- package/models/components/messageactionresult.js +2 -8
- package/models/components/messageactionresult.js.map +1 -1
- package/models/components/messageresponsedto.d.ts +6 -16
- package/models/components/messageresponsedto.d.ts.map +1 -1
- package/models/components/messageresponsedto.js +3 -15
- package/models/components/messageresponsedto.js.map +1 -1
- package/models/components/patchsubscriberpreferencesdto.d.ts +34 -0
- package/models/components/patchsubscriberpreferencesdto.d.ts.map +1 -1
- package/models/components/patchsubscriberpreferencesdto.js +19 -1
- package/models/components/patchsubscriberpreferencesdto.js.map +1 -1
- package/models/components/subscriberworkflowpreferencedto.d.ts +4 -0
- package/models/components/subscriberworkflowpreferencedto.d.ts.map +1 -1
- package/models/components/subscriberworkflowpreferencedto.js +1 -0
- package/models/components/subscriberworkflowpreferencedto.js.map +1 -1
- package/models/components/subscriptiondetailsresponsedto.d.ts +30 -0
- package/models/components/subscriptiondetailsresponsedto.d.ts.map +1 -0
- package/models/components/{createtopicsubscriptionsresponsedto.js → subscriptiondetailsresponsedto.js} +12 -12
- package/models/components/subscriptiondetailsresponsedto.js.map +1 -0
- package/models/components/subscriptiondto.d.ts +4 -0
- package/models/components/subscriptiondto.d.ts.map +1 -1
- package/models/components/subscriptiondto.js +1 -0
- package/models/components/subscriptiondto.js.map +1 -1
- package/models/components/subscriptionresponsedto.d.ts +4 -0
- package/models/components/subscriptionresponsedto.d.ts.map +1 -1
- package/models/components/subscriptionresponsedto.js +1 -0
- package/models/components/subscriptionresponsedto.js.map +1 -1
- package/models/components/topicsubscriptionresponsedto.d.ts +4 -0
- package/models/components/topicsubscriptionresponsedto.d.ts.map +1 -1
- package/models/components/topicsubscriptionresponsedto.js +1 -0
- package/models/components/topicsubscriptionresponsedto.js.map +1 -1
- package/models/operations/inboundwebhookscontrollerhandlewebhook.d.ts +6 -2
- package/models/operations/inboundwebhookscontrollerhandlewebhook.d.ts.map +1 -1
- package/models/operations/inboundwebhookscontrollerhandlewebhook.js +1 -1
- package/models/operations/inboundwebhookscontrollerhandlewebhook.js.map +1 -1
- package/models/operations/subscriberscontrollergetsubscriberpreferences.d.ts +5 -0
- package/models/operations/subscriberscontrollergetsubscriberpreferences.d.ts.map +1 -1
- package/models/operations/subscriberscontrollergetsubscriberpreferences.js +1 -0
- package/models/operations/subscriberscontrollergetsubscriberpreferences.js.map +1 -1
- package/models/operations/subscriberscontrollerlistsubscribertopics.d.ts +5 -0
- package/models/operations/subscriberscontrollerlistsubscribertopics.d.ts.map +1 -1
- package/models/operations/subscriberscontrollerlistsubscribertopics.js +1 -0
- package/models/operations/subscriberscontrollerlistsubscribertopics.js.map +1 -1
- package/models/operations/topicscontrollergettopicsubscription.d.ts +1 -1
- package/models/operations/topicscontrollergettopicsubscription.d.ts.map +1 -1
- package/models/operations/topicscontrollergettopicsubscription.js +1 -1
- package/models/operations/topicscontrollergettopicsubscription.js.map +1 -1
- package/models/operations/topicscontrollerlisttopicsubscriptions.d.ts +5 -0
- package/models/operations/topicscontrollerlisttopicsubscriptions.d.ts.map +1 -1
- package/models/operations/topicscontrollerlisttopicsubscriptions.js +1 -0
- package/models/operations/topicscontrollerlisttopicsubscriptions.js.map +1 -1
- package/package.json +3 -3
- package/sdk/environments.d.ts +1 -1
- package/sdk/environments.js +1 -1
- package/sdk/preferences.d.ts +1 -1
- package/sdk/preferences.d.ts.map +1 -1
- package/sdk/preferences.js +2 -2
- package/sdk/preferences.js.map +1 -1
- package/sdk/subscriptions.d.ts +2 -2
- package/sdk/subscriptions.js +2 -2
- package/sources/json-development.json +268 -31
- package/src/funcs/environmentsGetTags.ts +1 -1
- package/src/funcs/subscribersPreferencesList.ts +5 -17
- package/src/funcs/subscribersTopicsList.ts +1 -0
- package/src/funcs/topicsSubscriptionsGetSubscription.ts +2 -2
- package/src/funcs/topicsSubscriptionsList.ts +1 -0
- package/src/lib/config.ts +4 -4
- package/src/lib/sdks.ts +2 -2
- package/src/models/components/activitynotificationjobresponsedto.ts +9 -19
- package/src/models/components/bulkupdatesubscriberpreferencesdto.ts +62 -0
- package/src/models/components/createchannelconnectionrequestdto.ts +51 -18
- package/src/models/components/createslackchannelendpointdto.ts +31 -13
- package/src/models/components/createtopicsubscriptionsrequestdto.ts +82 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/messageactionresult.ts +2 -21
- package/src/models/components/messageresponsedto.ts +4 -48
- package/src/models/components/patchsubscriberpreferencesdto.ts +48 -0
- package/src/models/components/subscriberworkflowpreferencedto.ts +5 -0
- package/src/models/components/subscriptiondetailsresponsedto.ts +58 -0
- package/src/models/components/subscriptiondto.ts +5 -0
- package/src/models/components/subscriptionresponsedto.ts +5 -0
- package/src/models/components/topicsubscriptionresponsedto.ts +5 -0
- package/src/models/operations/inboundwebhookscontrollerhandlewebhook.ts +3 -3
- package/src/models/operations/subscriberscontrollergetsubscriberpreferences.ts +6 -0
- package/src/models/operations/subscriberscontrollerlistsubscribertopics.ts +6 -0
- package/src/models/operations/topicscontrollergettopicsubscription.ts +2 -2
- package/src/models/operations/topicscontrollerlisttopicsubscriptions.ts +6 -0
- package/src/sdk/environments.ts +1 -1
- package/src/sdk/preferences.ts +2 -6
- package/src/sdk/subscriptions.ts +2 -2
- package/models/components/createtopicsubscriptionsresponsedto.d.ts +0 -24
- package/models/components/createtopicsubscriptionsresponsedto.d.ts.map +0 -1
- package/models/components/createtopicsubscriptionsresponsedto.js.map +0 -1
- package/models/components/steptypeenum.d.ts +0 -26
- package/models/components/steptypeenum.d.ts.map +0 -1
- package/models/components/steptypeenum.js +0 -60
- package/models/components/steptypeenum.js.map +0 -1
- package/models/components/uploadtranslationsrequestdto.d.ts +0 -34
- package/models/components/uploadtranslationsrequestdto.d.ts.map +0 -1
- package/models/components/uploadtranslationsrequestdto.js +0 -60
- package/models/components/uploadtranslationsrequestdto.js.map +0 -1
- package/src/models/components/createtopicsubscriptionsresponsedto.ts +0 -54
- package/src/models/components/steptypeenum.ts +0 -33
- package/src/models/components/uploadtranslationsrequestdto.ts +0 -62
- package/temp/example.ts +0 -5
package/src/lib/sdks.ts
CHANGED
|
@@ -304,9 +304,9 @@ export class ClientSDK {
|
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
-
const jsonLikeContentTypeRE =
|
|
307
|
+
const jsonLikeContentTypeRE = /^(application|text)\/([^+]+\+)*json.*/;
|
|
308
308
|
const jsonlLikeContentTypeRE =
|
|
309
|
-
|
|
309
|
+
/^(application|text)\/([^+]+\+)*(jsonl|x-ndjson)\b.*/;
|
|
310
310
|
async function logRequest(logger: Logger | undefined, req: Request) {
|
|
311
311
|
if (!logger) {
|
|
312
312
|
return;
|
|
@@ -50,7 +50,7 @@ export type ActivityNotificationJobResponseDtoType = ClosedEnum<
|
|
|
50
50
|
/**
|
|
51
51
|
* Optional payload for the job
|
|
52
52
|
*/
|
|
53
|
-
export type
|
|
53
|
+
export type Payload = {};
|
|
54
54
|
|
|
55
55
|
export type ActivityNotificationJobResponseDto = {
|
|
56
56
|
/**
|
|
@@ -80,7 +80,7 @@ export type ActivityNotificationJobResponseDto = {
|
|
|
80
80
|
/**
|
|
81
81
|
* Optional payload for the job
|
|
82
82
|
*/
|
|
83
|
-
payload?:
|
|
83
|
+
payload?: Payload | undefined;
|
|
84
84
|
/**
|
|
85
85
|
* Provider ID of the job
|
|
86
86
|
*/
|
|
@@ -106,25 +106,16 @@ export const ActivityNotificationJobResponseDtoType$inboundSchema:
|
|
|
106
106
|
);
|
|
107
107
|
|
|
108
108
|
/** @internal */
|
|
109
|
-
export const
|
|
110
|
-
|
|
111
|
-
z.ZodTypeDef,
|
|
112
|
-
unknown
|
|
113
|
-
> = z.object({});
|
|
109
|
+
export const Payload$inboundSchema: z.ZodType<Payload, z.ZodTypeDef, unknown> =
|
|
110
|
+
z.object({});
|
|
114
111
|
|
|
115
|
-
export function
|
|
112
|
+
export function payloadFromJSON(
|
|
116
113
|
jsonString: string,
|
|
117
|
-
): SafeParseResult<
|
|
118
|
-
ActivityNotificationJobResponseDtoPayload,
|
|
119
|
-
SDKValidationError
|
|
120
|
-
> {
|
|
114
|
+
): SafeParseResult<Payload, SDKValidationError> {
|
|
121
115
|
return safeParse(
|
|
122
116
|
jsonString,
|
|
123
|
-
(x) =>
|
|
124
|
-
|
|
125
|
-
JSON.parse(x),
|
|
126
|
-
),
|
|
127
|
-
`Failed to parse 'ActivityNotificationJobResponseDtoPayload' from JSON`,
|
|
117
|
+
(x) => Payload$inboundSchema.parse(JSON.parse(x)),
|
|
118
|
+
`Failed to parse 'Payload' from JSON`,
|
|
128
119
|
);
|
|
129
120
|
}
|
|
130
121
|
|
|
@@ -142,8 +133,7 @@ export const ActivityNotificationJobResponseDto$inboundSchema: z.ZodType<
|
|
|
142
133
|
),
|
|
143
134
|
step: ActivityNotificationStepResponseDto$inboundSchema,
|
|
144
135
|
overrides: z.record(z.any()).optional(),
|
|
145
|
-
payload: z.lazy(() =>
|
|
146
|
-
.optional(),
|
|
136
|
+
payload: z.lazy(() => Payload$inboundSchema).optional(),
|
|
147
137
|
providerId: ProvidersIdEnum$inboundSchema,
|
|
148
138
|
status: z.string(),
|
|
149
139
|
updatedAt: z.string().optional(),
|
|
@@ -9,16 +9,75 @@ import {
|
|
|
9
9
|
BulkUpdateSubscriberPreferenceItemDto$outboundSchema,
|
|
10
10
|
} from "./bulkupdatesubscriberpreferenceitemdto.js";
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Rich context object with id and optional data
|
|
14
|
+
*/
|
|
15
|
+
export type Context2 = {
|
|
16
|
+
id: string;
|
|
17
|
+
/**
|
|
18
|
+
* Optional additional context data
|
|
19
|
+
*/
|
|
20
|
+
data?: { [k: string]: any } | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type BulkUpdateSubscriberPreferencesDtoContext = Context2 | string;
|
|
24
|
+
|
|
12
25
|
export type BulkUpdateSubscriberPreferencesDto = {
|
|
13
26
|
/**
|
|
14
27
|
* Array of workflow preferences to update (maximum 100 items)
|
|
15
28
|
*/
|
|
16
29
|
preferences: Array<BulkUpdateSubscriberPreferenceItemDto>;
|
|
30
|
+
context?: { [k: string]: Context2 | string } | undefined;
|
|
17
31
|
};
|
|
18
32
|
|
|
33
|
+
/** @internal */
|
|
34
|
+
export type Context2$Outbound = {
|
|
35
|
+
id: string;
|
|
36
|
+
data?: { [k: string]: any } | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const Context2$outboundSchema: z.ZodType<
|
|
41
|
+
Context2$Outbound,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
Context2
|
|
44
|
+
> = z.object({
|
|
45
|
+
id: z.string(),
|
|
46
|
+
data: z.record(z.any()).optional(),
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export function context2ToJSON(context2: Context2): string {
|
|
50
|
+
return JSON.stringify(Context2$outboundSchema.parse(context2));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export type BulkUpdateSubscriberPreferencesDtoContext$Outbound =
|
|
55
|
+
| Context2$Outbound
|
|
56
|
+
| string;
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const BulkUpdateSubscriberPreferencesDtoContext$outboundSchema:
|
|
60
|
+
z.ZodType<
|
|
61
|
+
BulkUpdateSubscriberPreferencesDtoContext$Outbound,
|
|
62
|
+
z.ZodTypeDef,
|
|
63
|
+
BulkUpdateSubscriberPreferencesDtoContext
|
|
64
|
+
> = z.union([z.lazy(() => Context2$outboundSchema), z.string()]);
|
|
65
|
+
|
|
66
|
+
export function bulkUpdateSubscriberPreferencesDtoContextToJSON(
|
|
67
|
+
bulkUpdateSubscriberPreferencesDtoContext:
|
|
68
|
+
BulkUpdateSubscriberPreferencesDtoContext,
|
|
69
|
+
): string {
|
|
70
|
+
return JSON.stringify(
|
|
71
|
+
BulkUpdateSubscriberPreferencesDtoContext$outboundSchema.parse(
|
|
72
|
+
bulkUpdateSubscriberPreferencesDtoContext,
|
|
73
|
+
),
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
19
77
|
/** @internal */
|
|
20
78
|
export type BulkUpdateSubscriberPreferencesDto$Outbound = {
|
|
21
79
|
preferences: Array<BulkUpdateSubscriberPreferenceItemDto$Outbound>;
|
|
80
|
+
context?: { [k: string]: Context2$Outbound | string } | undefined;
|
|
22
81
|
};
|
|
23
82
|
|
|
24
83
|
/** @internal */
|
|
@@ -28,6 +87,9 @@ export const BulkUpdateSubscriberPreferencesDto$outboundSchema: z.ZodType<
|
|
|
28
87
|
BulkUpdateSubscriberPreferencesDto
|
|
29
88
|
> = z.object({
|
|
30
89
|
preferences: z.array(BulkUpdateSubscriberPreferenceItemDto$outboundSchema),
|
|
90
|
+
context: z.record(
|
|
91
|
+
z.union([z.lazy(() => Context2$outboundSchema), z.string()]),
|
|
92
|
+
).optional(),
|
|
31
93
|
});
|
|
32
94
|
|
|
33
95
|
export function bulkUpdateSubscriberPreferencesDtoToJSON(
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
/**
|
|
18
18
|
* Rich context object with id and optional data
|
|
19
19
|
*/
|
|
20
|
-
export type
|
|
20
|
+
export type CreateChannelConnectionRequestDtoContext2 = {
|
|
21
21
|
id: string;
|
|
22
22
|
/**
|
|
23
23
|
* Optional additional context data
|
|
@@ -25,7 +25,9 @@ export type Two = {
|
|
|
25
25
|
data?: { [k: string]: any } | undefined;
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
export type
|
|
28
|
+
export type CreateChannelConnectionRequestDtoContext =
|
|
29
|
+
| CreateChannelConnectionRequestDtoContext2
|
|
30
|
+
| string;
|
|
29
31
|
|
|
30
32
|
export type CreateChannelConnectionRequestDto = {
|
|
31
33
|
/**
|
|
@@ -36,7 +38,9 @@ export type CreateChannelConnectionRequestDto = {
|
|
|
36
38
|
* The subscriber ID to link the channel connection to
|
|
37
39
|
*/
|
|
38
40
|
subscriberId?: string | undefined;
|
|
39
|
-
context?:
|
|
41
|
+
context?:
|
|
42
|
+
| { [k: string]: CreateChannelConnectionRequestDtoContext2 | string }
|
|
43
|
+
| undefined;
|
|
40
44
|
/**
|
|
41
45
|
* The identifier of the integration to use for this channel connection.
|
|
42
46
|
*/
|
|
@@ -46,41 +50,66 @@ export type CreateChannelConnectionRequestDto = {
|
|
|
46
50
|
};
|
|
47
51
|
|
|
48
52
|
/** @internal */
|
|
49
|
-
export type
|
|
53
|
+
export type CreateChannelConnectionRequestDtoContext2$Outbound = {
|
|
50
54
|
id: string;
|
|
51
55
|
data?: { [k: string]: any } | undefined;
|
|
52
56
|
};
|
|
53
57
|
|
|
54
58
|
/** @internal */
|
|
55
|
-
export const
|
|
56
|
-
.
|
|
59
|
+
export const CreateChannelConnectionRequestDtoContext2$outboundSchema:
|
|
60
|
+
z.ZodType<
|
|
61
|
+
CreateChannelConnectionRequestDtoContext2$Outbound,
|
|
62
|
+
z.ZodTypeDef,
|
|
63
|
+
CreateChannelConnectionRequestDtoContext2
|
|
64
|
+
> = z.object({
|
|
57
65
|
id: z.string(),
|
|
58
66
|
data: z.record(z.any()).optional(),
|
|
59
67
|
});
|
|
60
68
|
|
|
61
|
-
export function
|
|
62
|
-
|
|
69
|
+
export function createChannelConnectionRequestDtoContext2ToJSON(
|
|
70
|
+
createChannelConnectionRequestDtoContext2:
|
|
71
|
+
CreateChannelConnectionRequestDtoContext2,
|
|
72
|
+
): string {
|
|
73
|
+
return JSON.stringify(
|
|
74
|
+
CreateChannelConnectionRequestDtoContext2$outboundSchema.parse(
|
|
75
|
+
createChannelConnectionRequestDtoContext2,
|
|
76
|
+
),
|
|
77
|
+
);
|
|
63
78
|
}
|
|
64
79
|
|
|
65
80
|
/** @internal */
|
|
66
|
-
export type
|
|
81
|
+
export type CreateChannelConnectionRequestDtoContext$Outbound =
|
|
82
|
+
| CreateChannelConnectionRequestDtoContext2$Outbound
|
|
83
|
+
| string;
|
|
67
84
|
|
|
68
85
|
/** @internal */
|
|
69
|
-
export const
|
|
70
|
-
|
|
86
|
+
export const CreateChannelConnectionRequestDtoContext$outboundSchema: z.ZodType<
|
|
87
|
+
CreateChannelConnectionRequestDtoContext$Outbound,
|
|
71
88
|
z.ZodTypeDef,
|
|
72
|
-
|
|
73
|
-
> = z.union([
|
|
89
|
+
CreateChannelConnectionRequestDtoContext
|
|
90
|
+
> = z.union([
|
|
91
|
+
z.lazy(() => CreateChannelConnectionRequestDtoContext2$outboundSchema),
|
|
92
|
+
z.string(),
|
|
93
|
+
]);
|
|
74
94
|
|
|
75
|
-
export function
|
|
76
|
-
|
|
95
|
+
export function createChannelConnectionRequestDtoContextToJSON(
|
|
96
|
+
createChannelConnectionRequestDtoContext:
|
|
97
|
+
CreateChannelConnectionRequestDtoContext,
|
|
98
|
+
): string {
|
|
99
|
+
return JSON.stringify(
|
|
100
|
+
CreateChannelConnectionRequestDtoContext$outboundSchema.parse(
|
|
101
|
+
createChannelConnectionRequestDtoContext,
|
|
102
|
+
),
|
|
103
|
+
);
|
|
77
104
|
}
|
|
78
105
|
|
|
79
106
|
/** @internal */
|
|
80
107
|
export type CreateChannelConnectionRequestDto$Outbound = {
|
|
81
108
|
identifier?: string | undefined;
|
|
82
109
|
subscriberId?: string | undefined;
|
|
83
|
-
context?: {
|
|
110
|
+
context?: {
|
|
111
|
+
[k: string]: CreateChannelConnectionRequestDtoContext2$Outbound | string;
|
|
112
|
+
} | undefined;
|
|
84
113
|
integrationIdentifier: string;
|
|
85
114
|
workspace: WorkspaceDto$Outbound;
|
|
86
115
|
auth: AuthDto$Outbound;
|
|
@@ -94,8 +123,12 @@ export const CreateChannelConnectionRequestDto$outboundSchema: z.ZodType<
|
|
|
94
123
|
> = z.object({
|
|
95
124
|
identifier: z.string().optional(),
|
|
96
125
|
subscriberId: z.string().optional(),
|
|
97
|
-
context: z.record(
|
|
98
|
-
.
|
|
126
|
+
context: z.record(
|
|
127
|
+
z.union([
|
|
128
|
+
z.lazy(() => CreateChannelConnectionRequestDtoContext2$outboundSchema),
|
|
129
|
+
z.string(),
|
|
130
|
+
]),
|
|
131
|
+
).optional(),
|
|
99
132
|
integrationIdentifier: z.string(),
|
|
100
133
|
workspace: WorkspaceDto$outboundSchema,
|
|
101
134
|
auth: AuthDto$outboundSchema,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
/**
|
|
13
13
|
* Rich context object with id and optional data
|
|
14
14
|
*/
|
|
15
|
-
export type
|
|
15
|
+
export type CreateSlackChannelEndpointDtoContext2 = {
|
|
16
16
|
id: string;
|
|
17
17
|
/**
|
|
18
18
|
* Optional additional context data
|
|
@@ -20,7 +20,9 @@ export type Context2 = {
|
|
|
20
20
|
data?: { [k: string]: any } | undefined;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
export type CreateSlackChannelEndpointDtoContext =
|
|
23
|
+
export type CreateSlackChannelEndpointDtoContext =
|
|
24
|
+
| CreateSlackChannelEndpointDtoContext2
|
|
25
|
+
| string;
|
|
24
26
|
|
|
25
27
|
export type CreateSlackChannelEndpointDto = {
|
|
26
28
|
/**
|
|
@@ -31,7 +33,9 @@ export type CreateSlackChannelEndpointDto = {
|
|
|
31
33
|
* The subscriber ID to which the channel endpoint is linked
|
|
32
34
|
*/
|
|
33
35
|
subscriberId: string;
|
|
34
|
-
context?:
|
|
36
|
+
context?:
|
|
37
|
+
| { [k: string]: CreateSlackChannelEndpointDtoContext2 | string }
|
|
38
|
+
| undefined;
|
|
35
39
|
/**
|
|
36
40
|
* The identifier of the integration to use for this channel endpoint.
|
|
37
41
|
*/
|
|
@@ -51,28 +55,34 @@ export type CreateSlackChannelEndpointDto = {
|
|
|
51
55
|
};
|
|
52
56
|
|
|
53
57
|
/** @internal */
|
|
54
|
-
export type
|
|
58
|
+
export type CreateSlackChannelEndpointDtoContext2$Outbound = {
|
|
55
59
|
id: string;
|
|
56
60
|
data?: { [k: string]: any } | undefined;
|
|
57
61
|
};
|
|
58
62
|
|
|
59
63
|
/** @internal */
|
|
60
|
-
export const
|
|
61
|
-
|
|
64
|
+
export const CreateSlackChannelEndpointDtoContext2$outboundSchema: z.ZodType<
|
|
65
|
+
CreateSlackChannelEndpointDtoContext2$Outbound,
|
|
62
66
|
z.ZodTypeDef,
|
|
63
|
-
|
|
67
|
+
CreateSlackChannelEndpointDtoContext2
|
|
64
68
|
> = z.object({
|
|
65
69
|
id: z.string(),
|
|
66
70
|
data: z.record(z.any()).optional(),
|
|
67
71
|
});
|
|
68
72
|
|
|
69
|
-
export function
|
|
70
|
-
|
|
73
|
+
export function createSlackChannelEndpointDtoContext2ToJSON(
|
|
74
|
+
createSlackChannelEndpointDtoContext2: CreateSlackChannelEndpointDtoContext2,
|
|
75
|
+
): string {
|
|
76
|
+
return JSON.stringify(
|
|
77
|
+
CreateSlackChannelEndpointDtoContext2$outboundSchema.parse(
|
|
78
|
+
createSlackChannelEndpointDtoContext2,
|
|
79
|
+
),
|
|
80
|
+
);
|
|
71
81
|
}
|
|
72
82
|
|
|
73
83
|
/** @internal */
|
|
74
84
|
export type CreateSlackChannelEndpointDtoContext$Outbound =
|
|
75
|
-
|
|
|
85
|
+
| CreateSlackChannelEndpointDtoContext2$Outbound
|
|
76
86
|
| string;
|
|
77
87
|
|
|
78
88
|
/** @internal */
|
|
@@ -80,7 +90,10 @@ export const CreateSlackChannelEndpointDtoContext$outboundSchema: z.ZodType<
|
|
|
80
90
|
CreateSlackChannelEndpointDtoContext$Outbound,
|
|
81
91
|
z.ZodTypeDef,
|
|
82
92
|
CreateSlackChannelEndpointDtoContext
|
|
83
|
-
> = z.union([
|
|
93
|
+
> = z.union([
|
|
94
|
+
z.lazy(() => CreateSlackChannelEndpointDtoContext2$outboundSchema),
|
|
95
|
+
z.string(),
|
|
96
|
+
]);
|
|
84
97
|
|
|
85
98
|
export function createSlackChannelEndpointDtoContextToJSON(
|
|
86
99
|
createSlackChannelEndpointDtoContext: CreateSlackChannelEndpointDtoContext,
|
|
@@ -96,7 +109,9 @@ export function createSlackChannelEndpointDtoContextToJSON(
|
|
|
96
109
|
export type CreateSlackChannelEndpointDto$Outbound = {
|
|
97
110
|
identifier?: string | undefined;
|
|
98
111
|
subscriberId: string;
|
|
99
|
-
context?: {
|
|
112
|
+
context?: {
|
|
113
|
+
[k: string]: CreateSlackChannelEndpointDtoContext2$Outbound | string;
|
|
114
|
+
} | undefined;
|
|
100
115
|
integrationIdentifier: string;
|
|
101
116
|
connectionIdentifier?: string | undefined;
|
|
102
117
|
type: "slack_channel";
|
|
@@ -112,7 +127,10 @@ export const CreateSlackChannelEndpointDto$outboundSchema: z.ZodType<
|
|
|
112
127
|
identifier: z.string().optional(),
|
|
113
128
|
subscriberId: z.string(),
|
|
114
129
|
context: z.record(
|
|
115
|
-
z.union([
|
|
130
|
+
z.union([
|
|
131
|
+
z.lazy(() => CreateSlackChannelEndpointDtoContext2$outboundSchema),
|
|
132
|
+
z.string(),
|
|
133
|
+
]),
|
|
116
134
|
).optional(),
|
|
117
135
|
integrationIdentifier: z.string(),
|
|
118
136
|
connectionIdentifier: z.string().optional(),
|
|
@@ -21,6 +21,21 @@ import {
|
|
|
21
21
|
|
|
22
22
|
export type Subscriptions = TopicSubscriberIdentifierDto | string;
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Rich context object with id and optional data
|
|
26
|
+
*/
|
|
27
|
+
export type CreateTopicSubscriptionsRequestDtoContext2 = {
|
|
28
|
+
id: string;
|
|
29
|
+
/**
|
|
30
|
+
* Optional additional context data
|
|
31
|
+
*/
|
|
32
|
+
data?: { [k: string]: any } | undefined;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type CreateTopicSubscriptionsRequestDtoContext =
|
|
36
|
+
| CreateTopicSubscriptionsRequestDtoContext2
|
|
37
|
+
| string;
|
|
38
|
+
|
|
24
39
|
export type Preferences =
|
|
25
40
|
| WorkflowPreferenceRequestDto
|
|
26
41
|
| GroupPreferenceFilterDto
|
|
@@ -41,6 +56,9 @@ export type CreateTopicSubscriptionsRequestDto = {
|
|
|
41
56
|
* The name of the topic
|
|
42
57
|
*/
|
|
43
58
|
name?: string | undefined;
|
|
59
|
+
context?:
|
|
60
|
+
| { [k: string]: CreateTopicSubscriptionsRequestDtoContext2 | string }
|
|
61
|
+
| undefined;
|
|
44
62
|
/**
|
|
45
63
|
* The preferences of the topic. Can be a simple workflow ID string, workflow preference object, or group filter object
|
|
46
64
|
*/
|
|
@@ -65,6 +83,61 @@ export function subscriptionsToJSON(subscriptions: Subscriptions): string {
|
|
|
65
83
|
return JSON.stringify(Subscriptions$outboundSchema.parse(subscriptions));
|
|
66
84
|
}
|
|
67
85
|
|
|
86
|
+
/** @internal */
|
|
87
|
+
export type CreateTopicSubscriptionsRequestDtoContext2$Outbound = {
|
|
88
|
+
id: string;
|
|
89
|
+
data?: { [k: string]: any } | undefined;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/** @internal */
|
|
93
|
+
export const CreateTopicSubscriptionsRequestDtoContext2$outboundSchema:
|
|
94
|
+
z.ZodType<
|
|
95
|
+
CreateTopicSubscriptionsRequestDtoContext2$Outbound,
|
|
96
|
+
z.ZodTypeDef,
|
|
97
|
+
CreateTopicSubscriptionsRequestDtoContext2
|
|
98
|
+
> = z.object({
|
|
99
|
+
id: z.string(),
|
|
100
|
+
data: z.record(z.any()).optional(),
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
export function createTopicSubscriptionsRequestDtoContext2ToJSON(
|
|
104
|
+
createTopicSubscriptionsRequestDtoContext2:
|
|
105
|
+
CreateTopicSubscriptionsRequestDtoContext2,
|
|
106
|
+
): string {
|
|
107
|
+
return JSON.stringify(
|
|
108
|
+
CreateTopicSubscriptionsRequestDtoContext2$outboundSchema.parse(
|
|
109
|
+
createTopicSubscriptionsRequestDtoContext2,
|
|
110
|
+
),
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** @internal */
|
|
115
|
+
export type CreateTopicSubscriptionsRequestDtoContext$Outbound =
|
|
116
|
+
| CreateTopicSubscriptionsRequestDtoContext2$Outbound
|
|
117
|
+
| string;
|
|
118
|
+
|
|
119
|
+
/** @internal */
|
|
120
|
+
export const CreateTopicSubscriptionsRequestDtoContext$outboundSchema:
|
|
121
|
+
z.ZodType<
|
|
122
|
+
CreateTopicSubscriptionsRequestDtoContext$Outbound,
|
|
123
|
+
z.ZodTypeDef,
|
|
124
|
+
CreateTopicSubscriptionsRequestDtoContext
|
|
125
|
+
> = z.union([
|
|
126
|
+
z.lazy(() => CreateTopicSubscriptionsRequestDtoContext2$outboundSchema),
|
|
127
|
+
z.string(),
|
|
128
|
+
]);
|
|
129
|
+
|
|
130
|
+
export function createTopicSubscriptionsRequestDtoContextToJSON(
|
|
131
|
+
createTopicSubscriptionsRequestDtoContext:
|
|
132
|
+
CreateTopicSubscriptionsRequestDtoContext,
|
|
133
|
+
): string {
|
|
134
|
+
return JSON.stringify(
|
|
135
|
+
CreateTopicSubscriptionsRequestDtoContext$outboundSchema.parse(
|
|
136
|
+
createTopicSubscriptionsRequestDtoContext,
|
|
137
|
+
),
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
68
141
|
/** @internal */
|
|
69
142
|
export type Preferences$Outbound =
|
|
70
143
|
| WorkflowPreferenceRequestDto$Outbound
|
|
@@ -93,6 +166,9 @@ export type CreateTopicSubscriptionsRequestDto$Outbound = {
|
|
|
93
166
|
| Array<TopicSubscriberIdentifierDto$Outbound | string>
|
|
94
167
|
| undefined;
|
|
95
168
|
name?: string | undefined;
|
|
169
|
+
context?: {
|
|
170
|
+
[k: string]: CreateTopicSubscriptionsRequestDtoContext2$Outbound | string;
|
|
171
|
+
} | undefined;
|
|
96
172
|
preferences?:
|
|
97
173
|
| Array<
|
|
98
174
|
| WorkflowPreferenceRequestDto$Outbound
|
|
@@ -113,6 +189,12 @@ export const CreateTopicSubscriptionsRequestDto$outboundSchema: z.ZodType<
|
|
|
113
189
|
z.union([TopicSubscriberIdentifierDto$outboundSchema, z.string()]),
|
|
114
190
|
).optional(),
|
|
115
191
|
name: z.string().optional(),
|
|
192
|
+
context: z.record(
|
|
193
|
+
z.union([
|
|
194
|
+
z.lazy(() => CreateTopicSubscriptionsRequestDtoContext2$outboundSchema),
|
|
195
|
+
z.string(),
|
|
196
|
+
]),
|
|
197
|
+
).optional(),
|
|
116
198
|
preferences: z.array(
|
|
117
199
|
z.union([
|
|
118
200
|
WorkflowPreferenceRequestDto$outboundSchema,
|
|
@@ -214,6 +214,7 @@ export * from "./subscriberpreferencesworkflowinfodto.js";
|
|
|
214
214
|
export * from "./subscriberresponsedto.js";
|
|
215
215
|
export * from "./subscriberresponsedtooptional.js";
|
|
216
216
|
export * from "./subscriberworkflowpreferencedto.js";
|
|
217
|
+
export * from "./subscriptiondetailsresponsedto.js";
|
|
217
218
|
export * from "./subscriptiondto.js";
|
|
218
219
|
export * from "./subscriptionerrordto.js";
|
|
219
220
|
export * from "./subscriptionpreferencedto.js";
|
|
@@ -11,43 +11,24 @@ import {
|
|
|
11
11
|
ButtonTypeEnum$inboundSchema,
|
|
12
12
|
} from "./buttontypeenum.js";
|
|
13
13
|
|
|
14
|
-
/**
|
|
15
|
-
* Payload of the action result
|
|
16
|
-
*/
|
|
17
|
-
export type Payload = {};
|
|
18
|
-
|
|
19
14
|
export type MessageActionResult = {
|
|
20
15
|
/**
|
|
21
16
|
* Payload of the action result
|
|
22
17
|
*/
|
|
23
|
-
payload?:
|
|
18
|
+
payload?: { [k: string]: any } | undefined;
|
|
24
19
|
/**
|
|
25
20
|
* Type of button for the action result
|
|
26
21
|
*/
|
|
27
22
|
type?: ButtonTypeEnum | undefined;
|
|
28
23
|
};
|
|
29
24
|
|
|
30
|
-
/** @internal */
|
|
31
|
-
export const Payload$inboundSchema: z.ZodType<Payload, z.ZodTypeDef, unknown> =
|
|
32
|
-
z.object({});
|
|
33
|
-
|
|
34
|
-
export function payloadFromJSON(
|
|
35
|
-
jsonString: string,
|
|
36
|
-
): SafeParseResult<Payload, SDKValidationError> {
|
|
37
|
-
return safeParse(
|
|
38
|
-
jsonString,
|
|
39
|
-
(x) => Payload$inboundSchema.parse(JSON.parse(x)),
|
|
40
|
-
`Failed to parse 'Payload' from JSON`,
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
25
|
/** @internal */
|
|
45
26
|
export const MessageActionResult$inboundSchema: z.ZodType<
|
|
46
27
|
MessageActionResult,
|
|
47
28
|
z.ZodTypeDef,
|
|
48
29
|
unknown
|
|
49
30
|
> = z.object({
|
|
50
|
-
payload: z.
|
|
31
|
+
payload: z.record(z.any()).optional(),
|
|
51
32
|
type: ButtonTypeEnum$inboundSchema.optional(),
|
|
52
33
|
});
|
|
53
34
|
|
|
@@ -31,16 +31,6 @@ import {
|
|
|
31
31
|
*/
|
|
32
32
|
export type Content = Array<EmailBlock> | string;
|
|
33
33
|
|
|
34
|
-
/**
|
|
35
|
-
* The payload that was used to send the notification trigger
|
|
36
|
-
*/
|
|
37
|
-
export type MessageResponseDtoPayload = {};
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Provider specific overrides used when triggering the notification
|
|
41
|
-
*/
|
|
42
|
-
export type MessageResponseDtoOverrides = {};
|
|
43
|
-
|
|
44
34
|
export type MessageResponseDto = {
|
|
45
35
|
/**
|
|
46
36
|
* Unique identifier for the message
|
|
@@ -173,11 +163,11 @@ export type MessageResponseDto = {
|
|
|
173
163
|
/**
|
|
174
164
|
* The payload that was used to send the notification trigger
|
|
175
165
|
*/
|
|
176
|
-
payload?:
|
|
166
|
+
payload?: { [k: string]: any } | undefined;
|
|
177
167
|
/**
|
|
178
168
|
* Provider specific overrides used when triggering the notification
|
|
179
169
|
*/
|
|
180
|
-
overrides?:
|
|
170
|
+
overrides?: { [k: string]: any } | undefined;
|
|
181
171
|
/**
|
|
182
172
|
* Context (single or multi) in which the message was sent
|
|
183
173
|
*/
|
|
@@ -198,40 +188,6 @@ export function contentFromJSON(
|
|
|
198
188
|
);
|
|
199
189
|
}
|
|
200
190
|
|
|
201
|
-
/** @internal */
|
|
202
|
-
export const MessageResponseDtoPayload$inboundSchema: z.ZodType<
|
|
203
|
-
MessageResponseDtoPayload,
|
|
204
|
-
z.ZodTypeDef,
|
|
205
|
-
unknown
|
|
206
|
-
> = z.object({});
|
|
207
|
-
|
|
208
|
-
export function messageResponseDtoPayloadFromJSON(
|
|
209
|
-
jsonString: string,
|
|
210
|
-
): SafeParseResult<MessageResponseDtoPayload, SDKValidationError> {
|
|
211
|
-
return safeParse(
|
|
212
|
-
jsonString,
|
|
213
|
-
(x) => MessageResponseDtoPayload$inboundSchema.parse(JSON.parse(x)),
|
|
214
|
-
`Failed to parse 'MessageResponseDtoPayload' from JSON`,
|
|
215
|
-
);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
/** @internal */
|
|
219
|
-
export const MessageResponseDtoOverrides$inboundSchema: z.ZodType<
|
|
220
|
-
MessageResponseDtoOverrides,
|
|
221
|
-
z.ZodTypeDef,
|
|
222
|
-
unknown
|
|
223
|
-
> = z.object({});
|
|
224
|
-
|
|
225
|
-
export function messageResponseDtoOverridesFromJSON(
|
|
226
|
-
jsonString: string,
|
|
227
|
-
): SafeParseResult<MessageResponseDtoOverrides, SDKValidationError> {
|
|
228
|
-
return safeParse(
|
|
229
|
-
jsonString,
|
|
230
|
-
(x) => MessageResponseDtoOverrides$inboundSchema.parse(JSON.parse(x)),
|
|
231
|
-
`Failed to parse 'MessageResponseDtoOverrides' from JSON`,
|
|
232
|
-
);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
191
|
/** @internal */
|
|
236
192
|
export const MessageResponseDto$inboundSchema: z.ZodType<
|
|
237
193
|
MessageResponseDto,
|
|
@@ -271,8 +227,8 @@ export const MessageResponseDto$inboundSchema: z.ZodType<
|
|
|
271
227
|
status: MessageStatusEnum$inboundSchema,
|
|
272
228
|
errorId: z.string().optional(),
|
|
273
229
|
errorText: z.string().optional(),
|
|
274
|
-
payload: z.
|
|
275
|
-
overrides: z.
|
|
230
|
+
payload: z.record(z.any()).optional(),
|
|
231
|
+
overrides: z.record(z.any()).optional(),
|
|
276
232
|
contextKeys: z.array(z.string()).optional(),
|
|
277
233
|
}).transform((v) => {
|
|
278
234
|
return remap$(v, {
|