@amos.com/node 0.1.66 → 0.1.68

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
@@ -152,7 +152,7 @@ export interface paths {
152
152
  put?: never;
153
153
  /**
154
154
  * Create an external account
155
- * @description Creates an organization-scoped external account. X-Account-Id is ignored if sent.
155
+ * @description Creates an organization-scoped external account. X-Account-Id is ignored if sent. For bank accounts, send account_number to store the number locally and skip Vault; otherwise send encrypted_account_number to tokenize in Vault.
156
156
  */
157
157
  post: operations["CreateExternalAccount"];
158
158
  delete?: never;
@@ -345,7 +345,19 @@ export interface paths {
345
345
  };
346
346
  get?: never;
347
347
  put?: never;
348
- /** Approve a legal entity application */
348
+ /**
349
+ * Start review or approve a legal entity application
350
+ * @description Call this twice.
351
+ *
352
+ * When the application is `submitted`, this moves it to `under_review`.
353
+ * No legal entity is created. Run identity verification for each
354
+ * application principal while the application is `under_review`.
355
+ *
356
+ * When the application is `under_review`, this creates the legal entity,
357
+ * merchants, accounts, and principals and moves the application to
358
+ * `approved`, only if every application principal has a successful
359
+ * identity verification.
360
+ */
349
361
  post: operations["ApproveLegalEntityApplication"];
350
362
  delete?: never;
351
363
  options?: never;
@@ -1327,8 +1339,9 @@ export interface components {
1327
1339
  account_type?: string;
1328
1340
  bank_name?: string;
1329
1341
  currency?: string;
1330
- /** @description Plaintext bank account number. Stored encrypted at rest. Not returned in API responses. */
1342
+ /** @description Plaintext bank account number. Stored encrypted at rest and not returned in API responses. When present, Vault tokenization is skipped (payment methods and external bank accounts). */
1331
1343
  account_number?: string;
1344
+ /** @description Vault-encrypted account number. Required on create when account_number is omitted; ignored for tokenization when account_number is present. */
1332
1345
  encrypted_account_number?: string;
1333
1346
  routing_number?: string;
1334
1347
  };
@@ -1734,6 +1747,8 @@ export interface components {
1734
1747
  updated_at?: string;
1735
1748
  };
1736
1749
  /** @enum {string} */
1750
+ LegalEntityApplicationStateType: "pending" | "submitted" | "needs_information" | "under_review" | "approved" | "denied";
1751
+ /** @enum {string} */
1737
1752
  LegalEntityEntityType: "individual_sole_proprietorship" | "corporation" | "limited_liability_company" | "partnership" | "limited_partnership" | "general_partnership" | "tax_exempt_organization" | "government_agency";
1738
1753
  /** @enum {string} */
1739
1754
  LegalEntityOwnershipType: "public" | "private";
@@ -1790,7 +1805,7 @@ export interface components {
1790
1805
  billing_address_attributes?: components["schemas"]["BillingAddressInput"];
1791
1806
  card_profile_attributes: components["schemas"]["CardProfileInput"];
1792
1807
  };
1793
- /** @description Confirm an embedded intent with a bank account. When ACH verification is required for the intent amount, include plaid credentials and omit bank_account_profile_attributes; routing and account numbers are filled server-side from Plaid Auth. Otherwise provide encrypted_account_number and routing_number on bank_account_profile_attributes. */
1808
+ /** @description Confirm an embedded intent with a bank account. When ACH verification is required for the intent amount, include plaid credentials and omit bank_account_profile_attributes; routing and account numbers are filled server-side from Plaid Auth. Otherwise provide routing_number and either account_number (stored locally, skips Vault) or encrypted_account_number on bank_account_profile_attributes. */
1794
1809
  EmbedConfirmBankAccountPaymentMethodInput: {
1795
1810
  /**
1796
1811
  * @description discriminator enum property added by openapi-typescript
@@ -1924,7 +1939,7 @@ export interface components {
1924
1939
  /** @enum {string} */
1925
1940
  WalletProviderType: "googlepay" | "applepay";
1926
1941
  /** @enum {string} */
1927
- WebhookEventType: "charge.cancelled" | "charge.created" | "charge.errored" | "charge.failed" | "charge.processing" | "charge.requires_capture" | "charge.requires_confirmation" | "charge.requires_review" | "charge.settlement_failed" | "charge.succeeded" | "customer.created" | "customer.updated" | "legal_entity.created" | "legal_entity.updated" | "legal_entity_principal.created" | "legal_entity_principal.updated" | "legal_entity_application.approved" | "legal_entity_application.denied" | "legal_entity_application.needs_information" | "legal_entity_application.pending" | "legal_entity_application.submitted" | "merchant.created" | "merchant.updated" | "payment_intent.cancelled" | "payment_intent.created" | "payment_intent.errored_authorization" | "payment_intent.errored_capture" | "payment_intent.errored_sale" | "payment_intent.processing_authorization" | "payment_intent.processing_capture" | "payment_intent.processing_sale" | "payment_intent.requires_capture" | "payment_intent.requires_confirmation" | "payment_intent.requires_payment_method" | "payment_intent.requires_review" | "payment_intent.succeeded" | "payout.accepted" | "payout.errored" | "payout.failed" | "payout.pending" | "payout.processing" | "payout.rejected" | "payout.succeeded" | "processor_transaction.completed" | "reconciliation.created" | "refund.cancelled" | "refund.created" | "refund.failed" | "refund.pending" | "refund.processing" | "refund.requires_review" | "refund.succeeded" | "setup_intent.cancelled" | "setup_intent.created" | "setup_intent.errored" | "setup_intent.failed" | "setup_intent.requires_confirmation" | "setup_intent.requires_payment_method" | "setup_intent.requires_review" | "setup_intent.succeeded" | "setup_intent.verifying" | "void.created" | "void.failed" | "void.pending" | "void.processing" | "void.requires_review" | "void.succeeded";
1942
+ WebhookEventType: "charge.cancelled" | "charge.created" | "charge.errored" | "charge.failed" | "charge.processing" | "charge.requires_capture" | "charge.requires_confirmation" | "charge.requires_review" | "charge.settlement_failed" | "charge.succeeded" | "customer.created" | "customer.updated" | "legal_entity.active" | "legal_entity.created" | "legal_entity.updated" | "legal_entity_principal.created" | "legal_entity_principal.updated" | "legal_entity_application.approved" | "legal_entity_application.denied" | "legal_entity_application.needs_information" | "legal_entity_application.pending" | "legal_entity_application.submitted" | "legal_entity_application.under_review" | "merchant.created" | "merchant.updated" | "payment_intent.cancelled" | "payment_intent.created" | "payment_intent.errored_authorization" | "payment_intent.errored_capture" | "payment_intent.errored_sale" | "payment_intent.processing_authorization" | "payment_intent.processing_capture" | "payment_intent.processing_sale" | "payment_intent.requires_capture" | "payment_intent.requires_confirmation" | "payment_intent.requires_payment_method" | "payment_intent.requires_review" | "payment_intent.succeeded" | "payout.accepted" | "payout.errored" | "payout.failed" | "payout.pending" | "payout.processing" | "payout.rejected" | "payout.succeeded" | "processor_transaction.completed" | "reconciliation.created" | "refund.cancelled" | "refund.created" | "refund.failed" | "refund.pending" | "refund.processing" | "refund.requires_review" | "refund.succeeded" | "setup_intent.cancelled" | "setup_intent.created" | "setup_intent.errored" | "setup_intent.failed" | "setup_intent.requires_confirmation" | "setup_intent.requires_payment_method" | "setup_intent.requires_review" | "setup_intent.succeeded" | "setup_intent.verifying" | "void.created" | "void.failed" | "void.pending" | "void.processing" | "void.requires_review" | "void.succeeded";
1928
1943
  CreateLegalEntityApplicationInput: {
1929
1944
  legal_name?: string;
1930
1945
  entity_type?: components["schemas"]["LegalEntityEntityType"];
@@ -1986,8 +2001,11 @@ export interface components {
1986
2001
  /** Format: uuid */
1987
2002
  id?: string;
1988
2003
  legal_name?: string;
1989
- /** Format: uuid */
1990
- legal_entity_id?: string;
2004
+ /**
2005
+ * Format: uuid
2006
+ * @description Set when the application is approved and the legal entity is created.
2007
+ */
2008
+ legal_entity_id?: string | null;
1991
2009
  entity_type?: components["schemas"]["LegalEntityEntityType"];
1992
2010
  ownership_type?: components["schemas"]["LegalEntityOwnershipType"];
1993
2011
  contact_email?: string;
@@ -1998,7 +2016,7 @@ export interface components {
1998
2016
  business_state?: string;
1999
2017
  business_postal_code?: string;
2000
2018
  business_country?: string;
2001
- state?: string;
2019
+ state?: components["schemas"]["LegalEntityApplicationStateType"];
2002
2020
  tax_id_last4?: string;
2003
2021
  /** Format: date-time */
2004
2022
  approved_at?: string | null;
@@ -2344,7 +2362,9 @@ export interface components {
2344
2362
  account_type?: string;
2345
2363
  bank_name?: string;
2346
2364
  currency?: string;
2365
+ /** @description Plaintext bank account number. Stored encrypted at rest and not returned in API responses. When present, Vault tokenization is skipped. */
2347
2366
  account_number?: string;
2367
+ /** @description Vault-encrypted account number. Required on create when account_number is omitted; ignored for tokenization when account_number is present. */
2348
2368
  encrypted_account_number?: string;
2349
2369
  token?: string;
2350
2370
  routing_number?: string;
@@ -2481,6 +2501,8 @@ export interface components {
2481
2501
  organization_id?: string;
2482
2502
  prefix?: string;
2483
2503
  public_id?: string;
2504
+ /** Format: uuid */
2505
+ payout_batch_id?: string | null;
2484
2506
  state?: components["schemas"]["PayoutStateType"];
2485
2507
  /** Format: date-time */
2486
2508
  created_at?: string;
@@ -3809,7 +3831,7 @@ export interface operations {
3809
3831
  };
3810
3832
  requestBody?: never;
3811
3833
  responses: {
3812
- /** @description Legal entity application approved successfully */
3834
+ /** @description Application moved to under_review, or approved after identity verification */
3813
3835
  200: {
3814
3836
  headers: {
3815
3837
  [name: string]: unknown;
@@ -3818,7 +3840,7 @@ export interface operations {
3818
3840
  "application/json": components["schemas"]["LegalEntityApplication"];
3819
3841
  };
3820
3842
  };
3821
- /** @description Legal entity application could not be approved */
3843
+ /** @description Application could not start review or complete approval */
3822
3844
  422: {
3823
3845
  headers: {
3824
3846
  [name: string]: unknown;
@@ -6091,6 +6113,7 @@ export const cardProfileFailure_reasonValues: ReadonlyArray<FlattenedDeepRequire
6091
6113
  export const chargeAllowed_reverse_actionValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["Charge"]["allowed_reverse_action"]> = ["void", "refund"];
6092
6114
  export const chargeStateValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["Charge"]["state"]> = ["cancelled", "errored", "failed", "processing", "requires_capture", "requires_confirmation", "requires_review", "settlement_failed", "succeeded"];
6093
6115
  export const externalAccountTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["ExternalAccount"]["type"]> = ["external_card", "external_bank_account"];
6116
+ export const legalEntityApplicationStateTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["LegalEntityApplicationStateType"]> = ["pending", "submitted", "needs_information", "under_review", "approved", "denied"];
6094
6117
  export const legalEntityEntityTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["LegalEntityEntityType"]> = ["individual_sole_proprietorship", "corporation", "limited_liability_company", "partnership", "limited_partnership", "general_partnership", "tax_exempt_organization", "government_agency"];
6095
6118
  export const legalEntityOwnershipTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["LegalEntityOwnershipType"]> = ["public", "private"];
6096
6119
  export const legalEntityDocumentTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["LegalEntityDocumentType"]> = ["irs_cp_575"];
@@ -6120,7 +6143,7 @@ export const subscriptionIntervalTypeValues: ReadonlyArray<FlattenedDeepRequired
6120
6143
  export const subscriptionPlanTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["SubscriptionPlanType"]> = ["fixed", "variable"];
6121
6144
  export const transactionSourceTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["TransactionSourceType"]> = ["api", "dashboard", "iframe", "system", "subscription", "admin"];
6122
6145
  export const walletProviderTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["WalletProviderType"]> = ["googlepay", "applepay"];
6123
- export const webhookEventTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["WebhookEventType"]> = ["charge.cancelled", "charge.created", "charge.errored", "charge.failed", "charge.processing", "charge.requires_capture", "charge.requires_confirmation", "charge.requires_review", "charge.settlement_failed", "charge.succeeded", "customer.created", "customer.updated", "legal_entity.created", "legal_entity.updated", "legal_entity_principal.created", "legal_entity_principal.updated", "legal_entity_application.approved", "legal_entity_application.denied", "legal_entity_application.needs_information", "legal_entity_application.pending", "legal_entity_application.submitted", "merchant.created", "merchant.updated", "payment_intent.cancelled", "payment_intent.created", "payment_intent.errored_authorization", "payment_intent.errored_capture", "payment_intent.errored_sale", "payment_intent.processing_authorization", "payment_intent.processing_capture", "payment_intent.processing_sale", "payment_intent.requires_capture", "payment_intent.requires_confirmation", "payment_intent.requires_payment_method", "payment_intent.requires_review", "payment_intent.succeeded", "payout.accepted", "payout.errored", "payout.failed", "payout.pending", "payout.processing", "payout.rejected", "payout.succeeded", "processor_transaction.completed", "reconciliation.created", "refund.cancelled", "refund.created", "refund.failed", "refund.pending", "refund.processing", "refund.requires_review", "refund.succeeded", "setup_intent.cancelled", "setup_intent.created", "setup_intent.errored", "setup_intent.failed", "setup_intent.requires_confirmation", "setup_intent.requires_payment_method", "setup_intent.requires_review", "setup_intent.succeeded", "setup_intent.verifying", "void.created", "void.failed", "void.pending", "void.processing", "void.requires_review", "void.succeeded"];
6146
+ export const webhookEventTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["WebhookEventType"]> = ["charge.cancelled", "charge.created", "charge.errored", "charge.failed", "charge.processing", "charge.requires_capture", "charge.requires_confirmation", "charge.requires_review", "charge.settlement_failed", "charge.succeeded", "customer.created", "customer.updated", "legal_entity.active", "legal_entity.created", "legal_entity.updated", "legal_entity_principal.created", "legal_entity_principal.updated", "legal_entity_application.approved", "legal_entity_application.denied", "legal_entity_application.needs_information", "legal_entity_application.pending", "legal_entity_application.submitted", "legal_entity_application.under_review", "merchant.created", "merchant.updated", "payment_intent.cancelled", "payment_intent.created", "payment_intent.errored_authorization", "payment_intent.errored_capture", "payment_intent.errored_sale", "payment_intent.processing_authorization", "payment_intent.processing_capture", "payment_intent.processing_sale", "payment_intent.requires_capture", "payment_intent.requires_confirmation", "payment_intent.requires_payment_method", "payment_intent.requires_review", "payment_intent.succeeded", "payout.accepted", "payout.errored", "payout.failed", "payout.pending", "payout.processing", "payout.rejected", "payout.succeeded", "processor_transaction.completed", "reconciliation.created", "refund.cancelled", "refund.created", "refund.failed", "refund.pending", "refund.processing", "refund.requires_review", "refund.succeeded", "setup_intent.cancelled", "setup_intent.created", "setup_intent.errored", "setup_intent.failed", "setup_intent.requires_confirmation", "setup_intent.requires_payment_method", "setup_intent.requires_review", "setup_intent.succeeded", "setup_intent.verifying", "void.created", "void.failed", "void.pending", "void.processing", "void.requires_review", "void.succeeded"];
6124
6147
  export const organizationKindValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["Organization"]["kind"]> = ["direct", "payfac"];
6125
6148
  export const originApplepayRegistrationStateTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["OriginApplepayRegistrationStateType"]> = ["pending", "skipped", "registered", "failed"];
6126
6149
  export const paymentIntentStateValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["PaymentIntent"]["state"]> = ["requires_payment_method", "requires_confirmation", "requires_capture", "processing_authorization", "processing_capture", "processing_sale", "requires_review", "succeeded", "cancelled", "errored_authorization", "errored_capture", "errored_sale"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amos.com/node",
3
- "version": "0.1.66",
3
+ "version": "0.1.68",
4
4
  "description": "Node.js client for the Amos Pay API.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",