@northstake/northstakeapi 1.0.13 → 1.0.15

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 (169) hide show
  1. package/.openapi-generator/FILES +19 -22
  2. package/api/apis.ts +1 -3
  3. package/api/depositAddressesApi.ts +15 -15
  4. package/api/linkedWalletsApi.ts +8 -8
  5. package/api/managedUsersApi.ts +31 -31
  6. package/api/managedUsersDepositAddressesApi.ts +6 -6
  7. package/api/managedUsersLinkedWalletsApi.ts +20 -20
  8. package/api/managedUsersOrdersApi.ts +16 -16
  9. package/api/managedUsersPortfolioApi.ts +3 -3
  10. package/api/managedUsersTransactionsApi.ts +11 -11
  11. package/api/managedUsersValidatorsApi.ts +2 -2
  12. package/api/ordersApi.ts +7 -7
  13. package/api/transactionsApi.ts +6 -6
  14. package/api/validatorMarketplaceBuyersApi.ts +3 -3
  15. package/api/validatorMarketplaceSellersApi.ts +3 -3
  16. package/api/validatorsApi.ts +5 -5
  17. package/api.ts +19 -25
  18. package/dist/api/apis.d.ts +1 -3
  19. package/dist/api/apis.js +1 -3
  20. package/dist/api/depositAddressesApi.d.ts +7 -7
  21. package/dist/api/depositAddressesApi.js +10 -10
  22. package/dist/api/linkedWalletsApi.d.ts +3 -3
  23. package/dist/api/linkedWalletsApi.js +7 -7
  24. package/dist/api/managedUsersApi.d.ts +14 -14
  25. package/dist/api/managedUsersApi.js +26 -26
  26. package/dist/api/managedUsersDepositAddressesApi.d.ts +4 -4
  27. package/dist/api/managedUsersDepositAddressesApi.js +4 -4
  28. package/dist/api/managedUsersLinkedWalletsApi.d.ts +7 -7
  29. package/dist/api/managedUsersLinkedWalletsApi.js +18 -18
  30. package/dist/api/managedUsersOrdersApi.d.ts +6 -6
  31. package/dist/api/managedUsersOrdersApi.js +15 -15
  32. package/dist/api/managedUsersPortfolioApi.d.ts +2 -2
  33. package/dist/api/managedUsersPortfolioApi.js +3 -3
  34. package/dist/api/managedUsersTransactionsApi.d.ts +7 -7
  35. package/dist/api/managedUsersTransactionsApi.js +5 -5
  36. package/dist/api/managedUsersValidatorsApi.d.ts +1 -1
  37. package/dist/api/managedUsersValidatorsApi.js +2 -2
  38. package/dist/api/ordersApi.d.ts +3 -3
  39. package/dist/api/ordersApi.js +6 -6
  40. package/dist/api/transactionsApi.d.ts +4 -4
  41. package/dist/api/transactionsApi.js +2 -2
  42. package/dist/api/validatorMarketplaceBuyersApi.d.ts +2 -2
  43. package/dist/api/validatorMarketplaceBuyersApi.js +1 -1
  44. package/dist/api/validatorMarketplaceSellersApi.d.ts +2 -2
  45. package/dist/api/validatorMarketplaceSellersApi.js +1 -1
  46. package/dist/api/validatorsApi.d.ts +3 -3
  47. package/dist/api/validatorsApi.js +2 -2
  48. package/dist/api.d.ts +19 -23
  49. package/dist/api.js +19 -24
  50. package/dist/model/{settlementStepAcceptedQuote.d.ts → acceptedQuote.d.ts} +4 -4
  51. package/dist/model/{settlementStepAcceptedQuote.js → acceptedQuote.js} +6 -6
  52. package/dist/model/accountEntity.d.ts +3 -1
  53. package/dist/model/accountEntity.js +5 -0
  54. package/dist/model/{addLinkedWalletForManagedUserRequest.d.ts → addLinkedWalletForUserRequest.d.ts} +4 -4
  55. package/dist/model/{baseOrder.js → addLinkedWalletForUserRequest.js} +10 -15
  56. package/dist/model/addLinkedWalletRequest.d.ts +2 -2
  57. package/dist/model/addLinkedWalletRequest.js +3 -3
  58. package/dist/model/{tokenEnum.d.ts → asset.d.ts} +1 -1
  59. package/dist/model/{depositAccount.d.ts → depositAddress.d.ts} +6 -6
  60. package/dist/model/{depositAccount.js → depositAddress.js} +8 -8
  61. package/dist/model/{depositAddressesForManagedUserResponse.d.ts → depositAddressesForUserResponse.d.ts} +3 -3
  62. package/dist/model/{depositAddressesForManagedUserResponse.js → depositAddressesForUserResponse.js} +7 -7
  63. package/dist/model/{settlementStepEscrowPayment.d.ts → escrowPayment.d.ts} +1 -1
  64. package/dist/model/{settlementStepEscrowPayment.js → escrowPayment.js} +6 -6
  65. package/dist/model/{settlementStepEscrowReleased.d.ts → escrowReleased.d.ts} +1 -1
  66. package/dist/model/{settlementStepEscrowReleased.js → escrowReleased.js} +6 -6
  67. package/dist/model/managedUserDetails.d.ts +31 -0
  68. package/dist/model/managedUserDetails.js +41 -0
  69. package/dist/model/models.d.ts +19 -21
  70. package/dist/model/models.js +42 -56
  71. package/dist/model/{unstakeOrder.d.ts → order.d.ts} +12 -12
  72. package/dist/model/{newOrderRequest.js → order.js} +7 -7
  73. package/dist/model/orderDocument.d.ts +4 -4
  74. package/dist/model/orderDocument.js +1 -1
  75. package/dist/model/{rFQDocumentStatusEnum.d.ts → orderType.d.ts} +4 -1
  76. package/dist/model/portfolioEntity.d.ts +2 -2
  77. package/dist/model/portfolioEntity.js +1 -1
  78. package/dist/model/rFQDocumentBase.d.ts +2 -2
  79. package/dist/model/rFQDocumentBase.js +1 -1
  80. package/dist/model/rFQDocumentBuyer.d.ts +2 -2
  81. package/dist/model/rFQDocumentBuyer.js +1 -1
  82. package/dist/model/rFQDocumentBuyerStatusFilter.d.ts +12 -0
  83. package/dist/model/rFQDocumentSeller.d.ts +2 -2
  84. package/dist/model/rFQDocumentSeller.js +1 -1
  85. package/dist/model/{rFQDocumentBuyerStatusFilterEnum.d.ts → rFQDocumentSellerStatusFilter.d.ts} +1 -1
  86. package/dist/model/rFQDocumentStatus.d.ts +12 -0
  87. package/dist/model/settlementSteps.d.ts +8 -8
  88. package/dist/model/settlementSteps.js +4 -4
  89. package/dist/model/smartContract.d.ts +36 -0
  90. package/dist/model/smartContract.js +56 -0
  91. package/dist/model/transaction.d.ts +4 -4
  92. package/dist/model/transaction.js +2 -2
  93. package/dist/model/{transactionEventTypeEnum.d.ts → transactionEventType.d.ts} +1 -1
  94. package/dist/model/{transactionsForManagedUser.d.ts → transactionsforUser.d.ts} +1 -1
  95. package/dist/model/{transactionsForManagedUser.js → transactionsforUser.js} +6 -6
  96. package/dist/model/validatorContractType.d.ts +12 -0
  97. package/dist/model/validatorInfo.d.ts +5 -5
  98. package/dist/model/validatorInfo.js +3 -3
  99. package/dist/model/validatorInfoValidatorType.d.ts +2 -2
  100. package/dist/model/validatorInfoValidatorType.js +1 -1
  101. package/dist/model/validatorInfoValidatorTypeContract.d.ts +2 -2
  102. package/dist/model/validatorInfoValidatorTypeContract.js +1 -1
  103. package/dist/model/{validatorKeyHolderEnum.d.ts → validatorKeyHolder.d.ts} +1 -1
  104. package/dist/model/validatorKeyHolder.js +13 -0
  105. package/dist/model/wallet.d.ts +5 -2
  106. package/dist/model/wallet.js +4 -4
  107. package/dist/model/{settlementStepWithdrawalRecipientSettlement.d.ts → withdrawalRecipientSettlement.d.ts} +1 -1
  108. package/dist/model/{settlementStepWithdrawalRecipientSettlement.js → withdrawalRecipientSettlement.js} +6 -6
  109. package/model/{settlementStepAcceptedQuote.ts → acceptedQuote.ts} +5 -5
  110. package/model/accountEntity.ts +8 -1
  111. package/model/{addLinkedWalletForManagedUserRequest.ts → addLinkedWalletForUserRequest.ts} +8 -8
  112. package/model/addLinkedWalletRequest.ts +5 -5
  113. package/model/{tokenEnum.ts → asset.ts} +1 -1
  114. package/model/{depositAccount.ts → depositAddress.ts} +8 -8
  115. package/model/{depositAddressesForManagedUserResponse.ts → depositAddressesForUserResponse.ts} +5 -5
  116. package/model/{settlementStepEscrowPayment.ts → escrowPayment.ts} +2 -2
  117. package/model/{settlementStepEscrowReleased.ts → escrowReleased.ts} +2 -2
  118. package/model/managedUserDetails.ts +47 -0
  119. package/model/models.ts +60 -77
  120. package/model/{withdrawalOrder.ts → order.ts} +16 -18
  121. package/model/orderDocument.ts +5 -5
  122. package/model/orderType.ts +21 -0
  123. package/model/portfolioEntity.ts +3 -3
  124. package/model/rFQDocumentBase.ts +3 -3
  125. package/model/rFQDocumentBuyer.ts +3 -3
  126. package/model/{rFQDocumentBuyerStatusFilterEnum.ts → rFQDocumentBuyerStatusFilter.ts} +1 -1
  127. package/model/rFQDocumentSeller.ts +3 -3
  128. package/model/{rFQDocumentSellerStatusFilterEnum.ts → rFQDocumentSellerStatusFilter.ts} +1 -1
  129. package/model/{rFQDocumentStatusEnum.ts → rFQDocumentStatus.ts} +1 -1
  130. package/model/settlementSteps.ts +12 -12
  131. package/model/smartContract.ts +67 -0
  132. package/model/transaction.ts +6 -6
  133. package/model/{transactionEventTypeEnum.ts → transactionEventType.ts} +1 -1
  134. package/model/{transactionsForManagedUser.ts → transactionsforUser.ts} +2 -2
  135. package/model/{validatorContractTypeEnum.ts → validatorContractType.ts} +1 -1
  136. package/model/validatorInfo.ts +8 -8
  137. package/model/validatorInfoValidatorType.ts +3 -3
  138. package/model/validatorInfoValidatorTypeContract.ts +3 -3
  139. package/model/{validatorKeyHolderEnum.ts → validatorKeyHolder.ts} +1 -1
  140. package/model/wallet.ts +8 -5
  141. package/model/{settlementStepWithdrawalRecipientSettlement.ts → withdrawalRecipientSettlement.ts} +2 -2
  142. package/package.json +2 -2
  143. package/api/liquidityProviderApi.ts +0 -178
  144. package/dist/api/liquidityProviderApi.d.ts +0 -49
  145. package/dist/api/liquidityProviderApi.js +0 -139
  146. package/dist/model/addLinkedWalletForManagedUserRequest.js +0 -33
  147. package/dist/model/baseOrder.d.ts +0 -42
  148. package/dist/model/createOrderForManagedUserRequest.d.ts +0 -48
  149. package/dist/model/createOrderForManagedUserRequest.js +0 -48
  150. package/dist/model/newOrderRequest.d.ts +0 -48
  151. package/dist/model/rFQDocumentSellerStatusFilterEnum.d.ts +0 -12
  152. package/dist/model/stakeOrder.d.ts +0 -44
  153. package/dist/model/stakeOrder.js +0 -46
  154. package/dist/model/unstakeOrder.js +0 -38
  155. package/dist/model/validatorContractTypeEnum.d.ts +0 -12
  156. package/dist/model/withdrawalOrder.d.ts +0 -46
  157. package/dist/model/withdrawalOrder.js +0 -43
  158. package/model/baseOrder.ts +0 -61
  159. package/model/createOrderForManagedUserRequest.ts +0 -80
  160. package/model/newOrderRequest.ts +0 -80
  161. package/model/stakeOrder.ts +0 -68
  162. package/model/unstakeOrder.ts +0 -61
  163. /package/dist/model/{rFQDocumentBuyerStatusFilterEnum.js → asset.js} +0 -0
  164. /package/dist/model/{rFQDocumentSellerStatusFilterEnum.js → orderType.js} +0 -0
  165. /package/dist/model/{rFQDocumentStatusEnum.js → rFQDocumentBuyerStatusFilter.js} +0 -0
  166. /package/dist/model/{tokenEnum.js → rFQDocumentSellerStatusFilter.js} +0 -0
  167. /package/dist/model/{transactionEventTypeEnum.js → rFQDocumentStatus.js} +0 -0
  168. /package/dist/model/{validatorContractTypeEnum.js → transactionEventType.js} +0 -0
  169. /package/dist/model/{validatorKeyHolderEnum.js → validatorContractType.js} +0 -0
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Northstake
3
+ * Northstake api.
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+
13
+ import { Asset } from './asset';
14
+
15
+ /**
16
+ * Details about a smart contract including name, asset, address and type.
17
+ */
18
+ export class SmartContract {
19
+ 'name': string;
20
+ 'asset': Asset;
21
+ 'address': string;
22
+ 'type'?: string;
23
+ 'deployedAt': Date;
24
+ 'deployedBy'?: string;
25
+
26
+ static discriminator: string | undefined = undefined;
27
+
28
+ static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
29
+ {
30
+ "name": "name",
31
+ "baseName": "name",
32
+ "type": "string"
33
+ },
34
+ {
35
+ "name": "asset",
36
+ "baseName": "asset",
37
+ "type": "Asset"
38
+ },
39
+ {
40
+ "name": "address",
41
+ "baseName": "address",
42
+ "type": "string"
43
+ },
44
+ {
45
+ "name": "type",
46
+ "baseName": "type",
47
+ "type": "string"
48
+ },
49
+ {
50
+ "name": "deployedAt",
51
+ "baseName": "deployedAt",
52
+ "type": "Date"
53
+ },
54
+ {
55
+ "name": "deployedBy",
56
+ "baseName": "deployedBy",
57
+ "type": "string"
58
+ } ];
59
+
60
+ static getAttributeTypeMap() {
61
+ return SmartContract.attributeTypeMap;
62
+ }
63
+ }
64
+
65
+ export namespace SmartContract {
66
+ }
67
+
@@ -10,8 +10,8 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
 
