@scopetickets/checkout 0.1.2 → 0.1.3

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.cts CHANGED
@@ -2130,6 +2130,10 @@ export declare type NoticeId =
2130
2130
  | 'ORDER_SOLD_OUT'
2131
2131
  /** The order could not be opened at all: no cart, and nothing to check out. */
2132
2132
  | 'ORDER_NOT_OPENED'
2133
+ /** The event's questionnaire could not be read. */
2134
+ | 'QUESTIONS_NOT_LOADED'
2135
+ /** The platform refused the answers. Only raised before a charge. */
2136
+ | 'ANSWERS_NOT_SAVED'
2133
2137
  /**
2134
2138
  * The verification code could not be SENT. Distinct from a code that was refused, which
2135
2139
  * is the buyer mistyping and is answered by the boxes themselves — validation, not a
@@ -2281,21 +2285,15 @@ export declare type OrderIntent = {
2281
2285
  readonly timeslot?: string;
2282
2286
  readonly buyer?: IntentBuyer;
2283
2287
  /**
2284
- * WHETHER THE EVENT ASKS ITS OWN QUESTIONS, and the one field where absent does NOT
2285
- * mean "you ask".
2286
- *
2287
- * Every other field here is optional because the widget can collect it: there is a
2288
- * party stepper, a calendar, a name field. There is no such control for these. The
2289
- * questions are the EVENT's, they vary in number and height, and they come from an
2290
- * endpoint that takes an id the widget has no cart to read — see `DETAILS`'s blurb.
2291
- * So "absent" cannot mean "ask them", because there is nothing to ask with; it means
2292
- * the event asks nothing, which is the common case and the safe one.
2293
- *
2294
- * Saying `true` puts the More Information card in the flow as a GATE — it says
2295
- * questions are waiting, and does not draw them.
2288
+ * Whether the event asks questions. Absent, the platform decides from the ticket, event and
2289
+ * series questions; `true` keeps the details step in place before they are known.
2296
2290
  */
2297
2291
  readonly asksQuestions?: boolean;
2298
- /** Questionnaire answers already collected, by question id. */
2292
+ /**
2293
+ * Answers the host already has, keyed by question id. They skip the details step only when
2294
+ * they answer every question, and are sent to every cart item before payment. Invalid
2295
+ * entries are ignored.
2296
+ */
2299
2297
  readonly answers?: Readonly<Record<string, string>>;
2300
2298
  /** A method the host has already had chosen. */
2301
2299
  readonly paymentMethodKey?: string;
