@nizam-os/carrier-sdk 2.3.4 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/Client.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { InvitesClient } from "./api/resources/invites/client/Client.js";
2
2
  import { LookupsClient } from "./api/resources/lookups/client/Client.js";
3
+ import { RealtimeClient } from "./api/resources/realtime/client/Client.js";
3
4
  import { UsersClient } from "./api/resources/users/client/Client.js";
4
5
  import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
5
6
  import { type NormalizedClientOptionsWithAuth } from "./BaseClient.js";
@@ -14,10 +15,12 @@ export declare class NizamCarrierClient {
14
15
  protected _invites: InvitesClient | undefined;
15
16
  protected _lookups: LookupsClient | undefined;
16
17
  protected _users: UsersClient | undefined;
18
+ protected _realtime: RealtimeClient | undefined;
17
19
  constructor(options: NizamCarrierClient.Options);
18
20
  get invites(): InvitesClient;
19
21
  get lookups(): LookupsClient;
20
22
  get users(): UsersClient;
23
+ get realtime(): RealtimeClient;
21
24
  /**
22
25
  * Make a passthrough request using the SDK's configured auth, retry, logging, etc.
23
26
  * This is useful for making requests to endpoints not yet supported in the SDK.
package/dist/Client.js CHANGED
@@ -37,7 +37,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.NizamCarrierClient = void 0;
38
38
  const Client_js_1 = require("./api/resources/invites/client/Client.js");
39
39
  const Client_js_2 = require("./api/resources/lookups/client/Client.js");
40
- const Client_js_3 = require("./api/resources/users/client/Client.js");
40
+ const Client_js_3 = require("./api/resources/realtime/client/Client.js");
41
+ const Client_js_4 = require("./api/resources/users/client/Client.js");
41
42
  const BaseClient_js_1 = require("./BaseClient.js");
42
43
  const core = __importStar(require("./core/index.js"));
43
44
  class NizamCarrierClient {
@@ -51,7 +52,10 @@ class NizamCarrierClient {
51
52
  return (this._lookups ?? (this._lookups = new Client_js_2.LookupsClient(this._options)));
52
53
  }
53
54
  get users() {
54
- return (this._users ?? (this._users = new Client_js_3.UsersClient(this._options)));
55
+ return (this._users ?? (this._users = new Client_js_4.UsersClient(this._options)));
56
+ }
57
+ get realtime() {
58
+ return (this._realtime ?? (this._realtime = new Client_js_3.RealtimeClient(this._options)));
55
59
  }
56
60
  /**
57
61
  * Make a passthrough request using the SDK's configured auth, retry, logging, etc.
@@ -1,4 +1,5 @@
1
1
  export * from "./invites/client/requests/index.js";
2
2
  export * as invites from "./invites/index.js";
3
3
  export * as lookups from "./lookups/index.js";
4
+ export * as realtime from "./realtime/index.js";
4
5
  export * as users from "./users/index.js";
@@ -36,8 +36,9 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.users = exports.lookups = exports.invites = void 0;
39
+ exports.users = exports.realtime = exports.lookups = exports.invites = void 0;
40
40
  __exportStar(require("./invites/client/requests/index.js"), exports);
41
41
  exports.invites = __importStar(require("./invites/index.js"));
42
42
  exports.lookups = __importStar(require("./lookups/index.js"));
43
+ exports.realtime = __importStar(require("./realtime/index.js"));
43
44
  exports.users = __importStar(require("./users/index.js"));
@@ -0,0 +1,30 @@
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 NizamCarrier from "../../../index.js";
5
+ export declare namespace RealtimeClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ /**
11
+ * Realtime (STOMP/WebSocket) session bootstrap — mint a ticket to open a connection.
12
+ */
13
+ export declare class RealtimeClient {
14
+ protected readonly _options: NormalizedClientOptionsWithAuth<RealtimeClient.Options>;
15
+ constructor(options: RealtimeClient.Options);
16
+ /**
17
+ * Returns a short-lived ticket to present as `Authorization: Bearer <ticket>` on the STOMP CONNECT frame to `/ws`. Browser clients need this because their Keycloak access token lives in an HTTP-only cookie that JavaScript cannot read; native/mobile clients holding a Keycloak access token may present it directly on CONNECT and skip this call. Mint a fresh ticket per connection attempt — it expires within seconds.
18
+ *
19
+ * @param {RealtimeClient.RequestOptions} requestOptions - Request-specific configuration.
20
+ *
21
+ * @throws {@link NizamCarrier.UnauthorizedError}
22
+ * @throws {@link NizamCarrier.ForbiddenError}
23
+ * @throws {@link NizamCarrier.InternalServerError}
24
+ *
25
+ * @example
26
+ * await client.realtime.createRealtimeTicket()
27
+ */
28
+ createRealtimeTicket(requestOptions?: RealtimeClient.RequestOptions): core.HttpResponsePromise<NizamCarrier.RealtimeTicket>;
29
+ private __createRealtimeTicket;
30
+ }
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.RealtimeClient = void 0;
38
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
39
+ const headers_js_1 = require("../../../../core/headers.js");
40
+ const core = __importStar(require("../../../../core/index.js"));
41
+ const environments = __importStar(require("../../../../environments.js"));
42
+ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
43
+ const errors = __importStar(require("../../../../errors/index.js"));
44
+ const NizamCarrier = __importStar(require("../../../index.js"));
45
+ /**
46
+ * Realtime (STOMP/WebSocket) session bootstrap — mint a ticket to open a connection.
47
+ */
48
+ class RealtimeClient {
49
+ constructor(options) {
50
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
51
+ }
52
+ /**
53
+ * Returns a short-lived ticket to present as `Authorization: Bearer <ticket>` on the STOMP CONNECT frame to `/ws`. Browser clients need this because their Keycloak access token lives in an HTTP-only cookie that JavaScript cannot read; native/mobile clients holding a Keycloak access token may present it directly on CONNECT and skip this call. Mint a fresh ticket per connection attempt — it expires within seconds.
54
+ *
55
+ * @param {RealtimeClient.RequestOptions} requestOptions - Request-specific configuration.
56
+ *
57
+ * @throws {@link NizamCarrier.UnauthorizedError}
58
+ * @throws {@link NizamCarrier.ForbiddenError}
59
+ * @throws {@link NizamCarrier.InternalServerError}
60
+ *
61
+ * @example
62
+ * await client.realtime.createRealtimeTicket()
63
+ */
64
+ createRealtimeTicket(requestOptions) {
65
+ return core.HttpResponsePromise.fromPromise(this.__createRealtimeTicket(requestOptions));
66
+ }
67
+ async __createRealtimeTicket(requestOptions) {
68
+ const _authRequest = await this._options.authProvider.getAuthRequest();
69
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
70
+ const _response = await core.fetcher({
71
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
72
+ (await core.Supplier.get(this._options.environment)) ??
73
+ environments.NizamCarrierEnvironment.Production, "v1/realtime/tickets"),
74
+ method: "POST",
75
+ headers: _headers,
76
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
77
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
78
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
79
+ abortSignal: requestOptions?.abortSignal,
80
+ fetchFn: this._options?.fetch,
81
+ logging: this._options.logging,
82
+ });
83
+ if (_response.ok) {
84
+ return { data: _response.body, rawResponse: _response.rawResponse };
85
+ }
86
+ if (_response.error.reason === "status-code") {
87
+ switch (_response.error.statusCode) {
88
+ case 401:
89
+ throw new NizamCarrier.UnauthorizedError(_response.error.body, _response.rawResponse);
90
+ case 403:
91
+ throw new NizamCarrier.ForbiddenError(_response.error.body, _response.rawResponse);
92
+ case 500:
93
+ throw new NizamCarrier.InternalServerError(_response.error.body, _response.rawResponse);
94
+ default:
95
+ throw new errors.NizamCarrierError({
96
+ statusCode: _response.error.statusCode,
97
+ body: _response.error.body,
98
+ rawResponse: _response.rawResponse,
99
+ });
100
+ }
101
+ }
102
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/realtime/tickets");
103
+ }
104
+ }
105
+ exports.RealtimeClient = RealtimeClient;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export { RealtimeClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.RealtimeClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "RealtimeClient", { enumerable: true, get: function () { return Client_js_1.RealtimeClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1 @@
1
+ export * from "./client/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
@@ -17,8 +17,9 @@ export declare class UsersClient {
17
17
  * Returns the authenticated user merged with profile claims from their JWT.
18
18
  *
19
19
  * JIT-provisions a shadow row on the first call (so a brand-new Keycloak user can hit any
20
- * endpoint without an explicit signup step) and stamps `last_login_at` + increments
21
- * `login_count` on every subsequent call.
20
+ * endpoint without an explicit signup step). Records a login (`last_login_at` = the token's
21
+ * `auth_time`, `login_count` incremented) only when a genuinely new authentication is seen;
22
+ * repeated calls within the same session don't write.
22
23
  *
23
24
  * The `roles` array combines realm roles (flat, e.g. `platform_admin`) with portal-scoped
24
25
  * client roles (prefixed, e.g. `dashboard:dispatcher`). The frontend usually drops the
@@ -53,8 +53,9 @@ class UsersClient {
53
53
  * Returns the authenticated user merged with profile claims from their JWT.
54
54
  *
55
55
  * JIT-provisions a shadow row on the first call (so a brand-new Keycloak user can hit any
56
- * endpoint without an explicit signup step) and stamps `last_login_at` + increments
57
- * `login_count` on every subsequent call.
56
+ * endpoint without an explicit signup step). Records a login (`last_login_at` = the token's
57
+ * `auth_time`, `login_count` incremented) only when a genuinely new authentication is seen;
58
+ * repeated calls within the same session don't write.
58
59
  *
59
60
  * The `roles` array combines realm roles (flat, e.g. `platform_admin`) with portal-scoped
60
61
  * client roles (prefixed, e.g. `dashboard:dispatcher`). The frontend usually drops the
@@ -0,0 +1,55 @@
1
+ /**
2
+ * One entry in an organization's activity feed (append-only audit timeline).
3
+ */
4
+ export interface ActivityResource {
5
+ /** Stable UUID of this activity row — the resource id and pagination key. */
6
+ id?: string | undefined;
7
+ /** Per-publication idempotency key — equal to the realtime ActivityFeedItem's `id` for the same event, so a client can dedupe realtime against REST. Null for directly-written audit rows. */
8
+ event_id?: string | undefined;
9
+ /** Canonical event verb. */
10
+ event?: ActivityResource.Event | undefined;
11
+ /** Human-readable narrative shown in the feed UI. */
12
+ description?: string | undefined;
13
+ /** Type of the entity the action targeted (polymorphic subject). */
14
+ subject_type?: string | undefined;
15
+ /** Id of the entity the action targeted. */
16
+ subject_id?: string | undefined;
17
+ /** Type of the actor that performed the action. */
18
+ causer_type?: string | undefined;
19
+ /** Id of the actor that performed the action. Null for system/scheduled actions. */
20
+ causer_id?: string | undefined;
21
+ /** Optional UI filtering bucket. */
22
+ log_name?: string | undefined;
23
+ /** When the activity was recorded — the authoritative timestamp. */
24
+ occurred_at?: string | undefined;
25
+ /** Object type discriminator (Stripe pattern). */
26
+ object?: ActivityResource.Object_ | undefined;
27
+ }
28
+ export declare namespace ActivityResource {
29
+ /** Canonical event verb. */
30
+ const Event: {
31
+ readonly Created: "created";
32
+ readonly Updated: "updated";
33
+ readonly Deleted: "deleted";
34
+ readonly Restored: "restored";
35
+ readonly StateChanged: "state_changed";
36
+ readonly Assigned: "assigned";
37
+ readonly Unassigned: "unassigned";
38
+ readonly Completed: "completed";
39
+ readonly Failed: "failed";
40
+ readonly Cancelled: "cancelled";
41
+ readonly Sent: "sent";
42
+ readonly Received: "received";
43
+ readonly Attached: "attached";
44
+ readonly Detached: "detached";
45
+ readonly LoggedIn: "logged_in";
46
+ readonly LoggedOut: "logged_out";
47
+ readonly Custom: "custom";
48
+ };
49
+ type Event = (typeof Event)[keyof typeof Event];
50
+ /** Object type discriminator (Stripe pattern). */
51
+ const Object_: {
52
+ readonly Activity: "activity";
53
+ };
54
+ type Object_ = (typeof Object_)[keyof typeof Object_];
55
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ActivityResource = void 0;
5
+ var ActivityResource;
6
+ (function (ActivityResource) {
7
+ /** Canonical event verb. */
8
+ ActivityResource.Event = {
9
+ Created: "created",
10
+ Updated: "updated",
11
+ Deleted: "deleted",
12
+ Restored: "restored",
13
+ StateChanged: "state_changed",
14
+ Assigned: "assigned",
15
+ Unassigned: "unassigned",
16
+ Completed: "completed",
17
+ Failed: "failed",
18
+ Cancelled: "cancelled",
19
+ Sent: "sent",
20
+ Received: "received",
21
+ Attached: "attached",
22
+ Detached: "detached",
23
+ LoggedIn: "logged_in",
24
+ LoggedOut: "logged_out",
25
+ Custom: "custom",
26
+ };
27
+ /** Object type discriminator (Stripe pattern). */
28
+ ActivityResource.Object_ = {
29
+ Activity: "activity",
30
+ };
31
+ })(ActivityResource || (exports.ActivityResource = ActivityResource = {}));
@@ -0,0 +1,62 @@
1
+ /**
2
+ * An asset as returned by the list/search endpoint — the asset fields plus relevance metadata when the request was a search.
3
+ */
4
+ export interface AssetListItem {
5
+ /** Stable UUID. */
6
+ id?: string | undefined;
7
+ /** Top-level kind. */
8
+ kind?: AssetListItem.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?: AssetListItem.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
+ /** Relevance score (descending) when the request carried `q`; 0 for plain listings. Scores are only comparable within a single response. */
26
+ rank?: number | undefined;
27
+ /** Highlighted match fragment when the request carried `q&highlight=true`. Matched terms are wrapped in `<mark>…</mark>`. */
28
+ snippet?: string | undefined;
29
+ /** Object type discriminator (Stripe pattern). */
30
+ object?: AssetListItem.Object_ | undefined;
31
+ }
32
+ export declare namespace AssetListItem {
33
+ /** Top-level kind. */
34
+ const Kind: {
35
+ readonly GroundVehicle: "ground_vehicle";
36
+ readonly AerialVehicle: "aerial_vehicle";
37
+ readonly MarineVehicle: "marine_vehicle";
38
+ readonly Robot: "robot";
39
+ readonly Agv: "agv";
40
+ readonly Trailer: "trailer";
41
+ readonly Container: "container";
42
+ readonly Pallet: "pallet";
43
+ readonly Equipment: "equipment";
44
+ };
45
+ type Kind = (typeof Kind)[keyof typeof Kind];
46
+ /** Lifecycle status. */
47
+ const Status: {
48
+ readonly Active: "active";
49
+ readonly Maintenance: "maintenance";
50
+ readonly OutOfService: "out_of_service";
51
+ readonly Retired: "retired";
52
+ readonly Sold: "sold";
53
+ readonly Inactive: "inactive";
54
+ readonly Lost: "lost";
55
+ };
56
+ type Status = (typeof Status)[keyof typeof Status];
57
+ /** Object type discriminator (Stripe pattern). */
58
+ const Object_: {
59
+ readonly Asset: "asset";
60
+ };
61
+ type Object_ = (typeof Object_)[keyof typeof Object_];
62
+ }
@@ -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.AssetListItem = void 0;
5
+ var AssetListItem;
6
+ (function (AssetListItem) {
7
+ /** Top-level kind. */
8
+ AssetListItem.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
+ AssetListItem.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
+ AssetListItem.Object_ = {
31
+ Asset: "asset",
32
+ };
33
+ })(AssetListItem || (exports.AssetListItem = AssetListItem = {}));
@@ -0,0 +1,27 @@
1
+ import type * as NizamCarrier from "../index.js";
2
+ /**
3
+ * Envelope for paginated list responses (Stripe-style cursor pagination).
4
+ */
5
+ export interface ListResponseActivityResource {
6
+ /** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
7
+ object?: ListResponseActivityResource.Object_ | undefined;
8
+ /** Page of resources. Empty array when there are no matches. */
9
+ data?: NizamCarrier.ActivityResource[] | undefined;
10
+ /** True when more pages exist; pass `next_cursor` as `?starting_after=` to fetch the next page. */
11
+ has_more?: boolean | undefined;
12
+ /** True when earlier pages exist; pass `prev_cursor` as `?ending_before=` to fetch the previous page. */
13
+ has_previous?: boolean | undefined;
14
+ /** Opaque cursor for the next page. `null` on the last page. */
15
+ next_cursor?: string | undefined;
16
+ /** Opaque cursor for the previous page. `null` on the first page. */
17
+ prev_cursor?: string | undefined;
18
+ /** Page size that produced this response. */
19
+ limit?: number | undefined;
20
+ }
21
+ export declare namespace ListResponseActivityResource {
22
+ /** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
23
+ const Object_: {
24
+ readonly List: "list";
25
+ };
26
+ type Object_ = (typeof Object_)[keyof typeof Object_];
27
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ListResponseActivityResource = void 0;
5
+ var ListResponseActivityResource;
6
+ (function (ListResponseActivityResource) {
7
+ /** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
8
+ ListResponseActivityResource.Object_ = {
9
+ List: "list",
10
+ };
11
+ })(ListResponseActivityResource || (exports.ListResponseActivityResource = ListResponseActivityResource = {}));
@@ -0,0 +1,27 @@
1
+ import type * as NizamCarrier from "../index.js";
2
+ /**
3
+ * Envelope for paginated list responses (Stripe-style cursor pagination).
4
+ */
5
+ export interface ListResponseAssetListItem {
6
+ /** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
7
+ object?: ListResponseAssetListItem.Object_ | undefined;
8
+ /** Page of resources. Empty array when there are no matches. */
9
+ data?: NizamCarrier.AssetListItem[] | undefined;
10
+ /** True when more pages exist; pass `next_cursor` as `?starting_after=` to fetch the next page. */
11
+ has_more?: boolean | undefined;
12
+ /** True when earlier pages exist; pass `prev_cursor` as `?ending_before=` to fetch the previous page. */
13
+ has_previous?: boolean | undefined;
14
+ /** Opaque cursor for the next page. `null` on the last page. */
15
+ next_cursor?: string | undefined;
16
+ /** Opaque cursor for the previous page. `null` on the first page. */
17
+ prev_cursor?: string | undefined;
18
+ /** Page size that produced this response. */
19
+ limit?: number | undefined;
20
+ }
21
+ export declare namespace ListResponseAssetListItem {
22
+ /** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
23
+ const Object_: {
24
+ readonly List: "list";
25
+ };
26
+ type Object_ = (typeof Object_)[keyof typeof Object_];
27
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ListResponseAssetListItem = void 0;
5
+ var ListResponseAssetListItem;
6
+ (function (ListResponseAssetListItem) {
7
+ /** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
8
+ ListResponseAssetListItem.Object_ = {
9
+ List: "list",
10
+ };
11
+ })(ListResponseAssetListItem || (exports.ListResponseAssetListItem = ListResponseAssetListItem = {}));
@@ -0,0 +1,18 @@
1
+ /**
2
+ * A short-lived ticket authorizing a single realtime (STOMP/WebSocket) connection.
3
+ */
4
+ export interface RealtimeTicket {
5
+ /** The signed ticket. Send it as `Authorization: Bearer <ticket>` on the STOMP CONNECT frame to /ws. Opaque to the client; do not parse or store it. */
6
+ ticket?: string | undefined;
7
+ /** When the ticket expires (ISO-8601). Connect promptly; mint a fresh ticket for each new connection attempt. */
8
+ expires_at?: string | undefined;
9
+ /** Object type discriminator (Stripe pattern). */
10
+ object?: RealtimeTicket.Object_ | undefined;
11
+ }
12
+ export declare namespace RealtimeTicket {
13
+ /** Object type discriminator (Stripe pattern). */
14
+ const Object_: {
15
+ readonly RealtimeTicket: "realtime_ticket";
16
+ };
17
+ type Object_ = (typeof Object_)[keyof typeof Object_];
18
+ }
@@ -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.RealtimeTicket = void 0;
5
+ var RealtimeTicket;
6
+ (function (RealtimeTicket) {
7
+ /** Object type discriminator (Stripe pattern). */
8
+ RealtimeTicket.Object_ = {
9
+ RealtimeTicket: "realtime_ticket",
10
+ };
11
+ })(RealtimeTicket || (exports.RealtimeTicket = RealtimeTicket = {}));
@@ -1,6 +1,8 @@
1
1
  export * from "./ActiveOrganization.js";
2
+ export * from "./ActivityResource.js";
2
3
  export * from "./ApiFieldError.js";
3
4
  export * from "./Asset.js";
5
+ export * from "./AssetListItem.js";
4
6
  export * from "./Assignment.js";
5
7
  export * from "./BusinessCategory.js";
6
8
  export * from "./CloseAssignmentRequest.js";
@@ -17,6 +19,8 @@ export * from "./InternalUserUpdateRequest.js";
17
19
  export * from "./Invite.js";
18
20
  export * from "./InviteUserRequest.js";
19
21
  export * from "./Language.js";
22
+ export * from "./ListResponseActivityResource.js";
23
+ export * from "./ListResponseAssetListItem.js";
20
24
  export * from "./ListResponseBusinessCategory.js";
21
25
  export * from "./ListResponseCountry.js";
22
26
  export * from "./ListResponseCurrency.js";
@@ -32,6 +36,7 @@ export * from "./OpenAssignmentRequest.js";
32
36
  export * from "./Operator.js";
33
37
  export * from "./Organization.js";
34
38
  export * from "./ProblemDetail.js";
39
+ export * from "./RealtimeTicket.js";
35
40
  export * from "./ReconcileResponse.js";
36
41
  export * from "./SetActiveOrganizationRequest.js";
37
42
  export * from "./Timezone.js";
@@ -15,8 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./ActiveOrganization.js"), exports);
18
+ __exportStar(require("./ActivityResource.js"), exports);
18
19
  __exportStar(require("./ApiFieldError.js"), exports);
19
20
  __exportStar(require("./Asset.js"), exports);
21
+ __exportStar(require("./AssetListItem.js"), exports);
20
22
  __exportStar(require("./Assignment.js"), exports);
21
23
  __exportStar(require("./BusinessCategory.js"), exports);
22
24
  __exportStar(require("./CloseAssignmentRequest.js"), exports);
@@ -33,6 +35,8 @@ __exportStar(require("./InternalUserUpdateRequest.js"), exports);
33
35
  __exportStar(require("./Invite.js"), exports);
34
36
  __exportStar(require("./InviteUserRequest.js"), exports);
35
37
  __exportStar(require("./Language.js"), exports);
38
+ __exportStar(require("./ListResponseActivityResource.js"), exports);
39
+ __exportStar(require("./ListResponseAssetListItem.js"), exports);
36
40
  __exportStar(require("./ListResponseBusinessCategory.js"), exports);
37
41
  __exportStar(require("./ListResponseCountry.js"), exports);
38
42
  __exportStar(require("./ListResponseCurrency.js"), exports);
@@ -48,6 +52,7 @@ __exportStar(require("./OpenAssignmentRequest.js"), exports);
48
52
  __exportStar(require("./Operator.js"), exports);
49
53
  __exportStar(require("./Organization.js"), exports);
50
54
  __exportStar(require("./ProblemDetail.js"), exports);
55
+ __exportStar(require("./RealtimeTicket.js"), exports);
51
56
  __exportStar(require("./ReconcileResponse.js"), exports);
52
57
  __exportStar(require("./SetActiveOrganizationRequest.js"), exports);
53
58
  __exportStar(require("./Timezone.js"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nizam-os/carrier-sdk",
3
- "version": "2.3.4",
3
+ "version": "2.4.1",
4
4
  "description": "Nizam Carrier API SDK for TypeScript / JavaScript.",
5
5
  "license": "MIT",
6
6
  "private": false,