sendblue 3.12.0 → 3.13.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 (138) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +1 -1
  3. package/resources/v2/groups/groups.d.mts +86 -0
  4. package/resources/v2/groups/groups.d.mts.map +1 -0
  5. package/resources/v2/groups/groups.d.ts +86 -0
  6. package/resources/v2/groups/groups.d.ts.map +1 -0
  7. package/resources/v2/groups/groups.js +35 -0
  8. package/resources/v2/groups/groups.js.map +1 -0
  9. package/resources/v2/groups/groups.mjs +30 -0
  10. package/resources/v2/groups/groups.mjs.map +1 -0
  11. package/resources/v2/groups/index.d.mts +3 -0
  12. package/resources/v2/groups/index.d.mts.map +1 -0
  13. package/resources/v2/groups/index.d.ts +3 -0
  14. package/resources/v2/groups/index.d.ts.map +1 -0
  15. package/resources/v2/groups/index.js +9 -0
  16. package/resources/v2/groups/index.js.map +1 -0
  17. package/resources/v2/groups/index.mjs +4 -0
  18. package/resources/v2/groups/index.mjs.map +1 -0
  19. package/resources/v2/groups/verify/index.d.mts +3 -0
  20. package/resources/v2/groups/verify/index.d.mts.map +1 -0
  21. package/resources/v2/groups/verify/index.d.ts +3 -0
  22. package/resources/v2/groups/verify/index.d.ts.map +1 -0
  23. package/resources/v2/groups/verify/index.js +9 -0
  24. package/resources/v2/groups/verify/index.js.map +1 -0
  25. package/resources/v2/groups/verify/index.mjs +4 -0
  26. package/resources/v2/groups/verify/index.mjs.map +1 -0
  27. package/resources/v2/groups/verify/services/index.d.mts +3 -0
  28. package/resources/v2/groups/verify/services/index.d.mts.map +1 -0
  29. package/resources/v2/groups/verify/services/index.d.ts +3 -0
  30. package/resources/v2/groups/verify/services/index.d.ts.map +1 -0
  31. package/resources/v2/groups/verify/services/index.js +9 -0
  32. package/resources/v2/groups/verify/services/index.js.map +1 -0
  33. package/resources/v2/groups/verify/services/index.mjs +4 -0
  34. package/resources/v2/groups/verify/services/index.mjs.map +1 -0
  35. package/resources/v2/groups/verify/services/services.d.mts +10 -0
  36. package/resources/v2/groups/verify/services/services.d.mts.map +1 -0
  37. package/resources/v2/groups/verify/services/services.d.ts +10 -0
  38. package/resources/v2/groups/verify/services/services.d.ts.map +1 -0
  39. package/resources/v2/groups/verify/services/services.js +17 -0
  40. package/resources/v2/groups/verify/services/services.js.map +1 -0
  41. package/resources/v2/groups/verify/services/services.mjs +12 -0
  42. package/resources/v2/groups/verify/services/services.mjs.map +1 -0
  43. package/resources/v2/groups/verify/services/verifications.d.mts +145 -0
  44. package/resources/v2/groups/verify/services/verifications.d.mts.map +1 -0
  45. package/resources/v2/groups/verify/services/verifications.d.ts +145 -0
  46. package/resources/v2/groups/verify/services/verifications.d.ts.map +1 -0
  47. package/resources/v2/groups/verify/services/verifications.js +57 -0
  48. package/resources/v2/groups/verify/services/verifications.js.map +1 -0
  49. package/resources/v2/groups/verify/services/verifications.mjs +53 -0
  50. package/resources/v2/groups/verify/services/verifications.mjs.map +1 -0
  51. package/resources/v2/groups/verify/services.d.mts +2 -0
  52. package/resources/v2/groups/verify/services.d.mts.map +1 -0
  53. package/resources/v2/groups/verify/services.d.ts +2 -0
  54. package/resources/v2/groups/verify/services.d.ts.map +1 -0
  55. package/resources/v2/groups/verify/services.js +6 -0
  56. package/resources/v2/groups/verify/services.js.map +1 -0
  57. package/resources/v2/groups/verify/services.mjs +3 -0
  58. package/resources/v2/groups/verify/services.mjs.map +1 -0
  59. package/resources/v2/groups/verify/verify.d.mts +10 -0
  60. package/resources/v2/groups/verify/verify.d.mts.map +1 -0
  61. package/resources/v2/groups/verify/verify.d.ts +10 -0
  62. package/resources/v2/groups/verify/verify.d.ts.map +1 -0
  63. package/resources/v2/groups/verify/verify.js +17 -0
  64. package/resources/v2/groups/verify/verify.js.map +1 -0
  65. package/resources/v2/groups/verify/verify.mjs +12 -0
  66. package/resources/v2/groups/verify/verify.mjs.map +1 -0
  67. package/resources/v2/groups/verify.d.mts +2 -0
  68. package/resources/v2/groups/verify.d.mts.map +1 -0
  69. package/resources/v2/groups/verify.d.ts +2 -0
  70. package/resources/v2/groups/verify.d.ts.map +1 -0
  71. package/resources/v2/groups/verify.js +6 -0
  72. package/resources/v2/groups/verify.js.map +1 -0
  73. package/resources/v2/groups/verify.mjs +3 -0
  74. package/resources/v2/groups/verify.mjs.map +1 -0
  75. package/resources/v2/groups.d.mts +1 -81
  76. package/resources/v2/groups.d.mts.map +1 -1
  77. package/resources/v2/groups.d.ts +1 -81
  78. package/resources/v2/groups.d.ts.map +1 -1
  79. package/resources/v2/groups.js +2 -23
  80. package/resources/v2/groups.js.map +1 -1
  81. package/resources/v2/groups.mjs +1 -21
  82. package/resources/v2/groups.mjs.map +1 -1
  83. package/resources/v2/index.d.mts +1 -1
  84. package/resources/v2/index.d.mts.map +1 -1
  85. package/resources/v2/index.d.ts +1 -1
  86. package/resources/v2/index.d.ts.map +1 -1
  87. package/resources/v2/index.js +4 -4
  88. package/resources/v2/index.js.map +1 -1
  89. package/resources/v2/index.mjs +1 -1
  90. package/resources/v2/index.mjs.map +1 -1
  91. package/resources/v2/v2.d.mts +2 -2
  92. package/resources/v2/v2.d.mts.map +1 -1
  93. package/resources/v2/v2.d.ts +2 -2
  94. package/resources/v2/v2.d.ts.map +1 -1
  95. package/resources/v2/v2.js +2 -2
  96. package/resources/v2/v2.js.map +1 -1
  97. package/resources/v2/v2.mjs +2 -2
  98. package/resources/v2/v2.mjs.map +1 -1
  99. package/resources/verify/index.d.mts +1 -1
  100. package/resources/verify/index.d.mts.map +1 -1
  101. package/resources/verify/index.d.ts +1 -1
  102. package/resources/verify/index.d.ts.map +1 -1
  103. package/resources/verify/index.js.map +1 -1
  104. package/resources/verify/index.mjs.map +1 -1
  105. package/resources/verify/verifications.d.mts +172 -1
  106. package/resources/verify/verifications.d.mts.map +1 -1
  107. package/resources/verify/verifications.d.ts +172 -1
  108. package/resources/verify/verifications.d.ts.map +1 -1
  109. package/resources/verify/verifications.js +51 -0
  110. package/resources/verify/verifications.js.map +1 -1
  111. package/resources/verify/verifications.mjs +51 -0
  112. package/resources/verify/verifications.mjs.map +1 -1
  113. package/resources/verify/verify.d.mts +2 -2
  114. package/resources/verify/verify.d.mts.map +1 -1
  115. package/resources/verify/verify.d.ts +2 -2
  116. package/resources/verify/verify.d.ts.map +1 -1
  117. package/resources/verify/verify.js.map +1 -1
  118. package/resources/verify/verify.mjs.map +1 -1
  119. package/src/resources/v2/groups/groups.ts +114 -0
  120. package/src/resources/v2/groups/index.ts +4 -0
  121. package/src/resources/v2/groups/verify/index.ts +4 -0
  122. package/src/resources/v2/groups/verify/services/index.ts +10 -0
  123. package/src/resources/v2/groups/verify/services/services.ts +27 -0
  124. package/src/resources/v2/groups/verify/services/verifications.ts +201 -0
  125. package/src/resources/v2/groups/verify/services.ts +3 -0
  126. package/src/resources/v2/groups/verify/verify.ts +15 -0
  127. package/src/resources/v2/groups/verify.ts +3 -0
  128. package/src/resources/v2/groups.ts +1 -104
  129. package/src/resources/v2/index.ts +1 -1
  130. package/src/resources/v2/v2.ts +2 -2
  131. package/src/resources/verify/index.ts +6 -0
  132. package/src/resources/verify/verifications.ts +233 -0
  133. package/src/resources/verify/verify.ts +12 -0
  134. package/src/version.ts +1 -1
  135. package/version.d.mts +1 -1
  136. package/version.d.ts +1 -1
  137. package/version.js +1 -1
  138. package/version.mjs +1 -1
