@nizam-os/dashboard-sdk 2.0.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Client.d.ts +8 -5
- package/dist/Client.js +13 -9
- package/dist/api/resources/index.d.ts +4 -2
- package/dist/api/resources/index.js +5 -3
- package/dist/api/resources/invites/client/requests/CreateInviteRequest.d.ts +2 -2
- package/dist/api/resources/invites/client/requests/CreateInviteRequest.js +1 -1
- package/dist/api/resources/memberships/client/Client.d.ts +52 -0
- package/dist/api/resources/memberships/client/Client.js +181 -0
- package/dist/api/resources/memberships/client/requests/ListMyMembershipsRequest.d.ts +15 -0
- package/dist/api/resources/memberships/client/requests/index.d.ts +2 -0
- package/dist/api/resources/memberships/exports.d.ts +2 -0
- package/dist/api/resources/memberships/exports.js +21 -0
- package/dist/api/resources/organizations/client/Client.d.ts +1 -34
- package/dist/api/resources/organizations/client/Client.js +1 -118
- package/dist/api/resources/organizations/client/requests/index.d.ts +0 -1
- package/dist/api/resources/{identity → users}/client/Client.d.ts +24 -21
- package/dist/api/resources/{identity → users}/client/Client.js +22 -18
- package/dist/api/resources/users/client/index.d.ts +1 -0
- package/dist/api/resources/users/client/index.js +17 -0
- package/dist/api/resources/users/client/requests/ListUsersRequest.d.ts +17 -0
- package/dist/api/resources/users/client/requests/UserUpdateRequest.js +3 -0
- package/dist/api/resources/users/client/requests/index.js +2 -0
- package/dist/api/resources/users/exports.d.ts +2 -0
- package/dist/api/resources/{identity → users}/exports.js +2 -2
- package/dist/api/resources/users/index.d.ts +1 -0
- package/dist/api/resources/users/index.js +17 -0
- package/dist/api/types/ListResponseBusinessCategory.d.ts +4 -0
- package/dist/api/types/ListResponseCountry.d.ts +4 -0
- package/dist/api/types/ListResponseCurrency.d.ts +4 -0
- package/dist/api/types/ListResponseLanguage.d.ts +4 -0
- package/dist/api/types/ListResponseMembership.d.ts +27 -0
- package/dist/api/types/ListResponseMembership.js +11 -0
- package/dist/api/types/ListResponseTimezone.d.ts +4 -0
- package/dist/api/types/ListResponseUserResource.d.ts +4 -0
- package/dist/api/types/{OrganizationMembership.d.ts → Membership.d.ts} +5 -5
- package/dist/api/types/{OrganizationMembership.js → Membership.js} +7 -7
- package/dist/api/types/index.d.ts +2 -1
- package/dist/api/types/index.js +2 -1
- package/package.json +1 -1
- package/dist/api/resources/identity/client/requests/ListUsersRequest.d.ts +0 -10
- package/dist/api/resources/identity/exports.d.ts +0 -2
- /package/dist/api/resources/{identity → memberships}/client/index.d.ts +0 -0
- /package/dist/api/resources/{identity → memberships}/client/index.js +0 -0
- /package/dist/api/resources/{organizations → memberships}/client/requests/LeaveOrganizationRequest.d.ts +0 -0
- /package/dist/api/resources/{organizations → memberships}/client/requests/LeaveOrganizationRequest.js +0 -0
- /package/dist/api/resources/{identity/client/requests/InviteUserRequest.js → memberships/client/requests/ListMyMembershipsRequest.js} +0 -0
- /package/dist/api/resources/{identity → memberships}/client/requests/index.js +0 -0
- /package/dist/api/resources/{identity → memberships}/index.d.ts +0 -0
- /package/dist/api/resources/{identity → memberships}/index.js +0 -0
- /package/dist/api/resources/{identity → users}/client/requests/InviteUserRequest.d.ts +0 -0
- /package/dist/api/resources/{identity/client/requests/ListUsersRequest.js → users/client/requests/InviteUserRequest.js} +0 -0
- /package/dist/api/resources/{identity/client/requests/SoftDeleteUserRequest.js → users/client/requests/ListUsersRequest.js} +0 -0
- /package/dist/api/resources/{identity → users}/client/requests/SoftDeleteUserRequest.d.ts +0 -0
- /package/dist/api/resources/{identity/client/requests/UserUpdateRequest.js → users/client/requests/SoftDeleteUserRequest.js} +0 -0
- /package/dist/api/resources/{identity → users}/client/requests/UserUpdateRequest.d.ts +0 -0
- /package/dist/api/resources/{identity → users}/client/requests/index.d.ts +0 -0
|
@@ -2,17 +2,17 @@ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClie
|
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
3
|
import * as core from "../../../../core/index.js";
|
|
4
4
|
import * as NizamDashboard from "../../../index.js";
|
|
5
|
-
export declare namespace
|
|
5
|
+
export declare namespace UsersClient {
|
|
6
6
|
type Options = BaseClientOptions;
|
|
7
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* User aggregate — current session (`/me`) and user-entity operations (invite, list, lifecycle, platform-staff admin).
|
|
12
12
|
*/
|
|
13
|
-
export declare class
|
|
14
|
-
protected readonly _options: NormalizedClientOptionsWithAuth<
|
|
15
|
-
constructor(options:
|
|
13
|
+
export declare class UsersClient {
|
|
14
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<UsersClient.Options>;
|
|
15
|
+
constructor(options: UsersClient.Options);
|
|
16
16
|
/**
|
|
17
17
|
* Returns the authenticated user merged with profile claims from their JWT.
|
|
18
18
|
*
|
|
@@ -24,7 +24,7 @@ export declare class IdentityClient {
|
|
|
24
24
|
* client roles (prefixed, e.g. `dashboard:dispatcher`). The frontend usually drops the
|
|
25
25
|
* portal prefix when rendering since it knows its own portal.
|
|
26
26
|
*
|
|
27
|
-
* @param {
|
|
27
|
+
* @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
28
|
*
|
|
29
29
|
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
30
30
|
* @throws {@link NizamDashboard.ForbiddenError}
|
|
@@ -32,15 +32,15 @@ export declare class IdentityClient {
|
|
|
32
32
|
* @throws {@link NizamDashboard.InternalServerError}
|
|
33
33
|
*
|
|
34
34
|
* @example
|
|
35
|
-
* await client.
|
|
35
|
+
* await client.users.me()
|
|
36
36
|
*/
|
|
37
|
-
me(requestOptions?:
|
|
37
|
+
me(requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<NizamDashboard.User>;
|
|
38
38
|
private __me;
|
|
39
39
|
/**
|
|
40
|
-
* Dashboard sees co-members of the caller's active organization (tenant-scoped via the organization_users join). Platform staff bypass RLS and see across tenants, and may sort by `deleted_at`.
|
|
40
|
+
* Dashboard sees co-members of the caller's active organization (tenant-scoped via the organization_users join). Platform staff bypass RLS and see across tenants, and may sort by `deleted_at`. RFC 8288 Link header carries `first`, `prev`, `next` rels alongside the body's bidirectional cursors.
|
|
41
41
|
*
|
|
42
42
|
* @param {NizamDashboard.ListUsersRequest} request
|
|
43
|
-
* @param {
|
|
43
|
+
* @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
44
44
|
*
|
|
45
45
|
* @throws {@link NizamDashboard.BadRequestError}
|
|
46
46
|
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
@@ -48,15 +48,18 @@ export declare class IdentityClient {
|
|
|
48
48
|
* @throws {@link NizamDashboard.InternalServerError}
|
|
49
49
|
*
|
|
50
50
|
* @example
|
|
51
|
-
* await client.
|
|
51
|
+
* await client.users.listUsers({
|
|
52
|
+
* starting_after: "Y3Vyc29yX25leHRfMDFKNVE=",
|
|
53
|
+
* ending_before: "Y3Vyc29yX25leHRfMDFKNVE="
|
|
54
|
+
* })
|
|
52
55
|
*/
|
|
53
|
-
listUsers(request?: NizamDashboard.ListUsersRequest, requestOptions?:
|
|
56
|
+
listUsers(request?: NizamDashboard.ListUsersRequest, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<NizamDashboard.ListResponseUserResource>;
|
|
54
57
|
private __listUsers;
|
|
55
58
|
/**
|
|
56
59
|
* Tenant-admin operation. Creates a placeholder User row that JIT provisioning replaces once the recipient completes Keycloak signup.
|
|
57
60
|
*
|
|
58
61
|
* @param {NizamDashboard.InviteUserRequest} request
|
|
59
|
-
* @param {
|
|
62
|
+
* @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
60
63
|
*
|
|
61
64
|
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
62
65
|
* @throws {@link NizamDashboard.ForbiddenError}
|
|
@@ -65,18 +68,18 @@ export declare class IdentityClient {
|
|
|
65
68
|
* @throws {@link NizamDashboard.InternalServerError}
|
|
66
69
|
*
|
|
67
70
|
* @example
|
|
68
|
-
* await client.
|
|
71
|
+
* await client.users.inviteUser({
|
|
69
72
|
* email: "newhire@acme.example",
|
|
70
73
|
* name: "New Hire"
|
|
71
74
|
* })
|
|
72
75
|
*/
|
|
73
|
-
inviteUser(request: NizamDashboard.InviteUserRequest, requestOptions?:
|
|
76
|
+
inviteUser(request: NizamDashboard.InviteUserRequest, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<NizamDashboard.UserResource>;
|
|
74
77
|
private __inviteUser;
|
|
75
78
|
/**
|
|
76
79
|
* Tenant-admin operation. Sets `deleted_at = NOW()`. Subsequent dashboard reads filter the row out; platform staff can still surface and act on it.
|
|
77
80
|
*
|
|
78
81
|
* @param {NizamDashboard.SoftDeleteUserRequest} request
|
|
79
|
-
* @param {
|
|
82
|
+
* @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
80
83
|
*
|
|
81
84
|
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
82
85
|
* @throws {@link NizamDashboard.ForbiddenError}
|
|
@@ -84,17 +87,17 @@ export declare class IdentityClient {
|
|
|
84
87
|
* @throws {@link NizamDashboard.InternalServerError}
|
|
85
88
|
*
|
|
86
89
|
* @example
|
|
87
|
-
* await client.
|
|
90
|
+
* await client.users.softDeleteUser({
|
|
88
91
|
* id: "00000000-0000-0000-0000-000000000000"
|
|
89
92
|
* })
|
|
90
93
|
*/
|
|
91
|
-
softDeleteUser(request: NizamDashboard.SoftDeleteUserRequest, requestOptions?:
|
|
94
|
+
softDeleteUser(request: NizamDashboard.SoftDeleteUserRequest, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
92
95
|
private __softDeleteUser;
|
|
93
96
|
/**
|
|
94
97
|
* Tenant-admin operation. Body has no `status` — lifecycle changes go through the platform-staff surface.
|
|
95
98
|
*
|
|
96
99
|
* @param {NizamDashboard.UserUpdateRequest} request
|
|
97
|
-
* @param {
|
|
100
|
+
* @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
98
101
|
*
|
|
99
102
|
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
100
103
|
* @throws {@link NizamDashboard.ForbiddenError}
|
|
@@ -104,12 +107,12 @@ export declare class IdentityClient {
|
|
|
104
107
|
* @throws {@link NizamDashboard.InternalServerError}
|
|
105
108
|
*
|
|
106
109
|
* @example
|
|
107
|
-
* await client.
|
|
110
|
+
* await client.users.updateUser({
|
|
108
111
|
* id: "00000000-0000-0000-0000-000000000000",
|
|
109
112
|
* email: "renamed@acme.example",
|
|
110
113
|
* name: "Ali Issa"
|
|
111
114
|
* })
|
|
112
115
|
*/
|
|
113
|
-
updateUser(request: NizamDashboard.UserUpdateRequest, requestOptions?:
|
|
116
|
+
updateUser(request: NizamDashboard.UserUpdateRequest, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<NizamDashboard.UserResource>;
|
|
114
117
|
private __updateUser;
|
|
115
118
|
}
|
|
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
};
|
|
35
35
|
})();
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.
|
|
37
|
+
exports.UsersClient = void 0;
|
|
38
38
|
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
39
39
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
40
40
|
const core = __importStar(require("../../../../core/index.js"));
|
|
@@ -43,9 +43,9 @@ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatu
|
|
|
43
43
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
44
44
|
const NizamDashboard = __importStar(require("../../../index.js"));
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* User aggregate — current session (`/me`) and user-entity operations (invite, list, lifecycle, platform-staff admin).
|
|
47
47
|
*/
|
|
48
|
-
class
|
|
48
|
+
class UsersClient {
|
|
49
49
|
constructor(options) {
|
|
50
50
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
51
51
|
}
|
|
@@ -60,7 +60,7 @@ class IdentityClient {
|
|
|
60
60
|
* client roles (prefixed, e.g. `dashboard:dispatcher`). The frontend usually drops the
|
|
61
61
|
* portal prefix when rendering since it knows its own portal.
|
|
62
62
|
*
|
|
63
|
-
* @param {
|
|
63
|
+
* @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
64
|
*
|
|
65
65
|
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
66
66
|
* @throws {@link NizamDashboard.ForbiddenError}
|
|
@@ -68,7 +68,7 @@ class IdentityClient {
|
|
|
68
68
|
* @throws {@link NizamDashboard.InternalServerError}
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
|
-
* await client.
|
|
71
|
+
* await client.users.me()
|
|
72
72
|
*/
|
|
73
73
|
me(requestOptions) {
|
|
74
74
|
return core.HttpResponsePromise.fromPromise(this.__me(requestOptions));
|
|
@@ -113,10 +113,10 @@ class IdentityClient {
|
|
|
113
113
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/me");
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
116
|
-
* Dashboard sees co-members of the caller's active organization (tenant-scoped via the organization_users join). Platform staff bypass RLS and see across tenants, and may sort by `deleted_at`.
|
|
116
|
+
* Dashboard sees co-members of the caller's active organization (tenant-scoped via the organization_users join). Platform staff bypass RLS and see across tenants, and may sort by `deleted_at`. RFC 8288 Link header carries `first`, `prev`, `next` rels alongside the body's bidirectional cursors.
|
|
117
117
|
*
|
|
118
118
|
* @param {NizamDashboard.ListUsersRequest} request
|
|
119
|
-
* @param {
|
|
119
|
+
* @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
120
120
|
*
|
|
121
121
|
* @throws {@link NizamDashboard.BadRequestError}
|
|
122
122
|
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
@@ -124,17 +124,21 @@ class IdentityClient {
|
|
|
124
124
|
* @throws {@link NizamDashboard.InternalServerError}
|
|
125
125
|
*
|
|
126
126
|
* @example
|
|
127
|
-
* await client.
|
|
127
|
+
* await client.users.listUsers({
|
|
128
|
+
* starting_after: "Y3Vyc29yX25leHRfMDFKNVE=",
|
|
129
|
+
* ending_before: "Y3Vyc29yX25leHRfMDFKNVE="
|
|
130
|
+
* })
|
|
128
131
|
*/
|
|
129
132
|
listUsers(request = {}, requestOptions) {
|
|
130
133
|
return core.HttpResponsePromise.fromPromise(this.__listUsers(request, requestOptions));
|
|
131
134
|
}
|
|
132
135
|
async __listUsers(request = {}, requestOptions) {
|
|
133
|
-
const { limit,
|
|
136
|
+
const { sort, limit, starting_after: startingAfter, ending_before: endingBefore } = request;
|
|
134
137
|
const _queryParams = {
|
|
135
|
-
limit,
|
|
136
|
-
offset,
|
|
137
138
|
sort,
|
|
139
|
+
limit,
|
|
140
|
+
starting_after: startingAfter,
|
|
141
|
+
ending_before: endingBefore,
|
|
138
142
|
};
|
|
139
143
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
140
144
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
@@ -185,7 +189,7 @@ class IdentityClient {
|
|
|
185
189
|
* Tenant-admin operation. Creates a placeholder User row that JIT provisioning replaces once the recipient completes Keycloak signup.
|
|
186
190
|
*
|
|
187
191
|
* @param {NizamDashboard.InviteUserRequest} request
|
|
188
|
-
* @param {
|
|
192
|
+
* @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
189
193
|
*
|
|
190
194
|
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
191
195
|
* @throws {@link NizamDashboard.ForbiddenError}
|
|
@@ -194,7 +198,7 @@ class IdentityClient {
|
|
|
194
198
|
* @throws {@link NizamDashboard.InternalServerError}
|
|
195
199
|
*
|
|
196
200
|
* @example
|
|
197
|
-
* await client.
|
|
201
|
+
* await client.users.inviteUser({
|
|
198
202
|
* email: "newhire@acme.example",
|
|
199
203
|
* name: "New Hire"
|
|
200
204
|
* })
|
|
@@ -250,7 +254,7 @@ class IdentityClient {
|
|
|
250
254
|
* Tenant-admin operation. Sets `deleted_at = NOW()`. Subsequent dashboard reads filter the row out; platform staff can still surface and act on it.
|
|
251
255
|
*
|
|
252
256
|
* @param {NizamDashboard.SoftDeleteUserRequest} request
|
|
253
|
-
* @param {
|
|
257
|
+
* @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
254
258
|
*
|
|
255
259
|
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
256
260
|
* @throws {@link NizamDashboard.ForbiddenError}
|
|
@@ -258,7 +262,7 @@ class IdentityClient {
|
|
|
258
262
|
* @throws {@link NizamDashboard.InternalServerError}
|
|
259
263
|
*
|
|
260
264
|
* @example
|
|
261
|
-
* await client.
|
|
265
|
+
* await client.users.softDeleteUser({
|
|
262
266
|
* id: "00000000-0000-0000-0000-000000000000"
|
|
263
267
|
* })
|
|
264
268
|
*/
|
|
@@ -309,7 +313,7 @@ class IdentityClient {
|
|
|
309
313
|
* Tenant-admin operation. Body has no `status` — lifecycle changes go through the platform-staff surface.
|
|
310
314
|
*
|
|
311
315
|
* @param {NizamDashboard.UserUpdateRequest} request
|
|
312
|
-
* @param {
|
|
316
|
+
* @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
313
317
|
*
|
|
314
318
|
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
315
319
|
* @throws {@link NizamDashboard.ForbiddenError}
|
|
@@ -319,7 +323,7 @@ class IdentityClient {
|
|
|
319
323
|
* @throws {@link NizamDashboard.InternalServerError}
|
|
320
324
|
*
|
|
321
325
|
* @example
|
|
322
|
-
* await client.
|
|
326
|
+
* await client.users.updateUser({
|
|
323
327
|
* id: "00000000-0000-0000-0000-000000000000",
|
|
324
328
|
* email: "renamed@acme.example",
|
|
325
329
|
* name: "Ali Issa"
|
|
@@ -376,4 +380,4 @@ class IdentityClient {
|
|
|
376
380
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/v1/users/{id}");
|
|
377
381
|
}
|
|
378
382
|
}
|
|
379
|
-
exports.
|
|
383
|
+
exports.UsersClient = UsersClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* starting_after: "Y3Vyc29yX25leHRfMDFKNVE=",
|
|
5
|
+
* ending_before: "Y3Vyc29yX25leHRfMDFKNVE="
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface ListUsersRequest {
|
|
9
|
+
/** Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. */
|
|
10
|
+
sort?: string | string[];
|
|
11
|
+
/** Page size. Default 20, maximum 100. Out-of-range values are silently clamped; the response body's `limit` field reflects what was applied. */
|
|
12
|
+
limit?: number;
|
|
13
|
+
/** Opaque cursor — return the page starting strictly after this entity in the sort order. Mutually exclusive with `ending_before`. */
|
|
14
|
+
starting_after?: string;
|
|
15
|
+
/** Opaque cursor — return the page ending strictly before this entity in the sort order. Mutually exclusive with `starting_after`. */
|
|
16
|
+
ending_before?: string;
|
|
17
|
+
}
|
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
16
|
};
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
18
|
+
exports.UsersClient = void 0;
|
|
19
19
|
var Client_js_1 = require("./client/Client.js");
|
|
20
|
-
Object.defineProperty(exports, "
|
|
20
|
+
Object.defineProperty(exports, "UsersClient", { enumerable: true, get: function () { return Client_js_1.UsersClient; } });
|
|
21
21
|
__exportStar(require("./client/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -9,8 +9,12 @@ export interface ListResponseBusinessCategory {
|
|
|
9
9
|
data?: NizamDashboard.BusinessCategory[] | undefined;
|
|
10
10
|
/** True when more pages exist; pass `next_cursor` as `?starting_after=` to fetch the next page. */
|
|
11
11
|
has_more?: boolean | undefined;
|
|
12
|
+
/** True when earlier pages exist; pass `prev_cursor` as `?ending_before=` to fetch the previous page. */
|
|
13
|
+
has_previous?: boolean | undefined;
|
|
12
14
|
/** Opaque cursor for the next page. `null` on the last page. */
|
|
13
15
|
next_cursor?: string | undefined;
|
|
16
|
+
/** Opaque cursor for the previous page. `null` on the first page. */
|
|
17
|
+
prev_cursor?: string | undefined;
|
|
14
18
|
/** Page size that produced this response. */
|
|
15
19
|
limit?: number | undefined;
|
|
16
20
|
}
|
|
@@ -9,8 +9,12 @@ export interface ListResponseCountry {
|
|
|
9
9
|
data?: NizamDashboard.Country[] | undefined;
|
|
10
10
|
/** True when more pages exist; pass `next_cursor` as `?starting_after=` to fetch the next page. */
|
|
11
11
|
has_more?: boolean | undefined;
|
|
12
|
+
/** True when earlier pages exist; pass `prev_cursor` as `?ending_before=` to fetch the previous page. */
|
|
13
|
+
has_previous?: boolean | undefined;
|
|
12
14
|
/** Opaque cursor for the next page. `null` on the last page. */
|
|
13
15
|
next_cursor?: string | undefined;
|
|
16
|
+
/** Opaque cursor for the previous page. `null` on the first page. */
|
|
17
|
+
prev_cursor?: string | undefined;
|
|
14
18
|
/** Page size that produced this response. */
|
|
15
19
|
limit?: number | undefined;
|
|
16
20
|
}
|
|
@@ -9,8 +9,12 @@ export interface ListResponseCurrency {
|
|
|
9
9
|
data?: NizamDashboard.Currency[] | undefined;
|
|
10
10
|
/** True when more pages exist; pass `next_cursor` as `?starting_after=` to fetch the next page. */
|
|
11
11
|
has_more?: boolean | undefined;
|
|
12
|
+
/** True when earlier pages exist; pass `prev_cursor` as `?ending_before=` to fetch the previous page. */
|
|
13
|
+
has_previous?: boolean | undefined;
|
|
12
14
|
/** Opaque cursor for the next page. `null` on the last page. */
|
|
13
15
|
next_cursor?: string | undefined;
|
|
16
|
+
/** Opaque cursor for the previous page. `null` on the first page. */
|
|
17
|
+
prev_cursor?: string | undefined;
|
|
14
18
|
/** Page size that produced this response. */
|
|
15
19
|
limit?: number | undefined;
|
|
16
20
|
}
|
|
@@ -9,8 +9,12 @@ export interface ListResponseLanguage {
|
|
|
9
9
|
data?: NizamDashboard.Language[] | undefined;
|
|
10
10
|
/** True when more pages exist; pass `next_cursor` as `?starting_after=` to fetch the next page. */
|
|
11
11
|
has_more?: boolean | undefined;
|
|
12
|
+
/** True when earlier pages exist; pass `prev_cursor` as `?ending_before=` to fetch the previous page. */
|
|
13
|
+
has_previous?: boolean | undefined;
|
|
12
14
|
/** Opaque cursor for the next page. `null` on the last page. */
|
|
13
15
|
next_cursor?: string | undefined;
|
|
16
|
+
/** Opaque cursor for the previous page. `null` on the first page. */
|
|
17
|
+
prev_cursor?: string | undefined;
|
|
14
18
|
/** Page size that produced this response. */
|
|
15
19
|
limit?: number | undefined;
|
|
16
20
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type * as NizamDashboard from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Envelope for paginated list responses (Stripe-style cursor pagination).
|
|
4
|
+
*/
|
|
5
|
+
export interface ListResponseMembership {
|
|
6
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
7
|
+
object?: ListResponseMembership.Object_ | undefined;
|
|
8
|
+
/** Page of resources. Empty array when there are no matches. */
|
|
9
|
+
data?: NizamDashboard.Membership[] | undefined;
|
|
10
|
+
/** True when more pages exist; pass `next_cursor` as `?starting_after=` to fetch the next page. */
|
|
11
|
+
has_more?: boolean | undefined;
|
|
12
|
+
/** True when earlier pages exist; pass `prev_cursor` as `?ending_before=` to fetch the previous page. */
|
|
13
|
+
has_previous?: boolean | undefined;
|
|
14
|
+
/** Opaque cursor for the next page. `null` on the last page. */
|
|
15
|
+
next_cursor?: string | undefined;
|
|
16
|
+
/** Opaque cursor for the previous page. `null` on the first page. */
|
|
17
|
+
prev_cursor?: string | undefined;
|
|
18
|
+
/** Page size that produced this response. */
|
|
19
|
+
limit?: number | undefined;
|
|
20
|
+
}
|
|
21
|
+
export declare namespace ListResponseMembership {
|
|
22
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
23
|
+
const Object_: {
|
|
24
|
+
readonly List: "list";
|
|
25
|
+
};
|
|
26
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
27
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ListResponseMembership = void 0;
|
|
5
|
+
var ListResponseMembership;
|
|
6
|
+
(function (ListResponseMembership) {
|
|
7
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
8
|
+
ListResponseMembership.Object_ = {
|
|
9
|
+
List: "list",
|
|
10
|
+
};
|
|
11
|
+
})(ListResponseMembership || (exports.ListResponseMembership = ListResponseMembership = {}));
|
|
@@ -9,8 +9,12 @@ export interface ListResponseTimezone {
|
|
|
9
9
|
data?: NizamDashboard.Timezone[] | undefined;
|
|
10
10
|
/** True when more pages exist; pass `next_cursor` as `?starting_after=` to fetch the next page. */
|
|
11
11
|
has_more?: boolean | undefined;
|
|
12
|
+
/** True when earlier pages exist; pass `prev_cursor` as `?ending_before=` to fetch the previous page. */
|
|
13
|
+
has_previous?: boolean | undefined;
|
|
12
14
|
/** Opaque cursor for the next page. `null` on the last page. */
|
|
13
15
|
next_cursor?: string | undefined;
|
|
16
|
+
/** Opaque cursor for the previous page. `null` on the first page. */
|
|
17
|
+
prev_cursor?: string | undefined;
|
|
14
18
|
/** Page size that produced this response. */
|
|
15
19
|
limit?: number | undefined;
|
|
16
20
|
}
|
|
@@ -9,8 +9,12 @@ export interface ListResponseUserResource {
|
|
|
9
9
|
data?: NizamDashboard.UserResource[] | undefined;
|
|
10
10
|
/** True when more pages exist; pass `next_cursor` as `?starting_after=` to fetch the next page. */
|
|
11
11
|
has_more?: boolean | undefined;
|
|
12
|
+
/** True when earlier pages exist; pass `prev_cursor` as `?ending_before=` to fetch the previous page. */
|
|
13
|
+
has_previous?: boolean | undefined;
|
|
12
14
|
/** Opaque cursor for the next page. `null` on the last page. */
|
|
13
15
|
next_cursor?: string | undefined;
|
|
16
|
+
/** Opaque cursor for the previous page. `null` on the first page. */
|
|
17
|
+
prev_cursor?: string | undefined;
|
|
14
18
|
/** Page size that produced this response. */
|
|
15
19
|
limit?: number | undefined;
|
|
16
20
|
}
|
|
@@ -2,14 +2,14 @@ import type * as NizamDashboard from "../index.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* An organization the current user belongs to, with their role inside it.
|
|
4
4
|
*/
|
|
5
|
-
export interface
|
|
5
|
+
export interface Membership {
|
|
6
6
|
organization?: NizamDashboard.Organization | undefined;
|
|
7
7
|
/** The user's role in this organization. */
|
|
8
|
-
role?:
|
|
8
|
+
role?: Membership.Role | undefined;
|
|
9
9
|
/** Object type discriminator (Stripe pattern). */
|
|
10
|
-
object?:
|
|
10
|
+
object?: Membership.Object_ | undefined;
|
|
11
11
|
}
|
|
12
|
-
export declare namespace
|
|
12
|
+
export declare namespace Membership {
|
|
13
13
|
/** The user's role in this organization. */
|
|
14
14
|
const Role: {
|
|
15
15
|
readonly SuperAdmin: "super_admin";
|
|
@@ -23,7 +23,7 @@ export declare namespace OrganizationMembership {
|
|
|
23
23
|
type Role = (typeof Role)[keyof typeof Role];
|
|
24
24
|
/** Object type discriminator (Stripe pattern). */
|
|
25
25
|
const Object_: {
|
|
26
|
-
readonly
|
|
26
|
+
readonly Membership: "membership";
|
|
27
27
|
};
|
|
28
28
|
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
29
29
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
var
|
|
6
|
-
(function (
|
|
4
|
+
exports.Membership = void 0;
|
|
5
|
+
var Membership;
|
|
6
|
+
(function (Membership) {
|
|
7
7
|
/** The user's role in this organization. */
|
|
8
|
-
|
|
8
|
+
Membership.Role = {
|
|
9
9
|
SuperAdmin: "super_admin",
|
|
10
10
|
Admin: "admin",
|
|
11
11
|
Dispatcher: "dispatcher",
|
|
@@ -15,7 +15,7 @@ var OrganizationMembership;
|
|
|
15
15
|
BillingAdmin: "billing_admin",
|
|
16
16
|
};
|
|
17
17
|
/** Object type discriminator (Stripe pattern). */
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
Membership.Object_ = {
|
|
19
|
+
Membership: "membership",
|
|
20
20
|
};
|
|
21
|
-
})(
|
|
21
|
+
})(Membership || (exports.Membership = Membership = {}));
|
|
@@ -15,11 +15,12 @@ export * from "./ListResponseBusinessCategory.js";
|
|
|
15
15
|
export * from "./ListResponseCountry.js";
|
|
16
16
|
export * from "./ListResponseCurrency.js";
|
|
17
17
|
export * from "./ListResponseLanguage.js";
|
|
18
|
+
export * from "./ListResponseMembership.js";
|
|
18
19
|
export * from "./ListResponseTimezone.js";
|
|
19
20
|
export * from "./ListResponseUserResource.js";
|
|
21
|
+
export * from "./Membership.js";
|
|
20
22
|
export * from "./Operator.js";
|
|
21
23
|
export * from "./Organization.js";
|
|
22
|
-
export * from "./OrganizationMembership.js";
|
|
23
24
|
export * from "./ProblemDetail.js";
|
|
24
25
|
export * from "./Timezone.js";
|
|
25
26
|
export * from "./User.js";
|
package/dist/api/types/index.js
CHANGED
|
@@ -31,11 +31,12 @@ __exportStar(require("./ListResponseBusinessCategory.js"), exports);
|
|
|
31
31
|
__exportStar(require("./ListResponseCountry.js"), exports);
|
|
32
32
|
__exportStar(require("./ListResponseCurrency.js"), exports);
|
|
33
33
|
__exportStar(require("./ListResponseLanguage.js"), exports);
|
|
34
|
+
__exportStar(require("./ListResponseMembership.js"), exports);
|
|
34
35
|
__exportStar(require("./ListResponseTimezone.js"), exports);
|
|
35
36
|
__exportStar(require("./ListResponseUserResource.js"), exports);
|
|
37
|
+
__exportStar(require("./Membership.js"), exports);
|
|
36
38
|
__exportStar(require("./Operator.js"), exports);
|
|
37
39
|
__exportStar(require("./Organization.js"), exports);
|
|
38
|
-
__exportStar(require("./OrganizationMembership.js"), exports);
|
|
39
40
|
__exportStar(require("./ProblemDetail.js"), exports);
|
|
40
41
|
__exportStar(require("./Timezone.js"), exports);
|
|
41
42
|
__exportStar(require("./User.js"), exports);
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @example
|
|
3
|
-
* {}
|
|
4
|
-
*/
|
|
5
|
-
export interface ListUsersRequest {
|
|
6
|
-
limit?: number;
|
|
7
|
-
offset?: number;
|
|
8
|
-
/** Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. */
|
|
9
|
-
sort?: string | string[];
|
|
10
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|