@sentdm/sentdm 0.3.5

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 (379) hide show
  1. package/CHANGELOG.md +103 -0
  2. package/LICENSE +201 -0
  3. package/README.md +393 -0
  4. package/api-promise.d.mts +2 -0
  5. package/api-promise.d.mts.map +1 -0
  6. package/api-promise.d.ts +2 -0
  7. package/api-promise.d.ts.map +1 -0
  8. package/api-promise.js +6 -0
  9. package/api-promise.js.map +1 -0
  10. package/api-promise.mjs +2 -0
  11. package/api-promise.mjs.map +1 -0
  12. package/client.d.mts +200 -0
  13. package/client.d.mts.map +1 -0
  14. package/client.d.ts +200 -0
  15. package/client.d.ts.map +1 -0
  16. package/client.js +486 -0
  17. package/client.js.map +1 -0
  18. package/client.mjs +482 -0
  19. package/client.mjs.map +1 -0
  20. package/core/api-promise.d.mts +46 -0
  21. package/core/api-promise.d.mts.map +1 -0
  22. package/core/api-promise.d.ts +46 -0
  23. package/core/api-promise.d.ts.map +1 -0
  24. package/core/api-promise.js +74 -0
  25. package/core/api-promise.js.map +1 -0
  26. package/core/api-promise.mjs +70 -0
  27. package/core/api-promise.mjs.map +1 -0
  28. package/core/error.d.mts +46 -0
  29. package/core/error.d.mts.map +1 -0
  30. package/core/error.d.ts +46 -0
  31. package/core/error.d.ts.map +1 -0
  32. package/core/error.js +113 -0
  33. package/core/error.js.map +1 -0
  34. package/core/error.mjs +97 -0
  35. package/core/error.mjs.map +1 -0
  36. package/core/resource.d.mts +6 -0
  37. package/core/resource.d.mts.map +1 -0
  38. package/core/resource.d.ts +6 -0
  39. package/core/resource.d.ts.map +1 -0
  40. package/core/resource.js +11 -0
  41. package/core/resource.js.map +1 -0
  42. package/core/resource.mjs +7 -0
  43. package/core/resource.mjs.map +1 -0
  44. package/core/uploads.d.mts +3 -0
  45. package/core/uploads.d.mts.map +1 -0
  46. package/core/uploads.d.ts +3 -0
  47. package/core/uploads.d.ts.map +1 -0
  48. package/core/uploads.js +6 -0
  49. package/core/uploads.js.map +1 -0
  50. package/core/uploads.mjs +2 -0
  51. package/core/uploads.mjs.map +1 -0
  52. package/error.d.mts +2 -0
  53. package/error.d.mts.map +1 -0
  54. package/error.d.ts +2 -0
  55. package/error.d.ts.map +1 -0
  56. package/error.js +6 -0
  57. package/error.js.map +1 -0
  58. package/error.mjs +2 -0
  59. package/error.mjs.map +1 -0
  60. package/index.d.mts +6 -0
  61. package/index.d.mts.map +1 -0
  62. package/index.d.ts +6 -0
  63. package/index.d.ts.map +1 -0
  64. package/index.js +30 -0
  65. package/index.js.map +1 -0
  66. package/index.mjs +7 -0
  67. package/index.mjs.map +1 -0
  68. package/internal/builtin-types.d.mts +73 -0
  69. package/internal/builtin-types.d.mts.map +1 -0
  70. package/internal/builtin-types.d.ts +73 -0
  71. package/internal/builtin-types.d.ts.map +1 -0
  72. package/internal/builtin-types.js +4 -0
  73. package/internal/builtin-types.js.map +1 -0
  74. package/internal/builtin-types.mjs +3 -0
  75. package/internal/builtin-types.mjs.map +1 -0
  76. package/internal/detect-platform.d.mts +15 -0
  77. package/internal/detect-platform.d.mts.map +1 -0
  78. package/internal/detect-platform.d.ts +15 -0
  79. package/internal/detect-platform.d.ts.map +1 -0
  80. package/internal/detect-platform.js +162 -0
  81. package/internal/detect-platform.js.map +1 -0
  82. package/internal/detect-platform.mjs +157 -0
  83. package/internal/detect-platform.mjs.map +1 -0
  84. package/internal/errors.d.mts +3 -0
  85. package/internal/errors.d.mts.map +1 -0
  86. package/internal/errors.d.ts +3 -0
  87. package/internal/errors.d.ts.map +1 -0
  88. package/internal/errors.js +41 -0
  89. package/internal/errors.js.map +1 -0
  90. package/internal/errors.mjs +36 -0
  91. package/internal/errors.mjs.map +1 -0
  92. package/internal/headers.d.mts +20 -0
  93. package/internal/headers.d.mts.map +1 -0
  94. package/internal/headers.d.ts +20 -0
  95. package/internal/headers.d.ts.map +1 -0
  96. package/internal/headers.js +79 -0
  97. package/internal/headers.js.map +1 -0
  98. package/internal/headers.mjs +74 -0
  99. package/internal/headers.mjs.map +1 -0
  100. package/internal/parse.d.mts +12 -0
  101. package/internal/parse.d.mts.map +1 -0
  102. package/internal/parse.d.ts +12 -0
  103. package/internal/parse.d.ts.map +1 -0
  104. package/internal/parse.js +35 -0
  105. package/internal/parse.js.map +1 -0
  106. package/internal/parse.mjs +32 -0
  107. package/internal/parse.mjs.map +1 -0
  108. package/internal/request-options.d.mts +75 -0
  109. package/internal/request-options.d.mts.map +1 -0
  110. package/internal/request-options.d.ts +75 -0
  111. package/internal/request-options.d.ts.map +1 -0
  112. package/internal/request-options.js +14 -0
  113. package/internal/request-options.js.map +1 -0
  114. package/internal/request-options.mjs +10 -0
  115. package/internal/request-options.mjs.map +1 -0
  116. package/internal/shim-types.d.mts +17 -0
  117. package/internal/shim-types.d.mts.map +1 -0
  118. package/internal/shim-types.d.ts +17 -0
  119. package/internal/shim-types.d.ts.map +1 -0
  120. package/internal/shim-types.js +4 -0
  121. package/internal/shim-types.js.map +1 -0
  122. package/internal/shim-types.mjs +3 -0
  123. package/internal/shim-types.mjs.map +1 -0
  124. package/internal/shims.d.mts +20 -0
  125. package/internal/shims.d.mts.map +1 -0
  126. package/internal/shims.d.ts +20 -0
  127. package/internal/shims.d.ts.map +1 -0
  128. package/internal/shims.js +92 -0
  129. package/internal/shims.js.map +1 -0
  130. package/internal/shims.mjs +85 -0
  131. package/internal/shims.mjs.map +1 -0
  132. package/internal/to-file.d.mts +45 -0
  133. package/internal/to-file.d.mts.map +1 -0
  134. package/internal/to-file.d.ts +45 -0
  135. package/internal/to-file.d.ts.map +1 -0
  136. package/internal/to-file.js +91 -0
  137. package/internal/to-file.js.map +1 -0
  138. package/internal/to-file.mjs +88 -0
  139. package/internal/to-file.mjs.map +1 -0
  140. package/internal/tslib.js +81 -0
  141. package/internal/tslib.mjs +17 -0
  142. package/internal/types.d.mts +69 -0
  143. package/internal/types.d.mts.map +1 -0
  144. package/internal/types.d.ts +69 -0
  145. package/internal/types.d.ts.map +1 -0
  146. package/internal/types.js +4 -0
  147. package/internal/types.js.map +1 -0
  148. package/internal/types.mjs +3 -0
  149. package/internal/types.mjs.map +1 -0
  150. package/internal/uploads.d.mts +42 -0
  151. package/internal/uploads.d.mts.map +1 -0
  152. package/internal/uploads.d.ts +42 -0
  153. package/internal/uploads.d.ts.map +1 -0
  154. package/internal/uploads.js +141 -0
  155. package/internal/uploads.js.map +1 -0
  156. package/internal/uploads.mjs +131 -0
  157. package/internal/uploads.mjs.map +1 -0
  158. package/internal/utils/base64.d.mts +3 -0
  159. package/internal/utils/base64.d.mts.map +1 -0
  160. package/internal/utils/base64.d.ts +3 -0
  161. package/internal/utils/base64.d.ts.map +1 -0
  162. package/internal/utils/base64.js +38 -0
  163. package/internal/utils/base64.js.map +1 -0
  164. package/internal/utils/base64.mjs +33 -0
  165. package/internal/utils/base64.mjs.map +1 -0
  166. package/internal/utils/bytes.d.mts +4 -0
  167. package/internal/utils/bytes.d.mts.map +1 -0
  168. package/internal/utils/bytes.d.ts +4 -0
  169. package/internal/utils/bytes.d.ts.map +1 -0
  170. package/internal/utils/bytes.js +31 -0
  171. package/internal/utils/bytes.js.map +1 -0
  172. package/internal/utils/bytes.mjs +26 -0
  173. package/internal/utils/bytes.mjs.map +1 -0
  174. package/internal/utils/env.d.mts +9 -0
  175. package/internal/utils/env.d.mts.map +1 -0
  176. package/internal/utils/env.d.ts +9 -0
  177. package/internal/utils/env.d.ts.map +1 -0
  178. package/internal/utils/env.js +22 -0
  179. package/internal/utils/env.js.map +1 -0
  180. package/internal/utils/env.mjs +18 -0
  181. package/internal/utils/env.mjs.map +1 -0
  182. package/internal/utils/log.d.mts +37 -0
  183. package/internal/utils/log.d.mts.map +1 -0
  184. package/internal/utils/log.d.ts +37 -0
  185. package/internal/utils/log.d.ts.map +1 -0
  186. package/internal/utils/log.js +87 -0
  187. package/internal/utils/log.js.map +1 -0
  188. package/internal/utils/log.mjs +81 -0
  189. package/internal/utils/log.mjs.map +1 -0
  190. package/internal/utils/path.d.mts +15 -0
  191. package/internal/utils/path.d.mts.map +1 -0
  192. package/internal/utils/path.d.ts +15 -0
  193. package/internal/utils/path.d.ts.map +1 -0
  194. package/internal/utils/path.js +79 -0
  195. package/internal/utils/path.js.map +1 -0
  196. package/internal/utils/path.mjs +74 -0
  197. package/internal/utils/path.mjs.map +1 -0
  198. package/internal/utils/sleep.d.mts +2 -0
  199. package/internal/utils/sleep.d.mts.map +1 -0
  200. package/internal/utils/sleep.d.ts +2 -0
  201. package/internal/utils/sleep.d.ts.map +1 -0
  202. package/internal/utils/sleep.js +7 -0
  203. package/internal/utils/sleep.js.map +1 -0
  204. package/internal/utils/sleep.mjs +3 -0
  205. package/internal/utils/sleep.mjs.map +1 -0
  206. package/internal/utils/uuid.d.mts +5 -0
  207. package/internal/utils/uuid.d.mts.map +1 -0
  208. package/internal/utils/uuid.d.ts +5 -0
  209. package/internal/utils/uuid.d.ts.map +1 -0
  210. package/internal/utils/uuid.js +19 -0
  211. package/internal/utils/uuid.js.map +1 -0
  212. package/internal/utils/uuid.mjs +15 -0
  213. package/internal/utils/uuid.mjs.map +1 -0
  214. package/internal/utils/values.d.mts +18 -0
  215. package/internal/utils/values.d.mts.map +1 -0
  216. package/internal/utils/values.d.ts +18 -0
  217. package/internal/utils/values.d.ts.map +1 -0
  218. package/internal/utils/values.js +112 -0
  219. package/internal/utils/values.js.map +1 -0
  220. package/internal/utils/values.mjs +94 -0
  221. package/internal/utils/values.mjs.map +1 -0
  222. package/internal/utils.d.mts +7 -0
  223. package/internal/utils.d.mts.map +1 -0
  224. package/internal/utils.d.ts +7 -0
  225. package/internal/utils.d.ts.map +1 -0
  226. package/internal/utils.js +11 -0
  227. package/internal/utils.js.map +1 -0
  228. package/internal/utils.mjs +8 -0
  229. package/internal/utils.mjs.map +1 -0
  230. package/package.json +137 -0
  231. package/resource.d.mts +2 -0
  232. package/resource.d.mts.map +1 -0
  233. package/resource.d.ts +2 -0
  234. package/resource.d.ts.map +1 -0
  235. package/resource.js +6 -0
  236. package/resource.js.map +1 -0
  237. package/resource.mjs +2 -0
  238. package/resource.mjs.map +1 -0
  239. package/resources/contacts.d.mts +103 -0
  240. package/resources/contacts.d.mts.map +1 -0
  241. package/resources/contacts.d.ts +103 -0
  242. package/resources/contacts.d.ts.map +1 -0
  243. package/resources/contacts.js +33 -0
  244. package/resources/contacts.js.map +1 -0
  245. package/resources/contacts.mjs +29 -0
  246. package/resources/contacts.mjs.map +1 -0
  247. package/resources/index.d.mts +6 -0
  248. package/resources/index.d.mts.map +1 -0
  249. package/resources/index.d.ts +6 -0
  250. package/resources/index.d.ts.map +1 -0
  251. package/resources/index.js +15 -0
  252. package/resources/index.js.map +1 -0
  253. package/resources/index.mjs +7 -0
  254. package/resources/index.mjs.map +1 -0
  255. package/resources/messages.d.mts +222 -0
  256. package/resources/messages.d.mts.map +1 -0
  257. package/resources/messages.d.ts +222 -0
  258. package/resources/messages.d.ts.map +1 -0
  259. package/resources/messages.js +90 -0
  260. package/resources/messages.js.map +1 -0
  261. package/resources/messages.mjs +86 -0
  262. package/resources/messages.mjs.map +1 -0
  263. package/resources/number-lookup.d.mts +59 -0
  264. package/resources/number-lookup.d.mts.map +1 -0
  265. package/resources/number-lookup.d.ts +59 -0
  266. package/resources/number-lookup.d.ts.map +1 -0
  267. package/resources/number-lookup.js +17 -0
  268. package/resources/number-lookup.js.map +1 -0
  269. package/resources/number-lookup.mjs +13 -0
  270. package/resources/number-lookup.mjs.map +1 -0
  271. package/resources/organizations/index.d.mts +3 -0
  272. package/resources/organizations/index.d.mts.map +1 -0
  273. package/resources/organizations/index.d.ts +3 -0
  274. package/resources/organizations/index.d.ts.map +1 -0
  275. package/resources/organizations/index.js +9 -0
  276. package/resources/organizations/index.js.map +1 -0
  277. package/resources/organizations/index.mjs +4 -0
  278. package/resources/organizations/index.mjs.map +1 -0
  279. package/resources/organizations/organizations.d.mts +63 -0
  280. package/resources/organizations/organizations.d.mts.map +1 -0
  281. package/resources/organizations/organizations.d.ts +63 -0
  282. package/resources/organizations/organizations.d.ts.map +1 -0
  283. package/resources/organizations/organizations.js +46 -0
  284. package/resources/organizations/organizations.js.map +1 -0
  285. package/resources/organizations/organizations.mjs +41 -0
  286. package/resources/organizations/organizations.mjs.map +1 -0
  287. package/resources/organizations/users.d.mts +126 -0
  288. package/resources/organizations/users.d.mts.map +1 -0
  289. package/resources/organizations/users.d.ts +126 -0
  290. package/resources/organizations/users.d.ts.map +1 -0
  291. package/resources/organizations/users.js +95 -0
  292. package/resources/organizations/users.js.map +1 -0
  293. package/resources/organizations/users.mjs +91 -0
  294. package/resources/organizations/users.mjs.map +1 -0
  295. package/resources/organizations.d.mts +2 -0
  296. package/resources/organizations.d.mts.map +1 -0
  297. package/resources/organizations.d.ts +2 -0
  298. package/resources/organizations.d.ts.map +1 -0
  299. package/resources/organizations.js +6 -0
  300. package/resources/organizations.js.map +1 -0
  301. package/resources/organizations.mjs +3 -0
  302. package/resources/organizations.mjs.map +1 -0
  303. package/resources/templates.d.mts +333 -0
  304. package/resources/templates.d.mts.map +1 -0
  305. package/resources/templates.d.ts +333 -0
  306. package/resources/templates.d.ts.map +1 -0
  307. package/resources/templates.js +84 -0
  308. package/resources/templates.js.map +1 -0
  309. package/resources/templates.mjs +80 -0
  310. package/resources/templates.mjs.map +1 -0
  311. package/resources.d.mts +2 -0
  312. package/resources.d.mts.map +1 -0
  313. package/resources.d.ts +2 -0
  314. package/resources.d.ts.map +1 -0
  315. package/resources.js +5 -0
  316. package/resources.js.map +1 -0
  317. package/resources.mjs +2 -0
  318. package/resources.mjs.map +1 -0
  319. package/src/api-promise.ts +2 -0
  320. package/src/client.ts +832 -0
  321. package/src/core/README.md +3 -0
  322. package/src/core/api-promise.ts +92 -0
  323. package/src/core/error.ts +130 -0
  324. package/src/core/resource.ts +11 -0
  325. package/src/core/uploads.ts +2 -0
  326. package/src/error.ts +2 -0
  327. package/src/index.ts +22 -0
  328. package/src/internal/README.md +3 -0
  329. package/src/internal/builtin-types.ts +93 -0
  330. package/src/internal/detect-platform.ts +196 -0
  331. package/src/internal/errors.ts +33 -0
  332. package/src/internal/headers.ts +97 -0
  333. package/src/internal/parse.ts +50 -0
  334. package/src/internal/request-options.ts +91 -0
  335. package/src/internal/shim-types.ts +26 -0
  336. package/src/internal/shims.ts +107 -0
  337. package/src/internal/to-file.ts +154 -0
  338. package/src/internal/types.ts +95 -0
  339. package/src/internal/uploads.ts +187 -0
  340. package/src/internal/utils/base64.ts +40 -0
  341. package/src/internal/utils/bytes.ts +32 -0
  342. package/src/internal/utils/env.ts +18 -0
  343. package/src/internal/utils/log.ts +128 -0
  344. package/src/internal/utils/path.ts +88 -0
  345. package/src/internal/utils/sleep.ts +3 -0
  346. package/src/internal/utils/uuid.ts +17 -0
  347. package/src/internal/utils/values.ts +105 -0
  348. package/src/internal/utils.ts +8 -0
  349. package/src/lib/.keep +4 -0
  350. package/src/resource.ts +2 -0
  351. package/src/resources/contacts.ts +142 -0
  352. package/src/resources/index.ts +38 -0
  353. package/src/resources/messages.ts +283 -0
  354. package/src/resources/number-lookup.ts +80 -0
  355. package/src/resources/organizations/index.ts +18 -0
  356. package/src/resources/organizations/organizations.ts +116 -0
  357. package/src/resources/organizations/users.ts +189 -0
  358. package/src/resources/organizations.ts +3 -0
  359. package/src/resources/templates.ts +430 -0
  360. package/src/resources.ts +1 -0
  361. package/src/tsconfig.json +11 -0
  362. package/src/uploads.ts +2 -0
  363. package/src/version.ts +1 -0
  364. package/uploads.d.mts +2 -0
  365. package/uploads.d.mts.map +1 -0
  366. package/uploads.d.ts +2 -0
  367. package/uploads.d.ts.map +1 -0
  368. package/uploads.js +6 -0
  369. package/uploads.js.map +1 -0
  370. package/uploads.mjs +2 -0
  371. package/uploads.mjs.map +1 -0
  372. package/version.d.mts +2 -0
  373. package/version.d.mts.map +1 -0
  374. package/version.d.ts +2 -0
  375. package/version.d.ts.map +1 -0
  376. package/version.js +5 -0
  377. package/version.js.map +1 -0
  378. package/version.mjs +2 -0
  379. package/version.mjs.map +1 -0
