@dfns/sdk 0.1.0-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.
Files changed (161) hide show
  1. package/baseAuthApi.d.ts +53 -0
  2. package/baseAuthApi.js +39 -0
  3. package/codegen/ApiKeys/ApiKeysClient.d.ts +10 -0
  4. package/codegen/ApiKeys/ApiKeysClient.js +56 -0
  5. package/codegen/ApiKeys/DelegatedApiKeysClient.d.ts +13 -0
  6. package/codegen/ApiKeys/DelegatedApiKeysClient.js +88 -0
  7. package/codegen/ApiKeys/index.d.ts +3 -0
  8. package/codegen/ApiKeys/index.js +19 -0
  9. package/codegen/ApiKeys/types.d.ts +16 -0
  10. package/codegen/ApiKeys/types.js +2 -0
  11. package/codegen/Assets/AssetsClient.d.ts +14 -0
  12. package/codegen/Assets/AssetsClient.js +105 -0
  13. package/codegen/Assets/DelegatedAssetsClient.d.ts +18 -0
  14. package/codegen/Assets/DelegatedAssetsClient.js +152 -0
  15. package/codegen/Assets/index.d.ts +3 -0
  16. package/codegen/Assets/index.js +19 -0
  17. package/codegen/Assets/types.d.ts +39 -0
  18. package/codegen/Assets/types.js +2 -0
  19. package/codegen/Auth/AuthClient.d.ts +62 -0
  20. package/codegen/Auth/AuthClient.js +667 -0
  21. package/codegen/Auth/DelegatedAuthClient.d.ts +98 -0
  22. package/codegen/Auth/DelegatedAuthClient.js +1223 -0
  23. package/codegen/Auth/index.d.ts +3 -0
  24. package/codegen/Auth/index.js +19 -0
  25. package/codegen/Auth/types.d.ts +243 -0
  26. package/codegen/Auth/types.js +2 -0
  27. package/codegen/Callbacks/CallbacksClient.d.ts +12 -0
  28. package/codegen/Callbacks/CallbacksClient.js +78 -0
  29. package/codegen/Callbacks/DelegatedCallbacksClient.d.ts +15 -0
  30. package/codegen/Callbacks/DelegatedCallbacksClient.js +110 -0
  31. package/codegen/Callbacks/index.d.ts +3 -0
  32. package/codegen/Callbacks/index.js +19 -0
  33. package/codegen/Callbacks/types.d.ts +23 -0
  34. package/codegen/Callbacks/types.js +2 -0
  35. package/codegen/Permissions/DelegatedPermissionsClient.d.ts +28 -0
  36. package/codegen/Permissions/DelegatedPermissionsClient.js +297 -0
  37. package/codegen/Permissions/PermissionsClient.d.ts +19 -0
  38. package/codegen/Permissions/PermissionsClient.js +169 -0
  39. package/codegen/Permissions/index.d.ts +3 -0
  40. package/codegen/Permissions/index.js +19 -0
  41. package/codegen/Permissions/types.d.ts +71 -0
  42. package/codegen/Permissions/types.js +2 -0
  43. package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.d.ts +11 -0
  44. package/codegen/PolicyExecution/DelegatedPolicyExecutionClient.js +62 -0
  45. package/codegen/PolicyExecution/PolicyExecutionClient.d.ts +9 -0
  46. package/codegen/PolicyExecution/PolicyExecutionClient.js +46 -0
  47. package/codegen/PolicyExecution/index.d.ts +3 -0
  48. package/codegen/PolicyExecution/index.js +19 -0
  49. package/codegen/PolicyExecution/types.d.ts +16 -0
  50. package/codegen/PolicyExecution/types.js +2 -0
  51. package/codegen/PolicyManagement/DelegatedPolicyManagementClient.d.ts +31 -0
  52. package/codegen/PolicyManagement/DelegatedPolicyManagementClient.js +324 -0
  53. package/codegen/PolicyManagement/PolicyManagementClient.d.ts +21 -0
  54. package/codegen/PolicyManagement/PolicyManagementClient.js +185 -0
  55. package/codegen/PolicyManagement/index.d.ts +3 -0
  56. package/codegen/PolicyManagement/index.js +19 -0
  57. package/codegen/PolicyManagement/types.d.ts +91 -0
  58. package/codegen/PolicyManagement/types.js +2 -0
  59. package/codegen/PublicKeys/DelegatedPublicKeysClient.d.ts +21 -0
  60. package/codegen/PublicKeys/DelegatedPublicKeysClient.js +191 -0
  61. package/codegen/PublicKeys/PublicKeysClient.d.ts +16 -0
  62. package/codegen/PublicKeys/PublicKeysClient.js +130 -0
  63. package/codegen/PublicKeys/index.d.ts +3 -0
  64. package/codegen/PublicKeys/index.js +19 -0
  65. package/codegen/PublicKeys/types.d.ts +51 -0
  66. package/codegen/PublicKeys/types.js +2 -0
  67. package/codegen/Wallets/DelegatedWalletsClient.d.ts +26 -0
  68. package/codegen/Wallets/DelegatedWalletsClient.js +249 -0
  69. package/codegen/Wallets/WalletsClient.d.ts +21 -0
  70. package/codegen/Wallets/WalletsClient.js +188 -0
  71. package/codegen/Wallets/index.d.ts +3 -0
  72. package/codegen/Wallets/index.js +19 -0
  73. package/codegen/Wallets/types.d.ts +87 -0
  74. package/codegen/Wallets/types.js +2 -0
  75. package/codegen/datamodel/ApiKeys/errors.d.ts +6 -0
  76. package/codegen/datamodel/ApiKeys/errors.js +15 -0
  77. package/codegen/datamodel/ApiKeys/index.d.ts +3 -0
  78. package/codegen/datamodel/ApiKeys/index.js +19 -0
  79. package/codegen/datamodel/ApiKeys/responses.d.ts +25 -0
  80. package/codegen/datamodel/ApiKeys/responses.js +2 -0
  81. package/codegen/datamodel/ApiKeys/types.d.ts +32 -0
  82. package/codegen/datamodel/ApiKeys/types.js +11 -0
  83. package/codegen/datamodel/Assets/errors.d.ts +11 -0
  84. package/codegen/datamodel/Assets/errors.js +17 -0
  85. package/codegen/datamodel/Assets/index.d.ts +3 -0
  86. package/codegen/datamodel/Assets/index.js +19 -0
  87. package/codegen/datamodel/Assets/responses.d.ts +45 -0
  88. package/codegen/datamodel/Assets/responses.js +2 -0
  89. package/codegen/datamodel/Assets/types.d.ts +225 -0
  90. package/codegen/datamodel/Assets/types.js +75 -0
  91. package/codegen/datamodel/Auth/index.d.ts +2 -0
  92. package/codegen/datamodel/Auth/index.js +18 -0
  93. package/codegen/datamodel/Auth/responses.d.ts +348 -0
  94. package/codegen/datamodel/Auth/responses.js +2 -0
  95. package/codegen/datamodel/Auth/types.d.ts +610 -0
  96. package/codegen/datamodel/Auth/types.js +127 -0
  97. package/codegen/datamodel/Callbacks/index.d.ts +2 -0
  98. package/codegen/datamodel/Callbacks/index.js +18 -0
  99. package/codegen/datamodel/Callbacks/responses.d.ts +36 -0
  100. package/codegen/datamodel/Callbacks/responses.js +2 -0
  101. package/codegen/datamodel/Callbacks/types.d.ts +43 -0
  102. package/codegen/datamodel/Callbacks/types.js +39 -0
  103. package/codegen/datamodel/Foundations/errors.d.ts +121 -0
  104. package/codegen/datamodel/Foundations/errors.js +169 -0
  105. package/codegen/datamodel/Foundations/index.d.ts +2 -0
  106. package/codegen/datamodel/Foundations/index.js +18 -0
  107. package/codegen/datamodel/Foundations/types.d.ts +9754 -0
  108. package/codegen/datamodel/Foundations/types.js +57741 -0
  109. package/codegen/datamodel/Permissions/index.d.ts +2 -0
  110. package/codegen/datamodel/Permissions/index.js +18 -0
  111. package/codegen/datamodel/Permissions/responses.d.ts +75 -0
  112. package/codegen/datamodel/Permissions/responses.js +2 -0
  113. package/codegen/datamodel/Permissions/types.d.ts +106 -0
  114. package/codegen/datamodel/Permissions/types.js +65 -0
  115. package/codegen/datamodel/PolicyExecution/errors.d.ts +11 -0
  116. package/codegen/datamodel/PolicyExecution/errors.js +17 -0
  117. package/codegen/datamodel/PolicyExecution/index.d.ts +3 -0
  118. package/codegen/datamodel/PolicyExecution/index.js +19 -0
  119. package/codegen/datamodel/PolicyExecution/responses.d.ts +17 -0
  120. package/codegen/datamodel/PolicyExecution/responses.js +2 -0
  121. package/codegen/datamodel/PolicyExecution/types.d.ts +45 -0
  122. package/codegen/datamodel/PolicyExecution/types.js +15 -0
  123. package/codegen/datamodel/PolicyManagement/index.d.ts +2 -0
  124. package/codegen/datamodel/PolicyManagement/index.js +18 -0
  125. package/codegen/datamodel/PolicyManagement/responses.d.ts +83 -0
  126. package/codegen/datamodel/PolicyManagement/responses.js +2 -0
  127. package/codegen/datamodel/PolicyManagement/types.d.ts +252 -0
  128. package/codegen/datamodel/PolicyManagement/types.js +81 -0
  129. package/codegen/datamodel/PublicKeys/index.d.ts +2 -0
  130. package/codegen/datamodel/PublicKeys/index.js +18 -0
  131. package/codegen/datamodel/PublicKeys/responses.d.ts +56 -0
  132. package/codegen/datamodel/PublicKeys/responses.js +2 -0
  133. package/codegen/datamodel/PublicKeys/types.d.ts +222 -0
  134. package/codegen/datamodel/PublicKeys/types.js +59 -0
  135. package/codegen/datamodel/Wallets/index.d.ts +2 -0
  136. package/codegen/datamodel/Wallets/index.js +18 -0
  137. package/codegen/datamodel/Wallets/responses.d.ts +77 -0
  138. package/codegen/datamodel/Wallets/responses.js +2 -0
  139. package/codegen/datamodel/Wallets/types.d.ts +261 -0
  140. package/codegen/datamodel/Wallets/types.js +89 -0
  141. package/dfnsApiClient.d.ts +27 -0
  142. package/dfnsApiClient.js +45 -0
  143. package/dfnsAuthenticator.d.ts +11 -0
  144. package/dfnsAuthenticator.js +18 -0
  145. package/dfnsDelegatedApiClient.d.ts +24 -0
  146. package/dfnsDelegatedApiClient.js +41 -0
  147. package/dfnsError.d.ts +5 -0
  148. package/dfnsError.js +11 -0
  149. package/index.d.ts +3 -0
  150. package/index.js +19 -0
  151. package/package.json +11 -0
  152. package/signer.d.ts +47 -0
  153. package/signer.js +2 -0
  154. package/utils/base64.d.ts +3 -0
  155. package/utils/base64.js +20 -0
  156. package/utils/fetch.d.ts +12 -0
  157. package/utils/fetch.js +89 -0
  158. package/utils/nonce.d.ts +1 -0
  159. package/utils/nonce.js +12 -0
  160. package/utils/url.d.ts +4 -0
  161. package/utils/url.js +15 -0
