@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/dist/index.d.mts CHANGED
@@ -87,7 +87,13 @@ interface paths {
87
87
  /** List all customers */
88
88
  get: operations["ListCustomers"];
89
89
  put?: never;
90
- /** Create a new customer */
90
+ /**
91
+ * Create or reuse a customer
92
+ * @description Creates a registered customer, or returns the existing customer when
93
+ * `email` or `phone` already belongs to one in the organization.
94
+ * Reuse does not update the existing record; use PUT to change it.
95
+ * Returns 200 for reuse and 201 for create.
96
+ */
91
97
  post: operations["CreateCustomer"];
92
98
  delete?: never;
93
99
  options?: never;
@@ -567,26 +573,6 @@ interface paths {
567
573
  patch?: never;
568
574
  trace?: never;
569
575
  };
570
- "/embed/payment_intents/{id}/confirm_with_payment_method": {
571
- parameters: {
572
- query?: never;
573
- header?: never;
574
- path?: never;
575
- cookie?: never;
576
- };
577
- get?: never;
578
- put?: never;
579
- /**
580
- * Confirm a payment intent with a new payment method (async)
581
- * @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.
582
- */
583
- post: operations["ConfirmEmbedPaymentIntentWithPaymentMethod"];
584
- delete?: never;
585
- options?: never;
586
- head?: never;
587
- patch?: never;
588
- trace?: never;
589
- };
590
576
  "/payment_intents": {
591
577
  parameters: {
592
578
  query?: never;
@@ -913,7 +899,11 @@ interface paths {
913
899
  };
914
900
  /** Retrieve a render template by ID */
915
901
  get: operations["GetRenderTemplate"];
916
- put?: never;
902
+ /**
903
+ * Update a render template by ID
904
+ * @description Replaces the template's origin allowlist. Currency, allowed payment methods, and billing address options cannot be changed.
905
+ */
906
+ put: operations["UpdateRenderTemplate"];
917
907
  post?: never;
918
908
  delete?: never;
919
909
  options?: never;
@@ -975,26 +965,6 @@ interface paths {
975
965
  patch?: never;
976
966
  trace?: never;
977
967
  };
978
- "/embed/setup_intents/{id}/confirm_with_payment_method": {
979
- parameters: {
980
- query?: never;
981
- header?: never;
982
- path?: never;
983
- cookie?: never;
984
- };
985
- get?: never;
986
- put?: never;
987
- /**
988
- * Confirm a setup intent with a new payment method (async)
989
- * @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.
990
- */
991
- post: operations["ConfirmSetupIntentWithPaymentMethod"];
992
- delete?: never;
993
- options?: never;
994
- head?: never;
995
- patch?: never;
996
- trace?: never;
997
- };
998
968
  "/setup_intents": {
999
969
  parameters: {
1000
970
  query?: never;
@@ -1329,6 +1299,8 @@ interface components {
1329
1299
  routing_number?: string;
1330
1300
  state?: string;
1331
1301
  token?: string;
1302
+ /** @description True when the bank account was verified via Plaid Auth. */
1303
+ verified?: boolean;
1332
1304
  /** Format: date-time */
1333
1305
  created_at?: string;
1334
1306
  /** Format: date-time */
@@ -2457,6 +2429,14 @@ interface components {
2457
2429
  CreateRenderTemplateRequest: {
2458
2430
  render_template: components["schemas"]["CreateRenderTemplateInput"];
2459
2431
  };
2432
+ /** @description Replaces the origin allowlist on an existing render template. Currency, allowed payment methods, and billing address options are not updatable. */
2433
+ UpdateRenderTemplateInput: {
2434
+ /** @description Origin IDs in the current organization. Replaces the current list. At least one origin is required. */
2435
+ origin_ids: string[];
2436
+ };
2437
+ UpdateRenderTemplateRequest: {
2438
+ render_template: components["schemas"]["UpdateRenderTemplateInput"];
2439
+ };
2460
2440
  RenderTemplate: {
2461
2441
  /** Format: uuid */
2462
2442
  id?: string;
@@ -2982,6 +2962,15 @@ interface operations {
2982
2962
  };
2983
2963
  };
2984
2964
  responses: {
2965
+ /** @description Existing customer returned */
2966
+ 200: {
2967
+ headers: {
2968
+ [name: string]: unknown;
2969
+ };
2970
+ content: {
2971
+ "application/json": components["schemas"]["Customer"];
2972
+ };
2973
+ };
2985
2974
  /** @description Customer created successfully */
2986
2975
  201: {
2987
2976
  headers: {
@@ -2991,6 +2980,15 @@ interface operations {
2991
2980
  "application/json": components["schemas"]["Customer"];
2992
2981
  };
2993
2982
  };
2983
+ /** @description Email and phone match different customers */
2984
+ 409: {
2985
+ headers: {
2986
+ [name: string]: unknown;
2987
+ };
2988
+ content: {
2989
+ "application/json": components["schemas"]["Error"];
2990
+ };
2991
+ };
2994
2992
  /** @description Unprocessable entity */
2995
2993
  422: {
2996
2994
  headers: {
@@ -4028,51 +4026,6 @@ interface operations {
4028
4026
  };
4029
4027
  };
4030
4028
  };
4031
- ConfirmEmbedPaymentIntentWithPaymentMethod: {
4032
- parameters: {
4033
- query?: never;
4034
- header?: never;
4035
- path: {
4036
- /** @description The ID of the payment intent to confirm */
4037
- id: string;
4038
- };
4039
- cookie?: never;
4040
- };
4041
- requestBody: {
4042
- content: {
4043
- "application/json": components["schemas"]["ConfirmPaymentIntentWithPaymentMethodRequest"];
4044
- };
4045
- };
4046
- responses: {
4047
- /** @description Confirmation accepted; authorization or sale continues asynchronously */
4048
- 202: {
4049
- headers: {
4050
- [name: string]: unknown;
4051
- };
4052
- content: {
4053
- "application/json": components["schemas"]["PaymentIntent"];
4054
- };
4055
- };
4056
- /** @description Forbidden */
4057
- 403: {
4058
- headers: {
4059
- [name: string]: unknown;
4060
- };
4061
- content: {
4062
- "application/json": components["schemas"]["Error"];
4063
- };
4064
- };
4065
- /** @description Unprocessable content */
4066
- 422: {
4067
- headers: {
4068
- [name: string]: unknown;
4069
- };
4070
- content: {
4071
- "application/json": components["schemas"]["Error"];
4072
- };
4073
- };
4074
- };
4075
- };
4076
4029
  ListPaymentIntents: {
4077
4030
  parameters: {
4078
4031
  query?: {
@@ -4903,24 +4856,38 @@ interface operations {
4903
4856
  };
4904
4857
  };
4905
4858
  };
4906
- CreateRenderToken: {
4859
+ UpdateRenderTemplate: {
4907
4860
  parameters: {
4908
4861
  query?: never;
4909
4862
  header?: never;
4910
4863
  path: {
4864
+ /** @description The ID of the render template to update */
4911
4865
  id: string;
4912
4866
  };
4913
4867
  cookie?: never;
4914
4868
  };
4915
- requestBody?: never;
4869
+ requestBody: {
4870
+ content: {
4871
+ "application/json": components["schemas"]["UpdateRenderTemplateRequest"];
4872
+ };
4873
+ };
4916
4874
  responses: {
4917
- /** @description A render token for the render template */
4918
- 201: {
4875
+ /** @description Render template updated successfully */
4876
+ 200: {
4919
4877
  headers: {
4920
4878
  [name: string]: unknown;
4921
4879
  };
4922
4880
  content: {
4923
- "application/json": components["schemas"]["RenderToken"];
4881
+ "application/json": components["schemas"]["RenderTemplate"];
4882
+ };
4883
+ };
4884
+ /** @description Render template not found */
4885
+ 404: {
4886
+ headers: {
4887
+ [name: string]: unknown;
4888
+ };
4889
+ content: {
4890
+ "application/json": components["schemas"]["Error"];
4924
4891
  };
4925
4892
  };
4926
4893
  /** @description Unprocessable entity */
@@ -4934,46 +4901,50 @@ interface operations {
4934
4901
  };
4935
4902
  };
4936
4903
  };
4937
- GetSetupIntent: {
4904
+ CreateRenderToken: {
4938
4905
  parameters: {
4939
4906
  query?: never;
4940
4907
  header?: never;
4941
4908
  path: {
4942
- /** @description The ID of the setup intent to retrieve */
4943
4909
  id: string;
4944
4910
  };
4945
4911
  cookie?: never;
4946
4912
  };
4947
4913
  requestBody?: never;
4948
4914
  responses: {
4949
- /** @description Successful retrieval of setup intent */
4950
- 200: {
4915
+ /** @description A render token for the render template */
4916
+ 201: {
4951
4917
  headers: {
4952
4918
  [name: string]: unknown;
4953
4919
  };
4954
4920
  content: {
4955
- "application/json": components["schemas"]["SetupIntent"];
4921
+ "application/json": components["schemas"]["RenderToken"];
4922
+ };
4923
+ };
4924
+ /** @description Unprocessable entity */
4925
+ 422: {
4926
+ headers: {
4927
+ [name: string]: unknown;
4928
+ };
4929
+ content: {
4930
+ "application/json": components["schemas"]["Error"];
4956
4931
  };
4957
4932
  };
4958
4933
  };
4959
4934
  };
4960
- ConfirmEmbedSetupIntent: {
4935
+ GetSetupIntent: {
4961
4936
  parameters: {
4962
4937
  query?: never;
4963
4938
  header?: never;
4964
4939
  path: {
4965
- /** @description The ID of the setup intent to confirm */
4940
+ /** @description The ID of the setup intent to retrieve */
4966
4941
  id: string;
4967
4942
  };
4968
4943
  cookie?: never;
4969
4944
  };
4970
- requestBody: {
4971
- content: {
4972
- "application/json": components["schemas"]["ConfirmSetupIntentWithPaymentMethodRequest"];
4973
- };
4974
- };
4945
+ requestBody?: never;
4975
4946
  responses: {
4976
- /** @description Confirmation completed after verification succeeded or failed */
4947
+ /** @description Successful retrieval of setup intent */
4977
4948
  200: {
4978
4949
  headers: {
4979
4950
  [name: string]: unknown;
@@ -4982,27 +4953,9 @@ interface operations {
4982
4953
  "application/json": components["schemas"]["SetupIntent"];
4983
4954
  };
4984
4955
  };
4985
- /** @description Forbidden */
4986
- 403: {
4987
- headers: {
4988
- [name: string]: unknown;
4989
- };
4990
- content: {
4991
- "application/json": components["schemas"]["Error"];
4992
- };
4993
- };
4994
- /** @description Unprocessable content */
4995
- 422: {
4996
- headers: {
4997
- [name: string]: unknown;
4998
- };
4999
- content: {
5000
- "application/json": components["schemas"]["Error"];
5001
- };
5002
- };
5003
4956
  };
5004
4957
  };
5005
- ConfirmSetupIntentWithPaymentMethod: {
4958
+ ConfirmEmbedSetupIntent: {
5006
4959
  parameters: {
5007
4960
  query?: never;
5008
4961
  header?: never;
@@ -5018,8 +4971,8 @@ interface operations {
5018
4971
  };
5019
4972
  };
5020
4973
  responses: {
5021
- /** @description Confirmation accepted; card verification continues asynchronously */
5022
- 202: {
4974
+ /** @description Confirmation completed after verification succeeded or failed */
4975
+ 200: {
5023
4976
  headers: {
5024
4977
  [name: string]: unknown;
5025
4978
  };
package/dist/index.d.ts CHANGED
@@ -87,7 +87,13 @@ interface paths {
87
87
  /** List all customers */
88
88
  get: operations["ListCustomers"];
89
89
  put?: never;
90
- /** Create a new customer */
90
+ /**
91
+ * Create or reuse a customer
92
+ * @description Creates a registered customer, or returns the existing customer when
93
+ * `email` or `phone` already belongs to one in the organization.
94
+ * Reuse does not update the existing record; use PUT to change it.
95
+ * Returns 200 for reuse and 201 for create.
96
+ */
91
97
  post: operations["CreateCustomer"];
92
98
  delete?: never;
93
99
  options?: never;
@@ -567,26 +573,6 @@ interface paths {
567
573
  patch?: never;
568
574
  trace?: never;
569
575
  };
570
- "/embed/payment_intents/{id}/confirm_with_payment_method": {
571
- parameters: {
572
- query?: never;
573
- header?: never;
574
- path?: never;
575
- cookie?: never;
576
- };
577
- get?: never;
578
- put?: never;
579
- /**
580
- * Confirm a payment intent with a new payment method (async)
581
- * @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.
582
- */
583
- post: operations["ConfirmEmbedPaymentIntentWithPaymentMethod"];
584
- delete?: never;
585
- options?: never;
586
- head?: never;
587
- patch?: never;
588
- trace?: never;
589
- };
590
576
  "/payment_intents": {
591
577
  parameters: {
592
578
  query?: never;
@@ -913,7 +899,11 @@ interface paths {
913
899
  };
914
900
  /** Retrieve a render template by ID */
915
901
  get: operations["GetRenderTemplate"];
916
- put?: never;
902
+ /**
903
+ * Update a render template by ID
904
+ * @description Replaces the template's origin allowlist. Currency, allowed payment methods, and billing address options cannot be changed.
905
+ */
906
+ put: operations["UpdateRenderTemplate"];
917
907
  post?: never;
918
908
  delete?: never;
919
909
  options?: never;
@@ -975,26 +965,6 @@ interface paths {
975
965
  patch?: never;
976
966
  trace?: never;
977
967
  };
978
- "/embed/setup_intents/{id}/confirm_with_payment_method": {
979
- parameters: {
980
- query?: never;
981
- header?: never;
982
- path?: never;
983
- cookie?: never;
984
- };
985
- get?: never;
986
- put?: never;
987
- /**
988
- * Confirm a setup intent with a new payment method (async)
989
- * @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.
990
- */
991
- post: operations["ConfirmSetupIntentWithPaymentMethod"];
992
- delete?: never;
993
- options?: never;
994
- head?: never;
995
- patch?: never;
996
- trace?: never;
997
- };
998
968
  "/setup_intents": {
999
969
  parameters: {
1000
970
  query?: never;
@@ -1329,6 +1299,8 @@ interface components {
1329
1299
  routing_number?: string;
1330
1300
  state?: string;
1331
1301
  token?: string;
1302
+ /** @description True when the bank account was verified via Plaid Auth. */
1303
+ verified?: boolean;
1332
1304
  /** Format: date-time */
1333
1305
  created_at?: string;
1334
1306
  /** Format: date-time */
@@ -2457,6 +2429,14 @@ interface components {
2457
2429
  CreateRenderTemplateRequest: {
2458
2430
  render_template: components["schemas"]["CreateRenderTemplateInput"];
2459
2431
  };
2432
+ /** @description Replaces the origin allowlist on an existing render template. Currency, allowed payment methods, and billing address options are not updatable. */
2433
+ UpdateRenderTemplateInput: {
2434
+ /** @description Origin IDs in the current organization. Replaces the current list. At least one origin is required. */
2435
+ origin_ids: string[];
2436
+ };
2437
+ UpdateRenderTemplateRequest: {
2438
+ render_template: components["schemas"]["UpdateRenderTemplateInput"];
2439
+ };
2460
2440
  RenderTemplate: {
2461
2441
  /** Format: uuid */
2462
2442
  id?: string;
@@ -2982,6 +2962,15 @@ interface operations {
2982
2962
  };
2983
2963
  };
2984
2964
  responses: {
2965
+ /** @description Existing customer returned */
2966
+ 200: {
2967
+ headers: {
2968
+ [name: string]: unknown;
2969
+ };
2970
+ content: {
2971
+ "application/json": components["schemas"]["Customer"];
2972
+ };
2973
+ };
2985
2974
  /** @description Customer created successfully */
2986
2975
  201: {
2987
2976
  headers: {
@@ -2991,6 +2980,15 @@ interface operations {
2991
2980
  "application/json": components["schemas"]["Customer"];
2992
2981
  };
2993
2982
  };
2983
+ /** @description Email and phone match different customers */
2984
+ 409: {
2985
+ headers: {
2986
+ [name: string]: unknown;
2987
+ };
2988
+ content: {
2989
+ "application/json": components["schemas"]["Error"];
2990
+ };
2991
+ };
2994
2992
  /** @description Unprocessable entity */
2995
2993
  422: {
2996
2994
  headers: {
@@ -4028,51 +4026,6 @@ interface operations {
4028
4026
  };
4029
4027
  };
4030
4028
  };
4031
- ConfirmEmbedPaymentIntentWithPaymentMethod: {
4032
- parameters: {
4033
- query?: never;
4034
- header?: never;
4035
- path: {
4036
- /** @description The ID of the payment intent to confirm */
4037
- id: string;
4038
- };
4039
- cookie?: never;
4040
- };
4041
- requestBody: {
4042
- content: {
4043
- "application/json": components["schemas"]["ConfirmPaymentIntentWithPaymentMethodRequest"];
4044
- };
4045
- };
4046
- responses: {
4047
- /** @description Confirmation accepted; authorization or sale continues asynchronously */
4048
- 202: {
4049
- headers: {
4050
- [name: string]: unknown;
4051
- };
4052
- content: {
4053
- "application/json": components["schemas"]["PaymentIntent"];
4054
- };
4055
- };
4056
- /** @description Forbidden */
4057
- 403: {
4058
- headers: {
4059
- [name: string]: unknown;
4060
- };
4061
- content: {
4062
- "application/json": components["schemas"]["Error"];
4063
- };
4064
- };
4065
- /** @description Unprocessable content */
4066
- 422: {
4067
- headers: {
4068
- [name: string]: unknown;
4069
- };
4070
- content: {
4071
- "application/json": components["schemas"]["Error"];
4072
- };
4073
- };
4074
- };
4075
- };
4076
4029
  ListPaymentIntents: {
4077
4030
  parameters: {
4078
4031
  query?: {
@@ -4903,24 +4856,38 @@ interface operations {
4903
4856
  };
4904
4857
  };
4905
4858
  };
4906
- CreateRenderToken: {
4859
+ UpdateRenderTemplate: {
4907
4860
  parameters: {
4908
4861
  query?: never;
4909
4862
  header?: never;
4910
4863
  path: {
4864
+ /** @description The ID of the render template to update */
4911
4865
  id: string;
4912
4866
  };
4913
4867
  cookie?: never;
4914
4868
  };
4915
- requestBody?: never;
4869
+ requestBody: {
4870
+ content: {
4871
+ "application/json": components["schemas"]["UpdateRenderTemplateRequest"];
4872
+ };
4873
+ };
4916
4874
  responses: {
4917
- /** @description A render token for the render template */
4918
- 201: {
4875
+ /** @description Render template updated successfully */
4876
+ 200: {
4919
4877
  headers: {
4920
4878
  [name: string]: unknown;
4921
4879
  };
4922
4880
  content: {
4923
- "application/json": components["schemas"]["RenderToken"];
4881
+ "application/json": components["schemas"]["RenderTemplate"];
4882
+ };
4883
+ };
4884
+ /** @description Render template not found */
4885
+ 404: {
4886
+ headers: {
4887
+ [name: string]: unknown;
4888
+ };
4889
+ content: {
4890
+ "application/json": components["schemas"]["Error"];
4924
4891
  };
4925
4892
  };
4926
4893
  /** @description Unprocessable entity */
@@ -4934,46 +4901,50 @@ interface operations {
4934
4901
  };
4935
4902
  };
4936
4903
  };
4937
- GetSetupIntent: {
4904
+ CreateRenderToken: {
4938
4905
  parameters: {
4939
4906
  query?: never;
4940
4907
  header?: never;
4941
4908
  path: {
4942
- /** @description The ID of the setup intent to retrieve */
4943
4909
  id: string;
4944
4910
  };
4945
4911
  cookie?: never;
4946
4912
  };
4947
4913
  requestBody?: never;
4948
4914
  responses: {
4949
- /** @description Successful retrieval of setup intent */
4950
- 200: {
4915
+ /** @description A render token for the render template */
4916
+ 201: {
4951
4917
  headers: {
4952
4918
  [name: string]: unknown;
4953
4919
  };
4954
4920
  content: {
4955
- "application/json": components["schemas"]["SetupIntent"];
4921
+ "application/json": components["schemas"]["RenderToken"];
4922
+ };
4923
+ };
4924
+ /** @description Unprocessable entity */
4925
+ 422: {
4926
+ headers: {
4927
+ [name: string]: unknown;
4928
+ };
4929
+ content: {
4930
+ "application/json": components["schemas"]["Error"];
4956
4931
  };
4957
4932
  };
4958
4933
  };
4959
4934
  };
4960
- ConfirmEmbedSetupIntent: {
4935
+ GetSetupIntent: {
4961
4936
  parameters: {
4962
4937
  query?: never;
4963
4938
  header?: never;
4964
4939
  path: {
4965
- /** @description The ID of the setup intent to confirm */
4940
+ /** @description The ID of the setup intent to retrieve */
4966
4941
  id: string;
4967
4942
  };
4968
4943
  cookie?: never;
4969
4944
  };
4970
- requestBody: {
4971
- content: {
4972
- "application/json": components["schemas"]["ConfirmSetupIntentWithPaymentMethodRequest"];
4973
- };
4974
- };
4945
+ requestBody?: never;
4975
4946
  responses: {
4976
- /** @description Confirmation completed after verification succeeded or failed */
4947
+ /** @description Successful retrieval of setup intent */
4977
4948
  200: {
4978
4949
  headers: {
4979
4950
  [name: string]: unknown;
@@ -4982,27 +4953,9 @@ interface operations {
4982
4953
  "application/json": components["schemas"]["SetupIntent"];
4983
4954
  };
4984
4955
  };
4985
- /** @description Forbidden */
4986
- 403: {
4987
- headers: {
4988
- [name: string]: unknown;
4989
- };
4990
- content: {
4991
- "application/json": components["schemas"]["Error"];
4992
- };
4993
- };
4994
- /** @description Unprocessable content */
4995
- 422: {
4996
- headers: {
4997
- [name: string]: unknown;
4998
- };
4999
- content: {
5000
- "application/json": components["schemas"]["Error"];
5001
- };
5002
- };
5003
4956
  };
5004
4957
  };
5005
- ConfirmSetupIntentWithPaymentMethod: {
4958
+ ConfirmEmbedSetupIntent: {
5006
4959
  parameters: {
5007
4960
  query?: never;
5008
4961
  header?: never;
@@ -5018,8 +4971,8 @@ interface operations {
5018
4971
  };
5019
4972
  };
5020
4973
  responses: {
5021
- /** @description Confirmation accepted; card verification continues asynchronously */
5022
- 202: {
4974
+ /** @description Confirmation completed after verification succeeded or failed */
4975
+ 200: {
5023
4976
  headers: {
5024
4977
  [name: string]: unknown;
5025
4978
  };