@womp/openai-plugin 0.8.0 → 0.8.1

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
@@ -67,11 +67,11 @@ sign-in.
67
67
  | `runScript(subject, { designId, code, purpose })` | runs one script on the design; `purpose` becomes the current build's activity, its last screenshot or a fresh render its picture; a failed script returns `ok: false` |
68
68
  | `renderScene(subject, { designId, view?, targetId? })` | renders the design; the image also becomes the current build's picture |
69
69
  | `getMaterials(subject)` | the materials on offer to the caller, before any design exists: each with its label, whether it prints in one colour (`colorRequired`) and its finishes, the first the default; and the largest size checkout takes |
70
- | `analyzePrint(subject, { designId })` | the design as its scene is now, analysed as it prints at its own size and changing nothing, leaving out Areas named `REFERENCE` (bought parts modelled only to show a fit): size, whether it fits the largest size, separate pieces, and the price per piece in each material on offer |
70
+ | `analyzePrint(subject, { designId, longestSideCm? })` | the design as its scene is now, analysed as it prints at its own size, or scaled so its longest side is `longestSideCm`, changing nothing, leaving out Areas named `REFERENCE` (bought parts modelled only to show a fit): size, whether it fits the largest size, separate pieces, and the price per piece in each material on offer |
71
71
  | `finishScene(subject, { designId, title })` | marks the current build done, with this version's title; called only for a design that passed the print checks |
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
- | `checkoutDesign(subject, { designId, material, color?, finish?, quantity?, shipTo? })` | freezes the design as quoted, at its own size and without its `REFERENCE` Areas, and returns the quote with its checkout link; with `shipTo`, also the order to that address as a payment-sheet session; called only for a design that passed the print checks |
74
+ | `checkoutDesign(subject, { designId, material, color?, finish?, quantity?, 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 its checkout link; with `shipTo`, also the order to that address as a payment-sheet session; called only for a design that passed the print checks |
75
75
  | `completeCheckout?(subject, payment)` | optional: charges a payment made in ChatGPT's payment sheet and places the session's order; without it `checkout_design` takes no `shipTo` and there is no `complete_checkout` |
76
76
  | `getOrderStatus(subject, { orderId? })` | the caller's paid orders, newest first, and the one to show, with no name, address, email or money |
77
77
 
package/dist/index.d.ts CHANGED
@@ -78,7 +78,7 @@ interface PrintOption extends Material {
78
78
  /** Business days to make it, once ordered. */
79
79
  productionDays: number;
80
80
  }
81
- /** A design analysed as it prints, at its own size, and priced in each material on offer. */
81
+ /** A design analysed as it prints, at its own size or scaled to `longestSideCm`, and priced in each material on offer. */
82
82
  interface PrintAnalysis {
83
83
  designId: string;
84
84
  title: string;
@@ -268,6 +268,7 @@ interface WompBackend {
268
268
  /** The design as its scene is now, analysed and priced. Changes nothing. */
269
269
  analyzePrint(subject: string, input: {
270
270
  designId: string;
271
+ longestSideCm?: number;
271
272
  }): Promise<PrintAnalysis>;
272
273
  finishScene(subject: string, input: {
273
274
  designId: string;
@@ -279,13 +280,14 @@ interface WompBackend {
279
280
  designId: string;
280
281
  buildId: string;
281
282
  }): Promise<Build>;
282
- /** Freezes the design as quoted, so its order prints it as it is now. `shipTo` comes only to a host with `completeCheckout`. */
283
+ /** Freezes the design as quoted, at `longestSideCm` when given, so its order prints it as it is now. `shipTo` comes only to a host with `completeCheckout`. */
283
284
  checkoutDesign(subject: string, input: {
284
285
  designId: string;
285
286
  material: string;
286
287
  color?: string;
287
288
  finish?: string;
288
289
  quantity?: number;
290
+ longestSideCm?: number;
289
291
  shipTo?: ShipTo;
290
292
  }): Promise<Checkout>;
291
293
  /** Optional: charges a payment from ChatGPT's payment sheet and places the order; without it, checkout is on the web alone. */