squarefi-bff-api-module 1.36.103 → 1.36.105

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.
@@ -2896,6 +2896,19 @@ export interface paths {
2896
2896
  "application/json": components["schemas"]["ApiErrorResponse"];
2897
2897
  };
2898
2898
  };
2899
+ /** @description `CARDHOLDER_REFUSED` — no card can be issued on this cardholder; anything charged was returned. Either the card
2900
+ * issuer refused the person, or the cardholder does not qualify: no email, not submitted, short of the program's
2901
+ * KYC requirements, or their identity review came back rejected; `message` says which. A review still in
2902
+ * progress is not a refusal: it answers `400 INVALID_REQUEST`.
2903
+ * */
2904
+ 422: {
2905
+ headers: {
2906
+ [name: string]: unknown;
2907
+ };
2908
+ content: {
2909
+ "application/json": components["schemas"]["ApiErrorResponse"];
2910
+ };
2911
+ };
2899
2912
  /** @description Internal Server Error */
2900
2913
  500: {
2901
2914
  headers: {
@@ -3500,7 +3500,11 @@ export interface paths {
3500
3500
  "application/json": components["schemas"]["ErrorResponse"];
3501
3501
  };
3502
3502
  };
3503
- /** @description `CARDHOLDER_REFUSED` — the card issuer refused the cardholder; anything charged was returned */
3503
+ /** @description `CARDHOLDER_REFUSED` — no card can be issued on this cardholder; anything charged was returned. Either the card
3504
+ * issuer refused the person, or the cardholder does not qualify: no email, not submitted, short of the program's
3505
+ * KYC requirements, or their identity review came back rejected; `message` says which. A review still in
3506
+ * progress is not a refusal: it answers `400 INVALID_REQUEST`.
3507
+ * */
3504
3508
  422: {
3505
3509
  headers: {
3506
3510
  [name: string]: unknown;
@@ -17276,7 +17280,7 @@ export interface paths {
17276
17280
  put?: never;
17277
17281
  /**
17278
17282
  * Email the owners their identity check links again
17279
- * @description A business entity whose base form was sent (step 8/8 of the KYC forms). Asks the identity provider to email the owners the link to their identity check once more. The provider writes every person linked to the company who has an email with it and has not passed the check — one addressee at a time is not offered: the owners whose item has `invite_by_email: true` and an email, and the person filling the form (their applicant carries the email of their account; they can still pass the check from the app through `POST …/verification/session`). An owner who has passed, or whose check is with the provider, is not written; a company among the owners (`type: company`) never is. The first mailing goes on its own right after the form is sent — this route repeats it, at most once in 10 minutes per business, the first mailing counted: `GET …/overview` shows `verification.invites.sent_at` and `next_at`, and `verification.owners[].invited_at` per owner. Nobody left to email (`400 KYC_NO_OWNER_TO_INVITE`): hand the link over through `…/owners/{owner_id}/link` or `/session`. Takes no body. Access: the owner of the business entity, or an owner / admin of a wallet it is linked to. One mailing per entity at a time, and none while the set-up after the sent form is running (`409 OPERATION_IN_PROGRESS`).
17283
+ * @description A business entity whose base form was sent (step 8/8 of the KYC forms). Asks the identity provider to email the owners the link to their identity check once more. The provider writes every person linked to the company who has an email with it and has not passed the check — one addressee at a time is not offered: the owners whose item has `invite_by_email: true` (their email is required by the form, an owner saved before that may still have none), and the person filling the form (their applicant carries the email of their account; they can still pass the check from the app through `POST …/verification/session`). An owner who has passed, or whose check is with the provider, is not written; a company among the owners (`type: company`) never is. The first mailing goes on its own right after the form is sent — this route repeats it, at most once in 10 minutes per business, the first mailing counted: `GET …/overview` shows `verification.invites.sent_at` and `next_at`, and `verification.owners[].invited_at` per owner. Nobody left to email (`400 KYC_NO_OWNER_TO_INVITE`): hand the link over through `…/owners/{owner_id}/link` or `/session`. Takes no body. Access: the owner of the business entity, or an owner / admin of a wallet it is linked to. One mailing per entity at a time, and none while the set-up after the sent form is running (`409 OPERATION_IN_PROGRESS`).
17280
17284
  */
17281
17285
  post: {
17282
17286
  parameters: {
@@ -17324,7 +17328,7 @@ export interface paths {
17324
17328
  };
17325
17329
  };
17326
17330
  };
17327
- /** @description `KYC_NO_OWNER_TO_INVITE` — nobody is left to email: every owner with an email at the identity provider has passed the check, or none has an email there (hand the link over: `…/owners/{owner_id}/link` or `/session`); `VALIDATION_ERROR` — `entity_id` is not a uuid; `KYC_FORMS_NOT_ENABLED`; `VERIFICATION_PROVIDER_UNAVAILABLE` — the identity provider refused or did not answer, try later; `VERIFICATION_PROVIDER_NOT_CONFIGURED`. */
17331
+ /** @description `KYC_NO_OWNER_TO_INVITE` — nobody is left to email: every owner with an email at the identity provider has passed the check, or none has an email there — an owner whose item has no `invite_by_email: true` has none at the provider, whatever email the form holds (hand the link over: `…/owners/{owner_id}/link` or `/session`); `VALIDATION_ERROR` — `entity_id` is not a uuid; `KYC_FORMS_NOT_ENABLED`; `VERIFICATION_PROVIDER_UNAVAILABLE` — the identity provider refused or did not answer, try later; `VERIFICATION_PROVIDER_NOT_CONFIGURED`. */
17328
17332
  400: {
17329
17333
  headers: {
17330
17334
  [name: string]: unknown;
@@ -17365,7 +17369,7 @@ export interface paths {
17365
17369
  put?: never;
17366
17370
  /**
17367
17371
  * The identity check link of a beneficial owner, to hand over yourself
17368
- * @description A business entity whose base form was sent (step 8/8 of the KYC forms). CORE makes sure the owner has an applicant with the identity provider — created from what the form declared about them, so the provider compares it with the document — and answers a link to the provider's own check page for it, for the filler to pass on by their own channel. After the form is sent the identity provider itself emails the link to the owners whose item has `invite_by_email: true` and an email (and to the filler), and `POST …/verification/owners/invite` has it email them again, at most once in 10 minutes; this route is for an owner without an email, or to pass the link on by your own channel. Valid 7 days; every call makes a new link for the same applicant, the previous one keeps working until it expires. The outcome arrives through the provider's webhook: `GET …/overview` shows it under `verification.owners[]`. Takes no body. Access: the owner of the business entity, or an owner / admin of a wallet it is linked to.
17372
+ * @description A business entity whose base form was sent (step 8/8 of the KYC forms). CORE makes sure the owner has an applicant with the identity provider — created from what the form declared about them, so the provider compares it with the document — and answers a link to the provider's own check page for it, for the filler to pass on by their own channel. After the form is sent the identity provider itself emails the link to the owners whose item has `invite_by_email: true` (and to the filler), and `POST …/verification/owners/invite` has it email them again, at most once in 10 minutes; this route is for an owner whose item has no `invite_by_email: true`, or to pass the link on by your own channel. Valid 7 days; every call makes a new link for the same applicant, the previous one keeps working until it expires. The outcome arrives through the provider's webhook: `GET …/overview` shows it under `verification.owners[]`. Takes no body. Access: the owner of the business entity, or an owner / admin of a wallet it is linked to.
17369
17373
  */
17370
17374
  post: {
17371
17375
  parameters: {
@@ -17510,7 +17514,7 @@ export interface paths {
17510
17514
  put?: never;
17511
17515
  /**
17512
17516
  * Upload a beneficial owner's identity document for them
17513
- * @description Multipart: `file` (JPEG or PNG up to 20 MB, told by the bytes — the provider takes photos only, a PDF is refused), `side` (`front` or `back`; a passport has only a front side, so `back` needs a `type` other than `passport`), optional `type` (`passport` by default) and `country` (alpha-2 from the country directory — `DE`, not `DEU` or `Germany`; the owner's citizenship by default). The file is filed as the owner's `gov_id_front` / `gov_id_back` document (`source: client`, not verified) and handed to the identity provider as the owner's document; the owner still passes the face check by the link or the widget. The owner's applicant is created when missing. A file of another format is refused with `DOCUMENT_REJECTED`. Access: the owner of the business entity, or an owner / admin of a wallet it is linked to.
17517
+ * @description Multipart: `file` (JPEG or PNG up to 20 MB, told by the bytes — the provider takes photos only, a PDF is refused), `side` (`front` or `back`; a passport has only a front side, so `back` needs a `type` other than `passport`), optional `type` (`passport` by default) and `country` (alpha-2 from the country directory — `DE`, not `DEU` or `Germany`; the owner's citizenship by default). The file is filed as the owner's `gov_id_front` / `gov_id_back` document (`source: client`, not verified) and handed to the identity provider as the owner's document; the owner still passes the face check by the link or the widget. The owner's applicant is created when missing. A file of another format is refused with `DOCUMENT_REJECTED`. An owner without a citizenship needs `country`: without it the upload answers `400 VALIDATION_ERROR` with `details.fields.country`, and nothing reaches the provider. Access: the owner of the business entity, or an owner / admin of a wallet it is linked to.
17514
17518
  */
17515
17519
  post: {
17516
17520
  parameters: {
@@ -17544,7 +17548,7 @@ export interface paths {
17544
17548
  */
17545
17549
  type?: "PASSPORT" | "ID_CARD" | "RESIDENCE_PERMIT" | "DRIVERS" | "passport" | "id_card" | "residence_permit" | "driving_license";
17546
17550
  /**
17547
- * @description Alpha-2 of the issuing country, a code the country directory knows; the owner's citizenship when omitted.
17551
+ * @description Alpha-2 of the issuing country, a code the country directory knows; the owner's citizenship when omitted. Required when the owner has no citizenship.
17548
17552
  * @example DE
17549
17553
  */
17550
17554
  country?: string;
@@ -17573,7 +17577,7 @@ export interface paths {
17573
17577
  };
17574
17578
  };
17575
17579
  };
17576
- /** @description The errors of `KycFormsOwnerErrors`; `VALIDATION_ERROR` — a `side` or `type` outside the list, `side: back` of a passport (the default type), or a `country` that is not a known alpha-2 code; `DOCUMENT_REJECTED` — a file that is not JPEG or PNG (a PDF included), empty, or over 20 MB; `INVALID_REQUEST` — no `file` part (or more than one), or an unreadable multipart body. */
17580
+ /** @description The errors of `KycFormsOwnerErrors`; `VALIDATION_ERROR` — a `side` or `type` outside the list, `side: back` of a passport (the default type), a `country` that is not a known alpha-2 code, or no `country` for an owner without a citizenship (`details.fields.country`); `DOCUMENT_REJECTED` — a file that is not JPEG or PNG (a PDF included), empty, or over 20 MB; `INVALID_REQUEST` — no `file` part (or more than one), or an unreadable multipart body. */
17577
17581
  400: {
17578
17582
  headers: {
17579
17583
  [name: string]: unknown;
@@ -20920,7 +20924,7 @@ export interface components {
20920
20924
  saved: boolean;
20921
20925
  };
20922
20926
  /**
20923
- * @description One item of a `list` field (`beneficial_owners`): an object keyed by the `item.fields[].key` of the field, each value shaped by that item field's `type` (an item field never takes files). `id` is set on a row already saved in the KYC entity (for an owner, the `owner_id` of the owner routes); send it back to keep the row, leave it out for a new one. A saved row is the entity's: the client never removes it — a list (or a draft's list, an empty or `null` one included) without an `id` the form gave is refused with `VALIDATION_ERROR` on the list key, «A saved beneficial owner cannot be removed; contact support»; compliance removes one. Nor does its `owner_type` change, nor is a saved value of it cleared (sent empty: `VALIDATION_ERROR` on the item field, «A saved value cannot be cleared; correct it or contact support»; left out of the item: kept). On a `returned` form the client corrects the other values of the item fields the form asks; outside a return a changed saved value is refused (`VALIDATION_ERROR`, «A saved value cannot be changed; contact support»). Messages come in the language of the form. Do not offer to delete an item with an `id`, nor to change its type. An item with `owner_type: business` requires `corporate_name`, `corporate_country` and `corporate_registration_number` (the form marks them `required` on the item fields): without them the identity provider cannot set the company up, so the submission is refused with `VALIDATION_ERROR` on the item field.
20927
+ * @description One item of a `list` field (`beneficial_owners`): an object keyed by the `item.fields[].key` of the field, each value shaped by that item field's `type` (an item field never takes files). `id` is set on a row already saved in the KYC entity (for an owner, the `owner_id` of the owner routes); send it back to keep the row, leave it out for a new one. A saved row is the entity's: the client never removes it — a list (or a draft's list, an empty or `null` one included) without an `id` the form gave is refused with `VALIDATION_ERROR` on the list key, «A saved beneficial owner cannot be removed; contact support»; compliance removes one. Nor does its `owner_type` change, nor is a saved value of it cleared (sent empty: `VALIDATION_ERROR` on the item field, «A saved value cannot be cleared; correct it or contact support»; left out of the item: kept). On a `returned` form the client corrects the other values of the item fields the form asks; outside a return a changed saved value is refused (`VALIDATION_ERROR`, «A saved value cannot be changed; contact support»). Messages come in the language of the form. Do not offer to delete an item with an `id`, nor to change its type. An item with `owner_type: business` requires `corporate_name`, `corporate_country` and `corporate_registration_number` (the form marks them `required` on the item fields): without them the identity provider cannot set the company up, so the submission is refused with `VALIDATION_ERROR` on the item field. An item with `owner_type: individual` other than the filler's own requires `email` (the form marks it `required` on the item fields, whatever `invite_by_email` and the tenant's profiles say): a submission without it, a saved owner of a returned form included, is refused with `VALIDATION_ERROR` on `beneficial_owners[i].email` (required); the draft takes it empty. The filler's own item (`is_applicant: true`) has no `email` field — the email of their account is used. The email is kept either way; `invite_by_email: true` is what has the identity provider email the owner their link to it.
20924
20928
  * @example {
20925
20929
  * "id": "2d7c1b9e-4f30-4a8c-9e21-7b6a5c4d3e2f",
20926
20930
  * "owner_type": "individual",
@@ -21245,9 +21249,22 @@ export interface components {
21245
21249
  state: components["schemas"]["KycFormsVerificationState"];
21246
21250
  /**
21247
21251
  * Format: date-time
21248
- * @description When the identity provider last emailed this owner their link — after the form was sent and on each `POST …/verification/owners/invite`, to the persons whose item has `invite_by_email: true` and an email; the filler's row too (through the email of their account); null = never (the owner gets the link by hand: `…/owners/{owner_id}/link` or `/session`); always null for a company.
21252
+ * @description When the identity provider last emailed this owner their link — after the form was sent and on each `POST …/verification/owners/invite`, to the persons whose item has `invite_by_email: true` (the email is required by the form); the filler's row too (through the email of their account); null = never (the owner gets the link by hand: `…/owners/{owner_id}/link` or `/session`); always null for a company.
21249
21253
  */
21250
21254
  invited_at: string | null;
21255
+ /** @description The files of the owner's identity document on record: uploaded through `…/owners/{owner_id}/document`, or read from the provider after the owner passed. One item per side however many times it was uploaded. It says a file is there, not that the provider accepted it: `state` tells that, and the item stays after a refusal. Neither the file nor the kind of document (a passport or an ID card) is given. Empty for a company and for the filler's own row. */
21256
+ documents: {
21257
+ /**
21258
+ * @description The side, as `type` in the answer of the upload.
21259
+ * @enum {string}
21260
+ */
21261
+ key: "gov_id_front" | "gov_id_back";
21262
+ /**
21263
+ * @description The name of the field, in the language of the request.
21264
+ * @example Identity document photo
21265
+ */
21266
+ label: string;
21267
+ }[];
21251
21268
  }[];
21252
21269
  /** @description The mailing of the owners' links of a business with a base form; null for a personal entity. */
21253
21270
  invites: {
@@ -21532,7 +21549,7 @@ export interface components {
21532
21549
  "application/json": components["schemas"]["ErrorResponse"];
21533
21550
  };
21534
21551
  };
21535
- /** @description `VALIDATION_ERROR` — field errors in `details.fields[key] = [message]` (on a business form the owner list the KYC tables refuse, and owner shares adding up to more than 100%, come back under `beneficial_owners`; a saved beneficial owner (an item with an `id`) left out of the list — an empty or `null` list included — comes back under `beneficial_owners`, a saved value of it changed outside a `returned` form, or sent empty, under `beneficial_owners[i].<field>`, and nothing is saved; a value sent for a field whose condition reads a source left empty or wrong comes back as the error of the source, e.g. `beneficial_owners[0].role`; a `multi_enum` field with an option that excludes the others (`options[].exclusive`) chosen together with another one comes back under the field, on the draft too), or a message only for a malformed body (`schema_version` missing or longer than 64, `values` not an object) and a path id that is not a uuid; `FORM_FIELD_NOT_ALLOWED` — a key the form does not accept (unknown, locked, hidden, a file field), `details.fields = [key]`, the whole request refused; `FORM_TARGET_UNSUPPORTED` — a card program named on a business entity; `INVALID_REQUEST` — `wallet_id` missing for a form over card programs; `KYC_BASE_BINDING_MISSING` — the tenant has no base form for this client type; `KYC_FORMS_NOT_ENABLED` — the tenant is not on the forms flow */
21552
+ /** @description `VALIDATION_ERROR` — field errors in `details.fields[key] = [message]` (on a business form the owner list the KYC tables refuse, and owner shares adding up to more than 100%, come back under `beneficial_owners`; an individual beneficial owner other than the filler without an `email` comes back under `beneficial_owners[i].email` on a submission (the draft takes it empty); a saved beneficial owner (an item with an `id`) left out of the list — an empty or `null` list included — comes back under `beneficial_owners`, a saved value of it changed outside a `returned` form, or sent empty, under `beneficial_owners[i].<field>`, and nothing is saved; a value sent for a field whose condition reads a source left empty or wrong comes back as the error of the source, e.g. `beneficial_owners[0].role`; a `multi_enum` field with an option that excludes the others (`options[].exclusive`) chosen together with another one comes back under the field, on the draft too), or a message only for a malformed body (`schema_version` missing or longer than 64, `values` not an object) and a path id that is not a uuid; `FORM_FIELD_NOT_ALLOWED` — a key the form does not accept (unknown, locked, hidden, a file field), `details.fields = [key]`, the whole request refused; `FORM_TARGET_UNSUPPORTED` — a card program named on a business entity; `INVALID_REQUEST` — `wallet_id` missing for a form over card programs; `KYC_BASE_BINDING_MISSING` — the tenant has no base form for this client type; `KYC_FORMS_NOT_ENABLED` — the tenant is not on the forms flow */
21536
21553
  KycFormsFieldErrors: {
21537
21554
  headers: {
21538
21555
  [name: string]: unknown;
@@ -1381,8 +1381,10 @@ export declare namespace API {
1381
1381
  /**
1382
1382
  * An ACTIVE cardholder is linked (`cardholder_id`), but it does not hold what the
1383
1383
  * program's ISSUANCE bar asks for — typically one written before that bar existed.
1384
- * Creating a card now is refused with `400`; `will_require` names the same fields
1385
- * that 400 would. Nothing is submitted again: `PATCH` the fields, and for the
1384
+ * Creating a card now is refused with `422 CARDHOLDER_REFUSED`, whose `message` lists
1385
+ * the same missing fields as `will_require`. The refusal holds for the cardholder as
1386
+ * it is: once completed, the same cardholder can get the card. Nothing is submitted
1387
+ * again: `PATCH` the fields, and for the
1386
1388
  * document photos call `POST /cardholders` with the member's `user_data_id` — it
1387
1389
  * answers `409` with this `cardholder_id` after completing the row from the
1388
1390
  * member's KYC dossier. When the member has not passed that verification, run it first.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarefi-bff-api-module",
3
- "version": "1.36.103",
3
+ "version": "1.36.105",
4
4
  "description": "Squarefi BFF API client module",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",