@seal-protocol/backendjs 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -42,7 +42,8 @@ export declare const SealClientAxiosParamCreator: (configuration?: Configuration
42
42
  * @param {string} [owner]
43
43
  * @param {string} [fromPrice] uint256
44
44
  * @param {string} [toPrice] uint256
45
- * @param {GetOrdersOrderByPropertyEnum} [orderByProperty] - INVALID: UNSPECIFIED
45
+ * @param {Array<GetOrdersStatusesEnum>} [statuses] orders that have either of the given statuses
46
+ * @param {GetOrdersOrderByPropertyEnum} [orderByProperty]
46
47
  * @param {boolean} [orderByDescending]
47
48
  * @param {string} [paginationKey]
48
49
  * @param {number} [paginationLimit]
@@ -50,7 +51,7 @@ export declare const SealClientAxiosParamCreator: (configuration?: Configuration
50
51
  * @param {*} [options] Override http request option.
51
52
  * @throws {RequiredError}
52
53
  */
53
- getOrders: (chainId?: string, tokenIn?: string, tokenOut?: string, owner?: string, fromPrice?: string, toPrice?: string, orderByProperty?: GetOrdersOrderByPropertyEnum, orderByDescending?: boolean, paginationKey?: string, paginationLimit?: number, paginationCountTotal?: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
54
+ getOrders: (chainId?: string, tokenIn?: string, tokenOut?: string, owner?: string, fromPrice?: string, toPrice?: string, statuses?: Array<GetOrdersStatusesEnum>, orderByProperty?: GetOrdersOrderByPropertyEnum, orderByDescending?: boolean, paginationKey?: string, paginationLimit?: number, paginationCountTotal?: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
54
55
  /**
55
56
  *
56
57
  * @param {*} [options] Override http request option.
@@ -84,7 +85,8 @@ export declare const SealClientFp: (configuration?: Configuration) => {
84
85
  * @param {string} [owner]
85
86
  * @param {string} [fromPrice] uint256
86
87
  * @param {string} [toPrice] uint256
87
- * @param {GetOrdersOrderByPropertyEnum} [orderByProperty] - INVALID: UNSPECIFIED
88
+ * @param {Array<GetOrdersStatusesEnum>} [statuses] orders that have either of the given statuses
89
+ * @param {GetOrdersOrderByPropertyEnum} [orderByProperty]
88
90
  * @param {boolean} [orderByDescending]
89
91
  * @param {string} [paginationKey]
90
92
  * @param {number} [paginationLimit]
@@ -92,7 +94,7 @@ export declare const SealClientFp: (configuration?: Configuration) => {
92
94
  * @param {*} [options] Override http request option.
93
95
  * @throws {RequiredError}
94
96
  */
95
- getOrders(chainId?: string, tokenIn?: string, tokenOut?: string, owner?: string, fromPrice?: string, toPrice?: string, orderByProperty?: GetOrdersOrderByPropertyEnum, orderByDescending?: boolean, paginationKey?: string, paginationLimit?: number, paginationCountTotal?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SealGetOrdersResponse>>;
97
+ getOrders(chainId?: string, tokenIn?: string, tokenOut?: string, owner?: string, fromPrice?: string, toPrice?: string, statuses?: Array<GetOrdersStatusesEnum>, orderByProperty?: GetOrdersOrderByPropertyEnum, orderByDescending?: boolean, paginationKey?: string, paginationLimit?: number, paginationCountTotal?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SealGetOrdersResponse>>;
96
98
  /**
97
99
  *
98
100
  * @param {*} [options] Override http request option.
@@ -188,8 +190,14 @@ export interface SealClientGetOrdersRequest {
188
190
  */
189
191
  readonly toPrice?: string;
190
192
  /**
191
- * - INVALID: UNSPECIFIED
192
- * @type {'INVALID' | 'OWNER' | 'TOKEN_IN' | 'TOKEN_OUT' | 'AMOUNT_IN' | 'PRICE' | 'PARTIALLY_FILLABLE' | 'DEADLINE' | 'CHAIN_ID'}
193
+ * orders that have either of the given statuses
194
+ * @type {Array<'ORDER_STATUS_UNSPECIFIED' | 'ORDER_STATUS_EXPIRED'>}
195
+ * @memberof SealClientGetOrders
196
+ */
197
+ readonly statuses?: Array<GetOrdersStatusesEnum>;
198
+ /**
199
+ *
200
+ * @type {'UNSPECIFIED' | 'OWNER' | 'TOKEN_IN' | 'TOKEN_OUT' | 'AMOUNT_IN' | 'PRICE' | 'PARTIALLY_FILLABLE' | 'DEADLINE' | 'CHAIN_ID'}
193
201
  * @memberof SealClientGetOrders
194
202
  */
195
203
  readonly orderByProperty?: GetOrdersOrderByPropertyEnum;
@@ -256,12 +264,20 @@ export declare class SealClient extends BaseAPI {
256
264
  */
257
265
  healthCheck(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<SealGetHealthCheckResponse, any>>;
258
266
  }
267
+ /**
268
+ * @export
269
+ * @enum {string}
270
+ */
271
+ export declare enum GetOrdersStatusesEnum {
272
+ OrderStatusUnspecified = "ORDER_STATUS_UNSPECIFIED",
273
+ OrderStatusExpired = "ORDER_STATUS_EXPIRED"
274
+ }
259
275
  /**
260
276
  * @export
261
277
  * @enum {string}
262
278
  */
263
279
  export declare enum GetOrdersOrderByPropertyEnum {
264
- Invalid = "INVALID",
280
+ Unspecified = "UNSPECIFIED",
265
281
  Owner = "OWNER",
266
282
  TokenIn = "TOKEN_IN",
267
283
  TokenOut = "TOKEN_OUT",
@@ -16,7 +16,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  return (mod && mod.__esModule) ? mod : { "default": mod };
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.GetOrdersOrderByPropertyEnum = exports.SealClient = exports.SealClientFactory = exports.SealClientFp = exports.SealClientAxiosParamCreator = void 0;
19
+ exports.GetOrdersOrderByPropertyEnum = exports.GetOrdersStatusesEnum = exports.SealClient = exports.SealClientFactory = exports.SealClientFp = exports.SealClientAxiosParamCreator = void 0;
20
20
  const axios_1 = __importDefault(require("axios"));
21
21
  // Some imports not used depending on template conditions
22
22
  // @ts-ignore
@@ -90,7 +90,8 @@ const SealClientAxiosParamCreator = function (configuration) {
90
90
  * @param {string} [owner]
91
91
  * @param {string} [fromPrice] uint256
92
92
  * @param {string} [toPrice] uint256
93
- * @param {GetOrdersOrderByPropertyEnum} [orderByProperty] - INVALID: UNSPECIFIED
93
+ * @param {Array<GetOrdersStatusesEnum>} [statuses] orders that have either of the given statuses
94
+ * @param {GetOrdersOrderByPropertyEnum} [orderByProperty]
94
95
  * @param {boolean} [orderByDescending]
95
96
  * @param {string} [paginationKey]
96
97
  * @param {number} [paginationLimit]
@@ -98,7 +99,7 @@ const SealClientAxiosParamCreator = function (configuration) {
98
99
  * @param {*} [options] Override http request option.
99
100
  * @throws {RequiredError}
100
101
  */
101
- getOrders: async (chainId, tokenIn, tokenOut, owner, fromPrice, toPrice, orderByProperty, orderByDescending, paginationKey, paginationLimit, paginationCountTotal, options = {}) => {
102
+ getOrders: async (chainId, tokenIn, tokenOut, owner, fromPrice, toPrice, statuses, orderByProperty, orderByDescending, paginationKey, paginationLimit, paginationCountTotal, options = {}) => {
102
103
  const localVarPath = `/seal/orders`;
103
104
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
104
105
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -127,6 +128,9 @@ const SealClientAxiosParamCreator = function (configuration) {
127
128
  if (toPrice !== undefined) {
128
129
  localVarQueryParameter['toPrice'] = toPrice;
129
130
  }
131
+ if (statuses) {
132
+ localVarQueryParameter['statuses'] = statuses;
133
+ }
130
134
  if (orderByProperty !== undefined) {
131
135
  localVarQueryParameter['orderBy.property'] = orderByProperty;
132
136
  }
@@ -215,7 +219,8 @@ const SealClientFp = function (configuration) {
215
219
  * @param {string} [owner]
216
220
  * @param {string} [fromPrice] uint256
217
221
  * @param {string} [toPrice] uint256
218
- * @param {GetOrdersOrderByPropertyEnum} [orderByProperty] - INVALID: UNSPECIFIED
222
+ * @param {Array<GetOrdersStatusesEnum>} [statuses] orders that have either of the given statuses
223
+ * @param {GetOrdersOrderByPropertyEnum} [orderByProperty]
219
224
  * @param {boolean} [orderByDescending]
220
225
  * @param {string} [paginationKey]
221
226
  * @param {number} [paginationLimit]
@@ -223,8 +228,8 @@ const SealClientFp = function (configuration) {
223
228
  * @param {*} [options] Override http request option.
224
229
  * @throws {RequiredError}
225
230
  */
226
- async getOrders(chainId, tokenIn, tokenOut, owner, fromPrice, toPrice, orderByProperty, orderByDescending, paginationKey, paginationLimit, paginationCountTotal, options) {
227
- const localVarAxiosArgs = await localVarAxiosParamCreator.getOrders(chainId, tokenIn, tokenOut, owner, fromPrice, toPrice, orderByProperty, orderByDescending, paginationKey, paginationLimit, paginationCountTotal, options);
231
+ async getOrders(chainId, tokenIn, tokenOut, owner, fromPrice, toPrice, statuses, orderByProperty, orderByDescending, paginationKey, paginationLimit, paginationCountTotal, options) {
232
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getOrders(chainId, tokenIn, tokenOut, owner, fromPrice, toPrice, statuses, orderByProperty, orderByDescending, paginationKey, paginationLimit, paginationCountTotal, options);
228
233
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
229
234
  const localVarOperationServerBasePath = base_1.operationServerMap['SealClient.getOrders']?.[localVarOperationServerIndex]?.url;
230
235
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -274,7 +279,7 @@ const SealClientFactory = function (configuration, basePath, axios) {
274
279
  * @throws {RequiredError}
275
280
  */
276
281
  getOrders(requestParameters = {}, options) {
277
- return localVarFp.getOrders(requestParameters.chainId, requestParameters.tokenIn, requestParameters.tokenOut, requestParameters.owner, requestParameters.fromPrice, requestParameters.toPrice, requestParameters.orderByProperty, requestParameters.orderByDescending, requestParameters.paginationKey, requestParameters.paginationLimit, requestParameters.paginationCountTotal, options).then((request) => request(axios, basePath));
282
+ return localVarFp.getOrders(requestParameters.chainId, requestParameters.tokenIn, requestParameters.tokenOut, requestParameters.owner, requestParameters.fromPrice, requestParameters.toPrice, requestParameters.statuses, requestParameters.orderByProperty, requestParameters.orderByDescending, requestParameters.paginationKey, requestParameters.paginationLimit, requestParameters.paginationCountTotal, options).then((request) => request(axios, basePath));
278
283
  },
279
284
  /**
280
285
  *
@@ -321,7 +326,7 @@ class SealClient extends base_1.BaseAPI {
321
326
  * @memberof SealClient
322
327
  */
323
328
  getOrders(requestParameters = {}, options) {
324
- return (0, exports.SealClientFp)(this.configuration).getOrders(requestParameters.chainId, requestParameters.tokenIn, requestParameters.tokenOut, requestParameters.owner, requestParameters.fromPrice, requestParameters.toPrice, requestParameters.orderByProperty, requestParameters.orderByDescending, requestParameters.paginationKey, requestParameters.paginationLimit, requestParameters.paginationCountTotal, options).then((request) => request(this.axios, this.basePath));
329
+ return (0, exports.SealClientFp)(this.configuration).getOrders(requestParameters.chainId, requestParameters.tokenIn, requestParameters.tokenOut, requestParameters.owner, requestParameters.fromPrice, requestParameters.toPrice, requestParameters.statuses, requestParameters.orderByProperty, requestParameters.orderByDescending, requestParameters.paginationKey, requestParameters.paginationLimit, requestParameters.paginationCountTotal, options).then((request) => request(this.axios, this.basePath));
325
330
  }
326
331
  /**
327
332
  *
@@ -334,13 +339,22 @@ class SealClient extends base_1.BaseAPI {
334
339
  }
335
340
  }
336
341
  exports.SealClient = SealClient;
342
+ /**
343
+ * @export
344
+ * @enum {string}
345
+ */
346
+ var GetOrdersStatusesEnum;
347
+ (function (GetOrdersStatusesEnum) {
348
+ GetOrdersStatusesEnum["OrderStatusUnspecified"] = "ORDER_STATUS_UNSPECIFIED";
349
+ GetOrdersStatusesEnum["OrderStatusExpired"] = "ORDER_STATUS_EXPIRED";
350
+ })(GetOrdersStatusesEnum || (exports.GetOrdersStatusesEnum = GetOrdersStatusesEnum = {}));
337
351
  /**
338
352
  * @export
339
353
  * @enum {string}
340
354
  */
341
355
  var GetOrdersOrderByPropertyEnum;
342
356
  (function (GetOrdersOrderByPropertyEnum) {
343
- GetOrdersOrderByPropertyEnum["Invalid"] = "INVALID";
357
+ GetOrdersOrderByPropertyEnum["Unspecified"] = "UNSPECIFIED";
344
358
  GetOrdersOrderByPropertyEnum["Owner"] = "OWNER";
345
359
  GetOrdersOrderByPropertyEnum["TokenIn"] = "TOKEN_IN";
346
360
  GetOrdersOrderByPropertyEnum["TokenOut"] = "TOKEN_OUT";
@@ -14,4 +14,5 @@ export * from './seal-orders-order-by-property';
14
14
  export * from './seal-pagination';
15
15
  export * from './seal-signature-verification-config';
16
16
  export * from './seal-transfer-permission';
17
+ export * from './types-order-status';
17
18
  export * from './types-transfer-permission-type';
@@ -30,4 +30,5 @@ __exportStar(require("./seal-orders-order-by-property"), exports);
30
30
  __exportStar(require("./seal-pagination"), exports);
31
31
  __exportStar(require("./seal-signature-verification-config"), exports);
32
32
  __exportStar(require("./seal-transfer-permission"), exports);
33
+ __exportStar(require("./types-order-status"), exports);
33
34
  __exportStar(require("./types-transfer-permission-type"), exports);
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { TypesOrderStatus } from './types-order-status';
12
13
  /**
13
14
  * TODO add other fields for status, and ...
14
15
  * @export
@@ -63,4 +64,10 @@ export interface SealOrder {
63
64
  * @memberof SealOrder
64
65
  */
65
66
  'deadline'?: number;
67
+ /**
68
+ *
69
+ * @type {TypesOrderStatus}
70
+ * @memberof SealOrder
71
+ */
72
+ 'status'?: TypesOrderStatus;
66
73
  }
@@ -15,7 +15,7 @@
15
15
  * @enum {string}
16
16
  */
17
17
  export declare enum SealOrdersOrderByProperty {
18
- Invalid = "INVALID",
18
+ Unspecified = "UNSPECIFIED",
19
19
  Owner = "OWNER",
20
20
  TokenIn = "TOKEN_IN",
21
21
  TokenOut = "TOKEN_OUT",
@@ -21,7 +21,7 @@ exports.SealOrdersOrderByProperty = void 0;
21
21
  */
22
22
  var SealOrdersOrderByProperty;
23
23
  (function (SealOrdersOrderByProperty) {
24
- SealOrdersOrderByProperty["Invalid"] = "INVALID";
24
+ SealOrdersOrderByProperty["Unspecified"] = "UNSPECIFIED";
25
25
  SealOrdersOrderByProperty["Owner"] = "OWNER";
26
26
  SealOrdersOrderByProperty["TokenIn"] = "TOKEN_IN";
27
27
  SealOrdersOrderByProperty["TokenOut"] = "TOKEN_OUT";
@@ -0,0 +1,20 @@
1
+ /**
2
+ * seal/seal.proto
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: version not set
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
+ * @export
15
+ * @enum {string}
16
+ */
17
+ export declare enum TypesOrderStatus {
18
+ OrderStatusUnspecified = "ORDER_STATUS_UNSPECIFIED",
19
+ OrderStatusExpired = "ORDER_STATUS_EXPIRED"
20
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * seal/seal.proto
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: version not set
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.TypesOrderStatus = void 0;
17
+ /**
18
+ *
19
+ * @export
20
+ * @enum {string}
21
+ */
22
+ var TypesOrderStatus;
23
+ (function (TypesOrderStatus) {
24
+ TypesOrderStatus["OrderStatusUnspecified"] = "ORDER_STATUS_UNSPECIFIED";
25
+ TypesOrderStatus["OrderStatusExpired"] = "ORDER_STATUS_EXPIRED";
26
+ })(TypesOrderStatus || (exports.TypesOrderStatus = TypesOrderStatus = {}));
@@ -15,7 +15,7 @@
15
15
  * @enum {string}
16
16
  */
17
17
  export declare enum TypesTransferPermissionType {
18
- Invalid = "INVALID",
18
+ Unspecified = "UNSPECIFIED",
19
19
  Normal = "NORMAL",
20
20
  Eip2612 = "EIP2612",
21
21
  Permit2 = "PERMIT2"
@@ -21,7 +21,7 @@ exports.TypesTransferPermissionType = void 0;
21
21
  */
22
22
  var TypesTransferPermissionType;
23
23
  (function (TypesTransferPermissionType) {
24
- TypesTransferPermissionType["Invalid"] = "INVALID";
24
+ TypesTransferPermissionType["Unspecified"] = "UNSPECIFIED";
25
25
  TypesTransferPermissionType["Normal"] = "NORMAL";
26
26
  TypesTransferPermissionType["Eip2612"] = "EIP2612";
27
27
  TypesTransferPermissionType["Permit2"] = "PERMIT2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seal-protocol/backendjs",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "Javascript SDK for Seal Backend",
5
5
  "author": "amin <amin@refractedlabs.com>",
6
6
  "homepage": "https://github.com/seal-protocol/backend/tree/main/ts-client#readme",