@nizam-os/dashboard-sdk 1.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/BaseClient.d.ts +42 -0
- package/dist/BaseClient.js +80 -0
- package/dist/Client.d.ts +44 -0
- package/dist/Client.js +94 -0
- package/dist/api/errors/ConflictError.d.ts +6 -0
- package/dist/api/errors/ConflictError.js +54 -0
- package/dist/api/errors/ForbiddenError.d.ts +6 -0
- package/dist/api/errors/ForbiddenError.js +54 -0
- package/dist/api/errors/GoneError.d.ts +6 -0
- package/dist/api/errors/GoneError.js +54 -0
- package/dist/api/errors/InternalServerError.d.ts +6 -0
- package/dist/api/errors/InternalServerError.js +54 -0
- package/dist/api/errors/NotFoundError.d.ts +6 -0
- package/dist/api/errors/NotFoundError.js +54 -0
- package/dist/api/errors/UnauthorizedError.d.ts +6 -0
- package/dist/api/errors/UnauthorizedError.js +54 -0
- package/dist/api/errors/UnprocessableEntityError.d.ts +6 -0
- package/dist/api/errors/UnprocessableEntityError.js +54 -0
- package/dist/api/errors/index.d.ts +7 -0
- package/dist/api/errors/index.js +23 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +19 -0
- package/dist/api/resources/assets/client/Client.d.ts +52 -0
- package/dist/api/resources/assets/client/Client.js +173 -0
- package/dist/api/resources/assets/client/index.d.ts +1 -0
- package/dist/api/resources/assets/client/index.js +17 -0
- package/dist/api/resources/assets/client/requests/CreateAssetRequest.d.ts +31 -0
- package/dist/api/resources/assets/client/requests/CreateAssetRequest.js +19 -0
- package/dist/api/resources/assets/client/requests/GetAssetRequest.d.ts +9 -0
- package/dist/api/resources/assets/client/requests/GetAssetRequest.js +3 -0
- package/dist/api/resources/assets/client/requests/index.d.ts +2 -0
- package/dist/api/resources/assets/client/requests/index.js +5 -0
- package/dist/api/resources/assets/exports.d.ts +2 -0
- package/dist/api/resources/assets/exports.js +21 -0
- package/dist/api/resources/assets/index.d.ts +1 -0
- package/dist/api/resources/assets/index.js +17 -0
- package/dist/api/resources/assignments/client/Client.d.ts +74 -0
- package/dist/api/resources/assignments/client/Client.js +245 -0
- package/dist/api/resources/assignments/client/index.d.ts +1 -0
- package/dist/api/resources/assignments/client/index.js +17 -0
- package/dist/api/resources/assignments/client/requests/CloseAssignmentRequest.d.ts +26 -0
- package/dist/api/resources/assignments/client/requests/CloseAssignmentRequest.js +18 -0
- package/dist/api/resources/assignments/client/requests/GetAssignmentRequest.d.ts +9 -0
- package/dist/api/resources/assignments/client/requests/GetAssignmentRequest.js +3 -0
- package/dist/api/resources/assignments/client/requests/OpenAssignmentRequest.d.ts +27 -0
- package/dist/api/resources/assignments/client/requests/OpenAssignmentRequest.js +15 -0
- package/dist/api/resources/assignments/client/requests/index.d.ts +3 -0
- package/dist/api/resources/assignments/client/requests/index.js +7 -0
- package/dist/api/resources/assignments/exports.d.ts +2 -0
- package/dist/api/resources/assignments/exports.js +21 -0
- package/dist/api/resources/assignments/index.d.ts +1 -0
- package/dist/api/resources/assignments/index.js +17 -0
- package/dist/api/resources/identity/client/Client.d.ts +114 -0
- package/dist/api/resources/identity/client/Client.js +373 -0
- package/dist/api/resources/identity/client/index.d.ts +1 -0
- package/dist/api/resources/identity/client/index.js +17 -0
- package/dist/api/resources/identity/client/requests/InviteUserRequest.d.ts +13 -0
- package/dist/api/resources/identity/client/requests/InviteUserRequest.js +3 -0
- package/dist/api/resources/identity/client/requests/ListUsersRequest.d.ts +10 -0
- package/dist/api/resources/identity/client/requests/ListUsersRequest.js +3 -0
- package/dist/api/resources/identity/client/requests/SoftDeleteUserRequest.d.ts +9 -0
- package/dist/api/resources/identity/client/requests/SoftDeleteUserRequest.js +3 -0
- package/dist/api/resources/identity/client/requests/UserUpdateRequest.d.ts +15 -0
- package/dist/api/resources/identity/client/requests/UserUpdateRequest.js +3 -0
- package/dist/api/resources/identity/client/requests/index.d.ts +4 -0
- package/dist/api/resources/identity/client/requests/index.js +2 -0
- package/dist/api/resources/identity/exports.d.ts +2 -0
- package/dist/api/resources/identity/exports.js +21 -0
- package/dist/api/resources/identity/index.d.ts +1 -0
- package/dist/api/resources/identity/index.js +17 -0
- package/dist/api/resources/index.d.ts +13 -0
- package/dist/api/resources/index.js +52 -0
- package/dist/api/resources/invites/client/Client.d.ts +58 -0
- package/dist/api/resources/invites/client/Client.js +187 -0
- package/dist/api/resources/invites/client/index.d.ts +1 -0
- package/dist/api/resources/invites/client/index.js +17 -0
- package/dist/api/resources/invites/client/requests/AcceptInviteRequest.d.ts +10 -0
- package/dist/api/resources/invites/client/requests/AcceptInviteRequest.js +3 -0
- package/dist/api/resources/invites/client/requests/CreateInviteRequest.d.ts +32 -0
- package/dist/api/resources/invites/client/requests/CreateInviteRequest.js +17 -0
- package/dist/api/resources/invites/client/requests/index.d.ts +2 -0
- package/dist/api/resources/invites/client/requests/index.js +5 -0
- package/dist/api/resources/invites/exports.d.ts +2 -0
- package/dist/api/resources/invites/exports.js +21 -0
- package/dist/api/resources/invites/index.d.ts +1 -0
- package/dist/api/resources/invites/index.js +17 -0
- package/dist/api/resources/lookups/client/Client.d.ts +27 -0
- package/dist/api/resources/lookups/client/Client.js +100 -0
- package/dist/api/resources/lookups/client/index.d.ts +1 -0
- package/dist/api/resources/lookups/client/index.js +2 -0
- package/dist/api/resources/lookups/exports.d.ts +2 -0
- package/dist/api/resources/lookups/exports.js +21 -0
- package/dist/api/resources/lookups/index.d.ts +1 -0
- package/dist/api/resources/lookups/index.js +17 -0
- package/dist/api/resources/operators/client/Client.d.ts +66 -0
- package/dist/api/resources/operators/client/Client.js +187 -0
- package/dist/api/resources/operators/client/index.d.ts +1 -0
- package/dist/api/resources/operators/client/index.js +17 -0
- package/dist/api/resources/operators/client/requests/GetOperatorRequest.d.ts +9 -0
- package/dist/api/resources/operators/client/requests/GetOperatorRequest.js +3 -0
- package/dist/api/resources/operators/client/requests/index.d.ts +1 -0
- package/dist/api/resources/operators/client/requests/index.js +2 -0
- package/dist/api/resources/operators/exports.d.ts +2 -0
- package/dist/api/resources/operators/exports.js +21 -0
- package/dist/api/resources/operators/index.d.ts +1 -0
- package/dist/api/resources/operators/index.js +17 -0
- package/dist/api/resources/organizations/client/Client.d.ts +136 -0
- package/dist/api/resources/organizations/client/Client.js +432 -0
- package/dist/api/resources/organizations/client/index.d.ts +1 -0
- package/dist/api/resources/organizations/client/index.js +17 -0
- package/dist/api/resources/organizations/client/requests/CreateOrganizationRequest.d.ts +28 -0
- package/dist/api/resources/organizations/client/requests/CreateOrganizationRequest.js +3 -0
- package/dist/api/resources/organizations/client/requests/DeleteOrganizationRequest.d.ts +9 -0
- package/dist/api/resources/organizations/client/requests/DeleteOrganizationRequest.js +3 -0
- package/dist/api/resources/organizations/client/requests/GetOrganizationRequest.d.ts +9 -0
- package/dist/api/resources/organizations/client/requests/GetOrganizationRequest.js +3 -0
- package/dist/api/resources/organizations/client/requests/LeaveOrganizationRequest.d.ts +9 -0
- package/dist/api/resources/organizations/client/requests/LeaveOrganizationRequest.js +3 -0
- package/dist/api/resources/organizations/client/requests/UpdateOrganizationRequest.d.ts +27 -0
- package/dist/api/resources/organizations/client/requests/UpdateOrganizationRequest.js +3 -0
- package/dist/api/resources/organizations/client/requests/index.d.ts +5 -0
- package/dist/api/resources/organizations/client/requests/index.js +2 -0
- package/dist/api/resources/organizations/exports.d.ts +2 -0
- package/dist/api/resources/organizations/exports.js +21 -0
- package/dist/api/resources/organizations/index.d.ts +1 -0
- package/dist/api/resources/organizations/index.js +17 -0
- package/dist/api/types/ApiFieldError.d.ts +11 -0
- package/dist/api/types/ApiFieldError.js +3 -0
- package/dist/api/types/Asset.d.ts +58 -0
- package/dist/api/types/Asset.js +33 -0
- package/dist/api/types/Assignment.d.ts +49 -0
- package/dist/api/types/Assignment.js +30 -0
- package/dist/api/types/CreateAutonomousOperatorRequest.d.ts +15 -0
- package/dist/api/types/CreateAutonomousOperatorRequest.js +3 -0
- package/dist/api/types/CreateHumanOperatorRequest.d.ts +17 -0
- package/dist/api/types/CreateHumanOperatorRequest.js +3 -0
- package/dist/api/types/CreateOperatorRequest.d.ts +16 -0
- package/dist/api/types/CreateOperatorRequest.js +3 -0
- package/dist/api/types/CreateTeleoperatedOperatorRequest.d.ts +11 -0
- package/dist/api/types/CreateTeleoperatedOperatorRequest.js +3 -0
- package/dist/api/types/InternalUserUpdateRequest.d.ts +21 -0
- package/dist/api/types/InternalUserUpdateRequest.js +14 -0
- package/dist/api/types/Invite.d.ts +47 -0
- package/dist/api/types/Invite.js +28 -0
- package/dist/api/types/ListResponse.d.ts +23 -0
- package/dist/api/types/ListResponse.js +11 -0
- package/dist/api/types/Operator.d.ts +45 -0
- package/dist/api/types/Operator.js +26 -0
- package/dist/api/types/Organization.d.ts +35 -0
- package/dist/api/types/Organization.js +17 -0
- package/dist/api/types/OrganizationMembership.d.ts +29 -0
- package/dist/api/types/OrganizationMembership.js +21 -0
- package/dist/api/types/ProblemDetail.d.ts +21 -0
- package/dist/api/types/ProblemDetail.js +3 -0
- package/dist/api/types/User.d.ts +40 -0
- package/dist/api/types/User.js +21 -0
- package/dist/api/types/UserResource.d.ts +34 -0
- package/dist/api/types/UserResource.js +18 -0
- package/dist/api/types/index.d.ts +16 -0
- package/dist/api/types/index.js +32 -0
- package/dist/auth/BearerAuthProvider.d.ts +20 -0
- package/dist/auth/BearerAuthProvider.js +68 -0
- package/dist/auth/index.d.ts +1 -0
- package/dist/auth/index.js +5 -0
- package/dist/core/auth/AuthProvider.d.ts +8 -0
- package/dist/core/auth/AuthProvider.js +9 -0
- package/dist/core/auth/AuthRequest.d.ts +9 -0
- package/dist/core/auth/AuthRequest.js +2 -0
- package/dist/core/auth/BasicAuth.d.ts +8 -0
- package/dist/core/auth/BasicAuth.js +32 -0
- package/dist/core/auth/BearerToken.d.ts +7 -0
- package/dist/core/auth/BearerToken.js +16 -0
- package/dist/core/auth/NoOpAuthProvider.d.ts +5 -0
- package/dist/core/auth/NoOpAuthProvider.js +9 -0
- package/dist/core/auth/index.d.ts +5 -0
- package/dist/core/auth/index.js +11 -0
- package/dist/core/base64.d.ts +2 -0
- package/dist/core/base64.js +26 -0
- package/dist/core/exports.d.ts +1 -0
- package/dist/core/exports.js +17 -0
- package/dist/core/fetcher/APIResponse.d.ts +20 -0
- package/dist/core/fetcher/APIResponse.js +2 -0
- package/dist/core/fetcher/BinaryResponse.d.ts +19 -0
- package/dist/core/fetcher/BinaryResponse.js +17 -0
- package/dist/core/fetcher/EndpointMetadata.d.ts +13 -0
- package/dist/core/fetcher/EndpointMetadata.js +2 -0
- package/dist/core/fetcher/EndpointSupplier.d.ts +12 -0
- package/dist/core/fetcher/EndpointSupplier.js +13 -0
- package/dist/core/fetcher/Fetcher.d.ts +56 -0
- package/dist/core/fetcher/Fetcher.js +310 -0
- package/dist/core/fetcher/Headers.d.ts +2 -0
- package/dist/core/fetcher/Headers.js +84 -0
- package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/dist/core/fetcher/HttpResponsePromise.js +92 -0
- package/dist/core/fetcher/RawResponse.d.ts +29 -0
- package/dist/core/fetcher/RawResponse.js +44 -0
- package/dist/core/fetcher/Supplier.d.ts +4 -0
- package/dist/core/fetcher/Supplier.js +13 -0
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +8 -0
- package/dist/core/fetcher/getErrorResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getErrorResponseBody.js +33 -0
- package/dist/core/fetcher/getFetchFn.d.ts +1 -0
- package/dist/core/fetcher/getFetchFn.js +6 -0
- package/dist/core/fetcher/getHeader.d.ts +1 -0
- package/dist/core/fetcher/getHeader.js +11 -0
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +16 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +58 -0
- package/dist/core/fetcher/index.d.ts +13 -0
- package/dist/core/fetcher/index.js +19 -0
- package/dist/core/fetcher/makePassthroughRequest.d.ts +49 -0
- package/dist/core/fetcher/makePassthroughRequest.js +122 -0
- package/dist/core/fetcher/makeRequest.d.ts +6 -0
- package/dist/core/fetcher/makeRequest.js +59 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +59 -0
- package/dist/core/fetcher/signals.d.ts +5 -0
- package/dist/core/fetcher/signals.js +24 -0
- package/dist/core/headers.d.ts +2 -0
- package/dist/core/headers.js +31 -0
- package/dist/core/index.d.ts +6 -0
- package/dist/core/index.js +45 -0
- package/dist/core/json.d.ts +15 -0
- package/dist/core/json.js +24 -0
- package/dist/core/logging/exports.d.ts +18 -0
- package/dist/core/logging/exports.js +45 -0
- package/dist/core/logging/index.d.ts +1 -0
- package/dist/core/logging/index.js +17 -0
- package/dist/core/logging/logger.d.ts +126 -0
- package/dist/core/logging/logger.js +143 -0
- package/dist/core/runtime/index.d.ts +1 -0
- package/dist/core/runtime/index.js +5 -0
- package/dist/core/runtime/runtime.d.ts +9 -0
- package/dist/core/runtime/runtime.js +103 -0
- package/dist/core/url/QueryStringBuilder.d.ts +47 -0
- package/dist/core/url/QueryStringBuilder.js +83 -0
- package/dist/core/url/encodePathParam.d.ts +1 -0
- package/dist/core/url/encodePathParam.js +21 -0
- package/dist/core/url/index.d.ts +4 -0
- package/dist/core/url/index.js +11 -0
- package/dist/core/url/join.d.ts +1 -0
- package/dist/core/url/join.js +68 -0
- package/dist/core/url/qs.d.ts +7 -0
- package/dist/core/url/qs.js +79 -0
- package/dist/environments.d.ts +4 -0
- package/dist/environments.js +7 -0
- package/dist/errors/NizamDashboardError.d.ts +14 -0
- package/dist/errors/NizamDashboardError.js +35 -0
- package/dist/errors/NizamDashboardTimeoutError.d.ts +6 -0
- package/dist/errors/NizamDashboardTimeoutError.js +18 -0
- package/dist/errors/handleNonStatusCodeError.d.ts +2 -0
- package/dist/errors/handleNonStatusCodeError.js +68 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.js +7 -0
- package/dist/exports.d.ts +1 -0
- package/dist/exports.js +17 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +48 -0
- package/package.json +35 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A physical asset tracked by the fleet — vehicle, drone, robot, container, etc.
|
|
3
|
+
*/
|
|
4
|
+
export interface Asset {
|
|
5
|
+
/** Stable UUID. */
|
|
6
|
+
id?: string | undefined;
|
|
7
|
+
/** Top-level kind. */
|
|
8
|
+
kind?: Asset.Kind | undefined;
|
|
9
|
+
/** Sub-kind within the kind (free-form). */
|
|
10
|
+
sub_kind?: string | undefined;
|
|
11
|
+
/** SAE J3016 autonomy level 0..5. */
|
|
12
|
+
autonomy_level?: number | undefined;
|
|
13
|
+
/** Lifecycle status. */
|
|
14
|
+
status?: Asset.Status | undefined;
|
|
15
|
+
/** Display name. */
|
|
16
|
+
name?: string | undefined;
|
|
17
|
+
/** Vehicle Identification Number. */
|
|
18
|
+
vin?: string | undefined;
|
|
19
|
+
/** License plate. */
|
|
20
|
+
plate_number?: string | undefined;
|
|
21
|
+
/** Owning organization id. */
|
|
22
|
+
organization_id?: string | undefined;
|
|
23
|
+
/** Current primary operator (active assignment, role=primary). */
|
|
24
|
+
current_primary_operator_id?: string | undefined;
|
|
25
|
+
/** Object type discriminator (Stripe pattern). */
|
|
26
|
+
object?: Asset.Object_ | undefined;
|
|
27
|
+
}
|
|
28
|
+
export declare namespace Asset {
|
|
29
|
+
/** Top-level kind. */
|
|
30
|
+
const Kind: {
|
|
31
|
+
readonly GroundVehicle: "ground_vehicle";
|
|
32
|
+
readonly AerialVehicle: "aerial_vehicle";
|
|
33
|
+
readonly MarineVehicle: "marine_vehicle";
|
|
34
|
+
readonly Robot: "robot";
|
|
35
|
+
readonly Agv: "agv";
|
|
36
|
+
readonly Trailer: "trailer";
|
|
37
|
+
readonly Container: "container";
|
|
38
|
+
readonly Pallet: "pallet";
|
|
39
|
+
readonly Equipment: "equipment";
|
|
40
|
+
};
|
|
41
|
+
type Kind = (typeof Kind)[keyof typeof Kind];
|
|
42
|
+
/** Lifecycle status. */
|
|
43
|
+
const Status: {
|
|
44
|
+
readonly Active: "active";
|
|
45
|
+
readonly Maintenance: "maintenance";
|
|
46
|
+
readonly OutOfService: "out_of_service";
|
|
47
|
+
readonly Retired: "retired";
|
|
48
|
+
readonly Sold: "sold";
|
|
49
|
+
readonly Inactive: "inactive";
|
|
50
|
+
readonly Lost: "lost";
|
|
51
|
+
};
|
|
52
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
53
|
+
/** Object type discriminator (Stripe pattern). */
|
|
54
|
+
const Object_: {
|
|
55
|
+
readonly Asset: "asset";
|
|
56
|
+
};
|
|
57
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
58
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Asset = void 0;
|
|
5
|
+
var Asset;
|
|
6
|
+
(function (Asset) {
|
|
7
|
+
/** Top-level kind. */
|
|
8
|
+
Asset.Kind = {
|
|
9
|
+
GroundVehicle: "ground_vehicle",
|
|
10
|
+
AerialVehicle: "aerial_vehicle",
|
|
11
|
+
MarineVehicle: "marine_vehicle",
|
|
12
|
+
Robot: "robot",
|
|
13
|
+
Agv: "agv",
|
|
14
|
+
Trailer: "trailer",
|
|
15
|
+
Container: "container",
|
|
16
|
+
Pallet: "pallet",
|
|
17
|
+
Equipment: "equipment",
|
|
18
|
+
};
|
|
19
|
+
/** Lifecycle status. */
|
|
20
|
+
Asset.Status = {
|
|
21
|
+
Active: "active",
|
|
22
|
+
Maintenance: "maintenance",
|
|
23
|
+
OutOfService: "out_of_service",
|
|
24
|
+
Retired: "retired",
|
|
25
|
+
Sold: "sold",
|
|
26
|
+
Inactive: "inactive",
|
|
27
|
+
Lost: "lost",
|
|
28
|
+
};
|
|
29
|
+
/** Object type discriminator (Stripe pattern). */
|
|
30
|
+
Asset.Object_ = {
|
|
31
|
+
Asset: "asset",
|
|
32
|
+
};
|
|
33
|
+
})(Asset || (exports.Asset = Asset = {}));
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time-bound binding between an asset and an operator in a role.
|
|
3
|
+
*/
|
|
4
|
+
export interface Assignment {
|
|
5
|
+
/** Stable UUID. */
|
|
6
|
+
id?: string | undefined;
|
|
7
|
+
/** Asset id. */
|
|
8
|
+
asset_id?: string | undefined;
|
|
9
|
+
/** Operator id. */
|
|
10
|
+
operator_id?: string | undefined;
|
|
11
|
+
/** Role discriminator for concurrent assignments on the same asset. */
|
|
12
|
+
role?: Assignment.Role | undefined;
|
|
13
|
+
/** Start of validity. */
|
|
14
|
+
valid_from?: string | undefined;
|
|
15
|
+
/** End of validity (null = still active). */
|
|
16
|
+
valid_until?: string | undefined;
|
|
17
|
+
/** Why the assignment was closed (null while active). */
|
|
18
|
+
terminated_reason?: Assignment.TerminatedReason | undefined;
|
|
19
|
+
/** Object type discriminator (Stripe pattern). */
|
|
20
|
+
object?: Assignment.Object_ | undefined;
|
|
21
|
+
}
|
|
22
|
+
export declare namespace Assignment {
|
|
23
|
+
/** Role discriminator for concurrent assignments on the same asset. */
|
|
24
|
+
const Role: {
|
|
25
|
+
readonly Primary: "primary";
|
|
26
|
+
readonly CoOperator: "co_operator";
|
|
27
|
+
readonly SafetyMonitor: "safety_monitor";
|
|
28
|
+
readonly RemotePilot: "remote_pilot";
|
|
29
|
+
readonly Supervisor: "supervisor";
|
|
30
|
+
};
|
|
31
|
+
type Role = (typeof Role)[keyof typeof Role];
|
|
32
|
+
/** Why the assignment was closed (null while active). */
|
|
33
|
+
const TerminatedReason: {
|
|
34
|
+
readonly ShiftEnd: "shift_end";
|
|
35
|
+
readonly AssetMaintenance: "asset_maintenance";
|
|
36
|
+
readonly OperatorOffDuty: "operator_off_duty";
|
|
37
|
+
readonly Incident: "incident";
|
|
38
|
+
readonly SoftwareUpdate: "software_update";
|
|
39
|
+
readonly Reassigned: "reassigned";
|
|
40
|
+
readonly ContractEnded: "contract_ended";
|
|
41
|
+
readonly ManualClose: "manual_close";
|
|
42
|
+
};
|
|
43
|
+
type TerminatedReason = (typeof TerminatedReason)[keyof typeof TerminatedReason];
|
|
44
|
+
/** Object type discriminator (Stripe pattern). */
|
|
45
|
+
const Object_: {
|
|
46
|
+
readonly Assignment: "assignment";
|
|
47
|
+
};
|
|
48
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
49
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Assignment = void 0;
|
|
5
|
+
var Assignment;
|
|
6
|
+
(function (Assignment) {
|
|
7
|
+
/** Role discriminator for concurrent assignments on the same asset. */
|
|
8
|
+
Assignment.Role = {
|
|
9
|
+
Primary: "primary",
|
|
10
|
+
CoOperator: "co_operator",
|
|
11
|
+
SafetyMonitor: "safety_monitor",
|
|
12
|
+
RemotePilot: "remote_pilot",
|
|
13
|
+
Supervisor: "supervisor",
|
|
14
|
+
};
|
|
15
|
+
/** Why the assignment was closed (null while active). */
|
|
16
|
+
Assignment.TerminatedReason = {
|
|
17
|
+
ShiftEnd: "shift_end",
|
|
18
|
+
AssetMaintenance: "asset_maintenance",
|
|
19
|
+
OperatorOffDuty: "operator_off_duty",
|
|
20
|
+
Incident: "incident",
|
|
21
|
+
SoftwareUpdate: "software_update",
|
|
22
|
+
Reassigned: "reassigned",
|
|
23
|
+
ContractEnded: "contract_ended",
|
|
24
|
+
ManualClose: "manual_close",
|
|
25
|
+
};
|
|
26
|
+
/** Object type discriminator (Stripe pattern). */
|
|
27
|
+
Assignment.Object_ = {
|
|
28
|
+
Assignment: "assignment",
|
|
29
|
+
};
|
|
30
|
+
})(Assignment || (exports.Assignment = Assignment = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create an autonomous (software-agent) operator.
|
|
3
|
+
*/
|
|
4
|
+
export interface CreateAutonomousOperatorRequest {
|
|
5
|
+
/** Software vendor. */
|
|
6
|
+
vendor: string;
|
|
7
|
+
/** Software product. */
|
|
8
|
+
product: string;
|
|
9
|
+
/** Software version. */
|
|
10
|
+
version: string;
|
|
11
|
+
/** Instance id within the version. */
|
|
12
|
+
instance_id?: string | undefined;
|
|
13
|
+
/** Legal entity accountable for this operator's actions (a user id). */
|
|
14
|
+
responsible_party: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create a human operator.
|
|
3
|
+
*/
|
|
4
|
+
export interface CreateHumanOperatorRequest {
|
|
5
|
+
/** Display name. */
|
|
6
|
+
name?: string | undefined;
|
|
7
|
+
/** Linked user id (when the human has a Nizam login). */
|
|
8
|
+
user_id?: string | undefined;
|
|
9
|
+
/** Driver license number. */
|
|
10
|
+
license_number?: string | undefined;
|
|
11
|
+
/** License class. */
|
|
12
|
+
license_class?: string | undefined;
|
|
13
|
+
/** Expiry date. */
|
|
14
|
+
license_expires_at?: string | undefined;
|
|
15
|
+
/** ISO 3166-1 alpha-2 issuing country. */
|
|
16
|
+
license_country?: string | undefined;
|
|
17
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as NizamDashboard from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Create a new operator. The kind discriminator selects the variant.
|
|
4
|
+
*/
|
|
5
|
+
export type CreateOperatorRequest = NizamDashboard.CreateOperatorRequest.Human | NizamDashboard.CreateOperatorRequest.Autonomous | NizamDashboard.CreateOperatorRequest.Teleoperated;
|
|
6
|
+
export declare namespace CreateOperatorRequest {
|
|
7
|
+
interface Human extends NizamDashboard.CreateHumanOperatorRequest {
|
|
8
|
+
kind: "human";
|
|
9
|
+
}
|
|
10
|
+
interface Autonomous extends NizamDashboard.CreateAutonomousOperatorRequest {
|
|
11
|
+
kind: "autonomous";
|
|
12
|
+
}
|
|
13
|
+
interface Teleoperated extends NizamDashboard.CreateTeleoperatedOperatorRequest {
|
|
14
|
+
kind: "teleoperated";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create a teleoperated (human-via-software) operator.
|
|
3
|
+
*/
|
|
4
|
+
export interface CreateTeleoperatedOperatorRequest {
|
|
5
|
+
/** User id of the human controller at the remote console. */
|
|
6
|
+
controller_user_id: string;
|
|
7
|
+
/** Control platform identifier. */
|
|
8
|
+
control_platform?: string | undefined;
|
|
9
|
+
/** Legal entity accountable. */
|
|
10
|
+
responsible_party: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform-staff partial update (contact + lifecycle status).
|
|
3
|
+
*/
|
|
4
|
+
export interface InternalUserUpdateRequest {
|
|
5
|
+
/** New email (optional). */
|
|
6
|
+
email?: string | undefined;
|
|
7
|
+
/** New display name (optional). */
|
|
8
|
+
name?: string | undefined;
|
|
9
|
+
/** New lifecycle status (optional). */
|
|
10
|
+
status?: InternalUserUpdateRequest.Status | undefined;
|
|
11
|
+
}
|
|
12
|
+
export declare namespace InternalUserUpdateRequest {
|
|
13
|
+
/** New lifecycle status (optional). */
|
|
14
|
+
const Status: {
|
|
15
|
+
readonly Active: "active";
|
|
16
|
+
readonly Suspended: "suspended";
|
|
17
|
+
readonly Deactivated: "deactivated";
|
|
18
|
+
readonly PendingVerification: "pending_verification";
|
|
19
|
+
};
|
|
20
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
21
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.InternalUserUpdateRequest = void 0;
|
|
5
|
+
var InternalUserUpdateRequest;
|
|
6
|
+
(function (InternalUserUpdateRequest) {
|
|
7
|
+
/** New lifecycle status (optional). */
|
|
8
|
+
InternalUserUpdateRequest.Status = {
|
|
9
|
+
Active: "active",
|
|
10
|
+
Suspended: "suspended",
|
|
11
|
+
Deactivated: "deactivated",
|
|
12
|
+
PendingVerification: "pending_verification",
|
|
13
|
+
};
|
|
14
|
+
})(InternalUserUpdateRequest || (exports.InternalUserUpdateRequest = InternalUserUpdateRequest = {}));
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A pending membership awaiting acceptance.
|
|
3
|
+
*/
|
|
4
|
+
export interface Invite {
|
|
5
|
+
/** Stable UUID of this invite. */
|
|
6
|
+
id?: string | undefined;
|
|
7
|
+
/** Organization the invite confers membership in. */
|
|
8
|
+
organization_id?: string | undefined;
|
|
9
|
+
/** Recipient email — canonical lowercase form. */
|
|
10
|
+
invited_email?: string | undefined;
|
|
11
|
+
/** Role the recipient will hold after acceptance. */
|
|
12
|
+
role?: Invite.Role | undefined;
|
|
13
|
+
/** Lifecycle status. */
|
|
14
|
+
status?: Invite.Status | undefined;
|
|
15
|
+
/** When the invite expires. Recipients must accept before then. */
|
|
16
|
+
expires_at?: string | undefined;
|
|
17
|
+
/** Bearer secret used to redeem the invite. Returned only on POST /v1/invites; subsequent lookups omit it. */
|
|
18
|
+
token?: string | undefined;
|
|
19
|
+
/** Object type discriminator (Stripe pattern). */
|
|
20
|
+
object?: Invite.Object_ | undefined;
|
|
21
|
+
}
|
|
22
|
+
export declare namespace Invite {
|
|
23
|
+
/** Role the recipient will hold after acceptance. */
|
|
24
|
+
const Role: {
|
|
25
|
+
readonly SuperAdmin: "super_admin";
|
|
26
|
+
readonly Admin: "admin";
|
|
27
|
+
readonly Dispatcher: "dispatcher";
|
|
28
|
+
readonly Manager: "manager";
|
|
29
|
+
readonly Staff: "staff";
|
|
30
|
+
readonly Viewer: "viewer";
|
|
31
|
+
readonly BillingAdmin: "billing_admin";
|
|
32
|
+
};
|
|
33
|
+
type Role = (typeof Role)[keyof typeof Role];
|
|
34
|
+
/** Lifecycle status. */
|
|
35
|
+
const Status: {
|
|
36
|
+
readonly Pending: "pending";
|
|
37
|
+
readonly Accepted: "accepted";
|
|
38
|
+
readonly Expired: "expired";
|
|
39
|
+
readonly Revoked: "revoked";
|
|
40
|
+
};
|
|
41
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
42
|
+
/** Object type discriminator (Stripe pattern). */
|
|
43
|
+
const Object_: {
|
|
44
|
+
readonly Invite: "invite";
|
|
45
|
+
};
|
|
46
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
47
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Invite = void 0;
|
|
5
|
+
var Invite;
|
|
6
|
+
(function (Invite) {
|
|
7
|
+
/** Role the recipient will hold after acceptance. */
|
|
8
|
+
Invite.Role = {
|
|
9
|
+
SuperAdmin: "super_admin",
|
|
10
|
+
Admin: "admin",
|
|
11
|
+
Dispatcher: "dispatcher",
|
|
12
|
+
Manager: "manager",
|
|
13
|
+
Staff: "staff",
|
|
14
|
+
Viewer: "viewer",
|
|
15
|
+
BillingAdmin: "billing_admin",
|
|
16
|
+
};
|
|
17
|
+
/** Lifecycle status. */
|
|
18
|
+
Invite.Status = {
|
|
19
|
+
Pending: "pending",
|
|
20
|
+
Accepted: "accepted",
|
|
21
|
+
Expired: "expired",
|
|
22
|
+
Revoked: "revoked",
|
|
23
|
+
};
|
|
24
|
+
/** Object type discriminator (Stripe pattern). */
|
|
25
|
+
Invite.Object_ = {
|
|
26
|
+
Invite: "invite",
|
|
27
|
+
};
|
|
28
|
+
})(Invite || (exports.Invite = Invite = {}));
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type * as NizamDashboard from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Envelope for paginated list responses (Stripe-style cursor pagination).
|
|
4
|
+
*/
|
|
5
|
+
export interface ListResponse {
|
|
6
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
7
|
+
object?: ListResponse.Object_ | undefined;
|
|
8
|
+
/** Page of resources. Empty array when there are no matches. */
|
|
9
|
+
data?: NizamDashboard.UserResource[] | undefined;
|
|
10
|
+
/** True when more pages exist; pass `next_cursor` as `?starting_after=` to fetch the next page. */
|
|
11
|
+
has_more?: boolean | undefined;
|
|
12
|
+
/** Opaque cursor for the next page. `null` on the last page. */
|
|
13
|
+
next_cursor?: string | undefined;
|
|
14
|
+
/** Page size that produced this response. */
|
|
15
|
+
limit?: number | undefined;
|
|
16
|
+
}
|
|
17
|
+
export declare namespace ListResponse {
|
|
18
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
19
|
+
const Object_: {
|
|
20
|
+
readonly List: "list";
|
|
21
|
+
};
|
|
22
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
23
|
+
}
|
|
@@ -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.ListResponse = void 0;
|
|
5
|
+
var ListResponse;
|
|
6
|
+
(function (ListResponse) {
|
|
7
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
8
|
+
ListResponse.Object_ = {
|
|
9
|
+
List: "list",
|
|
10
|
+
};
|
|
11
|
+
})(ListResponse || (exports.ListResponse = ListResponse = {}));
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A controlling agent — human, autonomous software, teleoperator, or hybrid.
|
|
3
|
+
*/
|
|
4
|
+
export interface Operator {
|
|
5
|
+
/** Stable UUID. */
|
|
6
|
+
id?: string | undefined;
|
|
7
|
+
/** Kind discriminator. */
|
|
8
|
+
kind?: Operator.Kind | undefined;
|
|
9
|
+
/** Lifecycle status. */
|
|
10
|
+
status?: Operator.Status | undefined;
|
|
11
|
+
/** Display name. */
|
|
12
|
+
display_name?: string | undefined;
|
|
13
|
+
/** Linked user id (humans with a Nizam login). Null for software agents. */
|
|
14
|
+
user_id?: string | undefined;
|
|
15
|
+
/** Legal entity accountable for this operator (required for autonomous/teleoperated). */
|
|
16
|
+
responsible_party_id?: string | undefined;
|
|
17
|
+
/** Owning organization id. */
|
|
18
|
+
organization_id?: string | undefined;
|
|
19
|
+
/** Object type discriminator (Stripe pattern). */
|
|
20
|
+
object?: Operator.Object_ | undefined;
|
|
21
|
+
}
|
|
22
|
+
export declare namespace Operator {
|
|
23
|
+
/** Kind discriminator. */
|
|
24
|
+
const Kind: {
|
|
25
|
+
readonly Human: "human";
|
|
26
|
+
readonly Autonomous: "autonomous";
|
|
27
|
+
readonly Teleoperated: "teleoperated";
|
|
28
|
+
readonly Hybrid: "hybrid";
|
|
29
|
+
};
|
|
30
|
+
type Kind = (typeof Kind)[keyof typeof Kind];
|
|
31
|
+
/** Lifecycle status. */
|
|
32
|
+
const Status: {
|
|
33
|
+
readonly Offline: "offline";
|
|
34
|
+
readonly Available: "available";
|
|
35
|
+
readonly OnDuty: "on_duty";
|
|
36
|
+
readonly OnBreak: "on_break";
|
|
37
|
+
readonly Decommissioned: "decommissioned";
|
|
38
|
+
};
|
|
39
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
40
|
+
/** Object type discriminator (Stripe pattern). */
|
|
41
|
+
const Object_: {
|
|
42
|
+
readonly Operator: "operator";
|
|
43
|
+
};
|
|
44
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
45
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Operator = void 0;
|
|
5
|
+
var Operator;
|
|
6
|
+
(function (Operator) {
|
|
7
|
+
/** Kind discriminator. */
|
|
8
|
+
Operator.Kind = {
|
|
9
|
+
Human: "human",
|
|
10
|
+
Autonomous: "autonomous",
|
|
11
|
+
Teleoperated: "teleoperated",
|
|
12
|
+
Hybrid: "hybrid",
|
|
13
|
+
};
|
|
14
|
+
/** Lifecycle status. */
|
|
15
|
+
Operator.Status = {
|
|
16
|
+
Offline: "offline",
|
|
17
|
+
Available: "available",
|
|
18
|
+
OnDuty: "on_duty",
|
|
19
|
+
OnBreak: "on_break",
|
|
20
|
+
Decommissioned: "decommissioned",
|
|
21
|
+
};
|
|
22
|
+
/** Object type discriminator (Stripe pattern). */
|
|
23
|
+
Operator.Object_ = {
|
|
24
|
+
Operator: "operator",
|
|
25
|
+
};
|
|
26
|
+
})(Operator || (exports.Operator = Operator = {}));
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A tenant — a logistics company, 3PL, or LSP.
|
|
3
|
+
*/
|
|
4
|
+
export interface Organization {
|
|
5
|
+
/** Stable UUID. Equal to the Keycloak Organization id. */
|
|
6
|
+
id?: string | undefined;
|
|
7
|
+
/** Display name. */
|
|
8
|
+
name?: string | undefined;
|
|
9
|
+
/** URL-safe identifier — used in deep links and admin tooling. */
|
|
10
|
+
slug?: string | undefined;
|
|
11
|
+
/** Lifecycle status. */
|
|
12
|
+
status?: Organization.Status | undefined;
|
|
13
|
+
/** User id of the human who originally created this organization. Immutable for the row's lifetime — does NOT change when ownership is transferred. */
|
|
14
|
+
founder_user_id?: string | undefined;
|
|
15
|
+
/** User id of the current owner. Receives all admin notifications by default. Mutable; reassigned via ownership transfer. May be null transiently if the owner user has been hard-deleted. */
|
|
16
|
+
owner_user_id?: string | undefined;
|
|
17
|
+
/** When this organization was created. */
|
|
18
|
+
created_at?: string | undefined;
|
|
19
|
+
/** Object type discriminator (Stripe pattern). */
|
|
20
|
+
object?: Organization.Object_ | undefined;
|
|
21
|
+
}
|
|
22
|
+
export declare namespace Organization {
|
|
23
|
+
/** Lifecycle status. */
|
|
24
|
+
const Status: {
|
|
25
|
+
readonly Active: "active";
|
|
26
|
+
readonly Suspended: "suspended";
|
|
27
|
+
readonly Inactive: "inactive";
|
|
28
|
+
};
|
|
29
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
30
|
+
/** Object type discriminator (Stripe pattern). */
|
|
31
|
+
const Object_: {
|
|
32
|
+
readonly Organization: "organization";
|
|
33
|
+
};
|
|
34
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
35
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Organization = void 0;
|
|
5
|
+
var Organization;
|
|
6
|
+
(function (Organization) {
|
|
7
|
+
/** Lifecycle status. */
|
|
8
|
+
Organization.Status = {
|
|
9
|
+
Active: "active",
|
|
10
|
+
Suspended: "suspended",
|
|
11
|
+
Inactive: "inactive",
|
|
12
|
+
};
|
|
13
|
+
/** Object type discriminator (Stripe pattern). */
|
|
14
|
+
Organization.Object_ = {
|
|
15
|
+
Organization: "organization",
|
|
16
|
+
};
|
|
17
|
+
})(Organization || (exports.Organization = Organization = {}));
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type * as NizamDashboard from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* An organization the current user belongs to, with their role inside it.
|
|
4
|
+
*/
|
|
5
|
+
export interface OrganizationMembership {
|
|
6
|
+
organization?: NizamDashboard.Organization | undefined;
|
|
7
|
+
/** The user's role in this organization. */
|
|
8
|
+
role?: OrganizationMembership.Role | undefined;
|
|
9
|
+
/** Object type discriminator (Stripe pattern). */
|
|
10
|
+
object?: OrganizationMembership.Object_ | undefined;
|
|
11
|
+
}
|
|
12
|
+
export declare namespace OrganizationMembership {
|
|
13
|
+
/** The user's role in this organization. */
|
|
14
|
+
const Role: {
|
|
15
|
+
readonly SuperAdmin: "super_admin";
|
|
16
|
+
readonly Admin: "admin";
|
|
17
|
+
readonly Dispatcher: "dispatcher";
|
|
18
|
+
readonly Manager: "manager";
|
|
19
|
+
readonly Staff: "staff";
|
|
20
|
+
readonly Viewer: "viewer";
|
|
21
|
+
readonly BillingAdmin: "billing_admin";
|
|
22
|
+
};
|
|
23
|
+
type Role = (typeof Role)[keyof typeof Role];
|
|
24
|
+
/** Object type discriminator (Stripe pattern). */
|
|
25
|
+
const Object_: {
|
|
26
|
+
readonly OrganizationMembership: "organization_membership";
|
|
27
|
+
};
|
|
28
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
29
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.OrganizationMembership = void 0;
|
|
5
|
+
var OrganizationMembership;
|
|
6
|
+
(function (OrganizationMembership) {
|
|
7
|
+
/** The user's role in this organization. */
|
|
8
|
+
OrganizationMembership.Role = {
|
|
9
|
+
SuperAdmin: "super_admin",
|
|
10
|
+
Admin: "admin",
|
|
11
|
+
Dispatcher: "dispatcher",
|
|
12
|
+
Manager: "manager",
|
|
13
|
+
Staff: "staff",
|
|
14
|
+
Viewer: "viewer",
|
|
15
|
+
BillingAdmin: "billing_admin",
|
|
16
|
+
};
|
|
17
|
+
/** Object type discriminator (Stripe pattern). */
|
|
18
|
+
OrganizationMembership.Object_ = {
|
|
19
|
+
OrganizationMembership: "organization_membership",
|
|
20
|
+
};
|
|
21
|
+
})(OrganizationMembership || (exports.OrganizationMembership = OrganizationMembership = {}));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type * as NizamDashboard from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* RFC 9457 Problem Details for HTTP APIs, with Nizam extensions for `code`, `trace_id`, and `errors`.
|
|
4
|
+
*/
|
|
5
|
+
export interface ProblemDetail {
|
|
6
|
+
/** URI reference identifying the problem type. */
|
|
7
|
+
type: string;
|
|
8
|
+
/** Short human-readable summary. */
|
|
9
|
+
title: string;
|
|
10
|
+
status?: unknown | undefined;
|
|
11
|
+
/** Human-readable explanation specific to this occurrence. */
|
|
12
|
+
detail?: string | undefined;
|
|
13
|
+
/** URI reference for the specific occurrence (typically the request path). */
|
|
14
|
+
instance?: string | undefined;
|
|
15
|
+
/** Machine-readable identifier. Stable across releases. Snake_case; resource-prefixed for domain errors (e.g., `user.email_already_taken`). */
|
|
16
|
+
code: string;
|
|
17
|
+
/** OpenTelemetry trace id from the request — match to logs for support. */
|
|
18
|
+
trace_id?: string | undefined;
|
|
19
|
+
/** Per-field validation errors. Populated only when status=422. */
|
|
20
|
+
errors?: NizamDashboard.ApiFieldError[] | undefined;
|
|
21
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The current authenticated user — identity + portal context + login activity.
|
|
3
|
+
*/
|
|
4
|
+
export interface User {
|
|
5
|
+
/** Stable UUID. Equal to the Keycloak `sub` claim. */
|
|
6
|
+
id?: string | undefined;
|
|
7
|
+
/** Which portal issued the bearer token used for this request. */
|
|
8
|
+
portal?: User.Portal | undefined;
|
|
9
|
+
/** Keycloak Organization id the user belongs to. Null for cross-tenant platform admins. */
|
|
10
|
+
organization_id?: string | undefined;
|
|
11
|
+
roles?: string[] | undefined;
|
|
12
|
+
/** Email shadowed from Keycloak. Null until the user completes a profile. */
|
|
13
|
+
email?: string | undefined;
|
|
14
|
+
/** Display name shadowed from Keycloak. */
|
|
15
|
+
name?: string | undefined;
|
|
16
|
+
/** Timestamp of this login. Null only on the very first call before provisioning completes. */
|
|
17
|
+
last_login_at?: string | undefined;
|
|
18
|
+
/** Total logins observed by this service. */
|
|
19
|
+
login_count?: number | undefined;
|
|
20
|
+
/** Object type discriminator (Stripe pattern). */
|
|
21
|
+
object?: User.Object_ | undefined;
|
|
22
|
+
}
|
|
23
|
+
export declare namespace User {
|
|
24
|
+
/** Which portal issued the bearer token used for this request. */
|
|
25
|
+
const Portal: {
|
|
26
|
+
readonly Dashboard: "dashboard";
|
|
27
|
+
readonly Merchant: "merchant";
|
|
28
|
+
readonly Customer: "customer";
|
|
29
|
+
readonly Carrier: "carrier";
|
|
30
|
+
readonly Operator: "operator";
|
|
31
|
+
readonly PlatformStaff: "platform_staff";
|
|
32
|
+
readonly Admin: "admin";
|
|
33
|
+
};
|
|
34
|
+
type Portal = (typeof Portal)[keyof typeof Portal];
|
|
35
|
+
/** Object type discriminator (Stripe pattern). */
|
|
36
|
+
const Object_: {
|
|
37
|
+
readonly User: "user";
|
|
38
|
+
};
|
|
39
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
40
|
+
}
|