@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,126 @@
|
|
|
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 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.ts.map
|
|
@@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AI,gBAAgB,EACzC,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
|
@@ -0,0 +1,95 @@
|
|
|
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 = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const headers_1 = require("../../internal/headers.js");
|
|
7
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
8
|
+
class Users extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Retrieves a specific user by their ID. Requires appropriate permissions. The
|
|
11
|
+
* customerId can be either an organization ID or a profile ID.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const customerUser =
|
|
16
|
+
* await client.organizations.users.retrieve(
|
|
17
|
+
* '650e8400-e29b-41d4-a716-446655440000',
|
|
18
|
+
* { customerId: '550e8400-e29b-41d4-a716-446655440000' },
|
|
19
|
+
* );
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
retrieve(userID, params, options) {
|
|
23
|
+
const { customerId } = params;
|
|
24
|
+
return this._client.get((0, path_1.path) `/v2/organizations/${customerId}/users/${userID}`, options);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Retrieves all users associated with an organization or sender profile. Requires
|
|
28
|
+
* appropriate permissions. Supports pagination.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const users = await client.organizations.users.list(
|
|
33
|
+
* '550e8400-e29b-41d4-a716-446655440000',
|
|
34
|
+
* { page: 0, pageSize: 0 },
|
|
35
|
+
* );
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
list(customerID, query, options) {
|
|
39
|
+
return this._client.get((0, path_1.path) `/v2/organizations/${customerID}/users`, { query, ...options });
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Removes a user from an organization or sender profile. Requires admin
|
|
43
|
+
* permissions. This action permanently deletes the user association.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* await client.organizations.users.delete(
|
|
48
|
+
* '650e8400-e29b-41d4-a716-446655440000',
|
|
49
|
+
* { customerId: '550e8400-e29b-41d4-a716-446655440000' },
|
|
50
|
+
* );
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
delete(userID, params, options) {
|
|
54
|
+
const { customerId } = params;
|
|
55
|
+
return this._client.delete((0, path_1.path) `/v2/organizations/${customerId}/users/${userID}`, {
|
|
56
|
+
...options,
|
|
57
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Invites a user to an organization or sender profile with a specified role.
|
|
62
|
+
* Requires appropriate permissions. The customerId can be either an organization
|
|
63
|
+
* ID or a profile ID.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const customerUser =
|
|
68
|
+
* await client.organizations.users.invite(
|
|
69
|
+
* '550e8400-e29b-41d4-a716-446655440000',
|
|
70
|
+
* );
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
invite(customerID, body, options) {
|
|
74
|
+
return this._client.post((0, path_1.path) `/v2/organizations/${customerID}/users`, { body, ...options });
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Updates a user's role within an organization or sender profile. Requires admin
|
|
78
|
+
* permissions. Valid roles are: admin, billing, developer.
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* const customerUser =
|
|
83
|
+
* await client.organizations.users.updateRole(
|
|
84
|
+
* '650e8400-e29b-41d4-a716-446655440000',
|
|
85
|
+
* { customerId: '550e8400-e29b-41d4-a716-446655440000' },
|
|
86
|
+
* );
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
updateRole(userID, params, options) {
|
|
90
|
+
const { customerId, ...body } = params;
|
|
91
|
+
return this._client.put((0, path_1.path) `/v2/organizations/${customerId}/users/${userID}`, { body, ...options });
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
exports.Users = Users;
|
|
95
|
+
//# sourceMappingURL=users.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/resources/organizations/users.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,MAAc,EAAE,MAA0B,EAAE,OAAwB;QAC3E,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,qBAAqB,UAAU,UAAU,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,UAAkB,EAAE,KAAqB,EAAE,OAAwB;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,qBAAqB,UAAU,QAAQ,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9F,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,MAAc,EAAE,MAAwB,EAAE,OAAwB;QACvE,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,qBAAqB,UAAU,UAAU,MAAM,EAAE,EAAE;YAChF,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,UAAkB,EAAE,IAAsB,EAAE,OAAwB;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,qBAAqB,UAAU,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9F,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,UAAU,CACR,MAAc,EACd,MAA4B,EAC5B,OAAwB;QAExB,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,qBAAqB,UAAU,UAAU,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvG,CAAC;CACF;AA7FD,sBA6FC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../../internal/headers.mjs";
|
|
4
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
5
|
+
export class Users extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Retrieves a specific user by their ID. Requires appropriate permissions. The
|
|
8
|
+
* customerId can be either an organization ID or a profile ID.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const customerUser =
|
|
13
|
+
* await client.organizations.users.retrieve(
|
|
14
|
+
* '650e8400-e29b-41d4-a716-446655440000',
|
|
15
|
+
* { customerId: '550e8400-e29b-41d4-a716-446655440000' },
|
|
16
|
+
* );
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
retrieve(userID, params, options) {
|
|
20
|
+
const { customerId } = params;
|
|
21
|
+
return this._client.get(path `/v2/organizations/${customerId}/users/${userID}`, options);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Retrieves all users associated with an organization or sender profile. Requires
|
|
25
|
+
* appropriate permissions. Supports pagination.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const users = await client.organizations.users.list(
|
|
30
|
+
* '550e8400-e29b-41d4-a716-446655440000',
|
|
31
|
+
* { page: 0, pageSize: 0 },
|
|
32
|
+
* );
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
list(customerID, query, options) {
|
|
36
|
+
return this._client.get(path `/v2/organizations/${customerID}/users`, { query, ...options });
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Removes a user from an organization or sender profile. Requires admin
|
|
40
|
+
* permissions. This action permanently deletes the user association.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* await client.organizations.users.delete(
|
|
45
|
+
* '650e8400-e29b-41d4-a716-446655440000',
|
|
46
|
+
* { customerId: '550e8400-e29b-41d4-a716-446655440000' },
|
|
47
|
+
* );
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
delete(userID, params, options) {
|
|
51
|
+
const { customerId } = params;
|
|
52
|
+
return this._client.delete(path `/v2/organizations/${customerId}/users/${userID}`, {
|
|
53
|
+
...options,
|
|
54
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Invites a user to an organization or sender profile with a specified role.
|
|
59
|
+
* Requires appropriate permissions. The customerId can be either an organization
|
|
60
|
+
* ID or a profile ID.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* const customerUser =
|
|
65
|
+
* await client.organizations.users.invite(
|
|
66
|
+
* '550e8400-e29b-41d4-a716-446655440000',
|
|
67
|
+
* );
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
invite(customerID, body, options) {
|
|
71
|
+
return this._client.post(path `/v2/organizations/${customerID}/users`, { body, ...options });
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Updates a user's role within an organization or sender profile. Requires admin
|
|
75
|
+
* permissions. Valid roles are: admin, billing, developer.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* const customerUser =
|
|
80
|
+
* await client.organizations.users.updateRole(
|
|
81
|
+
* '650e8400-e29b-41d4-a716-446655440000',
|
|
82
|
+
* { customerId: '550e8400-e29b-41d4-a716-446655440000' },
|
|
83
|
+
* );
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
updateRole(userID, params, options) {
|
|
87
|
+
const { customerId, ...body } = params;
|
|
88
|
+
return this._client.put(path `/v2/organizations/${customerId}/users/${userID}`, { body, ...options });
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=users.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.mjs","sourceRoot":"","sources":["../../src/resources/organizations/users.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,MAAc,EAAE,MAA0B,EAAE,OAAwB;QAC3E,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,qBAAqB,UAAU,UAAU,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,UAAkB,EAAE,KAAqB,EAAE,OAAwB;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,qBAAqB,UAAU,QAAQ,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9F,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,MAAc,EAAE,MAAwB,EAAE,OAAwB;QACvE,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,qBAAqB,UAAU,UAAU,MAAM,EAAE,EAAE;YAChF,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,UAAkB,EAAE,IAAsB,EAAE,OAAwB;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,qBAAqB,UAAU,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9F,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,UAAU,CACR,MAAc,EACd,MAA4B,EAC5B,OAAwB;QAExB,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,qBAAqB,UAAU,UAAU,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvG,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizations.d.mts","sourceRoot":"","sources":["../src/resources/organizations.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../src/resources/organizations.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
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
|
+
const tslib_1 = require("../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./organizations/index.js"), exports);
|
|
6
|
+
//# sourceMappingURL=organizations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizations.js","sourceRoot":"","sources":["../src/resources/organizations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,mEAAsC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizations.mjs","sourceRoot":"","sources":["../src/resources/organizations.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|