@stackup-fi/sdk 1.0.8 → 1.0.9

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.
package/dist/index.js CHANGED
@@ -6,6 +6,7 @@ export function createStackup(options) {
6
6
  headers: {
7
7
  Authorization: `Bearer ${options.accessToken}`,
8
8
  },
9
+ baseUrl: options.baseUrl ?? "https://api.stackup.finance",
9
10
  });
10
11
  return {
11
12
  client,
@@ -86,12 +86,15 @@ export declare class Product extends HeyApiClient {
86
86
  * Create a new product
87
87
  */
88
88
  create<ThrowOnError extends boolean = false>(parameters?: {
89
- walletID?: string;
90
- payoutWalletID?: string;
91
- assetType?: string;
92
- pricing?: string | number | boolean | null | Array<unknown> | {
93
- [key: string]: unknown;
94
- };
89
+ id?: string;
90
+ payoutWalletAddress?: string;
91
+ chain?: string;
92
+ currency?: "USDC";
93
+ amount?: number;
94
+ supply?: number | null;
95
+ name?: string;
96
+ description?: string | null;
97
+ tokens?: Array<string> | null;
95
98
  }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProductCreateResponses, ProductCreateErrors, ThrowOnError, "fields">;
96
99
  /**
97
100
  * List products
@@ -121,12 +124,23 @@ export declare class Product extends HeyApiClient {
121
124
  * Update a product's price or paused status
122
125
  */
123
126
  update<ThrowOnError extends boolean = false>(parameters: {
124
- id: string;
125
- pricing?: string | number | boolean | null | Array<unknown> | {
126
- [key: string]: unknown;
127
- };
128
- paused?: boolean;
127
+ path_id: string;
128
+ body_id?: string;
129
+ workspaceID?: string;
130
+ timeCreated?: unknown;
131
+ timeUpdated?: unknown;
132
+ timeDeleted?: unknown | null;
133
+ payoutWalletID?: string;
134
+ assetType?: string;
135
+ pricingType?: "fixed";
136
+ pricingAmount?: string;
137
+ pricingUnit?: string | null;
129
138
  supply?: number | null;
139
+ sold?: number;
140
+ paused?: boolean;
141
+ name?: string;
142
+ description?: string | null;
143
+ tokens?: Array<string> | null;
130
144
  }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProductUpdateResponses, ProductUpdateErrors, ThrowOnError, "fields">;
131
145
  }
132
146
  export declare class Session extends HeyApiClient {
@@ -140,10 +140,15 @@ export class Product extends HeyApiClient {
140
140
  const params = buildClientParams([parameters], [
141
141
  {
142
142
  args: [
143
- { in: "body", key: "walletID" },
144
- { in: "body", key: "payoutWalletID" },
145
- { in: "body", key: "assetType" },
146
- { in: "body", key: "pricing" },
143
+ { in: "body", key: "id" },
144
+ { in: "body", key: "payoutWalletAddress" },
145
+ { in: "body", key: "chain" },
146
+ { in: "body", key: "currency" },
147
+ { in: "body", key: "amount" },
148
+ { in: "body", key: "supply" },
149
+ { in: "body", key: "name" },
150
+ { in: "body", key: "description" },
151
+ { in: "body", key: "tokens" },
147
152
  ],
148
153
  },
149
154
  ]);
@@ -201,10 +206,31 @@ export class Product extends HeyApiClient {
201
206
  const params = buildClientParams([parameters], [
202
207
  {
203
208
  args: [
204
- { in: "path", key: "id" },
205
- { in: "body", key: "pricing" },
206
- { in: "body", key: "paused" },
209
+ {
210
+ in: "path",
211
+ key: "path_id",
212
+ map: "id",
213
+ },
214
+ {
215
+ in: "body",
216
+ key: "body_id",
217
+ map: "id",
218
+ },
219
+ { in: "body", key: "workspaceID" },
220
+ { in: "body", key: "timeCreated" },
221
+ { in: "body", key: "timeUpdated" },
222
+ { in: "body", key: "timeDeleted" },
223
+ { in: "body", key: "payoutWalletID" },
224
+ { in: "body", key: "assetType" },
225
+ { in: "body", key: "pricingType" },
226
+ { in: "body", key: "pricingAmount" },
227
+ { in: "body", key: "pricingUnit" },
207
228
  { in: "body", key: "supply" },
229
+ { in: "body", key: "sold" },
230
+ { in: "body", key: "paused" },
231
+ { in: "body", key: "name" },
232
+ { in: "body", key: "description" },
233
+ { in: "body", key: "tokens" },
208
234
  ],
209
235
  },
210
236
  ]);
@@ -193,15 +193,18 @@ export type CustomerCheckResponses = {
193
193
  export type CustomerCheckResponse = CustomerCheckResponses[keyof CustomerCheckResponses];
194
194
  export type ProductCreateData = {
195
195
  body?: {
196
- walletID: string;
197
- payoutWalletID: string;
196
+ id?: string;
198
197
  /**
199
- * CAIP-19 asset type (e.g. eip155:1/erc20:0x6b17...)
198
+ * Ethereum address for payouts
200
199
  */
201
- assetType: string;
202
- pricing: string | number | boolean | null | Array<unknown> | {
203
- [key: string]: unknown;
204
- };
200
+ payoutWalletAddress: string;
201
+ chain: string;
202
+ currency: "USDC";
203
+ amount: number;
204
+ supply?: number | null;
205
+ name?: string;
206
+ description?: string | null;
207
+ tokens?: Array<string> | null;
205
208
  };
206
209
  path?: never;
207
210
  query?: never;
@@ -221,24 +224,27 @@ export type ProductCreateResponses = {
221
224
  201: {
222
225
  id: string;
223
226
  workspaceID: string;
224
- timeCreated: unknown;
225
- timeUpdated: unknown;
226
- timeDeleted: unknown | null;
227
- walletID: string;
228
- payoutWalletID: string;
229
227
  /**
230
- * CAIP-19 asset type (e.g. eip155:1/erc20:0x6b17...)
228
+ * Payout Ethereum address
229
+ */
230
+ payoutWalletAddress: string;
231
+ /**
232
+ * Chain reference (e.g. 8453)
233
+ */
234
+ chain: string;
235
+ currency: "USDC";
236
+ /**
237
+ * Price amount in base units
231
238
  */
232
- assetType: string;
233
- pricing: string | number | boolean | null | Array<unknown> | {
234
- [key: string]: unknown;
235
- };
239
+ amount: string;
236
240
  supply: number | null;
237
241
  sold: number;
238
242
  paused: boolean;
239
243
  name: string;
240
244
  description: string | null;
241
245
  tokens: Array<string> | null;
246
+ timeCreated: string;
247
+ timeUpdated: string;
242
248
  };
243
249
  };
244
250
  export type ProductCreateResponse = ProductCreateResponses[keyof ProductCreateResponses];
@@ -255,24 +261,27 @@ export type ProductListResponses = {
255
261
  200: Array<{
256
262
  id: string;
257
263
  workspaceID: string;
258
- timeCreated: unknown;
259
- timeUpdated: unknown;
260
- timeDeleted: unknown | null;
261
- walletID: string;
262
- payoutWalletID: string;
263
264
  /**
264
- * CAIP-19 asset type (e.g. eip155:1/erc20:0x6b17...)
265
+ * Payout Ethereum address
266
+ */
267
+ payoutWalletAddress: string;
268
+ /**
269
+ * Chain reference (e.g. 8453)
270
+ */
271
+ chain: string;
272
+ currency: "USDC";
273
+ /**
274
+ * Price amount in base units
265
275
  */
266
- assetType: string;
267
- pricing: string | number | boolean | null | Array<unknown> | {
268
- [key: string]: unknown;
269
- };
276
+ amount: string;
270
277
  supply: number | null;
271
278
  sold: number;
272
279
  paused: boolean;
273
280
  name: string;
274
281
  description: string | null;
275
282
  tokens: Array<string> | null;
283
+ timeCreated: string;
284
+ timeUpdated: string;
276
285
  }>;
277
286
  };
278
287
  export type ProductListResponse = ProductListResponses[keyof ProductListResponses];
@@ -328,34 +337,51 @@ export type ProductGetResponses = {
328
337
  200: {
329
338
  id: string;
330
339
  workspaceID: string;
331
- timeCreated: unknown;
332
- timeUpdated: unknown;
333
- timeDeleted: unknown | null;
334
- walletID: string;
335
- payoutWalletID: string;
336
340
  /**
337
- * CAIP-19 asset type (e.g. eip155:1/erc20:0x6b17...)
341
+ * Payout Ethereum address
342
+ */
343
+ payoutWalletAddress: string;
344
+ /**
345
+ * Chain reference (e.g. 8453)
346
+ */
347
+ chain: string;
348
+ currency: "USDC";
349
+ /**
350
+ * Price amount in base units
338
351
  */
339
- assetType: string;
340
- pricing: string | number | boolean | null | Array<unknown> | {
341
- [key: string]: unknown;
342
- };
352
+ amount: string;
343
353
  supply: number | null;
344
354
  sold: number;
345
355
  paused: boolean;
346
356
  name: string;
347
357
  description: string | null;
348
358
  tokens: Array<string> | null;
359
+ timeCreated: string;
360
+ timeUpdated: string;
349
361
  };
350
362
  };
351
363
  export type ProductGetResponse = ProductGetResponses[keyof ProductGetResponses];
352
364
  export type ProductUpdateData = {
353
365
  body?: {
354
- pricing?: string | number | boolean | null | Array<unknown> | {
355
- [key: string]: unknown;
356
- };
357
- paused?: boolean;
366
+ id?: string;
367
+ workspaceID?: string;
368
+ timeCreated?: unknown;
369
+ timeUpdated?: unknown;
370
+ timeDeleted?: unknown | null;
371
+ payoutWalletID?: string;
372
+ /**
373
+ * CAIP-19 asset type (e.g. eip155:1/erc20:0x6b17...)
374
+ */
375
+ assetType?: string;
376
+ pricingType?: "fixed";
377
+ pricingAmount?: string;
378
+ pricingUnit?: string | null;
358
379
  supply?: number | null;
380
+ sold?: number;
381
+ paused?: boolean;
382
+ name?: string;
383
+ description?: string | null;
384
+ tokens?: Array<string> | null;
359
385
  };
360
386
  path: {
361
387
  id: string;
@@ -381,24 +407,27 @@ export type ProductUpdateResponses = {
381
407
  200: {
382
408
  id: string;
383
409
  workspaceID: string;
384
- timeCreated: unknown;
385
- timeUpdated: unknown;
386
- timeDeleted: unknown | null;
387
- walletID: string;
388
- payoutWalletID: string;
389
410
  /**
390
- * CAIP-19 asset type (e.g. eip155:1/erc20:0x6b17...)
411
+ * Payout Ethereum address
412
+ */
413
+ payoutWalletAddress: string;
414
+ /**
415
+ * Chain reference (e.g. 8453)
416
+ */
417
+ chain: string;
418
+ currency: "USDC";
419
+ /**
420
+ * Price amount in base units
391
421
  */
392
- assetType: string;
393
- pricing: string | number | boolean | null | Array<unknown> | {
394
- [key: string]: unknown;
395
- };
422
+ amount: string;
396
423
  supply: number | null;
397
424
  sold: number;
398
425
  paused: boolean;
399
426
  name: string;
400
427
  description: string | null;
401
428
  tokens: Array<string> | null;
429
+ timeCreated: string;
430
+ timeUpdated: string;
402
431
  };
403
432
  };
404
433
  export type ProductUpdateResponse = ProductUpdateResponses[keyof ProductUpdateResponses];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackup-fi/sdk",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "exports": {