@novu/api 3.12.0 → 3.13.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/examples/package-lock.json +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/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 +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/sources/json-development.json +238 -6
- package/src/funcs/subscribersPreferencesList.ts +5 -17
- package/src/funcs/subscribersTopicsList.ts +1 -0
- 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/preferences.ts +2 -6
- 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
|
@@ -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, {
|
|
@@ -14,6 +14,19 @@ import {
|
|
|
14
14
|
ScheduleDto$outboundSchema,
|
|
15
15
|
} from "./scheduledto.js";
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Rich context object with id and optional data
|
|
19
|
+
*/
|
|
20
|
+
export type Two = {
|
|
21
|
+
id: string;
|
|
22
|
+
/**
|
|
23
|
+
* Optional additional context data
|
|
24
|
+
*/
|
|
25
|
+
data?: { [k: string]: any } | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export type Context = Two | string;
|
|
29
|
+
|
|
17
30
|
export type PatchSubscriberPreferencesDto = {
|
|
18
31
|
/**
|
|
19
32
|
* Channel-specific preference settings
|
|
@@ -27,13 +40,46 @@ export type PatchSubscriberPreferencesDto = {
|
|
|
27
40
|
* Subscriber schedule
|
|
28
41
|
*/
|
|
29
42
|
schedule?: ScheduleDto | undefined;
|
|
43
|
+
context?: { [k: string]: Two | string } | undefined;
|
|
30
44
|
};
|
|
31
45
|
|
|
46
|
+
/** @internal */
|
|
47
|
+
export type Two$Outbound = {
|
|
48
|
+
id: string;
|
|
49
|
+
data?: { [k: string]: any } | undefined;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const Two$outboundSchema: z.ZodType<Two$Outbound, z.ZodTypeDef, Two> = z
|
|
54
|
+
.object({
|
|
55
|
+
id: z.string(),
|
|
56
|
+
data: z.record(z.any()).optional(),
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
export function twoToJSON(two: Two): string {
|
|
60
|
+
return JSON.stringify(Two$outboundSchema.parse(two));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export type Context$Outbound = Two$Outbound | string;
|
|
65
|
+
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const Context$outboundSchema: z.ZodType<
|
|
68
|
+
Context$Outbound,
|
|
69
|
+
z.ZodTypeDef,
|
|
70
|
+
Context
|
|
71
|
+
> = z.union([z.lazy(() => Two$outboundSchema), z.string()]);
|
|
72
|
+
|
|
73
|
+
export function contextToJSON(context: Context): string {
|
|
74
|
+
return JSON.stringify(Context$outboundSchema.parse(context));
|
|
75
|
+
}
|
|
76
|
+
|
|
32
77
|
/** @internal */
|
|
33
78
|
export type PatchSubscriberPreferencesDto$Outbound = {
|
|
34
79
|
channels?: PatchPreferenceChannelsDto$Outbound | undefined;
|
|
35
80
|
workflowId?: string | undefined;
|
|
36
81
|
schedule?: ScheduleDto$Outbound | undefined;
|
|
82
|
+
context?: { [k: string]: Two$Outbound | string } | undefined;
|
|
37
83
|
};
|
|
38
84
|
|
|
39
85
|
/** @internal */
|
|
@@ -45,6 +91,8 @@ export const PatchSubscriberPreferencesDto$outboundSchema: z.ZodType<
|
|
|
45
91
|
channels: PatchPreferenceChannelsDto$outboundSchema.optional(),
|
|
46
92
|
workflowId: z.string().optional(),
|
|
47
93
|
schedule: ScheduleDto$outboundSchema.optional(),
|
|
94
|
+
context: z.record(z.union([z.lazy(() => Two$outboundSchema), z.string()]))
|
|
95
|
+
.optional(),
|
|
48
96
|
});
|
|
49
97
|
|
|
50
98
|
export function patchSubscriberPreferencesDtoToJSON(
|
|
@@ -36,6 +36,10 @@ export type SubscriberWorkflowPreferenceDto = {
|
|
|
36
36
|
* Workflow information
|
|
37
37
|
*/
|
|
38
38
|
workflow: SubscriberPreferencesWorkflowInfoDto;
|
|
39
|
+
/**
|
|
40
|
+
* Timestamp when the subscriber last updated their preference. Only present if subscriber explicitly set preferences.
|
|
41
|
+
*/
|
|
42
|
+
updatedAt?: string | undefined;
|
|
39
43
|
};
|
|
40
44
|
|
|
41
45
|
/** @internal */
|
|
@@ -48,6 +52,7 @@ export const SubscriberWorkflowPreferenceDto$inboundSchema: z.ZodType<
|
|
|
48
52
|
channels: SubscriberPreferenceChannels$inboundSchema,
|
|
49
53
|
overrides: z.array(SubscriberPreferenceOverrideDto$inboundSchema),
|
|
50
54
|
workflow: SubscriberPreferencesWorkflowInfoDto$inboundSchema,
|
|
55
|
+
updatedAt: z.string().optional(),
|
|
51
56
|
});
|
|
52
57
|
|
|
53
58
|
export function subscriberWorkflowPreferenceDtoFromJSON(
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
SubscriptionPreferenceDto,
|
|
11
|
+
SubscriptionPreferenceDto$inboundSchema,
|
|
12
|
+
} from "./subscriptionpreferencedto.js";
|
|
13
|
+
|
|
14
|
+
export type SubscriptionDetailsResponseDto = {
|
|
15
|
+
/**
|
|
16
|
+
* The unique identifier of the subscription
|
|
17
|
+
*/
|
|
18
|
+
id: string;
|
|
19
|
+
/**
|
|
20
|
+
* The identifier of the subscription
|
|
21
|
+
*/
|
|
22
|
+
identifier?: string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* The name of the subscription
|
|
25
|
+
*/
|
|
26
|
+
name?: string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* The preferences/rules for the subscription
|
|
29
|
+
*/
|
|
30
|
+
preferences?: Array<SubscriptionPreferenceDto> | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Context keys that scope this subscription (e.g., tenant:org-a, project:proj-123)
|
|
33
|
+
*/
|
|
34
|
+
contextKeys?: Array<string> | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const SubscriptionDetailsResponseDto$inboundSchema: z.ZodType<
|
|
39
|
+
SubscriptionDetailsResponseDto,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
unknown
|
|
42
|
+
> = z.object({
|
|
43
|
+
id: z.string(),
|
|
44
|
+
identifier: z.string().optional(),
|
|
45
|
+
name: z.string().optional(),
|
|
46
|
+
preferences: z.array(SubscriptionPreferenceDto$inboundSchema).optional(),
|
|
47
|
+
contextKeys: z.array(z.string()).optional(),
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
export function subscriptionDetailsResponseDtoFromJSON(
|
|
51
|
+
jsonString: string,
|
|
52
|
+
): SafeParseResult<SubscriptionDetailsResponseDto, SDKValidationError> {
|
|
53
|
+
return safeParse(
|
|
54
|
+
jsonString,
|
|
55
|
+
(x) => SubscriptionDetailsResponseDto$inboundSchema.parse(JSON.parse(x)),
|
|
56
|
+
`Failed to parse 'SubscriptionDetailsResponseDto' from JSON`,
|
|
57
|
+
);
|
|
58
|
+
}
|
|
@@ -56,6 +56,10 @@ export type SubscriptionDto = {
|
|
|
56
56
|
* The subscriber information
|
|
57
57
|
*/
|
|
58
58
|
subscriber: SubscriptionDtoSubscriber | null;
|
|
59
|
+
/**
|
|
60
|
+
* Context keys that scope this subscription (e.g., tenant:org-a, project:proj-123)
|
|
61
|
+
*/
|
|
62
|
+
contextKeys?: Array<string> | undefined;
|
|
59
63
|
/**
|
|
60
64
|
* The creation date of the subscription
|
|
61
65
|
*/
|
|
@@ -104,6 +108,7 @@ export const SubscriptionDto$inboundSchema: z.ZodType<
|
|
|
104
108
|
identifier: z.string().optional(),
|
|
105
109
|
topic: TopicDto$inboundSchema,
|
|
106
110
|
subscriber: z.nullable(z.lazy(() => SubscriptionDtoSubscriber$inboundSchema)),
|
|
111
|
+
contextKeys: z.array(z.string()).optional(),
|
|
107
112
|
createdAt: z.string(),
|
|
108
113
|
updatedAt: z.string(),
|
|
109
114
|
}).transform((v) => {
|
|
@@ -68,6 +68,10 @@ export type SubscriptionResponseDto = {
|
|
|
68
68
|
* The preferences for workflows in this subscription
|
|
69
69
|
*/
|
|
70
70
|
preferences?: Array<SubscriptionPreferenceDto> | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Context keys that scope this subscription (e.g., tenant:org-a, project:proj-123)
|
|
73
|
+
*/
|
|
74
|
+
contextKeys?: Array<string> | undefined;
|
|
71
75
|
/**
|
|
72
76
|
* The creation date of the subscription
|
|
73
77
|
*/
|
|
@@ -118,6 +122,7 @@ export const SubscriptionResponseDto$inboundSchema: z.ZodType<
|
|
|
118
122
|
topic: TopicDto$inboundSchema,
|
|
119
123
|
subscriber: z.nullable(z.lazy(() => Subscriber$inboundSchema)),
|
|
120
124
|
preferences: z.array(SubscriptionPreferenceDto$inboundSchema).optional(),
|
|
125
|
+
contextKeys: z.array(z.string()).optional(),
|
|
121
126
|
createdAt: z.string(),
|
|
122
127
|
updatedAt: z.string(),
|
|
123
128
|
}).transform((v) => {
|
|
@@ -34,6 +34,10 @@ export type TopicSubscriptionResponseDto = {
|
|
|
34
34
|
* Subscriber information
|
|
35
35
|
*/
|
|
36
36
|
subscriber: SubscriberDto;
|
|
37
|
+
/**
|
|
38
|
+
* Context keys that scope this subscription (e.g., tenant:org-a, project:proj-123)
|
|
39
|
+
*/
|
|
40
|
+
contextKeys?: Array<string> | undefined;
|
|
37
41
|
};
|
|
38
42
|
|
|
39
43
|
/** @internal */
|
|
@@ -47,6 +51,7 @@ export const TopicSubscriptionResponseDto$inboundSchema: z.ZodType<
|
|
|
47
51
|
createdAt: z.string(),
|
|
48
52
|
topic: TopicResponseDto$inboundSchema,
|
|
49
53
|
subscriber: SubscriberDto$inboundSchema,
|
|
54
|
+
contextKeys: z.array(z.string()).optional(),
|
|
50
55
|
}).transform((v) => {
|
|
51
56
|
return remap$(v, {
|
|
52
57
|
"_id": "id",
|