@amos.com/node 0.1.26 → 0.1.28

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
@@ -487,23 +487,6 @@ export interface paths {
487
487
  patch?: never;
488
488
  trace?: never;
489
489
  };
490
- "/embed/payment_intents/{id}/confirm": {
491
- parameters: {
492
- query?: never;
493
- header?: never;
494
- path?: never;
495
- cookie?: never;
496
- };
497
- get?: never;
498
- put?: never;
499
- /** Confirm a payment intent */
500
- post: operations["ConfirmEmbedPaymentIntent"];
501
- delete?: never;
502
- options?: never;
503
- head?: never;
504
- patch?: never;
505
- trace?: never;
506
- };
507
490
  "/embed/payment_intents/{id}/confirm_with_payment_method": {
508
491
  parameters: {
509
492
  query?: never;
@@ -615,7 +598,10 @@ export interface paths {
615
598
  path?: never;
616
599
  cookie?: never;
617
600
  };
618
- /** List all payment methods */
601
+ /**
602
+ * List all payment methods
603
+ * @description Filter by exactly one of customer_id or payment_intent_id.
604
+ */
619
605
  get: operations["ListPaymentMethods"];
620
606
  put?: never;
621
607
  post?: never;
@@ -868,23 +854,6 @@ export interface paths {
868
854
  patch?: never;
869
855
  trace?: never;
870
856
  };
871
- "/embed/setup_intents/{id}/confirm": {
872
- parameters: {
873
- query?: never;
874
- header?: never;
875
- path?: never;
876
- cookie?: never;
877
- };
878
- get?: never;
879
- put?: never;
880
- /** Confirm a setup intent */
881
- post: operations["ConfirmSetupIntent"];
882
- delete?: never;
883
- options?: never;
884
- head?: never;
885
- patch?: never;
886
- trace?: never;
887
- };
888
857
  "/embed/setup_intents/{id}/confirm_with_payment_method": {
889
858
  parameters: {
890
859
  query?: never;
@@ -1228,6 +1197,8 @@ export interface components {
1228
1197
  account_holder_type?: string;
1229
1198
  account_type?: string;
1230
1199
  bank_name?: string;
1200
+ /** @enum {string|null} */
1201
+ failure_reason?: "activation_failed" | "processing_error" | "vault_failed" | null;
1231
1202
  fingerprint?: string | null;
1232
1203
  last4?: string;
1233
1204
  routing_number?: string;
@@ -1287,6 +1258,8 @@ export interface components {
1287
1258
  cvc_check_message?: string | null;
1288
1259
  exp_month?: number;
1289
1260
  exp_year?: number;
1261
+ /** @enum {string|null} */
1262
+ failure_reason?: "authorization_failed" | "avs_blocked" | "brand_not_allowed" | "brand_not_found" | "cvc_blocked" | "processing_error" | "vault_failed" | null;
1290
1263
  first6?: string;
1291
1264
  funding?: string | null;
1292
1265
  fingerprint?: string | null;
@@ -1906,22 +1879,14 @@ export interface components {
1906
1879
  CreatePaymentIntentRequest: {
1907
1880
  payment_intent: components["schemas"]["CreatePaymentIntentInput"];
1908
1881
  };
1909
- ConfirmPaymentIntentInput: {
1910
- moto?: boolean;
1882
+ ConfirmPaymentIntentWithPaymentMethodInput: {
1911
1883
  /** Format: uuid */
1912
1884
  payment_method_id?: string;
1913
- payment_method?: {
1914
- metadata?: components["schemas"]["Metadata"];
1915
- bank_account_profile_attributes?: components["schemas"]["BankAccountProfileInput"];
1916
- billing_address_attributes?: components["schemas"]["BillingAddressInput"];
1917
- card_profile_attributes?: components["schemas"]["CardProfileInput"];
1918
- };
1919
- };
1920
- ConfirmPaymentIntentRequest: {
1921
- payment_intent: components["schemas"]["ConfirmPaymentIntentInput"];
1922
- };
1923
- ConfirmPaymentIntentWithPaymentMethodInput: {
1924
1885
  payment_method: components["schemas"]["EmbedConfirmPaymentMethodInput"];
1886
+ } | {
1887
+ /** Format: uuid */
1888
+ payment_method_id: string;
1889
+ payment_method?: components["schemas"]["EmbedConfirmPaymentMethodInput"];
1925
1890
  };
1926
1891
  ConfirmPaymentIntentWithPaymentMethodRequest: {
1927
1892
  payment_intent: components["schemas"]["ConfirmPaymentIntentWithPaymentMethodInput"];
@@ -1964,6 +1929,7 @@ export interface components {
1964
1929
  };
1965
1930
  RecurringPayment: {
1966
1931
  network_transaction_id?: string;
1932
+ transaction_link_id?: string;
1967
1933
  };
1968
1934
  CreatePaymentLinkInput: {
1969
1935
  slug?: string;
@@ -2071,6 +2037,8 @@ export interface components {
2071
2037
  currency?: string;
2072
2038
  direction?: components["schemas"]["PayoutDirectionType"];
2073
2039
  metadata?: components["schemas"]["Metadata"];
2040
+ /** Format: uuid */
2041
+ organization_id?: string;
2074
2042
  prefix?: string;
2075
2043
  public_id?: string;
2076
2044
  state?: components["schemas"]["PayoutStateType"];
@@ -2101,6 +2069,7 @@ export interface components {
2101
2069
  processor_transaction_id?: string;
2102
2070
  processor_reference?: string;
2103
2071
  network_transaction_id?: string;
2072
+ transaction_link_id?: string;
2104
2073
  /** @enum {string} */
2105
2074
  transaction_type?: "authorization" | "authorization_reversal" | "capture" | "credit" | "echeck_credit" | "echeck_sale" | "echeck_void" | "sale" | "void";
2106
2075
  /** Format: date-time */
@@ -2217,20 +2186,14 @@ export interface components {
2217
2186
  CreateSetupIntentRequest: {
2218
2187
  setup_intent: components["schemas"]["CreateSetupIntentInput"];
2219
2188
  };
2220
- ConfirmSetupIntentInput: {
2221
- moto?: boolean;
2222
- payment_method?: {
2223
- metadata?: components["schemas"]["Metadata"];
2224
- bank_account_profile_attributes?: components["schemas"]["BankAccountProfileInput"];
2225
- billing_address_attributes?: components["schemas"]["BillingAddressInput"];
2226
- card_profile_attributes?: components["schemas"]["CardProfileInput"];
2227
- };
2228
- };
2229
- ConfirmSetupIntentRequest: {
2230
- setup_intent: components["schemas"]["ConfirmSetupIntentInput"];
2231
- };
2232
2189
  ConfirmSetupIntentWithPaymentMethodInput: {
2190
+ /** Format: uuid */
2191
+ payment_method_id?: string;
2233
2192
  payment_method: components["schemas"]["EmbedConfirmPaymentMethodInput"];
2193
+ } | {
2194
+ /** Format: uuid */
2195
+ payment_method_id: string;
2196
+ payment_method?: components["schemas"]["EmbedConfirmPaymentMethodInput"];
2234
2197
  };
2235
2198
  ConfirmSetupIntentWithPaymentMethodRequest: {
2236
2199
  setup_intent: components["schemas"]["ConfirmSetupIntentWithPaymentMethodInput"];
@@ -2475,6 +2438,8 @@ export interface components {
2475
2438
  ParentTransactionIdQuery: string;
2476
2439
  /** @description The ID of the payment intent to filter by */
2477
2440
  PaymentIntentIdQuery: string;
2441
+ /** @description The ID of the customer to filter by. Mutually exclusive with payment_intent_id. */
2442
+ PaymentMethodCustomerIdQuery: string;
2478
2443
  /** @description The ID of the payment method to filter by */
2479
2444
  PaymentMethodIdQuery: string;
2480
2445
  /** @description The ID of the payment transaction to filter by */
@@ -3482,42 +3447,6 @@ export interface operations {
3482
3447
  };
3483
3448
  };
3484
3449
  };
3485
- ConfirmEmbedPaymentIntent: {
3486
- parameters: {
3487
- query?: never;
3488
- header?: never;
3489
- path: {
3490
- /** @description The ID of the payment intent to confirm */
3491
- id: string;
3492
- };
3493
- cookie?: never;
3494
- };
3495
- requestBody: {
3496
- content: {
3497
- "application/json": components["schemas"]["ConfirmPaymentIntentRequest"];
3498
- };
3499
- };
3500
- responses: {
3501
- /** @description Successful confirmation of payment intent */
3502
- 202: {
3503
- headers: {
3504
- [name: string]: unknown;
3505
- };
3506
- content: {
3507
- "application/json": components["schemas"]["PaymentIntent"];
3508
- };
3509
- };
3510
- /** @description Unprocessable entity */
3511
- 422: {
3512
- headers: {
3513
- [name: string]: unknown;
3514
- };
3515
- content: {
3516
- "application/json": components["schemas"]["Error"];
3517
- };
3518
- };
3519
- };
3520
- };
3521
3450
  ConfirmEmbedPaymentIntentWithPaymentMethod: {
3522
3451
  parameters: {
3523
3452
  query?: never;
@@ -3774,13 +3703,15 @@ export interface operations {
3774
3703
  };
3775
3704
  ListPaymentMethods: {
3776
3705
  parameters: {
3777
- query: {
3706
+ query?: {
3778
3707
  /** @description The page of results to retrieve. */
3779
3708
  page?: components["parameters"]["PageQuery"];
3780
3709
  /** @description Number of results per page. */
3781
3710
  per_page?: components["parameters"]["PerPageQuery"];
3782
- /** @description The ID of the customer to filter by */
3783
- customer_id: components["parameters"]["CustomerIdQuery"];
3711
+ /** @description The ID of the customer to filter by. Mutually exclusive with payment_intent_id. */
3712
+ customer_id?: components["parameters"]["PaymentMethodCustomerIdQuery"];
3713
+ /** @description The ID of the payment intent to filter by */
3714
+ payment_intent_id?: components["parameters"]["PaymentIntentIdQuery"];
3784
3715
  };
3785
3716
  header?: never;
3786
3717
  path?: never;
@@ -4368,42 +4299,6 @@ export interface operations {
4368
4299
  };
4369
4300
  };
4370
4301
  };
4371
- ConfirmSetupIntent: {
4372
- parameters: {
4373
- query?: never;
4374
- header?: never;
4375
- path: {
4376
- /** @description The ID of the setup intent to confirm */
4377
- id: string;
4378
- };
4379
- cookie?: never;
4380
- };
4381
- requestBody: {
4382
- content: {
4383
- "application/json": components["schemas"]["ConfirmSetupIntentRequest"];
4384
- };
4385
- };
4386
- responses: {
4387
- /** @description Successful confirmation of setup intent */
4388
- 202: {
4389
- headers: {
4390
- [name: string]: unknown;
4391
- };
4392
- content: {
4393
- "application/json": components["schemas"]["SetupIntent"];
4394
- };
4395
- };
4396
- /** @description Unprocessable entity */
4397
- 422: {
4398
- headers: {
4399
- [name: string]: unknown;
4400
- };
4401
- content: {
4402
- "application/json": components["schemas"]["Error"];
4403
- };
4404
- };
4405
- };
4406
- };
4407
4302
  ConfirmSetupIntentWithPaymentMethod: {
4408
4303
  parameters: {
4409
4304
  query?: never;
@@ -5111,6 +5006,8 @@ type ReadonlyArray<T> = [
5111
5006
  ] extends [
5112
5007
  unknown[]
5113
5008
  ] ? Readonly<Exclude<T, undefined>> : Readonly<Exclude<T, undefined>[]>;
5009
+ export const bankAccountProfileFailure_reasonValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["BankAccountProfile"]["failure_reason"]> = ["activation_failed", "processing_error", "vault_failed"];
5010
+ export const cardProfileFailure_reasonValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["CardProfile"]["failure_reason"]> = ["authorization_failed", "avs_blocked", "brand_not_allowed", "brand_not_found", "cvc_blocked", "processing_error", "vault_failed"];
5114
5011
  export const chargeAllowed_reverse_actionValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["Charge"]["allowed_reverse_action"]> = ["void", "refund"];
5115
5012
  export const chargeStateValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["Charge"]["state"]> = ["cancelled", "errored", "failed", "processing", "requires_capture", "requires_confirmation", "requires_review", "settlement_failed", "succeeded"];
5116
5013
  export const externalAccountTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["ExternalAccount"]["type"]> = ["external_card", "external_bank_account"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amos.com/node",
3
- "version": "0.1.26",
3
+ "version": "0.1.28",
4
4
  "description": "Node.js client for the Amos Pay API.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -47,9 +47,9 @@
47
47
  "openapi-fetch": "0.17.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@biomejs/biome": "2.5.1",
51
- "@changesets/cli": "2.31.0",
52
- "@types/node": "26.0.0",
50
+ "@biomejs/biome": "2.5.5",
51
+ "@changesets/cli": "2.31.1",
52
+ "@types/node": "26.1.1",
53
53
  "openapi-typescript": "7.13.0",
54
54
  "tsup": "8.5.1",
55
55
  "typescript": "5.9.3"