@dfns/sdk 0.4.2-alpha.1 → 0.4.3-alpha.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.
@@ -1,7 +1,20 @@
1
1
  export type GetFeesQuery = {
2
- network: "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Bsc" | "BscTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "FantomOpera" | "FantomTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai";
2
+ network: ("Bitcoin" | "BitcoinTestnet3" | "Litecoin" | "LitecoinTestnet") | ("ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Bsc" | "BscTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "FantomOpera" | "FantomTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai") | ("Solana" | "SolanaDevnet");
3
3
  };
4
4
  export type GetFeesResponse = {
5
+ kind: "Bitcoin";
6
+ network: "Bitcoin" | "BitcoinTestnet3" | "Litecoin" | "LitecoinTestnet";
7
+ blockNumber: number;
8
+ slow: {
9
+ feeRate: string;
10
+ };
11
+ standard: {
12
+ feeRate: string;
13
+ };
14
+ fast: {
15
+ feeRate: string;
16
+ };
17
+ } | {
5
18
  kind: "Eip1559";
6
19
  network: "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Bsc" | "BscTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "FantomOpera" | "FantomTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai";
7
20
  blockNumber: number;
@@ -18,6 +31,19 @@ export type GetFeesResponse = {
18
31
  maxFeePerGas: string;
19
32
  };
20
33
  estimatedBaseFee: number;
34
+ } | {
35
+ kind: "Solana";
36
+ network: "Solana" | "SolanaDevnet";
37
+ blockNumber: number;
38
+ slow: {
39
+ computeUnitPrice: string;
40
+ };
41
+ standard: {
42
+ computeUnitPrice: string;
43
+ };
44
+ fast: {
45
+ computeUnitPrice: string;
46
+ };
21
47
  };
22
48
  export type GetFeesRequest = {
23
49
  query?: GetFeesQuery;
@@ -10,9 +10,9 @@ export type ArchivePermissionResponse = {
10
10
  operations: string[];
11
11
  status: "Active";
12
12
  isImmutable: boolean;
13
+ isArchived: boolean;
13
14
  dateCreated: string;
14
15
  dateUpdated: string;
15
- isArchived: boolean;
16
16
  };
17
17
  export type ArchivePermissionRequest = ArchivePermissionParams & {
18
18
  body: ArchivePermissionBody;
@@ -36,7 +36,7 @@ export type CreateAssignmentRequest = CreateAssignmentParams & {
36
36
  };
37
37
  export type CreatePermissionBody = {
38
38
  name: string;
39
- operations: ("ApiKeys:Create" | "ApiKeys:Read" | "ApiKeys:Revoke" | "AssetAccounts:Archive" | "AssetAccounts:Create" | "AssetAccounts:Read" | "Auth:Action:Sign" | "Auth:Apps:Create" | "Auth:Apps:Read" | "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" | "Auth:Users:Create" | "Auth:Users:Delegate" | "Auth:Users:Read" | "Auth:Users:Update" | "Balances:Read" | "CallbackEvents:Read" | "CallbackSubscriptions:Archive" | "CallbackSubscriptions:Create" | "CallbackSubscriptions:Read" | "Employees:Read" | "Payments:Create" | "Payments:Read" | "PermissionAssignments:Create" | "PermissionAssignments:Read" | "PermissionAssignments:Revoke" | "PermissionPredicates:Archive" | "PermissionPredicates:Create" | "PermissionPredicates:Read" | "PermissionPredicates:Update" | "Permissions:Archive" | "Permissions:Create" | "Permissions:Read" | "Permissions:Update" | "Policies:Archive" | "Policies:Create" | "Policies:Read" | "Policies:Update" | "Policies:Approvals:Read" | "Policies:Approvals:Approve" | "PolicyControlExecutions:Read" | "PolicyControlExecutions:Update" | "PolicyControls:Archive" | "PolicyControls:Create" | "PolicyControls:Read" | "PolicyControls:Update" | "PolicyRules:Archive" | "PolicyRules:Create" | "PolicyRules:Read" | "PolicyRules:Update" | "PublicKeyAddresses:Read" | "PublicKeys:Create" | "PublicKeys:Read" | "Signatures:Create" | "Signatures:Read" | "Signers:ListSigners" | "Transactions:Create" | "Transactions:Read" | "Wallets:BroadcastTransaction" | "Wallets:Create" | "Wallets:Delegate" | "Wallets:Export" | "Wallets:GenerateSignature" | "Wallets:Import" | "Wallets:Read" | "Wallets:ReadSignature" | "Wallets:ReadTransaction" | "Wallets:ReadTransfer" | "Wallets:TransferAsset" | "Wallets:Update" | "Webhooks:Create" | "Webhooks:Read" | "Webhooks:Update" | "Webhooks:Delete" | "Webhooks:Ping" | "Webhooks:Events:Read")[];
39
+ operations: ("ApiKeys:Create" | "ApiKeys:Read" | "ApiKeys:Revoke" | "AssetAccounts:Archive" | "AssetAccounts:Create" | "AssetAccounts:Read" | "Auth:Action:Sign" | "Auth:Apps:Create" | "Auth:Apps:Read" | "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" | "Auth:Users:Create" | "Auth:Users:Delegate" | "Auth:Users:Read" | "Auth:Users:Update" | "Balances:Read" | "CallbackEvents:Read" | "CallbackSubscriptions:Archive" | "CallbackSubscriptions:Create" | "CallbackSubscriptions:Read" | "Employees:Read" | "Payments:Create" | "Payments:Read" | "PermissionAssignments:Create" | "PermissionAssignments:Read" | "PermissionAssignments:Revoke" | "PermissionPredicates:Archive" | "PermissionPredicates:Create" | "PermissionPredicates:Read" | "PermissionPredicates:Update" | "Permissions:Archive" | "Permissions:Create" | "Permissions:Read" | "Permissions:Update" | "Policies:Archive" | "Policies:Create" | "Policies:Read" | "Policies:Update" | "Policies:Approvals:Read" | "Policies:Approvals:Approve" | "PolicyControlExecutions:Read" | "PolicyControlExecutions:Update" | "PolicyControls:Archive" | "PolicyControls:Create" | "PolicyControls:Read" | "PolicyControls:Update" | "PolicyRules:Archive" | "PolicyRules:Create" | "PolicyRules:Read" | "PolicyRules:Update" | "PublicKeyAddresses:Read" | "PublicKeys:Create" | "PublicKeys:Read" | "Signatures:Create" | "Signatures:Read" | "Signers:ListSigners" | "Transactions:Create" | "Transactions:Read" | "Wallets:BroadcastTransaction" | "Wallets:Create" | "Wallets:Delegate" | "Wallets:Export" | "Wallets:GenerateSignature" | "Wallets:Import" | "Wallets:Read" | "Wallets:ReadSignature" | "Wallets:ReadTransaction" | "Wallets:ReadTransfer" | "Wallets:TransferAsset" | "Wallets:Update" | "Wallets:Tags:Create" | "Wallets:Tags:Delete" | "Webhooks:Create" | "Webhooks:Read" | "Webhooks:Update" | "Webhooks:Delete" | "Webhooks:Ping" | "Webhooks:Events:Read")[];
40
40
  };
41
41
  export type CreatePermissionResponse = {
42
42
  id: string;
@@ -44,9 +44,9 @@ export type CreatePermissionResponse = {
44
44
  operations: string[];
45
45
  status: "Active";
46
46
  isImmutable: boolean;
47
+ isArchived: boolean;
47
48
  dateCreated: string;
48
49
  dateUpdated: string;
49
- isArchived: boolean;
50
50
  };
51
51
  export type CreatePermissionRequest = {
52
52
  body: CreatePermissionBody;
@@ -66,9 +66,9 @@ export type GetPermissionResponse = {
66
66
  operations: string[];
67
67
  status: "Active";
68
68
  isImmutable: boolean;
69
+ isArchived: boolean;
69
70
  dateCreated: string;
70
71
  dateUpdated: string;
71
- isArchived: boolean;
72
72
  } & {
73
73
  pendingChangeRequest?: {
74
74
  id: string;
@@ -77,12 +77,21 @@ export type GetPermissionResponse = {
77
77
  tokenId: string;
78
78
  appId: string;
79
79
  };
80
- kind: "Assignment" | "Permission";
81
- operationKind: "Create" | "Update" | "Delete";
82
80
  status: "Applied" | "Failed" | "Pending" | "Rejected";
83
81
  entityId: string;
84
82
  dateCreated: Date;
85
83
  dateResolved?: (Date | null) | undefined;
84
+ approvalId?: string | undefined;
85
+ kind: "Permission";
86
+ operationKind: "Update";
87
+ body: {
88
+ id: string;
89
+ name: string;
90
+ status: "Active";
91
+ operations: string[];
92
+ isImmutable: boolean;
93
+ isArchived: boolean;
94
+ };
86
95
  } | undefined;
87
96
  };
88
97
  export type GetPermissionRequest = GetPermissionParams;
@@ -105,12 +114,19 @@ export type ListAssignmentsResponse = {
105
114
  tokenId: string;
106
115
  appId: string;
107
116
  };
108
- kind: "Assignment" | "Permission";
109
- operationKind: "Create" | "Update" | "Delete";
110
117
  status: "Applied" | "Failed" | "Pending" | "Rejected";
111
118
  entityId: string;
112
119
  dateCreated: Date;
113
120
  dateResolved?: (Date | null) | undefined;
121
+ approvalId?: string | undefined;
122
+ kind: "Assignment";
123
+ operationKind: "Create" | "Delete";
124
+ body: {
125
+ id: string;
126
+ permissionId: string;
127
+ identityId: string;
128
+ isImmutable: boolean;
129
+ };
114
130
  } | undefined;
115
131
  })[];
116
132
  nextPageToken?: string | undefined;
@@ -127,9 +143,9 @@ export type ListPermissionsResponse = {
127
143
  operations: string[];
128
144
  status: "Active";
129
145
  isImmutable: boolean;
146
+ isArchived: boolean;
130
147
  dateCreated: string;
131
148
  dateUpdated: string;
132
- isArchived: boolean;
133
149
  } & {
134
150
  pendingChangeRequest?: {
135
151
  id: string;
@@ -138,12 +154,21 @@ export type ListPermissionsResponse = {
138
154
  tokenId: string;
139
155
  appId: string;
140
156
  };
141
- kind: "Assignment" | "Permission";
142
- operationKind: "Create" | "Update" | "Delete";
143
157
  status: "Applied" | "Failed" | "Pending" | "Rejected";
144
158
  entityId: string;
145
159
  dateCreated: Date;
146
160
  dateResolved?: (Date | null) | undefined;
161
+ approvalId?: string | undefined;
162
+ kind: "Permission";
163
+ operationKind: "Update";
164
+ body: {
165
+ id: string;
166
+ name: string;
167
+ status: "Active";
168
+ operations: string[];
169
+ isImmutable: boolean;
170
+ isArchived: boolean;
171
+ };
147
172
  } | undefined;
148
173
  })[];
149
174
  nextPageToken?: string | undefined;
@@ -153,7 +178,7 @@ export type ListPermissionsRequest = {
153
178
  };
154
179
  export type UpdatePermissionBody = {
155
180
  name?: string | undefined;
156
- operations?: ("ApiKeys:Create" | "ApiKeys:Read" | "ApiKeys:Revoke" | "AssetAccounts:Archive" | "AssetAccounts:Create" | "AssetAccounts:Read" | "Auth:Action:Sign" | "Auth:Apps:Create" | "Auth:Apps:Read" | "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" | "Auth:Users:Create" | "Auth:Users:Delegate" | "Auth:Users:Read" | "Auth:Users:Update" | "Balances:Read" | "CallbackEvents:Read" | "CallbackSubscriptions:Archive" | "CallbackSubscriptions:Create" | "CallbackSubscriptions:Read" | "Employees:Read" | "Payments:Create" | "Payments:Read" | "PermissionAssignments:Create" | "PermissionAssignments:Read" | "PermissionAssignments:Revoke" | "PermissionPredicates:Archive" | "PermissionPredicates:Create" | "PermissionPredicates:Read" | "PermissionPredicates:Update" | "Permissions:Archive" | "Permissions:Create" | "Permissions:Read" | "Permissions:Update" | "Policies:Archive" | "Policies:Create" | "Policies:Read" | "Policies:Update" | "Policies:Approvals:Read" | "Policies:Approvals:Approve" | "PolicyControlExecutions:Read" | "PolicyControlExecutions:Update" | "PolicyControls:Archive" | "PolicyControls:Create" | "PolicyControls:Read" | "PolicyControls:Update" | "PolicyRules:Archive" | "PolicyRules:Create" | "PolicyRules:Read" | "PolicyRules:Update" | "PublicKeyAddresses:Read" | "PublicKeys:Create" | "PublicKeys:Read" | "Signatures:Create" | "Signatures:Read" | "Signers:ListSigners" | "Transactions:Create" | "Transactions:Read" | "Wallets:BroadcastTransaction" | "Wallets:Create" | "Wallets:Delegate" | "Wallets:Export" | "Wallets:GenerateSignature" | "Wallets:Import" | "Wallets:Read" | "Wallets:ReadSignature" | "Wallets:ReadTransaction" | "Wallets:ReadTransfer" | "Wallets:TransferAsset" | "Wallets:Update" | "Webhooks:Create" | "Webhooks:Read" | "Webhooks:Update" | "Webhooks:Delete" | "Webhooks:Ping" | "Webhooks:Events:Read")[] | undefined;
181
+ operations?: ("ApiKeys:Create" | "ApiKeys:Read" | "ApiKeys:Revoke" | "AssetAccounts:Archive" | "AssetAccounts:Create" | "AssetAccounts:Read" | "Auth:Action:Sign" | "Auth:Apps:Create" | "Auth:Apps:Read" | "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" | "Auth:Users:Create" | "Auth:Users:Delegate" | "Auth:Users:Read" | "Auth:Users:Update" | "Balances:Read" | "CallbackEvents:Read" | "CallbackSubscriptions:Archive" | "CallbackSubscriptions:Create" | "CallbackSubscriptions:Read" | "Employees:Read" | "Payments:Create" | "Payments:Read" | "PermissionAssignments:Create" | "PermissionAssignments:Read" | "PermissionAssignments:Revoke" | "PermissionPredicates:Archive" | "PermissionPredicates:Create" | "PermissionPredicates:Read" | "PermissionPredicates:Update" | "Permissions:Archive" | "Permissions:Create" | "Permissions:Read" | "Permissions:Update" | "Policies:Archive" | "Policies:Create" | "Policies:Read" | "Policies:Update" | "Policies:Approvals:Read" | "Policies:Approvals:Approve" | "PolicyControlExecutions:Read" | "PolicyControlExecutions:Update" | "PolicyControls:Archive" | "PolicyControls:Create" | "PolicyControls:Read" | "PolicyControls:Update" | "PolicyRules:Archive" | "PolicyRules:Create" | "PolicyRules:Read" | "PolicyRules:Update" | "PublicKeyAddresses:Read" | "PublicKeys:Create" | "PublicKeys:Read" | "Signatures:Create" | "Signatures:Read" | "Signers:ListSigners" | "Transactions:Create" | "Transactions:Read" | "Wallets:BroadcastTransaction" | "Wallets:Create" | "Wallets:Delegate" | "Wallets:Export" | "Wallets:GenerateSignature" | "Wallets:Import" | "Wallets:Read" | "Wallets:ReadSignature" | "Wallets:ReadTransaction" | "Wallets:ReadTransfer" | "Wallets:TransferAsset" | "Wallets:Update" | "Wallets:Tags:Create" | "Wallets:Tags:Delete" | "Webhooks:Create" | "Webhooks:Read" | "Webhooks:Update" | "Webhooks:Delete" | "Webhooks:Ping" | "Webhooks:Events:Read")[] | undefined;
157
182
  };
158
183
  export type UpdatePermissionParams = {
159
184
  permissionId: string;
@@ -164,9 +189,9 @@ export type UpdatePermissionResponse = {
164
189
  operations: string[];
165
190
  status: "Active";
166
191
  isImmutable: boolean;
192
+ isArchived: boolean;
167
193
  dateCreated: string;
168
194
  dateUpdated: string;
169
- isArchived: boolean;
170
195
  };
171
196
  export type UpdatePermissionRequest = UpdatePermissionParams & {
172
197
  body: UpdatePermissionBody;
@@ -6,6 +6,7 @@ export declare class PoliciesClient {
6
6
  archivePolicy(request: T.ArchivePolicyRequest): Promise<T.ArchivePolicyResponse>;
7
7
  createApprovalDecision(request: T.CreateApprovalDecisionRequest): Promise<T.CreateApprovalDecisionResponse>;
8
8
  createPolicy(request: T.CreatePolicyRequest): Promise<T.CreatePolicyResponse>;
9
+ getApproval(request: T.GetApprovalRequest): Promise<T.GetApprovalResponse>;
9
10
  getPolicy(request: T.GetPolicyRequest): Promise<T.GetPolicyResponse>;
10
11
  listApprovals(request?: T.ListApprovalsRequest): Promise<T.ListApprovalsResponse>;
11
12
  listPolicies(request?: T.ListPoliciesRequest): Promise<T.ListPoliciesResponse>;
@@ -43,6 +43,17 @@ class PoliciesClient {
43
43
  });
44
44
  return response.json();
45
45
  }
46
+ async getApproval(request) {
47
+ const path = (0, url_1.buildPathAndQuery)('/v2/policy-approvals/:approvalId', {
48
+ path: request ?? {},
49
+ query: {},
50
+ });
51
+ const response = await (0, fetch_1.simpleFetch)(path, {
52
+ method: 'GET',
53
+ apiOptions: this.apiOptions,
54
+ });
55
+ return response.json();
56
+ }
46
57
  async getPolicy(request) {
47
58
  const path = (0, url_1.buildPathAndQuery)('/v2/policies/:policyId', {
48
59
  path: request ?? {},
@@ -10,6 +10,7 @@ export declare class DelegatedPoliciesClient {
10
10
  createApprovalDecisionComplete(request: T.CreateApprovalDecisionRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreateApprovalDecisionResponse>;
11
11
  createPolicyInit(request: T.CreatePolicyRequest): Promise<UserActionChallengeResponse>;
12
12
  createPolicyComplete(request: T.CreatePolicyRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreatePolicyResponse>;
13
+ getApproval(request: T.GetApprovalRequest): Promise<T.GetApprovalResponse>;
13
14
  getPolicy(request: T.GetPolicyRequest): Promise<T.GetPolicyResponse>;
14
15
  listApprovals(request?: T.ListApprovalsRequest): Promise<T.ListApprovalsResponse>;
15
16
  listPolicies(request?: T.ListPoliciesRequest): Promise<T.ListPoliciesResponse>;
@@ -89,6 +89,17 @@ class DelegatedPoliciesClient {
89
89
  });
90
90
  return response.json();
91
91
  }
92
+ async getApproval(request) {
93
+ const path = (0, url_1.buildPathAndQuery)('/v2/policy-approvals/:approvalId', {
94
+ path: request ?? {},
95
+ query: {},
96
+ });
97
+ const response = await (0, fetch_1.simpleFetch)(path, {
98
+ method: 'GET',
99
+ apiOptions: this.apiOptions,
100
+ });
101
+ return response.json();
102
+ }
92
103
  async getPolicy(request) {
93
104
  const path = (0, url_1.buildPathAndQuery)('/v2/policies/:policyId', {
94
105
  path: request ?? {},