@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.
Files changed (149) hide show
  1. package/README.md +41 -33
  2. package/examples/package-lock.json +3 -3
  3. package/funcs/environmentsGetTags.d.ts +1 -1
  4. package/funcs/environmentsGetTags.js +1 -1
  5. package/funcs/subscribersPreferencesList.d.ts +1 -1
  6. package/funcs/subscribersPreferencesList.d.ts.map +1 -1
  7. package/funcs/subscribersPreferencesList.js +5 -9
  8. package/funcs/subscribersPreferencesList.js.map +1 -1
  9. package/funcs/subscribersTopicsList.js +1 -0
  10. package/funcs/subscribersTopicsList.js.map +1 -1
  11. package/funcs/topicsSubscriptionsGetSubscription.d.ts +2 -2
  12. package/funcs/topicsSubscriptionsGetSubscription.js +2 -2
  13. package/funcs/topicsSubscriptionsList.js +1 -0
  14. package/funcs/topicsSubscriptionsList.js.map +1 -1
  15. package/jsr.json +1 -1
  16. package/lib/config.d.ts +4 -4
  17. package/lib/config.js +4 -4
  18. package/lib/sdks.js +2 -2
  19. package/lib/sdks.js.map +1 -1
  20. package/models/components/activitynotificationjobresponsedto.d.ts +4 -4
  21. package/models/components/activitynotificationjobresponsedto.d.ts.map +1 -1
  22. package/models/components/activitynotificationjobresponsedto.js +6 -7
  23. package/models/components/activitynotificationjobresponsedto.js.map +1 -1
  24. package/models/components/bulkupdatesubscriberpreferencesdto.d.ts +34 -0
  25. package/models/components/bulkupdatesubscriberpreferencesdto.d.ts.map +1 -1
  26. package/models/components/bulkupdatesubscriberpreferencesdto.js +17 -1
  27. package/models/components/bulkupdatesubscriberpreferencesdto.js.map +1 -1
  28. package/models/components/createchannelconnectionrequestdto.d.ts +10 -10
  29. package/models/components/createchannelconnectionrequestdto.d.ts.map +1 -1
  30. package/models/components/createchannelconnectionrequestdto.js +16 -12
  31. package/models/components/createchannelconnectionrequestdto.js.map +1 -1
  32. package/models/components/createslackchannelendpointdto.d.ts +8 -8
  33. package/models/components/createslackchannelendpointdto.d.ts.map +1 -1
  34. package/models/components/createslackchannelendpointdto.js +13 -7
  35. package/models/components/createslackchannelendpointdto.js.map +1 -1
  36. package/models/components/createtopicsubscriptionsrequestdto.d.ts +34 -0
  37. package/models/components/createtopicsubscriptionsrequestdto.d.ts.map +1 -1
  38. package/models/components/createtopicsubscriptionsrequestdto.js +23 -1
  39. package/models/components/createtopicsubscriptionsrequestdto.js.map +1 -1
  40. package/models/components/index.d.ts +1 -0
  41. package/models/components/index.d.ts.map +1 -1
  42. package/models/components/index.js +1 -0
  43. package/models/components/index.js.map +1 -1
  44. package/models/components/messageactionresult.d.ts +3 -8
  45. package/models/components/messageactionresult.d.ts.map +1 -1
  46. package/models/components/messageactionresult.js +2 -8
  47. package/models/components/messageactionresult.js.map +1 -1
  48. package/models/components/messageresponsedto.d.ts +6 -16
  49. package/models/components/messageresponsedto.d.ts.map +1 -1
  50. package/models/components/messageresponsedto.js +3 -15
  51. package/models/components/messageresponsedto.js.map +1 -1
  52. package/models/components/patchsubscriberpreferencesdto.d.ts +34 -0
  53. package/models/components/patchsubscriberpreferencesdto.d.ts.map +1 -1
  54. package/models/components/patchsubscriberpreferencesdto.js +19 -1
  55. package/models/components/patchsubscriberpreferencesdto.js.map +1 -1
  56. package/models/components/subscriberworkflowpreferencedto.d.ts +4 -0
  57. package/models/components/subscriberworkflowpreferencedto.d.ts.map +1 -1
  58. package/models/components/subscriberworkflowpreferencedto.js +1 -0
  59. package/models/components/subscriberworkflowpreferencedto.js.map +1 -1
  60. package/models/components/subscriptiondetailsresponsedto.d.ts +30 -0
  61. package/models/components/subscriptiondetailsresponsedto.d.ts.map +1 -0
  62. package/models/components/{createtopicsubscriptionsresponsedto.js → subscriptiondetailsresponsedto.js} +12 -12
  63. package/models/components/subscriptiondetailsresponsedto.js.map +1 -0
  64. package/models/components/subscriptiondto.d.ts +4 -0
  65. package/models/components/subscriptiondto.d.ts.map +1 -1
  66. package/models/components/subscriptiondto.js +1 -0
  67. package/models/components/subscriptiondto.js.map +1 -1
  68. package/models/components/subscriptionresponsedto.d.ts +4 -0
  69. package/models/components/subscriptionresponsedto.d.ts.map +1 -1
  70. package/models/components/subscriptionresponsedto.js +1 -0
  71. package/models/components/subscriptionresponsedto.js.map +1 -1
  72. package/models/components/topicsubscriptionresponsedto.d.ts +4 -0
  73. package/models/components/topicsubscriptionresponsedto.d.ts.map +1 -1
  74. package/models/components/topicsubscriptionresponsedto.js +1 -0
  75. package/models/components/topicsubscriptionresponsedto.js.map +1 -1
  76. package/models/operations/inboundwebhookscontrollerhandlewebhook.d.ts +6 -2
  77. package/models/operations/inboundwebhookscontrollerhandlewebhook.d.ts.map +1 -1
  78. package/models/operations/inboundwebhookscontrollerhandlewebhook.js +1 -1
  79. package/models/operations/inboundwebhookscontrollerhandlewebhook.js.map +1 -1
  80. package/models/operations/subscriberscontrollergetsubscriberpreferences.d.ts +5 -0
  81. package/models/operations/subscriberscontrollergetsubscriberpreferences.d.ts.map +1 -1
  82. package/models/operations/subscriberscontrollergetsubscriberpreferences.js +1 -0
  83. package/models/operations/subscriberscontrollergetsubscriberpreferences.js.map +1 -1
  84. package/models/operations/subscriberscontrollerlistsubscribertopics.d.ts +5 -0
  85. package/models/operations/subscriberscontrollerlistsubscribertopics.d.ts.map +1 -1
  86. package/models/operations/subscriberscontrollerlistsubscribertopics.js +1 -0
  87. package/models/operations/subscriberscontrollerlistsubscribertopics.js.map +1 -1
  88. package/models/operations/topicscontrollergettopicsubscription.d.ts +1 -1
  89. package/models/operations/topicscontrollergettopicsubscription.d.ts.map +1 -1
  90. package/models/operations/topicscontrollergettopicsubscription.js +1 -1
  91. package/models/operations/topicscontrollergettopicsubscription.js.map +1 -1
  92. package/models/operations/topicscontrollerlisttopicsubscriptions.d.ts +5 -0
  93. package/models/operations/topicscontrollerlisttopicsubscriptions.d.ts.map +1 -1
  94. package/models/operations/topicscontrollerlisttopicsubscriptions.js +1 -0
  95. package/models/operations/topicscontrollerlisttopicsubscriptions.js.map +1 -1
  96. package/package.json +3 -3
  97. package/sdk/environments.d.ts +1 -1
  98. package/sdk/environments.js +1 -1
  99. package/sdk/preferences.d.ts +1 -1
  100. package/sdk/preferences.d.ts.map +1 -1
  101. package/sdk/preferences.js +2 -2
  102. package/sdk/preferences.js.map +1 -1
  103. package/sdk/subscriptions.d.ts +2 -2
  104. package/sdk/subscriptions.js +2 -2
  105. package/sources/json-development.json +268 -31
  106. package/src/funcs/environmentsGetTags.ts +1 -1
  107. package/src/funcs/subscribersPreferencesList.ts +5 -17
  108. package/src/funcs/subscribersTopicsList.ts +1 -0
  109. package/src/funcs/topicsSubscriptionsGetSubscription.ts +2 -2
  110. package/src/funcs/topicsSubscriptionsList.ts +1 -0
  111. package/src/lib/config.ts +4 -4
  112. package/src/lib/sdks.ts +2 -2
  113. package/src/models/components/activitynotificationjobresponsedto.ts +9 -19
  114. package/src/models/components/bulkupdatesubscriberpreferencesdto.ts +62 -0
  115. package/src/models/components/createchannelconnectionrequestdto.ts +51 -18
  116. package/src/models/components/createslackchannelendpointdto.ts +31 -13
  117. package/src/models/components/createtopicsubscriptionsrequestdto.ts +82 -0
  118. package/src/models/components/index.ts +1 -0
  119. package/src/models/components/messageactionresult.ts +2 -21
  120. package/src/models/components/messageresponsedto.ts +4 -48
  121. package/src/models/components/patchsubscriberpreferencesdto.ts +48 -0
  122. package/src/models/components/subscriberworkflowpreferencedto.ts +5 -0
  123. package/src/models/components/subscriptiondetailsresponsedto.ts +58 -0
  124. package/src/models/components/subscriptiondto.ts +5 -0
  125. package/src/models/components/subscriptionresponsedto.ts +5 -0
  126. package/src/models/components/topicsubscriptionresponsedto.ts +5 -0
  127. package/src/models/operations/inboundwebhookscontrollerhandlewebhook.ts +3 -3
  128. package/src/models/operations/subscriberscontrollergetsubscriberpreferences.ts +6 -0
  129. package/src/models/operations/subscriberscontrollerlistsubscribertopics.ts +6 -0
  130. package/src/models/operations/topicscontrollergettopicsubscription.ts +2 -2
  131. package/src/models/operations/topicscontrollerlisttopicsubscriptions.ts +6 -0
  132. package/src/sdk/environments.ts +1 -1
  133. package/src/sdk/preferences.ts +2 -6
  134. package/src/sdk/subscriptions.ts +2 -2
  135. package/models/components/createtopicsubscriptionsresponsedto.d.ts +0 -24
  136. package/models/components/createtopicsubscriptionsresponsedto.d.ts.map +0 -1
  137. package/models/components/createtopicsubscriptionsresponsedto.js.map +0 -1
  138. package/models/components/steptypeenum.d.ts +0 -26
  139. package/models/components/steptypeenum.d.ts.map +0 -1
  140. package/models/components/steptypeenum.js +0 -60
  141. package/models/components/steptypeenum.js.map +0 -1
  142. package/models/components/uploadtranslationsrequestdto.d.ts +0 -34
  143. package/models/components/uploadtranslationsrequestdto.d.ts.map +0 -1
  144. package/models/components/uploadtranslationsrequestdto.js +0 -60
  145. package/models/components/uploadtranslationsrequestdto.js.map +0 -1
  146. package/src/models/components/createtopicsubscriptionsresponsedto.ts +0 -54
  147. package/src/models/components/steptypeenum.ts +0 -33
  148. package/src/models/components/uploadtranslationsrequestdto.ts +0 -62
  149. package/temp/example.ts +0 -5
