samva 0.30.0 → 0.32.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/dist/client/sdk.gen.d.ts +72 -5
- package/dist/client/sdk.gen.js +229 -4
- package/dist/client/types.gen.d.ts +592 -34
- package/dist/effect/conversations.d.ts +3 -0
- package/dist/effect/errors.d.ts +1 -1
- package/dist/effect/errors.js +2 -2
- package/dist/effect/generated/campaigns.d.ts +131 -57
- package/dist/effect/generated/campaigns.js +27 -9
- package/dist/effect/generated/contact-groups.js +2 -2
- package/dist/effect/generated/contacts.js +6 -6
- package/dist/effect/generated/conversations.d.ts +4 -1
- package/dist/effect/generated/conversations.js +3 -2
- package/dist/effect/generated/email.js +1 -1
- package/dist/effect/generated/mailboxes.d.ts +969 -16
- package/dist/effect/generated/mailboxes.js +263 -11
- package/dist/effect/generated/newsletter-issues.d.ts +199 -1
- package/dist/effect/generated/newsletter-issues.js +24 -2
- package/dist/effect/generated/newsletters.js +1 -1
- package/dist/effect/generated/organizations.d.ts +345 -2
- package/dist/effect/generated/organizations.js +65 -5
- package/dist/effect/generated/scheduled-messages.d.ts +25 -8
- package/dist/effect/generated/scheduled-messages.js +17 -9
- package/dist/effect/generated/shared.d.ts +90 -9
- package/dist/effect/generated/shared.js +14 -10
- package/dist/effect/generated/subscriptions.js +1 -1
- package/dist/effect/generated/templates.d.ts +307 -1
- package/dist/effect/generated/templates.js +36 -2
- package/dist/effect/generated/topics.js +2 -2
- package/dist/effect/generated/whoami.d.ts +5 -5
- package/dist/effect/generated/whoami.js +1 -0
- package/dist/effect/generated-metadata.d.ts +40 -0
- package/dist/effect/generated-metadata.js +10 -0
- package/dist/effect/index.js +2 -2
- package/dist/effect/internal/send.d.ts +1 -1
- package/dist/effect/mailboxes.d.ts +273 -0
- package/dist/effect/mailboxes.js +7 -1
- package/dist/effect/organizations.d.ts +6 -0
- package/dist/effect/organizations.js +7 -1
- package/dist/index.js +2 -2
- package/dist/package.js +1 -1
- package/dist/promises/client.js +2 -2
- package/dist/promises/errors.gen.d.ts +12 -2
- package/dist/promises/errors.gen.js +28 -1
- package/dist/promises/index.js +2 -2
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +25 -0
- package/dist/service-map.js +9 -0
- package/package.json +8 -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, BillingProviderError, ConflictError, ForbiddenError, GatewayTimeoutError, IanaTimezone, InternalError, JsonValue, OperationAccepted, PaymentRequiredError, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared";
|
|
3
|
+
import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ForbiddenError, GatewayTimeoutError, IanaTimezone, InternalError, JsonValue, MailboxId, OperationAccepted, PaymentRequiredError, ResourceNotFoundError, UnauthorizedError, UserId, ValidationError } from "./shared";
|
|
4
4
|
export type PhoneRegion = string;
|
|
5
5
|
export declare const PhoneRegion: Schema.String;
|
|
6
6
|
export type Organization = {
|
|
@@ -296,6 +296,80 @@ export type OrganizationsDelete500 = InternalError;
|
|
|
296
296
|
export declare const OrganizationsDelete500: typeof InternalError;
|
|
297
297
|
export type OrganizationsDelete504 = GatewayTimeoutError;
|
|
298
298
|
export declare const OrganizationsDelete504: typeof GatewayTimeoutError;
|
|
299
|
+
export type OrganizationsAssignPersonalMailboxPathParams = {
|
|
300
|
+
readonly userId: UserId;
|
|
301
|
+
};
|
|
302
|
+
export declare const OrganizationsAssignPersonalMailboxPathParams: Schema.Struct<{
|
|
303
|
+
readonly userId: Schema.brand<Schema.String, "UserId">;
|
|
304
|
+
}>;
|
|
305
|
+
export type OrganizationsAssignPersonalMailboxRequestJson = {
|
|
306
|
+
readonly mailboxAddress: string;
|
|
307
|
+
};
|
|
308
|
+
export declare const OrganizationsAssignPersonalMailboxRequestJson: Schema.Struct<{
|
|
309
|
+
readonly mailboxAddress: Schema.String;
|
|
310
|
+
}>;
|
|
311
|
+
export type OrganizationsAssignPersonalMailbox200 = {
|
|
312
|
+
readonly mailboxId: MailboxId;
|
|
313
|
+
};
|
|
314
|
+
export declare const OrganizationsAssignPersonalMailbox200: Schema.Struct<{
|
|
315
|
+
readonly mailboxId: Schema.brand<Schema.String, "MailboxId">;
|
|
316
|
+
}>;
|
|
317
|
+
export type OrganizationsAssignPersonalMailbox401 = UnauthorizedError;
|
|
318
|
+
export declare const OrganizationsAssignPersonalMailbox401: typeof UnauthorizedError;
|
|
319
|
+
export type OrganizationsAssignPersonalMailbox402 = PaymentRequiredError;
|
|
320
|
+
export declare const OrganizationsAssignPersonalMailbox402: typeof PaymentRequiredError;
|
|
321
|
+
export type OrganizationsAssignPersonalMailbox403 = ForbiddenError;
|
|
322
|
+
export declare const OrganizationsAssignPersonalMailbox403: typeof ForbiddenError;
|
|
323
|
+
export type OrganizationsAssignPersonalMailbox404 = ResourceNotFoundError;
|
|
324
|
+
export declare const OrganizationsAssignPersonalMailbox404: typeof ResourceNotFoundError;
|
|
325
|
+
export type OrganizationsAssignPersonalMailbox409 = ConflictError;
|
|
326
|
+
export declare const OrganizationsAssignPersonalMailbox409: typeof ConflictError;
|
|
327
|
+
export type OrganizationsAssignPersonalMailbox422 = ValidationError;
|
|
328
|
+
export declare const OrganizationsAssignPersonalMailbox422: typeof ValidationError;
|
|
329
|
+
export type OrganizationsAssignPersonalMailbox500 = InternalError;
|
|
330
|
+
export declare const OrganizationsAssignPersonalMailbox500: typeof InternalError;
|
|
331
|
+
export type OrganizationsAssignPersonalMailbox502 = BillingProviderError;
|
|
332
|
+
export declare const OrganizationsAssignPersonalMailbox502: typeof BillingProviderError;
|
|
333
|
+
export type OrganizationsAssignPersonalMailbox504 = GatewayTimeoutError;
|
|
334
|
+
export declare const OrganizationsAssignPersonalMailbox504: typeof GatewayTimeoutError;
|
|
335
|
+
export type OrganizationsGetPersonalMailboxAddressOptions200 = {
|
|
336
|
+
readonly domains: ReadonlyArray<string>;
|
|
337
|
+
readonly defaultDomain: string;
|
|
338
|
+
};
|
|
339
|
+
export declare const OrganizationsGetPersonalMailboxAddressOptions200: Schema.Struct<{
|
|
340
|
+
readonly domains: Schema.$Array<Schema.String>;
|
|
341
|
+
readonly defaultDomain: Schema.String;
|
|
342
|
+
}>;
|
|
343
|
+
export type OrganizationsGetPersonalMailboxAddressOptions401 = UnauthorizedError;
|
|
344
|
+
export declare const OrganizationsGetPersonalMailboxAddressOptions401: typeof UnauthorizedError;
|
|
345
|
+
export type OrganizationsGetPersonalMailboxAddressOptions403 = ForbiddenError;
|
|
346
|
+
export declare const OrganizationsGetPersonalMailboxAddressOptions403: typeof ForbiddenError;
|
|
347
|
+
export type OrganizationsGetPersonalMailboxAddressOptions422 = ValidationError;
|
|
348
|
+
export declare const OrganizationsGetPersonalMailboxAddressOptions422: typeof ValidationError;
|
|
349
|
+
export type OrganizationsGetPersonalMailboxAddressOptions500 = InternalError;
|
|
350
|
+
export declare const OrganizationsGetPersonalMailboxAddressOptions500: typeof InternalError;
|
|
351
|
+
export type OrganizationsGetPersonalMailboxAddressOptions504 = GatewayTimeoutError;
|
|
352
|
+
export declare const OrganizationsGetPersonalMailboxAddressOptions504: typeof GatewayTimeoutError;
|
|
353
|
+
export type OrganizationsListPersonalMailboxAssignments200 = {
|
|
354
|
+
readonly items: ReadonlyArray<{
|
|
355
|
+
readonly userId: UserId;
|
|
356
|
+
}>;
|
|
357
|
+
};
|
|
358
|
+
export declare const OrganizationsListPersonalMailboxAssignments200: Schema.Struct<{
|
|
359
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
360
|
+
readonly userId: Schema.brand<Schema.String, "UserId">;
|
|
361
|
+
}>>;
|
|
362
|
+
}>;
|
|
363
|
+
export type OrganizationsListPersonalMailboxAssignments401 = UnauthorizedError;
|
|
364
|
+
export declare const OrganizationsListPersonalMailboxAssignments401: typeof UnauthorizedError;
|
|
365
|
+
export type OrganizationsListPersonalMailboxAssignments403 = ForbiddenError;
|
|
366
|
+
export declare const OrganizationsListPersonalMailboxAssignments403: typeof ForbiddenError;
|
|
367
|
+
export type OrganizationsListPersonalMailboxAssignments422 = ValidationError;
|
|
368
|
+
export declare const OrganizationsListPersonalMailboxAssignments422: typeof ValidationError;
|
|
369
|
+
export type OrganizationsListPersonalMailboxAssignments500 = InternalError;
|
|
370
|
+
export declare const OrganizationsListPersonalMailboxAssignments500: typeof InternalError;
|
|
371
|
+
export type OrganizationsListPersonalMailboxAssignments504 = GatewayTimeoutError;
|
|
372
|
+
export declare const OrganizationsListPersonalMailboxAssignments504: typeof GatewayTimeoutError;
|
|
299
373
|
export type OrganizationsGetTrustTier200 = {
|
|
300
374
|
readonly tier: "screened" | "probation" | "established";
|
|
301
375
|
readonly changedAt: string;
|
|
@@ -434,7 +508,149 @@ export type OrganizationsGetUsage500 = InternalError;
|
|
|
434
508
|
export declare const OrganizationsGetUsage500: typeof InternalError;
|
|
435
509
|
export type OrganizationsGetUsage504 = GatewayTimeoutError;
|
|
436
510
|
export declare const OrganizationsGetUsage504: typeof GatewayTimeoutError;
|
|
437
|
-
declare const OrganizationsGroup_base: HttpApiGroup.HttpApiGroup<"Organizations", HttpApiEndpoint.HttpApiEndpoint<"
|
|
511
|
+
declare const OrganizationsGroup_base: HttpApiGroup.HttpApiGroup<"Organizations", HttpApiEndpoint.HttpApiEndpoint<"organizationsAssignPersonalMailbox", "POST", "/v1/organizations/members/:userId/personal-mailbox", Schema.toCodecStringTree<Schema.Struct<{
|
|
512
|
+
readonly userId: Schema.brand<Schema.String, "UserId">;
|
|
513
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
514
|
+
readonly mailboxAddress: Schema.String;
|
|
515
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
516
|
+
readonly mailboxId: Schema.brand<Schema.String, "MailboxId">;
|
|
517
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<BillingProviderError, {
|
|
518
|
+
readonly _tag: "BillingProviderError";
|
|
519
|
+
readonly message: string;
|
|
520
|
+
}, readonly [Schema.Struct<{
|
|
521
|
+
readonly _tag: Schema.tag<"BillingProviderError">;
|
|
522
|
+
readonly message: Schema.String;
|
|
523
|
+
}>], {
|
|
524
|
+
readonly _tag: "BillingProviderError";
|
|
525
|
+
readonly message: string;
|
|
526
|
+
}>, Schema.Struct<{
|
|
527
|
+
readonly _tag: Schema.tag<"BillingProviderError">;
|
|
528
|
+
readonly message: Schema.String;
|
|
529
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
530
|
+
readonly _tag: "ConflictError";
|
|
531
|
+
readonly message: string;
|
|
532
|
+
readonly resource: string;
|
|
533
|
+
readonly id?: string | null;
|
|
534
|
+
}, readonly [Schema.Struct<{
|
|
535
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
536
|
+
readonly message: Schema.String;
|
|
537
|
+
readonly resource: Schema.String;
|
|
538
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
539
|
+
}>], {
|
|
540
|
+
readonly _tag: "ConflictError";
|
|
541
|
+
readonly message: string;
|
|
542
|
+
readonly resource: string;
|
|
543
|
+
readonly id?: string | null;
|
|
544
|
+
}>, Schema.Struct<{
|
|
545
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
546
|
+
readonly message: Schema.String;
|
|
547
|
+
readonly resource: Schema.String;
|
|
548
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
549
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
550
|
+
readonly _tag: "ForbiddenError";
|
|
551
|
+
readonly message: string;
|
|
552
|
+
}, readonly [Schema.Struct<{
|
|
553
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
554
|
+
readonly message: Schema.String;
|
|
555
|
+
}>], {
|
|
556
|
+
readonly _tag: "ForbiddenError";
|
|
557
|
+
readonly message: string;
|
|
558
|
+
}>, Schema.Struct<{
|
|
559
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
560
|
+
readonly message: Schema.String;
|
|
561
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
562
|
+
readonly _tag: "GatewayTimeoutError";
|
|
563
|
+
readonly message: string;
|
|
564
|
+
readonly retryAfterSeconds: number;
|
|
565
|
+
}, readonly [Schema.Struct<{
|
|
566
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
567
|
+
readonly message: Schema.String;
|
|
568
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
569
|
+
}>], {
|
|
570
|
+
readonly _tag: "GatewayTimeoutError";
|
|
571
|
+
readonly message: string;
|
|
572
|
+
readonly retryAfterSeconds: number;
|
|
573
|
+
}>, Schema.Struct<{
|
|
574
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
575
|
+
readonly message: Schema.String;
|
|
576
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
577
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<PaymentRequiredError, {
|
|
578
|
+
readonly _tag: "PaymentRequiredError";
|
|
579
|
+
readonly message: string;
|
|
580
|
+
readonly resource: string;
|
|
581
|
+
readonly currentUsage: number;
|
|
582
|
+
readonly limit: number;
|
|
583
|
+
}, readonly [Schema.Struct<{
|
|
584
|
+
readonly _tag: Schema.tag<"PaymentRequiredError">;
|
|
585
|
+
readonly message: Schema.String;
|
|
586
|
+
readonly resource: Schema.String;
|
|
587
|
+
readonly currentUsage: Schema.Finite;
|
|
588
|
+
readonly limit: Schema.Finite;
|
|
589
|
+
}>], {
|
|
590
|
+
readonly _tag: "PaymentRequiredError";
|
|
591
|
+
readonly message: string;
|
|
592
|
+
readonly resource: string;
|
|
593
|
+
readonly currentUsage: number;
|
|
594
|
+
readonly limit: number;
|
|
595
|
+
}>, Schema.Struct<{
|
|
596
|
+
readonly _tag: Schema.tag<"PaymentRequiredError">;
|
|
597
|
+
readonly message: Schema.String;
|
|
598
|
+
readonly resource: Schema.String;
|
|
599
|
+
readonly currentUsage: Schema.Finite;
|
|
600
|
+
readonly limit: Schema.Finite;
|
|
601
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
602
|
+
readonly _tag: "ResourceNotFoundError";
|
|
603
|
+
readonly resource: string;
|
|
604
|
+
readonly id: string;
|
|
605
|
+
readonly message: string;
|
|
606
|
+
}, readonly [Schema.Struct<{
|
|
607
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
608
|
+
readonly resource: Schema.String;
|
|
609
|
+
readonly id: Schema.String;
|
|
610
|
+
readonly message: Schema.String;
|
|
611
|
+
}>], {
|
|
612
|
+
readonly _tag: "ResourceNotFoundError";
|
|
613
|
+
readonly resource: string;
|
|
614
|
+
readonly id: string;
|
|
615
|
+
readonly message: string;
|
|
616
|
+
}>, Schema.Struct<{
|
|
617
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
618
|
+
readonly resource: Schema.String;
|
|
619
|
+
readonly id: Schema.String;
|
|
620
|
+
readonly message: Schema.String;
|
|
621
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
622
|
+
readonly _tag: "UnauthorizedError";
|
|
623
|
+
readonly message: string;
|
|
624
|
+
}, readonly [Schema.Struct<{
|
|
625
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
626
|
+
readonly message: Schema.String;
|
|
627
|
+
}>], {
|
|
628
|
+
readonly _tag: "UnauthorizedError";
|
|
629
|
+
readonly message: string;
|
|
630
|
+
}>, Schema.Struct<{
|
|
631
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
632
|
+
readonly message: Schema.String;
|
|
633
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
634
|
+
readonly _tag: "ValidationError";
|
|
635
|
+
readonly message: string;
|
|
636
|
+
readonly fields?: {
|
|
637
|
+
readonly [x: string]: readonly string[];
|
|
638
|
+
} | null;
|
|
639
|
+
}, readonly [Schema.Struct<{
|
|
640
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
641
|
+
readonly message: Schema.String;
|
|
642
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
643
|
+
}>], {
|
|
644
|
+
readonly _tag: "ValidationError";
|
|
645
|
+
readonly message: string;
|
|
646
|
+
readonly fields?: {
|
|
647
|
+
readonly [x: string]: readonly string[];
|
|
648
|
+
} | null;
|
|
649
|
+
}>, Schema.Struct<{
|
|
650
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
651
|
+
readonly message: Schema.String;
|
|
652
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
653
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationsCreate", "POST", "/v1/organizations", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
438
654
|
readonly name: Schema.String;
|
|
439
655
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
440
656
|
readonly id: Schema.String;
|
|
@@ -840,6 +1056,69 @@ declare const OrganizationsGroup_base: HttpApiGroup.HttpApiGroup<"Organizations"
|
|
|
840
1056
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
841
1057
|
readonly message: Schema.String;
|
|
842
1058
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1059
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationsGetPersonalMailboxAddressOptions", "GET", "/v1/organizations/personal-mailboxes/address-options", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
1060
|
+
readonly domains: Schema.$Array<Schema.String>;
|
|
1061
|
+
readonly defaultDomain: Schema.String;
|
|
1062
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
1063
|
+
readonly _tag: "ForbiddenError";
|
|
1064
|
+
readonly message: string;
|
|
1065
|
+
}, readonly [Schema.Struct<{
|
|
1066
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1067
|
+
readonly message: Schema.String;
|
|
1068
|
+
}>], {
|
|
1069
|
+
readonly _tag: "ForbiddenError";
|
|
1070
|
+
readonly message: string;
|
|
1071
|
+
}>, Schema.Struct<{
|
|
1072
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1073
|
+
readonly message: Schema.String;
|
|
1074
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
1075
|
+
readonly _tag: "GatewayTimeoutError";
|
|
1076
|
+
readonly message: string;
|
|
1077
|
+
readonly retryAfterSeconds: number;
|
|
1078
|
+
}, readonly [Schema.Struct<{
|
|
1079
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1080
|
+
readonly message: Schema.String;
|
|
1081
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1082
|
+
}>], {
|
|
1083
|
+
readonly _tag: "GatewayTimeoutError";
|
|
1084
|
+
readonly message: string;
|
|
1085
|
+
readonly retryAfterSeconds: number;
|
|
1086
|
+
}>, Schema.Struct<{
|
|
1087
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1088
|
+
readonly message: Schema.String;
|
|
1089
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1090
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
1091
|
+
readonly _tag: "UnauthorizedError";
|
|
1092
|
+
readonly message: string;
|
|
1093
|
+
}, readonly [Schema.Struct<{
|
|
1094
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
1095
|
+
readonly message: Schema.String;
|
|
1096
|
+
}>], {
|
|
1097
|
+
readonly _tag: "UnauthorizedError";
|
|
1098
|
+
readonly message: string;
|
|
1099
|
+
}>, Schema.Struct<{
|
|
1100
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
1101
|
+
readonly message: Schema.String;
|
|
1102
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
1103
|
+
readonly _tag: "ValidationError";
|
|
1104
|
+
readonly message: string;
|
|
1105
|
+
readonly fields?: {
|
|
1106
|
+
readonly [x: string]: readonly string[];
|
|
1107
|
+
} | null;
|
|
1108
|
+
}, readonly [Schema.Struct<{
|
|
1109
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
1110
|
+
readonly message: Schema.String;
|
|
1111
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1112
|
+
}>], {
|
|
1113
|
+
readonly _tag: "ValidationError";
|
|
1114
|
+
readonly message: string;
|
|
1115
|
+
readonly fields?: {
|
|
1116
|
+
readonly [x: string]: readonly string[];
|
|
1117
|
+
} | null;
|
|
1118
|
+
}>, Schema.Struct<{
|
|
1119
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
1120
|
+
readonly message: Schema.String;
|
|
1121
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
843
1122
|
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationsGetProfile", "GET", "/v1/organizations/current/profile", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
844
1123
|
readonly id: Schema.String;
|
|
845
1124
|
readonly name: Schema.String;
|
|
@@ -1110,6 +1389,70 @@ declare const OrganizationsGroup_base: HttpApiGroup.HttpApiGroup<"Organizations"
|
|
|
1110
1389
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
1111
1390
|
readonly message: Schema.String;
|
|
1112
1391
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1392
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationsListPersonalMailboxAssignments", "GET", "/v1/organizations/personal-mailboxes/assignments", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
1393
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
1394
|
+
readonly userId: Schema.brand<Schema.String, "UserId">;
|
|
1395
|
+
}>>;
|
|
1396
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
1397
|
+
readonly _tag: "ForbiddenError";
|
|
1398
|
+
readonly message: string;
|
|
1399
|
+
}, readonly [Schema.Struct<{
|
|
1400
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1401
|
+
readonly message: Schema.String;
|
|
1402
|
+
}>], {
|
|
1403
|
+
readonly _tag: "ForbiddenError";
|
|
1404
|
+
readonly message: string;
|
|
1405
|
+
}>, Schema.Struct<{
|
|
1406
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1407
|
+
readonly message: Schema.String;
|
|
1408
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
1409
|
+
readonly _tag: "GatewayTimeoutError";
|
|
1410
|
+
readonly message: string;
|
|
1411
|
+
readonly retryAfterSeconds: number;
|
|
1412
|
+
}, readonly [Schema.Struct<{
|
|
1413
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1414
|
+
readonly message: Schema.String;
|
|
1415
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1416
|
+
}>], {
|
|
1417
|
+
readonly _tag: "GatewayTimeoutError";
|
|
1418
|
+
readonly message: string;
|
|
1419
|
+
readonly retryAfterSeconds: number;
|
|
1420
|
+
}>, Schema.Struct<{
|
|
1421
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1422
|
+
readonly message: Schema.String;
|
|
1423
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1424
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
1425
|
+
readonly _tag: "UnauthorizedError";
|
|
1426
|
+
readonly message: string;
|
|
1427
|
+
}, readonly [Schema.Struct<{
|
|
1428
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
1429
|
+
readonly message: Schema.String;
|
|
1430
|
+
}>], {
|
|
1431
|
+
readonly _tag: "UnauthorizedError";
|
|
1432
|
+
readonly message: string;
|
|
1433
|
+
}>, Schema.Struct<{
|
|
1434
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
1435
|
+
readonly message: Schema.String;
|
|
1436
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
1437
|
+
readonly _tag: "ValidationError";
|
|
1438
|
+
readonly message: string;
|
|
1439
|
+
readonly fields?: {
|
|
1440
|
+
readonly [x: string]: readonly string[];
|
|
1441
|
+
} | null;
|
|
1442
|
+
}, readonly [Schema.Struct<{
|
|
1443
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
1444
|
+
readonly message: Schema.String;
|
|
1445
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1446
|
+
}>], {
|
|
1447
|
+
readonly _tag: "ValidationError";
|
|
1448
|
+
readonly message: string;
|
|
1449
|
+
readonly fields?: {
|
|
1450
|
+
readonly [x: string]: readonly string[];
|
|
1451
|
+
} | null;
|
|
1452
|
+
}>, Schema.Struct<{
|
|
1453
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
1454
|
+
readonly message: Schema.String;
|
|
1455
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1113
1456
|
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationsUpdate", "PATCH", "/v1/organizations/current", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
1114
1457
|
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1115
1458
|
readonly slug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ForbiddenError, GatewayTimeoutError, IanaTimezone, InternalError, JsonValue, OperationAccepted, PaymentRequiredError, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared.js";
|
|
1
|
+
import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ForbiddenError, GatewayTimeoutError, IanaTimezone, InternalError, JsonValue, MailboxId, OperationAccepted, PaymentRequiredError, ResourceNotFoundError, UnauthorizedError, UserId, 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/organizations.ts
|
|
@@ -30,7 +30,7 @@ const Organization = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
30
30
|
teamMembersUsed: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
31
31
|
messagesResetAt: Schema.Union([Schema.String, Schema.Null])
|
|
32
32
|
}).annotate({ identifier: "Organization" }))();
|
|
33
|
-
const OrganizationsCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({ name: Schema.String }))();
|
|
33
|
+
const OrganizationsCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({ name: Schema.String.check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })) }))();
|
|
34
34
|
const OrganizationsCreate200 = Organization;
|
|
35
35
|
const OrganizationsCreate401 = UnauthorizedError;
|
|
36
36
|
const OrganizationsCreate402 = PaymentRequiredError;
|
|
@@ -47,7 +47,7 @@ const OrganizationsGet422 = ValidationError;
|
|
|
47
47
|
const OrganizationsGet500 = InternalError;
|
|
48
48
|
const OrganizationsGet504 = GatewayTimeoutError;
|
|
49
49
|
const OrganizationsUpdateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
50
|
-
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
50
|
+
name: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null])),
|
|
51
51
|
slug: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
52
52
|
avatarUrl: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]).annotate({ description: "The `src` returned by an avatar upload (see `POST /v1/organizations/current/avatar-upload`). Null removes the avatar." }), Schema.Null])),
|
|
53
53
|
defaultRegion: Schema.optionalKey(Schema.Union([PhoneRegion, Schema.Null])),
|
|
@@ -93,6 +93,33 @@ const OrganizationsDelete409 = ConflictError;
|
|
|
93
93
|
const OrganizationsDelete422 = ValidationError;
|
|
94
94
|
const OrganizationsDelete500 = InternalError;
|
|
95
95
|
const OrganizationsDelete504 = GatewayTimeoutError;
|
|
96
|
+
const OrganizationsAssignPersonalMailboxPathParams = /* @__PURE__ */ (() => Schema.Struct({ userId: UserId }))();
|
|
97
|
+
const OrganizationsAssignPersonalMailboxRequestJson = /* @__PURE__ */ (() => Schema.Struct({ mailboxAddress: Schema.String }))();
|
|
98
|
+
const OrganizationsAssignPersonalMailbox200 = /* @__PURE__ */ (() => Schema.Struct({ mailboxId: MailboxId }))();
|
|
99
|
+
const OrganizationsAssignPersonalMailbox401 = UnauthorizedError;
|
|
100
|
+
const OrganizationsAssignPersonalMailbox402 = PaymentRequiredError;
|
|
101
|
+
const OrganizationsAssignPersonalMailbox403 = ForbiddenError;
|
|
102
|
+
const OrganizationsAssignPersonalMailbox404 = ResourceNotFoundError;
|
|
103
|
+
const OrganizationsAssignPersonalMailbox409 = ConflictError;
|
|
104
|
+
const OrganizationsAssignPersonalMailbox422 = ValidationError;
|
|
105
|
+
const OrganizationsAssignPersonalMailbox500 = InternalError;
|
|
106
|
+
const OrganizationsAssignPersonalMailbox502 = BillingProviderError;
|
|
107
|
+
const OrganizationsAssignPersonalMailbox504 = GatewayTimeoutError;
|
|
108
|
+
const OrganizationsGetPersonalMailboxAddressOptions200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
109
|
+
domains: Schema.Array(Schema.String),
|
|
110
|
+
defaultDomain: Schema.String
|
|
111
|
+
}))();
|
|
112
|
+
const OrganizationsGetPersonalMailboxAddressOptions401 = UnauthorizedError;
|
|
113
|
+
const OrganizationsGetPersonalMailboxAddressOptions403 = ForbiddenError;
|
|
114
|
+
const OrganizationsGetPersonalMailboxAddressOptions422 = ValidationError;
|
|
115
|
+
const OrganizationsGetPersonalMailboxAddressOptions500 = InternalError;
|
|
116
|
+
const OrganizationsGetPersonalMailboxAddressOptions504 = GatewayTimeoutError;
|
|
117
|
+
const OrganizationsListPersonalMailboxAssignments200 = /* @__PURE__ */ (() => Schema.Struct({ items: Schema.Array(Schema.Struct({ userId: UserId })) }))();
|
|
118
|
+
const OrganizationsListPersonalMailboxAssignments401 = UnauthorizedError;
|
|
119
|
+
const OrganizationsListPersonalMailboxAssignments403 = ForbiddenError;
|
|
120
|
+
const OrganizationsListPersonalMailboxAssignments422 = ValidationError;
|
|
121
|
+
const OrganizationsListPersonalMailboxAssignments500 = InternalError;
|
|
122
|
+
const OrganizationsListPersonalMailboxAssignments504 = GatewayTimeoutError;
|
|
96
123
|
const OrganizationsGetTrustTier200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
97
124
|
tier: Schema.Union([
|
|
98
125
|
Schema.Literal("screened"),
|
|
@@ -235,7 +262,40 @@ var OrganizationsGroup = class extends HttpApiGroup.make("Organizations").add(Ht
|
|
|
235
262
|
OrganizationsDelete500,
|
|
236
263
|
OrganizationsDelete504.pipe(HttpApiSchema.status(504))
|
|
237
264
|
]
|
|
238
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "organizations.delete").annotate(OpenApi.Summary, "Delete the current organization").annotate(OpenApi.Description, "Starts an owner-authorized organization deletion operation, confirming the organization name in the request. Repeating the same request with the same Idempotency-Key returns the existing organization-scoped operation."), HttpApiEndpoint.
|
|
265
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "organizations.delete").annotate(OpenApi.Summary, "Delete the current organization").annotate(OpenApi.Description, "Starts an owner-authorized organization deletion operation, confirming the organization name in the request. Repeating the same request with the same Idempotency-Key returns the existing organization-scoped operation."), HttpApiEndpoint.post("organizationsAssignPersonalMailbox", "/v1/organizations/members/:userId/personal-mailbox", {
|
|
266
|
+
params: OrganizationsAssignPersonalMailboxPathParams,
|
|
267
|
+
payload: OrganizationsAssignPersonalMailboxRequestJson,
|
|
268
|
+
success: OrganizationsAssignPersonalMailbox200,
|
|
269
|
+
error: [
|
|
270
|
+
OrganizationsAssignPersonalMailbox401.pipe(HttpApiSchema.status(401)),
|
|
271
|
+
OrganizationsAssignPersonalMailbox402.pipe(HttpApiSchema.status(402)),
|
|
272
|
+
OrganizationsAssignPersonalMailbox403.pipe(HttpApiSchema.status(403)),
|
|
273
|
+
OrganizationsAssignPersonalMailbox404.pipe(HttpApiSchema.status(404)),
|
|
274
|
+
OrganizationsAssignPersonalMailbox409.pipe(HttpApiSchema.status(409)),
|
|
275
|
+
OrganizationsAssignPersonalMailbox422.pipe(HttpApiSchema.status(422)),
|
|
276
|
+
OrganizationsAssignPersonalMailbox500,
|
|
277
|
+
OrganizationsAssignPersonalMailbox502.pipe(HttpApiSchema.status(502)),
|
|
278
|
+
OrganizationsAssignPersonalMailbox504.pipe(HttpApiSchema.status(504))
|
|
279
|
+
]
|
|
280
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "organizations.assignPersonalMailbox").annotate(OpenApi.Summary, "Assign a personal mailbox").annotate(OpenApi.Description, "Assigns a personal address to an existing member. Only organization owners and admins may assign it; the member receives the sole user grant. Returns the mailbox ID without granting the assigner access."), HttpApiEndpoint.get("organizationsGetPersonalMailboxAddressOptions", "/v1/organizations/personal-mailboxes/address-options", {
|
|
281
|
+
success: OrganizationsGetPersonalMailboxAddressOptions200,
|
|
282
|
+
error: [
|
|
283
|
+
OrganizationsGetPersonalMailboxAddressOptions401.pipe(HttpApiSchema.status(401)),
|
|
284
|
+
OrganizationsGetPersonalMailboxAddressOptions403.pipe(HttpApiSchema.status(403)),
|
|
285
|
+
OrganizationsGetPersonalMailboxAddressOptions422.pipe(HttpApiSchema.status(422)),
|
|
286
|
+
OrganizationsGetPersonalMailboxAddressOptions500,
|
|
287
|
+
OrganizationsGetPersonalMailboxAddressOptions504.pipe(HttpApiSchema.status(504))
|
|
288
|
+
]
|
|
289
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "organizations.getPersonalMailboxAddressOptions").annotate(OpenApi.Summary, "Get personal address domains").annotate(OpenApi.Description, "Returns this organization's verified active receiving domains and a default domain. When none are available, returns the organization's hosted mail domain. Only organization owners and admins may read these options."), HttpApiEndpoint.get("organizationsListPersonalMailboxAssignments", "/v1/organizations/personal-mailboxes/assignments", {
|
|
290
|
+
success: OrganizationsListPersonalMailboxAssignments200,
|
|
291
|
+
error: [
|
|
292
|
+
OrganizationsListPersonalMailboxAssignments401.pipe(HttpApiSchema.status(401)),
|
|
293
|
+
OrganizationsListPersonalMailboxAssignments403.pipe(HttpApiSchema.status(403)),
|
|
294
|
+
OrganizationsListPersonalMailboxAssignments422.pipe(HttpApiSchema.status(422)),
|
|
295
|
+
OrganizationsListPersonalMailboxAssignments500,
|
|
296
|
+
OrganizationsListPersonalMailboxAssignments504.pipe(HttpApiSchema.status(504))
|
|
297
|
+
]
|
|
298
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "organizations.listPersonalMailboxAssignments").annotate(OpenApi.Summary, "List members with personal mailboxes").annotate(OpenApi.Description, "Returns the user IDs with a personal mailbox in this organization, including paused mailboxes. Only organization owners and admins may list assignments. This grants no mailbox access."), HttpApiEndpoint.get("organizationsGetTrustTier", "/v1/organizations/trust-tier", {
|
|
239
299
|
success: OrganizationsGetTrustTier200,
|
|
240
300
|
error: [
|
|
241
301
|
OrganizationsGetTrustTier401.pipe(HttpApiSchema.status(401)),
|
|
@@ -257,6 +317,6 @@ var OrganizationsGroup = class extends HttpApiGroup.make("Organizations").add(Ht
|
|
|
257
317
|
OrganizationsGetUsage504.pipe(HttpApiSchema.status(504))
|
|
258
318
|
]
|
|
259
319
|
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "organizations.getUsage").annotate(OpenApi.Summary, "Get organization usage").annotate(OpenApi.Description, "Returns usage statistics for the current organization between `after` and `before`, which default to the current calendar month so far. `usage.periodStart` and `usage.periodEnd` echo the window counted.")).annotate(OpenApi.Description, "Organization management and usage statistics") {};
|
|
260
|
-
export { Organization, OrganizationsCreate200, OrganizationsCreate401, OrganizationsCreate402, OrganizationsCreate403, OrganizationsCreate422, OrganizationsCreate500, OrganizationsCreate502, OrganizationsCreate504, OrganizationsCreateAvatarUpload200, OrganizationsCreateAvatarUpload401, OrganizationsCreateAvatarUpload403, OrganizationsCreateAvatarUpload422, OrganizationsCreateAvatarUpload500, OrganizationsCreateAvatarUpload504, OrganizationsCreateRequestJson, OrganizationsDelete202, OrganizationsDelete401, OrganizationsDelete403, OrganizationsDelete409, OrganizationsDelete422, OrganizationsDelete500, OrganizationsDelete504, OrganizationsDeleteHeaders, OrganizationsDeleteRequestJson, OrganizationsGet200, OrganizationsGet401, OrganizationsGet403, OrganizationsGet404, OrganizationsGet422, OrganizationsGet500, OrganizationsGet504, OrganizationsGetProfile200, OrganizationsGetProfile401, OrganizationsGetProfile403, OrganizationsGetProfile422, OrganizationsGetProfile500, OrganizationsGetProfile504, OrganizationsGetTrustTier200, OrganizationsGetTrustTier401, OrganizationsGetTrustTier403, OrganizationsGetTrustTier404, OrganizationsGetTrustTier422, OrganizationsGetTrustTier500, OrganizationsGetTrustTier502, OrganizationsGetTrustTier504, OrganizationsGetUsage200, OrganizationsGetUsage401, OrganizationsGetUsage403, OrganizationsGetUsage422, OrganizationsGetUsage500, OrganizationsGetUsage504, OrganizationsGetUsageQuery, OrganizationsGroup, OrganizationsUpdate200, OrganizationsUpdate401, OrganizationsUpdate403, OrganizationsUpdate404, OrganizationsUpdate422, OrganizationsUpdate500, OrganizationsUpdate504, OrganizationsUpdateRequestJson, PhoneRegion };
|
|
320
|
+
export { Organization, OrganizationsAssignPersonalMailbox200, OrganizationsAssignPersonalMailbox401, OrganizationsAssignPersonalMailbox402, OrganizationsAssignPersonalMailbox403, OrganizationsAssignPersonalMailbox404, OrganizationsAssignPersonalMailbox409, OrganizationsAssignPersonalMailbox422, OrganizationsAssignPersonalMailbox500, OrganizationsAssignPersonalMailbox502, OrganizationsAssignPersonalMailbox504, OrganizationsAssignPersonalMailboxPathParams, OrganizationsAssignPersonalMailboxRequestJson, OrganizationsCreate200, OrganizationsCreate401, OrganizationsCreate402, OrganizationsCreate403, OrganizationsCreate422, OrganizationsCreate500, OrganizationsCreate502, OrganizationsCreate504, OrganizationsCreateAvatarUpload200, OrganizationsCreateAvatarUpload401, OrganizationsCreateAvatarUpload403, OrganizationsCreateAvatarUpload422, OrganizationsCreateAvatarUpload500, OrganizationsCreateAvatarUpload504, OrganizationsCreateRequestJson, OrganizationsDelete202, OrganizationsDelete401, OrganizationsDelete403, OrganizationsDelete409, OrganizationsDelete422, OrganizationsDelete500, OrganizationsDelete504, OrganizationsDeleteHeaders, OrganizationsDeleteRequestJson, OrganizationsGet200, OrganizationsGet401, OrganizationsGet403, OrganizationsGet404, OrganizationsGet422, OrganizationsGet500, OrganizationsGet504, OrganizationsGetPersonalMailboxAddressOptions200, OrganizationsGetPersonalMailboxAddressOptions401, OrganizationsGetPersonalMailboxAddressOptions403, OrganizationsGetPersonalMailboxAddressOptions422, OrganizationsGetPersonalMailboxAddressOptions500, OrganizationsGetPersonalMailboxAddressOptions504, OrganizationsGetProfile200, OrganizationsGetProfile401, OrganizationsGetProfile403, OrganizationsGetProfile422, OrganizationsGetProfile500, OrganizationsGetProfile504, OrganizationsGetTrustTier200, OrganizationsGetTrustTier401, OrganizationsGetTrustTier403, OrganizationsGetTrustTier404, OrganizationsGetTrustTier422, OrganizationsGetTrustTier500, OrganizationsGetTrustTier502, OrganizationsGetTrustTier504, OrganizationsGetUsage200, OrganizationsGetUsage401, OrganizationsGetUsage403, OrganizationsGetUsage422, OrganizationsGetUsage500, OrganizationsGetUsage504, OrganizationsGetUsageQuery, OrganizationsGroup, OrganizationsListPersonalMailboxAssignments200, OrganizationsListPersonalMailboxAssignments401, OrganizationsListPersonalMailboxAssignments403, OrganizationsListPersonalMailboxAssignments422, OrganizationsListPersonalMailboxAssignments500, OrganizationsListPersonalMailboxAssignments504, OrganizationsUpdate200, OrganizationsUpdate401, OrganizationsUpdate403, OrganizationsUpdate404, OrganizationsUpdate422, OrganizationsUpdate500, OrganizationsUpdate504, OrganizationsUpdateRequestJson, PhoneRegion };
|
|
261
321
|
|
|
262
322
|
//# sourceMappingURL=organizations.js.map
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
import type * as EffectBrand from "effect/Brand";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
|
-
import { ApiKeySecurityMiddleware, ConflictError, ConversationId, Cursor, EmailAttachments, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailCustomHeaders, EmailFooterOverride, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, InternalError, MessageId, MessageMetadata, RenderLocale, RenderTimeZone, ReplyToAddresses, ResourceNotFoundError, SenderNotReadyError, TemplateData, TemplateId, TemplateInputContractId, TemplatePublicationId, TopicId, UnauthorizedError, ValidationError, __SamvaRuntimeAbsoluteInstant } from "./shared";
|
|
4
|
+
import { ApiKeySecurityMiddleware, ConflictError, ContactId, ConversationId, Cursor, EmailAttachments, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailCustomHeaders, EmailFooterOverride, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, InternalError, MessageId, MessageMetadata, RenderLocale, RenderTimeZone, ReplyToAddresses, ResourceNotFoundError, SenderNotReadyError, TemplateData, TemplateId, TemplateInputContractId, TemplatePublicationId, TopicId, UnauthorizedError, ValidationError, __SamvaRuntimeAbsoluteInstant } from "./shared";
|
|
5
5
|
export type ScheduledMessageId = string & EffectBrand.Brand<"ScheduledMessageId">;
|
|
6
6
|
export declare const ScheduledMessageId: Schema.brand<Schema.String, "ScheduledMessageId">;
|
|
7
|
+
export type SavedEmailRecipient = {
|
|
8
|
+
readonly contactId: ContactId;
|
|
9
|
+
} | {
|
|
10
|
+
readonly email: string;
|
|
11
|
+
readonly name?: string | null;
|
|
12
|
+
readonly displayName?: string | null;
|
|
13
|
+
};
|
|
14
|
+
export declare const SavedEmailRecipient: Schema.Union<readonly [Schema.Struct<{
|
|
15
|
+
readonly contactId: Schema.brand<Schema.String, "ContactId">;
|
|
16
|
+
}>, Schema.Struct<{
|
|
17
|
+
readonly email: Schema.String;
|
|
18
|
+
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
19
|
+
readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
20
|
+
}>]>;
|
|
7
21
|
export type EmailDispatchContent = {
|
|
8
22
|
readonly subject?: string | null;
|
|
9
23
|
readonly html?: string | null;
|
|
@@ -53,17 +67,20 @@ export declare const EmailDispatchContent: Schema.Struct<{
|
|
|
53
67
|
}>>;
|
|
54
68
|
readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
|
|
55
69
|
}>;
|
|
56
|
-
export type
|
|
70
|
+
export type StoredSendMessagePayload = {
|
|
57
71
|
readonly conversationId?: ConversationId | null;
|
|
58
72
|
readonly metadata?: MessageMetadata;
|
|
59
73
|
readonly channel: "email";
|
|
60
|
-
readonly to:
|
|
61
|
-
readonly cc?:
|
|
62
|
-
readonly bcc?:
|
|
63
|
-
readonly from?:
|
|
74
|
+
readonly to: ReadonlyArray<SavedEmailRecipient>;
|
|
75
|
+
readonly cc?: ReadonlyArray<SavedEmailRecipient> | null;
|
|
76
|
+
readonly bcc?: ReadonlyArray<SavedEmailRecipient> | null;
|
|
77
|
+
readonly from?: {
|
|
78
|
+
readonly email: string;
|
|
79
|
+
readonly name?: string | null;
|
|
80
|
+
} | null;
|
|
64
81
|
readonly email: EmailContent;
|
|
65
82
|
};
|
|
66
|
-
export declare const
|
|
83
|
+
export declare const StoredSendMessagePayload: Schema.Struct<{
|
|
67
84
|
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
68
85
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
|
|
69
86
|
readonly channel: Schema.Literal<"email">;
|
|
@@ -198,7 +215,7 @@ export type ScheduledMessage = {
|
|
|
198
215
|
readonly status: "pending" | "dispatching" | "paused" | "dispatched" | "cancelled" | "failed";
|
|
199
216
|
readonly scheduledFor: string;
|
|
200
217
|
readonly timezone: string;
|
|
201
|
-
readonly send:
|
|
218
|
+
readonly send: StoredSendMessagePayload;
|
|
202
219
|
readonly messageId: MessageId | null;
|
|
203
220
|
readonly idempotencyKey: string | null;
|
|
204
221
|
readonly referenceId: string | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AbsoluteInstant } from "../runtime.js";
|
|
2
|
-
import { ApiKeySecurityMiddleware, ConflictError, ConversationId, Cursor, EmailAttachments, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailCustomHeaders, EmailFooterOverride, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, InternalError, MessageId, MessageMetadata, RenderLocale, RenderTimeZone, ReplyToAddresses, ResourceNotFoundError, SenderNotReadyError, TemplateData, TemplateId, TemplateInputContractId, TemplatePublicationId, TopicId, UnauthorizedError, ValidationError } from "./shared.js";
|
|
2
|
+
import { ApiKeySecurityMiddleware, ConflictError, ContactId, ConversationId, Cursor, EmailAttachments, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailCustomHeaders, EmailFooterOverride, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, InternalError, MessageId, MessageMetadata, RenderLocale, RenderTimeZone, ReplyToAddresses, ResourceNotFoundError, SenderNotReadyError, TemplateData, TemplateId, TemplateInputContractId, TemplatePublicationId, TopicId, UnauthorizedError, ValidationError } from "./shared.js";
|
|
3
3
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
4
4
|
import * as Schema from "effect/Schema";
|
|
5
5
|
// src/effect/generated/scheduled-messages.ts
|
|
@@ -7,6 +7,11 @@ const ScheduledMessageId = /* @__PURE__ */ (() => Schema.String.check(Schema.isP
|
|
|
7
7
|
expected: "a string matching the RegExp ^sched_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
8
8
|
identifier: "ScheduledMessageId"
|
|
9
9
|
})).pipe(Schema.brand("ScheduledMessageId")))();
|
|
10
|
+
const SavedEmailRecipient = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({ contactId: ContactId }), Schema.Struct({
|
|
11
|
+
email: Schema.String,
|
|
12
|
+
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
13
|
+
displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
14
|
+
})]).annotate({ identifier: "SavedEmailRecipient" }))();
|
|
10
15
|
const EmailDispatchContent = /* @__PURE__ */ (() => Schema.Struct({
|
|
11
16
|
subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
12
17
|
html: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -26,16 +31,19 @@ const EmailDispatchContent = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
26
31
|
footer: Schema.optionalKey(EmailFooterOverride),
|
|
27
32
|
headers: Schema.optionalKey(Schema.Union([EmailCustomHeaders, Schema.Null]))
|
|
28
33
|
}).annotate({ identifier: "EmailDispatchContent" }))();
|
|
29
|
-
const
|
|
34
|
+
const StoredSendMessagePayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
30
35
|
conversationId: Schema.optionalKey(Schema.Union([ConversationId, Schema.Null])),
|
|
31
36
|
metadata: Schema.optionalKey(MessageMetadata),
|
|
32
37
|
channel: Schema.Literal("email"),
|
|
33
|
-
to:
|
|
34
|
-
cc: Schema.optionalKey(
|
|
35
|
-
bcc: Schema.optionalKey(
|
|
36
|
-
from: Schema.optionalKey(
|
|
38
|
+
to: Schema.Array(SavedEmailRecipient).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
|
|
39
|
+
cc: Schema.optionalKey(Schema.Union([Schema.Array(SavedEmailRecipient), Schema.Null])),
|
|
40
|
+
bcc: Schema.optionalKey(Schema.Union([Schema.Array(SavedEmailRecipient), Schema.Null])),
|
|
41
|
+
from: Schema.optionalKey(Schema.Union([Schema.Struct({
|
|
42
|
+
email: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
|
|
43
|
+
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
44
|
+
}), Schema.Null])),
|
|
37
45
|
email: EmailContent
|
|
38
|
-
}).annotate({ identifier: "
|
|
46
|
+
}).annotate({ identifier: "StoredSendMessagePayload" }))();
|
|
39
47
|
const DispatchSendMessagePayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
40
48
|
conversationId: Schema.optionalKey(Schema.Union([ConversationId, Schema.Null])),
|
|
41
49
|
metadata: Schema.optionalKey(MessageMetadata),
|
|
@@ -58,7 +66,7 @@ const ScheduledMessage = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
58
66
|
]),
|
|
59
67
|
scheduledFor: Schema.String,
|
|
60
68
|
timezone: Schema.String,
|
|
61
|
-
send:
|
|
69
|
+
send: StoredSendMessagePayload,
|
|
62
70
|
messageId: Schema.Union([MessageId, Schema.Null]),
|
|
63
71
|
idempotencyKey: Schema.Union([Schema.String, Schema.Null]),
|
|
64
72
|
referenceId: Schema.Union([Schema.String, Schema.Null]),
|
|
@@ -204,6 +212,6 @@ var ScheduledMessagesGroup = class extends HttpApiGroup.make("Scheduled Messages
|
|
|
204
212
|
ScheduledMessagesResume504.pipe(HttpApiSchema.status(504))
|
|
205
213
|
]
|
|
206
214
|
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "scheduledMessages.resume").annotate(OpenApi.Summary, "Resume a review-paused scheduled message").annotate(OpenApi.Description, "Explicitly resumes a scheduled message after onboarding review clearance. An overdue message requires either send_now or a new future scheduledFor value.")).annotate(OpenApi.Description, "One-off scheduled message timers") {};
|
|
207
|
-
export { DispatchSendMessagePayload, EmailDispatchContent, ScheduledMessage, ScheduledMessageId, ScheduledMessagePage, ScheduledMessagesCancel200, ScheduledMessagesCancel401, ScheduledMessagesCancel403, ScheduledMessagesCancel404, ScheduledMessagesCancel409, ScheduledMessagesCancel422, ScheduledMessagesCancel500, ScheduledMessagesCancel504, ScheduledMessagesCancelPathParams, ScheduledMessagesCreate201, ScheduledMessagesCreate401, ScheduledMessagesCreate403, ScheduledMessagesCreate409, ScheduledMessagesCreate422, ScheduledMessagesCreate500, ScheduledMessagesCreate502, ScheduledMessagesCreate504, ScheduledMessagesCreateHeaders, ScheduledMessagesCreateRequestJson, ScheduledMessagesGet200, ScheduledMessagesGet401, ScheduledMessagesGet403, ScheduledMessagesGet404, ScheduledMessagesGet422, ScheduledMessagesGet500, ScheduledMessagesGet504, ScheduledMessagesGetPathParams, ScheduledMessagesGroup, ScheduledMessagesList200, ScheduledMessagesList401, ScheduledMessagesList403, ScheduledMessagesList422, ScheduledMessagesList500, ScheduledMessagesList504, ScheduledMessagesListQuery, ScheduledMessagesResume200, ScheduledMessagesResume401, ScheduledMessagesResume403, ScheduledMessagesResume404, ScheduledMessagesResume409, ScheduledMessagesResume422, ScheduledMessagesResume500, ScheduledMessagesResume502, ScheduledMessagesResume503, ScheduledMessagesResume504, ScheduledMessagesResumePathParams, ScheduledMessagesResumeRequestJson,
|
|
215
|
+
export { DispatchSendMessagePayload, EmailDispatchContent, SavedEmailRecipient, ScheduledMessage, ScheduledMessageId, ScheduledMessagePage, ScheduledMessagesCancel200, ScheduledMessagesCancel401, ScheduledMessagesCancel403, ScheduledMessagesCancel404, ScheduledMessagesCancel409, ScheduledMessagesCancel422, ScheduledMessagesCancel500, ScheduledMessagesCancel504, ScheduledMessagesCancelPathParams, ScheduledMessagesCreate201, ScheduledMessagesCreate401, ScheduledMessagesCreate403, ScheduledMessagesCreate409, ScheduledMessagesCreate422, ScheduledMessagesCreate500, ScheduledMessagesCreate502, ScheduledMessagesCreate504, ScheduledMessagesCreateHeaders, ScheduledMessagesCreateRequestJson, ScheduledMessagesGet200, ScheduledMessagesGet401, ScheduledMessagesGet403, ScheduledMessagesGet404, ScheduledMessagesGet422, ScheduledMessagesGet500, ScheduledMessagesGet504, ScheduledMessagesGetPathParams, ScheduledMessagesGroup, ScheduledMessagesList200, ScheduledMessagesList401, ScheduledMessagesList403, ScheduledMessagesList422, ScheduledMessagesList500, ScheduledMessagesList504, ScheduledMessagesListQuery, ScheduledMessagesResume200, ScheduledMessagesResume401, ScheduledMessagesResume403, ScheduledMessagesResume404, ScheduledMessagesResume409, ScheduledMessagesResume422, ScheduledMessagesResume500, ScheduledMessagesResume502, ScheduledMessagesResume503, ScheduledMessagesResume504, ScheduledMessagesResumePathParams, ScheduledMessagesResumeRequestJson, StoredSendMessagePayload };
|
|
208
216
|
|
|
209
217
|
//# sourceMappingURL=scheduled-messages.js.map
|