@dfns/sdk 0.8.13 → 0.8.14-beta-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.
@@ -72,7 +72,7 @@ class AuthClient {
72
72
  async archiveServiceAccount(request) {
73
73
  const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId', {
74
74
  path: request ?? {},
75
- query: request.query ?? {},
75
+ query: {},
76
76
  });
77
77
  const response = await (0, userActionFetch_1.userActionFetch)(path, {
78
78
  method: 'DELETE',
@@ -336,7 +336,7 @@ class AuthClient {
336
336
  });
337
337
  const response = await (0, userActionFetch_1.userActionFetch)(path, {
338
338
  method: 'PUT',
339
- body: request.body,
339
+ body: {},
340
340
  apiOptions: this.apiOptions,
341
341
  });
342
342
  return response.json();
@@ -146,7 +146,7 @@ class DelegatedAuthClient {
146
146
  async archiveServiceAccountInit(request) {
147
147
  const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId', {
148
148
  path: request ?? {},
149
- query: request.query ?? {},
149
+ query: {},
150
150
  });
151
151
  const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
152
152
  userActionHttpMethod: 'DELETE',
@@ -159,7 +159,7 @@ class DelegatedAuthClient {
159
159
  async archiveServiceAccountComplete(request, signedChallenge) {
160
160
  const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId', {
161
161
  path: request ?? {},
162
- query: request.query ?? {},
162
+ query: {},
163
163
  });
164
164
  const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
165
165
  const response = await (0, fetch_1.simpleFetch)(path, {
@@ -564,7 +564,7 @@ class DelegatedAuthClient {
564
564
  const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
565
565
  userActionHttpMethod: 'PUT',
566
566
  userActionHttpPath: path,
567
- userActionPayload: JSON.stringify(request.body),
567
+ userActionPayload: JSON.stringify({}),
568
568
  userActionServerKind: 'Api',
569
569
  }, this.apiOptions);
570
570
  return challenge;
@@ -577,7 +577,7 @@ class DelegatedAuthClient {
577
577
  const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
578
578
  const response = await (0, fetch_1.simpleFetch)(path, {
579
579
  method: 'PUT',
580
- body: request.body,
580
+ body: {},
581
581
  headers: { 'x-dfns-useraction': userAction },
582
582
  apiOptions: this.apiOptions,
583
583
  });
@@ -129,10 +129,6 @@ export type ArchivePersonalAccessTokenRequest = ArchivePersonalAccessTokenParams
129
129
  export type ArchiveServiceAccountParams = {
130
130
  serviceAccountId: string;
131
131
  };
132
- export type ArchiveServiceAccountQuery = {
133
- /** If true, bypasses the policy approver check and deletes immediately. */
134
- force?: boolean;
135
- };
136
132
  export type ArchiveServiceAccountResponse = {
137
133
  userInfo: {
138
134
  username: string;
@@ -175,9 +171,7 @@ export type ArchiveServiceAccountResponse = {
175
171
  tokenId: string;
176
172
  }[];
177
173
  };
178
- export type ArchiveServiceAccountRequest = ArchiveServiceAccountParams & {
179
- query?: ArchiveServiceAccountQuery;
180
- };
174
+ export type ArchiveServiceAccountRequest = ArchiveServiceAccountParams;
181
175
  export type ArchiveUserParams = {
182
176
  userId: string;
183
177
  };
@@ -1335,10 +1329,6 @@ export type DeactivatePersonalAccessTokenResponse = {
1335
1329
  tokenId: string;
1336
1330
  };
1337
1331
  export type DeactivatePersonalAccessTokenRequest = DeactivatePersonalAccessTokenParams;
1338
- export type DeactivateServiceAccountBody = {
1339
- /** If true, bypasses the policy approver check and deactivates immediately. */
1340
- force?: boolean;
1341
- };
1342
1332
  export type DeactivateServiceAccountParams = {
1343
1333
  serviceAccountId: string;
1344
1334
  };
@@ -1384,9 +1374,7 @@ export type DeactivateServiceAccountResponse = {
1384
1374
  tokenId: string;
1385
1375
  }[];
1386
1376
  };
1387
- export type DeactivateServiceAccountRequest = DeactivateServiceAccountParams & {
1388
- body: DeactivateServiceAccountBody;
1389
- };
1377
+ export type DeactivateServiceAccountRequest = DeactivateServiceAccountParams;
1390
1378
  export type DeactivateUserParams = {
1391
1379
  userId: string;
1392
1380
  };
@@ -52,7 +52,7 @@ export type CreatePermissionBody = {
52
52
  /** Human-readable name for the permission (role). */
53
53
  name: string;
54
54
  /** List of API operations this permission grants access to. See [Permissions List](https://docs.dfns.co/core-concepts/roles-and-permissions#list-of-permissions) for available operations. */
55
- operations: (("Registry:Addresses:Create" | "Registry:Addresses:Delete" | "Registry:Addresses:Read" | "Registry:Addresses:Update" | "Registry:ContractSchemas:Create" | "Registry:ContractSchemas:Delete" | "Registry:ContractSchemas:Read" | "Auth:Logs:Read" | "Auth:Users:Create" | "Auth:Users:Read" | "Auth:Users:Update" | "Auth:Users:Activate" | "Auth:Users:Deactivate" | "Auth:Users:Delete" | "Auth:ServiceAccounts:Create" | "Auth:ServiceAccounts:Read" | "Auth:ServiceAccounts:Update" | "Auth:ServiceAccounts:Deactivate" | "Auth:ServiceAccounts:Activate" | "Auth:ServiceAccounts:Delete" | "Auth:Pats:Create" | "Auth:Register:Delegated" | "Auth:Login:Delegated" | "Auth:Recover:Delegated" | "Agreements:Acceptance:Create" | "Agreements:Acceptance:Read" | "Events:Read" | "Exchanges:Create" | "Exchanges:Read" | "Exchanges:Delete" | "Exchanges:Deposits:Create" | "Exchanges:Withdrawals:Create" | "FeeSponsors:Create" | "FeeSponsors:Read" | "FeeSponsors:Update" | "FeeSponsors:Delete" | "FeeSponsors:Use" | "Orgs:Read" | "Orgs:Update" | "Orgs:Settings:Read" | "Orgs:Settings:Update" | "Permissions:Archive" | "Permissions:Create" | "Permissions:Read" | "Permissions:Update" | "Permissions:Assign" | "Permissions:Revoke" | "Permissions:Assignments:Read" | "Policies:Archive" | "Policies:Create" | "Policies:Read" | "Policies:Update" | "Policies:Approvals:Read" | "Policies:Approvals:Approve" | "Signers:ListSigners" | "Stakes:Create" | "Stakes:Read" | "Stakes:Update" | "Swaps:Create" | "Swaps:Read" | "Payouts:Create" | "Payouts:Read" | "Payouts:Write" | "Allocations:Create" | "Allocations:Update" | "Allocations:Read" | "Keys:Create" | "Keys:Delete" | "Keys:Read" | "Keys:Update" | "Keys:Reuse" | "Keys:Delegate" | "Keys:Import" | "Keys:Export" | "Keys:Derive" | "Keys:ChildKeys:Create" | "Keys:Signatures:Create" | "Keys:Signatures:Read" | "KeyStores:Read" | "Networks:CantonValidators:Create" | "Networks:CantonValidators:Read" | "Networks:CantonValidators:Update" | "Networks:CantonValidators:Delete" | "Wallets:Create" | "Wallets:Read" | "Wallets:Update" | "Wallets:Tags:Add" | "Wallets:Tags:Delete" | "Wallets:Transactions:Create" | "Wallets:Transactions:Read" | "Wallets:Transfers:Create" | "Wallets:Transfers:Read" | "Wallets:Offers:Read" | "Wallets:Offers:Settle" | "Vaults:Create" | "Vaults:Read" | "Vaults:Update" | "Vaults:Tags:Add" | "Vaults:Tags:Delete" | "Webhooks:Create" | "Webhooks:Read" | "Webhooks:Update" | "Webhooks:Delete" | "Webhooks:Ping" | "Webhooks:Events:Read" | "Billing:Read" | "Billing:Write" | "Analytics:Read") | ("Alias:Create" | "Alias:Delete" | "Alias:Read" | "Alias:Update" | "Wallets:GenerateSignature" | "Wallets:BroadcastTransaction" | "Auth:Action:Sign" | "Auth:Apps:Read" | "Auth:Apps:Create" | "Auth:Apps:Update" | "Auth:Creds:Create" | "Auth:Creds:Read" | "Auth:Creds:Update" | "Auth:Creds:Code:Create" | "Auth:Types:Application" | "Auth:Types:Employee" | "Auth:Types:EndUser" | "Auth:Types:Pat" | "Auth:Types:ServiceAccount" | "Internal:Auth:Types:Staff" | "Auth:Users:Delegate" | "PermissionAssignments:Create" | "PermissionAssignments:Read" | "PermissionAssignments:Revoke"))[];
55
+ operations: (("Registry:Addresses:Create" | "Registry:Addresses:Delete" | "Registry:Addresses:Read" | "Registry:Addresses:Update" | "Registry:ContractSchemas:Create" | "Registry:ContractSchemas:Delete" | "Registry:ContractSchemas:Read" | "Auth:Logs:Read" | "Auth:Users:Create" | "Auth:Users:Read" | "Auth:Users:Update" | "Auth:Users:Activate" | "Auth:Users:Deactivate" | "Auth:Users:Delete" | "Auth:ServiceAccounts:Create" | "Auth:ServiceAccounts:Read" | "Auth:ServiceAccounts:Update" | "Auth:ServiceAccounts:Deactivate" | "Auth:ServiceAccounts:Activate" | "Auth:ServiceAccounts:Delete" | "Auth:Pats:Create" | "Auth:Register:Delegated" | "Auth:Login:Delegated" | "Auth:Recover:Delegated" | "Agreements:Acceptance:Create" | "Agreements:Acceptance:Read" | "Events:Read" | "Exchanges:Create" | "Exchanges:Read" | "Exchanges:Delete" | "Exchanges:Deposits:Create" | "Exchanges:Withdrawals:Create" | "FeeSponsors:Create" | "FeeSponsors:Read" | "FeeSponsors:Update" | "FeeSponsors:Delete" | "FeeSponsors:Use" | "Orgs:Read" | "Orgs:Update" | "Orgs:Settings:Read" | "Orgs:Settings:Update" | "Permissions:Archive" | "Permissions:Create" | "Permissions:Read" | "Permissions:Update" | "Permissions:Assign" | "Permissions:Revoke" | "Permissions:Assignments:Read" | "Policies:Archive" | "Policies:Create" | "Policies:Read" | "Policies:Update" | "Policies:Approvals:Read" | "Policies:Approvals:Approve" | "Signers:ListSigners" | "Stakes:Create" | "Stakes:Read" | "Stakes:Update" | "Swaps:Create" | "Swaps:Read" | "Payouts:Create" | "Payouts:Read" | "Payouts:Write" | "Allocations:Create" | "Allocations:Update" | "Allocations:Read" | "Keys:Create" | "Keys:Delete" | "Keys:Read" | "Keys:Update" | "Keys:Reuse" | "Keys:Delegate" | "Keys:Import" | "Keys:Export" | "Keys:Derive" | "Keys:ChildKeys:Create" | "Keys:Signatures:Create" | "Keys:Signatures:Read" | "KeyStores:Read" | "Networks:CantonValidators:Create" | "Networks:CantonValidators:Read" | "Networks:CantonValidators:Update" | "Networks:CantonValidators:Delete" | "Wallets:Create" | "Wallets:Read" | "Wallets:Update" | "Wallets:Tags:Add" | "Wallets:Tags:Delete" | "Wallets:Transactions:Create" | "Wallets:Transactions:Read" | "Wallets:Transactions:Update" | "Wallets:Transfers:Create" | "Wallets:Transfers:Read" | "Wallets:Transfers:Update" | "Wallets:Offers:Read" | "Wallets:Offers:Settle" | "Vaults:Create" | "Vaults:Read" | "Vaults:Update" | "Vaults:Tags:Add" | "Vaults:Tags:Delete" | "Webhooks:Create" | "Webhooks:Read" | "Webhooks:Update" | "Webhooks:Delete" | "Webhooks:Ping" | "Webhooks:Events:Read" | "Billing:Read" | "Billing:Write" | "Analytics:Read") | ("Alias:Create" | "Alias:Delete" | "Alias:Read" | "Alias:Update" | "Wallets:GenerateSignature" | "Wallets:BroadcastTransaction" | "Auth:Action:Sign" | "Auth:Apps:Read" | "Auth:Apps:Create" | "Auth:Apps:Update" | "Auth:Creds:Create" | "Auth:Creds:Read" | "Auth:Creds:Update" | "Auth:Creds:Code:Create" | "Auth:Types:Application" | "Auth:Types:Employee" | "Auth:Types:EndUser" | "Auth:Types:Pat" | "Auth:Types:ServiceAccount" | "Internal:Auth:Types:Staff" | "Auth:Users:Delegate" | "PermissionAssignments:Create" | "PermissionAssignments:Read" | "PermissionAssignments:Revoke"))[];
56
56
  };
57
57
  export type CreatePermissionResponse = {
58
58
  /** ID of the permission (also referred to as "role" in the dashboard). */
@@ -270,7 +270,7 @@ export type UpdatePermissionBody = {
270
270
  /** New name for the permission (role). */
271
271
  name?: string | undefined;
272
272
  /** New list of API operations this permission grants access to. See [Permissions List](https://docs.dfns.co/core-concepts/roles-and-permissions#list-of-permissions) for available operations. */
273
- operations?: (("Registry:Addresses:Create" | "Registry:Addresses:Delete" | "Registry:Addresses:Read" | "Registry:Addresses:Update" | "Registry:ContractSchemas:Create" | "Registry:ContractSchemas:Delete" | "Registry:ContractSchemas:Read" | "Auth:Logs:Read" | "Auth:Users:Create" | "Auth:Users:Read" | "Auth:Users:Update" | "Auth:Users:Activate" | "Auth:Users:Deactivate" | "Auth:Users:Delete" | "Auth:ServiceAccounts:Create" | "Auth:ServiceAccounts:Read" | "Auth:ServiceAccounts:Update" | "Auth:ServiceAccounts:Deactivate" | "Auth:ServiceAccounts:Activate" | "Auth:ServiceAccounts:Delete" | "Auth:Pats:Create" | "Auth:Register:Delegated" | "Auth:Login:Delegated" | "Auth:Recover:Delegated" | "Agreements:Acceptance:Create" | "Agreements:Acceptance:Read" | "Events:Read" | "Exchanges:Create" | "Exchanges:Read" | "Exchanges:Delete" | "Exchanges:Deposits:Create" | "Exchanges:Withdrawals:Create" | "FeeSponsors:Create" | "FeeSponsors:Read" | "FeeSponsors:Update" | "FeeSponsors:Delete" | "FeeSponsors:Use" | "Orgs:Read" | "Orgs:Update" | "Orgs:Settings:Read" | "Orgs:Settings:Update" | "Permissions:Archive" | "Permissions:Create" | "Permissions:Read" | "Permissions:Update" | "Permissions:Assign" | "Permissions:Revoke" | "Permissions:Assignments:Read" | "Policies:Archive" | "Policies:Create" | "Policies:Read" | "Policies:Update" | "Policies:Approvals:Read" | "Policies:Approvals:Approve" | "Signers:ListSigners" | "Stakes:Create" | "Stakes:Read" | "Stakes:Update" | "Swaps:Create" | "Swaps:Read" | "Payouts:Create" | "Payouts:Read" | "Payouts:Write" | "Allocations:Create" | "Allocations:Update" | "Allocations:Read" | "Keys:Create" | "Keys:Delete" | "Keys:Read" | "Keys:Update" | "Keys:Reuse" | "Keys:Delegate" | "Keys:Import" | "Keys:Export" | "Keys:Derive" | "Keys:ChildKeys:Create" | "Keys:Signatures:Create" | "Keys:Signatures:Read" | "KeyStores:Read" | "Networks:CantonValidators:Create" | "Networks:CantonValidators:Read" | "Networks:CantonValidators:Update" | "Networks:CantonValidators:Delete" | "Wallets:Create" | "Wallets:Read" | "Wallets:Update" | "Wallets:Tags:Add" | "Wallets:Tags:Delete" | "Wallets:Transactions:Create" | "Wallets:Transactions:Read" | "Wallets:Transfers:Create" | "Wallets:Transfers:Read" | "Wallets:Offers:Read" | "Wallets:Offers:Settle" | "Vaults:Create" | "Vaults:Read" | "Vaults:Update" | "Vaults:Tags:Add" | "Vaults:Tags:Delete" | "Webhooks:Create" | "Webhooks:Read" | "Webhooks:Update" | "Webhooks:Delete" | "Webhooks:Ping" | "Webhooks:Events:Read" | "Billing:Read" | "Billing:Write" | "Analytics:Read") | ("Alias:Create" | "Alias:Delete" | "Alias:Read" | "Alias:Update" | "Wallets:GenerateSignature" | "Wallets:BroadcastTransaction" | "Auth:Action:Sign" | "Auth:Apps:Read" | "Auth:Apps:Create" | "Auth:Apps:Update" | "Auth:Creds:Create" | "Auth:Creds:Read" | "Auth:Creds:Update" | "Auth:Creds:Code:Create" | "Auth:Types:Application" | "Auth:Types:Employee" | "Auth:Types:EndUser" | "Auth:Types:Pat" | "Auth:Types:ServiceAccount" | "Internal:Auth:Types:Staff" | "Auth:Users:Delegate" | "PermissionAssignments:Create" | "PermissionAssignments:Read" | "PermissionAssignments:Revoke"))[] | undefined;
273
+ operations?: (("Registry:Addresses:Create" | "Registry:Addresses:Delete" | "Registry:Addresses:Read" | "Registry:Addresses:Update" | "Registry:ContractSchemas:Create" | "Registry:ContractSchemas:Delete" | "Registry:ContractSchemas:Read" | "Auth:Logs:Read" | "Auth:Users:Create" | "Auth:Users:Read" | "Auth:Users:Update" | "Auth:Users:Activate" | "Auth:Users:Deactivate" | "Auth:Users:Delete" | "Auth:ServiceAccounts:Create" | "Auth:ServiceAccounts:Read" | "Auth:ServiceAccounts:Update" | "Auth:ServiceAccounts:Deactivate" | "Auth:ServiceAccounts:Activate" | "Auth:ServiceAccounts:Delete" | "Auth:Pats:Create" | "Auth:Register:Delegated" | "Auth:Login:Delegated" | "Auth:Recover:Delegated" | "Agreements:Acceptance:Create" | "Agreements:Acceptance:Read" | "Events:Read" | "Exchanges:Create" | "Exchanges:Read" | "Exchanges:Delete" | "Exchanges:Deposits:Create" | "Exchanges:Withdrawals:Create" | "FeeSponsors:Create" | "FeeSponsors:Read" | "FeeSponsors:Update" | "FeeSponsors:Delete" | "FeeSponsors:Use" | "Orgs:Read" | "Orgs:Update" | "Orgs:Settings:Read" | "Orgs:Settings:Update" | "Permissions:Archive" | "Permissions:Create" | "Permissions:Read" | "Permissions:Update" | "Permissions:Assign" | "Permissions:Revoke" | "Permissions:Assignments:Read" | "Policies:Archive" | "Policies:Create" | "Policies:Read" | "Policies:Update" | "Policies:Approvals:Read" | "Policies:Approvals:Approve" | "Signers:ListSigners" | "Stakes:Create" | "Stakes:Read" | "Stakes:Update" | "Swaps:Create" | "Swaps:Read" | "Payouts:Create" | "Payouts:Read" | "Payouts:Write" | "Allocations:Create" | "Allocations:Update" | "Allocations:Read" | "Keys:Create" | "Keys:Delete" | "Keys:Read" | "Keys:Update" | "Keys:Reuse" | "Keys:Delegate" | "Keys:Import" | "Keys:Export" | "Keys:Derive" | "Keys:ChildKeys:Create" | "Keys:Signatures:Create" | "Keys:Signatures:Read" | "KeyStores:Read" | "Networks:CantonValidators:Create" | "Networks:CantonValidators:Read" | "Networks:CantonValidators:Update" | "Networks:CantonValidators:Delete" | "Wallets:Create" | "Wallets:Read" | "Wallets:Update" | "Wallets:Tags:Add" | "Wallets:Tags:Delete" | "Wallets:Transactions:Create" | "Wallets:Transactions:Read" | "Wallets:Transactions:Update" | "Wallets:Transfers:Create" | "Wallets:Transfers:Read" | "Wallets:Transfers:Update" | "Wallets:Offers:Read" | "Wallets:Offers:Settle" | "Vaults:Create" | "Vaults:Read" | "Vaults:Update" | "Vaults:Tags:Add" | "Vaults:Tags:Delete" | "Webhooks:Create" | "Webhooks:Read" | "Webhooks:Update" | "Webhooks:Delete" | "Webhooks:Ping" | "Webhooks:Events:Read" | "Billing:Read" | "Billing:Write" | "Analytics:Read") | ("Alias:Create" | "Alias:Delete" | "Alias:Read" | "Alias:Update" | "Wallets:GenerateSignature" | "Wallets:BroadcastTransaction" | "Auth:Action:Sign" | "Auth:Apps:Read" | "Auth:Apps:Create" | "Auth:Apps:Update" | "Auth:Creds:Create" | "Auth:Creds:Read" | "Auth:Creds:Update" | "Auth:Creds:Code:Create" | "Auth:Types:Application" | "Auth:Types:Employee" | "Auth:Types:EndUser" | "Auth:Types:Pat" | "Auth:Types:ServiceAccount" | "Internal:Auth:Types:Staff" | "Auth:Users:Delegate" | "PermissionAssignments:Create" | "PermissionAssignments:Read" | "PermissionAssignments:Revoke"))[] | undefined;
274
274
  };
275
275
  export type UpdatePermissionParams = {
276
276
  /** ID of the permission (also referred to as "role" in the dashboard). */