@@ -3,13 +3,64 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Verifications = void 0;
5
5
  const resource_1 = require("../../core/resource.js");
6
+ const path_1 = require("../../internal/utils/path.js");
6
7
  /**
7
8
  * Sendblue Verify issuance and recovery state
8
9
  */
9
10
  class Verifications extends resource_1.APIResource {
11
+ /**
12
+ * Creates an inverted-OTP verification for the supplied E.164 phone number. The
13
+ * user must send the returned code from that exact phone number to the returned
14
+ * Sendblue destination number.
15
+ *
16
+ * Include `hosted` to create an origin-bound Hosted Verify widget session.
17
+ * Sendblue API credentials must remain on the customer's backend; only the
18
+ * returned `hosted` values may be sent to the browser. Twilio-compatible clients
19
+ * may alternatively send the API Key ID and API Secret Key with HTTP Basic
20
+ * authentication. Temporary bearer authentication is supported for account-scoped
21
+ * tokens; line-scoped temporary tokens cannot create account-wide Verifications.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * const verification =
26
+ * await client.verify.verifications.create(
27
+ * 'SVE1CB97d8EBbDbaAae6d9B1ca0D1cFaAD',
28
+ * { to: '+14155551212' },
29
+ * );
30
+ * ```
31
+ */
32
+ create(serviceSid, body, options) {
33
+ return this._client.post((0, path_1.path) `/api/v2/verify/services/${serviceSid}/verifications`, { body, ...options });
34
+ }
35
+ /**
36
+ * Returns the authoritative status for one Verification owned by the authenticated
37
+ * account. Twilio-compatible clients may send the API Key ID and API Secret Key
38
+ * with HTTP Basic authentication. Temporary bearer authentication is supported for
39
+ * account-scoped tokens; line-scoped temporary tokens cannot retrieve account-wide
40
+ * Verification state.
41
+ *
42
+ * @example
43
+ * ```ts
44
+ * const verification =
45
+ * await client.verify.verifications.retrieve(
46
+ * 'VRE1CB97d8EBbDbaAae6d9B1ca0D1cFaAD',
47
+ * { service_sid: 'SVE1CB97d8EBbDbaAae6d9B1ca0D1cFaAD' },
48
+ * );
49
+ * ```
50
+ */
51
+ retrieve(verificationSid, params, options) {
52
+ const { service_sid } = params;
53
+ return this._client.get((0, path_1.path) `/api/v2/verify/services/${service_sid}/verifications/${verificationSid}`, options);
54
+ }
10
55
  /**
11
56
  * Account-scoped verification state used to recover terminal Verify events after
12
57
  * an SSE gap.
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * const verifications =
62
+ * await client.verify.verifications.list();
63
+ * ```
13
64
  */
14
65
  list(query = {}, options) {
15
66
  return this._client.get('/api/v2/verify/verifications', { query, ...options });
@@ -1 +1 @@
1
- {"version":3,"file":"verifications.js","sourceRoot":"","sources":["../../src/resources/verify/verifications.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD;;GAEG;AACH,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;OAGG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,8BAA8B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;CACF;AAXD,sCAWC"}
1
+ {"version":3,"file":"verifications.js","sourceRoot":"","sources":["../../src/resources/verify/verifications.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CACJ,UAAkB,EAClB,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,2BAA2B,UAAU,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5G,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CACN,eAAuB,EACvB,MAAkC,EAClC,OAAwB;QAExB,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CACrB,IAAA,WAAI,EAAA,2BAA2B,WAAW,kBAAkB,eAAe,EAAE,EAC7E,OAAO,CACR,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,8BAA8B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;CACF;AA1ED,sCA0EC"}
@@ -1,12 +1,63 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  import { APIResource } from "../../core/resource.mjs";
3
+ import { path } from "../../internal/utils/path.mjs";
3
4
  /**
4
5
  * Sendblue Verify issuance and recovery state
5
6
  */
6
7
  export class Verifications extends APIResource {
8
+ /**
9
+ * Creates an inverted-OTP verification for the supplied E.164 phone number. The
10
+ * user must send the returned code from that exact phone number to the returned
11
+ * Sendblue destination number.
12
+ *
13
+ * Include `hosted` to create an origin-bound Hosted Verify widget session.
14
+ * Sendblue API credentials must remain on the customer's backend; only the
15
+ * returned `hosted` values may be sent to the browser. Twilio-compatible clients
16
+ * may alternatively send the API Key ID and API Secret Key with HTTP Basic
17
+ * authentication. Temporary bearer authentication is supported for account-scoped
18
+ * tokens; line-scoped temporary tokens cannot create account-wide Verifications.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * const verification =
23
+ * await client.verify.verifications.create(
24
+ * 'SVE1CB97d8EBbDbaAae6d9B1ca0D1cFaAD',
25
+ * { to: '+14155551212' },
26
+ * );
27
+ * ```
28
+ */
29
+ create(serviceSid, body, options) {
30
+ return this._client.post(path `/api/v2/verify/services/${serviceSid}/verifications`, { body, ...options });
31
+ }
32
+ /**
33
+ * Returns the authoritative status for one Verification owned by the authenticated
34
+ * account. Twilio-compatible clients may send the API Key ID and API Secret Key
35
+ * with HTTP Basic authentication. Temporary bearer authentication is supported for
36
+ * account-scoped tokens; line-scoped temporary tokens cannot retrieve account-wide
37
+ * Verification state.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * const verification =
42
+ * await client.verify.verifications.retrieve(
43
+ * 'VRE1CB97d8EBbDbaAae6d9B1ca0D1cFaAD',
44
+ * { service_sid: 'SVE1CB97d8EBbDbaAae6d9B1ca0D1cFaAD' },
45
+ * );
46
+ * ```
47
+ */
48
+ retrieve(verificationSid, params, options) {
49
+ const { service_sid } = params;
50
+ return this._client.get(path `/api/v2/verify/services/${service_sid}/verifications/${verificationSid}`, options);
51
+ }
7
52
  /**
8
53
  * Account-scoped verification state used to recover terminal Verify events after
9
54
  * an SSE gap.
55
+ *
56
+ * @example
57
+ * ```ts
58
+ * const verifications =
59
+ * await client.verify.verifications.list();
60
+ * ```
10
61
  */
11
62
  list(query = {}, options) {
12
63
  return this._client.get('/api/v2/verify/verifications', { query, ...options });
@@ -1 +1 @@
1
- {"version":3,"file":"verifications.mjs","sourceRoot":"","sources":["../../src/resources/verify/verifications.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAIlD;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;OAGG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,8BAA8B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;CACF"}
1
+ {"version":3,"file":"verifications.mjs","sourceRoot":"","sources":["../../src/resources/verify/verifications.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAGlD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CACJ,UAAkB,EAClB,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,2BAA2B,UAAU,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5G,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CACN,eAAuB,EACvB,MAAkC,EAClC,OAAwB;QAExB,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CACrB,IAAI,CAAA,2BAA2B,WAAW,kBAAkB,eAAe,EAAE,EAC7E,OAAO,CACR,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,8BAA8B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;CACF"}
@@ -1,10 +1,10 @@
1
1
  import { APIResource } from "../../core/resource.mjs";
2
2
  import * as VerificationsAPI from "./verifications.mjs";
3
- import { VerificationListParams, VerificationListResponse, VerificationState, Verifications } from "./verifications.mjs";
3
+ import { DeliveryTarget, HostedVerification, VerificationCreateParams, VerificationCreateResponse, VerificationListParams, VerificationListResponse, VerificationRetrieveParams, VerificationRetrieveResponse, VerificationState, Verifications } from "./verifications.mjs";
4
4
  export declare class Verify extends APIResource {
5
5
  verifications: VerificationsAPI.Verifications;
6
6
  }
7
7
  export declare namespace Verify {
8
- export { Verifications as Verifications, type VerificationState as VerificationState, type VerificationListResponse as VerificationListResponse, type VerificationListParams as VerificationListParams, };
8
+ export { Verifications as Verifications, type VerificationState as VerificationState, type DeliveryTarget as DeliveryTarget, type HostedVerification as HostedVerification, type VerificationCreateResponse as VerificationCreateResponse, type VerificationRetrieveResponse as VerificationRetrieveResponse, type VerificationListResponse as VerificationListResponse, type VerificationCreateParams as VerificationCreateParams, type VerificationRetrieveParams as VerificationRetrieveParams, type VerificationListParams as VerificationListParams, };
9
9
  }
10
10
  //# sourceMappingURL=verify.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"verify.d.mts","sourceRoot":"","sources":["../../src/resources/verify/verify.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,gBAAgB,4BAAwB;AACpD,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,iBAAiB,EACjB,aAAa,EACd,4BAAwB;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC,aAAa,EAAE,gBAAgB,CAAC,aAAa,CAAoD;CAClG;AAID,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,aAAa,IAAI,aAAa,EAC9B,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
1
+ {"version":3,"file":"verify.d.mts","sourceRoot":"","sources":["../../src/resources/verify/verify.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,gBAAgB,4BAAwB;AACpD,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,wBAAwB,EACxB,0BAA0B,EAC1B,4BAA4B,EAC5B,iBAAiB,EACjB,aAAa,EACd,4BAAwB;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC,aAAa,EAAE,gBAAgB,CAAC,aAAa,CAAoD;CAClG;AAID,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,aAAa,IAAI,aAAa,EAC9B,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
@@ -1,10 +1,10 @@
1
1
  import { APIResource } from "../../core/resource.js";
2
2
  import * as VerificationsAPI from "./verifications.js";
3
- import { VerificationListParams, VerificationListResponse, VerificationState, Verifications } from "./verifications.js";
3
+ import { DeliveryTarget, HostedVerification, VerificationCreateParams, VerificationCreateResponse, VerificationListParams, VerificationListResponse, VerificationRetrieveParams, VerificationRetrieveResponse, VerificationState, Verifications } from "./verifications.js";
4
4
  export declare class Verify extends APIResource {
5
5
  verifications: VerificationsAPI.Verifications;
6
6
  }
7
7
  export declare namespace Verify {
8
- export { Verifications as Verifications, type VerificationState as VerificationState, type VerificationListResponse as VerificationListResponse, type VerificationListParams as VerificationListParams, };
8
+ export { Verifications as Verifications, type VerificationState as VerificationState, type DeliveryTarget as DeliveryTarget, type HostedVerification as HostedVerification, type VerificationCreateResponse as VerificationCreateResponse, type VerificationRetrieveResponse as VerificationRetrieveResponse, type VerificationListResponse as VerificationListResponse, type VerificationCreateParams as VerificationCreateParams, type VerificationRetrieveParams as VerificationRetrieveParams, type VerificationListParams as VerificationListParams, };
9
9
  }
10
10
  //# sourceMappingURL=verify.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../src/resources/verify/verify.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,gBAAgB,2BAAwB;AACpD,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,iBAAiB,EACjB,aAAa,EACd,2BAAwB;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC,aAAa,EAAE,gBAAgB,CAAC,aAAa,CAAoD;CAClG;AAID,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,aAAa,IAAI,aAAa,EAC9B,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
1
+ {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../src/resources/verify/verify.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,gBAAgB,2BAAwB;AACpD,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,wBAAwB,EACxB,0BAA0B,EAC1B,4BAA4B,EAC5B,iBAAiB,EACjB,aAAa,EACd,2BAAwB;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC,aAAa,EAAE,gBAAgB,CAAC,aAAa,CAAoD;CAClG;AAID,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,aAAa,IAAI,aAAa,EAC9B,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"verify.js","sourceRoot":"","sources":["../../src/resources/verify/verify.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,6EAAoD;AACpD,sDAKyB;AAEzB,MAAa,MAAO,SAAQ,sBAAW;IAAvC;;QACE,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnG,CAAC;CAAA;AAFD,wBAEC;AAED,MAAM,CAAC,aAAa,GAAG,6BAAa,CAAC"}
1
+ {"version":3,"file":"verify.js","sourceRoot":"","sources":["../../src/resources/verify/verify.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,6EAAoD;AACpD,sDAWyB;AAEzB,MAAa,MAAO,SAAQ,sBAAW;IAAvC;;QACE,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnG,CAAC;CAAA;AAFD,wBAEC;AAED,MAAM,CAAC,aAAa,GAAG,6BAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"verify.mjs","sourceRoot":"","sources":["../../src/resources/verify/verify.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,gBAAgB,4BAAwB;AACpD,OAAO,EAIL,aAAa,GACd,4BAAwB;AAEzB,MAAM,OAAO,MAAO,SAAQ,WAAW;IAAvC;;QACE,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnG,CAAC;CAAA;AAED,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC"}
1
+ {"version":3,"file":"verify.mjs","sourceRoot":"","sources":["../../src/resources/verify/verify.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,gBAAgB,4BAAwB;AACpD,OAAO,EAUL,aAAa,GACd,4BAAwB;AAEzB,MAAM,OAAO,MAAO,SAAQ,WAAW;IAAvC;;QACE,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnG,CAAC;CAAA;AAED,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC"}
@@ -0,0 +1,114 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import * as VerifyAPI from './verify/verify';
5
+ import { Verify } from './verify/verify';
6
+ import { APIPromise } from '../../../core/api-promise';
7
+ import { RequestOptions } from '../../../internal/request-options';
8
+ import { path } from '../../../internal/utils/path';
9
+
10
+ /**
11
+ * Operations for group messaging (beta)
12
+ */
13
+ export class Groups extends APIResource {
14
+ verify: VerifyAPI.Verify = new VerifyAPI.Verify(this._client);
15
+
16
+ /**
17
+ * Retrieve the current complete membership for a group owned by the authenticated
18
+ * account.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * const group = await client.v2.groups.retrieve(
23
+ * 'sb_group_608acc54-d0d7-4b41-8092-9ff6e1e70455',
24
+ * );
25
+ * ```
26
+ */
27
+ retrieve(groupID: string, options?: RequestOptions): APIPromise<GroupRetrieveResponse> {
28
+ return this._client.get(path`/api/v2/groups/${groupID}`, options);
29
+ }
30
+ }
31
+
32
+ export interface GroupRetrieveResponse {
33
+ data?: GroupRetrieveResponse.Data;
34
+
35
+ status?: string;
36
+ }
37
+
38
+ export namespace GroupRetrieveResponse {
39
+ export interface Data {
40
+ created_at?: string;
41
+
42
+ group_id?: string;
43
+
44
+ group_name?: string;
45
+
46
+ latest_comm_at?: string | null;
47
+
48
+ latest_message_id?: string | null;
49
+
50
+ /**
51
+ * Convenience list of resolved participant phone numbers. Participants with
52
+ * email-only handles remain in participants but are omitted here.
53
+ */
54
+ participant_numbers?: Array<string>;
55
+
56
+ participants?: Array<Data.Participant>;
57
+
58
+ updated_at?: string;
59
+
60
+ /**
61
+ * Worker-local iMessage group identifier when known
62
+ */
63
+ worker_group_id?: string | null;
64
+ }
65
+
66
+ export namespace Data {
67
+ export interface Participant {
68
+ /**
69
+ * Contact ID when this participant is linked to a contact
70
+ */
71
+ contact_id?: string | null;
72
+
73
+ /**
74
+ * Raw participant handle, usually an E.164 phone number but sometimes an iMessage
75
+ * email handle
76
+ */
77
+ handle?: string | null;
78
+
79
+ /**
80
+ * Contact or seat display name when available
81
+ */
82
+ name?: string | null;
83
+
84
+ /**
85
+ * Unique participant row identifier
86
+ */
87
+ participant_id?: string;
88
+
89
+ /**
90
+ * Resolved participant phone number, preferring the stored group phone handle and
91
+ * falling back to contact phone. Email handles remain available in handle.
92
+ */
93
+ phone?: string | null;
94
+
95
+ /**
96
+ * Seat ID when this participant is a team member
97
+ */
98
+ seat_id?: string | null;
99
+
100
+ /**
101
+ * Participant kind
102
+ */
103
+ type?: 'contact' | 'seat';
104
+ }
105
+ }
106
+ }
107
+
108
+ Groups.Verify = Verify;
109
+
110
+ export declare namespace Groups {
111
+ export { type GroupRetrieveResponse as GroupRetrieveResponse };
112
+
113
+ export { Verify as Verify };
114
+ }
@@ -0,0 +1,4 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export { Groups, type GroupRetrieveResponse } from './groups';
4
+ export { Verify } from './verify/index';
@@ -0,0 +1,4 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export { Services } from './services/index';
4
+ export { Verify } from './verify';
@@ -0,0 +1,10 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export { Services } from './services';
4
+ export {
5
+ Verifications,
6
+ type VerificationCreateResponse,
7
+ type VerificationRetrieveResponse,
8
+ type VerificationCreateParams,
9
+ type VerificationRetrieveParams,
10
+ } from './verifications';
@@ -0,0 +1,27 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../../../core/resource';
4
+ import * as VerificationsAPI from './verifications';
5
+ import {
6
+ VerificationCreateParams,
7
+ VerificationCreateResponse,
8
+ VerificationRetrieveParams,
9
+ VerificationRetrieveResponse,
10
+ Verifications,
11
+ } from './verifications';
12
+
13
+ export class Services extends APIResource {
14
+ verifications: VerificationsAPI.Verifications = new VerificationsAPI.Verifications(this._client);
15
+ }
16
+
17
+ Services.Verifications = Verifications;
18
+
19
+ export declare namespace Services {
20
+ export {
21
+ Verifications as Verifications,
22
+ type VerificationCreateResponse as VerificationCreateResponse,
23
+ type VerificationRetrieveResponse as VerificationRetrieveResponse,
24
+ type VerificationCreateParams as VerificationCreateParams,
25
+ type VerificationRetrieveParams as VerificationRetrieveParams,
26
+ };
27
+ }
@@ -0,0 +1,201 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../../../core/resource';
4
+ import * as VerificationsAPI from '../../../../verify/verifications';
5
+ import { APIPromise } from '../../../../../core/api-promise';
6
+ import { RequestOptions } from '../../../../../internal/request-options';
7
+ import { path } from '../../../../../internal/utils/path';
8
+
9
+ /**
10
+ * Sendblue Verify issuance and recovery state
11
+ */
12
+ export class Verifications extends APIResource {
13
+ /**
14
+ * Creates an inverted-OTP verification for the supplied E.164 phone number. The
15
+ * user must send the returned code from that exact phone number to the returned
16
+ * Sendblue destination number.
17
+ *
18
+ * Include `hosted` to create an origin-bound Hosted Verify widget session.
19
+ * Sendblue API credentials must remain on the customer's backend; only the
20
+ * returned `hosted` values may be sent to the browser. Twilio-compatible clients
21
+ * may alternatively send the API Key ID and API Secret Key with HTTP Basic
22
+ * authentication. Temporary bearer authentication is supported for account-scoped
23
+ * tokens; line-scoped temporary tokens cannot create account-wide Verifications.
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * const verification =
28
+ * await client.v2.groups.verify.services.verifications.create(
29
+ * 'SVE1CB97d8EBbDbaAae6d9B1ca0D1cFaAD',
30
+ * { to: '+14155551212' },
31
+ * );
32
+ * ```
33
+ */
34
+ create(
35
+ serviceSid: string,
36
+ body: VerificationCreateParams,
37
+ options?: RequestOptions,
38
+ ): APIPromise<VerificationCreateResponse> {
39
+ return this._client.post(path`/api/v2/verify/services/${serviceSid}/verifications`, { body, ...options });
40
+ }
41
+
42
+ /**
43
+ * Returns the authoritative status for one Verification owned by the authenticated
44
+ * account. Twilio-compatible clients may send the API Key ID and API Secret Key
45
+ * with HTTP Basic authentication. Temporary bearer authentication is supported for
46
+ * account-scoped tokens; line-scoped temporary tokens cannot retrieve account-wide
47
+ * Verification state.
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * const verification =
52
+ * await client.v2.groups.verify.services.verifications.retrieve(
53
+ * 'VRE1CB97d8EBbDbaAae6d9B1ca0D1cFaAD',
54
+ * { service_sid: 'SVE1CB97d8EBbDbaAae6d9B1ca0D1cFaAD' },
55
+ * );
56
+ * ```
57
+ */
58
+ retrieve(
59
+ verificationSid: string,
60
+ params: VerificationRetrieveParams,
61
+ options?: RequestOptions,
62
+ ): APIPromise<VerificationRetrieveResponse> {
63
+ const { service_sid } = params;
64
+ return this._client.get(
65
+ path`/api/v2/verify/services/${service_sid}/verifications/${verificationSid}`,
66
+ options,
67
+ );
68
+ }
69
+ }
70
+
71
+ export interface VerificationCreateResponse {
72
+ account_sid: string;
73
+
74
+ channel: 'imessage';
75
+
76
+ date_created: string;
77
+
78
+ date_updated: string;
79
+
80
+ /**
81
+ * ISO timestamp when the Verification expires.
82
+ */
83
+ expires_at: string;
84
+
85
+ service_sid: string;
86
+
87
+ sid: string;
88
+
89
+ status: 'pending' | 'approved' | 'expired' | 'canceled';
90
+
91
+ /**
92
+ * Expected sender in E.164 format; older durable terminal records may return null.
93
+ */
94
+ to: string | null;
95
+
96
+ url: string;
97
+
98
+ /**
99
+ * Present while the Verification is pending.
100
+ */
101
+ delivery_target?: VerificationsAPI.DeliveryTarget;
102
+
103
+ /**
104
+ * Present only when hosted options were supplied during creation.
105
+ */
106
+ hosted?: VerificationsAPI.HostedVerification;
107
+ }
108
+
109
+ export interface VerificationRetrieveResponse {
110
+ account_sid: string;
111
+
112
+ channel: 'imessage';
113
+
114
+ date_created: string;
115
+
116
+ date_updated: string;
117
+
118
+ /**
119
+ * ISO timestamp when the Verification expires.
120
+ */
121
+ expires_at: string;
122
+
123
+ service_sid: string;
124
+
125
+ sid: string;
126
+
127
+ status: 'pending' | 'approved' | 'expired' | 'canceled';
128
+
129
+ /**
130
+ * Expected sender in E.164 format; older durable terminal records may return null.
131
+ */
132
+ to: string | null;
133
+
134
+ url: string;
135
+
136
+ /**
137
+ * Present while the Verification is pending.
138
+ */
139
+ delivery_target?: VerificationsAPI.DeliveryTarget;
140
+ }
141
+
142
+ export interface VerificationCreateParams {
143
+ /**
144
+ * E.164 phone number that must send the verification message.
145
+ */
146
+ to: string;
147
+
148
+ /**
149
+ * Options for an origin-bound Hosted Verify widget session. Nested keys are strict
150
+ * snake_case. `parent_origin` must be an exact HTTPS origin with a DNS hostname.
151
+ * `127.0.0.1` is also accepted, and HTTP is allowed only for `localhost` or
152
+ * `127.0.0.1` development origins. Wildcards and other IP literals are rejected
153
+ * because browsers cannot enforce them as exact CSP `frame-ancestors` sources.
154
+ */
155
+ hosted?: VerificationCreateParams.Hosted;
156
+ }
157
+
158
+ export namespace VerificationCreateParams {
159
+ /**
160
+ * Options for an origin-bound Hosted Verify widget session. Nested keys are strict
161
+ * snake_case. `parent_origin` must be an exact HTTPS origin with a DNS hostname.
162
+ * `127.0.0.1` is also accepted, and HTTP is allowed only for `localhost` or
163
+ * `127.0.0.1` development origins. Wildcards and other IP literals are rejected
164
+ * because browsers cannot enforce them as exact CSP `frame-ancestors` sources.
165
+ */
166
+ export interface Hosted {
167
+ /**
168
+ * Exact website origin allowed to embed the widget, with no path, query, or
169
+ * fragment.
170
+ */
171
+ parent_origin: string;
172
+
173
+ /**
174
+ * Six-digit hexadecimal accent color.
175
+ */
176
+ accent_color?: string;
177
+
178
+ /**
179
+ * Brand name displayed by the widget. Defaults to Sendblue.
180
+ */
181
+ brand_name?: string;
182
+
183
+ theme?: 'light' | 'dark' | 'auto';
184
+ }
185
+ }
186
+
187
+ export interface VerificationRetrieveParams {
188
+ /**
189
+ * Verify Service SID.
190
+ */
191
+ service_sid: string;
192
+ }
193
+
194
+ export declare namespace Verifications {
195
+ export {
196
+ type VerificationCreateResponse as VerificationCreateResponse,
197
+ type VerificationRetrieveResponse as VerificationRetrieveResponse,
198
+ type VerificationCreateParams as VerificationCreateParams,
199
+ type VerificationRetrieveParams as VerificationRetrieveParams,
200
+ };
201
+ }
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './services/index';
@@ -0,0 +1,15 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../../core/resource';
4
+ import * as ServicesAPI from './services/services';
5
+ import { Services } from './services/services';
6
+
7
+ export class Verify extends APIResource {
8
+ services: ServicesAPI.Services = new ServicesAPI.Services(this._client);
9
+ }
10
+
11
+ Verify.Services = Services;
12
+
13
+ export declare namespace Verify {
14
+ export { Services as Services };
15
+ }
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './verify/index';