@dfns/sdk 0.8.12 → 0.8.13
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/generated/auth/client.js +2 -2
- package/generated/auth/delegatedClient.js +4 -4
- package/generated/auth/types.d.ts +14 -2
- package/generated/networks/types.d.ts +14 -1
- package/generated/payouts/client.d.ts +1 -0
- package/generated/payouts/client.js +11 -0
- package/generated/payouts/delegatedClient.d.ts +1 -0
- package/generated/payouts/delegatedClient.js +11 -0
- package/generated/payouts/types.d.ts +103 -0
- package/generated/permissions/client.js +1 -1
- package/generated/permissions/delegatedClient.js +1 -1
- package/generated/permissions/types.d.ts +93 -2
- package/generated/policies/types.d.ts +198 -0
- package/generated/swaps/types.d.ts +6 -0
- package/package.json +1 -1
- package/utils/url.d.ts +1 -1
- package/utils/url.js +11 -2
package/generated/auth/client.js
CHANGED
|
@@ -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: {},
|
|
75
|
+
query: request.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:
|
|
339
|
+
body: request.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: {},
|
|
149
|
+
query: request.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: {},
|
|
162
|
+
query: request.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(
|
|
567
|
+
userActionPayload: JSON.stringify(request.body),
|
|
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:
|
|
580
|
+
body: request.body,
|
|
581
581
|
headers: { 'x-dfns-useraction': userAction },
|
|
582
582
|
apiOptions: this.apiOptions,
|
|
583
583
|
});
|
|
@@ -129,6 +129,10 @@ 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
|
+
};
|
|
132
136
|
export type ArchiveServiceAccountResponse = {
|
|
133
137
|
userInfo: {
|
|
134
138
|
username: string;
|
|
@@ -171,7 +175,9 @@ export type ArchiveServiceAccountResponse = {
|
|
|
171
175
|
tokenId: string;
|
|
172
176
|
}[];
|
|
173
177
|
};
|
|
174
|
-
export type ArchiveServiceAccountRequest = ArchiveServiceAccountParams
|
|
178
|
+
export type ArchiveServiceAccountRequest = ArchiveServiceAccountParams & {
|
|
179
|
+
query?: ArchiveServiceAccountQuery;
|
|
180
|
+
};
|
|
175
181
|
export type ArchiveUserParams = {
|
|
176
182
|
userId: string;
|
|
177
183
|
};
|
|
@@ -1329,6 +1335,10 @@ export type DeactivatePersonalAccessTokenResponse = {
|
|
|
1329
1335
|
tokenId: string;
|
|
1330
1336
|
};
|
|
1331
1337
|
export type DeactivatePersonalAccessTokenRequest = DeactivatePersonalAccessTokenParams;
|
|
1338
|
+
export type DeactivateServiceAccountBody = {
|
|
1339
|
+
/** If true, bypasses the policy approver check and deactivates immediately. */
|
|
1340
|
+
force?: boolean;
|
|
1341
|
+
};
|
|
1332
1342
|
export type DeactivateServiceAccountParams = {
|
|
1333
1343
|
serviceAccountId: string;
|
|
1334
1344
|
};
|
|
@@ -1374,7 +1384,9 @@ export type DeactivateServiceAccountResponse = {
|
|
|
1374
1384
|
tokenId: string;
|
|
1375
1385
|
}[];
|
|
1376
1386
|
};
|
|
1377
|
-
export type DeactivateServiceAccountRequest = DeactivateServiceAccountParams
|
|
1387
|
+
export type DeactivateServiceAccountRequest = DeactivateServiceAccountParams & {
|
|
1388
|
+
body: DeactivateServiceAccountBody;
|
|
1389
|
+
};
|
|
1378
1390
|
export type DeactivateUserParams = {
|
|
1379
1391
|
userId: string;
|
|
1380
1392
|
};
|
|
@@ -120,7 +120,7 @@ export type GetCantonValidatorResponse = {
|
|
|
120
120
|
};
|
|
121
121
|
export type GetCantonValidatorRequest = GetCantonValidatorParams;
|
|
122
122
|
export type GetFeesQuery = {
|
|
123
|
-
network: "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "Ink" | "InkSepolia" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Race" | "RaceSepolia" | "Sonic" | "SonicTestnet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1";
|
|
123
|
+
network: "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "Ink" | "InkSepolia" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Race" | "RaceSepolia" | "Sonic" | "SonicTestnet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Solana" | "SolanaDevnet";
|
|
124
124
|
};
|
|
125
125
|
export type GetFeesResponse = {
|
|
126
126
|
kind: "Bitcoin";
|
|
@@ -155,6 +155,19 @@ export type GetFeesResponse = {
|
|
|
155
155
|
maxFeePerGas: string;
|
|
156
156
|
};
|
|
157
157
|
baseFeePerGas: string;
|
|
158
|
+
} | {
|
|
159
|
+
kind: "Solana";
|
|
160
|
+
network: "Solana" | "SolanaDevnet";
|
|
161
|
+
blockNumber: number;
|
|
162
|
+
slow: {
|
|
163
|
+
computeUnitPrice: string;
|
|
164
|
+
};
|
|
165
|
+
standard: {
|
|
166
|
+
computeUnitPrice: string;
|
|
167
|
+
};
|
|
168
|
+
fast: {
|
|
169
|
+
computeUnitPrice: string;
|
|
170
|
+
};
|
|
158
171
|
};
|
|
159
172
|
export type GetFeesRequest = {
|
|
160
173
|
query?: GetFeesQuery;
|
|
@@ -7,4 +7,5 @@ export declare class PayoutsClient {
|
|
|
7
7
|
createPayoutAction(request: T.CreatePayoutActionRequest): Promise<T.CreatePayoutActionResponse>;
|
|
8
8
|
createPayoutQuote(request: T.CreatePayoutQuoteRequest): Promise<T.CreatePayoutQuoteResponse>;
|
|
9
9
|
getPayout(request: T.GetPayoutRequest): Promise<T.GetPayoutResponse>;
|
|
10
|
+
listPayouts(request?: T.ListPayoutsRequest): Promise<T.ListPayoutsResponse>;
|
|
10
11
|
}
|
|
@@ -56,5 +56,16 @@ class PayoutsClient {
|
|
|
56
56
|
});
|
|
57
57
|
return response.json();
|
|
58
58
|
}
|
|
59
|
+
async listPayouts(request) {
|
|
60
|
+
const path = (0, url_1.buildPathAndQuery)('/payouts', {
|
|
61
|
+
path: request ?? {},
|
|
62
|
+
query: request?.query ?? {},
|
|
63
|
+
});
|
|
64
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
65
|
+
method: 'GET',
|
|
66
|
+
apiOptions: this.apiOptions,
|
|
67
|
+
});
|
|
68
|
+
return response.json();
|
|
69
|
+
}
|
|
59
70
|
}
|
|
60
71
|
exports.PayoutsClient = PayoutsClient;
|
|
@@ -10,4 +10,5 @@ export declare class DelegatedPayoutsClient {
|
|
|
10
10
|
createPayoutActionComplete(request: T.CreatePayoutActionRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreatePayoutActionResponse>;
|
|
11
11
|
createPayoutQuote(request: T.CreatePayoutQuoteRequest): Promise<T.CreatePayoutQuoteResponse>;
|
|
12
12
|
getPayout(request: T.GetPayoutRequest): Promise<T.GetPayoutResponse>;
|
|
13
|
+
listPayouts(request?: T.ListPayoutsRequest): Promise<T.ListPayoutsResponse>;
|
|
13
14
|
}
|
|
@@ -85,5 +85,16 @@ class DelegatedPayoutsClient {
|
|
|
85
85
|
});
|
|
86
86
|
return response.json();
|
|
87
87
|
}
|
|
88
|
+
async listPayouts(request) {
|
|
89
|
+
const path = (0, url_1.buildPathAndQuery)('/payouts', {
|
|
90
|
+
path: request ?? {},
|
|
91
|
+
query: request?.query ?? {},
|
|
92
|
+
});
|
|
93
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
94
|
+
method: 'GET',
|
|
95
|
+
apiOptions: this.apiOptions,
|
|
96
|
+
});
|
|
97
|
+
return response.json();
|
|
98
|
+
}
|
|
88
99
|
}
|
|
89
100
|
exports.DelegatedPayoutsClient = DelegatedPayoutsClient;
|
|
@@ -322,3 +322,106 @@ export type GetPayoutResponse = {
|
|
|
322
322
|
};
|
|
323
323
|
};
|
|
324
324
|
export type GetPayoutRequest = GetPayoutParams;
|
|
325
|
+
export type ListPayoutsQuery = {
|
|
326
|
+
/** Maximum number of items to return. */
|
|
327
|
+
limit?: number | undefined;
|
|
328
|
+
/** Opaque token used to retrieve the next page. Returned as `nextPageToken` from the previous request. */
|
|
329
|
+
paginationToken?: string | undefined;
|
|
330
|
+
/** Filter payouts by wallet ID. */
|
|
331
|
+
walletId?: string | undefined;
|
|
332
|
+
/** Filter payouts by status (comma-separated). */
|
|
333
|
+
status?: ("Processing" | "Completed" | "Failed" | "Rejected" | "Expired" | "Canceled")[] | undefined;
|
|
334
|
+
};
|
|
335
|
+
export type ListPayoutsResponse = {
|
|
336
|
+
/** Current page items. */
|
|
337
|
+
items: ({
|
|
338
|
+
/** Payout id. */
|
|
339
|
+
id: string;
|
|
340
|
+
/** The wallet ID used for the payout. */
|
|
341
|
+
walletId: string;
|
|
342
|
+
/** ISO-4217 fiat currency code for the payout. */
|
|
343
|
+
fiatCurrency: string;
|
|
344
|
+
/** The asset being paid out, including token descriptor and metadata. */
|
|
345
|
+
asset: {
|
|
346
|
+
kind: "Erc20";
|
|
347
|
+
/** The amount of the asset to be paid out in minimum denomination. */
|
|
348
|
+
amount: string;
|
|
349
|
+
/** The ERC-20 contract address. */
|
|
350
|
+
contract: string;
|
|
351
|
+
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "XrpLedger" | "XrpLedgerTestnet";
|
|
352
|
+
metadata?: {
|
|
353
|
+
/** The display name of the token. */
|
|
354
|
+
name?: string | undefined;
|
|
355
|
+
/** The ticker symbol of the token. */
|
|
356
|
+
symbol?: string | undefined;
|
|
357
|
+
/** Number of decimals used by the token. */
|
|
358
|
+
decimals: number;
|
|
359
|
+
/** Whether the token is verified by DFNS as legitimate. */
|
|
360
|
+
verified?: boolean | undefined;
|
|
361
|
+
} | undefined;
|
|
362
|
+
} | {
|
|
363
|
+
kind: "Spl" | "Spl2022";
|
|
364
|
+
/** The amount of the asset to be paid out in minimum denomination. */
|
|
365
|
+
amount: string;
|
|
366
|
+
/** The token mint address. */
|
|
367
|
+
mint: string;
|
|
368
|
+
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "XrpLedger" | "XrpLedgerTestnet";
|
|
369
|
+
metadata?: {
|
|
370
|
+
/** The display name of the token. */
|
|
371
|
+
name?: string | undefined;
|
|
372
|
+
/** The ticker symbol of the token. */
|
|
373
|
+
symbol?: string | undefined;
|
|
374
|
+
/** Number of decimals used by the token. */
|
|
375
|
+
decimals: number;
|
|
376
|
+
/** Whether the token is verified by DFNS as legitimate. */
|
|
377
|
+
verified?: boolean | undefined;
|
|
378
|
+
} | undefined;
|
|
379
|
+
};
|
|
380
|
+
/** Optional external identifier for idempotency. */
|
|
381
|
+
externalId?: string | undefined;
|
|
382
|
+
/** The current status of the payout. */
|
|
383
|
+
status: "Processing" | "Completed" | "Failed" | "Rejected" | "Expired" | "Canceled";
|
|
384
|
+
/** The user/token that initiated the payout. */
|
|
385
|
+
requester: {
|
|
386
|
+
/** User id. */
|
|
387
|
+
userId: string;
|
|
388
|
+
/** Token id. */
|
|
389
|
+
tokenId?: string | undefined;
|
|
390
|
+
};
|
|
391
|
+
dateCreated: string;
|
|
392
|
+
dateFinalized?: string | undefined;
|
|
393
|
+
provider: "Borderless";
|
|
394
|
+
/** Borderless provider-specific payout data. */
|
|
395
|
+
data: {
|
|
396
|
+
/** The Borderless account ID associated with the payout. */
|
|
397
|
+
borderlessAccountId: string;
|
|
398
|
+
/** The Borderless payment instructions ID linked to the destination bank account. */
|
|
399
|
+
paymentInstructionsId: string;
|
|
400
|
+
/** The purpose of the withdrawal payment. */
|
|
401
|
+
paymentPurpose: "salary payment" | "personal remittance" | "rent payment" | "property purchase" | "owned account abroad" | "advertising expenses" | "advisory fees" | "business insurance" | "construction" | "delivery fees" | "education" | "exports" | "donation" | "hotel" | "loan payment" | "maintenance expenses" | "medical expense" | "office expenses" | "royalty fees" | "service charge" | "shares investment" | "tax payment" | "transportation fees" | "travel" | "utility bills" | "other";
|
|
402
|
+
dateConfirmed?: string | undefined;
|
|
403
|
+
dateCanceled?: string | undefined;
|
|
404
|
+
/** The Borderless execution status. */
|
|
405
|
+
executionStatus: "Initializing" | "AwaitingPayoutInstructions" | "AwaitingPayoutConfirmation" | "SubmittingPayoutTransfer" | "PendingPolicyApproval" | "DepositProcessing" | "DisbursementPending" | "Completed" | "Rejected" | "Failed" | "Expired" | "Canceled";
|
|
406
|
+
/** Reason for the current status, primarily for failure cases. */
|
|
407
|
+
statusReason?: string | undefined;
|
|
408
|
+
/** ISO-3166 Alpha-2 country code for the payout destination. */
|
|
409
|
+
country: string;
|
|
410
|
+
/** The ID assigned by Borderless when the payout is created. */
|
|
411
|
+
borderlessPayoutId?: string | undefined;
|
|
412
|
+
/** The on-chain address to remit funds to. */
|
|
413
|
+
depositAddress?: string | undefined;
|
|
414
|
+
/** The Dfns transfer ID used to settle the payout. */
|
|
415
|
+
transferId?: string | undefined;
|
|
416
|
+
/** The blockchain transaction hash once the transfer is confirmed. */
|
|
417
|
+
transactionHash?: string | undefined;
|
|
418
|
+
dateDepositConfirmed?: string | undefined;
|
|
419
|
+
datePayoutConfirmed?: string | undefined;
|
|
420
|
+
};
|
|
421
|
+
})[];
|
|
422
|
+
/** token to use as `paginationToken` to request the next page. */
|
|
423
|
+
nextPageToken?: string | undefined;
|
|
424
|
+
};
|
|
425
|
+
export type ListPayoutsRequest = {
|
|
426
|
+
query?: ListPayoutsQuery;
|
|
427
|
+
};
|
|
@@ -70,7 +70,7 @@ class PermissionsClient {
|
|
|
70
70
|
async listAssignments(request) {
|
|
71
71
|
const path = (0, url_1.buildPathAndQuery)('/permissions/:permissionId/assignments', {
|
|
72
72
|
path: request ?? {},
|
|
73
|
-
query: {},
|
|
73
|
+
query: request.query ?? {},
|
|
74
74
|
});
|
|
75
75
|
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
76
76
|
method: 'GET',
|
|
@@ -129,7 +129,7 @@ class DelegatedPermissionsClient {
|
|
|
129
129
|
async listAssignments(request) {
|
|
130
130
|
const path = (0, url_1.buildPathAndQuery)('/permissions/:permissionId/assignments', {
|
|
131
131
|
path: request ?? {},
|
|
132
|
-
query: {},
|
|
132
|
+
query: request.query ?? {},
|
|
133
133
|
});
|
|
134
134
|
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
135
135
|
method: 'GET',
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
export type ArchivePermissionBody = {
|
|
2
|
+
/** Set to true to archive, false to unarchive. */
|
|
2
3
|
isArchived: boolean;
|
|
3
4
|
};
|
|
4
5
|
export type ArchivePermissionParams = {
|
|
6
|
+
/** ID of the permission (also referred to as "role" in the dashboard). */
|
|
5
7
|
permissionId: string;
|
|
6
8
|
};
|
|
7
9
|
export type ArchivePermissionResponse = {
|
|
10
|
+
/** ID of the permission (also referred to as "role" in the dashboard). */
|
|
8
11
|
id: string;
|
|
12
|
+
/** Human-readable name of the permission (role). */
|
|
9
13
|
name: string;
|
|
14
|
+
/** 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. */
|
|
10
15
|
operations: string[];
|
|
16
|
+
/** Current status of the permission. */
|
|
11
17
|
status: "Active";
|
|
18
|
+
/** Whether this permission is system-managed and cannot be modified. */
|
|
12
19
|
isImmutable: boolean;
|
|
20
|
+
/** Whether this permission has been archived (soft-deleted). */
|
|
13
21
|
isArchived: boolean;
|
|
14
22
|
dateCreated: string;
|
|
15
23
|
dateUpdated: string;
|
|
@@ -18,15 +26,21 @@ export type ArchivePermissionRequest = ArchivePermissionParams & {
|
|
|
18
26
|
body: ArchivePermissionBody;
|
|
19
27
|
};
|
|
20
28
|
export type CreateAssignmentBody = {
|
|
29
|
+
/** ID of the identity to assign the permission to. Can be a user ID, a service account ID, or a personal access token (PAT) ID. */
|
|
21
30
|
identityId: string;
|
|
22
31
|
};
|
|
23
32
|
export type CreateAssignmentParams = {
|
|
33
|
+
/** ID of the permission (also referred to as "role" in the dashboard). */
|
|
24
34
|
permissionId: string;
|
|
25
35
|
};
|
|
26
36
|
export type CreateAssignmentResponse = {
|
|
37
|
+
/** ID of the permission assignment. */
|
|
27
38
|
id: string;
|
|
39
|
+
/** ID of the permission (also referred to as "role" in the dashboard). */
|
|
28
40
|
permissionId: string;
|
|
41
|
+
/** ID of the identity the permission is assigned to. Can be a user ID, a service account ID, or a personal access token (PAT) ID. */
|
|
29
42
|
identityId: string;
|
|
43
|
+
/** Whether this assignment is system-managed and cannot be modified. */
|
|
30
44
|
isImmutable: boolean;
|
|
31
45
|
dateCreated: string;
|
|
32
46
|
dateUpdated: string;
|
|
@@ -35,15 +49,23 @@ export type CreateAssignmentRequest = CreateAssignmentParams & {
|
|
|
35
49
|
body: CreateAssignmentBody;
|
|
36
50
|
};
|
|
37
51
|
export type CreatePermissionBody = {
|
|
52
|
+
/** Human-readable name for the permission (role). */
|
|
38
53
|
name: string;
|
|
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. */
|
|
39
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"))[];
|
|
40
56
|
};
|
|
41
57
|
export type CreatePermissionResponse = {
|
|
58
|
+
/** ID of the permission (also referred to as "role" in the dashboard). */
|
|
42
59
|
id: string;
|
|
60
|
+
/** Human-readable name of the permission (role). */
|
|
43
61
|
name: string;
|
|
62
|
+
/** 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. */
|
|
44
63
|
operations: string[];
|
|
64
|
+
/** Current status of the permission. */
|
|
45
65
|
status: "Active";
|
|
66
|
+
/** Whether this permission is system-managed and cannot be modified. */
|
|
46
67
|
isImmutable: boolean;
|
|
68
|
+
/** Whether this permission has been archived (soft-deleted). */
|
|
47
69
|
isArchived: boolean;
|
|
48
70
|
dateCreated: string;
|
|
49
71
|
dateUpdated: string;
|
|
@@ -52,10 +74,13 @@ export type CreatePermissionRequest = {
|
|
|
52
74
|
body: CreatePermissionBody;
|
|
53
75
|
};
|
|
54
76
|
export type DeleteAssignmentParams = {
|
|
77
|
+
/** ID of the permission (also referred to as "role" in the dashboard). */
|
|
55
78
|
permissionId: string;
|
|
79
|
+
/** ID of the permission assignment. */
|
|
56
80
|
assignmentId: string;
|
|
57
81
|
};
|
|
58
82
|
export type DeleteAssignmentQuery = {
|
|
83
|
+
/** If true, bypasses the approval process and revokes immediately. */
|
|
59
84
|
force?: boolean | undefined;
|
|
60
85
|
};
|
|
61
86
|
export type DeleteAssignmentResponse = void | undefined;
|
|
@@ -63,19 +88,27 @@ export type DeleteAssignmentRequest = DeleteAssignmentParams & {
|
|
|
63
88
|
query?: DeleteAssignmentQuery;
|
|
64
89
|
};
|
|
65
90
|
export type GetPermissionParams = {
|
|
91
|
+
/** ID of the permission (also referred to as "role" in the dashboard). */
|
|
66
92
|
permissionId: string;
|
|
67
93
|
};
|
|
68
94
|
export type GetPermissionResponse = {
|
|
95
|
+
/** ID of the permission (also referred to as "role" in the dashboard). */
|
|
69
96
|
id: string;
|
|
97
|
+
/** Human-readable name of the permission (role). */
|
|
70
98
|
name: string;
|
|
99
|
+
/** 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. */
|
|
71
100
|
operations: string[];
|
|
101
|
+
/** Current status of the permission. */
|
|
72
102
|
status: "Active";
|
|
103
|
+
/** Whether this permission is system-managed and cannot be modified. */
|
|
73
104
|
isImmutable: boolean;
|
|
105
|
+
/** Whether this permission has been archived (soft-deleted). */
|
|
74
106
|
isArchived: boolean;
|
|
75
107
|
dateCreated: string;
|
|
76
108
|
dateUpdated: string;
|
|
77
109
|
} & {
|
|
78
110
|
pendingChangeRequest?: {
|
|
111
|
+
/** ID of the change request. */
|
|
79
112
|
id: string;
|
|
80
113
|
/** The user who initiated the change request. */
|
|
81
114
|
requester: {
|
|
@@ -83,7 +116,9 @@ export type GetPermissionResponse = {
|
|
|
83
116
|
tokenId?: string | undefined;
|
|
84
117
|
appId?: string | undefined;
|
|
85
118
|
};
|
|
119
|
+
/** Current status of the change request. */
|
|
86
120
|
status: "Applied" | "Failed" | "Pending" | "Rejected";
|
|
121
|
+
/** ID of the entity being changed. */
|
|
87
122
|
entityId: string;
|
|
88
123
|
dateCreated: string;
|
|
89
124
|
dateResolved?: string | undefined;
|
|
@@ -91,29 +126,48 @@ export type GetPermissionResponse = {
|
|
|
91
126
|
kind: "Permission";
|
|
92
127
|
operationKind: "Update";
|
|
93
128
|
body: {
|
|
129
|
+
/** ID of the permission (also referred to as "role" in the dashboard). */
|
|
94
130
|
id: string;
|
|
131
|
+
/** Human-readable name of the permission (role). */
|
|
95
132
|
name: string;
|
|
133
|
+
/** Current status of the permission. */
|
|
96
134
|
status: "Active";
|
|
135
|
+
/** 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. */
|
|
97
136
|
operations: string[];
|
|
137
|
+
/** Whether this permission is system-managed and cannot be modified. */
|
|
98
138
|
isImmutable: boolean;
|
|
139
|
+
/** Whether this permission has been archived (soft-deleted). */
|
|
99
140
|
isArchived: boolean;
|
|
100
141
|
};
|
|
101
142
|
} | undefined;
|
|
102
143
|
};
|
|
103
144
|
export type GetPermissionRequest = GetPermissionParams;
|
|
104
145
|
export type ListAssignmentsParams = {
|
|
146
|
+
/** ID of the permission (also referred to as "role" in the dashboard). */
|
|
105
147
|
permissionId: string;
|
|
106
148
|
};
|
|
149
|
+
export type ListAssignmentsQuery = {
|
|
150
|
+
/** Maximum number of items to return. */
|
|
151
|
+
limit?: number | undefined;
|
|
152
|
+
/** Opaque token used to retrieve the next page. Returned as `nextPageToken` from the previous request. */
|
|
153
|
+
paginationToken?: string | undefined;
|
|
154
|
+
};
|
|
107
155
|
export type ListAssignmentsResponse = {
|
|
156
|
+
/** Current page items. */
|
|
108
157
|
items: ({
|
|
158
|
+
/** ID of the permission assignment. */
|
|
109
159
|
id: string;
|
|
160
|
+
/** ID of the permission (also referred to as "role" in the dashboard). */
|
|
110
161
|
permissionId: string;
|
|
162
|
+
/** ID of the identity the permission is assigned to. Can be a user ID, a service account ID, or a personal access token (PAT) ID. */
|
|
111
163
|
identityId: string;
|
|
164
|
+
/** Whether this assignment is system-managed and cannot be modified. */
|
|
112
165
|
isImmutable: boolean;
|
|
113
166
|
dateCreated: string;
|
|
114
167
|
dateUpdated: string;
|
|
115
168
|
} & {
|
|
116
169
|
pendingChangeRequest?: {
|
|
170
|
+
/** ID of the change request. */
|
|
117
171
|
id: string;
|
|
118
172
|
/** The user who initiated the change request. */
|
|
119
173
|
requester: {
|
|
@@ -121,7 +175,9 @@ export type ListAssignmentsResponse = {
|
|
|
121
175
|
tokenId?: string | undefined;
|
|
122
176
|
appId?: string | undefined;
|
|
123
177
|
};
|
|
178
|
+
/** Current status of the change request. */
|
|
124
179
|
status: "Applied" | "Failed" | "Pending" | "Rejected";
|
|
180
|
+
/** ID of the entity being changed. */
|
|
125
181
|
entityId: string;
|
|
126
182
|
dateCreated: string;
|
|
127
183
|
dateResolved?: string | undefined;
|
|
@@ -129,32 +185,49 @@ export type ListAssignmentsResponse = {
|
|
|
129
185
|
kind: "Assignment";
|
|
130
186
|
operationKind: "Create" | "Delete";
|
|
131
187
|
body: {
|
|
188
|
+
/** ID of the permission assignment. */
|
|
132
189
|
id: string;
|
|
190
|
+
/** ID of the permission (also referred to as "role" in the dashboard). */
|
|
133
191
|
permissionId: string;
|
|
192
|
+
/** ID of the identity the permission is assigned to. Can be a user ID, a service account ID, or a personal access token (PAT) ID. */
|
|
134
193
|
identityId: string;
|
|
194
|
+
/** Whether this assignment is system-managed and cannot be modified. */
|
|
135
195
|
isImmutable: boolean;
|
|
136
196
|
};
|
|
137
197
|
} | undefined;
|
|
138
198
|
})[];
|
|
199
|
+
/** token to use as `paginationToken` to request the next page. */
|
|
139
200
|
nextPageToken?: string | undefined;
|
|
140
201
|
};
|
|
141
|
-
export type ListAssignmentsRequest = ListAssignmentsParams
|
|
202
|
+
export type ListAssignmentsRequest = ListAssignmentsParams & {
|
|
203
|
+
query?: ListAssignmentsQuery;
|
|
204
|
+
};
|
|
142
205
|
export type ListPermissionsQuery = {
|
|
143
|
-
|
|
206
|
+
/** Maximum number of items to return. */
|
|
207
|
+
limit?: number | undefined;
|
|
208
|
+
/** Opaque token used to retrieve the next page. Returned as `nextPageToken` from the previous request. */
|
|
144
209
|
paginationToken?: string | undefined;
|
|
145
210
|
};
|
|
146
211
|
export type ListPermissionsResponse = {
|
|
212
|
+
/** Current page items. */
|
|
147
213
|
items: ({
|
|
214
|
+
/** ID of the permission (also referred to as "role" in the dashboard). */
|
|
148
215
|
id: string;
|
|
216
|
+
/** Human-readable name of the permission (role). */
|
|
149
217
|
name: string;
|
|
218
|
+
/** 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. */
|
|
150
219
|
operations: string[];
|
|
220
|
+
/** Current status of the permission. */
|
|
151
221
|
status: "Active";
|
|
222
|
+
/** Whether this permission is system-managed and cannot be modified. */
|
|
152
223
|
isImmutable: boolean;
|
|
224
|
+
/** Whether this permission has been archived (soft-deleted). */
|
|
153
225
|
isArchived: boolean;
|
|
154
226
|
dateCreated: string;
|
|
155
227
|
dateUpdated: string;
|
|
156
228
|
} & {
|
|
157
229
|
pendingChangeRequest?: {
|
|
230
|
+
/** ID of the change request. */
|
|
158
231
|
id: string;
|
|
159
232
|
/** The user who initiated the change request. */
|
|
160
233
|
requester: {
|
|
@@ -162,7 +235,9 @@ export type ListPermissionsResponse = {
|
|
|
162
235
|
tokenId?: string | undefined;
|
|
163
236
|
appId?: string | undefined;
|
|
164
237
|
};
|
|
238
|
+
/** Current status of the change request. */
|
|
165
239
|
status: "Applied" | "Failed" | "Pending" | "Rejected";
|
|
240
|
+
/** ID of the entity being changed. */
|
|
166
241
|
entityId: string;
|
|
167
242
|
dateCreated: string;
|
|
168
243
|
dateResolved?: string | undefined;
|
|
@@ -170,33 +245,49 @@ export type ListPermissionsResponse = {
|
|
|
170
245
|
kind: "Permission";
|
|
171
246
|
operationKind: "Update";
|
|
172
247
|
body: {
|
|
248
|
+
/** ID of the permission (also referred to as "role" in the dashboard). */
|
|
173
249
|
id: string;
|
|
250
|
+
/** Human-readable name of the permission (role). */
|
|
174
251
|
name: string;
|
|
252
|
+
/** Current status of the permission. */
|
|
175
253
|
status: "Active";
|
|
254
|
+
/** 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. */
|
|
176
255
|
operations: string[];
|
|
256
|
+
/** Whether this permission is system-managed and cannot be modified. */
|
|
177
257
|
isImmutable: boolean;
|
|
258
|
+
/** Whether this permission has been archived (soft-deleted). */
|
|
178
259
|
isArchived: boolean;
|
|
179
260
|
};
|
|
180
261
|
} | undefined;
|
|
181
262
|
})[];
|
|
263
|
+
/** token to use as `paginationToken` to request the next page. */
|
|
182
264
|
nextPageToken?: string | undefined;
|
|
183
265
|
};
|
|
184
266
|
export type ListPermissionsRequest = {
|
|
185
267
|
query?: ListPermissionsQuery;
|
|
186
268
|
};
|
|
187
269
|
export type UpdatePermissionBody = {
|
|
270
|
+
/** New name for the permission (role). */
|
|
188
271
|
name?: string | undefined;
|
|
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. */
|
|
189
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;
|
|
190
274
|
};
|
|
191
275
|
export type UpdatePermissionParams = {
|
|
276
|
+
/** ID of the permission (also referred to as "role" in the dashboard). */
|
|
192
277
|
permissionId: string;
|
|
193
278
|
};
|
|
194
279
|
export type UpdatePermissionResponse = {
|
|
280
|
+
/** ID of the permission (also referred to as "role" in the dashboard). */
|
|
195
281
|
id: string;
|
|
282
|
+
/** Human-readable name of the permission (role). */
|
|
196
283
|
name: string;
|
|
284
|
+
/** 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. */
|
|
197
285
|
operations: string[];
|
|
286
|
+
/** Current status of the permission. */
|
|
198
287
|
status: "Active";
|
|
288
|
+
/** Whether this permission is system-managed and cannot be modified. */
|
|
199
289
|
isImmutable: boolean;
|
|
290
|
+
/** Whether this permission has been archived (soft-deleted). */
|
|
200
291
|
isArchived: boolean;
|
|
201
292
|
dateCreated: string;
|
|
202
293
|
dateUpdated: string;
|