@@ -3097,7 +3095,7 @@ export declare type SwitchProps = {
3097
3095
  export declare type SwitchSize = 'wide' | 'thin';
3098
3096
 
3099
3097
  /** Figma's `InputTextShort`, ported from. */
3100
- export declare function TextField({ label, value, onChange, flag, flagTitle, trailing, icon, note, type, inputMode, prose, autoComplete, autoCapitalize, passwordRules, enterKeyHint, onSubmit, monospace, placeholder, maxLength, autoFocus, id, name, }: TextFieldProps): react_jsx_runtime.JSX.Element;
3098
+ export declare function TextField({ label, value, onChange, flag, flagTitle, trailing, icon, note, type, inputMode, prose, autoComplete, autoCapitalize, passwordRules, enterKeyHint, onSubmit, monospace, placeholder, maxLength, autoFocus, readOnly, id, name, }: TextFieldProps): react_jsx_runtime.JSX.Element;
3101
3099
 
3102
3100
  export declare type TextFieldProps = {
3103
3101
  /** The field's name, and its only label — there is no placeholder. */
@@ -3185,6 +3183,7 @@ export declare type TextFieldProps = {
3185
3183
  * not told by a notice two presses later. Omitted where the wire sets no limit.
3186
3184
  */
3187
3185
  readonly maxLength?: number;
3186
+ readonly readOnly?: boolean;
3188
3187
  /** Given so a preceding field's return key can move focus here. */
3189
3188
  readonly id?: string;
3190
3189
  readonly name?: string;
@@ -3223,6 +3222,11 @@ declare interface Ticket {
3223
3222
  UrgencyTags: string[];
3224
3223
  /** Nullable for the same reason as the run's — see `EventInfoResponse`. */
3225
3224
  UserTypes: UserType[] | null;
3225
+ /**
3226
+ * The events this product sells for. Only `TicketInformation` sends it, which is how a
3227
+ * response spanning a whole series is split back into days.
3228
+ */
3229
+ EventKeys?: string[] | null;
3226
3230
  }
3227
3231
 
3228
3232
  /**
package/dist/index.d.ts CHANGED
@@ -2130,6 +2130,10 @@ export declare type NoticeId =
2130
2130
  | 'ORDER_SOLD_OUT'
2131
2131
  /** The order could not be opened at all: no cart, and nothing to check out. */
2132
2132
  | 'ORDER_NOT_OPENED'
2133
+ /** The event's questionnaire could not be read. */
2134
+ | 'QUESTIONS_NOT_LOADED'
2135
+ /** The platform refused the answers. Only raised before a charge. */
2136
+ | 'ANSWERS_NOT_SAVED'
2133
2137
  /**
2134
2138
  * The verification code could not be SENT. Distinct from a code that was refused, which
2135
2139
  * is the buyer mistyping and is answered by the boxes themselves — validation, not a
@@ -2281,21 +2285,15 @@ export declare type OrderIntent = {
2281
2285
  readonly timeslot?: string;
2282
2286
  readonly buyer?: IntentBuyer;
2283
2287
  /**
2284
- * WHETHER THE EVENT ASKS ITS OWN QUESTIONS, and the one field where absent does NOT
2285
- * mean "you ask".
2286
- *
2287
- * Every other field here is optional because the widget can collect it: there is a
2288
- * party stepper, a calendar, a name field. There is no such control for these. The
2289
- * questions are the EVENT's, they vary in number and height, and they come from an
2290
- * endpoint that takes an id the widget has no cart to read — see `DETAILS`'s blurb.
2291
- * So "absent" cannot mean "ask them", because there is nothing to ask with; it means
2292
- * the event asks nothing, which is the common case and the safe one.
2293
- *
2294
- * Saying `true` puts the More Information card in the flow as a GATE — it says
2295
- * questions are waiting, and does not draw them.
2288
+ * Whether the event asks questions. Absent, the platform decides from the ticket, event and
2289
+ * series questions; `true` keeps the details step in place before they are known.
2296
2290
  */
2297
2291
  readonly asksQuestions?: boolean;
2298
- /** Questionnaire answers already collected, by question id. */
2292
+ /**
2293
+ * Answers the host already has, keyed by question id. They skip the details step only when
2294
+ * they answer every question, and are sent to every cart item before payment. Invalid
2295
+ * entries are ignored.
2296
+ */
2299
2297
  readonly answers?: Readonly<Record<string, string>>;
2300
2298
  /** A method the host has already had chosen. */
2301
2299
  readonly paymentMethodKey?: string;
@@ -3097,7 +3095,7 @@ export declare type SwitchProps = {
3097
3095
  export declare type SwitchSize = 'wide' | 'thin';
3098
3096
 
3099
3097
  /** Figma's `InputTextShort`, ported from. */
3100
- export declare function TextField({ label, value, onChange, flag, flagTitle, trailing, icon, note, type, inputMode, prose, autoComplete, autoCapitalize, passwordRules, enterKeyHint, onSubmit, monospace, placeholder, maxLength, autoFocus, id, name, }: TextFieldProps): react_jsx_runtime.JSX.Element;
3098
+ export declare function TextField({ label, value, onChange, flag, flagTitle, trailing, icon, note, type, inputMode, prose, autoComplete, autoCapitalize, passwordRules, enterKeyHint, onSubmit, monospace, placeholder, maxLength, autoFocus, readOnly, id, name, }: TextFieldProps): react_jsx_runtime.JSX.Element;
3101
3099
 
3102
3100
  export declare type TextFieldProps = {
3103
3101
  /** The field's name, and its only label — there is no placeholder. */
@@ -3185,6 +3183,7 @@ export declare type TextFieldProps = {
3185
3183
  * not told by a notice two presses later. Omitted where the wire sets no limit.
3186
3184
  */
3187
3185
  readonly maxLength?: number;
3186
+ readonly readOnly?: boolean;
3188
3187
  /** Given so a preceding field's return key can move focus here. */
3189
3188
  readonly id?: string;
3190
3189
  readonly name?: string;
@@ -3223,6 +3222,11 @@ declare interface Ticket {
3223
3222
  UrgencyTags: string[];
3224
3223
  /** Nullable for the same reason as the run's — see `EventInfoResponse`. */
3225
3224
  UserTypes: UserType[] | null;
3225
+ /**
3226
+ * The events this product sells for. Only `TicketInformation` sends it, which is how a
3227
+ * response spanning a whole series is split back into days.
3228
+ */
3229
+ EventKeys?: string[] | null;
3226
3230
  }
3227
3231
 
3228
3232
  /**