@nizam-os/carrier-sdk 2.4.0 → 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.
@@ -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,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 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 = {}));
@@ -2,6 +2,7 @@ export * from "./ActiveOrganization.js";
2
2
  export * from "./ActivityResource.js";
3
3
  export * from "./ApiFieldError.js";
4
4
  export * from "./Asset.js";
5
+ export * from "./AssetListItem.js";
5
6
  export * from "./Assignment.js";
6
7
  export * from "./BusinessCategory.js";
7
8
  export * from "./CloseAssignmentRequest.js";
@@ -19,6 +20,7 @@ export * from "./Invite.js";
19
20
  export * from "./InviteUserRequest.js";
20
21
  export * from "./Language.js";
21
22
  export * from "./ListResponseActivityResource.js";
23
+ export * from "./ListResponseAssetListItem.js";
22
24
  export * from "./ListResponseBusinessCategory.js";
23
25
  export * from "./ListResponseCountry.js";
24
26
  export * from "./ListResponseCurrency.js";
@@ -18,6 +18,7 @@ __exportStar(require("./ActiveOrganization.js"), exports);
18
18
  __exportStar(require("./ActivityResource.js"), exports);
19
19
  __exportStar(require("./ApiFieldError.js"), exports);
20
20
  __exportStar(require("./Asset.js"), exports);
21
+ __exportStar(require("./AssetListItem.js"), exports);
21
22
  __exportStar(require("./Assignment.js"), exports);
22
23
  __exportStar(require("./BusinessCategory.js"), exports);
23
24
  __exportStar(require("./CloseAssignmentRequest.js"), exports);
@@ -35,6 +36,7 @@ __exportStar(require("./Invite.js"), exports);
35
36
  __exportStar(require("./InviteUserRequest.js"), exports);
36
37
  __exportStar(require("./Language.js"), exports);
37
38
  __exportStar(require("./ListResponseActivityResource.js"), exports);
39
+ __exportStar(require("./ListResponseAssetListItem.js"), exports);
38
40
  __exportStar(require("./ListResponseBusinessCategory.js"), exports);
39
41
  __exportStar(require("./ListResponseCountry.js"), exports);
40
42
  __exportStar(require("./ListResponseCurrency.js"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nizam-os/carrier-sdk",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "Nizam Carrier API SDK for TypeScript / JavaScript.",
5
5
  "license": "MIT",
6
6
  "private": false,