samva 0.26.0 → 0.28.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 (107) hide show
  1. package/AGENTS.md +7 -0
  2. package/README.md +14 -7
  3. package/dist/client/sdk.gen.d.ts +322 -143
  4. package/dist/client/sdk.gen.js +1085 -332
  5. package/dist/client/types.gen.d.ts +1342 -479
  6. package/dist/effect/agents.d.ts +119 -0
  7. package/dist/effect/agents.js +29 -0
  8. package/dist/effect/analytics.d.ts +1 -1
  9. package/dist/effect/analytics.js +1 -1
  10. package/dist/effect/api-keys.d.ts +6 -6
  11. package/dist/effect/attachments.d.ts +1 -1
  12. package/dist/effect/brands.d.ts +2 -0
  13. package/dist/effect/campaigns.d.ts +275 -25
  14. package/dist/effect/campaigns.js +7 -1
  15. package/dist/effect/contact-groups.d.ts +9 -9
  16. package/dist/effect/contacts.d.ts +74 -81
  17. package/dist/effect/contacts.js +7 -3
  18. package/dist/effect/conversations.d.ts +14 -6
  19. package/dist/effect/email.d.ts +34 -34
  20. package/dist/effect/errors.d.ts +1 -1
  21. package/dist/effect/errors.js +2 -2
  22. package/dist/effect/extension-installations.d.ts +3 -3
  23. package/dist/effect/extensions.d.ts +6 -6
  24. package/dist/effect/generated/agents.d.ts +6 -28
  25. package/dist/effect/generated/agents.js +270 -0
  26. package/dist/effect/generated/analytics.d.ts +3 -3
  27. package/dist/effect/generated/analytics.js +1 -1
  28. package/dist/effect/generated/api-keys.d.ts +6 -6
  29. package/dist/effect/generated/api-keys.js +2 -2
  30. package/dist/effect/generated/attachments.d.ts +3 -3
  31. package/dist/effect/generated/attachments.js +1 -1
  32. package/dist/effect/generated/brands.d.ts +16 -0
  33. package/dist/effect/generated/campaigns.d.ts +1181 -302
  34. package/dist/effect/generated/campaigns.js +169 -36
  35. package/dist/effect/generated/contact-events.d.ts +3 -3
  36. package/dist/effect/generated/contact-events.js +1 -1
  37. package/dist/effect/generated/contact-groups.d.ts +9 -9
  38. package/dist/effect/generated/contact-groups.js +7 -7
  39. package/dist/effect/generated/contacts.d.ts +2063 -290
  40. package/dist/effect/generated/contacts.js +343 -75
  41. package/dist/effect/generated/conversations.d.ts +14 -6
  42. package/dist/effect/generated/conversations.js +6 -6
  43. package/dist/effect/generated/email.d.ts +55 -70
  44. package/dist/effect/generated/email.js +18 -21
  45. package/dist/effect/generated/extension-installations.d.ts +3 -3
  46. package/dist/effect/generated/extension-installations.js +1 -1
  47. package/dist/effect/generated/extensions.d.ts +6 -6
  48. package/dist/effect/generated/extensions.js +2 -2
  49. package/dist/effect/generated/index.d.ts +5 -3
  50. package/dist/effect/generated/journeys.d.ts +9 -9
  51. package/dist/effect/generated/journeys.js +3 -3
  52. package/dist/effect/generated/mailboxes.d.ts +466 -712
  53. package/dist/effect/generated/mailboxes.js +22 -14
  54. package/dist/effect/generated/messages.d.ts +53 -29
  55. package/dist/effect/generated/messages.js +9 -5
  56. package/dist/effect/generated/namespaces.d.ts +3 -3
  57. package/dist/effect/generated/namespaces.js +1 -1
  58. package/dist/effect/generated/operations.d.ts +3 -3
  59. package/dist/effect/generated/operations.js +1 -1
  60. package/dist/effect/generated/organizations.d.ts +0 -9
  61. package/dist/effect/generated/organizations.js +1 -4
  62. package/dist/effect/generated/scheduled-messages.d.ts +69 -20
  63. package/dist/effect/generated/scheduled-messages.js +22 -3
  64. package/dist/effect/generated/shared.d.ts +431 -177
  65. package/dist/effect/generated/shared.js +216 -108
  66. package/dist/effect/generated/subscriptions.d.ts +4 -7
  67. package/dist/effect/generated/subscriptions.js +3 -4
  68. package/dist/effect/generated/templates.d.ts +71 -407
  69. package/dist/effect/generated/templates.js +23 -23
  70. package/dist/effect/generated/topic-forms.d.ts +656 -0
  71. package/dist/effect/generated/topic-forms.js +145 -0
  72. package/dist/effect/generated/{unsubscribe-groups.d.ts → topics.d.ts} +640 -435
  73. package/dist/effect/generated/topics.js +267 -0
  74. package/dist/effect/generated/webhooks.d.ts +6 -6
  75. package/dist/effect/generated/webhooks.js +2 -2
  76. package/dist/effect/generated-metadata.d.ts +78 -24
  77. package/dist/effect/generated-metadata.js +61 -27
  78. package/dist/effect/index.d.ts +3 -1
  79. package/dist/effect/index.js +5 -3
  80. package/dist/effect/internal/operation.js +4 -3
  81. package/dist/effect/internal/send.d.ts +4 -4
  82. package/dist/effect/journeys.d.ts +119 -119
  83. package/dist/effect/mailboxes.d.ts +137 -121
  84. package/dist/effect/messages.d.ts +19 -11
  85. package/dist/effect/namespaces.d.ts +3 -3
  86. package/dist/effect/operations.d.ts +3 -3
  87. package/dist/effect/scheduled-messages.d.ts +6 -6
  88. package/dist/effect/subscriptions.d.ts +1 -2
  89. package/dist/effect/templates.d.ts +13 -13
  90. package/dist/effect/topic-forms.d.ts +30 -0
  91. package/dist/effect/topic-forms.js +21 -0
  92. package/dist/effect/topics.d.ts +94 -0
  93. package/dist/effect/topics.js +29 -0
  94. package/dist/effect/webhooks.d.ts +6 -6
  95. package/dist/index.js +2 -2
  96. package/dist/package.js +1 -1
  97. package/dist/promises/errors.gen.d.ts +65 -8
  98. package/dist/promises/errors.gen.js +139 -7
  99. package/dist/promises/index.d.ts +7 -3
  100. package/dist/promises/index.js +9 -5
  101. package/dist/promises/types.gen.d.ts +1 -1
  102. package/dist/service-map.d.ts +117 -23
  103. package/dist/service-map.js +71 -10
  104. package/package.json +17 -9
  105. package/dist/effect/generated/unsubscribe-groups.js +0 -284
  106. package/dist/effect/unsubscribe-groups.d.ts +0 -74
  107. package/dist/effect/unsubscribe-groups.js +0 -29
@@ -1,434 +1,524 @@
1
- import type * as EffectBrand from "effect/Brand";
2
1
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
3
2
  import * as Schema from "effect/Schema";
4
- import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ContactId, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, PaymentRequiredError, ResourceNotFoundError, UnauthorizedError, UnsubscribeId, ValidationError } from "./shared";
5
- export type UnsubscribeGroupMemberId = string & EffectBrand.Brand<"UnsubscribeGroupMemberId">;
6
- export declare const UnsubscribeGroupMemberId: Schema.brand<Schema.String, "UnsubscribeGroupMemberId">;
7
- export type UnsubscribeGroupMemberByEmail = {
8
- readonly email: string;
3
+ import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ContactId, Cursor, EmailSenderId, ForbiddenError, GatewayTimeoutError, InternalError, MailboxId, NamespaceId, PaymentRequiredError, ResourceNotFoundError, TemplateId, TopicContactRef, TopicId, UnauthorizedError, ValidationError } from "./shared";
4
+ export type TopicSubscriptionCounts = {
5
+ readonly email: {
6
+ readonly subscribed: number;
7
+ readonly unsubscribed: number;
8
+ };
9
9
  };