@@ -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",
@@ -21,7 +21,7 @@ export type InboundWebhooksControllerHandleWebhookRequest = {
21
21
  /**
22
22
  * Webhook event payload from the delivery provider
23
23
  */
24
- requestBody?: any | undefined;
24
+ requestBody: { [k: string]: any };
25
25
  };
26
26
 
27
27
  /** @internal */
@@ -29,7 +29,7 @@ export type InboundWebhooksControllerHandleWebhookRequest$Outbound = {
29
29
  environmentId: string;
30
30
  integrationId: string;
31
31
  "idempotency-key"?: string | undefined;
32
- RequestBody?: any | undefined;
32
+ RequestBody: { [k: string]: any };
33
33
  };
34
34
 
35
35
  /** @internal */
@@ -42,7 +42,7 @@ export const InboundWebhooksControllerHandleWebhookRequest$outboundSchema:
42
42
  environmentId: z.string(),
43
43
  integrationId: z.string(),
44
44
  idempotencyKey: z.string().optional(),
45
- requestBody: z.any().optional(),
45
+ requestBody: z.record(z.any()),
46
46
  }).transform((v) => {
47
47
  return remap$(v, {
48
48
  idempotencyKey: "idempotency-key",
@@ -20,6 +20,10 @@ export type Criticality = ClosedEnum<typeof Criticality>;
20
20
  export type SubscribersControllerGetSubscriberPreferencesRequest = {
21
21
  subscriberId: string;
22
22
  criticality?: Criticality | undefined;
23
+ /**
24
+ * Context keys for filtering preferences (e.g., ["tenant:acme"])
25
+ */
26
+ contextKeys?: Array<string> | undefined;
23
27
  /**
24
28
  * A header for idempotency purposes
25
29
  */
@@ -39,6 +43,7 @@ export const Criticality$outboundSchema: z.ZodNativeEnum<typeof Criticality> = z
39
43
  export type SubscribersControllerGetSubscriberPreferencesRequest$Outbound = {
40
44
  subscriberId: string;
41
45
  criticality: string;
46
+ contextKeys?: Array<string> | undefined;
42
47
  "idempotency-key"?: string | undefined;
43
48
  };
44
49
 
@@ -51,6 +56,7 @@ export const SubscribersControllerGetSubscriberPreferencesRequest$outboundSchema
51
56
  > = z.object({
52
57
  subscriberId: z.string(),
53
58
  criticality: Criticality$outboundSchema.default("nonCritical"),
59
+ contextKeys: z.array(z.string()).optional(),
54
60
  idempotencyKey: z.string().optional(),
55
61
  }).transform((v) => {
56
62
  return remap$(v, {
@@ -61,6 +61,10 @@ export type SubscribersControllerListSubscriberTopicsRequest = {
61
61
  * Filter by topic key
62
62
  */
63
63
  key?: string | undefined;
64
+ /**
65
+ * Filter by exact context keys, order insensitive (format: "type:id")
66
+ */
67
+ contextKeys?: Array<string> | undefined;
64
68
  /**
65
69
  * A header for idempotency purposes
66
70
  */
@@ -90,6 +94,7 @@ export type SubscribersControllerListSubscriberTopicsRequest$Outbound = {
90
94
  orderBy?: string | undefined;
91
95
  includeCursor?: boolean | undefined;
92
96
  key?: string | undefined;
97
+ contextKeys?: Array<string> | undefined;
93
98
  "idempotency-key"?: string | undefined;
94
99
  };
95
100
 
@@ -110,6 +115,7 @@ export const SubscribersControllerListSubscriberTopicsRequest$outboundSchema:
110
115
  orderBy: z.string().optional(),
111
116
  includeCursor: z.boolean().optional(),
112
117
  key: z.string().optional(),
118
+ contextKeys: z.array(z.string()).optional(),
113
119
  idempotencyKey: z.string().optional(),
114
120
  }).transform((v) => {
115
121
  return remap$(v, {
@@ -26,7 +26,7 @@ export type TopicsControllerGetTopicSubscriptionRequest = {
26
26
 
27
27
  export type TopicsControllerGetTopicSubscriptionResponse = {
28
28
  headers: { [k: string]: Array<string> };
29
- result: components.SubscriptionResponseDto;
29
+ result: components.SubscriptionDetailsResponseDto;
30
30
  };
31
31
 
32
32
  /** @internal */
@@ -71,7 +71,7 @@ export const TopicsControllerGetTopicSubscriptionResponse$inboundSchema:
71
71
  unknown
72
72
  > = z.object({
73
73
  Headers: z.record(z.array(z.string())).default({}),
74
- Result: components.SubscriptionResponseDto$inboundSchema,
74
+ Result: components.SubscriptionDetailsResponseDto$inboundSchema,
75
75
  }).transform((v) => {
76
76
  return remap$(v, {
77
77
  "Headers": "headers",
@@ -60,6 +60,10 @@ export type TopicsControllerListTopicSubscriptionsRequest = {
60
60
  * Filter by subscriber ID
61
61
  */
62
62
  subscriberId?: string | undefined;
63
+ /**
64
+ * Filter by exact context keys, order insensitive (format: "type:id")
65
+ */
66
+ contextKeys?: Array<string> | undefined;
63
67
  /**
64
68
  * A header for idempotency purposes
65
69
  */
@@ -89,6 +93,7 @@ export type TopicsControllerListTopicSubscriptionsRequest$Outbound = {
89
93
  orderBy?: string | undefined;
90
94
  includeCursor?: boolean | undefined;
91
95
  subscriberId?: string | undefined;
96
+ contextKeys?: Array<string> | undefined;
92
97
  "idempotency-key"?: string | undefined;
93
98
  };
94
99
 
@@ -109,6 +114,7 @@ export const TopicsControllerListTopicSubscriptionsRequest$outboundSchema:
109
114
  orderBy: z.string().optional(),
110
115
  includeCursor: z.boolean().optional(),
111
116
  subscriberId: z.string().optional(),
117
+ contextKeys: z.array(z.string()).optional(),
112
118
  idempotencyKey: z.string().optional(),
113
119
  }).transform((v) => {
114
120
  return remap$(v, {
@@ -14,7 +14,7 @@ import { unwrapAsync } from "../types/fp.js";
14
14
 
15
15
  export class Environments extends ClientSDK {
16
16
  /**
17
- * Get environment tags
17
+ * List environment tags
18
18
  *
19
19
  * @remarks
20
20
  * Retrieve all unique tags used in workflows within the specified environment. These tags can be used for filtering workflows.
@@ -19,16 +19,12 @@ export class Preferences extends ClientSDK {
19
19
  * This API returns all five channels preferences for all workflows and global preferences.
20
20
  */
21
21
  async list(
22
- subscriberId: string,
23
- criticality?: operations.Criticality | undefined,
24
- idempotencyKey?: string | undefined,
22
+ request: operations.SubscribersControllerGetSubscriberPreferencesRequest,
25
23
  options?: RequestOptions,
26
24
  ): Promise<operations.SubscribersControllerGetSubscriberPreferencesResponse> {
27
25
  return unwrapAsync(subscribersPreferencesList(
28
26
  this,
29
- subscriberId,
30
- criticality,
31
- idempotencyKey,
27
+ request,
32
28
  options,
33
29
  ));
34
30
  }
@@ -77,10 +77,10 @@ export class Subscriptions extends ClientSDK {
77
77
  }
78
78
 
79
79
  /**
80
- * Get a topic subscription
80
+ * Retrieve a topic subscription
81
81
  *
82
82
  * @remarks
83
- * Get a subscription by its unique identifier for a topic.
83
+ * Retrieve a subscription by its unique identifier for a topic.
84
84
  */
85
85
  async getSubscription(
86
86
  topicKey: string,
@@ -1,24 +0,0 @@
1
- import * as z from "zod/v3";
2
- import { Result as SafeParseResult } from "../../types/fp.js";
3
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
- import { MetaDto } from "./metadto.js";
5
- import { SubscriptionDto } from "./subscriptiondto.js";
6
- import { SubscriptionErrorDto } from "./subscriptionerrordto.js";
7
- export type CreateTopicSubscriptionsResponseDto = {
8
- /**
9
- * The list of successfully created subscriptions
10
- */
11
- data: Array<SubscriptionDto>;
12
- /**
13
- * Metadata about the operation
14
- */
15
- meta: MetaDto;
16
- /**
17
- * The list of errors for failed subscription attempts
18
- */
19
- errors?: Array<SubscriptionErrorDto> | undefined;
20
- };
21
- /** @internal */
22
- export declare const CreateTopicSubscriptionsResponseDto$inboundSchema: z.ZodType<CreateTopicSubscriptionsResponseDto, z.ZodTypeDef, unknown>;
23
- export declare function createTopicSubscriptionsResponseDtoFromJSON(jsonString: string): SafeParseResult<CreateTopicSubscriptionsResponseDto, SDKValidationError>;
24
- //# sourceMappingURL=createtopicsubscriptionsresponsedto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createtopicsubscriptionsresponsedto.d.ts","sourceRoot":"","sources":["../../src/models/components/createtopicsubscriptionsresponsedto.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,OAAO,EAAyB,MAAM,cAAc,CAAC;AAC9D,OAAO,EACL,eAAe,EAEhB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,oBAAoB,EAErB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,MAAM,mCAAmC,GAAG;IAChD;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IAC7B;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,GAAG,SAAS,CAAC;CAClD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iDAAiD,EAAE,CAAC,CAAC,OAAO,CACvE,mCAAmC,EACnC,CAAC,CAAC,UAAU,EACZ,OAAO,CAKP,CAAC;AAEH,wBAAgB,2CAA2C,CACzD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,mCAAmC,EAAE,kBAAkB,CAAC,CAO1E"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"createtopicsubscriptionsresponsedto.js","sourceRoot":"","sources":["../../src/models/components/createtopicsubscriptionsresponsedto.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CH,kGASC;AAjDD,0CAA4B;AAC5B,qDAAiD;AAGjD,6CAA8D;AAC9D,6DAG8B;AAC9B,uEAGmC;AAiBnC,gBAAgB;AACH,QAAA,iDAAiD,GAI1D,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,kDAA6B,CAAC;IAC5C,IAAI,EAAE,kCAAqB;IAC3B,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,4DAAkC,CAAC,CAAC,QAAQ,EAAE;CAC/D,CAAC,CAAC;AAEH,SAAgB,2CAA2C,CACzD,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CACJ,yDAAiD,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACxE,iEAAiE,CAClE,CAAC;AACJ,CAAC"}
@@ -1,26 +0,0 @@
1
- import * as z from "zod/v3";
2
- import { ClosedEnum } from "../../types/enums.js";
3
- /**
4
- * Type of the step
5
- */
6
- export declare const StepTypeEnum: {
7
- readonly InApp: "in_app";
8
- readonly Email: "email";
9
- readonly Sms: "sms";
10
- readonly Chat: "chat";
11
- readonly Push: "push";
12
- readonly Digest: "digest";
13
- readonly Trigger: "trigger";
14
- readonly Delay: "delay";
15
- readonly Throttle: "throttle";
16
- readonly Custom: "custom";
17
- };
18
- /**
19
- * Type of the step
20
- */
21
- export type StepTypeEnum = ClosedEnum<typeof StepTypeEnum>;
22
- /** @internal */
23
- export declare const StepTypeEnum$inboundSchema: z.ZodNativeEnum<typeof StepTypeEnum>;
24
- /** @internal */
25
- export declare const StepTypeEnum$outboundSchema: z.ZodNativeEnum<typeof StepTypeEnum>;
26
- //# sourceMappingURL=steptypeenum.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"steptypeenum.d.ts","sourceRoot":"","sources":["../../src/models/components/steptypeenum.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;CAWf,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3D,gBAAgB;AAChB,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,YAAY,CAChD,CAAC;AAC7B,gBAAgB;AAChB,eAAO,MAAM,2BAA2B,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,YAAY,CACjD,CAAC"}
@@ -1,60 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.StepTypeEnum$outboundSchema = exports.StepTypeEnum$inboundSchema = exports.StepTypeEnum = void 0;
40
- const z = __importStar(require("zod/v3"));
41
- /**
42
- * Type of the step
43
- */
44
- exports.StepTypeEnum = {
45
- InApp: "in_app",
46
- Email: "email",
47
- Sms: "sms",
48
- Chat: "chat",
49
- Push: "push",
50
- Digest: "digest",
51
- Trigger: "trigger",
52
- Delay: "delay",
53
- Throttle: "throttle",
54
- Custom: "custom",
55
- };
56
- /** @internal */
57
- exports.StepTypeEnum$inboundSchema = z.nativeEnum(exports.StepTypeEnum);
58
- /** @internal */
59
- exports.StepTypeEnum$outboundSchema = exports.StepTypeEnum$inboundSchema;
60
- //# sourceMappingURL=steptypeenum.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"steptypeenum.js","sourceRoot":"","sources":["../../src/models/components/steptypeenum.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0CAA4B;AAG5B;;GAEG;AACU,QAAA,YAAY,GAAG;IAC1B,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;CACR,CAAC;AAMX,gBAAgB;AACH,QAAA,0BAA0B,GACrC,CAAC,CAAC,UAAU,CAAC,oBAAY,CAAC,CAAC;AAC7B,gBAAgB;AACH,QAAA,2BAA2B,GACtC,kCAA0B,CAAC"}
@@ -1,34 +0,0 @@
1
- import * as z from "zod/v3";
2
- import { ClosedEnum } from "../../types/enums.js";
3
- /**
4
- * The resource type to associate localizations with
5
- */
6
- export declare const UploadTranslationsRequestDtoResourceType: {
7
- readonly Workflow: "workflow";
8
- readonly Layout: "layout";
9
- };
10
- /**
11
- * The resource type to associate localizations with
12
- */
13
- export type UploadTranslationsRequestDtoResourceType = ClosedEnum<typeof UploadTranslationsRequestDtoResourceType>;
14
- export type UploadTranslationsRequestDto = {
15
- /**
16
- * The resource ID to associate localizations with. Accepts identifier or slug format
17
- */
18
- resourceId: string;
19
- /**
20
- * The resource type to associate localizations with
21
- */
22
- resourceType: UploadTranslationsRequestDtoResourceType;
23
- };
24
- /** @internal */
25
- export declare const UploadTranslationsRequestDtoResourceType$outboundSchema: z.ZodNativeEnum<typeof UploadTranslationsRequestDtoResourceType>;
26
- /** @internal */
27
- export type UploadTranslationsRequestDto$Outbound = {
28
- resourceId: string;
29
- resourceType: string;
30
- };
31
- /** @internal */
32
- export declare const UploadTranslationsRequestDto$outboundSchema: z.ZodType<UploadTranslationsRequestDto$Outbound, z.ZodTypeDef, UploadTranslationsRequestDto>;
33
- export declare function uploadTranslationsRequestDtoToJSON(uploadTranslationsRequestDto: UploadTranslationsRequestDto): string;
34
- //# sourceMappingURL=uploadtranslationsrequestdto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uploadtranslationsrequestdto.d.ts","sourceRoot":"","sources":["../../src/models/components/uploadtranslationsrequestdto.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,wCAAwC;;;CAG3C,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,wCAAwC,GAAG,UAAU,CAC/D,OAAO,wCAAwC,CAChD,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,YAAY,EAAE,wCAAwC,CAAC;CACxD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,uDAAuD,EAClE,CAAC,CAAC,aAAa,CAAC,OAAO,wCAAwC,CACR,CAAC;AAE1D,gBAAgB;AAChB,MAAM,MAAM,qCAAqC,GAAG;IAClD,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,2CAA2C,EAAE,CAAC,CAAC,OAAO,CACjE,qCAAqC,EACrC,CAAC,CAAC,UAAU,EACZ,4BAA4B,CAI5B,CAAC;AAEH,wBAAgB,kCAAkC,CAChD,4BAA4B,EAAE,4BAA4B,GACzD,MAAM,CAMR"}
@@ -1,60 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.UploadTranslationsRequestDto$outboundSchema = exports.UploadTranslationsRequestDtoResourceType$outboundSchema = exports.UploadTranslationsRequestDtoResourceType = void 0;
40
- exports.uploadTranslationsRequestDtoToJSON = uploadTranslationsRequestDtoToJSON;
41
- const z = __importStar(require("zod/v3"));
42
- /**
43
- * The resource type to associate localizations with
44
- */
45
- exports.UploadTranslationsRequestDtoResourceType = {
46
- Workflow: "workflow",
47
- Layout: "layout",
48
- };
49
- /** @internal */
50
- exports.UploadTranslationsRequestDtoResourceType$outboundSchema = z
51
- .nativeEnum(exports.UploadTranslationsRequestDtoResourceType);
52
- /** @internal */
53
- exports.UploadTranslationsRequestDto$outboundSchema = z.object({
54
- resourceId: z.string(),
55
- resourceType: exports.UploadTranslationsRequestDtoResourceType$outboundSchema,
56
- });
57
- function uploadTranslationsRequestDtoToJSON(uploadTranslationsRequestDto) {
58
- return JSON.stringify(exports.UploadTranslationsRequestDto$outboundSchema.parse(uploadTranslationsRequestDto));
59
- }
60
- //# sourceMappingURL=uploadtranslationsrequestdto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uploadtranslationsrequestdto.js","sourceRoot":"","sources":["../../src/models/components/uploadtranslationsrequestdto.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDH,gFAQC;AAzDD,0CAA4B;AAG5B;;GAEG;AACU,QAAA,wCAAwC,GAAG;IACtD,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;CACR,CAAC;AAmBX,gBAAgB;AACH,QAAA,uDAAuD,GACC,CAAC;KACjE,UAAU,CAAC,gDAAwC,CAAC,CAAC;AAQ1D,gBAAgB;AACH,QAAA,2CAA2C,GAIpD,CAAC,CAAC,MAAM,CAAC;IACX,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,YAAY,EAAE,+DAAuD;CACtE,CAAC,CAAC;AAEH,SAAgB,kCAAkC,CAChD,4BAA0D;IAE1D,OAAO,IAAI,CAAC,SAAS,CACnB,mDAA2C,CAAC,KAAK,CAC/C,4BAA4B,CAC7B,CACF,CAAC;AACJ,CAAC"}