@nizam-os/customer-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.
Files changed (187) hide show
  1. package/dist/BaseClient.d.ts +42 -0
  2. package/dist/BaseClient.js +80 -0
  3. package/dist/Client.d.ts +29 -0
  4. package/dist/Client.js +74 -0
  5. package/dist/api/errors/ConflictError.d.ts +6 -0
  6. package/dist/api/errors/ConflictError.js +54 -0
  7. package/dist/api/errors/ForbiddenError.d.ts +6 -0
  8. package/dist/api/errors/ForbiddenError.js +54 -0
  9. package/dist/api/errors/InternalServerError.d.ts +6 -0
  10. package/dist/api/errors/InternalServerError.js +54 -0
  11. package/dist/api/errors/UnauthorizedError.d.ts +6 -0
  12. package/dist/api/errors/UnauthorizedError.js +54 -0
  13. package/dist/api/errors/index.d.ts +4 -0
  14. package/dist/api/errors/index.js +20 -0
  15. package/dist/api/index.d.ts +3 -0
  16. package/dist/api/index.js +19 -0
  17. package/dist/api/resources/identity/client/Client.d.ts +39 -0
  18. package/dist/api/resources/identity/client/Client.js +116 -0
  19. package/dist/api/resources/identity/client/index.d.ts +1 -0
  20. package/dist/api/resources/identity/client/index.js +2 -0
  21. package/dist/api/resources/identity/exports.d.ts +2 -0
  22. package/dist/api/resources/identity/exports.js +21 -0
  23. package/dist/api/resources/identity/index.d.ts +1 -0
  24. package/dist/api/resources/identity/index.js +17 -0
  25. package/dist/api/resources/index.d.ts +2 -0
  26. package/dist/api/resources/index.js +38 -0
  27. package/dist/api/resources/lookups/client/Client.d.ts +27 -0
  28. package/dist/api/resources/lookups/client/Client.js +100 -0
  29. package/dist/api/resources/lookups/client/index.d.ts +1 -0
  30. package/dist/api/resources/lookups/client/index.js +2 -0
  31. package/dist/api/resources/lookups/exports.d.ts +2 -0
  32. package/dist/api/resources/lookups/exports.js +21 -0
  33. package/dist/api/resources/lookups/index.d.ts +1 -0
  34. package/dist/api/resources/lookups/index.js +17 -0
  35. package/dist/api/types/AcceptInviteRequest.d.ts +4 -0
  36. package/dist/api/types/AcceptInviteRequest.js +3 -0
  37. package/dist/api/types/ApiFieldError.d.ts +11 -0
  38. package/dist/api/types/ApiFieldError.js +3 -0
  39. package/dist/api/types/Asset.d.ts +58 -0
  40. package/dist/api/types/Asset.js +33 -0
  41. package/dist/api/types/Assignment.d.ts +49 -0
  42. package/dist/api/types/Assignment.js +30 -0
  43. package/dist/api/types/CloseAssignmentRequest.d.ts +21 -0
  44. package/dist/api/types/CloseAssignmentRequest.js +18 -0
  45. package/dist/api/types/CreateAssetRequest.d.ts +26 -0
  46. package/dist/api/types/CreateAssetRequest.js +19 -0
  47. package/dist/api/types/CreateAutonomousOperatorRequest.d.ts +15 -0
  48. package/dist/api/types/CreateAutonomousOperatorRequest.js +3 -0
  49. package/dist/api/types/CreateHumanOperatorRequest.d.ts +17 -0
  50. package/dist/api/types/CreateHumanOperatorRequest.js +3 -0
  51. package/dist/api/types/CreateInviteRequest.d.ts +23 -0
  52. package/dist/api/types/CreateInviteRequest.js +17 -0
  53. package/dist/api/types/CreateOperatorRequest.d.ts +16 -0
  54. package/dist/api/types/CreateOperatorRequest.js +3 -0
  55. package/dist/api/types/CreateOrganizationRequest.d.ts +16 -0
  56. package/dist/api/types/CreateOrganizationRequest.js +3 -0
  57. package/dist/api/types/CreateTeleoperatedOperatorRequest.d.ts +11 -0
  58. package/dist/api/types/CreateTeleoperatedOperatorRequest.js +3 -0
  59. package/dist/api/types/InternalUserUpdateRequest.d.ts +21 -0
  60. package/dist/api/types/InternalUserUpdateRequest.js +14 -0
  61. package/dist/api/types/Invite.d.ts +47 -0
  62. package/dist/api/types/Invite.js +28 -0
  63. package/dist/api/types/InviteUserRequest.d.ts +9 -0
  64. package/dist/api/types/InviteUserRequest.js +3 -0
  65. package/dist/api/types/ListResponse.d.ts +23 -0
  66. package/dist/api/types/ListResponse.js +11 -0
  67. package/dist/api/types/OpenAssignmentRequest.d.ts +22 -0
  68. package/dist/api/types/OpenAssignmentRequest.js +15 -0
  69. package/dist/api/types/Operator.d.ts +45 -0
  70. package/dist/api/types/Operator.js +26 -0
  71. package/dist/api/types/Organization.d.ts +35 -0
  72. package/dist/api/types/Organization.js +17 -0
  73. package/dist/api/types/OrganizationMembership.d.ts +29 -0
  74. package/dist/api/types/OrganizationMembership.js +21 -0
  75. package/dist/api/types/ProblemDetail.d.ts +21 -0
  76. package/dist/api/types/ProblemDetail.js +3 -0
  77. package/dist/api/types/UpdateOrganizationRequest.d.ts +14 -0
  78. package/dist/api/types/UpdateOrganizationRequest.js +3 -0
  79. package/dist/api/types/User.d.ts +40 -0
  80. package/dist/api/types/User.js +21 -0
  81. package/dist/api/types/UserResource.d.ts +34 -0
  82. package/dist/api/types/UserResource.js +18 -0
  83. package/dist/api/types/UserUpdateRequest.d.ts +9 -0
  84. package/dist/api/types/UserUpdateRequest.js +3 -0
  85. package/dist/api/types/index.d.ts +25 -0
  86. package/dist/api/types/index.js +41 -0
  87. package/dist/auth/BearerAuthProvider.d.ts +20 -0
  88. package/dist/auth/BearerAuthProvider.js +68 -0
  89. package/dist/auth/index.d.ts +1 -0
  90. package/dist/auth/index.js +5 -0
  91. package/dist/core/auth/AuthProvider.d.ts +8 -0
  92. package/dist/core/auth/AuthProvider.js +9 -0
  93. package/dist/core/auth/AuthRequest.d.ts +9 -0
  94. package/dist/core/auth/AuthRequest.js +2 -0
  95. package/dist/core/auth/BasicAuth.d.ts +8 -0
  96. package/dist/core/auth/BasicAuth.js +32 -0
  97. package/dist/core/auth/BearerToken.d.ts +7 -0
  98. package/dist/core/auth/BearerToken.js +16 -0
  99. package/dist/core/auth/NoOpAuthProvider.d.ts +5 -0
  100. package/dist/core/auth/NoOpAuthProvider.js +9 -0
  101. package/dist/core/auth/index.d.ts +5 -0
  102. package/dist/core/auth/index.js +11 -0
  103. package/dist/core/base64.d.ts +2 -0
  104. package/dist/core/base64.js +26 -0
  105. package/dist/core/exports.d.ts +1 -0
  106. package/dist/core/exports.js +17 -0
  107. package/dist/core/fetcher/APIResponse.d.ts +20 -0
  108. package/dist/core/fetcher/APIResponse.js +2 -0
  109. package/dist/core/fetcher/BinaryResponse.d.ts +19 -0
  110. package/dist/core/fetcher/BinaryResponse.js +17 -0
  111. package/dist/core/fetcher/EndpointMetadata.d.ts +13 -0
  112. package/dist/core/fetcher/EndpointMetadata.js +2 -0
  113. package/dist/core/fetcher/EndpointSupplier.d.ts +12 -0
  114. package/dist/core/fetcher/EndpointSupplier.js +13 -0
  115. package/dist/core/fetcher/Fetcher.d.ts +56 -0
  116. package/dist/core/fetcher/Fetcher.js +310 -0
  117. package/dist/core/fetcher/Headers.d.ts +2 -0
  118. package/dist/core/fetcher/Headers.js +84 -0
  119. package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
  120. package/dist/core/fetcher/HttpResponsePromise.js +92 -0
  121. package/dist/core/fetcher/RawResponse.d.ts +29 -0
  122. package/dist/core/fetcher/RawResponse.js +44 -0
  123. package/dist/core/fetcher/Supplier.d.ts +4 -0
  124. package/dist/core/fetcher/Supplier.js +13 -0
  125. package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
  126. package/dist/core/fetcher/createRequestUrl.js +8 -0
  127. package/dist/core/fetcher/getErrorResponseBody.d.ts +1 -0
  128. package/dist/core/fetcher/getErrorResponseBody.js +33 -0
  129. package/dist/core/fetcher/getFetchFn.d.ts +1 -0
  130. package/dist/core/fetcher/getFetchFn.js +6 -0
  131. package/dist/core/fetcher/getHeader.d.ts +1 -0
  132. package/dist/core/fetcher/getHeader.js +11 -0
  133. package/dist/core/fetcher/getRequestBody.d.ts +7 -0
  134. package/dist/core/fetcher/getRequestBody.js +16 -0
  135. package/dist/core/fetcher/getResponseBody.d.ts +1 -0
  136. package/dist/core/fetcher/getResponseBody.js +58 -0
  137. package/dist/core/fetcher/index.d.ts +13 -0
  138. package/dist/core/fetcher/index.js +19 -0
  139. package/dist/core/fetcher/makePassthroughRequest.d.ts +49 -0
  140. package/dist/core/fetcher/makePassthroughRequest.js +122 -0
  141. package/dist/core/fetcher/makeRequest.d.ts +6 -0
  142. package/dist/core/fetcher/makeRequest.js +59 -0
  143. package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
  144. package/dist/core/fetcher/requestWithRetries.js +59 -0
  145. package/dist/core/fetcher/signals.d.ts +5 -0
  146. package/dist/core/fetcher/signals.js +24 -0
  147. package/dist/core/headers.d.ts +2 -0
  148. package/dist/core/headers.js +31 -0
  149. package/dist/core/index.d.ts +6 -0
  150. package/dist/core/index.js +45 -0
  151. package/dist/core/json.d.ts +15 -0
  152. package/dist/core/json.js +24 -0
  153. package/dist/core/logging/exports.d.ts +18 -0
  154. package/dist/core/logging/exports.js +45 -0
  155. package/dist/core/logging/index.d.ts +1 -0
  156. package/dist/core/logging/index.js +17 -0
  157. package/dist/core/logging/logger.d.ts +126 -0
  158. package/dist/core/logging/logger.js +143 -0
  159. package/dist/core/runtime/index.d.ts +1 -0
  160. package/dist/core/runtime/index.js +5 -0
  161. package/dist/core/runtime/runtime.d.ts +9 -0
  162. package/dist/core/runtime/runtime.js +103 -0
  163. package/dist/core/url/QueryStringBuilder.d.ts +47 -0
  164. package/dist/core/url/QueryStringBuilder.js +83 -0
  165. package/dist/core/url/encodePathParam.d.ts +1 -0
  166. package/dist/core/url/encodePathParam.js +21 -0
  167. package/dist/core/url/index.d.ts +4 -0
  168. package/dist/core/url/index.js +11 -0
  169. package/dist/core/url/join.d.ts +1 -0
  170. package/dist/core/url/join.js +68 -0
  171. package/dist/core/url/qs.d.ts +7 -0
  172. package/dist/core/url/qs.js +79 -0
  173. package/dist/environments.d.ts +4 -0
  174. package/dist/environments.js +7 -0
  175. package/dist/errors/NizamCustomerError.d.ts +14 -0
  176. package/dist/errors/NizamCustomerError.js +35 -0
  177. package/dist/errors/NizamCustomerTimeoutError.d.ts +6 -0
  178. package/dist/errors/NizamCustomerTimeoutError.js +18 -0
  179. package/dist/errors/handleNonStatusCodeError.d.ts +2 -0
  180. package/dist/errors/handleNonStatusCodeError.js +68 -0
  181. package/dist/errors/index.d.ts +2 -0
  182. package/dist/errors/index.js +7 -0
  183. package/dist/exports.d.ts +1 -0
  184. package/dist/exports.js +17 -0
  185. package/dist/index.d.ts +6 -0
  186. package/dist/index.js +48 -0
  187. package/package.json +35 -0
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Create a new asset.
3
+ */
4
+ export interface CreateAssetRequest {
5
+ /** Top-level kind. */
6
+ kind: CreateAssetRequest.Kind;
7
+ /** Display name. */
8
+ name?: string | undefined;
9
+ /** SAE J3016 autonomy level 0..5. */
10
+ autonomy_level?: number | undefined;
11
+ }
12
+ export declare namespace CreateAssetRequest {
13
+ /** Top-level kind. */
14
+ const Kind: {
15
+ readonly GroundVehicle: "ground_vehicle";
16
+ readonly AerialVehicle: "aerial_vehicle";
17
+ readonly MarineVehicle: "marine_vehicle";
18
+ readonly Robot: "robot";
19
+ readonly Agv: "agv";
20
+ readonly Trailer: "trailer";
21
+ readonly Container: "container";
22
+ readonly Pallet: "pallet";
23
+ readonly Equipment: "equipment";
24
+ };
25
+ type Kind = (typeof Kind)[keyof typeof Kind];
26
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.CreateAssetRequest = void 0;
5
+ var CreateAssetRequest;
6
+ (function (CreateAssetRequest) {
7
+ /** Top-level kind. */
8
+ CreateAssetRequest.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
+ })(CreateAssetRequest || (exports.CreateAssetRequest = CreateAssetRequest = {}));
@@ -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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,23 @@
1
+ export interface CreateInviteRequest {
2
+ /** Organization the invite is for. */
3
+ organization_id: string;
4
+ /** Recipient email. */
5
+ email: string;
6
+ /** Role the recipient will hold after acceptance. Lowercase enum names from OrgUserRole. */
7
+ role: CreateInviteRequest.Role;
8
+ /** TTL in days. Defaults to 7. */
9
+ ttl_days?: number | undefined;
10
+ }
11
+ export declare namespace CreateInviteRequest {
12
+ /** Role the recipient will hold after acceptance. Lowercase enum names from OrgUserRole. */
13
+ const Role: {
14
+ readonly SuperAdmin: "super_admin";
15
+ readonly Admin: "admin";
16
+ readonly Dispatcher: "dispatcher";
17
+ readonly Manager: "manager";
18
+ readonly Staff: "staff";
19
+ readonly Viewer: "viewer";
20
+ readonly BillingAdmin: "billing_admin";
21
+ };
22
+ type Role = (typeof Role)[keyof typeof Role];
23
+ }
@@ -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.CreateInviteRequest = void 0;
5
+ var CreateInviteRequest;
6
+ (function (CreateInviteRequest) {
7
+ /** Role the recipient will hold after acceptance. Lowercase enum names from OrgUserRole. */
8
+ CreateInviteRequest.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
+ })(CreateInviteRequest || (exports.CreateInviteRequest = CreateInviteRequest = {}));
@@ -0,0 +1,16 @@
1
+ import type * as NizamCustomer from "../index.js";
2
+ /**
3
+ * Create a new operator. The kind discriminator selects the variant.
4
+ */
5
+ export type CreateOperatorRequest = NizamCustomer.CreateOperatorRequest.Human | NizamCustomer.CreateOperatorRequest.Autonomous | NizamCustomer.CreateOperatorRequest.Teleoperated;
6
+ export declare namespace CreateOperatorRequest {
7
+ interface Human extends NizamCustomer.CreateHumanOperatorRequest {
8
+ kind: "human";
9
+ }
10
+ interface Autonomous extends NizamCustomer.CreateAutonomousOperatorRequest {
11
+ kind: "autonomous";
12
+ }
13
+ interface Teleoperated extends NizamCustomer.CreateTeleoperatedOperatorRequest {
14
+ kind: "teleoperated";
15
+ }
16
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ export interface CreateOrganizationRequest {
2
+ /** Display name of the organization. */
3
+ name: string;
4
+ /** Optional URL-safe slug. When omitted, the server derives one from the name. */
5
+ slug?: string | undefined;
6
+ /** Optional primary email domain. When set, Keycloak attaches it to the new Organization so per-domain IdP discovery works. */
7
+ primary_domain?: string | undefined;
8
+ /** Optional self-selected vertical from /v1/lookups/business-categories. Lowercase slug (e.g. 'restaurant', 'third_party_logistics'). Drives downstream personalization. */
9
+ business_category?: string | undefined;
10
+ /** Optional contact phone number in E.164 format (leading +, country code, then digits). */
11
+ phone?: string | undefined;
12
+ /** Optional ISO 3166-1 alpha-2 country code. */
13
+ country?: string | undefined;
14
+ /** Optional IANA timezone identifier. */
15
+ timezone?: string | undefined;
16
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,9 @@
1
+ /**
2
+ * Tenant-admin invite payload.
3
+ */
4
+ export interface InviteUserRequest {
5
+ /** Recipient email. */
6
+ email: string;
7
+ /** Display name (optional). */
8
+ name?: string | undefined;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,23 @@
1
+ import type * as NizamCustomer 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?: NizamCustomer.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,22 @@
1
+ /**
2
+ * Open a new assignment.
3
+ */
4
+ export interface OpenAssignmentRequest {
5
+ /** Asset id. */
6
+ asset_id: string;
7
+ /** Operator id. */
8
+ operator_id: string;
9
+ /** Role discriminator. */
10
+ role: OpenAssignmentRequest.Role;
11
+ }
12
+ export declare namespace OpenAssignmentRequest {
13
+ /** Role discriminator. */
14
+ const Role: {
15
+ readonly Primary: "primary";
16
+ readonly CoOperator: "co_operator";
17
+ readonly SafetyMonitor: "safety_monitor";
18
+ readonly RemotePilot: "remote_pilot";
19
+ readonly Supervisor: "supervisor";
20
+ };
21
+ type Role = (typeof Role)[keyof typeof Role];
22
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.OpenAssignmentRequest = void 0;
5
+ var OpenAssignmentRequest;
6
+ (function (OpenAssignmentRequest) {
7
+ /** Role discriminator. */
8
+ OpenAssignmentRequest.Role = {
9
+ Primary: "primary",
10
+ CoOperator: "co_operator",
11
+ SafetyMonitor: "safety_monitor",
12
+ RemotePilot: "remote_pilot",
13
+ Supervisor: "supervisor",
14
+ };
15
+ })(OpenAssignmentRequest || (exports.OpenAssignmentRequest = OpenAssignmentRequest = {}));
@@ -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 NizamCustomer from "../index.js";
2
+ /**
3
+ * An organization the current user belongs to, with their role inside it.
4
+ */
5
+ export interface OrganizationMembership {
6
+ organization?: NizamCustomer.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 NizamCustomer 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?: NizamCustomer.ApiFieldError[] | undefined;
21
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ export interface UpdateOrganizationRequest {
2
+ /** New display name. Omit to leave unchanged. */
3
+ name?: string | undefined;
4
+ /** New URL-safe slug. Cross-tenant unique. Cascades to the Keycloak Organization's alias. Omit to leave unchanged. */
5
+ slug?: string | undefined;
6
+ /** New business category — lowercase slug from /v1/lookups/business-categories. Omit to leave unchanged. */
7
+ business_category?: string | undefined;
8
+ /** New contact phone in E.164 format. Omit to leave unchanged. */
9
+ phone?: string | undefined;
10
+ /** New ISO 3166-1 alpha-2 country code. Omit to leave unchanged. */
11
+ country?: string | undefined;
12
+ /** New IANA timezone identifier. Omit to leave unchanged. */
13
+ timezone?: string | undefined;
14
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });