@cubist-labs/cubesigner-sdk 0.4.231 → 0.4.237
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/README.md +1 -1
- package/dist/package.json +1 -1
- package/dist/src/bucket.d.ts +19 -0
- package/dist/src/bucket.d.ts.map +1 -0
- package/dist/src/bucket.js +17 -0
- package/dist/src/client/api_client.d.ts +39 -2
- package/dist/src/client/api_client.d.ts.map +1 -1
- package/dist/src/client/api_client.js +75 -9
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -1
- package/dist/src/org.d.ts +11 -0
- package/dist/src/org.d.ts.map +1 -1
- package/dist/src/org.js +17 -1
- package/dist/src/policy.d.ts +5 -3
- package/dist/src/policy.d.ts.map +1 -1
- package/dist/src/policy.js +2 -2
- package/dist/src/role.d.ts +13 -1
- package/dist/src/role.d.ts.map +1 -1
- package/dist/src/role.js +1 -1
- package/dist/src/schema.d.ts +813 -67
- package/dist/src/schema.d.ts.map +1 -1
- package/dist/src/schema.js +1 -1
- package/dist/src/schema_types.d.ts +11 -0
- package/dist/src/schema_types.d.ts.map +1 -1
- package/dist/src/schema_types.js +11 -1
- package/dist/src/scopes.d.ts.map +1 -1
- package/dist/src/scopes.js +46 -6
- package/package.json +1 -1
- package/src/bucket.ts +30 -0
- package/src/client/api_client.ts +99 -13
- package/src/index.ts +2 -0
- package/src/org.ts +18 -0
- package/src/policy.ts +8 -5
- package/src/role.ts +12 -0
- package/src/schema.ts +1195 -350
- package/src/schema_types.ts +16 -1
- package/src/scopes.ts +45 -5
package/src/schema_types.ts
CHANGED
|
@@ -245,6 +245,7 @@ export type PasswordResetRequest = schemas["PasswordResetRequest"];
|
|
|
245
245
|
export type PasswordResetConfirmRequest = schemas["PasswordResetConfirmRequest"];
|
|
246
246
|
export type EmailOtpResponse = schemas["EmailOtpResponse"];
|
|
247
247
|
export type EmailTemplatePurpose = schemas["Purpose"];
|
|
248
|
+
export type GetEmailConfigResponse = schemas["GetEmailConfigResponse"];
|
|
248
249
|
|
|
249
250
|
export type Empty = schemas["EmptyImpl"];
|
|
250
251
|
|
|
@@ -290,10 +291,20 @@ export type ImportKeyRequestMaterial = schemas["ImportKeyRequestMaterial"];
|
|
|
290
291
|
export type InvitationAcceptRequest = schemas["InvitationAcceptRequest"];
|
|
291
292
|
|
|
292
293
|
export type KeyTypeAndDerivationPath = schemas["KeyTypeAndDerivationPath"];
|
|
293
|
-
|
|
294
294
|
export type PolicyInfo = schemas["PolicyInfo"] & {
|
|
295
295
|
acl?: JsonValue[];
|
|
296
296
|
};
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Coerce the less accurate `PolicyInfo` type from the OpenAPI schema to a more accurate {@link PolicyInfo}.
|
|
300
|
+
*
|
|
301
|
+
* @param p The policy info received on the wire
|
|
302
|
+
* @returns The same value coerced to {@link PolicyInfo}
|
|
303
|
+
*/
|
|
304
|
+
export function coercePolicyInfo(p: schemas["PolicyInfo"]): PolicyInfo {
|
|
305
|
+
return p as PolicyInfo;
|
|
306
|
+
}
|
|
307
|
+
|
|
297
308
|
export type UpdatePolicyRequest = schemas["UpdatePolicyRequest"] & {
|
|
298
309
|
rules?: JsonValue[];
|
|
299
310
|
acl?: JsonValue[];
|
|
@@ -302,6 +313,10 @@ export type ListPoliciesResponse = schemas["PaginatedListPoliciesResponse"];
|
|
|
302
313
|
export type PolicyType = schemas["PolicyType"];
|
|
303
314
|
export type PolicyAttachedToId = schemas["PolicyAttachedToId"];
|
|
304
315
|
|
|
316
|
+
export type ListBucketsResponse = schemas["PaginatedListBucketsResponse"];
|
|
317
|
+
export type UpdateBucketRequest = schemas["UpdateBucketRequest"];
|
|
318
|
+
export type BucketAction = schemas["BucketAction"];
|
|
319
|
+
|
|
305
320
|
export type UploadWasmPolicyRequest = schemas["UploadWasmPolicyRequest"];
|
|
306
321
|
export type UploadWasmPolicyResponse = schemas["UploadWasmPolicyResponse"];
|
|
307
322
|
export type InvokePolicyRequest = schemas["InvokePolicyRequest"];
|
package/src/scopes.ts
CHANGED
|
@@ -55,7 +55,10 @@ export const AllScopes: Record<ExplicitScope, string> =
|
|
|
55
55
|
"sign:mmi" : "Allows access to the sign 'mmi' endpoint",
|
|
56
56
|
"manage:*" : "Allows access to all management endpoints (e.g., create role, create key, add key to role, etc.)",
|
|
57
57
|
"manage:readonly" : "Allows access to all management readonly endpoints",
|
|
58
|
-
"manage:email"
|
|
58
|
+
"manage:email:*" : "Allows access only to the email management endpoints",
|
|
59
|
+
"manage:email:get" : "Allows access only to the email configuration 'get' endpoint",
|
|
60
|
+
"manage:email:update" : "Allows access only to the email configuration 'update' endpoint",
|
|
61
|
+
"manage:email:delete" : "Allows access only to the email configuration 'delete' endpoint",
|
|
59
62
|
"manage:mfa:*" : "Allows access only to MFA endpoints (e.g., get/approve existing MFA request)",
|
|
60
63
|
"manage:mfa:readonly" : "Allows access only to MFA readonly endpoints (e.g., get/list existing MFA request(s))",
|
|
61
64
|
"manage:mfa:list" : "Allows access only to the MFA list endpoint (list existing MFA requests)",
|
|
@@ -83,10 +86,11 @@ export const AllScopes: Record<ExplicitScope, string> =
|
|
|
83
86
|
"manage:key:create" : "Allows access only to key creation endpoints (e.g., 'create' and 'derive')",
|
|
84
87
|
"manage:key:import" : "Allows access only to the key 'import' endpoint",
|
|
85
88
|
"manage:key:update:*" : "Allows access only to the key 'update' endpoint, within which allowing all possible updates",
|
|
86
|
-
"manage:key:update:owner" : "Allows access only to the key 'update' endpoint, but restricting updates to the key owner property",
|
|
87
|
-
"manage:key:update:
|
|
88
|
-
"manage:key:update:
|
|
89
|
-
"manage:key:update:
|
|
89
|
+
"manage:key:update:owner" : "Allows access only to the key 'update' endpoint, but restricting updates to the key 'owner' property",
|
|
90
|
+
"manage:key:update:region" : "Allows access only to the key 'update' endpoint, but restricting updates to the key 'region' property",
|
|
91
|
+
"manage:key:update:policy" : "Allows access only to the key 'update' endpoint, but restricting updates to the key 'policy' property",
|
|
92
|
+
"manage:key:update:enabled" : "Allows access only to the key 'update' endpoint, but restricting updates to the key 'enabled' property",
|
|
93
|
+
"manage:key:update:metadata" : "Allows access only to the key 'update' endpoint and restricts updates to the key 'metadata' property",
|
|
90
94
|
"manage:key:update:editPolicy" : "Allows access only to the key 'update' endpoint and restricts updates to the 'edit_policy' property",
|
|
91
95
|
"manage:key:delete" : "Allows access only to the key 'delete' endpoint",
|
|
92
96
|
"manage:policy:*" : "Allows access to all policy endpoints",
|
|
@@ -111,6 +115,13 @@ export const AllScopes: Record<ExplicitScope, string> =
|
|
|
111
115
|
"manage:policy:secrets:update:values" : "Allows access only to the policy secrets 'update' endpoint, but restricting updates to the secrets keys and values",
|
|
112
116
|
"manage:policy:secrets:update:acl" : "Allows access only to the policy secrets 'update' endpoint, but restricting updates to the secrets acl",
|
|
113
117
|
"manage:policy:secrets:update:editPolicy" : "Allows access only to the policy secrets 'update' endpoint, but restricting updates to the `edit_policy` property",
|
|
118
|
+
"manage:policy:buckets:*" : "Allows access to all policy buckets endpoints",
|
|
119
|
+
"manage:policy:buckets:get" : "Allows access only to the policy buckets 'get' endpoint",
|
|
120
|
+
"manage:policy:buckets:list" : "Allows access only to the policy buckets 'list' endpoint",
|
|
121
|
+
"manage:policy:buckets:update:*" : "Allows access only to the policy buckets 'update' endpoint",
|
|
122
|
+
"manage:policy:buckets:update:owner" : "Allows access only to the policy buckets 'update' endpoint, but restricting updates to the `owner` property",
|
|
123
|
+
"manage:policy:buckets:update:acl" : "Allows access only to the policy buckets 'update' endpoint, but restricting updates to the `acl` property",
|
|
124
|
+
"manage:policy:buckets:update:metadata" : "Allows access only to the policy buckets 'update' endpoint, but restricting updates to the `metadata` property",
|
|
114
125
|
"manage:contact:*" : "Allows access to all contact endpoints",
|
|
115
126
|
"manage:contact:readonly" : "Allows access to all contact readonly endpoints",
|
|
116
127
|
"manage:contact:create" : "Allows access to the contact 'create' endpoint",
|
|
@@ -139,6 +150,7 @@ export const AllScopes: Record<ExplicitScope, string> =
|
|
|
139
150
|
"manage:role:get:users" : "Allows access to the role 'list users' endpoint",
|
|
140
151
|
"manage:role:list" : "Allows access only to the role 'list' endpoint",
|
|
141
152
|
"manage:role:update:*" : "Allows access only to the role 'update' endpoint",
|
|
153
|
+
"manage:role:update:actions" : "Allows access only to the role 'update' endpoint, but restricting updates to the role 'actions' property",
|
|
142
154
|
"manage:role:update:enabled" : "Allows access only to the role 'update' endpoint, but restricting updates to the role 'enabled' property",
|
|
143
155
|
"manage:role:update:policy" : "Allows access only to the role 'update' endpoint, but restricting updates to the role 'policy' property",
|
|
144
156
|
"manage:role:update:editPolicy" : "Allows access only to the role 'update' endpoint, but restricting updates to the role 'edit_policy' property",
|
|
@@ -161,6 +173,8 @@ export const AllScopes: Record<ExplicitScope, string> =
|
|
|
161
173
|
"manage:org:audit:query" : "Allows access to retrieving org audit log",
|
|
162
174
|
"manage:org:readonly" : "Allows access to all org readonly endpoints",
|
|
163
175
|
"manage:org:addUser" : "Allows access only to the org endpoint for adding an OIDC user to the org",
|
|
176
|
+
"manage:org:invitation:list" : "Allows access only to the org endpoint for listing pending invitations",
|
|
177
|
+
"manage:org:invitation:cancel" : "Allows access only to the org endpoint for canceling pending invitations",
|
|
164
178
|
"manage:org:inviteUser" : "Allows access only to the org endpoint for inviting a new member or org owner to the org",
|
|
165
179
|
"manage:org:inviteAlien" : "Allows access only to the org endpoint for inviting a new alien user to the org",
|
|
166
180
|
"manage:org:updateMembership" : "Allows access only to the org endpoint for updating existing user's org membership",
|
|
@@ -169,6 +183,27 @@ export const AllScopes: Record<ExplicitScope, string> =
|
|
|
169
183
|
"manage:org:deleteUser" : "Allows access only to the org endpoint for deleting an OIDC user",
|
|
170
184
|
"manage:org:get" : "Allows access to retrieving organization information",
|
|
171
185
|
"manage:org:user:resetMfa" : "Allows an owner to initiate an MFA reset for a user",
|
|
186
|
+
"manage:org:update:*" : "Allows access to all org 'update' actions",
|
|
187
|
+
"manage:org:update:enabled" : "Allows updating the org 'enabled' property",
|
|
188
|
+
"manage:org:update:policy" : "Allows updating org-wide policies",
|
|
189
|
+
"manage:org:update:signPolicy" : "Allows updating org-wide sign policies",
|
|
190
|
+
"manage:org:update:export" : "Allows updating user-export settings (delay, window, disabled)",
|
|
191
|
+
"manage:org:update:totpFailureLimit" : "Allows updating the TOTP failure limit",
|
|
192
|
+
"manage:org:update:notificationEndpoints" : "Allows updating notification endpoints",
|
|
193
|
+
"manage:org:update:defaultInviteKind" : "Allows updating the default invite kind",
|
|
194
|
+
"manage:org:update:idpConfiguration" : "Allows updating IDP configuration",
|
|
195
|
+
"manage:org:update:passkeyConfiguration" : "Allows updating passkey configuration",
|
|
196
|
+
"manage:org:update:emailPreferences" : "Allows updating email preferences",
|
|
197
|
+
"manage:org:update:historicalData" : "Allows updating historical data configuration",
|
|
198
|
+
"manage:org:update:requireScopeCeiling" : "Allows updating the require_scope_ceiling setting",
|
|
199
|
+
"manage:org:update:alienLoginRequirement" : "Allows updating the alien login requirement",
|
|
200
|
+
"manage:org:update:memberLoginRequirement" : "Allows updating the member login requirement",
|
|
201
|
+
"manage:org:update:keyExportRequirement" : "Allows updating the key export requirement",
|
|
202
|
+
"manage:org:update:allowedMfaTypes" : "Allows updating allowed MFA types",
|
|
203
|
+
"manage:org:update:policyEngineConf" : "Allows updating the policy engine configuration",
|
|
204
|
+
"manage:org:update:customChains" : "Allows updating custom chains",
|
|
205
|
+
"manage:org:update:extProps" : "Allows updating extended org properties",
|
|
206
|
+
"manage:org:update:editPolicy" : "Allows updating the org's edit policy",
|
|
172
207
|
"manage:session:*" : "Allows access to all session endpoints",
|
|
173
208
|
"manage:session:readonly" : "Allows access to all session readonly endpoints",
|
|
174
209
|
"manage:session:get" : "Allows access only to the session 'get' endpoint",
|
|
@@ -200,6 +235,11 @@ export const AllScopes: Record<ExplicitScope, string> =
|
|
|
200
235
|
"mmi:*" : "Allows calls to the MMI endpoint",
|
|
201
236
|
"orgAccess:*" : "Allows access to certain orgs other than the current session's",
|
|
202
237
|
"orgAccess:child:*" : "Allows a session to be used for access to orgs transitively parented by the session's org.",
|
|
238
|
+
"rpc:*" : "Allows access to the RPC API endpoint",
|
|
239
|
+
"rpc:createTransaction:*" : "Allows access to the RPC API endpoint, but only for the 'cs_createTransaction' function.",
|
|
240
|
+
"rpc:createTransaction:evm" : "Allows access to the RPC API endpoint, but only for the 'cs_createTransaction' function with an EVM transaction request.",
|
|
241
|
+
"rpc:getTransaction" : "Allows access to the RPC API endpoint, but only for the 'cs_getTransaction' function.",
|
|
242
|
+
"rpc:listTransactions" : "Allows access to the RPC API endpoint, but only for the 'cs_listTransactions' function.",
|
|
203
243
|
};
|
|
204
244
|
|
|
205
245
|
// Const for scope category labels
|