@openrails/billing-ui 0.237.0 → 0.238.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.
@@ -82,33 +82,27 @@ export declare const cardSummarySchema: z.ZodObject<{
82
82
  exp_year: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
83
83
  }, z.core.$strip>;
84
84
  export type CardSummary = z.infer<typeof cardSummarySchema>;
85
- export declare const paymentOperationSchema: z.ZodObject<{
86
- id: z.ZodString;
87
- status: z.ZodString;
88
- }, z.core.$strip>;
89
- export type PaymentOperation = z.infer<typeof paymentOperationSchema>;
90
85
  export declare const paymentRecoverySchema: z.ZodObject<{
91
86
  last_failure_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
92
87
  retryable: z.ZodBoolean;
93
88
  blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
94
- operation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
95
- id: z.ZodString;
96
- status: z.ZodString;
97
- }, z.core.$strip>>>;
98
89
  order_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
99
90
  }, z.core.$strip>;
100
91
  export type PaymentRecovery = z.infer<typeof paymentRecoverySchema>;
101
92
  /**
102
- * A step the customer takes before an action completes. With
103
- * `solana_sign_transactions` the wallet signs and sends `transactions` in
104
- * order; the action is then repeated with the last signature.
93
+ * What the customer completes before an action or payment can finish:
94
+ * `authenticate` runs the PSP's own script with `payload` (Stripe.js
95
+ * `handleNextAction` with `client_secret`), then the payable is confirmed;
96
+ * `redirect_to_url` leaves for `url`; with `solana_sign_transactions` the
97
+ * wallet signs and sends `transactions` in order and the action is repeated
98
+ * with the last signature.
105
99
  */
106
100
  export declare const nextActionSchema: z.ZodObject<{
107
101
  type: z.ZodString;
108
- redirect_to_url: z.ZodOptional<z.ZodNullable<z.ZodObject<{
109
- url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
110
- }, z.core.$strip>>>;
102
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
103
+ psp_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
111
104
  transactions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
105
+ payload: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
112
106
  }, z.core.$strip>;
113
107
  export type NextAction = z.infer<typeof nextActionSchema>;
114
108
  /**
@@ -242,18 +236,14 @@ export declare const subscriptionSchema: z.ZodObject<{
242
236
  last_failure_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
243
237
  retryable: z.ZodBoolean;
244
238
  blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
245
- operation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
246
- id: z.ZodString;
247
- status: z.ZodString;
248
- }, z.core.$strip>>>;
249
239
  order_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
250
240
  }, z.core.$strip>>>;
251
241
  next_action: z.ZodOptional<z.ZodNullable<z.ZodObject<{
252
242
  type: z.ZodString;
253
- redirect_to_url: z.ZodOptional<z.ZodNullable<z.ZodObject<{
254
- url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
255
- }, z.core.$strip>>>;
243
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
244
+ psp_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
256
245
  transactions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
246
+ payload: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
257
247
  }, z.core.$strip>>>;
258
248
  created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
259
249
  updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -326,19 +316,6 @@ export declare const paymentFailureSchema: z.ZodObject<{
326
316
  field: z.ZodOptional<z.ZodNullable<z.ZodString>>;
327
317
  }, z.core.$strip>;
328
318
  export type PaymentFailure = z.infer<typeof paymentFailureSchema>;
329
- /**
330
- * What the customer completes before a payment can finish: `authenticate`
331
- * runs the PSP's own script with `payload` (Stripe.js `handleNextAction`
332
- * with `client_secret`); `redirect_to_url` leaves for `url`.
333
- */
334
- export declare const orderNextActionSchema: z.ZodObject<{
335
- type: z.ZodString;
336
- url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
337
- psp_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
338
- transactions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
339
- payload: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
340
- }, z.core.$strip>;
341
- export type OrderNextAction = z.infer<typeof orderNextActionSchema>;
342
319
  /**
343
320
  * One line of an order. A purchased line names its price and product; a
344
321
  * usage order's line names its accrual source (`metered:<meter>`) instead.
@@ -769,10 +746,10 @@ export declare const subscriptionChangeSchema: z.ZodObject<{
769
746
  subscription_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
770
747
  next_action: z.ZodOptional<z.ZodNullable<z.ZodObject<{
771
748
  type: z.ZodString;
772
- redirect_to_url: z.ZodOptional<z.ZodNullable<z.ZodObject<{
773
- url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
774
- }, z.core.$strip>>>;
749
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
750
+ psp_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
775
751
  transactions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
752
+ payload: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
776
753
  }, z.core.$strip>>>;
777
754
  delayed_start: z.ZodOptional<z.ZodNullable<z.ZodString>>;
778
755
  currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -780,7 +757,6 @@ export declare const subscriptionChangeSchema: z.ZodObject<{
780
757
  next_charge_amount: z.ZodOptional<z.ZodNullable<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
781
758
  next_charge_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
782
759
  message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
783
- operation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
784
760
  }, z.core.$strip>;
785
761
  export type SubscriptionChange = z.infer<typeof subscriptionChangeSchema>;
786
762
  /**
@@ -865,12 +841,6 @@ export declare const captchaConfigSchema: z.ZodObject<{
865
841
  token_header: z.ZodString;
866
842
  }, z.core.$strip>;
867
843
  export type CaptchaConfig = z.infer<typeof captchaConfigSchema>;
868
- /**
869
- * What a browser needs to know about the deployment and its merchant
870
- * (`GET /config`): the mount's capabilities, the currency registry, the
871
- * merchant's payment setup (null when the request resolves no merchant) and
872
- * the captcha (null when the deployment challenges nobody).
873
- */
874
844
  /** The merchant as its customers see it; logo and support are https. */
