@cubist-labs/cubesigner-sdk 0.3.19 → 0.3.25

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 (52) hide show
  1. package/dist/cjs/package.json +1 -1
  2. package/dist/cjs/spec/env/beta.json +2 -1
  3. package/dist/cjs/spec/env/gamma.json +2 -1
  4. package/dist/cjs/spec/env/prod.json +2 -1
  5. package/dist/cjs/src/api.d.ts +4 -2
  6. package/dist/cjs/src/api.js +8 -5
  7. package/dist/cjs/src/client.d.ts +12 -3
  8. package/dist/cjs/src/client.js +5 -3
  9. package/dist/cjs/src/env.d.ts +1 -0
  10. package/dist/cjs/src/env.js +1 -1
  11. package/dist/cjs/src/error.js +7 -2
  12. package/dist/cjs/src/org.d.ts +35 -2
  13. package/dist/cjs/src/org.js +2 -2
  14. package/dist/cjs/src/org_event_processor.d.ts +57 -0
  15. package/dist/cjs/src/org_event_processor.js +137 -0
  16. package/dist/cjs/src/role.d.ts +2 -1
  17. package/dist/cjs/src/role.js +1 -1
  18. package/dist/cjs/src/schema.d.ts +113 -45
  19. package/dist/cjs/src/schema.js +1 -1
  20. package/dist/cjs/src/schema_types.d.ts +5 -0
  21. package/dist/cjs/src/schema_types.js +1 -1
  22. package/dist/esm/package.json +1 -1
  23. package/dist/esm/spec/env/beta.json +2 -1
  24. package/dist/esm/spec/env/gamma.json +2 -1
  25. package/dist/esm/spec/env/prod.json +2 -1
  26. package/dist/esm/src/api.d.ts +4 -2
  27. package/dist/esm/src/api.js +8 -5
  28. package/dist/esm/src/client.d.ts +12 -3
  29. package/dist/esm/src/client.js +5 -3
  30. package/dist/esm/src/env.d.ts +1 -0
  31. package/dist/esm/src/env.js +1 -1
  32. package/dist/esm/src/error.js +7 -2
  33. package/dist/esm/src/org.d.ts +35 -2
  34. package/dist/esm/src/org.js +2 -2
  35. package/dist/esm/src/org_event_processor.d.ts +57 -0
  36. package/dist/esm/src/org_event_processor.js +133 -0
  37. package/dist/esm/src/role.d.ts +2 -1
  38. package/dist/esm/src/role.js +1 -1
  39. package/dist/esm/src/schema.d.ts +113 -45
  40. package/dist/esm/src/schema.js +1 -1
  41. package/dist/esm/src/schema_types.d.ts +5 -0
  42. package/dist/esm/src/schema_types.js +1 -1
  43. package/package.json +1 -1
  44. package/src/api.ts +14 -6
  45. package/src/client.ts +11 -3
  46. package/src/env.ts +1 -0
  47. package/src/error.ts +6 -1
  48. package/src/org.ts +24 -2
  49. package/src/role.ts +4 -3
  50. package/src/schema.ts +119 -42
  51. package/src/schema_types.ts +5 -0
  52. package/tsconfig.json +1 -0
@@ -3,6 +3,7 @@ import { components } from "./schema";
3
3
  import { JsonMap } from "./util";
4
4
  type schemas = components["schemas"];
5
5
  export type UserInfo = schemas["UserInfo"];
6
+ export type UserInOrgMembership = schemas["UserInOrgMembership"];
6
7
  export type ConfiguredMfa = schemas["ConfiguredMfa"];
7
8
  export type RatchetConfig = schemas["RatchetConfig"];
8
9
  export type IdentityProof = schemas["IdentityProof"];
@@ -28,6 +29,8 @@ export type MemberRole = schemas["MemberRole"];
28
29
  export type SchemaKeyType = schemas["KeyType"];
29
30
  export type ListKeysResponse = schemas["PaginatedListKeysResponse"];
30
31
  export type UpdateKeyRequest = schemas["UpdateKeyRequest"];
