@amos.com/node 0.1.56 → 0.1.58
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 +244 -14
- package/dist/index.d.ts +244 -14
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/openapi/schema.ts +243 -13
- package/package.json +3 -3
package/openapi/schema.ts
CHANGED
|
@@ -110,6 +110,25 @@ export interface paths {
|
|
|
110
110
|
patch?: never;
|
|
111
111
|
trace?: never;
|
|
112
112
|
};
|
|
113
|
+
"/dunning_configuration": {
|
|
114
|
+
parameters: {
|
|
115
|
+
query?: never;
|
|
116
|
+
header?: never;
|
|
117
|
+
path?: never;
|
|
118
|
+
cookie?: never;
|
|
119
|
+
};
|
|
120
|
+
/** Retrieve the current organization's dunning configuration */
|
|
121
|
+
get: operations["GetDunningConfiguration"];
|
|
122
|
+
put?: never;
|
|
123
|
+
/** Create the current organization's dunning configuration */
|
|
124
|
+
post: operations["CreateDunningConfiguration"];
|
|
125
|
+
delete?: never;
|
|
126
|
+
options?: never;
|
|
127
|
+
head?: never;
|
|
128
|
+
/** Update the current organization's dunning configuration */
|
|
129
|
+
patch: operations["UpdateDunningConfiguration"];
|
|
130
|
+
trace?: never;
|
|
131
|
+
};
|
|
113
132
|
"/external_accounts": {
|
|
114
133
|
parameters: {
|
|
115
134
|
query?: never;
|
|
@@ -488,6 +507,26 @@ export interface paths {
|
|
|
488
507
|
patch?: never;
|
|
489
508
|
trace?: never;
|
|
490
509
|
};
|
|
510
|
+
"/origins/{id}": {
|
|
511
|
+
parameters: {
|
|
512
|
+
query?: never;
|
|
513
|
+
header?: never;
|
|
514
|
+
path?: never;
|
|
515
|
+
cookie?: never;
|
|
516
|
+
};
|
|
517
|
+
get?: never;
|
|
518
|
+
put?: never;
|
|
519
|
+
post?: never;
|
|
520
|
+
/**
|
|
521
|
+
* Delete an origin by ID
|
|
522
|
+
* @description Unregisters the origin host with Apple Pay when it is registered, then deletes the origin. Returns 409 if a render template still uses it. Does not delete the origin if Apple Pay unregistration fails.
|
|
523
|
+
*/
|
|
524
|
+
delete: operations["DeleteOrigin"];
|
|
525
|
+
options?: never;
|
|
526
|
+
head?: never;
|
|
527
|
+
patch?: never;
|
|
528
|
+
trace?: never;
|
|
529
|
+
};
|
|
491
530
|
"/embed/payment_intents/{id}": {
|
|
492
531
|
parameters: {
|
|
493
532
|
query?: never;
|
|
@@ -1480,6 +1519,36 @@ export interface components {
|
|
|
1480
1519
|
/** Format: date-time */
|
|
1481
1520
|
updated_at?: string;
|
|
1482
1521
|
};
|
|
1522
|
+
/** @enum {string} */
|
|
1523
|
+
DunningConfigurationExhaustedActionType: "cancel" | "pause" | "none";
|
|
1524
|
+
CreateDunningConfigurationInput: {
|
|
1525
|
+
/** @description Days after a failed collection to retry, in ascending order. */
|
|
1526
|
+
retry_days: number[];
|
|
1527
|
+
exhausted_action?: components["schemas"]["DunningConfigurationExhaustedActionType"];
|
|
1528
|
+
enabled?: boolean;
|
|
1529
|
+
};
|
|
1530
|
+
CreateDunningConfigurationRequest: {
|
|
1531
|
+
dunning_configuration: components["schemas"]["CreateDunningConfigurationInput"];
|
|
1532
|
+
};
|
|
1533
|
+
UpdateDunningConfigurationInput: {
|
|
1534
|
+
retry_days?: number[];
|
|
1535
|
+
exhausted_action?: components["schemas"]["DunningConfigurationExhaustedActionType"];
|
|
1536
|
+
enabled?: boolean;
|
|
1537
|
+
};
|
|
1538
|
+
UpdateDunningConfigurationRequest: {
|
|
1539
|
+
dunning_configuration: components["schemas"]["UpdateDunningConfigurationInput"];
|
|
1540
|
+
};
|
|
1541
|
+
DunningConfiguration: {
|
|
1542
|
+
/** Format: uuid */
|
|
1543
|
+
id?: string;
|
|
1544
|
+
retry_days?: number[];
|
|
1545
|
+
exhausted_action?: components["schemas"]["DunningConfigurationExhaustedActionType"];
|
|
1546
|
+
enabled?: boolean;
|
|
1547
|
+
/** Format: date-time */
|
|
1548
|
+
created_at?: string;
|
|
1549
|
+
/** Format: date-time */
|
|
1550
|
+
updated_at?: string;
|
|
1551
|
+
};
|
|
1483
1552
|
CreateExternalAccountInput: {
|
|
1484
1553
|
metadata?: components["schemas"]["Metadata"];
|
|
1485
1554
|
external_billing_address_attributes?: components["schemas"]["BillingAddressInput"];
|
|
@@ -2034,10 +2103,21 @@ export interface components {
|
|
|
2034
2103
|
CreateOriginRequest: {
|
|
2035
2104
|
origin: components["schemas"]["CreateOriginInput"];
|
|
2036
2105
|
};
|
|
2106
|
+
/** @enum {string} */
|
|
2107
|
+
OriginApplepayRegistrationStateType: "pending" | "skipped" | "registered" | "failed";
|
|
2037
2108
|
Origin: {
|
|
2038
2109
|
/** Format: uuid */
|
|
2039
2110
|
id?: string;
|
|
2040
2111
|
value?: string;
|
|
2112
|
+
/** @description Apple Pay merchant-domain registration status for this origin host. Null until registration is enabled. */
|
|
2113
|
+
applepay_registration_state?: components["schemas"]["OriginApplepayRegistrationStateType"] | null;
|
|
2114
|
+
/** @description Last Apple Pay registration or unregistration error, if any */
|
|
2115
|
+
applepay_registration_error?: string | null;
|
|
2116
|
+
/**
|
|
2117
|
+
* Format: date-time
|
|
2118
|
+
* @description When this origin host was last registered with Apple Pay
|
|
2119
|
+
*/
|
|
2120
|
+
applepay_registered_at?: string | null;
|
|
2041
2121
|
/** Format: date-time */
|
|
2042
2122
|
created_at?: string;
|
|
2043
2123
|
/** Format: date-time */
|
|
@@ -2090,8 +2170,6 @@ export interface components {
|
|
|
2090
2170
|
/** Format: uuid */
|
|
2091
2171
|
customer_id?: string;
|
|
2092
2172
|
description?: string;
|
|
2093
|
-
/** @description Null after a successful authorization, sale, or capture. */
|
|
2094
|
-
last_payment_error?: components["schemas"]["LastPaymentError"] | null;
|
|
2095
2173
|
metadata?: components["schemas"]["Metadata"];
|
|
2096
2174
|
recurring_payment?: components["schemas"]["RecurringPayment"];
|
|
2097
2175
|
/** Format: uuid */
|
|
@@ -2105,15 +2183,6 @@ export interface components {
|
|
|
2105
2183
|
/** Format: date-time */
|
|
2106
2184
|
updated_at?: string;
|
|
2107
2185
|
};
|
|
2108
|
-
/** @description Canonical post-confirm payment failure. Present after a processor decline, processing exception, or missing vault credential. */
|
|
2109
|
-
LastPaymentError: {
|
|
2110
|
-
/** @enum {string} */
|
|
2111
|
-
type: "card_error" | "processing_error";
|
|
2112
|
-
/** @enum {string} */
|
|
2113
|
-
code: "incorrect_number" | "incorrect_cvc" | "incorrect_postal_code" | "incorrect_pin" | "expired_card" | "insufficient_funds" | "card_declined" | "authentication_failure" | "processing_error" | "vault_token_not_found";
|
|
2114
|
-
/** @description Localized, payer-facing explanation of the failure. */
|
|
2115
|
-
message: string;
|
|
2116
|
-
};
|
|
2117
2186
|
/** @description How this payment intent relates to a recurring series. Use `initial` for the first charge that establishes the series. Use `network_transaction_id` and/or `transaction_link_id` for subsequent merchant-initiated charges. Do not combine `initial` with network identifiers on the same request. */
|
|
2118
2187
|
RecurringPayment: {
|
|
2119
2188
|
/** @description When true, marks the first payment in a recurring series so the processor can treat it as an initial recurring / credential-on-file setup transaction. */
|
|
@@ -2978,6 +3047,119 @@ export interface operations {
|
|
|
2978
3047
|
};
|
|
2979
3048
|
};
|
|
2980
3049
|
};
|
|
3050
|
+
GetDunningConfiguration: {
|
|
3051
|
+
parameters: {
|
|
3052
|
+
query?: never;
|
|
3053
|
+
header?: never;
|
|
3054
|
+
path?: never;
|
|
3055
|
+
cookie?: never;
|
|
3056
|
+
};
|
|
3057
|
+
requestBody?: never;
|
|
3058
|
+
responses: {
|
|
3059
|
+
/** @description The organization's dunning configuration */
|
|
3060
|
+
200: {
|
|
3061
|
+
headers: {
|
|
3062
|
+
[name: string]: unknown;
|
|
3063
|
+
};
|
|
3064
|
+
content: {
|
|
3065
|
+
"application/json": components["schemas"]["DunningConfiguration"];
|
|
3066
|
+
};
|
|
3067
|
+
};
|
|
3068
|
+
/** @description Dunning configuration not found */
|
|
3069
|
+
404: {
|
|
3070
|
+
headers: {
|
|
3071
|
+
[name: string]: unknown;
|
|
3072
|
+
};
|
|
3073
|
+
content: {
|
|
3074
|
+
"application/json": components["schemas"]["Error"];
|
|
3075
|
+
};
|
|
3076
|
+
};
|
|
3077
|
+
};
|
|
3078
|
+
};
|
|
3079
|
+
CreateDunningConfiguration: {
|
|
3080
|
+
parameters: {
|
|
3081
|
+
query?: never;
|
|
3082
|
+
header?: never;
|
|
3083
|
+
path?: never;
|
|
3084
|
+
cookie?: never;
|
|
3085
|
+
};
|
|
3086
|
+
requestBody: {
|
|
3087
|
+
content: {
|
|
3088
|
+
"application/json": components["schemas"]["CreateDunningConfigurationRequest"];
|
|
3089
|
+
};
|
|
3090
|
+
};
|
|
3091
|
+
responses: {
|
|
3092
|
+
/** @description Dunning configuration created successfully */
|
|
3093
|
+
201: {
|
|
3094
|
+
headers: {
|
|
3095
|
+
[name: string]: unknown;
|
|
3096
|
+
};
|
|
3097
|
+
content: {
|
|
3098
|
+
"application/json": components["schemas"]["DunningConfiguration"];
|
|
3099
|
+
};
|
|
3100
|
+
};
|
|
3101
|
+
/** @description Dunning configuration already exists */
|
|
3102
|
+
409: {
|
|
3103
|
+
headers: {
|
|
3104
|
+
[name: string]: unknown;
|
|
3105
|
+
};
|
|
3106
|
+
content: {
|
|
3107
|
+
"application/json": components["schemas"]["Error"];
|
|
3108
|
+
};
|
|
3109
|
+
};
|
|
3110
|
+
/** @description Unprocessable entity */
|
|
3111
|
+
422: {
|
|
3112
|
+
headers: {
|
|
3113
|
+
[name: string]: unknown;
|
|
3114
|
+
};
|
|
3115
|
+
content: {
|
|
3116
|
+
"application/json": components["schemas"]["Error"];
|
|
3117
|
+
};
|
|
3118
|
+
};
|
|
3119
|
+
};
|
|
3120
|
+
};
|
|
3121
|
+
UpdateDunningConfiguration: {
|
|
3122
|
+
parameters: {
|
|
3123
|
+
query?: never;
|
|
3124
|
+
header?: never;
|
|
3125
|
+
path?: never;
|
|
3126
|
+
cookie?: never;
|
|
3127
|
+
};
|
|
3128
|
+
requestBody: {
|
|
3129
|
+
content: {
|
|
3130
|
+
"application/json": components["schemas"]["UpdateDunningConfigurationRequest"];
|
|
3131
|
+
};
|
|
3132
|
+
};
|
|
3133
|
+
responses: {
|
|
3134
|
+
/** @description Dunning configuration updated successfully */
|
|
3135
|
+
200: {
|
|
3136
|
+
headers: {
|
|
3137
|
+
[name: string]: unknown;
|
|
3138
|
+
};
|
|
3139
|
+
content: {
|
|
3140
|
+
"application/json": components["schemas"]["DunningConfiguration"];
|
|
3141
|
+
};
|
|
3142
|
+
};
|
|
3143
|
+
/** @description Dunning configuration not found */
|
|
3144
|
+
404: {
|
|
3145
|
+
headers: {
|
|
3146
|
+
[name: string]: unknown;
|
|
3147
|
+
};
|
|
3148
|
+
content: {
|
|
3149
|
+
"application/json": components["schemas"]["Error"];
|
|
3150
|
+
};
|
|
3151
|
+
};
|
|
3152
|
+
/** @description Unprocessable entity */
|
|
3153
|
+
422: {
|
|
3154
|
+
headers: {
|
|
3155
|
+
[name: string]: unknown;
|
|
3156
|
+
};
|
|
3157
|
+
content: {
|
|
3158
|
+
"application/json": components["schemas"]["Error"];
|
|
3159
|
+
};
|
|
3160
|
+
};
|
|
3161
|
+
};
|
|
3162
|
+
};
|
|
2981
3163
|
ListExternalAccounts: {
|
|
2982
3164
|
parameters: {
|
|
2983
3165
|
query?: {
|
|
@@ -3727,6 +3909,54 @@ export interface operations {
|
|
|
3727
3909
|
};
|
|
3728
3910
|
};
|
|
3729
3911
|
};
|
|
3912
|
+
DeleteOrigin: {
|
|
3913
|
+
parameters: {
|
|
3914
|
+
query?: never;
|
|
3915
|
+
header?: never;
|
|
3916
|
+
path: {
|
|
3917
|
+
/** @description The ID of the origin to delete */
|
|
3918
|
+
id: string;
|
|
3919
|
+
};
|
|
3920
|
+
cookie?: never;
|
|
3921
|
+
};
|
|
3922
|
+
requestBody?: never;
|
|
3923
|
+
responses: {
|
|
3924
|
+
/** @description Origin deleted successfully */
|
|
3925
|
+
204: {
|
|
3926
|
+
headers: {
|
|
3927
|
+
[name: string]: unknown;
|
|
3928
|
+
};
|
|
3929
|
+
content?: never;
|
|
3930
|
+
};
|
|
3931
|
+
/** @description Origin not found */
|
|
3932
|
+
404: {
|
|
3933
|
+
headers: {
|
|
3934
|
+
[name: string]: unknown;
|
|
3935
|
+
};
|
|
3936
|
+
content: {
|
|
3937
|
+
"application/json": components["schemas"]["Error"];
|
|
3938
|
+
};
|
|
3939
|
+
};
|
|
3940
|
+
/** @description Origin is in use by a render template */
|
|
3941
|
+
409: {
|
|
3942
|
+
headers: {
|
|
3943
|
+
[name: string]: unknown;
|
|
3944
|
+
};
|
|
3945
|
+
content: {
|
|
3946
|
+
"application/json": components["schemas"]["Error"];
|
|
3947
|
+
};
|
|
3948
|
+
};
|
|
3949
|
+
/** @description Apple Pay unregister failed; the origin was not deleted */
|
|
3950
|
+
422: {
|
|
3951
|
+
headers: {
|
|
3952
|
+
[name: string]: unknown;
|
|
3953
|
+
};
|
|
3954
|
+
content: {
|
|
3955
|
+
"application/json": components["schemas"]["Error"];
|
|
3956
|
+
};
|
|
3957
|
+
};
|
|
3958
|
+
};
|
|
3959
|
+
};
|
|
3730
3960
|
GetEmbedPaymentIntent: {
|
|
3731
3961
|
parameters: {
|
|
3732
3962
|
query?: never;
|
|
@@ -5480,6 +5710,7 @@ export const bankAccountProfileFailure_reasonValues: ReadonlyArray<FlattenedDeep
|
|
|
5480
5710
|
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"];
|
|
5481
5711
|
export const chargeAllowed_reverse_actionValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["Charge"]["allowed_reverse_action"]> = ["void", "refund"];
|
|
5482
5712
|
export const chargeStateValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["Charge"]["state"]> = ["cancelled", "errored", "failed", "processing", "requires_capture", "requires_confirmation", "requires_review", "settlement_failed", "succeeded"];
|
|
5713
|
+
export const dunningConfigurationExhaustedActionTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["DunningConfigurationExhaustedActionType"]> = ["cancel", "pause", "none"];
|
|
5483
5714
|
export const externalAccountTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["ExternalAccount"]["type"]> = ["external_card", "external_bank_account"];
|
|
5484
5715
|
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"];
|
|
5485
5716
|
export const legalEntityOwnershipTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["LegalEntityOwnershipType"]> = ["public", "private"];
|
|
@@ -5512,9 +5743,8 @@ export const transactionSourceTypeValues: ReadonlyArray<FlattenedDeepRequired<co
|
|
|
5512
5743
|
export const walletProviderTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["WalletProviderType"]> = ["googlepay", "applepay"];
|
|
5513
5744
|
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", "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"];
|
|
5514
5745
|
export const organizationKindValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["Organization"]["kind"]> = ["direct", "payfac"];
|
|
5746
|
+
export const originApplepayRegistrationStateTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["OriginApplepayRegistrationStateType"]> = ["pending", "skipped", "registered", "failed"];
|
|
5515
5747
|
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"];
|
|
5516
|
-
export const lastPaymentErrorTypeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["LastPaymentError"]["type"]> = ["card_error", "processing_error"];
|
|
5517
|
-
export const lastPaymentErrorCodeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["LastPaymentError"]["code"]> = ["incorrect_number", "incorrect_cvc", "incorrect_postal_code", "incorrect_pin", "expired_card", "insufficient_funds", "card_declined", "authentication_failure", "processing_error", "vault_token_not_found"];
|
|
5518
5748
|
export const processorTransactionPayment_transaction_typeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["ProcessorTransaction"]["payment_transaction_type"]> = ["charge", "refund", "void"];
|
|
5519
5749
|
export const processorTransactionTransaction_typeValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["ProcessorTransaction"]["transaction_type"]> = ["authorization", "authorization_reversal", "capture", "credit", "echeck_credit", "echeck_sale", "echeck_void", "sale", "void"];
|
|
5520
5750
|
export const refundAllowed_reverse_actionValues: ReadonlyArray<FlattenedDeepRequired<components>["schemas"]["Refund"]["allowed_reverse_action"]> = ["void"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amos.com/node",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.58",
|
|
4
4
|
"description": "Node.js client for the Amos Pay API.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"openapi-fetch": "0.17.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@biomejs/biome": "2.5.
|
|
53
|
+
"@biomejs/biome": "2.5.11",
|
|
54
54
|
"@changesets/cli": "2.31.1",
|
|
55
|
-
"@types/node": "26.
|
|
55
|
+
"@types/node": "26.4.0",
|
|
56
56
|
"openapi-typescript": "7.13.0",
|
|
57
57
|
"tsup": "8.5.1",
|
|
58
58
|
"typescript": "5.9.3"
|