@chrt-inc/typescript-sdk 1.661.0 → 1.662.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 (48) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/orgs/client/Client.d.ts +1 -1
  3. package/dist/cjs/api/resources/orgs/client/Client.js +1 -1
  4. package/dist/cjs/api/resources/orgs/resources/orgProfiles/client/Client.d.ts +1 -1
  5. package/dist/cjs/api/resources/orgs/resources/orgProfiles/client/Client.js +1 -1
  6. package/dist/cjs/api/types/Caller.d.ts +4 -3
  7. package/dist/cjs/api/types/CallerCredentialTypeEnum.d.ts +2 -1
  8. package/dist/cjs/api/types/CallerCredentialTypeEnum.js +1 -0
  9. package/dist/cjs/api/types/InternalDelegationTokenReq.d.ts +9 -0
  10. package/dist/cjs/api/types/InternalDelegationTokenRes.d.ts +6 -0
  11. package/dist/cjs/api/types/InternalDelegationTokenRes.js +5 -0
  12. package/dist/cjs/api/types/OrgInfoResponse.d.ts +5 -5
  13. package/dist/cjs/api/types/OrgRoleEnum.d.ts +7 -13
  14. package/dist/cjs/api/types/OrgRoleEnum.js +2 -2
  15. package/dist/cjs/api/types/UserPrivateData1.d.ts +1 -0
  16. package/dist/cjs/api/types/WorkflowActorContext.d.ts +14 -0
  17. package/dist/cjs/api/types/WorkflowActorContext.js +5 -0
  18. package/dist/cjs/api/types/index.d.ts +3 -1
  19. package/dist/cjs/api/types/index.js +3 -1
  20. package/dist/cjs/version.d.ts +1 -1
  21. package/dist/cjs/version.js +1 -1
  22. package/dist/esm/Client.mjs +2 -2
  23. package/dist/esm/api/resources/orgs/client/Client.d.mts +1 -1
  24. package/dist/esm/api/resources/orgs/client/Client.mjs +1 -1
  25. package/dist/esm/api/resources/orgs/resources/orgProfiles/client/Client.d.mts +1 -1
  26. package/dist/esm/api/resources/orgs/resources/orgProfiles/client/Client.mjs +1 -1
  27. package/dist/esm/api/types/Caller.d.mts +4 -3
  28. package/dist/esm/api/types/CallerCredentialTypeEnum.d.mts +2 -1
  29. package/dist/esm/api/types/CallerCredentialTypeEnum.mjs +1 -0
  30. package/dist/esm/api/types/InternalDelegationTokenReq.d.mts +9 -0
  31. package/dist/esm/api/types/InternalDelegationTokenRes.d.mts +6 -0
  32. package/dist/esm/api/types/InternalDelegationTokenRes.mjs +4 -0
  33. package/dist/esm/api/types/OrgInfoResponse.d.mts +5 -5
  34. package/dist/esm/api/types/OrgRoleEnum.d.mts +7 -13
  35. package/dist/esm/api/types/OrgRoleEnum.mjs +2 -2
  36. package/dist/esm/api/types/UserPrivateData1.d.mts +1 -0
  37. package/dist/esm/api/types/WorkflowActorContext.d.mts +14 -0
  38. package/dist/esm/api/types/WorkflowActorContext.mjs +4 -0
  39. package/dist/esm/api/types/index.d.mts +3 -1
  40. package/dist/esm/api/types/index.mjs +3 -1
  41. package/dist/esm/version.d.mts +1 -1
  42. package/dist/esm/version.mjs +1 -1
  43. package/package.json +1 -1
  44. package/reference.md +2 -2
  45. package/dist/cjs/api/types/ClerkOrgData.d.ts +0 -12
  46. package/dist/esm/api/types/ClerkOrgData.d.mts +0 -12
  47. /package/dist/cjs/api/types/{ClerkOrgData.js → InternalDelegationTokenReq.js} +0 -0
  48. /package/dist/esm/api/types/{ClerkOrgData.mjs → InternalDelegationTokenReq.mjs} +0 -0
