@pear-protocol/core-sdk 2.18.0 → 2.19.0

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.
@@ -200,7 +200,19 @@ class Core {
200
200
  method: "GET",
201
201
  headers
202
202
  });
203
- }, "get")
203
+ }, "get"),
204
+ cancel: /* @__PURE__ */ __name(async (id, headers) => {
205
+ return await this.client.fetch(`/executions/${id}/cancel`, {
206
+ method: "POST",
207
+ headers
208
+ });
209
+ }, "cancel"),
210
+ complete: /* @__PURE__ */ __name(async (id, headers) => {
211
+ return await this.client.fetch(`/executions/${id}/complete`, {
212
+ method: "POST",
213
+ headers
214
+ });
215
+ }, "complete")
204
216
  };
205
217
  fills = {
206
218
  /** Read one position's assigned quantities and fees at the original receipt price. */
package/dist/types.d.ts CHANGED
@@ -162,6 +162,6 @@ type FetchArgs = Omit<RequestInit, 'headers' | 'body'> & {
162
162
  };
163
163
  type RequestMiddleware = (request: Request, next: () => Promise<Response>) => Promise<Response>;
164
164
  type ResponseMiddleware = (response: Response, retry: () => Promise<Response>, request: Request) => Promise<Response>;
165
- type ClientIdBody = HttpTypes.RebalanceManual | HttpTypes.CreateSchedule | HttpTypes.CreateTradeOpen | HttpTypes.CreateTradeAdjust | HttpTypes.CreateTradeClose | HttpTypes.CreateTradeCloseAll | HttpTypes.CreateTriggerOpen | HttpTypes.CreateTriggerClose;
165
+ type ClientIdBody = HttpTypes.RebalanceManual | HttpTypes.CreateSchedule | HttpTypes.CreateTradeOpenInput | HttpTypes.CreateTradeAdjust | HttpTypes.CreateTradeClose | HttpTypes.CreateTradeCloseAll | HttpTypes.CreateTriggerOpen | HttpTypes.CreateTriggerClose;
166
166
 
167
167
  export type { AuthErrorContext, AuthMode, ClientHeaders, ClientIdBody, FetchArgs, FetchInput, FetchParams, Logger, RequestMiddleware, ResponseMiddleware, SDKConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/core-sdk",
3
- "version": "2.18.0",
3
+ "version": "2.19.0",
4
4
  "description": "Pear Protocol Core SDK",
5
5
  "private": false,
6
6
  "type": "module",
@@ -26,8 +26,8 @@
26
26
  "typecheck": "bunx --package bun@1.4.3 bun --check --threads=2"
27
27
  },
28
28
  "dependencies": {
29
- "@pear-protocol/types": "^2.27.0",
30
- "@pear-protocol/utils": "^1.7.0",
29
+ "@pear-protocol/types": "^2.28.0",
30
+ "@pear-protocol/utils": "^1.8.0",
31
31
  "qs": "^6.14.0"
32
32
  },
33
33
  "devDependencies": {