@cubist-labs/cubesigner-sdk 0.4.268 → 0.4.269

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/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "git+https://github.com/cubist-labs/CubeSigner-TypeScript-SDK.git",
6
6
  "directory": "packages/sdk"
7
7
  },
8
- "version": "0.4.268",
8
+ "version": "0.4.269",
9
9
  "type": "module",
10
10
  "description": "CubeSigner TypeScript SDK",
11
11
  "license": "MIT OR Apache-2.0",
package/src/org.ts CHANGED
@@ -420,14 +420,45 @@ export class Org {
420
420
  alienKeyCountThreshold: number,
421
421
  opts?: { mfaReceipt?: MfaReceipts },
422
422
  ) {
423
+ return await this.#updateExtProps((data) => {
424
+ data.alien_key_count_threshold = alienKeyCountThreshold;
425
+ }, opts);
426
+ }
427
+
428
+ /**
429
+ * Update whether the alien users should be allowed to update their own key policies.
430
+ *
431
+ * @param aliensCanUpdateKeyPolicy Whether alien users should be allowed to update their own key policies.
432
+ * @param opts Optional parameters
433
+ * @param opts.mfaReceipt Optional MFA receipts
434
+ * @returns Org info
435
+ */
436
+ async setAliensCanUpdateKeyPolicy(
437
+ aliensCanUpdateKeyPolicy: boolean,
438
+ opts?: { mfaReceipt?: MfaReceipts },
439
+ ) {
440
+ return await this.#updateExtProps((data) => {
441
+ data.aliens_can_update_key_policy = aliensCanUpdateKeyPolicy;
442
+ }, opts);
443
+ }
444
+
445
+ /**
446
+ * Update select extended properties.
447
+ *
448
+ * @param update The update function
449
+ * @param opts Optional parameters
450
+ * @param opts.mfaReceipt Optional MFA receipts
451
+ * @returns Org info
452
+ */
453
+ async #updateExtProps(update: (data: OrgExtProps) => void, opts?: { mfaReceipt?: MfaReceipts }) {
423
454
  const data = { ...((await this.getExtendedProperties()) ?? {}) };
424
455
 
425
456
  // erase the metadata that cannot be updated
426
457
  data.created = undefined;
427
458
  data.last_modified = undefined;
428
459
 
429
- // update 'alien_key_count_threshold' and keep everything else the same
430
- data.alien_key_count_threshold = alienKeyCountThreshold;
460
+ // execute client-supplied update function
461
+ update(data);
431
462
 
432
463
  return await this.update({ ext_props: data }, opts?.mfaReceipt);
433
464
  }
