samva 0.18.0 → 0.20.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 +2 -0
- package/dist/client/sdk.gen.d.ts +94 -36
- package/dist/client/sdk.gen.js +269 -55
- package/dist/client/types.gen.d.ts +497 -106
- package/dist/effect/campaigns.d.ts +35 -3
- package/dist/effect/contact-groups.d.ts +39 -3
- package/dist/effect/contacts.d.ts +240 -17
- package/dist/effect/contacts.js +3 -1
- package/dist/effect/conversations.d.ts +11 -11
- package/dist/effect/email.d.ts +22 -6
- package/dist/effect/errors.d.ts +1 -1
- package/dist/effect/errors.js +2 -2
- package/dist/effect/extension-installations.d.ts +12 -12
- package/dist/effect/extensions.d.ts +3 -3
- package/dist/effect/generated/campaigns.d.ts +73 -4
- package/dist/effect/generated/campaigns.js +18 -1
- package/dist/effect/generated/contact-groups.d.ts +33 -3
- package/dist/effect/generated/contacts.d.ts +608 -55
- package/dist/effect/generated/contacts.js +55 -10
- package/dist/effect/generated/conversations.d.ts +25 -25
- package/dist/effect/generated/conversations.js +1 -1
- package/dist/effect/generated/email.d.ts +162 -1
- package/dist/effect/generated/email.js +31 -11
- package/dist/effect/generated/extension-installations.d.ts +44 -44
- package/dist/effect/generated/extension-installations.js +6 -0
- package/dist/effect/generated/extensions.d.ts +10 -10
- package/dist/effect/generated/extensions.js +2 -0
- package/dist/effect/generated/journeys.d.ts +13 -61
- package/dist/effect/generated/journeys.js +5 -5
- package/dist/effect/generated/mailboxes.d.ts +584 -78
- package/dist/effect/generated/mailboxes.js +65 -24
- package/dist/effect/generated/messages.d.ts +35 -1
- package/dist/effect/generated/messages.js +9 -2
- package/dist/effect/generated/namespaces.d.ts +432 -2
- package/dist/effect/generated/namespaces.js +91 -4
- package/dist/effect/generated/organizations.d.ts +13 -11
- package/dist/effect/generated/organizations.js +7 -3
- package/dist/effect/generated/shared.d.ts +104 -49
- package/dist/effect/generated/shared.js +51 -28
- package/dist/effect/generated/templates.d.ts +44 -1
- package/dist/effect/generated/templates.js +9 -3
- package/dist/effect/generated/unsubscribe-groups.d.ts +173 -78
- package/dist/effect/generated/unsubscribe-groups.js +75 -58
- package/dist/effect/generated/webhooks.d.ts +19 -19
- package/dist/effect/generated/webhooks.js +8 -0
- package/dist/effect/generated-metadata.d.ts +22 -6
- package/dist/effect/generated-metadata.js +334 -329
- package/dist/effect/index.js +2 -2
- package/dist/effect/journeys.d.ts +4 -4
- package/dist/effect/mailboxes.d.ts +144 -12
- package/dist/effect/messages.d.ts +8 -0
- package/dist/effect/namespaces.d.ts +29 -0
- package/dist/effect/namespaces.js +7 -1
- package/dist/effect/organizations.d.ts +4 -4
- package/dist/effect/templates.d.ts +12 -1
- package/dist/effect/unsubscribe-groups.d.ts +29 -18
- package/dist/effect/unsubscribe-groups.js +5 -5
- package/dist/effect/webhooks.d.ts +8 -8
- package/dist/index.js +2 -2
- package/dist/mailbox-events.d.ts +31 -4
- package/dist/mailbox-events.js +39 -11
- package/dist/package.js +1 -1
- package/dist/promises/errors.gen.d.ts +2 -12
- package/dist/promises/errors.gen.js +1 -26
- package/dist/promises/index.d.ts +1 -1
- package/dist/promises/index.js +2 -2
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +24 -4
- package/dist/service-map.js +26 -2
- package/package.json +2 -2
|
@@ -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, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, NamespaceId, NamespaceMetadata, ResourceNotFoundError, SuccessResponse, UnauthorizedError, ValidationError } from "./shared";
|
|
3
|
+
import { ApiKeySecurityMiddleware, ConflictError, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, NamespaceId, NamespaceMetadata, NamespaceResourceType, ResourceNotFoundError, SuccessResponse, UnauthorizedError, ValidationError } from "./shared";
|
|
4
4
|
export type NamespaceSummary = {
|
|
5
5
|
readonly id: NamespaceId;
|
|
6
6
|
readonly name: string;
|
|
@@ -11,6 +11,20 @@ export declare const NamespaceSummary: Schema.Struct<{
|
|
|
11
11
|
readonly name: Schema.String;
|
|
12
12
|
readonly createdAt: Schema.String;
|
|
13
13
|
}>;
|
|
14
|
+
export type NamespaceUsage = {
|
|
15
|
+
readonly namespaceId: NamespaceId;
|
|
16
|
+
readonly periodStart: string;
|
|
17
|
+
readonly periodEnd: string;
|
|
18
|
+
readonly emailCount: number;
|
|
19
|
+
readonly totalMessages: number;
|
|
20
|
+
};
|
|
21
|
+
export declare const NamespaceUsage: Schema.Struct<{
|
|
22
|
+
readonly namespaceId: Schema.brand<Schema.String, "NamespaceId">;
|
|
23
|
+
readonly periodStart: Schema.String;
|
|
24
|
+
readonly periodEnd: Schema.String;
|
|
25
|
+
readonly emailCount: Schema.Finite;
|
|
26
|
+
readonly totalMessages: Schema.Finite;
|
|
27
|
+
}>;
|
|
14
28
|
export type Namespace = {
|
|
15
29
|
readonly id: NamespaceId;
|
|
16
30
|
readonly name: string;
|
|
@@ -25,6 +39,16 @@ export declare const Namespace: Schema.Struct<{
|
|
|
25
39
|
readonly metadata: Schema.$Record<Schema.String, Schema.String>;
|
|
26
40
|
readonly updatedAt: Schema.String;
|
|
27
41
|
}>;
|
|
42
|
+
export type NamespaceResource = {
|
|
43
|
+
readonly type: NamespaceResourceType;
|
|
44
|
+
readonly id: string;
|
|
45
|
+
readonly namespaceId: NamespaceId | null;
|
|
46
|
+
};
|
|
47
|
+
export declare const NamespaceResource: Schema.Struct<{
|
|
48
|
+
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
49
|
+
readonly id: Schema.String;
|
|
50
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
51
|
+
}>;
|
|
28
52
|
export type NamespacePage = {
|
|
29
53
|
readonly items: ReadonlyArray<NamespaceSummary>;
|
|
30
54
|
readonly nextCursor: string | null;
|
|
@@ -184,7 +208,214 @@ export type NamespacesUpdate500 = InternalError;
|
|
|
184
208
|
export declare const NamespacesUpdate500: typeof InternalError;
|
|
185
209
|
export type NamespacesUpdate504 = GatewayTimeoutError;
|
|
186
210
|
export declare const NamespacesUpdate504: typeof GatewayTimeoutError;
|
|
187
|
-
|
|
211
|
+
export type NamespacesAssignResourcePathParams = {
|
|
212
|
+
readonly id: NamespaceId;
|
|
213
|
+
};
|
|
214
|
+
export declare const NamespacesAssignResourcePathParams: Schema.Struct<{
|
|
215
|
+
readonly id: Schema.brand<Schema.String, "NamespaceId">;
|
|
216
|
+
}>;
|
|
217
|
+
export type NamespacesAssignResourceRequestJson = {
|
|
218
|
+
readonly type: NamespaceResourceType;
|
|
219
|
+
readonly resourceId: string;
|
|
220
|
+
};
|
|
221
|
+
export declare const NamespacesAssignResourceRequestJson: Schema.Struct<{
|
|
222
|
+
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
223
|
+
readonly resourceId: Schema.String;
|
|
224
|
+
}>;
|
|
225
|
+
export type NamespacesAssignResource200 = NamespaceResource;
|
|
226
|
+
export declare const NamespacesAssignResource200: Schema.Struct<{
|
|
227
|
+
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
228
|
+
readonly id: Schema.String;
|
|
229
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
230
|
+
}>;
|
|
231
|
+
export type NamespacesAssignResource401 = UnauthorizedError;
|
|
232
|
+
export declare const NamespacesAssignResource401: typeof UnauthorizedError;
|
|
233
|
+
export type NamespacesAssignResource403 = ForbiddenError;
|
|
234
|
+
export declare const NamespacesAssignResource403: typeof ForbiddenError;
|
|
235
|
+
export type NamespacesAssignResource404 = ResourceNotFoundError;
|
|
236
|
+
export declare const NamespacesAssignResource404: typeof ResourceNotFoundError;
|
|
237
|
+
export type NamespacesAssignResource409 = ConflictError;
|
|
238
|
+
export declare const NamespacesAssignResource409: typeof ConflictError;
|
|
239
|
+
export type NamespacesAssignResource422 = ValidationError;
|
|
240
|
+
export declare const NamespacesAssignResource422: typeof ValidationError;
|
|
241
|
+
export type NamespacesAssignResource500 = InternalError;
|
|
242
|
+
export declare const NamespacesAssignResource500: typeof InternalError;
|
|
243
|
+
export type NamespacesAssignResource504 = GatewayTimeoutError;
|
|
244
|
+
export declare const NamespacesAssignResource504: typeof GatewayTimeoutError;
|
|
245
|
+
export type NamespacesRemoveResourcePathParams = {
|
|
246
|
+
readonly id: NamespaceId;
|
|
247
|
+
readonly type: NamespaceResourceType;
|
|
248
|
+
readonly resourceId: string;
|
|
249
|
+
};
|
|
250
|
+
export declare const NamespacesRemoveResourcePathParams: Schema.Struct<{
|
|
251
|
+
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">]>;
|
|
253
|
+
readonly resourceId: Schema.String;
|
|
254
|
+
}>;
|
|
255
|
+
export type NamespacesRemoveResource200 = NamespaceResource;
|
|
256
|
+
export declare const NamespacesRemoveResource200: Schema.Struct<{
|
|
257
|
+
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
258
|
+
readonly id: Schema.String;
|
|
259
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
260
|
+
}>;
|
|
261
|
+
export type NamespacesRemoveResource401 = UnauthorizedError;
|
|
262
|
+
export declare const NamespacesRemoveResource401: typeof UnauthorizedError;
|
|
263
|
+
export type NamespacesRemoveResource403 = ForbiddenError;
|
|
264
|
+
export declare const NamespacesRemoveResource403: typeof ForbiddenError;
|
|
265
|
+
export type NamespacesRemoveResource404 = ResourceNotFoundError;
|
|
266
|
+
export declare const NamespacesRemoveResource404: typeof ResourceNotFoundError;
|
|
267
|
+
export type NamespacesRemoveResource409 = ConflictError;
|
|
268
|
+
export declare const NamespacesRemoveResource409: typeof ConflictError;
|
|
269
|
+
export type NamespacesRemoveResource422 = ValidationError;
|
|
270
|
+
export declare const NamespacesRemoveResource422: typeof ValidationError;
|
|
271
|
+
export type NamespacesRemoveResource500 = InternalError;
|
|
272
|
+
export declare const NamespacesRemoveResource500: typeof InternalError;
|
|
273
|
+
export type NamespacesRemoveResource504 = GatewayTimeoutError;
|
|
274
|
+
export declare const NamespacesRemoveResource504: typeof GatewayTimeoutError;
|
|
275
|
+
export type NamespacesGetUsagePathParams = {
|
|
276
|
+
readonly id: NamespaceId;
|
|
277
|
+
};
|
|
278
|
+
export declare const NamespacesGetUsagePathParams: Schema.Struct<{
|
|
279
|
+
readonly id: Schema.brand<Schema.String, "NamespaceId">;
|
|
280
|
+
}>;
|
|
281
|
+
export type NamespacesGetUsageQuery = {
|
|
282
|
+
readonly after?: string | null;
|
|
283
|
+
readonly before?: string | null;
|
|
284
|
+
};
|
|
285
|
+
export declare const NamespacesGetUsageQuery: Schema.Struct<{
|
|
286
|
+
readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
287
|
+
readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
288
|
+
}>;
|
|
289
|
+
export type NamespacesGetUsage200 = NamespaceUsage;
|
|
290
|
+
export declare const NamespacesGetUsage200: Schema.Struct<{
|
|
291
|
+
readonly namespaceId: Schema.brand<Schema.String, "NamespaceId">;
|
|
292
|
+
readonly periodStart: Schema.String;
|
|
293
|
+
readonly periodEnd: Schema.String;
|
|
294
|
+
readonly emailCount: Schema.Finite;
|
|
295
|
+
readonly totalMessages: Schema.Finite;
|
|
296
|
+
}>;
|
|
297
|
+
export type NamespacesGetUsage401 = UnauthorizedError;
|
|
298
|
+
export declare const NamespacesGetUsage401: typeof UnauthorizedError;
|
|
299
|
+
export type NamespacesGetUsage403 = ForbiddenError;
|
|
300
|
+
export declare const NamespacesGetUsage403: typeof ForbiddenError;
|
|
301
|
+
export type NamespacesGetUsage404 = ResourceNotFoundError;
|
|
302
|
+
export declare const NamespacesGetUsage404: typeof ResourceNotFoundError;
|
|
303
|
+
export type NamespacesGetUsage422 = ValidationError;
|
|
304
|
+
export declare const NamespacesGetUsage422: typeof ValidationError;
|
|
305
|
+
export type NamespacesGetUsage500 = InternalError;
|
|
306
|
+
export declare const NamespacesGetUsage500: typeof InternalError;
|
|
307
|
+
export type NamespacesGetUsage504 = GatewayTimeoutError;
|
|
308
|
+
export declare const NamespacesGetUsage504: typeof GatewayTimeoutError;
|
|
309
|
+
declare const NamespacesGroup_base: HttpApiGroup.HttpApiGroup<"Namespaces", HttpApiEndpoint.HttpApiEndpoint<"namespacesAssignResource", "POST", "/v1/namespaces/:id/resources", Schema.toCodecStringTree<Schema.Struct<{
|
|
310
|
+
readonly id: Schema.brand<Schema.String, "NamespaceId">;
|
|
311
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
312
|
+
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
313
|
+
readonly resourceId: Schema.String;
|
|
314
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
315
|
+
readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
|
|
316
|
+
readonly id: Schema.String;
|
|
317
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
318
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
319
|
+
readonly _tag: "ConflictError";
|
|
320
|
+
readonly message: string;
|
|
321
|
+
readonly resource: string;
|
|
322
|
+
readonly id?: string | null;
|
|
323
|
+
}, readonly [Schema.Struct<{
|
|
324
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
325
|
+
readonly message: Schema.String;
|
|
326
|
+
readonly resource: Schema.String;
|
|
327
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
328
|
+
}>], {
|
|
329
|
+
readonly _tag: "ConflictError";
|
|
330
|
+
readonly message: string;
|
|
331
|
+
readonly resource: string;
|
|
332
|
+
readonly id?: string | null;
|
|
333
|
+
}>, Schema.Struct<{
|
|
334
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
335
|
+
readonly message: Schema.String;
|
|
336
|
+
readonly resource: Schema.String;
|
|
337
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
338
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
339
|
+
readonly _tag: "ForbiddenError";
|
|
340
|
+
readonly message: string;
|
|
341
|
+
}, readonly [Schema.Struct<{
|
|
342
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
343
|
+
readonly message: Schema.String;
|
|
344
|
+
}>], {
|
|
345
|
+
readonly _tag: "ForbiddenError";
|
|
346
|
+
readonly message: string;
|
|
347
|
+
}>, Schema.Struct<{
|
|
348
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
349
|
+
readonly message: Schema.String;
|
|
350
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
351
|
+
readonly _tag: "GatewayTimeoutError";
|
|
352
|
+
readonly message: string;
|
|
353
|
+
readonly retryAfterSeconds: number;
|
|
354
|
+
}, readonly [Schema.Struct<{
|
|
355
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
356
|
+
readonly message: Schema.String;
|
|
357
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
358
|
+
}>], {
|
|
359
|
+
readonly _tag: "GatewayTimeoutError";
|
|
360
|
+
readonly message: string;
|
|
361
|
+
readonly retryAfterSeconds: number;
|
|
362
|
+
}>, Schema.Struct<{
|
|
363
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
364
|
+
readonly message: Schema.String;
|
|
365
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
366
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
367
|
+
readonly _tag: "ResourceNotFoundError";
|
|
368
|
+
readonly resource: string;
|
|
369
|
+
readonly id: string;
|
|
370
|
+
readonly message: string;
|
|
371
|
+
}, readonly [Schema.Struct<{
|
|
372
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
373
|
+
readonly resource: Schema.String;
|
|
374
|
+
readonly id: Schema.String;
|
|
375
|
+
readonly message: Schema.String;
|
|
376
|
+
}>], {
|
|
377
|
+
readonly _tag: "ResourceNotFoundError";
|
|
378
|
+
readonly resource: string;
|
|
379
|
+
readonly id: string;
|
|
380
|
+
readonly message: string;
|
|
381
|
+
}>, Schema.Struct<{
|
|
382
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
383
|
+
readonly resource: Schema.String;
|
|
384
|
+
readonly id: Schema.String;
|
|
385
|
+
readonly message: Schema.String;
|
|
386
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
387
|
+
readonly _tag: "UnauthorizedError";
|
|
388
|
+
readonly message: string;
|
|
389
|
+
}, readonly [Schema.Struct<{
|
|
390
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
391
|
+
readonly message: Schema.String;
|
|
392
|
+
}>], {
|
|
393
|
+
readonly _tag: "UnauthorizedError";
|
|
394
|
+
readonly message: string;
|
|
395
|
+
}>, Schema.Struct<{
|
|
396
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
397
|
+
readonly message: Schema.String;
|
|
398
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
399
|
+
readonly _tag: "ValidationError";
|
|
400
|
+
readonly message: string;
|
|
401
|
+
readonly fields?: {
|
|
402
|
+
readonly [x: string]: readonly string[];
|
|
403
|
+
} | null;
|
|
404
|
+
}, readonly [Schema.Struct<{
|
|
405
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
406
|
+
readonly message: Schema.String;
|
|
407
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
408
|
+
}>], {
|
|
409
|
+
readonly _tag: "ValidationError";
|
|
410
|
+
readonly message: string;
|
|
411
|
+
readonly fields?: {
|
|
412
|
+
readonly [x: string]: readonly string[];
|
|
413
|
+
} | null;
|
|
414
|
+
}>, Schema.Struct<{
|
|
415
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
416
|
+
readonly message: Schema.String;
|
|
417
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
418
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"namespacesCreate", "POST", "/v1/namespaces", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
188
419
|
readonly name: Schema.String;
|
|
189
420
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
|
|
190
421
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
@@ -361,6 +592,97 @@ declare const NamespacesGroup_base: HttpApiGroup.HttpApiGroup<"Namespaces", Http
|
|
|
361
592
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
362
593
|
readonly message: Schema.String;
|
|
363
594
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
595
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"namespacesGetUsage", "GET", "/v1/namespaces/:id/usage", Schema.toCodecStringTree<Schema.Struct<{
|
|
596
|
+
readonly id: Schema.brand<Schema.String, "NamespaceId">;
|
|
597
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
598
|
+
readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
599
|
+
readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
600
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
601
|
+
readonly namespaceId: Schema.brand<Schema.String, "NamespaceId">;
|
|
602
|
+
readonly periodStart: Schema.String;
|
|
603
|
+
readonly periodEnd: Schema.String;
|
|
604
|
+
readonly emailCount: Schema.Finite;
|
|
605
|
+
readonly totalMessages: Schema.Finite;
|
|
606
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
607
|
+
readonly _tag: "ForbiddenError";
|
|
608
|
+
readonly message: string;
|
|
609
|
+
}, readonly [Schema.Struct<{
|
|
610
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
611
|
+
readonly message: Schema.String;
|
|
612
|
+
}>], {
|
|
613
|
+
readonly _tag: "ForbiddenError";
|
|
614
|
+
readonly message: string;
|
|
615
|
+
}>, Schema.Struct<{
|
|
616
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
617
|
+
readonly message: Schema.String;
|
|
618
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
619
|
+
readonly _tag: "GatewayTimeoutError";
|
|
620
|
+
readonly message: string;
|
|
621
|
+
readonly retryAfterSeconds: number;
|
|
622
|
+
}, readonly [Schema.Struct<{
|
|
623
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
624
|
+
readonly message: Schema.String;
|
|
625
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
626
|
+
}>], {
|
|
627
|
+
readonly _tag: "GatewayTimeoutError";
|
|
628
|
+
readonly message: string;
|
|
629
|
+
readonly retryAfterSeconds: number;
|
|
630
|
+
}>, Schema.Struct<{
|
|
631
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
632
|
+
readonly message: Schema.String;
|
|
633
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
634
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
635
|
+
readonly _tag: "ResourceNotFoundError";
|
|
636
|
+
readonly resource: string;
|
|
637
|
+
readonly id: string;
|
|
638
|
+
readonly message: string;
|
|
639
|
+
}, readonly [Schema.Struct<{
|
|
640
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
641
|
+
readonly resource: Schema.String;
|
|
642
|
+
readonly id: Schema.String;
|
|
643
|
+
readonly message: Schema.String;
|
|
644
|
+
}>], {
|
|
645
|
+
readonly _tag: "ResourceNotFoundError";
|
|
646
|
+
readonly resource: string;
|
|
647
|
+
readonly id: string;
|
|
648
|
+
readonly message: string;
|
|
649
|
+
}>, Schema.Struct<{
|
|
650
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
651
|
+
readonly resource: Schema.String;
|
|
652
|
+
readonly id: Schema.String;
|
|
653
|
+
readonly message: Schema.String;
|
|
654
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
655
|
+
readonly _tag: "UnauthorizedError";
|
|
656
|
+
readonly message: string;
|
|
657
|
+
}, readonly [Schema.Struct<{
|
|
658
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
659
|
+
readonly message: Schema.String;
|
|
660
|
+
}>], {
|
|
661
|
+
readonly _tag: "UnauthorizedError";
|
|
662
|
+
readonly message: string;
|
|
663
|
+
}>, Schema.Struct<{
|
|
664
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
665
|
+
readonly message: Schema.String;
|
|
666
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
667
|
+
readonly _tag: "ValidationError";
|
|
668
|
+
readonly message: string;
|
|
669
|
+
readonly fields?: {
|
|
670
|
+
readonly [x: string]: readonly string[];
|
|
671
|
+
} | null;
|
|
672
|
+
}, readonly [Schema.Struct<{
|
|
673
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
674
|
+
readonly message: Schema.String;
|
|
675
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
676
|
+
}>], {
|
|
677
|
+
readonly _tag: "ValidationError";
|
|
678
|
+
readonly message: string;
|
|
679
|
+
readonly fields?: {
|
|
680
|
+
readonly [x: string]: readonly string[];
|
|
681
|
+
} | null;
|
|
682
|
+
}>, Schema.Struct<{
|
|
683
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
684
|
+
readonly message: Schema.String;
|
|
685
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
364
686
|
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"namespacesList", "GET", "/v1/namespaces", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
365
687
|
readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
366
688
|
readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -537,6 +859,114 @@ declare const NamespacesGroup_base: HttpApiGroup.HttpApiGroup<"Namespaces", Http
|
|
|
537
859
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
538
860
|
readonly message: Schema.String;
|
|
539
861
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
862
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"namespacesRemoveResource", "DELETE", "/v1/namespaces/:id/resources/:type/:resourceId", Schema.toCodecStringTree<Schema.Struct<{
|
|
863
|
+
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">]>;
|
|
865
|
+
readonly resourceId: Schema.String;
|
|
866
|
+
}>>, 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">]>;
|
|
868
|
+
readonly id: Schema.String;
|
|
869
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
870
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
871
|
+
readonly _tag: "ConflictError";
|
|
872
|
+
readonly message: string;
|
|
873
|
+
readonly resource: string;
|
|
874
|
+
readonly id?: string | null;
|
|
875
|
+
}, readonly [Schema.Struct<{
|
|
876
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
877
|
+
readonly message: Schema.String;
|
|
878
|
+
readonly resource: Schema.String;
|
|
879
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
880
|
+
}>], {
|
|
881
|
+
readonly _tag: "ConflictError";
|
|
882
|
+
readonly message: string;
|
|
883
|
+
readonly resource: string;
|
|
884
|
+
readonly id?: string | null;
|
|
885
|
+
}>, Schema.Struct<{
|
|
886
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
887
|
+
readonly message: Schema.String;
|
|
888
|
+
readonly resource: Schema.String;
|
|
889
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
890
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
891
|
+
readonly _tag: "ForbiddenError";
|
|
892
|
+
readonly message: string;
|
|
893
|
+
}, readonly [Schema.Struct<{
|
|
894
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
895
|
+
readonly message: Schema.String;
|
|
896
|
+
}>], {
|
|
897
|
+
readonly _tag: "ForbiddenError";
|
|
898
|
+
readonly message: string;
|
|
899
|
+
}>, Schema.Struct<{
|
|
900
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
901
|
+
readonly message: Schema.String;
|
|
902
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
903
|
+
readonly _tag: "GatewayTimeoutError";
|
|
904
|
+
readonly message: string;
|
|
905
|
+
readonly retryAfterSeconds: number;
|
|
906
|
+
}, readonly [Schema.Struct<{
|
|
907
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
908
|
+
readonly message: Schema.String;
|
|
909
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
910
|
+
}>], {
|
|
911
|
+
readonly _tag: "GatewayTimeoutError";
|
|
912
|
+
readonly message: string;
|
|
913
|
+
readonly retryAfterSeconds: number;
|
|
914
|
+
}>, Schema.Struct<{
|
|
915
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
916
|
+
readonly message: Schema.String;
|
|
917
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
918
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
919
|
+
readonly _tag: "ResourceNotFoundError";
|
|
920
|
+
readonly resource: string;
|
|
921
|
+
readonly id: string;
|
|
922
|
+
readonly message: string;
|
|
923
|
+
}, readonly [Schema.Struct<{
|
|
924
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
925
|
+
readonly resource: Schema.String;
|
|
926
|
+
readonly id: Schema.String;
|
|
927
|
+
readonly message: Schema.String;
|
|
928
|
+
}>], {
|
|
929
|
+
readonly _tag: "ResourceNotFoundError";
|
|
930
|
+
readonly resource: string;
|
|
931
|
+
readonly id: string;
|
|
932
|
+
readonly message: string;
|
|
933
|
+
}>, Schema.Struct<{
|
|
934
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
935
|
+
readonly resource: Schema.String;
|
|
936
|
+
readonly id: Schema.String;
|
|
937
|
+
readonly message: Schema.String;
|
|
938
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
939
|
+
readonly _tag: "UnauthorizedError";
|
|
940
|
+
readonly message: string;
|
|
941
|
+
}, readonly [Schema.Struct<{
|
|
942
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
943
|
+
readonly message: Schema.String;
|
|
944
|
+
}>], {
|
|
945
|
+
readonly _tag: "UnauthorizedError";
|
|
946
|
+
readonly message: string;
|
|
947
|
+
}>, Schema.Struct<{
|
|
948
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
949
|
+
readonly message: Schema.String;
|
|
950
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
951
|
+
readonly _tag: "ValidationError";
|
|
952
|
+
readonly message: string;
|
|
953
|
+
readonly fields?: {
|
|
954
|
+
readonly [x: string]: readonly string[];
|
|
955
|
+
} | null;
|
|
956
|
+
}, readonly [Schema.Struct<{
|
|
957
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
958
|
+
readonly message: Schema.String;
|
|
959
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
960
|
+
}>], {
|
|
961
|
+
readonly _tag: "ValidationError";
|
|
962
|
+
readonly message: string;
|
|
963
|
+
readonly fields?: {
|
|
964
|
+
readonly [x: string]: readonly string[];
|
|
965
|
+
} | null;
|
|
966
|
+
}>, Schema.Struct<{
|
|
967
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
968
|
+
readonly message: Schema.String;
|
|
969
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
540
970
|
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"namespacesUpdate", "PATCH", "/v1/namespaces/:id", Schema.toCodecStringTree<Schema.Struct<{
|
|
541
971
|
readonly id: Schema.brand<Schema.String, "NamespaceId">;
|
|
542
972
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiKeySecurityMiddleware, ConflictError, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, NamespaceId, NamespaceMetadata, ResourceNotFoundError, SuccessResponse, UnauthorizedError, ValidationError } from "./shared.js";
|
|
1
|
+
import { ApiKeySecurityMiddleware, ConflictError, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, 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
|
//#region src/effect/generated/namespaces.ts
|
|
@@ -7,6 +7,13 @@ const NamespaceSummary = /* @__PURE__ */ Schema.Struct({
|
|
|
7
7
|
name: Schema.String,
|
|
8
8
|
createdAt: Schema.String
|
|
9
9
|
}).annotate({ identifier: "NamespaceSummary" });
|
|
10
|
+
const NamespaceUsage = /* @__PURE__ */ Schema.Struct({
|
|
11
|
+
namespaceId: NamespaceId,
|
|
12
|
+
periodStart: Schema.String,
|
|
13
|
+
periodEnd: Schema.String,
|
|
14
|
+
emailCount: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
15
|
+
totalMessages: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
16
|
+
}).annotate({ identifier: "NamespaceUsage" });
|
|
10
17
|
const Namespace = /* @__PURE__ */ Schema.Struct({
|
|
11
18
|
id: NamespaceId,
|
|
12
19
|
name: Schema.String,
|
|
@@ -14,6 +21,11 @@ const Namespace = /* @__PURE__ */ Schema.Struct({
|
|
|
14
21
|
metadata: NamespaceMetadata,
|
|
15
22
|
updatedAt: Schema.String
|
|
16
23
|
}).annotate({ identifier: "Namespace" });
|
|
24
|
+
const NamespaceResource = /* @__PURE__ */ Schema.Struct({
|
|
25
|
+
type: NamespaceResourceType,
|
|
26
|
+
id: Schema.String,
|
|
27
|
+
namespaceId: Schema.Union([NamespaceId, Schema.Null])
|
|
28
|
+
}).annotate({ identifier: "NamespaceResource" });
|
|
17
29
|
const NamespacePage = /* @__PURE__ */ Schema.Struct({
|
|
18
30
|
items: Schema.Array(NamespaceSummary),
|
|
19
31
|
nextCursor: Schema.Union([Schema.String, Schema.Null])
|
|
@@ -71,6 +83,44 @@ const NamespacesUpdate409 = ConflictError;
|
|
|
71
83
|
const NamespacesUpdate422 = ValidationError;
|
|
72
84
|
const NamespacesUpdate500 = InternalError;
|
|
73
85
|
const NamespacesUpdate504 = GatewayTimeoutError;
|
|
86
|
+
const NamespacesAssignResourcePathParams = /* @__PURE__ */ Schema.Struct({ id: NamespaceId });
|
|
87
|
+
const NamespacesAssignResourceRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
88
|
+
type: NamespaceResourceType,
|
|
89
|
+
resourceId: Schema.String.annotate({ description: "The resource's id, such as `dom_...` for a domain." })
|
|
90
|
+
});
|
|
91
|
+
const NamespacesAssignResource200 = NamespaceResource;
|
|
92
|
+
const NamespacesAssignResource401 = UnauthorizedError;
|
|
93
|
+
const NamespacesAssignResource403 = ForbiddenError;
|
|
94
|
+
const NamespacesAssignResource404 = ResourceNotFoundError;
|
|
95
|
+
const NamespacesAssignResource409 = ConflictError;
|
|
96
|
+
const NamespacesAssignResource422 = ValidationError;
|
|
97
|
+
const NamespacesAssignResource500 = InternalError;
|
|
98
|
+
const NamespacesAssignResource504 = GatewayTimeoutError;
|
|
99
|
+
const NamespacesRemoveResourcePathParams = /* @__PURE__ */ Schema.Struct({
|
|
100
|
+
id: NamespaceId,
|
|
101
|
+
type: NamespaceResourceType,
|
|
102
|
+
resourceId: Schema.String
|
|
103
|
+
});
|
|
104
|
+
const NamespacesRemoveResource200 = NamespaceResource;
|
|
105
|
+
const NamespacesRemoveResource401 = UnauthorizedError;
|
|
106
|
+
const NamespacesRemoveResource403 = ForbiddenError;
|
|
107
|
+
const NamespacesRemoveResource404 = ResourceNotFoundError;
|
|
108
|
+
const NamespacesRemoveResource409 = ConflictError;
|
|
109
|
+
const NamespacesRemoveResource422 = ValidationError;
|
|
110
|
+
const NamespacesRemoveResource500 = InternalError;
|
|
111
|
+
const NamespacesRemoveResource504 = GatewayTimeoutError;
|
|
112
|
+
const NamespacesGetUsagePathParams = /* @__PURE__ */ Schema.Struct({ id: NamespaceId });
|
|
113
|
+
const NamespacesGetUsageQuery = /* @__PURE__ */ Schema.Struct({
|
|
114
|
+
after: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
115
|
+
before: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
116
|
+
});
|
|
117
|
+
const NamespacesGetUsage200 = NamespaceUsage;
|
|
118
|
+
const NamespacesGetUsage401 = UnauthorizedError;
|
|
119
|
+
const NamespacesGetUsage403 = ForbiddenError;
|
|
120
|
+
const NamespacesGetUsage404 = ResourceNotFoundError;
|
|
121
|
+
const NamespacesGetUsage422 = ValidationError;
|
|
122
|
+
const NamespacesGetUsage500 = InternalError;
|
|
123
|
+
const NamespacesGetUsage504 = GatewayTimeoutError;
|
|
74
124
|
var NamespacesGroup = class extends HttpApiGroup.make("Namespaces").add(HttpApiEndpoint.get("namespacesList", "/v1/namespaces", {
|
|
75
125
|
query: NamespacesListQuery,
|
|
76
126
|
success: NamespacesList200,
|
|
@@ -115,7 +165,7 @@ var NamespacesGroup = class extends HttpApiGroup.make("Namespaces").add(HttpApiE
|
|
|
115
165
|
NamespacesRemove500,
|
|
116
166
|
NamespacesRemove504.pipe(HttpApiSchema.status(504))
|
|
117
167
|
]
|
|
118
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "namespaces.remove").annotate(OpenApi.Summary, "Delete a namespace").annotate(OpenApi.Description, "Deletes an empty namespace. A namespace that still holds mailboxes, API keys, or webhook endpoints
|
|
168
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "namespaces.remove").annotate(OpenApi.Summary, "Delete a namespace").annotate(OpenApi.Description, "Deletes an empty namespace. A namespace that still holds anything conflicts, and the error counts what remains: mailboxes, API keys, webhook endpoints filtered to it, domains, senders, contacts, or template projects. Delete each, or return it to organization level with `DELETE /v1/namespaces/{id}/resources/{type}/{resourceId}`; mailboxes, keys, and webhook endpoints cannot move and are deleted. Messages keep the namespace they ran in."), HttpApiEndpoint.patch("namespacesUpdate", "/v1/namespaces/:id", {
|
|
119
169
|
params: NamespacesUpdatePathParams,
|
|
120
170
|
payload: NamespacesUpdateRequestJson,
|
|
121
171
|
success: NamespacesUpdate200,
|
|
@@ -128,8 +178,45 @@ var NamespacesGroup = class extends HttpApiGroup.make("Namespaces").add(HttpApiE
|
|
|
128
178
|
NamespacesUpdate500,
|
|
129
179
|
NamespacesUpdate504.pipe(HttpApiSchema.status(504))
|
|
130
180
|
]
|
|
131
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "namespaces.update").annotate(OpenApi.Summary, "Update a namespace").annotate(OpenApi.Description, "Updates the fields you name and keeps the rest. `metadata` merges into the stored metadata by key, and a `null` value deletes that key.")
|
|
181
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "namespaces.update").annotate(OpenApi.Summary, "Update a namespace").annotate(OpenApi.Description, "Updates the fields you name and keeps the rest. `metadata` merges into the stored metadata by key, and a `null` value deletes that key."), HttpApiEndpoint.post("namespacesAssignResource", "/v1/namespaces/:id/resources", {
|
|
182
|
+
params: NamespacesAssignResourcePathParams,
|
|
183
|
+
payload: NamespacesAssignResourceRequestJson,
|
|
184
|
+
success: NamespacesAssignResource200,
|
|
185
|
+
error: [
|
|
186
|
+
NamespacesAssignResource401.pipe(HttpApiSchema.status(401)),
|
|
187
|
+
NamespacesAssignResource403.pipe(HttpApiSchema.status(403)),
|
|
188
|
+
NamespacesAssignResource404.pipe(HttpApiSchema.status(404)),
|
|
189
|
+
NamespacesAssignResource409.pipe(HttpApiSchema.status(409)),
|
|
190
|
+
NamespacesAssignResource422.pipe(HttpApiSchema.status(422)),
|
|
191
|
+
NamespacesAssignResource500,
|
|
192
|
+
NamespacesAssignResource504.pipe(HttpApiSchema.status(504))
|
|
193
|
+
]
|
|
194
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "namespaces.assignResource").annotate(OpenApi.Summary, "Move a resource into a namespace").annotate(OpenApi.Description, "Moves a resource from organization level or another namespace into this one. A domain brings its senders; a sender on a domain cannot move alone (assign the domain); a contact brings its identities; a template brings every template in its project. A moved resource stops being a default. An address or external id the namespace already holds conflicts. Keys scoped to the old namespace stop reaching the resource at once. Mailboxes, API keys, and webhook endpoints keep the namespace they were created in."), HttpApiEndpoint.delete("namespacesRemoveResource", "/v1/namespaces/:id/resources/:type/:resourceId", {
|
|
195
|
+
params: NamespacesRemoveResourcePathParams,
|
|
196
|
+
success: NamespacesRemoveResource200,
|
|
197
|
+
error: [
|
|
198
|
+
NamespacesRemoveResource401.pipe(HttpApiSchema.status(401)),
|
|
199
|
+
NamespacesRemoveResource403.pipe(HttpApiSchema.status(403)),
|
|
200
|
+
NamespacesRemoveResource404.pipe(HttpApiSchema.status(404)),
|
|
201
|
+
NamespacesRemoveResource409.pipe(HttpApiSchema.status(409)),
|
|
202
|
+
NamespacesRemoveResource422.pipe(HttpApiSchema.status(422)),
|
|
203
|
+
NamespacesRemoveResource500,
|
|
204
|
+
NamespacesRemoveResource504.pipe(HttpApiSchema.status(504))
|
|
205
|
+
]
|
|
206
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "namespaces.removeResource").annotate(OpenApi.Summary, "Return a resource to organization level").annotate(OpenApi.Description, "Moves a resource out of this namespace to organization level, with what follows it as in `POST /v1/namespaces/{id}/resources`. A resource in a different namespace is not found."), HttpApiEndpoint.get("namespacesGetUsage", "/v1/namespaces/:id/usage", {
|
|
207
|
+
params: NamespacesGetUsagePathParams,
|
|
208
|
+
query: NamespacesGetUsageQuery,
|
|
209
|
+
success: NamespacesGetUsage200,
|
|
210
|
+
error: [
|
|
211
|
+
NamespacesGetUsage401.pipe(HttpApiSchema.status(401)),
|
|
212
|
+
NamespacesGetUsage403.pipe(HttpApiSchema.status(403)),
|
|
213
|
+
NamespacesGetUsage404.pipe(HttpApiSchema.status(404)),
|
|
214
|
+
NamespacesGetUsage422.pipe(HttpApiSchema.status(422)),
|
|
215
|
+
NamespacesGetUsage500,
|
|
216
|
+
NamespacesGetUsage504.pipe(HttpApiSchema.status(504))
|
|
217
|
+
]
|
|
218
|
+
}).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") {};
|
|
132
219
|
//#endregion
|
|
133
|
-
export { Namespace, NamespacePage, NamespaceSummary, NamespacesCreate201, NamespacesCreate401, NamespacesCreate403, NamespacesCreate409, NamespacesCreate422, NamespacesCreate500, NamespacesCreate504, NamespacesCreateRequestJson, NamespacesGet200, NamespacesGet401, NamespacesGet403, NamespacesGet404, NamespacesGet422, NamespacesGet500, NamespacesGet504, NamespacesGetPathParams, NamespacesGroup, NamespacesList200, NamespacesList401, NamespacesList403, NamespacesList422, NamespacesList500, NamespacesList504, NamespacesListQuery, NamespacesRemove200, NamespacesRemove401, NamespacesRemove403, NamespacesRemove404, NamespacesRemove409, NamespacesRemove422, NamespacesRemove500, NamespacesRemove504, NamespacesRemovePathParams, NamespacesUpdate200, NamespacesUpdate401, NamespacesUpdate403, NamespacesUpdate404, NamespacesUpdate409, NamespacesUpdate422, NamespacesUpdate500, NamespacesUpdate504, NamespacesUpdatePathParams, NamespacesUpdateRequestJson };
|
|
220
|
+
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 };
|
|
134
221
|
|
|
135
222
|
//# sourceMappingURL=namespaces.js.map
|