@womp/openai-plugin 0.11.1 → 0.12.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/README.md CHANGED
@@ -72,6 +72,7 @@ sign-in.
72
72
  | `claimLink?(subject)` | optional: a one-time link to a page that keeps the chat's designs in an account; without it the design card offers no button |
73
73
  | `getBuild(subject, { designId, buildId })` | a build's status, activity, title and picture; a build that isn't the caller's reads as empty |
74
74
  | `checkoutDesign(subject, { designId, items, longestSideCm?, shipTo? })` | freezes the design as quoted, at its own size or scaled to `longestSideCm`, and without its `REFERENCE` Areas, and returns the quote with one checkout link for all its `items`, each `{ parts?, material, color?, finish?, quantity? }`: the Areas `parts` names, or the whole design, priced on its own; with `shipTo`, also shipping to that address: from a host with `completeCheckout`, the order there as a payment-sheet `session`, else `shipping`, the cheapest shipping as the user's checkout on the web first offers it and the day it arrives; called only when every item passed the print checks |
75
+ | `checkoutLink?(subject, { url })` | optional: `url`, a checkout link `checkoutDesign` returned, as a one-time link that for a few minutes also signs a signed-out browser in to the caller's account; undefined when it can't now; without it, or then, the quote card's Checkout opens `url` as it is |
75
76
  | `completeCheckout?(subject, payment)` | optional: charges a payment made in ChatGPT's payment sheet and places the session's order; without it there is no `complete_checkout`, and a quote to an address carries `shipping` instead of a session |
76
77
  | `getOrderStatus(subject, { orderId? })` | the caller's paid orders, newest first, and the one to show, with no name, address, email or money |
77
78
 
@@ -107,6 +108,7 @@ changes an earlier one.
107
108
  | `get_scene_progress` | `design` card | |
108
109
  | `get_claim_link` | `design` card | |
109
110
  | `checkout_design` | model | shows `quote` |
111
+ | `get_checkout_link` | `quote` card, only with `checkoutLink` | |
110
112
  | `complete_checkout` | model and ChatGPT's payment sheet, only with `completeCheckout` | |
111
113
  | `get_order_status` | model | shows `order` |
112
114
 
package/dist/index.d.ts CHANGED
@@ -309,6 +309,14 @@ interface WompBackend {
309
309
  longestSideCm?: number;
310
310
  shipTo?: ShipTo;
311
311
  }): Promise<Checkout>;
312
+ /**
313
+ * Optional: `url`, a checkout link from `checkoutDesign`, as a one-time link that for a few minutes also signs a
314
+ * signed-out browser in to this user's account. Undefined when it can't now; without it, or then, the quote card opens
315
+ * `url` as it is.
316
+ */
317
+ checkoutLink?(subject: string, input: {
318
+ url: string;
319
+ }): Promise<CheckoutLink | undefined>;
312
320
  /** Optional: charges a payment from ChatGPT's payment sheet and places the order; without it, checkout is on the web alone. */
313
321
  completeCheckout?(subject: string, payment: CompleteCheckoutArgs): Promise<CheckoutSession>;
314
322
  /** The user's paid orders, newest first, and the one to show: `orderId` when it is one of theirs, else the newest. */