@seal-protocol/backendjs 0.0.13 → 0.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.
@@ -15,6 +15,7 @@ import { type RequestArgs, BaseAPI } from '../base';
15
15
  import type { SealCreateOrderIntentRequest } from '../model';
16
16
  import type { SealGetConfigResponse } from '../model';
17
17
  import type { SealGetHealthCheckResponse } from '../model';
18
+ import type { SealGetOrderNonceResponse } from '../model';
18
19
  import type { SealGetOrdersResponse } from '../model';
19
20
  /**
20
21
  * SealClient - axios parameter creator
@@ -34,6 +35,14 @@ export declare const SealClientAxiosParamCreator: (configuration?: Configuration
34
35
  * @throws {RequiredError}
35
36
  */
36
37
  createOrderIntent: (body: SealCreateOrderIntentRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
38
+ /**
39
+ *
40
+ * @param {string} chainId uint256
41
+ * @param {string} owner
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ */
45
+ getOrderNonce: (chainId: string, owner: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
37
46
  /**
38
47
  *
39
48
  * @param {string} [chainId] uint256
@@ -77,6 +86,14 @@ export declare const SealClientFp: (configuration?: Configuration) => {
77
86
  * @throws {RequiredError}
78
87
  */
79
88
  createOrderIntent(body: SealCreateOrderIntentRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
89
+ /**
90
+ *
91
+ * @param {string} chainId uint256
92
+ * @param {string} owner
93
+ * @param {*} [options] Override http request option.
94
+ * @throws {RequiredError}
95
+ */
96
+ getOrderNonce(chainId: string, owner: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SealGetOrderNonceResponse>>;
80
97
  /**
81
98
  *
82
99
  * @param {string} [chainId] uint256
@@ -120,6 +137,13 @@ export declare const SealClientFactory: (configuration?: Configuration, basePath
120
137
  * @throws {RequiredError}
121
138
  */
122
139
  createOrderIntent(requestParameters: SealClientCreateOrderIntentRequest, options?: RawAxiosRequestConfig): AxiosPromise<object>;
140
+ /**
141
+ *
142
+ * @param {SealClientGetOrderNonceRequest} requestParameters Request parameters.
143
+ * @param {*} [options] Override http request option.
144
+ * @throws {RequiredError}
145
+ */
146
+ getOrderNonce(requestParameters: SealClientGetOrderNonceRequest, options?: RawAxiosRequestConfig): AxiosPromise<SealGetOrderNonceResponse>;
123
147
  /**
124
148
  *
125
149
  * @param {SealClientGetOrdersRequest} requestParameters Request parameters.
@@ -147,6 +171,25 @@ export interface SealClientCreateOrderIntentRequest {
147
171
  */
148
172
  readonly body: SealCreateOrderIntentRequest;
149
173
  }
174
+ /**
175
+ * Request parameters for getOrderNonce operation in SealClient.
176
+ * @export
177
+ * @interface SealClientGetOrderNonceRequest
178
+ */
179
+ export interface SealClientGetOrderNonceRequest {
180
+ /**
181
+ * uint256
182
+ * @type {string}
183
+ * @memberof SealClientGetOrderNonce
184
+ */
185
+ readonly chainId: string;
186
+ /**
187
+ *
188
+ * @type {string}
189
+ * @memberof SealClientGetOrderNonce
190
+ */
191
+ readonly owner: string;
192
+ }
150
193
  /**
151
194
  * Request parameters for getOrders operation in SealClient.
152
195
  * @export
@@ -191,7 +234,7 @@ export interface SealClientGetOrdersRequest {
191
234
  readonly toPrice?: string;
192
235
  /**
193
236
  * orders that have either of the given statuses
194
- * @type {Array<'ORDER_STATUS_UNSPECIFIED' | 'ORDER_STATUS_EXPIRED'>}
237
+ * @type {Array<'ORDER_STATUS_UNSPECIFIED' | 'ORDER_STATUS_EXPIRED' | 'ORDER_STATUS_CANCELLED'>}
195
238
  * @memberof SealClientGetOrders
196
239
  */
197
240
  readonly statuses?: Array<GetOrdersStatusesEnum>;
@@ -248,6 +291,14 @@ export declare class SealClient extends BaseAPI {
248
291
  * @memberof SealClient
249
292
  */
250
293
  createOrderIntent(requestParameters: SealClientCreateOrderIntentRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any>>;
294
+ /**
295
+ *
296
+ * @param {SealClientGetOrderNonceRequest} requestParameters Request parameters.
297
+ * @param {*} [options] Override http request option.
298
+ * @throws {RequiredError}
299
+ * @memberof SealClient
300
+ */
301
+ getOrderNonce(requestParameters: SealClientGetOrderNonceRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<SealGetOrderNonceResponse, any>>;
251
302
  /**
252
303
  *
253
304
  * @param {SealClientGetOrdersRequest} requestParameters Request parameters.
@@ -270,7 +321,8 @@ export declare class SealClient extends BaseAPI {
270
321
  */
271
322
  export declare enum GetOrdersStatusesEnum {
272
323
  OrderStatusUnspecified = "ORDER_STATUS_UNSPECIFIED",
273
- OrderStatusExpired = "ORDER_STATUS_EXPIRED"
324
+ OrderStatusExpired = "ORDER_STATUS_EXPIRED",
325
+ OrderStatusCancelled = "ORDER_STATUS_CANCELLED"
274
326
  }
275
327
  /**
276
328
  * @export
@@ -82,6 +82,42 @@ const SealClientAxiosParamCreator = function (configuration) {
82
82
  options: localVarRequestOptions,
83
83
  };
84
84
  },
85
+ /**
86
+ *
87
+ * @param {string} chainId uint256
88
+ * @param {string} owner
89
+ * @param {*} [options] Override http request option.
90
+ * @throws {RequiredError}
91
+ */
92
+ getOrderNonce: async (chainId, owner, options = {}) => {
93
+ // verify required parameter 'chainId' is not null or undefined
94
+ (0, common_1.assertParamExists)('getOrderNonce', 'chainId', chainId);
95
+ // verify required parameter 'owner' is not null or undefined
96
+ (0, common_1.assertParamExists)('getOrderNonce', 'owner', owner);
97
+ const localVarPath = `/seal/orders/nonce`;
98
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
99
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
100
+ let baseOptions;
101
+ if (configuration) {
102
+ baseOptions = configuration.baseOptions;
103
+ }
104
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
105
+ const localVarHeaderParameter = {};
106
+ const localVarQueryParameter = {};
107
+ if (chainId !== undefined) {
108
+ localVarQueryParameter['chainId'] = chainId;
109
+ }
110
+ if (owner !== undefined) {
111
+ localVarQueryParameter['owner'] = owner;
112
+ }
113
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
114
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
115
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
116
+ return {
117
+ url: (0, common_1.toPathString)(localVarUrlObj),
118
+ options: localVarRequestOptions,
119
+ };
120
+ },
85
121
  /**
86
122
  *
87
123
  * @param {string} [chainId] uint256
@@ -211,6 +247,19 @@ const SealClientFp = function (configuration) {
211
247
  const localVarOperationServerBasePath = base_1.operationServerMap['SealClient.createOrderIntent']?.[localVarOperationServerIndex]?.url;
212
248
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
213
249
  },
250
+ /**
251
+ *
252
+ * @param {string} chainId uint256
253
+ * @param {string} owner
254
+ * @param {*} [options] Override http request option.
255
+ * @throws {RequiredError}
256
+ */
257
+ async getOrderNonce(chainId, owner, options) {
258
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderNonce(chainId, owner, options);
259
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
260
+ const localVarOperationServerBasePath = base_1.operationServerMap['SealClient.getOrderNonce']?.[localVarOperationServerIndex]?.url;
261
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
262
+ },
214
263
  /**
215
264
  *
216
265
  * @param {string} [chainId] uint256
@@ -272,6 +321,15 @@ const SealClientFactory = function (configuration, basePath, axios) {
272
321
  createOrderIntent(requestParameters, options) {
273
322
  return localVarFp.createOrderIntent(requestParameters.body, options).then((request) => request(axios, basePath));
274
323
  },
324
+ /**
325
+ *
326
+ * @param {SealClientGetOrderNonceRequest} requestParameters Request parameters.
327
+ * @param {*} [options] Override http request option.
328
+ * @throws {RequiredError}
329
+ */
330
+ getOrderNonce(requestParameters, options) {
331
+ return localVarFp.getOrderNonce(requestParameters.chainId, requestParameters.owner, options).then((request) => request(axios, basePath));
332
+ },
275
333
  /**
276
334
  *
277
335
  * @param {SealClientGetOrdersRequest} requestParameters Request parameters.
@@ -318,6 +376,16 @@ class SealClient extends base_1.BaseAPI {
318
376
  createOrderIntent(requestParameters, options) {
319
377
  return (0, exports.SealClientFp)(this.configuration).createOrderIntent(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
320
378
  }
379
+ /**
380
+ *
381
+ * @param {SealClientGetOrderNonceRequest} requestParameters Request parameters.
382
+ * @param {*} [options] Override http request option.
383
+ * @throws {RequiredError}
384
+ * @memberof SealClient
385
+ */
386
+ getOrderNonce(requestParameters, options) {
387
+ return (0, exports.SealClientFp)(this.configuration).getOrderNonce(requestParameters.chainId, requestParameters.owner, options).then((request) => request(this.axios, this.basePath));
388
+ }
321
389
  /**
322
390
  *
323
391
  * @param {SealClientGetOrdersRequest} requestParameters Request parameters.
@@ -347,6 +415,7 @@ var GetOrdersStatusesEnum;
347
415
  (function (GetOrdersStatusesEnum) {
348
416
  GetOrdersStatusesEnum["OrderStatusUnspecified"] = "ORDER_STATUS_UNSPECIFIED";
349
417
  GetOrdersStatusesEnum["OrderStatusExpired"] = "ORDER_STATUS_EXPIRED";
418
+ GetOrdersStatusesEnum["OrderStatusCancelled"] = "ORDER_STATUS_CANCELLED";
350
419
  })(GetOrdersStatusesEnum || (exports.GetOrdersStatusesEnum = GetOrdersStatusesEnum = {}));
351
420
  /**
352
421
  * @export
@@ -6,6 +6,7 @@ export * from './seal-database-config';
6
6
  export * from './seal-eip712-domain-config';
7
7
  export * from './seal-get-config-response';
8
8
  export * from './seal-get-health-check-response';
9
+ export * from './seal-get-order-nonce-response';
9
10
  export * from './seal-get-orders-response';
10
11
  export * from './seal-logger-config';
11
12
  export * from './seal-order';
@@ -22,6 +22,7 @@ __exportStar(require("./seal-database-config"), exports);
22
22
  __exportStar(require("./seal-eip712-domain-config"), exports);
23
23
  __exportStar(require("./seal-get-config-response"), exports);
24
24
  __exportStar(require("./seal-get-health-check-response"), exports);
25
+ __exportStar(require("./seal-get-order-nonce-response"), exports);
25
26
  __exportStar(require("./seal-get-orders-response"), exports);
26
27
  __exportStar(require("./seal-logger-config"), exports);
27
28
  __exportStar(require("./seal-order"), exports);
@@ -0,0 +1,24 @@
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
+ * @interface SealGetOrderNonceResponse
16
+ */
17
+ export interface SealGetOrderNonceResponse {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof SealGetOrderNonceResponse
22
+ */
23
+ 'nonce'?: string;
24
+ }
@@ -0,0 +1,15 @@
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 });
@@ -11,7 +11,7 @@
11
11
  */
12
12
  import type { TypesOrderStatus } from './types-order-status';
13
13
  /**
14
- * TODO add other fields for status, and ...
14
+ * TODO add other fields for order id, status, and ...
15
15
  * @export
16
16
  * @interface SealOrder
17
17
  */
@@ -16,5 +16,6 @@
16
16
  */
17
17
  export declare enum TypesOrderStatus {
18
18
  OrderStatusUnspecified = "ORDER_STATUS_UNSPECIFIED",
19
- OrderStatusExpired = "ORDER_STATUS_EXPIRED"
19
+ OrderStatusExpired = "ORDER_STATUS_EXPIRED",
20
+ OrderStatusCancelled = "ORDER_STATUS_CANCELLED"
20
21
  }
@@ -23,4 +23,5 @@ var TypesOrderStatus;
23
23
  (function (TypesOrderStatus) {
24
24
  TypesOrderStatus["OrderStatusUnspecified"] = "ORDER_STATUS_UNSPECIFIED";
25
25
  TypesOrderStatus["OrderStatusExpired"] = "ORDER_STATUS_EXPIRED";
26
+ TypesOrderStatus["OrderStatusCancelled"] = "ORDER_STATUS_CANCELLED";
26
27
  })(TypesOrderStatus || (exports.TypesOrderStatus = TypesOrderStatus = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seal-protocol/backendjs",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
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",