package/src/schema.ts CHANGED
@@ -1609,6 +1609,9 @@ export interface paths {
1609
1609
  /**
1610
1610
  * Get user by id
1611
1611
  * @description Get user by id
1612
+ *
1613
+ * If the requesting user is an owner of the org, the response additionally
1614
+ * includes the user's OIDC identities.
1612
1615
  */
1613
1616
  get: operations["getUserInOrg"];
1614
1617
  /**
@@ -3869,6 +3872,7 @@ export interface components {
3869
3872
  acl?: unknown[] | null;
3870
3873
  /** @description Arbitrary user-defined metadata. */
3871
3874
  metadata?: unknown;
3875
+ org_id: components["schemas"]["Id"];
3872
3876
  owner: components["schemas"]["Id"];
3873
3877
  }) & {
3874
3878
  /** @description The name of the bucket. */
@@ -3891,6 +3895,7 @@ export interface components {
3891
3895
  acl?: unknown[] | null;
3892
3896
  /** @description Arbitrary user-defined metadata. */
3893
3897
  metadata?: unknown;
3898
+ org_id: components["schemas"]["Id"];
3894
3899
  owner: components["schemas"]["Id"];
3895
3900
  };
3896
3901
  /**
@@ -8207,6 +8212,11 @@ export interface components {
8207
8212
  * In other words, org admins can still assign unlimited number of keys to their alien users.
8208
8213
  */
8209
8214
  alien_key_count_threshold?: number | null;
8215
+ /**
8216
+ * @description Whether alien users are allowed to update their own key policies.
8217
+ * Defaults to 'false'.
8218
+ */
8219
+ aliens_can_update_key_policy?: boolean | null;
8210
8220
  } & {
8211
8221
  created?: components["schemas"]["EpochDateTime"] | null;
8212
8222
  last_modified?: components["schemas"]["EpochDateTime"] | null;
@@ -9984,10 +9994,8 @@ export interface components {
9984
9994
  /** @description Answer to a Sign-in with Solana challenge. */
9985
9995
  SiwsCompleteRequest: {
9986
9996
  challenge_id: components["schemas"]["Id"];
9987
- /** @description The base58-encoded ed25519 signature of `signed_message`. */
9997
+ /** @description The base58-encoded ed25519 signature of the challenge's canonical message text (the rendered `SignInInput`). */
9988
9998
  signature: string;
9989
- /** @description The base58-encoded UTF-8 bytes of the message that was signed (the rendered `SignInInput`). */
9990
- signed_message: string;
9991
9999
  };
9992
10000
  /** @description Returned upon a successful SIWS authentication. */
9993
10001
  SiwsCompleteResponse: {
@@ -11038,6 +11046,11 @@ export interface components {
11038
11046
  * In other words, org admins can still assign unlimited number of keys to their alien users.
11039
11047
  */
11040
11048
  alien_key_count_threshold?: number | null;
11049
+ /**
11050
+ * @description Whether alien users are allowed to update their own key policies.
11051
+ * Defaults to 'false'.
11052
+ */
11053
+ aliens_can_update_key_policy?: boolean | null;
11041
11054
  } & {
11042
11055
  /**
11043
11056
  * Format: int64
@@ -11182,6 +11195,11 @@ export interface components {
11182
11195
  * In other words, org admins can still assign unlimited number of keys to their alien users.
11183
11196
  */
11184
11197
  alien_key_count_threshold?: number | null;
11198
+ /**
11199
+ * @description Whether alien users are allowed to update their own key policies.
11200
+ * Defaults to 'false'.
11201
+ */
11202
+ aliens_can_update_key_policy?: boolean | null;
11185
11203
  } & {
11186
11204
  created?: components["schemas"]["EpochDateTime"] | null;
11187
11205
  last_modified?: components["schemas"]["EpochDateTime"] | null;
@@ -11986,6 +12004,7 @@ export interface components {
11986
12004
  acl?: unknown[] | null;
11987
12005
  /** @description Arbitrary user-defined metadata. */
11988
12006
  metadata?: unknown;
12007
+ org_id: components["schemas"]["Id"];
11989
12008
  owner: components["schemas"]["Id"];
11990
12009
  }) & {
11991
12010
  /** @description The name of the bucket. */
@@ -12612,6 +12631,11 @@ export interface components {
12612
12631
  * In other words, org admins can still assign unlimited number of keys to their alien users.
12613
12632
  */
12614
12633
  alien_key_count_threshold?: number | null;
12634
+ /**
12635
+ * @description Whether alien users are allowed to update their own key policies.
12636
+ * Defaults to 'false'.
12637
+ */
12638
+ aliens_can_update_key_policy?: boolean | null;
12615
12639
  } & {
12616
12640
  created?: components["schemas"]["EpochDateTime"] | null;
12617
12641
  last_modified?: components["schemas"]["EpochDateTime"] | null;
@@ -13484,6 +13508,11 @@ export interface components {
13484
13508
  * In other words, org admins can still assign unlimited number of keys to their alien users.
13485
13509
  */
13486
13510
  alien_key_count_threshold?: number | null;
13511
+ /**
13512
+ * @description Whether alien users are allowed to update their own key policies.
13513
+ * Defaults to 'false'.
13514
+ */
13515
+ aliens_can_update_key_policy?: boolean | null;
13487
13516
  } & {
13488
13517
  created?: components["schemas"]["EpochDateTime"] | null;
13489
13518
  last_modified?: components["schemas"]["EpochDateTime"] | null;
@@ -13637,6 +13666,32 @@ export interface components {
13637
13666
  };
13638
13667
  };
13639
13668
  };
13669
+ UserInOrgInfoWithIdentity: {
13670
+ content: {
13671
+ "application/json": {
13672
+ /**
13673
+ * @description The user's email (optional)
13674
+ * @example alice@example.com
13675
+ */
13676
+ email?: string | null;
13677
+ /**
13678
+ * @description The id of the user
13679
+ * @example User#c3b9379c-4e8c-4216-bd0a-65ace53cf98f
13680
+ */
13681
+ id: string;
13682
+ /** @description Whether the user has ever successfully logged in */
13683
+ initialized?: boolean;
13684
+ membership: components["schemas"]["MemberRole"];
13685
+ /** @description Optional user name. */
13686
+ name?: string | null;
13687
+ status: components["schemas"]["MembershipStatus"];
13688
+ verified_email?: components["schemas"]["VerifiedEmail"] | null;
13689
+ } & {
13690
+ /** @description Optional third-party identities via which the user was found */
13691
+ identities?: components["schemas"]["IdentityInfo"][];
13692
+ };
13693
+ };
13694
+ };
13640
13695
  UserInfo: {
13641
13696
  content: {
13642
13697
  "application/json": {
@@ -19220,6 +19275,9 @@ export interface operations {
19220
19275
  /**
19221
19276
  * Get user by id
19222
19277
  * @description Get user by id
19278
+ *
19279
+ * If the requesting user is an owner of the org, the response additionally
19280
+ * includes the user's OIDC identities.
19223
19281
  */
19224
19282
  getUserInOrg: {
19225
19283
  parameters: {
@@ -19237,7 +19295,7 @@ export interface operations {
19237
19295
  };
19238
19296
  };
19239
19297
  responses: {
19240
- 200: components["responses"]["UserInOrgInfo"];
19298
+ 200: components["responses"]["UserInOrgInfoWithIdentity"];
19241
19299
  default: {
19242
19300
  content: {
19243
19301
  "application/json": components["schemas"]["ErrorResponse"];