13
- import { TokenEnum } from './tokenEnum';
14
- import { TransactionEventTypeEnum } from './transactionEventTypeEnum';
13
+ import { Asset } from './asset';
14
+ import { TransactionEventType } from './transactionEventType';
15
15
 
16
16
  /**
17
17
  * Details of transactions including type, amount, and asset.
@@ -21,12 +21,12 @@ export class Transaction {
21
21
  * The date and time when the transaction occurred.
22
22
  */
23
23
  'eventTime': Date;
24
- 'eventType': TransactionEventTypeEnum;
24
+ 'eventType': TransactionEventType;
25
25
  /**
26
26
  * Asset amount involved in the transaction.
27
27
  */
28
28
  'assetAmount': number;
29
- 'asset': TokenEnum;
29
+ 'asset': Asset;
30
30
  /**
31
31
  * Unique identifier for the order associated with the transaction.
32
32
  */
@@ -47,7 +47,7 @@ export class Transaction {
47
47
  {
48
48
  "name": "eventType",
49
49
  "baseName": "eventType",
50
- "type": "TransactionEventTypeEnum"
50
+ "type": "TransactionEventType"
51
51
  },
52
52
  {
53
53
  "name": "assetAmount",
@@ -57,7 +57,7 @@ export class Transaction {
57
57
  {
58
58
  "name": "asset",
59
59
  "baseName": "asset",
60
- "type": "TokenEnum"
60
+ "type": "Asset"
61
61
  },
62
62
  {
63
63
  "name": "orderId",
@@ -14,7 +14,7 @@
14
14
  /**
15
15
  * Supported transaction types.
16
16
  */
17
- export type TransactionEventTypeEnum =
17
+ export type TransactionEventType =
18
18
  'stake' |
19
19
  'unstake' |
20
20
  'withdrawal' |
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { Transaction } from './transaction';
14
14
 
15
- export class TransactionsForManagedUser {
15
+ export class TransactionsforUser {
16
16
  'transactions': Array<Transaction>;
17
17
  /**
18
18
  * Total number of pages
@@ -52,7 +52,7 @@ export class TransactionsForManagedUser {
52
52
  } ];
53
53
 
54
54
  static getAttributeTypeMap() {
55
- return TransactionsForManagedUser.attributeTypeMap;
55
+ return TransactionsforUser.attributeTypeMap;
56
56
  }
57
57
  }
58
58
 
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
 
14
- export type ValidatorContractTypeEnum =
14
+ export type ValidatorContractType =
15
15
  'default_validator' |
16
16
  'tokenized_validator';
17
17
 
@@ -19,12 +19,12 @@ import { ValidatorInfoValidatorType } from './validatorInfoValidatorType';
19
19
  export class ValidatorInfo {
20
20
  'balance'?: number;
21
21
  /**
22
- * Validator token
22
+ * Validator asset
23
23
  */
24
- 'token'?: ValidatorInfo;
24
+ 'asset'?: ValidatorInfo;
25
25
  'validator_index'?: number;
26
26
  /**
27
- * Managed user reference id of the validator owner
27
+ * Validator owner id
28
28
  */
29
29
  'owner_id'?: string;
30
30
  /**
@@ -49,9 +49,9 @@ export class ValidatorInfo {
49
49
  "type": "number"
50
50
  },
51
51
  {
52
- "name": "token",
53
- "baseName": "token",
54
- "type": "ValidatorInfo.TokenEnum"
52
+ "name": "asset",
53
+ "baseName": "asset",
54
+ "type": "ValidatorInfo.AssetEnum"
55
55
  },
56
56
  {
57
57
  "name": "validator_index",
@@ -101,9 +101,9 @@ export class ValidatorInfo {
101
101
 
102
102
  export namespace ValidatorInfo {
103
103
  /**
104
- * Validator token
104
+ * Validator asset
105
105
  */
106
- export type tokenEnum =
106
+ export type assetEnum =
107
107
  'ETH';
108
108
  /**
109
109
  * Status of the validator on the network
@@ -11,10 +11,10 @@
11
11
  */
12
12
 
13
13
  import { ValidatorInfoValidatorTypeContract } from './validatorInfoValidatorTypeContract';
14
- import { ValidatorKeyHolderEnum } from './validatorKeyHolderEnum';
14
+ import { ValidatorKeyHolder } from './validatorKeyHolder';
15
15
 
16
16
  export class ValidatorInfoValidatorType {
17
- 'key_holder'?: ValidatorKeyHolderEnum;
17
+ 'key_holder'?: ValidatorKeyHolder;
18
18
  'contract'?: ValidatorInfoValidatorTypeContract;
19
19
 
20
20
  static discriminator: string | undefined = undefined;
@@ -23,7 +23,7 @@ export class ValidatorInfoValidatorType {
23
23
  {
24
24
  "name": "key_holder",
25
25
  "baseName": "key_holder",
26
- "type": "ValidatorKeyHolderEnum"
26
+ "type": "ValidatorKeyHolder"
27
27
  },
28
28
  {
29
29
  "name": "contract",
@@ -10,11 +10,11 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
 
13
- import { ValidatorContractTypeEnum } from './validatorContractTypeEnum';
13
+ import { ValidatorContractType } from './validatorContractType';
14
14
 
15
15
  export class ValidatorInfoValidatorTypeContract {
16
16
  'address'?: string;
17
- 'contract_type'?: ValidatorContractTypeEnum;
17
+ 'contract_type'?: ValidatorContractType;
18
18
 
19
19
  static discriminator: string | undefined = undefined;
20
20
 
@@ -27,7 +27,7 @@ export class ValidatorInfoValidatorTypeContract {
27
27
  {
28
28
  "name": "contract_type",
29
29
  "baseName": "contract_type",
30
- "type": "ValidatorContractTypeEnum"
30
+ "type": "ValidatorContractType"
31
31
  } ];
32
32
 
33
33
  static getAttributeTypeMap() {
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
 
14
- export type ValidatorKeyHolderEnum =
14
+ export type ValidatorKeyHolder =
15
15
  'northstake' |
16
16
  'self_managed';
17
17
 
package/model/wallet.ts CHANGED
@@ -10,12 +10,13 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
 
13
+ import { Asset } from './asset';
13
14
 
14
15
  /**
15
- * Details about a linked wallet including type, address, and name.
16
+ * Details about a linked wallet including asset, address, and name.
16
17
  */
17
18
  export class Wallet {
18
- 'walletType'?: string;
19
+ 'asset'?: Asset;
19
20
  'walletAddress'?: string;
20
21
  'walletName'?: string;
21
22
 
@@ -23,9 +24,9 @@ export class Wallet {
23
24
 
24
25
  static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
25
26
  {
26
- "name": "walletType",
27
- "baseName": "walletType",
28
- "type": "string"
27
+ "name": "asset",
28
+ "baseName": "asset",
29
+ "type": "Asset"
29
30
  },
30
31
  {
31
32
  "name": "walletAddress",
@@ -43,4 +44,6 @@ export class Wallet {
43
44
  }
44
45
  }
45
46
 
47
+ export namespace Wallet {
48
+ }
46
49
 
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
 
14
- export class SettlementStepWithdrawalRecipientSettlement {
14
+ export class WithdrawalRecipientSettlement {
15
15
  'timestamp': string;
16
16
  'transaction_hash': string;
17
17
 
@@ -30,7 +30,7 @@ export class SettlementStepWithdrawalRecipientSettlement {
30
30
  } ];
31
31
 
32
32
  static getAttributeTypeMap() {
33
- return SettlementStepWithdrawalRecipientSettlement.attributeTypeMap;
33
+ return WithdrawalRecipientSettlement.attributeTypeMap;
34
34
  }
35
35
  }
36
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@northstake/northstakeapi",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "Northstake SDK",
5
5
  "main": "dist/api.js",
6
6
  "types": "dist/api.d.ts",
@@ -21,7 +21,7 @@
21
21
  "author": "Northstake build process <buildadmin@northstake.dk>",
22
22
  "license": "ISC",
23
23
  "devDependencies": {
24
- "@types/node": "^20.12.7",
24
+ "@types/node": "^20.12.8",
25
25
  "typescript": "^5.4.5"
26
26
  }
27
27
  }
@@ -1,178 +0,0 @@
1
- /**
2
- * Northstake
3
- * Northstake api.
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
-
13
-
14
- import localVarRequest from 'request';
15
- import http from 'http';
16
-
17
- /* tslint:disable:no-unused-locals */
18
- import { ErrorResponse } from '../model/errorResponse';
19
-
20
- import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
21
- import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth, JWTAuth } from '../model/models';
22
-
23
- import { HttpError, RequestFile } from './apis';
24
-
25
- let defaultBasePath = '/v1';
26
-
27
- // ===============================================
28
- // This file is autogenerated - Please do not edit
29
- // ===============================================
30
-
31
- export enum LiquidityProviderApiApiKeys {
32
- ApiKeyAuth,
33
- }
34
-
35
-
36
-
37
- export class LiquidityProviderApi {
38
- protected _basePath = defaultBasePath;
39
- protected _defaultHeaders : any = {};
40
- protected _useQuerystring : boolean = false;
41
-
42
- protected authentications = {
43
- 'default': <Authentication>new JWTAuth('your_api_key', 'your_private_key'),
44
- 'bearerTokenAuth': new HttpBearerAuth(),
45
- 'ApiKeyAuth': new ApiKeyAuth('header', 'x-api-key'),
46
- }
47
-
48
- protected interceptors: Interceptor[] = [];
49
-
50
- constructor(basePath?: string);
51
- constructor(basePathOrUsername: string, password?: string, basePath?: string) {
52
- if (password) {
53
- if (basePath) {
54
- this.basePath = basePath;
55
- }
56
- } else {
57
- if (basePathOrUsername) {
58
- this.basePath = basePathOrUsername
59
- }
60
- }
61
- }
62
-
63
- set useQuerystring(value: boolean) {
64
- this._useQuerystring = value;
65
- }
66
-
67
- set basePath(basePath: string) {
68
- this._basePath = basePath;
69
- }
70
-
71
- set defaultHeaders(defaultHeaders: any) {
72
- this._defaultHeaders = defaultHeaders;
73
- }
74
-
75
- get defaultHeaders() {
76
- return this._defaultHeaders;
77
- }
78
-
79
- get basePath() {
80
- return this._basePath;
81
- }
82
-
83
- public setDefaultAuthentication(auth: Authentication) {
84
- this.authentications.default = auth;
85
- }
86
-
87
- public setApiKey(key: LiquidityProviderApiApiKeys, value: string) {
88
- (this.authentications as any)[LiquidityProviderApiApiKeys[key]].apiKey = value;
89
- }
90
-
91
- set accessToken(accessToken: string | (() => string)) {
92
- this.authentications.bearerTokenAuth.accessToken = accessToken;
93
- }
94
-
95
- public addInterceptor(interceptor: Interceptor) {
96
- this.interceptors.push(interceptor);
97
- }
98
-
99
- /**
100
- *
101
- * @summary Get liquidity provider basic info
102
- */
103
-
104
-
105
-
106
-
107
-
108
- public async getProviderIdInfo (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: any, status: number }> {
109
-
110
- const localVarPath = this.basePath + '/liquidityProvider/';
111
-
112
- let localVarQueryParameters: any = {};
113
- let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
114
- const produces = ['application/json'];
115
- if (produces.indexOf('application/json') >= 0) {
116
- localVarHeaderParams.Accept = 'application/json';
117
- } else {
118
- localVarHeaderParams.Accept = produces.join(',');
119
- }
120
- let localVarFormParams: any = {};
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
- (<any>Object).assign(localVarHeaderParams, options.headers);
131
-
132
- let localVarUseFormData = false;
133
-
134
-
135
-
136
- let localVarRequestOptions: localVarRequest.Options = {
137
- method: 'GET',
138
- qs: localVarQueryParameters,
139
- headers: localVarHeaderParams,
140
- uri: localVarPath,
141
- useQuerystring: this._useQuerystring,
142
- json: true,
143
- };
144
-
145
- let authenticationPromise = Promise.resolve();
146
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
147
-
148
- let interceptorPromise = authenticationPromise;
149
- for (const interceptor of this.interceptors) {
150
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
151
- }
152
-
153
- return interceptorPromise.then(() => {
154
- if (Object.keys(localVarFormParams).length) {
155
- if (localVarUseFormData) {
156
- (<any>localVarRequestOptions).formData = localVarFormParams;
157
- } else {
158
- localVarRequestOptions.form = localVarFormParams;
159
- }
160
- }
161
- return new Promise<{ body: any, status: number }>((resolve, reject) => {
162
- localVarRequest(localVarRequestOptions, (error, response, body) => {
163
- if (error) {
164
- console.error('API call error:', error);
165
- reject(error);
166
- } else {
167
- if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
168
- resolve({ body: body, status: response.statusCode });
169
- } else {
170
- console.error('API response error:', response.statusCode);
171
- reject(new HttpError(response, body, response.statusCode));
172
- }
173
- }
174
- });
175
- });
176
- } )
177
- }
178
- }
@@ -1,49 +0,0 @@
1
- /**
2
- * Northstake
3
- * Northstake api.
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import { Authentication, Interceptor } from '../model/models';
13
- import { HttpBearerAuth, ApiKeyAuth } from '../model/models';
14
- export declare enum LiquidityProviderApiApiKeys {
15
- ApiKeyAuth = 0
16
- }
17
- export declare class LiquidityProviderApi {
18
- protected _basePath: string;
19
- protected _defaultHeaders: any;
20
- protected _useQuerystring: boolean;
21
- protected authentications: {
22
- default: Authentication;
23
- bearerTokenAuth: HttpBearerAuth;
24
- ApiKeyAuth: ApiKeyAuth;
25
- };
26
- protected interceptors: Interceptor[];
27
- constructor(basePath?: string);
28
- set useQuerystring(value: boolean);
29
- set basePath(basePath: string);
30
- set defaultHeaders(defaultHeaders: any);
31
- get defaultHeaders(): any;
32
- get basePath(): string;
33
- setDefaultAuthentication(auth: Authentication): void;
34
- setApiKey(key: LiquidityProviderApiApiKeys, value: string): void;
35
- set accessToken(accessToken: string | (() => string));
36
- addInterceptor(interceptor: Interceptor): void;
37
- /**
38
- *
39
- * @summary Get liquidity provider basic info
40
- */
41
- getProviderIdInfo(options?: {
42
- headers: {
43
- [name: string]: string;
44
- };
45
- }): Promise<{
46
- body: any;
47
- status: number;
48
- }>;
49
- }
@@ -1,139 +0,0 @@
1
- "use strict";
2
- /**
3
- * Northstake
4
- * Northstake api.
5
- *
6
- * The version of the OpenAPI document: 1.0
7
- *
8
- *
9
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
10
- * https://openapi-generator.tech
11
- * Do not edit the class manually.
12
- */
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.LiquidityProviderApi = exports.LiquidityProviderApiApiKeys = void 0;
18
- const request_1 = __importDefault(require("request"));
19
- const models_1 = require("../model/models");
20
- const apis_1 = require("./apis");
21
- let defaultBasePath = '/v1';
22
- // ===============================================
23
- // This file is autogenerated - Please do not edit
24
- // ===============================================
25
- var LiquidityProviderApiApiKeys;
26
- (function (LiquidityProviderApiApiKeys) {
27
- LiquidityProviderApiApiKeys[LiquidityProviderApiApiKeys["ApiKeyAuth"] = 0] = "ApiKeyAuth";
28
- })(LiquidityProviderApiApiKeys || (exports.LiquidityProviderApiApiKeys = LiquidityProviderApiApiKeys = {}));
29
- class LiquidityProviderApi {
30
- constructor(basePathOrUsername, password, basePath) {
31
- this._basePath = defaultBasePath;
32
- this._defaultHeaders = {};
33
- this._useQuerystring = false;
34
- this.authentications = {
35
- 'default': new models_1.JWTAuth('your_api_key', 'your_private_key'),
36
- 'bearerTokenAuth': new models_1.HttpBearerAuth(),
37
- 'ApiKeyAuth': new models_1.ApiKeyAuth('header', 'x-api-key'),
38
- };
39
- this.interceptors = [];
40
- if (password) {
41
- if (basePath) {
42
- this.basePath = basePath;
43
- }
44
- }
45
- else {
46
- if (basePathOrUsername) {
47
- this.basePath = basePathOrUsername;
48
- }
49
- }
50
- }
51
- set useQuerystring(value) {
52
- this._useQuerystring = value;
53
- }
54
- set basePath(basePath) {
55
- this._basePath = basePath;
56
- }
57
- set defaultHeaders(defaultHeaders) {
58
- this._defaultHeaders = defaultHeaders;
59
- }
60
- get defaultHeaders() {
61
- return this._defaultHeaders;
62
- }
63
- get basePath() {
64
- return this._basePath;
65
- }
66
- setDefaultAuthentication(auth) {
67
- this.authentications.default = auth;
68
- }
69
- setApiKey(key, value) {
70
- this.authentications[LiquidityProviderApiApiKeys[key]].apiKey = value;
71
- }
72
- set accessToken(accessToken) {
73
- this.authentications.bearerTokenAuth.accessToken = accessToken;
74
- }
75
- addInterceptor(interceptor) {
76
- this.interceptors.push(interceptor);
77
- }
78
- /**
79
- *
80
- * @summary Get liquidity provider basic info
81
- */
82
- async getProviderIdInfo(options = { headers: {} }) {
83
- const localVarPath = this.basePath + '/liquidityProvider/';
84
- let localVarQueryParameters = {};
85
- let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
86
- const produces = ['application/json'];
87
- if (produces.indexOf('application/json') >= 0) {
88
- localVarHeaderParams.Accept = 'application/json';
89
- }
90
- else {
91
- localVarHeaderParams.Accept = produces.join(',');
92
- }
93
- let localVarFormParams = {};
94
- Object.assign(localVarHeaderParams, options.headers);
95
- let localVarUseFormData = false;
96
- let localVarRequestOptions = {
97
- method: 'GET',
98
- qs: localVarQueryParameters,
99
- headers: localVarHeaderParams,
100
- uri: localVarPath,
101
- useQuerystring: this._useQuerystring,
102
- json: true,
103
- };
104
- let authenticationPromise = Promise.resolve();
105
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
106
- let interceptorPromise = authenticationPromise;
107
- for (const interceptor of this.interceptors) {
108
- interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
109
- }
110
- return interceptorPromise.then(() => {
111
- if (Object.keys(localVarFormParams).length) {
112
- if (localVarUseFormData) {
113
- localVarRequestOptions.formData = localVarFormParams;
114
- }
115
- else {
116
- localVarRequestOptions.form = localVarFormParams;
117
- }
118
- }
119
- return new Promise((resolve, reject) => {
120
- (0, request_1.default)(localVarRequestOptions, (error, response, body) => {
121
- if (error) {
122
- console.error('API call error:', error);
123
- reject(error);
124
- }
125
- else {
126
- if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
127
- resolve({ body: body, status: response.statusCode });
128
- }
129
- else {
130
- console.error('API response error:', response.statusCode);
131
- reject(new apis_1.HttpError(response, body, response.statusCode));
132
- }
133
- }
134
- });
135
- });
136
- });
137
- }
138
- }
139
- exports.LiquidityProviderApi = LiquidityProviderApi;