samva 0.49.0 → 0.50.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.
@@ -109,9 +109,12 @@ export type ConflictError = {
109
109
  resource: string;
110
110
  id?: string | null | undefined;
111
111
  };
112
+ /**
113
+ * For an immediate submission, `businessAccountId` is the connected number to register on and defaults to the number for the template's scope.
114
+ */
112
115
  export type SubmitTemplateRegistrationPayload = {
113
116
  provider: "whatsapp";
114
- businessAccountId?: WhatsAppBusinessAccountId1 | undefined;
117
+ businessAccountId?: WhatsAppBusinessAccountId | undefined;
115
118
  approval?: TemplateRegistrationApproval | undefined;
116
119
  };
117
120
  /**
@@ -119,7 +122,7 @@ export type SubmitTemplateRegistrationPayload = {
119
122
  */
120
123
  export type TemplateRegistrationApproval = {
121
124
  publicationId: TemplatePublicationId;
122
- businessAccountId: WhatsAppBusinessAccountId2;
125
+ businessAccountId: WhatsAppBusinessAccountId;
123
126
  /**
124
127
  * The Meta business account ID shown for the selected number before approval.
125
128
  */
@@ -129,14 +132,7 @@ export type TemplateRegistrationApproval = {
129
132
  */
130
133
  expectedWorkspaceRevision: string;
131
134
  };
132
- /**
133
- * The connected WhatsApp number selected for this submission.
134
- */
135
- export type WhatsAppBusinessAccountId2 = string;
136
- /**
137
- * For an immediate submission, the connected number to register on. Defaults to the number for the template's scope.
138
- */
139
- export type WhatsAppBusinessAccountId1 = string;
135
+ export type WhatsAppBusinessAccountId = string;
140
136
  export type WhatsAppSetupLinkUnavailableError = {
141
137
  _tag: "WhatsAppSetupLinkUnavailableError";
142
138
  reason: "completed" | "revoked" | "expired";
@@ -156,7 +152,6 @@ export type WhatsAppSetupLink = {
156
152
  createdAt: string;
157
153
  updatedAt: string;
158
154
  };
159
- export type WhatsAppBusinessAccountId = string;
160
155
  export type WhatsAppSetupLinkMetadata = {
161
156
  [key: string]: string;
162
157
  };
@@ -26560,6 +26555,10 @@ export type MailboxesCreateImportUploadErrors = {
26560
26555
  * UnauthorizedError
26561
26556
  */
26562
26557
  401: UnauthorizedError;
26558
+ /**
26559
+ * PaymentRequiredError
26560
+ */
26561
+ 402: PaymentRequiredError;
26563
26562
  /**
26564
26563
  * ForbiddenError
26565
26564
  */
@@ -26580,6 +26579,10 @@ export type MailboxesCreateImportUploadErrors = {
26580
26579
  * InternalError
26581
26580
  */
26582
26581
  500: InternalError;
26582
+ /**
26583
+ * BillingProviderError
26584
+ */
26585
+ 502: BillingProviderError;
26583
26586
  /**
26584
26587
  * GatewayTimeoutError
26585
26588
  */
@@ -26592,20 +26595,139 @@ export type MailboxesCreateImportUploadResponses = {
26592
26595
  */
26593
26596
  200: {
26594
26597
  id: string;
26595
- uploadUrl: string;
26598
+ archiveId: string;
26599
+ partSizeBytes: number;
26596
26600
  };
26597
26601
  };
26598
26602
  export type MailboxesCreateImportUploadResponse = MailboxesCreateImportUploadResponses[keyof MailboxesCreateImportUploadResponses];
26599
- export type MailboxesStartImportData = {
26603
+ export type MailboxesSignImportUploadPartsData = {
26604
+ body: {
26605
+ partNumbers: Array<number>;
26606
+ };
26607
+ path: {
26608
+ id: MailboxId;
26609
+ importId: string;
26610
+ archiveId: string;
26611
+ };
26612
+ query?: never;
26613
+ url: "/v1/mailboxes/{id}/imports/{importId}/uploads/{archiveId}/parts";
26614
+ };
26615
+ export type MailboxesSignImportUploadPartsErrors = {
26616
+ /**
26617
+ * MalformedRequestError
26618
+ */
26619
+ 400: MalformedRequestError;
26620
+ /**
26621
+ * UnauthorizedError
26622
+ */
26623
+ 401: UnauthorizedError;
26624
+ /**
26625
+ * ForbiddenError
26626
+ */
26627
+ 403: ForbiddenError;
26628
+ /**
26629
+ * ResourceNotFoundError
26630
+ */
26631
+ 404: ResourceNotFoundError;
26632
+ /**
26633
+ * ConflictError
26634
+ */
26635
+ 409: ConflictError;
26636
+ /**
26637
+ * ValidationError
26638
+ */
26639
+ 422: ValidationError;
26640
+ /**
26641
+ * InternalError
26642
+ */
26643
+ 500: InternalError;
26644
+ /**
26645
+ * GatewayTimeoutError
26646
+ */
26647
+ 504: GatewayTimeoutError;
26648
+ };
26649
+ export type MailboxesSignImportUploadPartsError = MailboxesSignImportUploadPartsErrors[keyof MailboxesSignImportUploadPartsErrors];
26650
+ export type MailboxesSignImportUploadPartsResponses = {
26651
+ /**
26652
+ * Success
26653
+ */
26654
+ 200: {
26655
+ parts: Array<{
26656
+ partNumber: number;
26657
+ sizeBytes: number;
26658
+ uploadUrl: string;
26659
+ }>;
26660
+ };
26661
+ };
26662
+ export type MailboxesSignImportUploadPartsResponse = MailboxesSignImportUploadPartsResponses[keyof MailboxesSignImportUploadPartsResponses];
26663
+ export type MailboxesCompleteImportUploadData = {
26664
+ body: {
26665
+ parts: Array<{
26666
+ partNumber: number;
26667
+ etag: string;
26668
+ }>;
26669
+ };
26670
+ path: {
26671
+ id: MailboxId;
26672
+ importId: string;
26673
+ archiveId: string;
26674
+ };
26675
+ query?: never;
26676
+ url: "/v1/mailboxes/{id}/imports/{importId}/uploads/{archiveId}/complete";
26677
+ };
26678
+ export type MailboxesCompleteImportUploadErrors = {
26679
+ /**
26680
+ * MalformedRequestError
26681
+ */
26682
+ 400: MalformedRequestError;
26683
+ /**
26684
+ * UnauthorizedError
26685
+ */
26686
+ 401: UnauthorizedError;
26687
+ /**
26688
+ * ForbiddenError
26689
+ */
26690
+ 403: ForbiddenError;
26691
+ /**
26692
+ * ResourceNotFoundError
26693
+ */
26694
+ 404: ResourceNotFoundError;
26695
+ /**
26696
+ * ConflictError
26697
+ */
26698
+ 409: ConflictError;
26699
+ /**
26700
+ * ValidationError
26701
+ */
26702
+ 422: ValidationError;
26703
+ /**
26704
+ * InternalError
26705
+ */
26706
+ 500: InternalError;
26707
+ /**
26708
+ * GatewayTimeoutError
26709
+ */
26710
+ 504: GatewayTimeoutError;
26711
+ };
26712
+ export type MailboxesCompleteImportUploadError = MailboxesCompleteImportUploadErrors[keyof MailboxesCompleteImportUploadErrors];
26713
+ export type MailboxesCompleteImportUploadResponses = {
26714
+ /**
26715
+ * SuccessResponse
26716
+ */
26717
+ 200: SuccessResponse;
26718
+ };
26719
+ export type MailboxesCompleteImportUploadResponse = MailboxesCompleteImportUploadResponses[keyof MailboxesCompleteImportUploadResponses];
26720
+ export type MailboxesDiscardImportUploadData = {
26600
26721
  body?: never;
26601
26722
  path: {
26602
26723
  id: MailboxId;
26603
26724
  importId: string;
26725
+ archiveId: string;
26604
26726
  };
26605
26727
  query?: never;
26606
- url: "/v1/mailboxes/{id}/imports/{importId}/start";
26728
+ url: "/v1/mailboxes/{id}/imports/{importId}/uploads/{archiveId}";
26607
26729
  };
26608
- export type MailboxesStartImportErrors = {
26730
+ export type MailboxesDiscardImportUploadErrors = {
26609
26731
  /**
26610
26732
  * MalformedRequestError
26611
26733
  */
@@ -26639,14 +26761,65 @@ export type MailboxesStartImportErrors = {
26639
26761
  */
26640
26762
  504: GatewayTimeoutError;
26641
26763
  };
26642
- export type MailboxesStartImportError = MailboxesStartImportErrors[keyof MailboxesStartImportErrors];
26643
- export type MailboxesStartImportResponses = {
26764
+ export type MailboxesDiscardImportUploadError = MailboxesDiscardImportUploadErrors[keyof MailboxesDiscardImportUploadErrors];
26765
+ export type MailboxesDiscardImportUploadResponses = {
26644
26766
  /**
26645
- * MailHistoryImportJob
26767
+ * SuccessResponse
26646
26768
  */
26647
- 200: MailHistoryImportJob;
26769
+ 200: SuccessResponse;
26648
26770
  };
26649
- export type MailboxesStartImportResponse = MailboxesStartImportResponses[keyof MailboxesStartImportResponses];
26771
+ export type MailboxesDiscardImportUploadResponse = MailboxesDiscardImportUploadResponses[keyof MailboxesDiscardImportUploadResponses];
26772
+ export type MailboxesDiscardImportData = {
26773
+ body?: never;
26774
+ path: {
26775
+ id: MailboxId;
26776
+ importId: string;
26777
+ };
26778
+ query?: never;
26779
+ url: "/v1/mailboxes/{id}/imports/{importId}";
26780
+ };
26781
+ export type MailboxesDiscardImportErrors = {
26782
+ /**
26783
+ * MalformedRequestError
26784
+ */
26785
+ 400: MalformedRequestError;
26786
+ /**
26787
+ * UnauthorizedError
26788
+ */
26789
+ 401: UnauthorizedError;
26790
+ /**
26791
+ * ForbiddenError
26792
+ */
26793
+ 403: ForbiddenError;
26794
+ /**
26795
+ * ResourceNotFoundError
26796
+ */
26797
+ 404: ResourceNotFoundError;
26798
+ /**
26799
+ * ConflictError
26800
+ */
26801
+ 409: ConflictError;
26802
+ /**
26803
+ * ValidationError
26804
+ */
26805
+ 422: ValidationError;
26806
+ /**
26807
+ * InternalError
26808
+ */
26809
+ 500: InternalError;
26810
+ /**
26811
+ * GatewayTimeoutError
26812
+ */
26813
+ 504: GatewayTimeoutError;
26814
+ };
26815
+ export type MailboxesDiscardImportError = MailboxesDiscardImportErrors[keyof MailboxesDiscardImportErrors];
26816
+ export type MailboxesDiscardImportResponses = {
26817
+ /**
26818
+ * SuccessResponse
26819
+ */
26820
+ 200: SuccessResponse;
26821
+ };
26822
+ export type MailboxesDiscardImportResponse = MailboxesDiscardImportResponses[keyof MailboxesDiscardImportResponses];
26650
26823
  export type MailboxesGetImportData = {
26651
26824
  body?: never;
26652
26825
  path: {
@@ -26694,6 +26867,57 @@ export type MailboxesGetImportResponses = {
26694
26867
  200: MailHistoryImportJob;
26695
26868
  };
26696
26869
  export type MailboxesGetImportResponse = MailboxesGetImportResponses[keyof MailboxesGetImportResponses];
26870
+ export type MailboxesStartImportData = {
26871
+ body?: never;
26872
+ path: {
26873
+ id: MailboxId;
26874
+ importId: string;
26875
+ };
26876
+ query?: never;
26877
+ url: "/v1/mailboxes/{id}/imports/{importId}/start";
26878
+ };
26879
+ export type MailboxesStartImportErrors = {
26880
+ /**
26881
+ * MalformedRequestError
26882
+ */
26883
+ 400: MalformedRequestError;
26884
+ /**
26885
+ * UnauthorizedError
26886
+ */
26887
+ 401: UnauthorizedError;
26888
+ /**
26889
+ * ForbiddenError
26890
+ */
26891
+ 403: ForbiddenError;
26892
+ /**
26893
+ * ResourceNotFoundError
26894
+ */
26895
+ 404: ResourceNotFoundError;
26896
+ /**
26897
+ * ConflictError
26898
+ */
26899
+ 409: ConflictError;
26900
+ /**
26901
+ * ValidationError
26902
+ */
26903
+ 422: ValidationError;
26904
+ /**
26905
+ * InternalError
26906
+ */
26907
+ 500: InternalError;
26908
+ /**
26909
+ * GatewayTimeoutError
26910
+ */
26911
+ 504: GatewayTimeoutError;
26912
+ };
26913
+ export type MailboxesStartImportError = MailboxesStartImportErrors[keyof MailboxesStartImportErrors];
26914
+ export type MailboxesStartImportResponses = {
26915
+ /**
26916
+ * MailHistoryImportJob
26917
+ */
26918
+ 200: MailHistoryImportJob;
26919
+ };
26920
+ export type MailboxesStartImportResponse = MailboxesStartImportResponses[keyof MailboxesStartImportResponses];
26697
26921
  export type MailboxesListImportsData = {
26698
26922
  body?: never;
26699
26923
  path: {
@@ -32790,9 +33014,12 @@ export type TemplateRegistrationsListResponses = {
32790
33014
  };
32791
33015
  export type TemplateRegistrationsListResponse = TemplateRegistrationsListResponses[keyof TemplateRegistrationsListResponses];
32792
33016
  export type TemplateRegistrationsSubmitData = {
33017
+ /**
33018
+ * For an immediate submission, `businessAccountId` is the connected number to register on and defaults to the number for the template's scope.
33019
+ */
32793
33020
  body: {
32794
33021
  provider: "whatsapp";
32795
- businessAccountId?: WhatsAppBusinessAccountId1 | undefined;
33022
+ businessAccountId?: WhatsAppBusinessAccountId | undefined;
32796
33023
  approval?: TemplateRegistrationApproval | undefined;
32797
33024
  };
32798
33025
  path: {
@@ -9,11 +9,41 @@ export declare const mailboxesOperations: {
9
9
  readonly paths: readonly ["id"];
10
10
  };
11
11
  };
12
- readonly mailboxesStartImport: {
12
+ readonly mailboxesSignImportUploadParts: {
13
+ readonly group: "Mailboxes";
14
+ readonly method: "POST";
15
+ readonly idempotent: false;
16
+ readonly paginated: false;
17
+ readonly call: {
18
+ readonly kind: "pathPayload";
19
+ readonly paths: readonly ["id", "importId", "archiveId"];
20
+ };
21
+ };
22
+ readonly mailboxesCompleteImportUpload: {
13
23
  readonly group: "Mailboxes";
14
24
  readonly method: "POST";
15
25
  readonly idempotent: false;
16
26
  readonly paginated: false;
27
+ readonly call: {
28
+ readonly kind: "pathPayload";
29
+ readonly paths: readonly ["id", "importId", "archiveId"];
30
+ };
31
+ };
32
+ readonly mailboxesDiscardImportUpload: {
33
+ readonly group: "Mailboxes";
34
+ readonly method: "DELETE";
35
+ readonly idempotent: false;
36
+ readonly paginated: false;
37
+ readonly call: {
38
+ readonly kind: "path";
39
+ readonly paths: readonly ["id", "importId", "archiveId"];
40
+ };
41
+ };
42
+ readonly mailboxesDiscardImport: {
43
+ readonly group: "Mailboxes";
44
+ readonly method: "DELETE";
45
+ readonly idempotent: false;
46
+ readonly paginated: false;
17
47
  readonly call: {
18
48
  readonly kind: "path";
19
49
  readonly paths: readonly ["id", "importId"];
@@ -29,6 +59,16 @@ export declare const mailboxesOperations: {
29
59
  readonly paths: readonly ["id", "importId"];
30
60
  };
31
61
  };
62
+ readonly mailboxesStartImport: {
63
+ readonly group: "Mailboxes";
64
+ readonly method: "POST";
65
+ readonly idempotent: false;
66
+ readonly paginated: false;
67
+ readonly call: {
68
+ readonly kind: "path";
69
+ readonly paths: readonly ["id", "importId"];
70
+ };
71
+ };
32
72
  readonly mailboxesListImports: {
33
73
  readonly group: "Mailboxes";
34
74
  readonly method: "GET";
@@ -10,11 +10,53 @@ const mailboxesOperations = {
10
10
  paths: ["id"]
11
11
  }
12
12
  },
13
- mailboxesStartImport: {
13
+ mailboxesSignImportUploadParts: {
14
+ group: "Mailboxes",
15
+ method: "POST",
16
+ idempotent: false,
17
+ paginated: false,
18
+ call: {
19
+ kind: "pathPayload",
20
+ paths: [
21
+ "id",
22
+ "importId",
23
+ "archiveId"
24
+ ]
25
+ }
26
+ },
27
+ mailboxesCompleteImportUpload: {
14
28
  group: "Mailboxes",
15
29
  method: "POST",
16
30
  idempotent: false,
17
31
  paginated: false,
32
+ call: {
33
+ kind: "pathPayload",
34
+ paths: [
35
+ "id",
36
+ "importId",
37
+ "archiveId"
38
+ ]
39
+ }
40
+ },
41
+ mailboxesDiscardImportUpload: {
42
+ group: "Mailboxes",
43
+ method: "DELETE",
44
+ idempotent: false,
45
+ paginated: false,
46
+ call: {
47
+ kind: "path",
48
+ paths: [
49
+ "id",
50
+ "importId",
51
+ "archiveId"
52
+ ]
53
+ }
54
+ },
55
+ mailboxesDiscardImport: {
56
+ group: "Mailboxes",
57
+ method: "DELETE",
58
+ idempotent: false,
59
+ paginated: false,
18
60
  call: {
19
61
  kind: "path",
20
62
  paths: ["id", "importId"]
@@ -30,6 +72,16 @@ const mailboxesOperations = {
30
72
  paths: ["id", "importId"]
31
73
  }
32
74
  },
75
+ mailboxesStartImport: {
76
+ group: "Mailboxes",
77
+ method: "POST",
78
+ idempotent: false,
79
+ paginated: false,
80
+ call: {
81
+ kind: "path",
82
+ paths: ["id", "importId"]
83
+ }
84
+ },
33
85
  mailboxesListImports: {
34
86
  group: "Mailboxes",
35
87
  method: "GET",