@nizam-os/dashboard-sdk 11.0.0 → 12.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 +3 -0
- package/dist/Client.js +6 -2
- package/dist/api/resources/assets/client/Client.d.ts +20 -0
- package/dist/api/resources/assets/client/Client.js +20 -0
- package/dist/api/resources/index.d.ts +2 -0
- package/dist/api/resources/index.js +3 -1
- package/dist/api/resources/organizations/client/Client.d.ts +1 -1
- package/dist/api/resources/organizations/client/Client.js +1 -1
- package/dist/api/resources/tasks/client/Client.d.ts +120 -0
- package/dist/api/resources/tasks/client/Client.js +391 -0
- package/dist/api/resources/tasks/client/index.d.ts +1 -0
- package/dist/api/resources/tasks/client/index.js +17 -0
- package/dist/api/resources/tasks/client/requests/CreateTaskRequest.d.ts +37 -0
- package/dist/api/resources/tasks/client/requests/CreateTaskRequest.js +19 -0
- package/dist/api/resources/tasks/client/requests/DeleteTaskRequest.d.ts +9 -0
- package/dist/api/resources/tasks/client/requests/DeleteTaskRequest.js +3 -0
- package/dist/api/resources/tasks/client/requests/GetTaskRequest.d.ts +9 -0
- package/dist/api/resources/tasks/client/requests/GetTaskRequest.js +3 -0
- package/dist/api/resources/tasks/client/requests/ListTasksRequest.d.ts +15 -0
- package/dist/api/resources/tasks/client/requests/ListTasksRequest.js +3 -0
- package/dist/api/resources/tasks/client/requests/UpdateTaskRequest.d.ts +12 -0
- package/dist/api/resources/tasks/client/requests/UpdateTaskRequest.js +3 -0
- package/dist/api/resources/tasks/client/requests/index.d.ts +5 -0
- package/dist/api/resources/tasks/client/requests/index.js +5 -0
- package/dist/api/resources/tasks/exports.d.ts +2 -0
- package/dist/api/resources/tasks/exports.js +21 -0
- package/dist/api/resources/tasks/index.d.ts +1 -0
- package/dist/api/resources/tasks/index.js +17 -0
- package/dist/api/types/ActivityCauser.d.ts +13 -0
- package/dist/api/types/ActivityCauser.js +3 -0
- package/dist/api/types/ActivityResource.d.ts +2 -0
- package/dist/api/types/ListResponseTask.d.ts +27 -0
- package/dist/api/types/ListResponseTask.js +11 -0
- package/dist/api/types/OperatorAsset.d.ts +64 -0
- package/dist/api/types/OperatorAsset.js +33 -0
- package/dist/api/types/Task.d.ts +41 -0
- package/dist/api/types/Task.js +23 -0
- package/dist/api/types/User.d.ts +24 -0
- package/dist/api/types/User.js +21 -0
- package/dist/api/types/index.d.ts +4 -0
- package/dist/api/types/index.js +4 -0
- package/package.json +1 -1
package/dist/Client.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ import { OrganizationsClient } from "./api/resources/organizations/client/Client
|
|
|
16
16
|
import { PositionsClient } from "./api/resources/positions/client/Client.js";
|
|
17
17
|
import { RealtimeClient } from "./api/resources/realtime/client/Client.js";
|
|
18
18
|
import { TaskAttemptsClient } from "./api/resources/taskAttempts/client/Client.js";
|
|
19
|
+
import { TasksClient } from "./api/resources/tasks/client/Client.js";
|
|
19
20
|
import { UsersClient } from "./api/resources/users/client/Client.js";
|
|
20
21
|
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
|
|
21
22
|
import { type NormalizedClientOptionsWithAuth } from "./BaseClient.js";
|
|
@@ -46,6 +47,7 @@ export declare class NizamDashboardClient {
|
|
|
46
47
|
protected _organizations: OrganizationsClient | undefined;
|
|
47
48
|
protected _realtime: RealtimeClient | undefined;
|
|
48
49
|
protected _taskAttempts: TaskAttemptsClient | undefined;
|
|
50
|
+
protected _tasks: TasksClient | undefined;
|
|
49
51
|
constructor(options: NizamDashboardClient.Options);
|
|
50
52
|
get activity(): ActivityClient;
|
|
51
53
|
get assets(): AssetsClient;
|
|
@@ -66,6 +68,7 @@ export declare class NizamDashboardClient {
|
|
|
66
68
|
get organizations(): OrganizationsClient;
|
|
67
69
|
get realtime(): RealtimeClient;
|
|
68
70
|
get taskAttempts(): TaskAttemptsClient;
|
|
71
|
+
get tasks(): TasksClient;
|
|
69
72
|
/**
|
|
70
73
|
* Make a passthrough request using the SDK's configured auth, retry, logging, etc.
|
|
71
74
|
* This is useful for making requests to endpoints not yet supported in the SDK.
|
package/dist/Client.js
CHANGED
|
@@ -53,7 +53,8 @@ const Client_js_15 = require("./api/resources/organizations/client/Client.js");
|
|
|
53
53
|
const Client_js_16 = require("./api/resources/positions/client/Client.js");
|
|
54
54
|
const Client_js_17 = require("./api/resources/realtime/client/Client.js");
|
|
55
55
|
const Client_js_18 = require("./api/resources/taskAttempts/client/Client.js");
|
|
56
|
-
const Client_js_19 = require("./api/resources/
|
|
56
|
+
const Client_js_19 = require("./api/resources/tasks/client/Client.js");
|
|
57
|
+
const Client_js_20 = require("./api/resources/users/client/Client.js");
|
|
57
58
|
const BaseClient_js_1 = require("./BaseClient.js");
|
|
58
59
|
const core = __importStar(require("./core/index.js"));
|
|
59
60
|
class NizamDashboardClient {
|
|
@@ -88,7 +89,7 @@ class NizamDashboardClient {
|
|
|
88
89
|
return (this._lookups ?? (this._lookups = new Client_js_10.LookupsClient(this._options)));
|
|
89
90
|
}
|
|
90
91
|
get users() {
|
|
91
|
-
return (this._users ?? (this._users = new
|
|
92
|
+
return (this._users ?? (this._users = new Client_js_20.UsersClient(this._options)));
|
|
92
93
|
}
|
|
93
94
|
get activeOrganization() {
|
|
94
95
|
return (this._activeOrganization ?? (this._activeOrganization = new Client_js_1.ActiveOrganizationClient(this._options)));
|
|
@@ -117,6 +118,9 @@ class NizamDashboardClient {
|
|
|
117
118
|
get taskAttempts() {
|
|
118
119
|
return (this._taskAttempts ?? (this._taskAttempts = new Client_js_18.TaskAttemptsClient(this._options)));
|
|
119
120
|
}
|
|
121
|
+
get tasks() {
|
|
122
|
+
return (this._tasks ?? (this._tasks = new Client_js_19.TasksClient(this._options)));
|
|
123
|
+
}
|
|
120
124
|
/**
|
|
121
125
|
* Make a passthrough request using the SDK's configured auth, retry, logging, etc.
|
|
122
126
|
* This is useful for making requests to endpoints not yet supported in the SDK.
|
|
@@ -135,6 +135,8 @@ export declare class AssetsClient {
|
|
|
135
135
|
getAssetImportTemplate(requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
136
136
|
private __getAssetImportTemplate;
|
|
137
137
|
/**
|
|
138
|
+
* Returns one asset. Visible to members of the asset's organization and to L4-granted cross-tenant readers; anyone else gets 404 — indistinguishable from a non-existent id (prevents tenant probing).
|
|
139
|
+
*
|
|
138
140
|
* @param {NizamDashboard.GetAssetRequest} request
|
|
139
141
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
140
142
|
*
|
|
@@ -154,6 +156,8 @@ export declare class AssetsClient {
|
|
|
154
156
|
/**
|
|
155
157
|
* Soft-deletes the asset: it disappears from listings immediately and frees its VIN for re-registration. Assignments and historical records are left untouched. There is no synchronous bulk-delete endpoint — delete a selection by fanning out per-id requests (each is naturally idempotent).
|
|
156
158
|
*
|
|
159
|
+
* > **Requires** `manage` on `asset` (SpiceDB permission expression).
|
|
160
|
+
*
|
|
157
161
|
* @param {NizamDashboard.DeleteAssetRequest} request
|
|
158
162
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
159
163
|
*
|
|
@@ -173,6 +177,8 @@ export declare class AssetsClient {
|
|
|
173
177
|
/**
|
|
174
178
|
* Set-only partial update of an asset's mutable fields — display name, sub-kind, autonomy level, and the vehicle identity (VIN, plate, make, model, year). Omitted or null fields are left unchanged. An asset's `kind` is immutable and lifecycle `status` moves through dedicated transitions, so neither is editable here.
|
|
175
179
|
*
|
|
180
|
+
* > **Requires** `manage` on `asset` (SpiceDB permission expression).
|
|
181
|
+
*
|
|
176
182
|
* @param {NizamDashboard.UpdateAssetRequest} request
|
|
177
183
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
178
184
|
*
|
|
@@ -205,6 +211,8 @@ export declare class AssetsClient {
|
|
|
205
211
|
/**
|
|
206
212
|
* Returns the asset to `active` service. Idempotent no-op if already active; an illegal edge (e.g. from a terminal sold/lost asset) → 409 `asset.invalid_transition`. No body — fan out per id for a bulk change.
|
|
207
213
|
*
|
|
214
|
+
* > **Requires** `manage` on `asset` (SpiceDB permission expression).
|
|
215
|
+
*
|
|
208
216
|
* @param {NizamDashboard.ActivateAssetRequest} request
|
|
209
217
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
210
218
|
*
|
|
@@ -225,6 +233,8 @@ export declare class AssetsClient {
|
|
|
225
233
|
/**
|
|
226
234
|
* Marks the asset `inactive` (idle but still in-fleet). Idempotent no-op if already inactive; an illegal edge → 409 `asset.invalid_transition`. No body.
|
|
227
235
|
*
|
|
236
|
+
* > **Requires** `manage` on `asset` (SpiceDB permission expression).
|
|
237
|
+
*
|
|
228
238
|
* @param {NizamDashboard.DeactivateAssetRequest} request
|
|
229
239
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
230
240
|
*
|
|
@@ -245,6 +255,8 @@ export declare class AssetsClient {
|
|
|
245
255
|
/**
|
|
246
256
|
* Moves the asset into `maintenance`. Idempotent no-op if already in maintenance; an illegal edge → 409 `asset.invalid_transition`. No body.
|
|
247
257
|
*
|
|
258
|
+
* > **Requires** `manage` on `asset` (SpiceDB permission expression).
|
|
259
|
+
*
|
|
248
260
|
* @param {NizamDashboard.EnterAssetMaintenanceRequest} request
|
|
249
261
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
250
262
|
*
|
|
@@ -265,6 +277,8 @@ export declare class AssetsClient {
|
|
|
265
277
|
/**
|
|
266
278
|
* Marks the asset `lost` — a terminal state; the asset has left the fleet and accepts no further transitions. Idempotent no-op if already lost; an illegal edge → 409 `asset.invalid_transition`. No body.
|
|
267
279
|
*
|
|
280
|
+
* > **Requires** `manage` on `asset` (SpiceDB permission expression).
|
|
281
|
+
*
|
|
268
282
|
* @param {NizamDashboard.ReportAssetLostRequest} request
|
|
269
283
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
270
284
|
*
|
|
@@ -285,6 +299,8 @@ export declare class AssetsClient {
|
|
|
285
299
|
/**
|
|
286
300
|
* Retires the asset (`retired`) — decommissioned but still owned; it may later be reactivated, sold, or reported lost. Idempotent no-op if already retired; an illegal edge → 409 `asset.invalid_transition`. No body.
|
|
287
301
|
*
|
|
302
|
+
* > **Requires** `manage` on `asset` (SpiceDB permission expression).
|
|
303
|
+
*
|
|
288
304
|
* @param {NizamDashboard.RetireAssetRequest} request
|
|
289
305
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
290
306
|
*
|
|
@@ -305,6 +321,8 @@ export declare class AssetsClient {
|
|
|
305
321
|
/**
|
|
306
322
|
* Marks the asset `sold` — a terminal state; the asset has left the fleet and accepts no further transitions. Idempotent no-op if already sold; an illegal edge → 409 `asset.invalid_transition`. No body.
|
|
307
323
|
*
|
|
324
|
+
* > **Requires** `manage` on `asset` (SpiceDB permission expression).
|
|
325
|
+
*
|
|
308
326
|
* @param {NizamDashboard.SellAssetRequest} request
|
|
309
327
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
310
328
|
*
|
|
@@ -325,6 +343,8 @@ export declare class AssetsClient {
|
|
|
325
343
|
/**
|
|
326
344
|
* Moves the asset `out_of_service`. Idempotent no-op if already out of service; an illegal edge → 409 `asset.invalid_transition`. No body.
|
|
327
345
|
*
|
|
346
|
+
* > **Requires** `manage` on `asset` (SpiceDB permission expression).
|
|
347
|
+
*
|
|
328
348
|
* @param {NizamDashboard.TakeAssetOutOfServiceRequest} request
|
|
329
349
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
330
350
|
*
|
|
@@ -418,6 +418,8 @@ class AssetsClient {
|
|
|
418
418
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/assets/imports/template");
|
|
419
419
|
}
|
|
420
420
|
/**
|
|
421
|
+
* Returns one asset. Visible to members of the asset's organization and to L4-granted cross-tenant readers; anyone else gets 404 — indistinguishable from a non-existent id (prevents tenant probing).
|
|
422
|
+
*
|
|
421
423
|
* @param {NizamDashboard.GetAssetRequest} request
|
|
422
424
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
423
425
|
*
|
|
@@ -480,6 +482,8 @@ class AssetsClient {
|
|
|
480
482
|
/**
|
|
481
483
|
* Soft-deletes the asset: it disappears from listings immediately and frees its VIN for re-registration. Assignments and historical records are left untouched. There is no synchronous bulk-delete endpoint — delete a selection by fanning out per-id requests (each is naturally idempotent).
|
|
482
484
|
*
|
|
485
|
+
* > **Requires** `manage` on `asset` (SpiceDB permission expression).
|
|
486
|
+
*
|
|
483
487
|
* @param {NizamDashboard.DeleteAssetRequest} request
|
|
484
488
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
485
489
|
*
|
|
@@ -542,6 +546,8 @@ class AssetsClient {
|
|
|
542
546
|
/**
|
|
543
547
|
* Set-only partial update of an asset's mutable fields — display name, sub-kind, autonomy level, and the vehicle identity (VIN, plate, make, model, year). Omitted or null fields are left unchanged. An asset's `kind` is immutable and lifecycle `status` moves through dedicated transitions, so neither is editable here.
|
|
544
548
|
*
|
|
549
|
+
* > **Requires** `manage` on `asset` (SpiceDB permission expression).
|
|
550
|
+
*
|
|
545
551
|
* @param {NizamDashboard.UpdateAssetRequest} request
|
|
546
552
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
547
553
|
*
|
|
@@ -624,6 +630,8 @@ class AssetsClient {
|
|
|
624
630
|
/**
|
|
625
631
|
* Returns the asset to `active` service. Idempotent no-op if already active; an illegal edge (e.g. from a terminal sold/lost asset) → 409 `asset.invalid_transition`. No body — fan out per id for a bulk change.
|
|
626
632
|
*
|
|
633
|
+
* > **Requires** `manage` on `asset` (SpiceDB permission expression).
|
|
634
|
+
*
|
|
627
635
|
* @param {NizamDashboard.ActivateAssetRequest} request
|
|
628
636
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
629
637
|
*
|
|
@@ -689,6 +697,8 @@ class AssetsClient {
|
|
|
689
697
|
/**
|
|
690
698
|
* Marks the asset `inactive` (idle but still in-fleet). Idempotent no-op if already inactive; an illegal edge → 409 `asset.invalid_transition`. No body.
|
|
691
699
|
*
|
|
700
|
+
* > **Requires** `manage` on `asset` (SpiceDB permission expression).
|
|
701
|
+
*
|
|
692
702
|
* @param {NizamDashboard.DeactivateAssetRequest} request
|
|
693
703
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
694
704
|
*
|
|
@@ -754,6 +764,8 @@ class AssetsClient {
|
|
|
754
764
|
/**
|
|
755
765
|
* Moves the asset into `maintenance`. Idempotent no-op if already in maintenance; an illegal edge → 409 `asset.invalid_transition`. No body.
|
|
756
766
|
*
|
|
767
|
+
* > **Requires** `manage` on `asset` (SpiceDB permission expression).
|
|
768
|
+
*
|
|
757
769
|
* @param {NizamDashboard.EnterAssetMaintenanceRequest} request
|
|
758
770
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
759
771
|
*
|
|
@@ -819,6 +831,8 @@ class AssetsClient {
|
|
|
819
831
|
/**
|
|
820
832
|
* Marks the asset `lost` — a terminal state; the asset has left the fleet and accepts no further transitions. Idempotent no-op if already lost; an illegal edge → 409 `asset.invalid_transition`. No body.
|
|
821
833
|
*
|
|
834
|
+
* > **Requires** `manage` on `asset` (SpiceDB permission expression).
|
|
835
|
+
*
|
|
822
836
|
* @param {NizamDashboard.ReportAssetLostRequest} request
|
|
823
837
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
824
838
|
*
|
|
@@ -884,6 +898,8 @@ class AssetsClient {
|
|
|
884
898
|
/**
|
|
885
899
|
* Retires the asset (`retired`) — decommissioned but still owned; it may later be reactivated, sold, or reported lost. Idempotent no-op if already retired; an illegal edge → 409 `asset.invalid_transition`. No body.
|
|
886
900
|
*
|
|
901
|
+
* > **Requires** `manage` on `asset` (SpiceDB permission expression).
|
|
902
|
+
*
|
|
887
903
|
* @param {NizamDashboard.RetireAssetRequest} request
|
|
888
904
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
889
905
|
*
|
|
@@ -949,6 +965,8 @@ class AssetsClient {
|
|
|
949
965
|
/**
|
|
950
966
|
* Marks the asset `sold` — a terminal state; the asset has left the fleet and accepts no further transitions. Idempotent no-op if already sold; an illegal edge → 409 `asset.invalid_transition`. No body.
|
|
951
967
|
*
|
|
968
|
+
* > **Requires** `manage` on `asset` (SpiceDB permission expression).
|
|
969
|
+
*
|
|
952
970
|
* @param {NizamDashboard.SellAssetRequest} request
|
|
953
971
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
954
972
|
*
|
|
@@ -1014,6 +1032,8 @@ class AssetsClient {
|
|
|
1014
1032
|
/**
|
|
1015
1033
|
* Moves the asset `out_of_service`. Idempotent no-op if already out of service; an illegal edge → 409 `asset.invalid_transition`. No body.
|
|
1016
1034
|
*
|
|
1035
|
+
* > **Requires** `manage` on `asset` (SpiceDB permission expression).
|
|
1036
|
+
*
|
|
1017
1037
|
* @param {NizamDashboard.TakeAssetOutOfServiceRequest} request
|
|
1018
1038
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1019
1039
|
*
|
|
@@ -38,6 +38,8 @@ export * as positions from "./positions/index.js";
|
|
|
38
38
|
export * as realtime from "./realtime/index.js";
|
|
39
39
|
export * from "./taskAttempts/client/requests/index.js";
|
|
40
40
|
export * as taskAttempts from "./taskAttempts/index.js";
|
|
41
|
+
export * from "./tasks/client/requests/index.js";
|
|
42
|
+
export * as tasks from "./tasks/index.js";
|
|
41
43
|
export * from "./users/client/requests/index.js";
|
|
42
44
|
export * as users from "./users/index.js";
|
|
43
45
|
export * from "./users/types/index.js";
|
|
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.users = exports.taskAttempts = exports.realtime = exports.positions = exports.organizations = exports.operators = exports.notifications = exports.notificationPreferences = exports.memberships = exports.lookups = exports.jobs = exports.invites = exports.imports = exports.files = exports.devices = exports.assignments = exports.assets = exports.activity = exports.activeOrganization = void 0;
|
|
39
|
+
exports.users = exports.tasks = exports.taskAttempts = exports.realtime = exports.positions = exports.organizations = exports.operators = exports.notifications = exports.notificationPreferences = exports.memberships = exports.lookups = exports.jobs = exports.invites = exports.imports = exports.files = exports.devices = exports.assignments = exports.assets = exports.activity = exports.activeOrganization = void 0;
|
|
40
40
|
__exportStar(require("./activeOrganization/client/requests/index.js"), exports);
|
|
41
41
|
exports.activeOrganization = __importStar(require("./activeOrganization/index.js"));
|
|
42
42
|
__exportStar(require("./activity/client/requests/index.js"), exports);
|
|
@@ -77,6 +77,8 @@ exports.positions = __importStar(require("./positions/index.js"));
|
|
|
77
77
|
exports.realtime = __importStar(require("./realtime/index.js"));
|
|
78
78
|
__exportStar(require("./taskAttempts/client/requests/index.js"), exports);
|
|
79
79
|
exports.taskAttempts = __importStar(require("./taskAttempts/index.js"));
|
|
80
|
+
__exportStar(require("./tasks/client/requests/index.js"), exports);
|
|
81
|
+
exports.tasks = __importStar(require("./tasks/index.js"));
|
|
80
82
|
__exportStar(require("./users/client/requests/index.js"), exports);
|
|
81
83
|
exports.users = __importStar(require("./users/index.js"));
|
|
82
84
|
__exportStar(require("./users/types/index.js"), exports);
|
|
@@ -86,7 +86,7 @@ export declare class OrganizationsClient {
|
|
|
86
86
|
getOrganization(request: NizamDashboard.GetOrganizationRequest, requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<NizamDashboard.Organization>;
|
|
87
87
|
private __getOrganization;
|
|
88
88
|
/**
|
|
89
|
-
* Owner-only. Sets `deleted_at` on the organizations row; subsequent reads filter it out. The Keycloak Organization is intentionally left in place — restore is just an UPDATE un-setting `deleted_at`. Members are not removed; their memberships persist alongside the soft-deleted row in case a restore path is added later. L4 @
|
|
89
|
+
* Owner-only. Sets `deleted_at` on the organizations row; subsequent reads filter it out. The Keycloak Organization is intentionally left in place — restore is just an UPDATE un-setting `deleted_at`. Members are not removed; their memberships persist alongside the soft-deleted row in case a restore path is added later. L4 @RequirePermission ensures the caller is an admin; the owner-only check inside the handler narrows further.
|
|
90
90
|
*
|
|
91
91
|
* > **Requires** `administer` on `organization` (SpiceDB permission expression).
|
|
92
92
|
*
|
|
@@ -269,7 +269,7 @@ class OrganizationsClient {
|
|
|
269
269
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/organizations/{id}");
|
|
270
270
|
}
|
|
271
271
|
/**
|
|
272
|
-
* Owner-only. Sets `deleted_at` on the organizations row; subsequent reads filter it out. The Keycloak Organization is intentionally left in place — restore is just an UPDATE un-setting `deleted_at`. Members are not removed; their memberships persist alongside the soft-deleted row in case a restore path is added later. L4 @
|
|
272
|
+
* Owner-only. Sets `deleted_at` on the organizations row; subsequent reads filter it out. The Keycloak Organization is intentionally left in place — restore is just an UPDATE un-setting `deleted_at`. Members are not removed; their memberships persist alongside the soft-deleted row in case a restore path is added later. L4 @RequirePermission ensures the caller is an admin; the owner-only check inside the handler narrows further.
|
|
273
273
|
*
|
|
274
274
|
* > **Requires** `administer` on `organization` (SpiceDB permission expression).
|
|
275
275
|
*
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../core/index.js";
|
|
4
|
+
import * as NizamDashboard from "../../../index.js";
|
|
5
|
+
export declare namespace TasksClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class TasksClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<TasksClient.Options>;
|
|
12
|
+
constructor(options: TasksClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Lists the tasks the caller may read — their organization's tasks plus any they own or whose executor org they belong to (cross-tenant). The filtering is enforced entirely by RLS + the read bridge, never an app-layer predicate.
|
|
15
|
+
*
|
|
16
|
+
* @param {NizamDashboard.ListTasksRequest} request
|
|
17
|
+
* @param {TasksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
|
+
*
|
|
19
|
+
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
20
|
+
* @throws {@link NizamDashboard.ForbiddenError}
|
|
21
|
+
* @throws {@link NizamDashboard.TooManyRequestsError}
|
|
22
|
+
* @throws {@link NizamDashboard.InternalServerError}
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* await client.tasks.listTasks({
|
|
26
|
+
* starting_after: "Y3Vyc29yX25leHRfMDFKNVE=",
|
|
27
|
+
* ending_before: "Y3Vyc29yX25leHRfMDFKNVE="
|
|
28
|
+
* })
|
|
29
|
+
*/
|
|
30
|
+
listTasks(request?: NizamDashboard.ListTasksRequest, requestOptions?: TasksClient.RequestOptions): core.HttpResponsePromise<NizamDashboard.ListResponseTask>;
|
|
31
|
+
private __listTasks;
|
|
32
|
+
/**
|
|
33
|
+
* Creates a task owned by the active organization. The creator becomes the task's `owner` (per-instance), able to read/update/delete it regardless of role. An optional `executor_organization_id` delegates it cross-org.
|
|
34
|
+
*
|
|
35
|
+
* @param {NizamDashboard.CreateTaskRequest} request
|
|
36
|
+
* @param {TasksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
|
+
*
|
|
38
|
+
* @throws {@link NizamDashboard.BadRequestError}
|
|
39
|
+
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
40
|
+
* @throws {@link NizamDashboard.ForbiddenError}
|
|
41
|
+
* @throws {@link NizamDashboard.ConflictError}
|
|
42
|
+
* @throws {@link NizamDashboard.UnprocessableEntityError}
|
|
43
|
+
* @throws {@link NizamDashboard.TooManyRequestsError}
|
|
44
|
+
* @throws {@link NizamDashboard.InternalServerError}
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* await client.tasks.createTask({
|
|
48
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
49
|
+
* type: "pickup",
|
|
50
|
+
* executor_organization_id: "c1d2e3f4-5a6b-7c8d-9e0f-1a2b3c4d5e6f",
|
|
51
|
+
* merchant_id: "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
|
|
52
|
+
* notes: "Leave at front desk"
|
|
53
|
+
* })
|
|
54
|
+
*/
|
|
55
|
+
createTask(request: NizamDashboard.CreateTaskRequest, requestOptions?: TasksClient.RequestOptions): core.HttpResponsePromise<NizamDashboard.Task>;
|
|
56
|
+
private __createTask;
|
|
57
|
+
/**
|
|
58
|
+
* Returns one task. Visible to the task's owner, members of its owning org, and members of a delegated executor org (cross-tenant); anyone else gets 404 — indistinguishable from a non-existent id (prevents probing).
|
|
59
|
+
*
|
|
60
|
+
* @param {NizamDashboard.GetTaskRequest} request
|
|
61
|
+
* @param {TasksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
|
+
*
|
|
63
|
+
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
64
|
+
* @throws {@link NizamDashboard.ForbiddenError}
|
|
65
|
+
* @throws {@link NizamDashboard.NotFoundError}
|
|
66
|
+
* @throws {@link NizamDashboard.TooManyRequestsError}
|
|
67
|
+
* @throws {@link NizamDashboard.InternalServerError}
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* await client.tasks.getTask({
|
|
71
|
+
* id: "00000000-0000-0000-0000-000000000000"
|
|
72
|
+
* })
|
|
73
|
+
*/
|
|
74
|
+
getTask(request: NizamDashboard.GetTaskRequest, requestOptions?: TasksClient.RequestOptions): core.HttpResponsePromise<NizamDashboard.Task>;
|
|
75
|
+
private __getTask;
|
|
76
|
+
/**
|
|
77
|
+
* Soft-deletes the task. Authorized for the task's owner or an admin/staff of its owning org only (a delegated executor cannot delete) — the `task:delete` relation.
|
|
78
|
+
*
|
|
79
|
+
* > **Requires** `delete` on `task` (SpiceDB permission expression).
|
|
80
|
+
*
|
|
81
|
+
* @param {NizamDashboard.DeleteTaskRequest} request
|
|
82
|
+
* @param {TasksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
83
|
+
*
|
|
84
|
+
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
85
|
+
* @throws {@link NizamDashboard.ForbiddenError}
|
|
86
|
+
* @throws {@link NizamDashboard.NotFoundError}
|
|
87
|
+
* @throws {@link NizamDashboard.TooManyRequestsError}
|
|
88
|
+
* @throws {@link NizamDashboard.InternalServerError}
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* await client.tasks.deleteTask({
|
|
92
|
+
* id: "00000000-0000-0000-0000-000000000000"
|
|
93
|
+
* })
|
|
94
|
+
*/
|
|
95
|
+
deleteTask(request: NizamDashboard.DeleteTaskRequest, requestOptions?: TasksClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
96
|
+
private __deleteTask;
|
|
97
|
+
/**
|
|
98
|
+
* Set-only partial update. Authorized for the task's owner or an admin/staff of its owning or executor org (a plain member cannot edit) — the `task:update` relation.
|
|
99
|
+
*
|
|
100
|
+
* > **Requires** `update` on `task` (SpiceDB permission expression).
|
|
101
|
+
*
|
|
102
|
+
* @param {NizamDashboard.UpdateTaskRequest} request
|
|
103
|
+
* @param {TasksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
104
|
+
*
|
|
105
|
+
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
106
|
+
* @throws {@link NizamDashboard.ForbiddenError}
|
|
107
|
+
* @throws {@link NizamDashboard.NotFoundError}
|
|
108
|
+
* @throws {@link NizamDashboard.UnprocessableEntityError}
|
|
109
|
+
* @throws {@link NizamDashboard.TooManyRequestsError}
|
|
110
|
+
* @throws {@link NizamDashboard.InternalServerError}
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* await client.tasks.updateTask({
|
|
114
|
+
* id: "00000000-0000-0000-0000-000000000000",
|
|
115
|
+
* notes: "Customer rescheduled to 4pm"
|
|
116
|
+
* })
|
|
117
|
+
*/
|
|
118
|
+
updateTask(request: NizamDashboard.UpdateTaskRequest, requestOptions?: TasksClient.RequestOptions): core.HttpResponsePromise<NizamDashboard.Task>;
|
|
119
|
+
private __updateTask;
|
|
120
|
+
}
|