@nizam-os/carrier-sdk 2.2.0 → 2.2.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/api/types/ActiveOrganization.d.ts +21 -0
- package/dist/api/types/ActiveOrganization.js +11 -0
- package/dist/api/types/MembershipChoice.d.ts +25 -0
- package/dist/api/types/MembershipChoice.js +16 -0
- package/dist/api/types/Organization.d.ts +1 -1
- package/dist/api/types/SetActiveOrganizationRequest.d.ts +7 -0
- package/dist/api/types/SetActiveOrganizationRequest.js +3 -0
- package/dist/api/types/index.d.ts +3 -0
- package/dist/api/types/index.js +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type * as NizamCarrier from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* The caller's resolved active organization, stored preference, and full list of memberships.
|
|
4
|
+
*/
|
|
5
|
+
export interface ActiveOrganization {
|
|
6
|
+
/** ID of the organization the request was actually scoped to. Null when the caller has no active memberships. */
|
|
7
|
+
active_organization_id?: string | undefined;
|
|
8
|
+
/** Stored preference (users.last_active_organization_id). Null when the user has never picked. */
|
|
9
|
+
preferred_organization_id?: string | undefined;
|
|
10
|
+
/** All active memberships for the picker UI. */
|
|
11
|
+
memberships?: NizamCarrier.MembershipChoice[] | undefined;
|
|
12
|
+
/** Object type discriminator (Stripe pattern). */
|
|
13
|
+
object?: ActiveOrganization.Object_ | undefined;
|
|
14
|
+
}
|
|
15
|
+
export declare namespace ActiveOrganization {
|
|
16
|
+
/** Object type discriminator (Stripe pattern). */
|
|
17
|
+
const Object_: {
|
|
18
|
+
readonly ActiveOrganization: "active_organization";
|
|
19
|
+
};
|
|
20
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
21
|
+
}
|
|
@@ -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.ActiveOrganization = void 0;
|
|
5
|
+
var ActiveOrganization;
|
|
6
|
+
(function (ActiveOrganization) {
|
|
7
|
+
/** Object type discriminator (Stripe pattern). */
|
|
8
|
+
ActiveOrganization.Object_ = {
|
|
9
|
+
ActiveOrganization: "active_organization",
|
|
10
|
+
};
|
|
11
|
+
})(ActiveOrganization || (exports.ActiveOrganization = ActiveOrganization = {}));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One of the caller's active memberships — surfaced in the organization.select_required picker body.
|
|
3
|
+
*/
|
|
4
|
+
export interface MembershipChoice {
|
|
5
|
+
/** Stable id of the organization. */
|
|
6
|
+
organization_id?: string | undefined;
|
|
7
|
+
/** URL-safe handle for the organization. */
|
|
8
|
+
slug?: string | undefined;
|
|
9
|
+
/** Display name. */
|
|
10
|
+
name?: string | undefined;
|
|
11
|
+
/** The caller's role in this organization. Lowercase enum names from MembershipRole. */
|
|
12
|
+
role?: MembershipChoice.Role | undefined;
|
|
13
|
+
}
|
|
14
|
+
export declare namespace MembershipChoice {
|
|
15
|
+
/** The caller's role in this organization. Lowercase enum names from MembershipRole. */
|
|
16
|
+
const Role: {
|
|
17
|
+
readonly Admin: "admin";
|
|
18
|
+
readonly Dispatcher: "dispatcher";
|
|
19
|
+
readonly Manager: "manager";
|
|
20
|
+
readonly Staff: "staff";
|
|
21
|
+
readonly Viewer: "viewer";
|
|
22
|
+
readonly BillingAdmin: "billing_admin";
|
|
23
|
+
};
|
|
24
|
+
type Role = (typeof Role)[keyof typeof Role];
|
|
25
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.MembershipChoice = void 0;
|
|
5
|
+
var MembershipChoice;
|
|
6
|
+
(function (MembershipChoice) {
|
|
7
|
+
/** The caller's role in this organization. Lowercase enum names from MembershipRole. */
|
|
8
|
+
MembershipChoice.Role = {
|
|
9
|
+
Admin: "admin",
|
|
10
|
+
Dispatcher: "dispatcher",
|
|
11
|
+
Manager: "manager",
|
|
12
|
+
Staff: "staff",
|
|
13
|
+
Viewer: "viewer",
|
|
14
|
+
BillingAdmin: "billing_admin",
|
|
15
|
+
};
|
|
16
|
+
})(MembershipChoice || (exports.MembershipChoice = MembershipChoice = {}));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* A tenant — a logistics company, 3PL, or LSP.
|
|
3
3
|
*/
|
|
4
4
|
export interface Organization {
|
|
5
|
-
/** Stable UUID.
|
|
5
|
+
/** Stable UUID owned by Nizam. Pin this value in URLs and external integrations. The matching Keycloak Organization is tracked server-side via a separate keycloak_id bridge and is not exposed over the SDK; do not assume the two ids are equal. */
|
|
6
6
|
id?: string | undefined;
|
|
7
7
|
/** Display name. */
|
|
8
8
|
name?: string | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request body for setting the caller's preferred active organization. The slug must name an organization the caller is currently an active member of.
|
|
3
|
+
*/
|
|
4
|
+
export interface SetActiveOrganizationRequest {
|
|
5
|
+
/** Slug of the organization to make active. Must match an active membership. */
|
|
6
|
+
slug: string;
|
|
7
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from "./ActiveOrganization.js";
|
|
1
2
|
export * from "./ApiFieldError.js";
|
|
2
3
|
export * from "./Asset.js";
|
|
3
4
|
export * from "./Assignment.js";
|
|
@@ -24,10 +25,12 @@ export * from "./ListResponseMembership.js";
|
|
|
24
25
|
export * from "./ListResponseTimezone.js";
|
|
25
26
|
export * from "./ListResponseUserResource.js";
|
|
26
27
|
export * from "./Membership.js";
|
|
28
|
+
export * from "./MembershipChoice.js";
|
|
27
29
|
export * from "./OpenAssignmentRequest.js";
|
|
28
30
|
export * from "./Operator.js";
|
|
29
31
|
export * from "./Organization.js";
|
|
30
32
|
export * from "./ProblemDetail.js";
|
|
33
|
+
export * from "./SetActiveOrganizationRequest.js";
|
|
31
34
|
export * from "./Timezone.js";
|
|
32
35
|
export * from "./UpdateOrganizationRequest.js";
|
|
33
36
|
export * from "./User.js";
|
package/dist/api/types/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ActiveOrganization.js"), exports);
|
|
17
18
|
__exportStar(require("./ApiFieldError.js"), exports);
|
|
18
19
|
__exportStar(require("./Asset.js"), exports);
|
|
19
20
|
__exportStar(require("./Assignment.js"), exports);
|
|
@@ -40,10 +41,12 @@ __exportStar(require("./ListResponseMembership.js"), exports);
|
|
|
40
41
|
__exportStar(require("./ListResponseTimezone.js"), exports);
|
|
41
42
|
__exportStar(require("./ListResponseUserResource.js"), exports);
|
|
42
43
|
__exportStar(require("./Membership.js"), exports);
|
|
44
|
+
__exportStar(require("./MembershipChoice.js"), exports);
|
|
43
45
|
__exportStar(require("./OpenAssignmentRequest.js"), exports);
|
|
44
46
|
__exportStar(require("./Operator.js"), exports);
|
|
45
47
|
__exportStar(require("./Organization.js"), exports);
|
|
46
48
|
__exportStar(require("./ProblemDetail.js"), exports);
|
|
49
|
+
__exportStar(require("./SetActiveOrganizationRequest.js"), exports);
|
|
47
50
|
__exportStar(require("./Timezone.js"), exports);
|
|
48
51
|
__exportStar(require("./UpdateOrganizationRequest.js"), exports);
|
|
49
52
|
__exportStar(require("./User.js"), exports);
|