samva 0.34.0 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/client/sdk.gen.d.ts +224 -250
- package/dist/client/sdk.gen.js +84 -210
- package/dist/client/types.gen.d.ts +2894 -401
- package/dist/effect/agents.d.ts +28 -13
- package/dist/effect/agents.js +5 -1
- package/dist/effect/analytics.d.ts +15 -15
- package/dist/effect/api-keys.d.ts +27 -18
- package/dist/effect/campaigns.d.ts +721 -65
- package/dist/effect/categories.d.ts +3 -3
- package/dist/effect/contact-groups.d.ts +15 -15
- package/dist/effect/contacts.d.ts +56 -52
- package/dist/effect/conversations.d.ts +45 -45
- package/dist/effect/email.d.ts +82 -82
- package/dist/effect/errors.d.ts +1 -1
- package/dist/effect/errors.js +2 -2
- package/dist/effect/extension-installations.d.ts +11 -11
- package/dist/effect/extensions.d.ts +16 -16
- package/dist/effect/generated/agents.d.ts +1063 -33
- package/dist/effect/generated/agents.js +133 -11
- package/dist/effect/generated/analytics.d.ts +109 -136
- package/dist/effect/generated/analytics.js +65 -36
- package/dist/effect/generated/api-keys.d.ts +240 -19
- package/dist/effect/generated/api-keys.js +24 -8
- package/dist/effect/generated/attachments.d.ts +89 -1
- package/dist/effect/generated/attachments.js +10 -2
- package/dist/effect/generated/brands.d.ts +133 -1
- package/dist/effect/generated/brands.js +22 -10
- package/dist/effect/generated/campaigns.d.ts +1442 -140
- package/dist/effect/generated/campaigns.js +82 -20
- package/dist/effect/generated/contact-events.d.ts +26 -4
- package/dist/effect/generated/contact-events.js +5 -3
- package/dist/effect/generated/contact-groups.d.ts +233 -13
- package/dist/effect/generated/contact-groups.js +33 -17
- package/dist/effect/generated/contacts.d.ts +634 -96
- package/dist/effect/generated/contacts.js +82 -20
- package/dist/effect/generated/conversations.d.ts +398 -106
- package/dist/effect/generated/conversations.js +96 -22
- package/dist/effect/generated/custom-fields.d.ts +89 -1
- package/dist/effect/generated/custom-fields.js +11 -3
- package/dist/effect/generated/email.d.ts +1447 -83
- package/dist/effect/generated/email.js +167 -43
- package/dist/effect/generated/events.d.ts +51 -7
- package/dist/effect/generated/events.js +9 -5
- package/dist/effect/generated/extension-installations.d.ts +208 -10
- package/dist/effect/generated/extension-installations.js +26 -8
- package/dist/effect/generated/extensions.d.ts +123 -13
- package/dist/effect/generated/extensions.js +20 -10
- package/dist/effect/generated/feedback.d.ts +23 -1
- package/dist/effect/generated/feedback.js +6 -4
- package/dist/effect/generated/journeys.d.ts +684 -16
- package/dist/effect/generated/journeys.js +37 -9
- package/dist/effect/generated/mailboxes.d.ts +3085 -627
- package/dist/effect/generated/mailboxes.js +340 -141
- package/dist/effect/generated/media.d.ts +125 -15
- package/dist/effect/generated/media.js +15 -2
- package/dist/effect/generated/messages.d.ts +2036 -117
- package/dist/effect/generated/messages.js +286 -54
- package/dist/effect/generated/namespaces.d.ts +209 -25
- package/dist/effect/generated/namespaces.js +27 -9
- package/dist/effect/generated/newsletter-domains.d.ts +98 -12
- package/dist/effect/generated/newsletter-domains.js +20 -13
- package/dist/effect/generated/newsletter-issues.d.ts +354 -19
- package/dist/effect/generated/newsletter-issues.js +162 -98
- package/dist/effect/generated/newsletters.d.ts +123 -13
- package/dist/effect/generated/newsletters.js +19 -9
- package/dist/effect/generated/operations.d.ts +76 -10
- package/dist/effect/generated/operations.js +12 -6
- package/dist/effect/generated/organizations.d.ts +287 -7
- package/dist/effect/generated/organizations.js +33 -5
- package/dist/effect/generated/scheduled-messages.d.ts +4427 -99
- package/dist/effect/generated/scheduled-messages.js +71 -12
- package/dist/effect/generated/shared.d.ts +2213 -190
- package/dist/effect/generated/shared.js +527 -76
- package/dist/effect/generated/subscriptions.d.ts +23 -1
- package/dist/effect/generated/subscriptions.js +6 -4
- package/dist/effect/generated/templates.d.ts +1718 -136
- package/dist/effect/generated/templates.js +421 -226
- package/dist/effect/generated/topic-forms.d.ts +111 -1
- package/dist/effect/generated/topic-forms.js +23 -13
- package/dist/effect/generated/topics.d.ts +353 -43
- package/dist/effect/generated/topics.js +67 -19
- package/dist/effect/generated/webhooks.d.ts +296 -38
- package/dist/effect/generated/webhooks.js +58 -16
- package/dist/effect/generated/whoami.d.ts +35 -1
- package/dist/effect/generated/whoami.js +4 -2
- package/dist/effect/generated-metadata.d.ts +20 -0
- package/dist/effect/generated-metadata.js +10 -0
- package/dist/effect/index.js +2 -2
- package/dist/effect/internal/client.js +1 -1
- package/dist/effect/internal/email-sender.d.ts +1 -1
- package/dist/effect/internal/send.d.ts +1 -1
- package/dist/effect/journeys.d.ts +105 -19
- package/dist/effect/mailboxes.d.ts +405 -174
- package/dist/effect/media.d.ts +1 -1
- package/dist/effect/messages.d.ts +40 -40
- package/dist/effect/namespaces.d.ts +15 -15
- package/dist/effect/newsletter-domains.d.ts +5 -5
- package/dist/effect/newsletters.d.ts +1 -1
- package/dist/effect/operations.d.ts +11 -11
- package/dist/effect/organizations.d.ts +2 -2
- package/dist/effect/scheduled-messages.d.ts +863 -8
- package/dist/effect/templates.d.ts +37 -37
- package/dist/effect/topics.d.ts +21 -21
- package/dist/effect/webhooks.d.ts +22 -22
- package/dist/index.js +2 -2
- package/dist/normalize.js +13 -1
- package/dist/package.js +1 -1
- package/dist/promises/client.d.ts +1 -1
- package/dist/promises/client.js +2 -2
- package/dist/promises/errors.gen.d.ts +22 -2
- package/dist/promises/errors.gen.js +60 -2
- package/dist/promises/index.js +2 -2
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +9 -0
- package/dist/service-map.js +5 -0
- package/package.json +9 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
|
-
import { ApiKeySecurityMiddleware, ConflictError,
|
|
3
|
+
import { ApiKeySecurityMiddleware, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, NamespaceId, NamespaceMetadata, NamespaceResourceType, ResourceNotFoundError, SuccessResponse, UnauthorizedError, ValidationError } from "./shared";
|
|
4
4
|
export type NamespaceSummary = {
|
|
5
5
|
readonly id: NamespaceId;
|
|
6
6
|
readonly name: string;
|
|
@@ -16,6 +16,8 @@ export type NamespaceUsage = {
|
|
|
16
16
|
readonly periodStart: string;
|
|
17
17
|
readonly periodEnd: string;
|
|
18
18
|
readonly emailCount: number;
|
|
19
|
+
readonly smsCount: number;
|
|
20
|
+
readonly whatsappCount: number;
|
|
19
21
|
readonly totalMessages: number;
|
|
20
22
|
};
|
|
21
23
|
export declare const NamespaceUsage: Schema.Struct<{
|
|
@@ -23,6 +25,8 @@ export declare const NamespaceUsage: Schema.Struct<{
|
|
|
23
25
|
readonly periodStart: Schema.String;
|
|
24
26
|
readonly periodEnd: Schema.String;
|
|
25
27
|
readonly emailCount: Schema.Finite;
|
|
28
|
+
readonly smsCount: Schema.Finite;
|
|
29
|
+
readonly whatsappCount: Schema.Finite;
|
|
26
30
|
readonly totalMessages: Schema.Finite;
|
|
27
31
|
}>;
|
|
28
32
|
export type Namespace = {
|
|
@@ -45,7 +49,7 @@ export type NamespaceResource = {
|
|
|
45
49
|
readonly namespaceId: NamespaceId | null;
|
|
46
50
|
};
|
|
47
51
|
export declare const NamespaceResource: Schema.Struct<{
|
|
48
|
-
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
52
|
+
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"whatsappNumber">, Schema.Literal<"smsNumber">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
49
53
|
readonly id: Schema.String;
|
|
50
54
|
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
51
55
|
}>;
|
|
@@ -63,15 +67,15 @@ export declare const NamespacePage: Schema.Struct<{
|
|
|
63
67
|
}>;
|
|
64
68
|
export type NamespacesListQuery = {
|
|
65
69
|
readonly limit?: number | null;
|
|
66
|
-
readonly cursor?:
|
|
67
|
-
readonly after?: string
|
|
68
|
-
readonly before?: string
|
|
70
|
+
readonly cursor?: string;
|
|
71
|
+
readonly after?: string;
|
|
72
|
+
readonly before?: string;
|
|
69
73
|
};
|
|
70
74
|
export declare const NamespacesListQuery: Schema.Struct<{
|
|
71
75
|
readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
72
|
-
readonly cursor: Schema.optionalKey<Schema.
|
|
73
|
-
readonly after: Schema.optionalKey<Schema.
|
|
74
|
-
readonly before: Schema.optionalKey<Schema.
|
|
76
|
+
readonly cursor: Schema.optionalKey<Schema.String>;
|
|
77
|
+
readonly after: Schema.optionalKey<Schema.String>;
|
|
78
|
+
readonly before: Schema.optionalKey<Schema.String>;
|
|
75
79
|
}>;
|
|
76
80
|
export type NamespacesList200 = NamespacePage;
|
|
77
81
|
export declare const NamespacesList200: Schema.Struct<{
|
|
@@ -82,6 +86,8 @@ export declare const NamespacesList200: Schema.Struct<{
|
|
|
82
86
|
}>>;
|
|
83
87
|
readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
84
88
|
}>;
|
|
89
|
+
export type NamespacesList400 = MalformedRequestError;
|
|
90
|
+
export declare const NamespacesList400: typeof MalformedRequestError;
|
|
85
91
|
export type NamespacesList401 = UnauthorizedError;
|
|
86
92
|
export declare const NamespacesList401: typeof UnauthorizedError;
|
|
87
93
|
export type NamespacesList403 = ForbiddenError;
|
|
@@ -108,6 +114,8 @@ export declare const NamespacesCreate201: Schema.Struct<{
|
|
|
108
114
|
readonly metadata: Schema.$Record<Schema.String, Schema.String>;
|
|
109
115
|
readonly updatedAt: Schema.String;
|
|
110
116
|
}>;
|
|
117
|
+
export type NamespacesCreate400 = MalformedRequestError;
|
|
118
|
+
export declare const NamespacesCreate400: typeof MalformedRequestError;
|
|
111
119
|
export type NamespacesCreate401 = UnauthorizedError;
|
|
112
120
|
export declare const NamespacesCreate401: typeof UnauthorizedError;
|
|
113
121
|
export type NamespacesCreate403 = ForbiddenError;
|
|
@@ -134,6 +142,8 @@ export declare const NamespacesGet200: Schema.Struct<{
|
|
|
134
142
|
readonly metadata: Schema.$Record<Schema.String, Schema.String>;
|
|
135
143
|
readonly updatedAt: Schema.String;
|
|
136
144
|
}>;
|
|
145
|
+
export type NamespacesGet400 = MalformedRequestError;
|
|
146
|
+
export declare const NamespacesGet400: typeof MalformedRequestError;
|
|
137
147
|
export type NamespacesGet401 = UnauthorizedError;
|
|
138
148
|
export declare const NamespacesGet401: typeof UnauthorizedError;
|
|
139
149
|
export type NamespacesGet403 = ForbiddenError;
|
|
@@ -156,6 +166,8 @@ export type NamespacesRemove200 = SuccessResponse;
|
|
|
156
166
|
export declare const NamespacesRemove200: Schema.Struct<{
|
|
157
167
|
readonly success: Schema.Boolean;
|
|
158
168
|
}>;
|
|
169
|
+
export type NamespacesRemove400 = MalformedRequestError;
|
|
170
|
+
export declare const NamespacesRemove400: typeof MalformedRequestError;
|
|
159
171
|
export type NamespacesRemove401 = UnauthorizedError;
|
|
160
172
|
export declare const NamespacesRemove401: typeof UnauthorizedError;
|
|
161
173
|
export type NamespacesRemove403 = ForbiddenError;
|
|
@@ -194,6 +206,8 @@ export declare const NamespacesUpdate200: Schema.Struct<{
|
|
|
194
206
|
readonly metadata: Schema.$Record<Schema.String, Schema.String>;
|
|
195
207
|
readonly updatedAt: Schema.String;
|
|
196
208
|
}>;
|
|
209
|
+
export type NamespacesUpdate400 = MalformedRequestError;
|
|
210
|
+
export declare const NamespacesUpdate400: typeof MalformedRequestError;
|
|
197
211
|
export type NamespacesUpdate401 = UnauthorizedError;
|
|
198
212
|
export declare const NamespacesUpdate401: typeof UnauthorizedError;
|
|
199
213
|
export type NamespacesUpdate403 = ForbiddenError;
|
|
@@ -219,15 +233,17 @@ export type NamespacesAssignResourceRequestJson = {
|
|
|
219
233
|
readonly resourceId: string;
|
|
220
234
|
};
|
|
221
235
|
export declare const NamespacesAssignResourceRequestJson: Schema.Struct<{
|
|
222
|
-
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
236
|
+
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"whatsappNumber">, Schema.Literal<"smsNumber">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
223
237
|
readonly resourceId: Schema.String;
|
|
224
238
|
}>;
|
|
225
239
|
export type NamespacesAssignResource200 = NamespaceResource;
|
|
226
240
|
export declare const NamespacesAssignResource200: Schema.Struct<{
|
|
227
|
-
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
241
|
+
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"whatsappNumber">, Schema.Literal<"smsNumber">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
228
242
|
readonly id: Schema.String;
|
|
229
243
|
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
230
244
|
}>;
|
|
245
|
+
export type NamespacesAssignResource400 = MalformedRequestError;
|
|
246
|
+
export declare const NamespacesAssignResource400: typeof MalformedRequestError;
|
|
231
247
|
export type NamespacesAssignResource401 = UnauthorizedError;
|
|
232
248
|
export declare const NamespacesAssignResource401: typeof UnauthorizedError;
|
|
233
249
|
export type NamespacesAssignResource403 = ForbiddenError;
|
|
@@ -249,15 +265,17 @@ export type NamespacesRemoveResourcePathParams = {
|
|
|
249
265
|
};
|
|
250
266
|
export declare const NamespacesRemoveResourcePathParams: Schema.Struct<{
|
|
251
267
|
readonly id: Schema.brand<Schema.String, "NamespaceId">;
|
|
252
|
-
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
268
|
+
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"whatsappNumber">, Schema.Literal<"smsNumber">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
253
269
|
readonly resourceId: Schema.String;
|
|
254
270
|
}>;
|
|
255
271
|
export type NamespacesRemoveResource200 = NamespaceResource;
|
|
256
272
|
export declare const NamespacesRemoveResource200: Schema.Struct<{
|
|
257
|
-
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
273
|
+
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"whatsappNumber">, Schema.Literal<"smsNumber">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
258
274
|
readonly id: Schema.String;
|
|
259
275
|
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
260
276
|
}>;
|
|
277
|
+
export type NamespacesRemoveResource400 = MalformedRequestError;
|
|
278
|
+
export declare const NamespacesRemoveResource400: typeof MalformedRequestError;
|
|
261
279
|
export type NamespacesRemoveResource401 = UnauthorizedError;
|
|
262
280
|
export declare const NamespacesRemoveResource401: typeof UnauthorizedError;
|
|
263
281
|
export type NamespacesRemoveResource403 = ForbiddenError;
|
|
@@ -279,12 +297,12 @@ export declare const NamespacesGetUsagePathParams: Schema.Struct<{
|
|
|
279
297
|
readonly id: Schema.brand<Schema.String, "NamespaceId">;
|
|
280
298
|
}>;
|
|
281
299
|
export type NamespacesGetUsageQuery = {
|
|
282
|
-
readonly after?: string
|
|
283
|
-
readonly before?: string
|
|
300
|
+
readonly after?: string;
|
|
301
|
+
readonly before?: string;
|
|
284
302
|
};
|
|
285
303
|
export declare const NamespacesGetUsageQuery: Schema.Struct<{
|
|
286
|
-
readonly after: Schema.optionalKey<Schema.
|
|
287
|
-
readonly before: Schema.optionalKey<Schema.
|
|
304
|
+
readonly after: Schema.optionalKey<Schema.String>;
|
|
305
|
+
readonly before: Schema.optionalKey<Schema.String>;
|
|
288
306
|
}>;
|
|
289
307
|
export type NamespacesGetUsage200 = NamespaceUsage;
|
|
290
308
|
export declare const NamespacesGetUsage200: Schema.Struct<{
|
|
@@ -292,8 +310,12 @@ export declare const NamespacesGetUsage200: Schema.Struct<{
|
|
|
292
310
|
readonly periodStart: Schema.String;
|
|
293
311
|
readonly periodEnd: Schema.String;
|
|
294
312
|
readonly emailCount: Schema.Finite;
|
|
313
|
+
readonly smsCount: Schema.Finite;
|
|
314
|
+
readonly whatsappCount: Schema.Finite;
|
|
295
315
|
readonly totalMessages: Schema.Finite;
|
|
296
316
|
}>;
|
|
317
|
+
export type NamespacesGetUsage400 = MalformedRequestError;
|
|
318
|
+
export declare const NamespacesGetUsage400: typeof MalformedRequestError;
|
|
297
319
|
export type NamespacesGetUsage401 = UnauthorizedError;
|
|
298
320
|
export declare const NamespacesGetUsage401: typeof UnauthorizedError;
|
|
299
321
|
export type NamespacesGetUsage403 = ForbiddenError;
|
|
@@ -309,10 +331,10 @@ export declare const NamespacesGetUsage504: typeof GatewayTimeoutError;
|
|
|
309
331
|
declare const NamespacesGroup_base: HttpApiGroup.HttpApiGroup<"Namespaces", HttpApiEndpoint.HttpApiEndpoint<"namespacesAssignResource", "POST", "/v1/namespaces/:id/resources", Schema.toCodecStringTree<Schema.Struct<{
|
|
310
332
|
readonly id: Schema.brand<Schema.String, "NamespaceId">;
|
|
311
333
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
312
|
-
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
334
|
+
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"whatsappNumber">, Schema.Literal<"smsNumber">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
313
335
|
readonly resourceId: Schema.String;
|
|
314
336
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
315
|
-
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
337
|
+
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"whatsappNumber">, Schema.Literal<"smsNumber">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
316
338
|
readonly id: Schema.String;
|
|
317
339
|
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
318
340
|
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
@@ -363,6 +385,26 @@ declare const NamespacesGroup_base: HttpApiGroup.HttpApiGroup<"Namespaces", Http
|
|
|
363
385
|
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
364
386
|
readonly message: Schema.String;
|
|
365
387
|
readonly retryAfterSeconds: Schema.Finite;
|
|
388
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
|
|
389
|
+
readonly _tag: "MalformedRequestError";
|
|
390
|
+
readonly message: string;
|
|
391
|
+
readonly fields: {
|
|
392
|
+
readonly [x: string]: readonly string[];
|
|
393
|
+
};
|
|
394
|
+
}, readonly [Schema.Struct<{
|
|
395
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
396
|
+
readonly message: Schema.String;
|
|
397
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
398
|
+
}>], {
|
|
399
|
+
readonly _tag: "MalformedRequestError";
|
|
400
|
+
readonly message: string;
|
|
401
|
+
readonly fields: {
|
|
402
|
+
readonly [x: string]: readonly string[];
|
|
403
|
+
};
|
|
404
|
+
}>, Schema.Struct<{
|
|
405
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
406
|
+
readonly message: Schema.String;
|
|
407
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
366
408
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
367
409
|
readonly _tag: "ResourceNotFoundError";
|
|
368
410
|
readonly resource: string;
|
|
@@ -472,6 +514,26 @@ declare const NamespacesGroup_base: HttpApiGroup.HttpApiGroup<"Namespaces", Http
|
|
|
472
514
|
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
473
515
|
readonly message: Schema.String;
|
|
474
516
|
readonly retryAfterSeconds: Schema.Finite;
|
|
517
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
|
|
518
|
+
readonly _tag: "MalformedRequestError";
|
|
519
|
+
readonly message: string;
|
|
520
|
+
readonly fields: {
|
|
521
|
+
readonly [x: string]: readonly string[];
|
|
522
|
+
};
|
|
523
|
+
}, readonly [Schema.Struct<{
|
|
524
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
525
|
+
readonly message: Schema.String;
|
|
526
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
527
|
+
}>], {
|
|
528
|
+
readonly _tag: "MalformedRequestError";
|
|
529
|
+
readonly message: string;
|
|
530
|
+
readonly fields: {
|
|
531
|
+
readonly [x: string]: readonly string[];
|
|
532
|
+
};
|
|
533
|
+
}>, Schema.Struct<{
|
|
534
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
535
|
+
readonly message: Schema.String;
|
|
536
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
475
537
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
476
538
|
readonly _tag: "UnauthorizedError";
|
|
477
539
|
readonly message: string;
|
|
@@ -540,6 +602,26 @@ declare const NamespacesGroup_base: HttpApiGroup.HttpApiGroup<"Namespaces", Http
|
|
|
540
602
|
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
541
603
|
readonly message: Schema.String;
|
|
542
604
|
readonly retryAfterSeconds: Schema.Finite;
|
|
605
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
|
|
606
|
+
readonly _tag: "MalformedRequestError";
|
|
607
|
+
readonly message: string;
|
|
608
|
+
readonly fields: {
|
|
609
|
+
readonly [x: string]: readonly string[];
|
|
610
|
+
};
|
|
611
|
+
}, readonly [Schema.Struct<{
|
|
612
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
613
|
+
readonly message: Schema.String;
|
|
614
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
615
|
+
}>], {
|
|
616
|
+
readonly _tag: "MalformedRequestError";
|
|
617
|
+
readonly message: string;
|
|
618
|
+
readonly fields: {
|
|
619
|
+
readonly [x: string]: readonly string[];
|
|
620
|
+
};
|
|
621
|
+
}>, Schema.Struct<{
|
|
622
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
623
|
+
readonly message: Schema.String;
|
|
624
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
543
625
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
544
626
|
readonly _tag: "ResourceNotFoundError";
|
|
545
627
|
readonly resource: string;
|
|
@@ -595,13 +677,15 @@ declare const NamespacesGroup_base: HttpApiGroup.HttpApiGroup<"Namespaces", Http
|
|
|
595
677
|
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"namespacesGetUsage", "GET", "/v1/namespaces/:id/usage", Schema.toCodecStringTree<Schema.Struct<{
|
|
596
678
|
readonly id: Schema.brand<Schema.String, "NamespaceId">;
|
|
597
679
|
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
598
|
-
readonly after: Schema.optionalKey<Schema.
|
|
599
|
-
readonly before: Schema.optionalKey<Schema.
|
|
680
|
+
readonly after: Schema.optionalKey<Schema.String>;
|
|
681
|
+
readonly before: Schema.optionalKey<Schema.String>;
|
|
600
682
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
601
683
|
readonly namespaceId: Schema.brand<Schema.String, "NamespaceId">;
|
|
602
684
|
readonly periodStart: Schema.String;
|
|
603
685
|
readonly periodEnd: Schema.String;
|
|
604
686
|
readonly emailCount: Schema.Finite;
|
|
687
|
+
readonly smsCount: Schema.Finite;
|
|
688
|
+
readonly whatsappCount: Schema.Finite;
|
|
605
689
|
readonly totalMessages: Schema.Finite;
|
|
606
690
|
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
607
691
|
readonly _tag: "ForbiddenError";
|
|
@@ -631,6 +715,26 @@ declare const NamespacesGroup_base: HttpApiGroup.HttpApiGroup<"Namespaces", Http
|
|
|
631
715
|
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
632
716
|
readonly message: Schema.String;
|
|
633
717
|
readonly retryAfterSeconds: Schema.Finite;
|
|
718
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
|
|
719
|
+
readonly _tag: "MalformedRequestError";
|
|
720
|
+
readonly message: string;
|
|
721
|
+
readonly fields: {
|
|
722
|
+
readonly [x: string]: readonly string[];
|
|
723
|
+
};
|
|
724
|
+
}, readonly [Schema.Struct<{
|
|
725
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
726
|
+
readonly message: Schema.String;
|
|
727
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
728
|
+
}>], {
|
|
729
|
+
readonly _tag: "MalformedRequestError";
|
|
730
|
+
readonly message: string;
|
|
731
|
+
readonly fields: {
|
|
732
|
+
readonly [x: string]: readonly string[];
|
|
733
|
+
};
|
|
734
|
+
}>, Schema.Struct<{
|
|
735
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
736
|
+
readonly message: Schema.String;
|
|
737
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
634
738
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
635
739
|
readonly _tag: "ResourceNotFoundError";
|
|
636
740
|
readonly resource: string;
|
|
@@ -685,9 +789,9 @@ declare const NamespacesGroup_base: HttpApiGroup.HttpApiGroup<"Namespaces", Http
|
|
|
685
789
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
686
790
|
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"namespacesList", "GET", "/v1/namespaces", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
687
791
|
readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
688
|
-
readonly cursor: Schema.optionalKey<Schema.
|
|
689
|
-
readonly after: Schema.optionalKey<Schema.
|
|
690
|
-
readonly before: Schema.optionalKey<Schema.
|
|
792
|
+
readonly cursor: Schema.optionalKey<Schema.String>;
|
|
793
|
+
readonly after: Schema.optionalKey<Schema.String>;
|
|
794
|
+
readonly before: Schema.optionalKey<Schema.String>;
|
|
691
795
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
692
796
|
readonly items: Schema.$Array<Schema.Struct<{
|
|
693
797
|
readonly id: Schema.brand<Schema.String, "NamespaceId">;
|
|
@@ -723,6 +827,26 @@ declare const NamespacesGroup_base: HttpApiGroup.HttpApiGroup<"Namespaces", Http
|
|
|
723
827
|
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
724
828
|
readonly message: Schema.String;
|
|
725
829
|
readonly retryAfterSeconds: Schema.Finite;
|
|
830
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
|
|
831
|
+
readonly _tag: "MalformedRequestError";
|
|
832
|
+
readonly message: string;
|
|
833
|
+
readonly fields: {
|
|
834
|
+
readonly [x: string]: readonly string[];
|
|
835
|
+
};
|
|
836
|
+
}, readonly [Schema.Struct<{
|
|
837
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
838
|
+
readonly message: Schema.String;
|
|
839
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
840
|
+
}>], {
|
|
841
|
+
readonly _tag: "MalformedRequestError";
|
|
842
|
+
readonly message: string;
|
|
843
|
+
readonly fields: {
|
|
844
|
+
readonly [x: string]: readonly string[];
|
|
845
|
+
};
|
|
846
|
+
}>, Schema.Struct<{
|
|
847
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
848
|
+
readonly message: Schema.String;
|
|
849
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
726
850
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
727
851
|
readonly _tag: "UnauthorizedError";
|
|
728
852
|
readonly message: string;
|
|
@@ -807,6 +931,26 @@ declare const NamespacesGroup_base: HttpApiGroup.HttpApiGroup<"Namespaces", Http
|
|
|
807
931
|
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
808
932
|
readonly message: Schema.String;
|
|
809
933
|
readonly retryAfterSeconds: Schema.Finite;
|
|
934
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
|
|
935
|
+
readonly _tag: "MalformedRequestError";
|
|
936
|
+
readonly message: string;
|
|
937
|
+
readonly fields: {
|
|
938
|
+
readonly [x: string]: readonly string[];
|
|
939
|
+
};
|
|
940
|
+
}, readonly [Schema.Struct<{
|
|
941
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
942
|
+
readonly message: Schema.String;
|
|
943
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
944
|
+
}>], {
|
|
945
|
+
readonly _tag: "MalformedRequestError";
|
|
946
|
+
readonly message: string;
|
|
947
|
+
readonly fields: {
|
|
948
|
+
readonly [x: string]: readonly string[];
|
|
949
|
+
};
|
|
950
|
+
}>, Schema.Struct<{
|
|
951
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
952
|
+
readonly message: Schema.String;
|
|
953
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
810
954
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
811
955
|
readonly _tag: "ResourceNotFoundError";
|
|
812
956
|
readonly resource: string;
|
|
@@ -861,10 +1005,10 @@ declare const NamespacesGroup_base: HttpApiGroup.HttpApiGroup<"Namespaces", Http
|
|
|
861
1005
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
862
1006
|
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"namespacesRemoveResource", "DELETE", "/v1/namespaces/:id/resources/:type/:resourceId", Schema.toCodecStringTree<Schema.Struct<{
|
|
863
1007
|
readonly id: Schema.brand<Schema.String, "NamespaceId">;
|
|
864
|
-
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
1008
|
+
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"whatsappNumber">, Schema.Literal<"smsNumber">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
865
1009
|
readonly resourceId: Schema.String;
|
|
866
1010
|
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
867
|
-
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
1011
|
+
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"whatsappNumber">, Schema.Literal<"smsNumber">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
868
1012
|
readonly id: Schema.String;
|
|
869
1013
|
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
870
1014
|
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
@@ -915,6 +1059,26 @@ declare const NamespacesGroup_base: HttpApiGroup.HttpApiGroup<"Namespaces", Http
|
|
|
915
1059
|
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
916
1060
|
readonly message: Schema.String;
|
|
917
1061
|
readonly retryAfterSeconds: Schema.Finite;
|
|
1062
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
|
|
1063
|
+
readonly _tag: "MalformedRequestError";
|
|
1064
|
+
readonly message: string;
|
|
1065
|
+
readonly fields: {
|
|
1066
|
+
readonly [x: string]: readonly string[];
|
|
1067
|
+
};
|
|
1068
|
+
}, readonly [Schema.Struct<{
|
|
1069
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
1070
|
+
readonly message: Schema.String;
|
|
1071
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
1072
|
+
}>], {
|
|
1073
|
+
readonly _tag: "MalformedRequestError";
|
|
1074
|
+
readonly message: string;
|
|
1075
|
+
readonly fields: {
|
|
1076
|
+
readonly [x: string]: readonly string[];
|
|
1077
|
+
};
|
|
1078
|
+
}>, Schema.Struct<{
|
|
1079
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
1080
|
+
readonly message: Schema.String;
|
|
1081
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
918
1082
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
919
1083
|
readonly _tag: "ResourceNotFoundError";
|
|
920
1084
|
readonly resource: string;
|
|
@@ -1026,6 +1190,26 @@ declare const NamespacesGroup_base: HttpApiGroup.HttpApiGroup<"Namespaces", Http
|
|
|
1026
1190
|
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1027
1191
|
readonly message: Schema.String;
|
|
1028
1192
|
readonly retryAfterSeconds: Schema.Finite;
|
|
1193
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
|
|
1194
|
+
readonly _tag: "MalformedRequestError";
|
|
1195
|
+
readonly message: string;
|
|
1196
|
+
readonly fields: {
|
|
1197
|
+
readonly [x: string]: readonly string[];
|
|
1198
|
+
};
|
|
1199
|
+
}, readonly [Schema.Struct<{
|
|
1200
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
1201
|
+
readonly message: Schema.String;
|
|
1202
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
1203
|
+
}>], {
|
|
1204
|
+
readonly _tag: "MalformedRequestError";
|
|
1205
|
+
readonly message: string;
|
|
1206
|
+
readonly fields: {
|
|
1207
|
+
readonly [x: string]: readonly string[];
|
|
1208
|
+
};
|
|
1209
|
+
}>, Schema.Struct<{
|
|
1210
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
1211
|
+
readonly message: Schema.String;
|
|
1212
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
1029
1213
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
1030
1214
|
readonly _tag: "ResourceNotFoundError";
|
|
1031
1215
|
readonly resource: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiKeySecurityMiddleware, ConflictError,
|
|
1
|
+
import { ApiKeySecurityMiddleware, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, NamespaceId, NamespaceMetadata, NamespaceResourceType, ResourceNotFoundError, SuccessResponse, UnauthorizedError, ValidationError } from "./shared.js";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
4
|
// src/effect/generated/namespaces.ts
|
|
@@ -12,6 +12,8 @@ const NamespaceUsage = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
12
12
|
periodStart: Schema.String,
|
|
13
13
|
periodEnd: Schema.String,
|
|
14
14
|
emailCount: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
15
|
+
smsCount: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
16
|
+
whatsappCount: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
15
17
|
totalMessages: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
16
18
|
}).annotate({ identifier: "NamespaceUsage" }))();
|
|
17
19
|
const Namespace = /* @__PURE__ */ (() => Schema.Struct({
|
|
@@ -32,21 +34,23 @@ const NamespacePage = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
32
34
|
}).annotate({ identifier: "NamespacePage" }))();
|
|
33
35
|
const NamespacesListQuery = /* @__PURE__ */ (() => Schema.Struct({
|
|
34
36
|
limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
|
|
35
|
-
cursor: Schema.optionalKey(Schema.
|
|
36
|
-
after: Schema.optionalKey(Schema.
|
|
37
|
-
before: Schema.optionalKey(Schema.
|
|
37
|
+
cursor: Schema.optionalKey(Schema.String),
|
|
38
|
+
after: Schema.optionalKey(Schema.String),
|
|
39
|
+
before: Schema.optionalKey(Schema.String)
|
|
38
40
|
}))();
|
|
39
41
|
const NamespacesList200 = NamespacePage;
|
|
42
|
+
const NamespacesList400 = MalformedRequestError;
|
|
40
43
|
const NamespacesList401 = UnauthorizedError;
|
|
41
44
|
const NamespacesList403 = ForbiddenError;
|
|
42
45
|
const NamespacesList422 = ValidationError;
|
|
43
46
|
const NamespacesList500 = InternalError;
|
|
44
47
|
const NamespacesList504 = GatewayTimeoutError;
|
|
45
48
|
const NamespacesCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
46
|
-
name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isPattern(
|
|
49
|
+
name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isPattern(new globalThis.RegExp("^\\S[\\s\\S]*\\S$|^\\S$|^$", "u")).annotate({ expected: "a string matching the RegExp ^\\S[\\s\\S]*\\S$|^\\S$|^$" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })),
|
|
47
50
|
metadata: Schema.optionalKey(Schema.Union([NamespaceMetadata, Schema.Null]))
|
|
48
51
|
}))();
|
|
49
52
|
const NamespacesCreate201 = Namespace;
|
|
53
|
+
const NamespacesCreate400 = MalformedRequestError;
|
|
50
54
|
const NamespacesCreate401 = UnauthorizedError;
|
|
51
55
|
const NamespacesCreate403 = ForbiddenError;
|
|
52
56
|
const NamespacesCreate409 = ConflictError;
|
|
@@ -55,6 +59,7 @@ const NamespacesCreate500 = InternalError;
|
|
|
55
59
|
const NamespacesCreate504 = GatewayTimeoutError;
|
|
56
60
|
const NamespacesGetPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: NamespaceId }))();
|
|
57
61
|
const NamespacesGet200 = Namespace;
|
|
62
|
+
const NamespacesGet400 = MalformedRequestError;
|
|
58
63
|
const NamespacesGet401 = UnauthorizedError;
|
|
59
64
|
const NamespacesGet403 = ForbiddenError;
|
|
60
65
|
const NamespacesGet404 = ResourceNotFoundError;
|
|
@@ -63,6 +68,7 @@ const NamespacesGet500 = InternalError;
|
|
|
63
68
|
const NamespacesGet504 = GatewayTimeoutError;
|
|
64
69
|
const NamespacesRemovePathParams = /* @__PURE__ */ (() => Schema.Struct({ id: NamespaceId }))();
|
|
65
70
|
const NamespacesRemove200 = SuccessResponse;
|
|
71
|
+
const NamespacesRemove400 = MalformedRequestError;
|
|
66
72
|
const NamespacesRemove401 = UnauthorizedError;
|
|
67
73
|
const NamespacesRemove403 = ForbiddenError;
|
|
68
74
|
const NamespacesRemove404 = ResourceNotFoundError;
|
|
@@ -72,10 +78,11 @@ const NamespacesRemove500 = InternalError;
|
|
|
72
78
|
const NamespacesRemove504 = GatewayTimeoutError;
|
|
73
79
|
const NamespacesUpdatePathParams = /* @__PURE__ */ (() => Schema.Struct({ id: NamespaceId }))();
|
|
74
80
|
const NamespacesUpdateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
75
|
-
name: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isPattern(
|
|
81
|
+
name: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isPattern(new globalThis.RegExp("^\\S[\\s\\S]*\\S$|^\\S$|^$", "u")).annotate({ expected: "a string matching the RegExp ^\\S[\\s\\S]*\\S$|^\\S$|^$" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })), Schema.Null])),
|
|
76
82
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Union([Schema.String, Schema.Null])), Schema.Null]))
|
|
77
83
|
}))();
|
|
78
84
|
const NamespacesUpdate200 = Namespace;
|
|
85
|
+
const NamespacesUpdate400 = MalformedRequestError;
|
|
79
86
|
const NamespacesUpdate401 = UnauthorizedError;
|
|
80
87
|
const NamespacesUpdate403 = ForbiddenError;
|
|
81
88
|
const NamespacesUpdate404 = ResourceNotFoundError;
|
|
@@ -89,6 +96,7 @@ const NamespacesAssignResourceRequestJson = /* @__PURE__ */ (() => Schema.Struct
|
|
|
89
96
|
resourceId: Schema.String.annotate({ description: "The resource's id, such as `dom_...` for a domain." })
|
|
90
97
|
}))();
|
|
91
98
|
const NamespacesAssignResource200 = NamespaceResource;
|
|
99
|
+
const NamespacesAssignResource400 = MalformedRequestError;
|
|
92
100
|
const NamespacesAssignResource401 = UnauthorizedError;
|
|
93
101
|
const NamespacesAssignResource403 = ForbiddenError;
|
|
94
102
|
const NamespacesAssignResource404 = ResourceNotFoundError;
|
|
@@ -102,6 +110,7 @@ const NamespacesRemoveResourcePathParams = /* @__PURE__ */ (() => Schema.Struct(
|
|
|
102
110
|
resourceId: Schema.String
|
|
103
111
|
}))();
|
|
104
112
|
const NamespacesRemoveResource200 = NamespaceResource;
|
|
113
|
+
const NamespacesRemoveResource400 = MalformedRequestError;
|
|
105
114
|
const NamespacesRemoveResource401 = UnauthorizedError;
|
|
106
115
|
const NamespacesRemoveResource403 = ForbiddenError;
|
|
107
116
|
const NamespacesRemoveResource404 = ResourceNotFoundError;
|
|
@@ -111,10 +120,11 @@ const NamespacesRemoveResource500 = InternalError;
|
|
|
111
120
|
const NamespacesRemoveResource504 = GatewayTimeoutError;
|
|
112
121
|
const NamespacesGetUsagePathParams = /* @__PURE__ */ (() => Schema.Struct({ id: NamespaceId }))();
|
|
113
122
|
const NamespacesGetUsageQuery = /* @__PURE__ */ (() => Schema.Struct({
|
|
114
|
-
after: Schema.optionalKey(Schema.
|
|
115
|
-
before: Schema.optionalKey(Schema.
|
|
123
|
+
after: Schema.optionalKey(Schema.String),
|
|
124
|
+
before: Schema.optionalKey(Schema.String)
|
|
116
125
|
}))();
|
|
117
126
|
const NamespacesGetUsage200 = NamespaceUsage;
|
|
127
|
+
const NamespacesGetUsage400 = MalformedRequestError;
|
|
118
128
|
const NamespacesGetUsage401 = UnauthorizedError;
|
|
119
129
|
const NamespacesGetUsage403 = ForbiddenError;
|
|
120
130
|
const NamespacesGetUsage404 = ResourceNotFoundError;
|
|
@@ -125,6 +135,7 @@ var NamespacesGroup = class extends HttpApiGroup.make("Namespaces").add(HttpApiE
|
|
|
125
135
|
query: NamespacesListQuery,
|
|
126
136
|
success: NamespacesList200,
|
|
127
137
|
error: [
|
|
138
|
+
NamespacesList400.pipe(HttpApiSchema.status(400)),
|
|
128
139
|
NamespacesList401.pipe(HttpApiSchema.status(401)),
|
|
129
140
|
NamespacesList403.pipe(HttpApiSchema.status(403)),
|
|
130
141
|
NamespacesList422.pipe(HttpApiSchema.status(422)),
|
|
@@ -135,6 +146,7 @@ var NamespacesGroup = class extends HttpApiGroup.make("Namespaces").add(HttpApiE
|
|
|
135
146
|
payload: NamespacesCreateRequestJson,
|
|
136
147
|
success: NamespacesCreate201.pipe(HttpApiSchema.status(201)),
|
|
137
148
|
error: [
|
|
149
|
+
NamespacesCreate400.pipe(HttpApiSchema.status(400)),
|
|
138
150
|
NamespacesCreate401.pipe(HttpApiSchema.status(401)),
|
|
139
151
|
NamespacesCreate403.pipe(HttpApiSchema.status(403)),
|
|
140
152
|
NamespacesCreate409.pipe(HttpApiSchema.status(409)),
|
|
@@ -146,6 +158,7 @@ var NamespacesGroup = class extends HttpApiGroup.make("Namespaces").add(HttpApiE
|
|
|
146
158
|
params: NamespacesGetPathParams,
|
|
147
159
|
success: NamespacesGet200,
|
|
148
160
|
error: [
|
|
161
|
+
NamespacesGet400.pipe(HttpApiSchema.status(400)),
|
|
149
162
|
NamespacesGet401.pipe(HttpApiSchema.status(401)),
|
|
150
163
|
NamespacesGet403.pipe(HttpApiSchema.status(403)),
|
|
151
164
|
NamespacesGet404.pipe(HttpApiSchema.status(404)),
|
|
@@ -157,6 +170,7 @@ var NamespacesGroup = class extends HttpApiGroup.make("Namespaces").add(HttpApiE
|
|
|
157
170
|
params: NamespacesRemovePathParams,
|
|
158
171
|
success: NamespacesRemove200,
|
|
159
172
|
error: [
|
|
173
|
+
NamespacesRemove400.pipe(HttpApiSchema.status(400)),
|
|
160
174
|
NamespacesRemove401.pipe(HttpApiSchema.status(401)),
|
|
161
175
|
NamespacesRemove403.pipe(HttpApiSchema.status(403)),
|
|
162
176
|
NamespacesRemove404.pipe(HttpApiSchema.status(404)),
|
|
@@ -170,6 +184,7 @@ var NamespacesGroup = class extends HttpApiGroup.make("Namespaces").add(HttpApiE
|
|
|
170
184
|
payload: NamespacesUpdateRequestJson,
|
|
171
185
|
success: NamespacesUpdate200,
|
|
172
186
|
error: [
|
|
187
|
+
NamespacesUpdate400.pipe(HttpApiSchema.status(400)),
|
|
173
188
|
NamespacesUpdate401.pipe(HttpApiSchema.status(401)),
|
|
174
189
|
NamespacesUpdate403.pipe(HttpApiSchema.status(403)),
|
|
175
190
|
NamespacesUpdate404.pipe(HttpApiSchema.status(404)),
|
|
@@ -183,6 +198,7 @@ var NamespacesGroup = class extends HttpApiGroup.make("Namespaces").add(HttpApiE
|
|
|
183
198
|
payload: NamespacesAssignResourceRequestJson,
|
|
184
199
|
success: NamespacesAssignResource200,
|
|
185
200
|
error: [
|
|
201
|
+
NamespacesAssignResource400.pipe(HttpApiSchema.status(400)),
|
|
186
202
|
NamespacesAssignResource401.pipe(HttpApiSchema.status(401)),
|
|
187
203
|
NamespacesAssignResource403.pipe(HttpApiSchema.status(403)),
|
|
188
204
|
NamespacesAssignResource404.pipe(HttpApiSchema.status(404)),
|
|
@@ -195,6 +211,7 @@ var NamespacesGroup = class extends HttpApiGroup.make("Namespaces").add(HttpApiE
|
|
|
195
211
|
params: NamespacesRemoveResourcePathParams,
|
|
196
212
|
success: NamespacesRemoveResource200,
|
|
197
213
|
error: [
|
|
214
|
+
NamespacesRemoveResource400.pipe(HttpApiSchema.status(400)),
|
|
198
215
|
NamespacesRemoveResource401.pipe(HttpApiSchema.status(401)),
|
|
199
216
|
NamespacesRemoveResource403.pipe(HttpApiSchema.status(403)),
|
|
200
217
|
NamespacesRemoveResource404.pipe(HttpApiSchema.status(404)),
|
|
@@ -208,6 +225,7 @@ var NamespacesGroup = class extends HttpApiGroup.make("Namespaces").add(HttpApiE
|
|
|
208
225
|
query: NamespacesGetUsageQuery,
|
|
209
226
|
success: NamespacesGetUsage200,
|
|
210
227
|
error: [
|
|
228
|
+
NamespacesGetUsage400.pipe(HttpApiSchema.status(400)),
|
|
211
229
|
NamespacesGetUsage401.pipe(HttpApiSchema.status(401)),
|
|
212
230
|
NamespacesGetUsage403.pipe(HttpApiSchema.status(403)),
|
|
213
231
|
NamespacesGetUsage404.pipe(HttpApiSchema.status(404)),
|
|
@@ -216,6 +234,6 @@ var NamespacesGroup = class extends HttpApiGroup.make("Namespaces").add(HttpApiE
|
|
|
216
234
|
NamespacesGetUsage504.pipe(HttpApiSchema.status(504))
|
|
217
235
|
]
|
|
218
236
|
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "namespaces.getUsage").annotate(OpenApi.Summary, "Get namespace usage").annotate(OpenApi.Description, "Counts the messages the namespace sent and received in the window that count toward usage, by channel, with the same statuses as `GET /v1/organizations/usage`. A message counts toward the namespace it was sent or received in: that of the sender, mailbox, or key it used. The organization is billed for every namespace; read this to charge your own customer.")).annotate(OpenApi.Description, "Sub-tenants that confine domains, senders, mailboxes, contacts, templates, and API keys inside an organization") {};
|
|
219
|
-
export { Namespace, NamespacePage, NamespaceResource, NamespaceSummary, NamespaceUsage, NamespacesAssignResource200, NamespacesAssignResource401, NamespacesAssignResource403, NamespacesAssignResource404, NamespacesAssignResource409, NamespacesAssignResource422, NamespacesAssignResource500, NamespacesAssignResource504, NamespacesAssignResourcePathParams, NamespacesAssignResourceRequestJson, NamespacesCreate201, NamespacesCreate401, NamespacesCreate403, NamespacesCreate409, NamespacesCreate422, NamespacesCreate500, NamespacesCreate504, NamespacesCreateRequestJson, NamespacesGet200, NamespacesGet401, NamespacesGet403, NamespacesGet404, NamespacesGet422, NamespacesGet500, NamespacesGet504, NamespacesGetPathParams, NamespacesGetUsage200, NamespacesGetUsage401, NamespacesGetUsage403, NamespacesGetUsage404, NamespacesGetUsage422, NamespacesGetUsage500, NamespacesGetUsage504, NamespacesGetUsagePathParams, NamespacesGetUsageQuery, NamespacesGroup, NamespacesList200, NamespacesList401, NamespacesList403, NamespacesList422, NamespacesList500, NamespacesList504, NamespacesListQuery, NamespacesRemove200, NamespacesRemove401, NamespacesRemove403, NamespacesRemove404, NamespacesRemove409, NamespacesRemove422, NamespacesRemove500, NamespacesRemove504, NamespacesRemovePathParams, NamespacesRemoveResource200, NamespacesRemoveResource401, NamespacesRemoveResource403, NamespacesRemoveResource404, NamespacesRemoveResource409, NamespacesRemoveResource422, NamespacesRemoveResource500, NamespacesRemoveResource504, NamespacesRemoveResourcePathParams, NamespacesUpdate200, NamespacesUpdate401, NamespacesUpdate403, NamespacesUpdate404, NamespacesUpdate409, NamespacesUpdate422, NamespacesUpdate500, NamespacesUpdate504, NamespacesUpdatePathParams, NamespacesUpdateRequestJson };
|
|
237
|
+
export { Namespace, NamespacePage, NamespaceResource, NamespaceSummary, NamespaceUsage, NamespacesAssignResource200, NamespacesAssignResource400, NamespacesAssignResource401, NamespacesAssignResource403, NamespacesAssignResource404, NamespacesAssignResource409, NamespacesAssignResource422, NamespacesAssignResource500, NamespacesAssignResource504, NamespacesAssignResourcePathParams, NamespacesAssignResourceRequestJson, NamespacesCreate201, NamespacesCreate400, NamespacesCreate401, NamespacesCreate403, NamespacesCreate409, NamespacesCreate422, NamespacesCreate500, NamespacesCreate504, NamespacesCreateRequestJson, NamespacesGet200, NamespacesGet400, NamespacesGet401, NamespacesGet403, NamespacesGet404, NamespacesGet422, NamespacesGet500, NamespacesGet504, NamespacesGetPathParams, NamespacesGetUsage200, NamespacesGetUsage400, NamespacesGetUsage401, NamespacesGetUsage403, NamespacesGetUsage404, NamespacesGetUsage422, NamespacesGetUsage500, NamespacesGetUsage504, NamespacesGetUsagePathParams, NamespacesGetUsageQuery, NamespacesGroup, NamespacesList200, NamespacesList400, NamespacesList401, NamespacesList403, NamespacesList422, NamespacesList500, NamespacesList504, NamespacesListQuery, NamespacesRemove200, NamespacesRemove400, NamespacesRemove401, NamespacesRemove403, NamespacesRemove404, NamespacesRemove409, NamespacesRemove422, NamespacesRemove500, NamespacesRemove504, NamespacesRemovePathParams, NamespacesRemoveResource200, NamespacesRemoveResource400, NamespacesRemoveResource401, NamespacesRemoveResource403, NamespacesRemoveResource404, NamespacesRemoveResource409, NamespacesRemoveResource422, NamespacesRemoveResource500, NamespacesRemoveResource504, NamespacesRemoveResourcePathParams, NamespacesUpdate200, NamespacesUpdate400, NamespacesUpdate401, NamespacesUpdate403, NamespacesUpdate404, NamespacesUpdate409, NamespacesUpdate422, NamespacesUpdate500, NamespacesUpdate504, NamespacesUpdatePathParams, NamespacesUpdateRequestJson };
|
|
220
238
|
|
|
221
239
|
//# sourceMappingURL=namespaces.js.map
|