@pear-protocol/core-sdk 1.3.0 → 1.4.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.
@@ -2067,6 +2067,60 @@ declare class Core {
2067
2067
  };
2068
2068
  }>;
2069
2069
  };
2070
+ savedBaskets: {
2071
+ list: (headers?: ClientHeaders) => Promise<{
2072
+ baskets: {
2073
+ id: string;
2074
+ name: string;
2075
+ legs: [{
2076
+ symbol: string;
2077
+ side: "BUY" | "SELL";
2078
+ weight: number;
2079
+ }, ...{
2080
+ symbol: string;
2081
+ side: "BUY" | "SELL";
2082
+ weight: number;
2083
+ }[]];
2084
+ createdAt: string;
2085
+ updatedAt: string;
2086
+ }[];
2087
+ }>;
2088
+ create: (body: HttpTypes.CreateSavedBasketPayload, headers?: ClientHeaders) => Promise<{
2089
+ basket: {
2090
+ id: string;
2091
+ name: string;
2092
+ legs: [{
2093
+ symbol: string;
2094
+ side: "BUY" | "SELL";
2095
+ weight: number;
2096
+ }, ...{
2097
+ symbol: string;
2098
+ side: "BUY" | "SELL";
2099
+ weight: number;
2100
+ }[]];
2101
+ createdAt: string;
2102
+ updatedAt: string;
2103
+ };
2104
+ }>;
2105
+ update: (id: string, body: HttpTypes.UpdateSavedBasketPayload, headers?: ClientHeaders) => Promise<{
2106
+ basket: {
2107
+ id: string;
2108
+ name: string;
2109
+ legs: [{
2110
+ symbol: string;
2111
+ side: "BUY" | "SELL";
2112
+ weight: number;
2113
+ }, ...{
2114
+ symbol: string;
2115
+ side: "BUY" | "SELL";
2116
+ weight: number;
2117
+ }[]];
2118
+ createdAt: string;
2119
+ updatedAt: string;
2120
+ };
2121
+ }>;
2122
+ delete: (id: string, headers?: ClientHeaders) => Promise<void>;
2123
+ };
2070
2124
  schedules: {
2071
2125
  list: (query: HttpTypes.ScheduleListParamsInput, headers?: ClientHeaders) => Promise<{
2072
2126
  limit: number;
@@ -253,6 +253,34 @@ class Core {
253
253
  });
254
254
  }
255
255
  };
256
+ savedBaskets = {
257
+ list: async (headers) => {
258
+ return await this.client.fetch(`/saved-baskets`, {
259
+ method: "GET",
260
+ headers
261
+ });
262
+ },
263
+ create: async (body, headers) => {
264
+ return await this.client.fetch(`/saved-baskets`, {
265
+ method: "POST",
266
+ headers,
267
+ body
268
+ });
269
+ },
270
+ update: async (id, body, headers) => {
271
+ return await this.client.fetch(`/saved-baskets/${id}`, {
272
+ method: "PATCH",
273
+ headers,
274
+ body
275
+ });
276
+ },
277
+ delete: async (id, headers) => {
278
+ return await this.client.fetch(`/saved-baskets/${id}`, {
279
+ method: "DELETE",
280
+ headers
281
+ });
282
+ }
283
+ };
256
284
  schedules = {
257
285
  list: async (query, headers) => {
258
286
  return await this.client.fetch(`/schedules`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/core-sdk",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Pear Protocol Core SDK",
5
5
  "private": false,
6
6
  "type": "module",