875
845
  export declare const publicMerchantSchema: z.ZodObject<{
876
846
  display_name: z.ZodString;
@@ -879,6 +849,11 @@ export declare const publicMerchantSchema: z.ZodObject<{
879
849
  embed_origins: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>, z.ZodTransform<string[], string[] | null | undefined>>;
880
850
  }, z.core.$strip>;
881
851
  export type PublicMerchant = z.infer<typeof publicMerchantSchema>;
852
+ /**
853
+ * What any browser needs to know about the deployment (`GET /config`, no
854
+ * credential): the mount's capabilities, the currency registry and the
855
+ * captcha (null when the deployment challenges nobody).
856
+ */
882
857
  export declare const publicConfigSchema: z.ZodObject<{
883
858
  capabilities: z.ZodObject<{
884
859
  route_groups: z.ZodRecord<z.ZodString, z.ZodBoolean>;
@@ -897,7 +872,25 @@ export declare const publicConfigSchema: z.ZodObject<{
897
872
  decimals: number;
898
873
  minor_decimals?: number | null | undefined;
899
874
  }[] | null | undefined>>;
900
- payment: z.ZodOptional<z.ZodNullable<z.ZodObject<{
875
+ captcha: z.ZodOptional<z.ZodNullable<z.ZodObject<{
876
+ provider: z.ZodString;
877
+ site_key: z.ZodString;
878
+ script_url: z.ZodString;
879
+ action: z.ZodString;
880
+ token_header: z.ZodString;
881
+ }, z.core.$strip>>>;
882
+ network: z.ZodOptional<z.ZodNullable<z.ZodObject<{
883
+ issuer: z.ZodString;
884
+ client_id: z.ZodString;
885
+ }, z.core.$strip>>>;
886
+ }, z.core.$strip>;
887
+ export type PublicConfig = z.infer<typeof publicConfigSchema>;
888
+ /**
889
+ * What a customer's browser needs to know about the merchant it pays
890
+ * (`GET /me/config`): its payment setup and how it presents itself.
891
+ */
892
+ export declare const customerConfigSchema: z.ZodObject<{
893
+ payment: z.ZodObject<{
901
894
  psps: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
902
895
  psp_id: z.ZodString;
903
896
  key: z.ZodString;
@@ -959,26 +952,15 @@ export declare const publicConfigSchema: z.ZodObject<{
959
952
  recurring_eligible?: boolean | null | undefined;
960
953
  }[] | null | undefined>>;
961
954
  }, z.core.$strip>>>;
962
- }, z.core.$strip>>>;
963
- merchant: z.ZodOptional<z.ZodNullable<z.ZodObject<{
955
+ }, z.core.$strip>;
956
+ merchant: z.ZodObject<{
964
957
  display_name: z.ZodString;
965
958
  logo_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
966
959
  support_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
967
960
  embed_origins: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>, z.ZodTransform<string[], string[] | null | undefined>>;
968
- }, z.core.$strip>>>;
969
- captcha: z.ZodOptional<z.ZodNullable<z.ZodObject<{
970
- provider: z.ZodString;
971
- site_key: z.ZodString;
972
- script_url: z.ZodString;
973
- action: z.ZodString;
974
- token_header: z.ZodString;
975
- }, z.core.$strip>>>;
976
- network: z.ZodOptional<z.ZodNullable<z.ZodObject<{
977
- issuer: z.ZodString;
978
- client_id: z.ZodString;
979
- }, z.core.$strip>>>;
961
+ }, z.core.$strip>;
980
962
  }, z.core.$strip>;
981
- export type PublicConfig = z.infer<typeof publicConfigSchema>;
963
+ export type CustomerConfig = z.infer<typeof customerConfigSchema>;
982
964
  export declare const networkLinkChallengeSchema: z.ZodObject<{
983
965
  id: z.ZodString;
984
966
  nonce: z.ZodString;
@@ -997,10 +979,6 @@ export declare const customerLinkSchema: z.ZodObject<{
997
979
  revoked_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
998
980
  }, z.core.$strip>;
999
981
  export type CustomerLink = z.infer<typeof customerLinkSchema>;
1000
- export declare const paymentAuthenticationSchema: z.ZodObject<{
1001
- client_secret: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1002
- }, z.core.$strip>;
1003
- export type PaymentAuthentication = z.infer<typeof paymentAuthenticationSchema>;
1004
982
  /**
1005
983
  * What a card setup hands the server: tokenized data only, never a PAN.
1006
984
  * OpenRails reads the saved card's brand, last four and expiry from the PSP.