@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.
- package/CHANGELOG.md +103 -0
- package/LICENSE +201 -0
- package/README.md +393 -0
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +200 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +200 -0
- package/client.d.ts.map +1 -0
- package/client.js +486 -0
- package/client.js.map +1 -0
- package/client.mjs +482 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +2 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +2 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +6 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -0
- package/index.d.ts.map +1 -0
- package/index.js +30 -0
- package/index.js.map +1 -0
- package/index.mjs +7 -0
- package/index.mjs.map +1 -0
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +35 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +32 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +87 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +81 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +11 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +137 -0
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +2 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +2 -0
- package/resource.mjs.map +1 -0
- package/resources/contacts.d.mts +103 -0
- package/resources/contacts.d.mts.map +1 -0
- package/resources/contacts.d.ts +103 -0
- package/resources/contacts.d.ts.map +1 -0
- package/resources/contacts.js +33 -0
- package/resources/contacts.js.map +1 -0
- package/resources/contacts.mjs +29 -0
- package/resources/contacts.mjs.map +1 -0
- package/resources/index.d.mts +6 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +6 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +15 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +7 -0
- package/resources/index.mjs.map +1 -0
- package/resources/messages.d.mts +222 -0
- package/resources/messages.d.mts.map +1 -0
- package/resources/messages.d.ts +222 -0
- package/resources/messages.d.ts.map +1 -0
- package/resources/messages.js +90 -0
- package/resources/messages.js.map +1 -0
- package/resources/messages.mjs +86 -0
- package/resources/messages.mjs.map +1 -0
- package/resources/number-lookup.d.mts +59 -0
- package/resources/number-lookup.d.mts.map +1 -0
- package/resources/number-lookup.d.ts +59 -0
- package/resources/number-lookup.d.ts.map +1 -0
- package/resources/number-lookup.js +17 -0
- package/resources/number-lookup.js.map +1 -0
- package/resources/number-lookup.mjs +13 -0
- package/resources/number-lookup.mjs.map +1 -0
- package/resources/organizations/index.d.mts +3 -0
- package/resources/organizations/index.d.mts.map +1 -0
- package/resources/organizations/index.d.ts +3 -0
- package/resources/organizations/index.d.ts.map +1 -0
- package/resources/organizations/index.js +9 -0
- package/resources/organizations/index.js.map +1 -0
- package/resources/organizations/index.mjs +4 -0
- package/resources/organizations/index.mjs.map +1 -0
- package/resources/organizations/organizations.d.mts +63 -0
- package/resources/organizations/organizations.d.mts.map +1 -0
- package/resources/organizations/organizations.d.ts +63 -0
- package/resources/organizations/organizations.d.ts.map +1 -0
- package/resources/organizations/organizations.js +46 -0
- package/resources/organizations/organizations.js.map +1 -0
- package/resources/organizations/organizations.mjs +41 -0
- package/resources/organizations/organizations.mjs.map +1 -0
- package/resources/organizations/users.d.mts +126 -0
- package/resources/organizations/users.d.mts.map +1 -0
- package/resources/organizations/users.d.ts +126 -0
- package/resources/organizations/users.d.ts.map +1 -0
- package/resources/organizations/users.js +95 -0
- package/resources/organizations/users.js.map +1 -0
- package/resources/organizations/users.mjs +91 -0
- package/resources/organizations/users.mjs.map +1 -0
- package/resources/organizations.d.mts +2 -0
- package/resources/organizations.d.mts.map +1 -0
- package/resources/organizations.d.ts +2 -0
- package/resources/organizations.d.ts.map +1 -0
- package/resources/organizations.js +6 -0
- package/resources/organizations.js.map +1 -0
- package/resources/organizations.mjs +3 -0
- package/resources/organizations.mjs.map +1 -0
- package/resources/templates.d.mts +333 -0
- package/resources/templates.d.mts.map +1 -0
- package/resources/templates.d.ts +333 -0
- package/resources/templates.d.ts.map +1 -0
- package/resources/templates.js +84 -0
- package/resources/templates.js.map +1 -0
- package/resources/templates.mjs +80 -0
- package/resources/templates.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +832 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +22 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +50 -0
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +128 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +8 -0
- package/src/lib/.keep +4 -0
- package/src/resource.ts +2 -0
- package/src/resources/contacts.ts +142 -0
- package/src/resources/index.ts +38 -0
- package/src/resources/messages.ts +283 -0
- package/src/resources/number-lookup.ts +80 -0
- package/src/resources/organizations/index.ts +18 -0
- package/src/resources/organizations/organizations.ts +116 -0
- package/src/resources/organizations/users.ts +189 -0
- package/src/resources/organizations.ts +3 -0
- package/src/resources/templates.ts +430 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +2 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +2 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- 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 @@
|
|
|
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,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;IAE5B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,wBAAwB;IACvC,aAAa,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,YAAY,CAAC,CAAC;CAC9D;AAED,yBAAiB,wBAAwB,CAAC;IACxC,UAAiB,YAAY;QAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;QAEZ,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAE5B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAErB,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd,QAAQ,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;KACnD;CACF;AAED,MAAM,WAAW,oCAAoC;IACnD,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,QAAQ,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;CAClC;AAID,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,oCAAoC,IAAI,oCAAoC,GAClF,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,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;IAE5B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,wBAAwB;IACvC,aAAa,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,YAAY,CAAC,CAAC;CAC9D;AAED,yBAAiB,wBAAwB,CAAC;IACxC,UAAiB,YAAY;QAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;QAEZ,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAE5B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAErB,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd,QAAQ,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;KACnD;CACF;AAED,MAAM,WAAW,oCAAoC;IACnD,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,QAAQ,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;CAClC;AAID,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,oCAAoC,IAAI,oCAAoC,GAClF,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,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,46 @@
|
|
|
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.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":"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"}
|