@@ -0,0 +1,59 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import { APIPromise } from "../core/api-promise.mjs";
3
+ import { RequestOptions } from "../internal/request-options.mjs";
4
+ export declare class NumberLookup extends APIResource {
5
+ /**
6
+ * Retrieves detailed information about a phone number including validation,
7
+ * formatting, country information, and available messaging channels. The customer
8
+ * ID is extracted from the authentication token.
9
+ */
10
+ retrieve(query: NumberLookupRetrieveParams, options?: RequestOptions): APIPromise<NumberLookupRetrieveResponse>;
11
+ }
12
+ /**
13
+ * Response containing phone number lookup data
14
+ */
15
+ export interface NumberLookupRetrieveResponse {
16
+ /**
17
+ * The country calling code (e.g., 1 for US/Canada)
18
+ */
19
+ countryCode?: string;
20
+ /**
21
+ * The phone number formatted in E.164 standard (e.g., +1234567890)
22
+ */
23
+ formatE164?: string;
24
+ /**
25
+ * The phone number formatted for international dialing (e.g., +1 234-567-890)
26
+ */
27
+ formatInternational?: string;
28
+ /**
29
+ * The phone number formatted for national dialing (e.g., (234) 567-890)
30
+ */
31
+ formatNational?: string;
32
+ /**
33
+ * The phone number formatted according to RFC 3966 (e.g., tel:+1-234-567-890)
34
+ */
35
+ formatRfc?: string;
36
+ /**
37
+ * The type of phone number (e.g., mobile, fixed_line, voip)
38
+ */
39
+ numberType?: string;
40
+ /**
41
+ * The phone number in its original format
42
+ */
43
+ phoneNumber?: string;
44
+ /**
45
+ * The timezones associated with the phone number
46
+ */
47
+ phoneTimezones?: string;
48
+ /**
49
+ * The ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
50
+ */
51
+ regionCode?: string;
52
+ }
53
+ export interface NumberLookupRetrieveParams {
54
+ phoneNumber: string;
55
+ }
56
+ export declare namespace NumberLookup {
57
+ export { type NumberLookupRetrieveResponse as NumberLookupRetrieveResponse, type NumberLookupRetrieveParams as NumberLookupRetrieveParams, };
58
+ }
59
+ //# sourceMappingURL=number-lookup.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-lookup.d.mts","sourceRoot":"","sources":["../src/resources/number-lookup.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;OAIG;IACH,QAAQ,CACN,KAAK,EAAE,0BAA0B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;CAG5C;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
@@ -0,0 +1,59 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import { APIPromise } from "../core/api-promise.js";
3
+ import { RequestOptions } from "../internal/request-options.js";
4
+ export declare class NumberLookup extends APIResource {
5
+ /**
6
+ * Retrieves detailed information about a phone number including validation,
7
+ * formatting, country information, and available messaging channels. The customer
8
+ * ID is extracted from the authentication token.
9
+ */
10
+ retrieve(query: NumberLookupRetrieveParams, options?: RequestOptions): APIPromise<NumberLookupRetrieveResponse>;
11
+ }
12
+ /**
13
+ * Response containing phone number lookup data
14
+ */
15
+ export interface NumberLookupRetrieveResponse {
16
+ /**
17
+ * The country calling code (e.g., 1 for US/Canada)
18
+ */
19
+ countryCode?: string;
20
+ /**
21
+ * The phone number formatted in E.164 standard (e.g., +1234567890)
22
+ */
23
+ formatE164?: string;
24
+ /**
25
+ * The phone number formatted for international dialing (e.g., +1 234-567-890)
26
+ */
27
+ formatInternational?: string;
28
+ /**
29
+ * The phone number formatted for national dialing (e.g., (234) 567-890)
30
+ */
31
+ formatNational?: string;
32
+ /**
33
+ * The phone number formatted according to RFC 3966 (e.g., tel:+1-234-567-890)
34
+ */
35
+ formatRfc?: string;
36
+ /**
37
+ * The type of phone number (e.g., mobile, fixed_line, voip)
38
+ */
39
+ numberType?: string;
40
+ /**
41
+ * The phone number in its original format
42
+ */
43
+ phoneNumber?: string;
44
+ /**
45
+ * The timezones associated with the phone number
46
+ */
47
+ phoneTimezones?: string;
48
+ /**
49
+ * The ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
50
+ */
51
+ regionCode?: string;
52
+ }
53
+ export interface NumberLookupRetrieveParams {
54
+ phoneNumber: string;
55
+ }
56
+ export declare namespace NumberLookup {
57
+ export { type NumberLookupRetrieveResponse as NumberLookupRetrieveResponse, type NumberLookupRetrieveParams as NumberLookupRetrieveParams, };
58
+ }
59
+ //# sourceMappingURL=number-lookup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-lookup.d.ts","sourceRoot":"","sources":["../src/resources/number-lookup.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;OAIG;IACH,QAAQ,CACN,KAAK,EAAE,0BAA0B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;CAG5C;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.NumberLookup = void 0;
5
+ const resource_1 = require("../core/resource.js");
6
+ class NumberLookup extends resource_1.APIResource {
7
+ /**
8
+ * Retrieves detailed information about a phone number including validation,
9
+ * formatting, country information, and available messaging channels. The customer
10
+ * ID is extracted from the authentication token.
11
+ */
12
+ retrieve(query, options) {
13
+ return this._client.get('/v2/number-lookup', { query, ...options });
14
+ }
15
+ }
16
+ exports.NumberLookup = NumberLookup;
17
+ //# sourceMappingURL=number-lookup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-lookup.js","sourceRoot":"","sources":["../src/resources/number-lookup.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;OAIG;IACH,QAAQ,CACN,KAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;CACF;AAZD,oCAYC"}
@@ -0,0 +1,13 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../core/resource.mjs";
3
+ export class NumberLookup extends APIResource {
4
+ /**
5
+ * Retrieves detailed information about a phone number including validation,
6
+ * formatting, country information, and available messaging channels. The customer
7
+ * ID is extracted from the authentication token.
8
+ */
9
+ retrieve(query, options) {
10
+ return this._client.get('/v2/number-lookup', { query, ...options });
11
+ }
12
+ }
13
+ //# sourceMappingURL=number-lookup.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-lookup.mjs","sourceRoot":"","sources":["../src/resources/number-lookup.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;OAIG;IACH,QAAQ,CACN,KAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;CACF"}
@@ -0,0 +1,3 @@
1
+ export { Organizations, type ProfileSummary, type OrganizationListResponse, type OrganizationRetrieveProfilesResponse, } from "./organizations.mjs";
2
+ export { Users, type CustomerUser, type UserListResponse, type UserRetrieveParams, type UserListParams, type UserDeleteParams, type UserInviteParams, type UserUpdateRoleParams, } from "./users.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/organizations/index.ts"],"names":[],"mappings":"OAEO,EACL,aAAa,EACb,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,oCAAoC,GAC1C;OACM,EACL,KAAK,EACL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,GAC1B"}
@@ -0,0 +1,3 @@
1
+ export { Organizations, type ProfileSummary, type OrganizationListResponse, type OrganizationRetrieveProfilesResponse, } from "./organizations.js";
2
+ export { Users, type CustomerUser, type UserListResponse, type UserRetrieveParams, type UserListParams, type UserDeleteParams, type UserInviteParams, type UserUpdateRoleParams, } from "./users.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/organizations/index.ts"],"names":[],"mappings":"OAEO,EACL,aAAa,EACb,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,oCAAoC,GAC1C;OACM,EACL,KAAK,EACL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,GAC1B"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Users = exports.Organizations = void 0;
5
+ var organizations_1 = require("./organizations.js");
6
+ Object.defineProperty(exports, "Organizations", { enumerable: true, get: function () { return organizations_1.Organizations; } });
7
+ var users_1 = require("./users.js");
8
+ Object.defineProperty(exports, "Users", { enumerable: true, get: function () { return users_1.Users; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/organizations/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,oDAKyB;AAJvB,8GAAA,aAAa,OAAA;AAKf,oCASiB;AARf,8FAAA,KAAK,OAAA"}
@@ -0,0 +1,4 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export { Organizations, } from "./organizations.mjs";
3
+ export { Users, } from "./users.mjs";
4
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/organizations/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,aAAa,GAId;OACM,EACL,KAAK,GAQN"}
@@ -0,0 +1,63 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import * as OrganizationsAPI from "./organizations.mjs";
3
+ import * as UsersAPI from "./users.mjs";
4
+ import { CustomerUser, UserDeleteParams, UserInviteParams, UserListParams, UserListResponse, UserRetrieveParams, UserUpdateRoleParams, Users } from "./users.mjs";
5
+ import { APIPromise } from "../../core/api-promise.mjs";
6
+ import { RequestOptions } from "../../internal/request-options.mjs";
7
+ export declare class Organizations extends APIResource {
8
+ users: UsersAPI.Users;
9
+ /**
10
+ * Retrieves all organizations that the authenticated user has access to, including
11
+ * the sender profiles within each organization that the user can access. Returns
12
+ * organization details with nested profiles filtered by user permissions.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const organizations = await client.organizations.list();
17
+ * ```
18
+ */
19
+ list(options?: RequestOptions): APIPromise<OrganizationListResponse>;
20
+ /**
21
+ * Retrieves all sender profiles within an organization that the authenticated user
22
+ * has access to. Returns filtered list based on user's permissions.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const response =
27
+ * await client.organizations.retrieveProfiles(
28
+ * '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
29
+ * );
30
+ * ```
31
+ */
32
+ retrieveProfiles(orgID: string, options?: RequestOptions): APIPromise<OrganizationRetrieveProfilesResponse>;
33
+ }
34
+ export interface ProfileSummary {
35
+ id?: string;
36
+ createdAt?: string;
37
+ description?: string | null;
38
+ icon?: string | null;
39
+ name?: string;
40
+ shortName?: string | null;
41
+ }
42
+ export interface OrganizationListResponse {
43
+ organizations?: Array<OrganizationListResponse.Organization>;
44
+ }
45
+ export declare namespace OrganizationListResponse {
46
+ interface Organization {
47
+ id?: string;
48
+ createdAt?: string;
49
+ description?: string | null;
50
+ icon?: string | null;
51
+ name?: string;
52
+ profiles?: Array<OrganizationsAPI.ProfileSummary>;
53
+ }
54
+ }
55
+ export interface OrganizationRetrieveProfilesResponse {
56
+ organizationId?: string;
57
+ profiles?: Array<ProfileSummary>;
58
+ }
59
+ export declare namespace Organizations {
60
+ export { type ProfileSummary as ProfileSummary, type OrganizationListResponse as OrganizationListResponse, type OrganizationRetrieveProfilesResponse as OrganizationRetrieveProfilesResponse, };
61
+ export { Users as Users, type CustomerUser as CustomerUser, type UserListResponse as UserListResponse, type UserRetrieveParams as UserRetrieveParams, type UserListParams as UserListParams, type UserDeleteParams as UserDeleteParams, type UserInviteParams as UserInviteParams, type UserUpdateRoleParams as UserUpdateRoleParams, };
62
+ }
63
+ //# sourceMappingURL=organizations.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizations.d.mts","sourceRoot":"","sources":["../../src/resources/organizations/organizations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,gBAAgB;OACrB,KAAK,QAAQ;OACb,EACL,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,EACN;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IAEzD;;;;;;;;;OASG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;IAIpE;;;;;;;;;;;OAWG;IACH,gBAAgB,C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kB,EAC7C,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
@@ -0,0 +1,63 @@
1
+ import { APIResource } from "../../core/resource.js";
2
+ import * as OrganizationsAPI from "./organizations.js";
3
+ import * as UsersAPI from "./users.js";
4
+ import { CustomerUser, UserDeleteParams, UserInviteParams, UserListParams, UserListResponse, UserRetrieveParams, UserUpdateRoleParams, Users } from "./users.js";
5
+ import { APIPromise } from "../../core/api-promise.js";
6
+ import { RequestOptions } from "../../internal/request-options.js";
7
+ export declare class Organizations extends APIResource {
8
+ users: UsersAPI.Users;
9
+ /**
10
+ * Retrieves all organizations that the authenticated user has access to, including
11
+ * the sender profiles within each organization that the user can access. Returns
12
+ * organization details with nested profiles filtered by user permissions.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const organizations = await client.organizations.list();
17
+ * ```
18
+ */
19
+ list(options?: RequestOptions): APIPromise<OrganizationListResponse>;
20
+ /**
21
+ * Retrieves all sender profiles within an organization that the authenticated user
22
+ * has access to. Returns filtered list based on user's permissions.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const response =
27
+ * await client.organizations.retrieveProfiles(
28
+ * '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
29
+ * );
30
+ * ```
31
+ */
32
+ retrieveProfiles(orgID: string, options?: RequestOptions): APIPromise<OrganizationRetrieveProfilesResponse>;
33
+ }
34
+ export interface ProfileSummary {
35
+ id?: string;
36
+ createdAt?: string;
37
+ description?: string | null;
38
+ icon?: string | null;
39
+ name?: string;
40
+ shortName?: string | null;
41
+ }
42
+ export interface OrganizationListResponse {
43
+ organizations?: Array<OrganizationListResponse.Organization>;
44
+ }
45
+ export declare namespace OrganizationListResponse {
46
+ interface Organization {
47
+ id?: string;
48
+ createdAt?: string;
49
+ description?: string | null;
50
+ icon?: string | null;
51
+ name?: string;
52
+ profiles?: Array<OrganizationsAPI.ProfileSummary>;
53
+ }
54
+ }
55
+ export interface OrganizationRetrieveProfilesResponse {
56
+ organizationId?: string;
57
+ profiles?: Array<ProfileSummary>;
58
+ }
59
+ export declare namespace Organizations {
60
+ export { type ProfileSummary as ProfileSummary, type OrganizationListResponse as OrganizationListResponse, type OrganizationRetrieveProfilesResponse as OrganizationRetrieveProfilesResponse, };
61
+ export { Users as Users, type CustomerUser as CustomerUser, type UserListResponse as UserListResponse, type UserRetrieveParams as UserRetrieveParams, type UserListParams as UserListParams, type UserDeleteParams as UserDeleteParams, type UserInviteParams as UserInviteParams, type UserUpdateRoleParams as UserUpdateRoleParams, };
62
+ }
63
+ //# sourceMappingURL=organizations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../src/resources/organizations/organizations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,gBAAgB;OACrB,KAAK,QAAQ;OACb,EACL,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,EACN;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IAEzD;;;;;;;;;OASG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;IAIpE;;;;;;;;;;;OAWG;IACH,gBAAgB,CACd,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oCAAoC,CAAC;CAGpD;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC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.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Organizations = void 0;
5
+ const tslib_1 = require("../../internal/tslib.js");
6
+ const resource_1 = require("../../core/resource.js");
7
+ const UsersAPI = tslib_1.__importStar(require("./users.js"));
8
+ const users_1 = require("./users.js");
9
+ const path_1 = require("../../internal/utils/path.js");
10
+ class Organizations extends resource_1.APIResource {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.users = new UsersAPI.Users(this._client);
14
+ }
15
+ /**
16
+ * Retrieves all organizations that the authenticated user has access to, including
17
+ * the sender profiles within each organization that the user can access. Returns
18
+ * organization details with nested profiles filtered by user permissions.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * const organizations = await client.organizations.list();
23
+ * ```
24
+ */
25
+ list(options) {
26
+ return this._client.get('/v2/organizations', options);
27
+ }
28
+ /**
29
+ * Retrieves all sender profiles within an organization that the authenticated user
30
+ * has access to. Returns filtered list based on user's permissions.
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const response =
35
+ * await client.organizations.retrieveProfiles(
36
+ * '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
37
+ * );
38
+ * ```
39
+ */
40
+ retrieveProfiles(orgID, options) {
41
+ return this._client.get((0, path_1.path) `/v2/organizations/${orgID}/profiles`, options);
42
+ }
43
+ }
44
+ exports.Organizations = Organizations;
45
+ Organizations.Users = users_1.Users;
46
+ //# sourceMappingURL=organizations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizations.js","sourceRoot":"","sources":["../../src/resources/organizations/organizations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,6DAAoC;AACpC,sCASiB;AAGjB,uDAAiD;AAEjD,MAAa,aAAc,SAAQ,sBAAW;IAA9C;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAkC3D,CAAC;IAhCC;;;;;;;;;OASG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAED;;;;;;;;;;;OAWG;IACH,gBAAgB,CACd,KAAa,EACb,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,qBAAqB,KAAK,WAAW,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;CACF;AAnCD,sCAmCC;AA0CD,aAAa,CAAC,KAAK,GAAG,aAAK,CAAC"}
@@ -0,0 +1,41 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../core/resource.mjs";
3
+ import * as UsersAPI from "./users.mjs";
4
+ import { Users, } from "./users.mjs";
5
+ import { path } from "../../internal/utils/path.mjs";
6
+ export class Organizations extends APIResource {
7
+ constructor() {
8
+ super(...arguments);
9
+ this.users = new UsersAPI.Users(this._client);
10
+ }
11
+ /**
12
+ * Retrieves all organizations that the authenticated user has access to, including
13
+ * the sender profiles within each organization that the user can access. Returns
14
+ * organization details with nested profiles filtered by user permissions.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * const organizations = await client.organizations.list();
19
+ * ```
20
+ */
21
+ list(options) {
22
+ return this._client.get('/v2/organizations', options);
23
+ }
24
+ /**
25
+ * Retrieves all sender profiles within an organization that the authenticated user
26
+ * has access to. Returns filtered list based on user's permissions.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * const response =
31
+ * await client.organizations.retrieveProfiles(
32
+ * '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
33
+ * );
34
+ * ```
35
+ */
36
+ retrieveProfiles(orgID, options) {
37
+ return this._client.get(path `/v2/organizations/${orgID}/profiles`, options);
38
+ }
39
+ }
40
+ Organizations.Users = Users;
41
+ //# sourceMappingURL=organizations.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizations.mjs","sourceRoot":"","sources":["../../src/resources/organizations/organizations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,QAAQ;OACb,EAQL,KAAK,GACN;OAGM,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,aAAc,SAAQ,WAAW;IAA9C;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAkC3D,CAAC;IAhCC;;;;;;;;;OASG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAED;;;;;;;;;;;OAWG;IACH,gBAAgB,CACd,KAAa,EACb,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,qBAAqB,KAAK,WAAW,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;CACF;AA0CD,aAAa,CAAC,KAAK,GAAG,KAAK,CAAC"}
@@ -0,0 +1,126 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import { APIPromise } from "../../core/api-promise.mjs";
3
+ import { RequestOptions } from "../../internal/request-options.mjs";
4
+ export declare class Users extends APIResource {
5
+ /**
6
+ * Retrieves a specific user by their ID. Requires appropriate permissions. The
7
+ * customerId can be either an organization ID or a profile ID.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const customerUser =
12
+ * await client.organizations.users.retrieve(
13
+ * '650e8400-e29b-41d4-a716-446655440000',
14
+ * { customerId: '550e8400-e29b-41d4-a716-446655440000' },
15
+ * );
16
+ * ```
17
+ */
18
+ retrieve(userID: string, params: UserRetrieveParams, options?: RequestOptions): APIPromise<CustomerUser>;
19
+ /**
20
+ * Retrieves all users associated with an organization or sender profile. Requires
21
+ * appropriate permissions. Supports pagination.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * const users = await client.organizations.users.list(
26
+ * '550e8400-e29b-41d4-a716-446655440000',
27
+ * { page: 0, pageSize: 0 },
28
+ * );
29
+ * ```
30
+ */
31
+ list(customerID: string, query: UserListParams, options?: RequestOptions): APIPromise<UserListResponse>;
32
+ /**
33
+ * Removes a user from an organization or sender profile. Requires admin
34
+ * permissions. This action permanently deletes the user association.
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * await client.organizations.users.delete(
39
+ * '650e8400-e29b-41d4-a716-446655440000',
40
+ * { customerId: '550e8400-e29b-41d4-a716-446655440000' },
41
+ * );
42
+ * ```
43
+ */
44
+ delete(userID: string, params: UserDeleteParams, options?: RequestOptions): APIPromise<void>;
45
+ /**
46
+ * Invites a user to an organization or sender profile with a specified role.
47
+ * Requires appropriate permissions. The customerId can be either an organization
48
+ * ID or a profile ID.
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * const customerUser =
53
+ * await client.organizations.users.invite(
54
+ * '550e8400-e29b-41d4-a716-446655440000',
55
+ * );
56
+ * ```
57
+ */
58
+ invite(customerID: string, body: UserInviteParams, options?: RequestOptions): APIPromise<CustomerUser>;
59
+ /**
60
+ * Updates a user's role within an organization or sender profile. Requires admin
61
+ * permissions. Valid roles are: admin, billing, developer.
62
+ *
63
+ * @example
64
+ * ```ts
65
+ * const customerUser =
66
+ * await client.organizations.users.updateRole(
67
+ * '650e8400-e29b-41d4-a716-446655440000',
68
+ * { customerId: '550e8400-e29b-41d4-a716-446655440000' },
69
+ * );
70
+ * ```
71
+ */
72
+ updateRole(userID: string, params: UserUpdateRoleParams, options?: RequestOptions): APIPromise<CustomerUser>;
73
+ }
74
+ export interface CustomerUser {
75
+ /**
76
+ * Unique identifier
77
+ */
78
+ id?: string;
79
+ createdAt?: string;
80
+ customerId?: string;
81
+ email?: string;
82
+ invitationSentAt?: string | null;
83
+ invitationToken?: string | null;
84
+ invitationTokenExpiresAt?: string | null;
85
+ lastLoginAt?: string | null;
86
+ name?: string;
87
+ role?: string;
88
+ status?: string;
89
+ updatedAt?: string | null;
90
+ }
91
+ export interface UserListResponse {
92
+ page?: number;
93
+ pageSize?: number;
94
+ totalCount?: number;
95
+ users?: Array<CustomerUser>;
96
+ }
97
+ export interface UserRetrieveParams {
98
+ customerId: string;
99
+ }
100
+ export interface UserListParams {
101
+ page: number;
102
+ pageSize: number;
103
+ }
104
+ export interface UserDeleteParams {
105
+ customerId: string;
106
+ }
107
+ export interface UserInviteParams {
108
+ email?: string;
109
+ invitedBy?: string | null;
110
+ name?: string;
111
+ role?: string;
112
+ }
113
+ export interface UserUpdateRoleParams {
114
+ /**
115
+ * Path param
116
+ */
117
+ customerId: string;
118
+ /**
119
+ * Body param
120
+ */
121
+ role?: string;
122
+ }
123
+ export declare namespace Users {
124
+ export { type CustomerUser as CustomerUser, type UserListResponse as UserListResponse, type UserRetrieveParams as UserRetrieveParams, type UserListParams as UserListParams, type UserDeleteParams as UserDeleteParams, type UserInviteParams as UserInviteParams, type UserUpdateRoleParams as UserUpdateRoleParams, };
125
+ }
126
+ //# sourceMappingURL=users.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"users.d.mts","sourceRoot":"","sources":["../../src/resources/organizations/users.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;IAKxG;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;IAIvG;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,I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