@@ -56,8 +56,8 @@ class ChrtClient {
56
56
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
57
57
  "X-Fern-Language": "JavaScript",
58
58
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
59
- "X-Fern-SDK-Version": "1.661.0",
60
- "User-Agent": "@chrt-inc/typescript-sdk/1.661.0",
59
+ "X-Fern-SDK-Version": "1.662.0",
60
+ "User-Agent": "@chrt-inc/typescript-sdk/1.662.0",
61
61
  "X-Fern-Runtime": core.RUNTIME.type,
62
62
  "X-Fern-Runtime-Version": core.RUNTIME.version,
63
63
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -81,7 +81,7 @@ export declare class Orgs {
81
81
  listMembersV1(request?: Chrt.OrgsListMembersV1Request, requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<Chrt.OrgMemberListRes>;
82
82
  private __listMembersV1;
83
83
  /**
84
- * Single onboarding entry point. Sets `org_type` in Clerk's JWT public metadata (immutable once set) and idempotently creates `org_private_data` + `org_public_data` for the caller's organization. Optional `handle` and `company_name` populate the public doc on first call; later updates go through PATCH /orgs/org_public_data/v1. Returns True on success (including idempotent retries), 400 on org_type conflict or handle collision. | (SetupOrgReq) -> (bool)
84
+ * Single onboarding entry point. Sets `org_type` in WorkOS JWT metadata (immutable once set) and idempotently creates `org_private_data` + `org_public_data` for the caller's organization. Optional `handle` and `company_name` populate the public doc on first call; later updates go through PATCH /orgs/org_public_data/v1. Returns True on success (including idempotent retries), 400 on org_type conflict or handle collision. | (SetupOrgReq) -> (bool)
85
85
  *
86
86
  * @param {Chrt.SetupOrgReq} request
87
87
  * @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
@@ -232,7 +232,7 @@ class Orgs {
232
232
  });
233
233
  }
234
234
  /**
235
- * Single onboarding entry point. Sets `org_type` in Clerk's JWT public metadata (immutable once set) and idempotently creates `org_private_data` + `org_public_data` for the caller's organization. Optional `handle` and `company_name` populate the public doc on first call; later updates go through PATCH /orgs/org_public_data/v1. Returns True on success (including idempotent retries), 400 on org_type conflict or handle collision. | (SetupOrgReq) -> (bool)
235
+ * Single onboarding entry point. Sets `org_type` in WorkOS JWT metadata (immutable once set) and idempotently creates `org_private_data` + `org_public_data` for the caller's organization. Optional `handle` and `company_name` populate the public doc on first call; later updates go through PATCH /orgs/org_public_data/v1. Returns True on success (including idempotent retries), 400 on org_type conflict or handle collision. | (SetupOrgReq) -> (bool)
236
236
  *
237
237
  * @param {Chrt.SetupOrgReq} request
238
238
  * @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
@@ -85,7 +85,7 @@ export declare class OrgProfiles {
85
85
  getByHandleV1(handle: string, requestOptions?: OrgProfiles.RequestOptions): core.HttpResponsePromise<Chrt.ProviderOrgProfile1>;
86
86
  private __getByHandleV1;
87
87
  /**
88
- * Returns the organization avatar image URL from Clerk or a placeholder if not found. | () -> (str)
88
+ * Returns the organization avatar image URL from WorkOS or a placeholder if not found. | () -> (str)
89
89
  *
90
90
  * @param {string} handle
91
91
  * @param {OrgProfiles.RequestOptions} requestOptions - Request-specific configuration.
@@ -295,7 +295,7 @@ class OrgProfiles {
295
295
  });
296
296
  }
297
297
  /**
298
- * Returns the organization avatar image URL from Clerk or a placeholder if not found. | () -> (str)
298
+ * Returns the organization avatar image URL from WorkOS or a placeholder if not found. | () -> (str)
299
299
  *
300
300
  * @param {string} handle
301
301
  * @param {OrgProfiles.RequestOptions} requestOptions - Request-specific configuration.
@@ -5,11 +5,12 @@ import * as Chrt from "../index.js";
5
5
  export interface Caller {
6
6
  credential_type: Chrt.CallerCredentialTypeEnum;
7
7
  credential?: string | null;
8
- o: Chrt.ClerkOrgData;
9
8
  /** Must be a string starting with `user_` */
10
9
  user_id: string;
11
10
  /** Must be a string starting with `org_` */
12
11
  org_id: string;
13
- org_public_metadata?: Record<string, unknown> | null;
14
- primary_email_address?: string | null;
12
+ org_role?: Chrt.OrgRoleEnum | null;
13
+ org_type?: Chrt.OrgTypeEnum | null;
14
+ org_subscription?: boolean | null;
15
+ user_email?: string | null;
15
16
  }
@@ -1,9 +1,10 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type CallerCredentialTypeEnum = "session_jwt" | "m2m_jwt" | "api_key";
4
+ export type CallerCredentialTypeEnum = "session_jwt" | "m2m_jwt" | "api_key" | "internal_delegation_jwt";
5
5
  export declare const CallerCredentialTypeEnum: {
6
6
  readonly SessionJwt: "session_jwt";
7
7
  readonly M2MJwt: "m2m_jwt";
8
8
  readonly ApiKey: "api_key";
9
+ readonly InternalDelegationJwt: "internal_delegation_jwt";
9
10
  };
@@ -8,4 +8,5 @@ exports.CallerCredentialTypeEnum = {
8
8
  SessionJwt: "session_jwt",
9
9
  M2MJwt: "m2m_jwt",
10
10
  ApiKey: "api_key",
11
+ InternalDelegationJwt: "internal_delegation_jwt",
11
12
  };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.js";
5
+ export interface InternalDelegationTokenReq {
6
+ sts_presigned_url: string;
7
+ actor: Chrt.WorkflowActorContext;
8
+ expires_in_seconds: number;
9
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface InternalDelegationTokenRes {
5
+ access_token: string;
6
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,11 +7,11 @@ export interface OrgInfoResponse {
7
7
  name: string;
8
8
  slug?: string | null;
9
9
  image_url?: string | null;
10
- has_image: boolean;
10
+ has_image?: boolean;
11
11
  members_count?: number | null;
12
- max_allowed_memberships: number;
13
- admin_delete_enabled: boolean;
12
+ max_allowed_memberships?: number;
13
+ admin_delete_enabled?: boolean;
14
14
  public_metadata: Record<string, unknown>;
15
- created_at: number;
16
- updated_at: number;
15
+ created_at?: number | null;
16
+ updated_at?: number | null;
17
17
  }
@@ -2,28 +2,22 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  /**
5
- * Organization roles used by Clerk in `jwt.o.rol` field
5
+ * Organization roles used in authenticated caller claims.
6
6
  *
7
7
  * Hierarchy (highest to lowest):
8
- * owner > administrator > operator > driver
8
+ * owner > admin > operator > member
9
9
  *
10
10
  * Role availability by org type:
11
- * {owner, administrator, operator} → PROVIDER | SHIPPER
12
- * {driver} → PROVIDER only
11
+ * {owner, admin, operator, member} → PROVIDER | SHIPPER
13
12
  *
14
13
  * Note: Hierarchical enforcement depends on utils_shipping_authz helper functions.
15
14
  *
16
- * Clerk dashboard with roles settings:
17
- * - prod: https://dashboard.clerk.com/apps/app_2rDeFYQ7SBioYoMhG38FgirTE4Q/instances/ins_2rDmMgzRGFXd6Ml6N8eV8pOXeyI/organizations-settings/roles
18
- * - dev: https://dashboard.clerk.com/apps/app_2rDeFYQ7SBioYoMhG38FgirTE4Q/instances/ins_2rDeFZFEZ3nIC9VQt3zYfvzL14Z/organizations-settings/roles
19
- *
20
- * Clerk requires the "org:" prefix when calling its API, but we store without it.
21
- * When sending to Clerk, prepend "org:" to the enum value.
15
+ * WorkOS role slugs match these enum values.
22
16
  */
23
- export type OrgRoleEnum = "owner" | "administrator" | "operator" | "driver";
17
+ export type OrgRoleEnum = "owner" | "admin" | "operator" | "member";
24
18
  export declare const OrgRoleEnum: {
25
19
  readonly Owner: "owner";
26
- readonly Administrator: "administrator";
20
+ readonly Admin: "admin";
27
21
  readonly Operator: "operator";
28
- readonly Driver: "driver";
22
+ readonly Member: "member";
29
23
  };
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.OrgRoleEnum = void 0;
7
7
  exports.OrgRoleEnum = {
8
8
  Owner: "owner",
9
- Administrator: "administrator",
9
+ Admin: "admin",
10
10
  Operator: "operator",
11
- Driver: "driver",
11
+ Member: "member",
12
12
  };
@@ -5,6 +5,7 @@ import * as Chrt from "../index.js";
5
5
  export interface UserPrivateData1 {
6
6
  schema_version: number;
7
7
  created_at_timestamp: string;
8
+ /** Must be a string starting with `user_` */
8
9
  user_id: string;
9
10
  primary_email_address?: string | null;
10
11
  phone_number?: string | null;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.js";
5
+ export interface WorkflowActorContext {
6
+ /** Must be a string starting with `user_` */
7
+ user_id: string;
8
+ /** Must be a string starting with `org_` */
9
+ org_id: string;
10
+ org_type: Chrt.OrgTypeEnum;
11
+ org_role?: Chrt.OrgRoleEnum | null;
12
+ org_subscription?: boolean | null;
13
+ user_email?: string | null;
14
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -98,7 +98,6 @@ export * from "./ChampQuantity.js";
98
98
  export * from "./ChrtGroundProviderRateSheet1.js";
99
99
  export * from "./ChrtGroundProviderRateSheetListRes.js";
100
100
  export * from "./ChrtGroundProviderTaskActionEnum1.js";
101
- export * from "./ClerkOrgData.js";
102
101
  export * from "./CreateCheckoutSessionRes.js";
103
102
  export * from "./CreateConnectionReq.js";
104
103
  export * from "./CreateCustomerPortalSessionRes.js";
@@ -134,6 +133,8 @@ export * from "./FlightStatusEnum.js";
134
133
  export * from "./GeometryCollectionGeometriesItem.js";
135
134
  export * from "./GeometryCollection.js";
136
135
  export * from "./HttpValidationError.js";
136
+ export * from "./InternalDelegationTokenReq.js";
137
+ export * from "./InternalDelegationTokenRes.js";
137
138
  export * from "./LineItem1.js";
138
139
  export * from "./LineItemClientCreate1.js";
139
140
  export * from "./LineItemEnum1.js";
@@ -368,3 +369,4 @@ export * from "./WebcargoSegment.js";
368
369
  export * from "./WebcargoShipment.js";
369
370
  export * from "./WebcargoValueWithUnit.js";
370
371
  export * from "./WebhookAppPortalAccessRes.js";
372
+ export * from "./WorkflowActorContext.js";
@@ -114,7 +114,6 @@ __exportStar(require("./ChampQuantity.js"), exports);
114
114
  __exportStar(require("./ChrtGroundProviderRateSheet1.js"), exports);
115
115
  __exportStar(require("./ChrtGroundProviderRateSheetListRes.js"), exports);
116
116
  __exportStar(require("./ChrtGroundProviderTaskActionEnum1.js"), exports);
117
- __exportStar(require("./ClerkOrgData.js"), exports);
118
117
  __exportStar(require("./CreateCheckoutSessionRes.js"), exports);
119
118
  __exportStar(require("./CreateConnectionReq.js"), exports);
120
119
  __exportStar(require("./CreateCustomerPortalSessionRes.js"), exports);
@@ -150,6 +149,8 @@ __exportStar(require("./FlightStatusEnum.js"), exports);
150
149
  __exportStar(require("./GeometryCollectionGeometriesItem.js"), exports);
151
150
  __exportStar(require("./GeometryCollection.js"), exports);
152
151
  __exportStar(require("./HttpValidationError.js"), exports);
152
+ __exportStar(require("./InternalDelegationTokenReq.js"), exports);
153
+ __exportStar(require("./InternalDelegationTokenRes.js"), exports);
153
154
  __exportStar(require("./LineItem1.js"), exports);
154
155
  __exportStar(require("./LineItemClientCreate1.js"), exports);
155
156
  __exportStar(require("./LineItemEnum1.js"), exports);
@@ -384,3 +385,4 @@ __exportStar(require("./WebcargoSegment.js"), exports);
384
385
  __exportStar(require("./WebcargoShipment.js"), exports);
385
386
  __exportStar(require("./WebcargoValueWithUnit.js"), exports);
386
387
  __exportStar(require("./WebhookAppPortalAccessRes.js"), exports);
388
+ __exportStar(require("./WorkflowActorContext.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.661.0";
1
+ export declare const SDK_VERSION = "1.662.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.661.0";
4
+ exports.SDK_VERSION = "1.662.0";
@@ -20,8 +20,8 @@ export class ChrtClient {
20
20
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
21
21
  "X-Fern-Language": "JavaScript",
22
22
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
23
- "X-Fern-SDK-Version": "1.661.0",
24
- "User-Agent": "@chrt-inc/typescript-sdk/1.661.0",
23
+ "X-Fern-SDK-Version": "1.662.0",
24
+ "User-Agent": "@chrt-inc/typescript-sdk/1.662.0",
25
25
  "X-Fern-Runtime": core.RUNTIME.type,
26
26
  "X-Fern-Runtime-Version": core.RUNTIME.version,
27
27
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -81,7 +81,7 @@ export declare class Orgs {
81
81
  listMembersV1(request?: Chrt.OrgsListMembersV1Request, requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<Chrt.OrgMemberListRes>;
82
82
  private __listMembersV1;
83
83
  /**
84
- * Single onboarding entry point. Sets `org_type` in Clerk's JWT public metadata (immutable once set) and idempotently creates `org_private_data` + `org_public_data` for the caller's organization. Optional `handle` and `company_name` populate the public doc on first call; later updates go through PATCH /orgs/org_public_data/v1. Returns True on success (including idempotent retries), 400 on org_type conflict or handle collision. | (SetupOrgReq) -> (bool)
84
+ * Single onboarding entry point. Sets `org_type` in WorkOS JWT metadata (immutable once set) and idempotently creates `org_private_data` + `org_public_data` for the caller's organization. Optional `handle` and `company_name` populate the public doc on first call; later updates go through PATCH /orgs/org_public_data/v1. Returns True on success (including idempotent retries), 400 on org_type conflict or handle collision. | (SetupOrgReq) -> (bool)
85
85
  *
86
86
  * @param {Chrt.SetupOrgReq} request
87
87
  * @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
@@ -196,7 +196,7 @@ export class Orgs {
196
196
  });
197
197
  }
198
198
  /**
199
- * Single onboarding entry point. Sets `org_type` in Clerk's JWT public metadata (immutable once set) and idempotently creates `org_private_data` + `org_public_data` for the caller's organization. Optional `handle` and `company_name` populate the public doc on first call; later updates go through PATCH /orgs/org_public_data/v1. Returns True on success (including idempotent retries), 400 on org_type conflict or handle collision. | (SetupOrgReq) -> (bool)
199
+ * Single onboarding entry point. Sets `org_type` in WorkOS JWT metadata (immutable once set) and idempotently creates `org_private_data` + `org_public_data` for the caller's organization. Optional `handle` and `company_name` populate the public doc on first call; later updates go through PATCH /orgs/org_public_data/v1. Returns True on success (including idempotent retries), 400 on org_type conflict or handle collision. | (SetupOrgReq) -> (bool)
200
200
  *
201
201
  * @param {Chrt.SetupOrgReq} request
202
202
  * @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
@@ -85,7 +85,7 @@ export declare class OrgProfiles {
85
85
  getByHandleV1(handle: string, requestOptions?: OrgProfiles.RequestOptions): core.HttpResponsePromise<Chrt.ProviderOrgProfile1>;
86
86
  private __getByHandleV1;
87
87
  /**
88
- * Returns the organization avatar image URL from Clerk or a placeholder if not found. | () -> (str)
88
+ * Returns the organization avatar image URL from WorkOS or a placeholder if not found. | () -> (str)
89
89
  *
90
90
  * @param {string} handle
91
91
  * @param {OrgProfiles.RequestOptions} requestOptions - Request-specific configuration.
@@ -259,7 +259,7 @@ export class OrgProfiles {
259
259
  });
260
260
  }
261
261
  /**
262
- * Returns the organization avatar image URL from Clerk or a placeholder if not found. | () -> (str)
262
+ * Returns the organization avatar image URL from WorkOS or a placeholder if not found. | () -> (str)
263
263
  *
264
264
  * @param {string} handle
265
265
  * @param {OrgProfiles.RequestOptions} requestOptions - Request-specific configuration.
@@ -5,11 +5,12 @@ import * as Chrt from "../index.mjs";
5
5
  export interface Caller {
6
6
  credential_type: Chrt.CallerCredentialTypeEnum;
7
7
  credential?: string | null;
8
- o: Chrt.ClerkOrgData;
9
8
  /** Must be a string starting with `user_` */
10
9
  user_id: string;
11
10
  /** Must be a string starting with `org_` */
12
11
  org_id: string;
13
- org_public_metadata?: Record<string, unknown> | null;
14
- primary_email_address?: string | null;
12
+ org_role?: Chrt.OrgRoleEnum | null;
13
+ org_type?: Chrt.OrgTypeEnum | null;
14
+ org_subscription?: boolean | null;
15
+ user_email?: string | null;
15
16
  }
@@ -1,9 +1,10 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type CallerCredentialTypeEnum = "session_jwt" | "m2m_jwt" | "api_key";
4
+ export type CallerCredentialTypeEnum = "session_jwt" | "m2m_jwt" | "api_key" | "internal_delegation_jwt";
5
5
  export declare const CallerCredentialTypeEnum: {
6
6
  readonly SessionJwt: "session_jwt";
7
7
  readonly M2MJwt: "m2m_jwt";
8
8
  readonly ApiKey: "api_key";
9
+ readonly InternalDelegationJwt: "internal_delegation_jwt";
9
10
  };
@@ -5,4 +5,5 @@ export const CallerCredentialTypeEnum = {
5
5
  SessionJwt: "session_jwt",
6
6
  M2MJwt: "m2m_jwt",
7
7
  ApiKey: "api_key",
8
+ InternalDelegationJwt: "internal_delegation_jwt",
8
9
  };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.mjs";
5
+ export interface InternalDelegationTokenReq {
6
+ sts_presigned_url: string;
7
+ actor: Chrt.WorkflowActorContext;
8
+ expires_in_seconds: number;
9
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface InternalDelegationTokenRes {
5
+ access_token: string;
6
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -7,11 +7,11 @@ export interface OrgInfoResponse {
7
7
  name: string;
8
8
  slug?: string | null;
9
9
  image_url?: string | null;
10
- has_image: boolean;
10
+ has_image?: boolean;
11
11
  members_count?: number | null;
12
- max_allowed_memberships: number;
13
- admin_delete_enabled: boolean;
12
+ max_allowed_memberships?: number;
13
+ admin_delete_enabled?: boolean;
14
14
  public_metadata: Record<string, unknown>;
15
- created_at: number;
16
- updated_at: number;
15
+ created_at?: number | null;
16
+ updated_at?: number | null;
17
17
  }
@@ -2,28 +2,22 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  /**
5
- * Organization roles used by Clerk in `jwt.o.rol` field
5
+ * Organization roles used in authenticated caller claims.
6
6
  *
7
7
  * Hierarchy (highest to lowest):
8
- * owner > administrator > operator > driver
8
+ * owner > admin > operator > member
9
9
  *
10
10
  * Role availability by org type:
11
- * {owner, administrator, operator} → PROVIDER | SHIPPER
12
- * {driver} → PROVIDER only
11
+ * {owner, admin, operator, member} → PROVIDER | SHIPPER
13
12
  *
14
13
  * Note: Hierarchical enforcement depends on utils_shipping_authz helper functions.
15
14
  *
16
- * Clerk dashboard with roles settings:
17
- * - prod: https://dashboard.clerk.com/apps/app_2rDeFYQ7SBioYoMhG38FgirTE4Q/instances/ins_2rDmMgzRGFXd6Ml6N8eV8pOXeyI/organizations-settings/roles
18
- * - dev: https://dashboard.clerk.com/apps/app_2rDeFYQ7SBioYoMhG38FgirTE4Q/instances/ins_2rDeFZFEZ3nIC9VQt3zYfvzL14Z/organizations-settings/roles
19
- *
20
- * Clerk requires the "org:" prefix when calling its API, but we store without it.
21
- * When sending to Clerk, prepend "org:" to the enum value.
15
+ * WorkOS role slugs match these enum values.
22
16
  */
23
- export type OrgRoleEnum = "owner" | "administrator" | "operator" | "driver";
17
+ export type OrgRoleEnum = "owner" | "admin" | "operator" | "member";
24
18
  export declare const OrgRoleEnum: {
25
19
  readonly Owner: "owner";
26
- readonly Administrator: "administrator";
20
+ readonly Admin: "admin";
27
21
  readonly Operator: "operator";
28
- readonly Driver: "driver";
22
+ readonly Member: "member";
29
23
  };
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const OrgRoleEnum = {
5
5
  Owner: "owner",
6
- Administrator: "administrator",
6
+ Admin: "admin",
7
7
  Operator: "operator",
8
- Driver: "driver",
8
+ Member: "member",
9
9
  };
@@ -5,6 +5,7 @@ import * as Chrt from "../index.mjs";
5
5
  export interface UserPrivateData1 {
6
6
  schema_version: number;
7
7
  created_at_timestamp: string;
8
+ /** Must be a string starting with `user_` */
8
9
  user_id: string;
9
10
  primary_email_address?: string | null;
10
11
  phone_number?: string | null;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.mjs";
5
+ export interface WorkflowActorContext {
6
+ /** Must be a string starting with `user_` */
7
+ user_id: string;
8
+ /** Must be a string starting with `org_` */
9
+ org_id: string;
10
+ org_type: Chrt.OrgTypeEnum;
11
+ org_role?: Chrt.OrgRoleEnum | null;
12
+ org_subscription?: boolean | null;
13
+ user_email?: string | null;
14
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -98,7 +98,6 @@ export * from "./ChampQuantity.mjs";
98
98
  export * from "./ChrtGroundProviderRateSheet1.mjs";
99
99
  export * from "./ChrtGroundProviderRateSheetListRes.mjs";
100
100
  export * from "./ChrtGroundProviderTaskActionEnum1.mjs";
101
- export * from "./ClerkOrgData.mjs";
102
101
  export * from "./CreateCheckoutSessionRes.mjs";
103
102
  export * from "./CreateConnectionReq.mjs";
104
103
  export * from "./CreateCustomerPortalSessionRes.mjs";
@@ -134,6 +133,8 @@ export * from "./FlightStatusEnum.mjs";
134
133
  export * from "./GeometryCollectionGeometriesItem.mjs";
135
134
  export * from "./GeometryCollection.mjs";
136
135
  export * from "./HttpValidationError.mjs";
136
+ export * from "./InternalDelegationTokenReq.mjs";
137
+ export * from "./InternalDelegationTokenRes.mjs";
137
138
  export * from "./LineItem1.mjs";
138
139
  export * from "./LineItemClientCreate1.mjs";
139
140
  export * from "./LineItemEnum1.mjs";
@@ -368,3 +369,4 @@ export * from "./WebcargoSegment.mjs";
368
369
  export * from "./WebcargoShipment.mjs";
369
370
  export * from "./WebcargoValueWithUnit.mjs";
370
371
  export * from "./WebhookAppPortalAccessRes.mjs";
372
+ export * from "./WorkflowActorContext.mjs";
@@ -98,7 +98,6 @@ export * from "./ChampQuantity.mjs";
98
98
  export * from "./ChrtGroundProviderRateSheet1.mjs";
99
99
  export * from "./ChrtGroundProviderRateSheetListRes.mjs";
100
100
  export * from "./ChrtGroundProviderTaskActionEnum1.mjs";
101
- export * from "./ClerkOrgData.mjs";
102
101
  export * from "./CreateCheckoutSessionRes.mjs";
103
102
  export * from "./CreateConnectionReq.mjs";
104
103
  export * from "./CreateCustomerPortalSessionRes.mjs";
@@ -134,6 +133,8 @@ export * from "./FlightStatusEnum.mjs";
134
133
  export * from "./GeometryCollectionGeometriesItem.mjs";
135
134
  export * from "./GeometryCollection.mjs";
136
135
  export * from "./HttpValidationError.mjs";
136
+ export * from "./InternalDelegationTokenReq.mjs";
137
+ export * from "./InternalDelegationTokenRes.mjs";
137
138
  export * from "./LineItem1.mjs";
138
139
  export * from "./LineItemClientCreate1.mjs";
139
140
  export * from "./LineItemEnum1.mjs";
@@ -368,3 +369,4 @@ export * from "./WebcargoSegment.mjs";
368
369
  export * from "./WebcargoShipment.mjs";
369
370
  export * from "./WebcargoValueWithUnit.mjs";
370
371
  export * from "./WebhookAppPortalAccessRes.mjs";
372
+ export * from "./WorkflowActorContext.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.661.0";
1
+ export declare const SDK_VERSION = "1.662.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.661.0";
1
+ export const SDK_VERSION = "1.662.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrt-inc/typescript-sdk",
3
- "version": "1.661.0",
3
+ "version": "1.662.0",
4
4
  "private": false,
5
5
  "repository": "github:chrt-inc/typescript-sdk",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -138,7 +138,7 @@ await client.orgs.listMembersV1({
138
138
  <dl>
139
139
  <dd>
140
140
 
141
- Single onboarding entry point. Sets `org_type` in Clerk's JWT public metadata (immutable once set) and idempotently creates `org_private_data` + `org_public_data` for the caller's organization. Optional `handle` and `company_name` populate the public doc on first call; later updates go through PATCH /orgs/org_public_data/v1. Returns True on success (including idempotent retries), 400 on org_type conflict or handle collision. | (SetupOrgReq) -> (bool)
141
+ Single onboarding entry point. Sets `org_type` in WorkOS JWT metadata (immutable once set) and idempotently creates `org_private_data` + `org_public_data` for the caller's organization. Optional `handle` and `company_name` populate the public doc on first call; later updates go through PATCH /orgs/org_public_data/v1. Returns True on success (including idempotent retries), 400 on org_type conflict or handle collision. | (SetupOrgReq) -> (bool)
142
142
 
143
143
  </dd>
144
144
  </dl>
@@ -13181,7 +13181,7 @@ await client.orgs.orgProfiles.getByHandleV1("handle");
13181
13181
  <dl>
13182
13182
  <dd>
13183
13183
 
13184
- Returns the organization avatar image URL from Clerk or a placeholder if not found. | () -> (str)
13184
+ Returns the organization avatar image URL from WorkOS or a placeholder if not found. | () -> (str)
13185
13185
 
13186
13186
  </dd>
13187
13187
  </dl>
@@ -1,12 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as Chrt from "../index.js";
5
- export interface ClerkOrgData {
6
- /** Must be a string starting with `org_` */
7
- id?: string | null;
8
- rol?: Chrt.OrgRoleEnum | null;
9
- slg?: string | null;
10
- /** Accepts any additional properties */
11
- [key: string]: any;
12
- }
@@ -1,12 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as Chrt from "../index.mjs";
5
- export interface ClerkOrgData {
6
- /** Must be a string starting with `org_` */
7
- id?: string | null;
8
- rol?: Chrt.OrgRoleEnum | null;
9
- slg?: string | null;
10
- /** Accepts any additional properties */
11
- [key: string]: any;
12
- }