@sentdm/sentdm 0.5.2 → 0.6.1
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 +16 -0
- package/README.md +2 -8
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/organizations/index.d.mts +2 -2
- package/resources/organizations/index.d.mts.map +1 -1
- package/resources/organizations/index.d.ts +2 -2
- package/resources/organizations/index.d.ts.map +1 -1
- package/resources/organizations/index.js.map +1 -1
- package/resources/organizations/index.mjs +2 -2
- package/resources/organizations/index.mjs.map +1 -1
- package/resources/organizations/organizations.d.mts +2 -55
- package/resources/organizations/organizations.d.mts.map +1 -1
- package/resources/organizations/organizations.d.ts +2 -55
- package/resources/organizations/organizations.d.ts.map +1 -1
- package/resources/organizations/organizations.js +0 -29
- package/resources/organizations/organizations.js.map +1 -1
- package/resources/organizations/organizations.mjs +1 -30
- package/resources/organizations/organizations.mjs.map +1 -1
- package/resources/organizations/users.d.mts +0 -122
- package/resources/organizations/users.d.mts.map +1 -1
- package/resources/organizations/users.d.ts +0 -122
- package/resources/organizations/users.d.ts.map +1 -1
- package/resources/organizations/users.js +0 -86
- package/resources/organizations/users.js.map +1 -1
- package/resources/organizations/users.mjs +0 -86
- package/resources/organizations/users.mjs.map +1 -1
- package/src/client.ts +3 -13
- package/src/resources/index.ts +1 -6
- package/src/resources/organizations/index.ts +2 -16
- package/src/resources/organizations/organizations.ts +2 -103
- package/src/resources/organizations/users.ts +1 -185
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,116 +1,15 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
|
-
import * as OrganizationsAPI from './organizations';
|
|
5
4
|
import * as UsersAPI from './users';
|
|
6
|
-
import {
|
|
7
|
-
CustomerUser,
|
|
8
|
-
UserDeleteParams,
|
|
9
|
-
UserInviteParams,
|
|
10
|
-
UserListParams,
|
|
11
|
-
UserListResponse,
|
|
12
|
-
UserRetrieveParams,
|
|
13
|
-
UserUpdateRoleParams,
|
|
14
|
-
Users,
|
|
15
|
-
} from './users';
|
|
16
|
-
import { APIPromise } from '../../core/api-promise';
|
|
17
|
-
import { RequestOptions } from '../../internal/request-options';
|
|
18
|
-
import { path } from '../../internal/utils/path';
|
|
5
|
+
import { Users } from './users';
|
|
19
6
|
|
|
20
7
|
export class Organizations extends APIResource {
|
|
21
8
|
users: UsersAPI.Users = new UsersAPI.Users(this._client);
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Retrieves all organizations that the authenticated user has access to, including
|
|
25
|
-
* the sender profiles within each organization that the user can access. Returns
|
|
26
|
-
* organization details with nested profiles filtered by user permissions.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```ts
|
|
30
|
-
* const organizations = await client.organizations.list();
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
list(options?: RequestOptions): APIPromise<OrganizationListResponse> {
|
|
34
|
-
return this._client.get('/v2/organizations', options);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Retrieves all sender profiles within an organization that the authenticated user
|
|
39
|
-
* has access to. Returns filtered list based on user's permissions.
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```ts
|
|
43
|
-
* const response =
|
|
44
|
-
* await client.organizations.retrieveProfiles(
|
|
45
|
-
* '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
|
|
46
|
-
* );
|
|
47
|
-
* ```
|
|
48
|
-
*/
|
|
49
|
-
retrieveProfiles(
|
|
50
|
-
orgID: string,
|
|
51
|
-
options?: RequestOptions,
|
|
52
|
-
): APIPromise<OrganizationRetrieveProfilesResponse> {
|
|
53
|
-
return this._client.get(path`/v2/organizations/${orgID}/profiles`, options);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface ProfileSummary {
|
|
58
|
-
id?: string;
|
|
59
|
-
|
|
60
|
-
createdAt?: string;
|
|
61
|
-
|
|
62
|
-
description?: string | null;
|
|
63
|
-
|
|
64
|
-
icon?: string | null;
|
|
65
|
-
|
|
66
|
-
name?: string;
|
|
67
|
-
|
|
68
|
-
shortName?: string | null;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export interface OrganizationListResponse {
|
|
72
|
-
organizations?: Array<OrganizationListResponse.Organization>;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export namespace OrganizationListResponse {
|
|
76
|
-
export interface Organization {
|
|
77
|
-
id?: string;
|
|
78
|
-
|
|
79
|
-
createdAt?: string;
|
|
80
|
-
|
|
81
|
-
description?: string | null;
|
|
82
|
-
|
|
83
|
-
icon?: string | null;
|
|
84
|
-
|
|
85
|
-
name?: string;
|
|
86
|
-
|
|
87
|
-
profiles?: Array<OrganizationsAPI.ProfileSummary>;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export interface OrganizationRetrieveProfilesResponse {
|
|
92
|
-
organizationId?: string;
|
|
93
|
-
|
|
94
|
-
profiles?: Array<ProfileSummary>;
|
|
95
9
|
}
|
|
96
10
|
|
|
97
11
|
Organizations.Users = Users;
|
|
98
12
|
|
|
99
13
|
export declare namespace Organizations {
|
|
100
|
-
export {
|
|
101
|
-
type ProfileSummary as ProfileSummary,
|
|
102
|
-
type OrganizationListResponse as OrganizationListResponse,
|
|
103
|
-
type OrganizationRetrieveProfilesResponse as OrganizationRetrieveProfilesResponse,
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
export {
|
|
107
|
-
Users as Users,
|
|
108
|
-
type CustomerUser as CustomerUser,
|
|
109
|
-
type UserListResponse as UserListResponse,
|
|
110
|
-
type UserRetrieveParams as UserRetrieveParams,
|
|
111
|
-
type UserListParams as UserListParams,
|
|
112
|
-
type UserDeleteParams as UserDeleteParams,
|
|
113
|
-
type UserInviteParams as UserInviteParams,
|
|
114
|
-
type UserUpdateRoleParams as UserUpdateRoleParams,
|
|
115
|
-
};
|
|
14
|
+
export { Users as Users };
|
|
116
15
|
}
|
|
@@ -1,189 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
|
-
import { APIPromise } from '../../core/api-promise';
|
|
5
|
-
import { buildHeaders } from '../../internal/headers';
|
|
6
|
-
import { RequestOptions } from '../../internal/request-options';
|
|
7
|
-
import { path } from '../../internal/utils/path';
|
|
8
4
|
|
|
9
|
-
export class Users extends APIResource {
|
|
10
|
-
/**
|
|
11
|
-
* Retrieves a specific user by their ID. Requires appropriate permissions. The
|
|
12
|
-
* customerId can be either an organization ID or a profile ID.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* const customerUser =
|
|
17
|
-
* await client.organizations.users.retrieve(
|
|
18
|
-
* '650e8400-e29b-41d4-a716-446655440000',
|
|
19
|
-
* { customerId: '550e8400-e29b-41d4-a716-446655440000' },
|
|
20
|
-
* );
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
retrieve(userID: string, params: UserRetrieveParams, options?: RequestOptions): APIPromise<CustomerUser> {
|
|
24
|
-
const { customerId } = params;
|
|
25
|
-
return this._client.get(path`/v2/organizations/${customerId}/users/${userID}`, options);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Retrieves all users associated with an organization or sender profile. Requires
|
|
30
|
-
* appropriate permissions. Supports pagination.
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```ts
|
|
34
|
-
* const users = await client.organizations.users.list(
|
|
35
|
-
* '550e8400-e29b-41d4-a716-446655440000',
|
|
36
|
-
* { page: 0, pageSize: 0 },
|
|
37
|
-
* );
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
list(customerID: string, query: UserListParams, options?: RequestOptions): APIPromise<UserListResponse> {
|
|
41
|
-
return this._client.get(path`/v2/organizations/${customerID}/users`, { query, ...options });
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Removes a user from an organization or sender profile. Requires admin
|
|
46
|
-
* permissions. This action permanently deletes the user association.
|
|
47
|
-
*
|
|
48
|
-
* @example
|
|
49
|
-
* ```ts
|
|
50
|
-
* await client.organizations.users.delete(
|
|
51
|
-
* '650e8400-e29b-41d4-a716-446655440000',
|
|
52
|
-
* { customerId: '550e8400-e29b-41d4-a716-446655440000' },
|
|
53
|
-
* );
|
|
54
|
-
* ```
|
|
55
|
-
*/
|
|
56
|
-
delete(userID: string, params: UserDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
57
|
-
const { customerId } = params;
|
|
58
|
-
return this._client.delete(path`/v2/organizations/${customerId}/users/${userID}`, {
|
|
59
|
-
...options,
|
|
60
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Invites a user to an organization or sender profile with a specified role.
|
|
66
|
-
* Requires appropriate permissions. The customerId can be either an organization
|
|
67
|
-
* ID or a profile ID.
|
|
68
|
-
*
|
|
69
|
-
* @example
|
|
70
|
-
* ```ts
|
|
71
|
-
* const customerUser =
|
|
72
|
-
* await client.organizations.users.invite(
|
|
73
|
-
* '550e8400-e29b-41d4-a716-446655440000',
|
|
74
|
-
* );
|
|
75
|
-
* ```
|
|
76
|
-
*/
|
|
77
|
-
invite(customerID: string, body: UserInviteParams, options?: RequestOptions): APIPromise<CustomerUser> {
|
|
78
|
-
return this._client.post(path`/v2/organizations/${customerID}/users`, { body, ...options });
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Updates a user's role within an organization or sender profile. Requires admin
|
|
83
|
-
* permissions. Valid roles are: admin, billing, developer.
|
|
84
|
-
*
|
|
85
|
-
* @example
|
|
86
|
-
* ```ts
|
|
87
|
-
* const customerUser =
|
|
88
|
-
* await client.organizations.users.updateRole(
|
|
89
|
-
* '650e8400-e29b-41d4-a716-446655440000',
|
|
90
|
-
* { customerId: '550e8400-e29b-41d4-a716-446655440000' },
|
|
91
|
-
* );
|
|
92
|
-
* ```
|
|
93
|
-
*/
|
|
94
|
-
updateRole(
|
|
95
|
-
userID: string,
|
|
96
|
-
params: UserUpdateRoleParams,
|
|
97
|
-
options?: RequestOptions,
|
|
98
|
-
): APIPromise<CustomerUser> {
|
|
99
|
-
const { customerId, ...body } = params;
|
|
100
|
-
return this._client.put(path`/v2/organizations/${customerId}/users/${userID}`, { body, ...options });
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export interface CustomerUser {
|
|
105
|
-
/**
|
|
106
|
-
* Unique identifier
|
|
107
|
-
*/
|
|
108
|
-
id?: string;
|
|
109
|
-
|
|
110
|
-
createdAt?: string;
|
|
111
|
-
|
|
112
|
-
customerId?: string;
|
|
113
|
-
|
|
114
|
-
email?: string;
|
|
115
|
-
|
|
116
|
-
invitationSentAt?: string | null;
|
|
117
|
-
|
|
118
|
-
invitationToken?: string | null;
|
|
119
|
-
|
|
120
|
-
invitationTokenExpiresAt?: string | null;
|
|
121
|
-
|
|
122
|
-
lastLoginAt?: string | null;
|
|
123
|
-
|
|
124
|
-
name?: string;
|
|
125
|
-
|
|
126
|
-
role?: string;
|
|
127
|
-
|
|
128
|
-
status?: string;
|
|
129
|
-
|
|
130
|
-
updatedAt?: string | null;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export interface UserListResponse {
|
|
134
|
-
page?: number;
|
|
135
|
-
|
|
136
|
-
pageSize?: number;
|
|
137
|
-
|
|
138
|
-
totalCount?: number;
|
|
139
|
-
|
|
140
|
-
users?: Array<CustomerUser>;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
export interface UserRetrieveParams {
|
|
144
|
-
customerId: string;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export interface UserListParams {
|
|
148
|
-
page: number;
|
|
149
|
-
|
|
150
|
-
pageSize: number;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export interface UserDeleteParams {
|
|
154
|
-
customerId: string;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
export interface UserInviteParams {
|
|
158
|
-
email?: string;
|
|
159
|
-
|
|
160
|
-
invitedBy?: string | null;
|
|
161
|
-
|
|
162
|
-
name?: string;
|
|
163
|
-
|
|
164
|
-
role?: string;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
export interface UserUpdateRoleParams {
|
|
168
|
-
/**
|
|
169
|
-
* Path param
|
|
170
|
-
*/
|
|
171
|
-
customerId: string;
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Body param
|
|
175
|
-
*/
|
|
176
|
-
role?: string;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
export declare namespace Users {
|
|
180
|
-
export {
|
|
181
|
-
type CustomerUser as CustomerUser,
|
|
182
|
-
type UserListResponse as UserListResponse,
|
|
183
|
-
type UserRetrieveParams as UserRetrieveParams,
|
|
184
|
-
type UserListParams as UserListParams,
|
|
185
|
-
type UserDeleteParams as UserDeleteParams,
|
|
186
|
-
type UserInviteParams as UserInviteParams,
|
|
187
|
-
type UserUpdateRoleParams as UserUpdateRoleParams,
|
|
188
|
-
};
|
|
189
|
-
}
|
|
5
|
+
export class Users extends APIResource {}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.6.1'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.6.1";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.6.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.6.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|