10
- export declare const UnsubscribeGroupMemberByEmail: Schema.Struct<{
11
- readonly email: Schema.String;
10
+ export declare const TopicSubscriptionCounts: Schema.Struct<{
11
+ readonly email: Schema.Struct<{
12
+ readonly subscribed: Schema.Finite;
13
+ readonly unsubscribed: Schema.Finite;
14
+ }>;
15
+ }>;
16
+ export type TopicSetSubscriptionsResult = {
17
+ readonly updated: number;
18
+ };
19
+ export declare const TopicSetSubscriptionsResult: Schema.Struct<{
20
+ readonly updated: Schema.Finite;
12
21
  }>;
13
- export type UnsubscribeGroupMemberByPhone = {
14
- readonly phone: string;
22
+ export type TopicSubscription = {
23
+ readonly contactId: ContactId;
24
+ readonly channel: "email";
25
+ readonly status: "subscribed" | "unsubscribed";
26
+ readonly source: string;
27
+ readonly subscribedAt: string | null;
28
+ readonly unsubscribedAt: string | null;
29
+ readonly createdAt: string;
30
+ readonly updatedAt: string;
15
31
  };
16
- export declare const UnsubscribeGroupMemberByPhone: Schema.Struct<{
17
- readonly phone: Schema.String;
32
+ export declare const TopicSubscription: Schema.Struct<{
33
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
34
+ readonly channel: Schema.Literal<"email">;
35
+ readonly status: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>;
36
+ readonly source: Schema.String;
37
+ readonly subscribedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
38
+ readonly unsubscribedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
39
+ readonly createdAt: Schema.String;
40
+ readonly updatedAt: Schema.String;
18
41
  }>;
19
- export type UnsubscribeGroupList = {
20
- readonly items: ReadonlyArray<{
21
- readonly id: UnsubscribeId;
22
- readonly organizationId: string;
23
- readonly name: string;
24
- readonly description: string | null;
25
- readonly isDefault: boolean;
26
- readonly memberCount: number;
27
- readonly createdAt: string;
28
- readonly updatedAt: string;
42
+ export type TopicSubscriptionCheck = {
43
+ readonly contactId: ContactId | null;
44
+ readonly channel: "email";
45
+ readonly topics: ReadonlyArray<{
46
+ readonly topicId: TopicId;
47
+ readonly topicName: string;
48
+ readonly status: "subscribed" | "unsubscribed";
29
49
  }>;
30
50
  };
31
- export declare const UnsubscribeGroupList: Schema.Struct<{
32
- readonly items: Schema.$Array<Schema.Struct<{
33
- readonly id: Schema.brand<Schema.String, "UnsubscribeId">;
34
- readonly organizationId: Schema.String;
35
- readonly name: Schema.String;
36
- readonly description: Schema.Union<readonly [Schema.String, Schema.Null]>;
37
- readonly isDefault: Schema.Boolean;
38
- readonly memberCount: Schema.Finite;
39
- readonly createdAt: Schema.String;
40
- readonly updatedAt: Schema.String;
51
+ export declare const TopicSubscriptionCheck: Schema.Struct<{
52
+ readonly contactId: Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>;
53
+ readonly channel: Schema.Literal<"email">;
54
+ readonly topics: Schema.$Array<Schema.Struct<{
55
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
56
+ readonly topicName: Schema.String;
57
+ readonly status: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>;
41
58
  }>>;
42
59
  }>;
43
- export type UnsubscribeGroupMemberByContact = {
44
- readonly contactId: ContactId;
60
+ export type Topic = {
61
+ readonly id: TopicId;
62
+ readonly namespaceId: NamespaceId | null;
63
+ readonly name: string;
64
+ readonly description: string | null;
65
+ readonly default: "opt_out" | "opt_in";
66
+ readonly isDefault: boolean;
67
+ readonly defaultSenderId: EmailSenderId | null;
68
+ readonly replyMailboxId: MailboxId | null;
69
+ readonly templateId: TemplateId | null;
70
+ readonly subscriptions: TopicSubscriptionCounts;
71
+ readonly createdAt: string;
72
+ readonly updatedAt: string;
45
73
  };
46
- export declare const UnsubscribeGroupMemberByContact: Schema.Struct<{
47
- readonly contactId: Schema.brand<Schema.String, "ContactId">;
48
- }>;
49
- export type UnsubscribeGroupMemberPage = {
50
- readonly items: ReadonlyArray<{
51
- readonly id: UnsubscribeGroupMemberId;
52
- readonly contactId: ContactId;
53
- readonly source: "link" | "api" | "manual" | "complaint";
54
- readonly unsubscribedAt: string;
55
- readonly createdAt: string;
74
+ export declare const Topic: Schema.Struct<{
75
+ readonly id: Schema.brand<Schema.String, "TopicId">;
76
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
77
+ readonly name: Schema.String;
78
+ readonly description: Schema.Union<readonly [Schema.String, Schema.Null]>;
79
+ readonly default: Schema.Union<readonly [Schema.Literal<"opt_out">, Schema.Literal<"opt_in">]>;
80
+ readonly isDefault: Schema.Boolean;
81
+ readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
82
+ readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
83
+ readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
84
+ readonly subscriptions: Schema.Struct<{
85
+ readonly email: Schema.Struct<{
86
+ readonly subscribed: Schema.Finite;
87
+ readonly unsubscribed: Schema.Finite;
88
+ }>;
56
89
  }>;
90
+ readonly createdAt: Schema.String;
91
+ readonly updatedAt: Schema.String;
92
+ }>;
93
+ export type TopicSubscriptionPage = {
94
+ readonly items: ReadonlyArray<TopicSubscription>;
57
95
  readonly nextCursor: string | null;
58
96
  };
59
- export declare const UnsubscribeGroupMemberPage: Schema.Struct<{
97
+ export declare const TopicSubscriptionPage: Schema.Struct<{
60
98
  readonly items: Schema.$Array<Schema.Struct<{
61
- readonly id: Schema.brand<Schema.String, "UnsubscribeGroupMemberId">;
62
99
  readonly contactId: Schema.brand<Schema.String, "ContactId">;
63
- readonly source: Schema.Union<readonly [Schema.Literal<"link">, Schema.Literal<"api">, Schema.Literal<"manual">, Schema.Literal<"complaint">]>;
64
- readonly unsubscribedAt: Schema.String;
100
+ readonly channel: Schema.Literal<"email">;
101
+ readonly status: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>;
102
+ readonly source: Schema.String;
103
+ readonly subscribedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
104
+ readonly unsubscribedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
65
105
  readonly createdAt: Schema.String;
106
+ readonly updatedAt: Schema.String;
66
107
  }>>;
67
108
  readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
68
109
  }>;
69
- export type UnsubscribeGroupMemberRef = UnsubscribeGroupMemberByContact | UnsubscribeGroupMemberByEmail | UnsubscribeGroupMemberByPhone;
70
- export declare const UnsubscribeGroupMemberRef: Schema.Union<readonly [Schema.Struct<{
71
- readonly contactId: Schema.brand<Schema.String, "ContactId">;
72
- }>, Schema.Struct<{
73
- readonly email: Schema.String;
74
- }>, Schema.Struct<{
75
- readonly phone: Schema.String;
76
- }>]>;
77
- export type UnsubscribeList200 = UnsubscribeGroupList;
78
- export declare const UnsubscribeList200: Schema.Struct<{
110
+ export type TopicList = {
111
+ readonly items: ReadonlyArray<Topic>;
112
+ };
113
+ export declare const TopicList: Schema.Struct<{
114
+ readonly items: Schema.$Array<Schema.Struct<{
115
+ readonly id: Schema.brand<Schema.String, "TopicId">;
116
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
117
+ readonly name: Schema.String;
118
+ readonly description: Schema.Union<readonly [Schema.String, Schema.Null]>;
119
+ readonly default: Schema.Union<readonly [Schema.Literal<"opt_out">, Schema.Literal<"opt_in">]>;
120
+ readonly isDefault: Schema.Boolean;
121
+ readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
122
+ readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
123
+ readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
124
+ readonly subscriptions: Schema.Struct<{
125
+ readonly email: Schema.Struct<{
126
+ readonly subscribed: Schema.Finite;
127
+ readonly unsubscribed: Schema.Finite;
128
+ }>;
129
+ }>;
130
+ readonly createdAt: Schema.String;
131
+ readonly updatedAt: Schema.String;
132
+ }>>;
133
+ }>;
134
+ export type TopicsListQuery = {
135
+ readonly namespaceId?: NamespaceId | null;
136
+ };
137
+ export declare const TopicsListQuery: Schema.Struct<{
138
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
139
+ }>;
140
+ export type TopicsList200 = TopicList;
141
+ export declare const TopicsList200: Schema.Struct<{
79
142
  readonly items: Schema.$Array<Schema.Struct<{
80
- readonly id: Schema.brand<Schema.String, "UnsubscribeId">;
81
- readonly organizationId: Schema.String;
143
+ readonly id: Schema.brand<Schema.String, "TopicId">;
144
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
82
145
  readonly name: Schema.String;
83
146
  readonly description: Schema.Union<readonly [Schema.String, Schema.Null]>;
147
+ readonly default: Schema.Union<readonly [Schema.Literal<"opt_out">, Schema.Literal<"opt_in">]>;
84
148
  readonly isDefault: Schema.Boolean;
85
- readonly memberCount: Schema.Finite;
149
+ readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
150
+ readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
151
+ readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
152
+ readonly subscriptions: Schema.Struct<{
153
+ readonly email: Schema.Struct<{
154
+ readonly subscribed: Schema.Finite;
155
+ readonly unsubscribed: Schema.Finite;
156
+ }>;
157
+ }>;
86
158
  readonly createdAt: Schema.String;
87
159
  readonly updatedAt: Schema.String;
88
160
  }>>;
89
161
  }>;
90
- export type UnsubscribeList401 = UnauthorizedError;
91
- export declare const UnsubscribeList401: typeof UnauthorizedError;
92
- export type UnsubscribeList403 = ForbiddenError;
93
- export declare const UnsubscribeList403: typeof ForbiddenError;
94
- export type UnsubscribeList422 = ValidationError;
95
- export declare const UnsubscribeList422: typeof ValidationError;
96
- export type UnsubscribeList500 = InternalError;
97
- export declare const UnsubscribeList500: typeof InternalError;
98
- export type UnsubscribeList504 = GatewayTimeoutError;
99
- export declare const UnsubscribeList504: typeof GatewayTimeoutError;
100
- export type UnsubscribeCreateRequestJson = {
162
+ export type TopicsList401 = UnauthorizedError;
163
+ export declare const TopicsList401: typeof UnauthorizedError;
164
+ export type TopicsList403 = ForbiddenError;
165
+ export declare const TopicsList403: typeof ForbiddenError;
166
+ export type TopicsList422 = ValidationError;
167
+ export declare const TopicsList422: typeof ValidationError;
168
+ export type TopicsList500 = InternalError;
169
+ export declare const TopicsList500: typeof InternalError;
170
+ export type TopicsList504 = GatewayTimeoutError;
171
+ export declare const TopicsList504: typeof GatewayTimeoutError;
172
+ export type TopicsCreateRequestJson = {
101
173
  readonly name: string;
102
174
  readonly description?: string | null | null;
175
+ readonly namespaceId?: NamespaceId | null | null;
176
+ readonly default?: "opt_out" | "opt_in" | null;
177
+ readonly defaultSenderId?: EmailSenderId | null | null;
178
+ readonly replyMailboxId?: MailboxId | null | null;
179
+ readonly templateId?: TemplateId | null | null;
103
180
  };
104
- export declare const UnsubscribeCreateRequestJson: Schema.Struct<{
181
+ export declare const TopicsCreateRequestJson: Schema.Struct<{
105
182
  readonly name: Schema.String;
106
183
  readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
184
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>, Schema.Null]>>;
185
+ readonly default: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"opt_out">, Schema.Literal<"opt_in">]>, Schema.Null]>>;
186
+ readonly defaultSenderId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>, Schema.Null]>>;
187
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
188
+ readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>, Schema.Null]>>;
107
189
  }>;
108
- export type UnsubscribeCreate201 = {
109
- readonly id: UnsubscribeId;
110
- readonly organizationId: string;
111
- readonly name: string;
112
- readonly description: string | null;
113
- readonly isDefault: boolean;
114
- readonly memberCount: number;
115
- readonly createdAt: string;
116
- readonly updatedAt: string;
190
+ export type TopicsCreate201 = Topic;
191
+ export declare const TopicsCreate201: Schema.Struct<{
192
+ readonly id: Schema.brand<Schema.String, "TopicId">;
193
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
194
+ readonly name: Schema.String;
195
+ readonly description: Schema.Union<readonly [Schema.String, Schema.Null]>;
196
+ readonly default: Schema.Union<readonly [Schema.Literal<"opt_out">, Schema.Literal<"opt_in">]>;
197
+ readonly isDefault: Schema.Boolean;
198
+ readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
199
+ readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
200
+ readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
201
+ readonly subscriptions: Schema.Struct<{
202
+ readonly email: Schema.Struct<{
203
+ readonly subscribed: Schema.Finite;
204
+ readonly unsubscribed: Schema.Finite;
205
+ }>;
206
+ }>;
207
+ readonly createdAt: Schema.String;
208
+ readonly updatedAt: Schema.String;
209
+ }>;
210
+ export type TopicsCreate401 = UnauthorizedError;
211
+ export declare const TopicsCreate401: typeof UnauthorizedError;
212
+ export type TopicsCreate403 = ForbiddenError;
213
+ export declare const TopicsCreate403: typeof ForbiddenError;
214
+ export type TopicsCreate404 = ResourceNotFoundError;
215
+ export declare const TopicsCreate404: typeof ResourceNotFoundError;
216
+ export type TopicsCreate409 = ConflictError;
217
+ export declare const TopicsCreate409: typeof ConflictError;
218
+ export type TopicsCreate422 = ValidationError;
219
+ export declare const TopicsCreate422: typeof ValidationError;
220
+ export type TopicsCreate500 = InternalError;
221
+ export declare const TopicsCreate500: typeof InternalError;
222
+ export type TopicsCreate504 = GatewayTimeoutError;
223
+ export declare const TopicsCreate504: typeof GatewayTimeoutError;
224
+ export type TopicsGetPathParams = {
225
+ readonly id: TopicId;
117
226
  };
118
- export declare const UnsubscribeCreate201: Schema.Struct<{
119
- readonly id: Schema.brand<Schema.String, "UnsubscribeId">;
120
- readonly organizationId: Schema.String;
227
+ export declare const TopicsGetPathParams: Schema.Struct<{
228
+ readonly id: Schema.brand<Schema.String, "TopicId">;
229
+ }>;
230
+ export type TopicsGet200 = Topic;
231
+ export declare const TopicsGet200: Schema.Struct<{
232
+ readonly id: Schema.brand<Schema.String, "TopicId">;
233
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
121
234
  readonly name: Schema.String;
122
235
  readonly description: Schema.Union<readonly [Schema.String, Schema.Null]>;
236
+ readonly default: Schema.Union<readonly [Schema.Literal<"opt_out">, Schema.Literal<"opt_in">]>;
123
237
  readonly isDefault: Schema.Boolean;
124
- readonly memberCount: Schema.Finite;
238
+ readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
239
+ readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
240
+ readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
241
+ readonly subscriptions: Schema.Struct<{
242
+ readonly email: Schema.Struct<{
243
+ readonly subscribed: Schema.Finite;
244
+ readonly unsubscribed: Schema.Finite;
245
+ }>;
246
+ }>;
125
247
  readonly createdAt: Schema.String;
126
248
  readonly updatedAt: Schema.String;
127
249
  }>;
128
- export type UnsubscribeCreate401 = UnauthorizedError;
129
- export declare const UnsubscribeCreate401: typeof UnauthorizedError;
130
- export type UnsubscribeCreate403 = ForbiddenError;
131
- export declare const UnsubscribeCreate403: typeof ForbiddenError;
132
- export type UnsubscribeCreate409 = ConflictError;
133
- export declare const UnsubscribeCreate409: typeof ConflictError;
134
- export type UnsubscribeCreate422 = ValidationError;
135
- export declare const UnsubscribeCreate422: typeof ValidationError;
136
- export type UnsubscribeCreate500 = InternalError;
137
- export declare const UnsubscribeCreate500: typeof InternalError;
138
- export type UnsubscribeCreate504 = GatewayTimeoutError;
139
- export declare const UnsubscribeCreate504: typeof GatewayTimeoutError;
140
- export type UnsubscribeRemovePathParams = {
141
- readonly id: UnsubscribeId;
250
+ export type TopicsGet401 = UnauthorizedError;
251
+ export declare const TopicsGet401: typeof UnauthorizedError;
252
+ export type TopicsGet403 = ForbiddenError;
253
+ export declare const TopicsGet403: typeof ForbiddenError;
254
+ export type TopicsGet404 = ResourceNotFoundError;
255
+ export declare const TopicsGet404: typeof ResourceNotFoundError;
256
+ export type TopicsGet422 = ValidationError;
257
+ export declare const TopicsGet422: typeof ValidationError;
258
+ export type TopicsGet500 = InternalError;
259
+ export declare const TopicsGet500: typeof InternalError;
260
+ export type TopicsGet504 = GatewayTimeoutError;
261
+ export declare const TopicsGet504: typeof GatewayTimeoutError;
262
+ export type TopicsRemovePathParams = {
263
+ readonly id: TopicId;
142
264
  };
143
- export declare const UnsubscribeRemovePathParams: Schema.Struct<{
144
- readonly id: Schema.brand<Schema.String, "UnsubscribeId">;
265
+ export declare const TopicsRemovePathParams: Schema.Struct<{
266
+ readonly id: Schema.brand<Schema.String, "TopicId">;
145
267
  }>;
146
- export type UnsubscribeRemove200 = {
268
+ export type TopicsRemove200 = {
147
269
  readonly success: boolean;
148
270
  };
149
- export declare const UnsubscribeRemove200: Schema.Struct<{
271
+ export declare const TopicsRemove200: Schema.Struct<{
150
272
  readonly success: Schema.Boolean;
151
273
  }>;
152
- export type UnsubscribeRemove401 = UnauthorizedError;
153
- export declare const UnsubscribeRemove401: typeof UnauthorizedError;
154
- export type UnsubscribeRemove403 = ForbiddenError;
155
- export declare const UnsubscribeRemove403: typeof ForbiddenError;
156
- export type UnsubscribeRemove404 = ResourceNotFoundError;
157
- export declare const UnsubscribeRemove404: typeof ResourceNotFoundError;
158
- export type UnsubscribeRemove409 = ConflictError;
159
- export declare const UnsubscribeRemove409: typeof ConflictError;
160
- export type UnsubscribeRemove422 = ValidationError;
161
- export declare const UnsubscribeRemove422: typeof ValidationError;
162
- export type UnsubscribeRemove500 = InternalError;
163
- export declare const UnsubscribeRemove500: typeof InternalError;
164
- export type UnsubscribeRemove504 = GatewayTimeoutError;
165
- export declare const UnsubscribeRemove504: typeof GatewayTimeoutError;
166
- export type UnsubscribeUpdatePathParams = {
167
- readonly id: UnsubscribeId;
274
+ export type TopicsRemove401 = UnauthorizedError;
275
+ export declare const TopicsRemove401: typeof UnauthorizedError;
276
+ export type TopicsRemove403 = ForbiddenError;
277
+ export declare const TopicsRemove403: typeof ForbiddenError;
278
+ export type TopicsRemove404 = ResourceNotFoundError;
279
+ export declare const TopicsRemove404: typeof ResourceNotFoundError;
280
+ export type TopicsRemove409 = ConflictError;
281
+ export declare const TopicsRemove409: typeof ConflictError;
282
+ export type TopicsRemove422 = ValidationError;
283
+ export declare const TopicsRemove422: typeof ValidationError;
284
+ export type TopicsRemove500 = InternalError;
285
+ export declare const TopicsRemove500: typeof InternalError;
286
+ export type TopicsRemove504 = GatewayTimeoutError;
287
+ export declare const TopicsRemove504: typeof GatewayTimeoutError;
288
+ export type TopicsUpdatePathParams = {
289
+ readonly id: TopicId;
168
290
  };
169
- export declare const UnsubscribeUpdatePathParams: Schema.Struct<{
170
- readonly id: Schema.brand<Schema.String, "UnsubscribeId">;
291
+ export declare const TopicsUpdatePathParams: Schema.Struct<{
292
+ readonly id: Schema.brand<Schema.String, "TopicId">;
171
293
  }>;
172
- export type UnsubscribeUpdateRequestJson = {
294
+ export type TopicsUpdateRequestJson = {
173
295
  readonly name?: string | null;
174
296
  readonly description?: string | null | null;
297
+ readonly default?: "opt_out" | "opt_in" | null;
298
+ readonly defaultSenderId?: EmailSenderId | null | null;
299
+ readonly replyMailboxId?: MailboxId | null | null;
300
+ readonly templateId?: TemplateId | null | null;
175
301
  };
176
- export declare const UnsubscribeUpdateRequestJson: Schema.Struct<{
302
+ export declare const TopicsUpdateRequestJson: Schema.Struct<{
177
303
  readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
178
304
  readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
305
+ readonly default: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"opt_out">, Schema.Literal<"opt_in">]>, Schema.Null]>>;
306
+ readonly defaultSenderId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>, Schema.Null]>>;
307
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
308
+ readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>, Schema.Null]>>;
179
309
  }>;
180
- export type UnsubscribeUpdate200 = {
181
- readonly id: UnsubscribeId;
182
- readonly organizationId: string;
183
- readonly name: string;
184
- readonly description: string | null;
185
- readonly isDefault: boolean;
186
- readonly memberCount: number;
187
- readonly createdAt: string;
188
- readonly updatedAt: string;
189
- };
190
- export declare const UnsubscribeUpdate200: Schema.Struct<{
191
- readonly id: Schema.brand<Schema.String, "UnsubscribeId">;
192
- readonly organizationId: Schema.String;
310
+ export type TopicsUpdate200 = Topic;
311
+ export declare const TopicsUpdate200: Schema.Struct<{
312
+ readonly id: Schema.brand<Schema.String, "TopicId">;
313
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
193
314
  readonly name: Schema.String;
194
315
  readonly description: Schema.Union<readonly [Schema.String, Schema.Null]>;
316
+ readonly default: Schema.Union<readonly [Schema.Literal<"opt_out">, Schema.Literal<"opt_in">]>;
195
317
  readonly isDefault: Schema.Boolean;
196
- readonly memberCount: Schema.Finite;
318
+ readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
319
+ readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
320
+ readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
321
+ readonly subscriptions: Schema.Struct<{
322
+ readonly email: Schema.Struct<{
323
+ readonly subscribed: Schema.Finite;
324
+ readonly unsubscribed: Schema.Finite;
325
+ }>;
326
+ }>;
197
327
  readonly createdAt: Schema.String;
198
328
  readonly updatedAt: Schema.String;
199
329
  }>;
200
- export type UnsubscribeUpdate401 = UnauthorizedError;
201
- export declare const UnsubscribeUpdate401: typeof UnauthorizedError;
202
- export type UnsubscribeUpdate403 = ForbiddenError;
203
- export declare const UnsubscribeUpdate403: typeof ForbiddenError;
204
- export type UnsubscribeUpdate404 = ResourceNotFoundError;
205
- export declare const UnsubscribeUpdate404: typeof ResourceNotFoundError;
206
- export type UnsubscribeUpdate422 = ValidationError;
207
- export declare const UnsubscribeUpdate422: typeof ValidationError;
208
- export type UnsubscribeUpdate500 = InternalError;
209
- export declare const UnsubscribeUpdate500: typeof InternalError;
210
- export type UnsubscribeUpdate504 = GatewayTimeoutError;
211
- export declare const UnsubscribeUpdate504: typeof GatewayTimeoutError;
212
- export type UnsubscribeSetDefaultPathParams = {
213
- readonly id: UnsubscribeId;
330
+ export type TopicsUpdate401 = UnauthorizedError;
331
+ export declare const TopicsUpdate401: typeof UnauthorizedError;
332
+ export type TopicsUpdate403 = ForbiddenError;
333
+ export declare const TopicsUpdate403: typeof ForbiddenError;
334
+ export type TopicsUpdate404 = ResourceNotFoundError;
335
+ export declare const TopicsUpdate404: typeof ResourceNotFoundError;
336
+ export type TopicsUpdate422 = ValidationError;
337
+ export declare const TopicsUpdate422: typeof ValidationError;
338
+ export type TopicsUpdate500 = InternalError;
339
+ export declare const TopicsUpdate500: typeof InternalError;
340
+ export type TopicsUpdate504 = GatewayTimeoutError;
341
+ export declare const TopicsUpdate504: typeof GatewayTimeoutError;
342
+ export type TopicsSetDefaultPathParams = {
343
+ readonly id: TopicId;
214
344
  };
215
- export declare const UnsubscribeSetDefaultPathParams: Schema.Struct<{
216
- readonly id: Schema.brand<Schema.String, "UnsubscribeId">;
345
+ export declare const TopicsSetDefaultPathParams: Schema.Struct<{
346
+ readonly id: Schema.brand<Schema.String, "TopicId">;
217
347
  }>;
218
- export type UnsubscribeSetDefault200 = {
219
- readonly id: UnsubscribeId;
220
- readonly organizationId: string;
221
- readonly name: string;
222
- readonly description: string | null;
223
- readonly isDefault: boolean;
224
- readonly memberCount: number;
225
- readonly createdAt: string;
226
- readonly updatedAt: string;
227
- };
228
- export declare const UnsubscribeSetDefault200: Schema.Struct<{
229
- readonly id: Schema.brand<Schema.String, "UnsubscribeId">;
230
- readonly organizationId: Schema.String;
348
+ export type TopicsSetDefault200 = Topic;
349
+ export declare const TopicsSetDefault200: Schema.Struct<{
350
+ readonly id: Schema.brand<Schema.String, "TopicId">;
351
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
231
352
  readonly name: Schema.String;
232
353
  readonly description: Schema.Union<readonly [Schema.String, Schema.Null]>;
354
+ readonly default: Schema.Union<readonly [Schema.Literal<"opt_out">, Schema.Literal<"opt_in">]>;
233
355
  readonly isDefault: Schema.Boolean;
234
- readonly memberCount: Schema.Finite;
356
+ readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
357
+ readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
358
+ readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
359
+ readonly subscriptions: Schema.Struct<{
360
+ readonly email: Schema.Struct<{
361
+ readonly subscribed: Schema.Finite;
362
+ readonly unsubscribed: Schema.Finite;
363
+ }>;
364
+ }>;
235
365
  readonly createdAt: Schema.String;
236
366
  readonly updatedAt: Schema.String;
237
367
  }>;
238
- export type UnsubscribeSetDefault401 = UnauthorizedError;
239
- export declare const UnsubscribeSetDefault401: typeof UnauthorizedError;
240
- export type UnsubscribeSetDefault403 = ForbiddenError;
241
- export declare const UnsubscribeSetDefault403: typeof ForbiddenError;
242
- export type UnsubscribeSetDefault404 = ResourceNotFoundError;
243
- export declare const UnsubscribeSetDefault404: typeof ResourceNotFoundError;
244
- export type UnsubscribeSetDefault422 = ValidationError;
245
- export declare const UnsubscribeSetDefault422: typeof ValidationError;
246
- export type UnsubscribeSetDefault500 = InternalError;
247
- export declare const UnsubscribeSetDefault500: typeof InternalError;
248
- export type UnsubscribeSetDefault504 = GatewayTimeoutError;
249
- export declare const UnsubscribeSetDefault504: typeof GatewayTimeoutError;
250
- export type UnsubscribeListMembersPathParams = {
251
- readonly id: UnsubscribeId;
368
+ export type TopicsSetDefault401 = UnauthorizedError;
369
+ export declare const TopicsSetDefault401: typeof UnauthorizedError;
370
+ export type TopicsSetDefault403 = ForbiddenError;
371
+ export declare const TopicsSetDefault403: typeof ForbiddenError;
372
+ export type TopicsSetDefault404 = ResourceNotFoundError;
373
+ export declare const TopicsSetDefault404: typeof ResourceNotFoundError;
374
+ export type TopicsSetDefault422 = ValidationError;
375
+ export declare const TopicsSetDefault422: typeof ValidationError;
376
+ export type TopicsSetDefault500 = InternalError;
377
+ export declare const TopicsSetDefault500: typeof InternalError;
378
+ export type TopicsSetDefault504 = GatewayTimeoutError;
379
+ export declare const TopicsSetDefault504: typeof GatewayTimeoutError;
380
+ export type TopicsListSubscriptionsPathParams = {
381
+ readonly id: TopicId;
252
382
  };
253
- export declare const UnsubscribeListMembersPathParams: Schema.Struct<{
254
- readonly id: Schema.brand<Schema.String, "UnsubscribeId">;
383
+ export declare const TopicsListSubscriptionsPathParams: Schema.Struct<{
384
+ readonly id: Schema.brand<Schema.String, "TopicId">;
255
385
  }>;
256
- export type UnsubscribeListMembersQuery = {
257
- readonly limit?: string | null;
386
+ export type TopicsListSubscriptionsQuery = {
387
+ readonly limit?: number | null;
258
388
  readonly cursor?: Cursor | null;
389
+ readonly channel?: "email" | null;
390
+ readonly status?: "subscribed" | "unsubscribed" | null;
259
391
  };
260
- export declare const UnsubscribeListMembersQuery: Schema.Struct<{
261
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
392
+ export declare const TopicsListSubscriptionsQuery: Schema.Struct<{
393
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
262
394
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
395
+ readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"email">, Schema.Null]>>;
396
+ readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>, Schema.Null]>>;
263
397
  }>;
264
- export type UnsubscribeListMembers200 = UnsubscribeGroupMemberPage;
265
- export declare const UnsubscribeListMembers200: Schema.Struct<{
398
+ export type TopicsListSubscriptions200 = TopicSubscriptionPage;
399
+ export declare const TopicsListSubscriptions200: Schema.Struct<{
266
400
  readonly items: Schema.$Array<Schema.Struct<{
267
- readonly id: Schema.brand<Schema.String, "UnsubscribeGroupMemberId">;
268
401
  readonly contactId: Schema.brand<Schema.String, "ContactId">;
269
- readonly source: Schema.Union<readonly [Schema.Literal<"link">, Schema.Literal<"api">, Schema.Literal<"manual">, Schema.Literal<"complaint">]>;
270
- readonly unsubscribedAt: Schema.String;
402
+ readonly channel: Schema.Literal<"email">;
403
+ readonly status: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>;
404
+ readonly source: Schema.String;
405
+ readonly subscribedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
406
+ readonly unsubscribedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
271
407
  readonly createdAt: Schema.String;
408
+ readonly updatedAt: Schema.String;
272
409
  }>>;
273
410
  readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
274
411
  }>;
275
- export type UnsubscribeListMembers401 = UnauthorizedError;
276
- export declare const UnsubscribeListMembers401: typeof UnauthorizedError;
277
- export type UnsubscribeListMembers403 = ForbiddenError;
278
- export declare const UnsubscribeListMembers403: typeof ForbiddenError;
279
- export type UnsubscribeListMembers404 = ResourceNotFoundError;
280
- export declare const UnsubscribeListMembers404: typeof ResourceNotFoundError;
281
- export type UnsubscribeListMembers422 = ValidationError;
282
- export declare const UnsubscribeListMembers422: typeof ValidationError;
283
- export type UnsubscribeListMembers500 = InternalError;
284
- export declare const UnsubscribeListMembers500: typeof InternalError;
285
- export type UnsubscribeListMembers504 = GatewayTimeoutError;
286
- export declare const UnsubscribeListMembers504: typeof GatewayTimeoutError;
287
- export type UnsubscribeAddMembersPathParams = {
288
- readonly id: UnsubscribeId;
412
+ export type TopicsListSubscriptions401 = UnauthorizedError;
413
+ export declare const TopicsListSubscriptions401: typeof UnauthorizedError;
414
+ export type TopicsListSubscriptions403 = ForbiddenError;
415
+ export declare const TopicsListSubscriptions403: typeof ForbiddenError;
416
+ export type TopicsListSubscriptions404 = ResourceNotFoundError;
417
+ export declare const TopicsListSubscriptions404: typeof ResourceNotFoundError;
418
+ export type TopicsListSubscriptions422 = ValidationError;
419
+ export declare const TopicsListSubscriptions422: typeof ValidationError;
420
+ export type TopicsListSubscriptions500 = InternalError;
421
+ export declare const TopicsListSubscriptions500: typeof InternalError;
422
+ export type TopicsListSubscriptions504 = GatewayTimeoutError;
423
+ export declare const TopicsListSubscriptions504: typeof GatewayTimeoutError;
424
+ export type TopicsSetSubscriptionsPathParams = {
425
+ readonly id: TopicId;
289
426
  };
290
- export declare const UnsubscribeAddMembersPathParams: Schema.Struct<{
291
- readonly id: Schema.brand<Schema.String, "UnsubscribeId">;
427
+ export declare const TopicsSetSubscriptionsPathParams: Schema.Struct<{
428
+ readonly id: Schema.brand<Schema.String, "TopicId">;
292
429
  }>;
293
- export type UnsubscribeAddMembersRequestJson = {
294
- readonly members: ReadonlyArray<UnsubscribeGroupMemberRef>;
295
- readonly source?: "link" | "api" | "manual" | "complaint" | null;
430
+ export type TopicsSetSubscriptionsRequestJson = {
431
+ readonly contacts: ReadonlyArray<TopicContactRef>;
432
+ readonly channel: "email";
433
+ readonly status: "subscribed" | "unsubscribed";
434
+ readonly source?: string | null;
296
435
  };
297
- export declare const UnsubscribeAddMembersRequestJson: Schema.Struct<{
298
- readonly members: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
436
+ export declare const TopicsSetSubscriptionsRequestJson: Schema.Struct<{
437
+ readonly contacts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
299
438
  readonly contactId: Schema.brand<Schema.String, "ContactId">;
300
439
  }>, Schema.Struct<{
301
440
  readonly email: Schema.String;
302
441
  }>, Schema.Struct<{
303
442
  readonly phone: Schema.String;
304
443
  }>]>>;
305
- readonly source: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"link">, Schema.Literal<"api">, Schema.Literal<"manual">, Schema.Literal<"complaint">]>, Schema.Null]>>;
444
+ readonly channel: Schema.Literal<"email">;
445
+ readonly status: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>;
446
+ readonly source: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
306
447
  }>;
307
- export type UnsubscribeAddMembers200 = {
308
- readonly added: number;
309
- readonly skipped: number;
310
- };
311
- export declare const UnsubscribeAddMembers200: Schema.Struct<{
312
- readonly added: Schema.Finite;
313
- readonly skipped: Schema.Finite;
314
- }>;
315
- export type UnsubscribeAddMembers401 = UnauthorizedError;
316
- export declare const UnsubscribeAddMembers401: typeof UnauthorizedError;
317
- export type UnsubscribeAddMembers402 = PaymentRequiredError;
318
- export declare const UnsubscribeAddMembers402: typeof PaymentRequiredError;
319
- export type UnsubscribeAddMembers403 = ForbiddenError;
320
- export declare const UnsubscribeAddMembers403: typeof ForbiddenError;
321
- export type UnsubscribeAddMembers404 = ResourceNotFoundError;
322
- export declare const UnsubscribeAddMembers404: typeof ResourceNotFoundError;
323
- export type UnsubscribeAddMembers422 = ValidationError;
324
- export declare const UnsubscribeAddMembers422: typeof ValidationError;
325
- export type UnsubscribeAddMembers500 = InternalError;
326
- export declare const UnsubscribeAddMembers500: typeof InternalError;
327
- export type UnsubscribeAddMembers502 = BillingProviderError;
328
- export declare const UnsubscribeAddMembers502: typeof BillingProviderError;
329
- export type UnsubscribeAddMembers504 = GatewayTimeoutError;
330
- export declare const UnsubscribeAddMembers504: typeof GatewayTimeoutError;
331
- export type UnsubscribeRemoveMembersPathParams = {
332
- readonly id: UnsubscribeId;
333
- };
334
- export declare const UnsubscribeRemoveMembersPathParams: Schema.Struct<{
335
- readonly id: Schema.brand<Schema.String, "UnsubscribeId">;
448
+ export type TopicsSetSubscriptions200 = TopicSetSubscriptionsResult;
449
+ export declare const TopicsSetSubscriptions200: Schema.Struct<{
450
+ readonly updated: Schema.Finite;
336
451
  }>;
337
- export type UnsubscribeRemoveMembersRequestJson = {
338
- readonly members: ReadonlyArray<UnsubscribeGroupMemberRef>;
339
- };
340
- export declare const UnsubscribeRemoveMembersRequestJson: Schema.Struct<{
341
- readonly members: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
342
- readonly contactId: Schema.brand<Schema.String, "ContactId">;
343
- }>, Schema.Struct<{
344
- readonly email: Schema.String;
345
- }>, Schema.Struct<{
346
- readonly phone: Schema.String;
347
- }>]>>;
348
- }>;
349
- export type UnsubscribeRemoveMembers200 = {
350
- readonly removed: number;
351
- };
352
- export declare const UnsubscribeRemoveMembers200: Schema.Struct<{
353
- readonly removed: Schema.Finite;
354
- }>;
355
- export type UnsubscribeRemoveMembers401 = UnauthorizedError;
356
- export declare const UnsubscribeRemoveMembers401: typeof UnauthorizedError;
357
- export type UnsubscribeRemoveMembers403 = ForbiddenError;
358
- export declare const UnsubscribeRemoveMembers403: typeof ForbiddenError;
359
- export type UnsubscribeRemoveMembers404 = ResourceNotFoundError;
360
- export declare const UnsubscribeRemoveMembers404: typeof ResourceNotFoundError;
361
- export type UnsubscribeRemoveMembers422 = ValidationError;
362
- export declare const UnsubscribeRemoveMembers422: typeof ValidationError;
363
- export type UnsubscribeRemoveMembers500 = InternalError;
364
- export declare const UnsubscribeRemoveMembers500: typeof InternalError;
365
- export type UnsubscribeRemoveMembers504 = GatewayTimeoutError;
366
- export declare const UnsubscribeRemoveMembers504: typeof GatewayTimeoutError;
367
- export type UnsubscribeCheckSubscriptionQuery = {
452
+ export type TopicsSetSubscriptions401 = UnauthorizedError;
453
+ export declare const TopicsSetSubscriptions401: typeof UnauthorizedError;
454
+ export type TopicsSetSubscriptions402 = PaymentRequiredError;
455
+ export declare const TopicsSetSubscriptions402: typeof PaymentRequiredError;
456
+ export type TopicsSetSubscriptions403 = ForbiddenError;
457
+ export declare const TopicsSetSubscriptions403: typeof ForbiddenError;
458
+ export type TopicsSetSubscriptions404 = ResourceNotFoundError;
459
+ export declare const TopicsSetSubscriptions404: typeof ResourceNotFoundError;
460
+ export type TopicsSetSubscriptions422 = ValidationError;
461
+ export declare const TopicsSetSubscriptions422: typeof ValidationError;
462
+ export type TopicsSetSubscriptions500 = InternalError;
463
+ export declare const TopicsSetSubscriptions500: typeof InternalError;
464
+ export type TopicsSetSubscriptions502 = BillingProviderError;
465
+ export declare const TopicsSetSubscriptions502: typeof BillingProviderError;
466
+ export type TopicsSetSubscriptions504 = GatewayTimeoutError;
467
+ export declare const TopicsSetSubscriptions504: typeof GatewayTimeoutError;
468
+ export type TopicsCheckSubscriptionQuery = {
368
469
  readonly contactId?: ContactId | null;
369
470
  readonly email?: string | null;
370
471
  readonly phone?: string | null;
371
- readonly groupIds?: string | null;
472
+ readonly namespaceId?: NamespaceId | null;
473
+ readonly channel: "email";
474
+ readonly topicIds?: string | null;
372
475
  };
373
- export declare const UnsubscribeCheckSubscriptionQuery: Schema.Struct<{
476
+ export declare const TopicsCheckSubscriptionQuery: Schema.Struct<{
374
477
  readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
375
478
  readonly email: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
376
479
  readonly phone: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
377
- readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
480
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
481
+ readonly channel: Schema.Literal<"email">;
482
+ readonly topicIds: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
378
483
  }>;
379
- export type UnsubscribeCheckSubscription200 = {
380
- readonly contactId: ContactId | null;
381
- readonly unsubscribedGroups: ReadonlyArray<{
382
- readonly groupId: string;
383
- readonly groupName: string;
384
- readonly unsubscribedAt: string;
385
- }>;
386
- };
387
- export declare const UnsubscribeCheckSubscription200: Schema.Struct<{
484
+ export type TopicsCheckSubscription200 = TopicSubscriptionCheck;
485
+ export declare const TopicsCheckSubscription200: Schema.Struct<{
388
486
  readonly contactId: Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>;
389
- readonly unsubscribedGroups: Schema.$Array<Schema.Struct<{
390
- readonly groupId: Schema.String;
391
- readonly groupName: Schema.String;
392
- readonly unsubscribedAt: Schema.String;
487
+ readonly channel: Schema.Literal<"email">;
488
+ readonly topics: Schema.$Array<Schema.Struct<{
489
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
490
+ readonly topicName: Schema.String;
491
+ readonly status: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>;
393
492
  }>>;
394
493
  }>;
395
- export type UnsubscribeCheckSubscription401 = UnauthorizedError;
396
- export declare const UnsubscribeCheckSubscription401: typeof UnauthorizedError;
397
- export type UnsubscribeCheckSubscription403 = ForbiddenError;
398
- export declare const UnsubscribeCheckSubscription403: typeof ForbiddenError;
399
- export type UnsubscribeCheckSubscription422 = ValidationError;
400
- export declare const UnsubscribeCheckSubscription422: typeof ValidationError;
401
- export type UnsubscribeCheckSubscription500 = InternalError;
402
- export declare const UnsubscribeCheckSubscription500: typeof InternalError;
403
- export type UnsubscribeCheckSubscription504 = GatewayTimeoutError;
404
- export declare const UnsubscribeCheckSubscription504: typeof GatewayTimeoutError;
405
- declare const UnsubscribeGroupsGroup_base: HttpApiGroup.HttpApiGroup<"Unsubscribe Groups", HttpApiEndpoint.HttpApiEndpoint<"unsubscribeAddMembers", "POST", "/v1/unsubscribe-groups/:id/members", Schema.toCodecStringTree<Schema.Struct<{
406
- readonly id: Schema.brand<Schema.String, "UnsubscribeId">;
407
- }>>, never, Schema.toCodecJson<Schema.Struct<{
408
- readonly members: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
409
- readonly contactId: Schema.brand<Schema.String, "ContactId">;
410
- }>, Schema.Struct<{
411
- readonly email: Schema.String;
412
- }>, Schema.Struct<{
413
- readonly phone: Schema.String;
414
- }>]>>;
415
- readonly source: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"link">, Schema.Literal<"api">, Schema.Literal<"manual">, Schema.Literal<"complaint">]>, Schema.Null]>>;
416
- }>>, never, Schema.toCodecJson<Schema.Struct<{
417
- readonly added: Schema.Finite;
418
- readonly skipped: Schema.Finite;
419
- }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<BillingProviderError, {
420
- readonly _tag: "BillingProviderError";
421
- readonly message: string;
422
- }, readonly [Schema.Struct<{
423
- readonly _tag: Schema.tag<"BillingProviderError">;
424
- readonly message: Schema.String;
425
- }>], {
426
- readonly _tag: "BillingProviderError";
427
- readonly message: string;
428
- }>, Schema.Struct<{
429
- readonly _tag: Schema.tag<"BillingProviderError">;
430
- readonly message: Schema.String;
431
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
494
+ export type TopicsCheckSubscription401 = UnauthorizedError;
495
+ export declare const TopicsCheckSubscription401: typeof UnauthorizedError;
496
+ export type TopicsCheckSubscription403 = ForbiddenError;
497
+ export declare const TopicsCheckSubscription403: typeof ForbiddenError;
498
+ export type TopicsCheckSubscription404 = ResourceNotFoundError;
499
+ export declare const TopicsCheckSubscription404: typeof ResourceNotFoundError;
500
+ export type TopicsCheckSubscription422 = ValidationError;
501
+ export declare const TopicsCheckSubscription422: typeof ValidationError;
502
+ export type TopicsCheckSubscription500 = InternalError;
503
+ export declare const TopicsCheckSubscription500: typeof InternalError;
504
+ export type TopicsCheckSubscription504 = GatewayTimeoutError;
505
+ export declare const TopicsCheckSubscription504: typeof GatewayTimeoutError;
506
+ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpoint.HttpApiEndpoint<"topicsCheckSubscription", "GET", "/v1/topics/check", never, Schema.toCodecStringTree<Schema.Struct<{
507
+ readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
508
+ readonly email: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
509
+ readonly phone: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
510
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
511
+ readonly channel: Schema.Literal<"email">;
512
+ readonly topicIds: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
513
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
514
+ readonly contactId: Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>;
515
+ readonly channel: Schema.Literal<"email">;
516
+ readonly topics: Schema.$Array<Schema.Struct<{
517
+ readonly topicId: Schema.brand<Schema.String, "TopicId">;
518
+ readonly topicName: Schema.String;
519
+ readonly status: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>;
520
+ }>>;
521
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
432
522
  readonly _tag: "ForbiddenError";
433
523
  readonly message: string;
434
524
  }, readonly [Schema.Struct<{
@@ -456,30 +546,6 @@ declare const UnsubscribeGroupsGroup_base: HttpApiGroup.HttpApiGroup<"Unsubscrib
456
546
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
457
547
  readonly message: Schema.String;
458
548
  readonly retryAfterSeconds: Schema.Finite;
459
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<PaymentRequiredError, {
460
- readonly _tag: "PaymentRequiredError";
461
- readonly message: string;
462
- readonly resource: string;
463
- readonly currentUsage: number;
464
- readonly limit: number;
465
- }, readonly [Schema.Struct<{
466
- readonly _tag: Schema.tag<"PaymentRequiredError">;
467
- readonly message: Schema.String;
468
- readonly resource: Schema.String;
469
- readonly currentUsage: Schema.Finite;
470
- readonly limit: Schema.Finite;
471
- }>], {
472
- readonly _tag: "PaymentRequiredError";
473
- readonly message: string;
474
- readonly resource: string;
475
- readonly currentUsage: number;
476
- readonly limit: number;
477
- }>, Schema.Struct<{
478
- readonly _tag: Schema.tag<"PaymentRequiredError">;
479
- readonly message: Schema.String;
480
- readonly resource: Schema.String;
481
- readonly currentUsage: Schema.Finite;
482
- readonly limit: Schema.Finite;
483
549
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
484
550
  readonly _tag: "ResourceNotFoundError";
485
551
  readonly resource: string;
@@ -532,19 +598,53 @@ declare const UnsubscribeGroupsGroup_base: HttpApiGroup.HttpApiGroup<"Unsubscrib
532
598
  readonly _tag: Schema.tag<"ValidationError">;
533
599
  readonly message: Schema.String;
534
600
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
535
- }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"unsubscribeCheckSubscription", "GET", "/v1/unsubscribe-groups/check", never, Schema.toCodecStringTree<Schema.Struct<{
536
- readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
537
- readonly email: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
538
- readonly phone: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
539
- readonly groupIds: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
540
- }>>, never, never, Schema.toCodecJson<Schema.Struct<{
541
- readonly contactId: Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>;
542
- readonly unsubscribedGroups: Schema.$Array<Schema.Struct<{
543
- readonly groupId: Schema.String;
544
- readonly groupName: Schema.String;
545
- readonly unsubscribedAt: Schema.String;
546
- }>>;
547
- }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
601
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"topicsCreate", "POST", "/v1/topics", never, never, Schema.toCodecJson<Schema.Struct<{
602
+ readonly name: Schema.String;
603
+ readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
604
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>, Schema.Null]>>;
605
+ readonly default: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"opt_out">, Schema.Literal<"opt_in">]>, Schema.Null]>>;
606
+ readonly defaultSenderId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>, Schema.Null]>>;
607
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
608
+ readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>, Schema.Null]>>;
609
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
610
+ readonly id: Schema.brand<Schema.String, "TopicId">;
611
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
612
+ readonly name: Schema.String;
613
+ readonly description: Schema.Union<readonly [Schema.String, Schema.Null]>;
614
+ readonly default: Schema.Union<readonly [Schema.Literal<"opt_out">, Schema.Literal<"opt_in">]>;
615
+ readonly isDefault: Schema.Boolean;
616
+ readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
617
+ readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
618
+ readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
619
+ readonly subscriptions: Schema.Struct<{
620
+ readonly email: Schema.Struct<{
621
+ readonly subscribed: Schema.Finite;
622
+ readonly unsubscribed: Schema.Finite;
623
+ }>;
624
+ }>;
625
+ readonly createdAt: Schema.String;
626
+ readonly updatedAt: Schema.String;
627
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
628
+ readonly _tag: "ConflictError";
629
+ readonly message: string;
630
+ readonly resource: string;
631
+ readonly id?: string | null;
632
+ }, readonly [Schema.Struct<{
633
+ readonly _tag: Schema.tag<"ConflictError">;
634
+ readonly message: Schema.String;
635
+ readonly resource: Schema.String;
636
+ readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
637
+ }>], {
638
+ readonly _tag: "ConflictError";
639
+ readonly message: string;
640
+ readonly resource: string;
641
+ readonly id?: string | null;
642
+ }>, Schema.Struct<{
643
+ readonly _tag: Schema.tag<"ConflictError">;
644
+ readonly message: Schema.String;
645
+ readonly resource: Schema.String;
646
+ readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
647
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
548
648
  readonly _tag: "ForbiddenError";
549
649
  readonly message: string;
550
650
  }, readonly [Schema.Struct<{
@@ -572,6 +672,26 @@ declare const UnsubscribeGroupsGroup_base: HttpApiGroup.HttpApiGroup<"Unsubscrib
572
672
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
573
673
  readonly message: Schema.String;
574
674
  readonly retryAfterSeconds: Schema.Finite;
675
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
676
+ readonly _tag: "ResourceNotFoundError";
677
+ readonly resource: string;
678
+ readonly id: string;
679
+ readonly message: string;
680
+ }, readonly [Schema.Struct<{
681
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
682
+ readonly resource: Schema.String;
683
+ readonly id: Schema.String;
684
+ readonly message: Schema.String;
685
+ }>], {
686
+ readonly _tag: "ResourceNotFoundError";
687
+ readonly resource: string;
688
+ readonly id: string;
689
+ readonly message: string;
690
+ }>, Schema.Struct<{
691
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
692
+ readonly resource: Schema.String;
693
+ readonly id: Schema.String;
694
+ readonly message: Schema.String;
575
695
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
576
696
  readonly _tag: "UnauthorizedError";
577
697
  readonly message: string;
@@ -604,39 +724,27 @@ declare const UnsubscribeGroupsGroup_base: HttpApiGroup.HttpApiGroup<"Unsubscrib
604
724
  readonly _tag: Schema.tag<"ValidationError">;
605
725
  readonly message: Schema.String;
606
726
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
607
- }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"unsubscribeCreate", "POST", "/v1/unsubscribe-groups", never, never, Schema.toCodecJson<Schema.Struct<{
608
- readonly name: Schema.String;
609
- readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
610
- }>>, never, Schema.toCodecJson<Schema.Struct<{
611
- readonly id: Schema.brand<Schema.String, "UnsubscribeId">;
612
- readonly organizationId: Schema.String;
727
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"topicsGet", "GET", "/v1/topics/:id", Schema.toCodecStringTree<Schema.Struct<{
728
+ readonly id: Schema.brand<Schema.String, "TopicId">;
729
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
730
+ readonly id: Schema.brand<Schema.String, "TopicId">;
731
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
613
732
  readonly name: Schema.String;
614
733
  readonly description: Schema.Union<readonly [Schema.String, Schema.Null]>;
734
+ readonly default: Schema.Union<readonly [Schema.Literal<"opt_out">, Schema.Literal<"opt_in">]>;
615
735
  readonly isDefault: Schema.Boolean;
616
- readonly memberCount: Schema.Finite;
736
+ readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
737
+ readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
738
+ readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
739
+ readonly subscriptions: Schema.Struct<{
740
+ readonly email: Schema.Struct<{
741
+ readonly subscribed: Schema.Finite;
742
+ readonly unsubscribed: Schema.Finite;
743
+ }>;
744
+ }>;
617
745
  readonly createdAt: Schema.String;
618
746
  readonly updatedAt: Schema.String;
619
- }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
620
- readonly _tag: "ConflictError";
621
- readonly message: string;
622
- readonly resource: string;
623
- readonly id?: string | null;
624
- }, readonly [Schema.Struct<{
625
- readonly _tag: Schema.tag<"ConflictError">;
626
- readonly message: Schema.String;
627
- readonly resource: Schema.String;
628
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
629
- }>], {
630
- readonly _tag: "ConflictError";
631
- readonly message: string;
632
- readonly resource: string;
633
- readonly id?: string | null;
634
- }>, Schema.Struct<{
635
- readonly _tag: Schema.tag<"ConflictError">;
636
- readonly message: Schema.String;
637
- readonly resource: Schema.String;
638
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
639
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
747
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
640
748
  readonly _tag: "ForbiddenError";
641
749
  readonly message: string;
642
750
  }, readonly [Schema.Struct<{
@@ -664,6 +772,26 @@ declare const UnsubscribeGroupsGroup_base: HttpApiGroup.HttpApiGroup<"Unsubscrib
664
772
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
665
773
  readonly message: Schema.String;
666
774
  readonly retryAfterSeconds: Schema.Finite;
775
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
776
+ readonly _tag: "ResourceNotFoundError";
777
+ readonly resource: string;
778
+ readonly id: string;
779
+ readonly message: string;
780
+ }, readonly [Schema.Struct<{
781
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
782
+ readonly resource: Schema.String;
783
+ readonly id: Schema.String;
784
+ readonly message: Schema.String;
785
+ }>], {
786
+ readonly _tag: "ResourceNotFoundError";
787
+ readonly resource: string;
788
+ readonly id: string;
789
+ readonly message: string;
790
+ }>, Schema.Struct<{
791
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
792
+ readonly resource: Schema.String;
793
+ readonly id: Schema.String;
794
+ readonly message: Schema.String;
667
795
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
668
796
  readonly _tag: "UnauthorizedError";
669
797
  readonly message: string;
@@ -696,14 +824,25 @@ declare const UnsubscribeGroupsGroup_base: HttpApiGroup.HttpApiGroup<"Unsubscrib
696
824
  readonly _tag: Schema.tag<"ValidationError">;
697
825
  readonly message: Schema.String;
698
826
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
699
- }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"unsubscribeList", "GET", "/v1/unsubscribe-groups", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
827
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"topicsList", "GET", "/v1/topics", never, Schema.toCodecStringTree<Schema.Struct<{
828
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
829
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
700
830
  readonly items: Schema.$Array<Schema.Struct<{
701
- readonly id: Schema.brand<Schema.String, "UnsubscribeId">;
702
- readonly organizationId: Schema.String;
831
+ readonly id: Schema.brand<Schema.String, "TopicId">;
832
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
703
833
  readonly name: Schema.String;
704
834
  readonly description: Schema.Union<readonly [Schema.String, Schema.Null]>;
835
+ readonly default: Schema.Union<readonly [Schema.Literal<"opt_out">, Schema.Literal<"opt_in">]>;
705
836
  readonly isDefault: Schema.Boolean;
706
- readonly memberCount: Schema.Finite;
837
+ readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
838
+ readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
839
+ readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
840
+ readonly subscriptions: Schema.Struct<{
841
+ readonly email: Schema.Struct<{
842
+ readonly subscribed: Schema.Finite;
843
+ readonly unsubscribed: Schema.Finite;
844
+ }>;
845
+ }>;
707
846
  readonly createdAt: Schema.String;
708
847
  readonly updatedAt: Schema.String;
709
848
  }>>;
@@ -767,18 +906,23 @@ declare const UnsubscribeGroupsGroup_base: HttpApiGroup.HttpApiGroup<"Unsubscrib
767
906
  readonly _tag: Schema.tag<"ValidationError">;
768
907
  readonly message: Schema.String;
769
908
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
770
- }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"unsubscribeListMembers", "GET", "/v1/unsubscribe-groups/:id/members", Schema.toCodecStringTree<Schema.Struct<{
771
- readonly id: Schema.brand<Schema.String, "UnsubscribeId">;
909
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"topicsListSubscriptions", "GET", "/v1/topics/:id/subscriptions", Schema.toCodecStringTree<Schema.Struct<{
910
+ readonly id: Schema.brand<Schema.String, "TopicId">;
772
911
  }>>, Schema.toCodecStringTree<Schema.Struct<{
773
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
912
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
774
913
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
914
+ readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"email">, Schema.Null]>>;
915
+ readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>, Schema.Null]>>;
775
916
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
776
917
  readonly items: Schema.$Array<Schema.Struct<{
777
- readonly id: Schema.brand<Schema.String, "UnsubscribeGroupMemberId">;
778
918
  readonly contactId: Schema.brand<Schema.String, "ContactId">;
779
- readonly source: Schema.Union<readonly [Schema.Literal<"link">, Schema.Literal<"api">, Schema.Literal<"manual">, Schema.Literal<"complaint">]>;
780
- readonly unsubscribedAt: Schema.String;
919
+ readonly channel: Schema.Literal<"email">;
920
+ readonly status: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>;
921
+ readonly source: Schema.String;
922
+ readonly subscribedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
923
+ readonly unsubscribedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
781
924
  readonly createdAt: Schema.String;
925
+ readonly updatedAt: Schema.String;
782
926
  }>>;
783
927
  readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
784
928
  }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
@@ -861,8 +1005,8 @@ declare const UnsubscribeGroupsGroup_base: HttpApiGroup.HttpApiGroup<"Unsubscrib
861
1005
  readonly _tag: Schema.tag<"ValidationError">;
862
1006
  readonly message: Schema.String;
863
1007
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
864
- }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"unsubscribeRemove", "DELETE", "/v1/unsubscribe-groups/:id", Schema.toCodecStringTree<Schema.Struct<{
865
- readonly id: Schema.brand<Schema.String, "UnsubscribeId">;
1008
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"topicsRemove", "DELETE", "/v1/topics/:id", Schema.toCodecStringTree<Schema.Struct<{
1009
+ readonly id: Schema.brand<Schema.String, "TopicId">;
866
1010
  }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
867
1011
  readonly success: Schema.Boolean;
868
1012
  }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
@@ -965,18 +1109,26 @@ declare const UnsubscribeGroupsGroup_base: HttpApiGroup.HttpApiGroup<"Unsubscrib
965
1109
  readonly _tag: Schema.tag<"ValidationError">;
966
1110
  readonly message: Schema.String;
967
1111
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
968
- }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"unsubscribeRemoveMembers", "DELETE", "/v1/unsubscribe-groups/:id/members", Schema.toCodecStringTree<Schema.Struct<{
969
- readonly id: Schema.brand<Schema.String, "UnsubscribeId">;
970
- }>>, never, Schema.toCodecJson<Schema.Struct<{
971
- readonly members: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
972
- readonly contactId: Schema.brand<Schema.String, "ContactId">;
973
- }>, Schema.Struct<{
974
- readonly email: Schema.String;
975
- }>, Schema.Struct<{
976
- readonly phone: Schema.String;
977
- }>]>>;
978
- }>>, never, Schema.toCodecJson<Schema.Struct<{
979
- readonly removed: Schema.Finite;
1112
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"topicsSetDefault", "POST", "/v1/topics/:id/default", Schema.toCodecStringTree<Schema.Struct<{
1113
+ readonly id: Schema.brand<Schema.String, "TopicId">;
1114
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1115
+ readonly id: Schema.brand<Schema.String, "TopicId">;
1116
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1117
+ readonly name: Schema.String;
1118
+ readonly description: Schema.Union<readonly [Schema.String, Schema.Null]>;
1119
+ readonly default: Schema.Union<readonly [Schema.Literal<"opt_out">, Schema.Literal<"opt_in">]>;
1120
+ readonly isDefault: Schema.Boolean;
1121
+ readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
1122
+ readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
1123
+ readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
1124
+ readonly subscriptions: Schema.Struct<{
1125
+ readonly email: Schema.Struct<{
1126
+ readonly subscribed: Schema.Finite;
1127
+ readonly unsubscribed: Schema.Finite;
1128
+ }>;
1129
+ }>;
1130
+ readonly createdAt: Schema.String;
1131
+ readonly updatedAt: Schema.String;
980
1132
  }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
981
1133
  readonly _tag: "ForbiddenError";
982
1134
  readonly message: string;
@@ -1057,18 +1209,34 @@ declare const UnsubscribeGroupsGroup_base: HttpApiGroup.HttpApiGroup<"Unsubscrib
1057
1209
  readonly _tag: Schema.tag<"ValidationError">;
1058
1210
  readonly message: Schema.String;
1059
1211
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1060
- }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"unsubscribeSetDefault", "POST", "/v1/unsubscribe-groups/:id/default", Schema.toCodecStringTree<Schema.Struct<{
1061
- readonly id: Schema.brand<Schema.String, "UnsubscribeId">;
1062
- }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1063
- readonly id: Schema.brand<Schema.String, "UnsubscribeId">;
1064
- readonly organizationId: Schema.String;
1065
- readonly name: Schema.String;
1066
- readonly description: Schema.Union<readonly [Schema.String, Schema.Null]>;
1067
- readonly isDefault: Schema.Boolean;
1068
- readonly memberCount: Schema.Finite;
1069
- readonly createdAt: Schema.String;
1070
- readonly updatedAt: Schema.String;
1071
- }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
1212
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"topicsSetSubscriptions", "POST", "/v1/topics/:id/subscriptions", Schema.toCodecStringTree<Schema.Struct<{
1213
+ readonly id: Schema.brand<Schema.String, "TopicId">;
1214
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1215
+ readonly contacts: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
1216
+ readonly contactId: Schema.brand<Schema.String, "ContactId">;
1217
+ }>, Schema.Struct<{
1218
+ readonly email: Schema.String;
1219
+ }>, Schema.Struct<{
1220
+ readonly phone: Schema.String;
1221
+ }>]>>;
1222
+ readonly channel: Schema.Literal<"email">;
1223
+ readonly status: Schema.Union<readonly [Schema.Literal<"subscribed">, Schema.Literal<"unsubscribed">]>;
1224
+ readonly source: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1225
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1226
+ readonly updated: Schema.Finite;
1227
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<BillingProviderError, {
1228
+ readonly _tag: "BillingProviderError";
1229
+ readonly message: string;
1230
+ }, readonly [Schema.Struct<{
1231
+ readonly _tag: Schema.tag<"BillingProviderError">;
1232
+ readonly message: Schema.String;
1233
+ }>], {
1234
+ readonly _tag: "BillingProviderError";
1235
+ readonly message: string;
1236
+ }>, Schema.Struct<{
1237
+ readonly _tag: Schema.tag<"BillingProviderError">;
1238
+ readonly message: Schema.String;
1239
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
1072
1240
  readonly _tag: "ForbiddenError";
1073
1241
  readonly message: string;
1074
1242
  }, readonly [Schema.Struct<{
@@ -1096,6 +1264,30 @@ declare const UnsubscribeGroupsGroup_base: HttpApiGroup.HttpApiGroup<"Unsubscrib
1096
1264
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
1097
1265
  readonly message: Schema.String;
1098
1266
  readonly retryAfterSeconds: Schema.Finite;
1267
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<PaymentRequiredError, {
1268
+ readonly _tag: "PaymentRequiredError";
1269
+ readonly message: string;
1270
+ readonly resource: string;
1271
+ readonly currentUsage: number;
1272
+ readonly limit: number;
1273
+ }, readonly [Schema.Struct<{
1274
+ readonly _tag: Schema.tag<"PaymentRequiredError">;
1275
+ readonly message: Schema.String;
1276
+ readonly resource: Schema.String;
1277
+ readonly currentUsage: Schema.Finite;
1278
+ readonly limit: Schema.Finite;
1279
+ }>], {
1280
+ readonly _tag: "PaymentRequiredError";
1281
+ readonly message: string;
1282
+ readonly resource: string;
1283
+ readonly currentUsage: number;
1284
+ readonly limit: number;
1285
+ }>, Schema.Struct<{
1286
+ readonly _tag: Schema.tag<"PaymentRequiredError">;
1287
+ readonly message: Schema.String;
1288
+ readonly resource: Schema.String;
1289
+ readonly currentUsage: Schema.Finite;
1290
+ readonly limit: Schema.Finite;
1099
1291
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
1100
1292
  readonly _tag: "ResourceNotFoundError";
1101
1293
  readonly resource: string;
@@ -1148,18 +1340,31 @@ declare const UnsubscribeGroupsGroup_base: HttpApiGroup.HttpApiGroup<"Unsubscrib
1148
1340
  readonly _tag: Schema.tag<"ValidationError">;
1149
1341
  readonly message: Schema.String;
1150
1342
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1151
- }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"unsubscribeUpdate", "PATCH", "/v1/unsubscribe-groups/:id", Schema.toCodecStringTree<Schema.Struct<{
1152
- readonly id: Schema.brand<Schema.String, "UnsubscribeId">;
1343
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"topicsUpdate", "PATCH", "/v1/topics/:id", Schema.toCodecStringTree<Schema.Struct<{
1344
+ readonly id: Schema.brand<Schema.String, "TopicId">;
1153
1345
  }>>, never, Schema.toCodecJson<Schema.Struct<{
1154
1346
  readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1155
1347
  readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
1348
+ readonly default: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"opt_out">, Schema.Literal<"opt_in">]>, Schema.Null]>>;
1349
+ readonly defaultSenderId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>, Schema.Null]>>;
1350
+ readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
1351
+ readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>, Schema.Null]>>;
1156
1352
  }>>, never, Schema.toCodecJson<Schema.Struct<{
1157
- readonly id: Schema.brand<Schema.String, "UnsubscribeId">;
1158
- readonly organizationId: Schema.String;
1353
+ readonly id: Schema.brand<Schema.String, "TopicId">;
1354
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
1159
1355
  readonly name: Schema.String;
1160
1356
  readonly description: Schema.Union<readonly [Schema.String, Schema.Null]>;
1357
+ readonly default: Schema.Union<readonly [Schema.Literal<"opt_out">, Schema.Literal<"opt_in">]>;
1161
1358
  readonly isDefault: Schema.Boolean;
1162
- readonly memberCount: Schema.Finite;
1359
+ readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
1360
+ readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
1361
+ readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
1362
+ readonly subscriptions: Schema.Struct<{
1363
+ readonly email: Schema.Struct<{
1364
+ readonly subscribed: Schema.Finite;
1365
+ readonly unsubscribed: Schema.Finite;
1366
+ }>;
1367
+ }>;
1163
1368
  readonly createdAt: Schema.String;
1164
1369
  readonly updatedAt: Schema.String;
1165
1370
  }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
@@ -1243,6 +1448,6 @@ declare const UnsubscribeGroupsGroup_base: HttpApiGroup.HttpApiGroup<"Unsubscrib
1243
1448
  readonly message: Schema.String;
1244
1449
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1245
1450
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>, false>;
1246
- export declare class UnsubscribeGroupsGroup extends UnsubscribeGroupsGroup_base {
1451
+ export declare class TopicsGroup extends TopicsGroup_base {
1247
1452
  }
1248
1453
  export {};