@amos.com/node 0.1.59 → 0.1.60

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/openapi/schema.ts CHANGED
@@ -84,7 +84,13 @@ export interface paths {
84
84
  /** List all customers */
85
85
  get: operations["ListCustomers"];
86
86
  put?: never;
87
- /** Create a new customer */
87
+ /**
88
+ * Create or reuse a customer
89
+ * @description Creates a registered customer, or returns the existing customer when
90
+ * `email` or `phone` already belongs to one in the organization.
91
+ * Reuse does not update the existing record; use PUT to change it.
92
+ * Returns 200 for reuse and 201 for create.
93
+ */
88
94
  post: operations["CreateCustomer"];
89
95
  delete?: never;
90
96
  options?: never;
@@ -564,26 +570,6 @@ export interface paths {
564
570
  patch?: never;
565
571
  trace?: never;
566
572
  };
567
- "/embed/payment_intents/{id}/confirm_with_payment_method": {
568
- parameters: {
569
- query?: never;
570
- header?: never;
571
- path?: never;
572
- cookie?: never;
573
- };
574
- get?: never;
575
- put?: never;
576
- /**
577
- * Confirm a payment intent with a new payment method (async)
578
- * @description Legacy async confirmation for migration. Accepts a payment method, enqueues authorization or sale work, and returns 202 with processing_authorization or processing_sale. Prefer POST /embed/payment_intents/{id}/confirm for synchronous processor confirmation.
579
- */
580
- post: operations["ConfirmEmbedPaymentIntentWithPaymentMethod"];
581
- delete?: never;
582
- options?: never;
583
- head?: never;
584
- patch?: never;
585
- trace?: never;
586
- };
587
573
  "/payment_intents": {
588
574
  parameters: {
589
575
  query?: never;
@@ -910,7 +896,11 @@ export interface paths {
910
896
  };
911
897
  /** Retrieve a render template by ID */
912
898
  get: operations["GetRenderTemplate"];
913
- put?: never;
899
+ /**
900
+ * Update a render template by ID
901
+ * @description Replaces the template's origin allowlist. Currency, allowed payment methods, and billing address options cannot be changed.
902
+ */
903
+ put: operations["UpdateRenderTemplate"];
914
904
  post?: never;
915
905
  delete?: never;
916
906
  options?: never;
@@ -972,26 +962,6 @@ export interface paths {
972
962
  patch?: never;
973
963
  trace?: never;
974
964
  };
975
- "/embed/setup_intents/{id}/confirm_with_payment_method": {
976
- parameters: {
977
- query?: never;
978
- header?: never;
979
- path?: never;
980
- cookie?: never;
981
- };
982
- get?: never;
983
- put?: never;
984
- /**
985
- * Confirm a setup intent with a new payment method (async)
986
- * @description Legacy async confirmation for migration. Accepts a payment method and, for cards, enqueues verification. Returns 202 with verifying or succeeded. Prefer POST /embed/setup_intents/{id}/confirm for synchronous confirmation.
987
- */
988
- post: operations["ConfirmSetupIntentWithPaymentMethod"];
989
- delete?: never;
990
- options?: never;
991
- head?: never;
992
- patch?: never;
993
- trace?: never;
994
- };
995
965
  "/setup_intents": {
996
966
  parameters: {
997
967
  query?: never;
@@ -1326,6 +1296,8 @@ export interface components {
1326
1296
  routing_number?: string;
1327
1297
  state?: string;
1328
1298
  token?: string;
1299
+ /** @description True when the bank account was verified via Plaid Auth. */
1300
+ verified?: boolean;
1329
1301
  /** Format: date-time */
1330
1302
  created_at?: string;
1331
1303
  /** Format: date-time */
@@ -2454,6 +2426,14 @@ export interface components {
2454
2426
  CreateRenderTemplateRequest: {
2455
2427
  render_template: components["schemas"]["CreateRenderTemplateInput"];
2456
2428
  };
2429
+ /** @description Replaces the origin allowlist on an existing render template. Currency, allowed payment methods, and billing address options are not updatable. */
2430
+ UpdateRenderTemplateInput: {
2431
+ /** @description Origin IDs in the current organization. Replaces the current list. At least one origin is required. */
2432
+ origin_ids: string[];
2433
+ };
2434
+ UpdateRenderTemplateRequest: {
2435
+ render_template: components["schemas"]["UpdateRenderTemplateInput"];
2436
+ };
2457
2437
  RenderTemplate: {
2458
2438
  /** Format: uuid */
2459
2439
  id?: string;
@@ -2979,6 +2959,15 @@ export interface operations {
2979
2959
  };
2980
2960
  };
2981
2961
  responses: {
2962
+ /** @description Existing customer returned */
2963
+ 200: {
2964
+ headers: {
2965
+ [name: string]: unknown;
2966
+ };
2967
+ content: {
2968
+ "application/json": components["schemas"]["Customer"];
2969
+ };
2970
+ };
2982
2971
  /** @description Customer created successfully */
2983
2972
  201: {
2984
2973
  headers: {
@@ -2988,6 +2977,15 @@ export interface operations {
2988
2977
  "application/json": components["schemas"]["Customer"];
2989
2978
  };
2990
2979
  };
2980
+ /** @description Email and phone match different customers */
2981
+ 409: {
2982
+ headers: {
2983
+ [name: string]: unknown;
2984
+ };
2985
+ content: {
2986
+ "application/json": components["schemas"]["Error"];
2987
+ };
2988
+ };
2991
2989
  /** @description Unprocessable entity */
2992
2990
  422: {
2993
2991
  headers: {
@@ -4025,51 +4023,6 @@ export interface operations {
4025
4023
  };
4026
4024
  };
4027
4025
  };
4028
- ConfirmEmbedPaymentIntentWithPaymentMethod: {
4029
- parameters: {
4030
- query?: never;
4031
- header?: never;
4032
- path: {
4033
- /** @description The ID of the payment intent to confirm */
4034
- id: string;
4035
- };
4036
- cookie?: never;
4037
- };
4038
- requestBody: {
4039
- content: {
4040
- "application/json": components["schemas"]["ConfirmPaymentIntentWithPaymentMethodRequest"];
4041
- };
4042
- };
4043
- responses: {
4044
- /** @description Confirmation accepted; authorization or sale continues asynchronously */
4045
- 202: {
4046
- headers: {
4047
- [name: string]: unknown;
4048
- };
4049
- content: {
4050
- "application/json": components["schemas"]["PaymentIntent"];
4051
- };
4052
- };
4053
- /** @description Forbidden */
4054
- 403: {
4055
- headers: {
4056
- [name: string]: unknown;
4057
- };
4058
- content: {
4059
- "application/json": components["schemas"]["Error"];
4060
- };
4061
- };
4062
- /** @description Unprocessable content */
4063
- 422: {
4064
- headers: {
4065
- [name: string]: unknown;
4066
- };
4067
- content: {
4068
- "application/json": components["schemas"]["Error"];
4069
- };
4070
- };
4071
- };
4072
- };
4073
4026
  ListPaymentIntents: {
4074
4027
  parameters: {
4075
4028
  query?: {
@@ -4900,24 +4853,38 @@ export interface operations {
4900
4853
  };
4901
4854
  };
4902
4855
  };
4903
- CreateRenderToken: {
4856
+ UpdateRenderTemplate: {
4904
4857
  parameters: {
4905
4858
  query?: never;
4906
4859
  header?: never;
4907
4860
  path: {
4861
+ /** @description The ID of the render template to update */
4908
4862
  id: string;
4909
4863
  };
4910
4864
  cookie?: never;
4911
4865
  };
4912
- requestBody?: never;
4866
+ requestBody: {
4867
+ content: {
4868
+ "application/json": components["schemas"]["UpdateRenderTemplateRequest"];
4869
+ };
4870
+ };
4913
4871
  responses: {
4914
- /** @description A render token for the render template */
4915
- 201: {
4872
+ /** @description Render template updated successfully */
4873
+ 200: {
4916
4874
  headers: {
4917
4875
  [name: string]: unknown;
4918
4876
  };
4919
4877
  content: {
4920
- "application/json": components["schemas"]["RenderToken"];
4878
+ "application/json": components["schemas"]["RenderTemplate"];
4879
+ };
4880
+ };
4881
+ /** @description Render template not found */
4882
+ 404: {
4883
+ headers: {
4884
+ [name: string]: unknown;
4885
+ };
4886
+ content: {
4887
+ "application/json": components["schemas"]["Error"];
4921
4888
  };
4922
4889
  };
4923
4890
  /** @description Unprocessable entity */
@@ -4931,46 +4898,50 @@ export interface operations {
4931
4898
  };
4932
4899
  };
4933
4900
  };
4934
- GetSetupIntent: {
4901
+ CreateRenderToken: {
4935
4902
  parameters: {
4936
4903
  query?: never;
4937
4904
  header?: never;
4938
4905
  path: {
4939
- /** @description The ID of the setup intent to retrieve */
4940
4906
  id: string;
4941
4907
  };
4942
4908
  cookie?: never;
4943
4909
  };
4944
4910
  requestBody?: never;
4945
4911
  responses: {
4946
- /** @description Successful retrieval of setup intent */
4947
- 200: {
4912
+ /** @description A render token for the render template */
4913
+ 201: {
4948
4914
  headers: {
4949
4915
  [name: string]: unknown;
4950
4916
  };
4951
4917
  content: {
4952
- "application/json": components["schemas"]["SetupIntent"];
4918
+ "application/json": components["schemas"]["RenderToken"];
4919
+ };
4920
+ };
4921
+ /** @description Unprocessable entity */
4922
+ 422: {
4923
+ headers: {
4924
+ [name: string]: unknown;
4925
+ };
4926
+ content: {
4927
+ "application/json": components["schemas"]["Error"];
4953
4928
  };
4954
4929
  };
4955
4930
  };
4956
4931
  };
4957
- ConfirmEmbedSetupIntent: {
4932
+ GetSetupIntent: {
4958
4933
  parameters: {
4959
4934
  query?: never;
4960
4935
  header?: never;
4961
4936
  path: {
4962
- /** @description The ID of the setup intent to confirm */
4937
+ /** @description The ID of the setup intent to retrieve */
4963
4938
  id: string;
4964
4939
  };
4965
4940
  cookie?: never;
4966
4941
  };
4967
- requestBody: {
4968
- content: {
4969
- "application/json": components["schemas"]["ConfirmSetupIntentWithPaymentMethodRequest"];
4970
- };
4971
- };
4942
+ requestBody?: never;
4972
4943
  responses: {
4973
- /** @description Confirmation completed after verification succeeded or failed */
4944
+ /** @description Successful retrieval of setup intent */
4974
4945
  200: {
4975
4946
  headers: {
4976
4947
  [name: string]: unknown;
@@ -4979,27 +4950,9 @@ export interface operations {
4979
4950
  "application/json": components["schemas"]["SetupIntent"];
4980
4951
  };
4981
4952
  };
4982
- /** @description Forbidden */
4983
- 403: {
4984
- headers: {
4985
- [name: string]: unknown;
4986
- };
4987
- content: {
4988
- "application/json": components["schemas"]["Error"];
4989
- };
4990
- };
4991
- /** @description Unprocessable content */
4992
- 422: {
4993
- headers: {
4994
- [name: string]: unknown;
4995
- };
4996
- content: {
4997
- "application/json": components["schemas"]["Error"];
4998
- };
4999
- };
5000
4953
  };
5001
4954
  };
5002
- ConfirmSetupIntentWithPaymentMethod: {
4955
+ ConfirmEmbedSetupIntent: {
5003
4956
  parameters: {
5004
4957
  query?: never;
5005
4958
  header?: never;
@@ -5015,8 +4968,8 @@ export interface operations {
5015
4968
  };
5016
4969
  };
5017
4970
  responses: {
5018
- /** @description Confirmation accepted; card verification continues asynchronously */
5019
- 202: {
4971
+ /** @description Confirmation completed after verification succeeded or failed */
4972
+ 200: {
5020
4973
  headers: {
5021
4974
  [name: string]: unknown;
5022
4975
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amos.com/node",
3
- "version": "0.1.59",
3
+ "version": "0.1.60",
4
4
  "description": "Node.js client for the Amos Pay API.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",