32
+ export type KeyProperties = schemas["CreateAndUpdateKeyProperties"];
33
+ export type CreateKeyRequest = schemas["CreateKeyRequest"];
31
34
  export type KeyInfoApi = schemas["KeyInfo"];
32
35
  export type KeyInRoleInfo = schemas["KeyInRoleInfo"];
33
36
  export type UserInRoleInfo = schemas["UserInRoleInfo"];
@@ -80,6 +83,8 @@ export type UserExportKeyMaterial = schemas["JsonKeyPackage"];
80
83
  export type Empty = schemas["EmptyImpl"];
81
84
  /** Options for a new OIDC user */
82
85
  export interface CreateOidcUserOptions {
86
+ /** Optional name */
87
+ name?: string | null;
83
88
  /** The role of an OIDC user, default is "Alien" */
84
89
  memberRole?: MemberRole;
85
90
  /** Optional MFA policy to associate with the user account */
@@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xlO1xuICAvKiogT3B0aW9uYWwgTUZBIHBvbGljeSB0byBhc3NvY2lhdGUgd2l0aCB0aGUgdXNlciBhY2NvdW50ICovXG4gIG1mYVBvbGljeT86IE1mYVBvbGljeTtcbn1cblxuLyoqIEF2YSBQLSBvciBYLWNoYWluIHRyYW5zYWN0aW9uICovXG5leHBvcnQgdHlwZSBBdmFUeCA9IHsgUDogQXZhUENoYWluVHggfSB8IHsgWDogQXZhWENoYWluVHggfTtcblxuLyoqIEF2YSBQLWNoYWluIHRyYW5zYWN0aW9uICovXG5leHBvcnQgdHlwZSBBdmFQQ2hhaW5UeCA9XG4gIHwgeyBBZGRQZXJtaXNzaW9ubGVzc1ZhbGlkYXRvcjogSnNvbk1hcCB9XG4gIHwgeyBBZGRTdWJuZXRWYWxpZGF0b3I6IEpzb25NYXAgfVxuICB8IHsgQWRkVmFsaWRhdG9yOiBKc29uTWFwIH1cbiAgfCB7IENyZWF0ZUNoYWluOiBKc29uTWFwIH1cbiAgfCB7IENyZWF0ZVN1Ym5ldDogSnNvbk1hcCB9XG4gIHwgeyBFeHBvcnQ6IEpzb25NYXAgfVxuICB8IHsgSW1wb3J0OiBKc29uTWFwIH07XG5cbi8qKiBBdmEgWC1jaGFpbiB0cmFuc2FjdGlvbiAqL1xuZXhwb3J0IHR5cGUgQXZhWENoYWluVHggPSB7IEJhc2U6IEpzb25NYXAgfSB8IHsgRXhwb3J0OiBKc29uTWFwIH0gfCB7IEltcG9ydDogSnNvbk1hcCB9O1xuIl19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cubist-labs/cubesigner-sdk",
3
- "version": "0.3.19",
3
+ "version": "0.3.25",
4
4
  "description": "CubeSigner TypeScript SDK",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "author": "Cubist, Inc.",
package/src/api.ts CHANGED
@@ -74,7 +74,7 @@ import { KeyPolicy } from "./role";
74
74
  import { EnvInterface } from "./env";
75
75
  import { loadSubtleCrypto } from "./user_export";
76
76
  import { EventEmitter } from "./events";
77
- import { NAME, VERSION } from "./index";
77
+ import { NAME, KeyProperties, VERSION } from "./index";
78
78
 
79
79
  /** @internal */
80
80
  export type Client = ReturnType<typeof createClient<paths>>;
@@ -610,7 +610,7 @@ export class CubeSignerApi {
610
610
  */
611
611
  async orgUserCreateOidc(
612
612
  identity: OidcIdentity,
613
- email: string,
613
+ email?: string | null,
614
614
  opts: CreateOidcUserOptions = {},
615
615
  ): Promise<string> {
616
616
  const client = await this.client("createOidcUser");
@@ -619,8 +619,9 @@ export class CubeSignerApi {
619
619
  body: {
620
620
  identity,
621
621
  role: opts.memberRole ?? "Alien",
622
- email: email,
623
- mfa_policy: opts.mfaPolicy ?? null,
622
+ email,
623
+ name: opts.name,
624
+ mfa_policy: opts.mfaPolicy,
624
625
  },
625
626
  });
626
627
  return data.user_id;
@@ -712,9 +713,15 @@ export class CubeSignerApi {
712
713
  * @param {KeyType} keyType The type of key to create.
713
714
  * @param {number} count The number of keys to create.
714
715
  * @param {string?} ownerId The owner of the keys. Defaults to the session's user.
716
+ * @param {KeyProperties?} props Additional key properties
715
717
  * @return {KeyInfoApi[]} The new keys.
716
718
  */
717
- async keysCreate(keyType: KeyType, count: number, ownerId?: string): Promise<KeyInfoApi[]> {
719
+ async keysCreate(
720
+ keyType: KeyType,
721
+ count: number,
722
+ ownerId?: string,
723
+ props?: KeyProperties,
724
+ ): Promise<KeyInfoApi[]> {
718
725
  const chain_id = 0; // not used anymore
719
726
  const client = await this.client("createKey");
720
727
  const data = await client.post("/v0/org/{org_id}/keys", {
@@ -723,7 +730,8 @@ export class CubeSignerApi {
723
730
  count,
724
731
  chain_id,
725
732
  key_type: keyType,
726
- owner: ownerId || null,
733
+ ...props,
734
+ owner: props?.owner ?? ownerId,
727
735
  },
728
736
  });
729
737
  return data.keys;
package/src/client.ts CHANGED
@@ -1,7 +1,13 @@
1
1
  import { SignerSessionManager, SignerSessionStorage } from "./session/signer_session_manager";
2
2
  import { CubeSignerApi, OidcClient } from "./api";
3
3
  import { KeyType, Key } from "./key";
4
- import { MfaRequestInfo, OrgInfo, PublicKeyCredential, RatchetConfig } from "./schema_types";
4
+ import {
5
+ MfaRequestInfo,
6
+ OrgInfo,
7
+ PublicKeyCredential,
8
+ RatchetConfig,
9
+ KeyProperties,
10
+ } from "./schema_types";
5
11
  import { MfaReceipt } from "./mfa";
6
12
  import { PageOpts } from "./paginator";
7
13
  import { Role } from "./role";
@@ -68,10 +74,12 @@ export class CubeSignerClient extends CubeSignerApi {
68
74
  * Create a new signing key.
69
75
  * @param {KeyType} type The type of key to create.
70
76
  * @param {string?} ownerId The owner of the key. Defaults to the session's user.
77
+ * @param {KeyProperties?} props Additional key properties
71
78
  * @return {Key[]} The new keys.
72
79
  */
73
- async createKey(type: KeyType, ownerId?: string): Promise<Key> {
74
- return (await this.createKeys(type, 1, ownerId))[0];
80
+ async createKey(type: KeyType, ownerId?: string, props?: KeyProperties): Promise<Key> {
81
+ const keys = await this.keysCreate(type, 1, ownerId, props);
82
+ return new Key(this, keys[0]);
75
83
  }
76
84
 
77
85
  /**
package/src/env.ts CHANGED
@@ -16,6 +16,7 @@ export interface EnvInterface {
16
16
  Region: string;
17
17
  UserPoolId: string;
18
18
  SignerApiRoot: string;
19
+ OrgEventsTopicArn: string;
19
20
  }
20
21
 
21
22
  export const envs: Record<Environment, EnvInterface> = {
package/src/error.ts CHANGED
@@ -20,7 +20,12 @@ const mfaErrorCodes: CsErrCode[] = [
20
20
  /**
21
21
  * Opcodes corresponding to all different MFA approve/reject requests
22
22
  */
23
- const mfaOpCodes: (keyof operations)[] = ["mfaVoteCs", "mfaVoteTotp", "mfaVoteFidoComplete"];
23
+ const mfaOpCodes: (keyof operations)[] = [
24
+ "mfaVoteCs",
25
+ "userResetTotpComplete",
26
+ "mfaVoteTotp",
27
+ "mfaVoteFidoComplete",
28
+ ];
24
29
 
25
30
  /**
26
31
  * Error response type, thrown on non-successful responses.
package/src/org.ts CHANGED
@@ -14,7 +14,29 @@ export type OrgPolicy =
14
14
  | SourceIpAllowlistPolicy
15
15
  | OidcAuthSourcesPolicy
16
16
  | OriginAllowlistPolicy
17
- | MaxDailyUnstakePolicy;
17
+ | MaxDailyUnstakePolicy
18
+ | WebAuthnRelyingPartiesPolicy
19
+ | ExclusiveKeyAccessPolicy;
20
+
21
+ /**
22
+ * Whether to enforce exclusive access to keys. Concretely,
23
+ * - if "LimitToKeyOwner" is set, only key owners are permitted to access
24
+ * their keys for signing: a user session (not a role session) is required
25
+ * for signing, and adding a key to a role is not permitted.
26
+ * - if "LimitToSingleRole" is set, each key is permitted to be in at most
27
+ * one role, and signing is only allowed when authenticating using a role session token.
28
+ */
29
+ export interface ExclusiveKeyAccessPolicy {
30
+ ExclusiveKeyAccess: "LimitToKeyOwner" | "LimitToSingleRole";
31
+ }
32
+
33
+ /**
34
+ * The set of relying parties to allow for webauthn registration
35
+ * These correspond to domains from which browsers can successfully create credentials.
36
+ */
37
+ export interface WebAuthnRelyingPartiesPolicy {
38
+ WebAuthnRelyingParties: { id?: string; name: string }[];
39
+ }
18
40
 
19
41
  /**
20
42
  * Provides an allowlist of OIDC Issuers and audiences that are allowed to authenticate into this org.
@@ -132,7 +154,7 @@ export class Org extends CubeSignerClient {
132
154
  */
133
155
  async setNotificationEndpoints(notification_endpoints: NotificationEndpointConfiguration[]) {
134
156
  await this.orgUpdate({
135
- notification_endpoints: notification_endpoints as unknown as Record<string, never>[],
157
+ notification_endpoints,
136
158
  });
137
159
  }
138
160
 
package/src/role.ts CHANGED
@@ -142,12 +142,13 @@ type KeyDenyPolicy = TxReceiver | TxDeposit | SourceIpAllowlist | RequireMfa;
142
142
  * }
143
143
  * ]
144
144
  */
145
- export type KeyPolicy = (
145
+ export type KeyPolicy = KeyPolicyRule[];
146
+
147
+ export type KeyPolicyRule =
146
148
  | KeyDenyPolicy
147
149
  | AllowRawBlobSigning
148
150
  | AllowEip191Signing
149
- | AllowEip712Signing
150
- )[];
151
+ | AllowEip712Signing;
151
152
 
152
153
  /** Role policy */
153
154
  export type RolePolicy = KeyDenyPolicy[];
package/src/schema.ts CHANGED
@@ -835,10 +835,10 @@ export interface components {
835
835
  };
836
836
  AddThirdPartyUserRequest: {
837
837
  /**
838
- * @description User email
838
+ * @description Optional user email
839
839
  * @example alice@example.com
840
840
  */
841
- email: string;
841
+ email?: string | null;
842
842
  identity: components["schemas"]["OIDCIdentity"];
843
843
  /** @description Optional login MFA policy */
844
844
  mfa_policy?: unknown;
@@ -1095,8 +1095,10 @@ export interface components {
1095
1095
  | "InvalidEip191SignRequest"
1096
1096
  | "CannotResendUserInvitation"
1097
1097
  | "InvalidNotificationEndpointCount"
1098
+ | "CannotDeletePendingSubscription"
1098
1099
  | "InvalidNotificationUrlProtocol"
1099
- | "EmptyOneOfOrgEventFilter";
1100
+ | "EmptyOneOfOrgEventFilter"
1101
+ | "EmptyAllExceptOrgEventFilter";
1100
1102
  /**
1101
1103
  * @example {
1102
1104
  * "message_base64": "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTYK"
@@ -1203,6 +1205,31 @@ export interface components {
1203
1205
  /** @enum {string} */
1204
1206
  type: "fido";
1205
1207
  };
1208
+ CreateAndUpdateKeyProperties: {
1209
+ /**
1210
+ * @description Set this key's metadata. Validation regex: ^[A-Za-z0-9_=+/ \-\.\,]{0,1024}$
1211
+ * @example Contract admin key
1212
+ */
1213
+ metadata?: string | null;
1214
+ /**
1215
+ * @description Specify a user other than themselves to be the (potentially new) owner of the key.
1216
+ * The specified owner must be an existing user who is a member of the same org.
1217
+ * @example User#c3b9379c-4e8c-4216-bd0a-65ace53cf98f
1218
+ */
1219
+ owner?: string | null;
1220
+ /**
1221
+ * @description Set this key's policies. For an existing key, this overwrites all its policies.
1222
+ * @example [
1223
+ * "AllowRawBlobSigning",
1224
+ * {
1225
+ * "RequireMfa": {
1226
+ * "count": 1
1227
+ * }
1228
+ * }
1229
+ * ]
1230
+ */
1231
+ policy?: Record<string, never>[] | null;
1232
+ };
1206
1233
  CreateKeyImportKeyResponse: components["schemas"]["KeyImportKey"] & {
1207
1234
  /**
1208
1235
  * @description An attestation document from a secure enclave, including an
@@ -1215,7 +1242,7 @@ export interface components {
1215
1242
  */
1216
1243
  enclave_signature: string;
1217
1244
  };
1218
- CreateKeyRequest: {
1245
+ CreateKeyRequest: components["schemas"]["CreateAndUpdateKeyProperties"] & {
1219
1246
  /**
1220
1247
  * Format: int64
1221
1248
  * @description Chain id for which the key is allowed to sign messages
@@ -1229,11 +1256,6 @@ export interface components {
1229
1256
  */
1230
1257
  count: number;
1231
1258
  key_type: components["schemas"]["KeyType"];
1232
- /**
1233
- * @description Allows users to specify a user other than themselves to receive the key
1234
- * @example User#c3b9379c-4e8c-4216-bd0a-65ace53cf98f
1235
- */
1236
- owner?: string | null;
1237
1259
  };
1238
1260
  CreateKeyResponse: {
1239
1261
  /** @description The info about the created keys */
@@ -1644,6 +1666,7 @@ export interface components {
1644
1666
  | "UserNotInRole"
1645
1667
  | "MustBeFullMember"
1646
1668
  | "SessionExpired"
1669
+ | "SessionChanged"
1647
1670
  | "SessionRevoked"
1648
1671
  | "ExpectedUserSession"
1649
1672
  | "SessionRoleChanged"
@@ -1899,6 +1922,9 @@ export interface components {
1899
1922
  | "CognitoGetUser"
1900
1923
  | "SnsSubscribeError"
1901
1924
  | "SnsUnsubscribeError"
1925
+ | "SnsGetSubscriptionAttributesError"
1926
+ | "SnsSubscriptionAttributesMissing"
1927
+ | "SnsSetSubscriptionAttributesError"
1902
1928
  | "SnsPublishBatchError";
1903
1929
  InviteRequest: {
1904
1930
  /**
@@ -2215,12 +2241,22 @@ export interface components {
2215
2241
  | "TotpChallengeNotFound"
2216
2242
  | "UserExportRequestNotFound"
2217
2243
  | "UserExportCiphertextNotFound";
2244
+ /** @description The configuration and status of a notification endpoint */
2245
+ NotificationEndpoint: components["schemas"]["NotificationEndpointSubscription"] & {
2246
+ status: components["schemas"]["SubscriptionStatus"];
2247
+ };
2218
2248
  /** @description The configuration for an org event endpoint */
2219
2249
  NotificationEndpointConfiguration: {
2220
2250
  filter?: components["schemas"]["OrgEventFilter"];
2221
2251
  /** @description URL of the endpoint */
2222
2252
  url: string;
2223
2253
  };
2254
+ /** @description A notification endpoint subscription */
2255
+ NotificationEndpointSubscription: {
2256
+ /** @description The ARN of the subscription */
2257
+ arn: string;
2258
+ config: components["schemas"]["NotificationEndpointConfiguration"];
2259
+ };
2224
2260
  /**
2225
2261
  * @description Represents a globally unique OIDC-authorized user by expressing the full "path" to a user. That is:
2226
2262
  *
@@ -2266,6 +2302,7 @@ export interface components {
2266
2302
  * @enum {string}
2267
2303
  */
2268
2304
  OrgEventDiscriminants:
2305
+ | "Billing"
2269
2306
  | "OidcAuth"
2270
2307
  | "Eth2ConcurrentAttestationSigning"
2271
2308
  | "Eth2ConcurrentBlockSigning"
@@ -2279,6 +2316,10 @@ export interface components {
2279
2316
  OrgEventFilter: OneOf<
2280
2317
  [
2281
2318
  "All",
2319
+ {
2320
+ /** @description Accepts all org events other than the ones listed */
2321
+ AllExcept: components["schemas"]["OrgEventDiscriminants"][];
2322
+ },
2282
2323
  {
2283
2324
  /** @description Only accepts org events that are one of the listed events */
2284
2325
  OneOf: components["schemas"]["OrgEventDiscriminants"][];
@@ -2317,11 +2358,28 @@ export interface components {
2317
2358
  * request with a JSON-formatted body that contains the event details.
2318
2359
  * @example [
2319
2360
  * {
2320
- * "url": "https://example.com/endpoint"
2361
+ * "arn": "arn:aws:sns:us-east-1:012345678901:OrgEventsTopic:12345678-0000-0000-0000-000000000001",
2362
+ * "config": {
2363
+ * "url": "https://example.com/endpoint1"
2364
+ * },
2365
+ * "status": "Confirmed"
2366
+ * },
2367
+ * {
2368
+ * "arn": "arn:aws:sns:us-east-1:012345678901:OrgEventsTopic:12345678-0000-0000-0000-000000000002",
2369
+ * "config": {
2370
+ * "filter": {
2371
+ * "OneOf": [
2372
+ * "Eth2ConcurrentAttestationSigning",
2373
+ * "Eth2ConcurrentBlockSigning"
2374
+ * ]
2375
+ * },
2376
+ * "url": "https://example.com/endpoint2"
2377
+ * },
2378
+ * "status": "Pending"
2321
2379
  * }
2322
2380
  * ]
2323
2381
  */
2324
- notification_endpoints?: Record<string, never>[];
2382
+ notification_endpoints?: components["schemas"]["NotificationEndpoint"][];
2325
2383
  /**
2326
2384
  * @description The ID of the organization
2327
2385
  * @example Org#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
@@ -3026,6 +3084,11 @@ export interface components {
3026
3084
  */
3027
3085
  num_auth_factors: number;
3028
3086
  };
3087
+ /**
3088
+ * @description The status of a subscription
3089
+ * @enum {string}
3090
+ */
3091
+ SubscriptionStatus: "Confirmed" | "Pending";
3029
3092
  TokenInfo: {
3030
3093
  /** @description Session ID. Use it to revoke a session. Cannot be used for auth. */
3031
3094
  hash: string;
@@ -3143,35 +3206,12 @@ export interface components {
3143
3206
  */
3144
3207
  signature: string;
3145
3208
  };
3146
- UpdateKeyRequest: {
3209
+ UpdateKeyRequest: components["schemas"]["CreateAndUpdateKeyProperties"] & {
3147
3210
  /**
3148
3211
  * @description If set, updates the keys's `enabled` property to this value.
3149
3212
  * Once disabled, a key cannot be used for signing.
3150
3213
  */
3151
3214
  enabled?: boolean | null;
3152
- /**
3153
- * @description If set, update this key's metadata. Validation regex: ^[A-Za-z0-9_=+/ \-\.\,]{0,1024}$
3154
- * @example Contract admin key
3155
- */
3156
- metadata?: string | null;
3157
- /**
3158
- * @description If set, updates key's owner to this value.
3159
- * The new owner must be an existing user who is a member of the same org.
3160
- * @example User#c3b9379c-4e8c-4216-bd0a-65ace53cf98f
3161
- */
3162
- owner?: string | null;
3163
- /**
3164
- * @description If set, update this key's policies (old policies will be overwritten!).
3165
- * @example [
3166
- * "AllowRawBlobSigning",
3167
- * {
3168
- * "RequireMfa": {
3169
- * "count": 1
3170
- * }
3171
- * }
3172
- * ]
3173
- */
3174
- policy?: Record<string, never>[] | null;
3175
3215
  };
3176
3216
  UpdateOrgRequest: {
3177
3217
  /** @description If set, update this org's `enabled` field to this value. */
@@ -3218,7 +3258,7 @@ export interface components {
3218
3258
  * }
3219
3259
  * ]
3220
3260
  */
3221
- notification_endpoints?: Record<string, never>[] | null;
3261
+ notification_endpoints?: components["schemas"]["NotificationEndpointConfiguration"][] | null;
3222
3262
  /**
3223
3263
  * @description If set, update this org's policies (old policies will be overwritten!).
3224
3264
  * @example [
@@ -3279,7 +3319,7 @@ export interface components {
3279
3319
  * }
3280
3320
  * ]
3281
3321
  */
3282
- notification_endpoints?: Record<string, never>[];
3322
+ notification_endpoints?: components["schemas"]["NotificationEndpointConfiguration"][] | null;
3283
3323
  /**
3284
3324
  * @description The ID of the organization
3285
3325
  * @example Org#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
@@ -3442,6 +3482,18 @@ export interface components {
3442
3482
  /** @description Optional user name. */
3443
3483
  name?: string | null;
3444
3484
  };
3485
+ /**
3486
+ * @description Information about a user's membership in an organization
3487
+ * (without including any info about the user)
3488
+ */
3489
+ UserInOrgMembership: {
3490
+ membership: components["schemas"]["MemberRole"];
3491
+ /**
3492
+ * @description Organization id
3493
+ * @example Org#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
3494
+ */
3495
+ org_id: string;
3496
+ };
3445
3497
  UserInRoleInfo: {
3446
3498
  user_id: string;
3447
3499
  };
@@ -3461,12 +3513,15 @@ export interface components {
3461
3513
  */
3462
3514
  name?: string | null;
3463
3515
  /**
3464
- * @description All organizations the user belongs to
3516
+ * @deprecated
3517
+ * @description All organizations the user belongs to. Deprecated in favor of 'orgs'.
3465
3518
  * @example [
3466
3519
  * "Org#124dfe3e-3bbd-487d-80c0-53c55e8ab87a"
3467
3520
  * ]
3468
3521
  */
3469
3522
  org_ids: string[];
3523
+ /** @description All organizations the user belongs to, including the membership role in each. */
3524
+ orgs: components["schemas"]["UserInOrgMembership"][];
3470
3525
  /**
3471
3526
  * @description The id of the currently logged in user
3472
3527
  * @example User#c3b9379c-4e8c-4216-bd0a-65ace53cf98f
@@ -3856,11 +3911,28 @@ export interface components {
3856
3911
  * request with a JSON-formatted body that contains the event details.
3857
3912
  * @example [
3858
3913
  * {
3859
- * "url": "https://example.com/endpoint"
3914
+ * "arn": "arn:aws:sns:us-east-1:012345678901:OrgEventsTopic:12345678-0000-0000-0000-000000000001",
3915
+ * "config": {
3916
+ * "url": "https://example.com/endpoint1"
3917
+ * },
3918
+ * "status": "Confirmed"
3919
+ * },
3920
+ * {
3921
+ * "arn": "arn:aws:sns:us-east-1:012345678901:OrgEventsTopic:12345678-0000-0000-0000-000000000002",
3922
+ * "config": {
3923
+ * "filter": {
3924
+ * "OneOf": [
3925
+ * "Eth2ConcurrentAttestationSigning",
3926
+ * "Eth2ConcurrentBlockSigning"
3927
+ * ]
3928
+ * },
3929
+ * "url": "https://example.com/endpoint2"
3930
+ * },
3931
+ * "status": "Pending"
3860
3932
  * }
3861
3933
  * ]
3862
3934
  */
3863
- notification_endpoints?: Record<string, never>[];
3935
+ notification_endpoints?: components["schemas"]["NotificationEndpoint"][];
3864
3936
  /**
3865
3937
  * @description The ID of the organization
3866
3938
  * @example Org#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
@@ -4188,7 +4260,9 @@ export interface components {
4188
4260
  * }
4189
4261
  * ]
4190
4262
  */
4191
- notification_endpoints?: Record<string, never>[];
4263
+ notification_endpoints?:
4264
+ | components["schemas"]["NotificationEndpointConfiguration"][]
4265
+ | null;
4192
4266
  /**
4193
4267
  * @description The ID of the organization
4194
4268
  * @example Org#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
@@ -4276,12 +4350,15 @@ export interface components {
4276
4350
  */
4277
4351
  name?: string | null;
4278
4352
  /**
4279
- * @description All organizations the user belongs to
4353
+ * @deprecated
4354
+ * @description All organizations the user belongs to. Deprecated in favor of 'orgs'.
4280
4355
  * @example [
4281
4356
  * "Org#124dfe3e-3bbd-487d-80c0-53c55e8ab87a"
4282
4357
  * ]
4283
4358
  */
4284
4359
  org_ids: string[];
4360
+ /** @description All organizations the user belongs to, including the membership role in each. */
4361
+ orgs: components["schemas"]["UserInOrgMembership"][];
4285
4362
  /**
4286
4363
  * @description The id of the currently logged in user
4287
4364
  * @example User#c3b9379c-4e8c-4216-bd0a-65ace53cf98f
@@ -5,6 +5,7 @@ import { JsonMap } from "./util";
5
5
  type schemas = components["schemas"];
6
6
 
7
7
  export type UserInfo = schemas["UserInfo"];
8
+ export type UserInOrgMembership = schemas["UserInOrgMembership"];
8
9
  export type ConfiguredMfa = schemas["ConfiguredMfa"];
9
10
  export type RatchetConfig = schemas["RatchetConfig"];
10
11
  export type IdentityProof = schemas["IdentityProof"];
@@ -36,6 +37,8 @@ export type SchemaKeyType = schemas["KeyType"];
36
37
 
37
38
  export type ListKeysResponse = schemas["PaginatedListKeysResponse"];
38
39
  export type UpdateKeyRequest = schemas["UpdateKeyRequest"];
40
+ export type KeyProperties = schemas["CreateAndUpdateKeyProperties"];
41
+ export type CreateKeyRequest = schemas["CreateKeyRequest"];
39
42
  export type KeyInfoApi = schemas["KeyInfo"];
40
43
  export type KeyInRoleInfo = schemas["KeyInRoleInfo"];
41
44
  export type UserInRoleInfo = schemas["UserInRoleInfo"];
@@ -97,6 +100,8 @@ export type Empty = schemas["EmptyImpl"];
97
100
 
98
101
  /** Options for a new OIDC user */
99
102
  export interface CreateOidcUserOptions {
103
+ /** Optional name */
104
+ name?: string | null;
100
105
  /** The role of an OIDC user, default is "Alien" */
101
106
  memberRole?: MemberRole;
102
107
  /** Optional MFA policy to associate with the user account */
package/tsconfig.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "extends": "../../tsconfig.json",
3
3
  "compilerOptions": {
4
+ "module": "ES2022",
4
5
  "outDir": "./dist"
5
6
  },
6
7
  "typedocOptions": {