@gethydra/sdk 0.9.0 → 0.10.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.
package/dist/index.d.ts CHANGED
@@ -22819,6 +22819,13 @@ declare class CheckoutResource {
22819
22819
  applyCredit(checkoutId: string, body: ApplyCreditBody): Promise<DataResponse<CheckoutGet>>;
22820
22820
  removeCredit(checkoutId: string): Promise<DataResponse<CheckoutGet>>;
22821
22821
  completeWithCredit(checkoutId: string): Promise<DataResponse<CheckoutGet>>;
22822
+ /**
22823
+ * Confirm a BYO checkout as paid. Only works for stores in BYO payment mode.
22824
+ * Creates the order with financial_status 'paid'.
22825
+ */
22826
+ confirm(checkoutId: string, body?: {
22827
+ external_reference?: string;
22828
+ }, options?: ResourceRequestOptions): Promise<DataResponse<Record<string, unknown>>>;
22822
22829
  }
22823
22830
 
22824
22831
  type Order$1 = components['schemas']['Order'];
package/dist/index.js CHANGED
@@ -313,6 +313,16 @@ var CheckoutResource = class {
313
313
  async completeWithCredit(checkoutId) {
314
314
  return this.client.request("POST", `/v1/checkout/${checkoutId}/complete`);
315
315
  }
316
+ /**
317
+ * Confirm a BYO checkout as paid. Only works for stores in BYO payment mode.
318
+ * Creates the order with financial_status 'paid'.
319
+ */
320
+ async confirm(checkoutId, body, options) {
321
+ return this.client.request("POST", `/v1/checkout/${checkoutId}/confirm`, {
322
+ body: body ?? {},
323
+ ...options
324
+ });
325
+ }
316
326
  };
317
327
 
318
328
  // src/resources/orders.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gethydra/sdk",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Official TypeScript SDK for the Hydra Commerce API",
5
5
  "license": "MIT",
6
6
  "author": "Grant Capital Group",