@zavudev/sdk 0.46.0 → 0.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/client.d.mts +6 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs +1 -1
  8. package/client.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/broadcasts/broadcasts.d.mts +1 -1
  11. package/resources/broadcasts/broadcasts.d.mts.map +1 -1
  12. package/resources/broadcasts/broadcasts.d.ts +1 -1
  13. package/resources/broadcasts/broadcasts.d.ts.map +1 -1
  14. package/resources/broadcasts/broadcasts.js.map +1 -1
  15. package/resources/broadcasts/broadcasts.mjs.map +1 -1
  16. package/resources/contacts/channels.d.mts +1 -1
  17. package/resources/contacts/channels.d.mts.map +1 -1
  18. package/resources/contacts/channels.d.ts +1 -1
  19. package/resources/contacts/channels.d.ts.map +1 -1
  20. package/resources/contacts/contacts.d.mts +2 -2
  21. package/resources/contacts/contacts.d.mts.map +1 -1
  22. package/resources/contacts/contacts.d.ts +2 -2
  23. package/resources/contacts/contacts.d.ts.map +1 -1
  24. package/resources/exports.d.mts +0 -97
  25. package/resources/exports.d.mts.map +1 -1
  26. package/resources/exports.d.ts +0 -97
  27. package/resources/exports.d.ts.map +1 -1
  28. package/resources/exports.js +0 -44
  29. package/resources/exports.js.map +1 -1
  30. package/resources/exports.mjs +0 -44
  31. package/resources/exports.mjs.map +1 -1
  32. package/resources/index.d.mts +3 -3
  33. package/resources/index.d.mts.map +1 -1
  34. package/resources/index.d.ts +3 -3
  35. package/resources/index.d.ts.map +1 -1
  36. package/resources/index.js.map +1 -1
  37. package/resources/index.mjs +1 -1
  38. package/resources/index.mjs.map +1 -1
  39. package/resources/invitations.d.mts +24 -3
  40. package/resources/invitations.d.mts.map +1 -1
  41. package/resources/invitations.d.ts +24 -3
  42. package/resources/invitations.d.ts.map +1 -1
  43. package/resources/invitations.js +12 -3
  44. package/resources/invitations.js.map +1 -1
  45. package/resources/invitations.mjs +12 -3
  46. package/resources/invitations.mjs.map +1 -1
  47. package/resources/messages.d.mts +24 -11
  48. package/resources/messages.d.mts.map +1 -1
  49. package/resources/messages.d.ts +24 -11
  50. package/resources/messages.d.ts.map +1 -1
  51. package/resources/phone-numbers.d.mts +1 -1
  52. package/resources/phone-numbers.d.mts.map +1 -1
  53. package/resources/phone-numbers.d.ts +1 -1
  54. package/resources/phone-numbers.d.ts.map +1 -1
  55. package/resources/plan.d.mts +0 -39
  56. package/resources/plan.d.mts.map +1 -1
  57. package/resources/plan.d.ts +0 -39
  58. package/resources/plan.d.ts.map +1 -1
  59. package/resources/plan.js +0 -7
  60. package/resources/plan.js.map +1 -1
  61. package/resources/plan.mjs +0 -7
  62. package/resources/plan.mjs.map +1 -1
  63. package/resources/urls.d.mts +2 -2
  64. package/resources/urls.d.mts.map +1 -1
  65. package/resources/urls.d.ts +2 -2
  66. package/resources/urls.d.ts.map +1 -1
  67. package/resources/usage.d.mts +0 -32
  68. package/resources/usage.d.mts.map +1 -1
  69. package/resources/usage.d.ts +0 -32
  70. package/resources/usage.d.ts.map +1 -1
  71. package/resources/usage.js +0 -7
  72. package/resources/usage.js.map +1 -1
  73. package/resources/usage.mjs +0 -7
  74. package/resources/usage.mjs.map +1 -1
  75. package/src/client.ts +6 -22
  76. package/src/resources/broadcasts/broadcasts.ts +1 -10
  77. package/src/resources/contacts/channels.ts +1 -1
  78. package/src/resources/contacts/contacts.ts +2 -2
  79. package/src/resources/exports.ts +1 -137
  80. package/src/resources/index.ts +3 -11
  81. package/src/resources/invitations.ts +26 -3
  82. package/src/resources/messages.ts +24 -10
  83. package/src/resources/phone-numbers.ts +1 -1
  84. package/src/resources/plan.ts +1 -58
  85. package/src/resources/urls.ts +2 -2
  86. package/src/resources/usage.ts +1 -44
  87. package/src/version.ts +1 -1
  88. package/version.d.mts +1 -1
  89. package/version.d.ts +1 -1
  90. package/version.js +1 -1
  91. package/version.mjs +1 -1