@@ -0,0 +1,127 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthIdentityKind = exports.UserAuthKind = exports.AccessTokenKind = exports.ServerKind = exports.CredentialFactor = exports.FidoCredentialsTransportKind = exports.ApplicationKind = exports.AuthenticatorAttestationOptions = exports.AuthenticatorRequirementOptions = exports.UserKind = exports.CredentialKind = void 0;
4
+ // FIXME: Missing documentation for CredentialKind
5
+ var CredentialKind;
6
+ (function (CredentialKind) {
7
+ // FIXME: Missing documentation for Fido2
8
+ CredentialKind["Fido2"] = "Fido2";
9
+ // FIXME: Missing documentation for Key
10
+ CredentialKind["Key"] = "Key";
11
+ // FIXME: Missing documentation for Password
12
+ CredentialKind["Password"] = "Password";
13
+ // FIXME: Missing documentation for Totp
14
+ CredentialKind["Totp"] = "Totp";
15
+ // FIXME: Missing documentation for RecoveryKey
16
+ CredentialKind["RecoveryKey"] = "RecoveryKey";
17
+ })(CredentialKind = exports.CredentialKind || (exports.CredentialKind = {}));
18
+ // FIXME: Missing documentation for UserKind
19
+ var UserKind;
20
+ (function (UserKind) {
21
+ // FIXME: Missing documentation for CustomerEmployee
22
+ UserKind["CustomerEmployee"] = "CustomerEmployee";
23
+ // FIXME: Missing documentation for DfnsStaff
24
+ UserKind["DfnsStaff"] = "DfnsStaff";
25
+ // FIXME: Missing documentation for EndUser
26
+ UserKind["EndUser"] = "EndUser";
27
+ // FIXME: Missing documentation for Pat
28
+ UserKind["Pat"] = "Pat";
29
+ // FIXME: Missing documentation for Application
30
+ UserKind["Application"] = "Application";
31
+ // FIXME: Missing documentation for ServiceAccount
32
+ UserKind["ServiceAccount"] = "ServiceAccount";
33
+ })(UserKind = exports.UserKind || (exports.UserKind = {}));
34
+ // FIXME: Missing documentation for AuthenticatorRequirementOptions
35
+ var AuthenticatorRequirementOptions;
36
+ (function (AuthenticatorRequirementOptions) {
37
+ // FIXME: Missing documentation for required
38
+ AuthenticatorRequirementOptions["required"] = "required";
39
+ // FIXME: Missing documentation for preferred
40
+ AuthenticatorRequirementOptions["preferred"] = "preferred";
41
+ // FIXME: Missing documentation for discouraged
42
+ AuthenticatorRequirementOptions["discouraged"] = "discouraged";
43
+ })(AuthenticatorRequirementOptions = exports.AuthenticatorRequirementOptions || (exports.AuthenticatorRequirementOptions = {}));
44
+ // FIXME: Missing documentation for AuthenticatorAttestationOptions
45
+ var AuthenticatorAttestationOptions;
46
+ (function (AuthenticatorAttestationOptions) {
47
+ // FIXME: Missing documentation for none
48
+ AuthenticatorAttestationOptions["none"] = "none";
49
+ // FIXME: Missing documentation for indirect
50
+ AuthenticatorAttestationOptions["indirect"] = "indirect";
51
+ // FIXME: Missing documentation for direct
52
+ AuthenticatorAttestationOptions["direct"] = "direct";
53
+ // FIXME: Missing documentation for enterprise
54
+ AuthenticatorAttestationOptions["enterprise"] = "enterprise";
55
+ })(AuthenticatorAttestationOptions = exports.AuthenticatorAttestationOptions || (exports.AuthenticatorAttestationOptions = {}));
56
+ // FIXME: Missing documentation for ApplicationKind
57
+ var ApplicationKind;
58
+ (function (ApplicationKind) {
59
+ // FIXME: Missing documentation for ServerSideApplication
60
+ ApplicationKind["ServerSideApplication"] = "ServerSideApplication";
61
+ // FIXME: Missing documentation for ClientSideApplication
62
+ ApplicationKind["ClientSideApplication"] = "ClientSideApplication";
63
+ })(ApplicationKind = exports.ApplicationKind || (exports.ApplicationKind = {}));
64
+ // FIXME: Missing documentation for FidoCredentialsTransportKind
65
+ var FidoCredentialsTransportKind;
66
+ (function (FidoCredentialsTransportKind) {
67
+ // FIXME: Missing documentation for usb
68
+ FidoCredentialsTransportKind["usb"] = "usb";
69
+ // FIXME: Missing documentation for nfc
70
+ FidoCredentialsTransportKind["nfc"] = "nfc";
71
+ // FIXME: Missing documentation for ble
72
+ FidoCredentialsTransportKind["ble"] = "ble";
73
+ // FIXME: Missing documentation for internal
74
+ FidoCredentialsTransportKind["internal"] = "internal";
75
+ // FIXME: Missing documentation for hybrid
76
+ FidoCredentialsTransportKind["hybrid"] = "hybrid";
77
+ })(FidoCredentialsTransportKind = exports.FidoCredentialsTransportKind || (exports.FidoCredentialsTransportKind = {}));
78
+ // FIXME: Missing documentation for CredentialFactor
79
+ var CredentialFactor;
80
+ (function (CredentialFactor) {
81
+ // FIXME: Missing documentation for first
82
+ CredentialFactor["first"] = "first";
83
+ // FIXME: Missing documentation for second
84
+ CredentialFactor["second"] = "second";
85
+ // FIXME: Missing documentation for either
86
+ CredentialFactor["either"] = "either";
87
+ })(CredentialFactor = exports.CredentialFactor || (exports.CredentialFactor = {}));
88
+ // FIXME: Missing documentation for ServerKind
89
+ var ServerKind;
90
+ (function (ServerKind) {
91
+ // FIXME: Missing documentation for Api
92
+ ServerKind["Api"] = "Api";
93
+ // FIXME: Missing documentation for Staff
94
+ ServerKind["Staff"] = "Staff";
95
+ })(ServerKind = exports.ServerKind || (exports.ServerKind = {}));
96
+ // FIXME: Missing documentation for AccessTokenKind
97
+ var AccessTokenKind;
98
+ (function (AccessTokenKind) {
99
+ // FIXME: Missing documentation for ServiceAccount
100
+ AccessTokenKind["ServiceAccount"] = "ServiceAccount";
101
+ // FIXME: Missing documentation for Pat
102
+ AccessTokenKind["Pat"] = "Pat";
103
+ // FIXME: Missing documentation for Application
104
+ AccessTokenKind["Application"] = "Application";
105
+ })(AccessTokenKind = exports.AccessTokenKind || (exports.AccessTokenKind = {}));
106
+ // FIXME: Missing documentation for UserAuthKind
107
+ var UserAuthKind;
108
+ (function (UserAuthKind) {
109
+ // FIXME: Missing documentation for EndUser
110
+ UserAuthKind["EndUser"] = "EndUser";
111
+ // FIXME: Missing documentation for CustomerEmployee
112
+ UserAuthKind["CustomerEmployee"] = "CustomerEmployee";
113
+ // FIXME: Missing documentation for DfnsStaff
114
+ UserAuthKind["DfnsStaff"] = "DfnsStaff";
115
+ })(UserAuthKind = exports.UserAuthKind || (exports.UserAuthKind = {}));
116
+ // FIXME: Missing documentation for AuthIdentityKind
117
+ var AuthIdentityKind;
118
+ (function (AuthIdentityKind) {
119
+ // FIXME: Missing documentation for DfnsStaffIdentity
120
+ AuthIdentityKind["DfnsStaffIdentity"] = "DfnsStaffIdentity";
121
+ // FIXME: Missing documentation for OrgEmployeeIdentity
122
+ AuthIdentityKind["OrgEmployeeIdentity"] = "OrgEmployeeIdentity";
123
+ // FIXME: Missing documentation for OrgApiKeyIdentity
124
+ AuthIdentityKind["OrgApiKeyIdentity"] = "OrgApiKeyIdentity";
125
+ // FIXME: Missing documentation for DfnsService
126
+ AuthIdentityKind["DfnsService"] = "DfnsService";
127
+ })(AuthIdentityKind = exports.AuthIdentityKind || (exports.AuthIdentityKind = {}));
@@ -0,0 +1,2 @@
1
+ export * from './responses';
2
+ export * from './types';
@@ -0,0 +1,18 @@
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);
@@ -0,0 +1,36 @@
1
+ import { BadRequestError, EntityNotFoundError, ForbiddenError, UnauthorizedError } from '../Foundations';
2
+ import { CallbackEvent, CallbackSubscription } from './types';
3
+ export type CreateCallbackSubscriptionSuccess = CallbackSubscription;
4
+ export type CreateCallbackSubscriptionError = {
5
+ error: BadRequestError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
6
+ };
7
+ export type CreateCallbackSubscriptionResponse = CreateCallbackSubscriptionSuccess | CreateCallbackSubscriptionError;
8
+ export type GetCallbackSubscriptionByIdSuccess = CallbackSubscription;
9
+ export type GetCallbackSubscriptionByIdError = {
10
+ error: EntityNotFoundError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
11
+ };
12
+ export type GetCallbackSubscriptionByIdResponse = GetCallbackSubscriptionByIdSuccess | GetCallbackSubscriptionByIdError;
13
+ export type ListCallbackSubscriptionsSuccess = {
14
+ items: CallbackSubscription[];
15
+ };
16
+ export type ListCallbackSubscriptionsError = {
17
+ error: UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
18
+ };
19
+ export type ListCallbackSubscriptionsResponse = ListCallbackSubscriptionsSuccess | ListCallbackSubscriptionsError;
20
+ export type ArchiveCallbackSubscriptionSuccess = CallbackSubscription;
21
+ export type ArchiveCallbackSubscriptionError = {
22
+ error: UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
23
+ };
24
+ export type ArchiveCallbackSubscriptionResponse = ArchiveCallbackSubscriptionSuccess | ArchiveCallbackSubscriptionError;
25
+ export type GetCallbackEventByIdSuccess = CallbackEvent;
26
+ export type GetCallbackEventByIdError = {
27
+ error: EntityNotFoundError | UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
28
+ };
29
+ export type GetCallbackEventByIdResponse = GetCallbackEventByIdSuccess | GetCallbackEventByIdError;
30
+ export type ListCallbackEventsSuccess = {
31
+ items: CallbackEvent[];
32
+ };
33
+ export type ListCallbackEventsError = {
34
+ error: UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
35
+ };
36
+ export type ListCallbackEventsResponse = ListCallbackEventsSuccess | ListCallbackEventsError;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,43 @@
1
+ import { DocumentSnapshot, EntityId, IsoDatetime } from '../Foundations';
2
+ export type CallbackEvent = {
3
+ id: EntityId;
4
+ orgId: EntityId;
5
+ externalId?: string;
6
+ callbackSubscriptionId: EntityId;
7
+ kind: CallbackEventKind;
8
+ documentSnapshot: DocumentSnapshot;
9
+ dateCreated: IsoDatetime;
10
+ status: CallbackEventStatus;
11
+ };
12
+ export type CallbackSubscription = {
13
+ id: EntityId;
14
+ orgId: EntityId;
15
+ externalId?: string;
16
+ eventKind: CallbackEventKind;
17
+ url: string;
18
+ status: CallbackSubscriptionStatus;
19
+ dateCreated: IsoDatetime;
20
+ };
21
+ export type CreateCallbackSubscriptionInput = {
22
+ externalId?: string;
23
+ eventKind: CallbackEventKind;
24
+ url: string;
25
+ };
26
+ export declare enum CallbackEventKind {
27
+ PaymentInitiated = "PaymentInitiated",
28
+ PaymentExecuted = "PaymentExecuted",
29
+ PaymentConfirmed = "PaymentConfirmed",
30
+ PaymentReceived = "PaymentReceived",
31
+ TransactionBroadcasted = "TransactionBroadcasted",
32
+ WalletCreated = "WalletCreated",
33
+ PolicyActivated = "PolicyActivated"
34
+ }
35
+ export declare enum CallbackEventStatus {
36
+ Sent = "Sent",
37
+ Failed = "Failed"
38
+ }
39
+ export declare enum CallbackSubscriptionStatus {
40
+ Enabled = "Enabled",
41
+ Disabled = "Disabled",
42
+ Archived = "Archived"
43
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CallbackSubscriptionStatus = exports.CallbackEventStatus = exports.CallbackEventKind = void 0;
4
+ // FIXME: Missing documentation for CallbackEventKind
5
+ var CallbackEventKind;
6
+ (function (CallbackEventKind) {
7
+ // FIXME: Missing documentation for PaymentInitiated
8
+ CallbackEventKind["PaymentInitiated"] = "PaymentInitiated";
9
+ // FIXME: Missing documentation for PaymentExecuted
10
+ CallbackEventKind["PaymentExecuted"] = "PaymentExecuted";
11
+ // FIXME: Missing documentation for PaymentConfirmed
12
+ CallbackEventKind["PaymentConfirmed"] = "PaymentConfirmed";
13
+ // FIXME: Missing documentation for PaymentReceived
14
+ CallbackEventKind["PaymentReceived"] = "PaymentReceived";
15
+ // FIXME: Missing documentation for TransactionBroadcasted
16
+ CallbackEventKind["TransactionBroadcasted"] = "TransactionBroadcasted";
17
+ // FIXME: Missing documentation for WalletCreated
18
+ CallbackEventKind["WalletCreated"] = "WalletCreated";
19
+ // FIXME: Missing documentation for PolicyActivated
20
+ CallbackEventKind["PolicyActivated"] = "PolicyActivated";
21
+ })(CallbackEventKind = exports.CallbackEventKind || (exports.CallbackEventKind = {}));
22
+ // FIXME: Missing documentation for CallbackEventStatus
23
+ var CallbackEventStatus;
24
+ (function (CallbackEventStatus) {
25
+ // FIXME: Missing documentation for Sent
26
+ CallbackEventStatus["Sent"] = "Sent";
27
+ // FIXME: Missing documentation for Failed
28
+ CallbackEventStatus["Failed"] = "Failed";
29
+ })(CallbackEventStatus = exports.CallbackEventStatus || (exports.CallbackEventStatus = {}));
30
+ // FIXME: Missing documentation for CallbackSubscriptionStatus
31
+ var CallbackSubscriptionStatus;
32
+ (function (CallbackSubscriptionStatus) {
33
+ // FIXME: Missing documentation for Enabled
34
+ CallbackSubscriptionStatus["Enabled"] = "Enabled";
35
+ // FIXME: Missing documentation for Disabled
36
+ CallbackSubscriptionStatus["Disabled"] = "Disabled";
37
+ // FIXME: Missing documentation for Archived
38
+ CallbackSubscriptionStatus["Archived"] = "Archived";
39
+ })(CallbackSubscriptionStatus = exports.CallbackSubscriptionStatus || (exports.CallbackSubscriptionStatus = {}));
@@ -0,0 +1,121 @@
1
+ export declare class DfnsError extends Error {
2
+ name: string;
3
+ errorName: string;
4
+ httpStatus: number;
5
+ shouldTriggerInvestigation: boolean;
6
+ serviceName: string;
7
+ causes?: string[];
8
+ isDfnsError: boolean;
9
+ constructor(message: string, serviceName: string, causes?: string[], shouldTriggerInvestigation?: boolean);
10
+ toErrorObject(): {
11
+ name: string;
12
+ errorName: string;
13
+ serviceName: string;
14
+ message: string;
15
+ causes: string[] | undefined;
16
+ shouldTriggerInvestigation: boolean;
17
+ httpStatus: number;
18
+ stackTrace: string;
19
+ };
20
+ toString(): string;
21
+ }
22
+ export declare class ServiceUnavailableError extends DfnsError {
23
+ name: string;
24
+ serviceName: string;
25
+ message: string;
26
+ causes?: string[];
27
+ shouldTriggerInvestigaton: boolean;
28
+ isDfnsError: boolean;
29
+ httpStatus: number;
30
+ errorName: string;
31
+ }
32
+ export declare class NotImplementedError extends DfnsError {
33
+ name: string;
34
+ serviceName: string;
35
+ message: string;
36
+ causes?: string[];
37
+ shouldTriggerInvestigaton: boolean;
38
+ isDfnsError: boolean;
39
+ httpStatus: number;
40
+ errorName: string;
41
+ }
42
+ export declare class InternalServerError extends DfnsError {
43
+ name: string;
44
+ serviceName: string;
45
+ message: string;
46
+ causes?: string[];
47
+ shouldTriggerInvestigaton: boolean;
48
+ isDfnsError: boolean;
49
+ httpStatus: number;
50
+ errorName: string;
51
+ }
52
+ export declare class EntityExpiredError extends DfnsError {
53
+ name: string;
54
+ serviceName: string;
55
+ message: string;
56
+ causes?: string[];
57
+ shouldTriggerInvestigaton: boolean;
58
+ isDfnsError: boolean;
59
+ httpStatus: number;
60
+ errorName: string;
61
+ }
62
+ export declare class DuplicateError extends DfnsError {
63
+ name: string;
64
+ serviceName: string;
65
+ message: string;
66
+ causes?: string[];
67
+ shouldTriggerInvestigaton: boolean;
68
+ isDfnsError: boolean;
69
+ httpStatus: number;
70
+ errorName: string;
71
+ }
72
+ export declare class EntityNotFoundError extends DfnsError {
73
+ name: string;
74
+ serviceName: string;
75
+ message: string;
76
+ causes?: string[];
77
+ shouldTriggerInvestigaton: boolean;
78
+ isDfnsError: boolean;
79
+ httpStatus: number;
80
+ errorName: string;
81
+ }
82
+ export declare class ForbiddenError extends DfnsError {
83
+ name: string;
84
+ serviceName: string;
85
+ message: string;
86
+ causes?: string[];
87
+ shouldTriggerInvestigaton: boolean;
88
+ isDfnsError: boolean;
89
+ httpStatus: number;
90
+ errorName: string;
91
+ }
92
+ export declare class PaymentRequiredError extends DfnsError {
93
+ name: string;
94
+ serviceName: string;
95
+ message: string;
96
+ causes?: string[];
97
+ shouldTriggerInvestigaton: boolean;
98
+ isDfnsError: boolean;
99
+ httpStatus: number;
100
+ errorName: string;
101
+ }
102
+ export declare class UnauthorizedError extends DfnsError {
103
+ name: string;
104
+ serviceName: string;
105
+ message: string;
106
+ causes?: string[];
107
+ shouldTriggerInvestigaton: boolean;
108
+ isDfnsError: boolean;
109
+ httpStatus: number;
110
+ errorName: string;
111
+ }
112
+ export declare class BadRequestError extends DfnsError {
113
+ name: string;
114
+ serviceName: string;
115
+ message: string;
116
+ causes?: string[];
117
+ shouldTriggerInvestigaton: boolean;
118
+ isDfnsError: boolean;
119
+ httpStatus: number;
120
+ errorName: string;
121
+ }
@@ -0,0 +1,169 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BadRequestError = exports.UnauthorizedError = exports.PaymentRequiredError = exports.ForbiddenError = exports.EntityNotFoundError = exports.DuplicateError = exports.EntityExpiredError = exports.InternalServerError = exports.NotImplementedError = exports.ServiceUnavailableError = exports.DfnsError = void 0;
4
+ class DfnsError extends Error {
5
+ constructor(message, serviceName, causes = [], shouldTriggerInvestigation = true) {
6
+ super(message);
7
+ this.name = 'DfnsError';
8
+ this.errorName = '';
9
+ this.httpStatus = 500;
10
+ this.shouldTriggerInvestigation = false;
11
+ this.serviceName = 'SERVICE_NOT_DEFINED';
12
+ this.causes = [];
13
+ this.isDfnsError = true;
14
+ this.serviceName = serviceName || process.env.SERVICE_NAME;
15
+ this.shouldTriggerInvestigation = shouldTriggerInvestigation;
16
+ this.causes = causes;
17
+ if (typeof serviceName !== 'string') {
18
+ this.serviceName = 'SERVICE_NOT_DEFINED';
19
+ this.shouldTriggerInvestigation = true;
20
+ }
21
+ }
22
+ toErrorObject() {
23
+ const stackTrace = this.stack || '';
24
+ return {
25
+ name: this.name,
26
+ errorName: this.errorName,
27
+ serviceName: this.serviceName,
28
+ message: this.message,
29
+ causes: this.causes,
30
+ shouldTriggerInvestigation: this.shouldTriggerInvestigation,
31
+ httpStatus: this.httpStatus,
32
+ stackTrace,
33
+ };
34
+ }
35
+ toString() {
36
+ return JSON.stringify(this.toErrorObject());
37
+ }
38
+ }
39
+ exports.DfnsError = DfnsError;
40
+ class ServiceUnavailableError extends DfnsError {
41
+ constructor() {
42
+ super(...arguments);
43
+ this.name = 'ServiceUnavailableError';
44
+ // FIXME: Missing documentation for isDfnsError
45
+ this.isDfnsError = true;
46
+ // FIXME: Missing documentation for httpStatus
47
+ this.httpStatus = 503;
48
+ // FIXME: Missing documentation for errorName
49
+ this.errorName = 'Service Unavailable';
50
+ }
51
+ }
52
+ exports.ServiceUnavailableError = ServiceUnavailableError;
53
+ class NotImplementedError extends DfnsError {
54
+ constructor() {
55
+ super(...arguments);
56
+ this.name = 'NotImplementedError';
57
+ // FIXME: Missing documentation for isDfnsError
58
+ this.isDfnsError = true;
59
+ // FIXME: Missing documentation for httpStatus
60
+ this.httpStatus = 501;
61
+ // FIXME: Missing documentation for errorName
62
+ this.errorName = 'Not Implemented';
63
+ }
64
+ }
65
+ exports.NotImplementedError = NotImplementedError;
66
+ class InternalServerError extends DfnsError {
67
+ constructor() {
68
+ super(...arguments);
69
+ this.name = 'InternalServerError';
70
+ // FIXME: Missing documentation for isDfnsError
71
+ this.isDfnsError = true;
72
+ // FIXME: Missing documentation for httpStatus
73
+ this.httpStatus = 500;
74
+ // FIXME: Missing documentation for errorName
75
+ this.errorName = 'Internal Server Error';
76
+ }
77
+ }
78
+ exports.InternalServerError = InternalServerError;
79
+ class EntityExpiredError extends DfnsError {
80
+ constructor() {
81
+ super(...arguments);
82
+ this.name = 'EntityExpiredError';
83
+ // FIXME: Missing documentation for isDfnsError
84
+ this.isDfnsError = true;
85
+ // FIXME: Missing documentation for httpStatus
86
+ this.httpStatus = 410;
87
+ // FIXME: Missing documentation for errorName
88
+ this.errorName = 'Resource Expired';
89
+ }
90
+ }
91
+ exports.EntityExpiredError = EntityExpiredError;
92
+ class DuplicateError extends DfnsError {
93
+ constructor() {
94
+ super(...arguments);
95
+ this.name = 'DuplicateError';
96
+ // FIXME: Missing documentation for isDfnsError
97
+ this.isDfnsError = true;
98
+ // FIXME: Missing documentation for httpStatus
99
+ this.httpStatus = 409;
100
+ // FIXME: Missing documentation for errorName
101
+ this.errorName = 'Duplicate';
102
+ }
103
+ }
104
+ exports.DuplicateError = DuplicateError;
105
+ class EntityNotFoundError extends DfnsError {
106
+ constructor() {
107
+ super(...arguments);
108
+ this.name = 'EntityNotFoundError';
109
+ // FIXME: Missing documentation for isDfnsError
110
+ this.isDfnsError = true;
111
+ // FIXME: Missing documentation for httpStatus
112
+ this.httpStatus = 404;
113
+ // FIXME: Missing documentation for errorName
114
+ this.errorName = 'Not Found';
115
+ }
116
+ }
117
+ exports.EntityNotFoundError = EntityNotFoundError;
118
+ class ForbiddenError extends DfnsError {
119
+ constructor() {
120
+ super(...arguments);
121
+ this.name = 'ForbiddenError';
122
+ // FIXME: Missing documentation for isDfnsError
123
+ this.isDfnsError = true;
124
+ // FIXME: Missing documentation for httpStatus
125
+ this.httpStatus = 403;
126
+ // FIXME: Missing documentation for errorName
127
+ this.errorName = 'Access To Resource Not Allowed';
128
+ }
129
+ }
130
+ exports.ForbiddenError = ForbiddenError;
131
+ class PaymentRequiredError extends DfnsError {
132
+ constructor() {
133
+ super(...arguments);
134
+ this.name = 'PaymentRequiredError';
135
+ // FIXME: Missing documentation for isDfnsError
136
+ this.isDfnsError = true;
137
+ // FIXME: Missing documentation for httpStatus
138
+ this.httpStatus = 402;
139
+ // FIXME: Missing documentation for errorName
140
+ this.errorName = 'Payment Required';
141
+ }
142
+ }
143
+ exports.PaymentRequiredError = PaymentRequiredError;
144
+ class UnauthorizedError extends DfnsError {
145
+ constructor() {
146
+ super(...arguments);
147
+ this.name = 'UnauthorizedError';
148
+ // FIXME: Missing documentation for isDfnsError
149
+ this.isDfnsError = true;
150
+ // FIXME: Missing documentation for httpStatus
151
+ this.httpStatus = 401;
152
+ // FIXME: Missing documentation for errorName
153
+ this.errorName = 'Unauthorized';
154
+ }
155
+ }
156
+ exports.UnauthorizedError = UnauthorizedError;
157
+ class BadRequestError extends DfnsError {
158
+ constructor() {
159
+ super(...arguments);
160
+ this.name = 'BadRequestError';
161
+ // FIXME: Missing documentation for isDfnsError
162
+ this.isDfnsError = true;
163
+ // FIXME: Missing documentation for httpStatus
164
+ this.httpStatus = 400;
165
+ // FIXME: Missing documentation for errorName
166
+ this.errorName = 'Bad Request';
167
+ }
168
+ }
169
+ exports.BadRequestError = BadRequestError;
@@ -0,0 +1,2 @@
1
+ export * from './errors';
2
+ export * from './types';
@@ -0,0 +1,18 @@
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("./errors"), exports);
18
+ __exportStar(require("./types"), exports);