@dfns/sdk 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/codegen/datamodel/Assets/types.d.ts +1 -7
  2. package/codegen/datamodel/Wallets/types.d.ts +152 -45
  3. package/codegen/datamodel/Wallets/types.js +34 -4
  4. package/dfnsApiClient.d.ts +2 -12
  5. package/dfnsApiClient.js +4 -18
  6. package/dfnsDelegatedApiClient.d.ts +2 -12
  7. package/dfnsDelegatedApiClient.js +4 -18
  8. package/generated/networks/client.d.ts +8 -0
  9. package/generated/networks/client.js +34 -0
  10. package/generated/networks/delegatedClient.d.ts +8 -0
  11. package/generated/networks/delegatedClient.js +34 -0
  12. package/generated/networks/index.d.ts +3 -0
  13. package/{codegen/datamodel/Orgs → generated/networks}/index.js +2 -1
  14. package/generated/networks/types.d.ts +37 -0
  15. package/generated/permissions/types.d.ts +49 -4
  16. package/generated/policies/types.d.ts +258 -2
  17. package/generated/wallets/types.d.ts +36 -31
  18. package/generated/webhooks/types.d.ts +9 -9
  19. package/package.json +1 -1
  20. package/types/networks.d.ts +1 -0
  21. package/{codegen/datamodel/BlockchainIndexing/index.js → types/networks.js} +1 -1
  22. package/codegen/Blockchains/BlockchainsClient.d.ts +0 -7
  23. package/codegen/Blockchains/BlockchainsClient.js +0 -23
  24. package/codegen/Blockchains/DelegatedBlockchainsClient.d.ts +0 -7
  25. package/codegen/Blockchains/DelegatedBlockchainsClient.js +0 -23
  26. package/codegen/Blockchains/index.d.ts +0 -3
  27. package/codegen/Blockchains/index.js +0 -19
  28. package/codegen/Blockchains/types.d.ts +0 -6
  29. package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.d.ts +0 -11
  30. package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.js +0 -61
  31. package/codegen/PolicyExecution/PolicyExecutionClient.d.ts +0 -9
  32. package/codegen/PolicyExecution/PolicyExecutionClient.js +0 -45
  33. package/codegen/PolicyExecution/index.d.ts +0 -3
  34. package/codegen/PolicyExecution/index.js +0 -19
  35. package/codegen/PolicyExecution/types.d.ts +0 -18
  36. package/codegen/PolicyExecution/types.js +0 -2
  37. package/codegen/PolicyManagement/DelegatedPolicyManagementClient.d.ts +0 -25
  38. package/codegen/PolicyManagement/DelegatedPolicyManagementClient.js +0 -240
  39. package/codegen/PolicyManagement/PolicyManagementClient.d.ts +0 -18
  40. package/codegen/PolicyManagement/PolicyManagementClient.js +0 -146
  41. package/codegen/PolicyManagement/index.d.ts +0 -3
  42. package/codegen/PolicyManagement/index.js +0 -19
  43. package/codegen/PolicyManagement/types.d.ts +0 -51
  44. package/codegen/PolicyManagement/types.js +0 -2
  45. package/codegen/Signers/DelegatedSignersClient.d.ts +0 -7
  46. package/codegen/Signers/DelegatedSignersClient.js +0 -22
  47. package/codegen/Signers/SignersClient.d.ts +0 -7
  48. package/codegen/Signers/SignersClient.js +0 -22
  49. package/codegen/Signers/index.d.ts +0 -3
  50. package/codegen/Signers/index.js +0 -19
  51. package/codegen/Signers/types.d.ts +0 -2
  52. package/codegen/Signers/types.js +0 -2
  53. package/codegen/datamodel/ApiKeys/errors.d.ts +0 -6
  54. package/codegen/datamodel/ApiKeys/errors.js +0 -15
  55. package/codegen/datamodel/ApiKeys/index.d.ts +0 -3
  56. package/codegen/datamodel/ApiKeys/index.js +0 -19
  57. package/codegen/datamodel/ApiKeys/responses.d.ts +0 -25
  58. package/codegen/datamodel/ApiKeys/responses.js +0 -2
  59. package/codegen/datamodel/ApiKeys/types.d.ts +0 -32
  60. package/codegen/datamodel/ApiKeys/types.js +0 -11
  61. package/codegen/datamodel/BlockchainIndexing/errors.d.ts +0 -0
  62. package/codegen/datamodel/BlockchainIndexing/errors.js +0 -1
  63. package/codegen/datamodel/BlockchainIndexing/index.d.ts +0 -1
  64. package/codegen/datamodel/BlockchainIndexing/responses.d.ts +0 -6
  65. package/codegen/datamodel/BlockchainIndexing/responses.js +0 -2
  66. package/codegen/datamodel/BlockchainIndexing/types.d.ts +0 -0
  67. package/codegen/datamodel/BlockchainIndexing/types.js +0 -1
  68. package/codegen/datamodel/Blockchains/errors.d.ts +0 -0
  69. package/codegen/datamodel/Blockchains/errors.js +0 -1
  70. package/codegen/datamodel/Blockchains/index.d.ts +0 -2
  71. package/codegen/datamodel/Blockchains/index.js +0 -18
  72. package/codegen/datamodel/Blockchains/responses.d.ts +0 -12
  73. package/codegen/datamodel/Blockchains/responses.js +0 -2
  74. package/codegen/datamodel/Blockchains/types.d.ts +0 -270
  75. package/codegen/datamodel/Blockchains/types.js +0 -53
  76. package/codegen/datamodel/Orgs/errors.d.ts +0 -0
  77. package/codegen/datamodel/Orgs/errors.js +0 -1
  78. package/codegen/datamodel/Orgs/index.d.ts +0 -2
  79. package/codegen/datamodel/Orgs/responses.d.ts +0 -45
  80. package/codegen/datamodel/Orgs/responses.js +0 -2
  81. package/codegen/datamodel/Orgs/types.d.ts +0 -240
  82. package/codegen/datamodel/Orgs/types.js +0 -39
  83. package/codegen/datamodel/Permissions/errors.d.ts +0 -0
  84. package/codegen/datamodel/Permissions/errors.js +0 -1
  85. package/codegen/datamodel/Permissions/index.d.ts +0 -2
  86. package/codegen/datamodel/Permissions/index.js +0 -18
  87. package/codegen/datamodel/Permissions/responses.d.ts +0 -75
  88. package/codegen/datamodel/Permissions/responses.js +0 -2
  89. package/codegen/datamodel/Permissions/types.d.ts +0 -93
  90. package/codegen/datamodel/Permissions/types.js +0 -43
  91. package/codegen/datamodel/PolicyExecution/errors.d.ts +0 -11
  92. package/codegen/datamodel/PolicyExecution/errors.js +0 -17
  93. package/codegen/datamodel/PolicyExecution/index.d.ts +0 -3
  94. package/codegen/datamodel/PolicyExecution/index.js +0 -19
  95. package/codegen/datamodel/PolicyExecution/responses.d.ts +0 -19
  96. package/codegen/datamodel/PolicyExecution/responses.js +0 -2
  97. package/codegen/datamodel/PolicyExecution/types.d.ts +0 -60
  98. package/codegen/datamodel/PolicyExecution/types.js +0 -17
  99. package/codegen/datamodel/PolicyManagement/errors.d.ts +0 -0
  100. package/codegen/datamodel/PolicyManagement/errors.js +0 -1
  101. package/codegen/datamodel/PolicyManagement/index.d.ts +0 -2
  102. package/codegen/datamodel/PolicyManagement/index.js +0 -18
  103. package/codegen/datamodel/PolicyManagement/responses.d.ts +0 -83
  104. package/codegen/datamodel/PolicyManagement/responses.js +0 -2
  105. package/codegen/datamodel/PolicyManagement/types.d.ts +0 -391
  106. package/codegen/datamodel/PolicyManagement/types.js +0 -95
  107. package/codegen/datamodel/Signers/errors.d.ts +0 -0
  108. package/codegen/datamodel/Signers/errors.js +0 -1
  109. package/codegen/datamodel/Signers/index.d.ts +0 -2
  110. package/codegen/datamodel/Signers/index.js +0 -18
  111. package/codegen/datamodel/Signers/responses.d.ts +0 -27
  112. package/codegen/datamodel/Signers/responses.js +0 -2
  113. package/codegen/datamodel/Signers/types.d.ts +0 -21
  114. package/codegen/datamodel/Signers/types.js +0 -2
  115. /package/{codegen/Blockchains → generated/networks}/types.js +0 -0
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FeeEstimationKind = exports.SolInstructionKind = exports.XrpTransactionKind = exports.TrxTransactionKind = exports.TransactionStatus = exports.EvmLogKind = void 0;
4
- // FIXME: Missing documentation for EvmLogKind
5
- var EvmLogKind;
6
- (function (EvmLogKind) {
7
- // FIXME: Missing documentation for Unknown
8
- EvmLogKind["Unknown"] = "Unknown";
9
- // FIXME: Missing documentation for Erc20
10
- EvmLogKind["Erc20"] = "Erc20";
11
- // FIXME: Missing documentation for Erc721
12
- EvmLogKind["Erc721"] = "Erc721";
13
- })(EvmLogKind || (exports.EvmLogKind = EvmLogKind = {}));
14
- // FIXME: Missing documentation for TransactionStatus
15
- var TransactionStatus;
16
- (function (TransactionStatus) {
17
- // FIXME: Missing documentation for SUCCESS
18
- TransactionStatus["SUCCESS"] = "SUCCESS";
19
- // FIXME: Missing documentation for FAILED
20
- TransactionStatus["FAILED"] = "FAILED";
21
- })(TransactionStatus || (exports.TransactionStatus = TransactionStatus = {}));
22
- // FIXME: Missing documentation for TrxTransactionKind
23
- var TrxTransactionKind;
24
- (function (TrxTransactionKind) {
25
- // FIXME: Missing documentation for TransferContract
26
- TrxTransactionKind["TransferContract"] = "TransferContract";
27
- // FIXME: Missing documentation for TransferAssetContract
28
- TrxTransactionKind["TransferAssetContract"] = "TransferAssetContract";
29
- // FIXME: Missing documentation for TriggerSmartContract
30
- TrxTransactionKind["TriggerSmartContract"] = "TriggerSmartContract";
31
- })(TrxTransactionKind || (exports.TrxTransactionKind = TrxTransactionKind = {}));
32
- // FIXME: Missing documentation for XrpTransactionKind
33
- var XrpTransactionKind;
34
- (function (XrpTransactionKind) {
35
- // FIXME: Missing documentation for Payment
36
- XrpTransactionKind["Payment"] = "Payment";
37
- })(XrpTransactionKind || (exports.XrpTransactionKind = XrpTransactionKind = {}));
38
- // FIXME: Missing documentation for SolInstructionKind
39
- var SolInstructionKind;
40
- (function (SolInstructionKind) {
41
- // FIXME: Missing documentation for SystemTransfer
42
- SolInstructionKind["SystemTransfer"] = "SystemTransfer";
43
- // FIXME: Missing documentation for TokenTransfer
44
- SolInstructionKind["TokenTransfer"] = "TokenTransfer";
45
- })(SolInstructionKind || (exports.SolInstructionKind = SolInstructionKind = {}));
46
- // FIXME: Missing documentation for FeeEstimationKind
47
- var FeeEstimationKind;
48
- (function (FeeEstimationKind) {
49
- // FIXME: Missing documentation for Eip1559
50
- FeeEstimationKind["Eip1559"] = "Eip1559";
51
- // FIXME: Missing documentation for EthLegacy
52
- FeeEstimationKind["EthLegacy"] = "EthLegacy";
53
- })(FeeEstimationKind || (exports.FeeEstimationKind = FeeEstimationKind = {}));
File without changes
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,2 +0,0 @@
1
- export * from './responses';
2
- export * from './types';
@@ -1,45 +0,0 @@
1
- import { BadRequestError, EntityNotFoundError, ForbiddenError, UnauthorizedError } from '../Foundations';
2
- import { Org, OrgEmployee } from './types';
3
- export type GetEmployeeByIdSuccess = OrgEmployee;
4
- export type GetEmployeeByIdError = {
5
- error: EntityNotFoundError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
6
- };
7
- export type GetEmployeeByIdResponse = GetEmployeeByIdSuccess | GetEmployeeByIdError;
8
- export type ListEmployeesSuccess = {
9
- items: OrgEmployee[];
10
- };
11
- export type ListEmployeesError = {
12
- error: ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
13
- };
14
- export type ListEmployeesResponse = ListEmployeesSuccess | ListEmployeesError;
15
- export type CreateOrgSuccess = Org;
16
- export type CreateOrgError = {
17
- error: ForbiddenError | BadRequestError | EntityNotFoundError;
18
- };
19
- export type CreateOrgResponse = CreateOrgSuccess | CreateOrgError;
20
- export type ListOrgsSuccess = {
21
- items: Org[];
22
- };
23
- export type ListOrgsError = {
24
- error: ForbiddenError | BadRequestError | EntityNotFoundError;
25
- };
26
- export type ListOrgsResponse = ListOrgsSuccess | ListOrgsError;
27
- export type ListPackageVersionsSuccess = {
28
- items: Org[];
29
- };
30
- export type ListPackageVersionsError = {
31
- error: ForbiddenError | BadRequestError | EntityNotFoundError;
32
- };
33
- export type ListPackageVersionsResponse = ListPackageVersionsSuccess | ListPackageVersionsError;
34
- export type CreateOrgSettingSuccess = Org;
35
- export type CreateOrgSettingError = {
36
- error: ForbiddenError | BadRequestError | EntityNotFoundError;
37
- };
38
- export type CreateOrgSettingResponse = CreateOrgSettingSuccess | CreateOrgSettingError;
39
- export type ListOrgSettingsSuccess = {
40
- items: Org[];
41
- };
42
- export type ListOrgSettingsError = {
43
- error: ForbiddenError | BadRequestError | EntityNotFoundError;
44
- };
45
- export type ListOrgSettingsResponse = ListOrgSettingsSuccess | ListOrgSettingsError;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,240 +0,0 @@
1
- import { Countries, Email, EntityId, IdentityIssuer, IsoDate, IsoDatetime } from '../Foundations';
2
- /**
3
- * `Org` encapsulates information about a Dfns’s customer .
4
- */
5
- export type Org = {
6
- /**
7
- * Unique organisation identifier.
8
- */
9
- id: EntityId;
10
- /**
11
- * Full legal name of the organisation, including suffixes such as LLC, Limited, etc.
12
- */
13
- legalName: string;
14
- /**
15
- * Trading name by which company is known. For example "Panasonic" instead of "Panasonic Holdings Corporation".
16
- */
17
- tradingName?: string;
18
- /**
19
- * Country where organisation is head quartered, and default jurisdiction if applies.
20
- */
21
- country: Countries;
22
- /**
23
- * Date when organisation was incorporated.
24
- */
25
- dateOfIncorporation: IsoDate;
26
- /**
27
- * Date when organisation was onboarded in Dfns.
28
- */
29
- dateOnboarded: IsoDatetime;
30
- /**
31
- * Status of the organisation. Indicates whether organisation is currently operational. See `OrgStatus` for details.
32
- */
33
- status: OrgStatus;
34
- /**
35
- * List of employee users that are onboarded within organisation
36
- */
37
- employees: OrgEmployee[];
38
- /**
39
- * List of groups available within organisation, to which users (i.e. employees) can belong to.
40
- */
41
- groups?: EmployeeGroup[];
42
- };
43
- /**
44
- * `OrgEmployee` is a type of `User` that has access to Dfns API. `OrgEmployee` always maps to a given Natural Person (i.e. human). There are other users such as service accounts, that can be mapped to servers and other technical entities.
45
- */
46
- export type OrgEmployee = {
47
- /**
48
- * Unique employee identifier.
49
- */
50
- id: EntityId;
51
- /**
52
- * Status of the employee. Identifies if given user can perform any actions or not. See `OrgEmployeeStatus` for more details.
53
- */
54
- status: OrgEmployeeStatus;
55
- /**
56
- * Indicates organisation to which employee belongs to.
57
- */
58
- orgId: string;
59
- /**
60
- * Employee's username. Usually it is an email.
61
- */
62
- username: string;
63
- /**
64
- * Employee email.
65
- */
66
- email: Email;
67
- /**
68
- * Identity issuer (eg Auth0). Empty if it's the default one (Dfns one). The issuer will be filled for non-Dfns issuers.
69
- */
70
- issuer: IdentityIssuer;
71
- /**
72
- * Date when employee was created.
73
- */
74
- dateCreated: IsoDatetime;
75
- /**
76
- * Date when employee record was last updated.
77
- */
78
- dateUpdated: IsoDatetime;
79
- /**
80
- * Employee's full legal name.
81
- */
82
- fullName: string;
83
- /**
84
- * Employee's date of birth.
85
- */
86
- dateOfBirth?: IsoDate;
87
- /**
88
- * List of groups to which employee belongs to.
89
- */
90
- groups?: EmployeeGroup[];
91
- };
92
- /**
93
- * Used to group `OrgEmployees` by various criteria. Such as jurisdiction, department, access rights.
94
- */
95
- export type EmployeeGroup = {
96
- /**
97
- * Name of the `Group`
98
- */
99
- name: string;
100
- };
101
- /**
102
- * Operation Payload used to create new `OrgEmployee` record.
103
- */
104
- export type CreateOrgEmployeePayload = {
105
- /**
106
- * Employee’s username.
107
- */
108
- username: string;
109
- /**
110
- * Employee’s email.
111
- */
112
- email: Email;
113
- /**
114
- * Identity issuer (eg Auth0). Empty if it's the default one (Dfns one). The issuer will be filled for non-Dfns issuers.
115
- */
116
- issuer?: string;
117
- /**
118
- * Employee's full legal name.
119
- */
120
- fullName: string;
121
- /**
122
- * Employee's date of birth.
123
- */
124
- dateOfBirth?: IsoDate;
125
- };
126
- export type OrgApiKey = {
127
- apiKeyId: EntityId;
128
- orgId: EntityId;
129
- };
130
- export type CreateEmployee = {
131
- /**
132
- * Employee’s username.
133
- */
134
- username: string;
135
- /**
136
- * Employee’s email.
137
- */
138
- email: Email;
139
- /**
140
- * Identity issuer (eg Auth0). Empty if it's the default one (Dfns one). The issuer will be filled for non-Dfns issuers.
141
- */
142
- issuer?: string;
143
- /**
144
- * Employee's full legal name.
145
- */
146
- fullName: string;
147
- /**
148
- * Employee's date of birth.
149
- */
150
- dateOfBirth?: IsoDate;
151
- authVersionToUse?: AuthSystemVersion;
152
- };
153
- export type UpdateEmployee = {
154
- /**
155
- * Employee's full legal name.
156
- *
157
- */
158
- fullName?: string;
159
- /**
160
- * Employee's date of birth.
161
- */
162
- dateOfBirth?: IsoDate;
163
- /**
164
- * Status of the employee. Identifies if given user can perform any actions or not. See `OrgEmployeeStatus` for more details.
165
- */
166
- status?: OrgEmployeeStatus;
167
- };
168
- export type UpdateOrg = {
169
- /**
170
- * Full legal name of the organisation, including suffixes such as LLC, Limited, etc.
171
- */
172
- legalName?: string;
173
- /**
174
- * Trading name by which company is known. For example "Panasonic" instead of "Panasonic Holdings Corporation".
175
- */
176
- tradingName?: string;
177
- /**
178
- * Date when organisation was incorporated.
179
- */
180
- dateOfIncorporation?: IsoDate;
181
- /**
182
- * Country where organisation is head quartered, and default jurisdiction if applies.
183
- */
184
- country?: Countries;
185
- /**
186
- * Date when organisation was onboarded in Dfns.
187
- */
188
- dateOnboarded?: IsoDate;
189
- };
190
- export type CreateOrg = {
191
- /**
192
- * Full legal name of the organisation, including suffixes such as LLC, Limited, etc.
193
- */
194
- legalName: string;
195
- /**
196
- * Trading name by which company is known. For example "Panasonic" instead of "Panasonic Holdings Corporation".
197
- */
198
- tradingName: string;
199
- /**
200
- * Date when organisation was incorporated.
201
- */
202
- dateOfIncorporation: IsoDate;
203
- /**
204
- * Country where organisation is head quartered, and default jurisdiction if applies.
205
- */
206
- country: Countries;
207
- /**
208
- * Date when organisation was onboarded in Dfns.
209
- */
210
- dateOnboarded?: IsoDate;
211
- /**
212
- * List of `CreateOrgEmpoyeePayload` for the organisations. These employees will be created for this org.
213
- */
214
- employees?: CreateOrgEmployeePayload[];
215
- authVersionToUse?: AuthSystemVersion;
216
- /**
217
- * Indicates signing cluster identifier.
218
- */
219
- clusterId?: string;
220
- };
221
- /**
222
- * Indicates customer’s status within a lifecycle.
223
- */
224
- export declare enum OrgStatus {
225
- Archived = "Archived",
226
- Disabled = "Disabled",
227
- Enabled = "Enabled",
228
- Creating = "Creating",
229
- Approved = "Approved"
230
- }
231
- export declare enum OrgEmployeeStatus {
232
- Enabled = "Enabled",
233
- Disabled = "Disabled",
234
- Archived = "Archived"
235
- }
236
- export declare enum AuthSystemVersion {
237
- AuthV1 = "AuthV1",
238
- AuthV2 = "AuthV2",
239
- All = "All"
240
- }
@@ -1,39 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AuthSystemVersion = exports.OrgEmployeeStatus = exports.OrgStatus = void 0;
4
- /**
5
- * Indicates customer’s status within a lifecycle.
6
- */
7
- var OrgStatus;
8
- (function (OrgStatus) {
9
- //Customer is archived and no longer functional. Customer will have to go through re-onboarding to be enabled again.
10
- OrgStatus["Archived"] = "Archived";
11
- //Customer is disabled. Usually temporary action, in case something goes wrong.
12
- OrgStatus["Disabled"] = "Disabled";
13
- //Customer is enabled and operational.
14
- OrgStatus["Enabled"] = "Enabled";
15
- //Customer is being created at the moment.
16
- OrgStatus["Creating"] = "Creating";
17
- //Customer is approved to be created and initialized.
18
- OrgStatus["Approved"] = "Approved";
19
- })(OrgStatus || (exports.OrgStatus = OrgStatus = {}));
20
- // FIXME: Missing documentation for OrgEmployeeStatus
21
- var OrgEmployeeStatus;
22
- (function (OrgEmployeeStatus) {
23
- //OrgEmployee is enabled and active.
24
- OrgEmployeeStatus["Enabled"] = "Enabled";
25
- //OrgEmployee is temporary disabled.
26
- OrgEmployeeStatus["Disabled"] = "Disabled";
27
- //OrgEmployee is deleted, and archived for audit purposes.
28
- OrgEmployeeStatus["Archived"] = "Archived";
29
- })(OrgEmployeeStatus || (exports.OrgEmployeeStatus = OrgEmployeeStatus = {}));
30
- // FIXME: Missing documentation for AuthSystemVersion
31
- var AuthSystemVersion;
32
- (function (AuthSystemVersion) {
33
- // FIXME: Missing documentation for AuthV1
34
- AuthSystemVersion["AuthV1"] = "AuthV1";
35
- // FIXME: Missing documentation for AuthV2
36
- AuthSystemVersion["AuthV2"] = "AuthV2";
37
- // FIXME: Missing documentation for All
38
- AuthSystemVersion["All"] = "All";
39
- })(AuthSystemVersion || (exports.AuthSystemVersion = AuthSystemVersion = {}));
File without changes
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,2 +0,0 @@
1
- export * from './responses';
2
- export * from './types';
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./responses"), exports);
18
- __exportStar(require("./types"), exports);
@@ -1,75 +0,0 @@
1
- import { BadRequestError, DuplicateError, EntityNotFoundError, ForbiddenError, UnauthorizedError } from '../Foundations';
2
- import { DeletionAcknowledgement, Permission, PermissionAssignment, PermissionPredicate } from './types';
3
- export type CreatePermissionSuccess = Permission;
4
- export type CreatePermissionError = {
5
- error: BadRequestError | DuplicateError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
6
- };
7
- export type CreatePermissionResponse = CreatePermissionSuccess | CreatePermissionError;
8
- export type UpdatePermissionSuccess = Permission;
9
- export type UpdatePermissionError = {
10
- error: BadRequestError | EntityNotFoundError | ForbiddenError | DuplicateError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
11
- };
12
- export type UpdatePermissionResponse = UpdatePermissionSuccess | UpdatePermissionError;
13
- export type ArchivePermissionSuccess = Permission;
14
- export type ArchivePermissionError = {
15
- error: EntityNotFoundError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
16
- };
17
- export type ArchivePermissionResponse = ArchivePermissionSuccess | ArchivePermissionError;
18
- export type GetPermissionByIdSuccess = Permission;
19
- export type GetPermissionByIdError = {
20
- error: EntityNotFoundError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
21
- };
22
- export type GetPermissionByIdResponse = GetPermissionByIdSuccess | GetPermissionByIdError;
23
- export type ListPermissionsSuccess = {
24
- items: Permission[];
25
- };
26
- export type ListPermissionsError = {
27
- error: ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
28
- };
29
- export type ListPermissionsResponse = ListPermissionsSuccess | ListPermissionsError;
30
- export type CreatePermissionPredicateSuccess = PermissionPredicate;
31
- export type CreatePermissionPredicateError = {
32
- error: BadRequestError | DuplicateError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
33
- };
34
- export type CreatePermissionPredicateResponse = CreatePermissionPredicateSuccess | CreatePermissionPredicateError;
35
- export type UpdatePermissionPredicateSuccess = PermissionPredicate;
36
- export type UpdatePermissionPredicateError = {
37
- error: BadRequestError | EntityNotFoundError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
38
- };
39
- export type UpdatePermissionPredicateResponse = UpdatePermissionPredicateSuccess | UpdatePermissionPredicateError;
40
- export type ArchivePermissionPredicateSuccess = PermissionPredicate;
41
- export type ArchivePermissionPredicateError = {
42
- error: EntityNotFoundError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
43
- };
44
- export type ArchivePermissionPredicateResponse = ArchivePermissionPredicateSuccess | ArchivePermissionPredicateError;
45
- export type ListPermissionPredicatesSuccess = {
46
- items: PermissionPredicate[];
47
- };
48
- export type ListPermissionPredicatesError = {
49
- error: ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
50
- };
51
- export type ListPermissionPredicatesResponse = ListPermissionPredicatesSuccess | ListPermissionPredicatesError;
52
- export type CreatePermissionAssignmentSuccess = PermissionAssignment;
53
- export type CreatePermissionAssignmentError = {
54
- error: BadRequestError | EntityNotFoundError | DuplicateError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
55
- };
56
- export type CreatePermissionAssignmentResponse = CreatePermissionAssignmentSuccess | CreatePermissionAssignmentError;
57
- export type RevokePermissionAssignmentSuccess = DeletionAcknowledgement;
58
- export type RevokePermissionAssignmentError = {
59
- error: EntityNotFoundError | ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
60
- };
61
- export type RevokePermissionAssignmentResponse = RevokePermissionAssignmentSuccess | RevokePermissionAssignmentError;
62
- export type ListPermissionAssignmentsSuccess = {
63
- items: PermissionAssignment[];
64
- };
65
- export type ListPermissionAssignmentsError = {
66
- error: ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
67
- };
68
- export type ListPermissionAssignmentsResponse = ListPermissionAssignmentsSuccess | ListPermissionAssignmentsError;
69
- export type ListPermissionsHistoricalSuccess = {
70
- items: Permission[];
71
- };
72
- export type ListPermissionsHistoricalError = {
73
- error: ForbiddenError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
74
- };
75
- export type ListPermissionsHistoricalResponse = ListPermissionsHistoricalSuccess | ListPermissionsHistoricalError;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,93 +0,0 @@
1
- import { EntityId, IsoDatetime } from '../Foundations';
2
- export type Permission = {
3
- id: EntityId;
4
- orgId: EntityId;
5
- name: string;
6
- operations: string[];
7
- status: PermissionStatus;
8
- resourceId?: string;
9
- isImmutable: boolean;
10
- predicates?: PermissionPredicate[];
11
- dateCreated: IsoDatetime;
12
- dateUpdated: IsoDatetime;
13
- isArchived: boolean;
14
- };
15
- export type PermissionPredicate = {
16
- id: EntityId;
17
- permissionId: EntityId;
18
- fieldName: string;
19
- evaluatorKind: FieldEvaluatorKind;
20
- parameters: string[];
21
- isImmutable: boolean;
22
- dateCreated: IsoDatetime;
23
- dateUpdated: IsoDatetime;
24
- isArchived: boolean;
25
- };
26
- export type PermissionAssignment = {
27
- id: EntityId;
28
- permissionId: string;
29
- identityId: EntityId;
30
- dateCreated: IsoDatetime;
31
- dateUpdated: IsoDatetime;
32
- };
33
- export type DeletionAcknowledgement = {
34
- id: string;
35
- };
36
- export type ResourceOwnership = {
37
- id: EntityId;
38
- orgId: EntityId;
39
- resourceId: EntityId;
40
- resourceKind: string;
41
- ownerId: EntityId;
42
- ownerKind: OwnerKind;
43
- dateCreated: IsoDatetime;
44
- dateUpdated: IsoDatetime;
45
- };
46
- export type CreatePermissionInput = {
47
- name: string;
48
- operations: string[];
49
- };
50
- export type UpdatePermissionInput = {
51
- name?: string;
52
- operations?: string[];
53
- };
54
- export type ArchivePermissionInput = {
55
- isArchived: boolean;
56
- };
57
- export type CreatePermissionPredicateInput = {
58
- fieldName: string;
59
- evaluatorKind: FieldEvaluatorKind;
60
- parameters: string[];
61
- };
62
- export type UpdatePermissionPredicateInput = {
63
- fieldName?: string;
64
- evaluatorKind?: FieldEvaluatorKind;
65
- parameters?: string[];
66
- };
67
- export type ArchivePermissionPredicateInput = {
68
- isArchived: boolean;
69
- };
70
- export type CreatePermissionAssignmentInput = {
71
- permissionId: string;
72
- identityId: string;
73
- };
74
- export declare enum FieldEvaluatorKind {
75
- ContainsAll = "ContainsAll",
76
- ContainsOneOf = "ContainsOneOf",
77
- DateAfter = "DateAfter",
78
- DateBefore = "DateBefore",
79
- Is = "Is",
80
- ValueGreaterThan = "ValueGreaterThan",
81
- ValueLessThan = "ValueLessThan"
82
- }
83
- export declare enum PermissionStatus {
84
- Active = "Active"
85
- }
86
- export declare enum OwnerKind {
87
- LegalPerson = "LegalPerson",
88
- NaturalPerson = "NaturalPerson"
89
- }
90
- export declare enum ResourceKind {
91
- Wallet = "Wallet",
92
- PublicKey = "PublicKey"
93
- }
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ResourceKind = exports.OwnerKind = exports.PermissionStatus = exports.FieldEvaluatorKind = void 0;
4
- // FIXME: Missing documentation for FieldEvaluatorKind
5
- var FieldEvaluatorKind;
6
- (function (FieldEvaluatorKind) {
7
- // FIXME: Missing documentation for ContainsAll
8
- FieldEvaluatorKind["ContainsAll"] = "ContainsAll";
9
- // FIXME: Missing documentation for ContainsOneOf
10
- FieldEvaluatorKind["ContainsOneOf"] = "ContainsOneOf";
11
- // FIXME: Missing documentation for DateAfter
12
- FieldEvaluatorKind["DateAfter"] = "DateAfter";
13
- // FIXME: Missing documentation for DateBefore
14
- FieldEvaluatorKind["DateBefore"] = "DateBefore";
15
- // FIXME: Missing documentation for Is
16
- FieldEvaluatorKind["Is"] = "Is";
17
- // FIXME: Missing documentation for ValueGreaterThan
18
- FieldEvaluatorKind["ValueGreaterThan"] = "ValueGreaterThan";
19
- // FIXME: Missing documentation for ValueLessThan
20
- FieldEvaluatorKind["ValueLessThan"] = "ValueLessThan";
21
- })(FieldEvaluatorKind || (exports.FieldEvaluatorKind = FieldEvaluatorKind = {}));
22
- // FIXME: Missing documentation for PermissionStatus
23
- var PermissionStatus;
24
- (function (PermissionStatus) {
25
- // FIXME: Missing documentation for Active
26
- PermissionStatus["Active"] = "Active";
27
- })(PermissionStatus || (exports.PermissionStatus = PermissionStatus = {}));
28
- // FIXME: Missing documentation for OwnerKind
29
- var OwnerKind;
30
- (function (OwnerKind) {
31
- // FIXME: Missing documentation for LegalPerson
32
- OwnerKind["LegalPerson"] = "LegalPerson";
33
- // FIXME: Missing documentation for NaturalPerson
34
- OwnerKind["NaturalPerson"] = "NaturalPerson";
35
- })(OwnerKind || (exports.OwnerKind = OwnerKind = {}));
36
- // FIXME: Missing documentation for ResourceKind
37
- var ResourceKind;
38
- (function (ResourceKind) {
39
- // FIXME: Missing documentation for Wallet
40
- ResourceKind["Wallet"] = "Wallet";
41
- // FIXME: Missing documentation for PublicKey
42
- ResourceKind["PublicKey"] = "PublicKey";
43
- })(ResourceKind || (exports.ResourceKind = ResourceKind = {}));
@@ -1,11 +0,0 @@
1
- import { DfnsError } from '../Foundations';
2
- export declare class PolicyApprovalNotAllowedError extends DfnsError {
3
- name: string;
4
- serviceName: string;
5
- message: string;
6
- causes?: string[];
7
- shouldTriggerInvestigaton: boolean;
8
- isDfnsError: boolean;
9
- httpStatus: number;
10
- errorName: string;
11
- }
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PolicyApprovalNotAllowedError = void 0;
4
- const Foundations_1 = require("../Foundations");
5
- class PolicyApprovalNotAllowedError extends Foundations_1.DfnsError {
6
- constructor() {
7
- super(...arguments);
8
- this.name = 'PolicyApprovalNotAllowedError';
9
- // FIXME: Missing documentation for isDfnsError
10
- this.isDfnsError = true;
11
- // FIXME: Missing documentation for httpStatus
12
- this.httpStatus = 403;
13
- // FIXME: Missing documentation for errorName
14
- this.errorName = 'Policy Approval Not Allowed';
15
- }
16
- }
17
- exports.PolicyApprovalNotAllowedError = PolicyApprovalNotAllowedError;
@@ -1,3 +0,0 @@
1
- export * from './errors';
2
- export * from './responses';
3
- export * from './types';