@@ -53,7 +53,7 @@ export interface VerifiedURL {
53
53
  /**
54
54
  * Status of a verified URL.
55
55
  */
56
- status: 'pending' | 'approved' | 'rejected' | 'malicious';
56
+ status: 'pending' | 'approved' | 'rejected' | 'escalated' | 'malicious';
57
57
  /**
58
58
  * The verified URL.
59
59
  */
@@ -74,7 +74,7 @@ export interface URLListVerifiedParams extends CursorParams {
74
74
  /**
75
75
  * Filter by verification status.
76
76
  */
77
- status?: 'pending' | 'approved' | 'rejected' | 'malicious';
77
+ status?: 'pending' | 'approved' | 'rejected' | 'escalated' | 'malicious';
78
78
  }
79
79
  export interface URLSubmitForVerificationParams {
80
80
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"urls.d.mts","sourceRoot":"","sources":["../src/resources/urls.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE,+BAA2B;AAC5E,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;OAUG;IACH,YAAY,CACV,KAAK,GAAE,qBAAqB,GAAG,IAAI,GAAG,SAAc,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,kBAAkB,EAAE,WAAW,CAAC;IAI/C;;;;;;;OAOG;IACH,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;IAIhG;;;;;;;;;;;;;;;OAeG;IACH,qBAAqB,CACnB,IAAI,EAAE,8BAA8B,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gCAAgC,CAAC;CAGhD;AAED,MAAM,MAAM,kBAAkB,GAAG,MAA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ED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,8BAA8B,IAAI,8BAA8B,GACtE,CAAC;CACH"}
@@ -53,7 +53,7 @@ export interface VerifiedURL {
53
53
  /**
54
54
  * Status of a verified URL.
55
55
  */
56
- status: 'pending' | 'approved' | 'rejected' | 'malicious';
56
+ status: 'pending' | 'approved' | 'rejected' | 'escalated' | 'malicious';
57
57
  /**
58
58
  * The verified URL.
59
59
  */
@@ -74,7 +74,7 @@ export interface URLListVerifiedParams extends CursorParams {
74
74
  /**
75
75
  * Filter by verification status.
76
76
  */
77
- status?: 'pending' | 'approved' | 'rejected' | 'malicious';
77
+ status?: 'pending' | 'approved' | 'rejected' | 'escalated' | 'malicious';
78
78
  }
79
79
  export interface URLSubmitForVerificationParams {
80
80
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"urls.d.ts","sourceRoot":"","sources":["../src/resources/urls.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE,8BAA2B;AAC5E,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;OAUG;IACH,YAAY,CACV,KAAK,GAAE,qBAAqB,GAAG,IAAI,GAAG,SAAc,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,kBAAkB,EAAE,WAAW,CAAC;IAI/C;;;;;;;OAOG;IACH,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAA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W,qBAAsB,SAAQ,YAAY;IACzD;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAC;CAC1E;AAED,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,8BAA8B,IAAI,8BAA8B,GACtE,CAAC;CACH"}
@@ -1,36 +1,4 @@
1
1
  import { APIResource } from "../core/resource.mjs";
2
- import { APIPromise } from "../core/api-promise.mjs";
3
- import { RequestOptions } from "../internal/request-options.mjs";
4
2
  export declare class Usage extends APIResource {
5
- /**
6
- * Get the current month's usage counters for A2P messages and emails, along with
7
- * the tier limits.
8
- */
9
- retrieve(options?: RequestOptions): APIPromise<UsageRetrieveResponse>;
10
- }
11
- export interface UsageRetrieveResponse {
12
- /**
13
- * Emails sent this month.
14
- */
15
- emailsSent: number;
16
- limits: UsageRetrieveResponse.Limits;
17
- /**
18
- * A2P messages sent this month (WhatsApp replies + Telegram).
19
- */
20
- messagesA2P: number;
21
- /**
22
- * Current month in YYYY-MM format.
23
- */
24
- monthKey: string;
25
- tier: 'free' | 'pro' | 'scale' | 'enterprise';
26
- }
27
- export declare namespace UsageRetrieveResponse {
28
- interface Limits {
29
- emails?: number;
30
- messagesA2P?: number;
31
- }
32
- }
33
- export declare namespace Usage {
34
- export { type UsageRetrieveResponse as UsageRetrieveResponse };
35
3
  }
36
4
  //# sourceMappingURL=usage.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usage.d.mts","sourceRoot":"","sources":["../src/resources/usage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;CAGtE;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB,MAAM,EAAE,qBAAqB,CAAC,MAAM,CAAC;IAErC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,YAAY,CAAC;CAC/C;AAED,yBAAiB,qBAAqB,CAAC;IACrC,UAAiB,MAAM;QACrB,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,qBAAqB,IAAI,qBAAqB,EAAE,CAAC;CAChE"}
1
+ {"version":3,"file":"usage.d.mts","sourceRoot":"","sources":["../src/resources/usage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,qBAAa,KAAM,SAAQ,WAAW;CAAG"}
@@ -1,36 +1,4 @@
1
1
  import { APIResource } from "../core/resource.js";
2
- import { APIPromise } from "../core/api-promise.js";
3
- import { RequestOptions } from "../internal/request-options.js";
4
2
  export declare class Usage extends APIResource {
5
- /**
6
- * Get the current month's usage counters for A2P messages and emails, along with
7
- * the tier limits.
8
- */
9
- retrieve(options?: RequestOptions): APIPromise<UsageRetrieveResponse>;
10
- }
11
- export interface UsageRetrieveResponse {
12
- /**
13
- * Emails sent this month.
14
- */
15
- emailsSent: number;
16
- limits: UsageRetrieveResponse.Limits;
17
- /**
18
- * A2P messages sent this month (WhatsApp replies + Telegram).
19
- */
20
- messagesA2P: number;
21
- /**
22
- * Current month in YYYY-MM format.
23
- */
24
- monthKey: string;
25
- tier: 'free' | 'pro' | 'scale' | 'enterprise';
26
- }
27
- export declare namespace UsageRetrieveResponse {
28
- interface Limits {
29
- emails?: number;
30
- messagesA2P?: number;
31
- }
32
- }
33
- export declare namespace Usage {
34
- export { type UsageRetrieveResponse as UsageRetrieveResponse };
35
3
  }
36
4
  //# sourceMappingURL=usage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../src/resources/usage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;CAGtE;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB,MAAM,EAAE,qBAAqB,CAAC,MAAM,CAAC;IAErC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,YAAY,CAAC;CAC/C;AAED,yBAAiB,qBAAqB,CAAC;IACrC,UAAiB,MAAM;QACrB,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,qBAAqB,IAAI,qBAAqB,EAAE,CAAC;CAChE"}
1
+ {"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../src/resources/usage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAE/C,qBAAa,KAAM,SAAQ,WAAW;CAAG"}
@@ -4,13 +4,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Usage = void 0;
5
5
  const resource_1 = require("../core/resource.js");
6
6
  class Usage extends resource_1.APIResource {
7
- /**
8
- * Get the current month's usage counters for A2P messages and emails, along with
9
- * the tier limits.
10
- */
11
- retrieve(options) {
12
- return this._client.get('/v1/usage', options);
13
- }
14
7
  }
15
8
  exports.Usage = Usage;
16
9
  //# sourceMappingURL=usage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usage.js","sourceRoot":"","sources":["../src/resources/usage.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;OAGG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;CACF;AARD,sBAQC"}
1
+ {"version":3,"file":"usage.js","sourceRoot":"","sources":["../src/resources/usage.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,MAAa,KAAM,SAAQ,sBAAW;CAAG;AAAzC,sBAAyC"}
@@ -1,12 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  import { APIResource } from "../core/resource.mjs";
3
3
  export class Usage extends APIResource {
4
- /**
5
- * Get the current month's usage counters for A2P messages and emails, along with
6
- * the tier limits.
7
- */
8
- retrieve(options) {
9
- return this._client.get('/v1/usage', options);
10
- }
11
4
  }
12
5
  //# sourceMappingURL=usage.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"usage.mjs","sourceRoot":"","sources":["../src/resources/usage.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;OAGG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;CACF"}
1
+ {"version":3,"file":"usage.mjs","sourceRoot":"","sources":["../src/resources/usage.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,MAAM,OAAO,KAAM,SAAQ,WAAW;CAAG"}
package/src/client.ts CHANGED
@@ -30,15 +30,7 @@ import {
30
30
  AddressesCursor,
31
31
  } from './resources/addresses';
32
32
  import { Balance, BalanceRetrieveResponse } from './resources/balance';
33
- import {
34
- DataExport,
35
- DataExportsCursor,
36
- ExportCreateParams,
37
- ExportCreateResponse,
38
- ExportListParams,
39
- ExportRetrieveResponse,
40
- Exports,
41
- } from './resources/exports';
33
+ import { Exports } from './resources/exports';
42
34
  import {
43
35
  Introspect,
44
36
  IntrospectValidatePhoneParams,
@@ -96,7 +88,7 @@ import {
96
88
  RequirementFieldType,
97
89
  RequirementType,
98
90
  } from './resources/phone-numbers';
99
- import { Plan, PlanRetrieveResponse } from './resources/plan';
91
+ import { Plan } from './resources/plan';
100
92
  import {
101
93
  RegulatoryDocument,
102
94
  RegulatoryDocumentCreateParams,
@@ -125,7 +117,7 @@ import {
125
117
  VerifiedURL,
126
118
  VerifiedURLsCursor,
127
119
  } from './resources/urls';
128
- import { Usage, UsageRetrieveResponse } from './resources/usage';
120
+ import { Usage } from './resources/usage';
129
121
  import {
130
122
  Broadcast,
131
123
  BroadcastCancelResponse,
@@ -1146,15 +1138,7 @@ export declare namespace Zavudev {
1146
1138
  type InvitationListParams as InvitationListParams,
1147
1139
  };
1148
1140
 
1149
- export {
1150
- Exports as Exports,
1151
- type DataExport as DataExport,
1152
- type ExportCreateResponse as ExportCreateResponse,
1153
- type ExportRetrieveResponse as ExportRetrieveResponse,
1154
- type DataExportsCursor as DataExportsCursor,
1155
- type ExportCreateParams as ExportCreateParams,
1156
- type ExportListParams as ExportListParams,
1157
- };
1141
+ export { Exports as Exports };
1158
1142
 
1159
1143
  export {
1160
1144
  URLs as URLs,
@@ -1168,9 +1152,9 @@ export declare namespace Zavudev {
1168
1152
 
1169
1153
  export { Balance as Balance, type BalanceRetrieveResponse as BalanceRetrieveResponse };
1170
1154
 
1171
- export { Plan as Plan, type PlanRetrieveResponse as PlanRetrieveResponse };
1155
+ export { Plan as Plan };
1172
1156
 
1173
- export { Usage as Usage, type UsageRetrieveResponse as UsageRetrieveResponse };
1157
+ export { Usage as Usage };
1174
1158
 
1175
1159
  export {
1176
1160
  SubAccounts as SubAccounts,
@@ -319,16 +319,7 @@ export namespace Broadcast {
319
319
  /**
320
320
  * Broadcast delivery channel. Use 'smart' for per-contact intelligent routing.
321
321
  */
322
- export type BroadcastChannel =
323
- | 'smart'
324
- | 'sms'
325
- | 'sms_oneway'
326
- | 'whatsapp'
327
- | 'telegram'
328
- | 'email'
329
- | 'instagram'
330
- | 'messenger'
331
- | 'voice';
322
+ export type BroadcastChannel = 'smart' | 'sms' | 'sms_oneway' | 'whatsapp' | 'telegram' | 'email';
332
323
 
333
324
  export interface BroadcastContact {
334
325
  id: string;
@@ -133,7 +133,7 @@ export interface ChannelAddParams {
133
133
  /**
134
134
  * Channel type.
135
135
  */
136
- channel: 'sms' | 'whatsapp' | 'email' | 'telegram' | 'messenger' | 'voice';
136
+ channel: 'sms' | 'whatsapp' | 'email' | 'telegram' | 'instagram' | 'messenger' | 'voice';
137
137
 
138
138
  /**
139
139
  * Channel identifier (phone number in E.164 format or email address).
@@ -223,7 +223,7 @@ export interface ContactChannel {
223
223
  /**
224
224
  * Channel type.
225
225
  */
226
- channel: 'sms' | 'whatsapp' | 'email' | 'telegram' | 'messenger' | 'voice';
226
+ channel: 'sms' | 'whatsapp' | 'email' | 'telegram' | 'instagram' | 'messenger' | 'voice';
227
227
 
228
228
  createdAt: string;
229
229
 
@@ -309,7 +309,7 @@ export namespace ContactCreateParams {
309
309
  /**
310
310
  * Channel type.
311
311
  */
312
- channel: 'sms' | 'whatsapp' | 'email' | 'telegram' | 'messenger' | 'voice';
312
+ channel: 'sms' | 'whatsapp' | 'email' | 'telegram' | 'instagram' | 'messenger' | 'voice';
313
313
 
314
314
  /**
315
315
  * Channel identifier (phone number in E.164 format or email address).
@@ -1,141 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
- import { APIPromise } from '../core/api-promise';
5
- import { Cursor, type CursorParams, PagePromise } from '../core/pagination';
6
- import { RequestOptions } from '../internal/request-options';
7
- import { path } from '../internal/utils/path';
8
4
 
9
- export class Exports extends APIResource {
10
- /**
11
- * Create a new data export job. The export will be processed asynchronously and
12
- * the download URL will be available when status is 'completed'. Export links
13
- * expire after 24 hours.
14
- *
15
- * @example
16
- * ```ts
17
- * const _export = await client.exports.create({
18
- * dataTypes: ['messages', 'conversations'],
19
- * dateFrom: '2024-01-01T00:00:00Z',
20
- * dateTo: '2024-12-31T23:59:59Z',
21
- * });
22
- * ```
23
- */
24
- create(body: ExportCreateParams, options?: RequestOptions): APIPromise<ExportCreateResponse> {
25
- return this._client.post('/v1/exports', { body, ...options });
26
- }
27
-
28
- /**
29
- * Get details of a specific data export, including download URL when completed.
30
- *
31
- * @example
32
- * ```ts
33
- * const _export = await client.exports.retrieve('exportId');
34
- * ```
35
- */
36
- retrieve(exportID: string, options?: RequestOptions): APIPromise<ExportRetrieveResponse> {
37
- return this._client.get(path`/v1/exports/${exportID}`, options);
38
- }
39
-
40
- /**
41
- * List data exports for this project.
42
- *
43
- * @example
44
- * ```ts
45
- * // Automatically fetches more pages as needed.
46
- * for await (const dataExport of client.exports.list()) {
47
- * // ...
48
- * }
49
- * ```
50
- */
51
- list(
52
- query: ExportListParams | null | undefined = {},
53
- options?: RequestOptions,
54
- ): PagePromise<DataExportsCursor, DataExport> {
55
- return this._client.getAPIList('/v1/exports', Cursor<DataExport>, { query, ...options });
56
- }
57
- }
58
-
59
- export type DataExportsCursor = Cursor<DataExport>;
60
-
61
- export interface DataExport {
62
- id: string;
63
-
64
- createdAt: string;
65
-
66
- dataTypes: Array<'messages' | 'conversations' | 'webhookDeliveries' | 'agentExecutions' | 'activities'>;
67
-
68
- /**
69
- * When the export download link expires (24 hours after creation).
70
- */
71
- expiresAt: string;
72
-
73
- /**
74
- * Status of a data export job.
75
- */
76
- status: 'pending' | 'processing' | 'completed' | 'failed';
77
-
78
- completedAt?: string | null;
79
-
80
- dateFrom?: string | null;
81
-
82
- dateTo?: string | null;
83
-
84
- /**
85
- * URL to download the export file. Only available when status is 'completed'.
86
- */
87
- downloadUrl?: string | null;
88
-
89
- /**
90
- * Error message if the export failed.
91
- */
92
- errorMessage?: string | null;
93
-
94
- /**
95
- * Size of the export file in bytes.
96
- */
97
- fileSize?: number | null;
98
- }
99
-
100
- export interface ExportCreateResponse {
101
- export: DataExport;
102
- }
103
-
104
- export interface ExportRetrieveResponse {
105
- export: DataExport;
106
- }
107
-
108
- export interface ExportCreateParams {
109
- /**
110
- * List of data types to include in the export.
111
- */
112
- dataTypes: Array<'messages' | 'conversations' | 'webhookDeliveries' | 'agentExecutions' | 'activities'>;
113
-
114
- /**
115
- * Start date for data to export (inclusive).
116
- */
117
- dateFrom?: string;
118
-
119
- /**
120
- * End date for data to export (inclusive).
121
- */
122
- dateTo?: string;
123
- }
124
-
125
- export interface ExportListParams extends CursorParams {
126
- /**
127
- * Status of a data export job.
128
- */
129
- status?: 'pending' | 'processing' | 'completed' | 'failed';
130
- }
131
-
132
- export declare namespace Exports {
133
- export {
134
- type DataExport as DataExport,
135
- type ExportCreateResponse as ExportCreateResponse,
136
- type ExportRetrieveResponse as ExportRetrieveResponse,
137
- type DataExportsCursor as DataExportsCursor,
138
- type ExportCreateParams as ExportCreateParams,
139
- type ExportListParams as ExportListParams,
140
- };
141
- }
5
+ export class Exports extends APIResource {}
@@ -47,15 +47,7 @@ export {
47
47
  type ContactMergeParams,
48
48
  type ContactsCursor,
49
49
  } from './contacts/contacts';
50
- export {
51
- Exports,
52
- type DataExport,
53
- type ExportCreateResponse,
54
- type ExportRetrieveResponse,
55
- type ExportCreateParams,
56
- type ExportListParams,
57
- type DataExportsCursor,
58
- } from './exports';
50
+ export { Exports } from './exports';
59
51
  export {
60
52
  Functions,
61
53
  type FunctionCreateResponse,
@@ -128,7 +120,7 @@ export {
128
120
  type PhoneNumberSearchAvailableParams,
129
121
  type OwnedPhoneNumbersCursor,
130
122
  } from './phone-numbers';
131
- export { Plan, type PlanRetrieveResponse } from './plan';
123
+ export { Plan } from './plan';
132
124
  export {
133
125
  RegulatoryDocuments,
134
126
  type RegulatoryDocument,
@@ -188,4 +180,4 @@ export {
188
180
  type URLSubmitForVerificationParams,
189
181
  type VerifiedURLsCursor,
190
182
  } from './urls';
191
- export { Usage, type UsageRetrieveResponse } from './usage';
183
+ export { Usage } from './usage';
@@ -8,9 +8,18 @@ import { path } from '../internal/utils/path';
8
8
 
9
9
  export class Invitations extends APIResource {
10
10
  /**
11
- * Create a partner invitation link for a client to connect their WhatsApp Business
12
- * account. The client will complete Meta's embedded signup flow and the resulting
13
- * sender will be created in your project.
11
+ * Create a partner invitation link for a client to connect WhatsApp. The client
12
+ * opens the returned `url` and connects. Set `connectionType` to choose how they
13
+ * connect:
14
+ *
15
+ * - `whatsapp_waba` (default): the client completes Meta's embedded signup,
16
+ * linking an official WhatsApp Business Account.
17
+ * - `whatsapp_alt`: the client links their number by scanning a QR code. Requires
18
+ * the WhatsApp Alternative feature to be enabled for your team (otherwise
19
+ * returns 400).
20
+ *
21
+ * Either way, the resulting sender is created in your project when the client
22
+ * completes the flow, and the invitation transitions to `completed`.
14
23
  *
15
24
  * @example
16
25
  * ```ts
@@ -108,6 +117,12 @@ export interface Invitation {
108
117
 
109
118
  completedAt?: string | null;
110
119
 
120
+ /**
121
+ * How the client connects WhatsApp: `whatsapp_waba` (official Cloud API via
122
+ * embedded signup) or `whatsapp_alt` (QR-linked).
123
+ */
124
+ connectionType?: 'whatsapp_waba' | 'whatsapp_alt';
125
+
111
126
  /**
112
127
  * ID of a pre-assigned Zavu phone number for WhatsApp registration.
113
128
  */
@@ -156,6 +171,14 @@ export interface InvitationCreateParams {
156
171
  */
157
172
  clientPhone?: string;
158
173
 
174
+ /**
175
+ * How the client connects WhatsApp. `whatsapp_waba` (default) runs Meta's embedded
176
+ * signup to link an official WhatsApp Business Account. `whatsapp_alt` links the
177
+ * number by scanning a QR code — available only to teams with the WhatsApp
178
+ * Alternative feature enabled.
179
+ */
180
+ connectionType?: 'whatsapp_waba' | 'whatsapp_alt';
181
+
159
182
  /**
160
183
  * Number of days until the invitation expires.
161
184
  */
@@ -140,13 +140,17 @@ export class Messages extends APIResource {
140
140
  export type MessagesCursor = Cursor<Message>;
141
141
 
142
142
  /**
143
- * Delivery channel. Use 'auto' for intelligent routing.
143
+ * Delivery channel. Use 'auto' for intelligent routing. `whatsapp_alt` is the
144
+ * QR-linked WhatsApp channel and is only accepted for teams with the WhatsApp
145
+ * Alternative feature enabled; the sender must have a connected whatsapp_alt
146
+ * session.
144
147
  */
145
148
  export type Channel =
146
149
  | 'auto'
147
150
  | 'sms'
148
151
  | 'sms_oneway'
149
152
  | 'whatsapp'
153
+ | 'whatsapp_alt'
150
154
  | 'telegram'
151
155
  | 'email'
152
156
  | 'instagram'
@@ -157,7 +161,10 @@ export interface Message {
157
161
  id: string;
158
162
 
159
163
  /**
160
- * Delivery channel. Use 'auto' for intelligent routing.
164
+ * Delivery channel. Use 'auto' for intelligent routing. `whatsapp_alt` is the
165
+ * QR-linked WhatsApp channel and is only accepted for teams with the WhatsApp
166
+ * Alternative feature enabled; the sender must have a connected whatsapp_alt
167
+ * session.
161
168
  */
162
169
  channel: Channel;
163
170
 
@@ -179,17 +186,18 @@ export interface Message {
179
186
  content?: MessageContent;
180
187
 
181
188
  /**
182
- * MAU cost in USD (charged for first contact of the month).
189
+ * Zavu platform charge in USD for this message. Messaging is billed against your
190
+ * plan's monthly limits plus usage-based overage.
183
191
  */
184
192
  cost?: number | null;
185
193
 
186
194
  /**
187
- * Provider cost in USD (Telnyx, SES, etc.).
195
+ * Carrier and delivery cost in USD.
188
196
  */
189
197
  costProvider?: number | null;
190
198
 
191
199
  /**
192
- * Total cost in USD (MAU + provider cost).
200
+ * Total cost in USD (platform charge + delivery cost).
193
201
  */
194
202
  costTotal?: number | null;
195
203
 
@@ -463,11 +471,14 @@ export interface MessageShowTypingResponse {
463
471
 
464
472
  export interface MessageListParams extends CursorParams {
465
473
  /**
466
- * Delivery channel. Use 'auto' for intelligent routing.
474
+ * Filter by delivery channel.
467
475
  */
468
- channel?: Channel;
476
+ channel?: 'sms' | 'sms_oneway' | 'whatsapp' | 'email' | 'telegram' | 'instagram' | 'messenger' | 'voice';
469
477
 
470
- status?: MessageStatus;
478
+ /**
479
+ * Filter by status. Not all stored statuses are filterable.
480
+ */
481
+ status?: 'queued' | 'sending' | 'sent' | 'delivered' | 'failed' | 'received';
471
482
 
472
483
  to?: string;
473
484
  }
@@ -487,8 +498,11 @@ export interface MessageReactParams {
487
498
 
488
499
  export interface MessageSendParams {
489
500
  /**
490
- * Body param: Recipient phone number in E.164 format, email address, or numeric
491
- * chat ID (for Telegram/Instagram/Messenger).
501
+ * Body param: Recipient phone number in E.164 format, email address, WhatsApp
502
+ * business-scoped user ID (BSUID, e.g. `US.13491208655302741918`), or numeric chat
503
+ * ID (for Telegram/Instagram/Messenger). A BSUID is routed to WhatsApp and sent
504
+ * via the `recipient` field; use it to message a contact who adopted a username
505
+ * and whose phone number is hidden.
492
506
  */
493
507
  to: string;
494
508
 
@@ -223,7 +223,7 @@ export interface PhoneNumberPricing {
223
223
 
224
224
  export type PhoneNumberStatus = 'active' | 'suspended' | 'pending';
225
225
 
226
- export type PhoneNumberType = 'local' | 'mobile' | 'tollFree';
226
+ export type PhoneNumberType = 'local' | 'national' | 'tollFree';
227
227
 
228
228
  /**
229
229
  * A group of requirements for a specific country/phone type combination.