From 93c8ee802568538fbc8223a13059d2df0fd40bbb Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 29 Aug 2024 21:56:15 +0000 Subject: [PATCH] Release 6.0.0-alpha.2 --- .fernignore | 1 + .github/ISSUE_TEMPLATE/bug_report.md | 26 - .github/ISSUE_TEMPLATE/feature_request.md | 20 - .github/dependabot.yml | 28 - .github/workflows/ci.yml | 57 + .github/workflows/ci_checks.yml | 38 - .github/workflows/codeql-analysis.yml | 42 - .github/workflows/dependabot.yml | 29 - .github/workflows/publish_release.yml | 49 - .gitignore | 5 +- .husky/pre-commit | 4 - .mock/definition/access-tokens.yml | 62 + .mock/definition/api.yml | 15 + .../electronic-delivery-consents.yml | 71 + .mock/definition/form-1099-int.yml | 740 ++ .mock/definition/form-1099-k.yml | 810 ++ .mock/definition/form-1099-misc.yml | 718 ++ .mock/definition/form-1099-nec.yml | 564 ++ .mock/definition/form-w-8ben-e.yml | 304 + .mock/definition/form-w-8ben.yml | 291 + .mock/definition/form-w-9.yml | 268 + .mock/definition/mailings.yml | 214 + .mock/definition/tax-treaties.yml | 59 + .mock/definition/tin-verifications.yml | 131 + .mock/definition/types/address.yml | 59 + .mock/definition/types/common.yml | 72 + .../definition/types/electronic-signature.yml | 18 + .mock/definition/types/errors.yml | 62 + .mock/definition/types/form-1099s.yml | 172 + .mock/definition/types/headers.yml | 4 + .mock/definition/types/payee.yml | 41 + .mock/definition/types/payer.yml | 38 + .mock/definition/types/tax-treaties.yml | 74 + .mock/definition/users.yml | 151 + .mock/definition/webhooks.yml | 534 ++ .mock/fern.config.json | 4 + .npmignore | 9 + .prettierrc.yml | 2 + LICENSE | 21 - README.md | 836 +- build.sh | 26 - create-package-json.cjs | 11 - fix-esm-imports.mjs | 52 - jest.config.js | 5 + package-lock.json | 8298 ----------------- package.json | 89 +- prettier.config.js | 7 - reference.md | 4184 +++++++++ smoke_test_npm_release.sh | 32 - src/Client.ts | 118 + src/abound.ts | 87 - src/api/index.ts | 1 + .../resources/accessTokens/client/Client.ts | 121 + .../resources/accessTokens/client/index.ts | 1 + .../requests/AccessTokenRequestSchema.ts | 19 + .../accessTokens/client/requests/index.ts | 1 + src/api/resources/accessTokens/index.ts | 2 + .../accessTokens/types/AccessTokenSchema.ts | 20 + src/api/resources/accessTokens/types/index.ts | 1 + .../client/Client.ts | 139 + .../client/index.ts | 1 + .../requests/EDeliveryConsentListRequest.ts | 20 + .../client/requests/index.ts | 1 + .../electronicDeliveryConsents/index.ts | 2 + .../types/EDeliveryConsentSchema.ts | 18 + .../types/EDeliveryConsentStatusEnum.ts | 10 + .../electronicDeliveryConsents/types/index.ts | 2 + .../resources/form1099Int/client/Client.ts | 840 ++ src/api/resources/form1099Int/client/index.ts | 1 + .../requests/Form1099IntCorrectRequest.ts | 48 + .../client/requests/Form1099IntFileRequest.ts | 13 + .../client/requests/Form1099IntListRequest.ts | 18 + .../requests/Form1099IntMailingRequest.ts | 35 + .../client/requests/Form1099IntRequest.ts | 61 + .../client/requests/Form1099IntVoidRequest.ts | 13 + .../form1099Int/client/requests/index.ts | 6 + src/api/resources/form1099Int/index.ts | 2 + .../types/Form1099IntCorrectRequestSchema.ts | 45 + .../Form1099IntFormFieldsRequestSchema.ts | 45 + .../types/Form1099IntFormFieldsSchema.ts | 9 + .../types/Form1099IntRequestSchema.ts | 58 + .../form1099Int/types/Form1099IntSchema.ts | 264 + src/api/resources/form1099Int/types/index.ts | 5 + src/api/resources/form1099K/client/Client.ts | 856 ++ src/api/resources/form1099K/client/index.ts | 1 + .../requests/Form1099KCorrectRequest.ts | 56 + .../client/requests/Form1099KFileRequest.ts | 13 + .../client/requests/Form1099KListRequest.ts | 18 + .../requests/Form1099KMailingRequest.ts | 35 + .../client/requests/Form1099KRequest.ts | 69 + .../client/requests/Form1099KVoidRequest.ts | 13 + .../form1099K/client/requests/index.ts | 6 + src/api/resources/form1099K/index.ts | 2 + .../types/Form1099KCorrectRequestSchema.ts | 53 + .../types/Form1099KFormFieldsRequestSchema.ts | 31 + .../types/Form1099KFormFieldsSchema.ts | 9 + .../Form1099KGrossAmountsByMonthSchema.ts | 33 + .../types/Form1099KPayerClassificationEnum.ts | 13 + .../form1099K/types/Form1099KRequestSchema.ts | 66 + .../form1099K/types/Form1099KSchema.ts | 296 + ...ransactionsReportedClassificationSchema.ts | 13 + src/api/resources/form1099K/types/index.ts | 8 + .../resources/form1099Misc/client/Client.ts | 842 ++ .../resources/form1099Misc/client/index.ts | 1 + .../requests/Form1099MiscCorrectRequest.ts | 49 + .../requests/Form1099MiscFileRequest.ts | 13 + .../requests/Form1099MiscListRequest.ts | 18 + .../requests/Form1099MiscMailingRequest.ts | 35 + .../client/requests/Form1099MiscRequest.ts | 62 + .../requests/Form1099MiscVoidRequest.ts | 13 + .../form1099Misc/client/requests/index.ts | 6 + src/api/resources/form1099Misc/index.ts | 2 + .../types/Form1099MiscCorrectRequestSchema.ts | 46 + .../Form1099MiscFormFieldsRequestSchema.ts | 45 + .../types/Form1099MiscFormFieldsSchema.ts | 9 + .../types/Form1099MiscRequestSchema.ts | 59 + .../form1099Misc/types/Form1099MiscSchema.ts | 268 + src/api/resources/form1099Misc/types/index.ts | 5 + .../resources/form1099Nec/client/Client.ts | 816 ++ src/api/resources/form1099Nec/client/index.ts | 1 + .../requests/Form1099NecCorrectRequest.ts | 35 + .../client/requests/Form1099NecFileRequest.ts | 13 + .../client/requests/Form1099NecListRequest.ts | 18 + .../requests/Form1099NecMailingRequest.ts | 35 + .../client/requests/Form1099NecRequest.ts | 50 + .../client/requests/Form1099NecVoidRequest.ts | 13 + .../form1099Nec/client/requests/index.ts | 6 + src/api/resources/form1099Nec/index.ts | 2 + .../types/Form1099NecCorrectRequestSchema.ts | 32 + .../Form1099NecFormFieldsRequestSchema.ts | 21 + .../types/Form1099NecFormFieldsSchema.ts | 9 + .../types/Form1099NecRequestSchema.ts | 47 + .../form1099Nec/types/Form1099NecSchema.ts | 220 + src/api/resources/form1099Nec/types/index.ts | 5 + src/api/resources/formW8Ben/client/Client.ts | 336 + src/api/resources/formW8Ben/client/index.ts | 1 + .../client/requests/FormW8BenListRequest.ts | 16 + .../formW8Ben/client/requests/index.ts | 1 + src/api/resources/formW8Ben/index.ts | 2 + .../W8BenBeneficialOwnerRequestSchema.ts | 25 + .../types/W8BenBeneficialOwnerSchema.ts | 13 + .../types/W8BenFormFieldsRequestSchema.ts | 18 + .../formW8Ben/types/W8BenFormFieldsSchema.ts | 20 + .../formW8Ben/types/W8BenRequestSchema.ts | 51 + .../resources/formW8Ben/types/W8BenSchema.ts | 76 + src/api/resources/formW8Ben/types/index.ts | 6 + src/api/resources/formW8BenE/client/Client.ts | 336 + src/api/resources/formW8BenE/client/index.ts | 1 + .../client/requests/FormW8BenEListRequest.ts | 16 + .../formW8BenE/client/requests/index.ts | 1 + src/api/resources/formW8BenE/index.ts | 2 + .../W8BenEBeneficialOwnerRequestSchema.ts | 23 + .../types/W8BenEBeneficialOwnerSchema.ts | 13 + .../types/W8BenEFormFieldsRequestSchema.ts | 19 + .../types/W8BenEFormFieldsSchema.ts | 19 + .../formW8BenE/types/W8BenERequestSchema.ts | 51 + .../formW8BenE/types/W8BenESchema.ts | 75 + .../types/W8BenETaxClassificationEnum.ts | 37 + src/api/resources/formW8BenE/types/index.ts | 7 + src/api/resources/formW9/client/Client.ts | 326 + src/api/resources/formW9/client/index.ts | 1 + .../client/requests/FormW9ListRequest.ts | 16 + .../client/requests/FormW9RequestSchema.ts | 38 + .../resources/formW9/client/requests/index.ts | 2 + src/api/resources/formW9/index.ts | 2 + .../formW9/types/W9ExemptFatcaCodeSchema.ts | 39 + .../formW9/types/W9ExemptPayeeCodeSchema.ts | 24 + .../formW9/types/W9FormFieldsSchema.ts | 26 + .../resources/formW9/types/W9RequestSchema.ts | 38 + src/api/resources/formW9/types/W9Schema.ts | 51 + .../formW9/types/W9TaxClassificationSchema.ts | 33 + src/api/resources/formW9/types/index.ts | 6 + src/api/resources/index.ts | 42 + src/api/resources/mailings/client/Client.ts | 403 + src/api/resources/mailings/client/index.ts | 1 + .../client/requests/MailingRequest.ts | 35 + .../client/requests/MailingsListRequest.ts | 18 + .../mailings/client/requests/index.ts | 2 + src/api/resources/mailings/index.ts | 2 + .../mailings/types/MailingNameSchema.ts | 10 + .../types/MailingRequestFromSchema.ts | 10 + .../mailings/types/MailingRequestSchema.ts | 33 + .../mailings/types/MailingRequestToSchema.ts | 10 + .../resources/mailings/types/MailingSchema.ts | 47 + .../mailings/types/MailingStatusEnum.ts | 18 + src/api/resources/mailings/types/index.ts | 6 + .../resources/taxTreaties/client/Client.ts | 123 + src/api/resources/taxTreaties/client/index.ts | 1 + .../client/requests/TaxTreatiesListRequest.ts | 13 + .../taxTreaties/client/requests/index.ts | 1 + src/api/resources/taxTreaties/index.ts | 2 + .../taxTreaties/types/TaxTreatySchema.ts | 25 + src/api/resources/taxTreaties/types/index.ts | 1 + .../tinVerifications/client/Client.ts | 307 + .../tinVerifications/client/index.ts | 1 + .../client/requests/TinVerificationRequest.ts | 19 + .../requests/TinVerificationsListRequest.ts | 16 + .../tinVerifications/client/requests/index.ts | 2 + src/api/resources/tinVerifications/index.ts | 2 + .../types/TinVerificationRequestSchema.ts | 20 + .../types/TinVerificationSchema.ts | 28 + .../resources/tinVerifications/types/index.ts | 2 + src/api/resources/types/index.ts | 1 + .../types/resources/address/index.ts | 1 + .../resources/address/types/AddressSchema.ts | 18 + .../address/types/ForeignAddressSchema.ts | 18 + .../types/resources/address/types/index.ts | 2 + .../resources/types/resources/common/index.ts | 1 + .../resources/common/types/DocumentId.ts | 8 + .../types/resources/common/types/Email.ts | 8 + .../resources/common/types/FilingYear.ts | 8 + .../types/resources/common/types/ForeignId.ts | 8 + .../common/types/ForeignTinFingerprint.ts | 8 + .../types/resources/common/types/MailingId.ts | 8 + .../types/resources/common/types/OkSchema.ts | 5 + .../types/resources/common/types/Page.ts | 8 + .../types/PayeeForeignTinFingerprint.ts | 8 + .../common/types/PayeeTinFingerprint.ts | 8 + .../common/types/PayerTinFingerprint.ts | 8 + .../common/types/TaxTreatyCountry.ts | 8 + .../resources/common/types/TinFingerprint.ts | 8 + .../common/types/TinFingerprintQueryParam.ts | 8 + .../resources/common/types/TinTypeEnum.ts | 13 + .../common/types/TinVerificationId.ts | 8 + .../common/types/TinVerificationStatusEnum.ts | 14 + .../types/TinVerificationStatusQueryParam.ts | 8 + .../types/resources/common/types/UserId.ts | 8 + .../types/resources/common/types/index.ts | 19 + .../resources/electronicSignature/index.ts | 1 + .../types/ElectronicSignatureOfPayeeSchema.ts | 17 + .../electronicSignature/types/index.ts | 1 + .../errors/errors/BadRequestErrorSchema.ts | 17 + .../errors/errors/ConflictErrorSchema.ts | 17 + .../errors/InternalServerErrorSchema.ts | 17 + .../errors/errors/NotFoundErrorSchema.ts | 17 + .../errors/errors/UnauthorizedErrorSchema.ts | 17 + .../types/resources/errors/errors/index.ts | 5 + .../resources/types/resources/errors/index.ts | 2 + .../errors/types/DefaultErrorSchema.ts | 8 + .../errors/types/ErrorBadRequestSchema.ts | 10 + .../types/ErrorBadRequestSchemaErrorsItem.ts | 10 + .../types/resources/errors/types/index.ts | 3 + .../types/resources/form1099S/index.ts | 1 + .../form1099S/types/Form1099AccountNumber.ts | 8 + .../types/Form1099BaseCorrectRequestSchema.ts | 10 + .../types/Form1099BaseRequestSchema.ts | 12 + .../form1099S/types/Form1099BaseSchema.ts | 29 + .../types/Form1099FilingStateEnum.ts | 131 + .../types/Form1099FormFieldsBaseSchema.ts | 10 + .../types/Form1099StateTaxInfoSchema.ts | 15 + ...rm1099StateTaxInfoWithStateIncomeSchema.ts | 10 + .../form1099S/types/Form1099StatusEnum.ts | 12 + .../types/resources/form1099S/types/index.ts | 9 + .../types/resources/headers/index.ts | 1 + .../resources/headers/types/IdempotencyKey.ts | 8 + .../types/resources/headers/types/index.ts | 1 + src/api/resources/types/resources/index.ts | 19 + .../resources/types/resources/payee/index.ts | 1 + .../payee/types/PayeeRequestSchema.ts | 17 + .../resources/payee/types/PayeeSchema.ts | 15 + .../PayeeWithOptionalTinTypeRequestSchema.ts | 12 + .../types/resources/payee/types/index.ts | 3 + .../resources/types/resources/payer/index.ts | 1 + .../payer/types/PayerRequestSchema.ts | 19 + .../resources/payer/types/PayerSchema.ts | 15 + .../types/resources/payer/types/index.ts | 2 + .../types/resources/taxTreaties/index.ts | 1 + .../types/TaxTreatyAboundCodeEnum.ts | 55 + .../types/TaxTreatyBenefitsSchema.ts | 23 + .../types/TaxTreatyIncomeCodeEnum.ts | 12 + .../resources/taxTreaties/types/index.ts | 3 + src/api/resources/users/client/Client.ts | 390 + src/api/resources/users/client/index.ts | 1 + .../client/requests/UsersCreateRequest.ts | 18 + .../users/client/requests/UsersListRequest.ts | 18 + .../resources/users/client/requests/index.ts | 2 + src/api/resources/users/index.ts | 2 + .../users/types/UserRequestSchema.ts | 18 + src/api/resources/users/types/UserSchema.ts | 20 + src/api/resources/users/types/index.ts | 2 + src/api/resources/webhooks/index.ts | 1 + .../webhooks/types/AboundSignatureHeader.ts | 8 + .../types/WebhookPayloadBaseSchema.ts | 16 + src/api/resources/webhooks/types/index.ts | 2 + src/core/auth/BasicAuth.ts | 31 + src/core/auth/BearerToken.ts | 15 + src/core/auth/index.ts | 2 + src/core/fetcher/APIResponse.ts | 12 + src/core/fetcher/Fetcher.ts | 143 + src/core/fetcher/Supplier.ts | 11 + src/core/fetcher/createRequestUrl.ts | 10 + src/core/fetcher/getFetchFn.ts | 25 + src/core/fetcher/getHeader.ts | 8 + src/core/fetcher/getRequestBody.ts | 14 + src/core/fetcher/getResponseBody.ts | 32 + src/core/fetcher/index.ts | 5 + src/core/fetcher/makeRequest.ts | 44 + src/core/fetcher/requestWithRetries.ts | 21 + src/core/fetcher/signals.ts | 38 + .../Node18UniversalStreamWrapper.ts | 252 + .../stream-wrappers/NodePre18StreamWrapper.ts | 106 + .../stream-wrappers/UndiciStreamWrapper.ts | 239 + .../stream-wrappers/chooseStreamWrapper.ts | 33 + src/core/index.ts | 3 + src/core/runtime/index.ts | 1 + src/core/runtime/runtime.ts | 126 + src/environments.ts | 10 + src/errors/AboundError.ts | 45 + src/errors/AboundTimeoutError.ts | 10 + src/errors/index.ts | 2 + src/index.ts | 4 + src/resources/1099-int.test.ts | 803 -- src/resources/1099-int.ts | 84 - src/resources/1099-k.test.ts | 863 -- src/resources/1099-k.ts | 97 - src/resources/1099-nec.test.ts | 731 -- src/resources/1099-nec.ts | 72 - src/resources/access-tokens.test.ts | 77 - src/resources/access-tokens.ts | 23 - src/resources/base/abound-bad-request.ts | 13 - src/resources/base/abound-error.ts | 5 - src/resources/base/base-resource.ts | 184 - src/resources/index.ts | 8 - src/resources/mailings.test.ts | 281 - src/resources/mailings.ts | 54 - src/resources/tin-verifications.test.ts | 171 - src/resources/tin-verifications.ts | 39 - src/resources/types/1099.ts | 47 - src/resources/types/pagination.ts | 3 - src/resources/types/payee.ts | 29 - src/resources/types/payer.ts | 31 - src/resources/users.test.ts | 222 - src/resources/users.ts | 33 - src/resources/w-9.test.ts | 321 - src/resources/w-9.ts | 98 - src/test-utils.ts | 19 - src/version.ts | 2 - tests/custom.test.ts | 13 + tests/unit/auth/BasicAuth.test.ts | 22 + tests/unit/auth/BearerToken.test.ts | 14 + tests/unit/fetcher/Fetcher.test.ts | 25 + tests/unit/fetcher/createRequestUrl.test.ts | 51 + tests/unit/fetcher/getFetchFn.test.ts | 22 + tests/unit/fetcher/getRequestBody.test.ts | 81 + tests/unit/fetcher/getResponseBody.test.ts | 68 + tests/unit/fetcher/makeRequest.test.ts | 58 + tests/unit/fetcher/requestWithRetries.test.ts | 85 + tests/unit/fetcher/signals.test.ts | 69 + .../Node18UniversalStreamWrapper.test.ts | 178 + .../NodePre18StreamWrapper.test.ts | 124 + .../UndiciStreamWrapper.test.ts | 153 + .../chooseStreamWrapper.test.ts | 43 + tests/wire/accessTokens.test.ts | 24 + tests/wire/electronicDeliveryConsents.test.ts | 25 + tests/wire/form1099Int.test.ts | 531 ++ tests/wire/form1099K.test.ts | 595 ++ tests/wire/form1099Misc.test.ts | 533 ++ tests/wire/form1099Nec.test.ts | 435 + tests/wire/formW8Ben.test.ts | 225 + tests/wire/formW8BenE.test.ts | 222 + tests/wire/formW9.test.ts | 141 + tests/wire/mailings.test.ts | 127 + tests/wire/taxTreaties.test.ts | 24 + tests/wire/tinVerifications.test.ts | 58 + tests/wire/users.test.ts | 52 + tsconfig.cjs.json | 10 - tsconfig.json | 26 +- verify_version.sh | 9 - xo.config.js | 13 - yarn.lock | 2794 ++++++ 370 files changed, 28564 insertions(+), 13881 deletions(-) create mode 100644 .fernignore delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/ci_checks.yml delete mode 100644 .github/workflows/codeql-analysis.yml delete mode 100644 .github/workflows/dependabot.yml delete mode 100644 .github/workflows/publish_release.yml delete mode 100755 .husky/pre-commit create mode 100644 .mock/definition/access-tokens.yml create mode 100644 .mock/definition/api.yml create mode 100644 .mock/definition/electronic-delivery-consents.yml create mode 100644 .mock/definition/form-1099-int.yml create mode 100644 .mock/definition/form-1099-k.yml create mode 100644 .mock/definition/form-1099-misc.yml create mode 100644 .mock/definition/form-1099-nec.yml create mode 100644 .mock/definition/form-w-8ben-e.yml create mode 100644 .mock/definition/form-w-8ben.yml create mode 100644 .mock/definition/form-w-9.yml create mode 100644 .mock/definition/mailings.yml create mode 100644 .mock/definition/tax-treaties.yml create mode 100644 .mock/definition/tin-verifications.yml create mode 100644 .mock/definition/types/address.yml create mode 100644 .mock/definition/types/common.yml create mode 100644 .mock/definition/types/electronic-signature.yml create mode 100644 .mock/definition/types/errors.yml create mode 100644 .mock/definition/types/form-1099s.yml create mode 100644 .mock/definition/types/headers.yml create mode 100644 .mock/definition/types/payee.yml create mode 100644 .mock/definition/types/payer.yml create mode 100644 .mock/definition/types/tax-treaties.yml create mode 100644 .mock/definition/users.yml create mode 100644 .mock/definition/webhooks.yml create mode 100644 .mock/fern.config.json create mode 100644 .npmignore create mode 100644 .prettierrc.yml delete mode 100644 LICENSE delete mode 100755 build.sh delete mode 100644 create-package-json.cjs delete mode 100644 fix-esm-imports.mjs create mode 100644 jest.config.js delete mode 100644 package-lock.json delete mode 100644 prettier.config.js create mode 100644 reference.md delete mode 100755 smoke_test_npm_release.sh create mode 100644 src/Client.ts delete mode 100644 src/abound.ts create mode 100644 src/api/index.ts create mode 100644 src/api/resources/accessTokens/client/Client.ts create mode 100644 src/api/resources/accessTokens/client/index.ts create mode 100644 src/api/resources/accessTokens/client/requests/AccessTokenRequestSchema.ts create mode 100644 src/api/resources/accessTokens/client/requests/index.ts create mode 100644 src/api/resources/accessTokens/index.ts create mode 100644 src/api/resources/accessTokens/types/AccessTokenSchema.ts create mode 100644 src/api/resources/accessTokens/types/index.ts create mode 100644 src/api/resources/electronicDeliveryConsents/client/Client.ts create mode 100644 src/api/resources/electronicDeliveryConsents/client/index.ts create mode 100644 src/api/resources/electronicDeliveryConsents/client/requests/EDeliveryConsentListRequest.ts create mode 100644 src/api/resources/electronicDeliveryConsents/client/requests/index.ts create mode 100644 src/api/resources/electronicDeliveryConsents/index.ts create mode 100644 src/api/resources/electronicDeliveryConsents/types/EDeliveryConsentSchema.ts create mode 100644 src/api/resources/electronicDeliveryConsents/types/EDeliveryConsentStatusEnum.ts create mode 100644 src/api/resources/electronicDeliveryConsents/types/index.ts create mode 100644 src/api/resources/form1099Int/client/Client.ts create mode 100644 src/api/resources/form1099Int/client/index.ts create mode 100644 src/api/resources/form1099Int/client/requests/Form1099IntCorrectRequest.ts create mode 100644 src/api/resources/form1099Int/client/requests/Form1099IntFileRequest.ts create mode 100644 src/api/resources/form1099Int/client/requests/Form1099IntListRequest.ts create mode 100644 src/api/resources/form1099Int/client/requests/Form1099IntMailingRequest.ts create mode 100644 src/api/resources/form1099Int/client/requests/Form1099IntRequest.ts create mode 100644 src/api/resources/form1099Int/client/requests/Form1099IntVoidRequest.ts create mode 100644 src/api/resources/form1099Int/client/requests/index.ts create mode 100644 src/api/resources/form1099Int/index.ts create mode 100644 src/api/resources/form1099Int/types/Form1099IntCorrectRequestSchema.ts create mode 100644 src/api/resources/form1099Int/types/Form1099IntFormFieldsRequestSchema.ts create mode 100644 src/api/resources/form1099Int/types/Form1099IntFormFieldsSchema.ts create mode 100644 src/api/resources/form1099Int/types/Form1099IntRequestSchema.ts create mode 100644 src/api/resources/form1099Int/types/Form1099IntSchema.ts create mode 100644 src/api/resources/form1099Int/types/index.ts create mode 100644 src/api/resources/form1099K/client/Client.ts create mode 100644 src/api/resources/form1099K/client/index.ts create mode 100644 src/api/resources/form1099K/client/requests/Form1099KCorrectRequest.ts create mode 100644 src/api/resources/form1099K/client/requests/Form1099KFileRequest.ts create mode 100644 src/api/resources/form1099K/client/requests/Form1099KListRequest.ts create mode 100644 src/api/resources/form1099K/client/requests/Form1099KMailingRequest.ts create mode 100644 src/api/resources/form1099K/client/requests/Form1099KRequest.ts create mode 100644 src/api/resources/form1099K/client/requests/Form1099KVoidRequest.ts create mode 100644 src/api/resources/form1099K/client/requests/index.ts create mode 100644 src/api/resources/form1099K/index.ts create mode 100644 src/api/resources/form1099K/types/Form1099KCorrectRequestSchema.ts create mode 100644 src/api/resources/form1099K/types/Form1099KFormFieldsRequestSchema.ts create mode 100644 src/api/resources/form1099K/types/Form1099KFormFieldsSchema.ts create mode 100644 src/api/resources/form1099K/types/Form1099KGrossAmountsByMonthSchema.ts create mode 100644 src/api/resources/form1099K/types/Form1099KPayerClassificationEnum.ts create mode 100644 src/api/resources/form1099K/types/Form1099KRequestSchema.ts create mode 100644 src/api/resources/form1099K/types/Form1099KSchema.ts create mode 100644 src/api/resources/form1099K/types/Form1099KTransactionsReportedClassificationSchema.ts create mode 100644 src/api/resources/form1099K/types/index.ts create mode 100644 src/api/resources/form1099Misc/client/Client.ts create mode 100644 src/api/resources/form1099Misc/client/index.ts create mode 100644 src/api/resources/form1099Misc/client/requests/Form1099MiscCorrectRequest.ts create mode 100644 src/api/resources/form1099Misc/client/requests/Form1099MiscFileRequest.ts create mode 100644 src/api/resources/form1099Misc/client/requests/Form1099MiscListRequest.ts create mode 100644 src/api/resources/form1099Misc/client/requests/Form1099MiscMailingRequest.ts create mode 100644 src/api/resources/form1099Misc/client/requests/Form1099MiscRequest.ts create mode 100644 src/api/resources/form1099Misc/client/requests/Form1099MiscVoidRequest.ts create mode 100644 src/api/resources/form1099Misc/client/requests/index.ts create mode 100644 src/api/resources/form1099Misc/index.ts create mode 100644 src/api/resources/form1099Misc/types/Form1099MiscCorrectRequestSchema.ts create mode 100644 src/api/resources/form1099Misc/types/Form1099MiscFormFieldsRequestSchema.ts create mode 100644 src/api/resources/form1099Misc/types/Form1099MiscFormFieldsSchema.ts create mode 100644 src/api/resources/form1099Misc/types/Form1099MiscRequestSchema.ts create mode 100644 src/api/resources/form1099Misc/types/Form1099MiscSchema.ts create mode 100644 src/api/resources/form1099Misc/types/index.ts create mode 100644 src/api/resources/form1099Nec/client/Client.ts create mode 100644 src/api/resources/form1099Nec/client/index.ts create mode 100644 src/api/resources/form1099Nec/client/requests/Form1099NecCorrectRequest.ts create mode 100644 src/api/resources/form1099Nec/client/requests/Form1099NecFileRequest.ts create mode 100644 src/api/resources/form1099Nec/client/requests/Form1099NecListRequest.ts create mode 100644 src/api/resources/form1099Nec/client/requests/Form1099NecMailingRequest.ts create mode 100644 src/api/resources/form1099Nec/client/requests/Form1099NecRequest.ts create mode 100644 src/api/resources/form1099Nec/client/requests/Form1099NecVoidRequest.ts create mode 100644 src/api/resources/form1099Nec/client/requests/index.ts create mode 100644 src/api/resources/form1099Nec/index.ts create mode 100644 src/api/resources/form1099Nec/types/Form1099NecCorrectRequestSchema.ts create mode 100644 src/api/resources/form1099Nec/types/Form1099NecFormFieldsRequestSchema.ts create mode 100644 src/api/resources/form1099Nec/types/Form1099NecFormFieldsSchema.ts create mode 100644 src/api/resources/form1099Nec/types/Form1099NecRequestSchema.ts create mode 100644 src/api/resources/form1099Nec/types/Form1099NecSchema.ts create mode 100644 src/api/resources/form1099Nec/types/index.ts create mode 100644 src/api/resources/formW8Ben/client/Client.ts create mode 100644 src/api/resources/formW8Ben/client/index.ts create mode 100644 src/api/resources/formW8Ben/client/requests/FormW8BenListRequest.ts create mode 100644 src/api/resources/formW8Ben/client/requests/index.ts create mode 100644 src/api/resources/formW8Ben/index.ts create mode 100644 src/api/resources/formW8Ben/types/W8BenBeneficialOwnerRequestSchema.ts create mode 100644 src/api/resources/formW8Ben/types/W8BenBeneficialOwnerSchema.ts create mode 100644 src/api/resources/formW8Ben/types/W8BenFormFieldsRequestSchema.ts create mode 100644 src/api/resources/formW8Ben/types/W8BenFormFieldsSchema.ts create mode 100644 src/api/resources/formW8Ben/types/W8BenRequestSchema.ts create mode 100644 src/api/resources/formW8Ben/types/W8BenSchema.ts create mode 100644 src/api/resources/formW8Ben/types/index.ts create mode 100644 src/api/resources/formW8BenE/client/Client.ts create mode 100644 src/api/resources/formW8BenE/client/index.ts create mode 100644 src/api/resources/formW8BenE/client/requests/FormW8BenEListRequest.ts create mode 100644 src/api/resources/formW8BenE/client/requests/index.ts create mode 100644 src/api/resources/formW8BenE/index.ts create mode 100644 src/api/resources/formW8BenE/types/W8BenEBeneficialOwnerRequestSchema.ts create mode 100644 src/api/resources/formW8BenE/types/W8BenEBeneficialOwnerSchema.ts create mode 100644 src/api/resources/formW8BenE/types/W8BenEFormFieldsRequestSchema.ts create mode 100644 src/api/resources/formW8BenE/types/W8BenEFormFieldsSchema.ts create mode 100644 src/api/resources/formW8BenE/types/W8BenERequestSchema.ts create mode 100644 src/api/resources/formW8BenE/types/W8BenESchema.ts create mode 100644 src/api/resources/formW8BenE/types/W8BenETaxClassificationEnum.ts create mode 100644 src/api/resources/formW8BenE/types/index.ts create mode 100644 src/api/resources/formW9/client/Client.ts create mode 100644 src/api/resources/formW9/client/index.ts create mode 100644 src/api/resources/formW9/client/requests/FormW9ListRequest.ts create mode 100644 src/api/resources/formW9/client/requests/FormW9RequestSchema.ts create mode 100644 src/api/resources/formW9/client/requests/index.ts create mode 100644 src/api/resources/formW9/index.ts create mode 100644 src/api/resources/formW9/types/W9ExemptFatcaCodeSchema.ts create mode 100644 src/api/resources/formW9/types/W9ExemptPayeeCodeSchema.ts create mode 100644 src/api/resources/formW9/types/W9FormFieldsSchema.ts create mode 100644 src/api/resources/formW9/types/W9RequestSchema.ts create mode 100644 src/api/resources/formW9/types/W9Schema.ts create mode 100644 src/api/resources/formW9/types/W9TaxClassificationSchema.ts create mode 100644 src/api/resources/formW9/types/index.ts create mode 100644 src/api/resources/index.ts create mode 100644 src/api/resources/mailings/client/Client.ts create mode 100644 src/api/resources/mailings/client/index.ts create mode 100644 src/api/resources/mailings/client/requests/MailingRequest.ts create mode 100644 src/api/resources/mailings/client/requests/MailingsListRequest.ts create mode 100644 src/api/resources/mailings/client/requests/index.ts create mode 100644 src/api/resources/mailings/index.ts create mode 100644 src/api/resources/mailings/types/MailingNameSchema.ts create mode 100644 src/api/resources/mailings/types/MailingRequestFromSchema.ts create mode 100644 src/api/resources/mailings/types/MailingRequestSchema.ts create mode 100644 src/api/resources/mailings/types/MailingRequestToSchema.ts create mode 100644 src/api/resources/mailings/types/MailingSchema.ts create mode 100644 src/api/resources/mailings/types/MailingStatusEnum.ts create mode 100644 src/api/resources/mailings/types/index.ts create mode 100644 src/api/resources/taxTreaties/client/Client.ts create mode 100644 src/api/resources/taxTreaties/client/index.ts create mode 100644 src/api/resources/taxTreaties/client/requests/TaxTreatiesListRequest.ts create mode 100644 src/api/resources/taxTreaties/client/requests/index.ts create mode 100644 src/api/resources/taxTreaties/index.ts create mode 100644 src/api/resources/taxTreaties/types/TaxTreatySchema.ts create mode 100644 src/api/resources/taxTreaties/types/index.ts create mode 100644 src/api/resources/tinVerifications/client/Client.ts create mode 100644 src/api/resources/tinVerifications/client/index.ts create mode 100644 src/api/resources/tinVerifications/client/requests/TinVerificationRequest.ts create mode 100644 src/api/resources/tinVerifications/client/requests/TinVerificationsListRequest.ts create mode 100644 src/api/resources/tinVerifications/client/requests/index.ts create mode 100644 src/api/resources/tinVerifications/index.ts create mode 100644 src/api/resources/tinVerifications/types/TinVerificationRequestSchema.ts create mode 100644 src/api/resources/tinVerifications/types/TinVerificationSchema.ts create mode 100644 src/api/resources/tinVerifications/types/index.ts create mode 100644 src/api/resources/types/index.ts create mode 100644 src/api/resources/types/resources/address/index.ts create mode 100644 src/api/resources/types/resources/address/types/AddressSchema.ts create mode 100644 src/api/resources/types/resources/address/types/ForeignAddressSchema.ts create mode 100644 src/api/resources/types/resources/address/types/index.ts create mode 100644 src/api/resources/types/resources/common/index.ts create mode 100644 src/api/resources/types/resources/common/types/DocumentId.ts create mode 100644 src/api/resources/types/resources/common/types/Email.ts create mode 100644 src/api/resources/types/resources/common/types/FilingYear.ts create mode 100644 src/api/resources/types/resources/common/types/ForeignId.ts create mode 100644 src/api/resources/types/resources/common/types/ForeignTinFingerprint.ts create mode 100644 src/api/resources/types/resources/common/types/MailingId.ts create mode 100644 src/api/resources/types/resources/common/types/OkSchema.ts create mode 100644 src/api/resources/types/resources/common/types/Page.ts create mode 100644 src/api/resources/types/resources/common/types/PayeeForeignTinFingerprint.ts create mode 100644 src/api/resources/types/resources/common/types/PayeeTinFingerprint.ts create mode 100644 src/api/resources/types/resources/common/types/PayerTinFingerprint.ts create mode 100644 src/api/resources/types/resources/common/types/TaxTreatyCountry.ts create mode 100644 src/api/resources/types/resources/common/types/TinFingerprint.ts create mode 100644 src/api/resources/types/resources/common/types/TinFingerprintQueryParam.ts create mode 100644 src/api/resources/types/resources/common/types/TinTypeEnum.ts create mode 100644 src/api/resources/types/resources/common/types/TinVerificationId.ts create mode 100644 src/api/resources/types/resources/common/types/TinVerificationStatusEnum.ts create mode 100644 src/api/resources/types/resources/common/types/TinVerificationStatusQueryParam.ts create mode 100644 src/api/resources/types/resources/common/types/UserId.ts create mode 100644 src/api/resources/types/resources/common/types/index.ts create mode 100644 src/api/resources/types/resources/electronicSignature/index.ts create mode 100644 src/api/resources/types/resources/electronicSignature/types/ElectronicSignatureOfPayeeSchema.ts create mode 100644 src/api/resources/types/resources/electronicSignature/types/index.ts create mode 100644 src/api/resources/types/resources/errors/errors/BadRequestErrorSchema.ts create mode 100644 src/api/resources/types/resources/errors/errors/ConflictErrorSchema.ts create mode 100644 src/api/resources/types/resources/errors/errors/InternalServerErrorSchema.ts create mode 100644 src/api/resources/types/resources/errors/errors/NotFoundErrorSchema.ts create mode 100644 src/api/resources/types/resources/errors/errors/UnauthorizedErrorSchema.ts create mode 100644 src/api/resources/types/resources/errors/errors/index.ts create mode 100644 src/api/resources/types/resources/errors/index.ts create mode 100644 src/api/resources/types/resources/errors/types/DefaultErrorSchema.ts create mode 100644 src/api/resources/types/resources/errors/types/ErrorBadRequestSchema.ts create mode 100644 src/api/resources/types/resources/errors/types/ErrorBadRequestSchemaErrorsItem.ts create mode 100644 src/api/resources/types/resources/errors/types/index.ts create mode 100644 src/api/resources/types/resources/form1099S/index.ts create mode 100644 src/api/resources/types/resources/form1099S/types/Form1099AccountNumber.ts create mode 100644 src/api/resources/types/resources/form1099S/types/Form1099BaseCorrectRequestSchema.ts create mode 100644 src/api/resources/types/resources/form1099S/types/Form1099BaseRequestSchema.ts create mode 100644 src/api/resources/types/resources/form1099S/types/Form1099BaseSchema.ts create mode 100644 src/api/resources/types/resources/form1099S/types/Form1099FilingStateEnum.ts create mode 100644 src/api/resources/types/resources/form1099S/types/Form1099FormFieldsBaseSchema.ts create mode 100644 src/api/resources/types/resources/form1099S/types/Form1099StateTaxInfoSchema.ts create mode 100644 src/api/resources/types/resources/form1099S/types/Form1099StateTaxInfoWithStateIncomeSchema.ts create mode 100644 src/api/resources/types/resources/form1099S/types/Form1099StatusEnum.ts create mode 100644 src/api/resources/types/resources/form1099S/types/index.ts create mode 100644 src/api/resources/types/resources/headers/index.ts create mode 100644 src/api/resources/types/resources/headers/types/IdempotencyKey.ts create mode 100644 src/api/resources/types/resources/headers/types/index.ts create mode 100644 src/api/resources/types/resources/index.ts create mode 100644 src/api/resources/types/resources/payee/index.ts create mode 100644 src/api/resources/types/resources/payee/types/PayeeRequestSchema.ts create mode 100644 src/api/resources/types/resources/payee/types/PayeeSchema.ts create mode 100644 src/api/resources/types/resources/payee/types/PayeeWithOptionalTinTypeRequestSchema.ts create mode 100644 src/api/resources/types/resources/payee/types/index.ts create mode 100644 src/api/resources/types/resources/payer/index.ts create mode 100644 src/api/resources/types/resources/payer/types/PayerRequestSchema.ts create mode 100644 src/api/resources/types/resources/payer/types/PayerSchema.ts create mode 100644 src/api/resources/types/resources/payer/types/index.ts create mode 100644 src/api/resources/types/resources/taxTreaties/index.ts create mode 100644 src/api/resources/types/resources/taxTreaties/types/TaxTreatyAboundCodeEnum.ts create mode 100644 src/api/resources/types/resources/taxTreaties/types/TaxTreatyBenefitsSchema.ts create mode 100644 src/api/resources/types/resources/taxTreaties/types/TaxTreatyIncomeCodeEnum.ts create mode 100644 src/api/resources/types/resources/taxTreaties/types/index.ts create mode 100644 src/api/resources/users/client/Client.ts create mode 100644 src/api/resources/users/client/index.ts create mode 100644 src/api/resources/users/client/requests/UsersCreateRequest.ts create mode 100644 src/api/resources/users/client/requests/UsersListRequest.ts create mode 100644 src/api/resources/users/client/requests/index.ts create mode 100644 src/api/resources/users/index.ts create mode 100644 src/api/resources/users/types/UserRequestSchema.ts create mode 100644 src/api/resources/users/types/UserSchema.ts create mode 100644 src/api/resources/users/types/index.ts create mode 100644 src/api/resources/webhooks/index.ts create mode 100644 src/api/resources/webhooks/types/AboundSignatureHeader.ts create mode 100644 src/api/resources/webhooks/types/WebhookPayloadBaseSchema.ts create mode 100644 src/api/resources/webhooks/types/index.ts create mode 100644 src/core/auth/BasicAuth.ts create mode 100644 src/core/auth/BearerToken.ts create mode 100644 src/core/auth/index.ts create mode 100644 src/core/fetcher/APIResponse.ts create mode 100644 src/core/fetcher/Fetcher.ts create mode 100644 src/core/fetcher/Supplier.ts create mode 100644 src/core/fetcher/createRequestUrl.ts create mode 100644 src/core/fetcher/getFetchFn.ts create mode 100644 src/core/fetcher/getHeader.ts create mode 100644 src/core/fetcher/getRequestBody.ts create mode 100644 src/core/fetcher/getResponseBody.ts create mode 100644 src/core/fetcher/index.ts create mode 100644 src/core/fetcher/makeRequest.ts create mode 100644 src/core/fetcher/requestWithRetries.ts create mode 100644 src/core/fetcher/signals.ts create mode 100644 src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts create mode 100644 src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts create mode 100644 src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts create mode 100644 src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts create mode 100644 src/core/index.ts create mode 100644 src/core/runtime/index.ts create mode 100644 src/core/runtime/runtime.ts create mode 100644 src/environments.ts create mode 100644 src/errors/AboundError.ts create mode 100644 src/errors/AboundTimeoutError.ts create mode 100644 src/errors/index.ts create mode 100644 src/index.ts delete mode 100644 src/resources/1099-int.test.ts delete mode 100644 src/resources/1099-int.ts delete mode 100644 src/resources/1099-k.test.ts delete mode 100644 src/resources/1099-k.ts delete mode 100644 src/resources/1099-nec.test.ts delete mode 100644 src/resources/1099-nec.ts delete mode 100644 src/resources/access-tokens.test.ts delete mode 100644 src/resources/access-tokens.ts delete mode 100644 src/resources/base/abound-bad-request.ts delete mode 100644 src/resources/base/abound-error.ts delete mode 100644 src/resources/base/base-resource.ts delete mode 100644 src/resources/index.ts delete mode 100644 src/resources/mailings.test.ts delete mode 100644 src/resources/mailings.ts delete mode 100644 src/resources/tin-verifications.test.ts delete mode 100644 src/resources/tin-verifications.ts delete mode 100644 src/resources/types/1099.ts delete mode 100644 src/resources/types/pagination.ts delete mode 100644 src/resources/types/payee.ts delete mode 100644 src/resources/types/payer.ts delete mode 100644 src/resources/users.test.ts delete mode 100644 src/resources/users.ts delete mode 100644 src/resources/w-9.test.ts delete mode 100644 src/resources/w-9.ts delete mode 100644 src/test-utils.ts delete mode 100644 src/version.ts create mode 100644 tests/custom.test.ts create mode 100644 tests/unit/auth/BasicAuth.test.ts create mode 100644 tests/unit/auth/BearerToken.test.ts create mode 100644 tests/unit/fetcher/Fetcher.test.ts create mode 100644 tests/unit/fetcher/createRequestUrl.test.ts create mode 100644 tests/unit/fetcher/getFetchFn.test.ts create mode 100644 tests/unit/fetcher/getRequestBody.test.ts create mode 100644 tests/unit/fetcher/getResponseBody.test.ts create mode 100644 tests/unit/fetcher/makeRequest.test.ts create mode 100644 tests/unit/fetcher/requestWithRetries.test.ts create mode 100644 tests/unit/fetcher/signals.test.ts create mode 100644 tests/unit/fetcher/stream-wrappers/Node18UniversalStreamWrapper.test.ts create mode 100644 tests/unit/fetcher/stream-wrappers/NodePre18StreamWrapper.test.ts create mode 100644 tests/unit/fetcher/stream-wrappers/UndiciStreamWrapper.test.ts create mode 100644 tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts create mode 100644 tests/wire/accessTokens.test.ts create mode 100644 tests/wire/electronicDeliveryConsents.test.ts create mode 100644 tests/wire/form1099Int.test.ts create mode 100644 tests/wire/form1099K.test.ts create mode 100644 tests/wire/form1099Misc.test.ts create mode 100644 tests/wire/form1099Nec.test.ts create mode 100644 tests/wire/formW8Ben.test.ts create mode 100644 tests/wire/formW8BenE.test.ts create mode 100644 tests/wire/formW9.test.ts create mode 100644 tests/wire/mailings.test.ts create mode 100644 tests/wire/taxTreaties.test.ts create mode 100644 tests/wire/tinVerifications.test.ts create mode 100644 tests/wire/users.test.ts delete mode 100644 tsconfig.cjs.json delete mode 100755 verify_version.sh delete mode 100644 xo.config.js create mode 100644 yarn.lock diff --git a/.fernignore b/.fernignore new file mode 100644 index 00000000..084a8ebb --- /dev/null +++ b/.fernignore @@ -0,0 +1 @@ +# Specify files that shouldn't be modified by Fern diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 0cb1993e..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To reproduce** -Steps to reproduce the behavior: -1. -1. -1. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Logs** -If applicable, add screenshots to help explain your problem. - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index bbcbbe7d..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index a9f244e0..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,28 +0,0 @@ -# https://docs.github.com/en/code-security/dependabot - -version: 2 -updates: - # Check for GitHub Actions updates every week - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" - reviewers: - - "withabound/api-team" - - "bmealhouse" - - # Check for npm package updates every week - - package-ecosystem: "npm" - directory: "/" - schedule: - interval: "weekly" - reviewers: - - "withabound/api-team" - - "bmealhouse" - groups: - vitest: - patterns: - - "*vitest*" - patch: - update-types: - - "patch" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..1a55fdb1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,57 @@ +name: ci + +on: [push] + +jobs: + compile: + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Set up node + uses: actions/setup-node@v3 + + - name: Compile + run: yarn && yarn build + + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Set up node + uses: actions/setup-node@v3 + + - name: Compile + run: yarn && yarn test + + publish: + needs: [ compile, test ] + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + - name: Set up node + uses: actions/setup-node@v3 + - name: Install dependencies + run: yarn install + - name: Build + run: yarn build + + - name: Publish to npm + run: | + npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN} + if [[ ${GITHUB_REF} == *alpha* ]]; then + npm publish --access public --tag alpha + elif [[ ${GITHUB_REF} == *beta* ]]; then + npm publish --access public --tag beta + else + npm publish --access public + fi + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/ci_checks.yml b/.github/workflows/ci_checks.yml deleted file mode 100644 index d9af3a47..00000000 --- a/.github/workflows/ci_checks.yml +++ /dev/null @@ -1,38 +0,0 @@ -on: - pull_request: - branches: - - main - -jobs: - run_unit_tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: "18" - - run: npm ci - - run: npm run test -- --coverage --run - - run_linting: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: "18" - - run: npm ci - - run: npm run lint - - - name: Verify package.json version matches version.ts (genversion --check-only) - run: ./verify_version.sh - - run_compiler: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: "18" - - run: npm ci - - run: npm run compile diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 417a8be0..00000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: "CodeQL" - -on: - push: - branches: - - main - pull_request: - branches: - - main - schedule: - - cron: "33 22 * * 2" - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: - - javascript - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml deleted file mode 100644 index a2e8e4f2..00000000 --- a/.github/workflows/dependabot.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Dependabot auto-merge -on: pull_request - -permissions: - contents: write - pull-requests: write - -jobs: - dependabot: - runs-on: ubuntu-latest - if: github.actor == 'dependabot[bot]' - steps: - - name: Dependabot metadata - id: metadata - uses: dependabot/fetch-metadata@v2 - with: - github-token: "${{secrets.GITHUB_TOKEN}}" - - name: Approve the PR - if: steps.metadata.outputs.update-type != 'version-update:semver-major' - run: gh pr review --approve "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GH_TOKEN: ${{secrets.GITHUB_TOKEN}} - - name: Enable auto-merge for Dependabot PRs - if: steps.metadata.outputs.update-type != 'version-update:semver-major' - run: gh pr merge --auto --squash "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml deleted file mode 100644 index dd05b819..00000000 --- a/.github/workflows/publish_release.yml +++ /dev/null @@ -1,49 +0,0 @@ -on: - release: - types: - - published - -jobs: - publish_release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Validate release version and package version match - env: - RELEASE_TAG_NAME: ${{github.event.release.tag_name}} - run: | - if ! grep -q "\"version\": \"${RELEASE_TAG_NAME:1}\"" package.json - then - echo "Release tag (${RELEASE_TAG_NAME:1}) does not match the package.json version" - exit 1 - else - echo "Release tag matches the package.json version" - fi - - - uses: actions/setup-node@v4 - with: - node-version: "18" - - - run: npm ci - - run: npm run build - - - name: Publish @withabound/node-sdk - id: npm-publish - uses: JS-DevTools/npm-publish@v3 - with: - token: ${{secrets.NPM_ACCESS_TOKEN}} - access: public - - - name: Send Slack notification - if: ${{steps.npm-publish.outputs.type}} - uses: tokorom/action-slack-incoming-webhook@main - with: - text: "@withabound/node-sdk@${{steps.npm-publish.outputs.version}} has been published." - env: - INCOMING_WEBHOOK_URL: ${{secrets.SUCCESS_DEPLOYMENT_PRODUCT_URL}} - - - run: ./smoke_test_npm_release.sh - env: - ABOUND_SMOKE_TEST_APP_ID: ${{secrets.ABOUND_SMOKE_TEST_APP_ID}} - ABOUND_SMOKE_TEST_APP_SECRET: ${{secrets.ABOUND_SMOKE_TEST_APP_SECRET}} diff --git a/.gitignore b/.gitignore index 125ed3c1..72271e04 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@ node_modules -coverage/ -dist/ -tmp/ - .DS_Store +/dist \ No newline at end of file diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100755 index b5a0f8ae..00000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,4 +0,0 @@ -npx genversion --es6 --semi --double src/version.ts -git add src/version.ts - -npx lint-staged diff --git a/.mock/definition/access-tokens.yml b/.mock/definition/access-tokens.yml new file mode 100644 index 00000000..f58e85e6 --- /dev/null +++ b/.mock/definition/access-tokens.yml @@ -0,0 +1,62 @@ +imports: + errors: types/errors.yml + headers: types/headers.yml + common: types/common.yml +types: + AccessTokenSchema: + examples: + - name: ResponseExample + value: + accessToken: >- + accessToken_sampleeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2OTY5ODczNTcsImV4cCI6MTY5Njk4NzY1NywiYXVkIjoiYXBwSWRfc2FtcGxlcU5oVmNkWVFZVSIsImlzcyI6Imh0dHBzOi8vc2FuZGJveC1hcGkud2l0aGFib3VuZC5jb20vdjQiLCJzdWIiOiJ1c2VySWRfc2FtcGxlWEdNRm5oT3BlUiJ9.-NrPVQvsnM8vJouyuP5yeFGlYb1xGgR-gS3v87p5BQk + createdAt: '2024-01-01T00:00:00.000Z' + expiresAt: '2024-01-01T00:15:00.000Z' + properties: + accessToken: + type: string + docs: The access token to authenticate your Drop-In UI Components. + createdAt: + type: datetime + docs: The creation date and time of the access token in `ISO 8601` format. + expiresAt: + type: datetime + docs: The expiration date and time of the access token in `ISO 8601` format. +service: + auth: false + display-name: Access Tokens + base-path: '' + endpoints: + create: + docs: Creates an access token for authenticating Drop-In UI Components. + method: POST + display-name: Create an access token + path: /access-tokens + auth: true + request: + name: AccessTokenRequestSchema + headers: + Idempotency-Key: optional + body: + properties: + expiresIn: + type: integer + docs: The number of seconds until the access token expires. + userId: + type: optional + docs: >- + The unique identifier of the user associated with this access + token. + response: + docs: OK + type: AccessTokenSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + request: + expiresIn: 900 + response: + body: $AccessTokenSchema.ResponseExample diff --git a/.mock/definition/api.yml b/.mock/definition/api.yml new file mode 100644 index 00000000..fefccabb --- /dev/null +++ b/.mock/definition/api.yml @@ -0,0 +1,15 @@ +name: api +display-name: Abound API +auth: BearerAuthScheme +auth-schemes: + BearerAuthScheme: + scheme: bearer + token: + name: sampleKey +default-environment: Production +environments: + Production: https://production-api.withabound.com + Sandbox: https://sandbox-api.withabound.com +error-discrimination: + strategy: status-code +base-path: /v4 diff --git a/.mock/definition/electronic-delivery-consents.yml b/.mock/definition/electronic-delivery-consents.yml new file mode 100644 index 00000000..98fffd8c --- /dev/null +++ b/.mock/definition/electronic-delivery-consents.yml @@ -0,0 +1,71 @@ +imports: + errors: types/errors.yml + headers: types/headers.yml + common: types/common.yml +types: + EDeliveryConsentStatusEnum: + enum: + - ASSENTED + - WITHDRAWN + EDeliveryConsentSchema: + properties: + id: + type: string + docs: The unique identifier for this electronic delivery consent. + createdAt: + type: datetime + docs: >- + The creation date and time of the electronic delivery consent in `ISO + 8601` format. + status: + type: EDeliveryConsentStatusEnum + docs: The status of the electronic delivery consent. + email: + type: string + docs: >- + The email address associated with the electronic delivery consent. + Abound assume's you have taken the proper steps to verify the + ownership of this email address. + tinFingerprint: + type: common.TinFingerprint + docs: The TIN fingerprint for this electronic delivery consent. +service: + auth: false + display-name: Electronic Delivery Consents + base-path: '' + endpoints: + list: + docs: Returns a list of Electronic Delivery Consents. + method: GET + display-name: List all Electronic Delivery Consents + path: /electronic-delivery-consents + auth: true + request: + name: eDeliveryConsentListRequest + query-parameters: + page: optional + status: optional + email: + type: optional + docs: >- + Filters the list of Electronic Delivery Consents based on the + `email` field. + tinFingerprint: optional + userId: optional + response: + docs: OK + type: list + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + response: + body: + - id: eDeliveryConsentId_sample7zmM4xCWxe + createdAt: '2024-01-01T00:00:00.000Z' + status: ASSENTED + email: your-users-email@domain.com + tinFingerprint: tinFingerprint_samplehy2BWO6JJG diff --git a/.mock/definition/form-1099-int.yml b/.mock/definition/form-1099-int.yml new file mode 100644 index 00000000..dbbe85e4 --- /dev/null +++ b/.mock/definition/form-1099-int.yml @@ -0,0 +1,740 @@ +imports: + errors: types/errors.yml + headers: types/headers.yml + common: types/common.yml + form1099s: types/form-1099s.yml + mailings: mailings.yml +types: + Form1099IntFormFieldsRequestSchema: + docs: The 1099-INT form fields. + properties: + hasFatcaFilingRequirement: + type: optional + docs: >- + Satisfying a requirement to report with respect to a U.S. account for + chapter 4 purposes. + accountNumber: + type: optional + validation: + maxLength: 20 + docs: >- + The IRS “encourages” a payer to designate an account number for all + Form 1099-INT filed. This field is required if payer has multiple + accounts for a recipient for whom it is filing more than one Form + 1099-INT. This field is also required if `fatca` is `true`. Abound + will auto-generated this field if not provided. + payersRoutingNumber: + type: optional + validation: + maxLength: 20 + docs: >- + A routing and transit number (RTN) is a unique nine-digit number used + to identify a bank for purposes of directing financial flows. This is + essentially bank's bank account - their account with the Federal + Reserve. + interestIncome: + type: optional + validation: + min: 0 + docs: >- + The taxable interest paid to you during the calendar year by the + payer. This does not include interest for `usSavingsBondsInterest`. + May also show the total amount of the credits from clean renewable + energy bonds, new clean renewable energy bonds, qualified energy + conservation bonds, qualified zone academy bonds, qualified school + construction bonds, and build America bonds that must be included in + your interest income. Value must be in cents. + earlyWithdrawalPenalty: + type: optional + validation: + min: 0 + docs: >- + The interest or principal forfeited because of early withdrawal of + time savings. You may deduct this amount to figure your adjusted gross + income on your income tax return. Value must be in cents. + usSavingsBondsInterest: + type: optional + validation: + min: 0 + docs: >- + Shows interest on U.S. Savings Bonds, Treasury bills, Treasury bonds, + and Treasury notes. This may or may not all be taxable. This interest + is exempt from state and local income taxes. This interest is not + included in `interestIncome`. Value must be in cents. + federalIncomeTaxWithheld: + type: optional + validation: + min: 0 + max: 0 + docs: >- + The federal income tax withheld. A payer must backup withhold on + certain payments if recipient did not provide a TIN to the payer. + Value must be in cents. Abound does not currently support + `federalIncomeTaxWithheld` reporting on the 1099-INT, please contact + us for more information. + investmentExpenses: + type: optional + validation: + min: 0 + docs: >- + Any amount is your share of investment expenses of a singleclass + REMIC. This amount is included in `interestIncome`. *Note: This amount + is not deductible.* Value must be in cents. + foreignTaxPaid: + type: optional + validation: + min: 0 + docs: The foreign tax paid. Value must be in cents. + foreignTaxPaidCountry: + type: optional + validation: + minLength: 2 + maxLength: 2 + docs: The country or U.S. possession to which the foreign tax was paid. + taxExemptInterest: + type: optional + validation: + min: 0 + docs: >- + The tax-exempt interest paid to you during the calendar year by the + payer. This amount may be subject to backup withholding. See + `federalIncomeTaxWithheld` above. Value must be in cents. + specifiedPrivateActivityBondInterest: + type: optional + validation: + min: 0 + docs: >- + The tax-exempt interest subject to the alternative minimum tax. This + amount is included in `taxExemptInterest`. Value must be in cents. + marketDiscount: + type: optional + validation: + min: 0 + docs: >- + For a taxable or tax-exempt covered security, if you made an election + under section 1278(b) to include market discount in income as it + accrues and you notified your payer of the election in writing in + accordance with Regulations section 1.6045-1(n)(5), shows the market + discount that accrued on the debt instrument during the year while + held by you, unless it was reported on Form 1099-OID. Value must be in + cents. + bondPremium: + type: optional + validation: + min: 0 + docs: >- + For a taxable covered security (other than a U.S. Treasury + obligation), shows the amount of premium amortization allocable to the + interest payment(s), unless you notified the payer in writing in + accordance with Regulations section 1.6045-1(n)(5) that you did not + want to amortize bond premium under section 171. Value must be in + cents. + bondPremiumTreasury: + type: optional + validation: + min: 0 + docs: >- + For a U.S. Treasury obligation that is a covered security, shows the + amount of premium amortization allocable to the interest payment(s), + unless you notified the payer in writing in accordance with + Regulations section 1.6045-1(n)(5) that you did not want to amortize + bond premium under section 171. Value must be in cents. + bondPremiumTaxExemptBond: + type: optional + validation: + min: 0 + docs: >- + For a tax-exempt covered security, shows the amount of premium + amortization allocable to the interest payment(s). Value must be in + cents. + stateTaxInfo: + type: list + docs: >- + An array that contains up to two state tax information objects. Abound + currently only supports one state tax information object in this + array. Abound does not currently support state-level tax withholding + reporting on the 1099-INT, please contact us for more information. + Form1099IntRequestSchema: + examples: + - name: RequestCreateExample + value: + filingYear: 2023 + payer: + name: Hooli + tin: '111111111' + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + phoneNumber: '6501014096' + payee: + name: Ada Lovelace + tin: '000000000' + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + formFields: + bondPremium: 19423 + bondPremiumTaxExemptBond: 19423 + bondPremiumTreasury: 19423 + earlyWithdrawalPenalty: 23223 + foreignTaxPaid: 19423 + foreignTaxPaidCountry: FR + hasFatcaFilingRequirement: true + interestIncome: 83232 + investmentExpenses: 19423 + marketDiscount: 19423 + payersRoutingNumber: '054000030' + specifiedPrivateActivityBondInterest: 19423 + taxExemptInterest: 19423 + usSavingsBondsInterest: 19423 + federalIncomeTaxWithheld: 0 + accountNumber: A006SVmcrieFAbm3gsaV + stateTaxInfo: + - filingState: CA + stateTaxWithheld: 0 + extends: form1099s.Form1099BaseRequestSchema + properties: + formFields: Form1099IntFormFieldsRequestSchema + Form1099IntCorrectRequestSchema: + examples: + - name: CorrectRequestExample + value: + payee: + name: Ada Lovelace + tin: '000000000' + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + formFields: + bondPremium: 19423 + bondPremiumTaxExemptBond: 19423 + bondPremiumTreasury: 19423 + earlyWithdrawalPenalty: 23223 + foreignTaxPaid: 19423 + foreignTaxPaidCountry: FR + hasFatcaFilingRequirement: true + interestIncome: 10000 + investmentExpenses: 19423 + marketDiscount: 19423 + payersRoutingNumber: '054000030' + specifiedPrivateActivityBondInterest: 19423 + taxExemptInterest: 19423 + usSavingsBondsInterest: 19423 + federalIncomeTaxWithheld: 0 + accountNumber: A006SVmcrieFAbm3gsaV + stateTaxInfo: + - filingState: CA + extends: form1099s.Form1099BaseCorrectRequestSchema + properties: + formFields: Form1099IntFormFieldsRequestSchema + Form1099IntFormFieldsSchema: + extends: + - form1099s.Form1099FormFieldsBaseSchema + - Form1099IntFormFieldsRequestSchema + Form1099IntSchema: + examples: + - name: CreateResponseExample + value: + id: documentId_samplepWpJ9Snlzb + formFields: + isCorrected: false + isVoid: false + bondPremium: 19423 + bondPremiumTaxExemptBond: 19423 + bondPremiumTreasury: 19423 + earlyWithdrawalPenalty: 23223 + foreignTaxPaid: 19423 + foreignTaxPaidCountry: FR + hasFatcaFilingRequirement: true + interestIncome: 83232 + investmentExpenses: 19423 + marketDiscount: 19423 + payersRoutingNumber: '054000030' + specifiedPrivateActivityBondInterest: 19423 + taxExemptInterest: 19423 + usSavingsBondsInterest: 19423 + federalIncomeTaxWithheld: 0 + accountNumber: A006SVmcrieFAbm3gsaV + stateTaxInfo: + - filingState: CA + stateTaxWithheld: 0 + filingYear: 2023 + createdAt: '2024-01-01T00:00:00.000Z' + status: CREATED + payer: + name: Hooli + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + phoneNumber: '6501014096' + tin: '*******11' + tinType: BUSINESS + tinFingerprint: tinFingerprint_sample847jI1LwxF + tinVerificationId: tinVerificationId_sample1b0E6efa89 + tinVerificationStatus: MATCH + payee: + name: Ada Lovelace + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + tin: '*******00' + tinType: INDIVIDUAL + tinFingerprint: tinFingerprint_samplehy2BWO6JJG + tinVerificationId: tinVerificationId_sample41SD71AV8f + tinVerificationStatus: MATCH + payerUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-COPY-C.pdf + payeeUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-COPY-B.pdf + - name: FileResponseExample + value: + id: documentId_samplepWpJ9Snlzb + formFields: + isCorrected: false + isVoid: false + bondPremium: 19423 + bondPremiumTaxExemptBond: 19423 + bondPremiumTreasury: 19423 + earlyWithdrawalPenalty: 23223 + foreignTaxPaid: 19423 + foreignTaxPaidCountry: FR + hasFatcaFilingRequirement: true + interestIncome: 83232 + investmentExpenses: 19423 + marketDiscount: 19423 + payersRoutingNumber: '054000030' + specifiedPrivateActivityBondInterest: 19423 + taxExemptInterest: 19423 + usSavingsBondsInterest: 19423 + federalIncomeTaxWithheld: 0 + accountNumber: A006SVmcrieFAbm3gsaV + stateTaxInfo: + - filingState: CA + stateTaxWithheld: 0 + filingYear: 2023 + createdAt: '2024-01-01T00:00:00.000Z' + status: FILED + payer: + name: Hooli + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + phoneNumber: '6501014096' + tin: '*******11' + tinType: BUSINESS + tinFingerprint: tinFingerprint_sample847jI1LwxF + tinVerificationId: tinVerificationId_sample1b0E6efa89 + tinVerificationStatus: MATCH + payee: + name: Ada Lovelace + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + tin: '*******00' + tinType: INDIVIDUAL + tinFingerprint: tinFingerprint_samplehy2BWO6JJG + tinVerificationId: tinVerificationId_sample41SD71AV8f + tinVerificationStatus: MATCH + payerUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-COPY-C.pdf + payeeUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-COPY-B.pdf + - name: CorrectResponseExample + value: + id: documentId_samplexc6Aw2Qr9R + correctedFromId: documentId_samplepWpJ9Snlzb + formFields: + isCorrected: true + isVoid: false + bondPremium: 19423 + bondPremiumTaxExemptBond: 19423 + bondPremiumTreasury: 19423 + earlyWithdrawalPenalty: 23223 + foreignTaxPaid: 19423 + foreignTaxPaidCountry: FR + hasFatcaFilingRequirement: true + interestIncome: 10000 + investmentExpenses: 19423 + marketDiscount: 19423 + payersRoutingNumber: '054000030' + specifiedPrivateActivityBondInterest: 19423 + taxExemptInterest: 19423 + usSavingsBondsInterest: 19423 + federalIncomeTaxWithheld: 0 + accountNumber: A006SVmcrieFAbm3gsaV + stateTaxInfo: + - filingState: CA + stateTaxWithheld: 0 + filingYear: 2023 + createdAt: '2024-01-01T00:00:00.000Z' + status: FILED + payer: + name: Hooli + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + phoneNumber: '6501014096' + tin: '*******11' + tinType: BUSINESS + tinFingerprint: tinFingerprint_sample847jI1LwxF + tinVerificationId: tinVerificationId_sample1b0E6efa89 + tinVerificationStatus: MATCH + payee: + name: Ada Lovelace + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + tin: '*******00' + tinType: INDIVIDUAL + tinFingerprint: tinFingerprint_samplehy2BWO6JJG + tinVerificationId: tinVerificationId_sample41SD71AV8f + tinVerificationStatus: MATCH + payerUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-CORRECTED-COPY-C.pdf + payeeUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-CORRECTED-COPY-B.pdf + - name: VoidResponseExample + value: + id: documentId_sampleVwRnewIBMu + voidedFromId: documentId_samplepWpJ9Snlzb + formFields: + isCorrected: false + isVoid: true + bondPremium: 19423 + bondPremiumTaxExemptBond: 19423 + bondPremiumTreasury: 19423 + earlyWithdrawalPenalty: 23223 + foreignTaxPaid: 19423 + foreignTaxPaidCountry: FR + hasFatcaFilingRequirement: true + interestIncome: 83232 + investmentExpenses: 19423 + marketDiscount: 19423 + payersRoutingNumber: '054000030' + specifiedPrivateActivityBondInterest: 19423 + taxExemptInterest: 19423 + usSavingsBondsInterest: 19423 + federalIncomeTaxWithheld: 0 + accountNumber: A006SVmcrieFAbm3gsaV + stateTaxInfo: + - filingState: CA + stateTaxWithheld: 0 + filingYear: 2023 + createdAt: '2024-01-01T00:00:00.000Z' + status: FILED + payer: + name: Hooli + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + phoneNumber: '6501014096' + tin: '*******11' + tinType: BUSINESS + tinFingerprint: tinFingerprint_sample847jI1LwxF + tinVerificationId: tinVerificationId_sample1b0E6efa89 + tinVerificationStatus: MATCH + payee: + name: Ada Lovelace + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + tin: '*******00' + tinType: INDIVIDUAL + tinFingerprint: tinFingerprint_samplehy2BWO6JJG + tinVerificationId: tinVerificationId_sample41SD71AV8f + tinVerificationStatus: MATCH + payerUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-VOID-COPY-C.pdf + payeeUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-VOID-COPY-B.pdf + extends: form1099s.Form1099BaseSchema + properties: + formFields: Form1099IntFormFieldsSchema +service: + auth: false + display-name: 1099-INT + base-path: '' + endpoints: + list: + docs: Returns a list of 1099-INT documents. + method: GET + display-name: List all 1099-INT documents + path: /documents/1099-int + auth: true + request: + name: Form1099IntListRequest + query-parameters: + page: optional + filingYear: optional + payeeTinFingerprint: optional + payerTinFingerprint: optional + status: optional + userId: optional + response: + docs: OK + type: list + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + response: + body: + - $Form1099IntSchema.CreateResponseExample + create: + docs: >- + Creates a 1099-INT document and subsequently kicks off a TIN + Verification, if the name and TIN combo has not been used before. + method: POST + display-name: Create a 1099-INT + path: /documents/1099-int + auth: true + request: + name: Form1099IntRequest + headers: + Idempotency-Key: optional + body: Form1099IntRequestSchema + response: + docs: OK + type: Form1099IntSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + request: $Form1099IntRequestSchema.RequestCreateExample + response: + body: $Form1099IntSchema.CreateResponseExample + mail: + docs: Mails a 1099-INT document. + method: POST + display-name: Mail a 1099-INT + path: /documents/1099-int/{documentId}/mail + path-parameters: + documentId: common.DocumentId + auth: true + request: + name: Form1099IntMailingRequest + headers: + Idempotency-Key: optional + body: mailings.MailingRequestSchema + response: + docs: OK + type: mailings.MailingSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_samplepWpJ9Snlzb + request: + to: + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + name: Ada Lovelace + from: + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + name: Hooli + response: + body: + id: mailingId_sampleFV9b73IvAD + createdAt: '2024-01-01T00:00:00.000Z' + status: CREATED + url: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-1099-COPY-B.pdf + mailedFromId: documentId_sampletTtqNfulW8 + to: + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + name: Ada Lovelace + from: + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + name: Hooli + file: + docs: Files a 1099-INT document. + method: POST + display-name: File a 1099-INT + path: /documents/1099-int/{documentId}/file + path-parameters: + documentId: common.DocumentId + auth: true + request: + name: Form1099IntFileRequest + headers: + Idempotency-Key: optional + response: + type: Form1099IntSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_samplepWpJ9Snlzb + response: + body: $Form1099IntSchema.FileResponseExample + correct: + docs: >- + Files a new corrected 1099-INT and relates it to the original document. + A 1099-INT can be corrected only after it has reached the `FILED` + status. Automatically handles both one-transaction and two-transaction + corrections. + method: POST + display-name: Correct a 1099-INT + path: /documents/1099-int/{documentId}/correct + path-parameters: + documentId: common.DocumentId + auth: true + request: + name: Form1099IntCorrectRequest + headers: + Idempotency-Key: optional + body: Form1099IntCorrectRequestSchema + response: + type: Form1099IntSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_samplepWpJ9Snlzb + request: $Form1099IntCorrectRequestSchema.CorrectRequestExample + response: + body: $Form1099IntSchema.CorrectResponseExample + void: + docs: >- + Files a new voided 1099-INT and relates it to the original document. A + 1099-INT can be voided only after it has reached the `FILED` status. + method: POST + display-name: Void a 1099-INT + path: /documents/1099-int/{documentId}/void + path-parameters: + documentId: common.DocumentId + auth: true + request: + name: Form1099IntVoidRequest + headers: + Idempotency-Key: optional + response: + docs: OK + type: Form1099IntSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_samplepWpJ9Snlzb + response: + body: $Form1099IntSchema.VoidResponseExample + retrieve: + docs: Retrieves the details of an existing 1099-INT document. + method: GET + display-name: Retrieve a 1099-INT + path: /documents/1099-int/{documentId} + path-parameters: + documentId: common.DocumentId + auth: true + response: + docs: OK + type: Form1099IntSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_samplepWpJ9Snlzb + response: + body: $Form1099IntSchema.CreateResponseExample + delete: + docs: >- + Deletes a 1099-INT document. Once an action (`/file`, `/correct`, + `/void`) has been executed on a 1099-INT, it cannot be deleted. + method: DELETE + display-name: Delete a 1099-INT + path: /documents/1099-int/{documentId} + path-parameters: + documentId: common.DocumentId + auth: true + response: + docs: OK + type: common.OkSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_samplepWpJ9Snlzb + response: + body: {} diff --git a/.mock/definition/form-1099-k.yml b/.mock/definition/form-1099-k.yml new file mode 100644 index 00000000..789b4f97 --- /dev/null +++ b/.mock/definition/form-1099-k.yml @@ -0,0 +1,810 @@ +imports: + errors: types/errors.yml + headers: types/headers.yml + common: types/common.yml + form1099s: types/form-1099s.yml + mailings: mailings.yml +types: + Form1099KPayerClassificationEnum: + docs: >- + The type of payer. Payment settlement entity (PSE) or Electronic Payment + Facilitator (EPF)/Other third party. + enum: + - PSE + - EPF_OTHER + Form1099KTransactionsReportedClassificationSchema: + docs: The type of transactions reported. + enum: + - PAYMENT_CARD + - THIRD_PARTY_NETWORK + Form1099KGrossAmountsByMonthSchema: + docs: >- + An object that contains the gross amount of transactions for each month. + At least one month must have a value above zero. Values must be in cents. + properties: + january: + type: optional + validation: + min: 0 + docs: >- + The gross amount of payment card/third party network transactions made + to you in January. Value must be in cents. + february: + type: optional + validation: + min: 0 + docs: >- + The gross amount of payment card/third party network transactions made + to you in February. Value must be in cents. + march: + type: optional + validation: + min: 0 + docs: >- + The gross amount of payment card/third party network transactions made + to you in March. Value must be in cents. + april: + type: optional + validation: + min: 0 + docs: >- + The gross amount of payment card/third party network transactions made + to you in April. Value must be in cents. + may: + type: optional + validation: + min: 0 + docs: >- + The gross amount of payment card/third party network transactions made + to you in May. Value must be in cents. + june: + type: optional + validation: + min: 0 + docs: >- + The gross amount of payment card/third party network transactions made + to you in June. Value must be in cents. + july: + type: optional + validation: + min: 0 + docs: >- + The gross amount of payment card/third party network transactions made + to you in July. Value must be in cents. + august: + type: optional + validation: + min: 0 + docs: >- + The gross amount of payment card/third party network transactions made + to you in August. Value must be in cents. + september: + type: optional + validation: + min: 0 + docs: >- + The gross amount of payment card/third party network transactions made + to you in September. Value must be in cents. + october: + type: optional + validation: + min: 0 + docs: >- + The gross amount of payment card/third party network transactions made + to you in October. Value must be in cents. + november: + type: optional + validation: + min: 0 + docs: >- + The gross amount of payment card/third party network transactions made + to you in November. Value must be in cents. + december: + type: optional + validation: + min: 0 + docs: >- + The gross amount of payment card/third party network transactions made + to you in December. Value must be in cents. + Form1099KFormFieldsRequestSchema: + docs: The 1099-K form fields. + properties: + payerClassification: + type: Form1099KPayerClassificationEnum + transactionsReportedClassification: + type: Form1099KTransactionsReportedClassificationSchema + pseName: + type: optional + docs: >- + The payment settlement entity name. Required if `payerClassification` + is `PSE`. + psePhoneNumber: + type: optional + docs: >- + The payment settlement entity phone number. Required if + `payerClassification` is `PSE`. + accountNumber: optional + aggregateGrossAmount: + type: integer + validation: + min: 0 + docs: >- + Aggregate gross amount of payment card/third party network + transactions made to you through the PSE during the calendar year. + Value must be in cents. + aggregateGrossAmountCardNotPresent: + type: integer + validation: + min: 0 + docs: >- + The aggregate gross amount of all reportable payment transactions made + to you through the PSE during the calendar year where the card was not + present at the time of the transaction or the card number was keyed + into the terminal. Typically, this relates to online sales, phone + sales, or catalogue sales. If `transactionsReportedClassification` is + `thirdPartyNetwork`, or if these are third party network transactions, + card not present transactions will not be reported. Value must be in + cents. + merchantCategoryCode: + type: string + validation: + minLength: 4 + maxLength: 4 + pattern: ^\d{4}$ + docs: >- + Payment brands use merchant category codes (MCCs) to classify + merchants and businesses by the type of goods or services provided. It + is a four (4) digit code. This may be left blank. + numberOfPaymentTransactions: + type: integer + validation: + min: 0 + docs: >- + The number of payment transactions (not including refund transactions) + processed through the payment card/third party network. + federalIncomeTaxWithheld: + type: optional + validation: + min: 0 + max: 0 + docs: >- + The federal income tax withheld. Generally, a payer must backup + withhold if you did not furnish your TIN or you did not furnish the + correct TIN to the payer. Value must be in cents. Abound does not + currently support `federalIncomeTaxWithheld` reporting on the 1099-K, + please contact us for more information. + grossAmountsByMonth: + type: Form1099KGrossAmountsByMonthSchema + stateTaxInfo: + type: list + docs: >- + An array that contains up to two state tax information objects. Abound + currently only supports one state tax information object in this + array. Abound does not currently support state-level tax withholding + reporting on the 1099-K, please contact us for more information. + Form1099KRequestSchema: + examples: + - name: RequestCreateExample + value: + filingYear: 2023 + payer: + name: Hooli + tin: '111111111' + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + phoneNumber: '6501014096' + payee: + name: Ada Lovelace + tin: '000000000' + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + formFields: + accountNumber: A0MCFOfvWWL7AVtwrhiU + aggregateGrossAmount: 27987876 + aggregateGrossAmountCardNotPresent: 2332323 + federalIncomeTaxWithheld: 0 + merchantCategoryCode: '4582' + numberOfPaymentTransactions: 767 + pseName: Payment Entity + payerClassification: PSE + transactionsReportedClassification: PAYMENT_CARD + psePhoneNumber: '5555555555' + grossAmountsByMonth: + april: 2332323 + august: 2332323 + december: 2332323 + february: 2332323 + january: 2332323 + july: 2332323 + june: 2332323 + march: 2332323 + may: 2332323 + november: 2332323 + october: 2332323 + september: 2332323 + stateTaxInfo: + - filingState: CA + stateTaxWithheld: 0 + extends: form1099s.Form1099BaseRequestSchema + properties: + formFields: Form1099KFormFieldsRequestSchema + Form1099KCorrectRequestSchema: + examples: + - name: CorrectRequestExample + value: + payee: + name: Ada Lovelace + tin: '000000000' + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + formFields: + accountNumber: A0MCFOfvWWL7AVtwrhiU + aggregateGrossAmount: 25655553 + aggregateGrossAmountCardNotPresent: 25655553 + federalIncomeTaxWithheld: 0 + merchantCategoryCode: '4582' + numberOfPaymentTransactions: 767 + pseName: Payment Entity + payerClassification: PSE + transactionsReportedClassification: PAYMENT_CARD + psePhoneNumber: '5555555555' + grossAmountsByMonth: + april: 2332323 + august: 2332323 + december: 2332323 + february: 2332323 + january: 0 + july: 2332323 + june: 2332323 + march: 2332323 + may: 2332323 + november: 2332323 + october: 2332323 + september: 2332323 + stateTaxInfo: + - filingState: CA + extends: form1099s.Form1099BaseCorrectRequestSchema + properties: + formFields: Form1099KFormFieldsRequestSchema + Form1099KFormFieldsSchema: + extends: + - form1099s.Form1099FormFieldsBaseSchema + - Form1099KFormFieldsRequestSchema + Form1099KSchema: + examples: + - name: CreateResponseExample + value: + id: documentId_sampletTtqNfulW8 + formFields: + isCorrected: false + isVoid: false + accountNumber: A0MCFOfvWWL7AVtwrhiU + aggregateGrossAmount: 27987876 + aggregateGrossAmountCardNotPresent: 2332323 + federalIncomeTaxWithheld: 0 + merchantCategoryCode: '4582' + numberOfPaymentTransactions: 767 + pseName: Payment Entity + payerClassification: PSE + transactionsReportedClassification: PAYMENT_CARD + psePhoneNumber: '5555555555' + grossAmountsByMonth: + april: 2332323 + august: 2332323 + december: 2332323 + february: 2332323 + january: 2332323 + july: 2332323 + june: 2332323 + march: 2332323 + may: 2332323 + november: 2332323 + october: 2332323 + september: 2332323 + stateTaxInfo: + - filingState: CA + stateTaxWithheld: 0 + filingYear: 2023 + createdAt: '2024-01-01T00:00:00.000Z' + status: CREATED + payer: + name: Hooli + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + phoneNumber: '6501014096' + tin: '*******11' + tinType: BUSINESS + tinFingerprint: tinFingerprint_sample847jI1LwxF + tinVerificationId: tinVerificationId_sample1b0E6efa89 + tinVerificationStatus: MATCH + payee: + name: Ada Lovelace + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + tin: '*******00' + tinType: INDIVIDUAL + tinFingerprint: tinFingerprint_samplehy2BWO6JJG + tinVerificationId: tinVerificationId_sample41SD71AV8f + tinVerificationStatus: MATCH + payerUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-COPY-C.pdf + payeeUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-COPY-B.pdf + - name: FileResponseExample + value: + id: documentId_sampletTtqNfulW8 + formFields: + isCorrected: false + isVoid: false + accountNumber: A0MCFOfvWWL7AVtwrhiU + aggregateGrossAmount: 27987876 + aggregateGrossAmountCardNotPresent: 2332323 + federalIncomeTaxWithheld: 0 + merchantCategoryCode: '4582' + numberOfPaymentTransactions: 767 + pseName: Payment Entity + payerClassification: PSE + transactionsReportedClassification: PAYMENT_CARD + psePhoneNumber: '5555555555' + grossAmountsByMonth: + april: 2332323 + august: 2332323 + december: 2332323 + february: 2332323 + january: 2332323 + july: 2332323 + june: 2332323 + march: 2332323 + may: 2332323 + november: 2332323 + october: 2332323 + september: 2332323 + stateTaxInfo: + - filingState: CA + stateTaxWithheld: 0 + filingYear: 2023 + createdAt: '2024-01-01T00:00:00.000Z' + status: FILED + payer: + name: Hooli + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + phoneNumber: '6501014096' + tin: '*******11' + tinType: BUSINESS + tinFingerprint: tinFingerprint_sample847jI1LwxF + tinVerificationId: tinVerificationId_sample1b0E6efa89 + tinVerificationStatus: MATCH + payee: + name: Ada Lovelace + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + tin: '*******00' + tinType: INDIVIDUAL + tinFingerprint: tinFingerprint_samplehy2BWO6JJG + tinVerificationId: tinVerificationId_sample41SD71AV8f + tinVerificationStatus: MATCH + payerUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-COPY-C.pdf + payeeUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-COPY-B.pdf + - name: CorrectResponseExample + value: + id: documentId_samplenOHhUUVnh6 + correctedFromId: documentId_sampletTtqNfulW8 + formFields: + isCorrected: true + isVoid: false + accountNumber: A0MCFOfvWWL7AVtwrhiU + aggregateGrossAmount: 25655553 + aggregateGrossAmountCardNotPresent: 25655553 + federalIncomeTaxWithheld: 0 + merchantCategoryCode: '4582' + numberOfPaymentTransactions: 767 + pseName: Payment Entity + payerClassification: PSE + transactionsReportedClassification: PAYMENT_CARD + psePhoneNumber: '5555555555' + grossAmountsByMonth: + april: 2332323 + august: 2332323 + december: 2332323 + february: 2332323 + january: 0 + july: 2332323 + june: 2332323 + march: 2332323 + may: 2332323 + november: 2332323 + october: 2332323 + september: 2332323 + stateTaxInfo: + - filingState: CA + stateTaxWithheld: 0 + filingYear: 2023 + createdAt: '2024-01-01T00:00:00.000Z' + status: FILED + payer: + name: Hooli + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + phoneNumber: '6501014096' + tin: '*******11' + tinType: BUSINESS + tinFingerprint: tinFingerprint_sample847jI1LwxF + tinVerificationId: tinVerificationId_sample1b0E6efa89 + tinVerificationStatus: MATCH + payee: + name: Ada Lovelace + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + tin: '*******00' + tinType: INDIVIDUAL + tinFingerprint: tinFingerprint_samplehy2BWO6JJG + tinVerificationId: tinVerificationId_sample41SD71AV8f + tinVerificationStatus: MATCH + payerUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-CORRECTED-COPY-C.pdf + payeeUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-CORRECTED-COPY-B.pdf + - name: VoidResponseExample + value: + id: documentId_sampleb6HQLsVuM9 + voidedFromId: documentId_sampletTtqNfulW8 + formFields: + isCorrected: false + isVoid: true + accountNumber: A0MCFOfvWWL7AVtwrhiU + aggregateGrossAmount: 27987876 + aggregateGrossAmountCardNotPresent: 2332323 + federalIncomeTaxWithheld: 0 + merchantCategoryCode: '4582' + numberOfPaymentTransactions: 767 + pseName: Payment Entity + payerClassification: PSE + transactionsReportedClassification: PAYMENT_CARD + psePhoneNumber: '5555555555' + grossAmountsByMonth: + april: 2332323 + august: 2332323 + december: 2332323 + february: 2332323 + january: 2332323 + july: 2332323 + june: 2332323 + march: 2332323 + may: 2332323 + november: 2332323 + october: 2332323 + september: 2332323 + stateTaxInfo: + - filingState: CA + stateTaxWithheld: 0 + filingYear: 2023 + createdAt: '2024-01-01T00:00:00.000Z' + status: FILED + payer: + name: Hooli + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + phoneNumber: '6501014096' + tin: '*******11' + tinType: BUSINESS + tinFingerprint: tinFingerprint_sample847jI1LwxF + tinVerificationId: tinVerificationId_sample1b0E6efa89 + tinVerificationStatus: MATCH + payee: + name: Ada Lovelace + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + tin: '*******00' + tinType: INDIVIDUAL + tinFingerprint: tinFingerprint_samplehy2BWO6JJG + tinVerificationId: tinVerificationId_sample41SD71AV8f + tinVerificationStatus: MATCH + payerUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-VOID-COPY-C.pdf + payeeUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-VOID-COPY-B.pdf + extends: form1099s.Form1099BaseSchema + properties: + formFields: Form1099KFormFieldsSchema +service: + auth: false + display-name: 1099-K + base-path: '' + endpoints: + list: + docs: Returns a list of 1099-K documents. + method: GET + display-name: List all 1099-K documents + path: /documents/1099-k + auth: true + request: + name: Form1099KListRequest + query-parameters: + page: optional + filingYear: optional + payeeTinFingerprint: optional + payerTinFingerprint: optional + status: optional + userId: optional + response: + docs: OK + type: list + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + response: + body: + - $Form1099KSchema.CreateResponseExample + create: + docs: >- + Creates a 1099-K document and subsequently kicks off a TIN Verification, + if the name and TIN combo has not been used before. + method: POST + display-name: Create a 1099-K + path: /documents/1099-k + auth: true + request: + name: Form1099KRequest + headers: + Idempotency-Key: optional + body: Form1099KRequestSchema + response: + docs: OK + type: Form1099KSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + request: $Form1099KRequestSchema.RequestCreateExample + response: + body: $Form1099KSchema.CreateResponseExample + mail: + docs: Mails a 1099-K document. + method: POST + display-name: Mail a 1099-K + path: /documents/1099-k/{documentId}/mail + path-parameters: + documentId: common.DocumentId + auth: true + request: + name: Form1099KMailingRequest + headers: + Idempotency-Key: optional + body: mailings.MailingRequestSchema + response: + docs: OK + type: mailings.MailingSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_sampletTtqNfulW8 + request: + to: + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + name: Ada Lovelace + from: + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + name: Hooli + response: + body: + id: mailingId_sampleFV9b73IvAD + createdAt: '2024-01-01T00:00:00.000Z' + status: CREATED + url: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-1099-COPY-B.pdf + mailedFromId: documentId_sampletTtqNfulW8 + to: + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + name: Ada Lovelace + from: + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + name: Hooli + file: + docs: Files a 1099-K document. + method: POST + display-name: File a 1099-K + path: /documents/1099-k/{documentId}/file + path-parameters: + documentId: common.DocumentId + auth: true + request: + name: Form1099KFileRequest + headers: + Idempotency-Key: optional + response: + type: Form1099KSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_sampletTtqNfulW8 + response: + body: $Form1099KSchema.FileResponseExample + correct: + docs: >- + Files a new corrected 1099-K and relates it to the original document. A + 1099-K can be corrected only after it has reached the `FILED` status. + Automatically handles both one-transaction and two-transaction + corrections. + method: POST + display-name: Correct a 1099-K + path: /documents/1099-k/{documentId}/correct + path-parameters: + documentId: common.DocumentId + auth: true + request: + name: Form1099KCorrectRequest + headers: + Idempotency-Key: optional + body: Form1099KCorrectRequestSchema + response: + type: Form1099KSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_sampletTtqNfulW8 + request: $Form1099KCorrectRequestSchema.CorrectRequestExample + response: + body: $Form1099KSchema.CorrectResponseExample + void: + docs: >- + Files a new voided 1099-K and relates it to the original document. A + 1099-K can be voided only after it has reached the `FILED` status. + method: POST + display-name: Void a 1099-K + path: /documents/1099-k/{documentId}/void + path-parameters: + documentId: common.DocumentId + auth: true + request: + name: Form1099KVoidRequest + headers: + Idempotency-Key: optional + response: + docs: OK + type: Form1099KSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_sampletTtqNfulW8 + response: + body: $Form1099KSchema.VoidResponseExample + retrieve: + docs: Retrieves the details of an existing 1099-K document. + method: GET + display-name: Retrieve a 1099-K + path: /documents/1099-k/{documentId} + path-parameters: + documentId: common.DocumentId + auth: true + response: + docs: OK + type: Form1099KSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_sampletTtqNfulW8 + response: + body: $Form1099KSchema.CreateResponseExample + delete: + docs: >- + Deletes a 1099-K document. Once an action (`/file`, `/correct`, `/void`) + has been executed on a 1099-K, it cannot be deleted. + method: DELETE + display-name: Delete a 1099-K + path: /documents/1099-k/{documentId} + path-parameters: + documentId: common.DocumentId + auth: true + response: + docs: OK + type: common.OkSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_sampletTtqNfulW8 + response: + body: {} diff --git a/.mock/definition/form-1099-misc.yml b/.mock/definition/form-1099-misc.yml new file mode 100644 index 00000000..ba6ed5d8 --- /dev/null +++ b/.mock/definition/form-1099-misc.yml @@ -0,0 +1,718 @@ +imports: + errors: types/errors.yml + headers: types/headers.yml + common: types/common.yml + form1099s: types/form-1099s.yml + mailings: mailings.yml +types: + Form1099MiscFormFieldsRequestSchema: + docs: The 1099-MISC form fields. + properties: + hasFatcaFilingRequirement: + type: optional + docs: >- + If the FATCA filing requirement box is checked, the payer is reporting + on this Form 1099 to satisfy its account reporting requirement under + chapter 4 of the Internal Revenue Code. You may also have a filing + requirement. See the Instructions for Form 8938. + accountNumber: + type: optional + validation: + maxLength: 20 + docs: >- + May show an account or other unique number the payer assigned to + distinguish your account. This field is also required if `fatca` is + `true`. Abound will auto-generated this field if not provided. + rents: + type: optional + docs: >- + Report rents from real estate on Schedule E (Form 1040). However, + report rents on Schedule C (Form 1040) if you provided significant + services to the tenant, sold real estate as a business, or rented + personal property as a business. Value must be in cents. + royalties: + type: optional + docs: >- + Report royalties from oil, gas, or mineral properties; copyrights; and + patents on Schedule E (Form 1040). However, report payments for a + working interest as explained in the Schedule E (Form 1040) + instructions. For royalties on timber, coal, and iron ore, see Pub. + 544. Value must be in cents. + otherIncome: + type: optional + docs: >- + Generally, report this amount on the “Other income” line of Schedule 1 + (Form 1040) and identify the payment. The amount shown may be payments + received as the beneficiary of a deceased employee, prizes, awards, + taxable damages, Indian gaming profits, or other taxable income. See + Pub. 525. If it is trade or business income, report this amount on + Schedule C or F (Form 1040). Value must be in cents. + federalIncomeTaxWithheld: + type: optional + docs: >- + Shows backup withholding or withholding on Indian gaming + profits.Generally, a payer must backup withhold if you did not furnish + your TIN. See Form W-9 and Pub. 505 for more information. Report this + amount on your income tax return as tax withheld. Abound does not + currently support `federalIncomeTaxWithheld` reporting on the + 1099-MISC, please contact us for more information. + fishingBoatProceeds: + type: optional + docs: >- + Shows the amount paid to you as a fishing boat crew member by the + operator, who considers you to be self-employed. Self-employed + individuals must report this amount on Schedule C (Form 1040). See + Pub. 334. Value must be in cents. + medicalAndHealthCarePayments: + type: optional + docs: >- + For individuals, report on Schedule C (Form 1040). Value must be in + cents. Value must be in cents. + hasDirectSalesOver5000: + type: optional + docs: >- + If checked, consumer products totaling $5,000 or more were sold to you + for resale, on a buy-sell, a deposit-commission, or other basis. + Generally, report any income from your sale of these products on + Schedule C (Form 1040). + substitutePaymentsInLieuOfDividendsOrInterest: + type: optional + docs: >- + Shows substitute payments in lieu of dividends or tax-exempt interest + received by your broker on your behalf as a result of a loan of your + securities. Report on the “Other income” line of Schedule 1 (Form + 1040). Value must be in cents. + cropInsuranceProceeds: + type: optional + docs: Report this amount on Schedule F (Form 1040). Value must be in cents. + grossProceedsPaidToAnAttorney: + type: optional + docs: >- + Shows gross proceeds paid to an attorney in connection with legal + services. Report only the taxable part as income on your return. Value + must be in cents. + fishPurchasedForResale: + type: optional + docs: >- + Shows the amount of cash you received for the sale of fish if you are + in the trade or business of catching fish. Value must be in cents. + section409ADeferrals: + type: optional + docs: >- + May show current year deferrals as a nonemployee under a nonqualified + deferred compensation (NQDC) plan that is subject to the requirements + of section 409A plus any earnings on current and prior year + deferrals. Value must be in cents. + excessGoldenParachutePayments: + type: optional + docs: >- + Shows your total compensation of excess golden parachute payments + subject to a 20% excise tax. See your tax return instructions for + where to report. Value must be in cents. + nonqualifiedDeferredCompensation: + type: optional + docs: >- + Shows income as a nonemployee under an NQDC plan that does not meet + the requirements of section 409A. Any amount included in box 12 that + is currently taxable is also included in this box. Report this amount + as income on your tax return. This income is also subject to a + substantial additional tax to be reported on Form 1040, 1040-SR, or + 1040-NR. See the instructions for your tax return. Value must be in + cents. + stateTaxInfo: + type: list + docs: >- + An array that contains up to two state tax information objects. Abound + currently only supports one state tax information object in this + array. Abound does not currently support state-level tax withholding + reporting on the 1099-MISC, please contact us for more information. + Form1099MiscRequestSchema: + examples: + - name: RequestCreateExample + value: + filingYear: 2023 + payer: + name: Hooli + tin: '111111111' + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + phoneNumber: '6501014096' + payee: + name: Ada Lovelace + tin: '000000000' + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + formFields: + cropInsuranceProceeds: 97109 + excessGoldenParachutePayments: 97109 + federalIncomeTaxWithheld: 0 + fishPurchasedForResale: 97109 + fishingBoatProceeds: 97109 + grossProceedsPaidToAnAttorney: 97109 + hasDirectSalesOver5000: false + hasFatcaFilingRequirement: true + medicalAndHealthCarePayments: 97109 + nonqualifiedDeferredCompensation: 97109 + substitutePaymentsInLieuOfDividendsOrInterest: 97109 + otherIncome: 97109 + rents: 97109 + royalties: 97109 + section409ADeferrals: 97109 + accountNumber: A00AskD1ZTO4YB8oBHav + stateTaxInfo: + - filingState: CA + stateIncome: 345543 + stateTaxWithheld: 0 + extends: form1099s.Form1099BaseRequestSchema + properties: + formFields: Form1099MiscFormFieldsRequestSchema + Form1099MiscCorrectRequestSchema: + examples: + - name: CorrectRequestExample + value: + payee: + name: Ada Lovelace + tin: '000000000' + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + formFields: + cropInsuranceProceeds: 97109 + excessGoldenParachutePayments: 97109 + federalIncomeTaxWithheld: 0 + fishPurchasedForResale: 97109 + fishingBoatProceeds: 97109 + grossProceedsPaidToAnAttorney: 97109 + hasDirectSalesOver5000: false + hasFatcaFilingRequirement: true + medicalAndHealthCarePayments: 97109 + nonqualifiedDeferredCompensation: 97109 + substitutePaymentsInLieuOfDividendsOrInterest: 97109 + otherIncome: 97109 + rents: 10000 + royalties: 97109 + section409ADeferrals: 97109 + accountNumber: A00AskD1ZTO4YB8oBHav + stateTaxInfo: + - filingState: CA + stateIncome: 258434 + extends: form1099s.Form1099BaseCorrectRequestSchema + properties: + formFields: Form1099MiscFormFieldsRequestSchema + Form1099MiscFormFieldsSchema: + extends: + - form1099s.Form1099FormFieldsBaseSchema + - Form1099MiscFormFieldsRequestSchema + Form1099MiscSchema: + examples: + - name: CreateResponseExample + value: + id: documentId_sampleGNPOKNmIgF + formFields: + isCorrected: false + isVoid: false + cropInsuranceProceeds: 97109 + excessGoldenParachutePayments: 97109 + federalIncomeTaxWithheld: 0 + fishPurchasedForResale: 97109 + fishingBoatProceeds: 97109 + grossProceedsPaidToAnAttorney: 97109 + hasDirectSalesOver5000: false + hasFatcaFilingRequirement: true + medicalAndHealthCarePayments: 97109 + nonqualifiedDeferredCompensation: 97109 + substitutePaymentsInLieuOfDividendsOrInterest: 97109 + otherIncome: 97109 + rents: 97109 + royalties: 97109 + section409ADeferrals: 97109 + accountNumber: A00AskD1ZTO4YB8oBHav + stateTaxInfo: + - filingState: CA + stateIncome: 345543 + stateTaxWithheld: 0 + filingYear: 2023 + createdAt: '2024-01-01T00:00:00.000Z' + status: CREATED + payer: + name: Hooli + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + phoneNumber: '6501014096' + tin: '*******11' + tinType: BUSINESS + tinFingerprint: tinFingerprint_sample847jI1LwxF + tinVerificationId: tinVerificationId_sample1b0E6efa89 + tinVerificationStatus: MATCH + payee: + name: Ada Lovelace + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + tin: '*******00' + tinType: INDIVIDUAL + tinFingerprint: tinFingerprint_samplehy2BWO6JJG + tinVerificationId: tinVerificationId_sample41SD71AV8f + tinVerificationStatus: MATCH + payerUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-COPY-C.pdf + payeeUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-COPY-B.pdf + - name: FileResponseExample + value: + id: documentId_sampleGNPOKNmIgF + formFields: + isCorrected: false + isVoid: false + cropInsuranceProceeds: 97109 + excessGoldenParachutePayments: 97109 + federalIncomeTaxWithheld: 0 + fishPurchasedForResale: 97109 + fishingBoatProceeds: 97109 + grossProceedsPaidToAnAttorney: 97109 + hasDirectSalesOver5000: false + hasFatcaFilingRequirement: true + medicalAndHealthCarePayments: 97109 + nonqualifiedDeferredCompensation: 97109 + substitutePaymentsInLieuOfDividendsOrInterest: 97109 + otherIncome: 97109 + rents: 97109 + royalties: 97109 + section409ADeferrals: 97109 + accountNumber: A00AskD1ZTO4YB8oBHav + stateTaxInfo: + - filingState: CA + stateIncome: 345543 + stateTaxWithheld: 0 + filingYear: 2023 + createdAt: '2024-01-01T00:00:00.000Z' + status: FILED + payer: + name: Hooli + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + phoneNumber: '6501014096' + tin: '*******11' + tinType: BUSINESS + tinFingerprint: tinFingerprint_sample847jI1LwxF + tinVerificationId: tinVerificationId_sample1b0E6efa89 + tinVerificationStatus: MATCH + payee: + name: Ada Lovelace + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + tin: '*******00' + tinType: INDIVIDUAL + tinFingerprint: tinFingerprint_samplehy2BWO6JJG + tinVerificationId: tinVerificationId_sample41SD71AV8f + tinVerificationStatus: MATCH + payerUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-COPY-C.pdf + payeeUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-COPY-B.pdf + - name: CorrectResponseExample + value: + id: documentId_sampleaTA4jltVVx + correctedFromId: documentId_sampleGNPOKNmIgF + formFields: + isCorrected: true + isVoid: false + cropInsuranceProceeds: 97109 + excessGoldenParachutePayments: 97109 + federalIncomeTaxWithheld: 0 + fishPurchasedForResale: 97109 + fishingBoatProceeds: 97109 + grossProceedsPaidToAnAttorney: 97109 + hasDirectSalesOver5000: false + hasFatcaFilingRequirement: true + medicalAndHealthCarePayments: 97109 + nonqualifiedDeferredCompensation: 97109 + substitutePaymentsInLieuOfDividendsOrInterest: 97109 + otherIncome: 97109 + rents: 10000 + royalties: 97109 + section409ADeferrals: 97109 + accountNumber: A00AskD1ZTO4YB8oBHav + stateTaxInfo: + - filingState: CA + stateIncome: 258434 + stateTaxWithheld: 0 + filingYear: 2023 + createdAt: '2024-01-01T00:00:00.000Z' + status: FILED + payer: + name: Hooli + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + phoneNumber: '6501014096' + tin: '*******11' + tinType: BUSINESS + tinFingerprint: tinFingerprint_sample847jI1LwxF + tinVerificationId: tinVerificationId_sample1b0E6efa89 + tinVerificationStatus: MATCH + payee: + name: Ada Lovelace + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + tin: '*******00' + tinType: INDIVIDUAL + tinFingerprint: tinFingerprint_samplehy2BWO6JJG + tinVerificationId: tinVerificationId_sample41SD71AV8f + tinVerificationStatus: MATCH + payerUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-CORRECTED-COPY-C.pdf + payeeUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-CORRECTED-COPY-B.pdf + - name: VoidResponseExample + value: + id: documentId_sampleStGnVcbd57 + voidedFromId: documentId_sampleGNPOKNmIgF + formFields: + isCorrected: false + isVoid: true + cropInsuranceProceeds: 97109 + excessGoldenParachutePayments: 97109 + federalIncomeTaxWithheld: 0 + fishPurchasedForResale: 97109 + fishingBoatProceeds: 97109 + grossProceedsPaidToAnAttorney: 97109 + hasDirectSalesOver5000: false + hasFatcaFilingRequirement: true + medicalAndHealthCarePayments: 97109 + nonqualifiedDeferredCompensation: 97109 + substitutePaymentsInLieuOfDividendsOrInterest: 97109 + otherIncome: 97109 + rents: 97109 + royalties: 97109 + section409ADeferrals: 97109 + accountNumber: A00AskD1ZTO4YB8oBHav + stateTaxInfo: + - filingState: CA + stateIncome: 345543 + stateTaxWithheld: 0 + filingYear: 2023 + createdAt: '2024-01-01T00:00:00.000Z' + status: FILED + payer: + name: Hooli + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + phoneNumber: '6501014096' + tin: '*******11' + tinType: BUSINESS + tinFingerprint: tinFingerprint_sample847jI1LwxF + tinVerificationId: tinVerificationId_sample1b0E6efa89 + tinVerificationStatus: MATCH + payee: + name: Ada Lovelace + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + tin: '*******00' + tinType: INDIVIDUAL + tinFingerprint: tinFingerprint_samplehy2BWO6JJG + tinVerificationId: tinVerificationId_sample41SD71AV8f + tinVerificationStatus: MATCH + payerUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-VOID-COPY-C.pdf + payeeUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-VOID-COPY-B.pdf + extends: form1099s.Form1099BaseSchema + properties: + formFields: Form1099MiscFormFieldsSchema +service: + auth: false + display-name: 1099-MISC + base-path: '' + endpoints: + list: + docs: Returns a list of 1099-MISC documents. + method: GET + display-name: List all 1099-MISC documents + path: /documents/1099-misc + auth: true + request: + name: Form1099MiscListRequest + query-parameters: + page: optional + filingYear: optional + payeeTinFingerprint: optional + payerTinFingerprint: optional + status: optional + userId: optional + response: + docs: OK + type: list + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + response: + body: + - $Form1099MiscSchema.CreateResponseExample + create: + docs: >- + Creates a 1099-MISC document and subsequently kicks off a TIN + Verification, if the name and TIN combo has not been used before. + method: POST + display-name: Create a 1099-MISC + path: /documents/1099-misc + auth: true + request: + name: Form1099MiscRequest + headers: + Idempotency-Key: optional + body: Form1099MiscRequestSchema + response: + docs: OK + type: Form1099MiscSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + request: $Form1099MiscRequestSchema.RequestCreateExample + response: + body: $Form1099MiscSchema.CreateResponseExample + mail: + docs: Mails a 1099-MISC document. + method: POST + display-name: Mail a 1099-MISC + path: /documents/1099-misc/{documentId}/mail + path-parameters: + documentId: common.DocumentId + auth: true + request: + name: Form1099MiscMailingRequest + headers: + Idempotency-Key: optional + body: mailings.MailingRequestSchema + response: + docs: OK + type: mailings.MailingSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_sampleGNPOKNmIgF + request: + to: + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + name: Ada Lovelace + from: + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + name: Hooli + response: + body: + id: mailingId_sampleFV9b73IvAD + createdAt: '2024-01-01T00:00:00.000Z' + status: CREATED + url: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-1099-COPY-B.pdf + mailedFromId: documentId_sampletTtqNfulW8 + to: + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + name: Ada Lovelace + from: + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + name: Hooli + file: + docs: Files a 1099-MISC document. + method: POST + display-name: File a 1099-MISC + path: /documents/1099-misc/{documentId}/file + path-parameters: + documentId: common.DocumentId + auth: true + request: + name: Form1099MiscFileRequest + headers: + Idempotency-Key: optional + response: + type: Form1099MiscSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_sampleGNPOKNmIgF + response: + body: $Form1099MiscSchema.FileResponseExample + correct: + docs: >- + Files a new corrected 1099-MISC and relates it to the original document. + A 1099-MISC can be corrected only after it has reached the `FILED` + status. Automatically handles both one-transaction and two-transaction + corrections. + method: POST + display-name: Correct a 1099-MISC + path: /documents/1099-misc/{documentId}/correct + path-parameters: + documentId: common.DocumentId + auth: true + request: + name: Form1099MiscCorrectRequest + headers: + Idempotency-Key: optional + body: Form1099MiscCorrectRequestSchema + response: + type: Form1099MiscSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_sampleGNPOKNmIgF + request: $Form1099MiscCorrectRequestSchema.CorrectRequestExample + response: + body: $Form1099MiscSchema.CorrectResponseExample + void: + docs: >- + Files a new voided 1099-MISC and relates it to the original document. A + 1099-MISC can be voided only after it has reached the `FILED` status. + method: POST + display-name: Void a 1099-MISC + path: /documents/1099-misc/{documentId}/void + path-parameters: + documentId: common.DocumentId + auth: true + request: + name: Form1099MiscVoidRequest + headers: + Idempotency-Key: optional + response: + docs: OK + type: Form1099MiscSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_sampleGNPOKNmIgF + response: + body: $Form1099MiscSchema.VoidResponseExample + retrieve: + docs: Retrieves the details of an existing 1099-MISC document. + method: GET + display-name: Retrieve a 1099-MISC + path: /documents/1099-misc/{documentId} + path-parameters: + documentId: common.DocumentId + auth: true + response: + docs: OK + type: Form1099MiscSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_sampleGNPOKNmIgF + response: + body: $Form1099MiscSchema.CreateResponseExample + delete: + docs: >- + Deletes a 1099-MISC document. Once an action (`/file`, `/correct`, + `/void`) has been executed on a 1099-MISC, it cannot be deleted. + method: DELETE + display-name: Delete a 1099-MISC + path: /documents/1099-misc/{documentId} + path-parameters: + documentId: common.DocumentId + auth: true + response: + docs: OK + type: common.OkSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_sampleGNPOKNmIgF + response: + body: {} diff --git a/.mock/definition/form-1099-nec.yml b/.mock/definition/form-1099-nec.yml new file mode 100644 index 00000000..f76880cf --- /dev/null +++ b/.mock/definition/form-1099-nec.yml @@ -0,0 +1,564 @@ +imports: + errors: types/errors.yml + headers: types/headers.yml + common: types/common.yml + form1099s: types/form-1099s.yml + mailings: mailings.yml +types: + Form1099NecFormFieldsRequestSchema: + docs: The 1099-NEC form fields. + properties: + accountNumber: + type: optional + validation: + maxLength: 20 + docs: >- + If the payer assigns the contractor a unique number for its records, + enter the account number in this box. If not, leave the box blank. + nonemployeeCompensation: + type: optional + validation: + min: 0 + docs: >- + The total amount remitted by payer to recipient during the year. Value + must be in cents. + hasDirectSalesOver5000: + type: optional + docs: >- + If `true`, consumer products totaling $5,000 or more were sold to + recipient for resale, on a buy-sell, a deposit-commission, or other + basis. + federalIncomeTaxWithheld: + type: optional + validation: + min: 0 + max: 0 + docs: >- + The federal income tax withheld. A payer must backup withhold on + certain payments if recipient did not provide a TIN to the payer. + Value must be in cents. Abound does not currently support + `federalIncomeTaxWithheld` reporting on the 1099-NEC, please contact + us for more information. + stateTaxInfo: + type: list + docs: >- + An array that contains up to two state tax information objects. Abound + currently only supports one state tax information object in this + array. Abound does not currently support state-level tax withholding + reporting on the 1099-NEC, please contact us for more information. + Form1099NecRequestSchema: + examples: + - name: RequestCreateExample + value: + filingYear: 2023 + payer: + name: Hooli + tin: '111111111' + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + phoneNumber: '6501014096' + payee: + name: Ada Lovelace + tin: '000000000' + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + formFields: + nonemployeeCompensation: 23423 + hasDirectSalesOver5000: false + federalIncomeTaxWithheld: 0 + accountNumber: A0NEqtav7n0sBGoq88w0 + stateTaxInfo: + - filingState: CA + stateIncome: 23423 + stateTaxWithheld: 0 + extends: form1099s.Form1099BaseRequestSchema + properties: + formFields: Form1099NecFormFieldsRequestSchema + Form1099NecCorrectRequestSchema: + examples: + - name: CorrectRequestExample + value: + payee: + name: Ada Lovelace + tin: '000000000' + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + formFields: + nonemployeeCompensation: 10000 + accountNumber: A0NEqtav7n0sBGoq88w0 + stateTaxInfo: + - filingState: CA + stateIncome: 10000 + extends: form1099s.Form1099BaseCorrectRequestSchema + properties: + formFields: Form1099NecFormFieldsRequestSchema + Form1099NecFormFieldsSchema: + extends: + - form1099s.Form1099FormFieldsBaseSchema + - Form1099NecFormFieldsRequestSchema + Form1099NecSchema: + examples: + - name: CreateResponseExample + value: + id: documentId_samplegU0eR8oc8a + formFields: + isCorrected: false + isVoid: false + nonemployeeCompensation: 23423 + hasDirectSalesOver5000: false + federalIncomeTaxWithheld: 0 + accountNumber: A0NEqtav7n0sBGoq88w0 + stateTaxInfo: + - filingState: CA + stateIncome: 23423 + stateTaxWithheld: 0 + filingYear: 2023 + createdAt: '2024-01-01T00:00:00.000Z' + status: CREATED + payer: + name: Hooli + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + phoneNumber: '6501014096' + tin: '*******11' + tinType: BUSINESS + tinFingerprint: tinFingerprint_sample847jI1LwxF + tinVerificationId: tinVerificationId_sample1b0E6efa89 + tinVerificationStatus: MATCH + payee: + name: Ada Lovelace + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + tin: '*******00' + tinType: INDIVIDUAL + tinFingerprint: tinFingerprint_samplehy2BWO6JJG + tinVerificationId: tinVerificationId_sample41SD71AV8f + tinVerificationStatus: MATCH + payerUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-COPY-C.pdf + payeeUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-COPY-B.pdf + - name: FileResponseExample + value: + id: documentId_samplegU0eR8oc8a + formFields: + isCorrected: false + isVoid: false + nonemployeeCompensation: 23423 + hasDirectSalesOver5000: false + federalIncomeTaxWithheld: 0 + accountNumber: A0NEqtav7n0sBGoq88w0 + stateTaxInfo: + - filingState: CA + stateIncome: 23423 + stateTaxWithheld: 0 + filingYear: 2023 + createdAt: '2024-01-01T00:00:00.000Z' + status: FILED + payer: + name: Hooli + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + phoneNumber: '6501014096' + tin: '*******11' + tinType: BUSINESS + tinFingerprint: tinFingerprint_sample847jI1LwxF + tinVerificationId: tinVerificationId_sample1b0E6efa89 + tinVerificationStatus: MATCH + payee: + name: Ada Lovelace + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + tin: '*******00' + tinType: INDIVIDUAL + tinFingerprint: tinFingerprint_samplehy2BWO6JJG + tinVerificationId: tinVerificationId_sample41SD71AV8f + tinVerificationStatus: MATCH + payerUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-COPY-C.pdf + payeeUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-COPY-B.pdf + - name: CorrectResponseExample + value: + id: documentId_sampletdeUbrEgYw + correctedFromId: documentId_samplegU0eR8oc8a + formFields: + isCorrected: true + isVoid: false + nonemployeeCompensation: 10000 + hasDirectSalesOver5000: false + federalIncomeTaxWithheld: 0 + accountNumber: A0NEqtav7n0sBGoq88w0 + stateTaxInfo: + - filingState: CA + stateIncome: 10000 + stateTaxWithheld: 0 + filingYear: 2023 + createdAt: '2024-01-01T00:00:00.000Z' + status: FILED + payer: + name: Hooli + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + phoneNumber: '6501014096' + tin: '*******11' + tinType: BUSINESS + tinFingerprint: tinFingerprint_sample847jI1LwxF + tinVerificationId: tinVerificationId_sample1b0E6efa89 + tinVerificationStatus: MATCH + payee: + name: Ada Lovelace + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + tin: '*******00' + tinType: INDIVIDUAL + tinFingerprint: tinFingerprint_samplehy2BWO6JJG + tinVerificationId: tinVerificationId_sample41SD71AV8f + tinVerificationStatus: MATCH + payerUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-CORRECTED-COPY-C.pdf + payeeUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-CORRECTED-COPY-B.pdf + - name: VoidResponseExample + value: + id: documentId_sampleSaOkfbLdUb + voidedFromId: documentId_samplegU0eR8oc8a + formFields: + isCorrected: false + isVoid: true + nonemployeeCompensation: 23423 + hasDirectSalesOver5000: false + federalIncomeTaxWithheld: 0 + accountNumber: A0NEqtav7n0sBGoq88w0 + stateTaxInfo: + - filingState: CA + stateIncome: 23423 + stateTaxWithheld: 0 + filingYear: 2023 + createdAt: '2024-01-01T00:00:00.000Z' + status: FILED + payer: + name: Hooli + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + phoneNumber: '6501014096' + tin: '*******11' + tinType: BUSINESS + tinFingerprint: tinFingerprint_sample847jI1LwxF + tinVerificationId: tinVerificationId_sample1b0E6efa89 + tinVerificationStatus: MATCH + payee: + name: Ada Lovelace + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + tin: '*******00' + tinType: INDIVIDUAL + tinFingerprint: tinFingerprint_samplehy2BWO6JJG + tinVerificationId: tinVerificationId_sample41SD71AV8f + tinVerificationStatus: MATCH + payerUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-VOID-COPY-C.pdf + payeeUrl: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-VOID-COPY-B.pdf + extends: form1099s.Form1099BaseSchema + properties: + formFields: Form1099NecFormFieldsSchema +service: + auth: false + display-name: 1099-NEC + base-path: '' + endpoints: + list: + docs: Returns a list of 1099-NEC documents. + method: GET + display-name: List all 1099-NEC documents + path: /documents/1099-nec + auth: true + request: + name: Form1099NecListRequest + query-parameters: + page: optional + filingYear: optional + payeeTinFingerprint: optional + payerTinFingerprint: optional + status: optional + userId: optional + response: + docs: OK + type: list + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + response: + body: + - $Form1099NecSchema.CreateResponseExample + create: + docs: >- + Creates a 1099-NEC document and subsequently kicks off a TIN + Verification, if the name and TIN combo has not been used before. + method: POST + display-name: Create a 1099-NEC + path: /documents/1099-nec + auth: true + request: + name: Form1099NecRequest + headers: + Idempotency-Key: optional + body: Form1099NecRequestSchema + response: + docs: OK + type: Form1099NecSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + request: $Form1099NecRequestSchema.RequestCreateExample + response: + body: $Form1099NecSchema.CreateResponseExample + mail: + docs: Mails a 1099-NEC document. + method: POST + display-name: Mail a 1099-NEC + path: /documents/1099-nec/{documentId}/mail + path-parameters: + documentId: common.DocumentId + auth: true + request: + name: Form1099NecMailingRequest + headers: + Idempotency-Key: optional + body: mailings.MailingRequestSchema + response: + docs: OK + type: mailings.MailingSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_samplegU0eR8oc8a + request: + to: + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + name: Ada Lovelace + from: + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + name: Hooli + response: + body: + id: mailingId_sampleFV9b73IvAD + createdAt: '2024-01-01T00:00:00.000Z' + status: CREATED + url: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-1099-COPY-B.pdf + mailedFromId: documentId_sampletTtqNfulW8 + to: + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + name: Ada Lovelace + from: + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + name: Hooli + file: + docs: Files a 1099-NEC document. + method: POST + display-name: File a 1099-NEC + path: /documents/1099-nec/{documentId}/file + path-parameters: + documentId: common.DocumentId + auth: true + request: + name: Form1099NecFileRequest + headers: + Idempotency-Key: optional + response: + type: Form1099NecSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_samplegU0eR8oc8a + response: + body: $Form1099NecSchema.FileResponseExample + correct: + docs: >- + Files a new corrected 1099-NEC and relates it to the original document. + A 1099-NEC can be corrected only after it has reached the `FILED` + status. Automatically handles both one-transaction and two-transaction + corrections. + method: POST + display-name: Correct a 1099-NEC + path: /documents/1099-nec/{documentId}/correct + path-parameters: + documentId: common.DocumentId + auth: true + request: + name: Form1099NecCorrectRequest + headers: + Idempotency-Key: optional + body: Form1099NecCorrectRequestSchema + response: + type: Form1099NecSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_samplegU0eR8oc8a + request: $Form1099NecCorrectRequestSchema.CorrectRequestExample + response: + body: $Form1099NecSchema.CorrectResponseExample + void: + docs: >- + Files a new voided 1099-NEC and relates it to the original document. A + 1099-NEC can be voided only after it has reached the `FILED` status. + method: POST + display-name: Void a 1099-NEC + path: /documents/1099-nec/{documentId}/void + path-parameters: + documentId: common.DocumentId + auth: true + request: + name: Form1099NecVoidRequest + headers: + Idempotency-Key: optional + response: + docs: OK + type: Form1099NecSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_samplegU0eR8oc8a + response: + body: $Form1099NecSchema.VoidResponseExample + retrieve: + docs: Retrieves the details of an existing 1099-NEC document. + method: GET + display-name: Retrieve a 1099-NEC + path: /documents/1099-nec/{documentId} + path-parameters: + documentId: common.DocumentId + auth: true + response: + docs: OK + type: Form1099NecSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_samplegU0eR8oc8a + response: + body: $Form1099NecSchema.CreateResponseExample + delete: + docs: >- + Deletes a 1099-NEC document. Once an action (`/file`, `/correct`, + `/void`) has been executed on a 1099-NEC, it cannot be deleted. + method: DELETE + display-name: Delete a 1099-NEC + path: /documents/1099-nec/{documentId} + path-parameters: + documentId: common.DocumentId + auth: true + response: + docs: OK + type: common.OkSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_samplegU0eR8oc8a + response: + body: {} diff --git a/.mock/definition/form-w-8ben-e.yml b/.mock/definition/form-w-8ben-e.yml new file mode 100644 index 00000000..1fef69de --- /dev/null +++ b/.mock/definition/form-w-8ben-e.yml @@ -0,0 +1,304 @@ +imports: + address: types/address.yml + errors: types/errors.yml + electronicSignature: types/electronic-signature.yml + headers: types/headers.yml + payee: types/payee.yml + payer: types/payer.yml + common: types/common.yml + taxTreaties: types/tax-treaties.yml +types: + W8BenETaxClassificationEnum: + docs: The tax classification of the payee. + enum: + - CENTRAL_BANK_OF_ISSUE + - COMPLEX_TRUST + - CORPORATION + - DISREGARDED_ENTITY + - ESTATE + - FOREIGN_GOVERNMENT_CONTROLLED_ENTITY + - FOREIGN_GOVERNMENT_INTEGRAL_PART + - GRANTOR_TRUST + - INTERNATIONAL_ORGANIZATION + - PARTNERSHIP + - PRIVATE_FOUNDATION + - SIMPLE_TRUST + - TAX_EXEMPT_ORGANIZATION + W8BenEBeneficialOwnerRequestSchema: + docs: The payee (beneficial owner) completing the document. + properties: + name: + type: string + docs: The payee's legal name (first + last). + incorporationCountry: + type: string + validation: + minLength: 2 + maxLength: 2 + docs: >- + The payee's country of incorporation adhering to `ISO 3166-2` + standards. + tin: + type: optional + validation: + minLength: 9 + maxLength: 9 + docs: >- + The payee's US tax identification number, commonly referred to as a + TIN. No hyphens. Numerical digits only. Alternatively, you may pass + the corresponding `tinFingerprint`. + foreignTin: + type: optional + docs: >- + The payee's foreign tax identifying number, commonly referred to as a + FTIN. No hyphens. Alphanumeric digits only. Alternatively, you may + pass the corresponding `foreignTinFingerprint`. + permanentResidenceAddress: + type: address.ForeignAddressSchema + docs: >- + Permanent residence address (street, apt. or suite no., or rural + route). Do not use a P.O. box or in-care-of address. + mailingAddress: + type: optional + docs: >- + The mailing address. Only include if different from the permanent + residence address. + W8BenEFormFieldsRequestSchema: + properties: + taxClassification: + type: W8BenETaxClassificationEnum + isForeignTinNotRequired: + type: optional + docs: Pass true if a foreign TIN is not legally required. Otherwise false. + taxTreatyCode: + type: optional + docs: >- + Abound's shorthand code for the particular US tax treaty the payee is + claiming. + referenceNumbers: + type: optional> + docs: >- + The reference numbers to list on this W-8BEN-E. Two reference numbers + are allowed. Max 20 characters each. + isCertified: + type: boolean + docs: Pass true if the payee has certified the W-8BEN-E. Otherwise false. + electronicSignature: + type: optional + docs: The electronic signature of the payee. + W8BenERequestSchema: + examples: + - name: ResponseExample + value: + payee: + name: Hooli + incorporationCountry: GB + tin: '111111111' + foreignTin: DQ123456C + permanentResidenceAddress: + address: 43 Hilly Fields + address2: Suite 32 + city: Lewisham + state: London + postalCode: SE13 7JN + country: GB + mailingAddress: + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + postalCode: '94306' + state: CA + country: US + formFields: + taxClassification: CORPORATION + isForeignTinNotRequired: false + taxTreatyCode: GB_17_INDEPENDENT_PERSONAL_SERVICES + referenceNumbers: + - '123456789' + isCertified: true + electronicSignature: + signature: Hooli Representative + printedName: Hooli Representative + signedAt: '2024-01-01T00:00:00.000Z' + ipAddress: 127.0.0.1 + properties: + payee: W8BenEBeneficialOwnerRequestSchema + formFields: W8BenEFormFieldsRequestSchema + userId: optional + W8BenEBeneficialOwnerSchema: + extends: W8BenEBeneficialOwnerRequestSchema + properties: + tinFingerprint: optional + tinType: optional + tinVerificationId: optional + tinVerificationStatus: optional + foreignTinFingerprint: optional + W8BenEFormFieldsSchema: + properties: + taxClassification: + type: W8BenETaxClassificationEnum + isForeignTinNotRequired: + type: optional + docs: Pass true if a foreign TIN is not legally required. Otherwise false. + taxTreatyBenefits: + type: optional + docs: The tax treaty benefits the payee is claiming. + referenceNumbers: + type: optional> + docs: >- + The reference numbers to list on this W-8BEN-E. Two reference numbers + are allowed. Max 20 characters each. + isCertified: + type: boolean + docs: Pass true if the payee has certified the W-8BEN-E. Otherwise false. + electronicSignature: + type: optional + docs: The electronic signature of the payee. + W8BenESchema: + examples: + - name: ResponseExample + value: + id: documentId_sampleGyuBXlfAwo + createdAt: '2024-01-01T00:00:00.000Z' + expiresAt: '2028-01-01T00:00:00.000Z' + url: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-W-8BEN-E.pdf + payee: + name: Hooli + incorporationCountry: GB + tin: '*******11' + permanentResidenceAddress: + address: 43 Hilly Fields + address2: Suite 32 + city: Lewisham + state: London + postalCode: SE13 7JN + country: GB + mailingAddress: + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + postalCode: '94306' + state: CA + country: US + tinType: BUSINESS + tinFingerprint: tinFingerprint_sample847jI1LwxF + tinVerificationId: tinVerificationId_sample1b0E6efa89 + tinVerificationStatus: MATCH + foreignTin: '*******6C' + foreignTinFingerprint: tinFingerprint_sampleanXo4V9nL9 + formFields: + taxClassification: CORPORATION + isForeignTinNotRequired: false + taxTreatyBenefits: + residentCountry: GB + claimedProvision: '7' + rateOfWithholding: 0 + incomeCode: '17' + incomeType: SERVICES + additionalConditions: Independent personal services performed in the US + referenceNumbers: + - '123456789' + isCertified: true + electronicSignature: + signature: Hooli Representative + printedName: Hooli Representative + signedAt: '2024-01-01T00:00:00.000Z' + ipAddress: 127.0.0.1 + properties: + id: + type: string + docs: The unique identifier for the W-8BEN-E document. + createdAt: + type: datetime + docs: >- + The date and time in `ISO 8601` format when the W-8BEN-E document was + created. + expiresAt: + type: datetime + docs: >- + The date and time in `ISO 8601` format when the W-8BEN-E is expired + and requires re-collection. + url: + type: string + docs: The URL to the W-8BEN-E document. + payee: W8BenEBeneficialOwnerSchema + formFields: W8BenEFormFieldsSchema + userId: optional +service: + auth: false + display-name: W-8BEN-E + base-path: '' + endpoints: + list: + docs: Returns a list of W-8BEN-E documents. + method: GET + display-name: List all W-8BEN-E documents + path: /documents/w-8ben-e + auth: true + request: + name: FormW8BenEListRequest + query-parameters: + page: optional + payeeTinFingerprint: optional + payeeForeignTinFingerprint: optional + userId: optional + response: + docs: OK + type: list + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + response: + body: + - $W8BenESchema.ResponseExample + create: + docs: >- + Creates a W-8BEN-E document and, if present, subsequently kicks off a + TIN Verification. A TIN Verification will only kickoff if the name and + TIN combo has not been seen before. + method: POST + display-name: Create a W-8BEN-E + path: /documents/w-8ben-e + auth: true + request: + body: W8BenERequestSchema + response: + docs: OK + type: W8BenESchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + request: $W8BenERequestSchema.ResponseExample + response: + body: $W8BenESchema.ResponseExample + retrieve: + docs: Retrieves the details of an existing W-8BEN-E document. + method: GET + display-name: Retrieve a W-8BEN-E + path: /documents/w-8ben-e/{documentId} + path-parameters: + documentId: common.DocumentId + auth: true + response: + docs: OK + type: W8BenESchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_sampleGyuBXlfAwo + response: + body: $W8BenESchema.ResponseExample diff --git a/.mock/definition/form-w-8ben.yml b/.mock/definition/form-w-8ben.yml new file mode 100644 index 00000000..d7d00767 --- /dev/null +++ b/.mock/definition/form-w-8ben.yml @@ -0,0 +1,291 @@ +imports: + address: types/address.yml + errors: types/errors.yml + electronicSignature: types/electronic-signature.yml + headers: types/headers.yml + payee: types/payee.yml + payer: types/payer.yml + common: types/common.yml + taxTreaties: types/tax-treaties.yml +types: + W8BenBeneficialOwnerRequestSchema: + docs: The payee (beneficial owner) completing the document. + properties: + name: + type: string + docs: The payee's legal name (first + last). + citizenshipCountry: + type: string + validation: + minLength: 2 + maxLength: 2 + docs: The payee's country of citizenship adhering to `ISO 3166-2` standards. + tin: + type: optional + validation: + minLength: 9 + maxLength: 9 + docs: >- + The payee's US tax identification number, commonly referred to as a + TIN. No hyphens. Numerical digits only. Alternatively, you may pass + the corresponding `tinFingerprint`. + foreignTin: + type: optional + docs: >- + The payee's foreign tax identifying number, commonly referred to as a + FTIN. No hyphens. Alphanumeric digits only. Alternatively, you may + pass the corresponding `foreignTinFingerprint`. + dateOfBirth: + type: string + validation: + pattern: ^\d{4}-\d{2}-\d{2}$ + docs: The date, in `YYYY-MM-DD` format, the payee was born on. + permanentResidenceAddress: + type: address.ForeignAddressSchema + docs: >- + Permanent residence address (street, apt. or suite no., or rural + route). Do not use a P.O. box or in-care-of address. + mailingAddress: + type: optional + docs: >- + The mailing address. Only include if different from the permanent + residence address. + W8BenFormFieldsRequestSchema: + properties: + isForeignTinNotRequired: + type: optional + docs: Pass true if a foreign TIN is not legally required. Otherwise false. + taxTreatyCode: + type: optional + docs: >- + Abound's shorthand code for the particular US tax treaty the payee is + claiming. + referenceNumbers: + type: optional> + docs: >- + The reference numbers to list on this W-8BEN. Two reference numbers + are allowed. Max 20 characters each. + isCertified: + type: boolean + docs: Pass true if the payee has certified the W-8BEN. Otherwise false. + electronicSignature: + type: optional + docs: The electronic signature of the payee. + W8BenRequestSchema: + examples: + - name: ResponseExample + value: + payee: + name: Ada Lovelace + citizenshipCountry: GB + tin: '000000000' + foreignTin: DQ123456C + dateOfBirth: '1982-12-10' + permanentResidenceAddress: + address: 43 Hilly Fields + address2: Suite 32 + city: Lewisham + state: London + postalCode: SE13 7JN + country: GB + mailingAddress: + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + postalCode: '94306' + state: CA + country: US + formFields: + isForeignTinNotRequired: false + taxTreatyCode: GB_17_INDEPENDENT_PERSONAL_SERVICES + referenceNumbers: + - '123456789' + isCertified: true + electronicSignature: + signature: Ada Lovelace + printedName: Ada Lovelace + signedAt: '2024-01-01T00:00:00.000Z' + ipAddress: 127.0.0.1 + properties: + payee: W8BenBeneficialOwnerRequestSchema + formFields: W8BenFormFieldsRequestSchema + userId: optional + W8BenBeneficialOwnerSchema: + extends: W8BenBeneficialOwnerRequestSchema + properties: + tinFingerprint: optional + tinType: optional + tinVerificationId: optional + tinVerificationStatus: optional + foreignTinFingerprint: optional + W8BenFormFieldsSchema: + properties: + taxClassification: + type: literal<"INDIVIDUAL"> + docs: The tax classification of the payee. + isForeignTinNotRequired: + type: optional + docs: Pass true if a foreign TIN is not legally required. Otherwise false. + taxTreatyBenefits: + type: optional + docs: The tax treaty benefits the payee is claiming. + referenceNumbers: + type: optional> + docs: >- + The reference numbers to list on this W-8BEN. Two reference numbers + are allowed. Max 20 characters each. + isCertified: + type: boolean + docs: Pass true if the payee has certified the W-8BEN. Otherwise false. + electronicSignature: + type: optional + docs: The electronic signature of the payee. + W8BenSchema: + examples: + - name: ResponseExample + value: + id: documentId_samplexEM8PRV7sh + createdAt: '2024-01-01T00:00:00.000Z' + expiresAt: '2028-01-01T00:00:00.000Z' + url: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-W-8BEN.pdf + payee: + name: Ada Lovelace + citizenshipCountry: GB + dateOfBirth: '1982-12-10' + permanentResidenceAddress: + address: 43 Hilly Fields + address2: Suite 32 + city: Lewisham + state: London + postalCode: SE13 7JN + country: GB + mailingAddress: + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + postalCode: '94306' + state: CA + country: US + tin: '*******00' + tinType: INDIVIDUAL + tinFingerprint: tinFingerprint_samplehy2BWO6JJG + tinVerificationId: tinVerificationId_sample41SD71AV8f + tinVerificationStatus: MATCH + foreignTin: '*******6C' + foreignTinFingerprint: tinFingerprint_sampleanXo4V9nL9 + formFields: + taxClassification: INDIVIDUAL + isForeignTinNotRequired: false + taxTreatyBenefits: + residentCountry: GB + claimedProvision: '7' + rateOfWithholding: 0 + incomeCode: '17' + incomeType: SERVICES + additionalConditions: Independent personal services performed in the US + referenceNumbers: + - '123456789' + isCertified: true + electronicSignature: + signature: Ada Lovelace + printedName: Ada Lovelace + signedAt: '2024-01-01T00:00:00.000Z' + ipAddress: 127.0.0.1 + properties: + id: + type: string + docs: The unique identifier for the W-8BEN document. + createdAt: + type: datetime + docs: >- + The date and time in `ISO 8601` format when the W-8BEN document was + created. + expiresAt: + type: datetime + docs: >- + The date and time in `ISO 8601` format when the W-8BEN is expired and + requires re-collection. + url: + type: string + docs: The URL to the W-8BEN document. + payee: W8BenBeneficialOwnerSchema + formFields: W8BenFormFieldsSchema + userId: optional +service: + auth: false + display-name: W-8BEN + base-path: '' + endpoints: + list: + docs: Returns a list of W-8BEN documents. + method: GET + display-name: List all W-8BEN documents + path: /documents/w-8ben + auth: true + request: + name: FormW8BenListRequest + query-parameters: + page: optional + payeeTinFingerprint: optional + payeeForeignTinFingerprint: optional + userId: optional + response: + docs: OK + type: list + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + response: + body: + - $W8BenSchema.ResponseExample + create: + docs: >- + Creates a W-8BEN document and, if present, subsequently kicks off a TIN + Verification. A TIN Verification will only kickoff if the name and TIN + combo has not been seen before. + method: POST + display-name: Create a W-8BEN + path: /documents/w-8ben + auth: true + request: + body: W8BenRequestSchema + response: + docs: OK + type: W8BenSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + request: $W8BenRequestSchema.ResponseExample + response: + body: $W8BenSchema.ResponseExample + retrieve: + docs: Retrieves the details of an existing W-8BEN document. + method: GET + display-name: Retrieve a W-8BEN + path: /documents/w-8ben/{documentId} + path-parameters: + documentId: common.DocumentId + auth: true + response: + docs: OK + type: W8BenSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_samplexEM8PRV7sh + response: + body: $W8BenSchema.ResponseExample diff --git a/.mock/definition/form-w-9.yml b/.mock/definition/form-w-9.yml new file mode 100644 index 00000000..9f2aa669 --- /dev/null +++ b/.mock/definition/form-w-9.yml @@ -0,0 +1,268 @@ +imports: + errors: types/errors.yml + electronicSignature: types/electronic-signature.yml + headers: types/headers.yml + payee: types/payee.yml + payer: types/payer.yml + common: types/common.yml +types: + W9TaxClassificationSchema: + docs: The U.S. federal tax classification of the person. + enum: + - INDIVIDUAL + - SOLE_PROPRIETOR + - C_CORPORATION + - S_CORPORATION + - PARTNERSHIP + - TRUST + - ESTATE + - LLC_PARTNERSHIP + - LLC_C_CORPORATION + - LLC_S_CORPORATION + - OTHER + W9ExemptPayeeCodeSchema: + docs: The code to identify a payee that is exempt from backup withholding. + enum: + - name: One + value: '1' + - name: Two + value: '2' + - name: Three + value: '3' + - name: Four + value: '4' + - name: Five + value: '5' + - name: Six + value: '6' + - name: Seven + value: '7' + - name: Eight + value: '8' + - name: Nine + value: '9' + - name: Ten + value: '10' + - name: Eleven + value: '11' + - name: Twelve + value: '12' + - name: Thirteen + value: '13' + W9ExemptFatcaCodeSchema: + docs: The code to identify a payee that is exempt from reporting under FATCA. + enum: + - A + - B + - C + - D + - E + - F + - G + - H + - I + - J + - K + - L + - M + - NOT_APPLICABLE + W9FormFieldsSchema: + properties: + taxClassification: + type: W9TaxClassificationSchema + docs: The U.S. federal tax classification of the person. + otherTaxClassification: + type: optional + docs: The tax classification of the payee if `taxClassification` is `OTHER`. + hasIndirectForeignOwnership: + type: optional + docs: >- + If your `taxClassification` is `PARTNERSHIP`, `TRUST`, `ESTATE`, or + `LLC_PARTNERSHIP`, and you are providing this form to a partnership, + trust, or estate in which you have an ownership interest, pass `true` + if you have any foreign partners, owners, or beneficiaries. + exemptPayeeCode: + type: optional + docs: The code to identify a payee that is exempt from backup withholding. + exemptFatcaCode: + type: optional + docs: >- + The code to identify a payee that is exempt from reporting under + FATCA. + accountNumbers: + type: optional> + docs: The account numbers to list on this W-9. + isSubjectToBackupWithholding: + type: optional + docs: If the payee is subject to backup withholding, pass `true`. + certifiedAt: + type: optional + docs: >- + The certification date and time in `ISO 8601` format. This field is + deprecated. Please use `electronicSignature` instead. + availability: deprecated + electronicSignature: + type: optional + docs: The electronic signature of the payee. + W9RequestSchema: + examples: + - name: RequestExample + value: + payee: + name: Ada Lovelace + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + country: US + postalCode: '94043' + state: CA + tin: '000000000' + tinType: INDIVIDUAL + formFields: + taxClassification: INDIVIDUAL + isSubjectToBackupWithholding: false + electronicSignature: + signature: Ada Lovelace + printedName: Ada Lovelace + signedAt: '2024-01-01T00:00:00.000Z' + ipAddress: 127.0.0.1 + properties: + payee: + type: payee.PayeeWithOptionalTinTypeRequestSchema + payer: + type: optional + formFields: + type: W9FormFieldsSchema + userId: + type: optional + W9Schema: + examples: + - name: ResponseExample + value: + id: documentId_sampleVppNzzIbQT + createdAt: '2024-01-01T00:00:00.000Z' + url: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-W-9.pdf + payee: + name: Ada Lovelace + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + country: US + postalCode: '94043' + state: CA + tin: '*******00' + tinType: INDIVIDUAL + tinFingerprint: tinFingerprint_samplehy2BWO6JJG + tinVerificationId: tinVerificationId_sample41SD71AV8f + tinVerificationStatus: MATCH + formFields: + accountNumbers: + - '1234567890' + - '1234567891' + taxClassification: INDIVIDUAL + isSubjectToBackupWithholding: false + electronicSignature: + signature: Ada Lovelace + printedName: Ada Lovelace + signedAt: '2024-01-01T00:00:00.000Z' + ipAddress: 127.0.0.1 + properties: + id: + type: string + docs: The unique identifier for the W-9 document. + createdAt: + type: datetime + docs: >- + The date and time in `ISO 8601` format when the W-9 document was + created. + url: + type: string + docs: The URL to the W-9 document. + payee: + type: payee.PayeeSchema + payer: + type: optional + formFields: + type: W9FormFieldsSchema + userId: + type: optional +service: + auth: false + display-name: W-9 + base-path: '' + endpoints: + list: + docs: Returns a list of W-9 documents. + method: GET + display-name: List all W-9 documents + path: /documents/w-9 + auth: true + request: + name: FormW9ListRequest + query-parameters: + page: optional + payeeTinFingerprint: optional + payerTinFingerprint: optional + userId: optional + response: + docs: OK + type: list + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + response: + body: + - $W9Schema.ResponseExample + create: + docs: >- + Creates a W-9 document and subsequently kicks off a TIN verification, if + the name and TIN combo has not been used before. + method: POST + display-name: Create a W-9 + path: /documents/w-9 + auth: true + request: + name: FormW-9RequestSchema + headers: + Idempotency-Key: optional + body: W9RequestSchema + response: + docs: OK + type: W9Schema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + request: $W9RequestSchema.RequestExample + response: + body: $W9Schema.ResponseExample + retrieve: + docs: Retrieves the details of an existing W-9 document. + method: GET + display-name: Retrieve a W-9 + path: /documents/w-9/{documentId} + path-parameters: + documentId: common.DocumentId + auth: true + response: + docs: OK + type: W9Schema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + documentId: documentId_sampleVppNzzIbQT + response: + body: $W9Schema.ResponseExample diff --git a/.mock/definition/mailings.yml b/.mock/definition/mailings.yml new file mode 100644 index 00000000..728a99ee --- /dev/null +++ b/.mock/definition/mailings.yml @@ -0,0 +1,214 @@ +imports: + errors: types/errors.yml + address: types/address.yml + headers: types/headers.yml + common: types/common.yml +types: + MailingStatusEnum: + enum: + - CREATED + - PROCESSING_FOR_DELIVERY + - IN_TRANSIT + - DELIVERED + - RETURNED_TO_SENDER + MailingNameSchema: + properties: + name: + type: optional + docs: The individual's name (first + last) or business name. + name2: + type: optional + docs: >- + The business name, trade name, DBA name, or disregarded entity name, + if different from `name`. + MailingRequestToSchema: + docs: The mailing address of the recipient. + extends: + - MailingNameSchema + - address.AddressSchema + properties: {} + MailingRequestFromSchema: + docs: The mailing address of the sender. + extends: + - MailingNameSchema + - address.AddressSchema + properties: {} + MailingRequestSchema: + examples: + - name: RequestExample + value: + to: + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + name: Ada Lovelace + from: + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + name: Hooli + properties: + to: + type: MailingRequestToSchema + from: + type: MailingRequestFromSchema + MailingSchema: + examples: + - name: ResponseExample + value: + id: mailingId_sampleFV9b73IvAD + createdAt: '2024-01-01T00:00:00.000Z' + url: >- + https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-1099-COPY-B.pdf + status: CREATED + to: + address: 1401 N Shoreline Blvd + address2: Suite 1 + city: Mountain View + state: CA + postalCode: '94043' + country: US + name: Ada Lovelace + from: + address: 256 Byron Street + address2: Suite 32 + city: Palo Alto + state: CA + postalCode: '94306' + country: US + name: Hooli + mailedFromId: documentId_sampletTtqNfulW8 + extends: + - MailingRequestSchema + properties: + id: + type: string + docs: The unique identifier for this mailing. + createdAt: + type: datetime + docs: The creation date and time of the mailing in `ISO 8601` format. + url: + type: string + docs: The URL to the mailed document. + status: + type: MailingStatusEnum + docs: The status of the mailing. + userId: optional + mailedFromId: + type: string + docs: The `documentId` of the mailed document. +service: + auth: false + display-name: Mailings + base-path: '' + endpoints: + list: + docs: Returns a list of mailings. Up to 100 mailings are returned per request. + method: GET + display-name: List all mailings + path: /mailings + auth: true + request: + name: MailingsListRequest + query-parameters: + page: optional + status: + type: optional + docs: Filters the list of mailings based on the `status` field. + userId: optional + response: + docs: OK + type: list + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + response: + body: + - $MailingSchema.ResponseExample + retrieve: + docs: Retrieves the details of an existing mailing. + method: GET + display-name: Retrieve a mailing + path: /mailings/{mailingId} + path-parameters: + mailingId: common.MailingId + auth: true + response: + docs: OK + type: MailingSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + mailingId: mailingId_sampleFV9b73IvAD + response: + body: $MailingSchema.ResponseExample + update: + docs: >- + Updates an existing mailing. Once a mailing has reached the + `PROCESSING_FOR_DELIVERY` status, it cannot be updated. Any body + parameters not provided will be removed. + method: PUT + display-name: Update a mailing + path: /mailings/{mailingId} + path-parameters: + mailingId: common.MailingId + auth: true + request: + name: MailingRequest + headers: + Idempotency-Key: optional + body: MailingRequestSchema + response: + docs: OK + type: MailingSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + mailingId: mailingId_sampleFV9b73IvAD + request: $MailingRequestSchema.RequestExample + response: + body: $MailingSchema.ResponseExample + delete: + docs: >- + Deletes a mailing. Once a mailing has reached the + `PROCESSING_FOR_DELIVERY` status, it cannot be deleted. + method: DELETE + display-name: Delete a mailing + path: /mailings/{mailingId} + path-parameters: + mailingId: common.MailingId + auth: true + response: + docs: OK + type: common.OkSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + mailingId: mailingId_sampleFV9b73IvAD + response: + body: {} diff --git a/.mock/definition/tax-treaties.yml b/.mock/definition/tax-treaties.yml new file mode 100644 index 00000000..6025825a --- /dev/null +++ b/.mock/definition/tax-treaties.yml @@ -0,0 +1,59 @@ +imports: + errors: types/errors.yml + headers: types/headers.yml + taxTreaties: types/tax-treaties.yml + common: types/common.yml +types: + TaxTreatySchema: + examples: + - name: ResponseExample + value: + taxTreatyCode: GB_17_INDEPENDENT_PERSONAL_SERVICES + residentCountry: GB + rateOfWithholding: 0 + description: Independent personal services performed in the US + properties: + taxTreatyCode: + type: taxTreaties.TaxTreatyAboundCodeEnum + docs: Abound's shorthand code for a particular US tax treaty. + residentCountry: + type: string + docs: >- + The foreign country, adhering to `ISO 3166-2` standards, associated + with the tax treaty. + rateOfWithholding: + type: float + docs: >- + The decimal percentage rate of withholding the tax treaty allows by + default. Rates are subject to validation and approval by the Payer. + description: + type: string + docs: The income description associated with the tax treaty. +service: + auth: false + display-name: Tax Treaties + base-path: '' + endpoints: + list: + docs: Returns a list of tax treaties. + method: GET + display-name: List all tax treaties + path: /tax-treaties + auth: true + request: + name: TaxTreatiesListRequest + query-parameters: + country: optional + response: + docs: OK + type: list + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + response: + body: + - $TaxTreatySchema.ResponseExample diff --git a/.mock/definition/tin-verifications.yml b/.mock/definition/tin-verifications.yml new file mode 100644 index 00000000..767178b2 --- /dev/null +++ b/.mock/definition/tin-verifications.yml @@ -0,0 +1,131 @@ +imports: + errors: types/errors.yml + headers: types/headers.yml + common: types/common.yml +types: + TinVerificationRequestSchema: + examples: + - name: RequestExample + value: + name: Ada Lovelace + tin: '000000000' + properties: + name: + type: string + docs: The legal name (first + last) or business name. + tin: + type: string + validation: + minLength: 9 + maxLength: 9 + docs: >- + The tax identification number, commonly referred to as a TIN. No + hyphens. Numerical digits only. + userId: optional + TinVerificationSchema: + examples: + - name: ResponseExample + value: + name: Ada Lovelace + id: tinVerificationId_sample41SD71AV8f + createdAt: '2024-01-01T00:00:00.000Z' + status: MATCH + tin: '*******00' + tinFingerprint: tinFingerprint_samplehy2BWO6JJG + tinType: INDIVIDUAL + extends: + - TinVerificationRequestSchema + properties: + id: + type: string + docs: The unique identifier for this TIN Verification. + createdAt: + type: datetime + docs: >- + The creation date and time of the TIN Verification in `ISO 8601` + format. + status: common.TinVerificationStatusEnum + tinType: + type: optional + tinFingerprint: + type: string + docs: The fingerprint for this TIN Verification. +service: + auth: false + display-name: TIN Verifications + base-path: '' + endpoints: + list: + docs: >- + Returns a list of TIN Verifications. Up to 100 TIN Verifications are + returned per request. + method: GET + display-name: List all TIN Verifications + path: /tin-verifications + auth: true + request: + name: TinVerificationsListRequest + query-parameters: + page: optional + tinFingerprint: optional + status: optional + userId: optional + response: + docs: OK + type: list + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + response: + body: + - $TinVerificationSchema.ResponseExample + create: + docs: Creates an asynchronous TIN Verification. + method: POST + display-name: Create a TIN Verification + path: /tin-verifications + auth: true + request: + name: TinVerificationRequest + headers: + Idempotency-Key: optional + body: TinVerificationRequestSchema + response: + docs: OK + type: TinVerificationSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + request: $TinVerificationRequestSchema.RequestExample + response: + body: $TinVerificationSchema.ResponseExample + retrieve: + docs: Retrieves the details of an existing TIN Verification. + method: GET + display-name: Retrieve a TIN Verification + path: /tin-verifications/{tinVerificationId} + path-parameters: + tinVerificationId: common.TinVerificationId + auth: true + response: + docs: OK + type: TinVerificationSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + tinVerificationId: tinVerificationId_sample41SD71AV8f + response: + body: $TinVerificationSchema.ResponseExample diff --git a/.mock/definition/types/address.yml b/.mock/definition/types/address.yml new file mode 100644 index 00000000..7250ac63 --- /dev/null +++ b/.mock/definition/types/address.yml @@ -0,0 +1,59 @@ +types: + AddressSchema: + properties: + address: + type: string + docs: The legal address. + address2: + type: optional + docs: >- + The second part of the legal address, such as an apartment or suite + number. + city: + type: optional + docs: >- + The city associated with the street address. Required if `country` is + `US`. + state: + type: optional + docs: >- + The two-letter character code for this state (`CA` for California, + `ME` for Maine). Required if `country` is `US`. If foreign, use the + province. + postalCode: + type: optional + docs: >- + The postal code associated with the street address. Required to be a + 5-digit numerical value if `country` is `US`. If foreign, use the + foreign postal code. + country: + type: string + validation: + minLength: 2 + maxLength: 2 + docs: The country adhering to `ISO 3166-2` standards. + ForeignAddressSchema: + properties: + address: + type: string + docs: The legal address. + address2: + type: optional + docs: >- + The second part of the legal address, such as an apartment or suite + number. + city: + type: optional + docs: The city associated with the street address. + state: + type: optional + docs: The province associated with the street address. + postalCode: + type: optional + docs: The foreign postal code associated with the street address. + country: + type: string + validation: + minLength: 2 + maxLength: 2 + docs: The country adhering to `ISO 3166-2` standards. diff --git a/.mock/definition/types/common.yml b/.mock/definition/types/common.yml new file mode 100644 index 00000000..89c50a50 --- /dev/null +++ b/.mock/definition/types/common.yml @@ -0,0 +1,72 @@ +types: + OkSchema: map + Page: + docs: >- + The specific page of results you're requesting. Responses are limited to a + maximum of 100 records. + type: integer + Email: + docs: Filters the list of users based on the `email` field. + type: string + ForeignId: + docs: >- + The customer-specific unique identifier associated to an Abound record. + Allows developers to forego making their own tables every time they + integrate and/or add an application. + type: string + TinFingerprintQueryParam: + docs: Filters the list of TIN Verifications based on the `tinFingerprint` field. + type: string + TinFingerprint: + docs: Your unique token that points to a TIN. + type: string + PayeeTinFingerprint: + docs: Filters the list of documents based on the `payee.tinFingerprint` field. + type: string + PayeeForeignTinFingerprint: + docs: >- + Filters the list of documents based on the `payee.foreignTinFingerprint` + field. + type: string + PayerTinFingerprint: + docs: Filters the list of documents based on the `payer.tinFingerprint` field. + type: string + TinVerificationStatusQueryParam: + docs: Filters the list of TIN Verifications based on the `status` field. + type: string + DocumentId: + docs: The unique identifier for an existing document. + type: string + MailingId: + docs: The unique identifier for an existing mailing. + type: string + UserId: + docs: The unique identifier for a single end-user of your application. + type: string + FilingYear: + docs: The filing year associated with this document. + type: integer + TinTypeEnum: + docs: >- + The type of the TIN. `INDIVIDUAL` refers to SSNs, ITINs, or ATINs. While + `BUSINESS` refers to EINs. + enum: + - INDIVIDUAL + - BUSINESS + TinVerificationStatusEnum: + docs: The status of the TIN Verification. + enum: + - MATCH + - MISMATCH + - PENDING + TinVerificationId: + docs: The unique identifier for the TIN Verification. + type: string + TaxTreatyCountry: + docs: >- + Filters the list of tax treaties based on the specified foreign `country`, + adhering to `ISO 3166-2` standards. + type: string + ForeignTinFingerprint: + docs: The unique token that points to a foreign TIN. + type: string diff --git a/.mock/definition/types/electronic-signature.yml b/.mock/definition/types/electronic-signature.yml new file mode 100644 index 00000000..0c0a4c9c --- /dev/null +++ b/.mock/definition/types/electronic-signature.yml @@ -0,0 +1,18 @@ +types: + ElectronicSignatureOfPayeeSchema: + docs: The electronic signature of the payee. + properties: + signature: + type: string + docs: The signature of the payee. + printedName: + type: string + docs: The printed name of the payee. + signedAt: + type: datetime + docs: The date and time in `ISO 8601` format of the signature. + ipAddress: + type: string + validation: + format: ipv4 + docs: The IP address of the payee when signing this document. diff --git a/.mock/definition/types/errors.yml b/.mock/definition/types/errors.yml new file mode 100644 index 00000000..ffc36ca2 --- /dev/null +++ b/.mock/definition/types/errors.yml @@ -0,0 +1,62 @@ +types: + ErrorBadRequestSchemaErrorsItem: + properties: + field: + type: optional + docs: The field that caused the error. + message: + type: string + docs: The error message associated with the field. + ErrorBadRequestSchema: + properties: + errors: + type: list + docs: The error message(s) associated with the response status code. + DefaultErrorSchema: + properties: + message: + type: string + docs: The error message associated with the response status code. +errors: + BadRequestErrorSchema: + docs: Bad Request + status-code: 400 + type: ErrorBadRequestSchema + examples: + - name: default + value: + errors: + - field: metadata.key + message: Expected metadata.key to be of type string, but received number + UnauthorizedErrorSchema: + docs: Unauthorized + status-code: 401 + type: DefaultErrorSchema + examples: + - name: default + value: + message: Unauthorized + NotFoundErrorSchema: + docs: Not Found + status-code: 404 + type: DefaultErrorSchema + examples: + - name: default + value: + message: Not Found + InternalServerErrorSchema: + docs: Internal Server Error + status-code: 500 + type: DefaultErrorSchema + examples: + - name: default + value: + message: Internal Server Error + ConflictErrorSchema: + docs: Conflict + status-code: 409 + type: DefaultErrorSchema + examples: + - name: default + value: + message: Conflict diff --git a/.mock/definition/types/form-1099s.yml b/.mock/definition/types/form-1099s.yml new file mode 100644 index 00000000..c51b76e2 --- /dev/null +++ b/.mock/definition/types/form-1099s.yml @@ -0,0 +1,172 @@ +imports: + common: common.yml + payer: payer.yml + payee: payee.yml +types: + Form1099AccountNumber: + docs: >- + The account number or other unique number assigned to distinguish an + account. Abound will auto-generate this for you if left omitted. + type: string + validation: + maxLength: 20 + Form1099StatusEnum: + enum: + - CREATED + - FILED + - ACCEPTED + - REJECTED + Form1099FilingStateEnum: + docs: >- + The filing state code. The abbreviation of the state (`CA` for + California). + enum: + - AA + - AE + - AK + - AL + - AP + - AR + - AS + - AZ + - CA + - CO + - CT + - DC + - DE + - FL + - GA + - GU + - HI + - IA + - ID + - IL + - IN + - KY + - KS + - LA + - MA + - MD + - ME + - MI + - MN + - MO + - MP + - MS + - MT + - name: NOT_APPLICABLE + value: N/A + - NC + - ND + - NE + - NH + - NJ + - NM + - NV + - NY + - OH + - OK + - OR + - PA + - PR + - RI + - SC + - SD + - TN + - TX + - UT + - VA + - VI + - VT + - WA + - WI + - WV + - WY + Form1099StateTaxInfoSchema: + properties: + filingState: Form1099FilingStateEnum + payeeStateId: + type: optional + docs: The payee's state identification number. + payerStateId: + type: optional + docs: The payer's state identification number. + stateTaxWithheld: + type: optional + validation: + min: 0 + max: 0 + docs: >- + The state tax withheld. Value must be in cents. Abound does not + currently support `stateTaxWithheld` reporting, please contact us for + more information. + Form1099StateTaxInfoWithStateIncomeSchema: + extends: Form1099StateTaxInfoSchema + properties: + stateIncome: + type: integer + validation: + min: 0 + docs: The state income. Value must be in cents. + Form1099BaseRequestSchema: + properties: + filingYear: common.FilingYear + userId: optional + payer: payer.PayerRequestSchema + payee: payee.PayeeRequestSchema + Form1099BaseCorrectRequestSchema: + properties: + userId: optional + payee: payee.PayeeRequestSchema + Form1099BaseSchema: + properties: + id: common.DocumentId + createdAt: + type: datetime + docs: The `ISO 8601` timestamp when the document was created. + filingYear: common.FilingYear + status: + type: Form1099StatusEnum + docs: >- + The status of the 1099 document.
  • `CREATED`: The + document has passed data validation and the PDFs have been + generated.
  • `FILED`: The payee's TIN has been + verified and the 1099 has been filed with the appropriate tax + authorities.
  • `ACCEPTED`: The document has been + acknowledged and accepted by the appropriate tax + authorities.
  • `REJECTED`: The document has a TIN + verification `MISMATCH` or has been rejected by one or more tax + authories. + payerUrl: + type: string + docs: >- + The URL to the payer's 1099 document. The Payee's TIN is masked in + this document. + payeeUrl: + type: string + docs: >- + The URL to the payee's 1099 document. The Payee's TIN is not masked in + this document. + payer: payer.PayerSchema + payee: payee.PayeeSchema + correctedById: + type: optional + docs: The `documentId` of the corrected 1099 document. + correctedFromId: + type: optional + docs: The `documentId` of the original 1099 document. + voidedById: + type: optional + docs: The `documentId` of the voided 1099 document. + voidedFromId: + type: optional + docs: The `documentId` of the original 1099 document. + userId: optional + Form1099FormFieldsBaseSchema: + properties: + isVoid: + type: boolean + docs: If `true`, the void checkbox will be marked on the 1099 document. + isCorrected: + type: boolean + docs: If `true`, the corrected checkbox will be marked on the 1099 document. diff --git a/.mock/definition/types/headers.yml b/.mock/definition/types/headers.yml new file mode 100644 index 00000000..50b5c698 --- /dev/null +++ b/.mock/definition/types/headers.yml @@ -0,0 +1,4 @@ +types: + IdempotencyKey: + docs: The unique key used to identify a request that has already been processed. + type: optional diff --git a/.mock/definition/types/payee.yml b/.mock/definition/types/payee.yml new file mode 100644 index 00000000..450bff26 --- /dev/null +++ b/.mock/definition/types/payee.yml @@ -0,0 +1,41 @@ +imports: + common: common.yml + address: address.yml +types: + PayeeRequestSchema: + docs: The payee of the document. + extends: + - address.AddressSchema + properties: + name: + type: string + docs: The payee's legal name (first + last) or business name. + name2: + type: optional + docs: >- + The payee's trade name, DBA name, or disregarded entity name, if + different from `name`. + tin: + type: string + validation: + minLength: 9 + maxLength: 9 + docs: >- + The payee's tax identification number, commonly referred to as a TIN. + No hyphens. Numerical digits only. Alternatively, you may pass the + corresponding `tinFingerprint`. + PayeeSchema: + docs: The payee of the document. + extends: + - PayeeRequestSchema + properties: + tinFingerprint: common.TinFingerprint + tinType: optional + tinVerificationId: common.TinVerificationId + tinVerificationStatus: common.TinVerificationStatusEnum + PayeeWithOptionalTinTypeRequestSchema: + docs: The payee of the document. + extends: + - PayeeRequestSchema + properties: + tinType: optional diff --git a/.mock/definition/types/payer.yml b/.mock/definition/types/payer.yml new file mode 100644 index 00000000..2be050c4 --- /dev/null +++ b/.mock/definition/types/payer.yml @@ -0,0 +1,38 @@ +imports: + common: common.yml + address: address.yml +types: + PayerRequestSchema: + docs: The payer of the document. + extends: + - address.AddressSchema + properties: + name: + type: string + docs: The payer's legal name (first + last) or business name. + name2: + type: optional + docs: >- + The payer's trade name, DBA name, or disregarded entity name, if + different from `name`. + tin: + type: string + validation: + minLength: 9 + maxLength: 9 + docs: >- + The payee's tax identification number, commonly referred to as a TIN. + No hyphens. Numerical digits only. Alternatively, you may pass the + corresponding `tinFingerprint`. + phoneNumber: + type: string + docs: The payer's phone number. + PayerSchema: + docs: The payer of the document. + extends: + - PayerRequestSchema + properties: + tinFingerprint: common.TinFingerprint + tinType: optional + tinVerificationId: common.TinVerificationId + tinVerificationStatus: common.TinVerificationStatusEnum diff --git a/.mock/definition/types/tax-treaties.yml b/.mock/definition/types/tax-treaties.yml new file mode 100644 index 00000000..f176fb13 --- /dev/null +++ b/.mock/definition/types/tax-treaties.yml @@ -0,0 +1,74 @@ +types: + TaxTreatyAboundCodeEnum: + docs: The tax treaty code the payee is claiming. + enum: + - AU_17_INDEPENDENT_PERSONAL_SERVICES + - AU_18_DEPENDENT_PERSONAL_SERVICES + - AU_42_PUBLIC_ENTERTAINMENT + - CA_17_INDEPENDENT_PERSONAL_SERVICES + - CA_18_DEPENDENT_PERSONAL_SERVICES + - CA_42_PUBLIC_ENTERTAINMENT + - CN_17_INDEPENDENT_PERSONAL_SERVICES + - CN_18_DEPENDENT_PERSONAL_SERVICES + - CN_42_PUBLIC_ENTERTAINMENT + - GB_17_INDEPENDENT_PERSONAL_SERVICES + - GB_18_DEPENDENT_PERSONAL_SERVICES + - GB_42_PUBLIC_ENTERTAINMENT + - IL_16_SCHOLARSHIP_AND_FELLOWSHIP_GRANT + - IL_17_INDEPENDENT_PERSONAL_SERVICES + - IL_18_DEPENDENT_PERSONAL_SERVICES + - IL_42_PUBLIC_ENTERTAINMENT + - IN_17_INDEPENDENT_PERSONAL_SERVICES + - IN_18_DEPENDENT_PERSONAL_SERVICES + - IN_42_PUBLIC_ENTERTAINMENT + - MX_17_INDEPENDENT_PERSONAL_SERVICES + - MX_18_DEPENDENT_PERSONAL_SERVICES + - MX_42_PUBLIC_ENTERTAINMENT + TaxTreatyIncomeCodeEnum: + enum: + - name: Sixteen + value: '16' + - name: Seventeen + value: '17' + - name: Eighteen + value: '18' + - name: FortyTwo + value: '42' + TaxTreatyBenefitsSchema: + docs: The tax treaty benefits the payee is claiming. + properties: + residentCountry: + type: string + validation: + minLength: 2 + maxLength: 2 + docs: >- + The foreign country, adhering to `ISO 3166-2` standards, the payee is + claiming treaty benefits as a resident with which the United States + has an income tax treaty for payments subject to withholding under + chapter 3 or under section 1446(a) or (f). + claimedProvision: + type: string + validation: + maxLength: 20 + docs: >- + The article and paragraph of the tax treaty that cite the provisions + the payee is claiming. Max 20 characters. + rateOfWithholding: + type: float + docs: >- + The decimal percentage rate of withholding the tax treaty allows by + default. Rates are subject to validation and approval by the Payer. + incomeCode: + type: TaxTreatyIncomeCodeEnum + docs: >- + The code of the income associated with the claimed rate of + withholding. + incomeType: + type: literal<"SERVICES"> + docs: The type of income associated with the claimed rate of withholding. + additionalConditions: + type: optional + docs: >- + The additional conditions the payee is claiming under the cited tax + treaty. diff --git a/.mock/definition/users.yml b/.mock/definition/users.yml new file mode 100644 index 00000000..68aaec4e --- /dev/null +++ b/.mock/definition/users.yml @@ -0,0 +1,151 @@ +imports: + errors: types/errors.yml + headers: types/headers.yml + common: types/common.yml +types: + UserRequestSchema: + examples: + - name: RequestExample + value: + foreignId: my-foreign-id + properties: + email: + type: optional + validation: + format: email + docs: >- + The user's email address. Abound assume's you have taken the proper + steps to verify the ownership of this email address. + availability: deprecated + foreignId: + type: optional + docs: The customer-specific unique identifier associated with this user. + metadata: + type: optional> + docs: >- + Use metadata for storing additional user data. For filtering, please + use `foreignId`. + UserSchema: + examples: + - name: ResponseExample + value: + id: userId_sampleXGMFnhOpeR + createdAt: '2024-01-01T00:00:00.000Z' + foreignId: my-foreign-id + extends: + - UserRequestSchema + properties: + id: + type: string + docs: The unique identifier for this user. + createdAt: + type: datetime + docs: The creation date and time of the user in `ISO 8601` format. +service: + auth: false + display-name: Users + base-path: '' + endpoints: + list: + docs: Returns a list of users. Up to 100 users are returned per request. + method: GET + display-name: List all users + path: /users + auth: true + request: + name: UsersListRequest + query-parameters: + page: optional + email: optional + foreignId: optional + response: + docs: OK + type: list + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + response: + body: + - $UserSchema.ResponseExample + - name: default222 + response: + body: + - $UserSchema.ResponseExample + create: + docs: Creates a user for a single end-user of your application. + method: POST + display-name: Create a user + path: /users + auth: true + request: + name: UsersCreateRequest + headers: + Idempotency-Key: optional + body: UserRequestSchema + response: + docs: OK + type: UserSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.ConflictErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + request: $UserRequestSchema.RequestExample + response: + body: $UserSchema.ResponseExample + retrieve: + docs: Retrieves the details of an existing user. + method: GET + display-name: Retrieve a user + path: /users/{userId} + path-parameters: + userId: common.UserId + auth: true + response: + docs: OK + type: UserSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.InternalServerErrorSchema + examples: + - name: default + path-parameters: + userId: userId_sampleXGMFnhOpeR + response: + body: $UserSchema.ResponseExample + update: + docs: >- + Updates an existing user. Any body parameters not provided will be + removed. + method: PUT + display-name: Update a user + path: /users/{userId} + path-parameters: + userId: common.UserId + auth: true + request: + body: UserRequestSchema + response: + docs: OK + type: UserSchema + errors: + - errors.BadRequestErrorSchema + - errors.UnauthorizedErrorSchema + - errors.NotFoundErrorSchema + - errors.ConflictErrorSchema + examples: + - name: default + path-parameters: + userId: userId_sampleXGMFnhOpeR + request: $UserRequestSchema.RequestExample + response: + body: $UserSchema.ResponseExample diff --git a/.mock/definition/webhooks.yml b/.mock/definition/webhooks.yml new file mode 100644 index 00000000..db91a059 --- /dev/null +++ b/.mock/definition/webhooks.yml @@ -0,0 +1,534 @@ +types: + AboundSignatureHeader: + docs: An HMAC signature of the payload + type: string + WebhookPayloadBaseSchema: + properties: + id: + type: string + docs: The id of the webhook attempt + webhookId: + type: string + docs: The id of the webhook event + timestamp: + type: datetime + docs: >- + The date and time in `ISO 8601` format when the webhook attempt was + triggered + resourceId: + type: string + docs: The id of the resource that triggered the webhook + resourceUrl: + type: string + docs: The URL of the resource that triggered the webhook +webhooks: + USER_CREATED: + docs: Receive a notification when a User is created + method: POST + display-name: USER_CREATED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: UserCreatedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"USER_CREATED"> + USER_UPDATED: + docs: Receive a notification when a User is updated + method: POST + display-name: USER_UPDATED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: UserUpdatedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"USER_UPDATED"> + TIN_VERIFICATION_CREATED: + docs: Receive a notification when a TIN Verification is created + method: POST + display-name: TIN_VERIFICATION_CREATED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: TINVerificationCreatedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TIN_VERIFICATION_CREATED"> + TIN_VERIFICATION_MATCH: + docs: Receive a notification when a TIN Verification status changes to `MATCH` + method: POST + display-name: TIN_VERIFICATION_MATCH + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: TINVerificationMatchWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TIN_VERIFICATION_MATCH"> + TIN_VERIFICATION_MISMATCH: + docs: >- + Receive a notification when a TIN Verification status changes to + `MISMATCH` + method: POST + display-name: TIN_VERIFICATION_MISMATCH + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: TINVerificationMismatchWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TIN_VERIFICATION_MISMATCH"> + TIN_VERIFICATION_PENDING: + docs: Receive a notification when a TIN Verification status changes to `PENDING` + method: POST + display-name: TIN_VERIFICATION_PENDING + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: TINVerificationPendingWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TIN_VERIFICATION_PENDING"> + MAILING_CREATED: + docs: Receive a notification when a Mailing is created + method: POST + display-name: MAILING_CREATED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: MailingCreatedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"MAILING_CREATED"> + MAILING_DELETED: + docs: Receive a notification when a Mailing is deleted + method: POST + display-name: MAILING_DELETED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: MailingDeletedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"MAILING_DELETED"> + MAILING_DELIVERED: + docs: Receive a notification when a Mailing status changes to `DELIVERED` + method: POST + display-name: MAILING_DELIVERED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: MailingDeliveredWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"MAILING_DELIVERED"> + MAILING_IN_TRANSIT: + docs: Receive a notification when a Mailing status changes to `IN_TRANSIT` + method: POST + display-name: MAILING_IN_TRANSIT + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: MailingInTransitWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"MAILING_IN_TRANSIT"> + MAILING_PROCESSING_FOR_DELIVERY: + docs: >- + Receive a notification when a Mailing status changes to + `PROCESSING_FOR_DELIVERY` + method: POST + display-name: MAILING_PROCESSING_FOR_DELIVERY + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: MailingProcessingForDeliveryWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"MAILING_PROCESSING_FOR_DELIVERY"> + MAILING_RETURNED_TO_SENDER: + docs: >- + Receive a notification when a Mailing status changes to + `RETURNED_TO_SENDER` + method: POST + display-name: MAILING_RETURNED_TO_SENDER + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: MailingReturnedToSenderWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"MAILING_RETURNED_TO_SENDER"> + MAILING_UPDATED: + docs: Receive a notification when a Mailing is updated + method: POST + display-name: MAILING_UPDATED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: MailingUpdatedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"MAILING_UPDATED"> + TEN99_INT_ACCEPTED: + docs: Receive a notification when a Form 1099-INT status changes to `ACCEPTED` + method: POST + display-name: TEN99_INT_ACCEPTED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099IntAcceptedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_INT_ACCEPTED"> + TEN99_INT_CORRECTED: + docs: Receive a notification when a Form 1099-INT is corrected. + method: POST + display-name: TEN99_INT_CORRECTED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099IntCorrectedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_INT_CORRECTED"> + TEN99_INT_CREATED: + docs: Receive a notification when a Form 1099-INT is created + method: POST + display-name: TEN99_INT_CREATED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099IntCreatedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_INT_CREATED"> + TEN99_INT_DELETED: + docs: Receive a notification when a Form 1099-INT is deleted + method: POST + display-name: TEN99_INT_DELETED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099IntDeletedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_INT_DELETED"> + TEN99_INT_FILED: + docs: Receive a notification when a Form 1099-INT is filed + method: POST + display-name: TEN99_INT_FILED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099IntFiledWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_INT_FILED"> + TEN99_INT_REJECTED: + docs: Receive a notification when a Form 1099-INT is rejected + method: POST + display-name: TEN99_INT_REJECTED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099IntRejectedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_INT_REJECTED"> + TEN99_INT_VOIDED: + docs: Receive a notification when a Form 1099-INT is voided + method: POST + display-name: TEN99_INT_VOIDED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099IntVoidedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_INT_VOIDED"> + TEN99_K_ACCEPTED: + docs: Receive a notification when a Form 1099-K status changes to `ACCEPTED` + method: POST + display-name: TEN99_K_ACCEPTED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099KAcceptedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_K_ACCEPTED"> + TEN99_K_CORRECTED: + docs: Receive a notification when a Form 1099-K is corrected. + method: POST + display-name: TEN99_K_CORRECTED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099KCorrectedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_K_CORRECTED"> + TEN99_K_CREATED: + docs: Receive a notification when a Form 1099-K is created + method: POST + display-name: TEN99_K_CREATED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099KCreatedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_K_CREATED"> + TEN99_K_DELETED: + docs: Receive a notification when a Form 1099-K is deleted + method: POST + display-name: TEN99_K_DELETED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099KDeletedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_K_DELETED"> + TEN99_K_FILED: + docs: Receive a notification when a Form 1099-K is filed + method: POST + display-name: TEN99_K_FILED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099KFiledWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_K_FILED"> + TEN99_K_REJECTED: + docs: Receive a notification when a Form 1099-K is rejected + method: POST + display-name: TEN99_K_REJECTED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099KRejectedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_K_REJECTED"> + TEN99_K_VOIDED: + docs: Receive a notification when a Form 1099-K is voided + method: POST + display-name: TEN99_K_VOIDED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099KVoidedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_K_VOIDED"> + TEN99_NEC_ACCEPTED: + docs: Receive a notification when a Form 1099-NEC status changes to `ACCEPTED` + method: POST + display-name: TEN99_NEC_ACCEPTED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099NecAcceptedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_NEC_ACCEPTED"> + TEN99_NEC_CORRECTED: + docs: Receive a notification when a Form 1099-NEC is corrected. + method: POST + display-name: TEN99_NEC_CORRECTED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099NecCorrectedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_NEC_CORRECTED"> + TEN99_NEC_CREATED: + docs: Receive a notification when a Form 1099-NEC is created + method: POST + display-name: TEN99_NEC_CREATED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099NecCreatedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_NEC_CREATED"> + TEN99_NEC_DELETED: + docs: Receive a notification when a Form 1099-NEC is deleted + method: POST + display-name: TEN99_NEC_DELETED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099NecDeletedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_NEC_DELETED"> + TEN99_NEC_FILED: + docs: Receive a notification when a Form 1099-NEC is filed + method: POST + display-name: TEN99_NEC_FILED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099NecFiledWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_NEC_FILED"> + TEN99_NEC_REJECTED: + docs: Receive a notification when a Form 1099-NEC is rejected + method: POST + display-name: TEN99_NEC_REJECTED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099NecRejectedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_NEC_REJECTED"> + TEN99_NEC_VOIDED: + docs: Receive a notification when a Form 1099-NEC is voided + method: POST + display-name: TEN99_NEC_VOIDED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099NecVoidedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_NEC_VOIDED"> + TEN99_MISC_ACCEPTED: + docs: Receive a notification when a Form 1099-MISC status changes to `ACCEPTED` + method: POST + display-name: TEN99_MISC_ACCEPTED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099MiscAcceptedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_MISC_ACCEPTED"> + TEN99_MISC_CORRECTED: + docs: Receive a notification when a Form 1099-MISC is corrected. + method: POST + display-name: TEN99_MISC_CORRECTED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099MiscCorrectedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_MISC_CORRECTED"> + TEN99_MISC_CREATED: + docs: Receive a notification when a Form 1099-MISC is created + method: POST + display-name: TEN99_MISC_CREATED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099MiscCreatedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_MISC_CREATED"> + TEN99_MISC_DELETED: + docs: Receive a notification when a Form 1099-MISC is deleted + method: POST + display-name: TEN99_MISC_DELETED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099MiscDeletedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_MISC_DELETED"> + TEN99_MISC_FILED: + docs: Receive a notification when a Form 1099-MISC is filed + method: POST + display-name: TEN99_MISC_FILED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099MiscFiledWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_MISC_FILED"> + TEN99_MISC_REJECTED: + docs: Receive a notification when a Form 1099-MISC is rejected + method: POST + display-name: TEN99_MISC_REJECTED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099MiscRejectedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_MISC_REJECTED"> + TEN99_MISC_VOIDED: + docs: Receive a notification when a Form 1099-MISC is voided + method: POST + display-name: TEN99_MISC_VOIDED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: Form1099MiscVoidedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"TEN99_MISC_VOIDED"> + W_9_CREATED: + docs: Receive a notification when a Form W-9 is created + method: POST + display-name: W_9_CREATED + headers: + Abound-Signature: AboundSignatureHeader + payload: + name: FormW9CreatedWebhookPayload + extends: WebhookPayloadBaseSchema + properties: + event: + type: literal<"W_9_CREATED"> diff --git a/.mock/fern.config.json b/.mock/fern.config.json new file mode 100644 index 00000000..dfd0e035 --- /dev/null +++ b/.mock/fern.config.json @@ -0,0 +1,4 @@ +{ + "organization" : "abound", + "version" : "0.40.0" +} \ No newline at end of file diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..6db0876c --- /dev/null +++ b/.npmignore @@ -0,0 +1,9 @@ +node_modules +src +tests +.gitignore +.github +.fernignore +.prettierrc.yml +tsconfig.json +yarn.lock \ No newline at end of file diff --git a/.prettierrc.yml b/.prettierrc.yml new file mode 100644 index 00000000..0c06786b --- /dev/null +++ b/.prettierrc.yml @@ -0,0 +1,2 @@ +tabWidth: 4 +printWidth: 120 diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 50f1404d..00000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 Track Technologies, Inc DBA “Abound” - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md index f16514bd..1bba907c 100644 --- a/README.md +++ b/README.md @@ -1,747 +1,177 @@ -# Abound Node.js Library - -The Abound Node library provides convenient access to the Abound API from applications written in server-side JavaScript. - -### Documentation - -The Abound Node SDK supports all Abound API endpoints. See the [API Documentation][docs] and the [API Reference][api-reference] for complete information about the APIs. - -### Requirements - -You can start to integrate the Abound Node library into your solution as soon as you [create an account with Abound][developer-dashboard-registration] and [obtain your API keys][developer-dashboard-keys]. - -### Installation - -Install the SDK with `npm` or `yarn`: - -```console -npm install @withabound/node-sdk --save -``` - -```console -yarn add @withabound/node-sdk -``` - -### Usage - -The Abound client must be configured with your account's `appId` and `appSecret`, which are available on the [Keys page][developer-dashboard-keys] of the [Abound Dashboard][developer-dashboard]. - -Every method returns a promise which can either be chained or handled via `async/await`. - -```ts -import { Abound } from "@withabound/node-sdk"; - -const abound = new Abound({ - appId: "appId_f2d...", - appSecret: "appSecret_bf3...", - environment: "SANDBOX", // or "PRODUCTION" -}); - -(async () => { - const user = await abound.users.create({ - email: "user1@example.com", - }); - - console.log(user.userId); -})(); - -// or - -abound.users - .create({ - email: "user1@example.com", - }) - .then((user) => console.log(user.userId)) - .catch((error) => console.error(error)); -``` - -### Examples - -#### Access Tokens - -Create an `Access Token`: - -```ts -const userId = "userId_506..."; - -const response = await abound.accessTokens.create({ - expiresIn: 300, - userId, -}); - -console.log(response.userId); -``` - -#### Form 1099-INT - -Create a `Form 1099-INT`: - -```ts -const response = await abound.form1099Int.create({ - filingYear: 2022 - payer: { - name: "Hooli", - tin: "111111111", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - phoneNumber: "6501014096", - }, - payee: { - name: "Ada Lovelace", - tin: "000000000", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, - formFields: { - interestIncome: 83_232, - stateTaxInfo: [{ filingState: "CA" as const }], - }, -}); - -console.log(response.payeeUrl); -``` - -List `Form 1099-INT`s: - -```ts -const response = await abound.form1099Int.list(); - -console.log(response); // list of Form 1099-INTs -``` - -Mail a `Form 1099-INT`: - -```ts -const documentId = "documentId_f03..."; - -const response = await abound.form1099Int.mail(documentId, { - to: { - name: "Ada Lovelace", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, - from: { - name: "Hooli", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, -}); - -console.log(response); -``` - -File a `Form 1099-INT`: - -```ts -const documentId = "documentId_f03..."; - -const response = await abound.form1099Int.file(documentId); - -console.log(response.status); -``` - -Correct a `Form 1099-INT`: - -```ts -const documentId = "documentId_f03..."; - -const response = await abound.form1099Int.correct(documentId, { - payee: { - name: "Ada Lovelace", - tin: "000000000", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, - formFields: { - interestIncome: 24_271, - stateTaxInfo: [{ filingState: "CA" as const }], - }, -}); - -console.log(response); -``` - -Void a `Form 1099-INT`: - -```ts -const documentId = "documentId_f03..."; - -const response = await abound.form1099Int.void(documentId); - -console.log(response); -``` - -Retrieve a `Form 1099-INT`: - -```ts -const documentId = "documentId_f03..."; - -const response = await abound.form1099Int.retrieve(documentId); - -console.log(response); -``` - -Delete a `Form 1099-INT`: - -```ts -const documentId = "documentId_f03..."; - -const response = await abound.form1099Int.delete(documentId); - -console.log(response); // {} -``` - -#### Form 1099-K - -Create a `Form 1099-K`: - -```ts -const response = await abound.form1099K.create({ - filingYear: 2022 - payer: { - name: "Hooli", - tin: "111111111", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - phoneNumber: "6501014096", - }, - payee: { - name: "Ada Lovelace", - tin: "000000000", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, - formFields: { - payerClassification: "EPF_OTHER" as const, - transactionsReportedClassification: "PAYMENT_CARD" as const, - aggregateGrossAmount: 2_332_323, - numberOfPaymentTransactions: 767, - grossAmountsByMonth: { - december: 2_332_323, +# Abound TypeScript Library + +[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen)](https://github.com/fern-api/fern) +[![npm shield](https://img.shields.io/npm/v/abound)](https://www.npmjs.com/package/abound) + +The Abound TypeScript library provides convenient access to the Abound API from TypeScript. + +## Documentation + +API reference documentation is available [here](https://docs.withabound.com). + +## Installation + +```sh +npm i -s abound +``` + +## Usage + +Instantiate and use the client with the following: + +```typescript +import { AboundClient, Abound } from "abound"; + +const client = new AboundClient({ sampleKey: "YOUR_SAMPLE_KEY" }); +await client.form1099Nec.create({ + body: { + filingYear: 2023, + payer: { + name: "Hooli", + tin: "111111111", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + }, + payee: { + name: "Ada Lovelace", + tin: "000000000", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + }, + formFields: { + nonemployeeCompensation: 23423, + hasDirectSalesOver5000: false, + federalIncomeTaxWithheld: 0, + accountNumber: "A0NEqtav7n0sBGoq88w0", + stateTaxInfo: [ + { + filingState: Abound.Form1099FilingStateEnum.Ca, + stateIncome: 23423, + stateTaxWithheld: 0, + }, + ], + }, }, - stateTaxInfo: [{ filingState: "CA" as const }], - }, }); - -console.log(response.payeeUrl); ``` -List `Form 1099-K`s: - -```ts -const response = await abound.form1099K.list(); +## Request And Response Types -console.log(response); // list of Form 1099-Ks -``` +The SDK exports all request and response types as TypeScript interfaces. Simply import them with the +following namespace: -Mail a `Form 1099-K`: - -```ts -const documentId = "documentId_fef..."; - -const response = await abound.form1099K.mail(documentId, { - to: { - name: "Ada Lovelace", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, - from: { - name: "Hooli", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, -}); +```typescript +import { Abound } from "abound"; -console.log(response); +const request: Abound.AccessTokenRequestSchema = { + ... +}; ``` -File a `Form 1099-K`: +## Exception Handling -```ts -const documentId = "documentId_fef..."; +When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error +will be thrown. -const response = await abound.form1099K.file(documentId); +```typescript +import { AboundError } from "abound"; -console.log(response.status); +try { + await client.form1099Nec.create(...); +} catch (err) { + if (err instanceof AboundError) { + console.log(err.statusCode); + console.log(err.message); + console.log(err.body); + } +} ``` -Correct a `Form 1099-K`: - -```ts -const documentId = "documentId_fef..."; - -const response = await abound.form1099K.correct(documentId, { - payee: { - name: "Ada Lovelace", - tin: "000000000", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, - formFields: { - payerClassification: "EPF_OTHER" as const, - transactionsReportedClassification: "PAYMENT_CARD" as const, - aggregateGrossAmount: 512_223, - numberOfPaymentTransactions: 767, - grossAmountsByMonth: { - december: 512_223, - }, - stateTaxInfo: [{ filingState: "CA" as const }], - }, -}); +## Advanced -console.log(response); -``` +### Retries -Void a `Form 1099-K`: +The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long +as the request is deemed retriable and the number of retry attempts has not grown larger than the configured +retry limit (default: 2). -```ts -const documentId = "documentId_fef..."; +A request is deemed retriable when any of the following HTTP status codes is returned: -const response = await abound.form1099K.void(documentId); +- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout) +- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests) +- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors) -console.log(response); -``` +Use the `maxRetries` request option to configure this behavior. -Retrieve a `Form 1099-K`: - -```ts -const documentId = "documentId_fef..."; - -const response = await abound.form1099K.retrieve(documentId); - -console.log(response); -``` - -Delete a `Form 1099-K`: - -```ts -const documentId = "documentId_fef..."; - -const response = await abound.form1099K.delete(documentId); - -console.log(response); // {} -``` - -#### Form 1099-NEC - -Create a `Form 1099-NEC`: - -```ts -const response = await abound.form1099Nec.create({ - filingYear: 2022 - payer: { - name: "Hooli", - tin: "111111111", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - phoneNumber: "6501014096", - }, - payee: { - name: "Ada Lovelace", - tin: "000000000", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, - formFields: { - nonemployeeCompensation: 23_423, - stateTaxInfo: [{ filingState: "CA" as const }], - }, +```typescript +const response = await client.form1099Nec.create(..., { + maxRetries: 0 // override maxRetries at the request level }); - -console.log(response.payeeUrl); ``` -List `Form 1099-NEC`s: - -```ts -const response = await abound.form1099Nec.list(); +### Timeouts -console.log(response); // list of Form 1099-NECs -``` +The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior. -Mail a `Form 1099-NEC`: - -```ts -const documentId = "documentId_63a..."; - -const response = await abound.form1099Nec.mail(documentId, { - to: { - name: "Ada Lovelace", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, - from: { - name: "Hooli", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, +```typescript +const response = await client.form1099Nec.create(..., { + timeoutInSeconds: 30 // override timeout to 30s }); - -console.log(response); ``` -File a `Form 1099-NEC`: - -```ts -const documentId = "documentId_63a..."; +### Aborting Requests -const response = await abound.form1099Nec.file(documentId); +The SDK allows users to abort requests at any point by passing in an abort signal. -console.log(response.status); -``` - -Correct a `Form 1099-NEC`: - -```ts -const documentId = "documentId_63a..."; - -const response = await abound.form1099Nec.correct(documentId, { - payee: { - name: "Ada Lovelace", - tin: "000000000", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, - formFields: { - nonemployeeCompensation: 24_389, - stateTaxInfo: [{ filingState: "CA" as const }], - }, +```typescript +const controller = new AbortController(); +const response = await client.form1099Nec.create(..., { + abortSignal: controller.signal }); - -console.log(response); +controller.abort(); // aborts the request ``` -Void a `Form 1099-NEC`: +### Runtime Compatibility -```ts -const documentId = "documentId_63a..."; +The SDK defaults to `node-fetch` but will use the global fetch client if present. The SDK works in the following +runtimes: -const response = await abound.form1099Nec.void(documentId); +- Node.js 18+ +- Vercel +- Cloudflare Workers +- Deno v1.25+ +- Bun 1.0+ +- React Native -console.log(response); -``` - -Retrieve a `Form 1099-NEC`: - -```ts -const documentId = "documentId_63a..."; - -const response = await abound.form1099Nec.retrieve(documentId); - -console.log(response); -``` +### Customizing Fetch Client -Delete a `Form 1099-NEC`: +The SDK provides a way for your to customize the underlying HTTP client / Fetch function. If you're running in an +unsupported environment, this provides a way for you to break glass and ensure the SDK works. -```ts -const documentId = "documentId_63a..."; +```typescript +import { AboundClient } from "abound"; -const response = await abound.form1099Nec.delete(documentId); - -console.log(response); // {} -``` - -#### Form W-9 - -Create a `Form W-9`: - -```ts -const response = await abound.formW9.create({ - payee: { - name: "Ada Lovelace", - tin: "000000000", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, - formFields: { - taxClassification: "SOLE_PROPRIETOR" as const, - certifiedAt: "2023-01-01T00:00:00.000Z", - }, -}); - -console.log(response.url); -``` - -List `Form W-9`s: - -```ts -const response = await abound.formW9.list(); - -console.log(response); // list of Form W-9s -``` - -Retrieve a `Form W-9`: - -```ts -const documentId = "documentId_f48..."; - -const response = await abound.formW9.retrieve(documentId); - -console.log(response); -``` - -#### Mailings - -List `Mailing`s: - -```ts -const documentId = "documentId_efb..."; - -const response = await abound.mailings.list(); - -console.log(response); // list of Mailings -``` - -Retrieve a `Mailing`: - -```ts -const mailingId = "mailingId_d01..."; - -const response = await abound.mailings.retrieve(mailingId); - -console.log(response); -``` - -Update a `Mailing`: - -```ts -const mailingId = "mailingId_d01..."; - -const response = await abound.mailings.update(mailingId, { - to: { - name: "Ada Lovelace", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, - from: { - name: "Hooli", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, -}); - -console.log(response); -``` - -Delete a `Mailing`: - -```ts -const mailingId = "mailingId_d01..."; - -const response = await abound.mailings.delete(mailingId); - -console.log(response); // {} -``` - -#### TIN Verifications - -Create a `TIN Verification`: - -```ts -const response = await abound.tinVerifications.create({ - name: "Ada Lovelace", - tin: "111111111", -}); - -console.log(response.tinFingerprint); -``` - -List `TIN Verifications`s: - -```ts -const response = await abound.tinVerifications.list(); - -console.log(response); // list of TIN Verifications -``` - -Retrieve a `TIN Verification`: - -```ts -const tinVerificationId = "tinVerificationId_40c..."; - -const response = await abound.tinVerifications.retrieve(tinVerificationId); - -console.log(response.tinFingerprint); -``` - -#### Users - -Create a `User`: - -```ts -const response = await abound.users.create({ - email: "jane.doe@example.com", +const client = new AboundClient({ + ... + fetcher: // provide your implementation here }); - -console.log(response.userId); ``` -List `User`s: - -```ts -const response = await abound.users.list(); - -console.log(response); // list of Users -``` - -Retrieve a `User`: - -```ts -const userId = "userId_506..."; - -const response = await abound.users.retrieve(userId); - -console.log(response.userId); -``` +## Contributing -Update a `User`: - -```ts -const userId = "userId_506..."; - -const response = await abound.users.update(userId, { - email: "janedoe123@example.com", -}); - -console.log(response.email); -``` - -### Development - -Run all tests: - -```console -npx vitest -``` - -Run xo: - -```console -npx xo -``` - -or, run with autofix: - -```console -npx xo --fix -``` - -Compile: - -```console -npm run compile -``` - -Install husky: - -```console -npx husky install -``` - -Publish artifacts locally: - -Install `yalc` with `npm` or `yarn`: - -```console -npm install yalc -g -``` - -```console -yarn global add yalc -``` - -Build the SDK: - -```console -npm run build -``` - -Publish artifacts to local `yalc` registry: - -```console -yalc push -``` - -Install the local artifacts: - -```console -~/my-project $ yalc add @withabound/node-sdk -``` +While we value open-source contributions to this SDK, this library is generated programmatically. +Additions made directly to this library would have to be moved over to our generation code, +otherwise they would be overwritten upon the next generated release. Feel free to open a PR as +a proof of concept, but know that we will not be able to merge it as-is. We suggest opening +an issue first to discuss with us! -[docs]: https://docs.withabound.com -[api-reference]: https://docs.withabound.com/reference -[developer-dashboard]: https://dashboard.withabound.com -[developer-dashboard-keys]: https://dashboard.withabound.com/keys -[developer-dashboard-registration]: https://dashboard.withabound.com/register-organization +On the other hand, contributions to the README are always very welcome! diff --git a/build.sh b/build.sh deleted file mode 100755 index 2374b9c6..00000000 --- a/build.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -set -e - -# Clean dist directory -rm -rf dist - -# Verify package.json version matches version.ts -source ./verify_version.sh - -# Build for esm and cjs -npm run build:esm -npm run build:cjs - -# Fix esm imports -node ./fix-esm-imports.mjs - -# Add package.json file to esm subtree -node ./create-package-json.cjs dist/esm/package.json module - -# Add package.json file to cjs subtree -node ./create-package-json.cjs dist/cjs/package.json commonjs - -# Remove test files -find ./dist -type f -name "*.test.js" -exec rm {} + -find ./dist -type f -name "*.test.d.ts" -exec rm {} + -find ./dist -type f -name "test-utils*" -exec rm {} + diff --git a/create-package-json.cjs b/create-package-json.cjs deleted file mode 100644 index bbb8600d..00000000 --- a/create-package-json.cjs +++ /dev/null @@ -1,11 +0,0 @@ -const fs = require("node:fs"); -const path = require("node:path"); -const process = require("node:process"); -const { version } = require("./package.json"); - -const [filepath, type] = process.argv.slice(2); - -fs.writeFileSync( - path.join(__dirname, filepath), - JSON.stringify({ version, type }, undefined, 2) -); diff --git a/fix-esm-imports.mjs b/fix-esm-imports.mjs deleted file mode 100644 index c81af732..00000000 --- a/fix-esm-imports.mjs +++ /dev/null @@ -1,52 +0,0 @@ -import fs from "node:fs"; -import path from "node:path"; -import process from "node:process"; - -const IMPORT_REGEXP = - /^((import|export) [^';]* from "(\.\/|(\.\.\/)+)[^';]*)"/g; - -const initialPath = path.join(process.cwd(), "dist", "esm"); -fixImportsAtFolder(initialPath); - -function fixImportsAtFolder(rootPath) { - const entries = fs.readdirSync(rootPath); - - for (const entry of entries) { - const entryPath = path.join(rootPath, entry); - if (entry.endsWith(".js")) { - fixImportsAtFile(entryPath); - } else if (!path.extname(entry)) { - const stat = fs.statSync(entryPath); - if (stat.isDirectory()) { - fixImportsAtFolder(entryPath); - } - } - } -} - -function fixImportsAtFile(filePath) { - const fileContents = fs.readFileSync(filePath).toString("utf8"); - const lines = fileContents.split("\n"); - const fixedLines = lines.map((line) => { - if (!IMPORT_REGEXP.test(line)) { - return line; - } - - const [, importPath] = line.split(`"`); - - const fullPath = path.join(filePath, "..", importPath); - if (!fs.existsSync(fullPath)) { - return line.replaceAll(IMPORT_REGEXP, '$1.js"'); - } - - const stat = fs.statSync(fullPath); - if (stat.isDirectory()) { - return line.replaceAll(IMPORT_REGEXP, '$1/index.js"'); - } - - return line; - }); - - const withFixedImports = fixedLines.join("\n"); - fs.writeFileSync(filePath, withFixedImports); -} diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 00000000..35d6e65b --- /dev/null +++ b/jest.config.js @@ -0,0 +1,5 @@ +/** @type {import('jest').Config} */ +module.exports = { + preset: "ts-jest", + testEnvironment: "node", +}; diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 24e7c6f0..00000000 --- a/package-lock.json +++ /dev/null @@ -1,8298 +0,0 @@ -{ - "name": "@withabound/node-sdk", - "version": "5.2.1", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "@withabound/node-sdk", - "version": "5.2.1", - "license": "MIT", - "dependencies": { - "type-fest": "4.25.0" - }, - "devDependencies": { - "@tsconfig/node18": "18.2.4", - "@vitest/coverage-v8": "2.0.5", - "genversion": "3.2.0", - "husky": "9.1.5", - "lint-staged": "15.2.9", - "prettier": "3.3.3", - "typescript": "5.5.4", - "vitest": "2.0.5", - "xo": "0.59.3" - } - }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", - "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.24.7", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", - "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", - "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.8.tgz", - "integrity": "sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/types": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.8.tgz", - "integrity": "sha512-SkSBEHwwJRU52QEVZBmMBnE5Ux2/6WU1grdYyOhpbCNxbmJrDuDCphBzKZSO3taf0zztp+qkWlymE5tVL5l0TA==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.24.8", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", - "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", - "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", - "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", - "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", - "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", - "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", - "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", - "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", - "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", - "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", - "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", - "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", - "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", - "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", - "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", - "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", - "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", - "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", - "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", - "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", - "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", - "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", - "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", - "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", - "dev": true, - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", - "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", - "dev": true - }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", - "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", - "dev": true, - "peer": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "optional": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/@pkgr/core": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", - "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts" - } - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.20.0.tgz", - "integrity": "sha512-TSpWzflCc4VGAUJZlPpgAJE1+V60MePDQnBd7PPkpuEmOy8i87aL6tinFGKBFKuEDikYpig72QzdT3QPYIi+oA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.20.0.tgz", - "integrity": "sha512-u00Ro/nok7oGzVuh/FMYfNoGqxU5CPWz1mxV85S2w9LxHR8OoMQBuSk+3BKVIDYgkpeOET5yXkx90OYFc+ytpQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.20.0.tgz", - "integrity": "sha512-uFVfvzvsdGtlSLuL0ZlvPJvl6ZmrH4CBwLGEFPe7hUmf7htGAN+aXo43R/V6LATyxlKVC/m6UsLb7jbG+LG39Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.20.0.tgz", - "integrity": "sha512-xbrMDdlev53vNXexEa6l0LffojxhqDTBeL+VUxuuIXys4x6xyvbKq5XqTXBCEUA8ty8iEJblHvFaWRJTk/icAQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.20.0.tgz", - "integrity": "sha512-jMYvxZwGmoHFBTbr12Xc6wOdc2xA5tF5F2q6t7Rcfab68TT0n+r7dgawD4qhPEvasDsVpQi+MgDzj2faOLsZjA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.20.0.tgz", - "integrity": "sha512-1asSTl4HKuIHIB1GcdFHNNZhxAYEdqML/MW4QmPS4G0ivbEcBr1JKlFLKsIRqjSwOBkdItn3/ZDlyvZ/N6KPlw==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.20.0.tgz", - "integrity": "sha512-COBb8Bkx56KldOYJfMf6wKeYJrtJ9vEgBRAOkfw6Ens0tnmzPqvlpjZiLgkhg6cA3DGzCmLmmd319pmHvKWWlQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.20.0.tgz", - "integrity": "sha512-+it+mBSyMslVQa8wSPvBx53fYuZK/oLTu5RJoXogjk6x7Q7sz1GNRsXWjn6SwyJm8E/oMjNVwPhmNdIjwP135Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.20.0.tgz", - "integrity": "sha512-yAMvqhPfGKsAxHN8I4+jE0CpLWD8cv4z7CK7BMmhjDuz606Q2tFKkWRY8bHR9JQXYcoLfopo5TTqzxgPUjUMfw==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.20.0.tgz", - "integrity": "sha512-qmuxFpfmi/2SUkAw95TtNq/w/I7Gpjurx609OOOV7U4vhvUhBcftcmXwl3rqAek+ADBwSjIC4IVNLiszoj3dPA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.20.0.tgz", - "integrity": "sha512-I0BtGXddHSHjV1mqTNkgUZLnS3WtsqebAXv11D5BZE/gfw5KoyXSAXVqyJximQXNvNzUo4GKlCK/dIwXlz+jlg==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.20.0.tgz", - "integrity": "sha512-y+eoL2I3iphUg9tN9GB6ku1FA8kOfmF4oUEWhztDJ4KXJy1agk/9+pejOuZkNFhRwHAOxMsBPLbXPd6mJiCwew==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.20.0.tgz", - "integrity": "sha512-hM3nhW40kBNYUkZb/r9k2FKK+/MnKglX7UYd4ZUy5DJs8/sMsIbqWK2piZtVGE3kcXVNj3B2IrUYROJMMCikNg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.20.0.tgz", - "integrity": "sha512-psegMvP+Ik/Bg7QRJbv8w8PAytPA7Uo8fpFjXyCRHWm6Nt42L+JtoqH8eDQ5hRP7/XW2UiIriy1Z46jf0Oa1kA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.20.0.tgz", - "integrity": "sha512-GabekH3w4lgAJpVxkk7hUzUf2hICSQO0a/BLFA11/RMxQT92MabKAqyubzDZmMOC/hcJNlc+rrypzNzYl4Dx7A==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.20.0.tgz", - "integrity": "sha512-aJ1EJSuTdGnM6qbVC4B5DSmozPTqIag9fSzXRNNo+humQLG89XpPgdt16Ia56ORD7s+H8Pmyx44uczDQ0yDzpg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@sec-ant/readable-stream": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@sec-ant/readable-stream/-/readable-stream-0.4.1.tgz", - "integrity": "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==", - "dev": true - }, - "node_modules/@sindresorhus/merge-streams": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", - "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@tsconfig/node18": { - "version": "18.2.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node18/-/node18-18.2.4.tgz", - "integrity": "sha512-5xxU8vVs9/FNcvm3gE07fPbn9tl6tqGGWA9tSlwsUEkBxtRnTsNmwrV8gasZ9F/EobaSv9+nu8AxUKccw77JpQ==", - "dev": true - }, - "node_modules/@types/eslint": { - "version": "8.44.6", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.6.tgz", - "integrity": "sha512-P6bY56TVmX8y9J87jHNgQh43h6VVU+6H7oN7hgvivV81K2XY8qJZ5vqPy/HdUoVIelii2kChYVzQanlswPWVFw==", - "dev": true, - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.6", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.6.tgz", - "integrity": "sha512-zfM4ipmxVKWdxtDaJ3MP3pBurDXOCoyjvlpE3u6Qzrmw4BPbfm4/ambIeTk/r/J0iq/+2/xp0Fmt+gFvXJY2PQ==", - "dev": true, - "peer": true, - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, - "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", - "dev": true - }, - "node_modules/@types/json-schema": { - "version": "7.0.14", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.14.tgz", - "integrity": "sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw==", - "dev": true - }, - "node_modules/@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true - }, - "node_modules/@types/node": { - "version": "20.8.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.9.tgz", - "integrity": "sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg==", - "dev": true, - "peer": true, - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@types/normalize-package-data": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", - "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", - "dev": true - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.16.1.tgz", - "integrity": "sha512-SxdPak/5bO0EnGktV05+Hq8oatjAYVY3Zh2bye9pGZy6+jwyR3LG3YKkV4YatlsgqXP28BTeVm9pqwJM96vf2A==", - "dev": true, - "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.16.1", - "@typescript-eslint/type-utils": "7.16.1", - "@typescript-eslint/utils": "7.16.1", - "@typescript-eslint/visitor-keys": "7.16.1", - "graphemer": "^1.4.0", - "ignore": "^5.3.1", - "natural-compare": "^1.4.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^7.0.0", - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "7.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.16.1.tgz", - "integrity": "sha512-u+1Qx86jfGQ5i4JjK33/FnawZRpsLxRnKzGE6EABZ40KxVT/vWsiZFEBBHjFOljmmV3MBYOHEKi0Jm9hbAOClA==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "7.16.1", - "@typescript-eslint/types": "7.16.1", - "@typescript-eslint/typescript-estree": "7.16.1", - "@typescript-eslint/visitor-keys": "7.16.1", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "7.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.16.1.tgz", - "integrity": "sha512-nYpyv6ALte18gbMz323RM+vpFpTjfNdyakbf3nsLvF43uF9KeNC289SUEW3QLZ1xPtyINJ1dIsZOuWuSRIWygw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.16.1", - "@typescript-eslint/visitor-keys": "7.16.1" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "7.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.16.1.tgz", - "integrity": "sha512-rbu/H2MWXN4SkjIIyWcmYBjlp55VT+1G3duFOIukTNFxr9PI35pLc2ydwAfejCEitCv4uztA07q0QWanOHC7dA==", - "dev": true, - "dependencies": { - "@typescript-eslint/typescript-estree": "7.16.1", - "@typescript-eslint/utils": "7.16.1", - "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/types": { - "version": "7.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.16.1.tgz", - "integrity": "sha512-AQn9XqCzUXd4bAVEsAXM/Izk11Wx2u4H3BAfQVhSfzfDOm/wAON9nP7J5rpkCxts7E5TELmN845xTUCQrD1xIQ==", - "dev": true, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.16.1.tgz", - "integrity": "sha512-0vFPk8tMjj6apaAZ1HlwM8w7jbghC8jc1aRNJG5vN8Ym5miyhTQGMqU++kuBFDNKe9NcPeZ6x0zfSzV8xC1UlQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.16.1", - "@typescript-eslint/visitor-keys": "7.16.1", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "7.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.16.1.tgz", - "integrity": "sha512-WrFM8nzCowV0he0RlkotGDujx78xudsxnGMBHI88l5J8wEhED6yBwaSLP99ygfrzAjsQvcYQ94quDwI0d7E1fA==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.16.1", - "@typescript-eslint/types": "7.16.1", - "@typescript-eslint/typescript-estree": "7.16.1" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.16.1.tgz", - "integrity": "sha512-Qlzzx4sE4u3FsHTPQAAQFJFNOuqtuY0LFrZHwQ8IHK705XxBiWOFkfKRWu6niB7hwfgnwIpO4jTC75ozW1PHWg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.16.1", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true - }, - "node_modules/@vitest/coverage-v8": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-2.0.5.tgz", - "integrity": "sha512-qeFcySCg5FLO2bHHSa0tAZAOnAUbp4L6/A5JDuj9+bt53JREl8hpLjLHEWF0e/gWc8INVpJaqA7+Ene2rclpZg==", - "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.3.0", - "@bcoe/v8-coverage": "^0.2.3", - "debug": "^4.3.5", - "istanbul-lib-coverage": "^3.2.2", - "istanbul-lib-report": "^3.0.1", - "istanbul-lib-source-maps": "^5.0.6", - "istanbul-reports": "^3.1.7", - "magic-string": "^0.30.10", - "magicast": "^0.3.4", - "std-env": "^3.7.0", - "test-exclude": "^7.0.1", - "tinyrainbow": "^1.2.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "vitest": "2.0.5" - } - }, - "node_modules/@vitest/expect": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.0.5.tgz", - "integrity": "sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==", - "dev": true, - "dependencies": { - "@vitest/spy": "2.0.5", - "@vitest/utils": "2.0.5", - "chai": "^5.1.1", - "tinyrainbow": "^1.2.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/pretty-format": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.0.5.tgz", - "integrity": "sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ==", - "dev": true, - "dependencies": { - "tinyrainbow": "^1.2.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/runner": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.0.5.tgz", - "integrity": "sha512-TfRfZa6Bkk9ky4tW0z20WKXFEwwvWhRY+84CnSEtq4+3ZvDlJyY32oNTJtM7AW9ihW90tX/1Q78cb6FjoAs+ig==", - "dev": true, - "dependencies": { - "@vitest/utils": "2.0.5", - "pathe": "^1.1.2" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/snapshot": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.0.5.tgz", - "integrity": "sha512-SgCPUeDFLaM0mIUHfaArq8fD2WbaXG/zVXjRupthYfYGzc8ztbFbu6dUNOblBG7XLMR1kEhS/DNnfCZ2IhdDew==", - "dev": true, - "dependencies": { - "@vitest/pretty-format": "2.0.5", - "magic-string": "^0.30.10", - "pathe": "^1.1.2" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/spy": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.0.5.tgz", - "integrity": "sha512-c/jdthAhvJdpfVuaexSrnawxZz6pywlTPe84LUB2m/4t3rl2fTo9NFGBG4oWgaD+FTgDDV8hJ/nibT7IfH3JfA==", - "dev": true, - "dependencies": { - "tinyspy": "^3.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.0.5.tgz", - "integrity": "sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==", - "dev": true, - "dependencies": { - "@vitest/pretty-format": "2.0.5", - "estree-walker": "^3.0.3", - "loupe": "^3.1.1", - "tinyrainbow": "^1.2.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@webassemblyjs/ast": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", - "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", - "dev": true, - "peer": true, - "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" - } - }, - "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "dev": true, - "peer": true - }, - "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "dev": true, - "peer": true - }, - "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", - "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", - "dev": true, - "peer": true - }, - "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", - "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", - "dev": true, - "peer": true, - "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "dev": true, - "peer": true - }, - "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", - "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", - "dev": true, - "peer": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6" - } - }, - "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", - "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", - "dev": true, - "peer": true, - "dependencies": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "node_modules/@webassemblyjs/leb128": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", - "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", - "dev": true, - "peer": true, - "dependencies": { - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/utf8": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", - "dev": true, - "peer": true - }, - "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", - "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", - "dev": true, - "peer": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-opt": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6", - "@webassemblyjs/wast-printer": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", - "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", - "dev": true, - "peer": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", - "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", - "dev": true, - "peer": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", - "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", - "dev": true, - "peer": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", - "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", - "dev": true, - "peer": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true, - "peer": true - }, - "node_modules/@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true, - "peer": true - }, - "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", - "dev": true, - "peer": true, - "peerDependencies": { - "acorn": "^8" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "peer": true, - "peerDependencies": { - "ajv": "^6.9.1" - } - }, - "node_modules/ansi-escapes": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.0.tgz", - "integrity": "sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw==", - "dev": true, - "dependencies": { - "type-fest": "^3.0.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-escapes/node_modules/type-fest": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", - "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", - "dev": true, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-includes": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", - "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/array.prototype.filter": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array.prototype.filter/-/array.prototype.filter-1.0.3.tgz", - "integrity": "sha512-VizNcj/RGJiUyQBgzwxzE5oHdeuXY5hSbbmKMlphj1cy1Vl7Pn2asCGbSrru6hSQjmCzqTBPVWAF/whmEOVHbw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-array-method-boxes-properly": "^1.0.0", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.find": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/array.prototype.find/-/array.prototype.find-2.2.2.tgz", - "integrity": "sha512-DRumkfW97iZGOfn+lIXbkVrXL04sfYKX+EfOodo8XboR5sxPDVvOjZTF/rysusa9lmhmSOeD6Vp6RKQP+eP4Tg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.findlastindex": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.4.tgz", - "integrity": "sha512-hzvSHUshSpCflDR1QMUBLHGHP1VIEBegT4pix9H/Z92Xw3ySoy6c2qh7lJWTJnRJ8JCZ9bJNCgTyYaJGcJu6xQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.3.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flat": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", - "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flatmap": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", - "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", - "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "is-array-buffer": "^3.0.2", - "is-shared-array-buffer": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/arrify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-3.0.0.tgz", - "integrity": "sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/assertion-error": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", - "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/async": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", - "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==", - "dev": true - }, - "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.23.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.2.tgz", - "integrity": "sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001640", - "electron-to-chromium": "^1.4.820", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.1.0" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, - "peer": true - }, - "node_modules/builtin-modules": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", - "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", - "dev": true, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/bundle-name": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", - "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==", - "dev": true, - "dependencies": { - "run-applescript": "^7.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cac": { - "version": "6.7.14", - "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", - "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/call-bind": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", - "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.1", - "set-function-length": "^1.1.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001643", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001643.tgz", - "integrity": "sha512-ERgWGNleEilSrHM6iUz/zJNSQTP8Mr21wDWpdgvRwcTXGAq6jMtOUPP4dqFPTdKqZ2wKTdtB+uucZ3MRpAUSmg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] - }, - "node_modules/chai": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.1.tgz", - "integrity": "sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==", - "dev": true, - "dependencies": { - "assertion-error": "^2.0.1", - "check-error": "^2.1.1", - "deep-eql": "^5.0.1", - "loupe": "^3.1.0", - "pathval": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "dev": true, - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/check-error": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", - "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", - "dev": true, - "engines": { - "node": ">= 16" - } - }, - "node_modules/chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6.0" - } - }, - "node_modules/ci-info": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.0.0.tgz", - "integrity": "sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "engines": { - "node": ">=8" - } - }, - "node_modules/clean-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz", - "integrity": "sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/clean-regexp/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/cli-cursor": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", - "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", - "dev": true, - "dependencies": { - "restore-cursor": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-truncate": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", - "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", - "dev": true, - "dependencies": { - "slice-ansi": "^5.0.0", - "string-width": "^7.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", - "dev": true - }, - "node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/common-path-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz", - "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/confusing-browser-globals": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", - "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", - "dev": true - }, - "node_modules/core-js-compat": { - "version": "3.37.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.37.1.tgz", - "integrity": "sha512-9TNiImhKvQqSUkOvk/mMRZzOANTiEVC7WaBNhHcKM7x+/5E1l5NvsysR19zuDQScE8k+kfQXWRN3AtS/eOSHpg==", - "dev": true, - "dependencies": { - "browserslist": "^4.23.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/cosmiconfig": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", - "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", - "dev": true, - "dependencies": { - "env-paths": "^2.2.1", - "import-fresh": "^3.3.0", - "js-yaml": "^4.1.0", - "parse-json": "^5.2.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" - }, - "peerDependencies": { - "typescript": ">=4.9.5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", - "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deep-eql": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", - "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "node_modules/default-browser": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.2.1.tgz", - "integrity": "sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==", - "dev": true, - "dependencies": { - "bundle-name": "^4.1.0", - "default-browser-id": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-browser-id": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.0.tgz", - "integrity": "sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/define-data-property": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", - "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/define-lazy-prop": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", - "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/dir-glob/node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, - "node_modules/ejs": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", - "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", - "dev": true, - "dependencies": { - "jake": "^10.8.5" - }, - "bin": { - "ejs": "bin/cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.4.832", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.832.tgz", - "integrity": "sha512-cTen3SB0H2SGU7x467NRe1eVcQgcuS6jckKfWJHia2eo0cHIGOqHoAxevIYZD4eRHcWjkvFzo93bi3vJ9W+1lA==", - "dev": true - }, - "node_modules/emoji-regex": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", - "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", - "dev": true - }, - "node_modules/enhance-visitors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/enhance-visitors/-/enhance-visitors-1.0.0.tgz", - "integrity": "sha512-+29eJLiUixTEDRaZ35Vu8jP3gPLNcQQkQkOQjLp2X+6cZGGPDD/uasbFzvLsJKnGZnvmyZ0srxudwOtskHeIDA==", - "dev": true, - "dependencies": { - "lodash": "^4.13.1" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/enhanced-resolve": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz", - "integrity": "sha512-kxpoMgrdtkXZ5h0SeraBS1iRntpTpQ3R8ussdb38+UAFnMGX5DDyJXePm+OCHOcoXvHDw7mc2erbJBpDnl7TPw==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.2.0", - "tapable": "^0.1.8" - }, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/env-editor": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/env-editor/-/env-editor-1.1.0.tgz", - "integrity": "sha512-7AXskzN6T7Q9TFcKAGJprUbpQa4i1VsAetO9rdBqbGMGlragTziBgWt4pVYJMBWHQlLoX0buy6WFikzPH4Qjpw==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/environment": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", - "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/es-abstract": { - "version": "1.22.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", - "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "arraybuffer.prototype.slice": "^1.0.2", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.5", - "es-set-tostringtag": "^2.0.1", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.2", - "get-symbol-description": "^1.0.0", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", - "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.12", - "is-weakref": "^1.0.2", - "object-inspect": "^1.13.1", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "safe-array-concat": "^1.0.1", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.8", - "string.prototype.trimend": "^1.0.7", - "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.0", - "typed-array-byte-length": "^1.0.0", - "typed-array-byte-offset": "^1.0.0", - "typed-array-length": "^1.0.4", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-array-method-boxes-properly": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", - "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", - "dev": true - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-module-lexer": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz", - "integrity": "sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==", - "dev": true, - "peer": true - }, - "node_modules/es-set-tostringtag": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", - "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.2", - "has-tostringtag": "^1.0.0", - "hasown": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-shim-unscopables": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", - "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", - "dev": true, - "dependencies": { - "hasown": "^2.0.0" - } - }, - "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/esbuild": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", - "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.5", - "@esbuild/android-arm": "0.21.5", - "@esbuild/android-arm64": "0.21.5", - "@esbuild/android-x64": "0.21.5", - "@esbuild/darwin-arm64": "0.21.5", - "@esbuild/darwin-x64": "0.21.5", - "@esbuild/freebsd-arm64": "0.21.5", - "@esbuild/freebsd-x64": "0.21.5", - "@esbuild/linux-arm": "0.21.5", - "@esbuild/linux-arm64": "0.21.5", - "@esbuild/linux-ia32": "0.21.5", - "@esbuild/linux-loong64": "0.21.5", - "@esbuild/linux-mips64el": "0.21.5", - "@esbuild/linux-ppc64": "0.21.5", - "@esbuild/linux-riscv64": "0.21.5", - "@esbuild/linux-s390x": "0.21.5", - "@esbuild/linux-x64": "0.21.5", - "@esbuild/netbsd-x64": "0.21.5", - "@esbuild/openbsd-x64": "0.21.5", - "@esbuild/sunos-x64": "0.21.5", - "@esbuild/win32-arm64": "0.21.5", - "@esbuild/win32-ia32": "0.21.5", - "@esbuild/win32-x64": "0.21.5" - } - }, - "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-compat-utils": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.5.1.tgz", - "integrity": "sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==", - "dev": true, - "dependencies": { - "semver": "^7.5.4" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "eslint": ">=6.0.0" - } - }, - "node_modules/eslint-config-prettier": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", - "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", - "dev": true, - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/eslint-config-xo": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.45.0.tgz", - "integrity": "sha512-T30F2S2HKKmr/RoHopKE7wMUMWrsLMab1qFl2WyFJjETbD+l7p4hSQWpTVGW7TEbSKG1QBekwf6Jn9ZDPA6thA==", - "dev": true, - "dependencies": { - "confusing-browser-globals": "1.0.11" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - }, - "peerDependencies": { - "eslint": ">=8.56.0" - } - }, - "node_modules/eslint-config-xo-typescript": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-xo-typescript/-/eslint-config-xo-typescript-5.0.0.tgz", - "integrity": "sha512-ukAYCKf3p039pRai7hb6xaomZzsKlCjV5qx3NbYe27UC7Nz75If1HcpQL5sNW2b5aH8+Axb6dIIv28+bVtwlVQ==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - }, - "peerDependencies": { - "@typescript-eslint/eslint-plugin": ">=7.16.0", - "@typescript-eslint/parser": ">=7.16.0", - "eslint": ">=8.56.0", - "typescript": ">=5.0.0" - } - }, - "node_modules/eslint-formatter-pretty": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/eslint-formatter-pretty/-/eslint-formatter-pretty-6.0.1.tgz", - "integrity": "sha512-znAUcXmBthdIUmlnRkPSxz3zSJHFUhfHF/nJPcCMVKg/mOa4yUie2Olqg1Ghbi5JJRBZVU3rIgzWSObvIspxMA==", - "dev": true, - "dependencies": { - "@types/eslint": "^8.44.6", - "ansi-escapes": "^6.2.0", - "chalk": "^5.3.0", - "eslint-rule-docs": "^1.1.235", - "log-symbols": "^6.0.0", - "plur": "^5.1.0", - "string-width": "^7.0.0", - "supports-hyperlinks": "^3.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", - "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", - "dev": true, - "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.13.0", - "resolve": "^1.22.4" - } - }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-import-resolver-node/node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/eslint-import-resolver-webpack": { - "version": "0.13.8", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.13.8.tgz", - "integrity": "sha512-Y7WIaXWV+Q21Rz/PJgUxiW/FTBOWmU8NTLdz+nz9mMoiz5vAev/fOaQxwD7qRzTfE3HSm1qsxZ5uRd7eX+VEtA==", - "dev": true, - "dependencies": { - "array.prototype.find": "^2.2.2", - "debug": "^3.2.7", - "enhanced-resolve": "^0.9.1", - "find-root": "^1.1.0", - "hasown": "^2.0.0", - "interpret": "^1.4.0", - "is-core-module": "^2.13.1", - "is-regex": "^1.1.4", - "lodash": "^4.17.21", - "resolve": "^2.0.0-next.5", - "semver": "^5.7.2" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "eslint-plugin-import": ">=1.4.0", - "webpack": ">=1.11.0" - } - }, - "node_modules/eslint-import-resolver-webpack/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-import-resolver-webpack/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/eslint-module-utils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", - "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", - "dev": true, - "dependencies": { - "debug": "^3.2.7" - }, - "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-ava": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-ava/-/eslint-plugin-ava-14.0.0.tgz", - "integrity": "sha512-XmKT6hppaipwwnLVwwvQliSU6AF1QMHiNoLD5JQfzhUhf0jY7CO0O624fQrE+Y/fTb9vbW8r77nKf7M/oHulxw==", - "dev": true, - "dependencies": { - "enhance-visitors": "^1.0.0", - "eslint-utils": "^3.0.0", - "espree": "^9.0.0", - "espurify": "^2.1.1", - "import-modules": "^2.1.0", - "micro-spelling-correcter": "^1.1.1", - "pkg-dir": "^5.0.0", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=14.17 <15 || >=16.4" - }, - "peerDependencies": { - "eslint": ">=8.26.0" - } - }, - "node_modules/eslint-plugin-es-x": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.8.0.tgz", - "integrity": "sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ==", - "dev": true, - "funding": [ - "https://github.com/sponsors/ota-meshi", - "https://opencollective.com/eslint" - ], - "dependencies": { - "@eslint-community/eslint-utils": "^4.1.2", - "@eslint-community/regexpp": "^4.11.0", - "eslint-compat-utils": "^0.5.1" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": ">=8" - } - }, - "node_modules/eslint-plugin-eslint-comments": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz", - "integrity": "sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^1.0.5", - "ignore": "^5.0.5" - }, - "engines": { - "node": ">=6.5.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=4.19.1" - } - }, - "node_modules/eslint-plugin-eslint-comments/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/eslint-plugin-import": { - "version": "2.29.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", - "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", - "dev": true, - "dependencies": { - "array-includes": "^3.1.7", - "array.prototype.findlastindex": "^1.2.3", - "array.prototype.flat": "^1.3.2", - "array.prototype.flatmap": "^1.3.2", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.8.0", - "hasown": "^2.0.0", - "is-core-module": "^2.13.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.7", - "object.groupby": "^1.0.1", - "object.values": "^1.1.7", - "semver": "^6.3.1", - "tsconfig-paths": "^3.15.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" - } - }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-import/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-plugin-n": { - "version": "17.9.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-17.9.0.tgz", - "integrity": "sha512-CPSaXDXdrT4nsrOrO4mT4VB6FMUkoySRkHWuuJJHVqsIEjIeZgMY1H7AzSwPbDScikBmLN82KeM1u7ixV7PzGg==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "enhanced-resolve": "^5.17.0", - "eslint-plugin-es-x": "^7.5.0", - "get-tsconfig": "^4.7.0", - "globals": "^15.0.0", - "ignore": "^5.2.4", - "minimatch": "^9.0.0", - "semver": "^7.5.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": ">=8.23.0" - } - }, - "node_modules/eslint-plugin-n/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/eslint-plugin-n/node_modules/enhanced-resolve": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz", - "integrity": "sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/eslint-plugin-n/node_modules/globals": { - "version": "15.8.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-15.8.0.tgz", - "integrity": "sha512-VZAJ4cewHTExBWDHR6yptdIBlx9YSSZuwojj9Nt5mBRXQzrKakDsVKQ1J63sklLvzAJm0X5+RpO4i3Y2hcOnFw==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint-plugin-n/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/eslint-plugin-n/node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/eslint-plugin-no-use-extend-native": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-no-use-extend-native/-/eslint-plugin-no-use-extend-native-0.5.0.tgz", - "integrity": "sha512-dBNjs8hor8rJgeXLH4HTut5eD3RGWf9JUsadIfuL7UosVQ/dnvOKwxEcRrXrFxrMZ8llUVWT+hOimxJABsAUzQ==", - "dev": true, - "dependencies": { - "is-get-set-prop": "^1.0.0", - "is-js-type": "^2.0.0", - "is-obj-prop": "^1.0.0", - "is-proto-prop": "^2.0.0" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/eslint-plugin-prettier": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz", - "integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==", - "dev": true, - "dependencies": { - "prettier-linter-helpers": "^1.0.0", - "synckit": "^0.9.1" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint-plugin-prettier" - }, - "peerDependencies": { - "@types/eslint": ">=8.0.0", - "eslint": ">=8.0.0", - "eslint-config-prettier": "*", - "prettier": ">=3.0.0" - }, - "peerDependenciesMeta": { - "@types/eslint": { - "optional": true - }, - "eslint-config-prettier": { - "optional": true - } - } - }, - "node_modules/eslint-plugin-promise": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.6.0.tgz", - "integrity": "sha512-57Zzfw8G6+Gq7axm2Pdo3gW/Rx3h9Yywgn61uE/3elTCOePEHVrn2i5CdfBwA1BLK0Q0WqctICIUSqXZW/VprQ==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" - } - }, - "node_modules/eslint-plugin-unicorn": { - "version": "54.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-54.0.0.tgz", - "integrity": "sha512-XxYLRiYtAWiAjPv6z4JREby1TAE2byBC7wlh0V4vWDCpccOSU1KovWV//jqPXF6bq3WKxqX9rdjoRQ1EhdmNdQ==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.5", - "@eslint-community/eslint-utils": "^4.4.0", - "@eslint/eslintrc": "^3.0.2", - "ci-info": "^4.0.0", - "clean-regexp": "^1.0.0", - "core-js-compat": "^3.37.0", - "esquery": "^1.5.0", - "indent-string": "^4.0.0", - "is-builtin-module": "^3.2.1", - "jsesc": "^3.0.2", - "pluralize": "^8.0.0", - "read-pkg-up": "^7.0.1", - "regexp-tree": "^0.1.27", - "regjsparser": "^0.10.0", - "semver": "^7.6.1", - "strip-indent": "^3.0.0" - }, - "engines": { - "node": ">=18.18" - }, - "funding": { - "url": "https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1" - }, - "peerDependencies": { - "eslint": ">=8.56.0" - } - }, - "node_modules/eslint-plugin-unicorn/node_modules/@eslint/eslintrc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", - "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-plugin-unicorn/node_modules/eslint-visitor-keys": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", - "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-plugin-unicorn/node_modules/espree": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.1.0.tgz", - "integrity": "sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==", - "dev": true, - "dependencies": { - "acorn": "^8.12.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.0.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-plugin-unicorn/node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint-rule-docs": { - "version": "1.1.235", - "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.235.tgz", - "integrity": "sha512-+TQ+x4JdTnDoFEXXb3fDvfGOwnyNV7duH8fXWTPD1ieaBmB8omj7Gw/pMBBu4uI2uJCCU8APDaQJzWuXnTsH4A==", - "dev": true - }, - "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/eslint/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/eslint/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/eslint/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint/node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/esm-utils": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esm-utils/-/esm-utils-4.3.0.tgz", - "integrity": "sha512-KupZztbWAnuksy1TYPjTkePxVlMWzmXdmB72z1WvUadtUiFv6x+0PKjYfyy1io9gdvU1A6QIcu055NRrJu1TEA==", - "dev": true, - "dependencies": { - "import-meta-resolve": "^4.1.0", - "url-or-path": "^2.3.0" - }, - "funding": { - "url": "https://github.com/fisker/esm-utils?sponsor=1" - } - }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espurify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/espurify/-/espurify-2.1.1.tgz", - "integrity": "sha512-zttWvnkhcDyGOhSH4vO2qCBILpdCMv/MX8lp4cqgRkQoDRGK2oZxi2GfWhlP2dIXmk7BaKeOTuzbHhyC68o8XQ==", - "dev": true - }, - "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estree-walker": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dev": true, - "dependencies": { - "@types/estree": "^1.0.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eventemitter3": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", - "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", - "dev": true - }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/execa": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", - "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^8.0.1", - "human-signals": "^5.0.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^3.0.0" - }, - "engines": { - "node": ">=16.17" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-diff": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", - "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", - "dev": true - }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/figures": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-6.1.0.tgz", - "integrity": "sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==", - "dev": true, - "dependencies": { - "is-unicode-supported": "^2.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/figures/node_modules/is-unicode-supported": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.0.0.tgz", - "integrity": "sha512-FRdAyx5lusK1iHG0TWpVtk9+1i+GjrzRffhDg4ovQ7mcidMQ6mj+MhKPmvh7Xwyv5gIS06ns49CA7Sqg7lC22Q==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/filelist": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", - "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", - "dev": true, - "dependencies": { - "minimatch": "^5.0.1" - } - }, - "node_modules/filelist/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/filelist/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-cache-dir": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-5.0.0.tgz", - "integrity": "sha512-OuWNfjfP05JcpAP3JPgAKUhWefjMRfI5iAoSsvE24ANYWJaepAtlSgWECSVEuRgSXpyNEc9DJwG/TZpgcOqyig==", - "dev": true, - "dependencies": { - "common-path-prefix": "^3.0.0", - "pkg-dir": "^7.0.0" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/find-cache-dir/node_modules/find-up": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", - "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", - "dev": true, - "dependencies": { - "locate-path": "^7.1.0", - "path-exists": "^5.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/find-cache-dir/node_modules/locate-path": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", - "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", - "dev": true, - "dependencies": { - "p-locate": "^6.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/find-cache-dir/node_modules/p-limit": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", - "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^1.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/find-cache-dir/node_modules/p-locate": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", - "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", - "dev": true, - "dependencies": { - "p-limit": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/find-cache-dir/node_modules/path-exists": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", - "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/find-cache-dir/node_modules/pkg-dir": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-7.0.0.tgz", - "integrity": "sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA==", - "dev": true, - "dependencies": { - "find-up": "^6.3.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/find-package": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/find-package/-/find-package-1.0.0.tgz", - "integrity": "sha512-yVn71XCCaNgxz58ERTl8nA/8YYtIQDY9mHSrgFBfiFtdNNfY0h183Vh8BRkKxD8x9TUw3ec290uJKhDVxqGZBw==", - "dev": true, - "dependencies": { - "parents": "^1.0.1" - } - }, - "node_modules/find-root": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", - "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", - "dev": true - }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up-simple": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/find-up-simple/-/find-up-simple-1.0.0.tgz", - "integrity": "sha512-q7Us7kcjj2VMePAa02hDAF6d+MzsdsAWEwYyOpwUtlerRBkOEPBCRZrAV4XfcSN8fHAgaD0hP7miwoay6DCprw==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.1.tgz", - "integrity": "sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==", - "dev": true, - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", - "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", - "dev": true - }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.3" - } - }, - "node_modules/foreground-child": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", - "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/function.prototype.name": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/genversion": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/genversion/-/genversion-3.2.0.tgz", - "integrity": "sha512-OIYSX6XYA8PHecLDCTri30hadSZfAjZ8Iq1+BBDXqLWP4dRLuJNLoNjsSWtTpw97IccK2LDWzkEstxAB8GdN7g==", - "dev": true, - "dependencies": { - "commander": "^7.2.0", - "ejs": "^3.1.9", - "find-package": "^1.0.0" - }, - "bin": { - "genversion": "bin/genversion.js" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/get-east-asian-width": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", - "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-func-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", - "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-set-props": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-set-props/-/get-set-props-0.1.0.tgz", - "integrity": "sha512-7oKuKzAGKj0ag+eWZwcGw2fjiZ78tXnXQoBgY0aU7ZOxTu4bB7hSuQSDgtKy978EDH062P5FmD2EWiDpQS9K9Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/get-stdin": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz", - "integrity": "sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-stream": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", - "dev": true, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-tsconfig": { - "version": "4.7.6", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.6.tgz", - "integrity": "sha512-ZAqrLlu18NbDdRaHq+AKXzAmqIUPswPWKUchfytdAjiRFnCe5ojG2bstg6mRiZabkKfCoL/e98pbBELIV/YCeA==", - "dev": true, - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true, - "peer": true - }, - "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globals/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", - "dev": true, - "dependencies": { - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/globby": { - "version": "14.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.2.tgz", - "integrity": "sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==", - "dev": true, - "dependencies": { - "@sindresorhus/merge-streams": "^2.1.0", - "fast-glob": "^3.3.2", - "ignore": "^5.2.4", - "path-type": "^5.0.0", - "slash": "^5.1.0", - "unicorn-magic": "^0.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, - "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", - "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "node_modules/human-signals": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", - "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", - "dev": true, - "engines": { - "node": ">=16.17.0" - } - }, - "node_modules/husky": { - "version": "9.1.5", - "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.5.tgz", - "integrity": "sha512-rowAVRUBfI0b4+niA4SJMhfQwc107VLkBUgEYYAOQAbqDCnra1nYh83hF/MDmhYs9t9n1E3DuKOrs2LYNC+0Ag==", - "dev": true, - "bin": { - "husky": "bin.js" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/typicode" - } - }, - "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/import-fresh/node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/import-meta-resolve": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", - "integrity": "sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==", - "dev": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/import-modules": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-modules/-/import-modules-2.1.0.tgz", - "integrity": "sha512-8HEWcnkbGpovH9yInoisxaSoIg9Brbul+Ju3Kqe2UsYDUBJD/iQjSgEj0zPcTDPKfPp2fs5xlv1i+JSye/m1/A==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/internal-slot": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", - "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.2", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/irregular-plurals": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.5.0.tgz", - "integrity": "sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", - "dev": true, - "dependencies": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "dependencies": { - "has-bigints": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-builtin-module": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", - "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", - "dev": true, - "dependencies": { - "builtin-modules": "^3.3.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", - "dev": true, - "dependencies": { - "hasown": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-docker": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", - "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", - "dev": true, - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-get-set-prop": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-get-set-prop/-/is-get-set-prop-1.0.0.tgz", - "integrity": "sha512-DvAYZ1ZgGUz4lzxKMPYlt08qAUqyG9ckSg2pIjfvcQ7+pkVNUHk8yVLXOnCLe5WKXhLop8oorWFBJHpwWQpszQ==", - "dev": true, - "dependencies": { - "get-set-props": "^0.1.0", - "lowercase-keys": "^1.0.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-inside-container": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", - "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", - "dev": true, - "dependencies": { - "is-docker": "^3.0.0" - }, - "bin": { - "is-inside-container": "cli.js" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-js-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-js-type/-/is-js-type-2.0.0.tgz", - "integrity": "sha512-Aj13l47+uyTjlQNHtXBV8Cji3jb037vxwMWCgopRR8h6xocgBGW3qG8qGlIOEmbXQtkKShKuBM9e8AA1OeQ+xw==", - "dev": true, - "dependencies": { - "js-types": "^1.0.0" - } - }, - "node_modules/is-negated-glob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", - "integrity": "sha512-czXVVn/QEmgvej1f50BZ648vUI+em0xqMq2Sn+QncCLN4zj1UAxlT+kw/6ggQTOaZPd1HqKQGEqbpQVtJucWug==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-obj-prop": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-obj-prop/-/is-obj-prop-1.0.0.tgz", - "integrity": "sha512-5Idb61slRlJlsAzi0Wsfwbp+zZY+9LXKUAZpvT/1ySw+NxKLRWfa0Bzj+wXI3fX5O9hiddm5c3DAaRSNP/yl2w==", - "dev": true, - "dependencies": { - "lowercase-keys": "^1.0.0", - "obj-props": "^1.0.0" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-plain-obj": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", - "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-proto-prop": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-proto-prop/-/is-proto-prop-2.0.0.tgz", - "integrity": "sha512-jl3NbQ/fGLv5Jhan4uX+Ge9ohnemqyblWVVCpAvtTQzNFvV2xhJq+esnkIbYQ9F1nITXoLfDDQLp7LBw/zzncg==", - "dev": true, - "dependencies": { - "lowercase-keys": "^1.0.0", - "proto-props": "^2.0.0" - } - }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-relative": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", - "dev": true, - "dependencies": { - "is-unc-path": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", - "dev": true, - "dependencies": { - "which-typed-array": "^1.1.11" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-unc-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", - "dev": true, - "dependencies": { - "unc-path-regex": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-unicode-supported": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", - "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-wsl": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", - "integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==", - "dev": true, - "dependencies": { - "is-inside-container": "^1.0.0" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", - "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", - "dev": true, - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", - "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.23", - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", - "dev": true, - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "dev": true, - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "node_modules/jake": { - "version": "10.8.7", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.7.tgz", - "integrity": "sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==", - "dev": true, - "dependencies": { - "async": "^3.2.3", - "chalk": "^4.0.2", - "filelist": "^1.0.4", - "minimatch": "^3.1.2" - }, - "bin": { - "jake": "bin/cli.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jake/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jake/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jake/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jake/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, - "peer": true, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "peer": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "node_modules/js-types": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/js-types/-/js-types-1.0.0.tgz", - "integrity": "sha512-bfwqBW9cC/Lp7xcRpug7YrXm0IVw+T9e3g4mCYnv0Pjr3zIzU9PCQElYU9oSGAWzXlbdl9X5SAMPejO9sxkeUw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsesc": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", - "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/lilconfig": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", - "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antonk52" - } - }, - "node_modules/line-column-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/line-column-path/-/line-column-path-3.0.0.tgz", - "integrity": "sha512-Atocnm7Wr9nuvAn97yEPQa3pcQI5eLQGBz+m6iTb+CVw+IOzYB9MrYK7jI7BfC9ISnT4Fu0eiwhAScV//rp4Hw==", - "dev": true, - "dependencies": { - "type-fest": "^2.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/line-column-path/node_modules/type-fest": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", - "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", - "dev": true, - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, - "node_modules/lint-staged": { - "version": "15.2.9", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.9.tgz", - "integrity": "sha512-BZAt8Lk3sEnxw7tfxM7jeZlPRuT4M68O0/CwZhhaw6eeWu0Lz5eERE3m386InivXB64fp/mDID452h48tvKlRQ==", - "dev": true, - "dependencies": { - "chalk": "~5.3.0", - "commander": "~12.1.0", - "debug": "~4.3.6", - "execa": "~8.0.1", - "lilconfig": "~3.1.2", - "listr2": "~8.2.4", - "micromatch": "~4.0.7", - "pidtree": "~0.6.0", - "string-argv": "~0.3.2", - "yaml": "~2.5.0" - }, - "bin": { - "lint-staged": "bin/lint-staged.js" - }, - "engines": { - "node": ">=18.12.0" - }, - "funding": { - "url": "https://opencollective.com/lint-staged" - } - }, - "node_modules/lint-staged/node_modules/commander": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", - "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", - "dev": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/listr2": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.4.tgz", - "integrity": "sha512-opevsywziHd3zHCVQGAj8zu+Z3yHNkkoYhWIGnq54RrCVwLz0MozotJEDnKsIBLvkfLGN6BLOyAeRrYI0pKA4g==", - "dev": true, - "dependencies": { - "cli-truncate": "^4.0.0", - "colorette": "^2.0.20", - "eventemitter3": "^5.0.1", - "log-update": "^6.1.0", - "rfdc": "^1.4.1", - "wrap-ansi": "^9.0.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/loader-runner": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6.11.5" - } - }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/lodash-es": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", - "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", - "dev": true - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "node_modules/log-symbols": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-6.0.0.tgz", - "integrity": "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==", - "dev": true, - "dependencies": { - "chalk": "^5.3.0", - "is-unicode-supported": "^1.3.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-update": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz", - "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==", - "dev": true, - "dependencies": { - "ansi-escapes": "^7.0.0", - "cli-cursor": "^5.0.0", - "slice-ansi": "^7.1.0", - "strip-ansi": "^7.1.0", - "wrap-ansi": "^9.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-update/node_modules/ansi-escapes": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.0.0.tgz", - "integrity": "sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==", - "dev": true, - "dependencies": { - "environment": "^1.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-update/node_modules/is-fullwidth-code-point": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", - "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", - "dev": true, - "dependencies": { - "get-east-asian-width": "^1.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-update/node_modules/slice-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", - "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.2.1", - "is-fullwidth-code-point": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/loupe": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.1.tgz", - "integrity": "sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==", - "dev": true, - "dependencies": { - "get-func-name": "^2.0.1" - } - }, - "node_modules/lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/magic-string": { - "version": "0.30.10", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", - "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", - "dev": true, - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15" - } - }, - "node_modules/magicast": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.4.tgz", - "integrity": "sha512-TyDF/Pn36bBji9rWKHlZe+PZb6Mx5V8IHCSxk7X4aljM4e/vyDvZZYwHewdVaqiA0nb3ghfHU/6AUpDxWoER2Q==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.24.4", - "@babel/types": "^7.24.0", - "source-map-js": "^1.2.0" - } - }, - "node_modules/make-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dev": true, - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/memory-fs": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz", - "integrity": "sha512-+y4mDxU4rvXXu5UDSGCGNiesFmwCHuefGMoPCO1WYucNYj7DsLqrFaa2fXVI0H+NNiPTwwzKwspn9yTZqUGqng==", - "dev": true - }, - "node_modules/meow": { - "version": "13.2.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", - "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micro-spelling-correcter": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/micro-spelling-correcter/-/micro-spelling-correcter-1.1.1.tgz", - "integrity": "sha512-lkJ3Rj/mtjlRcHk6YyCbvZhyWTOzdBvTHsxMmZSk5jxN1YyVSQ+JETAom55mdzfcyDrY/49Z7UCW760BK30crg==", - "dev": true - }, - "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", - "dev": true, - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, - "peer": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "peer": true, - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/mimic-function": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", - "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "dev": true, - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true, - "peer": true - }, - "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", - "dev": true - }, - "node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/normalize-package-data/node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/npm-run-path": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", - "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", - "dev": true, - "dependencies": { - "path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm-run-path/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/obj-props": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/obj-props/-/obj-props-1.4.0.tgz", - "integrity": "sha512-p7p/7ltzPDiBs6DqxOrIbtRdwxxVRBj5ROukeNb9RgA+fawhrz5n2hpNz8DDmYR//tviJSj7nUnlppGmONkjiQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.fromentries": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", - "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.groupby": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.2.tgz", - "integrity": "sha512-bzBq58S+x+uo0VjurFT0UktpKHOZmv4/xePiOA1nbB9pMqpGK7rUPNgf+1YC+7mE+0HzhTMqNUuCqvKhj6FnBw==", - "dev": true, - "dependencies": { - "array.prototype.filter": "^1.0.3", - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.0.0" - } - }, - "node_modules/object.values": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", - "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "dev": true, - "dependencies": { - "mimic-fn": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/open": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/open/-/open-10.1.0.tgz", - "integrity": "sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==", - "dev": true, - "dependencies": { - "default-browser": "^5.2.1", - "define-lazy-prop": "^3.0.0", - "is-inside-container": "^1.0.0", - "is-wsl": "^3.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/open-editor": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/open-editor/-/open-editor-5.0.0.tgz", - "integrity": "sha512-fRHi4my03WQSbWfqChs9AdFfSp6SLalB3zadfwfYIojoKanLDBfv2uAdiZCfzdvom7TBdlXu2UeiiydBc56/EQ==", - "dev": true, - "dependencies": { - "env-editor": "^1.1.0", - "execa": "^9.3.0", - "line-column-path": "^3.0.0", - "open": "^10.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/open-editor/node_modules/@sindresorhus/merge-streams": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz", - "integrity": "sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/open-editor/node_modules/execa": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-9.3.0.tgz", - "integrity": "sha512-l6JFbqnHEadBoVAVpN5dl2yCyfX28WoBAGaoQcNmLLSedOxTxcn2Qa83s8I/PA5i56vWru2OHOtrwF7Om2vqlg==", - "dev": true, - "dependencies": { - "@sindresorhus/merge-streams": "^4.0.0", - "cross-spawn": "^7.0.3", - "figures": "^6.1.0", - "get-stream": "^9.0.0", - "human-signals": "^7.0.0", - "is-plain-obj": "^4.1.0", - "is-stream": "^4.0.1", - "npm-run-path": "^5.2.0", - "pretty-ms": "^9.0.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^4.0.0", - "yoctocolors": "^2.0.0" - }, - "engines": { - "node": "^18.19.0 || >=20.5.0" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/open-editor/node_modules/get-stream": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-9.0.1.tgz", - "integrity": "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==", - "dev": true, - "dependencies": { - "@sec-ant/readable-stream": "^0.4.1", - "is-stream": "^4.0.1" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/open-editor/node_modules/human-signals": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-7.0.0.tgz", - "integrity": "sha512-74kytxOUSvNbjrT9KisAbaTZ/eJwD/LrbM/kh5j0IhPuJzwuA19dWvniFGwBzN9rVjg+O/e+F310PjObDXS+9Q==", - "dev": true, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/open-editor/node_modules/is-stream": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz", - "integrity": "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/open-editor/node_modules/strip-final-newline": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-4.0.0.tgz", - "integrity": "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", - "dev": true, - "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/package-json-from-dist": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", - "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", - "dev": true - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parents": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", - "integrity": "sha512-mXKF3xkoUt5td2DoxpLmtOmZvko9VfFpwRwkKDHSNvgmpLAeBo18YDhcPbBzJq+QLCHMbGOfzia2cX4U+0v9Mg==", - "dev": true, - "dependencies": { - "path-platform": "~0.11.15" - } - }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parse-ms": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-4.0.0.tgz", - "integrity": "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/path-platform": { - "version": "0.11.15", - "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", - "integrity": "sha512-Y30dB6rab1A/nfEKsZxmr01nUotHX0c/ZiIAsCTatEe1CmS5Pm5He7fZ195bPT7RdquoaL8lLxFCMQi/bS7IJg==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "dev": true, - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true - }, - "node_modules/path-type": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-5.0.0.tgz", - "integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pathe": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", - "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", - "dev": true - }, - "node_modules/pathval": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz", - "integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==", - "dev": true, - "engines": { - "node": ">= 14.16" - } - }, - "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pidtree": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", - "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", - "dev": true, - "bin": { - "pidtree": "bin/pidtree.js" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/pkg-dir": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz", - "integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==", - "dev": true, - "dependencies": { - "find-up": "^5.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/plur": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/plur/-/plur-5.1.0.tgz", - "integrity": "sha512-VP/72JeXqak2KiOzjgKtQen5y3IZHn+9GOuLDafPv0eXa47xq0At93XahYBs26MsifCQ4enGKwbjBTKgb9QJXg==", - "dev": true, - "dependencies": { - "irregular-plurals": "^3.3.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pluralize": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", - "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss": { - "version": "8.4.40", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.40.tgz", - "integrity": "sha512-YF2kKIUzAofPMpfH6hOi2cGnv/HrUlfucspc7pDyvv7kGdqXrfj8SCl/t8owkEgKEuu8ZcRjSOxFxVLqwChZ2Q==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.0.1", - "source-map-js": "^1.2.0" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", - "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", - "dev": true, - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "dependencies": { - "fast-diff": "^1.1.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/pretty-ms": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.0.0.tgz", - "integrity": "sha512-E9e9HJ9R9NasGOgPaPE8VMeiPKAyWR5jcFpNnwIejslIhWqdqOrb2wShBsncMPUb+BcCd2OPYfh7p2W6oemTng==", - "dev": true, - "dependencies": { - "parse-ms": "^4.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/proto-props": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/proto-props/-/proto-props-2.0.0.tgz", - "integrity": "sha512-2yma2tog9VaRZY2mn3Wq51uiSW4NcPYT1cQdBagwyrznrilKSZwIZ0UG3ZPL/mx+axEns0hE35T5ufOYZXEnBQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "peer": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dev": true, - "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/regexp-tree": { - "version": "0.1.27", - "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", - "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", - "dev": true, - "bin": { - "regexp-tree": "bin/regexp-tree" - } - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", - "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "set-function-name": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regjsparser": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.10.0.tgz", - "integrity": "sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==", - "dev": true, - "dependencies": { - "jsesc": "~0.5.0" - }, - "bin": { - "regjsparser": "bin/parser" - } - }, - "node_modules/regjsparser/node_modules/jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - } - }, - "node_modules/resolve": { - "version": "2.0.0-next.5", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", - "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", - "dev": true, - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, - "node_modules/restore-cursor": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", - "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", - "dev": true, - "dependencies": { - "onetime": "^7.0.0", - "signal-exit": "^4.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/restore-cursor/node_modules/onetime": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", - "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", - "dev": true, - "dependencies": { - "mimic-function": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rfdc": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", - "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", - "dev": true - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rollup": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.20.0.tgz", - "integrity": "sha512-6rbWBChcnSGzIlXeIdNIZTopKYad8ZG8ajhl78lGRLsI2rX8IkaotQhVas2Ma+GPxJav19wrSzvRvuiv0YKzWw==", - "dev": true, - "dependencies": { - "@types/estree": "1.0.5" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.20.0", - "@rollup/rollup-android-arm64": "4.20.0", - "@rollup/rollup-darwin-arm64": "4.20.0", - "@rollup/rollup-darwin-x64": "4.20.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.20.0", - "@rollup/rollup-linux-arm-musleabihf": "4.20.0", - "@rollup/rollup-linux-arm64-gnu": "4.20.0", - "@rollup/rollup-linux-arm64-musl": "4.20.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.20.0", - "@rollup/rollup-linux-riscv64-gnu": "4.20.0", - "@rollup/rollup-linux-s390x-gnu": "4.20.0", - "@rollup/rollup-linux-x64-gnu": "4.20.0", - "@rollup/rollup-linux-x64-musl": "4.20.0", - "@rollup/rollup-win32-arm64-msvc": "4.20.0", - "@rollup/rollup-win32-ia32-msvc": "4.20.0", - "@rollup/rollup-win32-x64-msvc": "4.20.0", - "fsevents": "~2.3.2" - } - }, - "node_modules/run-applescript": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.0.0.tgz", - "integrity": "sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-array-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", - "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "has-symbols": "^1.0.3", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "peer": true - }, - "node_modules/safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "is-regex": "^1.1.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "peer": true, - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/serialize-javascript": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", - "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", - "dev": true, - "peer": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/set-function-length": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", - "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", - "dev": true, - "dependencies": { - "define-data-property": "^1.1.1", - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-function-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", - "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", - "dev": true, - "dependencies": { - "define-data-property": "^1.0.1", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/siginfo": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", - "dev": true - }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/slash": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", - "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", - "dev": true, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/slice-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "peer": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/spdx-correct": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", - "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", - "dev": true, - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", - "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.18", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", - "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==", - "dev": true - }, - "node_modules/stackback": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", - "dev": true - }, - "node_modules/std-env": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", - "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", - "dev": true - }, - "node_modules/string-argv": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", - "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", - "dev": true, - "engines": { - "node": ">=0.6.19" - } - }, - "node_modules/string-width": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", - "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", - "dev": true, - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string.prototype.trim": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", - "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", - "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", - "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/strip-indent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", - "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", - "dev": true, - "dependencies": { - "min-indent": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-hyperlinks": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.0.0.tgz", - "integrity": "sha512-QBDPHyPQDRTy9ku4URNGY5Lah8PAaXs6tAAwp55sL5WCsSW7GIfdf6W5ixfziW+t7wh3GVvHyHHyQ1ESsoRvaA==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">=14.18" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/synckit": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.1.tgz", - "integrity": "sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==", - "dev": true, - "dependencies": { - "@pkgr/core": "^0.1.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts" - } - }, - "node_modules/tapable": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz", - "integrity": "sha512-jX8Et4hHg57mug1/079yitEKWGB3LCwoxByLsNim89LABq8NqgiX+6iYVOsq0vX8uJHkU+DZ5fnq95f800bEsQ==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/terser": { - "version": "5.22.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.22.0.tgz", - "integrity": "sha512-hHZVLgRA2z4NWcN6aS5rQDc+7Dcy58HOf2zbYwmFcQ+ua3h6eEFf5lIDKTzbWwlazPyOZsFQO8V80/IjVNExEw==", - "dev": true, - "peer": true, - "dependencies": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/terser-webpack-plugin": { - "version": "5.3.9", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", - "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", - "dev": true, - "peer": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.17", - "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.1", - "terser": "^5.16.8" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "uglify-js": { - "optional": true - } - } - }, - "node_modules/terser/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "peer": true - }, - "node_modules/test-exclude": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", - "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", - "dev": true, - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^10.4.1", - "minimatch": "^9.0.4" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/test-exclude/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", - "dev": true, - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/test-exclude/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "node_modules/tinybench": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.8.0.tgz", - "integrity": "sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==", - "dev": true - }, - "node_modules/tinypool": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.0.tgz", - "integrity": "sha512-KIKExllK7jp3uvrNtvRBYBWBOAXSX8ZvoaD8T+7KB/QHIuoJW3Pmr60zucywjAlMb5TeXUkcs/MWeWLu0qvuAQ==", - "dev": true, - "engines": { - "node": "^18.0.0 || >=20.0.0" - } - }, - "node_modules/tinyrainbow": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-1.2.0.tgz", - "integrity": "sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==", - "dev": true, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/tinyspy": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.0.tgz", - "integrity": "sha512-q5nmENpTHgiPVd1cJDDc9cVoYN5x4vCvwT3FMilvKPKneCBZAxn2YWQjDF0UMcE9k0Cay1gBiDfTMU0g+mPMQA==", - "dev": true, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/to-absolute-glob": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-3.0.0.tgz", - "integrity": "sha512-loO/XEWTRqpfcpI7+Jr2RR2Umaaozx1t6OSVWtMi0oy5F/Fxg3IC+D/TToDnxyAGs7uZBGT/6XmyDUxgsObJXA==", - "dev": true, - "dependencies": { - "is-absolute": "^1.0.0", - "is-negated-glob": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/ts-api-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", - "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", - "dev": true, - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, - "node_modules/tsconfig-paths": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", - "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", - "dev": true, - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } - }, - "node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", - "dev": true - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-fest": { - "version": "4.25.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.25.0.tgz", - "integrity": "sha512-bRkIGlXsnGBRBQRAY56UXBm//9qH4bmJfFvq83gSz41N282df+fjy8ofcEgc1sM8geNt5cl6mC2g9Fht1cs8Aw==", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typed-array-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", - "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "is-typed-array": "^1.1.10" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/typed-array-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", - "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", - "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/unc-path-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true, - "peer": true - }, - "node_modules/unicorn-magic": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", - "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", - "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "escalade": "^3.1.2", - "picocolors": "^1.0.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/url-or-path": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/url-or-path/-/url-or-path-2.3.0.tgz", - "integrity": "sha512-5g9xpEJKjbAY8ikLU3XFpEg3hRLGt6SbCQmDElb1AL7JTW6vMi5Na5e3dMvONHisIu9VHgMAADLHJ8EznYR2ow==", - "dev": true, - "funding": { - "url": "https://github.com/fisker/url-or-path?sponsor=1" - } - }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "node_modules/vite": { - "version": "5.3.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.5.tgz", - "integrity": "sha512-MdjglKR6AQXQb9JGiS7Rc2wC6uMjcm7Go/NHNO63EwiJXfuk9PgqiP/n5IDJCziMkfw9n4Ubp7lttNwz+8ZVKA==", - "dev": true, - "dependencies": { - "esbuild": "^0.21.3", - "postcss": "^8.4.39", - "rollup": "^4.13.0" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^18.0.0 || >=20.0.0", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } - } - }, - "node_modules/vite-node": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.0.5.tgz", - "integrity": "sha512-LdsW4pxj0Ot69FAoXZ1yTnA9bjGohr2yNBU7QKRxpz8ITSkhuDl6h3zS/tvgz4qrNjeRnvrWeXQ8ZF7Um4W00Q==", - "dev": true, - "dependencies": { - "cac": "^6.7.14", - "debug": "^4.3.5", - "pathe": "^1.1.2", - "tinyrainbow": "^1.2.0", - "vite": "^5.0.0" - }, - "bin": { - "vite-node": "vite-node.mjs" - }, - "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/vitest": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.0.5.tgz", - "integrity": "sha512-8GUxONfauuIdeSl5f9GTgVEpg5BTOlplET4WEDaeY2QBiN8wSm68vxN/tb5z405OwppfoCavnwXafiaYBC/xOA==", - "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.3.0", - "@vitest/expect": "2.0.5", - "@vitest/pretty-format": "^2.0.5", - "@vitest/runner": "2.0.5", - "@vitest/snapshot": "2.0.5", - "@vitest/spy": "2.0.5", - "@vitest/utils": "2.0.5", - "chai": "^5.1.1", - "debug": "^4.3.5", - "execa": "^8.0.1", - "magic-string": "^0.30.10", - "pathe": "^1.1.2", - "std-env": "^3.7.0", - "tinybench": "^2.8.0", - "tinypool": "^1.0.0", - "tinyrainbow": "^1.2.0", - "vite": "^5.0.0", - "vite-node": "2.0.5", - "why-is-node-running": "^2.3.0" - }, - "bin": { - "vitest": "vitest.mjs" - }, - "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "@edge-runtime/vm": "*", - "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "2.0.5", - "@vitest/ui": "2.0.5", - "happy-dom": "*", - "jsdom": "*" - }, - "peerDependenciesMeta": { - "@edge-runtime/vm": { - "optional": true - }, - "@types/node": { - "optional": true - }, - "@vitest/browser": { - "optional": true - }, - "@vitest/ui": { - "optional": true - }, - "happy-dom": { - "optional": true - }, - "jsdom": { - "optional": true - } - } - }, - "node_modules/watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", - "dev": true, - "peer": true, - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack": { - "version": "5.89.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.89.0.tgz", - "integrity": "sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==", - "dev": true, - "peer": true, - "dependencies": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.0", - "@webassemblyjs/ast": "^1.11.5", - "@webassemblyjs/wasm-edit": "^1.11.5", - "@webassemblyjs/wasm-parser": "^1.11.5", - "acorn": "^8.7.1", - "acorn-import-assertions": "^1.9.0", - "browserslist": "^4.14.5", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.15.0", - "es-module-lexer": "^1.2.1", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", - "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.2.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.7", - "watchpack": "^2.4.0", - "webpack-sources": "^3.2.3" - }, - "bin": { - "webpack": "bin/webpack.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true, - "peer": true, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack/node_modules/enhanced-resolve": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", - "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", - "dev": true, - "peer": true, - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack/node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "peer": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/webpack/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "peer": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/webpack/node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", - "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.4", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/why-is-node-running": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", - "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", - "dev": true, - "dependencies": { - "siginfo": "^2.0.0", - "stackback": "0.0.2" - }, - "bin": { - "why-is-node-running": "cli.js" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", - "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/xo": { - "version": "0.59.3", - "resolved": "https://registry.npmjs.org/xo/-/xo-0.59.3.tgz", - "integrity": "sha512-jjUplAF4kqNP22HIlgnW+Ej8/Z1utf4Mzw/dLsbOcSpnUgrEqcyaS/OhGFriFyEBbnWVkslnYgUHiDsb6lNiBQ==", - "dev": true, - "dependencies": { - "@eslint/eslintrc": "^3.1.0", - "@typescript-eslint/eslint-plugin": "^7.16.1", - "@typescript-eslint/parser": "^7.16.1", - "arrify": "^3.0.0", - "cosmiconfig": "^9.0.0", - "define-lazy-prop": "^3.0.0", - "eslint": "^8.57.0", - "eslint-config-prettier": "^9.1.0", - "eslint-config-xo": "^0.45.0", - "eslint-config-xo-typescript": "^5.0.0", - "eslint-formatter-pretty": "^6.0.1", - "eslint-import-resolver-webpack": "^0.13.8", - "eslint-plugin-ava": "^14.0.0", - "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-import": "^2.29.1", - "eslint-plugin-n": "^17.9.0", - "eslint-plugin-no-use-extend-native": "^0.5.0", - "eslint-plugin-prettier": "^5.2.1", - "eslint-plugin-promise": "^6.4.0", - "eslint-plugin-unicorn": "^54.0.0", - "esm-utils": "^4.3.0", - "find-cache-dir": "^5.0.0", - "find-up-simple": "^1.0.0", - "get-stdin": "^9.0.0", - "get-tsconfig": "^4.7.5", - "globby": "^14.0.2", - "imurmurhash": "^0.1.4", - "json-stable-stringify-without-jsonify": "^1.0.1", - "lodash-es": "^4.17.21", - "meow": "^13.2.0", - "micromatch": "^4.0.7", - "open-editor": "^5.0.0", - "prettier": "^3.3.3", - "semver": "^7.6.3", - "slash": "^5.1.0", - "to-absolute-glob": "^3.0.0", - "typescript": "^5.5.3" - }, - "bin": { - "xo": "cli.js" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/xo/node_modules/@eslint/eslintrc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", - "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/xo/node_modules/eslint-visitor-keys": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", - "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/xo/node_modules/espree": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.1.0.tgz", - "integrity": "sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==", - "dev": true, - "dependencies": { - "acorn": "^8.12.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.0.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/xo/node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yaml": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.0.tgz", - "integrity": "sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==", - "dev": true, - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/yocto-queue": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", - "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", - "dev": true, - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yoctocolors": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.1.1.tgz", - "integrity": "sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - } -} diff --git a/package.json b/package.json index f4b40e18..af4facf7 100644 --- a/package.json +++ b/package.json @@ -1,54 +1,41 @@ { - "name": "@withabound/node-sdk", - "version": "5.2.1", - "description": "The Abound Node library provides convenient access to the Abound API from applications written in server-side JavaScript.", - "author": "Abound ", - "license": "MIT", - "main": "dist/cjs/abound.js", - "module": "dist/esm/abound.js", - "exports": { - ".": { - "import": "./dist/esm/abound.js", - "require": "./dist/cjs/abound.js" + "name": "abound", + "version": "6.0.0-alpha.2", + "private": false, + "repository": "https://github.com/withabound/abound-node", + "main": "./index.js", + "types": "./index.d.ts", + "scripts": { + "format": "prettier . --write --ignore-unknown", + "build": "tsc", + "prepack": "cp -rv dist/. .", + "test": "jest tests/unit", + "wire:test": "npm install -g fern-api && fern test --command 'jest tests/wire'" + }, + "dependencies": { + "url-join": "4.0.1", + "form-data": "^4.0.0", + "formdata-node": "^6.0.3", + "node-fetch": "2.7.0", + "qs": "6.11.2", + "js-base64": "3.7.2" + }, + "devDependencies": { + "@types/url-join": "4.0.1", + "@types/qs": "6.9.8", + "@types/node-fetch": "2.6.9", + "fetch-mock-jest": "^1.5.1", + "jest": "29.7.0", + "@types/jest": "29.5.5", + "ts-jest": "29.1.1", + "jest-environment-jsdom": "29.7.0", + "@types/node": "17.0.33", + "prettier": "2.7.1", + "typescript": "4.6.4" + }, + "browser": { + "fs": false, + "os": false, + "path": false } - }, - "types": "dist/types/abound.d.ts", - "files": [ - "dist/**/*" - ], - "scripts": { - "prepare": "husky", - "build": "./build.sh", - "build:esm": "npx tsc -p tsconfig.json", - "build:cjs": "npx tsc -p tsconfig.cjs.json", - "compile": "npx tsc --noEmit", - "lint": "npx xo", - "test": "npx vitest" - }, - "lint-staged": { - "**/*": "prettier --write --ignore-unknown", - "**/*.(js|ts)": "xo" - }, - "dependencies": { - "type-fest": "4.25.0" - }, - "devDependencies": { - "@tsconfig/node18": "18.2.4", - "@vitest/coverage-v8": "2.0.5", - "genversion": "3.2.0", - "husky": "9.1.5", - "lint-staged": "15.2.9", - "prettier": "3.3.3", - "typescript": "5.5.4", - "vitest": "2.0.5", - "xo": "0.59.3" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/withabound/abound-node.git" - }, - "homepage": "https://github.com/withabound/abound-node#readme", - "bugs": { - "url": "https://github.com/withabound/abound-node/issues" - } } diff --git a/prettier.config.js b/prettier.config.js deleted file mode 100644 index dafbb3d8..00000000 --- a/prettier.config.js +++ /dev/null @@ -1,7 +0,0 @@ -// Force XO to use all the prettier defaults -module.exports = { - useTabs: false, - trailingComma: "es5", - singleQuote: false, - bracketSpacing: true, -}; diff --git a/reference.md b/reference.md new file mode 100644 index 00000000..50d5b4be --- /dev/null +++ b/reference.md @@ -0,0 +1,4184 @@ +# Reference + +## Access Tokens + +
client.accessTokens.create({ ...params }) -> Abound.AccessTokenSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an access token for authenticating Drop-In UI Components. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accessTokens.create({ + expiresIn: 900, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Abound.AccessTokenRequestSchema` + +
+
+ +
+
+ +**requestOptions:** `AccessTokens.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Electronic Delivery Consents + +
client.electronicDeliveryConsents.list({ ...params }) -> Abound.EDeliveryConsentSchema[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of Electronic Delivery Consents. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.electronicDeliveryConsents.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Abound.EDeliveryConsentListRequest` + +
+
+ +
+
+ +**requestOptions:** `ElectronicDeliveryConsents.RequestOptions` + +
+
+
+
+ +
+
+
+ +## 1099-INT + +
client.form1099Int.list({ ...params }) -> Abound.Form1099IntSchema[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of 1099-INT documents. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Int.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Abound.Form1099IntListRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099Int.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099Int.create({ ...params }) -> Abound.Form1099IntSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a 1099-INT document and subsequently kicks off a TIN Verification, if the name and TIN combo has not been used before. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Int.create({ + body: { + filingYear: 2023, + payer: { + name: "Hooli", + tin: "111111111", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + }, + payee: { + name: "Ada Lovelace", + tin: "000000000", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + }, + formFields: { + bondPremium: 19423, + bondPremiumTaxExemptBond: 19423, + bondPremiumTreasury: 19423, + earlyWithdrawalPenalty: 23223, + foreignTaxPaid: 19423, + foreignTaxPaidCountry: "FR", + hasFatcaFilingRequirement: true, + interestIncome: 83232, + investmentExpenses: 19423, + marketDiscount: 19423, + payersRoutingNumber: "054000030", + specifiedPrivateActivityBondInterest: 19423, + taxExemptInterest: 19423, + usSavingsBondsInterest: 19423, + federalIncomeTaxWithheld: 0, + accountNumber: "A006SVmcrieFAbm3gsaV", + stateTaxInfo: [ + { + filingState: Abound.Form1099FilingStateEnum.Ca, + stateTaxWithheld: 0, + }, + ], + }, + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Abound.Form1099IntRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099Int.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099Int.mail(documentId, { ...params }) -> Abound.MailingSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Mails a 1099-INT document. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Int.mail("documentId_samplepWpJ9Snlzb", { + body: { + to: { + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + name: "Ada Lovelace", + }, + from: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + name: "Hooli", + }, + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**request:** `Abound.Form1099IntMailingRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099Int.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099Int.file(documentId, { ...params }) -> Abound.Form1099IntSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Files a 1099-INT document. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Int.file("documentId_samplepWpJ9Snlzb"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**request:** `Abound.Form1099IntFileRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099Int.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099Int.correct(documentId, { ...params }) -> Abound.Form1099IntSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Files a new corrected 1099-INT and relates it to the original document. A 1099-INT can be corrected only after it has reached the `FILED` status. Automatically handles both one-transaction and two-transaction corrections. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Int.correct("documentId_samplepWpJ9Snlzb", { + body: { + payee: { + name: "Ada Lovelace", + tin: "000000000", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + }, + formFields: { + bondPremium: 19423, + bondPremiumTaxExemptBond: 19423, + bondPremiumTreasury: 19423, + earlyWithdrawalPenalty: 23223, + foreignTaxPaid: 19423, + foreignTaxPaidCountry: "FR", + hasFatcaFilingRequirement: true, + interestIncome: 10000, + investmentExpenses: 19423, + marketDiscount: 19423, + payersRoutingNumber: "054000030", + specifiedPrivateActivityBondInterest: 19423, + taxExemptInterest: 19423, + usSavingsBondsInterest: 19423, + federalIncomeTaxWithheld: 0, + accountNumber: "A006SVmcrieFAbm3gsaV", + stateTaxInfo: [ + { + filingState: Abound.Form1099FilingStateEnum.Ca, + }, + ], + }, + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**request:** `Abound.Form1099IntCorrectRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099Int.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099Int.void(documentId, { ...params }) -> Abound.Form1099IntSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Files a new voided 1099-INT and relates it to the original document. A 1099-INT can be voided only after it has reached the `FILED` status. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Int.void("documentId_samplepWpJ9Snlzb"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**request:** `Abound.Form1099IntVoidRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099Int.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099Int.retrieve(documentId) -> Abound.Form1099IntSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves the details of an existing 1099-INT document. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Int.retrieve("documentId_samplepWpJ9Snlzb"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**requestOptions:** `Form1099Int.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099Int.delete(documentId) -> Abound.OkSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes a 1099-INT document. Once an action (`/file`, `/correct`, `/void`) has been executed on a 1099-INT, it cannot be deleted. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Int.delete("documentId_samplepWpJ9Snlzb"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**requestOptions:** `Form1099Int.RequestOptions` + +
+
+
+
+ +
+
+
+ +## 1099-K + +
client.form1099K.list({ ...params }) -> Abound.Form1099KSchema[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of 1099-K documents. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099K.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Abound.Form1099KListRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099K.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099K.create({ ...params }) -> Abound.Form1099KSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a 1099-K document and subsequently kicks off a TIN Verification, if the name and TIN combo has not been used before. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099K.create({ + body: { + filingYear: 2023, + payer: { + name: "Hooli", + tin: "111111111", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + }, + payee: { + name: "Ada Lovelace", + tin: "000000000", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + }, + formFields: { + accountNumber: "A0MCFOfvWWL7AVtwrhiU", + aggregateGrossAmount: 27987876, + aggregateGrossAmountCardNotPresent: 2332323, + federalIncomeTaxWithheld: 0, + merchantCategoryCode: "4582", + numberOfPaymentTransactions: 767, + pseName: "Payment Entity", + payerClassification: Abound.Form1099KPayerClassificationEnum.Pse, + transactionsReportedClassification: Abound.Form1099KTransactionsReportedClassificationSchema.PaymentCard, + psePhoneNumber: "5555555555", + grossAmountsByMonth: { + april: 2332323, + august: 2332323, + december: 2332323, + february: 2332323, + january: 2332323, + july: 2332323, + june: 2332323, + march: 2332323, + may: 2332323, + november: 2332323, + october: 2332323, + september: 2332323, + }, + stateTaxInfo: [ + { + filingState: Abound.Form1099FilingStateEnum.Ca, + stateTaxWithheld: 0, + }, + ], + }, + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Abound.Form1099KRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099K.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099K.mail(documentId, { ...params }) -> Abound.MailingSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Mails a 1099-K document. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099K.mail("documentId_sampletTtqNfulW8", { + body: { + to: { + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + name: "Ada Lovelace", + }, + from: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + name: "Hooli", + }, + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**request:** `Abound.Form1099KMailingRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099K.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099K.file(documentId, { ...params }) -> Abound.Form1099KSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Files a 1099-K document. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099K.file("documentId_sampletTtqNfulW8"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**request:** `Abound.Form1099KFileRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099K.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099K.correct(documentId, { ...params }) -> Abound.Form1099KSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Files a new corrected 1099-K and relates it to the original document. A 1099-K can be corrected only after it has reached the `FILED` status. Automatically handles both one-transaction and two-transaction corrections. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099K.correct("documentId_sampletTtqNfulW8", { + body: { + payee: { + name: "Ada Lovelace", + tin: "000000000", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + }, + formFields: { + accountNumber: "A0MCFOfvWWL7AVtwrhiU", + aggregateGrossAmount: 25655553, + aggregateGrossAmountCardNotPresent: 25655553, + federalIncomeTaxWithheld: 0, + merchantCategoryCode: "4582", + numberOfPaymentTransactions: 767, + pseName: "Payment Entity", + payerClassification: Abound.Form1099KPayerClassificationEnum.Pse, + transactionsReportedClassification: Abound.Form1099KTransactionsReportedClassificationSchema.PaymentCard, + psePhoneNumber: "5555555555", + grossAmountsByMonth: { + april: 2332323, + august: 2332323, + december: 2332323, + february: 2332323, + january: 0, + july: 2332323, + june: 2332323, + march: 2332323, + may: 2332323, + november: 2332323, + october: 2332323, + september: 2332323, + }, + stateTaxInfo: [ + { + filingState: Abound.Form1099FilingStateEnum.Ca, + }, + ], + }, + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**request:** `Abound.Form1099KCorrectRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099K.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099K.void(documentId, { ...params }) -> Abound.Form1099KSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Files a new voided 1099-K and relates it to the original document. A 1099-K can be voided only after it has reached the `FILED` status. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099K.void("documentId_sampletTtqNfulW8"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**request:** `Abound.Form1099KVoidRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099K.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099K.retrieve(documentId) -> Abound.Form1099KSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves the details of an existing 1099-K document. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099K.retrieve("documentId_sampletTtqNfulW8"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**requestOptions:** `Form1099K.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099K.delete(documentId) -> Abound.OkSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes a 1099-K document. Once an action (`/file`, `/correct`, `/void`) has been executed on a 1099-K, it cannot be deleted. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099K.delete("documentId_sampletTtqNfulW8"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**requestOptions:** `Form1099K.RequestOptions` + +
+
+
+
+ +
+
+
+ +## 1099-MISC + +
client.form1099Misc.list({ ...params }) -> Abound.Form1099MiscSchema[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of 1099-MISC documents. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Misc.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Abound.Form1099MiscListRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099Misc.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099Misc.create({ ...params }) -> Abound.Form1099MiscSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a 1099-MISC document and subsequently kicks off a TIN Verification, if the name and TIN combo has not been used before. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Misc.create({ + body: { + filingYear: 2023, + payer: { + name: "Hooli", + tin: "111111111", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + }, + payee: { + name: "Ada Lovelace", + tin: "000000000", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + }, + formFields: { + cropInsuranceProceeds: 97109, + excessGoldenParachutePayments: 97109, + federalIncomeTaxWithheld: 0, + fishPurchasedForResale: 97109, + fishingBoatProceeds: 97109, + grossProceedsPaidToAnAttorney: 97109, + hasDirectSalesOver5000: false, + hasFatcaFilingRequirement: true, + medicalAndHealthCarePayments: 97109, + nonqualifiedDeferredCompensation: 97109, + substitutePaymentsInLieuOfDividendsOrInterest: 97109, + otherIncome: 97109, + rents: 97109, + royalties: 97109, + section409ADeferrals: 97109, + accountNumber: "A00AskD1ZTO4YB8oBHav", + stateTaxInfo: [ + { + filingState: Abound.Form1099FilingStateEnum.Ca, + stateIncome: 345543, + stateTaxWithheld: 0, + }, + ], + }, + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Abound.Form1099MiscRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099Misc.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099Misc.mail(documentId, { ...params }) -> Abound.MailingSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Mails a 1099-MISC document. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Misc.mail("documentId_sampleGNPOKNmIgF", { + body: { + to: { + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + name: "Ada Lovelace", + }, + from: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + name: "Hooli", + }, + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**request:** `Abound.Form1099MiscMailingRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099Misc.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099Misc.file(documentId, { ...params }) -> Abound.Form1099MiscSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Files a 1099-MISC document. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Misc.file("documentId_sampleGNPOKNmIgF"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**request:** `Abound.Form1099MiscFileRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099Misc.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099Misc.correct(documentId, { ...params }) -> Abound.Form1099MiscSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Files a new corrected 1099-MISC and relates it to the original document. A 1099-MISC can be corrected only after it has reached the `FILED` status. Automatically handles both one-transaction and two-transaction corrections. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Misc.correct("documentId_sampleGNPOKNmIgF", { + body: { + payee: { + name: "Ada Lovelace", + tin: "000000000", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + }, + formFields: { + cropInsuranceProceeds: 97109, + excessGoldenParachutePayments: 97109, + federalIncomeTaxWithheld: 0, + fishPurchasedForResale: 97109, + fishingBoatProceeds: 97109, + grossProceedsPaidToAnAttorney: 97109, + hasDirectSalesOver5000: false, + hasFatcaFilingRequirement: true, + medicalAndHealthCarePayments: 97109, + nonqualifiedDeferredCompensation: 97109, + substitutePaymentsInLieuOfDividendsOrInterest: 97109, + otherIncome: 97109, + rents: 10000, + royalties: 97109, + section409ADeferrals: 97109, + accountNumber: "A00AskD1ZTO4YB8oBHav", + stateTaxInfo: [ + { + filingState: Abound.Form1099FilingStateEnum.Ca, + stateIncome: 258434, + }, + ], + }, + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**request:** `Abound.Form1099MiscCorrectRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099Misc.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099Misc.void(documentId, { ...params }) -> Abound.Form1099MiscSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Files a new voided 1099-MISC and relates it to the original document. A 1099-MISC can be voided only after it has reached the `FILED` status. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Misc.void("documentId_sampleGNPOKNmIgF"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**request:** `Abound.Form1099MiscVoidRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099Misc.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099Misc.retrieve(documentId) -> Abound.Form1099MiscSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves the details of an existing 1099-MISC document. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Misc.retrieve("documentId_sampleGNPOKNmIgF"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**requestOptions:** `Form1099Misc.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099Misc.delete(documentId) -> Abound.OkSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes a 1099-MISC document. Once an action (`/file`, `/correct`, `/void`) has been executed on a 1099-MISC, it cannot be deleted. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Misc.delete("documentId_sampleGNPOKNmIgF"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**requestOptions:** `Form1099Misc.RequestOptions` + +
+
+
+
+ +
+
+
+ +## 1099-NEC + +
client.form1099Nec.list({ ...params }) -> Abound.Form1099NecSchema[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of 1099-NEC documents. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Nec.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Abound.Form1099NecListRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099Nec.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099Nec.create({ ...params }) -> Abound.Form1099NecSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a 1099-NEC document and subsequently kicks off a TIN Verification, if the name and TIN combo has not been used before. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Nec.create({ + body: { + filingYear: 2023, + payer: { + name: "Hooli", + tin: "111111111", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + }, + payee: { + name: "Ada Lovelace", + tin: "000000000", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + }, + formFields: { + nonemployeeCompensation: 23423, + hasDirectSalesOver5000: false, + federalIncomeTaxWithheld: 0, + accountNumber: "A0NEqtav7n0sBGoq88w0", + stateTaxInfo: [ + { + filingState: Abound.Form1099FilingStateEnum.Ca, + stateIncome: 23423, + stateTaxWithheld: 0, + }, + ], + }, + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Abound.Form1099NecRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099Nec.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099Nec.mail(documentId, { ...params }) -> Abound.MailingSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Mails a 1099-NEC document. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Nec.mail("documentId_samplegU0eR8oc8a", { + body: { + to: { + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + name: "Ada Lovelace", + }, + from: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + name: "Hooli", + }, + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**request:** `Abound.Form1099NecMailingRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099Nec.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099Nec.file(documentId, { ...params }) -> Abound.Form1099NecSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Files a 1099-NEC document. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Nec.file("documentId_samplegU0eR8oc8a"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**request:** `Abound.Form1099NecFileRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099Nec.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099Nec.correct(documentId, { ...params }) -> Abound.Form1099NecSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Files a new corrected 1099-NEC and relates it to the original document. A 1099-NEC can be corrected only after it has reached the `FILED` status. Automatically handles both one-transaction and two-transaction corrections. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Nec.correct("documentId_samplegU0eR8oc8a", { + body: { + payee: { + name: "Ada Lovelace", + tin: "000000000", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + }, + formFields: { + nonemployeeCompensation: 10000, + accountNumber: "A0NEqtav7n0sBGoq88w0", + stateTaxInfo: [ + { + filingState: Abound.Form1099FilingStateEnum.Ca, + stateIncome: 10000, + }, + ], + }, + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**request:** `Abound.Form1099NecCorrectRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099Nec.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099Nec.void(documentId, { ...params }) -> Abound.Form1099NecSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Files a new voided 1099-NEC and relates it to the original document. A 1099-NEC can be voided only after it has reached the `FILED` status. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Nec.void("documentId_samplegU0eR8oc8a"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**request:** `Abound.Form1099NecVoidRequest` + +
+
+ +
+
+ +**requestOptions:** `Form1099Nec.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099Nec.retrieve(documentId) -> Abound.Form1099NecSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves the details of an existing 1099-NEC document. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Nec.retrieve("documentId_samplegU0eR8oc8a"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**requestOptions:** `Form1099Nec.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.form1099Nec.delete(documentId) -> Abound.OkSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes a 1099-NEC document. Once an action (`/file`, `/correct`, `/void`) has been executed on a 1099-NEC, it cannot be deleted. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.form1099Nec.delete("documentId_samplegU0eR8oc8a"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**requestOptions:** `Form1099Nec.RequestOptions` + +
+
+
+
+ +
+
+
+ +## W-8BEN-E + +
client.formW8BenE.list({ ...params }) -> Abound.W8BenESchema[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of W-8BEN-E documents. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.formW8BenE.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Abound.FormW8BenEListRequest` + +
+
+ +
+
+ +**requestOptions:** `FormW8BenE.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.formW8BenE.create({ ...params }) -> Abound.W8BenESchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a W-8BEN-E document and, if present, subsequently kicks off a TIN Verification. A TIN Verification will only kickoff if the name and TIN combo has not been seen before. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.formW8BenE.create({ + payee: { + name: "Hooli", + incorporationCountry: "GB", + tin: "111111111", + foreignTin: "DQ123456C", + permanentResidenceAddress: { + address: "43 Hilly Fields", + address2: "Suite 32", + city: "Lewisham", + state: "London", + postalCode: "SE13 7JN", + country: "GB", + }, + mailingAddress: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + postalCode: "94306", + state: "CA", + country: "US", + }, + }, + formFields: { + taxClassification: Abound.W8BenETaxClassificationEnum.Corporation, + isForeignTinNotRequired: false, + taxTreatyCode: Abound.TaxTreatyAboundCodeEnum.Gb17IndependentPersonalServices, + referenceNumbers: ["123456789"], + isCertified: true, + electronicSignature: { + signature: "Hooli Representative", + printedName: "Hooli Representative", + signedAt: "2024-01-01T00:00:00.000Z", + ipAddress: "127.0.0.1", + }, + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Abound.W8BenERequestSchema` + +
+
+ +
+
+ +**requestOptions:** `FormW8BenE.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.formW8BenE.retrieve(documentId) -> Abound.W8BenESchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves the details of an existing W-8BEN-E document. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.formW8BenE.retrieve("documentId_sampleGyuBXlfAwo"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**requestOptions:** `FormW8BenE.RequestOptions` + +
+
+
+
+ +
+
+
+ +## W-8BEN + +
client.formW8Ben.list({ ...params }) -> Abound.W8BenSchema[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of W-8BEN documents. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.formW8Ben.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Abound.FormW8BenListRequest` + +
+
+ +
+
+ +**requestOptions:** `FormW8Ben.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.formW8Ben.create({ ...params }) -> Abound.W8BenSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a W-8BEN document and, if present, subsequently kicks off a TIN Verification. A TIN Verification will only kickoff if the name and TIN combo has not been seen before. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.formW8Ben.create({ + payee: { + name: "Ada Lovelace", + citizenshipCountry: "GB", + tin: "000000000", + foreignTin: "DQ123456C", + dateOfBirth: "1982-12-10", + permanentResidenceAddress: { + address: "43 Hilly Fields", + address2: "Suite 32", + city: "Lewisham", + state: "London", + postalCode: "SE13 7JN", + country: "GB", + }, + mailingAddress: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + postalCode: "94306", + state: "CA", + country: "US", + }, + }, + formFields: { + isForeignTinNotRequired: false, + taxTreatyCode: Abound.TaxTreatyAboundCodeEnum.Gb17IndependentPersonalServices, + referenceNumbers: ["123456789"], + isCertified: true, + electronicSignature: { + signature: "Ada Lovelace", + printedName: "Ada Lovelace", + signedAt: "2024-01-01T00:00:00.000Z", + ipAddress: "127.0.0.1", + }, + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Abound.W8BenRequestSchema` + +
+
+ +
+
+ +**requestOptions:** `FormW8Ben.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.formW8Ben.retrieve(documentId) -> Abound.W8BenSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves the details of an existing W-8BEN document. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.formW8Ben.retrieve("documentId_samplexEM8PRV7sh"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**requestOptions:** `FormW8Ben.RequestOptions` + +
+
+
+
+ +
+
+
+ +## W-9 + +
client.formW9.list({ ...params }) -> Abound.W9Schema[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of W-9 documents. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.formW9.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Abound.FormW9ListRequest` + +
+
+ +
+
+ +**requestOptions:** `FormW9.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.formW9.create({ ...params }) -> Abound.W9Schema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a W-9 document and subsequently kicks off a TIN verification, if the name and TIN combo has not been used before. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.formW9.create({ + body: { + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + country: "US", + postalCode: "94043", + state: "CA", + tin: "000000000", + tinType: Abound.TinTypeEnum.Individual, + }, + formFields: { + taxClassification: Abound.W9TaxClassificationSchema.Individual, + isSubjectToBackupWithholding: false, + electronicSignature: { + signature: "Ada Lovelace", + printedName: "Ada Lovelace", + signedAt: "2024-01-01T00:00:00.000Z", + ipAddress: "127.0.0.1", + }, + }, + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Abound.FormW9RequestSchema` + +
+
+ +
+
+ +**requestOptions:** `FormW9.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.formW9.retrieve(documentId) -> Abound.W9Schema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves the details of an existing W-9 document. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.formW9.retrieve("documentId_sampleVppNzzIbQT"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**documentId:** `Abound.DocumentId` + +
+
+ +
+
+ +**requestOptions:** `FormW9.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Mailings + +
client.mailings.list({ ...params }) -> Abound.MailingSchema[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of mailings. Up to 100 mailings are returned per request. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.mailings.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Abound.MailingsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Mailings.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.mailings.retrieve(mailingId) -> Abound.MailingSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves the details of an existing mailing. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.mailings.retrieve("mailingId_sampleFV9b73IvAD"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**mailingId:** `Abound.MailingId` + +
+
+ +
+
+ +**requestOptions:** `Mailings.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.mailings.update(mailingId, { ...params }) -> Abound.MailingSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates an existing mailing. Once a mailing has reached the `PROCESSING_FOR_DELIVERY` status, it cannot be updated. Any body parameters not provided will be removed. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.mailings.update("mailingId_sampleFV9b73IvAD", { + body: { + to: { + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + name: "Ada Lovelace", + }, + from: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + name: "Hooli", + }, + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**mailingId:** `Abound.MailingId` + +
+
+ +
+
+ +**request:** `Abound.MailingRequest` + +
+
+ +
+
+ +**requestOptions:** `Mailings.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.mailings.delete(mailingId) -> Abound.OkSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes a mailing. Once a mailing has reached the `PROCESSING_FOR_DELIVERY` status, it cannot be deleted. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.mailings.delete("mailingId_sampleFV9b73IvAD"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**mailingId:** `Abound.MailingId` + +
+
+ +
+
+ +**requestOptions:** `Mailings.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Tax Treaties + +
client.taxTreaties.list({ ...params }) -> Abound.TaxTreatySchema[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of tax treaties. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.taxTreaties.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Abound.TaxTreatiesListRequest` + +
+
+ +
+
+ +**requestOptions:** `TaxTreaties.RequestOptions` + +
+
+
+
+ +
+
+
+ +## TIN Verifications + +
client.tinVerifications.list({ ...params }) -> Abound.TinVerificationSchema[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of TIN Verifications. Up to 100 TIN Verifications are returned per request. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.tinVerifications.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Abound.TinVerificationsListRequest` + +
+
+ +
+
+ +**requestOptions:** `TinVerifications.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.tinVerifications.create({ ...params }) -> Abound.TinVerificationSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an asynchronous TIN Verification. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.tinVerifications.create({ + body: { + name: "Ada Lovelace", + tin: "000000000", + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Abound.TinVerificationRequest` + +
+
+ +
+
+ +**requestOptions:** `TinVerifications.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.tinVerifications.retrieve(tinVerificationId) -> Abound.TinVerificationSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves the details of an existing TIN Verification. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.tinVerifications.retrieve("tinVerificationId_sample41SD71AV8f"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**tinVerificationId:** `Abound.TinVerificationId` + +
+
+ +
+
+ +**requestOptions:** `TinVerifications.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Users + +
client.users.list({ ...params }) -> Abound.UserSchema[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of users. Up to 100 users are returned per request. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.users.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Abound.UsersListRequest` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.users.create({ ...params }) -> Abound.UserSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a user for a single end-user of your application. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.users.create({ + body: { + foreignId: "my-foreign-id", + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Abound.UsersCreateRequest` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.users.retrieve(userId) -> Abound.UserSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves the details of an existing user. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.users.retrieve("userId_sampleXGMFnhOpeR"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**userId:** `Abound.UserId` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.users.update(userId, { ...params }) -> Abound.UserSchema +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates an existing user. Any body parameters not provided will be removed. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.users.update("userId_sampleXGMFnhOpeR", { + foreignId: "my-foreign-id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**userId:** `Abound.UserId` + +
+
+ +
+
+ +**request:** `Abound.UserRequestSchema` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions` + +
+
+
+
+ +
+
+
diff --git a/smoke_test_npm_release.sh b/smoke_test_npm_release.sh deleted file mode 100755 index c93b7e40..00000000 --- a/smoke_test_npm_release.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -set -e - -rm -rf tmp - -mkdir tmp -cd tmp - -npm init -y -npm install @withabound/node-sdk - -cat > index.js << EOF -const process = require("node:process"); -const { Abound } = require("@withabound/node-sdk"); - -main() -async function main() { - const abound = new Abound({ - appId: process.env.ABOUND_SMOKE_TEST_APP_ID, - appSecret: process.env.ABOUND_SMOKE_TEST_APP_SECRET, - environment: "SANDBOX", - }); - - const response = await abound.users.create({ - email: "smoke_test_npm_release@domain.com" - }); - - console.log(response); -} -EOF - -node index.js diff --git a/src/Client.ts b/src/Client.ts new file mode 100644 index 00000000..239f1add --- /dev/null +++ b/src/Client.ts @@ -0,0 +1,118 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "./environments"; +import * as core from "./core"; +import { AccessTokens } from "./api/resources/accessTokens/client/Client"; +import { ElectronicDeliveryConsents } from "./api/resources/electronicDeliveryConsents/client/Client"; +import { Form1099Int } from "./api/resources/form1099Int/client/Client"; +import { Form1099K } from "./api/resources/form1099K/client/Client"; +import { Form1099Misc } from "./api/resources/form1099Misc/client/Client"; +import { Form1099Nec } from "./api/resources/form1099Nec/client/Client"; +import { FormW8BenE } from "./api/resources/formW8BenE/client/Client"; +import { FormW8Ben } from "./api/resources/formW8Ben/client/Client"; +import { FormW9 } from "./api/resources/formW9/client/Client"; +import { Mailings } from "./api/resources/mailings/client/Client"; +import { TaxTreaties } from "./api/resources/taxTreaties/client/Client"; +import { TinVerifications } from "./api/resources/tinVerifications/client/Client"; +import { Users } from "./api/resources/users/client/Client"; + +export declare namespace AboundClient { + interface Options { + environment?: core.Supplier; + sampleKey: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + } +} + +export class AboundClient { + constructor(protected readonly _options: AboundClient.Options) {} + + protected _accessTokens: AccessTokens | undefined; + + public get accessTokens(): AccessTokens { + return (this._accessTokens ??= new AccessTokens(this._options)); + } + + protected _electronicDeliveryConsents: ElectronicDeliveryConsents | undefined; + + public get electronicDeliveryConsents(): ElectronicDeliveryConsents { + return (this._electronicDeliveryConsents ??= new ElectronicDeliveryConsents(this._options)); + } + + protected _form1099Int: Form1099Int | undefined; + + public get form1099Int(): Form1099Int { + return (this._form1099Int ??= new Form1099Int(this._options)); + } + + protected _form1099K: Form1099K | undefined; + + public get form1099K(): Form1099K { + return (this._form1099K ??= new Form1099K(this._options)); + } + + protected _form1099Misc: Form1099Misc | undefined; + + public get form1099Misc(): Form1099Misc { + return (this._form1099Misc ??= new Form1099Misc(this._options)); + } + + protected _form1099Nec: Form1099Nec | undefined; + + public get form1099Nec(): Form1099Nec { + return (this._form1099Nec ??= new Form1099Nec(this._options)); + } + + protected _formW8BenE: FormW8BenE | undefined; + + public get formW8BenE(): FormW8BenE { + return (this._formW8BenE ??= new FormW8BenE(this._options)); + } + + protected _formW8Ben: FormW8Ben | undefined; + + public get formW8Ben(): FormW8Ben { + return (this._formW8Ben ??= new FormW8Ben(this._options)); + } + + protected _formW9: FormW9 | undefined; + + public get formW9(): FormW9 { + return (this._formW9 ??= new FormW9(this._options)); + } + + protected _mailings: Mailings | undefined; + + public get mailings(): Mailings { + return (this._mailings ??= new Mailings(this._options)); + } + + protected _taxTreaties: TaxTreaties | undefined; + + public get taxTreaties(): TaxTreaties { + return (this._taxTreaties ??= new TaxTreaties(this._options)); + } + + protected _tinVerifications: TinVerifications | undefined; + + public get tinVerifications(): TinVerifications { + return (this._tinVerifications ??= new TinVerifications(this._options)); + } + + protected _users: Users | undefined; + + public get users(): Users { + return (this._users ??= new Users(this._options)); + } +} diff --git a/src/abound.ts b/src/abound.ts deleted file mode 100644 index f1e1f83a..00000000 --- a/src/abound.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { - accessTokensResource, - mailingsResource, - form1099IntResource, - form1099KResource, - form1099NecResource, - tinVerificationsResource, - usersResource, - formW9Resource, -} from "./resources/index.js"; -import { version } from "./version.js"; - -export type AboundConfig = { - appId: string; - appSecret: string; - environment: "SANDBOX" | "PRODUCTION"; -}; - -export type AboundContext = { - baseUrl: - | "https://sandbox-api.withabound.com" - | "https://production-api.withabound.com"; - headers: Record; -}; - -export class Abound { - // Resources - accessTokens: ReturnType; - form1099Int: ReturnType; - form1099K: ReturnType; - form1099Nec: ReturnType; - formW9: ReturnType; - mailings: ReturnType; - tinVerifications: ReturnType; - users: ReturnType; - - constructor(config: AboundConfig) { - validateAboundConfig(config); - - /* eslint-disable @typescript-eslint/naming-convention */ - const context: AboundContext = { - baseUrl: { - SANDBOX: "https://sandbox-api.withabound.com" as const, - PRODUCTION: "https://production-api.withabound.com" as const, - }[config.environment], - headers: { - "Abound-SDK": `NodeSDK/${version}`, - Authorization: `Bearer ${config.appId}.${config.appSecret}`, - "Content-Type": "application/json", - }, - }; - /* eslint-enable @typescript-eslint/naming-convention */ - - this.accessTokens = accessTokensResource(context); - this.form1099Int = form1099IntResource(context); - this.form1099K = form1099KResource(context); - this.form1099Nec = form1099NecResource(context); - this.formW9 = formW9Resource(context); - this.mailings = mailingsResource(context); - this.tinVerifications = tinVerificationsResource(context); - this.users = usersResource(context); - } -} - -const requiredConfigFields: Array = [ - "appId", - "appSecret", - "environment", -]; - -function validateAboundConfig(config: AboundConfig): void { - for (const field of requiredConfigFields) { - if (!config[field]) { - throw new Error(`Missing ${field} in Abound config`); - } - } -} - -// Resources -export type * from "./resources/1099-int.js"; -export type * from "./resources/1099-k.js"; -export type * from "./resources/1099-nec.js"; -export type * from "./resources/access-tokens.js"; -export type * from "./resources/mailings.js"; -export type * from "./resources/tin-verifications.js"; -export type * from "./resources/users.js"; -export type * from "./resources/w-9.js"; diff --git a/src/api/index.ts b/src/api/index.ts new file mode 100644 index 00000000..3e5335fe --- /dev/null +++ b/src/api/index.ts @@ -0,0 +1 @@ +export * from "./resources"; diff --git a/src/api/resources/accessTokens/client/Client.ts b/src/api/resources/accessTokens/client/Client.ts new file mode 100644 index 00000000..0508021e --- /dev/null +++ b/src/api/resources/accessTokens/client/Client.ts @@ -0,0 +1,121 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Abound from "../../../index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace AccessTokens { + interface Options { + environment?: core.Supplier; + sampleKey: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + } +} + +export class AccessTokens { + constructor(protected readonly _options: AccessTokens.Options) {} + + /** + * Creates an access token for authenticating Drop-In UI Components. + * + * @param {Abound.AccessTokenRequestSchema} request + * @param {AccessTokens.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.accessTokens.create({ + * expiresIn: 900 + * }) + */ + public async create( + request: Abound.AccessTokenRequestSchema, + requestOptions?: AccessTokens.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey, ..._body } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + "/v4/access-tokens" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + body: _body, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.AccessTokenSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.sampleKey)}`; + } +} diff --git a/src/api/resources/accessTokens/client/index.ts b/src/api/resources/accessTokens/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/accessTokens/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/accessTokens/client/requests/AccessTokenRequestSchema.ts b/src/api/resources/accessTokens/client/requests/AccessTokenRequestSchema.ts new file mode 100644 index 00000000..80909a51 --- /dev/null +++ b/src/api/resources/accessTokens/client/requests/AccessTokenRequestSchema.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * { + * expiresIn: 900 + * } + */ +export interface AccessTokenRequestSchema { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; + /** The number of seconds until the access token expires. */ + expiresIn: number; + /** The unique identifier of the user associated with this access token. */ + userId?: string; +} diff --git a/src/api/resources/accessTokens/client/requests/index.ts b/src/api/resources/accessTokens/client/requests/index.ts new file mode 100644 index 00000000..761b3d23 --- /dev/null +++ b/src/api/resources/accessTokens/client/requests/index.ts @@ -0,0 +1 @@ +export { type AccessTokenRequestSchema } from "./AccessTokenRequestSchema"; diff --git a/src/api/resources/accessTokens/index.ts b/src/api/resources/accessTokens/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/api/resources/accessTokens/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/accessTokens/types/AccessTokenSchema.ts b/src/api/resources/accessTokens/types/AccessTokenSchema.ts new file mode 100644 index 00000000..23b5beb6 --- /dev/null +++ b/src/api/resources/accessTokens/types/AccessTokenSchema.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * accessToken: "accessToken_sampleeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2OTY5ODczNTcsImV4cCI6MTY5Njk4NzY1NywiYXVkIjoiYXBwSWRfc2FtcGxlcU5oVmNkWVFZVSIsImlzcyI6Imh0dHBzOi8vc2FuZGJveC1hcGkud2l0aGFib3VuZC5jb20vdjQiLCJzdWIiOiJ1c2VySWRfc2FtcGxlWEdNRm5oT3BlUiJ9.-NrPVQvsnM8vJouyuP5yeFGlYb1xGgR-gS3v87p5BQk", + * createdAt: "2024-01-01T00:00:00.000Z", + * expiresAt: "2024-01-01T00:15:00.000Z" + * } + */ +export interface AccessTokenSchema { + /** The access token to authenticate your Drop-In UI Components. */ + accessToken: string; + /** The creation date and time of the access token in `ISO 8601` format. */ + createdAt: string; + /** The expiration date and time of the access token in `ISO 8601` format. */ + expiresAt: string; +} diff --git a/src/api/resources/accessTokens/types/index.ts b/src/api/resources/accessTokens/types/index.ts new file mode 100644 index 00000000..1154242c --- /dev/null +++ b/src/api/resources/accessTokens/types/index.ts @@ -0,0 +1 @@ +export * from "./AccessTokenSchema"; diff --git a/src/api/resources/electronicDeliveryConsents/client/Client.ts b/src/api/resources/electronicDeliveryConsents/client/Client.ts new file mode 100644 index 00000000..b4e6f55b --- /dev/null +++ b/src/api/resources/electronicDeliveryConsents/client/Client.ts @@ -0,0 +1,139 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Abound from "../../../index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace ElectronicDeliveryConsents { + interface Options { + environment?: core.Supplier; + sampleKey: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + } +} + +export class ElectronicDeliveryConsents { + constructor(protected readonly _options: ElectronicDeliveryConsents.Options) {} + + /** + * Returns a list of Electronic Delivery Consents. + * + * @param {Abound.EDeliveryConsentListRequest} request + * @param {ElectronicDeliveryConsents.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.electronicDeliveryConsents.list() + */ + public async list( + request: Abound.EDeliveryConsentListRequest = {}, + requestOptions?: ElectronicDeliveryConsents.RequestOptions + ): Promise { + const { page, status, email, tinFingerprint, userId } = request; + const _queryParams: Record = {}; + if (page != null) { + _queryParams["page"] = page.toString(); + } + + if (status != null) { + _queryParams["status"] = status; + } + + if (email != null) { + _queryParams["email"] = email; + } + + if (tinFingerprint != null) { + _queryParams["tinFingerprint"] = tinFingerprint; + } + + if (userId != null) { + _queryParams["userId"] = userId; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + "/v4/electronic-delivery-consents" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.EDeliveryConsentSchema[]; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.sampleKey)}`; + } +} diff --git a/src/api/resources/electronicDeliveryConsents/client/index.ts b/src/api/resources/electronicDeliveryConsents/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/electronicDeliveryConsents/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/electronicDeliveryConsents/client/requests/EDeliveryConsentListRequest.ts b/src/api/resources/electronicDeliveryConsents/client/requests/EDeliveryConsentListRequest.ts new file mode 100644 index 00000000..dcc1dcdf --- /dev/null +++ b/src/api/resources/electronicDeliveryConsents/client/requests/EDeliveryConsentListRequest.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * {} + */ +export interface EDeliveryConsentListRequest { + page?: Abound.types.Page; + status?: Abound.EDeliveryConsentStatusEnum; + /** + * Filters the list of Electronic Delivery Consents based on the `email` field. + */ + email?: string; + tinFingerprint?: Abound.types.TinFingerprint; + userId?: Abound.types.UserId; +} diff --git a/src/api/resources/electronicDeliveryConsents/client/requests/index.ts b/src/api/resources/electronicDeliveryConsents/client/requests/index.ts new file mode 100644 index 00000000..7380f453 --- /dev/null +++ b/src/api/resources/electronicDeliveryConsents/client/requests/index.ts @@ -0,0 +1 @@ +export { type EDeliveryConsentListRequest } from "./EDeliveryConsentListRequest"; diff --git a/src/api/resources/electronicDeliveryConsents/index.ts b/src/api/resources/electronicDeliveryConsents/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/api/resources/electronicDeliveryConsents/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/electronicDeliveryConsents/types/EDeliveryConsentSchema.ts b/src/api/resources/electronicDeliveryConsents/types/EDeliveryConsentSchema.ts new file mode 100644 index 00000000..d4f25d7e --- /dev/null +++ b/src/api/resources/electronicDeliveryConsents/types/EDeliveryConsentSchema.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +export interface EDeliveryConsentSchema { + /** The unique identifier for this electronic delivery consent. */ + id: string; + /** The creation date and time of the electronic delivery consent in `ISO 8601` format. */ + createdAt: string; + /** The status of the electronic delivery consent. */ + status: Abound.EDeliveryConsentStatusEnum; + /** The email address associated with the electronic delivery consent. Abound assume's you have taken the proper steps to verify the ownership of this email address. */ + email: string; + /** The TIN fingerprint for this electronic delivery consent. */ + tinFingerprint: Abound.types.TinFingerprint; +} diff --git a/src/api/resources/electronicDeliveryConsents/types/EDeliveryConsentStatusEnum.ts b/src/api/resources/electronicDeliveryConsents/types/EDeliveryConsentStatusEnum.ts new file mode 100644 index 00000000..e1aba87e --- /dev/null +++ b/src/api/resources/electronicDeliveryConsents/types/EDeliveryConsentStatusEnum.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type EDeliveryConsentStatusEnum = "ASSENTED" | "WITHDRAWN"; + +export const EDeliveryConsentStatusEnum = { + Assented: "ASSENTED", + Withdrawn: "WITHDRAWN", +} as const; diff --git a/src/api/resources/electronicDeliveryConsents/types/index.ts b/src/api/resources/electronicDeliveryConsents/types/index.ts new file mode 100644 index 00000000..2ea29fdb --- /dev/null +++ b/src/api/resources/electronicDeliveryConsents/types/index.ts @@ -0,0 +1,2 @@ +export * from "./EDeliveryConsentStatusEnum"; +export * from "./EDeliveryConsentSchema"; diff --git a/src/api/resources/form1099Int/client/Client.ts b/src/api/resources/form1099Int/client/Client.ts new file mode 100644 index 00000000..ac691f43 --- /dev/null +++ b/src/api/resources/form1099Int/client/Client.ts @@ -0,0 +1,840 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Abound from "../../../index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace Form1099Int { + interface Options { + environment?: core.Supplier; + sampleKey: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + } +} + +export class Form1099Int { + constructor(protected readonly _options: Form1099Int.Options) {} + + /** + * Returns a list of 1099-INT documents. + * + * @param {Abound.Form1099IntListRequest} request + * @param {Form1099Int.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Int.list() + */ + public async list( + request: Abound.Form1099IntListRequest = {}, + requestOptions?: Form1099Int.RequestOptions + ): Promise { + const { page, filingYear, payeeTinFingerprint, payerTinFingerprint, status, userId } = request; + const _queryParams: Record = {}; + if (page != null) { + _queryParams["page"] = page.toString(); + } + + if (filingYear != null) { + _queryParams["filingYear"] = filingYear.toString(); + } + + if (payeeTinFingerprint != null) { + _queryParams["payeeTinFingerprint"] = payeeTinFingerprint; + } + + if (payerTinFingerprint != null) { + _queryParams["payerTinFingerprint"] = payerTinFingerprint; + } + + if (status != null) { + _queryParams["status"] = status; + } + + if (userId != null) { + _queryParams["userId"] = userId; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + "/v4/documents/1099-int" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099IntSchema[]; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Creates a 1099-INT document and subsequently kicks off a TIN Verification, if the name and TIN combo has not been used before. + * + * @param {Abound.Form1099IntRequest} request + * @param {Form1099Int.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Int.create({ + * body: { + * filingYear: 2023, + * payer: { + * name: "Hooli", + * tin: "111111111", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096" + * }, + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * bondPremium: 19423, + * bondPremiumTaxExemptBond: 19423, + * bondPremiumTreasury: 19423, + * earlyWithdrawalPenalty: 23223, + * foreignTaxPaid: 19423, + * foreignTaxPaidCountry: "FR", + * hasFatcaFilingRequirement: true, + * interestIncome: 83232, + * investmentExpenses: 19423, + * marketDiscount: 19423, + * payersRoutingNumber: "054000030", + * specifiedPrivateActivityBondInterest: 19423, + * taxExemptInterest: 19423, + * usSavingsBondsInterest: 19423, + * federalIncomeTaxWithheld: 0, + * accountNumber: "A006SVmcrieFAbm3gsaV", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateTaxWithheld: 0 + * }] + * } + * } + * }) + */ + public async create( + request: Abound.Form1099IntRequest, + requestOptions?: Form1099Int.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey, body: _body } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + "/v4/documents/1099-int" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + body: _body, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099IntSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Mails a 1099-INT document. + * + * @param {Abound.types.DocumentId} documentId + * @param {Abound.Form1099IntMailingRequest} request + * @param {Form1099Int.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Int.mail("documentId_samplepWpJ9Snlzb", { + * body: { + * to: { + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * name: "Ada Lovelace" + * }, + * from: { + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * name: "Hooli" + * } + * } + * }) + */ + public async mail( + documentId: Abound.types.DocumentId, + request: Abound.Form1099IntMailingRequest, + requestOptions?: Form1099Int.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey, body: _body } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-int/${encodeURIComponent(documentId)}/mail` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + body: _body, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.MailingSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Files a 1099-INT document. + * + * @param {Abound.types.DocumentId} documentId + * @param {Abound.Form1099IntFileRequest} request + * @param {Form1099Int.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Int.file("documentId_samplepWpJ9Snlzb") + */ + public async file( + documentId: Abound.types.DocumentId, + request: Abound.Form1099IntFileRequest = {}, + requestOptions?: Form1099Int.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-int/${encodeURIComponent(documentId)}/file` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099IntSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Files a new corrected 1099-INT and relates it to the original document. A 1099-INT can be corrected only after it has reached the `FILED` status. Automatically handles both one-transaction and two-transaction corrections. + * + * @param {Abound.types.DocumentId} documentId + * @param {Abound.Form1099IntCorrectRequest} request + * @param {Form1099Int.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Int.correct("documentId_samplepWpJ9Snlzb", { + * body: { + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * bondPremium: 19423, + * bondPremiumTaxExemptBond: 19423, + * bondPremiumTreasury: 19423, + * earlyWithdrawalPenalty: 23223, + * foreignTaxPaid: 19423, + * foreignTaxPaidCountry: "FR", + * hasFatcaFilingRequirement: true, + * interestIncome: 10000, + * investmentExpenses: 19423, + * marketDiscount: 19423, + * payersRoutingNumber: "054000030", + * specifiedPrivateActivityBondInterest: 19423, + * taxExemptInterest: 19423, + * usSavingsBondsInterest: 19423, + * federalIncomeTaxWithheld: 0, + * accountNumber: "A006SVmcrieFAbm3gsaV", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca + * }] + * } + * } + * }) + */ + public async correct( + documentId: Abound.types.DocumentId, + request: Abound.Form1099IntCorrectRequest, + requestOptions?: Form1099Int.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey, body: _body } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-int/${encodeURIComponent(documentId)}/correct` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + body: _body, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099IntSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Files a new voided 1099-INT and relates it to the original document. A 1099-INT can be voided only after it has reached the `FILED` status. + * + * @param {Abound.types.DocumentId} documentId + * @param {Abound.Form1099IntVoidRequest} request + * @param {Form1099Int.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Int.void("documentId_samplepWpJ9Snlzb") + */ + public async void( + documentId: Abound.types.DocumentId, + request: Abound.Form1099IntVoidRequest = {}, + requestOptions?: Form1099Int.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-int/${encodeURIComponent(documentId)}/void` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099IntSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Retrieves the details of an existing 1099-INT document. + * + * @param {Abound.types.DocumentId} documentId + * @param {Form1099Int.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Int.retrieve("documentId_samplepWpJ9Snlzb") + */ + public async retrieve( + documentId: Abound.types.DocumentId, + requestOptions?: Form1099Int.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-int/${encodeURIComponent(documentId)}` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099IntSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Deletes a 1099-INT document. Once an action (`/file`, `/correct`, `/void`) has been executed on a 1099-INT, it cannot be deleted. + * + * @param {Abound.types.DocumentId} documentId + * @param {Form1099Int.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Int.delete("documentId_samplepWpJ9Snlzb") + */ + public async delete( + documentId: Abound.types.DocumentId, + requestOptions?: Form1099Int.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-int/${encodeURIComponent(documentId)}` + ), + method: "DELETE", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.types.OkSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.sampleKey)}`; + } +} diff --git a/src/api/resources/form1099Int/client/index.ts b/src/api/resources/form1099Int/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/form1099Int/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/form1099Int/client/requests/Form1099IntCorrectRequest.ts b/src/api/resources/form1099Int/client/requests/Form1099IntCorrectRequest.ts new file mode 100644 index 00000000..c3d4debc --- /dev/null +++ b/src/api/resources/form1099Int/client/requests/Form1099IntCorrectRequest.ts @@ -0,0 +1,48 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * { + * body: { + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * bondPremium: 19423, + * bondPremiumTaxExemptBond: 19423, + * bondPremiumTreasury: 19423, + * earlyWithdrawalPenalty: 23223, + * foreignTaxPaid: 19423, + * foreignTaxPaidCountry: "FR", + * hasFatcaFilingRequirement: true, + * interestIncome: 10000, + * investmentExpenses: 19423, + * marketDiscount: 19423, + * payersRoutingNumber: "054000030", + * specifiedPrivateActivityBondInterest: 19423, + * taxExemptInterest: 19423, + * usSavingsBondsInterest: 19423, + * federalIncomeTaxWithheld: 0, + * accountNumber: "A006SVmcrieFAbm3gsaV", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca + * }] + * } + * } + * } + */ +export interface Form1099IntCorrectRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; + body: Abound.Form1099IntCorrectRequestSchema; +} diff --git a/src/api/resources/form1099Int/client/requests/Form1099IntFileRequest.ts b/src/api/resources/form1099Int/client/requests/Form1099IntFileRequest.ts new file mode 100644 index 00000000..f3d88cc6 --- /dev/null +++ b/src/api/resources/form1099Int/client/requests/Form1099IntFileRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * {} + */ +export interface Form1099IntFileRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; +} diff --git a/src/api/resources/form1099Int/client/requests/Form1099IntListRequest.ts b/src/api/resources/form1099Int/client/requests/Form1099IntListRequest.ts new file mode 100644 index 00000000..ff4406e9 --- /dev/null +++ b/src/api/resources/form1099Int/client/requests/Form1099IntListRequest.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * {} + */ +export interface Form1099IntListRequest { + page?: Abound.types.Page; + filingYear?: Abound.types.FilingYear; + payeeTinFingerprint?: Abound.types.PayeeTinFingerprint; + payerTinFingerprint?: Abound.types.PayerTinFingerprint; + status?: Abound.types.Form1099StatusEnum; + userId?: Abound.types.UserId; +} diff --git a/src/api/resources/form1099Int/client/requests/Form1099IntMailingRequest.ts b/src/api/resources/form1099Int/client/requests/Form1099IntMailingRequest.ts new file mode 100644 index 00000000..63992210 --- /dev/null +++ b/src/api/resources/form1099Int/client/requests/Form1099IntMailingRequest.ts @@ -0,0 +1,35 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * { + * body: { + * to: { + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * name: "Ada Lovelace" + * }, + * from: { + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * name: "Hooli" + * } + * } + * } + */ +export interface Form1099IntMailingRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; + body: Abound.MailingRequestSchema; +} diff --git a/src/api/resources/form1099Int/client/requests/Form1099IntRequest.ts b/src/api/resources/form1099Int/client/requests/Form1099IntRequest.ts new file mode 100644 index 00000000..2a9c942a --- /dev/null +++ b/src/api/resources/form1099Int/client/requests/Form1099IntRequest.ts @@ -0,0 +1,61 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * { + * body: { + * filingYear: 2023, + * payer: { + * name: "Hooli", + * tin: "111111111", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096" + * }, + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * bondPremium: 19423, + * bondPremiumTaxExemptBond: 19423, + * bondPremiumTreasury: 19423, + * earlyWithdrawalPenalty: 23223, + * foreignTaxPaid: 19423, + * foreignTaxPaidCountry: "FR", + * hasFatcaFilingRequirement: true, + * interestIncome: 83232, + * investmentExpenses: 19423, + * marketDiscount: 19423, + * payersRoutingNumber: "054000030", + * specifiedPrivateActivityBondInterest: 19423, + * taxExemptInterest: 19423, + * usSavingsBondsInterest: 19423, + * federalIncomeTaxWithheld: 0, + * accountNumber: "A006SVmcrieFAbm3gsaV", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateTaxWithheld: 0 + * }] + * } + * } + * } + */ +export interface Form1099IntRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; + body: Abound.Form1099IntRequestSchema; +} diff --git a/src/api/resources/form1099Int/client/requests/Form1099IntVoidRequest.ts b/src/api/resources/form1099Int/client/requests/Form1099IntVoidRequest.ts new file mode 100644 index 00000000..dc867961 --- /dev/null +++ b/src/api/resources/form1099Int/client/requests/Form1099IntVoidRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * {} + */ +export interface Form1099IntVoidRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; +} diff --git a/src/api/resources/form1099Int/client/requests/index.ts b/src/api/resources/form1099Int/client/requests/index.ts new file mode 100644 index 00000000..24003028 --- /dev/null +++ b/src/api/resources/form1099Int/client/requests/index.ts @@ -0,0 +1,6 @@ +export { type Form1099IntListRequest } from "./Form1099IntListRequest"; +export { type Form1099IntRequest } from "./Form1099IntRequest"; +export { type Form1099IntMailingRequest } from "./Form1099IntMailingRequest"; +export { type Form1099IntFileRequest } from "./Form1099IntFileRequest"; +export { type Form1099IntCorrectRequest } from "./Form1099IntCorrectRequest"; +export { type Form1099IntVoidRequest } from "./Form1099IntVoidRequest"; diff --git a/src/api/resources/form1099Int/index.ts b/src/api/resources/form1099Int/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/api/resources/form1099Int/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/form1099Int/types/Form1099IntCorrectRequestSchema.ts b/src/api/resources/form1099Int/types/Form1099IntCorrectRequestSchema.ts new file mode 100644 index 00000000..6fb85ae8 --- /dev/null +++ b/src/api/resources/form1099Int/types/Form1099IntCorrectRequestSchema.ts @@ -0,0 +1,45 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * bondPremium: 19423, + * bondPremiumTaxExemptBond: 19423, + * bondPremiumTreasury: 19423, + * earlyWithdrawalPenalty: 23223, + * foreignTaxPaid: 19423, + * foreignTaxPaidCountry: "FR", + * hasFatcaFilingRequirement: true, + * interestIncome: 10000, + * investmentExpenses: 19423, + * marketDiscount: 19423, + * payersRoutingNumber: "054000030", + * specifiedPrivateActivityBondInterest: 19423, + * taxExemptInterest: 19423, + * usSavingsBondsInterest: 19423, + * federalIncomeTaxWithheld: 0, + * accountNumber: "A006SVmcrieFAbm3gsaV", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca + * }] + * } + * } + */ +export interface Form1099IntCorrectRequestSchema extends Abound.types.Form1099BaseCorrectRequestSchema { + formFields: Abound.Form1099IntFormFieldsRequestSchema; +} diff --git a/src/api/resources/form1099Int/types/Form1099IntFormFieldsRequestSchema.ts b/src/api/resources/form1099Int/types/Form1099IntFormFieldsRequestSchema.ts new file mode 100644 index 00000000..1754c10c --- /dev/null +++ b/src/api/resources/form1099Int/types/Form1099IntFormFieldsRequestSchema.ts @@ -0,0 +1,45 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * The 1099-INT form fields. + */ +export interface Form1099IntFormFieldsRequestSchema { + /** Satisfying a requirement to report with respect to a U.S. account for chapter 4 purposes. */ + hasFatcaFilingRequirement?: boolean; + /** The IRS “encourages” a payer to designate an account number for all Form 1099-INT filed. This field is required if payer has multiple accounts for a recipient for whom it is filing more than one Form 1099-INT. This field is also required if `fatca` is `true`. Abound will auto-generated this field if not provided. */ + accountNumber?: string; + /** A routing and transit number (RTN) is a unique nine-digit number used to identify a bank for purposes of directing financial flows. This is essentially bank's bank account - their account with the Federal Reserve. */ + payersRoutingNumber?: string; + /** The taxable interest paid to you during the calendar year by the payer. This does not include interest for `usSavingsBondsInterest`. May also show the total amount of the credits from clean renewable energy bonds, new clean renewable energy bonds, qualified energy conservation bonds, qualified zone academy bonds, qualified school construction bonds, and build America bonds that must be included in your interest income. Value must be in cents. */ + interestIncome?: number; + /** The interest or principal forfeited because of early withdrawal of time savings. You may deduct this amount to figure your adjusted gross income on your income tax return. Value must be in cents. */ + earlyWithdrawalPenalty?: number; + /** Shows interest on U.S. Savings Bonds, Treasury bills, Treasury bonds, and Treasury notes. This may or may not all be taxable. This interest is exempt from state and local income taxes. This interest is not included in `interestIncome`. Value must be in cents. */ + usSavingsBondsInterest?: number; + /** The federal income tax withheld. A payer must backup withhold on certain payments if recipient did not provide a TIN to the payer. Value must be in cents. Abound does not currently support `federalIncomeTaxWithheld` reporting on the 1099-INT, please contact us for more information. */ + federalIncomeTaxWithheld?: number; + /** Any amount is your share of investment expenses of a singleclass REMIC. This amount is included in `interestIncome`. _Note: This amount is not deductible._ Value must be in cents. */ + investmentExpenses?: number; + /** The foreign tax paid. Value must be in cents. */ + foreignTaxPaid?: number; + /** The country or U.S. possession to which the foreign tax was paid. */ + foreignTaxPaidCountry?: string; + /** The tax-exempt interest paid to you during the calendar year by the payer. This amount may be subject to backup withholding. See `federalIncomeTaxWithheld` above. Value must be in cents. */ + taxExemptInterest?: number; + /** The tax-exempt interest subject to the alternative minimum tax. This amount is included in `taxExemptInterest`. Value must be in cents. */ + specifiedPrivateActivityBondInterest?: number; + /** For a taxable or tax-exempt covered security, if you made an election under section 1278(b) to include market discount in income as it accrues and you notified your payer of the election in writing in accordance with Regulations section 1.6045-1(n)(5), shows the market discount that accrued on the debt instrument during the year while held by you, unless it was reported on Form 1099-OID. Value must be in cents. */ + marketDiscount?: number; + /** For a taxable covered security (other than a U.S. Treasury obligation), shows the amount of premium amortization allocable to the interest payment(s), unless you notified the payer in writing in accordance with Regulations section 1.6045-1(n)(5) that you did not want to amortize bond premium under section 171. Value must be in cents. */ + bondPremium?: number; + /** For a U.S. Treasury obligation that is a covered security, shows the amount of premium amortization allocable to the interest payment(s), unless you notified the payer in writing in accordance with Regulations section 1.6045-1(n)(5) that you did not want to amortize bond premium under section 171. Value must be in cents. */ + bondPremiumTreasury?: number; + /** For a tax-exempt covered security, shows the amount of premium amortization allocable to the interest payment(s). Value must be in cents. */ + bondPremiumTaxExemptBond?: number; + /** An array that contains up to two state tax information objects. Abound currently only supports one state tax information object in this array. Abound does not currently support state-level tax withholding reporting on the 1099-INT, please contact us for more information. */ + stateTaxInfo: Abound.types.Form1099StateTaxInfoSchema[]; +} diff --git a/src/api/resources/form1099Int/types/Form1099IntFormFieldsSchema.ts b/src/api/resources/form1099Int/types/Form1099IntFormFieldsSchema.ts new file mode 100644 index 00000000..1cbef6d1 --- /dev/null +++ b/src/api/resources/form1099Int/types/Form1099IntFormFieldsSchema.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +export interface Form1099IntFormFieldsSchema + extends Abound.types.Form1099FormFieldsBaseSchema, + Abound.Form1099IntFormFieldsRequestSchema {} diff --git a/src/api/resources/form1099Int/types/Form1099IntRequestSchema.ts b/src/api/resources/form1099Int/types/Form1099IntRequestSchema.ts new file mode 100644 index 00000000..ae61d651 --- /dev/null +++ b/src/api/resources/form1099Int/types/Form1099IntRequestSchema.ts @@ -0,0 +1,58 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * filingYear: 2023, + * payer: { + * name: "Hooli", + * tin: "111111111", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096" + * }, + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * bondPremium: 19423, + * bondPremiumTaxExemptBond: 19423, + * bondPremiumTreasury: 19423, + * earlyWithdrawalPenalty: 23223, + * foreignTaxPaid: 19423, + * foreignTaxPaidCountry: "FR", + * hasFatcaFilingRequirement: true, + * interestIncome: 83232, + * investmentExpenses: 19423, + * marketDiscount: 19423, + * payersRoutingNumber: "054000030", + * specifiedPrivateActivityBondInterest: 19423, + * taxExemptInterest: 19423, + * usSavingsBondsInterest: 19423, + * federalIncomeTaxWithheld: 0, + * accountNumber: "A006SVmcrieFAbm3gsaV", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateTaxWithheld: 0 + * }] + * } + * } + */ +export interface Form1099IntRequestSchema extends Abound.types.Form1099BaseRequestSchema { + formFields: Abound.Form1099IntFormFieldsRequestSchema; +} diff --git a/src/api/resources/form1099Int/types/Form1099IntSchema.ts b/src/api/resources/form1099Int/types/Form1099IntSchema.ts new file mode 100644 index 00000000..897efaec --- /dev/null +++ b/src/api/resources/form1099Int/types/Form1099IntSchema.ts @@ -0,0 +1,264 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * id: "documentId_samplepWpJ9Snlzb", + * formFields: { + * isCorrected: false, + * isVoid: false, + * bondPremium: 19423, + * bondPremiumTaxExemptBond: 19423, + * bondPremiumTreasury: 19423, + * earlyWithdrawalPenalty: 23223, + * foreignTaxPaid: 19423, + * foreignTaxPaidCountry: "FR", + * hasFatcaFilingRequirement: true, + * interestIncome: 83232, + * investmentExpenses: 19423, + * marketDiscount: 19423, + * payersRoutingNumber: "054000030", + * specifiedPrivateActivityBondInterest: 19423, + * taxExemptInterest: 19423, + * usSavingsBondsInterest: 19423, + * federalIncomeTaxWithheld: 0, + * accountNumber: "A006SVmcrieFAbm3gsaV", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateTaxWithheld: 0 + * }] + * }, + * filingYear: 2023, + * createdAt: "2024-01-01T00:00:00.000Z", + * status: Abound.types.Form1099StatusEnum.Created, + * payer: { + * name: "Hooli", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096", + * tin: "*******11", + * tinType: Abound.types.TinTypeEnum.Business, + * tinFingerprint: "tinFingerprint_sample847jI1LwxF", + * tinVerificationId: "tinVerificationId_sample1b0E6efa89", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payee: { + * name: "Ada Lovelace", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * tin: "*******00", + * tinType: Abound.types.TinTypeEnum.Individual, + * tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + * tinVerificationId: "tinVerificationId_sample41SD71AV8f", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-COPY-C.pdf", + * payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-COPY-B.pdf" + * } + * + * @example + * { + * id: "documentId_samplepWpJ9Snlzb", + * formFields: { + * isCorrected: false, + * isVoid: false, + * bondPremium: 19423, + * bondPremiumTaxExemptBond: 19423, + * bondPremiumTreasury: 19423, + * earlyWithdrawalPenalty: 23223, + * foreignTaxPaid: 19423, + * foreignTaxPaidCountry: "FR", + * hasFatcaFilingRequirement: true, + * interestIncome: 83232, + * investmentExpenses: 19423, + * marketDiscount: 19423, + * payersRoutingNumber: "054000030", + * specifiedPrivateActivityBondInterest: 19423, + * taxExemptInterest: 19423, + * usSavingsBondsInterest: 19423, + * federalIncomeTaxWithheld: 0, + * accountNumber: "A006SVmcrieFAbm3gsaV", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateTaxWithheld: 0 + * }] + * }, + * filingYear: 2023, + * createdAt: "2024-01-01T00:00:00.000Z", + * status: Abound.types.Form1099StatusEnum.Filed, + * payer: { + * name: "Hooli", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096", + * tin: "*******11", + * tinType: Abound.types.TinTypeEnum.Business, + * tinFingerprint: "tinFingerprint_sample847jI1LwxF", + * tinVerificationId: "tinVerificationId_sample1b0E6efa89", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payee: { + * name: "Ada Lovelace", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * tin: "*******00", + * tinType: Abound.types.TinTypeEnum.Individual, + * tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + * tinVerificationId: "tinVerificationId_sample41SD71AV8f", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-COPY-C.pdf", + * payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-COPY-B.pdf" + * } + * + * @example + * { + * id: "documentId_samplexc6Aw2Qr9R", + * correctedFromId: "documentId_samplepWpJ9Snlzb", + * formFields: { + * isCorrected: true, + * isVoid: false, + * bondPremium: 19423, + * bondPremiumTaxExemptBond: 19423, + * bondPremiumTreasury: 19423, + * earlyWithdrawalPenalty: 23223, + * foreignTaxPaid: 19423, + * foreignTaxPaidCountry: "FR", + * hasFatcaFilingRequirement: true, + * interestIncome: 10000, + * investmentExpenses: 19423, + * marketDiscount: 19423, + * payersRoutingNumber: "054000030", + * specifiedPrivateActivityBondInterest: 19423, + * taxExemptInterest: 19423, + * usSavingsBondsInterest: 19423, + * federalIncomeTaxWithheld: 0, + * accountNumber: "A006SVmcrieFAbm3gsaV", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateTaxWithheld: 0 + * }] + * }, + * filingYear: 2023, + * createdAt: "2024-01-01T00:00:00.000Z", + * status: Abound.types.Form1099StatusEnum.Filed, + * payer: { + * name: "Hooli", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096", + * tin: "*******11", + * tinType: Abound.types.TinTypeEnum.Business, + * tinFingerprint: "tinFingerprint_sample847jI1LwxF", + * tinVerificationId: "tinVerificationId_sample1b0E6efa89", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payee: { + * name: "Ada Lovelace", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * tin: "*******00", + * tinType: Abound.types.TinTypeEnum.Individual, + * tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + * tinVerificationId: "tinVerificationId_sample41SD71AV8f", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-CORRECTED-COPY-C.pdf", + * payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-CORRECTED-COPY-B.pdf" + * } + * + * @example + * { + * id: "documentId_sampleVwRnewIBMu", + * voidedFromId: "documentId_samplepWpJ9Snlzb", + * formFields: { + * isCorrected: false, + * isVoid: true, + * bondPremium: 19423, + * bondPremiumTaxExemptBond: 19423, + * bondPremiumTreasury: 19423, + * earlyWithdrawalPenalty: 23223, + * foreignTaxPaid: 19423, + * foreignTaxPaidCountry: "FR", + * hasFatcaFilingRequirement: true, + * interestIncome: 83232, + * investmentExpenses: 19423, + * marketDiscount: 19423, + * payersRoutingNumber: "054000030", + * specifiedPrivateActivityBondInterest: 19423, + * taxExemptInterest: 19423, + * usSavingsBondsInterest: 19423, + * federalIncomeTaxWithheld: 0, + * accountNumber: "A006SVmcrieFAbm3gsaV", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateTaxWithheld: 0 + * }] + * }, + * filingYear: 2023, + * createdAt: "2024-01-01T00:00:00.000Z", + * status: Abound.types.Form1099StatusEnum.Filed, + * payer: { + * name: "Hooli", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096", + * tin: "*******11", + * tinType: Abound.types.TinTypeEnum.Business, + * tinFingerprint: "tinFingerprint_sample847jI1LwxF", + * tinVerificationId: "tinVerificationId_sample1b0E6efa89", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payee: { + * name: "Ada Lovelace", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * tin: "*******00", + * tinType: Abound.types.TinTypeEnum.Individual, + * tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + * tinVerificationId: "tinVerificationId_sample41SD71AV8f", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-VOID-COPY-C.pdf", + * payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-VOID-COPY-B.pdf" + * } + */ +export interface Form1099IntSchema extends Abound.types.Form1099BaseSchema { + formFields: Abound.Form1099IntFormFieldsSchema; +} diff --git a/src/api/resources/form1099Int/types/index.ts b/src/api/resources/form1099Int/types/index.ts new file mode 100644 index 00000000..b2af96ab --- /dev/null +++ b/src/api/resources/form1099Int/types/index.ts @@ -0,0 +1,5 @@ +export * from "./Form1099IntFormFieldsRequestSchema"; +export * from "./Form1099IntRequestSchema"; +export * from "./Form1099IntCorrectRequestSchema"; +export * from "./Form1099IntFormFieldsSchema"; +export * from "./Form1099IntSchema"; diff --git a/src/api/resources/form1099K/client/Client.ts b/src/api/resources/form1099K/client/Client.ts new file mode 100644 index 00000000..645875ed --- /dev/null +++ b/src/api/resources/form1099K/client/Client.ts @@ -0,0 +1,856 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Abound from "../../../index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace Form1099K { + interface Options { + environment?: core.Supplier; + sampleKey: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + } +} + +export class Form1099K { + constructor(protected readonly _options: Form1099K.Options) {} + + /** + * Returns a list of 1099-K documents. + * + * @param {Abound.Form1099KListRequest} request + * @param {Form1099K.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099K.list() + */ + public async list( + request: Abound.Form1099KListRequest = {}, + requestOptions?: Form1099K.RequestOptions + ): Promise { + const { page, filingYear, payeeTinFingerprint, payerTinFingerprint, status, userId } = request; + const _queryParams: Record = {}; + if (page != null) { + _queryParams["page"] = page.toString(); + } + + if (filingYear != null) { + _queryParams["filingYear"] = filingYear.toString(); + } + + if (payeeTinFingerprint != null) { + _queryParams["payeeTinFingerprint"] = payeeTinFingerprint; + } + + if (payerTinFingerprint != null) { + _queryParams["payerTinFingerprint"] = payerTinFingerprint; + } + + if (status != null) { + _queryParams["status"] = status; + } + + if (userId != null) { + _queryParams["userId"] = userId; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + "/v4/documents/1099-k" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099KSchema[]; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Creates a 1099-K document and subsequently kicks off a TIN Verification, if the name and TIN combo has not been used before. + * + * @param {Abound.Form1099KRequest} request + * @param {Form1099K.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099K.create({ + * body: { + * filingYear: 2023, + * payer: { + * name: "Hooli", + * tin: "111111111", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096" + * }, + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * accountNumber: "A0MCFOfvWWL7AVtwrhiU", + * aggregateGrossAmount: 27987876, + * aggregateGrossAmountCardNotPresent: 2332323, + * federalIncomeTaxWithheld: 0, + * merchantCategoryCode: "4582", + * numberOfPaymentTransactions: 767, + * pseName: "Payment Entity", + * payerClassification: Abound.Form1099KPayerClassificationEnum.Pse, + * transactionsReportedClassification: Abound.Form1099KTransactionsReportedClassificationSchema.PaymentCard, + * psePhoneNumber: "5555555555", + * grossAmountsByMonth: { + * april: 2332323, + * august: 2332323, + * december: 2332323, + * february: 2332323, + * january: 2332323, + * july: 2332323, + * june: 2332323, + * march: 2332323, + * may: 2332323, + * november: 2332323, + * october: 2332323, + * september: 2332323 + * }, + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateTaxWithheld: 0 + * }] + * } + * } + * }) + */ + public async create( + request: Abound.Form1099KRequest, + requestOptions?: Form1099K.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey, body: _body } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + "/v4/documents/1099-k" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + body: _body, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099KSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Mails a 1099-K document. + * + * @param {Abound.types.DocumentId} documentId + * @param {Abound.Form1099KMailingRequest} request + * @param {Form1099K.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099K.mail("documentId_sampletTtqNfulW8", { + * body: { + * to: { + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * name: "Ada Lovelace" + * }, + * from: { + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * name: "Hooli" + * } + * } + * }) + */ + public async mail( + documentId: Abound.types.DocumentId, + request: Abound.Form1099KMailingRequest, + requestOptions?: Form1099K.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey, body: _body } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-k/${encodeURIComponent(documentId)}/mail` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + body: _body, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.MailingSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Files a 1099-K document. + * + * @param {Abound.types.DocumentId} documentId + * @param {Abound.Form1099KFileRequest} request + * @param {Form1099K.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099K.file("documentId_sampletTtqNfulW8") + */ + public async file( + documentId: Abound.types.DocumentId, + request: Abound.Form1099KFileRequest = {}, + requestOptions?: Form1099K.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-k/${encodeURIComponent(documentId)}/file` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099KSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Files a new corrected 1099-K and relates it to the original document. A 1099-K can be corrected only after it has reached the `FILED` status. Automatically handles both one-transaction and two-transaction corrections. + * + * @param {Abound.types.DocumentId} documentId + * @param {Abound.Form1099KCorrectRequest} request + * @param {Form1099K.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099K.correct("documentId_sampletTtqNfulW8", { + * body: { + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * accountNumber: "A0MCFOfvWWL7AVtwrhiU", + * aggregateGrossAmount: 25655553, + * aggregateGrossAmountCardNotPresent: 25655553, + * federalIncomeTaxWithheld: 0, + * merchantCategoryCode: "4582", + * numberOfPaymentTransactions: 767, + * pseName: "Payment Entity", + * payerClassification: Abound.Form1099KPayerClassificationEnum.Pse, + * transactionsReportedClassification: Abound.Form1099KTransactionsReportedClassificationSchema.PaymentCard, + * psePhoneNumber: "5555555555", + * grossAmountsByMonth: { + * april: 2332323, + * august: 2332323, + * december: 2332323, + * february: 2332323, + * january: 0, + * july: 2332323, + * june: 2332323, + * march: 2332323, + * may: 2332323, + * november: 2332323, + * october: 2332323, + * september: 2332323 + * }, + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca + * }] + * } + * } + * }) + */ + public async correct( + documentId: Abound.types.DocumentId, + request: Abound.Form1099KCorrectRequest, + requestOptions?: Form1099K.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey, body: _body } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-k/${encodeURIComponent(documentId)}/correct` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + body: _body, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099KSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Files a new voided 1099-K and relates it to the original document. A 1099-K can be voided only after it has reached the `FILED` status. + * + * @param {Abound.types.DocumentId} documentId + * @param {Abound.Form1099KVoidRequest} request + * @param {Form1099K.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099K.void("documentId_sampletTtqNfulW8") + */ + public async void( + documentId: Abound.types.DocumentId, + request: Abound.Form1099KVoidRequest = {}, + requestOptions?: Form1099K.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-k/${encodeURIComponent(documentId)}/void` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099KSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Retrieves the details of an existing 1099-K document. + * + * @param {Abound.types.DocumentId} documentId + * @param {Form1099K.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099K.retrieve("documentId_sampletTtqNfulW8") + */ + public async retrieve( + documentId: Abound.types.DocumentId, + requestOptions?: Form1099K.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-k/${encodeURIComponent(documentId)}` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099KSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Deletes a 1099-K document. Once an action (`/file`, `/correct`, `/void`) has been executed on a 1099-K, it cannot be deleted. + * + * @param {Abound.types.DocumentId} documentId + * @param {Form1099K.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099K.delete("documentId_sampletTtqNfulW8") + */ + public async delete( + documentId: Abound.types.DocumentId, + requestOptions?: Form1099K.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-k/${encodeURIComponent(documentId)}` + ), + method: "DELETE", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.types.OkSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.sampleKey)}`; + } +} diff --git a/src/api/resources/form1099K/client/index.ts b/src/api/resources/form1099K/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/form1099K/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/form1099K/client/requests/Form1099KCorrectRequest.ts b/src/api/resources/form1099K/client/requests/Form1099KCorrectRequest.ts new file mode 100644 index 00000000..8a8d9e3a --- /dev/null +++ b/src/api/resources/form1099K/client/requests/Form1099KCorrectRequest.ts @@ -0,0 +1,56 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * { + * body: { + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * accountNumber: "A0MCFOfvWWL7AVtwrhiU", + * aggregateGrossAmount: 25655553, + * aggregateGrossAmountCardNotPresent: 25655553, + * federalIncomeTaxWithheld: 0, + * merchantCategoryCode: "4582", + * numberOfPaymentTransactions: 767, + * pseName: "Payment Entity", + * payerClassification: Abound.Form1099KPayerClassificationEnum.Pse, + * transactionsReportedClassification: Abound.Form1099KTransactionsReportedClassificationSchema.PaymentCard, + * psePhoneNumber: "5555555555", + * grossAmountsByMonth: { + * april: 2332323, + * august: 2332323, + * december: 2332323, + * february: 2332323, + * january: 0, + * july: 2332323, + * june: 2332323, + * march: 2332323, + * may: 2332323, + * november: 2332323, + * october: 2332323, + * september: 2332323 + * }, + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca + * }] + * } + * } + * } + */ +export interface Form1099KCorrectRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; + body: Abound.Form1099KCorrectRequestSchema; +} diff --git a/src/api/resources/form1099K/client/requests/Form1099KFileRequest.ts b/src/api/resources/form1099K/client/requests/Form1099KFileRequest.ts new file mode 100644 index 00000000..fd8d8501 --- /dev/null +++ b/src/api/resources/form1099K/client/requests/Form1099KFileRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * {} + */ +export interface Form1099KFileRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; +} diff --git a/src/api/resources/form1099K/client/requests/Form1099KListRequest.ts b/src/api/resources/form1099K/client/requests/Form1099KListRequest.ts new file mode 100644 index 00000000..a8ccfac6 --- /dev/null +++ b/src/api/resources/form1099K/client/requests/Form1099KListRequest.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * {} + */ +export interface Form1099KListRequest { + page?: Abound.types.Page; + filingYear?: Abound.types.FilingYear; + payeeTinFingerprint?: Abound.types.PayeeTinFingerprint; + payerTinFingerprint?: Abound.types.PayerTinFingerprint; + status?: Abound.types.Form1099StatusEnum; + userId?: Abound.types.UserId; +} diff --git a/src/api/resources/form1099K/client/requests/Form1099KMailingRequest.ts b/src/api/resources/form1099K/client/requests/Form1099KMailingRequest.ts new file mode 100644 index 00000000..138e824b --- /dev/null +++ b/src/api/resources/form1099K/client/requests/Form1099KMailingRequest.ts @@ -0,0 +1,35 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * { + * body: { + * to: { + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * name: "Ada Lovelace" + * }, + * from: { + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * name: "Hooli" + * } + * } + * } + */ +export interface Form1099KMailingRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; + body: Abound.MailingRequestSchema; +} diff --git a/src/api/resources/form1099K/client/requests/Form1099KRequest.ts b/src/api/resources/form1099K/client/requests/Form1099KRequest.ts new file mode 100644 index 00000000..75eba9fc --- /dev/null +++ b/src/api/resources/form1099K/client/requests/Form1099KRequest.ts @@ -0,0 +1,69 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * { + * body: { + * filingYear: 2023, + * payer: { + * name: "Hooli", + * tin: "111111111", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096" + * }, + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * accountNumber: "A0MCFOfvWWL7AVtwrhiU", + * aggregateGrossAmount: 27987876, + * aggregateGrossAmountCardNotPresent: 2332323, + * federalIncomeTaxWithheld: 0, + * merchantCategoryCode: "4582", + * numberOfPaymentTransactions: 767, + * pseName: "Payment Entity", + * payerClassification: Abound.Form1099KPayerClassificationEnum.Pse, + * transactionsReportedClassification: Abound.Form1099KTransactionsReportedClassificationSchema.PaymentCard, + * psePhoneNumber: "5555555555", + * grossAmountsByMonth: { + * april: 2332323, + * august: 2332323, + * december: 2332323, + * february: 2332323, + * january: 2332323, + * july: 2332323, + * june: 2332323, + * march: 2332323, + * may: 2332323, + * november: 2332323, + * october: 2332323, + * september: 2332323 + * }, + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateTaxWithheld: 0 + * }] + * } + * } + * } + */ +export interface Form1099KRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; + body: Abound.Form1099KRequestSchema; +} diff --git a/src/api/resources/form1099K/client/requests/Form1099KVoidRequest.ts b/src/api/resources/form1099K/client/requests/Form1099KVoidRequest.ts new file mode 100644 index 00000000..4f4cef53 --- /dev/null +++ b/src/api/resources/form1099K/client/requests/Form1099KVoidRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * {} + */ +export interface Form1099KVoidRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; +} diff --git a/src/api/resources/form1099K/client/requests/index.ts b/src/api/resources/form1099K/client/requests/index.ts new file mode 100644 index 00000000..df0d302a --- /dev/null +++ b/src/api/resources/form1099K/client/requests/index.ts @@ -0,0 +1,6 @@ +export { type Form1099KListRequest } from "./Form1099KListRequest"; +export { type Form1099KRequest } from "./Form1099KRequest"; +export { type Form1099KMailingRequest } from "./Form1099KMailingRequest"; +export { type Form1099KFileRequest } from "./Form1099KFileRequest"; +export { type Form1099KCorrectRequest } from "./Form1099KCorrectRequest"; +export { type Form1099KVoidRequest } from "./Form1099KVoidRequest"; diff --git a/src/api/resources/form1099K/index.ts b/src/api/resources/form1099K/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/api/resources/form1099K/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/form1099K/types/Form1099KCorrectRequestSchema.ts b/src/api/resources/form1099K/types/Form1099KCorrectRequestSchema.ts new file mode 100644 index 00000000..cd2005d4 --- /dev/null +++ b/src/api/resources/form1099K/types/Form1099KCorrectRequestSchema.ts @@ -0,0 +1,53 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * accountNumber: "A0MCFOfvWWL7AVtwrhiU", + * aggregateGrossAmount: 25655553, + * aggregateGrossAmountCardNotPresent: 25655553, + * federalIncomeTaxWithheld: 0, + * merchantCategoryCode: "4582", + * numberOfPaymentTransactions: 767, + * pseName: "Payment Entity", + * payerClassification: Abound.Form1099KPayerClassificationEnum.Pse, + * transactionsReportedClassification: Abound.Form1099KTransactionsReportedClassificationSchema.PaymentCard, + * psePhoneNumber: "5555555555", + * grossAmountsByMonth: { + * april: 2332323, + * august: 2332323, + * december: 2332323, + * february: 2332323, + * january: 0, + * july: 2332323, + * june: 2332323, + * march: 2332323, + * may: 2332323, + * november: 2332323, + * october: 2332323, + * september: 2332323 + * }, + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca + * }] + * } + * } + */ +export interface Form1099KCorrectRequestSchema extends Abound.types.Form1099BaseCorrectRequestSchema { + formFields: Abound.Form1099KFormFieldsRequestSchema; +} diff --git a/src/api/resources/form1099K/types/Form1099KFormFieldsRequestSchema.ts b/src/api/resources/form1099K/types/Form1099KFormFieldsRequestSchema.ts new file mode 100644 index 00000000..9963b5f1 --- /dev/null +++ b/src/api/resources/form1099K/types/Form1099KFormFieldsRequestSchema.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * The 1099-K form fields. + */ +export interface Form1099KFormFieldsRequestSchema { + payerClassification: Abound.Form1099KPayerClassificationEnum; + transactionsReportedClassification: Abound.Form1099KTransactionsReportedClassificationSchema; + /** The payment settlement entity name. Required if `payerClassification` is `PSE`. */ + pseName?: string; + /** The payment settlement entity phone number. Required if `payerClassification` is `PSE`. */ + psePhoneNumber?: string; + accountNumber?: Abound.types.Form1099AccountNumber; + /** Aggregate gross amount of payment card/third party network transactions made to you through the PSE during the calendar year. Value must be in cents. */ + aggregateGrossAmount: number; + /** The aggregate gross amount of all reportable payment transactions made to you through the PSE during the calendar year where the card was not present at the time of the transaction or the card number was keyed into the terminal. Typically, this relates to online sales, phone sales, or catalogue sales. If `transactionsReportedClassification` is `thirdPartyNetwork`, or if these are third party network transactions, card not present transactions will not be reported. Value must be in cents. */ + aggregateGrossAmountCardNotPresent: number; + /** Payment brands use merchant category codes (MCCs) to classify merchants and businesses by the type of goods or services provided. It is a four (4) digit code. This may be left blank. */ + merchantCategoryCode: string; + /** The number of payment transactions (not including refund transactions) processed through the payment card/third party network. */ + numberOfPaymentTransactions: number; + /** The federal income tax withheld. Generally, a payer must backup withhold if you did not furnish your TIN or you did not furnish the correct TIN to the payer. Value must be in cents. Abound does not currently support `federalIncomeTaxWithheld` reporting on the 1099-K, please contact us for more information. */ + federalIncomeTaxWithheld?: number; + grossAmountsByMonth: Abound.Form1099KGrossAmountsByMonthSchema; + /** An array that contains up to two state tax information objects. Abound currently only supports one state tax information object in this array. Abound does not currently support state-level tax withholding reporting on the 1099-K, please contact us for more information. */ + stateTaxInfo: Abound.types.Form1099StateTaxInfoSchema[]; +} diff --git a/src/api/resources/form1099K/types/Form1099KFormFieldsSchema.ts b/src/api/resources/form1099K/types/Form1099KFormFieldsSchema.ts new file mode 100644 index 00000000..e0ecf9e5 --- /dev/null +++ b/src/api/resources/form1099K/types/Form1099KFormFieldsSchema.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +export interface Form1099KFormFieldsSchema + extends Abound.types.Form1099FormFieldsBaseSchema, + Abound.Form1099KFormFieldsRequestSchema {} diff --git a/src/api/resources/form1099K/types/Form1099KGrossAmountsByMonthSchema.ts b/src/api/resources/form1099K/types/Form1099KGrossAmountsByMonthSchema.ts new file mode 100644 index 00000000..6db961f2 --- /dev/null +++ b/src/api/resources/form1099K/types/Form1099KGrossAmountsByMonthSchema.ts @@ -0,0 +1,33 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * An object that contains the gross amount of transactions for each month. At least one month must have a value above zero. Values must be in cents. + */ +export interface Form1099KGrossAmountsByMonthSchema { + /** The gross amount of payment card/third party network transactions made to you in January. Value must be in cents. */ + january?: number; + /** The gross amount of payment card/third party network transactions made to you in February. Value must be in cents. */ + february?: number; + /** The gross amount of payment card/third party network transactions made to you in March. Value must be in cents. */ + march?: number; + /** The gross amount of payment card/third party network transactions made to you in April. Value must be in cents. */ + april?: number; + /** The gross amount of payment card/third party network transactions made to you in May. Value must be in cents. */ + may?: number; + /** The gross amount of payment card/third party network transactions made to you in June. Value must be in cents. */ + june?: number; + /** The gross amount of payment card/third party network transactions made to you in July. Value must be in cents. */ + july?: number; + /** The gross amount of payment card/third party network transactions made to you in August. Value must be in cents. */ + august?: number; + /** The gross amount of payment card/third party network transactions made to you in September. Value must be in cents. */ + september?: number; + /** The gross amount of payment card/third party network transactions made to you in October. Value must be in cents. */ + october?: number; + /** The gross amount of payment card/third party network transactions made to you in November. Value must be in cents. */ + november?: number; + /** The gross amount of payment card/third party network transactions made to you in December. Value must be in cents. */ + december?: number; +} diff --git a/src/api/resources/form1099K/types/Form1099KPayerClassificationEnum.ts b/src/api/resources/form1099K/types/Form1099KPayerClassificationEnum.ts new file mode 100644 index 00000000..dc919572 --- /dev/null +++ b/src/api/resources/form1099K/types/Form1099KPayerClassificationEnum.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The type of payer. Payment settlement entity (PSE) or Electronic Payment Facilitator (EPF)/Other third party. + */ +export type Form1099KPayerClassificationEnum = "PSE" | "EPF_OTHER"; + +export const Form1099KPayerClassificationEnum = { + Pse: "PSE", + EpfOther: "EPF_OTHER", +} as const; diff --git a/src/api/resources/form1099K/types/Form1099KRequestSchema.ts b/src/api/resources/form1099K/types/Form1099KRequestSchema.ts new file mode 100644 index 00000000..db6e77e8 --- /dev/null +++ b/src/api/resources/form1099K/types/Form1099KRequestSchema.ts @@ -0,0 +1,66 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * filingYear: 2023, + * payer: { + * name: "Hooli", + * tin: "111111111", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096" + * }, + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * accountNumber: "A0MCFOfvWWL7AVtwrhiU", + * aggregateGrossAmount: 27987876, + * aggregateGrossAmountCardNotPresent: 2332323, + * federalIncomeTaxWithheld: 0, + * merchantCategoryCode: "4582", + * numberOfPaymentTransactions: 767, + * pseName: "Payment Entity", + * payerClassification: Abound.Form1099KPayerClassificationEnum.Pse, + * transactionsReportedClassification: Abound.Form1099KTransactionsReportedClassificationSchema.PaymentCard, + * psePhoneNumber: "5555555555", + * grossAmountsByMonth: { + * april: 2332323, + * august: 2332323, + * december: 2332323, + * february: 2332323, + * january: 2332323, + * july: 2332323, + * june: 2332323, + * march: 2332323, + * may: 2332323, + * november: 2332323, + * october: 2332323, + * september: 2332323 + * }, + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateTaxWithheld: 0 + * }] + * } + * } + */ +export interface Form1099KRequestSchema extends Abound.types.Form1099BaseRequestSchema { + formFields: Abound.Form1099KFormFieldsRequestSchema; +} diff --git a/src/api/resources/form1099K/types/Form1099KSchema.ts b/src/api/resources/form1099K/types/Form1099KSchema.ts new file mode 100644 index 00000000..3dbcc36a --- /dev/null +++ b/src/api/resources/form1099K/types/Form1099KSchema.ts @@ -0,0 +1,296 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * id: "documentId_sampletTtqNfulW8", + * formFields: { + * isCorrected: false, + * isVoid: false, + * accountNumber: "A0MCFOfvWWL7AVtwrhiU", + * aggregateGrossAmount: 27987876, + * aggregateGrossAmountCardNotPresent: 2332323, + * federalIncomeTaxWithheld: 0, + * merchantCategoryCode: "4582", + * numberOfPaymentTransactions: 767, + * pseName: "Payment Entity", + * payerClassification: Abound.Form1099KPayerClassificationEnum.Pse, + * transactionsReportedClassification: Abound.Form1099KTransactionsReportedClassificationSchema.PaymentCard, + * psePhoneNumber: "5555555555", + * grossAmountsByMonth: { + * april: 2332323, + * august: 2332323, + * december: 2332323, + * february: 2332323, + * january: 2332323, + * july: 2332323, + * june: 2332323, + * march: 2332323, + * may: 2332323, + * november: 2332323, + * october: 2332323, + * september: 2332323 + * }, + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateTaxWithheld: 0 + * }] + * }, + * filingYear: 2023, + * createdAt: "2024-01-01T00:00:00.000Z", + * status: Abound.types.Form1099StatusEnum.Created, + * payer: { + * name: "Hooli", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096", + * tin: "*******11", + * tinType: Abound.types.TinTypeEnum.Business, + * tinFingerprint: "tinFingerprint_sample847jI1LwxF", + * tinVerificationId: "tinVerificationId_sample1b0E6efa89", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payee: { + * name: "Ada Lovelace", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * tin: "*******00", + * tinType: Abound.types.TinTypeEnum.Individual, + * tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + * tinVerificationId: "tinVerificationId_sample41SD71AV8f", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-COPY-C.pdf", + * payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-COPY-B.pdf" + * } + * + * @example + * { + * id: "documentId_sampletTtqNfulW8", + * formFields: { + * isCorrected: false, + * isVoid: false, + * accountNumber: "A0MCFOfvWWL7AVtwrhiU", + * aggregateGrossAmount: 27987876, + * aggregateGrossAmountCardNotPresent: 2332323, + * federalIncomeTaxWithheld: 0, + * merchantCategoryCode: "4582", + * numberOfPaymentTransactions: 767, + * pseName: "Payment Entity", + * payerClassification: Abound.Form1099KPayerClassificationEnum.Pse, + * transactionsReportedClassification: Abound.Form1099KTransactionsReportedClassificationSchema.PaymentCard, + * psePhoneNumber: "5555555555", + * grossAmountsByMonth: { + * april: 2332323, + * august: 2332323, + * december: 2332323, + * february: 2332323, + * january: 2332323, + * july: 2332323, + * june: 2332323, + * march: 2332323, + * may: 2332323, + * november: 2332323, + * october: 2332323, + * september: 2332323 + * }, + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateTaxWithheld: 0 + * }] + * }, + * filingYear: 2023, + * createdAt: "2024-01-01T00:00:00.000Z", + * status: Abound.types.Form1099StatusEnum.Filed, + * payer: { + * name: "Hooli", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096", + * tin: "*******11", + * tinType: Abound.types.TinTypeEnum.Business, + * tinFingerprint: "tinFingerprint_sample847jI1LwxF", + * tinVerificationId: "tinVerificationId_sample1b0E6efa89", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payee: { + * name: "Ada Lovelace", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * tin: "*******00", + * tinType: Abound.types.TinTypeEnum.Individual, + * tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + * tinVerificationId: "tinVerificationId_sample41SD71AV8f", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-COPY-C.pdf", + * payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-COPY-B.pdf" + * } + * + * @example + * { + * id: "documentId_samplenOHhUUVnh6", + * correctedFromId: "documentId_sampletTtqNfulW8", + * formFields: { + * isCorrected: true, + * isVoid: false, + * accountNumber: "A0MCFOfvWWL7AVtwrhiU", + * aggregateGrossAmount: 25655553, + * aggregateGrossAmountCardNotPresent: 25655553, + * federalIncomeTaxWithheld: 0, + * merchantCategoryCode: "4582", + * numberOfPaymentTransactions: 767, + * pseName: "Payment Entity", + * payerClassification: Abound.Form1099KPayerClassificationEnum.Pse, + * transactionsReportedClassification: Abound.Form1099KTransactionsReportedClassificationSchema.PaymentCard, + * psePhoneNumber: "5555555555", + * grossAmountsByMonth: { + * april: 2332323, + * august: 2332323, + * december: 2332323, + * february: 2332323, + * january: 0, + * july: 2332323, + * june: 2332323, + * march: 2332323, + * may: 2332323, + * november: 2332323, + * october: 2332323, + * september: 2332323 + * }, + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateTaxWithheld: 0 + * }] + * }, + * filingYear: 2023, + * createdAt: "2024-01-01T00:00:00.000Z", + * status: Abound.types.Form1099StatusEnum.Filed, + * payer: { + * name: "Hooli", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096", + * tin: "*******11", + * tinType: Abound.types.TinTypeEnum.Business, + * tinFingerprint: "tinFingerprint_sample847jI1LwxF", + * tinVerificationId: "tinVerificationId_sample1b0E6efa89", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payee: { + * name: "Ada Lovelace", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * tin: "*******00", + * tinType: Abound.types.TinTypeEnum.Individual, + * tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + * tinVerificationId: "tinVerificationId_sample41SD71AV8f", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-CORRECTED-COPY-C.pdf", + * payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-CORRECTED-COPY-B.pdf" + * } + * + * @example + * { + * id: "documentId_sampleb6HQLsVuM9", + * voidedFromId: "documentId_sampletTtqNfulW8", + * formFields: { + * isCorrected: false, + * isVoid: true, + * accountNumber: "A0MCFOfvWWL7AVtwrhiU", + * aggregateGrossAmount: 27987876, + * aggregateGrossAmountCardNotPresent: 2332323, + * federalIncomeTaxWithheld: 0, + * merchantCategoryCode: "4582", + * numberOfPaymentTransactions: 767, + * pseName: "Payment Entity", + * payerClassification: Abound.Form1099KPayerClassificationEnum.Pse, + * transactionsReportedClassification: Abound.Form1099KTransactionsReportedClassificationSchema.PaymentCard, + * psePhoneNumber: "5555555555", + * grossAmountsByMonth: { + * april: 2332323, + * august: 2332323, + * december: 2332323, + * february: 2332323, + * january: 2332323, + * july: 2332323, + * june: 2332323, + * march: 2332323, + * may: 2332323, + * november: 2332323, + * october: 2332323, + * september: 2332323 + * }, + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateTaxWithheld: 0 + * }] + * }, + * filingYear: 2023, + * createdAt: "2024-01-01T00:00:00.000Z", + * status: Abound.types.Form1099StatusEnum.Filed, + * payer: { + * name: "Hooli", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096", + * tin: "*******11", + * tinType: Abound.types.TinTypeEnum.Business, + * tinFingerprint: "tinFingerprint_sample847jI1LwxF", + * tinVerificationId: "tinVerificationId_sample1b0E6efa89", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payee: { + * name: "Ada Lovelace", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * tin: "*******00", + * tinType: Abound.types.TinTypeEnum.Individual, + * tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + * tinVerificationId: "tinVerificationId_sample41SD71AV8f", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-VOID-COPY-C.pdf", + * payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-VOID-COPY-B.pdf" + * } + */ +export interface Form1099KSchema extends Abound.types.Form1099BaseSchema { + formFields: Abound.Form1099KFormFieldsSchema; +} diff --git a/src/api/resources/form1099K/types/Form1099KTransactionsReportedClassificationSchema.ts b/src/api/resources/form1099K/types/Form1099KTransactionsReportedClassificationSchema.ts new file mode 100644 index 00000000..8dfcc1b3 --- /dev/null +++ b/src/api/resources/form1099K/types/Form1099KTransactionsReportedClassificationSchema.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The type of transactions reported. + */ +export type Form1099KTransactionsReportedClassificationSchema = "PAYMENT_CARD" | "THIRD_PARTY_NETWORK"; + +export const Form1099KTransactionsReportedClassificationSchema = { + PaymentCard: "PAYMENT_CARD", + ThirdPartyNetwork: "THIRD_PARTY_NETWORK", +} as const; diff --git a/src/api/resources/form1099K/types/index.ts b/src/api/resources/form1099K/types/index.ts new file mode 100644 index 00000000..297e411a --- /dev/null +++ b/src/api/resources/form1099K/types/index.ts @@ -0,0 +1,8 @@ +export * from "./Form1099KPayerClassificationEnum"; +export * from "./Form1099KTransactionsReportedClassificationSchema"; +export * from "./Form1099KGrossAmountsByMonthSchema"; +export * from "./Form1099KFormFieldsRequestSchema"; +export * from "./Form1099KRequestSchema"; +export * from "./Form1099KCorrectRequestSchema"; +export * from "./Form1099KFormFieldsSchema"; +export * from "./Form1099KSchema"; diff --git a/src/api/resources/form1099Misc/client/Client.ts b/src/api/resources/form1099Misc/client/Client.ts new file mode 100644 index 00000000..807b23ae --- /dev/null +++ b/src/api/resources/form1099Misc/client/Client.ts @@ -0,0 +1,842 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Abound from "../../../index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace Form1099Misc { + interface Options { + environment?: core.Supplier; + sampleKey: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + } +} + +export class Form1099Misc { + constructor(protected readonly _options: Form1099Misc.Options) {} + + /** + * Returns a list of 1099-MISC documents. + * + * @param {Abound.Form1099MiscListRequest} request + * @param {Form1099Misc.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Misc.list() + */ + public async list( + request: Abound.Form1099MiscListRequest = {}, + requestOptions?: Form1099Misc.RequestOptions + ): Promise { + const { page, filingYear, payeeTinFingerprint, payerTinFingerprint, status, userId } = request; + const _queryParams: Record = {}; + if (page != null) { + _queryParams["page"] = page.toString(); + } + + if (filingYear != null) { + _queryParams["filingYear"] = filingYear.toString(); + } + + if (payeeTinFingerprint != null) { + _queryParams["payeeTinFingerprint"] = payeeTinFingerprint; + } + + if (payerTinFingerprint != null) { + _queryParams["payerTinFingerprint"] = payerTinFingerprint; + } + + if (status != null) { + _queryParams["status"] = status; + } + + if (userId != null) { + _queryParams["userId"] = userId; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + "/v4/documents/1099-misc" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099MiscSchema[]; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Creates a 1099-MISC document and subsequently kicks off a TIN Verification, if the name and TIN combo has not been used before. + * + * @param {Abound.Form1099MiscRequest} request + * @param {Form1099Misc.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Misc.create({ + * body: { + * filingYear: 2023, + * payer: { + * name: "Hooli", + * tin: "111111111", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096" + * }, + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * cropInsuranceProceeds: 97109, + * excessGoldenParachutePayments: 97109, + * federalIncomeTaxWithheld: 0, + * fishPurchasedForResale: 97109, + * fishingBoatProceeds: 97109, + * grossProceedsPaidToAnAttorney: 97109, + * hasDirectSalesOver5000: false, + * hasFatcaFilingRequirement: true, + * medicalAndHealthCarePayments: 97109, + * nonqualifiedDeferredCompensation: 97109, + * substitutePaymentsInLieuOfDividendsOrInterest: 97109, + * otherIncome: 97109, + * rents: 97109, + * royalties: 97109, + * section409ADeferrals: 97109, + * accountNumber: "A00AskD1ZTO4YB8oBHav", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateIncome: 345543, + * stateTaxWithheld: 0 + * }] + * } + * } + * }) + */ + public async create( + request: Abound.Form1099MiscRequest, + requestOptions?: Form1099Misc.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey, body: _body } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + "/v4/documents/1099-misc" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + body: _body, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099MiscSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Mails a 1099-MISC document. + * + * @param {Abound.types.DocumentId} documentId + * @param {Abound.Form1099MiscMailingRequest} request + * @param {Form1099Misc.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Misc.mail("documentId_sampleGNPOKNmIgF", { + * body: { + * to: { + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * name: "Ada Lovelace" + * }, + * from: { + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * name: "Hooli" + * } + * } + * }) + */ + public async mail( + documentId: Abound.types.DocumentId, + request: Abound.Form1099MiscMailingRequest, + requestOptions?: Form1099Misc.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey, body: _body } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-misc/${encodeURIComponent(documentId)}/mail` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + body: _body, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.MailingSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Files a 1099-MISC document. + * + * @param {Abound.types.DocumentId} documentId + * @param {Abound.Form1099MiscFileRequest} request + * @param {Form1099Misc.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Misc.file("documentId_sampleGNPOKNmIgF") + */ + public async file( + documentId: Abound.types.DocumentId, + request: Abound.Form1099MiscFileRequest = {}, + requestOptions?: Form1099Misc.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-misc/${encodeURIComponent(documentId)}/file` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099MiscSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Files a new corrected 1099-MISC and relates it to the original document. A 1099-MISC can be corrected only after it has reached the `FILED` status. Automatically handles both one-transaction and two-transaction corrections. + * + * @param {Abound.types.DocumentId} documentId + * @param {Abound.Form1099MiscCorrectRequest} request + * @param {Form1099Misc.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Misc.correct("documentId_sampleGNPOKNmIgF", { + * body: { + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * cropInsuranceProceeds: 97109, + * excessGoldenParachutePayments: 97109, + * federalIncomeTaxWithheld: 0, + * fishPurchasedForResale: 97109, + * fishingBoatProceeds: 97109, + * grossProceedsPaidToAnAttorney: 97109, + * hasDirectSalesOver5000: false, + * hasFatcaFilingRequirement: true, + * medicalAndHealthCarePayments: 97109, + * nonqualifiedDeferredCompensation: 97109, + * substitutePaymentsInLieuOfDividendsOrInterest: 97109, + * otherIncome: 97109, + * rents: 10000, + * royalties: 97109, + * section409ADeferrals: 97109, + * accountNumber: "A00AskD1ZTO4YB8oBHav", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateIncome: 258434 + * }] + * } + * } + * }) + */ + public async correct( + documentId: Abound.types.DocumentId, + request: Abound.Form1099MiscCorrectRequest, + requestOptions?: Form1099Misc.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey, body: _body } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-misc/${encodeURIComponent(documentId)}/correct` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + body: _body, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099MiscSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Files a new voided 1099-MISC and relates it to the original document. A 1099-MISC can be voided only after it has reached the `FILED` status. + * + * @param {Abound.types.DocumentId} documentId + * @param {Abound.Form1099MiscVoidRequest} request + * @param {Form1099Misc.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Misc.void("documentId_sampleGNPOKNmIgF") + */ + public async void( + documentId: Abound.types.DocumentId, + request: Abound.Form1099MiscVoidRequest = {}, + requestOptions?: Form1099Misc.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-misc/${encodeURIComponent(documentId)}/void` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099MiscSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Retrieves the details of an existing 1099-MISC document. + * + * @param {Abound.types.DocumentId} documentId + * @param {Form1099Misc.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Misc.retrieve("documentId_sampleGNPOKNmIgF") + */ + public async retrieve( + documentId: Abound.types.DocumentId, + requestOptions?: Form1099Misc.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-misc/${encodeURIComponent(documentId)}` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099MiscSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Deletes a 1099-MISC document. Once an action (`/file`, `/correct`, `/void`) has been executed on a 1099-MISC, it cannot be deleted. + * + * @param {Abound.types.DocumentId} documentId + * @param {Form1099Misc.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Misc.delete("documentId_sampleGNPOKNmIgF") + */ + public async delete( + documentId: Abound.types.DocumentId, + requestOptions?: Form1099Misc.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-misc/${encodeURIComponent(documentId)}` + ), + method: "DELETE", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.types.OkSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.sampleKey)}`; + } +} diff --git a/src/api/resources/form1099Misc/client/index.ts b/src/api/resources/form1099Misc/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/form1099Misc/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/form1099Misc/client/requests/Form1099MiscCorrectRequest.ts b/src/api/resources/form1099Misc/client/requests/Form1099MiscCorrectRequest.ts new file mode 100644 index 00000000..5b00f5c0 --- /dev/null +++ b/src/api/resources/form1099Misc/client/requests/Form1099MiscCorrectRequest.ts @@ -0,0 +1,49 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * { + * body: { + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * cropInsuranceProceeds: 97109, + * excessGoldenParachutePayments: 97109, + * federalIncomeTaxWithheld: 0, + * fishPurchasedForResale: 97109, + * fishingBoatProceeds: 97109, + * grossProceedsPaidToAnAttorney: 97109, + * hasDirectSalesOver5000: false, + * hasFatcaFilingRequirement: true, + * medicalAndHealthCarePayments: 97109, + * nonqualifiedDeferredCompensation: 97109, + * substitutePaymentsInLieuOfDividendsOrInterest: 97109, + * otherIncome: 97109, + * rents: 10000, + * royalties: 97109, + * section409ADeferrals: 97109, + * accountNumber: "A00AskD1ZTO4YB8oBHav", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateIncome: 258434 + * }] + * } + * } + * } + */ +export interface Form1099MiscCorrectRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; + body: Abound.Form1099MiscCorrectRequestSchema; +} diff --git a/src/api/resources/form1099Misc/client/requests/Form1099MiscFileRequest.ts b/src/api/resources/form1099Misc/client/requests/Form1099MiscFileRequest.ts new file mode 100644 index 00000000..32e369bd --- /dev/null +++ b/src/api/resources/form1099Misc/client/requests/Form1099MiscFileRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * {} + */ +export interface Form1099MiscFileRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; +} diff --git a/src/api/resources/form1099Misc/client/requests/Form1099MiscListRequest.ts b/src/api/resources/form1099Misc/client/requests/Form1099MiscListRequest.ts new file mode 100644 index 00000000..d6e809ca --- /dev/null +++ b/src/api/resources/form1099Misc/client/requests/Form1099MiscListRequest.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * {} + */ +export interface Form1099MiscListRequest { + page?: Abound.types.Page; + filingYear?: Abound.types.FilingYear; + payeeTinFingerprint?: Abound.types.PayeeTinFingerprint; + payerTinFingerprint?: Abound.types.PayerTinFingerprint; + status?: Abound.types.Form1099StatusEnum; + userId?: Abound.types.UserId; +} diff --git a/src/api/resources/form1099Misc/client/requests/Form1099MiscMailingRequest.ts b/src/api/resources/form1099Misc/client/requests/Form1099MiscMailingRequest.ts new file mode 100644 index 00000000..3e100b73 --- /dev/null +++ b/src/api/resources/form1099Misc/client/requests/Form1099MiscMailingRequest.ts @@ -0,0 +1,35 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * { + * body: { + * to: { + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * name: "Ada Lovelace" + * }, + * from: { + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * name: "Hooli" + * } + * } + * } + */ +export interface Form1099MiscMailingRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; + body: Abound.MailingRequestSchema; +} diff --git a/src/api/resources/form1099Misc/client/requests/Form1099MiscRequest.ts b/src/api/resources/form1099Misc/client/requests/Form1099MiscRequest.ts new file mode 100644 index 00000000..a52db0d0 --- /dev/null +++ b/src/api/resources/form1099Misc/client/requests/Form1099MiscRequest.ts @@ -0,0 +1,62 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * { + * body: { + * filingYear: 2023, + * payer: { + * name: "Hooli", + * tin: "111111111", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096" + * }, + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * cropInsuranceProceeds: 97109, + * excessGoldenParachutePayments: 97109, + * federalIncomeTaxWithheld: 0, + * fishPurchasedForResale: 97109, + * fishingBoatProceeds: 97109, + * grossProceedsPaidToAnAttorney: 97109, + * hasDirectSalesOver5000: false, + * hasFatcaFilingRequirement: true, + * medicalAndHealthCarePayments: 97109, + * nonqualifiedDeferredCompensation: 97109, + * substitutePaymentsInLieuOfDividendsOrInterest: 97109, + * otherIncome: 97109, + * rents: 97109, + * royalties: 97109, + * section409ADeferrals: 97109, + * accountNumber: "A00AskD1ZTO4YB8oBHav", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateIncome: 345543, + * stateTaxWithheld: 0 + * }] + * } + * } + * } + */ +export interface Form1099MiscRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; + body: Abound.Form1099MiscRequestSchema; +} diff --git a/src/api/resources/form1099Misc/client/requests/Form1099MiscVoidRequest.ts b/src/api/resources/form1099Misc/client/requests/Form1099MiscVoidRequest.ts new file mode 100644 index 00000000..dd50616b --- /dev/null +++ b/src/api/resources/form1099Misc/client/requests/Form1099MiscVoidRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * {} + */ +export interface Form1099MiscVoidRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; +} diff --git a/src/api/resources/form1099Misc/client/requests/index.ts b/src/api/resources/form1099Misc/client/requests/index.ts new file mode 100644 index 00000000..929d281b --- /dev/null +++ b/src/api/resources/form1099Misc/client/requests/index.ts @@ -0,0 +1,6 @@ +export { type Form1099MiscListRequest } from "./Form1099MiscListRequest"; +export { type Form1099MiscRequest } from "./Form1099MiscRequest"; +export { type Form1099MiscMailingRequest } from "./Form1099MiscMailingRequest"; +export { type Form1099MiscFileRequest } from "./Form1099MiscFileRequest"; +export { type Form1099MiscCorrectRequest } from "./Form1099MiscCorrectRequest"; +export { type Form1099MiscVoidRequest } from "./Form1099MiscVoidRequest"; diff --git a/src/api/resources/form1099Misc/index.ts b/src/api/resources/form1099Misc/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/api/resources/form1099Misc/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/form1099Misc/types/Form1099MiscCorrectRequestSchema.ts b/src/api/resources/form1099Misc/types/Form1099MiscCorrectRequestSchema.ts new file mode 100644 index 00000000..533d977b --- /dev/null +++ b/src/api/resources/form1099Misc/types/Form1099MiscCorrectRequestSchema.ts @@ -0,0 +1,46 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * cropInsuranceProceeds: 97109, + * excessGoldenParachutePayments: 97109, + * federalIncomeTaxWithheld: 0, + * fishPurchasedForResale: 97109, + * fishingBoatProceeds: 97109, + * grossProceedsPaidToAnAttorney: 97109, + * hasDirectSalesOver5000: false, + * hasFatcaFilingRequirement: true, + * medicalAndHealthCarePayments: 97109, + * nonqualifiedDeferredCompensation: 97109, + * substitutePaymentsInLieuOfDividendsOrInterest: 97109, + * otherIncome: 97109, + * rents: 10000, + * royalties: 97109, + * section409ADeferrals: 97109, + * accountNumber: "A00AskD1ZTO4YB8oBHav", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateIncome: 258434 + * }] + * } + * } + */ +export interface Form1099MiscCorrectRequestSchema extends Abound.types.Form1099BaseCorrectRequestSchema { + formFields: Abound.Form1099MiscFormFieldsRequestSchema; +} diff --git a/src/api/resources/form1099Misc/types/Form1099MiscFormFieldsRequestSchema.ts b/src/api/resources/form1099Misc/types/Form1099MiscFormFieldsRequestSchema.ts new file mode 100644 index 00000000..5775ade3 --- /dev/null +++ b/src/api/resources/form1099Misc/types/Form1099MiscFormFieldsRequestSchema.ts @@ -0,0 +1,45 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * The 1099-MISC form fields. + */ +export interface Form1099MiscFormFieldsRequestSchema { + /** If the FATCA filing requirement box is checked, the payer is reporting on this Form 1099 to satisfy its account reporting requirement under chapter 4 of the Internal Revenue Code. You may also have a filing requirement. See the Instructions for Form 8938. */ + hasFatcaFilingRequirement?: boolean; + /** May show an account or other unique number the payer assigned to distinguish your account. This field is also required if `fatca` is `true`. Abound will auto-generated this field if not provided. */ + accountNumber?: string; + /** Report rents from real estate on Schedule E (Form 1040). However, report rents on Schedule C (Form 1040) if you provided significant services to the tenant, sold real estate as a business, or rented personal property as a business. Value must be in cents. */ + rents?: number; + /** Report royalties from oil, gas, or mineral properties; copyrights; and patents on Schedule E (Form 1040). However, report payments for a working interest as explained in the Schedule E (Form 1040) instructions. For royalties on timber, coal, and iron ore, see Pub. 544. Value must be in cents. */ + royalties?: number; + /** Generally, report this amount on the “Other income” line of Schedule 1 (Form 1040) and identify the payment. The amount shown may be payments received as the beneficiary of a deceased employee, prizes, awards, taxable damages, Indian gaming profits, or other taxable income. See Pub. 525. If it is trade or business income, report this amount on Schedule C or F (Form 1040). Value must be in cents. */ + otherIncome?: number; + /** Shows backup withholding or withholding on Indian gaming profits.Generally, a payer must backup withhold if you did not furnish your TIN. See Form W-9 and Pub. 505 for more information. Report this amount on your income tax return as tax withheld. Abound does not currently support `federalIncomeTaxWithheld` reporting on the 1099-MISC, please contact us for more information. */ + federalIncomeTaxWithheld?: number; + /** Shows the amount paid to you as a fishing boat crew member by the operator, who considers you to be self-employed. Self-employed individuals must report this amount on Schedule C (Form 1040). See Pub. 334. Value must be in cents. */ + fishingBoatProceeds?: number; + /** For individuals, report on Schedule C (Form 1040). Value must be in cents. Value must be in cents. */ + medicalAndHealthCarePayments?: number; + /** If checked, consumer products totaling $5,000 or more were sold to you for resale, on a buy-sell, a deposit-commission, or other basis. Generally, report any income from your sale of these products on Schedule C (Form 1040). */ + hasDirectSalesOver5000?: boolean; + /** Shows substitute payments in lieu of dividends or tax-exempt interest received by your broker on your behalf as a result of a loan of your securities. Report on the “Other income” line of Schedule 1 (Form 1040). Value must be in cents. */ + substitutePaymentsInLieuOfDividendsOrInterest?: number; + /** Report this amount on Schedule F (Form 1040). Value must be in cents. */ + cropInsuranceProceeds?: number; + /** Shows gross proceeds paid to an attorney in connection with legal services. Report only the taxable part as income on your return. Value must be in cents. */ + grossProceedsPaidToAnAttorney?: number; + /** Shows the amount of cash you received for the sale of fish if you are in the trade or business of catching fish. Value must be in cents. */ + fishPurchasedForResale?: number; + /** May show current year deferrals as a nonemployee under a nonqualified deferred compensation (NQDC) plan that is subject to the requirements of section 409A plus any earnings on current and prior year deferrals. Value must be in cents. */ + section409ADeferrals?: number; + /** Shows your total compensation of excess golden parachute payments subject to a 20% excise tax. See your tax return instructions for where to report. Value must be in cents. */ + excessGoldenParachutePayments?: number; + /** Shows income as a nonemployee under an NQDC plan that does not meet the requirements of section 409A. Any amount included in box 12 that is currently taxable is also included in this box. Report this amount as income on your tax return. This income is also subject to a substantial additional tax to be reported on Form 1040, 1040-SR, or 1040-NR. See the instructions for your tax return. Value must be in cents. */ + nonqualifiedDeferredCompensation?: number; + /** An array that contains up to two state tax information objects. Abound currently only supports one state tax information object in this array. Abound does not currently support state-level tax withholding reporting on the 1099-MISC, please contact us for more information. */ + stateTaxInfo: Abound.types.Form1099StateTaxInfoWithStateIncomeSchema[]; +} diff --git a/src/api/resources/form1099Misc/types/Form1099MiscFormFieldsSchema.ts b/src/api/resources/form1099Misc/types/Form1099MiscFormFieldsSchema.ts new file mode 100644 index 00000000..a10e7883 --- /dev/null +++ b/src/api/resources/form1099Misc/types/Form1099MiscFormFieldsSchema.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +export interface Form1099MiscFormFieldsSchema + extends Abound.types.Form1099FormFieldsBaseSchema, + Abound.Form1099MiscFormFieldsRequestSchema {} diff --git a/src/api/resources/form1099Misc/types/Form1099MiscRequestSchema.ts b/src/api/resources/form1099Misc/types/Form1099MiscRequestSchema.ts new file mode 100644 index 00000000..2288a8bf --- /dev/null +++ b/src/api/resources/form1099Misc/types/Form1099MiscRequestSchema.ts @@ -0,0 +1,59 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * filingYear: 2023, + * payer: { + * name: "Hooli", + * tin: "111111111", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096" + * }, + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * cropInsuranceProceeds: 97109, + * excessGoldenParachutePayments: 97109, + * federalIncomeTaxWithheld: 0, + * fishPurchasedForResale: 97109, + * fishingBoatProceeds: 97109, + * grossProceedsPaidToAnAttorney: 97109, + * hasDirectSalesOver5000: false, + * hasFatcaFilingRequirement: true, + * medicalAndHealthCarePayments: 97109, + * nonqualifiedDeferredCompensation: 97109, + * substitutePaymentsInLieuOfDividendsOrInterest: 97109, + * otherIncome: 97109, + * rents: 97109, + * royalties: 97109, + * section409ADeferrals: 97109, + * accountNumber: "A00AskD1ZTO4YB8oBHav", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateIncome: 345543, + * stateTaxWithheld: 0 + * }] + * } + * } + */ +export interface Form1099MiscRequestSchema extends Abound.types.Form1099BaseRequestSchema { + formFields: Abound.Form1099MiscFormFieldsRequestSchema; +} diff --git a/src/api/resources/form1099Misc/types/Form1099MiscSchema.ts b/src/api/resources/form1099Misc/types/Form1099MiscSchema.ts new file mode 100644 index 00000000..e776dc06 --- /dev/null +++ b/src/api/resources/form1099Misc/types/Form1099MiscSchema.ts @@ -0,0 +1,268 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * id: "documentId_sampleGNPOKNmIgF", + * formFields: { + * isCorrected: false, + * isVoid: false, + * cropInsuranceProceeds: 97109, + * excessGoldenParachutePayments: 97109, + * federalIncomeTaxWithheld: 0, + * fishPurchasedForResale: 97109, + * fishingBoatProceeds: 97109, + * grossProceedsPaidToAnAttorney: 97109, + * hasDirectSalesOver5000: false, + * hasFatcaFilingRequirement: true, + * medicalAndHealthCarePayments: 97109, + * nonqualifiedDeferredCompensation: 97109, + * substitutePaymentsInLieuOfDividendsOrInterest: 97109, + * otherIncome: 97109, + * rents: 97109, + * royalties: 97109, + * section409ADeferrals: 97109, + * accountNumber: "A00AskD1ZTO4YB8oBHav", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateIncome: 345543, + * stateTaxWithheld: 0 + * }] + * }, + * filingYear: 2023, + * createdAt: "2024-01-01T00:00:00.000Z", + * status: Abound.types.Form1099StatusEnum.Created, + * payer: { + * name: "Hooli", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096", + * tin: "*******11", + * tinType: Abound.types.TinTypeEnum.Business, + * tinFingerprint: "tinFingerprint_sample847jI1LwxF", + * tinVerificationId: "tinVerificationId_sample1b0E6efa89", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payee: { + * name: "Ada Lovelace", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * tin: "*******00", + * tinType: Abound.types.TinTypeEnum.Individual, + * tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + * tinVerificationId: "tinVerificationId_sample41SD71AV8f", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-COPY-C.pdf", + * payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-COPY-B.pdf" + * } + * + * @example + * { + * id: "documentId_sampleGNPOKNmIgF", + * formFields: { + * isCorrected: false, + * isVoid: false, + * cropInsuranceProceeds: 97109, + * excessGoldenParachutePayments: 97109, + * federalIncomeTaxWithheld: 0, + * fishPurchasedForResale: 97109, + * fishingBoatProceeds: 97109, + * grossProceedsPaidToAnAttorney: 97109, + * hasDirectSalesOver5000: false, + * hasFatcaFilingRequirement: true, + * medicalAndHealthCarePayments: 97109, + * nonqualifiedDeferredCompensation: 97109, + * substitutePaymentsInLieuOfDividendsOrInterest: 97109, + * otherIncome: 97109, + * rents: 97109, + * royalties: 97109, + * section409ADeferrals: 97109, + * accountNumber: "A00AskD1ZTO4YB8oBHav", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateIncome: 345543, + * stateTaxWithheld: 0 + * }] + * }, + * filingYear: 2023, + * createdAt: "2024-01-01T00:00:00.000Z", + * status: Abound.types.Form1099StatusEnum.Filed, + * payer: { + * name: "Hooli", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096", + * tin: "*******11", + * tinType: Abound.types.TinTypeEnum.Business, + * tinFingerprint: "tinFingerprint_sample847jI1LwxF", + * tinVerificationId: "tinVerificationId_sample1b0E6efa89", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payee: { + * name: "Ada Lovelace", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * tin: "*******00", + * tinType: Abound.types.TinTypeEnum.Individual, + * tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + * tinVerificationId: "tinVerificationId_sample41SD71AV8f", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-COPY-C.pdf", + * payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-COPY-B.pdf" + * } + * + * @example + * { + * id: "documentId_sampleaTA4jltVVx", + * correctedFromId: "documentId_sampleGNPOKNmIgF", + * formFields: { + * isCorrected: true, + * isVoid: false, + * cropInsuranceProceeds: 97109, + * excessGoldenParachutePayments: 97109, + * federalIncomeTaxWithheld: 0, + * fishPurchasedForResale: 97109, + * fishingBoatProceeds: 97109, + * grossProceedsPaidToAnAttorney: 97109, + * hasDirectSalesOver5000: false, + * hasFatcaFilingRequirement: true, + * medicalAndHealthCarePayments: 97109, + * nonqualifiedDeferredCompensation: 97109, + * substitutePaymentsInLieuOfDividendsOrInterest: 97109, + * otherIncome: 97109, + * rents: 10000, + * royalties: 97109, + * section409ADeferrals: 97109, + * accountNumber: "A00AskD1ZTO4YB8oBHav", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateIncome: 258434, + * stateTaxWithheld: 0 + * }] + * }, + * filingYear: 2023, + * createdAt: "2024-01-01T00:00:00.000Z", + * status: Abound.types.Form1099StatusEnum.Filed, + * payer: { + * name: "Hooli", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096", + * tin: "*******11", + * tinType: Abound.types.TinTypeEnum.Business, + * tinFingerprint: "tinFingerprint_sample847jI1LwxF", + * tinVerificationId: "tinVerificationId_sample1b0E6efa89", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payee: { + * name: "Ada Lovelace", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * tin: "*******00", + * tinType: Abound.types.TinTypeEnum.Individual, + * tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + * tinVerificationId: "tinVerificationId_sample41SD71AV8f", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-CORRECTED-COPY-C.pdf", + * payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-CORRECTED-COPY-B.pdf" + * } + * + * @example + * { + * id: "documentId_sampleStGnVcbd57", + * voidedFromId: "documentId_sampleGNPOKNmIgF", + * formFields: { + * isCorrected: false, + * isVoid: true, + * cropInsuranceProceeds: 97109, + * excessGoldenParachutePayments: 97109, + * federalIncomeTaxWithheld: 0, + * fishPurchasedForResale: 97109, + * fishingBoatProceeds: 97109, + * grossProceedsPaidToAnAttorney: 97109, + * hasDirectSalesOver5000: false, + * hasFatcaFilingRequirement: true, + * medicalAndHealthCarePayments: 97109, + * nonqualifiedDeferredCompensation: 97109, + * substitutePaymentsInLieuOfDividendsOrInterest: 97109, + * otherIncome: 97109, + * rents: 97109, + * royalties: 97109, + * section409ADeferrals: 97109, + * accountNumber: "A00AskD1ZTO4YB8oBHav", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateIncome: 345543, + * stateTaxWithheld: 0 + * }] + * }, + * filingYear: 2023, + * createdAt: "2024-01-01T00:00:00.000Z", + * status: Abound.types.Form1099StatusEnum.Filed, + * payer: { + * name: "Hooli", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096", + * tin: "*******11", + * tinType: Abound.types.TinTypeEnum.Business, + * tinFingerprint: "tinFingerprint_sample847jI1LwxF", + * tinVerificationId: "tinVerificationId_sample1b0E6efa89", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payee: { + * name: "Ada Lovelace", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * tin: "*******00", + * tinType: Abound.types.TinTypeEnum.Individual, + * tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + * tinVerificationId: "tinVerificationId_sample41SD71AV8f", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-VOID-COPY-C.pdf", + * payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-VOID-COPY-B.pdf" + * } + */ +export interface Form1099MiscSchema extends Abound.types.Form1099BaseSchema { + formFields: Abound.Form1099MiscFormFieldsSchema; +} diff --git a/src/api/resources/form1099Misc/types/index.ts b/src/api/resources/form1099Misc/types/index.ts new file mode 100644 index 00000000..31e14c3f --- /dev/null +++ b/src/api/resources/form1099Misc/types/index.ts @@ -0,0 +1,5 @@ +export * from "./Form1099MiscFormFieldsRequestSchema"; +export * from "./Form1099MiscRequestSchema"; +export * from "./Form1099MiscCorrectRequestSchema"; +export * from "./Form1099MiscFormFieldsSchema"; +export * from "./Form1099MiscSchema"; diff --git a/src/api/resources/form1099Nec/client/Client.ts b/src/api/resources/form1099Nec/client/Client.ts new file mode 100644 index 00000000..ffaad56c --- /dev/null +++ b/src/api/resources/form1099Nec/client/Client.ts @@ -0,0 +1,816 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Abound from "../../../index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace Form1099Nec { + interface Options { + environment?: core.Supplier; + sampleKey: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + } +} + +export class Form1099Nec { + constructor(protected readonly _options: Form1099Nec.Options) {} + + /** + * Returns a list of 1099-NEC documents. + * + * @param {Abound.Form1099NecListRequest} request + * @param {Form1099Nec.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Nec.list() + */ + public async list( + request: Abound.Form1099NecListRequest = {}, + requestOptions?: Form1099Nec.RequestOptions + ): Promise { + const { page, filingYear, payeeTinFingerprint, payerTinFingerprint, status, userId } = request; + const _queryParams: Record = {}; + if (page != null) { + _queryParams["page"] = page.toString(); + } + + if (filingYear != null) { + _queryParams["filingYear"] = filingYear.toString(); + } + + if (payeeTinFingerprint != null) { + _queryParams["payeeTinFingerprint"] = payeeTinFingerprint; + } + + if (payerTinFingerprint != null) { + _queryParams["payerTinFingerprint"] = payerTinFingerprint; + } + + if (status != null) { + _queryParams["status"] = status; + } + + if (userId != null) { + _queryParams["userId"] = userId; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + "/v4/documents/1099-nec" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099NecSchema[]; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Creates a 1099-NEC document and subsequently kicks off a TIN Verification, if the name and TIN combo has not been used before. + * + * @param {Abound.Form1099NecRequest} request + * @param {Form1099Nec.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Nec.create({ + * body: { + * filingYear: 2023, + * payer: { + * name: "Hooli", + * tin: "111111111", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096" + * }, + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * nonemployeeCompensation: 23423, + * hasDirectSalesOver5000: false, + * federalIncomeTaxWithheld: 0, + * accountNumber: "A0NEqtav7n0sBGoq88w0", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateIncome: 23423, + * stateTaxWithheld: 0 + * }] + * } + * } + * }) + */ + public async create( + request: Abound.Form1099NecRequest, + requestOptions?: Form1099Nec.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey, body: _body } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + "/v4/documents/1099-nec" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + body: _body, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099NecSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Mails a 1099-NEC document. + * + * @param {Abound.types.DocumentId} documentId + * @param {Abound.Form1099NecMailingRequest} request + * @param {Form1099Nec.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Nec.mail("documentId_samplegU0eR8oc8a", { + * body: { + * to: { + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * name: "Ada Lovelace" + * }, + * from: { + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * name: "Hooli" + * } + * } + * }) + */ + public async mail( + documentId: Abound.types.DocumentId, + request: Abound.Form1099NecMailingRequest, + requestOptions?: Form1099Nec.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey, body: _body } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-nec/${encodeURIComponent(documentId)}/mail` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + body: _body, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.MailingSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Files a 1099-NEC document. + * + * @param {Abound.types.DocumentId} documentId + * @param {Abound.Form1099NecFileRequest} request + * @param {Form1099Nec.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Nec.file("documentId_samplegU0eR8oc8a") + */ + public async file( + documentId: Abound.types.DocumentId, + request: Abound.Form1099NecFileRequest = {}, + requestOptions?: Form1099Nec.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-nec/${encodeURIComponent(documentId)}/file` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099NecSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Files a new corrected 1099-NEC and relates it to the original document. A 1099-NEC can be corrected only after it has reached the `FILED` status. Automatically handles both one-transaction and two-transaction corrections. + * + * @param {Abound.types.DocumentId} documentId + * @param {Abound.Form1099NecCorrectRequest} request + * @param {Form1099Nec.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Nec.correct("documentId_samplegU0eR8oc8a", { + * body: { + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * nonemployeeCompensation: 10000, + * accountNumber: "A0NEqtav7n0sBGoq88w0", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateIncome: 10000 + * }] + * } + * } + * }) + */ + public async correct( + documentId: Abound.types.DocumentId, + request: Abound.Form1099NecCorrectRequest, + requestOptions?: Form1099Nec.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey, body: _body } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-nec/${encodeURIComponent(documentId)}/correct` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + body: _body, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099NecSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Files a new voided 1099-NEC and relates it to the original document. A 1099-NEC can be voided only after it has reached the `FILED` status. + * + * @param {Abound.types.DocumentId} documentId + * @param {Abound.Form1099NecVoidRequest} request + * @param {Form1099Nec.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Nec.void("documentId_samplegU0eR8oc8a") + */ + public async void( + documentId: Abound.types.DocumentId, + request: Abound.Form1099NecVoidRequest = {}, + requestOptions?: Form1099Nec.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-nec/${encodeURIComponent(documentId)}/void` + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099NecSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Retrieves the details of an existing 1099-NEC document. + * + * @param {Abound.types.DocumentId} documentId + * @param {Form1099Nec.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Nec.retrieve("documentId_samplegU0eR8oc8a") + */ + public async retrieve( + documentId: Abound.types.DocumentId, + requestOptions?: Form1099Nec.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-nec/${encodeURIComponent(documentId)}` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.Form1099NecSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Deletes a 1099-NEC document. Once an action (`/file`, `/correct`, `/void`) has been executed on a 1099-NEC, it cannot be deleted. + * + * @param {Abound.types.DocumentId} documentId + * @param {Form1099Nec.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.form1099Nec.delete("documentId_samplegU0eR8oc8a") + */ + public async delete( + documentId: Abound.types.DocumentId, + requestOptions?: Form1099Nec.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/1099-nec/${encodeURIComponent(documentId)}` + ), + method: "DELETE", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.types.OkSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.sampleKey)}`; + } +} diff --git a/src/api/resources/form1099Nec/client/index.ts b/src/api/resources/form1099Nec/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/form1099Nec/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/form1099Nec/client/requests/Form1099NecCorrectRequest.ts b/src/api/resources/form1099Nec/client/requests/Form1099NecCorrectRequest.ts new file mode 100644 index 00000000..cd7a3e71 --- /dev/null +++ b/src/api/resources/form1099Nec/client/requests/Form1099NecCorrectRequest.ts @@ -0,0 +1,35 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * { + * body: { + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * nonemployeeCompensation: 10000, + * accountNumber: "A0NEqtav7n0sBGoq88w0", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateIncome: 10000 + * }] + * } + * } + * } + */ +export interface Form1099NecCorrectRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; + body: Abound.Form1099NecCorrectRequestSchema; +} diff --git a/src/api/resources/form1099Nec/client/requests/Form1099NecFileRequest.ts b/src/api/resources/form1099Nec/client/requests/Form1099NecFileRequest.ts new file mode 100644 index 00000000..f710cd2d --- /dev/null +++ b/src/api/resources/form1099Nec/client/requests/Form1099NecFileRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * {} + */ +export interface Form1099NecFileRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; +} diff --git a/src/api/resources/form1099Nec/client/requests/Form1099NecListRequest.ts b/src/api/resources/form1099Nec/client/requests/Form1099NecListRequest.ts new file mode 100644 index 00000000..bbfe27df --- /dev/null +++ b/src/api/resources/form1099Nec/client/requests/Form1099NecListRequest.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * {} + */ +export interface Form1099NecListRequest { + page?: Abound.types.Page; + filingYear?: Abound.types.FilingYear; + payeeTinFingerprint?: Abound.types.PayeeTinFingerprint; + payerTinFingerprint?: Abound.types.PayerTinFingerprint; + status?: Abound.types.Form1099StatusEnum; + userId?: Abound.types.UserId; +} diff --git a/src/api/resources/form1099Nec/client/requests/Form1099NecMailingRequest.ts b/src/api/resources/form1099Nec/client/requests/Form1099NecMailingRequest.ts new file mode 100644 index 00000000..fdd3e60b --- /dev/null +++ b/src/api/resources/form1099Nec/client/requests/Form1099NecMailingRequest.ts @@ -0,0 +1,35 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * { + * body: { + * to: { + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * name: "Ada Lovelace" + * }, + * from: { + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * name: "Hooli" + * } + * } + * } + */ +export interface Form1099NecMailingRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; + body: Abound.MailingRequestSchema; +} diff --git a/src/api/resources/form1099Nec/client/requests/Form1099NecRequest.ts b/src/api/resources/form1099Nec/client/requests/Form1099NecRequest.ts new file mode 100644 index 00000000..4ad5e1df --- /dev/null +++ b/src/api/resources/form1099Nec/client/requests/Form1099NecRequest.ts @@ -0,0 +1,50 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * { + * body: { + * filingYear: 2023, + * payer: { + * name: "Hooli", + * tin: "111111111", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096" + * }, + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * nonemployeeCompensation: 23423, + * hasDirectSalesOver5000: false, + * federalIncomeTaxWithheld: 0, + * accountNumber: "A0NEqtav7n0sBGoq88w0", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateIncome: 23423, + * stateTaxWithheld: 0 + * }] + * } + * } + * } + */ +export interface Form1099NecRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; + body: Abound.Form1099NecRequestSchema; +} diff --git a/src/api/resources/form1099Nec/client/requests/Form1099NecVoidRequest.ts b/src/api/resources/form1099Nec/client/requests/Form1099NecVoidRequest.ts new file mode 100644 index 00000000..8b9d3c60 --- /dev/null +++ b/src/api/resources/form1099Nec/client/requests/Form1099NecVoidRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * {} + */ +export interface Form1099NecVoidRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; +} diff --git a/src/api/resources/form1099Nec/client/requests/index.ts b/src/api/resources/form1099Nec/client/requests/index.ts new file mode 100644 index 00000000..1eedf771 --- /dev/null +++ b/src/api/resources/form1099Nec/client/requests/index.ts @@ -0,0 +1,6 @@ +export { type Form1099NecListRequest } from "./Form1099NecListRequest"; +export { type Form1099NecRequest } from "./Form1099NecRequest"; +export { type Form1099NecMailingRequest } from "./Form1099NecMailingRequest"; +export { type Form1099NecFileRequest } from "./Form1099NecFileRequest"; +export { type Form1099NecCorrectRequest } from "./Form1099NecCorrectRequest"; +export { type Form1099NecVoidRequest } from "./Form1099NecVoidRequest"; diff --git a/src/api/resources/form1099Nec/index.ts b/src/api/resources/form1099Nec/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/api/resources/form1099Nec/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/form1099Nec/types/Form1099NecCorrectRequestSchema.ts b/src/api/resources/form1099Nec/types/Form1099NecCorrectRequestSchema.ts new file mode 100644 index 00000000..c13d12d3 --- /dev/null +++ b/src/api/resources/form1099Nec/types/Form1099NecCorrectRequestSchema.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * nonemployeeCompensation: 10000, + * accountNumber: "A0NEqtav7n0sBGoq88w0", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateIncome: 10000 + * }] + * } + * } + */ +export interface Form1099NecCorrectRequestSchema extends Abound.types.Form1099BaseCorrectRequestSchema { + formFields: Abound.Form1099NecFormFieldsRequestSchema; +} diff --git a/src/api/resources/form1099Nec/types/Form1099NecFormFieldsRequestSchema.ts b/src/api/resources/form1099Nec/types/Form1099NecFormFieldsRequestSchema.ts new file mode 100644 index 00000000..61ce87c0 --- /dev/null +++ b/src/api/resources/form1099Nec/types/Form1099NecFormFieldsRequestSchema.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * The 1099-NEC form fields. + */ +export interface Form1099NecFormFieldsRequestSchema { + /** If the payer assigns the contractor a unique number for its records, enter the account number in this box. If not, leave the box blank. */ + accountNumber?: string; + /** The total amount remitted by payer to recipient during the year. Value must be in cents. */ + nonemployeeCompensation?: number; + /** If `true`, consumer products totaling $5,000 or more were sold to recipient for resale, on a buy-sell, a deposit-commission, or other basis. */ + hasDirectSalesOver5000?: boolean; + /** The federal income tax withheld. A payer must backup withhold on certain payments if recipient did not provide a TIN to the payer. Value must be in cents. Abound does not currently support `federalIncomeTaxWithheld` reporting on the 1099-NEC, please contact us for more information. */ + federalIncomeTaxWithheld?: number; + /** An array that contains up to two state tax information objects. Abound currently only supports one state tax information object in this array. Abound does not currently support state-level tax withholding reporting on the 1099-NEC, please contact us for more information. */ + stateTaxInfo: Abound.types.Form1099StateTaxInfoWithStateIncomeSchema[]; +} diff --git a/src/api/resources/form1099Nec/types/Form1099NecFormFieldsSchema.ts b/src/api/resources/form1099Nec/types/Form1099NecFormFieldsSchema.ts new file mode 100644 index 00000000..c5ae9f19 --- /dev/null +++ b/src/api/resources/form1099Nec/types/Form1099NecFormFieldsSchema.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +export interface Form1099NecFormFieldsSchema + extends Abound.types.Form1099FormFieldsBaseSchema, + Abound.Form1099NecFormFieldsRequestSchema {} diff --git a/src/api/resources/form1099Nec/types/Form1099NecRequestSchema.ts b/src/api/resources/form1099Nec/types/Form1099NecRequestSchema.ts new file mode 100644 index 00000000..08344b98 --- /dev/null +++ b/src/api/resources/form1099Nec/types/Form1099NecRequestSchema.ts @@ -0,0 +1,47 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * filingYear: 2023, + * payer: { + * name: "Hooli", + * tin: "111111111", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096" + * }, + * payee: { + * name: "Ada Lovelace", + * tin: "000000000", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US" + * }, + * formFields: { + * nonemployeeCompensation: 23423, + * hasDirectSalesOver5000: false, + * federalIncomeTaxWithheld: 0, + * accountNumber: "A0NEqtav7n0sBGoq88w0", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateIncome: 23423, + * stateTaxWithheld: 0 + * }] + * } + * } + */ +export interface Form1099NecRequestSchema extends Abound.types.Form1099BaseRequestSchema { + formFields: Abound.Form1099NecFormFieldsRequestSchema; +} diff --git a/src/api/resources/form1099Nec/types/Form1099NecSchema.ts b/src/api/resources/form1099Nec/types/Form1099NecSchema.ts new file mode 100644 index 00000000..cd6ed125 --- /dev/null +++ b/src/api/resources/form1099Nec/types/Form1099NecSchema.ts @@ -0,0 +1,220 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * id: "documentId_samplegU0eR8oc8a", + * formFields: { + * isCorrected: false, + * isVoid: false, + * nonemployeeCompensation: 23423, + * hasDirectSalesOver5000: false, + * federalIncomeTaxWithheld: 0, + * accountNumber: "A0NEqtav7n0sBGoq88w0", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateIncome: 23423, + * stateTaxWithheld: 0 + * }] + * }, + * filingYear: 2023, + * createdAt: "2024-01-01T00:00:00.000Z", + * status: Abound.types.Form1099StatusEnum.Created, + * payer: { + * name: "Hooli", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096", + * tin: "*******11", + * tinType: Abound.types.TinTypeEnum.Business, + * tinFingerprint: "tinFingerprint_sample847jI1LwxF", + * tinVerificationId: "tinVerificationId_sample1b0E6efa89", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payee: { + * name: "Ada Lovelace", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * tin: "*******00", + * tinType: Abound.types.TinTypeEnum.Individual, + * tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + * tinVerificationId: "tinVerificationId_sample41SD71AV8f", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-COPY-C.pdf", + * payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-COPY-B.pdf" + * } + * + * @example + * { + * id: "documentId_samplegU0eR8oc8a", + * formFields: { + * isCorrected: false, + * isVoid: false, + * nonemployeeCompensation: 23423, + * hasDirectSalesOver5000: false, + * federalIncomeTaxWithheld: 0, + * accountNumber: "A0NEqtav7n0sBGoq88w0", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateIncome: 23423, + * stateTaxWithheld: 0 + * }] + * }, + * filingYear: 2023, + * createdAt: "2024-01-01T00:00:00.000Z", + * status: Abound.types.Form1099StatusEnum.Filed, + * payer: { + * name: "Hooli", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096", + * tin: "*******11", + * tinType: Abound.types.TinTypeEnum.Business, + * tinFingerprint: "tinFingerprint_sample847jI1LwxF", + * tinVerificationId: "tinVerificationId_sample1b0E6efa89", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payee: { + * name: "Ada Lovelace", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * tin: "*******00", + * tinType: Abound.types.TinTypeEnum.Individual, + * tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + * tinVerificationId: "tinVerificationId_sample41SD71AV8f", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-COPY-C.pdf", + * payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-COPY-B.pdf" + * } + * + * @example + * { + * id: "documentId_sampletdeUbrEgYw", + * correctedFromId: "documentId_samplegU0eR8oc8a", + * formFields: { + * isCorrected: true, + * isVoid: false, + * nonemployeeCompensation: 10000, + * hasDirectSalesOver5000: false, + * federalIncomeTaxWithheld: 0, + * accountNumber: "A0NEqtav7n0sBGoq88w0", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateIncome: 10000, + * stateTaxWithheld: 0 + * }] + * }, + * filingYear: 2023, + * createdAt: "2024-01-01T00:00:00.000Z", + * status: Abound.types.Form1099StatusEnum.Filed, + * payer: { + * name: "Hooli", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096", + * tin: "*******11", + * tinType: Abound.types.TinTypeEnum.Business, + * tinFingerprint: "tinFingerprint_sample847jI1LwxF", + * tinVerificationId: "tinVerificationId_sample1b0E6efa89", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payee: { + * name: "Ada Lovelace", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * tin: "*******00", + * tinType: Abound.types.TinTypeEnum.Individual, + * tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + * tinVerificationId: "tinVerificationId_sample41SD71AV8f", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-CORRECTED-COPY-C.pdf", + * payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-CORRECTED-COPY-B.pdf" + * } + * + * @example + * { + * id: "documentId_sampleSaOkfbLdUb", + * voidedFromId: "documentId_samplegU0eR8oc8a", + * formFields: { + * isCorrected: false, + * isVoid: true, + * nonemployeeCompensation: 23423, + * hasDirectSalesOver5000: false, + * federalIncomeTaxWithheld: 0, + * accountNumber: "A0NEqtav7n0sBGoq88w0", + * stateTaxInfo: [{ + * filingState: Abound.types.Form1099FilingStateEnum.Ca, + * stateIncome: 23423, + * stateTaxWithheld: 0 + * }] + * }, + * filingYear: 2023, + * createdAt: "2024-01-01T00:00:00.000Z", + * status: Abound.types.Form1099StatusEnum.Filed, + * payer: { + * name: "Hooli", + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * phoneNumber: "6501014096", + * tin: "*******11", + * tinType: Abound.types.TinTypeEnum.Business, + * tinFingerprint: "tinFingerprint_sample847jI1LwxF", + * tinVerificationId: "tinVerificationId_sample1b0E6efa89", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payee: { + * name: "Ada Lovelace", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * tin: "*******00", + * tinType: Abound.types.TinTypeEnum.Individual, + * tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + * tinVerificationId: "tinVerificationId_sample41SD71AV8f", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-VOID-COPY-C.pdf", + * payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-VOID-COPY-B.pdf" + * } + */ +export interface Form1099NecSchema extends Abound.types.Form1099BaseSchema { + formFields: Abound.Form1099NecFormFieldsSchema; +} diff --git a/src/api/resources/form1099Nec/types/index.ts b/src/api/resources/form1099Nec/types/index.ts new file mode 100644 index 00000000..7c03e43d --- /dev/null +++ b/src/api/resources/form1099Nec/types/index.ts @@ -0,0 +1,5 @@ +export * from "./Form1099NecFormFieldsRequestSchema"; +export * from "./Form1099NecRequestSchema"; +export * from "./Form1099NecCorrectRequestSchema"; +export * from "./Form1099NecFormFieldsSchema"; +export * from "./Form1099NecSchema"; diff --git a/src/api/resources/formW8Ben/client/Client.ts b/src/api/resources/formW8Ben/client/Client.ts new file mode 100644 index 00000000..25a23901 --- /dev/null +++ b/src/api/resources/formW8Ben/client/Client.ts @@ -0,0 +1,336 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Abound from "../../../index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace FormW8Ben { + interface Options { + environment?: core.Supplier; + sampleKey: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + } +} + +export class FormW8Ben { + constructor(protected readonly _options: FormW8Ben.Options) {} + + /** + * Returns a list of W-8BEN documents. + * + * @param {Abound.FormW8BenListRequest} request + * @param {FormW8Ben.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.formW8Ben.list() + */ + public async list( + request: Abound.FormW8BenListRequest = {}, + requestOptions?: FormW8Ben.RequestOptions + ): Promise { + const { page, payeeTinFingerprint, payeeForeignTinFingerprint, userId } = request; + const _queryParams: Record = {}; + if (page != null) { + _queryParams["page"] = page.toString(); + } + + if (payeeTinFingerprint != null) { + _queryParams["payeeTinFingerprint"] = payeeTinFingerprint; + } + + if (payeeForeignTinFingerprint != null) { + _queryParams["payeeForeignTinFingerprint"] = payeeForeignTinFingerprint; + } + + if (userId != null) { + _queryParams["userId"] = userId; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + "/v4/documents/w-8ben" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.W8BenSchema[]; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Creates a W-8BEN document and, if present, subsequently kicks off a TIN Verification. A TIN Verification will only kickoff if the name and TIN combo has not been seen before. + * + * @param {Abound.W8BenRequestSchema} request + * @param {FormW8Ben.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.formW8Ben.create({ + * payee: { + * name: "Ada Lovelace", + * citizenshipCountry: "GB", + * tin: "000000000", + * foreignTin: "DQ123456C", + * dateOfBirth: "1982-12-10", + * permanentResidenceAddress: { + * address: "43 Hilly Fields", + * address2: "Suite 32", + * city: "Lewisham", + * state: "London", + * postalCode: "SE13 7JN", + * country: "GB" + * }, + * mailingAddress: { + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * postalCode: "94306", + * state: "CA", + * country: "US" + * } + * }, + * formFields: { + * isForeignTinNotRequired: false, + * taxTreatyCode: Abound.types.TaxTreatyAboundCodeEnum.Gb17IndependentPersonalServices, + * referenceNumbers: ["123456789"], + * isCertified: true, + * electronicSignature: { + * signature: "Ada Lovelace", + * printedName: "Ada Lovelace", + * signedAt: "2024-01-01T00:00:00.000Z", + * ipAddress: "127.0.0.1" + * } + * } + * }) + */ + public async create( + request: Abound.W8BenRequestSchema, + requestOptions?: FormW8Ben.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + "/v4/documents/w-8ben" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + requestType: "json", + body: request, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.W8BenSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Retrieves the details of an existing W-8BEN document. + * + * @param {Abound.types.DocumentId} documentId + * @param {FormW8Ben.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.formW8Ben.retrieve("documentId_samplexEM8PRV7sh") + */ + public async retrieve( + documentId: Abound.types.DocumentId, + requestOptions?: FormW8Ben.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/w-8ben/${encodeURIComponent(documentId)}` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.W8BenSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.sampleKey)}`; + } +} diff --git a/src/api/resources/formW8Ben/client/index.ts b/src/api/resources/formW8Ben/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/formW8Ben/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/formW8Ben/client/requests/FormW8BenListRequest.ts b/src/api/resources/formW8Ben/client/requests/FormW8BenListRequest.ts new file mode 100644 index 00000000..d00f7ffb --- /dev/null +++ b/src/api/resources/formW8Ben/client/requests/FormW8BenListRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * {} + */ +export interface FormW8BenListRequest { + page?: Abound.types.Page; + payeeTinFingerprint?: Abound.types.PayeeTinFingerprint; + payeeForeignTinFingerprint?: Abound.types.PayeeForeignTinFingerprint; + userId?: Abound.types.UserId; +} diff --git a/src/api/resources/formW8Ben/client/requests/index.ts b/src/api/resources/formW8Ben/client/requests/index.ts new file mode 100644 index 00000000..5379e665 --- /dev/null +++ b/src/api/resources/formW8Ben/client/requests/index.ts @@ -0,0 +1 @@ +export { type FormW8BenListRequest } from "./FormW8BenListRequest"; diff --git a/src/api/resources/formW8Ben/index.ts b/src/api/resources/formW8Ben/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/api/resources/formW8Ben/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/formW8Ben/types/W8BenBeneficialOwnerRequestSchema.ts b/src/api/resources/formW8Ben/types/W8BenBeneficialOwnerRequestSchema.ts new file mode 100644 index 00000000..3dfd5984 --- /dev/null +++ b/src/api/resources/formW8Ben/types/W8BenBeneficialOwnerRequestSchema.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * The payee (beneficial owner) completing the document. + */ +export interface W8BenBeneficialOwnerRequestSchema { + /** The payee's legal name (first + last). */ + name: string; + /** The payee's country of citizenship adhering to `ISO 3166-2` standards. */ + citizenshipCountry: string; + /** The payee's US tax identification number, commonly referred to as a TIN. No hyphens. Numerical digits only. Alternatively, you may pass the corresponding `tinFingerprint`. */ + tin?: string; + /** The payee's foreign tax identifying number, commonly referred to as a FTIN. No hyphens. Alphanumeric digits only. Alternatively, you may pass the corresponding `foreignTinFingerprint`. */ + foreignTin?: string; + /** The date, in `YYYY-MM-DD` format, the payee was born on. */ + dateOfBirth: string; + /** Permanent residence address (street, apt. or suite no., or rural route). Do not use a P.O. box or in-care-of address. */ + permanentResidenceAddress: Abound.types.ForeignAddressSchema; + /** The mailing address. Only include if different from the permanent residence address. */ + mailingAddress?: Abound.types.AddressSchema; +} diff --git a/src/api/resources/formW8Ben/types/W8BenBeneficialOwnerSchema.ts b/src/api/resources/formW8Ben/types/W8BenBeneficialOwnerSchema.ts new file mode 100644 index 00000000..abfe9ab8 --- /dev/null +++ b/src/api/resources/formW8Ben/types/W8BenBeneficialOwnerSchema.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +export interface W8BenBeneficialOwnerSchema extends Abound.W8BenBeneficialOwnerRequestSchema { + tinFingerprint?: Abound.types.TinFingerprint; + tinType?: Abound.types.TinTypeEnum; + tinVerificationId?: Abound.types.TinVerificationId; + tinVerificationStatus?: Abound.types.TinVerificationStatusEnum; + foreignTinFingerprint?: Abound.types.ForeignTinFingerprint; +} diff --git a/src/api/resources/formW8Ben/types/W8BenFormFieldsRequestSchema.ts b/src/api/resources/formW8Ben/types/W8BenFormFieldsRequestSchema.ts new file mode 100644 index 00000000..9a557336 --- /dev/null +++ b/src/api/resources/formW8Ben/types/W8BenFormFieldsRequestSchema.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +export interface W8BenFormFieldsRequestSchema { + /** Pass true if a foreign TIN is not legally required. Otherwise false. */ + isForeignTinNotRequired?: boolean; + /** Abound's shorthand code for the particular US tax treaty the payee is claiming. */ + taxTreatyCode?: Abound.types.TaxTreatyAboundCodeEnum; + /** The reference numbers to list on this W-8BEN. Two reference numbers are allowed. Max 20 characters each. */ + referenceNumbers?: string[]; + /** Pass true if the payee has certified the W-8BEN. Otherwise false. */ + isCertified: boolean; + /** The electronic signature of the payee. */ + electronicSignature?: Abound.types.ElectronicSignatureOfPayeeSchema; +} diff --git a/src/api/resources/formW8Ben/types/W8BenFormFieldsSchema.ts b/src/api/resources/formW8Ben/types/W8BenFormFieldsSchema.ts new file mode 100644 index 00000000..4f82083e --- /dev/null +++ b/src/api/resources/formW8Ben/types/W8BenFormFieldsSchema.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +export interface W8BenFormFieldsSchema { + /** The tax classification of the payee. */ + taxClassification: "INDIVIDUAL"; + /** Pass true if a foreign TIN is not legally required. Otherwise false. */ + isForeignTinNotRequired?: boolean; + /** The tax treaty benefits the payee is claiming. */ + taxTreatyBenefits?: Abound.types.TaxTreatyBenefitsSchema; + /** The reference numbers to list on this W-8BEN. Two reference numbers are allowed. Max 20 characters each. */ + referenceNumbers?: string[]; + /** Pass true if the payee has certified the W-8BEN. Otherwise false. */ + isCertified: boolean; + /** The electronic signature of the payee. */ + electronicSignature?: Abound.types.ElectronicSignatureOfPayeeSchema; +} diff --git a/src/api/resources/formW8Ben/types/W8BenRequestSchema.ts b/src/api/resources/formW8Ben/types/W8BenRequestSchema.ts new file mode 100644 index 00000000..660efbf9 --- /dev/null +++ b/src/api/resources/formW8Ben/types/W8BenRequestSchema.ts @@ -0,0 +1,51 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * payee: { + * name: "Ada Lovelace", + * citizenshipCountry: "GB", + * tin: "000000000", + * foreignTin: "DQ123456C", + * dateOfBirth: "1982-12-10", + * permanentResidenceAddress: { + * address: "43 Hilly Fields", + * address2: "Suite 32", + * city: "Lewisham", + * state: "London", + * postalCode: "SE13 7JN", + * country: "GB" + * }, + * mailingAddress: { + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * postalCode: "94306", + * state: "CA", + * country: "US" + * } + * }, + * formFields: { + * isForeignTinNotRequired: false, + * taxTreatyCode: Abound.types.TaxTreatyAboundCodeEnum.Gb17IndependentPersonalServices, + * referenceNumbers: ["123456789"], + * isCertified: true, + * electronicSignature: { + * signature: "Ada Lovelace", + * printedName: "Ada Lovelace", + * signedAt: "2024-01-01T00:00:00.000Z", + * ipAddress: "127.0.0.1" + * } + * } + * } + */ +export interface W8BenRequestSchema { + payee: Abound.W8BenBeneficialOwnerRequestSchema; + formFields: Abound.W8BenFormFieldsRequestSchema; + userId?: Abound.types.UserId; +} diff --git a/src/api/resources/formW8Ben/types/W8BenSchema.ts b/src/api/resources/formW8Ben/types/W8BenSchema.ts new file mode 100644 index 00000000..e4884e35 --- /dev/null +++ b/src/api/resources/formW8Ben/types/W8BenSchema.ts @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * id: "documentId_samplexEM8PRV7sh", + * createdAt: "2024-01-01T00:00:00.000Z", + * expiresAt: "2028-01-01T00:00:00.000Z", + * url: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-W-8BEN.pdf", + * payee: { + * name: "Ada Lovelace", + * citizenshipCountry: "GB", + * dateOfBirth: "1982-12-10", + * permanentResidenceAddress: { + * address: "43 Hilly Fields", + * address2: "Suite 32", + * city: "Lewisham", + * state: "London", + * postalCode: "SE13 7JN", + * country: "GB" + * }, + * mailingAddress: { + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * postalCode: "94306", + * state: "CA", + * country: "US" + * }, + * tin: "*******00", + * tinType: Abound.types.TinTypeEnum.Individual, + * tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + * tinVerificationId: "tinVerificationId_sample41SD71AV8f", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match, + * foreignTin: "*******6C", + * foreignTinFingerprint: "tinFingerprint_sampleanXo4V9nL9" + * }, + * formFields: { + * taxClassification: "INDIVIDUAL", + * isForeignTinNotRequired: false, + * taxTreatyBenefits: { + * residentCountry: "GB", + * claimedProvision: "7", + * rateOfWithholding: 0, + * incomeCode: Abound.types.TaxTreatyIncomeCodeEnum.Seventeen, + * incomeType: "SERVICES", + * additionalConditions: "Independent personal services performed in the US" + * }, + * referenceNumbers: ["123456789"], + * isCertified: true, + * electronicSignature: { + * signature: "Ada Lovelace", + * printedName: "Ada Lovelace", + * signedAt: "2024-01-01T00:00:00.000Z", + * ipAddress: "127.0.0.1" + * } + * } + * } + */ +export interface W8BenSchema { + /** The unique identifier for the W-8BEN document. */ + id: string; + /** The date and time in `ISO 8601` format when the W-8BEN document was created. */ + createdAt: string; + /** The date and time in `ISO 8601` format when the W-8BEN is expired and requires re-collection. */ + expiresAt: string; + /** The URL to the W-8BEN document. */ + url: string; + payee: Abound.W8BenBeneficialOwnerSchema; + formFields: Abound.W8BenFormFieldsSchema; + userId?: Abound.types.UserId; +} diff --git a/src/api/resources/formW8Ben/types/index.ts b/src/api/resources/formW8Ben/types/index.ts new file mode 100644 index 00000000..768d1e58 --- /dev/null +++ b/src/api/resources/formW8Ben/types/index.ts @@ -0,0 +1,6 @@ +export * from "./W8BenBeneficialOwnerRequestSchema"; +export * from "./W8BenFormFieldsRequestSchema"; +export * from "./W8BenRequestSchema"; +export * from "./W8BenBeneficialOwnerSchema"; +export * from "./W8BenFormFieldsSchema"; +export * from "./W8BenSchema"; diff --git a/src/api/resources/formW8BenE/client/Client.ts b/src/api/resources/formW8BenE/client/Client.ts new file mode 100644 index 00000000..ff530fb5 --- /dev/null +++ b/src/api/resources/formW8BenE/client/Client.ts @@ -0,0 +1,336 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Abound from "../../../index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace FormW8BenE { + interface Options { + environment?: core.Supplier; + sampleKey: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + } +} + +export class FormW8BenE { + constructor(protected readonly _options: FormW8BenE.Options) {} + + /** + * Returns a list of W-8BEN-E documents. + * + * @param {Abound.FormW8BenEListRequest} request + * @param {FormW8BenE.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.formW8BenE.list() + */ + public async list( + request: Abound.FormW8BenEListRequest = {}, + requestOptions?: FormW8BenE.RequestOptions + ): Promise { + const { page, payeeTinFingerprint, payeeForeignTinFingerprint, userId } = request; + const _queryParams: Record = {}; + if (page != null) { + _queryParams["page"] = page.toString(); + } + + if (payeeTinFingerprint != null) { + _queryParams["payeeTinFingerprint"] = payeeTinFingerprint; + } + + if (payeeForeignTinFingerprint != null) { + _queryParams["payeeForeignTinFingerprint"] = payeeForeignTinFingerprint; + } + + if (userId != null) { + _queryParams["userId"] = userId; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + "/v4/documents/w-8ben-e" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.W8BenESchema[]; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Creates a W-8BEN-E document and, if present, subsequently kicks off a TIN Verification. A TIN Verification will only kickoff if the name and TIN combo has not been seen before. + * + * @param {Abound.W8BenERequestSchema} request + * @param {FormW8BenE.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.formW8BenE.create({ + * payee: { + * name: "Hooli", + * incorporationCountry: "GB", + * tin: "111111111", + * foreignTin: "DQ123456C", + * permanentResidenceAddress: { + * address: "43 Hilly Fields", + * address2: "Suite 32", + * city: "Lewisham", + * state: "London", + * postalCode: "SE13 7JN", + * country: "GB" + * }, + * mailingAddress: { + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * postalCode: "94306", + * state: "CA", + * country: "US" + * } + * }, + * formFields: { + * taxClassification: Abound.W8BenETaxClassificationEnum.Corporation, + * isForeignTinNotRequired: false, + * taxTreatyCode: Abound.types.TaxTreatyAboundCodeEnum.Gb17IndependentPersonalServices, + * referenceNumbers: ["123456789"], + * isCertified: true, + * electronicSignature: { + * signature: "Hooli Representative", + * printedName: "Hooli Representative", + * signedAt: "2024-01-01T00:00:00.000Z", + * ipAddress: "127.0.0.1" + * } + * } + * }) + */ + public async create( + request: Abound.W8BenERequestSchema, + requestOptions?: FormW8BenE.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + "/v4/documents/w-8ben-e" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + requestType: "json", + body: request, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.W8BenESchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Retrieves the details of an existing W-8BEN-E document. + * + * @param {Abound.types.DocumentId} documentId + * @param {FormW8BenE.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.formW8BenE.retrieve("documentId_sampleGyuBXlfAwo") + */ + public async retrieve( + documentId: Abound.types.DocumentId, + requestOptions?: FormW8BenE.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/w-8ben-e/${encodeURIComponent(documentId)}` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.W8BenESchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.sampleKey)}`; + } +} diff --git a/src/api/resources/formW8BenE/client/index.ts b/src/api/resources/formW8BenE/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/formW8BenE/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/formW8BenE/client/requests/FormW8BenEListRequest.ts b/src/api/resources/formW8BenE/client/requests/FormW8BenEListRequest.ts new file mode 100644 index 00000000..f51b11ae --- /dev/null +++ b/src/api/resources/formW8BenE/client/requests/FormW8BenEListRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * {} + */ +export interface FormW8BenEListRequest { + page?: Abound.types.Page; + payeeTinFingerprint?: Abound.types.PayeeTinFingerprint; + payeeForeignTinFingerprint?: Abound.types.PayeeForeignTinFingerprint; + userId?: Abound.types.UserId; +} diff --git a/src/api/resources/formW8BenE/client/requests/index.ts b/src/api/resources/formW8BenE/client/requests/index.ts new file mode 100644 index 00000000..e470a7a7 --- /dev/null +++ b/src/api/resources/formW8BenE/client/requests/index.ts @@ -0,0 +1 @@ +export { type FormW8BenEListRequest } from "./FormW8BenEListRequest"; diff --git a/src/api/resources/formW8BenE/index.ts b/src/api/resources/formW8BenE/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/api/resources/formW8BenE/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/formW8BenE/types/W8BenEBeneficialOwnerRequestSchema.ts b/src/api/resources/formW8BenE/types/W8BenEBeneficialOwnerRequestSchema.ts new file mode 100644 index 00000000..d6b63a9a --- /dev/null +++ b/src/api/resources/formW8BenE/types/W8BenEBeneficialOwnerRequestSchema.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * The payee (beneficial owner) completing the document. + */ +export interface W8BenEBeneficialOwnerRequestSchema { + /** The payee's legal name (first + last). */ + name: string; + /** The payee's country of incorporation adhering to `ISO 3166-2` standards. */ + incorporationCountry: string; + /** The payee's US tax identification number, commonly referred to as a TIN. No hyphens. Numerical digits only. Alternatively, you may pass the corresponding `tinFingerprint`. */ + tin?: string; + /** The payee's foreign tax identifying number, commonly referred to as a FTIN. No hyphens. Alphanumeric digits only. Alternatively, you may pass the corresponding `foreignTinFingerprint`. */ + foreignTin?: string; + /** Permanent residence address (street, apt. or suite no., or rural route). Do not use a P.O. box or in-care-of address. */ + permanentResidenceAddress: Abound.types.ForeignAddressSchema; + /** The mailing address. Only include if different from the permanent residence address. */ + mailingAddress?: Abound.types.AddressSchema; +} diff --git a/src/api/resources/formW8BenE/types/W8BenEBeneficialOwnerSchema.ts b/src/api/resources/formW8BenE/types/W8BenEBeneficialOwnerSchema.ts new file mode 100644 index 00000000..6a371c87 --- /dev/null +++ b/src/api/resources/formW8BenE/types/W8BenEBeneficialOwnerSchema.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +export interface W8BenEBeneficialOwnerSchema extends Abound.W8BenEBeneficialOwnerRequestSchema { + tinFingerprint?: Abound.types.TinFingerprint; + tinType?: Abound.types.TinTypeEnum; + tinVerificationId?: Abound.types.TinVerificationId; + tinVerificationStatus?: Abound.types.TinVerificationStatusEnum; + foreignTinFingerprint?: Abound.types.ForeignTinFingerprint; +} diff --git a/src/api/resources/formW8BenE/types/W8BenEFormFieldsRequestSchema.ts b/src/api/resources/formW8BenE/types/W8BenEFormFieldsRequestSchema.ts new file mode 100644 index 00000000..de5cae31 --- /dev/null +++ b/src/api/resources/formW8BenE/types/W8BenEFormFieldsRequestSchema.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +export interface W8BenEFormFieldsRequestSchema { + taxClassification: Abound.W8BenETaxClassificationEnum; + /** Pass true if a foreign TIN is not legally required. Otherwise false. */ + isForeignTinNotRequired?: boolean; + /** Abound's shorthand code for the particular US tax treaty the payee is claiming. */ + taxTreatyCode?: Abound.types.TaxTreatyAboundCodeEnum; + /** The reference numbers to list on this W-8BEN-E. Two reference numbers are allowed. Max 20 characters each. */ + referenceNumbers?: string[]; + /** Pass true if the payee has certified the W-8BEN-E. Otherwise false. */ + isCertified: boolean; + /** The electronic signature of the payee. */ + electronicSignature?: Abound.types.ElectronicSignatureOfPayeeSchema; +} diff --git a/src/api/resources/formW8BenE/types/W8BenEFormFieldsSchema.ts b/src/api/resources/formW8BenE/types/W8BenEFormFieldsSchema.ts new file mode 100644 index 00000000..0a2da560 --- /dev/null +++ b/src/api/resources/formW8BenE/types/W8BenEFormFieldsSchema.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +export interface W8BenEFormFieldsSchema { + taxClassification: Abound.W8BenETaxClassificationEnum; + /** Pass true if a foreign TIN is not legally required. Otherwise false. */ + isForeignTinNotRequired?: boolean; + /** The tax treaty benefits the payee is claiming. */ + taxTreatyBenefits?: Abound.types.TaxTreatyBenefitsSchema; + /** The reference numbers to list on this W-8BEN-E. Two reference numbers are allowed. Max 20 characters each. */ + referenceNumbers?: string[]; + /** Pass true if the payee has certified the W-8BEN-E. Otherwise false. */ + isCertified: boolean; + /** The electronic signature of the payee. */ + electronicSignature?: Abound.types.ElectronicSignatureOfPayeeSchema; +} diff --git a/src/api/resources/formW8BenE/types/W8BenERequestSchema.ts b/src/api/resources/formW8BenE/types/W8BenERequestSchema.ts new file mode 100644 index 00000000..00b211c5 --- /dev/null +++ b/src/api/resources/formW8BenE/types/W8BenERequestSchema.ts @@ -0,0 +1,51 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * payee: { + * name: "Hooli", + * incorporationCountry: "GB", + * tin: "111111111", + * foreignTin: "DQ123456C", + * permanentResidenceAddress: { + * address: "43 Hilly Fields", + * address2: "Suite 32", + * city: "Lewisham", + * state: "London", + * postalCode: "SE13 7JN", + * country: "GB" + * }, + * mailingAddress: { + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * postalCode: "94306", + * state: "CA", + * country: "US" + * } + * }, + * formFields: { + * taxClassification: Abound.W8BenETaxClassificationEnum.Corporation, + * isForeignTinNotRequired: false, + * taxTreatyCode: Abound.types.TaxTreatyAboundCodeEnum.Gb17IndependentPersonalServices, + * referenceNumbers: ["123456789"], + * isCertified: true, + * electronicSignature: { + * signature: "Hooli Representative", + * printedName: "Hooli Representative", + * signedAt: "2024-01-01T00:00:00.000Z", + * ipAddress: "127.0.0.1" + * } + * } + * } + */ +export interface W8BenERequestSchema { + payee: Abound.W8BenEBeneficialOwnerRequestSchema; + formFields: Abound.W8BenEFormFieldsRequestSchema; + userId?: Abound.types.UserId; +} diff --git a/src/api/resources/formW8BenE/types/W8BenESchema.ts b/src/api/resources/formW8BenE/types/W8BenESchema.ts new file mode 100644 index 00000000..6091c02c --- /dev/null +++ b/src/api/resources/formW8BenE/types/W8BenESchema.ts @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * id: "documentId_sampleGyuBXlfAwo", + * createdAt: "2024-01-01T00:00:00.000Z", + * expiresAt: "2028-01-01T00:00:00.000Z", + * url: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-W-8BEN-E.pdf", + * payee: { + * name: "Hooli", + * incorporationCountry: "GB", + * tin: "*******11", + * permanentResidenceAddress: { + * address: "43 Hilly Fields", + * address2: "Suite 32", + * city: "Lewisham", + * state: "London", + * postalCode: "SE13 7JN", + * country: "GB" + * }, + * mailingAddress: { + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * postalCode: "94306", + * state: "CA", + * country: "US" + * }, + * tinType: Abound.types.TinTypeEnum.Business, + * tinFingerprint: "tinFingerprint_sample847jI1LwxF", + * tinVerificationId: "tinVerificationId_sample1b0E6efa89", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match, + * foreignTin: "*******6C", + * foreignTinFingerprint: "tinFingerprint_sampleanXo4V9nL9" + * }, + * formFields: { + * taxClassification: Abound.W8BenETaxClassificationEnum.Corporation, + * isForeignTinNotRequired: false, + * taxTreatyBenefits: { + * residentCountry: "GB", + * claimedProvision: "7", + * rateOfWithholding: 0, + * incomeCode: Abound.types.TaxTreatyIncomeCodeEnum.Seventeen, + * incomeType: "SERVICES", + * additionalConditions: "Independent personal services performed in the US" + * }, + * referenceNumbers: ["123456789"], + * isCertified: true, + * electronicSignature: { + * signature: "Hooli Representative", + * printedName: "Hooli Representative", + * signedAt: "2024-01-01T00:00:00.000Z", + * ipAddress: "127.0.0.1" + * } + * } + * } + */ +export interface W8BenESchema { + /** The unique identifier for the W-8BEN-E document. */ + id: string; + /** The date and time in `ISO 8601` format when the W-8BEN-E document was created. */ + createdAt: string; + /** The date and time in `ISO 8601` format when the W-8BEN-E is expired and requires re-collection. */ + expiresAt: string; + /** The URL to the W-8BEN-E document. */ + url: string; + payee: Abound.W8BenEBeneficialOwnerSchema; + formFields: Abound.W8BenEFormFieldsSchema; + userId?: Abound.types.UserId; +} diff --git a/src/api/resources/formW8BenE/types/W8BenETaxClassificationEnum.ts b/src/api/resources/formW8BenE/types/W8BenETaxClassificationEnum.ts new file mode 100644 index 00000000..de7b08a0 --- /dev/null +++ b/src/api/resources/formW8BenE/types/W8BenETaxClassificationEnum.ts @@ -0,0 +1,37 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The tax classification of the payee. + */ +export type W8BenETaxClassificationEnum = + | "CENTRAL_BANK_OF_ISSUE" + | "COMPLEX_TRUST" + | "CORPORATION" + | "DISREGARDED_ENTITY" + | "ESTATE" + | "FOREIGN_GOVERNMENT_CONTROLLED_ENTITY" + | "FOREIGN_GOVERNMENT_INTEGRAL_PART" + | "GRANTOR_TRUST" + | "INTERNATIONAL_ORGANIZATION" + | "PARTNERSHIP" + | "PRIVATE_FOUNDATION" + | "SIMPLE_TRUST" + | "TAX_EXEMPT_ORGANIZATION"; + +export const W8BenETaxClassificationEnum = { + CentralBankOfIssue: "CENTRAL_BANK_OF_ISSUE", + ComplexTrust: "COMPLEX_TRUST", + Corporation: "CORPORATION", + DisregardedEntity: "DISREGARDED_ENTITY", + Estate: "ESTATE", + ForeignGovernmentControlledEntity: "FOREIGN_GOVERNMENT_CONTROLLED_ENTITY", + ForeignGovernmentIntegralPart: "FOREIGN_GOVERNMENT_INTEGRAL_PART", + GrantorTrust: "GRANTOR_TRUST", + InternationalOrganization: "INTERNATIONAL_ORGANIZATION", + Partnership: "PARTNERSHIP", + PrivateFoundation: "PRIVATE_FOUNDATION", + SimpleTrust: "SIMPLE_TRUST", + TaxExemptOrganization: "TAX_EXEMPT_ORGANIZATION", +} as const; diff --git a/src/api/resources/formW8BenE/types/index.ts b/src/api/resources/formW8BenE/types/index.ts new file mode 100644 index 00000000..0ac8b7c0 --- /dev/null +++ b/src/api/resources/formW8BenE/types/index.ts @@ -0,0 +1,7 @@ +export * from "./W8BenETaxClassificationEnum"; +export * from "./W8BenEBeneficialOwnerRequestSchema"; +export * from "./W8BenEFormFieldsRequestSchema"; +export * from "./W8BenERequestSchema"; +export * from "./W8BenEBeneficialOwnerSchema"; +export * from "./W8BenEFormFieldsSchema"; +export * from "./W8BenESchema"; diff --git a/src/api/resources/formW9/client/Client.ts b/src/api/resources/formW9/client/Client.ts new file mode 100644 index 00000000..5f4ab70a --- /dev/null +++ b/src/api/resources/formW9/client/Client.ts @@ -0,0 +1,326 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Abound from "../../../index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace FormW9 { + interface Options { + environment?: core.Supplier; + sampleKey: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + } +} + +export class FormW9 { + constructor(protected readonly _options: FormW9.Options) {} + + /** + * Returns a list of W-9 documents. + * + * @param {Abound.FormW9ListRequest} request + * @param {FormW9.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.formW9.list() + */ + public async list( + request: Abound.FormW9ListRequest = {}, + requestOptions?: FormW9.RequestOptions + ): Promise { + const { page, payeeTinFingerprint, payerTinFingerprint, userId } = request; + const _queryParams: Record = {}; + if (page != null) { + _queryParams["page"] = page.toString(); + } + + if (payeeTinFingerprint != null) { + _queryParams["payeeTinFingerprint"] = payeeTinFingerprint; + } + + if (payerTinFingerprint != null) { + _queryParams["payerTinFingerprint"] = payerTinFingerprint; + } + + if (userId != null) { + _queryParams["userId"] = userId; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + "/v4/documents/w-9" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.W9Schema[]; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Creates a W-9 document and subsequently kicks off a TIN verification, if the name and TIN combo has not been used before. + * + * @param {Abound.FormW9RequestSchema} request + * @param {FormW9.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.formW9.create({ + * body: { + * payee: { + * name: "Ada Lovelace", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * country: "US", + * postalCode: "94043", + * state: "CA", + * tin: "000000000", + * tinType: Abound.types.TinTypeEnum.Individual + * }, + * formFields: { + * taxClassification: Abound.W9TaxClassificationSchema.Individual, + * isSubjectToBackupWithholding: false, + * electronicSignature: { + * signature: "Ada Lovelace", + * printedName: "Ada Lovelace", + * signedAt: "2024-01-01T00:00:00.000Z", + * ipAddress: "127.0.0.1" + * } + * } + * } + * }) + */ + public async create( + request: Abound.FormW9RequestSchema, + requestOptions?: FormW9.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey, body: _body } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + "/v4/documents/w-9" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + body: _body, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.W9Schema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Retrieves the details of an existing W-9 document. + * + * @param {Abound.types.DocumentId} documentId + * @param {FormW9.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.formW9.retrieve("documentId_sampleVppNzzIbQT") + */ + public async retrieve( + documentId: Abound.types.DocumentId, + requestOptions?: FormW9.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/documents/w-9/${encodeURIComponent(documentId)}` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.W9Schema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.sampleKey)}`; + } +} diff --git a/src/api/resources/formW9/client/index.ts b/src/api/resources/formW9/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/formW9/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/formW9/client/requests/FormW9ListRequest.ts b/src/api/resources/formW9/client/requests/FormW9ListRequest.ts new file mode 100644 index 00000000..7e92eed4 --- /dev/null +++ b/src/api/resources/formW9/client/requests/FormW9ListRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * {} + */ +export interface FormW9ListRequest { + page?: Abound.types.Page; + payeeTinFingerprint?: Abound.types.PayeeTinFingerprint; + payerTinFingerprint?: Abound.types.PayerTinFingerprint; + userId?: Abound.types.UserId; +} diff --git a/src/api/resources/formW9/client/requests/FormW9RequestSchema.ts b/src/api/resources/formW9/client/requests/FormW9RequestSchema.ts new file mode 100644 index 00000000..82a9dca8 --- /dev/null +++ b/src/api/resources/formW9/client/requests/FormW9RequestSchema.ts @@ -0,0 +1,38 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * { + * body: { + * payee: { + * name: "Ada Lovelace", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * country: "US", + * postalCode: "94043", + * state: "CA", + * tin: "000000000", + * tinType: Abound.types.TinTypeEnum.Individual + * }, + * formFields: { + * taxClassification: Abound.W9TaxClassificationSchema.Individual, + * isSubjectToBackupWithholding: false, + * electronicSignature: { + * signature: "Ada Lovelace", + * printedName: "Ada Lovelace", + * signedAt: "2024-01-01T00:00:00.000Z", + * ipAddress: "127.0.0.1" + * } + * } + * } + * } + */ +export interface FormW9RequestSchema { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; + body: Abound.W9RequestSchema; +} diff --git a/src/api/resources/formW9/client/requests/index.ts b/src/api/resources/formW9/client/requests/index.ts new file mode 100644 index 00000000..5dfb1e3f --- /dev/null +++ b/src/api/resources/formW9/client/requests/index.ts @@ -0,0 +1,2 @@ +export { type FormW9ListRequest } from "./FormW9ListRequest"; +export { type FormW9RequestSchema } from "./FormW9RequestSchema"; diff --git a/src/api/resources/formW9/index.ts b/src/api/resources/formW9/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/api/resources/formW9/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/formW9/types/W9ExemptFatcaCodeSchema.ts b/src/api/resources/formW9/types/W9ExemptFatcaCodeSchema.ts new file mode 100644 index 00000000..7147996f --- /dev/null +++ b/src/api/resources/formW9/types/W9ExemptFatcaCodeSchema.ts @@ -0,0 +1,39 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The code to identify a payee that is exempt from reporting under FATCA. + */ +export type W9ExemptFatcaCodeSchema = + | "A" + | "B" + | "C" + | "D" + | "E" + | "F" + | "G" + | "H" + | "I" + | "J" + | "K" + | "L" + | "M" + | "NOT_APPLICABLE"; + +export const W9ExemptFatcaCodeSchema = { + A: "A", + B: "B", + C: "C", + D: "D", + E: "E", + F: "F", + G: "G", + H: "H", + I: "I", + J: "J", + K: "K", + L: "L", + M: "M", + NotApplicable: "NOT_APPLICABLE", +} as const; diff --git a/src/api/resources/formW9/types/W9ExemptPayeeCodeSchema.ts b/src/api/resources/formW9/types/W9ExemptPayeeCodeSchema.ts new file mode 100644 index 00000000..f3b4a1e8 --- /dev/null +++ b/src/api/resources/formW9/types/W9ExemptPayeeCodeSchema.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The code to identify a payee that is exempt from backup withholding. + */ +export type W9ExemptPayeeCodeSchema = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13"; + +export const W9ExemptPayeeCodeSchema = { + One: "1", + Two: "2", + Three: "3", + Four: "4", + Five: "5", + Six: "6", + Seven: "7", + Eight: "8", + Nine: "9", + Ten: "10", + Eleven: "11", + Twelve: "12", + Thirteen: "13", +} as const; diff --git a/src/api/resources/formW9/types/W9FormFieldsSchema.ts b/src/api/resources/formW9/types/W9FormFieldsSchema.ts new file mode 100644 index 00000000..0b3598fd --- /dev/null +++ b/src/api/resources/formW9/types/W9FormFieldsSchema.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +export interface W9FormFieldsSchema { + /** The U.S. federal tax classification of the person. */ + taxClassification: Abound.W9TaxClassificationSchema; + /** The tax classification of the payee if `taxClassification` is `OTHER`. */ + otherTaxClassification?: string; + /** If your `taxClassification` is `PARTNERSHIP`, `TRUST`, `ESTATE`, or `LLC_PARTNERSHIP`, and you are providing this form to a partnership, trust, or estate in which you have an ownership interest, pass `true` if you have any foreign partners, owners, or beneficiaries. */ + hasIndirectForeignOwnership?: boolean; + /** The code to identify a payee that is exempt from backup withholding. */ + exemptPayeeCode?: Abound.W9ExemptPayeeCodeSchema; + /** The code to identify a payee that is exempt from reporting under FATCA. */ + exemptFatcaCode?: Abound.W9ExemptFatcaCodeSchema; + /** The account numbers to list on this W-9. */ + accountNumbers?: string[]; + /** If the payee is subject to backup withholding, pass `true`. */ + isSubjectToBackupWithholding?: boolean; + /** The certification date and time in `ISO 8601` format. This field is deprecated. Please use `electronicSignature` instead. */ + certifiedAt?: string; + /** The electronic signature of the payee. */ + electronicSignature?: Abound.types.ElectronicSignatureOfPayeeSchema; +} diff --git a/src/api/resources/formW9/types/W9RequestSchema.ts b/src/api/resources/formW9/types/W9RequestSchema.ts new file mode 100644 index 00000000..f3dd1177 --- /dev/null +++ b/src/api/resources/formW9/types/W9RequestSchema.ts @@ -0,0 +1,38 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * payee: { + * name: "Ada Lovelace", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * country: "US", + * postalCode: "94043", + * state: "CA", + * tin: "000000000", + * tinType: Abound.types.TinTypeEnum.Individual + * }, + * formFields: { + * taxClassification: Abound.W9TaxClassificationSchema.Individual, + * isSubjectToBackupWithholding: false, + * electronicSignature: { + * signature: "Ada Lovelace", + * printedName: "Ada Lovelace", + * signedAt: "2024-01-01T00:00:00.000Z", + * ipAddress: "127.0.0.1" + * } + * } + * } + */ +export interface W9RequestSchema { + payee: Abound.types.PayeeWithOptionalTinTypeRequestSchema; + payer?: Abound.types.PayerRequestSchema; + formFields: Abound.W9FormFieldsSchema; + userId?: Abound.types.UserId; +} diff --git a/src/api/resources/formW9/types/W9Schema.ts b/src/api/resources/formW9/types/W9Schema.ts new file mode 100644 index 00000000..c050452c --- /dev/null +++ b/src/api/resources/formW9/types/W9Schema.ts @@ -0,0 +1,51 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * id: "documentId_sampleVppNzzIbQT", + * createdAt: "2024-01-01T00:00:00.000Z", + * url: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-W-9.pdf", + * payee: { + * name: "Ada Lovelace", + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * country: "US", + * postalCode: "94043", + * state: "CA", + * tin: "*******00", + * tinType: Abound.types.TinTypeEnum.Individual, + * tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + * tinVerificationId: "tinVerificationId_sample41SD71AV8f", + * tinVerificationStatus: Abound.types.TinVerificationStatusEnum.Match + * }, + * formFields: { + * accountNumbers: ["1234567890", "1234567891"], + * taxClassification: Abound.W9TaxClassificationSchema.Individual, + * isSubjectToBackupWithholding: false, + * electronicSignature: { + * signature: "Ada Lovelace", + * printedName: "Ada Lovelace", + * signedAt: "2024-01-01T00:00:00.000Z", + * ipAddress: "127.0.0.1" + * } + * } + * } + */ +export interface W9Schema { + /** The unique identifier for the W-9 document. */ + id: string; + /** The date and time in `ISO 8601` format when the W-9 document was created. */ + createdAt: string; + /** The URL to the W-9 document. */ + url: string; + payee: Abound.types.PayeeSchema; + payer?: Abound.types.PayerSchema; + formFields: Abound.W9FormFieldsSchema; + userId?: Abound.types.UserId; +} diff --git a/src/api/resources/formW9/types/W9TaxClassificationSchema.ts b/src/api/resources/formW9/types/W9TaxClassificationSchema.ts new file mode 100644 index 00000000..4ba19c4f --- /dev/null +++ b/src/api/resources/formW9/types/W9TaxClassificationSchema.ts @@ -0,0 +1,33 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The U.S. federal tax classification of the person. + */ +export type W9TaxClassificationSchema = + | "INDIVIDUAL" + | "SOLE_PROPRIETOR" + | "C_CORPORATION" + | "S_CORPORATION" + | "PARTNERSHIP" + | "TRUST" + | "ESTATE" + | "LLC_PARTNERSHIP" + | "LLC_C_CORPORATION" + | "LLC_S_CORPORATION" + | "OTHER"; + +export const W9TaxClassificationSchema = { + Individual: "INDIVIDUAL", + SoleProprietor: "SOLE_PROPRIETOR", + CCorporation: "C_CORPORATION", + SCorporation: "S_CORPORATION", + Partnership: "PARTNERSHIP", + Trust: "TRUST", + Estate: "ESTATE", + LlcPartnership: "LLC_PARTNERSHIP", + LlcCCorporation: "LLC_C_CORPORATION", + LlcSCorporation: "LLC_S_CORPORATION", + Other: "OTHER", +} as const; diff --git a/src/api/resources/formW9/types/index.ts b/src/api/resources/formW9/types/index.ts new file mode 100644 index 00000000..8448626f --- /dev/null +++ b/src/api/resources/formW9/types/index.ts @@ -0,0 +1,6 @@ +export * from "./W9TaxClassificationSchema"; +export * from "./W9ExemptPayeeCodeSchema"; +export * from "./W9ExemptFatcaCodeSchema"; +export * from "./W9FormFieldsSchema"; +export * from "./W9RequestSchema"; +export * from "./W9Schema"; diff --git a/src/api/resources/index.ts b/src/api/resources/index.ts new file mode 100644 index 00000000..abf02569 --- /dev/null +++ b/src/api/resources/index.ts @@ -0,0 +1,42 @@ +export * as accessTokens from "./accessTokens"; +export * from "./accessTokens/types"; +export * as electronicDeliveryConsents from "./electronicDeliveryConsents"; +export * from "./electronicDeliveryConsents/types"; +export * as form1099Int from "./form1099Int"; +export * from "./form1099Int/types"; +export * as form1099K from "./form1099K"; +export * from "./form1099K/types"; +export * as form1099Misc from "./form1099Misc"; +export * from "./form1099Misc/types"; +export * as form1099Nec from "./form1099Nec"; +export * from "./form1099Nec/types"; +export * as formW8BenE from "./formW8BenE"; +export * from "./formW8BenE/types"; +export * as formW8Ben from "./formW8Ben"; +export * from "./formW8Ben/types"; +export * as formW9 from "./formW9"; +export * from "./formW9/types"; +export * as mailings from "./mailings"; +export * from "./mailings/types"; +export * as taxTreaties from "./taxTreaties"; +export * from "./taxTreaties/types"; +export * as tinVerifications from "./tinVerifications"; +export * from "./tinVerifications/types"; +export * as types from "./types"; +export * as users from "./users"; +export * from "./users/types"; +export * as webhooks from "./webhooks"; +export * from "./webhooks/types"; +export * from "./accessTokens/client/requests"; +export * from "./electronicDeliveryConsents/client/requests"; +export * from "./form1099Int/client/requests"; +export * from "./form1099K/client/requests"; +export * from "./form1099Misc/client/requests"; +export * from "./form1099Nec/client/requests"; +export * from "./formW8BenE/client/requests"; +export * from "./formW8Ben/client/requests"; +export * from "./formW9/client/requests"; +export * from "./mailings/client/requests"; +export * from "./taxTreaties/client/requests"; +export * from "./tinVerifications/client/requests"; +export * from "./users/client/requests"; diff --git a/src/api/resources/mailings/client/Client.ts b/src/api/resources/mailings/client/Client.ts new file mode 100644 index 00000000..0248390d --- /dev/null +++ b/src/api/resources/mailings/client/Client.ts @@ -0,0 +1,403 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Abound from "../../../index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace Mailings { + interface Options { + environment?: core.Supplier; + sampleKey: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + } +} + +export class Mailings { + constructor(protected readonly _options: Mailings.Options) {} + + /** + * Returns a list of mailings. Up to 100 mailings are returned per request. + * + * @param {Abound.MailingsListRequest} request + * @param {Mailings.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.mailings.list() + */ + public async list( + request: Abound.MailingsListRequest = {}, + requestOptions?: Mailings.RequestOptions + ): Promise { + const { page, status, userId } = request; + const _queryParams: Record = {}; + if (page != null) { + _queryParams["page"] = page.toString(); + } + + if (status != null) { + _queryParams["status"] = status; + } + + if (userId != null) { + _queryParams["userId"] = userId; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + "/v4/mailings" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.MailingSchema[]; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Retrieves the details of an existing mailing. + * + * @param {Abound.types.MailingId} mailingId + * @param {Mailings.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.mailings.retrieve("mailingId_sampleFV9b73IvAD") + */ + public async retrieve( + mailingId: Abound.types.MailingId, + requestOptions?: Mailings.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/mailings/${encodeURIComponent(mailingId)}` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.MailingSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Updates an existing mailing. Once a mailing has reached the `PROCESSING_FOR_DELIVERY` status, it cannot be updated. Any body parameters not provided will be removed. + * + * @param {Abound.types.MailingId} mailingId + * @param {Abound.MailingRequest} request + * @param {Mailings.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.mailings.update("mailingId_sampleFV9b73IvAD", { + * body: { + * to: { + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * name: "Ada Lovelace" + * }, + * from: { + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * name: "Hooli" + * } + * } + * }) + */ + public async update( + mailingId: Abound.types.MailingId, + request: Abound.MailingRequest, + requestOptions?: Mailings.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey, body: _body } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/mailings/${encodeURIComponent(mailingId)}` + ), + method: "PUT", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + body: _body, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.MailingSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Deletes a mailing. Once a mailing has reached the `PROCESSING_FOR_DELIVERY` status, it cannot be deleted. + * + * @param {Abound.types.MailingId} mailingId + * @param {Mailings.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.mailings.delete("mailingId_sampleFV9b73IvAD") + */ + public async delete( + mailingId: Abound.types.MailingId, + requestOptions?: Mailings.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/mailings/${encodeURIComponent(mailingId)}` + ), + method: "DELETE", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.types.OkSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.sampleKey)}`; + } +} diff --git a/src/api/resources/mailings/client/index.ts b/src/api/resources/mailings/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/mailings/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/mailings/client/requests/MailingRequest.ts b/src/api/resources/mailings/client/requests/MailingRequest.ts new file mode 100644 index 00000000..8e948f37 --- /dev/null +++ b/src/api/resources/mailings/client/requests/MailingRequest.ts @@ -0,0 +1,35 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * { + * body: { + * to: { + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * name: "Ada Lovelace" + * }, + * from: { + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * name: "Hooli" + * } + * } + * } + */ +export interface MailingRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; + body: Abound.MailingRequestSchema; +} diff --git a/src/api/resources/mailings/client/requests/MailingsListRequest.ts b/src/api/resources/mailings/client/requests/MailingsListRequest.ts new file mode 100644 index 00000000..bb37b306 --- /dev/null +++ b/src/api/resources/mailings/client/requests/MailingsListRequest.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * {} + */ +export interface MailingsListRequest { + page?: Abound.types.Page; + /** + * Filters the list of mailings based on the `status` field. + */ + status?: Abound.MailingStatusEnum; + userId?: Abound.types.UserId; +} diff --git a/src/api/resources/mailings/client/requests/index.ts b/src/api/resources/mailings/client/requests/index.ts new file mode 100644 index 00000000..63bae226 --- /dev/null +++ b/src/api/resources/mailings/client/requests/index.ts @@ -0,0 +1,2 @@ +export { type MailingsListRequest } from "./MailingsListRequest"; +export { type MailingRequest } from "./MailingRequest"; diff --git a/src/api/resources/mailings/index.ts b/src/api/resources/mailings/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/api/resources/mailings/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/mailings/types/MailingNameSchema.ts b/src/api/resources/mailings/types/MailingNameSchema.ts new file mode 100644 index 00000000..ac8b5276 --- /dev/null +++ b/src/api/resources/mailings/types/MailingNameSchema.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface MailingNameSchema { + /** The individual's name (first + last) or business name. */ + name?: string; + /** The business name, trade name, DBA name, or disregarded entity name, if different from `name`. */ + name2?: string; +} diff --git a/src/api/resources/mailings/types/MailingRequestFromSchema.ts b/src/api/resources/mailings/types/MailingRequestFromSchema.ts new file mode 100644 index 00000000..89755099 --- /dev/null +++ b/src/api/resources/mailings/types/MailingRequestFromSchema.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * The mailing address of the sender. + */ +export interface MailingRequestFromSchema extends Abound.MailingNameSchema, Abound.types.AddressSchema {} diff --git a/src/api/resources/mailings/types/MailingRequestSchema.ts b/src/api/resources/mailings/types/MailingRequestSchema.ts new file mode 100644 index 00000000..7b5d9ccc --- /dev/null +++ b/src/api/resources/mailings/types/MailingRequestSchema.ts @@ -0,0 +1,33 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * to: { + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * name: "Ada Lovelace" + * }, + * from: { + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * name: "Hooli" + * } + * } + */ +export interface MailingRequestSchema { + to: Abound.MailingRequestToSchema; + from: Abound.MailingRequestFromSchema; +} diff --git a/src/api/resources/mailings/types/MailingRequestToSchema.ts b/src/api/resources/mailings/types/MailingRequestToSchema.ts new file mode 100644 index 00000000..963fa06f --- /dev/null +++ b/src/api/resources/mailings/types/MailingRequestToSchema.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * The mailing address of the recipient. + */ +export interface MailingRequestToSchema extends Abound.MailingNameSchema, Abound.types.AddressSchema {} diff --git a/src/api/resources/mailings/types/MailingSchema.ts b/src/api/resources/mailings/types/MailingSchema.ts new file mode 100644 index 00000000..0af0d1a9 --- /dev/null +++ b/src/api/resources/mailings/types/MailingSchema.ts @@ -0,0 +1,47 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * id: "mailingId_sampleFV9b73IvAD", + * createdAt: "2024-01-01T00:00:00.000Z", + * url: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-1099-COPY-B.pdf", + * status: Abound.MailingStatusEnum.Created, + * to: { + * address: "1401 N Shoreline Blvd", + * address2: "Suite 1", + * city: "Mountain View", + * state: "CA", + * postalCode: "94043", + * country: "US", + * name: "Ada Lovelace" + * }, + * from: { + * address: "256 Byron Street", + * address2: "Suite 32", + * city: "Palo Alto", + * state: "CA", + * postalCode: "94306", + * country: "US", + * name: "Hooli" + * }, + * mailedFromId: "documentId_sampletTtqNfulW8" + * } + */ +export interface MailingSchema extends Abound.MailingRequestSchema { + /** The unique identifier for this mailing. */ + id: string; + /** The creation date and time of the mailing in `ISO 8601` format. */ + createdAt: string; + /** The URL to the mailed document. */ + url: string; + /** The status of the mailing. */ + status: Abound.MailingStatusEnum; + userId?: Abound.types.UserId; + /** The `documentId` of the mailed document. */ + mailedFromId: string; +} diff --git a/src/api/resources/mailings/types/MailingStatusEnum.ts b/src/api/resources/mailings/types/MailingStatusEnum.ts new file mode 100644 index 00000000..f4dc0fca --- /dev/null +++ b/src/api/resources/mailings/types/MailingStatusEnum.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type MailingStatusEnum = + | "CREATED" + | "PROCESSING_FOR_DELIVERY" + | "IN_TRANSIT" + | "DELIVERED" + | "RETURNED_TO_SENDER"; + +export const MailingStatusEnum = { + Created: "CREATED", + ProcessingForDelivery: "PROCESSING_FOR_DELIVERY", + InTransit: "IN_TRANSIT", + Delivered: "DELIVERED", + ReturnedToSender: "RETURNED_TO_SENDER", +} as const; diff --git a/src/api/resources/mailings/types/index.ts b/src/api/resources/mailings/types/index.ts new file mode 100644 index 00000000..56bfbc07 --- /dev/null +++ b/src/api/resources/mailings/types/index.ts @@ -0,0 +1,6 @@ +export * from "./MailingStatusEnum"; +export * from "./MailingNameSchema"; +export * from "./MailingRequestToSchema"; +export * from "./MailingRequestFromSchema"; +export * from "./MailingRequestSchema"; +export * from "./MailingSchema"; diff --git a/src/api/resources/taxTreaties/client/Client.ts b/src/api/resources/taxTreaties/client/Client.ts new file mode 100644 index 00000000..5b678286 --- /dev/null +++ b/src/api/resources/taxTreaties/client/Client.ts @@ -0,0 +1,123 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Abound from "../../../index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace TaxTreaties { + interface Options { + environment?: core.Supplier; + sampleKey: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + } +} + +export class TaxTreaties { + constructor(protected readonly _options: TaxTreaties.Options) {} + + /** + * Returns a list of tax treaties. + * + * @param {Abound.TaxTreatiesListRequest} request + * @param {TaxTreaties.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.taxTreaties.list() + */ + public async list( + request: Abound.TaxTreatiesListRequest = {}, + requestOptions?: TaxTreaties.RequestOptions + ): Promise { + const { country } = request; + const _queryParams: Record = {}; + if (country != null) { + _queryParams["country"] = country; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + "/v4/tax-treaties" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.TaxTreatySchema[]; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.sampleKey)}`; + } +} diff --git a/src/api/resources/taxTreaties/client/index.ts b/src/api/resources/taxTreaties/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/taxTreaties/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/taxTreaties/client/requests/TaxTreatiesListRequest.ts b/src/api/resources/taxTreaties/client/requests/TaxTreatiesListRequest.ts new file mode 100644 index 00000000..3b1a8d4a --- /dev/null +++ b/src/api/resources/taxTreaties/client/requests/TaxTreatiesListRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * {} + */ +export interface TaxTreatiesListRequest { + country?: Abound.types.TaxTreatyCountry; +} diff --git a/src/api/resources/taxTreaties/client/requests/index.ts b/src/api/resources/taxTreaties/client/requests/index.ts new file mode 100644 index 00000000..e6af8816 --- /dev/null +++ b/src/api/resources/taxTreaties/client/requests/index.ts @@ -0,0 +1 @@ +export { type TaxTreatiesListRequest } from "./TaxTreatiesListRequest"; diff --git a/src/api/resources/taxTreaties/index.ts b/src/api/resources/taxTreaties/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/api/resources/taxTreaties/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/taxTreaties/types/TaxTreatySchema.ts b/src/api/resources/taxTreaties/types/TaxTreatySchema.ts new file mode 100644 index 00000000..6eb2fda5 --- /dev/null +++ b/src/api/resources/taxTreaties/types/TaxTreatySchema.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * taxTreatyCode: Abound.types.TaxTreatyAboundCodeEnum.Gb17IndependentPersonalServices, + * residentCountry: "GB", + * rateOfWithholding: 0, + * description: "Independent personal services performed in the US" + * } + */ +export interface TaxTreatySchema { + /** Abound's shorthand code for a particular US tax treaty. */ + taxTreatyCode: Abound.types.TaxTreatyAboundCodeEnum; + /** The foreign country, adhering to `ISO 3166-2` standards, associated with the tax treaty. */ + residentCountry: string; + /** The decimal percentage rate of withholding the tax treaty allows by default. Rates are subject to validation and approval by the Payer. */ + rateOfWithholding: number; + /** The income description associated with the tax treaty. */ + description: string; +} diff --git a/src/api/resources/taxTreaties/types/index.ts b/src/api/resources/taxTreaties/types/index.ts new file mode 100644 index 00000000..56a78d08 --- /dev/null +++ b/src/api/resources/taxTreaties/types/index.ts @@ -0,0 +1 @@ +export * from "./TaxTreatySchema"; diff --git a/src/api/resources/tinVerifications/client/Client.ts b/src/api/resources/tinVerifications/client/Client.ts new file mode 100644 index 00000000..f2faf662 --- /dev/null +++ b/src/api/resources/tinVerifications/client/Client.ts @@ -0,0 +1,307 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Abound from "../../../index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace TinVerifications { + interface Options { + environment?: core.Supplier; + sampleKey: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + } +} + +export class TinVerifications { + constructor(protected readonly _options: TinVerifications.Options) {} + + /** + * Returns a list of TIN Verifications. Up to 100 TIN Verifications are returned per request. + * + * @param {Abound.TinVerificationsListRequest} request + * @param {TinVerifications.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.tinVerifications.list() + */ + public async list( + request: Abound.TinVerificationsListRequest = {}, + requestOptions?: TinVerifications.RequestOptions + ): Promise { + const { page, tinFingerprint, status, userId } = request; + const _queryParams: Record = {}; + if (page != null) { + _queryParams["page"] = page.toString(); + } + + if (tinFingerprint != null) { + _queryParams["tinFingerprint"] = tinFingerprint; + } + + if (status != null) { + _queryParams["status"] = status; + } + + if (userId != null) { + _queryParams["userId"] = userId; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + "/v4/tin-verifications" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.TinVerificationSchema[]; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Creates an asynchronous TIN Verification. + * + * @param {Abound.TinVerificationRequest} request + * @param {TinVerifications.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.tinVerifications.create({ + * body: { + * name: "Ada Lovelace", + * tin: "000000000" + * } + * }) + */ + public async create( + request: Abound.TinVerificationRequest, + requestOptions?: TinVerifications.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey, body: _body } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + "/v4/tin-verifications" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + body: _body, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.TinVerificationSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Retrieves the details of an existing TIN Verification. + * + * @param {Abound.types.TinVerificationId} tinVerificationId + * @param {TinVerifications.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.tinVerifications.retrieve("tinVerificationId_sample41SD71AV8f") + */ + public async retrieve( + tinVerificationId: Abound.types.TinVerificationId, + requestOptions?: TinVerifications.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/tin-verifications/${encodeURIComponent(tinVerificationId)}` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.TinVerificationSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.sampleKey)}`; + } +} diff --git a/src/api/resources/tinVerifications/client/index.ts b/src/api/resources/tinVerifications/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/tinVerifications/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/tinVerifications/client/requests/TinVerificationRequest.ts b/src/api/resources/tinVerifications/client/requests/TinVerificationRequest.ts new file mode 100644 index 00000000..0fda0186 --- /dev/null +++ b/src/api/resources/tinVerifications/client/requests/TinVerificationRequest.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * { + * body: { + * name: "Ada Lovelace", + * tin: "000000000" + * } + * } + */ +export interface TinVerificationRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; + body: Abound.TinVerificationRequestSchema; +} diff --git a/src/api/resources/tinVerifications/client/requests/TinVerificationsListRequest.ts b/src/api/resources/tinVerifications/client/requests/TinVerificationsListRequest.ts new file mode 100644 index 00000000..5c87db60 --- /dev/null +++ b/src/api/resources/tinVerifications/client/requests/TinVerificationsListRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * {} + */ +export interface TinVerificationsListRequest { + page?: Abound.types.Page; + tinFingerprint?: Abound.types.TinFingerprintQueryParam; + status?: Abound.types.TinVerificationStatusQueryParam; + userId?: Abound.types.UserId; +} diff --git a/src/api/resources/tinVerifications/client/requests/index.ts b/src/api/resources/tinVerifications/client/requests/index.ts new file mode 100644 index 00000000..1a1ecd89 --- /dev/null +++ b/src/api/resources/tinVerifications/client/requests/index.ts @@ -0,0 +1,2 @@ +export { type TinVerificationsListRequest } from "./TinVerificationsListRequest"; +export { type TinVerificationRequest } from "./TinVerificationRequest"; diff --git a/src/api/resources/tinVerifications/index.ts b/src/api/resources/tinVerifications/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/api/resources/tinVerifications/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/tinVerifications/types/TinVerificationRequestSchema.ts b/src/api/resources/tinVerifications/types/TinVerificationRequestSchema.ts new file mode 100644 index 00000000..3e2ba469 --- /dev/null +++ b/src/api/resources/tinVerifications/types/TinVerificationRequestSchema.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * name: "Ada Lovelace", + * tin: "000000000" + * } + */ +export interface TinVerificationRequestSchema { + /** The legal name (first + last) or business name. */ + name: string; + /** The tax identification number, commonly referred to as a TIN. No hyphens. Numerical digits only. */ + tin: string; + userId?: Abound.types.UserId; +} diff --git a/src/api/resources/tinVerifications/types/TinVerificationSchema.ts b/src/api/resources/tinVerifications/types/TinVerificationSchema.ts new file mode 100644 index 00000000..dfb7fec5 --- /dev/null +++ b/src/api/resources/tinVerifications/types/TinVerificationSchema.ts @@ -0,0 +1,28 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * name: "Ada Lovelace", + * id: "tinVerificationId_sample41SD71AV8f", + * createdAt: "2024-01-01T00:00:00.000Z", + * status: Abound.types.TinVerificationStatusEnum.Match, + * tin: "*******00", + * tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + * tinType: Abound.types.TinTypeEnum.Individual + * } + */ +export interface TinVerificationSchema extends Abound.TinVerificationRequestSchema { + /** The unique identifier for this TIN Verification. */ + id: string; + /** The creation date and time of the TIN Verification in `ISO 8601` format. */ + createdAt: string; + status: Abound.types.TinVerificationStatusEnum; + tinType?: Abound.types.TinTypeEnum; + /** The fingerprint for this TIN Verification. */ + tinFingerprint: string; +} diff --git a/src/api/resources/tinVerifications/types/index.ts b/src/api/resources/tinVerifications/types/index.ts new file mode 100644 index 00000000..00b4bcbd --- /dev/null +++ b/src/api/resources/tinVerifications/types/index.ts @@ -0,0 +1,2 @@ +export * from "./TinVerificationRequestSchema"; +export * from "./TinVerificationSchema"; diff --git a/src/api/resources/types/index.ts b/src/api/resources/types/index.ts new file mode 100644 index 00000000..3e5335fe --- /dev/null +++ b/src/api/resources/types/index.ts @@ -0,0 +1 @@ +export * from "./resources"; diff --git a/src/api/resources/types/resources/address/index.ts b/src/api/resources/types/resources/address/index.ts new file mode 100644 index 00000000..eea524d6 --- /dev/null +++ b/src/api/resources/types/resources/address/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/src/api/resources/types/resources/address/types/AddressSchema.ts b/src/api/resources/types/resources/address/types/AddressSchema.ts new file mode 100644 index 00000000..3389b678 --- /dev/null +++ b/src/api/resources/types/resources/address/types/AddressSchema.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface AddressSchema { + /** The legal address. */ + address: string; + /** The second part of the legal address, such as an apartment or suite number. */ + address2?: string; + /** The city associated with the street address. Required if `country` is `US`. */ + city?: string; + /** The two-letter character code for this state (`CA` for California, `ME` for Maine). Required if `country` is `US`. If foreign, use the province. */ + state?: string; + /** The postal code associated with the street address. Required to be a 5-digit numerical value if `country` is `US`. If foreign, use the foreign postal code. */ + postalCode?: string; + /** The country adhering to `ISO 3166-2` standards. */ + country: string; +} diff --git a/src/api/resources/types/resources/address/types/ForeignAddressSchema.ts b/src/api/resources/types/resources/address/types/ForeignAddressSchema.ts new file mode 100644 index 00000000..ed266e7a --- /dev/null +++ b/src/api/resources/types/resources/address/types/ForeignAddressSchema.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ForeignAddressSchema { + /** The legal address. */ + address: string; + /** The second part of the legal address, such as an apartment or suite number. */ + address2?: string; + /** The city associated with the street address. */ + city?: string; + /** The province associated with the street address. */ + state?: string; + /** The foreign postal code associated with the street address. */ + postalCode?: string; + /** The country adhering to `ISO 3166-2` standards. */ + country: string; +} diff --git a/src/api/resources/types/resources/address/types/index.ts b/src/api/resources/types/resources/address/types/index.ts new file mode 100644 index 00000000..f1cfec7d --- /dev/null +++ b/src/api/resources/types/resources/address/types/index.ts @@ -0,0 +1,2 @@ +export * from "./AddressSchema"; +export * from "./ForeignAddressSchema"; diff --git a/src/api/resources/types/resources/common/index.ts b/src/api/resources/types/resources/common/index.ts new file mode 100644 index 00000000..eea524d6 --- /dev/null +++ b/src/api/resources/types/resources/common/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/src/api/resources/types/resources/common/types/DocumentId.ts b/src/api/resources/types/resources/common/types/DocumentId.ts new file mode 100644 index 00000000..e13942d3 --- /dev/null +++ b/src/api/resources/types/resources/common/types/DocumentId.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The unique identifier for an existing document. + */ +export type DocumentId = string; diff --git a/src/api/resources/types/resources/common/types/Email.ts b/src/api/resources/types/resources/common/types/Email.ts new file mode 100644 index 00000000..3bcd921b --- /dev/null +++ b/src/api/resources/types/resources/common/types/Email.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Filters the list of users based on the `email` field. + */ +export type Email = string; diff --git a/src/api/resources/types/resources/common/types/FilingYear.ts b/src/api/resources/types/resources/common/types/FilingYear.ts new file mode 100644 index 00000000..4846e9ff --- /dev/null +++ b/src/api/resources/types/resources/common/types/FilingYear.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The filing year associated with this document. + */ +export type FilingYear = number; diff --git a/src/api/resources/types/resources/common/types/ForeignId.ts b/src/api/resources/types/resources/common/types/ForeignId.ts new file mode 100644 index 00000000..e5c80310 --- /dev/null +++ b/src/api/resources/types/resources/common/types/ForeignId.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The customer-specific unique identifier associated to an Abound record. Allows developers to forego making their own tables every time they integrate and/or add an application. + */ +export type ForeignId = string; diff --git a/src/api/resources/types/resources/common/types/ForeignTinFingerprint.ts b/src/api/resources/types/resources/common/types/ForeignTinFingerprint.ts new file mode 100644 index 00000000..9e028e0e --- /dev/null +++ b/src/api/resources/types/resources/common/types/ForeignTinFingerprint.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The unique token that points to a foreign TIN. + */ +export type ForeignTinFingerprint = string; diff --git a/src/api/resources/types/resources/common/types/MailingId.ts b/src/api/resources/types/resources/common/types/MailingId.ts new file mode 100644 index 00000000..897b288a --- /dev/null +++ b/src/api/resources/types/resources/common/types/MailingId.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The unique identifier for an existing mailing. + */ +export type MailingId = string; diff --git a/src/api/resources/types/resources/common/types/OkSchema.ts b/src/api/resources/types/resources/common/types/OkSchema.ts new file mode 100644 index 00000000..e41d1b36 --- /dev/null +++ b/src/api/resources/types/resources/common/types/OkSchema.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type OkSchema = Record; diff --git a/src/api/resources/types/resources/common/types/Page.ts b/src/api/resources/types/resources/common/types/Page.ts new file mode 100644 index 00000000..e253a623 --- /dev/null +++ b/src/api/resources/types/resources/common/types/Page.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The specific page of results you're requesting. Responses are limited to a maximum of 100 records. + */ +export type Page = number; diff --git a/src/api/resources/types/resources/common/types/PayeeForeignTinFingerprint.ts b/src/api/resources/types/resources/common/types/PayeeForeignTinFingerprint.ts new file mode 100644 index 00000000..3b17cd7f --- /dev/null +++ b/src/api/resources/types/resources/common/types/PayeeForeignTinFingerprint.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Filters the list of documents based on the `payee.foreignTinFingerprint` field. + */ +export type PayeeForeignTinFingerprint = string; diff --git a/src/api/resources/types/resources/common/types/PayeeTinFingerprint.ts b/src/api/resources/types/resources/common/types/PayeeTinFingerprint.ts new file mode 100644 index 00000000..15f1d359 --- /dev/null +++ b/src/api/resources/types/resources/common/types/PayeeTinFingerprint.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Filters the list of documents based on the `payee.tinFingerprint` field. + */ +export type PayeeTinFingerprint = string; diff --git a/src/api/resources/types/resources/common/types/PayerTinFingerprint.ts b/src/api/resources/types/resources/common/types/PayerTinFingerprint.ts new file mode 100644 index 00000000..e35ac3e7 --- /dev/null +++ b/src/api/resources/types/resources/common/types/PayerTinFingerprint.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Filters the list of documents based on the `payer.tinFingerprint` field. + */ +export type PayerTinFingerprint = string; diff --git a/src/api/resources/types/resources/common/types/TaxTreatyCountry.ts b/src/api/resources/types/resources/common/types/TaxTreatyCountry.ts new file mode 100644 index 00000000..7142d42d --- /dev/null +++ b/src/api/resources/types/resources/common/types/TaxTreatyCountry.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Filters the list of tax treaties based on the specified foreign `country`, adhering to `ISO 3166-2` standards. + */ +export type TaxTreatyCountry = string; diff --git a/src/api/resources/types/resources/common/types/TinFingerprint.ts b/src/api/resources/types/resources/common/types/TinFingerprint.ts new file mode 100644 index 00000000..8b0c9043 --- /dev/null +++ b/src/api/resources/types/resources/common/types/TinFingerprint.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Your unique token that points to a TIN. + */ +export type TinFingerprint = string; diff --git a/src/api/resources/types/resources/common/types/TinFingerprintQueryParam.ts b/src/api/resources/types/resources/common/types/TinFingerprintQueryParam.ts new file mode 100644 index 00000000..38d95c69 --- /dev/null +++ b/src/api/resources/types/resources/common/types/TinFingerprintQueryParam.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Filters the list of TIN Verifications based on the `tinFingerprint` field. + */ +export type TinFingerprintQueryParam = string; diff --git a/src/api/resources/types/resources/common/types/TinTypeEnum.ts b/src/api/resources/types/resources/common/types/TinTypeEnum.ts new file mode 100644 index 00000000..a9d18510 --- /dev/null +++ b/src/api/resources/types/resources/common/types/TinTypeEnum.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The type of the TIN. `INDIVIDUAL` refers to SSNs, ITINs, or ATINs. While `BUSINESS` refers to EINs. + */ +export type TinTypeEnum = "INDIVIDUAL" | "BUSINESS"; + +export const TinTypeEnum = { + Individual: "INDIVIDUAL", + Business: "BUSINESS", +} as const; diff --git a/src/api/resources/types/resources/common/types/TinVerificationId.ts b/src/api/resources/types/resources/common/types/TinVerificationId.ts new file mode 100644 index 00000000..93cb377b --- /dev/null +++ b/src/api/resources/types/resources/common/types/TinVerificationId.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The unique identifier for the TIN Verification. + */ +export type TinVerificationId = string; diff --git a/src/api/resources/types/resources/common/types/TinVerificationStatusEnum.ts b/src/api/resources/types/resources/common/types/TinVerificationStatusEnum.ts new file mode 100644 index 00000000..d15221d3 --- /dev/null +++ b/src/api/resources/types/resources/common/types/TinVerificationStatusEnum.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The status of the TIN Verification. + */ +export type TinVerificationStatusEnum = "MATCH" | "MISMATCH" | "PENDING"; + +export const TinVerificationStatusEnum = { + Match: "MATCH", + Mismatch: "MISMATCH", + Pending: "PENDING", +} as const; diff --git a/src/api/resources/types/resources/common/types/TinVerificationStatusQueryParam.ts b/src/api/resources/types/resources/common/types/TinVerificationStatusQueryParam.ts new file mode 100644 index 00000000..ec7f1163 --- /dev/null +++ b/src/api/resources/types/resources/common/types/TinVerificationStatusQueryParam.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Filters the list of TIN Verifications based on the `status` field. + */ +export type TinVerificationStatusQueryParam = string; diff --git a/src/api/resources/types/resources/common/types/UserId.ts b/src/api/resources/types/resources/common/types/UserId.ts new file mode 100644 index 00000000..373e1f12 --- /dev/null +++ b/src/api/resources/types/resources/common/types/UserId.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The unique identifier for a single end-user of your application. + */ +export type UserId = string; diff --git a/src/api/resources/types/resources/common/types/index.ts b/src/api/resources/types/resources/common/types/index.ts new file mode 100644 index 00000000..50a19993 --- /dev/null +++ b/src/api/resources/types/resources/common/types/index.ts @@ -0,0 +1,19 @@ +export * from "./OkSchema"; +export * from "./Page"; +export * from "./Email"; +export * from "./ForeignId"; +export * from "./TinFingerprintQueryParam"; +export * from "./TinFingerprint"; +export * from "./PayeeTinFingerprint"; +export * from "./PayeeForeignTinFingerprint"; +export * from "./PayerTinFingerprint"; +export * from "./TinVerificationStatusQueryParam"; +export * from "./DocumentId"; +export * from "./MailingId"; +export * from "./UserId"; +export * from "./FilingYear"; +export * from "./TinTypeEnum"; +export * from "./TinVerificationStatusEnum"; +export * from "./TinVerificationId"; +export * from "./TaxTreatyCountry"; +export * from "./ForeignTinFingerprint"; diff --git a/src/api/resources/types/resources/electronicSignature/index.ts b/src/api/resources/types/resources/electronicSignature/index.ts new file mode 100644 index 00000000..eea524d6 --- /dev/null +++ b/src/api/resources/types/resources/electronicSignature/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/src/api/resources/types/resources/electronicSignature/types/ElectronicSignatureOfPayeeSchema.ts b/src/api/resources/types/resources/electronicSignature/types/ElectronicSignatureOfPayeeSchema.ts new file mode 100644 index 00000000..3682a769 --- /dev/null +++ b/src/api/resources/types/resources/electronicSignature/types/ElectronicSignatureOfPayeeSchema.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The electronic signature of the payee. + */ +export interface ElectronicSignatureOfPayeeSchema { + /** The signature of the payee. */ + signature: string; + /** The printed name of the payee. */ + printedName: string; + /** The date and time in `ISO 8601` format of the signature. */ + signedAt: string; + /** The IP address of the payee when signing this document. */ + ipAddress: string; +} diff --git a/src/api/resources/types/resources/electronicSignature/types/index.ts b/src/api/resources/types/resources/electronicSignature/types/index.ts new file mode 100644 index 00000000..837a0995 --- /dev/null +++ b/src/api/resources/types/resources/electronicSignature/types/index.ts @@ -0,0 +1 @@ +export * from "./ElectronicSignatureOfPayeeSchema"; diff --git a/src/api/resources/types/resources/errors/errors/BadRequestErrorSchema.ts b/src/api/resources/types/resources/errors/errors/BadRequestErrorSchema.ts new file mode 100644 index 00000000..62bcf3b4 --- /dev/null +++ b/src/api/resources/types/resources/errors/errors/BadRequestErrorSchema.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as errors from "../../../../../../errors/index"; +import * as Abound from "../../../../../index"; + +export class BadRequestErrorSchema extends errors.AboundError { + constructor(body: Abound.types.ErrorBadRequestSchema) { + super({ + message: "BadRequestErrorSchema", + statusCode: 400, + body: body, + }); + Object.setPrototypeOf(this, BadRequestErrorSchema.prototype); + } +} diff --git a/src/api/resources/types/resources/errors/errors/ConflictErrorSchema.ts b/src/api/resources/types/resources/errors/errors/ConflictErrorSchema.ts new file mode 100644 index 00000000..caca5555 --- /dev/null +++ b/src/api/resources/types/resources/errors/errors/ConflictErrorSchema.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as errors from "../../../../../../errors/index"; +import * as Abound from "../../../../../index"; + +export class ConflictErrorSchema extends errors.AboundError { + constructor(body: Abound.types.DefaultErrorSchema) { + super({ + message: "ConflictErrorSchema", + statusCode: 409, + body: body, + }); + Object.setPrototypeOf(this, ConflictErrorSchema.prototype); + } +} diff --git a/src/api/resources/types/resources/errors/errors/InternalServerErrorSchema.ts b/src/api/resources/types/resources/errors/errors/InternalServerErrorSchema.ts new file mode 100644 index 00000000..06587427 --- /dev/null +++ b/src/api/resources/types/resources/errors/errors/InternalServerErrorSchema.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as errors from "../../../../../../errors/index"; +import * as Abound from "../../../../../index"; + +export class InternalServerErrorSchema extends errors.AboundError { + constructor(body: Abound.types.DefaultErrorSchema) { + super({ + message: "InternalServerErrorSchema", + statusCode: 500, + body: body, + }); + Object.setPrototypeOf(this, InternalServerErrorSchema.prototype); + } +} diff --git a/src/api/resources/types/resources/errors/errors/NotFoundErrorSchema.ts b/src/api/resources/types/resources/errors/errors/NotFoundErrorSchema.ts new file mode 100644 index 00000000..982d33e5 --- /dev/null +++ b/src/api/resources/types/resources/errors/errors/NotFoundErrorSchema.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as errors from "../../../../../../errors/index"; +import * as Abound from "../../../../../index"; + +export class NotFoundErrorSchema extends errors.AboundError { + constructor(body: Abound.types.DefaultErrorSchema) { + super({ + message: "NotFoundErrorSchema", + statusCode: 404, + body: body, + }); + Object.setPrototypeOf(this, NotFoundErrorSchema.prototype); + } +} diff --git a/src/api/resources/types/resources/errors/errors/UnauthorizedErrorSchema.ts b/src/api/resources/types/resources/errors/errors/UnauthorizedErrorSchema.ts new file mode 100644 index 00000000..01adebaf --- /dev/null +++ b/src/api/resources/types/resources/errors/errors/UnauthorizedErrorSchema.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as errors from "../../../../../../errors/index"; +import * as Abound from "../../../../../index"; + +export class UnauthorizedErrorSchema extends errors.AboundError { + constructor(body: Abound.types.DefaultErrorSchema) { + super({ + message: "UnauthorizedErrorSchema", + statusCode: 401, + body: body, + }); + Object.setPrototypeOf(this, UnauthorizedErrorSchema.prototype); + } +} diff --git a/src/api/resources/types/resources/errors/errors/index.ts b/src/api/resources/types/resources/errors/errors/index.ts new file mode 100644 index 00000000..4d58ab64 --- /dev/null +++ b/src/api/resources/types/resources/errors/errors/index.ts @@ -0,0 +1,5 @@ +export * from "./BadRequestErrorSchema"; +export * from "./UnauthorizedErrorSchema"; +export * from "./NotFoundErrorSchema"; +export * from "./InternalServerErrorSchema"; +export * from "./ConflictErrorSchema"; diff --git a/src/api/resources/types/resources/errors/index.ts b/src/api/resources/types/resources/errors/index.ts new file mode 100644 index 00000000..708eabf4 --- /dev/null +++ b/src/api/resources/types/resources/errors/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./errors"; diff --git a/src/api/resources/types/resources/errors/types/DefaultErrorSchema.ts b/src/api/resources/types/resources/errors/types/DefaultErrorSchema.ts new file mode 100644 index 00000000..6355c733 --- /dev/null +++ b/src/api/resources/types/resources/errors/types/DefaultErrorSchema.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface DefaultErrorSchema { + /** The error message associated with the response status code. */ + message: string; +} diff --git a/src/api/resources/types/resources/errors/types/ErrorBadRequestSchema.ts b/src/api/resources/types/resources/errors/types/ErrorBadRequestSchema.ts new file mode 100644 index 00000000..7f95a1e0 --- /dev/null +++ b/src/api/resources/types/resources/errors/types/ErrorBadRequestSchema.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../../index"; + +export interface ErrorBadRequestSchema { + /** The error message(s) associated with the response status code. */ + errors: Abound.types.ErrorBadRequestSchemaErrorsItem[]; +} diff --git a/src/api/resources/types/resources/errors/types/ErrorBadRequestSchemaErrorsItem.ts b/src/api/resources/types/resources/errors/types/ErrorBadRequestSchemaErrorsItem.ts new file mode 100644 index 00000000..1e81b846 --- /dev/null +++ b/src/api/resources/types/resources/errors/types/ErrorBadRequestSchemaErrorsItem.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ErrorBadRequestSchemaErrorsItem { + /** The field that caused the error. */ + field?: string; + /** The error message associated with the field. */ + message: string; +} diff --git a/src/api/resources/types/resources/errors/types/index.ts b/src/api/resources/types/resources/errors/types/index.ts new file mode 100644 index 00000000..e3cad0a2 --- /dev/null +++ b/src/api/resources/types/resources/errors/types/index.ts @@ -0,0 +1,3 @@ +export * from "./ErrorBadRequestSchemaErrorsItem"; +export * from "./ErrorBadRequestSchema"; +export * from "./DefaultErrorSchema"; diff --git a/src/api/resources/types/resources/form1099S/index.ts b/src/api/resources/types/resources/form1099S/index.ts new file mode 100644 index 00000000..eea524d6 --- /dev/null +++ b/src/api/resources/types/resources/form1099S/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/src/api/resources/types/resources/form1099S/types/Form1099AccountNumber.ts b/src/api/resources/types/resources/form1099S/types/Form1099AccountNumber.ts new file mode 100644 index 00000000..6bbf971d --- /dev/null +++ b/src/api/resources/types/resources/form1099S/types/Form1099AccountNumber.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The account number or other unique number assigned to distinguish an account. Abound will auto-generate this for you if left omitted. + */ +export type Form1099AccountNumber = string; diff --git a/src/api/resources/types/resources/form1099S/types/Form1099BaseCorrectRequestSchema.ts b/src/api/resources/types/resources/form1099S/types/Form1099BaseCorrectRequestSchema.ts new file mode 100644 index 00000000..203d97bd --- /dev/null +++ b/src/api/resources/types/resources/form1099S/types/Form1099BaseCorrectRequestSchema.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../../index"; + +export interface Form1099BaseCorrectRequestSchema { + userId?: Abound.types.UserId; + payee: Abound.types.PayeeRequestSchema; +} diff --git a/src/api/resources/types/resources/form1099S/types/Form1099BaseRequestSchema.ts b/src/api/resources/types/resources/form1099S/types/Form1099BaseRequestSchema.ts new file mode 100644 index 00000000..4b1976d4 --- /dev/null +++ b/src/api/resources/types/resources/form1099S/types/Form1099BaseRequestSchema.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../../index"; + +export interface Form1099BaseRequestSchema { + filingYear: Abound.types.FilingYear; + userId?: Abound.types.UserId; + payer: Abound.types.PayerRequestSchema; + payee: Abound.types.PayeeRequestSchema; +} diff --git a/src/api/resources/types/resources/form1099S/types/Form1099BaseSchema.ts b/src/api/resources/types/resources/form1099S/types/Form1099BaseSchema.ts new file mode 100644 index 00000000..3c12c22f --- /dev/null +++ b/src/api/resources/types/resources/form1099S/types/Form1099BaseSchema.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../../index"; + +export interface Form1099BaseSchema { + id: Abound.types.DocumentId; + /** The `ISO 8601` timestamp when the document was created. */ + createdAt: string; + filingYear: Abound.types.FilingYear; + /** The status of the 1099 document.
  • `CREATED`: The document has passed data validation and the PDFs have been generated.
  • `FILED`: The payee's TIN has been verified and the 1099 has been filed with the appropriate tax authorities.
  • `ACCEPTED`: The document has been acknowledged and accepted by the appropriate tax authorities.
  • `REJECTED`: The document has a TIN verification `MISMATCH` or has been rejected by one or more tax authories. */ + status: Abound.types.Form1099StatusEnum; + /** The URL to the payer's 1099 document. The Payee's TIN is masked in this document. */ + payerUrl: string; + /** The URL to the payee's 1099 document. The Payee's TIN is not masked in this document. */ + payeeUrl: string; + payer: Abound.types.PayerSchema; + payee: Abound.types.PayeeSchema; + /** The `documentId` of the corrected 1099 document. */ + correctedById?: string; + /** The `documentId` of the original 1099 document. */ + correctedFromId?: string; + /** The `documentId` of the voided 1099 document. */ + voidedById?: string; + /** The `documentId` of the original 1099 document. */ + voidedFromId?: string; + userId?: Abound.types.UserId; +} diff --git a/src/api/resources/types/resources/form1099S/types/Form1099FilingStateEnum.ts b/src/api/resources/types/resources/form1099S/types/Form1099FilingStateEnum.ts new file mode 100644 index 00000000..2e324fac --- /dev/null +++ b/src/api/resources/types/resources/form1099S/types/Form1099FilingStateEnum.ts @@ -0,0 +1,131 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The filing state code. The abbreviation of the state (`CA` for California). + */ +export type Form1099FilingStateEnum = + | "AA" + | "AE" + | "AK" + | "AL" + | "AP" + | "AR" + | "AS" + | "AZ" + | "CA" + | "CO" + | "CT" + | "DC" + | "DE" + | "FL" + | "GA" + | "GU" + | "HI" + | "IA" + | "ID" + | "IL" + | "IN" + | "KY" + | "KS" + | "LA" + | "MA" + | "MD" + | "ME" + | "MI" + | "MN" + | "MO" + | "MP" + | "MS" + | "MT" + | "N/A" + | "NC" + | "ND" + | "NE" + | "NH" + | "NJ" + | "NM" + | "NV" + | "NY" + | "OH" + | "OK" + | "OR" + | "PA" + | "PR" + | "RI" + | "SC" + | "SD" + | "TN" + | "TX" + | "UT" + | "VA" + | "VI" + | "VT" + | "WA" + | "WI" + | "WV" + | "WY"; + +export const Form1099FilingStateEnum = { + Aa: "AA", + Ae: "AE", + Ak: "AK", + Al: "AL", + Ap: "AP", + Ar: "AR", + As: "AS", + Az: "AZ", + Ca: "CA", + Co: "CO", + Ct: "CT", + Dc: "DC", + De: "DE", + Fl: "FL", + Ga: "GA", + Gu: "GU", + Hi: "HI", + Ia: "IA", + Id: "ID", + Il: "IL", + In: "IN", + Ky: "KY", + Ks: "KS", + La: "LA", + Ma: "MA", + Md: "MD", + Me: "ME", + Mi: "MI", + Mn: "MN", + Mo: "MO", + Mp: "MP", + Ms: "MS", + Mt: "MT", + NotApplicable: "N/A", + Nc: "NC", + Nd: "ND", + Ne: "NE", + Nh: "NH", + Nj: "NJ", + Nm: "NM", + Nv: "NV", + Ny: "NY", + Oh: "OH", + Ok: "OK", + Or: "OR", + Pa: "PA", + Pr: "PR", + Ri: "RI", + Sc: "SC", + Sd: "SD", + Tn: "TN", + Tx: "TX", + Ut: "UT", + Va: "VA", + Vi: "VI", + Vt: "VT", + Wa: "WA", + Wi: "WI", + Wv: "WV", + Wy: "WY", +} as const; diff --git a/src/api/resources/types/resources/form1099S/types/Form1099FormFieldsBaseSchema.ts b/src/api/resources/types/resources/form1099S/types/Form1099FormFieldsBaseSchema.ts new file mode 100644 index 00000000..5966d721 --- /dev/null +++ b/src/api/resources/types/resources/form1099S/types/Form1099FormFieldsBaseSchema.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface Form1099FormFieldsBaseSchema { + /** If `true`, the void checkbox will be marked on the 1099 document. */ + isVoid: boolean; + /** If `true`, the corrected checkbox will be marked on the 1099 document. */ + isCorrected: boolean; +} diff --git a/src/api/resources/types/resources/form1099S/types/Form1099StateTaxInfoSchema.ts b/src/api/resources/types/resources/form1099S/types/Form1099StateTaxInfoSchema.ts new file mode 100644 index 00000000..99541c3d --- /dev/null +++ b/src/api/resources/types/resources/form1099S/types/Form1099StateTaxInfoSchema.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../../index"; + +export interface Form1099StateTaxInfoSchema { + filingState: Abound.types.Form1099FilingStateEnum; + /** The payee's state identification number. */ + payeeStateId?: string; + /** The payer's state identification number. */ + payerStateId?: string; + /** The state tax withheld. Value must be in cents. Abound does not currently support `stateTaxWithheld` reporting, please contact us for more information. */ + stateTaxWithheld?: number; +} diff --git a/src/api/resources/types/resources/form1099S/types/Form1099StateTaxInfoWithStateIncomeSchema.ts b/src/api/resources/types/resources/form1099S/types/Form1099StateTaxInfoWithStateIncomeSchema.ts new file mode 100644 index 00000000..3bed3e99 --- /dev/null +++ b/src/api/resources/types/resources/form1099S/types/Form1099StateTaxInfoWithStateIncomeSchema.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../../index"; + +export interface Form1099StateTaxInfoWithStateIncomeSchema extends Abound.types.Form1099StateTaxInfoSchema { + /** The state income. Value must be in cents. */ + stateIncome: number; +} diff --git a/src/api/resources/types/resources/form1099S/types/Form1099StatusEnum.ts b/src/api/resources/types/resources/form1099S/types/Form1099StatusEnum.ts new file mode 100644 index 00000000..7a121a1a --- /dev/null +++ b/src/api/resources/types/resources/form1099S/types/Form1099StatusEnum.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type Form1099StatusEnum = "CREATED" | "FILED" | "ACCEPTED" | "REJECTED"; + +export const Form1099StatusEnum = { + Created: "CREATED", + Filed: "FILED", + Accepted: "ACCEPTED", + Rejected: "REJECTED", +} as const; diff --git a/src/api/resources/types/resources/form1099S/types/index.ts b/src/api/resources/types/resources/form1099S/types/index.ts new file mode 100644 index 00000000..12ba4082 --- /dev/null +++ b/src/api/resources/types/resources/form1099S/types/index.ts @@ -0,0 +1,9 @@ +export * from "./Form1099AccountNumber"; +export * from "./Form1099StatusEnum"; +export * from "./Form1099FilingStateEnum"; +export * from "./Form1099StateTaxInfoSchema"; +export * from "./Form1099StateTaxInfoWithStateIncomeSchema"; +export * from "./Form1099BaseRequestSchema"; +export * from "./Form1099BaseCorrectRequestSchema"; +export * from "./Form1099BaseSchema"; +export * from "./Form1099FormFieldsBaseSchema"; diff --git a/src/api/resources/types/resources/headers/index.ts b/src/api/resources/types/resources/headers/index.ts new file mode 100644 index 00000000..eea524d6 --- /dev/null +++ b/src/api/resources/types/resources/headers/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/src/api/resources/types/resources/headers/types/IdempotencyKey.ts b/src/api/resources/types/resources/headers/types/IdempotencyKey.ts new file mode 100644 index 00000000..afafa0f7 --- /dev/null +++ b/src/api/resources/types/resources/headers/types/IdempotencyKey.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The unique key used to identify a request that has already been processed. + */ +export type IdempotencyKey = string | undefined; diff --git a/src/api/resources/types/resources/headers/types/index.ts b/src/api/resources/types/resources/headers/types/index.ts new file mode 100644 index 00000000..d54b0f55 --- /dev/null +++ b/src/api/resources/types/resources/headers/types/index.ts @@ -0,0 +1 @@ +export * from "./IdempotencyKey"; diff --git a/src/api/resources/types/resources/index.ts b/src/api/resources/types/resources/index.ts new file mode 100644 index 00000000..d569e10e --- /dev/null +++ b/src/api/resources/types/resources/index.ts @@ -0,0 +1,19 @@ +export * as address from "./address"; +export * from "./address/types"; +export * as common from "./common"; +export * from "./common/types"; +export * as electronicSignature from "./electronicSignature"; +export * from "./electronicSignature/types"; +export * as errors from "./errors"; +export * from "./errors/types"; +export * as form1099S from "./form1099S"; +export * from "./form1099S/types"; +export * as headers from "./headers"; +export * from "./headers/types"; +export * as payee from "./payee"; +export * from "./payee/types"; +export * as payer from "./payer"; +export * from "./payer/types"; +export * as taxTreaties from "./taxTreaties"; +export * from "./taxTreaties/types"; +export * from "./errors/errors"; diff --git a/src/api/resources/types/resources/payee/index.ts b/src/api/resources/types/resources/payee/index.ts new file mode 100644 index 00000000..eea524d6 --- /dev/null +++ b/src/api/resources/types/resources/payee/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/src/api/resources/types/resources/payee/types/PayeeRequestSchema.ts b/src/api/resources/types/resources/payee/types/PayeeRequestSchema.ts new file mode 100644 index 00000000..6aa91c9b --- /dev/null +++ b/src/api/resources/types/resources/payee/types/PayeeRequestSchema.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../../index"; + +/** + * The payee of the document. + */ +export interface PayeeRequestSchema extends Abound.types.AddressSchema { + /** The payee's legal name (first + last) or business name. */ + name: string; + /** The payee's trade name, DBA name, or disregarded entity name, if different from `name`. */ + name2?: string; + /** The payee's tax identification number, commonly referred to as a TIN. No hyphens. Numerical digits only. Alternatively, you may pass the corresponding `tinFingerprint`. */ + tin: string; +} diff --git a/src/api/resources/types/resources/payee/types/PayeeSchema.ts b/src/api/resources/types/resources/payee/types/PayeeSchema.ts new file mode 100644 index 00000000..988c3add --- /dev/null +++ b/src/api/resources/types/resources/payee/types/PayeeSchema.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../../index"; + +/** + * The payee of the document. + */ +export interface PayeeSchema extends Abound.types.PayeeRequestSchema { + tinFingerprint: Abound.types.TinFingerprint; + tinType?: Abound.types.TinTypeEnum; + tinVerificationId: Abound.types.TinVerificationId; + tinVerificationStatus: Abound.types.TinVerificationStatusEnum; +} diff --git a/src/api/resources/types/resources/payee/types/PayeeWithOptionalTinTypeRequestSchema.ts b/src/api/resources/types/resources/payee/types/PayeeWithOptionalTinTypeRequestSchema.ts new file mode 100644 index 00000000..cd2b22c9 --- /dev/null +++ b/src/api/resources/types/resources/payee/types/PayeeWithOptionalTinTypeRequestSchema.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../../index"; + +/** + * The payee of the document. + */ +export interface PayeeWithOptionalTinTypeRequestSchema extends Abound.types.PayeeRequestSchema { + tinType?: Abound.types.TinTypeEnum; +} diff --git a/src/api/resources/types/resources/payee/types/index.ts b/src/api/resources/types/resources/payee/types/index.ts new file mode 100644 index 00000000..6ee9b571 --- /dev/null +++ b/src/api/resources/types/resources/payee/types/index.ts @@ -0,0 +1,3 @@ +export * from "./PayeeRequestSchema"; +export * from "./PayeeSchema"; +export * from "./PayeeWithOptionalTinTypeRequestSchema"; diff --git a/src/api/resources/types/resources/payer/index.ts b/src/api/resources/types/resources/payer/index.ts new file mode 100644 index 00000000..eea524d6 --- /dev/null +++ b/src/api/resources/types/resources/payer/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/src/api/resources/types/resources/payer/types/PayerRequestSchema.ts b/src/api/resources/types/resources/payer/types/PayerRequestSchema.ts new file mode 100644 index 00000000..4dabce6c --- /dev/null +++ b/src/api/resources/types/resources/payer/types/PayerRequestSchema.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../../index"; + +/** + * The payer of the document. + */ +export interface PayerRequestSchema extends Abound.types.AddressSchema { + /** The payer's legal name (first + last) or business name. */ + name: string; + /** The payer's trade name, DBA name, or disregarded entity name, if different from `name`. */ + name2?: string; + /** The payee's tax identification number, commonly referred to as a TIN. No hyphens. Numerical digits only. Alternatively, you may pass the corresponding `tinFingerprint`. */ + tin: string; + /** The payer's phone number. */ + phoneNumber: string; +} diff --git a/src/api/resources/types/resources/payer/types/PayerSchema.ts b/src/api/resources/types/resources/payer/types/PayerSchema.ts new file mode 100644 index 00000000..121dd38a --- /dev/null +++ b/src/api/resources/types/resources/payer/types/PayerSchema.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../../index"; + +/** + * The payer of the document. + */ +export interface PayerSchema extends Abound.types.PayerRequestSchema { + tinFingerprint: Abound.types.TinFingerprint; + tinType?: Abound.types.TinTypeEnum; + tinVerificationId: Abound.types.TinVerificationId; + tinVerificationStatus: Abound.types.TinVerificationStatusEnum; +} diff --git a/src/api/resources/types/resources/payer/types/index.ts b/src/api/resources/types/resources/payer/types/index.ts new file mode 100644 index 00000000..dd452c97 --- /dev/null +++ b/src/api/resources/types/resources/payer/types/index.ts @@ -0,0 +1,2 @@ +export * from "./PayerRequestSchema"; +export * from "./PayerSchema"; diff --git a/src/api/resources/types/resources/taxTreaties/index.ts b/src/api/resources/types/resources/taxTreaties/index.ts new file mode 100644 index 00000000..eea524d6 --- /dev/null +++ b/src/api/resources/types/resources/taxTreaties/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/src/api/resources/types/resources/taxTreaties/types/TaxTreatyAboundCodeEnum.ts b/src/api/resources/types/resources/taxTreaties/types/TaxTreatyAboundCodeEnum.ts new file mode 100644 index 00000000..4ae3673e --- /dev/null +++ b/src/api/resources/types/resources/taxTreaties/types/TaxTreatyAboundCodeEnum.ts @@ -0,0 +1,55 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The tax treaty code the payee is claiming. + */ +export type TaxTreatyAboundCodeEnum = + | "AU_17_INDEPENDENT_PERSONAL_SERVICES" + | "AU_18_DEPENDENT_PERSONAL_SERVICES" + | "AU_42_PUBLIC_ENTERTAINMENT" + | "CA_17_INDEPENDENT_PERSONAL_SERVICES" + | "CA_18_DEPENDENT_PERSONAL_SERVICES" + | "CA_42_PUBLIC_ENTERTAINMENT" + | "CN_17_INDEPENDENT_PERSONAL_SERVICES" + | "CN_18_DEPENDENT_PERSONAL_SERVICES" + | "CN_42_PUBLIC_ENTERTAINMENT" + | "GB_17_INDEPENDENT_PERSONAL_SERVICES" + | "GB_18_DEPENDENT_PERSONAL_SERVICES" + | "GB_42_PUBLIC_ENTERTAINMENT" + | "IL_16_SCHOLARSHIP_AND_FELLOWSHIP_GRANT" + | "IL_17_INDEPENDENT_PERSONAL_SERVICES" + | "IL_18_DEPENDENT_PERSONAL_SERVICES" + | "IL_42_PUBLIC_ENTERTAINMENT" + | "IN_17_INDEPENDENT_PERSONAL_SERVICES" + | "IN_18_DEPENDENT_PERSONAL_SERVICES" + | "IN_42_PUBLIC_ENTERTAINMENT" + | "MX_17_INDEPENDENT_PERSONAL_SERVICES" + | "MX_18_DEPENDENT_PERSONAL_SERVICES" + | "MX_42_PUBLIC_ENTERTAINMENT"; + +export const TaxTreatyAboundCodeEnum = { + Au17IndependentPersonalServices: "AU_17_INDEPENDENT_PERSONAL_SERVICES", + Au18DependentPersonalServices: "AU_18_DEPENDENT_PERSONAL_SERVICES", + Au42PublicEntertainment: "AU_42_PUBLIC_ENTERTAINMENT", + Ca17IndependentPersonalServices: "CA_17_INDEPENDENT_PERSONAL_SERVICES", + Ca18DependentPersonalServices: "CA_18_DEPENDENT_PERSONAL_SERVICES", + Ca42PublicEntertainment: "CA_42_PUBLIC_ENTERTAINMENT", + Cn17IndependentPersonalServices: "CN_17_INDEPENDENT_PERSONAL_SERVICES", + Cn18DependentPersonalServices: "CN_18_DEPENDENT_PERSONAL_SERVICES", + Cn42PublicEntertainment: "CN_42_PUBLIC_ENTERTAINMENT", + Gb17IndependentPersonalServices: "GB_17_INDEPENDENT_PERSONAL_SERVICES", + Gb18DependentPersonalServices: "GB_18_DEPENDENT_PERSONAL_SERVICES", + Gb42PublicEntertainment: "GB_42_PUBLIC_ENTERTAINMENT", + Il16ScholarshipAndFellowshipGrant: "IL_16_SCHOLARSHIP_AND_FELLOWSHIP_GRANT", + Il17IndependentPersonalServices: "IL_17_INDEPENDENT_PERSONAL_SERVICES", + Il18DependentPersonalServices: "IL_18_DEPENDENT_PERSONAL_SERVICES", + Il42PublicEntertainment: "IL_42_PUBLIC_ENTERTAINMENT", + In17IndependentPersonalServices: "IN_17_INDEPENDENT_PERSONAL_SERVICES", + In18DependentPersonalServices: "IN_18_DEPENDENT_PERSONAL_SERVICES", + In42PublicEntertainment: "IN_42_PUBLIC_ENTERTAINMENT", + Mx17IndependentPersonalServices: "MX_17_INDEPENDENT_PERSONAL_SERVICES", + Mx18DependentPersonalServices: "MX_18_DEPENDENT_PERSONAL_SERVICES", + Mx42PublicEntertainment: "MX_42_PUBLIC_ENTERTAINMENT", +} as const; diff --git a/src/api/resources/types/resources/taxTreaties/types/TaxTreatyBenefitsSchema.ts b/src/api/resources/types/resources/taxTreaties/types/TaxTreatyBenefitsSchema.ts new file mode 100644 index 00000000..01b06fe2 --- /dev/null +++ b/src/api/resources/types/resources/taxTreaties/types/TaxTreatyBenefitsSchema.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../../index"; + +/** + * The tax treaty benefits the payee is claiming. + */ +export interface TaxTreatyBenefitsSchema { + /** The foreign country, adhering to `ISO 3166-2` standards, the payee is claiming treaty benefits as a resident with which the United States has an income tax treaty for payments subject to withholding under chapter 3 or under section 1446(a) or (f). */ + residentCountry: string; + /** The article and paragraph of the tax treaty that cite the provisions the payee is claiming. Max 20 characters. */ + claimedProvision: string; + /** The decimal percentage rate of withholding the tax treaty allows by default. Rates are subject to validation and approval by the Payer. */ + rateOfWithholding: number; + /** The code of the income associated with the claimed rate of withholding. */ + incomeCode: Abound.types.TaxTreatyIncomeCodeEnum; + /** The type of income associated with the claimed rate of withholding. */ + incomeType: "SERVICES"; + /** The additional conditions the payee is claiming under the cited tax treaty. */ + additionalConditions?: string; +} diff --git a/src/api/resources/types/resources/taxTreaties/types/TaxTreatyIncomeCodeEnum.ts b/src/api/resources/types/resources/taxTreaties/types/TaxTreatyIncomeCodeEnum.ts new file mode 100644 index 00000000..699a62dd --- /dev/null +++ b/src/api/resources/types/resources/taxTreaties/types/TaxTreatyIncomeCodeEnum.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type TaxTreatyIncomeCodeEnum = "16" | "17" | "18" | "42"; + +export const TaxTreatyIncomeCodeEnum = { + Sixteen: "16", + Seventeen: "17", + Eighteen: "18", + FortyTwo: "42", +} as const; diff --git a/src/api/resources/types/resources/taxTreaties/types/index.ts b/src/api/resources/types/resources/taxTreaties/types/index.ts new file mode 100644 index 00000000..405b9039 --- /dev/null +++ b/src/api/resources/types/resources/taxTreaties/types/index.ts @@ -0,0 +1,3 @@ +export * from "./TaxTreatyAboundCodeEnum"; +export * from "./TaxTreatyIncomeCodeEnum"; +export * from "./TaxTreatyBenefitsSchema"; diff --git a/src/api/resources/users/client/Client.ts b/src/api/resources/users/client/Client.ts new file mode 100644 index 00000000..aa33e651 --- /dev/null +++ b/src/api/resources/users/client/Client.ts @@ -0,0 +1,390 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Abound from "../../../index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace Users { + interface Options { + environment?: core.Supplier; + sampleKey: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + } +} + +export class Users { + constructor(protected readonly _options: Users.Options) {} + + /** + * Returns a list of users. Up to 100 users are returned per request. + * + * @param {Abound.UsersListRequest} request + * @param {Users.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.users.list() + */ + public async list( + request: Abound.UsersListRequest = {}, + requestOptions?: Users.RequestOptions + ): Promise { + const { page, email, foreignId } = request; + const _queryParams: Record = {}; + if (page != null) { + _queryParams["page"] = page.toString(); + } + + if (email != null) { + _queryParams["email"] = email; + } + + if (foreignId != null) { + _queryParams["foreignId"] = foreignId; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + "/v4/users" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.UserSchema[]; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Creates a user for a single end-user of your application. + * + * @param {Abound.UsersCreateRequest} request + * @param {Users.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.ConflictErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.users.create({ + * body: { + * foreignId: "my-foreign-id" + * } + * }) + */ + public async create( + request: Abound.UsersCreateRequest, + requestOptions?: Users.RequestOptions + ): Promise { + const { "Idempotency-Key": idempotencyKey, body: _body } = request; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + "/v4/users" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined, + }, + contentType: "application/json", + requestType: "json", + body: _body, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.UserSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 409: + throw new Abound.types.ConflictErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Retrieves the details of an existing user. + * + * @param {Abound.types.UserId} userId + * @param {Users.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.InternalServerErrorSchema} + * + * @example + * await client.users.retrieve("userId_sampleXGMFnhOpeR") + */ + public async retrieve( + userId: Abound.types.UserId, + requestOptions?: Users.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/users/${encodeURIComponent(userId)}` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.UserSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 500: + throw new Abound.types.InternalServerErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Updates an existing user. Any body parameters not provided will be removed. + * + * @param {Abound.types.UserId} userId + * @param {Abound.UserRequestSchema} request + * @param {Users.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Abound.types.BadRequestErrorSchema} + * @throws {@link Abound.types.UnauthorizedErrorSchema} + * @throws {@link Abound.types.NotFoundErrorSchema} + * @throws {@link Abound.types.ConflictErrorSchema} + * + * @example + * await client.users.update("userId_sampleXGMFnhOpeR", { + * foreignId: "my-foreign-id" + * }) + */ + public async update( + userId: Abound.types.UserId, + request: Abound.UserRequestSchema, + requestOptions?: Users.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.AboundEnvironment.Production, + `/v4/users/${encodeURIComponent(userId)}` + ), + method: "PUT", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "abound", + "X-Fern-SDK-Version": "6.0.0-alpha.2", + "User-Agent": "abound/6.0.0-alpha.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + requestType: "json", + body: request, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as Abound.UserSchema; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Abound.types.BadRequestErrorSchema( + _response.error.body as Abound.types.ErrorBadRequestSchema + ); + case 401: + throw new Abound.types.UnauthorizedErrorSchema( + _response.error.body as Abound.types.DefaultErrorSchema + ); + case 404: + throw new Abound.types.NotFoundErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + case 409: + throw new Abound.types.ConflictErrorSchema(_response.error.body as Abound.types.DefaultErrorSchema); + default: + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.AboundError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.AboundTimeoutError(); + case "unknown": + throw new errors.AboundError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.sampleKey)}`; + } +} diff --git a/src/api/resources/users/client/index.ts b/src/api/resources/users/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/users/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/users/client/requests/UsersCreateRequest.ts b/src/api/resources/users/client/requests/UsersCreateRequest.ts new file mode 100644 index 00000000..2cef4804 --- /dev/null +++ b/src/api/resources/users/client/requests/UsersCreateRequest.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * { + * body: { + * foreignId: "my-foreign-id" + * } + * } + */ +export interface UsersCreateRequest { + "Idempotency-Key"?: Abound.types.IdempotencyKey | undefined; + body: Abound.UserRequestSchema; +} diff --git a/src/api/resources/users/client/requests/UsersListRequest.ts b/src/api/resources/users/client/requests/UsersListRequest.ts new file mode 100644 index 00000000..739726be --- /dev/null +++ b/src/api/resources/users/client/requests/UsersListRequest.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../../index"; + +/** + * @example + * {} + * + * @example + * {} + */ +export interface UsersListRequest { + page?: Abound.types.Page; + email?: Abound.types.Email; + foreignId?: Abound.types.ForeignId; +} diff --git a/src/api/resources/users/client/requests/index.ts b/src/api/resources/users/client/requests/index.ts new file mode 100644 index 00000000..0212f6c2 --- /dev/null +++ b/src/api/resources/users/client/requests/index.ts @@ -0,0 +1,2 @@ +export { type UsersListRequest } from "./UsersListRequest"; +export { type UsersCreateRequest } from "./UsersCreateRequest"; diff --git a/src/api/resources/users/index.ts b/src/api/resources/users/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/api/resources/users/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/users/types/UserRequestSchema.ts b/src/api/resources/users/types/UserRequestSchema.ts new file mode 100644 index 00000000..3e5251fd --- /dev/null +++ b/src/api/resources/users/types/UserRequestSchema.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * foreignId: "my-foreign-id" + * } + */ +export interface UserRequestSchema { + /** The user's email address. Abound assume's you have taken the proper steps to verify the ownership of this email address. */ + email?: string; + /** The customer-specific unique identifier associated with this user. */ + foreignId?: string; + /** Use metadata for storing additional user data. For filtering, please use `foreignId`. */ + metadata?: Record; +} diff --git a/src/api/resources/users/types/UserSchema.ts b/src/api/resources/users/types/UserSchema.ts new file mode 100644 index 00000000..c1a8f7f3 --- /dev/null +++ b/src/api/resources/users/types/UserSchema.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../../index"; + +/** + * @example + * { + * id: "userId_sampleXGMFnhOpeR", + * createdAt: "2024-01-01T00:00:00.000Z", + * foreignId: "my-foreign-id" + * } + */ +export interface UserSchema extends Abound.UserRequestSchema { + /** The unique identifier for this user. */ + id: string; + /** The creation date and time of the user in `ISO 8601` format. */ + createdAt: string; +} diff --git a/src/api/resources/users/types/index.ts b/src/api/resources/users/types/index.ts new file mode 100644 index 00000000..b069b107 --- /dev/null +++ b/src/api/resources/users/types/index.ts @@ -0,0 +1,2 @@ +export * from "./UserRequestSchema"; +export * from "./UserSchema"; diff --git a/src/api/resources/webhooks/index.ts b/src/api/resources/webhooks/index.ts new file mode 100644 index 00000000..eea524d6 --- /dev/null +++ b/src/api/resources/webhooks/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/src/api/resources/webhooks/types/AboundSignatureHeader.ts b/src/api/resources/webhooks/types/AboundSignatureHeader.ts new file mode 100644 index 00000000..af3c14fb --- /dev/null +++ b/src/api/resources/webhooks/types/AboundSignatureHeader.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * An HMAC signature of the payload + */ +export type AboundSignatureHeader = string; diff --git a/src/api/resources/webhooks/types/WebhookPayloadBaseSchema.ts b/src/api/resources/webhooks/types/WebhookPayloadBaseSchema.ts new file mode 100644 index 00000000..1a70ca78 --- /dev/null +++ b/src/api/resources/webhooks/types/WebhookPayloadBaseSchema.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface WebhookPayloadBaseSchema { + /** The id of the webhook attempt */ + id: string; + /** The id of the webhook event */ + webhookId: string; + /** The date and time in `ISO 8601` format when the webhook attempt was triggered */ + timestamp: string; + /** The id of the resource that triggered the webhook */ + resourceId: string; + /** The URL of the resource that triggered the webhook */ + resourceUrl: string; +} diff --git a/src/api/resources/webhooks/types/index.ts b/src/api/resources/webhooks/types/index.ts new file mode 100644 index 00000000..1c8a3693 --- /dev/null +++ b/src/api/resources/webhooks/types/index.ts @@ -0,0 +1,2 @@ +export * from "./AboundSignatureHeader"; +export * from "./WebhookPayloadBaseSchema"; diff --git a/src/core/auth/BasicAuth.ts b/src/core/auth/BasicAuth.ts new file mode 100644 index 00000000..146df215 --- /dev/null +++ b/src/core/auth/BasicAuth.ts @@ -0,0 +1,31 @@ +import { Base64 } from "js-base64"; + +export interface BasicAuth { + username: string; + password: string; +} + +const BASIC_AUTH_HEADER_PREFIX = /^Basic /i; + +export const BasicAuth = { + toAuthorizationHeader: (basicAuth: BasicAuth | undefined): string | undefined => { + if (basicAuth == null) { + return undefined; + } + const token = Base64.encode(`${basicAuth.username}:${basicAuth.password}`); + return `Basic ${token}`; + }, + fromAuthorizationHeader: (header: string): BasicAuth => { + const credentials = header.replace(BASIC_AUTH_HEADER_PREFIX, ""); + const decoded = Base64.decode(credentials); + const [username, password] = decoded.split(":", 2); + + if (username == null || password == null) { + throw new Error("Invalid basic auth"); + } + return { + username, + password, + }; + }, +}; diff --git a/src/core/auth/BearerToken.ts b/src/core/auth/BearerToken.ts new file mode 100644 index 00000000..fe987fc9 --- /dev/null +++ b/src/core/auth/BearerToken.ts @@ -0,0 +1,15 @@ +export type BearerToken = string; + +const BEARER_AUTH_HEADER_PREFIX = /^Bearer /i; + +export const BearerToken = { + toAuthorizationHeader: (token: BearerToken | undefined): string | undefined => { + if (token == null) { + return undefined; + } + return `Bearer ${token}`; + }, + fromAuthorizationHeader: (header: string): BearerToken => { + return header.replace(BEARER_AUTH_HEADER_PREFIX, "").trim() as BearerToken; + }, +}; diff --git a/src/core/auth/index.ts b/src/core/auth/index.ts new file mode 100644 index 00000000..ee293b34 --- /dev/null +++ b/src/core/auth/index.ts @@ -0,0 +1,2 @@ +export { BasicAuth } from "./BasicAuth"; +export { BearerToken } from "./BearerToken"; diff --git a/src/core/fetcher/APIResponse.ts b/src/core/fetcher/APIResponse.ts new file mode 100644 index 00000000..3664d09e --- /dev/null +++ b/src/core/fetcher/APIResponse.ts @@ -0,0 +1,12 @@ +export type APIResponse = SuccessfulResponse | FailedResponse; + +export interface SuccessfulResponse { + ok: true; + body: T; + headers?: Record; +} + +export interface FailedResponse { + ok: false; + error: T; +} diff --git a/src/core/fetcher/Fetcher.ts b/src/core/fetcher/Fetcher.ts new file mode 100644 index 00000000..d67bc042 --- /dev/null +++ b/src/core/fetcher/Fetcher.ts @@ -0,0 +1,143 @@ +import { APIResponse } from "./APIResponse"; +import { createRequestUrl } from "./createRequestUrl"; +import { getFetchFn } from "./getFetchFn"; +import { getRequestBody } from "./getRequestBody"; +import { getResponseBody } from "./getResponseBody"; +import { makeRequest } from "./makeRequest"; +import { requestWithRetries } from "./requestWithRetries"; + +export type FetchFunction = (args: Fetcher.Args) => Promise>; + +export declare namespace Fetcher { + export interface Args { + url: string; + method: string; + contentType?: string; + headers?: Record; + queryParameters?: Record; + body?: unknown; + timeoutMs?: number; + maxRetries?: number; + withCredentials?: boolean; + abortSignal?: AbortSignal; + requestType?: "json" | "file" | "bytes"; + responseType?: "json" | "blob" | "sse" | "streaming" | "text"; + duplex?: "half"; + } + + export type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError; + + export interface FailedStatusCodeError { + reason: "status-code"; + statusCode: number; + body: unknown; + } + + export interface NonJsonError { + reason: "non-json"; + statusCode: number; + rawBody: string; + } + + export interface TimeoutError { + reason: "timeout"; + } + + export interface UnknownError { + reason: "unknown"; + errorMessage: string; + } +} + +export async function fetcherImpl(args: Fetcher.Args): Promise> { + const headers: Record = {}; + if (args.body !== undefined && args.contentType != null) { + headers["Content-Type"] = args.contentType; + } + + if (args.headers != null) { + for (const [key, value] of Object.entries(args.headers)) { + if (value != null) { + headers[key] = value; + } + } + } + + const url = createRequestUrl(args.url, args.queryParameters); + let requestBody: BodyInit | undefined = await getRequestBody({ + body: args.body, + type: args.requestType === "json" ? "json" : "other", + }); + const fetchFn = await getFetchFn(); + + try { + const response = await requestWithRetries( + async () => + makeRequest( + fetchFn, + url, + args.method, + headers, + requestBody, + args.timeoutMs, + args.abortSignal, + args.withCredentials, + args.duplex + ), + args.maxRetries + ); + let responseBody = await getResponseBody(response, args.responseType); + + if (response.status >= 200 && response.status < 400) { + return { + ok: true, + body: responseBody as R, + headers: response.headers, + }; + } else { + return { + ok: false, + error: { + reason: "status-code", + statusCode: response.status, + body: responseBody, + }, + }; + } + } catch (error) { + if (args.abortSignal != null && args.abortSignal.aborted) { + return { + ok: false, + error: { + reason: "unknown", + errorMessage: "The user aborted a request", + }, + }; + } else if (error instanceof Error && error.name === "AbortError") { + return { + ok: false, + error: { + reason: "timeout", + }, + }; + } else if (error instanceof Error) { + return { + ok: false, + error: { + reason: "unknown", + errorMessage: error.message, + }, + }; + } + + return { + ok: false, + error: { + reason: "unknown", + errorMessage: JSON.stringify(error), + }, + }; + } +} + +export const fetcher: FetchFunction = fetcherImpl; diff --git a/src/core/fetcher/Supplier.ts b/src/core/fetcher/Supplier.ts new file mode 100644 index 00000000..867c931c --- /dev/null +++ b/src/core/fetcher/Supplier.ts @@ -0,0 +1,11 @@ +export type Supplier = T | Promise | (() => T | Promise); + +export const Supplier = { + get: async (supplier: Supplier): Promise => { + if (typeof supplier === "function") { + return (supplier as () => T)(); + } else { + return supplier; + } + }, +}; diff --git a/src/core/fetcher/createRequestUrl.ts b/src/core/fetcher/createRequestUrl.ts new file mode 100644 index 00000000..9288a99b --- /dev/null +++ b/src/core/fetcher/createRequestUrl.ts @@ -0,0 +1,10 @@ +import qs from "qs"; + +export function createRequestUrl( + baseUrl: string, + queryParameters?: Record +): string { + return Object.keys(queryParameters ?? {}).length > 0 + ? `${baseUrl}?${qs.stringify(queryParameters, { arrayFormat: "repeat" })}` + : baseUrl; +} diff --git a/src/core/fetcher/getFetchFn.ts b/src/core/fetcher/getFetchFn.ts new file mode 100644 index 00000000..9fd9bfc4 --- /dev/null +++ b/src/core/fetcher/getFetchFn.ts @@ -0,0 +1,25 @@ +import { RUNTIME } from "../runtime"; + +/** + * Returns a fetch function based on the runtime + */ +export async function getFetchFn(): Promise { + // In Node.js 18+ environments, use native fetch + if (RUNTIME.type === "node" && RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) { + return fetch; + } + + // In Node.js 18 or lower environments, the SDK always uses`node-fetch`. + if (RUNTIME.type === "node") { + return (await import("node-fetch")).default as any; + } + + // Otherwise the SDK uses global fetch if available, + // and falls back to node-fetch. + if (typeof fetch == "function") { + return fetch; + } + + // Defaults to node `node-fetch` if global fetch isn't available + return (await import("node-fetch")).default as any; +} diff --git a/src/core/fetcher/getHeader.ts b/src/core/fetcher/getHeader.ts new file mode 100644 index 00000000..50f922b0 --- /dev/null +++ b/src/core/fetcher/getHeader.ts @@ -0,0 +1,8 @@ +export function getHeader(headers: Record, header: string): string | undefined { + for (const [headerKey, headerValue] of Object.entries(headers)) { + if (headerKey.toLowerCase() === header.toLowerCase()) { + return headerValue; + } + } + return undefined; +} diff --git a/src/core/fetcher/getRequestBody.ts b/src/core/fetcher/getRequestBody.ts new file mode 100644 index 00000000..1138414b --- /dev/null +++ b/src/core/fetcher/getRequestBody.ts @@ -0,0 +1,14 @@ +export declare namespace GetRequestBody { + interface Args { + body: unknown; + type: "json" | "file" | "bytes" | "other"; + } +} + +export async function getRequestBody({ body, type }: GetRequestBody.Args): Promise { + if (type.includes("json")) { + return JSON.stringify(body); + } else { + return body as BodyInit; + } +} diff --git a/src/core/fetcher/getResponseBody.ts b/src/core/fetcher/getResponseBody.ts new file mode 100644 index 00000000..a7a9c508 --- /dev/null +++ b/src/core/fetcher/getResponseBody.ts @@ -0,0 +1,32 @@ +import { chooseStreamWrapper } from "./stream-wrappers/chooseStreamWrapper"; + +export async function getResponseBody(response: Response, responseType?: string): Promise { + if (response.body != null && responseType === "blob") { + return await response.blob(); + } else if (response.body != null && responseType === "sse") { + return response.body; + } else if (response.body != null && responseType === "streaming") { + return chooseStreamWrapper(response.body); + } else if (response.body != null && responseType === "text") { + return await response.text(); + } else { + const text = await response.text(); + if (text.length > 0) { + try { + let responseBody = JSON.parse(text); + return responseBody; + } catch (err) { + return { + ok: false, + error: { + reason: "non-json", + statusCode: response.status, + rawBody: text, + }, + }; + } + } else { + return undefined; + } + } +} diff --git a/src/core/fetcher/index.ts b/src/core/fetcher/index.ts new file mode 100644 index 00000000..2d658ca4 --- /dev/null +++ b/src/core/fetcher/index.ts @@ -0,0 +1,5 @@ +export type { APIResponse } from "./APIResponse"; +export { fetcher } from "./Fetcher"; +export type { Fetcher, FetchFunction } from "./Fetcher"; +export { getHeader } from "./getHeader"; +export { Supplier } from "./Supplier"; diff --git a/src/core/fetcher/makeRequest.ts b/src/core/fetcher/makeRequest.ts new file mode 100644 index 00000000..8fb4bace --- /dev/null +++ b/src/core/fetcher/makeRequest.ts @@ -0,0 +1,44 @@ +import { anySignal, getTimeoutSignal } from "./signals"; + +export const makeRequest = async ( + fetchFn: (url: string, init: RequestInit) => Promise, + url: string, + method: string, + headers: Record, + requestBody: BodyInit | undefined, + timeoutMs?: number, + abortSignal?: AbortSignal, + withCredentials?: boolean, + duplex?: "half" +): Promise => { + const signals: AbortSignal[] = []; + + // Add timeout signal + let timeoutAbortId: NodeJS.Timeout | undefined = undefined; + if (timeoutMs != null) { + const { signal, abortId } = getTimeoutSignal(timeoutMs); + timeoutAbortId = abortId; + signals.push(signal); + } + + // Add arbitrary signal + if (abortSignal != null) { + signals.push(abortSignal); + } + let newSignals = anySignal(signals); + const response = await fetchFn(url, { + method: method, + headers, + body: requestBody, + signal: newSignals, + credentials: withCredentials ? "include" : undefined, + // @ts-ignore + duplex, + }); + + if (timeoutAbortId != null) { + clearTimeout(timeoutAbortId); + } + + return response; +}; diff --git a/src/core/fetcher/requestWithRetries.ts b/src/core/fetcher/requestWithRetries.ts new file mode 100644 index 00000000..ff5dc3bb --- /dev/null +++ b/src/core/fetcher/requestWithRetries.ts @@ -0,0 +1,21 @@ +const INITIAL_RETRY_DELAY = 1; +const MAX_RETRY_DELAY = 60; +const DEFAULT_MAX_RETRIES = 2; + +export async function requestWithRetries( + requestFn: () => Promise, + maxRetries: number = DEFAULT_MAX_RETRIES +): Promise { + let response: Response = await requestFn(); + + for (let i = 0; i < maxRetries; ++i) { + if ([408, 409, 429].includes(response.status) || response.status >= 500) { + const delay = Math.min(INITIAL_RETRY_DELAY * Math.pow(2, i), MAX_RETRY_DELAY); + await new Promise((resolve) => setTimeout(resolve, delay)); + response = await requestFn(); + } else { + break; + } + } + return response!; +} diff --git a/src/core/fetcher/signals.ts b/src/core/fetcher/signals.ts new file mode 100644 index 00000000..6c124ff7 --- /dev/null +++ b/src/core/fetcher/signals.ts @@ -0,0 +1,38 @@ +const TIMEOUT = "timeout"; + +export function getTimeoutSignal(timeoutMs: number): { signal: AbortSignal; abortId: NodeJS.Timeout } { + const controller = new AbortController(); + const abortId = setTimeout(() => controller.abort(TIMEOUT), timeoutMs); + return { signal: controller.signal, abortId }; +} + +/** + * Returns an abort signal that is getting aborted when + * at least one of the specified abort signals is aborted. + * + * Requires at least node.js 18. + */ +export function anySignal(...args: AbortSignal[] | [AbortSignal[]]): AbortSignal { + // Allowing signals to be passed either as array + // of signals or as multiple arguments. + const signals = (args.length === 1 && Array.isArray(args[0]) ? args[0] : args); + + const controller = new AbortController(); + + for (const signal of signals) { + if (signal.aborted) { + // Exiting early if one of the signals + // is already aborted. + controller.abort((signal as any)?.reason); + break; + } + + // Listening for signals and removing the listeners + // when at least one symbol is aborted. + signal.addEventListener("abort", () => controller.abort((signal as any)?.reason), { + signal: controller.signal, + }); + } + + return controller.signal; +} diff --git a/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts b/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts new file mode 100644 index 00000000..e5db8734 --- /dev/null +++ b/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts @@ -0,0 +1,252 @@ +import type { Writable } from "stream"; +import { EventCallback, StreamWrapper } from "./chooseStreamWrapper"; + +export class Node18UniversalStreamWrapper + implements + StreamWrapper | Writable | WritableStream, ReadFormat> +{ + private readableStream: ReadableStream; + private reader: ReadableStreamDefaultReader; + private events: Record; + private paused: boolean; + private resumeCallback: ((value?: unknown) => void) | null; + private encoding: string | null; + + constructor(readableStream: ReadableStream) { + this.readableStream = readableStream; + this.reader = this.readableStream.getReader(); + this.events = { + data: [], + end: [], + error: [], + readable: [], + close: [], + pause: [], + resume: [], + }; + this.paused = false; + this.resumeCallback = null; + this.encoding = null; + } + + public on(event: string, callback: EventCallback): void { + this.events[event]?.push(callback); + } + + public off(event: string, callback: EventCallback): void { + this.events[event] = this.events[event]?.filter((cb) => cb !== callback); + } + + public pipe( + dest: Node18UniversalStreamWrapper | Writable | WritableStream + ): Node18UniversalStreamWrapper | Writable | WritableStream { + this.on("data", async (chunk) => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._write(chunk); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.write(chunk).then(() => writer.releaseLock()); + } else { + dest.write(chunk); + } + }); + + this.on("end", async () => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._end(); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.close(); + } else { + dest.end(); + } + }); + + this.on("error", async (error) => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._error(error); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.abort(error); + } else { + dest.destroy(error); + } + }); + + this._startReading(); + + return dest; + } + + public pipeTo( + dest: Node18UniversalStreamWrapper | Writable | WritableStream + ): Node18UniversalStreamWrapper | Writable | WritableStream { + return this.pipe(dest); + } + + public unpipe(dest: Node18UniversalStreamWrapper | Writable | WritableStream): void { + this.off("data", async (chunk) => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._write(chunk); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.write(chunk).then(() => writer.releaseLock()); + } else { + dest.write(chunk); + } + }); + + this.off("end", async () => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._end(); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.close(); + } else { + dest.end(); + } + }); + + this.off("error", async (error) => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._error(error); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.abort(error); + } else { + dest.destroy(error); + } + }); + } + + public destroy(error?: Error): void { + this.reader + .cancel(error) + .then(() => { + this._emit("close"); + }) + .catch((err) => { + this._emit("error", err); + }); + } + + public pause(): void { + this.paused = true; + this._emit("pause"); + } + + public resume(): void { + if (this.paused) { + this.paused = false; + this._emit("resume"); + if (this.resumeCallback) { + this.resumeCallback(); + this.resumeCallback = null; + } + } + } + + public get isPaused(): boolean { + return this.paused; + } + + public async read(): Promise { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + + if (done) { + return undefined; + } + return value; + } + + public setEncoding(encoding: string): void { + this.encoding = encoding; + } + + public async text(): Promise { + const chunks: ReadFormat[] = []; + + while (true) { + const { done, value } = await this.reader.read(); + if (done) break; + if (value) chunks.push(value); + } + + const decoder = new TextDecoder(this.encoding || "utf-8"); + return decoder.decode(await new Blob(chunks).arrayBuffer()); + } + + public async json(): Promise { + const text = await this.text(); + return JSON.parse(text); + } + + private _write(chunk: ReadFormat): void { + this._emit("data", chunk); + } + + private _end(): void { + this._emit("end"); + } + + private _error(error: any): void { + this._emit("error", error); + } + + private _emit(event: string, data?: any): void { + if (this.events[event]) { + for (const callback of this.events[event] || []) { + callback(data); + } + } + } + + private async _startReading(): Promise { + try { + this._emit("readable"); + while (true) { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + if (done) { + this._emit("end"); + this._emit("close"); + break; + } + if (value) { + this._emit("data", value); + } + } + } catch (error) { + this._emit("error", error); + } + } + + [Symbol.asyncIterator](): AsyncIterableIterator { + return { + next: async () => { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + if (done) { + return { done: true, value: undefined }; + } + return { done: false, value }; + }, + [Symbol.asyncIterator]() { + return this; + }, + }; + } +} diff --git a/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts b/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts new file mode 100644 index 00000000..f9bead21 --- /dev/null +++ b/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts @@ -0,0 +1,106 @@ +import type { Readable, Writable } from "stream"; +import { EventCallback, StreamWrapper } from "./chooseStreamWrapper"; + +export class NodePre18StreamWrapper implements StreamWrapper { + private readableStream: Readable; + private encoding: string | undefined; + + constructor(readableStream: Readable) { + this.readableStream = readableStream; + } + + public on(event: string, callback: EventCallback): void { + this.readableStream.on(event, callback); + } + + public off(event: string, callback: EventCallback): void { + this.readableStream.off(event, callback); + } + + public pipe(dest: Writable): Writable { + this.readableStream.pipe(dest); + return dest; + } + + public pipeTo(dest: Writable): Writable { + return this.pipe(dest); + } + + public unpipe(dest?: Writable): void { + if (dest) { + this.readableStream.unpipe(dest); + } else { + this.readableStream.unpipe(); + } + } + + public destroy(error?: Error): void { + this.readableStream.destroy(error); + } + + public pause(): void { + this.readableStream.pause(); + } + + public resume(): void { + this.readableStream.resume(); + } + + public get isPaused(): boolean { + return this.readableStream.isPaused(); + } + + public async read(): Promise { + return new Promise((resolve, reject) => { + const chunk = this.readableStream.read(); + if (chunk) { + resolve(chunk); + } else { + this.readableStream.once("readable", () => { + const chunk = this.readableStream.read(); + resolve(chunk); + }); + this.readableStream.once("error", reject); + } + }); + } + + public setEncoding(encoding?: string): void { + this.readableStream.setEncoding(encoding as BufferEncoding); + this.encoding = encoding; + } + + public async text(): Promise { + const chunks: Uint8Array[] = []; + const encoder = new TextEncoder(); + this.readableStream.setEncoding((this.encoding || "utf-8") as BufferEncoding); + + for await (const chunk of this.readableStream) { + chunks.push(encoder.encode(chunk)); + } + + const decoder = new TextDecoder(this.encoding || "utf-8"); + return decoder.decode(Buffer.concat(chunks)); + } + + public async json(): Promise { + const text = await this.text(); + return JSON.parse(text); + } + + public [Symbol.asyncIterator](): AsyncIterableIterator { + const readableStream = this.readableStream; + const iterator = readableStream[Symbol.asyncIterator](); + + // Create and return an async iterator that yields buffers + return { + async next(): Promise> { + const { value, done } = await iterator.next(); + return { value: value as Buffer, done }; + }, + [Symbol.asyncIterator]() { + return this; + }, + }; + } +} diff --git a/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts b/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts new file mode 100644 index 00000000..7a52805d --- /dev/null +++ b/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts @@ -0,0 +1,239 @@ +import { StreamWrapper } from "./chooseStreamWrapper"; + +type EventCallback = (data?: any) => void; + +export class UndiciStreamWrapper + implements StreamWrapper | WritableStream, ReadFormat> +{ + private readableStream: ReadableStream; + private reader: ReadableStreamDefaultReader; + private events: Record; + private paused: boolean; + private resumeCallback: ((value?: unknown) => void) | null; + private encoding: string | null; + + constructor(readableStream: ReadableStream) { + this.readableStream = readableStream; + this.reader = this.readableStream.getReader(); + this.events = { + data: [], + end: [], + error: [], + readable: [], + close: [], + pause: [], + resume: [], + }; + this.paused = false; + this.resumeCallback = null; + this.encoding = null; + } + + public on(event: string, callback: EventCallback): void { + this.events[event]?.push(callback); + } + + public off(event: string, callback: EventCallback): void { + this.events[event] = this.events[event]?.filter((cb) => cb !== callback); + } + + public pipe( + dest: UndiciStreamWrapper | WritableStream + ): UndiciStreamWrapper | WritableStream { + this.on("data", (chunk) => { + if (dest instanceof UndiciStreamWrapper) { + dest._write(chunk); + } else { + const writer = dest.getWriter(); + writer.write(chunk).then(() => writer.releaseLock()); + } + }); + + this.on("end", () => { + if (dest instanceof UndiciStreamWrapper) { + dest._end(); + } else { + const writer = dest.getWriter(); + writer.close(); + } + }); + + this.on("error", (error) => { + if (dest instanceof UndiciStreamWrapper) { + dest._error(error); + } else { + const writer = dest.getWriter(); + writer.abort(error); + } + }); + + this._startReading(); + + return dest; + } + + public pipeTo( + dest: UndiciStreamWrapper | WritableStream + ): UndiciStreamWrapper | WritableStream { + return this.pipe(dest); + } + + public unpipe(dest: UndiciStreamWrapper | WritableStream): void { + this.off("data", (chunk) => { + if (dest instanceof UndiciStreamWrapper) { + dest._write(chunk); + } else { + const writer = dest.getWriter(); + writer.write(chunk).then(() => writer.releaseLock()); + } + }); + + this.off("end", () => { + if (dest instanceof UndiciStreamWrapper) { + dest._end(); + } else { + const writer = dest.getWriter(); + writer.close(); + } + }); + + this.off("error", (error) => { + if (dest instanceof UndiciStreamWrapper) { + dest._error(error); + } else { + const writer = dest.getWriter(); + writer.abort(error); + } + }); + } + + public destroy(error?: Error): void { + this.reader + .cancel(error) + .then(() => { + this._emit("close"); + }) + .catch((err) => { + this._emit("error", err); + }); + } + + public pause(): void { + this.paused = true; + this._emit("pause"); + } + + public resume(): void { + if (this.paused) { + this.paused = false; + this._emit("resume"); + if (this.resumeCallback) { + this.resumeCallback(); + this.resumeCallback = null; + } + } + } + + public get isPaused(): boolean { + return this.paused; + } + + public async read(): Promise { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + if (done) { + return undefined; + } + return value; + } + + public setEncoding(encoding: string): void { + this.encoding = encoding; + } + + public async text(): Promise { + const chunks: BlobPart[] = []; + + while (true) { + const { done, value } = await this.reader.read(); + if (done) break; + if (value) chunks.push(value); + } + + const decoder = new TextDecoder(this.encoding || "utf-8"); + return decoder.decode(await new Blob(chunks).arrayBuffer()); + } + + public async json(): Promise { + const text = await this.text(); + return JSON.parse(text); + } + + private _write(chunk: ReadFormat): void { + this._emit("data", chunk); + } + + private _end(): void { + this._emit("end"); + } + + private _error(error: any): void { + this._emit("error", error); + } + + private _emit(event: string, data?: any): void { + if (this.events[event]) { + for (const callback of this.events[event] || []) { + callback(data); + } + } + } + + private async _startReading(): Promise { + try { + this._emit("readable"); + while (true) { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + if (done) { + this._emit("end"); + this._emit("close"); + break; + } + if (value) { + this._emit("data", value); + } + } + } catch (error) { + this._emit("error", error); + } + } + + [Symbol.asyncIterator](): AsyncIterableIterator { + return { + next: async () => { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + if (done) { + return { done: true, value: undefined }; + } + return { done: false, value }; + }, + [Symbol.asyncIterator]() { + return this; + }, + }; + } +} diff --git a/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts b/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts new file mode 100644 index 00000000..d60991da --- /dev/null +++ b/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts @@ -0,0 +1,33 @@ +import type { Readable } from "stream"; +import { RUNTIME } from "../../runtime"; + +export type EventCallback = (data?: any) => void; + +export interface StreamWrapper { + setEncoding(encoding?: string): void; + on(event: string, callback: EventCallback): void; + off(event: string, callback: EventCallback): void; + pipe(dest: WritableStream): WritableStream; + pipeTo(dest: WritableStream): WritableStream; + unpipe(dest?: WritableStream): void; + destroy(error?: Error): void; + pause(): void; + resume(): void; + get isPaused(): boolean; + read(): Promise; + text(): Promise; + json(): Promise; + [Symbol.asyncIterator](): AsyncIterableIterator; +} + +export async function chooseStreamWrapper(responseBody: any): Promise>> { + if (RUNTIME.type === "node" && RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) { + return new (await import("./Node18UniversalStreamWrapper")).Node18UniversalStreamWrapper( + responseBody as ReadableStream + ); + } else if (RUNTIME.type !== "node" && typeof fetch == "function") { + return new (await import("./UndiciStreamWrapper")).UndiciStreamWrapper(responseBody as ReadableStream); + } else { + return new (await import("./NodePre18StreamWrapper")).NodePre18StreamWrapper(responseBody as Readable); + } +} diff --git a/src/core/index.ts b/src/core/index.ts new file mode 100644 index 00000000..c752c6a6 --- /dev/null +++ b/src/core/index.ts @@ -0,0 +1,3 @@ +export * from "./fetcher"; +export * from "./auth"; +export * from "./runtime"; diff --git a/src/core/runtime/index.ts b/src/core/runtime/index.ts new file mode 100644 index 00000000..5c76dbb1 --- /dev/null +++ b/src/core/runtime/index.ts @@ -0,0 +1 @@ +export { RUNTIME } from "./runtime"; diff --git a/src/core/runtime/runtime.ts b/src/core/runtime/runtime.ts new file mode 100644 index 00000000..4d0687e8 --- /dev/null +++ b/src/core/runtime/runtime.ts @@ -0,0 +1,126 @@ +interface DenoGlobal { + version: { + deno: string; + }; +} + +interface BunGlobal { + version: string; +} + +declare const Deno: DenoGlobal; +declare const Bun: BunGlobal; + +/** + * A constant that indicates whether the environment the code is running is a Web Browser. + */ +const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; + +/** + * A constant that indicates whether the environment the code is running is a Web Worker. + */ +const isWebWorker = + typeof self === "object" && + // @ts-ignore + typeof self?.importScripts === "function" && + (self.constructor?.name === "DedicatedWorkerGlobalScope" || + self.constructor?.name === "ServiceWorkerGlobalScope" || + self.constructor?.name === "SharedWorkerGlobalScope"); + +/** + * A constant that indicates whether the environment the code is running is Deno. + */ +const isDeno = + typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; + +/** + * A constant that indicates whether the environment the code is running is Bun.sh. + */ +const isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; + +/** + * A constant that indicates whether the environment the code is running is Node.JS. + */ +const isNode = + typeof process !== "undefined" && + Boolean(process.version) && + Boolean(process.versions?.node) && + // Deno spoofs process.versions.node, see https://deno.land/std@0.177.0/node/process.ts?s=versions + !isDeno && + !isBun; + +/** + * A constant that indicates whether the environment the code is running is in React-Native. + * https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js + */ +const isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; + +/** + * A constant that indicates whether the environment the code is running is Cloudflare. + * https://developers.cloudflare.com/workers/runtime-apis/web-standards/#navigatoruseragent + */ +const isCloudflare = typeof globalThis !== "undefined" && globalThis?.navigator?.userAgent === "Cloudflare-Workers"; + +/** + * A constant that indicates which environment and version the SDK is running in. + */ +export const RUNTIME: Runtime = evaluateRuntime(); + +export interface Runtime { + type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown" | "workerd"; + version?: string; + parsedVersion?: number; +} + +function evaluateRuntime(): Runtime { + if (isBrowser) { + return { + type: "browser", + version: window.navigator.userAgent, + }; + } + + if (isCloudflare) { + return { + type: "workerd", + }; + } + + if (isWebWorker) { + return { + type: "web-worker", + }; + } + + if (isDeno) { + return { + type: "deno", + version: Deno.version.deno, + }; + } + + if (isBun) { + return { + type: "bun", + version: Bun.version, + }; + } + + if (isNode) { + return { + type: "node", + version: process.versions.node, + parsedVersion: Number(process.versions.node.split(".")[0]), + }; + } + + if (isReactNative) { + return { + type: "react-native", + }; + } + + return { + type: "unknown", + }; +} diff --git a/src/environments.ts b/src/environments.ts new file mode 100644 index 00000000..f2117718 --- /dev/null +++ b/src/environments.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export const AboundEnvironment = { + Production: "https://production-api.withabound.com", + Sandbox: "https://sandbox-api.withabound.com", +} as const; + +export type AboundEnvironment = typeof AboundEnvironment.Production | typeof AboundEnvironment.Sandbox; diff --git a/src/errors/AboundError.ts b/src/errors/AboundError.ts new file mode 100644 index 00000000..c177f688 --- /dev/null +++ b/src/errors/AboundError.ts @@ -0,0 +1,45 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export class AboundError extends Error { + readonly statusCode?: number; + readonly body?: unknown; + + constructor({ message, statusCode, body }: { message?: string; statusCode?: number; body?: unknown }) { + super(buildMessage({ message, statusCode, body })); + Object.setPrototypeOf(this, AboundError.prototype); + if (statusCode != null) { + this.statusCode = statusCode; + } + + if (body !== undefined) { + this.body = body; + } + } +} + +function buildMessage({ + message, + statusCode, + body, +}: { + message: string | undefined; + statusCode: number | undefined; + body: unknown | undefined; +}): string { + let lines: string[] = []; + if (message != null) { + lines.push(message); + } + + if (statusCode != null) { + lines.push(`Status code: ${statusCode.toString()}`); + } + + if (body != null) { + lines.push(`Body: ${JSON.stringify(body, undefined, 2)}`); + } + + return lines.join("\n"); +} diff --git a/src/errors/AboundTimeoutError.ts b/src/errors/AboundTimeoutError.ts new file mode 100644 index 00000000..d2e956b4 --- /dev/null +++ b/src/errors/AboundTimeoutError.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export class AboundTimeoutError extends Error { + constructor() { + super("Timeout"); + Object.setPrototypeOf(this, AboundTimeoutError.prototype); + } +} diff --git a/src/errors/index.ts b/src/errors/index.ts new file mode 100644 index 00000000..b1cd7f85 --- /dev/null +++ b/src/errors/index.ts @@ -0,0 +1,2 @@ +export { AboundError } from "./AboundError"; +export { AboundTimeoutError } from "./AboundTimeoutError"; diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 00000000..dfe48240 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,4 @@ +export * as Abound from "./api"; +export { AboundClient } from "./Client"; +export { AboundEnvironment } from "./environments"; +export { AboundError, AboundTimeoutError } from "./errors"; diff --git a/src/resources/1099-int.test.ts b/src/resources/1099-int.test.ts deleted file mode 100644 index 738cc4a5..00000000 --- a/src/resources/1099-int.test.ts +++ /dev/null @@ -1,803 +0,0 @@ -import { describe, expect, test } from "vitest"; -import { Abound } from "../abound.js"; -import { - invalidConfig, - matchers, - sampleConfig, - singular, -} from "../test-utils.js"; - -const slug = "1099-int"; -const resource = "form1099Int"; -const sampleId = "documentId_samplexc6Aw2Qr9R"; - -const request = { - filingYear: new Date().getFullYear() - 1, - payer: { - name: "Hooli, Inc.", - name2: "Hooli", - tin: "111111111", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - phoneNumber: "6501014096", - }, - payee: { - name: "Ada Lovelace", - name2: "InGen Corporation", - tin: "000000000", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, - formFields: { - hasFatcaFilingRequirement: true, - accountNumber: "1234567890", - payersRoutingNumber: "054000030", - interestIncome: 83_232, - earlyWithdrawalPenalty: 23_223, - usSavingsBondsInterest: 19_423, - federalIncomeTaxWithheld: 0, - investmentExpenses: 19_423, - foreignTaxPaid: 19_423, - foreignTaxPaidCountry: "FR", - taxExemptInterest: 19_423, - specifiedPrivateActivityBondInterest: 19_423, - marketDiscount: 19_423, - bondPremium: 19_423, - bondPremiumTreasury: 19_423, - bondPremiumTaxExemptBond: 19_423, - stateTaxInfo: [ - { - filingState: "CA" as const, - payeeStateId: "1234567891", - payerStateId: "1234567891", - stateTaxWithheld: 0, - }, - ], - }, - userId: "userId_sampleXGMFnhOpeR", -}; - -const invalidRequest = { - payer: {}, - payee: {}, - formFields: {}, - userId: 1000, -}; - -const mailingRequest = { - to: { - name: "Ada Lovelace", - name2: "InGen Corporation", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, - from: { - name: "Hooli, Inc.", - name2: "Hooli", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, -}; - -describe(`abound.${resource}.create()`, () => { - test("throws an error when the sdk config is invalid", async () => { - // Arrange - const abound = new Abound(invalidConfig); - - // Act & Assert - await expect(async () => - abound[resource].create(request) - ).rejects.toThrowErrorMatchingInlineSnapshot( - `[Error: Your app is not authorized to do this (Code 6b6d7bbe)]` - ); - }); - - test(`throws a bad request error when creating an invalid ${singular( - resource - )}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act & Assert - // @ts-expect-error required for test case - await expect(async () => abound[resource].create(invalidRequest)).rejects - .toThrowErrorMatchingInlineSnapshot(` - AboundBadRequest { - "errors": [ - { - "field": "filingYear", - "message": "Expected filingYear to be of type number, but received undefined", - }, - { - "field": "payer.name", - "message": "Expected payer.name to be of type string, but received undefined", - }, - { - "field": "payer.tin", - "message": "Expected payer.tin to be of type string, but received undefined", - }, - { - "field": "payer.address", - "message": "Expected payer.address to be of type string, but received undefined", - }, - { - "field": "payer.country", - "message": "Expected payer.country to be of type string, but received undefined", - }, - { - "field": "payer.phoneNumber", - "message": "Expected payer.phoneNumber to be of type string, but received undefined", - }, - { - "field": "payee.name", - "message": "Expected payee.name to be of type string, but received undefined", - }, - { - "field": "payee.tin", - "message": "Expected payee.tin to be of type string, but received undefined", - }, - { - "field": "payee.address", - "message": "Expected payee.address to be of type string, but received undefined", - }, - { - "field": "payee.country", - "message": "Expected payee.country to be of type string, but received undefined", - }, - { - "field": "formFields.stateTaxInfo", - "message": "Expected formFields.stateTaxInfo to be of type array, but received undefined", - }, - { - "field": "userId", - "message": "Expected userId to be of type string, but received number", - }, - ], - } - `); - }); - - test(`creates a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].create(request); - - // Assert - expect(response).toMatchInlineSnapshot( - { - filingYear: expect.any(Number) as number, - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - payeeUrl: expect.stringContaining( - "-FORM-1099-INT-COPY-B.pdf" - ) as string, - payerUrl: expect.stringContaining( - "-FORM-1099-INT-COPY-C.pdf" - ) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "filingYear": Any, - "formFields": { - "accountNumber": "1234567890", - "bondPremium": 19423, - "bondPremiumTaxExemptBond": 19423, - "bondPremiumTreasury": 19423, - "earlyWithdrawalPenalty": 23223, - "federalIncomeTaxWithheld": 0, - "foreignTaxPaid": 19423, - "foreignTaxPaidCountry": "FR", - "hasFatcaFilingRequirement": true, - "interestIncome": 83232, - "investmentExpenses": 19423, - "isCorrected": false, - "isVoid": false, - "marketDiscount": 19423, - "payersRoutingNumber": "054000030", - "specifiedPrivateActivityBondInterest": 19423, - "stateTaxInfo": [ - { - "filingState": "CA", - "payeeStateId": "1234567891", - "stateTaxWithheld": 0, - }, - ], - "taxExemptInterest": 19423, - "usSavingsBondsInterest": 19423, - }, - "id": "documentId_samplepWpJ9Snlzb", - "payee": { - "address": "256 Byron Street", - "address2": "Suite 32", - "city": "Palo Alto", - "country": "US", - "name": "Ada Lovelace", - "name2": "InGen Corporation", - "postalCode": "94306", - "state": "CA", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - "tinVerificationId": "tinVerificationId_sample41SD71AV8f", - "tinVerificationStatus": "MATCH", - }, - "payeeUrl": StringContaining "-FORM-1099-INT-COPY-B.pdf", - "payer": { - "address": "256 Byron Street", - "address2": "Suite 32", - "city": "Palo Alto", - "country": "US", - "name": "Hooli, Inc.", - "name2": "Hooli", - "phoneNumber": "6501014096", - "postalCode": "94306", - "state": "CA", - "tin": "*******11", - "tinFingerprint": "tinFingerprint_sample847jI1LwxF", - "tinType": "BUSINESS", - "tinVerificationId": "tinVerificationId_sample1b0E6efa89", - "tinVerificationStatus": "MATCH", - }, - "payerUrl": StringContaining "-FORM-1099-INT-COPY-C.pdf", - "status": "CREATED", - "userId": "userId_sampleXGMFnhOpeR", - } - ` - ); - }); -}); - -describe(`abound.${resource}.list()`, () => { - test("throws a bad request error when the page query string parameter is invalid", async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act & Assert - await expect(async () => - abound[resource].list({ - // @ts-expect-error required for test case - page: "invalid_page", - }) - ).rejects.toThrowErrorMatchingInlineSnapshot(` - AboundBadRequest { - "errors": [ - { - "field": "page", - "message": "Expected page query string parameter to be a number greater than or equal to 1, but received invalid_page", - }, - ], - } - `); - }); - - test(`lists ${slug}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].list(); - - // Assert - expect(response.at(0)).toMatchInlineSnapshot( - { - filingYear: expect.any(Number) as number, - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - payeeUrl: expect.stringContaining( - "-FORM-1099-INT-COPY-B.pdf" - ) as string, - payerUrl: expect.stringContaining( - "-FORM-1099-INT-COPY-C.pdf" - ) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "filingYear": Any, - "formFields": { - "accountNumber": "A006SVmcrieFAbm3gsaV", - "bondPremium": 19423, - "bondPremiumTaxExemptBond": 19423, - "bondPremiumTreasury": 19423, - "earlyWithdrawalPenalty": 23223, - "federalIncomeTaxWithheld": 0, - "foreignTaxPaid": 19423, - "foreignTaxPaidCountry": "FR", - "hasFatcaFilingRequirement": true, - "interestIncome": 83232, - "investmentExpenses": 19423, - "isCorrected": false, - "isVoid": false, - "marketDiscount": 19423, - "payersRoutingNumber": "054000030", - "specifiedPrivateActivityBondInterest": 19423, - "stateTaxInfo": [ - { - "filingState": "CA", - "payeeStateId": "1234567891", - "stateTaxWithheld": 0, - }, - ], - "taxExemptInterest": 19423, - "usSavingsBondsInterest": 19423, - }, - "id": "documentId_samplepWpJ9Snlzb", - "payee": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Ada Lovelace", - "postalCode": "94043", - "state": "CA", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - "tinVerificationId": "tinVerificationId_sample41SD71AV8f", - "tinVerificationStatus": "MATCH", - }, - "payeeUrl": StringContaining "-FORM-1099-INT-COPY-B.pdf", - "payer": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Hooli", - "phoneNumber": "6501014096", - "postalCode": "94043", - "state": "CA", - "tin": "*******11", - "tinFingerprint": "tinFingerprint_sample847jI1LwxF", - "tinType": "BUSINESS", - "tinVerificationId": "tinVerificationId_sample1b0E6efa89", - "tinVerificationStatus": "MATCH", - }, - "payerUrl": StringContaining "-FORM-1099-INT-COPY-C.pdf", - "status": "CREATED", - } - ` - ); - }); -}); - -describe(`abound.${resource}.mail()`, () => { - test(`mails a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].mail(sampleId, mailingRequest); - - // Assert - expect(response).toMatchInlineSnapshot( - { - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "from": { - "address": "256 Byron Street", - "address2": "Suite 32", - "city": "Palo Alto", - "country": "US", - "name": "Hooli, Inc.", - "name2": "Hooli", - "postalCode": "94306", - "state": "CA", - }, - "id": "mailingId_sampleFV9b73IvAD", - "mailedFromId": "documentId_sampletTtqNfulW8", - "status": "CREATED", - "to": { - "address": "256 Byron Street", - "address2": "Suite 32", - "city": "Palo Alto", - "country": "US", - "name": "Ada Lovelace", - "name2": "InGen Corporation", - "postalCode": "94306", - "state": "CA", - }, - "url": "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-1099-COPY-B.pdf", - } - ` - ); - }); -}); - -describe(`abound.${resource}.file()`, () => { - test(`files a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].file(sampleId); - - // Assert - expect(response).toMatchInlineSnapshot( - { - filingYear: expect.any(Number) as number, - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - payeeUrl: expect.stringContaining( - "-FORM-1099-INT-COPY-B.pdf" - ) as string, - payerUrl: expect.stringContaining( - "-FORM-1099-INT-COPY-C.pdf" - ) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "filingYear": Any, - "formFields": { - "accountNumber": "A006SVmcrieFAbm3gsaV", - "bondPremium": 19423, - "bondPremiumTaxExemptBond": 19423, - "bondPremiumTreasury": 19423, - "earlyWithdrawalPenalty": 23223, - "federalIncomeTaxWithheld": 0, - "foreignTaxPaid": 19423, - "foreignTaxPaidCountry": "FR", - "hasFatcaFilingRequirement": true, - "interestIncome": 83232, - "investmentExpenses": 19423, - "isCorrected": false, - "isVoid": false, - "marketDiscount": 19423, - "payersRoutingNumber": "054000030", - "specifiedPrivateActivityBondInterest": 19423, - "stateTaxInfo": [ - { - "filingState": "CA", - "payeeStateId": "1234567891", - "stateTaxWithheld": 0, - }, - ], - "taxExemptInterest": 19423, - "usSavingsBondsInterest": 19423, - }, - "id": "documentId_samplepWpJ9Snlzb", - "payee": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Ada Lovelace", - "postalCode": "94043", - "state": "CA", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - "tinVerificationId": "tinVerificationId_sample41SD71AV8f", - "tinVerificationStatus": "MATCH", - }, - "payeeUrl": StringContaining "-FORM-1099-INT-COPY-B.pdf", - "payer": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Hooli", - "phoneNumber": "6501014096", - "postalCode": "94043", - "state": "CA", - "tin": "*******11", - "tinFingerprint": "tinFingerprint_sample847jI1LwxF", - "tinType": "BUSINESS", - "tinVerificationId": "tinVerificationId_sample1b0E6efa89", - "tinVerificationStatus": "MATCH", - }, - "payerUrl": StringContaining "-FORM-1099-INT-COPY-C.pdf", - "status": "FILED", - } - ` - ); - }); -}); - -describe(`abound.${resource}.correct()`, () => { - test(`corrects a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].correct(sampleId, { - payee: request.payee, - formFields: request.formFields, - }); - - // Assert - expect(response).toMatchInlineSnapshot( - { - filingYear: expect.any(Number) as number, - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - payeeUrl: expect.stringContaining( - "-FORM-1099-INT-CORRECTED-COPY-B.pdf" - ) as string, - payerUrl: expect.stringContaining( - "-FORM-1099-INT-CORRECTED-COPY-C.pdf" - ) as string, - }, - ` - { - "correctedFromId": "documentId_samplepWpJ9Snlzb", - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "filingYear": Any, - "formFields": { - "accountNumber": "1234567890", - "bondPremium": 19423, - "bondPremiumTaxExemptBond": 19423, - "bondPremiumTreasury": 19423, - "earlyWithdrawalPenalty": 23223, - "federalIncomeTaxWithheld": 0, - "foreignTaxPaid": 19423, - "foreignTaxPaidCountry": "FR", - "hasFatcaFilingRequirement": true, - "interestIncome": 83232, - "investmentExpenses": 19423, - "isCorrected": true, - "isVoid": false, - "marketDiscount": 19423, - "payersRoutingNumber": "054000030", - "specifiedPrivateActivityBondInterest": 19423, - "stateTaxInfo": [ - { - "filingState": "CA", - "payeeStateId": "1234567891", - "stateTaxWithheld": 0, - }, - ], - "taxExemptInterest": 19423, - "usSavingsBondsInterest": 19423, - }, - "id": "documentId_samplexc6Aw2Qr9R", - "payee": { - "address": "256 Byron Street", - "address2": "Suite 32", - "city": "Palo Alto", - "country": "US", - "name": "Ada Lovelace", - "name2": "InGen Corporation", - "postalCode": "94306", - "state": "CA", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - "tinVerificationId": "tinVerificationId_sample41SD71AV8f", - "tinVerificationStatus": "MATCH", - }, - "payeeUrl": StringContaining "-FORM-1099-INT-CORRECTED-COPY-B.pdf", - "payer": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Hooli", - "phoneNumber": "6501014096", - "postalCode": "94043", - "state": "CA", - "tin": "*******11", - "tinFingerprint": "tinFingerprint_sample847jI1LwxF", - "tinType": "BUSINESS", - "tinVerificationId": "tinVerificationId_sample1b0E6efa89", - "tinVerificationStatus": "MATCH", - }, - "payerUrl": StringContaining "-FORM-1099-INT-CORRECTED-COPY-C.pdf", - "status": "FILED", - } - ` - ); - }); -}); - -describe(`abound.${resource}.void()`, () => { - test(`voids a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].void(sampleId); - - // Assert - expect(response).toMatchInlineSnapshot( - { - filingYear: expect.any(Number) as number, - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - payeeUrl: expect.stringContaining( - "-FORM-1099-INT-VOID-COPY-B.pdf" - ) as string, - payerUrl: expect.stringContaining( - "-FORM-1099-INT-VOID-COPY-C.pdf" - ) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "filingYear": Any, - "formFields": { - "accountNumber": "A006SVmcrieFAbm3gsaV", - "bondPremium": 19423, - "bondPremiumTaxExemptBond": 19423, - "bondPremiumTreasury": 19423, - "earlyWithdrawalPenalty": 23223, - "federalIncomeTaxWithheld": 0, - "foreignTaxPaid": 19423, - "foreignTaxPaidCountry": "FR", - "hasFatcaFilingRequirement": true, - "interestIncome": 83232, - "investmentExpenses": 19423, - "isCorrected": false, - "isVoid": true, - "marketDiscount": 19423, - "payersRoutingNumber": "054000030", - "specifiedPrivateActivityBondInterest": 19423, - "stateTaxInfo": [ - { - "filingState": "CA", - "payeeStateId": "1234567891", - "stateTaxWithheld": 0, - }, - ], - "taxExemptInterest": 19423, - "usSavingsBondsInterest": 19423, - }, - "id": "documentId_sampleVwRnewIBMu", - "payee": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Ada Lovelace", - "postalCode": "94043", - "state": "CA", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - "tinVerificationId": "tinVerificationId_sample41SD71AV8f", - "tinVerificationStatus": "MATCH", - }, - "payeeUrl": StringContaining "-FORM-1099-INT-VOID-COPY-B.pdf", - "payer": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Hooli", - "phoneNumber": "6501014096", - "postalCode": "94043", - "state": "CA", - "tin": "*******11", - "tinFingerprint": "tinFingerprint_sample847jI1LwxF", - "tinType": "BUSINESS", - "tinVerificationId": "tinVerificationId_sample1b0E6efa89", - "tinVerificationStatus": "MATCH", - }, - "payerUrl": StringContaining "-FORM-1099-INT-VOID-COPY-C.pdf", - "status": "FILED", - "voidedFromId": "documentId_samplepWpJ9Snlzb", - } - ` - ); - }); -}); - -describe(`abound.${resource}.retrieve()`, () => { - test(`retrieves a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].retrieve(sampleId); - - // Assert - expect(response).toMatchInlineSnapshot( - { - filingYear: expect.any(Number) as number, - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - payeeUrl: expect.stringContaining( - "-FORM-1099-INT-COPY-B.pdf" - ) as string, - payerUrl: expect.stringContaining( - "-FORM-1099-INT-COPY-C.pdf" - ) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "filingYear": Any, - "formFields": { - "accountNumber": "A006SVmcrieFAbm3gsaV", - "bondPremium": 19423, - "bondPremiumTaxExemptBond": 19423, - "bondPremiumTreasury": 19423, - "earlyWithdrawalPenalty": 23223, - "federalIncomeTaxWithheld": 0, - "foreignTaxPaid": 19423, - "foreignTaxPaidCountry": "FR", - "hasFatcaFilingRequirement": true, - "interestIncome": 83232, - "investmentExpenses": 19423, - "isCorrected": false, - "isVoid": false, - "marketDiscount": 19423, - "payersRoutingNumber": "054000030", - "specifiedPrivateActivityBondInterest": 19423, - "stateTaxInfo": [ - { - "filingState": "CA", - "payeeStateId": "1234567891", - "stateTaxWithheld": 0, - }, - ], - "taxExemptInterest": 19423, - "usSavingsBondsInterest": 19423, - }, - "id": "documentId_samplepWpJ9Snlzb", - "payee": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Ada Lovelace", - "postalCode": "94043", - "state": "CA", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - "tinVerificationId": "tinVerificationId_sample41SD71AV8f", - "tinVerificationStatus": "MATCH", - }, - "payeeUrl": StringContaining "-FORM-1099-INT-COPY-B.pdf", - "payer": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Hooli", - "phoneNumber": "6501014096", - "postalCode": "94043", - "state": "CA", - "tin": "*******11", - "tinFingerprint": "tinFingerprint_sample847jI1LwxF", - "tinType": "BUSINESS", - "tinVerificationId": "tinVerificationId_sample1b0E6efa89", - "tinVerificationStatus": "MATCH", - }, - "payerUrl": StringContaining "-FORM-1099-INT-COPY-C.pdf", - "status": "CREATED", - } - ` - ); - }); -}); - -describe(`abound.${resource}.delete()`, () => { - test(`deletes a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].delete(sampleId); - - // Assert - expect(response).toMatchInlineSnapshot("{}"); - }); -}); diff --git a/src/resources/1099-int.ts b/src/resources/1099-int.ts deleted file mode 100644 index 73a82fbd..00000000 --- a/src/resources/1099-int.ts +++ /dev/null @@ -1,84 +0,0 @@ -import type { AboundContext } from "../abound.js"; -import { - post, - delete_, - list, - get, - action, - actionWithEmptyRequest, -} from "./base/base-resource.js"; -import type { MailingRequest } from "./mailings.js"; -import type { - StateTaxInfo, - Form1099, - Form1099Request, - Form1099Response, - Form1099Status, -} from "./types/1099.js"; -import type { Pagination } from "./types/pagination.js"; -import type { PayeeRequest } from "./types/payee.js"; - -// Response body -export type Form1099Int = Form1099 & - Form1099Response & { - formFields: Form1099IntFormFields; - }; - -// Request body -export type Form1099IntRequest = Form1099Request & { - formFields: Form1099IntFormFields; -}; - -// Correct request body -export type CorrectForm1099IntRequest = { - payee: PayeeRequest; - formFields: Form1099IntFormFields; -}; - -// Query params -export type Form1099IntParameters = Pagination & { - filingYear?: number; - payeeTinFingerprint?: string; - payerTinFingerprint?: string; - status?: Form1099Status; - userId?: string; -}; - -export type Form1099IntFormFields = { - hasFatcaFilingRequirement?: boolean; - accountNumber?: string; - payersRoutingNumber?: string; - interestIncome?: number; - earlyWithdrawalPenalty?: number; - usSavingsBondsInterest?: number; - federalIncomeTaxWithheld?: number; - investmentExpenses?: number; - foreignTaxPaid?: number; - foreignTaxPaidCountry?: string; - taxExemptInterest?: number; - specifiedPrivateActivityBondInterest?: number; - marketDiscount?: number; - bondPremium?: number; - bondPremiumTreasury?: number; - bondPremiumTaxExemptBond?: number; - stateTaxInfo: StateTaxInfo[]; -}; - -const resource = "documents/1099-int"; - -export function form1099IntResource(context: AboundContext) { - return { - create: post(resource, context), - list: list(resource, context), - mail: action(resource, context, "mail"), - file: actionWithEmptyRequest(resource, context, "file"), - correct: action( - resource, - context, - "correct" - ), - void: actionWithEmptyRequest(resource, context, "void"), - retrieve: get(resource, context), - delete: delete_(resource, context), - }; -} diff --git a/src/resources/1099-k.test.ts b/src/resources/1099-k.test.ts deleted file mode 100644 index 71594e7a..00000000 --- a/src/resources/1099-k.test.ts +++ /dev/null @@ -1,863 +0,0 @@ -import { describe, expect, test } from "vitest"; -import { Abound } from "../abound.js"; -import { - invalidConfig, - matchers, - sampleConfig, - singular, -} from "../test-utils.js"; - -const slug = "1099-k"; -const resource = "form1099K"; -const sampleId = "documentId_samplenOHhUUVnh6"; - -const request = { - filingYear: new Date().getFullYear() - 1, - payer: { - name: "Hooli, Inc.", - name2: "Hooli", - tin: "111111111", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - phoneNumber: "6501014096", - }, - payee: { - name: "Ada Lovelace", - name2: "InGen Corporation", - tin: "000000000", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, - formFields: { - payerClassification: "PSE" as const, - transactionsReportedClassification: "PAYMENT_CARD" as const, - pseName: "Payment Entity", - psePhoneNumber: "5555555555", - accountNumber: "1000000001", - aggregateGrossAmount: 27_987_876, - aggregateGrossAmountCardNotPresent: 2_332_323, - merchantCategoryCode: "4582", - numberOfPaymentTransactions: 767, - federalIncomeTaxWithheld: 0, - grossAmountsByMonth: { - january: 2_332_323, - february: 2_332_323, - march: 2_332_323, - april: 2_332_323, - may: 2_332_323, - june: 2_332_323, - july: 2_332_323, - august: 2_332_323, - september: 2_332_323, - october: 2_332_323, - november: 2_332_323, - december: 2_332_323, - }, - stateTaxInfo: [ - { - filingState: "CA" as const, - payeeStateId: "1234567891", - payerStateId: "1234567891", - stateTaxWithheld: 0, - }, - ], - }, - userId: "userId_sampleXGMFnhOpeR", -}; - -const invalidRequest = { - payer: {}, - payee: {}, - formFields: {}, - userId: 1000, -}; - -const mailingRequest = { - to: { - name: "Ada Lovelace", - name2: "InGen Corporation", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, - from: { - name: "Hooli, Inc.", - name2: "Hooli", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, -}; - -describe(`abound.${resource}.create()`, () => { - test("throws an error when the sdk config is invalid", async () => { - // Arrange - const abound = new Abound(invalidConfig); - - // Act & Assert - await expect(async () => - abound[resource].create(request) - ).rejects.toThrowErrorMatchingInlineSnapshot( - `[Error: Your app is not authorized to do this (Code 6b6d7bbe)]` - ); - }); - - test(`throws a bad request error when creating an invalid ${singular( - resource - )}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act & Assert - // @ts-expect-error required for test case - await expect(async () => abound[resource].create(invalidRequest)).rejects - .toThrowErrorMatchingInlineSnapshot(` - AboundBadRequest { - "errors": [ - { - "field": "filingYear", - "message": "Expected filingYear to be of type number, but received undefined", - }, - { - "field": "payer.name", - "message": "Expected payer.name to be of type string, but received undefined", - }, - { - "field": "payer.tin", - "message": "Expected payer.tin to be of type string, but received undefined", - }, - { - "field": "payer.address", - "message": "Expected payer.address to be of type string, but received undefined", - }, - { - "field": "payer.country", - "message": "Expected payer.country to be of type string, but received undefined", - }, - { - "field": "payer.phoneNumber", - "message": "Expected payer.phoneNumber to be of type string, but received undefined", - }, - { - "field": "payee.name", - "message": "Expected payee.name to be of type string, but received undefined", - }, - { - "field": "payee.tin", - "message": "Expected payee.tin to be of type string, but received undefined", - }, - { - "field": "payee.address", - "message": "Expected payee.address to be of type string, but received undefined", - }, - { - "field": "payee.country", - "message": "Expected payee.country to be of type string, but received undefined", - }, - { - "field": "formFields.payerClassification", - "message": "Expected formFields.payerClassification to be EPF_OTHER or PSE, but received undefined", - }, - { - "field": "formFields.transactionsReportedClassification", - "message": "Expected formFields.transactionsReportedClassification to be PAYMENT_CARD or THIRD_PARTY_NETWORK, but received undefined", - }, - { - "field": "formFields.aggregateGrossAmount", - "message": "Expected formFields.aggregateGrossAmount to be of type number, but received undefined", - }, - { - "field": "formFields.numberOfPaymentTransactions", - "message": "Expected formFields.numberOfPaymentTransactions to be of type number, but received undefined", - }, - { - "field": "formFields.grossAmountsByMonth", - "message": "Expected formFields.grossAmountsByMonth to be of type object, but received undefined", - }, - { - "field": "formFields.stateTaxInfo", - "message": "Expected formFields.stateTaxInfo to be of type array, but received undefined", - }, - { - "field": "userId", - "message": "Expected userId to be of type string, but received number", - }, - ], - } - `); - }); - - test(`creates a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].create(request); - - // Assert - expect(response).toMatchInlineSnapshot( - { - filingYear: expect.any(Number) as number, - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - payeeUrl: expect.stringContaining("-FORM-1099-K-COPY-B.pdf") as string, - payerUrl: expect.stringContaining("-FORM-1099-K-COPY-C.pdf") as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "filingYear": Any, - "formFields": { - "accountNumber": "1000000001", - "aggregateGrossAmount": 27987876, - "aggregateGrossAmountCardNotPresent": 2332323, - "federalIncomeTaxWithheld": 0, - "grossAmountsByMonth": { - "april": 2332323, - "august": 2332323, - "december": 2332323, - "february": 2332323, - "january": 2332323, - "july": 2332323, - "june": 2332323, - "march": 2332323, - "may": 2332323, - "november": 2332323, - "october": 2332323, - "september": 2332323, - }, - "isCorrected": false, - "isVoid": false, - "merchantCategoryCode": "4582", - "numberOfPaymentTransactions": 767, - "payerClassification": "PSE", - "pseName": "Payment Entity", - "psePhoneNumber": "5555555555", - "stateTaxInfo": [ - { - "filingState": "CA", - "payeeStateId": "1234567891", - "stateTaxWithheld": 0, - }, - ], - "transactionsReportedClassification": "PAYMENT_CARD", - }, - "id": "documentId_sampletTtqNfulW8", - "payee": { - "address": "256 Byron Street", - "address2": "Suite 32", - "city": "Palo Alto", - "country": "US", - "name": "Ada Lovelace", - "name2": "InGen Corporation", - "postalCode": "94306", - "state": "CA", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - "tinVerificationId": "tinVerificationId_sample41SD71AV8f", - "tinVerificationStatus": "MATCH", - }, - "payeeUrl": StringContaining "-FORM-1099-K-COPY-B.pdf", - "payer": { - "address": "256 Byron Street", - "address2": "Suite 32", - "city": "Palo Alto", - "country": "US", - "name": "Hooli, Inc.", - "name2": "Hooli", - "phoneNumber": "6501014096", - "postalCode": "94306", - "state": "CA", - "tin": "*******11", - "tinFingerprint": "tinFingerprint_sample847jI1LwxF", - "tinType": "BUSINESS", - "tinVerificationId": "tinVerificationId_sample1b0E6efa89", - "tinVerificationStatus": "MATCH", - }, - "payerUrl": StringContaining "-FORM-1099-K-COPY-C.pdf", - "status": "CREATED", - "userId": "userId_sampleXGMFnhOpeR", - } - ` - ); - }); -}); - -describe(`abound.${resource}.list()`, () => { - test("throws a bad request error when the page query string parameter is invalid", async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act & Assert - await expect(async () => - abound[resource].list({ - // @ts-expect-error required for test case - page: "invalid_page", - }) - ).rejects.toThrowErrorMatchingInlineSnapshot(` - AboundBadRequest { - "errors": [ - { - "field": "page", - "message": "Expected page query string parameter to be a number greater than or equal to 1, but received invalid_page", - }, - ], - } - `); - }); - - test(`lists ${slug}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].list(); - - // Assert - expect(response.at(0)).toMatchInlineSnapshot( - { - filingYear: expect.any(Number) as number, - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - payeeUrl: expect.stringContaining("-FORM-1099-K-COPY-B.pdf") as string, - payerUrl: expect.stringContaining("-FORM-1099-K-COPY-C.pdf") as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "filingYear": Any, - "formFields": { - "accountNumber": "A0MCFOfvWWL7AVtwrhiU", - "aggregateGrossAmount": 27987876, - "aggregateGrossAmountCardNotPresent": 2332323, - "federalIncomeTaxWithheld": 0, - "grossAmountsByMonth": { - "april": 2332323, - "august": 2332323, - "december": 2332323, - "february": 2332323, - "january": 2332323, - "july": 2332323, - "june": 2332323, - "march": 2332323, - "may": 2332323, - "november": 2332323, - "october": 2332323, - "september": 2332323, - }, - "isCorrected": false, - "isVoid": false, - "merchantCategoryCode": "4582", - "numberOfPaymentTransactions": 767, - "payerClassification": "PSE", - "pseName": "Payment Entity", - "psePhoneNumber": "5555555555", - "stateTaxInfo": [ - { - "filingState": "CA", - "payeeStateId": "1234567891", - "stateTaxWithheld": 0, - }, - ], - "transactionsReportedClassification": "PAYMENT_CARD", - }, - "id": "documentId_sampletTtqNfulW8", - "payee": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Ada Lovelace", - "postalCode": "94043", - "state": "CA", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - "tinVerificationId": "tinVerificationId_sample41SD71AV8f", - "tinVerificationStatus": "MATCH", - }, - "payeeUrl": StringContaining "-FORM-1099-K-COPY-B.pdf", - "payer": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Hooli", - "phoneNumber": "6501014096", - "postalCode": "94043", - "state": "CA", - "tin": "*******11", - "tinFingerprint": "tinFingerprint_sample847jI1LwxF", - "tinType": "BUSINESS", - "tinVerificationId": "tinVerificationId_sample1b0E6efa89", - "tinVerificationStatus": "MATCH", - }, - "payerUrl": StringContaining "-FORM-1099-K-COPY-C.pdf", - "status": "CREATED", - } - ` - ); - }); -}); - -describe(`abound.${resource}.mail()`, () => { - test(`mails a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].mail(sampleId, mailingRequest); - - // Assert - expect(response).toMatchInlineSnapshot( - { - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "from": { - "address": "256 Byron Street", - "address2": "Suite 32", - "city": "Palo Alto", - "country": "US", - "name": "Hooli, Inc.", - "name2": "Hooli", - "postalCode": "94306", - "state": "CA", - }, - "id": "mailingId_sampleFV9b73IvAD", - "mailedFromId": "documentId_sampletTtqNfulW8", - "status": "CREATED", - "to": { - "address": "256 Byron Street", - "address2": "Suite 32", - "city": "Palo Alto", - "country": "US", - "name": "Ada Lovelace", - "name2": "InGen Corporation", - "postalCode": "94306", - "state": "CA", - }, - "url": "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-1099-COPY-B.pdf", - } - ` - ); - }); -}); - -describe(`abound.${resource}.file()`, () => { - test(`files a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].file(sampleId); - - // Assert - expect(response).toMatchInlineSnapshot( - { - filingYear: expect.any(Number) as number, - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - payeeUrl: expect.stringContaining("-FORM-1099-K-COPY-B.pdf") as string, - payerUrl: expect.stringContaining("-FORM-1099-K-COPY-C.pdf") as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "filingYear": Any, - "formFields": { - "accountNumber": "A0MCFOfvWWL7AVtwrhiU", - "aggregateGrossAmount": 27987876, - "aggregateGrossAmountCardNotPresent": 2332323, - "federalIncomeTaxWithheld": 0, - "grossAmountsByMonth": { - "april": 2332323, - "august": 2332323, - "december": 2332323, - "february": 2332323, - "january": 2332323, - "july": 2332323, - "june": 2332323, - "march": 2332323, - "may": 2332323, - "november": 2332323, - "october": 2332323, - "september": 2332323, - }, - "isCorrected": false, - "isVoid": false, - "merchantCategoryCode": "4582", - "numberOfPaymentTransactions": 767, - "payerClassification": "PSE", - "pseName": "Payment Entity", - "psePhoneNumber": "5555555555", - "stateTaxInfo": [ - { - "filingState": "CA", - "payeeStateId": "1234567891", - "stateTaxWithheld": 0, - }, - ], - "transactionsReportedClassification": "PAYMENT_CARD", - }, - "id": "documentId_sampletTtqNfulW8", - "payee": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Ada Lovelace", - "postalCode": "94043", - "state": "CA", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - "tinVerificationId": "tinVerificationId_sample41SD71AV8f", - "tinVerificationStatus": "MATCH", - }, - "payeeUrl": StringContaining "-FORM-1099-K-COPY-B.pdf", - "payer": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Hooli", - "phoneNumber": "6501014096", - "postalCode": "94043", - "state": "CA", - "tin": "*******11", - "tinFingerprint": "tinFingerprint_sample847jI1LwxF", - "tinType": "BUSINESS", - "tinVerificationId": "tinVerificationId_sample1b0E6efa89", - "tinVerificationStatus": "MATCH", - }, - "payerUrl": StringContaining "-FORM-1099-K-COPY-C.pdf", - "status": "FILED", - } - ` - ); - }); -}); - -describe(`abound.${resource}.correct()`, () => { - test(`corrects a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].correct(sampleId, { - payee: request.payee, - formFields: request.formFields, - }); - - // Assert - expect(response).toMatchInlineSnapshot( - { - filingYear: expect.any(Number) as number, - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - payeeUrl: expect.stringContaining( - "-FORM-1099-K-CORRECTED-COPY-B.pdf" - ) as string, - payerUrl: expect.stringContaining( - "-FORM-1099-K-CORRECTED-COPY-C.pdf" - ) as string, - }, - ` - { - "correctedFromId": "documentId_sampletTtqNfulW8", - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "filingYear": Any, - "formFields": { - "accountNumber": "1000000001", - "aggregateGrossAmount": 27987876, - "aggregateGrossAmountCardNotPresent": 2332323, - "federalIncomeTaxWithheld": 0, - "grossAmountsByMonth": { - "april": 2332323, - "august": 2332323, - "december": 2332323, - "february": 2332323, - "january": 2332323, - "july": 2332323, - "june": 2332323, - "march": 2332323, - "may": 2332323, - "november": 2332323, - "october": 2332323, - "september": 2332323, - }, - "isCorrected": true, - "isVoid": false, - "merchantCategoryCode": "4582", - "numberOfPaymentTransactions": 767, - "payerClassification": "PSE", - "pseName": "Payment Entity", - "psePhoneNumber": "5555555555", - "stateTaxInfo": [ - { - "filingState": "CA", - "payeeStateId": "1234567891", - "stateTaxWithheld": 0, - }, - ], - "transactionsReportedClassification": "PAYMENT_CARD", - }, - "id": "documentId_samplenOHhUUVnh6", - "payee": { - "address": "256 Byron Street", - "address2": "Suite 32", - "city": "Palo Alto", - "country": "US", - "name": "Ada Lovelace", - "name2": "InGen Corporation", - "postalCode": "94306", - "state": "CA", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - "tinVerificationId": "tinVerificationId_sample41SD71AV8f", - "tinVerificationStatus": "MATCH", - }, - "payeeUrl": StringContaining "-FORM-1099-K-CORRECTED-COPY-B.pdf", - "payer": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Hooli", - "phoneNumber": "6501014096", - "postalCode": "94043", - "state": "CA", - "tin": "*******11", - "tinFingerprint": "tinFingerprint_sample847jI1LwxF", - "tinType": "BUSINESS", - "tinVerificationId": "tinVerificationId_sample1b0E6efa89", - "tinVerificationStatus": "MATCH", - }, - "payerUrl": StringContaining "-FORM-1099-K-CORRECTED-COPY-C.pdf", - "status": "FILED", - } - ` - ); - }); -}); - -describe(`abound.${resource}.void()`, () => { - test(`voids a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].void(sampleId); - - // Assert - expect(response).toMatchInlineSnapshot( - { - filingYear: expect.any(Number) as number, - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - payeeUrl: expect.stringContaining( - "-FORM-1099-K-VOID-COPY-B.pdf" - ) as string, - payerUrl: expect.stringContaining( - "-FORM-1099-K-VOID-COPY-C.pdf" - ) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "filingYear": Any, - "formFields": { - "accountNumber": "A0MCFOfvWWL7AVtwrhiU", - "aggregateGrossAmount": 27987876, - "aggregateGrossAmountCardNotPresent": 2332323, - "federalIncomeTaxWithheld": 0, - "grossAmountsByMonth": { - "april": 2332323, - "august": 2332323, - "december": 2332323, - "february": 2332323, - "january": 2332323, - "july": 2332323, - "june": 2332323, - "march": 2332323, - "may": 2332323, - "november": 2332323, - "october": 2332323, - "september": 2332323, - }, - "isCorrected": false, - "isVoid": true, - "merchantCategoryCode": "4582", - "numberOfPaymentTransactions": 767, - "payerClassification": "PSE", - "pseName": "Payment Entity", - "psePhoneNumber": "5555555555", - "stateTaxInfo": [ - { - "filingState": "CA", - "payeeStateId": "1234567891", - "stateTaxWithheld": 0, - }, - ], - "transactionsReportedClassification": "PAYMENT_CARD", - }, - "id": "documentId_sampleb6HQLsVuM9", - "payee": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Ada Lovelace", - "postalCode": "94043", - "state": "CA", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - "tinVerificationId": "tinVerificationId_sample41SD71AV8f", - "tinVerificationStatus": "MATCH", - }, - "payeeUrl": StringContaining "-FORM-1099-K-VOID-COPY-B.pdf", - "payer": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Hooli", - "phoneNumber": "6501014096", - "postalCode": "94043", - "state": "CA", - "tin": "*******11", - "tinFingerprint": "tinFingerprint_sample847jI1LwxF", - "tinType": "BUSINESS", - "tinVerificationId": "tinVerificationId_sample1b0E6efa89", - "tinVerificationStatus": "MATCH", - }, - "payerUrl": StringContaining "-FORM-1099-K-VOID-COPY-C.pdf", - "status": "FILED", - "voidedFromId": "documentId_sampletTtqNfulW8", - } - ` - ); - }); -}); - -describe(`abound.${resource}.retrieve()`, () => { - test(`retrieves a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].retrieve(sampleId); - - // Assert - expect(response).toMatchInlineSnapshot( - { - filingYear: expect.any(Number) as number, - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - payeeUrl: expect.stringContaining("-FORM-1099-K-COPY-B.pdf") as string, - payerUrl: expect.stringContaining("-FORM-1099-K-COPY-C.pdf") as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "filingYear": Any, - "formFields": { - "accountNumber": "A0MCFOfvWWL7AVtwrhiU", - "aggregateGrossAmount": 27987876, - "aggregateGrossAmountCardNotPresent": 2332323, - "federalIncomeTaxWithheld": 0, - "grossAmountsByMonth": { - "april": 2332323, - "august": 2332323, - "december": 2332323, - "february": 2332323, - "january": 2332323, - "july": 2332323, - "june": 2332323, - "march": 2332323, - "may": 2332323, - "november": 2332323, - "october": 2332323, - "september": 2332323, - }, - "isCorrected": false, - "isVoid": false, - "merchantCategoryCode": "4582", - "numberOfPaymentTransactions": 767, - "payerClassification": "PSE", - "pseName": "Payment Entity", - "psePhoneNumber": "5555555555", - "stateTaxInfo": [ - { - "filingState": "CA", - "payeeStateId": "1234567891", - "stateTaxWithheld": 0, - }, - ], - "transactionsReportedClassification": "PAYMENT_CARD", - }, - "id": "documentId_sampletTtqNfulW8", - "payee": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Ada Lovelace", - "postalCode": "94043", - "state": "CA", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - "tinVerificationId": "tinVerificationId_sample41SD71AV8f", - "tinVerificationStatus": "MATCH", - }, - "payeeUrl": StringContaining "-FORM-1099-K-COPY-B.pdf", - "payer": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Hooli", - "phoneNumber": "6501014096", - "postalCode": "94043", - "state": "CA", - "tin": "*******11", - "tinFingerprint": "tinFingerprint_sample847jI1LwxF", - "tinType": "BUSINESS", - "tinVerificationId": "tinVerificationId_sample1b0E6efa89", - "tinVerificationStatus": "MATCH", - }, - "payerUrl": StringContaining "-FORM-1099-K-COPY-C.pdf", - "status": "CREATED", - } - ` - ); - }); -}); - -describe(`abound.${resource}.delete()`, () => { - test(`deletes a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].delete(sampleId); - - // Assert - expect(response).toMatchInlineSnapshot("{}"); - }); -}); diff --git a/src/resources/1099-k.ts b/src/resources/1099-k.ts deleted file mode 100644 index 371ae6e8..00000000 --- a/src/resources/1099-k.ts +++ /dev/null @@ -1,97 +0,0 @@ -import type { AboundContext } from "../abound.js"; -import { - action, - actionWithEmptyRequest, - delete_, - get, - list, - post, -} from "./base/base-resource.js"; -import type { MailingRequest } from "./mailings.js"; -import type { - StateTaxInfo, - Form1099, - Form1099Request, - Form1099Response, - Form1099Status, -} from "./types/1099.js"; -import type { Pagination } from "./types/pagination.js"; -import type { PayeeRequest } from "./types/payee.js"; - -// Response body -export type Form1099K = Form1099 & - Form1099Response & { - formFields: Form1099KFormFields; - }; - -// Request body -// eslint-disable-next-line @typescript-eslint/naming-convention -export type Form1099KRequest = Form1099Request & { - formFields: Form1099KFormFields; -}; - -// Correct request body -// eslint-disable-next-line @typescript-eslint/naming-convention -export type CorrectForm1099KRequest = { - payee: PayeeRequest; - formFields: Form1099KFormFields; -}; - -// Query params -// eslint-disable-next-line @typescript-eslint/naming-convention -export type Form1099KParameters = Pagination & { - filingYear?: number; - payeeTinFingerprint?: string; - payerTinFingerprint?: string; - status?: Form1099Status; - userId?: string; -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -export type Form1099KFormFields = { - payerClassification: "PSE" | "EPF_OTHER"; - transactionsReportedClassification: "PAYMENT_CARD" | "THIRD_PARTY_NETWORK"; - pseName?: string; - psePhoneNumber?: string; - accountNumber?: string; - aggregateGrossAmount: number; - aggregateGrossAmountCardNotPresent?: number; - merchantCategoryCode?: string; - numberOfPaymentTransactions: number; - federalIncomeTaxWithheld?: number; - grossAmountsByMonth: { - january?: number; - february?: number; - march?: number; - april?: number; - may?: number; - june?: number; - july?: number; - august?: number; - september?: number; - october?: number; - november?: number; - december?: number; - }; - stateTaxInfo: StateTaxInfo[]; -}; - -const resource = "documents/1099-k"; - -// eslint-disable-next-line @typescript-eslint/naming-convention -export function form1099KResource(context: AboundContext) { - return { - create: post(resource, context), - list: list(resource, context), - mail: action(resource, context, "mail"), - file: actionWithEmptyRequest(resource, context, "file"), - correct: action( - resource, - context, - "correct" - ), - void: actionWithEmptyRequest(resource, context, "void"), - retrieve: get(resource, context), - delete: delete_(resource, context), - }; -} diff --git a/src/resources/1099-nec.test.ts b/src/resources/1099-nec.test.ts deleted file mode 100644 index 7e2849a2..00000000 --- a/src/resources/1099-nec.test.ts +++ /dev/null @@ -1,731 +0,0 @@ -import { describe, expect, test } from "vitest"; -import { Abound } from "../abound.js"; -import { - invalidConfig, - matchers, - sampleConfig, - singular, -} from "../test-utils.js"; - -const slug = "1099-nec"; -const resource = "form1099Nec"; -const sampleId = "documentId_sampletdeUbrEgYw"; - -const request = { - filingYear: new Date().getFullYear() - 1, - payer: { - name: "Hooli, Inc.", - name2: "Hooli", - tin: "111111111", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - phoneNumber: "6501014096", - }, - payee: { - name: "Ada Lovelace", - name2: "InGen Corporation", - tin: "000000000", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, - formFields: { - accountNumber: "1000000001", - nonemployeeCompensation: 23_423, - hasDirectSalesOver5000: false, - federalIncomeTaxWithheld: 0, - stateTaxInfo: [ - { - stateTaxWithheld: 0, - filingState: "CA" as const, - payeeStateId: "1234567891", - payerStateId: "1234567891", - stateIncome: 345_543, - }, - ], - }, - userId: "userId_sampleXGMFnhOpeR", -}; - -const invalidRequest = { - payer: {}, - payee: {}, - formFields: {}, - userId: 1000, -}; - -const mailingRequest = { - to: { - name: "Ada Lovelace", - name2: "InGen Corporation", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, - from: { - name: "Hooli, Inc.", - name2: "Hooli", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, -}; - -describe(`abound.${resource}.create()`, () => { - test("throws an error when the sdk config is invalid", async () => { - // Arrange - const abound = new Abound(invalidConfig); - - // Act & Assert - await expect(async () => - abound[resource].create(request) - ).rejects.toThrowErrorMatchingInlineSnapshot( - `[Error: Your app is not authorized to do this (Code 6b6d7bbe)]` - ); - }); - - test(`throws a bad request error when creating an invalid ${singular( - resource - )}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act & Assert - await expect(async () => - // @ts-expect-error required for test case - abound[resource].create(invalidRequest) - ).rejects.toThrowErrorMatchingInlineSnapshot(` - AboundBadRequest { - "errors": [ - { - "field": "filingYear", - "message": "Expected filingYear to be of type number, but received undefined", - }, - { - "field": "payer.name", - "message": "Expected payer.name to be of type string, but received undefined", - }, - { - "field": "payer.tin", - "message": "Expected payer.tin to be of type string, but received undefined", - }, - { - "field": "payer.address", - "message": "Expected payer.address to be of type string, but received undefined", - }, - { - "field": "payer.country", - "message": "Expected payer.country to be of type string, but received undefined", - }, - { - "field": "payer.phoneNumber", - "message": "Expected payer.phoneNumber to be of type string, but received undefined", - }, - { - "field": "payee.name", - "message": "Expected payee.name to be of type string, but received undefined", - }, - { - "field": "payee.tin", - "message": "Expected payee.tin to be of type string, but received undefined", - }, - { - "field": "payee.address", - "message": "Expected payee.address to be of type string, but received undefined", - }, - { - "field": "payee.country", - "message": "Expected payee.country to be of type string, but received undefined", - }, - { - "field": "formFields.nonemployeeCompensation", - "message": "Expected formFields.nonemployeeCompensation to be of type number, but received undefined", - }, - { - "field": "formFields.stateTaxInfo", - "message": "Expected formFields.stateTaxInfo to be of type array, but received undefined", - }, - { - "field": "userId", - "message": "Expected userId to be of type string, but received number", - }, - ], - } - `); - }); - - test(`creates a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].create(request); - - // Assert - expect(response).toMatchInlineSnapshot( - { - filingYear: expect.any(Number) as number, - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - payeeUrl: expect.stringContaining( - "-FORM-1099-NEC-COPY-B.pdf" - ) as string, - payerUrl: expect.stringContaining( - "-FORM-1099-NEC-COPY-C.pdf" - ) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "filingYear": Any, - "formFields": { - "accountNumber": "1000000001", - "federalIncomeTaxWithheld": 0, - "hasDirectSalesOver5000": false, - "isCorrected": false, - "isVoid": false, - "nonemployeeCompensation": 23423, - "stateTaxInfo": [ - { - "filingState": "CA", - "payerStateId": "1234567891", - "stateIncome": 345543, - "stateTaxWithheld": 0, - }, - ], - }, - "id": "documentId_samplegU0eR8oc8a", - "payee": { - "address": "256 Byron Street", - "address2": "Suite 32", - "city": "Palo Alto", - "country": "US", - "name": "Ada Lovelace", - "name2": "InGen Corporation", - "postalCode": "94306", - "state": "CA", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - "tinVerificationId": "tinVerificationId_sample41SD71AV8f", - "tinVerificationStatus": "MATCH", - }, - "payeeUrl": StringContaining "-FORM-1099-NEC-COPY-B.pdf", - "payer": { - "address": "256 Byron Street", - "address2": "Suite 32", - "city": "Palo Alto", - "country": "US", - "name": "Hooli, Inc.", - "name2": "Hooli", - "phoneNumber": "6501014096", - "postalCode": "94306", - "state": "CA", - "tin": "*******11", - "tinFingerprint": "tinFingerprint_sample847jI1LwxF", - "tinType": "BUSINESS", - "tinVerificationId": "tinVerificationId_sample1b0E6efa89", - "tinVerificationStatus": "MATCH", - }, - "payerUrl": StringContaining "-FORM-1099-NEC-COPY-C.pdf", - "status": "CREATED", - "userId": "userId_sampleXGMFnhOpeR", - } - ` - ); - }); -}); - -describe(`abound.${resource}.list()`, () => { - test("throws a bad request error when the page query string parameter is invalid", async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act & Assert - await expect(async () => - abound[resource].list({ - // @ts-expect-error required for test case - page: "invalid_page", - }) - ).rejects.toThrowErrorMatchingInlineSnapshot(` - AboundBadRequest { - "errors": [ - { - "field": "page", - "message": "Expected page query string parameter to be a number greater than or equal to 1, but received invalid_page", - }, - ], - } - `); - }); - - test(`lists ${slug}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].list(); - - // Assert - expect(response.at(0)).toMatchInlineSnapshot( - { - filingYear: expect.any(Number) as number, - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - payeeUrl: expect.stringContaining( - "-FORM-1099-NEC-COPY-B.pdf" - ) as string, - payerUrl: expect.stringContaining( - "-FORM-1099-NEC-COPY-C.pdf" - ) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "filingYear": Any, - "formFields": { - "accountNumber": "A0NEqtav7n0sBGoq88w0", - "federalIncomeTaxWithheld": 0, - "hasDirectSalesOver5000": false, - "isCorrected": false, - "isVoid": false, - "nonemployeeCompensation": 23423, - "stateTaxInfo": [ - { - "filingState": "CA", - "payerStateId": "1234567891", - "stateIncome": 345543, - "stateTaxWithheld": 0, - }, - ], - }, - "id": "documentId_samplegU0eR8oc8a", - "payee": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Ada Lovelace", - "postalCode": "94043", - "state": "CA", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - "tinVerificationId": "tinVerificationId_sample41SD71AV8f", - "tinVerificationStatus": "MATCH", - }, - "payeeUrl": StringContaining "-FORM-1099-NEC-COPY-B.pdf", - "payer": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Hooli", - "phoneNumber": "6501014096", - "postalCode": "94043", - "state": "CA", - "tin": "*******11", - "tinFingerprint": "tinFingerprint_sample847jI1LwxF", - "tinType": "BUSINESS", - "tinVerificationId": "tinVerificationId_sample1b0E6efa89", - "tinVerificationStatus": "MATCH", - }, - "payerUrl": StringContaining "-FORM-1099-NEC-COPY-C.pdf", - "status": "CREATED", - } - ` - ); - }); -}); - -describe(`abound.${resource}.mail()`, () => { - test(`mails a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].mail(sampleId, mailingRequest); - - // Assert - expect(response).toMatchInlineSnapshot( - { - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "from": { - "address": "256 Byron Street", - "address2": "Suite 32", - "city": "Palo Alto", - "country": "US", - "name": "Hooli, Inc.", - "name2": "Hooli", - "postalCode": "94306", - "state": "CA", - }, - "id": "mailingId_sampleFV9b73IvAD", - "mailedFromId": "documentId_sampletTtqNfulW8", - "status": "CREATED", - "to": { - "address": "256 Byron Street", - "address2": "Suite 32", - "city": "Palo Alto", - "country": "US", - "name": "Ada Lovelace", - "name2": "InGen Corporation", - "postalCode": "94306", - "state": "CA", - }, - "url": "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-1099-COPY-B.pdf", - } - ` - ); - }); -}); - -describe(`abound.${resource}.file()`, () => { - test(`files a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].file(sampleId); - - // Assert - expect(response).toMatchInlineSnapshot( - { - filingYear: expect.any(Number) as number, - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - payeeUrl: expect.stringContaining( - "-FORM-1099-NEC-COPY-B.pdf" - ) as string, - payerUrl: expect.stringContaining( - "-FORM-1099-NEC-COPY-C.pdf" - ) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "filingYear": Any, - "formFields": { - "accountNumber": "A0NEqtav7n0sBGoq88w0", - "federalIncomeTaxWithheld": 0, - "hasDirectSalesOver5000": false, - "isCorrected": false, - "isVoid": false, - "nonemployeeCompensation": 23423, - "stateTaxInfo": [ - { - "filingState": "CA", - "payerStateId": "1234567891", - "stateIncome": 345543, - "stateTaxWithheld": 0, - }, - ], - }, - "id": "documentId_samplegU0eR8oc8a", - "payee": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Ada Lovelace", - "postalCode": "94043", - "state": "CA", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - "tinVerificationId": "tinVerificationId_sample41SD71AV8f", - "tinVerificationStatus": "MATCH", - }, - "payeeUrl": StringContaining "-FORM-1099-NEC-COPY-B.pdf", - "payer": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Hooli", - "phoneNumber": "6501014096", - "postalCode": "94043", - "state": "CA", - "tin": "*******11", - "tinFingerprint": "tinFingerprint_sample847jI1LwxF", - "tinType": "BUSINESS", - "tinVerificationId": "tinVerificationId_sample1b0E6efa89", - "tinVerificationStatus": "MATCH", - }, - "payerUrl": StringContaining "-FORM-1099-NEC-COPY-C.pdf", - "status": "FILED", - } - ` - ); - }); -}); - -describe(`abound.${resource}.correct()`, () => { - test(`corrects a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].correct(sampleId, { - payee: request.payee, - formFields: request.formFields, - }); - - // Assert - expect(response).toMatchInlineSnapshot( - { - filingYear: expect.any(Number) as number, - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - payeeUrl: expect.stringContaining( - "-FORM-1099-NEC-CORRECTED-COPY-B.pdf" - ) as string, - payerUrl: expect.stringContaining( - "-FORM-1099-NEC-CORRECTED-COPY-C.pdf" - ) as string, - }, - ` - { - "correctedFromId": "documentId_samplegU0eR8oc8a", - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "filingYear": Any, - "formFields": { - "accountNumber": "1000000001", - "federalIncomeTaxWithheld": 0, - "hasDirectSalesOver5000": false, - "isCorrected": true, - "isVoid": false, - "nonemployeeCompensation": 23423, - "stateTaxInfo": [ - { - "filingState": "CA", - "payerStateId": "1234567891", - "stateIncome": 345543, - "stateTaxWithheld": 0, - }, - ], - }, - "id": "documentId_sampletdeUbrEgYw", - "payee": { - "address": "256 Byron Street", - "address2": "Suite 32", - "city": "Palo Alto", - "country": "US", - "name": "Ada Lovelace", - "name2": "InGen Corporation", - "postalCode": "94306", - "state": "CA", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - "tinVerificationId": "tinVerificationId_sample41SD71AV8f", - "tinVerificationStatus": "MATCH", - }, - "payeeUrl": StringContaining "-FORM-1099-NEC-CORRECTED-COPY-B.pdf", - "payer": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Hooli", - "phoneNumber": "6501014096", - "postalCode": "94043", - "state": "CA", - "tin": "*******11", - "tinFingerprint": "tinFingerprint_sample847jI1LwxF", - "tinType": "BUSINESS", - "tinVerificationId": "tinVerificationId_sample1b0E6efa89", - "tinVerificationStatus": "MATCH", - }, - "payerUrl": StringContaining "-FORM-1099-NEC-CORRECTED-COPY-C.pdf", - "status": "FILED", - } - ` - ); - }); -}); - -describe(`abound.${resource}.void()`, () => { - test(`voids a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].void(sampleId); - - // Assert - expect(response).toMatchInlineSnapshot( - { - filingYear: expect.any(Number) as number, - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - payeeUrl: expect.stringContaining( - "-FORM-1099-NEC-VOID-COPY-B.pdf" - ) as string, - payerUrl: expect.stringContaining( - "-FORM-1099-NEC-VOID-COPY-C.pdf" - ) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "filingYear": Any, - "formFields": { - "accountNumber": "A0NEqtav7n0sBGoq88w0", - "federalIncomeTaxWithheld": 0, - "hasDirectSalesOver5000": false, - "isCorrected": false, - "isVoid": true, - "nonemployeeCompensation": 23423, - "stateTaxInfo": [ - { - "filingState": "CA", - "payerStateId": "1234567891", - "stateIncome": 345543, - "stateTaxWithheld": 0, - }, - ], - }, - "id": "documentId_sampleSaOkfbLdUb", - "payee": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Ada Lovelace", - "postalCode": "94043", - "state": "CA", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - "tinVerificationId": "tinVerificationId_sample41SD71AV8f", - "tinVerificationStatus": "MATCH", - }, - "payeeUrl": StringContaining "-FORM-1099-NEC-VOID-COPY-B.pdf", - "payer": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Hooli", - "phoneNumber": "6501014096", - "postalCode": "94043", - "state": "CA", - "tin": "*******11", - "tinFingerprint": "tinFingerprint_sample847jI1LwxF", - "tinType": "BUSINESS", - "tinVerificationId": "tinVerificationId_sample1b0E6efa89", - "tinVerificationStatus": "MATCH", - }, - "payerUrl": StringContaining "-FORM-1099-NEC-VOID-COPY-C.pdf", - "status": "FILED", - "voidedFromId": "documentId_sampletTtqNfulW8", - } - ` - ); - }); -}); - -describe(`abound.${resource}.retrieve()`, () => { - test(`retrieves a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].retrieve(sampleId); - - // Assert - expect(response).toMatchInlineSnapshot( - { - filingYear: expect.any(Number) as number, - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - payeeUrl: expect.stringContaining( - "-FORM-1099-NEC-COPY-B.pdf" - ) as string, - payerUrl: expect.stringContaining( - "-FORM-1099-NEC-COPY-C.pdf" - ) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "filingYear": Any, - "formFields": { - "accountNumber": "A0NEqtav7n0sBGoq88w0", - "federalIncomeTaxWithheld": 0, - "hasDirectSalesOver5000": false, - "isCorrected": false, - "isVoid": false, - "nonemployeeCompensation": 23423, - "stateTaxInfo": [ - { - "filingState": "CA", - "payerStateId": "1234567891", - "stateIncome": 345543, - "stateTaxWithheld": 0, - }, - ], - }, - "id": "documentId_samplegU0eR8oc8a", - "payee": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Ada Lovelace", - "postalCode": "94043", - "state": "CA", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - "tinVerificationId": "tinVerificationId_sample41SD71AV8f", - "tinVerificationStatus": "MATCH", - }, - "payeeUrl": StringContaining "-FORM-1099-NEC-COPY-B.pdf", - "payer": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Hooli", - "phoneNumber": "6501014096", - "postalCode": "94043", - "state": "CA", - "tin": "*******11", - "tinFingerprint": "tinFingerprint_sample847jI1LwxF", - "tinType": "BUSINESS", - "tinVerificationId": "tinVerificationId_sample1b0E6efa89", - "tinVerificationStatus": "MATCH", - }, - "payerUrl": StringContaining "-FORM-1099-NEC-COPY-C.pdf", - "status": "CREATED", - } - ` - ); - }); -}); - -describe(`abound.${resource}.delete()`, () => { - test(`deletes a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].delete(sampleId); - - // Assert - expect(response).toMatchInlineSnapshot("{}"); - }); -}); diff --git a/src/resources/1099-nec.ts b/src/resources/1099-nec.ts deleted file mode 100644 index 81280a00..00000000 --- a/src/resources/1099-nec.ts +++ /dev/null @@ -1,72 +0,0 @@ -import type { AboundContext } from "../abound.js"; -import { - action, - actionWithEmptyRequest, - delete_, - get, - list, - post, -} from "./base/base-resource.js"; -import type { MailingRequest } from "./mailings.js"; -import type { - StateTaxInfoWithStateIncome, - Form1099, - Form1099Request, - Form1099Response, - Form1099Status, -} from "./types/1099.js"; -import type { Pagination } from "./types/pagination.js"; -import type { PayeeRequest } from "./types/payee.js"; - -// Response body -export type Form1099Nec = Form1099 & - Form1099Response & { - formFields: Form1099NecFormFields; - }; - -// Request body -export type Form1099NecRequest = Form1099Request & { - formFields: Form1099NecFormFields; -}; - -// Correct request body -export type CorrectForm1099NecRequest = { - payee: PayeeRequest; - formFields: Form1099NecFormFields; -}; - -// Query params -export type Form1099NecParameters = Pagination & { - filingYear?: number; - payeeTinFingerprint?: string; - payerTinFingerprint?: string; - status?: Form1099Status; - userId?: string; -}; - -export type Form1099NecFormFields = { - accountNumber?: string; - nonemployeeCompensation: number; - hasDirectSalesOver5000?: boolean; - federalIncomeTaxWithheld?: number; - stateTaxInfo: StateTaxInfoWithStateIncome[]; -}; - -const resource = "documents/1099-nec"; - -export function form1099NecResource(context: AboundContext) { - return { - create: post(resource, context), - list: list(resource, context), - mail: action(resource, context, "mail"), - file: actionWithEmptyRequest(resource, context, "file"), - correct: action( - resource, - context, - "correct" - ), - void: actionWithEmptyRequest(resource, context, "void"), - retrieve: get(resource, context), - delete: delete_(resource, context), - }; -} diff --git a/src/resources/access-tokens.test.ts b/src/resources/access-tokens.test.ts deleted file mode 100644 index 153df6fa..00000000 --- a/src/resources/access-tokens.test.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { describe, expect, test } from "vitest"; -import { Abound } from "../abound.js"; -import { - invalidConfig, - matchers, - sampleConfig, - singular, -} from "../test-utils.js"; - -const slug = "access-tokens"; -const resource = "accessTokens"; - -const request = { - expiresIn: 300, - userId: "userId_sampleXGMFnhOpeR", -}; - -const invalidRequest = {}; - -describe(`abound.${resource}.create()`, () => { - test("throws an error when the sdk config is invalid", async () => { - // Arrange - const abound = new Abound(invalidConfig); - - // Act & Assert - await expect(async () => - abound[resource].create(request) - ).rejects.toThrowErrorMatchingInlineSnapshot( - `[Error: Your app is not authorized to do this (Code 6b6d7bbe)]` - ); - }); - - test(`throws a bad request error when creating an invalid ${singular( - slug - )}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act & Assert - await expect(async () => - // @ts-expect-error required for test case - abound[resource].create(invalidRequest) - ).rejects.toThrowErrorMatchingInlineSnapshot(` - AboundBadRequest { - "errors": [ - { - "field": "expiresIn", - "message": "Expected expiresIn to be of type number, but received undefined", - }, - ], - } - `); - }); - - test(`creates a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].create(request); - - // Assert - expect(response).toMatchInlineSnapshot( - { - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - expiresAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - }, - ` - { - "accessToken": "accessToken_sampleeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2OTY5ODczNTcsImV4cCI6MTY5Njk4NzY1NywiYXVkIjoiYXBwSWRfc2FtcGxlcU5oVmNkWVFZVSIsImlzcyI6Imh0dHBzOi8vc2FuZGJveC1hcGkud2l0aGFib3VuZC5jb20vdjQiLCJzdWIiOiJ1c2VySWRfc2FtcGxlWEdNRm5oT3BlUiJ9.-NrPVQvsnM8vJouyuP5yeFGlYb1xGgR-gS3v87p5BQk", - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "expiresAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - } - ` - ); - }); -}); diff --git a/src/resources/access-tokens.ts b/src/resources/access-tokens.ts deleted file mode 100644 index f805a9b0..00000000 --- a/src/resources/access-tokens.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { AboundContext } from "../abound.js"; -import { post } from "./base/base-resource.js"; - -// Response body -export type AccessToken = { - accessToken: string; - createdAt: string; - expiresAt: string; -}; - -// Request body -export type AccessTokenRequest = { - expiresIn: number; - userId?: string; -}; - -const resource = "access-tokens"; - -export function accessTokensResource(context: AboundContext) { - return { - create: post(resource, context), - }; -} diff --git a/src/resources/base/abound-bad-request.ts b/src/resources/base/abound-bad-request.ts deleted file mode 100644 index 2a114dd9..00000000 --- a/src/resources/base/abound-bad-request.ts +++ /dev/null @@ -1,13 +0,0 @@ -export type ApiBadRequest = { - errors: Array<{ - field?: string; - message: string; - }>; -}; - -export class AboundBadRequest { - errors: ApiBadRequest["errors"]; - constructor(apiErrors: ApiBadRequest["errors"]) { - this.errors = apiErrors; - } -} diff --git a/src/resources/base/abound-error.ts b/src/resources/base/abound-error.ts deleted file mode 100644 index ca81c363..00000000 --- a/src/resources/base/abound-error.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type ApiError = { - message: string; -}; - -export class AboundError extends Error {} diff --git a/src/resources/base/base-resource.ts b/src/resources/base/base-resource.ts deleted file mode 100644 index 6ee0af0c..00000000 --- a/src/resources/base/base-resource.ts +++ /dev/null @@ -1,184 +0,0 @@ -import type { EmptyObject } from "type-fest"; -import { type AboundContext } from "../../abound.js"; -import { AboundBadRequest, type ApiBadRequest } from "./abound-bad-request.js"; -import { AboundError, type ApiError } from "./abound-error.js"; - -// eslint-disable-next-line @typescript-eslint/naming-convention -export function post( - resource: string, - context: AboundContext -) { - return async (request: TRequest): Promise => - fetch(`${context.baseUrl}/v4/${resource}`, { - method: "POST", - headers: context.headers, - body: JSON.stringify(request), - }).then(async (response) => { - if (response.ok) { - return response.json() as Promise; - } - - const error = await response.json(); - if (response.status === 400) { - const { errors } = error as ApiBadRequest; - // eslint-disable-next-line @typescript-eslint/only-throw-error - throw new AboundBadRequest(errors); - } - - const { message } = error as ApiError; - throw new AboundError(message); - }); -} - -export function list< - // eslint-disable-next-line @typescript-eslint/naming-convention - TResponse, - // eslint-disable-next-line @typescript-eslint/naming-convention - TParameters extends Record, ->(resource: string, context: AboundContext) { - return async (parameters?: TParameters): Promise => { - const urlSearchParameters = new URLSearchParams(); - for (const [key, value] of Object.entries(parameters ?? {})) { - urlSearchParameters.append(key, String(value)); - } - - let queryStringParameters = ""; - if (urlSearchParameters.size > 0) { - queryStringParameters = `?${urlSearchParameters.toString()}`; - } - - return fetch(`${context.baseUrl}/v4/${resource}${queryStringParameters}`, { - method: "GET", - headers: context.headers, - }).then(async (response) => { - if (response.ok) { - return response.json() as Promise; - } - - const error = await response.json(); - if (response.status === 400) { - const { errors } = error as ApiBadRequest; - // eslint-disable-next-line @typescript-eslint/only-throw-error - throw new AboundBadRequest(errors); - } - - const { message } = error as ApiError; - throw new AboundError(message); - }); - }; -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -export function get(resource: string, context: AboundContext) { - return async (id: string): Promise => - fetch(`${context.baseUrl}/v4/${resource}/${id}`, { - method: "GET", - headers: context.headers, - }).then(async (response) => { - if (response.ok) { - return response.json() as Promise; - } - - const error = await response.json(); - const { message } = error as ApiError; - throw new AboundError(message); - }); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -export function put( - resource: string, - context: AboundContext -) { - return async (id: string, request: TRequest): Promise => - fetch(`${context.baseUrl}/v4/${resource}/${id}`, { - method: "PUT", - headers: context.headers, - body: JSON.stringify(request), - }).then(async (response) => { - if (response.ok) { - return response.json() as Promise; - } - - const error = await response.json(); - if (response.status === 400) { - const { errors } = error as ApiBadRequest; - // eslint-disable-next-line @typescript-eslint/only-throw-error - throw new AboundBadRequest(errors); - } - - const { message } = error as ApiError; - throw new AboundError(message); - }); -} - -export function delete_(resource: string, context: AboundContext) { - return async (id: string): Promise => - fetch(`${context.baseUrl}/v4/${resource}/${id}`, { - method: "DELETE", - headers: context.headers, - }).then(async (response) => { - if (response.ok) { - return response.json() as Promise; - } - - const error = await response.json(); - const { message } = error as ApiError; - throw new AboundError(message); - }); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -export function action( - resource: string, - context: AboundContext, - action: string -) { - return async (id: string, request: TRequest): Promise => - fetch(`${context.baseUrl}/v4/${resource}/${id}/${action}`, { - method: "POST", - headers: context.headers, - body: JSON.stringify(request), - }).then(async (response) => { - if (response.ok) { - return response.json() as Promise; - } - - const error = await response.json(); - if (response.status === 400) { - const { errors } = error as ApiBadRequest; - // eslint-disable-next-line @typescript-eslint/only-throw-error - throw new AboundBadRequest(errors); - } - - const { message } = error as ApiError; - throw new AboundError(message); - }); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -export function actionWithEmptyRequest( - resource: string, - context: AboundContext, - action: string -) { - return async (id: string): Promise => - fetch(`${context.baseUrl}/v4/${resource}/${id}/${action}`, { - method: "POST", - headers: context.headers, - }).then(async (response) => { - if (response.ok) { - return response.json() as Promise; - } - - const error = await response.json(); - if (response.status === 400) { - const { errors } = error as ApiBadRequest; - // eslint-disable-next-line @typescript-eslint/only-throw-error - throw new AboundBadRequest(errors); - } - - const { message } = error as ApiError; - throw new AboundError(message); - }); -} diff --git a/src/resources/index.ts b/src/resources/index.ts deleted file mode 100644 index 223f1173..00000000 --- a/src/resources/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -export * from "./1099-int.js"; -export * from "./1099-k.js"; -export * from "./1099-nec.js"; -export * from "./access-tokens.js"; -export * from "./mailings.js"; -export * from "./tin-verifications.js"; -export * from "./users.js"; -export * from "./w-9.js"; diff --git a/src/resources/mailings.test.ts b/src/resources/mailings.test.ts deleted file mode 100644 index becdec94..00000000 --- a/src/resources/mailings.test.ts +++ /dev/null @@ -1,281 +0,0 @@ -import { describe, expect, test } from "vitest"; -import { Abound } from "../abound.js"; -import { matchers, sampleConfig, singular } from "../test-utils.js"; - -const slug = "mailings"; -const resource = "mailings"; -const sampleId = "mailingId_sampleFV9b73IvAD"; - -const request = { - to: { - name: "Ada Lovelace", - name2: "InGen Corporation", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, - from: { - name: "Hooli, Inc.", - name2: "Hooli", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, -}; - -const invalidRequest = { - to: {}, - from: {}, -}; - -const updateRequest = { - to: { - ...request.to, - state: "MN", - }, - from: { - ...request.from, - state: "MN", - }, -}; - -describe(`abound.${resource}.list()`, () => { - test("throws a bad request error when the page query string parameter is invalid", async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act & Assert - await expect(async () => - abound[resource].list({ - // @ts-expect-error required for test case - page: "invalid_page", - }) - ).rejects.toThrowErrorMatchingInlineSnapshot(` - AboundBadRequest { - "errors": [ - { - "field": "page", - "message": "Expected page query string parameter to be a number greater than or equal to 1, but received invalid_page", - }, - ], - } - `); - }); - - test(`lists ${slug}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].list(); - - // Assert - expect(response.at(0)).toMatchInlineSnapshot( - { - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "from": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Hooli", - "postalCode": "94043", - "state": "CA", - }, - "id": "mailingId_sampleFV9b73IvAD", - "mailedFromId": "documentId_sampletTtqNfulW8", - "status": "CREATED", - "to": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Ada Lovelace", - "postalCode": "94043", - "state": "CA", - }, - "url": "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-1099-COPY-B.pdf", - } - ` - ); - }); -}); - -describe(`abound.${resource}.retrieve()`, () => { - test(`retrieves a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].retrieve(sampleId); - - // Assert - expect(response).toMatchInlineSnapshot( - { - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "from": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Hooli", - "postalCode": "94043", - "state": "CA", - }, - "id": "mailingId_sampleFV9b73IvAD", - "mailedFromId": "documentId_sampletTtqNfulW8", - "status": "CREATED", - "to": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Ada Lovelace", - "postalCode": "94043", - "state": "CA", - }, - "url": "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-1099-COPY-B.pdf", - } - ` - ); - }); -}); - -describe(`abound.${resource}.update()`, () => { - test(`throws a bad request error when attempting to update the ${singular( - resource - )} with an invalid request`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act & Assert - await expect(async () => - // @ts-expect-error required for test case - abound[resource].update(sampleId, invalidRequest) - ).rejects.toThrowErrorMatchingInlineSnapshot(` - AboundBadRequest { - "errors": [ - { - "field": "to.name", - "message": "Expected to.name to be of type string, but received undefined", - }, - { - "field": "to.address", - "message": "Expected to.address to be of type string, but received undefined", - }, - { - "field": "to.city", - "message": "Expected to.city to be of type string, but received undefined", - }, - { - "field": "to.state", - "message": "Expected to.state to be AK, AL, AR, AZ, CA, CO, CT, DC, DE, FL, GA, HI, IA, ID, IL, IN, KY, KS, LA, MA, MD, ME, MI, MN, MO, MS, MT, NC, ND, NE, NH, NJ, NM, NV, NY, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VA, VT, WA, WI, WV, WY, AA, AE, AP, AS, GU, MP, PR, or VI", - }, - { - "field": "to.postalCode", - "message": "Expected to.postalCode to be of type string, but received undefined", - }, - { - "field": "to.country", - "message": "Expected to.country to be US, but received undefined", - }, - { - "field": "from.name", - "message": "Expected from.name to be of type string, but received undefined", - }, - { - "field": "from.address", - "message": "Expected from.address to be of type string, but received undefined", - }, - { - "field": "from.city", - "message": "Expected from.city to be of type string, but received undefined", - }, - { - "field": "from.state", - "message": "Expected from.state to be AK, AL, AR, AZ, CA, CO, CT, DC, DE, FL, GA, HI, IA, ID, IL, IN, KY, KS, LA, MA, MD, ME, MI, MN, MO, MS, MT, NC, ND, NE, NH, NJ, NM, NV, NY, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VA, VT, WA, WI, WV, WY, AA, AE, AP, AS, GU, MP, PR, or VI", - }, - { - "field": "from.postalCode", - "message": "Expected from.postalCode to be of type string, but received undefined", - }, - { - "field": "from.country", - "message": "Expected from.country to be US, but received undefined", - }, - ], - } - `); - }); - - test(`updates a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].update(sampleId, updateRequest); - - // Assert - expect(response).toMatchInlineSnapshot( - { - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "from": { - "address": "256 Byron Street", - "address2": "Suite 32", - "city": "Palo Alto", - "country": "US", - "name": "Hooli, Inc.", - "name2": "Hooli", - "postalCode": "94306", - "state": "MN", - }, - "id": "mailingId_sampleFV9b73IvAD", - "mailedFromId": "documentId_sampletTtqNfulW8", - "status": "CREATED", - "to": { - "address": "256 Byron Street", - "address2": "Suite 32", - "city": "Palo Alto", - "country": "US", - "name": "Ada Lovelace", - "name2": "InGen Corporation", - "postalCode": "94306", - "state": "MN", - }, - "url": "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-1099-COPY-B.pdf", - } - ` - ); - }); -}); - -describe(`abound.${resource}.delete()`, () => { - test(`deletes a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].delete(sampleId); - - // Assert - expect(response).toMatchInlineSnapshot("{}"); - }); -}); diff --git a/src/resources/mailings.ts b/src/resources/mailings.ts deleted file mode 100644 index 2cfb3ddf..00000000 --- a/src/resources/mailings.ts +++ /dev/null @@ -1,54 +0,0 @@ -import type { AboundContext } from "../abound.js"; -import { delete_, get, list, put } from "./base/base-resource.js"; -import type { Pagination } from "./types/pagination.js"; - -// Response body -export type Mailing = { - id: string; - createdAt: string; - status: MailingStatus; - url: string; - userId?: string; - mailedFromId?: string; -} & MailingRequest; - -// Request body -export type MailingRequest = { - to: MailingAddress; - from: MailingAddress; -}; - -// Query params -export type MailingParameters = Pagination & { - status?: MailingStatus; - userId?: string; -}; - -export type MailingAddress = { - name: string; - name2?: string; - address: string; - address2?: string; - city: string; - state: string; - postalCode: string; - country: string; -}; - -export type MailingStatus = - | "CREATED" - | "PROCESSED_FOR_DELIVERY" - | "IN_TRANSIT" - | "DELIVERED" - | "RETURNED_TO_SENDER"; - -const resource = "mailings"; - -export function mailingsResource(context: AboundContext) { - return { - list: list(resource, context), - retrieve: get(resource, context), - update: put(resource, context), - delete: delete_(resource, context), - }; -} diff --git a/src/resources/tin-verifications.test.ts b/src/resources/tin-verifications.test.ts deleted file mode 100644 index f0fdeb8e..00000000 --- a/src/resources/tin-verifications.test.ts +++ /dev/null @@ -1,171 +0,0 @@ -import { describe, expect, test } from "vitest"; -import { Abound } from "../abound.js"; -import { - invalidConfig, - matchers, - sampleConfig, - singular, -} from "../test-utils.js"; - -const slug = "tin-verifications"; -const resource = "tinVerifications"; -const sampleId = "tinVerificationId_sample41SD71AV8f"; - -const request = { - name: "Ada Lovelace", - tin: "111111111", - userId: "userId_sampleXGMFnhOpeR", -}; - -const invalidRequest = { - userId: 1000, -}; - -describe(`abound.${resource}.create()`, () => { - test("throws an error when the sdk config is invalid", async () => { - // Arrange - const abound = new Abound(invalidConfig); - - // Act & Assert - await expect(async () => - abound[resource].create(request) - ).rejects.toThrowErrorMatchingInlineSnapshot( - `[Error: Your app is not authorized to do this (Code 6b6d7bbe)]` - ); - }); - - test(`throws a bad request error when creating an invalid ${singular( - slug - )}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act & Assert - await expect(async () => - // @ts-expect-error required for test case - abound[resource].create(invalidRequest) - ).rejects.toThrowErrorMatchingInlineSnapshot(` - AboundBadRequest { - "errors": [ - { - "field": "name", - "message": "Expected name to be of type string, but received undefined", - }, - { - "field": "tin", - "message": "Expected tin to be of type string, but received undefined", - }, - { - "field": "userId", - "message": "Expected userId to be of type string, but received number", - }, - ], - } - `); - }); - - test(`creates a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].create(request); - - // Assert - expect(response).toMatchInlineSnapshot( - { - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "id": "tinVerificationId_sample41SD71AV8f", - "name": "Ada Lovelace", - "status": "MATCH", - "tin": "*******11", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - "userId": "userId_sampleXGMFnhOpeR", - } - ` - ); - }); -}); - -describe(`abound.${resource}.list()`, () => { - test("throws a bad request error when the page query string parameter is invalid", async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act & Assert - await expect(async () => - abound[resource].list({ - // @ts-expect-error required for test case - page: "invalid_page", - }) - ).rejects.toThrowErrorMatchingInlineSnapshot(` - AboundBadRequest { - "errors": [ - { - "field": "page", - "message": "Expected page query string parameter to be a number greater than or equal to 1, but received invalid_page", - }, - ], - } - `); - }); - - test(`lists ${slug}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].list(); - - // Assert - expect(response.at(0)).toMatchInlineSnapshot( - { - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "id": "tinVerificationId_sample41SD71AV8f", - "name": "Ada Lovelace", - "status": "MATCH", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - } - ` - ); - }); -}); - -describe(`abound.${resource}.retrieve()`, () => { - test(`retrieves a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].retrieve(sampleId); - - // Assert - expect(response).toMatchInlineSnapshot( - { - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "id": "tinVerificationId_sample41SD71AV8f", - "name": "Ada Lovelace", - "status": "MATCH", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - } - ` - ); - }); -}); diff --git a/src/resources/tin-verifications.ts b/src/resources/tin-verifications.ts deleted file mode 100644 index dae5aed1..00000000 --- a/src/resources/tin-verifications.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type { AboundContext } from "../abound.js"; -import { post, list, get } from "./base/base-resource.js"; -import type { Pagination } from "./types/pagination.js"; - -// Response body -export type TinVerification = { - id: string; - createdAt: string; - status: TinVerificationStatus; - tinFingerprint: string; - tinType?: TinType; -} & TinVerificationRequest; - -export type TinVerificationStatus = "PENDING" | "MATCH" | "MISMATCH"; -export type TinType = "INDIVIDUAL" | "BUSINESS"; - -// Request body -export type TinVerificationRequest = { - name: string; - tin: string; - userId?: string; -}; - -// Query params -export type TinVerificationParameters = Pagination & { - tinFingerprint?: string; - status?: TinVerificationStatus; - userId?: string; -}; - -const resource = "tin-verifications"; - -export function tinVerificationsResource(context: AboundContext) { - return { - create: post(resource, context), - list: list(resource, context), - retrieve: get(resource, context), - }; -} diff --git a/src/resources/types/1099.ts b/src/resources/types/1099.ts deleted file mode 100644 index 791999f5..00000000 --- a/src/resources/types/1099.ts +++ /dev/null @@ -1,47 +0,0 @@ -import type { Payee, PayeeRequest } from "./payee.js"; -import type { Payer, PayerRequest } from "./payer.js"; - -export type StateTaxInfo = { - filingState: string; - payeeStateId?: string; - payerStateId?: string; - stateTaxWithheld?: number; -}; - -export type StateTaxInfoWithStateIncome = StateTaxInfo & { - stateIncome?: number; -}; - -// Response body -export type Form1099 = { - id: string; - createdAt: string; - status: Form1099Status; - payerUrl: string; - payeeUrl: string; - formFields: { - isVoid: boolean; - isCorrected: boolean; - }; - correctedById?: string; - correctedFromId?: string; - voidedById?: string; - voidedFromId?: string; -}; - -export type Form1099Response = { - filingYear: number; - payer: Payer; - payee: Payee; - userId?: string; -}; - -// Request body -export type Form1099Request = { - filingYear: number; - payer: PayerRequest; - payee: PayeeRequest; - userId?: string; -}; - -export type Form1099Status = "CREATED" | "FILED" | "ACCEPTED" | "REJECTED"; diff --git a/src/resources/types/pagination.ts b/src/resources/types/pagination.ts deleted file mode 100644 index 70afa71b..00000000 --- a/src/resources/types/pagination.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type Pagination = { - page?: number; -}; diff --git a/src/resources/types/payee.ts b/src/resources/types/payee.ts deleted file mode 100644 index 23266f1e..00000000 --- a/src/resources/types/payee.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { TinType, TinVerificationStatus } from "../tin-verifications.js"; - -export type Payee = { - name: string; - name2?: string; - tin: string; - tinType?: TinType; - tinFingerprint: string; - tinVerificationId: string; - tinVerificationStatus: TinVerificationStatus; - address: string; - address2?: string; - city?: string; - state?: string; - postalCode?: string; - country: string; -}; - -export type PayeeRequest = { - name: string; - name2?: string; - tin: string; - address: string; - address2?: string; - city?: string; - state?: string; - postalCode?: string; - country: string; -}; diff --git a/src/resources/types/payer.ts b/src/resources/types/payer.ts deleted file mode 100644 index a7fcc285..00000000 --- a/src/resources/types/payer.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { TinType, TinVerificationStatus } from "../tin-verifications.js"; - -export type Payer = { - name: string; - name2?: string; - tin: string; - tinType?: TinType; - tinFingerprint: string; - tinVerificationId: string; - tinVerificationStatus: TinVerificationStatus; - address: string; - address2?: string; - city?: string; - state?: string; - postalCode?: string; - country: string; - phoneNumber: string; -}; - -export type PayerRequest = { - name: string; - name2?: string; - tin: string; - address: string; - address2?: string; - city?: string; - state?: string; - postalCode?: string; - country: string; - phoneNumber: string; -}; diff --git a/src/resources/users.test.ts b/src/resources/users.test.ts deleted file mode 100644 index e279e8c7..00000000 --- a/src/resources/users.test.ts +++ /dev/null @@ -1,222 +0,0 @@ -import { describe, expect, test } from "vitest"; -import { Abound } from "../abound.js"; -import { - invalidConfig, - matchers, - sampleConfig, - singular, -} from "../test-utils.js"; - -const slug = "users"; -const resource = "users"; -const sampleId = "userId_sampleXGMFnhOpeR"; - -const request = { - email: "tj@piedpiper.io", - foreignId: "tj_miller", - metadata: { - title: "Board member of Pied Piper", - }, -}; - -const invalidRequest = { - email: "invalid_email_address", - foreignId: 1000, - metadata: "invalid_metadata", -}; - -const updateRequest = { - email: "erlich@piedpiper.io", -}; - -describe(`abound.${resource}.create()`, () => { - test("throws an error when the sdk config is invalid", async () => { - // Arrange - const abound = new Abound(invalidConfig); - - // Act & Assert - await expect(async () => - abound[resource].create(request) - ).rejects.toThrowErrorMatchingInlineSnapshot( - `[Error: Your app is not authorized to do this (Code 6b6d7bbe)]` - ); - }); - - test(`throws a bad request error when creating an invalid ${singular( - resource - )}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act & Assert - // @ts-expect-error required for test case - await expect(async () => abound[resource].create(invalidRequest)).rejects - .toThrowErrorMatchingInlineSnapshot(` - AboundBadRequest { - "errors": [ - { - "field": "email", - "message": "Expected email to be a valid email address", - }, - { - "field": "foreignId", - "message": "Expected foreignId to be of type string, but received number", - }, - { - "field": "metadata", - "message": "Expected metadata to be of type object, but received string", - }, - ], - } - `); - }); - - test(`creates a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].create(request); - - // Assert - expect(response).toMatchInlineSnapshot( - { - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "email": "tj@piedpiper.io", - "foreignId": "tj_miller", - "id": "userId_sampleXGMFnhOpeR", - "metadata": { - "title": "Board member of Pied Piper", - }, - } - ` - ); - }); -}); - -describe(`abound.${resource}.list()`, () => { - test("throws a bad request error when the page query string parameter is invalid", async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act & Assert - await expect(async () => - abound[resource].list({ - // @ts-expect-error required for test case - page: "invalid_page", - }) - ).rejects.toThrowErrorMatchingInlineSnapshot(` - AboundBadRequest { - "errors": [ - { - "field": "page", - "message": "Expected page query string parameter to be a number greater than or equal to 1, but received invalid_page", - }, - ], - } - `); - }); - - test(`lists ${slug}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].list(); - - // Assert - expect(response.at(0)).toMatchInlineSnapshot( - { - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "email": "your-users-email@domain.com", - "id": "userId_sampleXGMFnhOpeR", - } - ` - ); - }); -}); - -describe(`abound.${resource}.retrieve()`, () => { - test(`retrieves a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].retrieve(sampleId); - - // Assert - expect(response).toMatchInlineSnapshot( - { - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "email": "your-users-email@domain.com", - "id": "userId_sampleXGMFnhOpeR", - } - ` - ); - }); -}); - -describe(`abound.${resource}.update()`, () => { - test(`throws a bad request error when attempting to update the ${singular( - resource - )} with an invalid request`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act & Assert - // @ts-expect-error required for test case - await expect(async () => abound[resource].update(sampleId, invalidRequest)) - .rejects.toThrowErrorMatchingInlineSnapshot(` - AboundBadRequest { - "errors": [ - { - "field": "email", - "message": "Expected email to be a valid email address", - }, - { - "field": "foreignId", - "message": "Expected foreignId to be of type string, but received number", - }, - { - "field": "metadata", - "message": "Expected metadata to be of type object, but received string", - }, - ], - } - `); - }); - - test(`updates a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].update(sampleId, updateRequest); - - // Assert - expect(response).toMatchInlineSnapshot( - { - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "email": "erlich@piedpiper.io", - "id": "userId_sampleXGMFnhOpeR", - } - ` - ); - }); -}); diff --git a/src/resources/users.ts b/src/resources/users.ts deleted file mode 100644 index 81958cb5..00000000 --- a/src/resources/users.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { type AboundContext } from "../abound.js"; -import { post, list, get, put } from "./base/base-resource.js"; -import type { Pagination } from "./types/pagination.js"; - -// Response body -export type User = { - id: string; - createdAt: string; -} & UserRequest; - -// Request body -export type UserRequest = { - email?: string; - foreignId?: string; - metadata?: Record; -}; - -// Query params -export type UserParameters = Pagination & { - email?: string; - foreignId?: string; -}; - -const resource = "users"; - -export function usersResource(context: AboundContext) { - return { - create: post(resource, context), - list: list(resource, context), - retrieve: get(resource, context), - update: put(resource, context), - }; -} diff --git a/src/resources/w-9.test.ts b/src/resources/w-9.test.ts deleted file mode 100644 index 7f44648b..00000000 --- a/src/resources/w-9.test.ts +++ /dev/null @@ -1,321 +0,0 @@ -import { describe, expect, test } from "vitest"; -import { Abound } from "../abound.js"; -import { - invalidConfig, - matchers, - sampleConfig, - singular, -} from "../test-utils.js"; - -const slug = "documents/w-9"; -const resource = "formW9"; -const sampleId = "documentId_sampleVppNzzIbQT"; - -const request = { - payee: { - name: "Ada Lovelace", - name2: "InGen Corporation", - tin: "000000000", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - }, - payer: { - name: "Hooli, Inc.", - name2: "Hooli", - tin: "111111111", - address: "256 Byron Street", - address2: "Suite 32", - city: "Palo Alto", - state: "CA", - postalCode: "94306", - country: "US", - phoneNumber: "6501014096", - }, - formFields: { - taxClassification: "SOLE_PROPRIETOR" as const, - exemptPayeeCode: "1" as const, - exemptFatcaCode: "A" as const, - accountNumbers: ["10000001", "10000002"], - certifiedAt: "2023-01-01T00:00:00.000Z", - }, - userId: "userId_sampleXGMFnhOpeR", -}; - -const invalidRequest = { - payee: {}, - payer: {}, - formFields: {}, - userId: 1000, -}; - -describe(`abound.${resource}.create()`, () => { - test("throws an error when the sdk config is invalid", async () => { - // Arrange - const abound = new Abound(invalidConfig); - - // Act & Assert - await expect(async () => - abound[resource].create(request) - ).rejects.toThrowErrorMatchingInlineSnapshot( - `[Error: Your app is not authorized to do this (Code 6b6d7bbe)]` - ); - }); - - test(`throws a bad request error when creating an invalid ${singular( - resource - )}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act & Assert - // @ts-expect-error required for test case - await expect(async () => abound[resource].create(invalidRequest)).rejects - .toThrowErrorMatchingInlineSnapshot(` - AboundBadRequest { - "errors": [ - { - "field": "payee.name", - "message": "Expected payee.name to be of type string, but received undefined", - }, - { - "field": "payee.tin", - "message": "Expected payee.tin to be of type string, but received undefined", - }, - { - "field": "payee.address", - "message": "Expected payee.address to be of type string, but received undefined", - }, - { - "field": "payee.country", - "message": "Expected payee.country to be of type string, but received undefined", - }, - { - "field": "payer.name", - "message": "Expected payer.name to be of type string, but received undefined", - }, - { - "field": "payer.tin", - "message": "Expected payer.tin to be of type string, but received undefined", - }, - { - "field": "payer.address", - "message": "Expected payer.address to be of type string, but received undefined", - }, - { - "field": "payer.country", - "message": "Expected payer.country to be of type string, but received undefined", - }, - { - "field": "payer.phoneNumber", - "message": "Expected payer.phoneNumber to be of type string, but received undefined", - }, - { - "field": "formFields.taxClassification", - "message": "Expected formFields.taxClassification to be INDIVIDUAL, SOLE_PROPRIETOR, SINGLE_MEMBER_LLC, C_CORPORATION, S_CORPORATION, PARTNERSHIP, TRUST, ESTATE, LLC_PARTNERSHIP, LLC_C_CORPORATION, LLC_S_CORPORATION, or OTHER, but received undefined", - }, - { - "field": "userId", - "message": "Expected userId to be of type string, but received number", - }, - ], - } - `); - }); - - test(`creates a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].create(request); - - // Assert - expect(response).toMatchInlineSnapshot( - { - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - formFields: { - certifiedAt: expect.stringMatching( - matchers.isoDatetimeRegex - ) as string, - }, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "formFields": { - "accountNumbers": [ - "10000001", - "10000002", - ], - "certifiedAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "exemptFatcaCode": "A", - "exemptPayeeCode": "1", - "taxClassification": "SOLE_PROPRIETOR", - }, - "id": "documentId_sampleVppNzzIbQT", - "payee": { - "address": "256 Byron Street", - "address2": "Suite 32", - "city": "Palo Alto", - "country": "US", - "name": "Ada Lovelace", - "name2": "InGen Corporation", - "postalCode": "94306", - "state": "CA", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - "tinVerificationId": "tinVerificationId_sample41SD71AV8f", - "tinVerificationStatus": "MATCH", - }, - "payer": { - "address": "256 Byron Street", - "address2": "Suite 32", - "city": "Palo Alto", - "country": "US", - "name": "Hooli, Inc.", - "name2": "Hooli", - "phoneNumber": "6501014096", - "postalCode": "94306", - "state": "CA", - "tin": "*******11", - "tinFingerprint": "tinFingerprint_sample847jI1LwxF", - "tinType": "BUSINESS", - "tinVerificationId": "tinVerificationId_sample1b0E6efa89", - "tinVerificationStatus": "MATCH", - }, - "url": "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-W-9.pdf", - "userId": "userId_sampleXGMFnhOpeR", - } - ` - ); - }); -}); - -describe(`abound.${resource}.list()`, () => { - test("throws a bad request error when the page query string parameter is invalid", async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act & Assert - await expect(async () => - abound[resource].list({ - // @ts-expect-error required for test case - page: "invalid_page", - }) - ).rejects.toThrowErrorMatchingInlineSnapshot(` - AboundBadRequest { - "errors": [ - { - "field": "page", - "message": "Expected page query string parameter to be a number greater than or equal to 1, but received invalid_page", - }, - ], - } - `); - }); - - test(`lists ${slug}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].list(); - - // Assert - expect(response.at(0)).toMatchInlineSnapshot( - { - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - formFields: { - certifiedAt: expect.stringMatching( - matchers.isoDatetimeRegex - ) as string, - }, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "formFields": { - "accountNumbers": [ - "1234567890", - "1234567891", - ], - "certifiedAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "taxClassification": "SOLE_PROPRIETOR", - }, - "id": "documentId_sampleVppNzzIbQT", - "payee": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Ada Lovelace", - "postalCode": "94043", - "state": "CA", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - "tinVerificationId": "tinVerificationId_sample41SD71AV8f", - "tinVerificationStatus": "MATCH", - }, - "url": "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-W-9.pdf", - } - ` - ); - }); -}); - -describe(`abound.${resource}.retrieve()`, () => { - test(`retrieves a ${singular(slug)}`, async () => { - // Arrange - const abound = new Abound(sampleConfig); - - // Act - const response = await abound[resource].retrieve(sampleId); - - // Assert - expect(response).toMatchInlineSnapshot( - { - createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string, - formFields: { - certifiedAt: expect.stringMatching( - matchers.isoDatetimeRegex - ) as string, - }, - }, - ` - { - "createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "formFields": { - "accountNumbers": [ - "1234567890", - "1234567891", - ], - "certifiedAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/, - "taxClassification": "SOLE_PROPRIETOR", - }, - "id": "documentId_sampleVppNzzIbQT", - "payee": { - "address": "1401 N Shoreline Blvd", - "address2": "Suite 1", - "city": "Mountain View", - "country": "US", - "name": "Ada Lovelace", - "postalCode": "94043", - "state": "CA", - "tin": "*******00", - "tinFingerprint": "tinFingerprint_samplehy2BWO6JJG", - "tinType": "INDIVIDUAL", - "tinVerificationId": "tinVerificationId_sample41SD71AV8f", - "tinVerificationStatus": "MATCH", - }, - "url": "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-W-9.pdf", - } - ` - ); - }); -}); diff --git a/src/resources/w-9.ts b/src/resources/w-9.ts deleted file mode 100644 index 96da423d..00000000 --- a/src/resources/w-9.ts +++ /dev/null @@ -1,98 +0,0 @@ -import type { AboundContext } from "../abound.js"; -import { get, list, post } from "./base/base-resource.js"; -import type { TinType } from "./tin-verifications.js"; -import type { Pagination } from "./types/pagination.js"; -import type { Payee, PayeeRequest } from "./types/payee.js"; -import type { Payer, PayerRequest } from "./types/payer.js"; - -// Response body -export type FormW9 = { - id: string; - createdAt: string; - url: string; - payee: Payee; - payer?: Payer; - formFields: FormW9FormFields; - userId?: string; -}; - -// Request body -export type FormW9Request = { - payee: PayeeRequest & { - tinType?: TinType; - }; - payer?: PayerRequest; - formFields: FormW9FormFields; - userId?: string; -}; - -// Query params -export type FormW9Parameters = Pagination & { - payeeTinFingerprint?: string; - payerTinFingerprint?: string; - userId?: string; -}; - -export type FormW9FormFields = { - taxClassification: TaxClassification; - otherTaxClassification?: string; - exemptPayeeCode?: ExemptPayeeCode; - exemptFatcaCode?: ExemptFatcaCode; - accountNumbers?: string[]; - certifiedAt: string; -}; - -export type TaxClassification = - | "INDIVIDUAL" - | "SOLE_PROPRIETOR" - | "SINGLE_MEMBER_LLC" - | "C_CORPORATION" - | "S_CORPORATION" - | "PARTNERSHIP" - | "TRUST" - | "ESTATE" - | "LLC_PARTNERSHIP" - | "LLC_C_CORPORATION" - | "LLC_S_CORPORATION" - | "OTHER"; - -export type ExemptPayeeCode = - | "1" - | "2" - | "3" - | "4" - | "5" - | "6" - | "7" - | "8" - | "9" - | "10" - | "11" - | "12" - | "13"; - -export type ExemptFatcaCode = - | "A" - | "B" - | "C" - | "D" - | "E" - | "F" - | "G" - | "H" - | "I" - | "J" - | "K" - | "L" - | "M" - | "NOT_APPLICABLE"; - -const resource = "documents/w-9"; - -export function formW9Resource(context: AboundContext) { - return { - create: post(resource, context), - list: list(resource, context), - retrieve: get(resource, context), - }; -} diff --git a/src/test-utils.ts b/src/test-utils.ts deleted file mode 100644 index cb451a24..00000000 --- a/src/test-utils.ts +++ /dev/null @@ -1,19 +0,0 @@ -export const invalidConfig = { - environment: "SANDBOX" as const, - appId: "appId_invalid_app_id", - appSecret: "appSecret_invalid_app_secret", -}; - -export const sampleConfig = { - environment: "SANDBOX" as const, - appId: "appId_sampleqNhVcdYQYU", - appSecret: "appSecret_sampleMz2Zbj3Hq", -}; - -export const matchers = { - isoDatetimeRegex: /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/, -}; - -export function singular(text: string) { - return text.slice(-1).toLowerCase() === "s" ? text.slice(0, -1) : text; -} diff --git a/src/version.ts b/src/version.ts deleted file mode 100644 index 96ef99c1..00000000 --- a/src/version.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Generated by genversion. -export const version = "5.2.1"; diff --git a/tests/custom.test.ts b/tests/custom.test.ts new file mode 100644 index 00000000..7f5e031c --- /dev/null +++ b/tests/custom.test.ts @@ -0,0 +1,13 @@ +/** + * This is a custom test file, if you wish to add more tests + * to your SDK. + * Be sure to mark this file in `.fernignore`. + * + * If you include example requests/responses in your fern definition, + * you will have tests automatically generated for you. + */ +describe("test", () => { + it("default", () => { + expect(true).toBe(true); + }); +}); diff --git a/tests/unit/auth/BasicAuth.test.ts b/tests/unit/auth/BasicAuth.test.ts new file mode 100644 index 00000000..fc35704e --- /dev/null +++ b/tests/unit/auth/BasicAuth.test.ts @@ -0,0 +1,22 @@ +import { BasicAuth } from "../../../src/core/auth/BasicAuth"; + +describe("BasicAuth", () => { + describe("toAuthorizationHeader", () => { + it("correctly converts to header", () => { + expect( + BasicAuth.toAuthorizationHeader({ + username: "username", + password: "password", + }) + ).toBe("Basic dXNlcm5hbWU6cGFzc3dvcmQ="); + }); + }); + describe("fromAuthorizationHeader", () => { + it("correctly parses header", () => { + expect(BasicAuth.fromAuthorizationHeader("Basic dXNlcm5hbWU6cGFzc3dvcmQ=")).toEqual({ + username: "username", + password: "password", + }); + }); + }); +}); diff --git a/tests/unit/auth/BearerToken.test.ts b/tests/unit/auth/BearerToken.test.ts new file mode 100644 index 00000000..7757b87c --- /dev/null +++ b/tests/unit/auth/BearerToken.test.ts @@ -0,0 +1,14 @@ +import { BearerToken } from "../../../src/core/auth/BearerToken"; + +describe("BearerToken", () => { + describe("toAuthorizationHeader", () => { + it("correctly converts to header", () => { + expect(BearerToken.toAuthorizationHeader("my-token")).toBe("Bearer my-token"); + }); + }); + describe("fromAuthorizationHeader", () => { + it("correctly parses header", () => { + expect(BearerToken.fromAuthorizationHeader("Bearer my-token")).toBe("my-token"); + }); + }); +}); diff --git a/tests/unit/fetcher/Fetcher.test.ts b/tests/unit/fetcher/Fetcher.test.ts new file mode 100644 index 00000000..0e14a8c7 --- /dev/null +++ b/tests/unit/fetcher/Fetcher.test.ts @@ -0,0 +1,25 @@ +import fetchMock from "fetch-mock-jest"; +import { Fetcher, fetcherImpl } from "../../../src/core/fetcher/Fetcher"; + +describe("Test fetcherImpl", () => { + it("should handle successful request", async () => { + const mockArgs: Fetcher.Args = { + url: "https://httpbin.org/post", + method: "POST", + headers: { "X-Test": "x-test-header" }, + body: { data: "test" }, + contentType: "application/json", + requestType: "json", + }; + + fetchMock.mock("https://httpbin.org/post", 200, { + response: JSON.stringify({ data: "test" }), + }); + + const result = await fetcherImpl(mockArgs); + expect(result.ok).toBe(true); + if (result.ok) { + expect(result.body).toEqual({ data: "test" }); + } + }); +}); diff --git a/tests/unit/fetcher/createRequestUrl.test.ts b/tests/unit/fetcher/createRequestUrl.test.ts new file mode 100644 index 00000000..f2cd24b6 --- /dev/null +++ b/tests/unit/fetcher/createRequestUrl.test.ts @@ -0,0 +1,51 @@ +import { createRequestUrl } from "../../../src/core/fetcher/createRequestUrl"; + +describe("Test createRequestUrl", () => { + it("should return the base URL when no query parameters are provided", () => { + const baseUrl = "https://api.example.com"; + expect(createRequestUrl(baseUrl)).toBe(baseUrl); + }); + + it("should append simple query parameters", () => { + const baseUrl = "https://api.example.com"; + const queryParams = { key: "value", another: "param" }; + expect(createRequestUrl(baseUrl, queryParams)).toBe("https://api.example.com?key=value&another=param"); + }); + + it("should handle array query parameters", () => { + const baseUrl = "https://api.example.com"; + const queryParams = { items: ["a", "b", "c"] }; + expect(createRequestUrl(baseUrl, queryParams)).toBe("https://api.example.com?items=a&items=b&items=c"); + }); + + it("should handle object query parameters", () => { + const baseUrl = "https://api.example.com"; + const queryParams = { filter: { name: "John", age: 30 } }; + expect(createRequestUrl(baseUrl, queryParams)).toBe( + "https://api.example.com?filter%5Bname%5D=John&filter%5Bage%5D=30" + ); + }); + + it("should handle mixed types of query parameters", () => { + const baseUrl = "https://api.example.com"; + const queryParams = { + simple: "value", + array: ["x", "y"], + object: { key: "value" }, + }; + expect(createRequestUrl(baseUrl, queryParams)).toBe( + "https://api.example.com?simple=value&array=x&array=y&object%5Bkey%5D=value" + ); + }); + + it("should handle empty query parameters object", () => { + const baseUrl = "https://api.example.com"; + expect(createRequestUrl(baseUrl, {})).toBe(baseUrl); + }); + + it("should encode special characters in query parameters", () => { + const baseUrl = "https://api.example.com"; + const queryParams = { special: "a&b=c d" }; + expect(createRequestUrl(baseUrl, queryParams)).toBe("https://api.example.com?special=a%26b%3Dc%20d"); + }); +}); diff --git a/tests/unit/fetcher/getFetchFn.test.ts b/tests/unit/fetcher/getFetchFn.test.ts new file mode 100644 index 00000000..9b315ad0 --- /dev/null +++ b/tests/unit/fetcher/getFetchFn.test.ts @@ -0,0 +1,22 @@ +import { RUNTIME } from "../../../src/core/runtime"; +import { getFetchFn } from "../../../src/core/fetcher/getFetchFn"; + +describe("Test for getFetchFn", () => { + it("should get node-fetch function", async () => { + if (RUNTIME.type == "node") { + if (RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) { + expect(await getFetchFn()).toBe(fetch); + } else { + expect(await getFetchFn()).toEqual((await import("node-fetch")).default as any); + } + } + }); + + it("should get fetch function", async () => { + if (RUNTIME.type == "browser") { + const fetchFn = await getFetchFn(); + expect(typeof fetchFn).toBe("function"); + expect(fetchFn.name).toBe("fetch"); + } + }); +}); diff --git a/tests/unit/fetcher/getRequestBody.test.ts b/tests/unit/fetcher/getRequestBody.test.ts new file mode 100644 index 00000000..1b1462c5 --- /dev/null +++ b/tests/unit/fetcher/getRequestBody.test.ts @@ -0,0 +1,81 @@ +import { RUNTIME } from "../../../src/core/runtime"; +import { getRequestBody } from "../../../src/core/fetcher/getRequestBody"; + +if (RUNTIME.type === "browser") { + require("jest-fetch-mock").enableMocks(); +} + +describe("Test getRequestBody", () => { + it("should return FormData as is in Node environment", async () => { + if (RUNTIME.type === "node") { + const formData = new (await import("formdata-node")).FormData(); + formData.append("key", "value"); + const result = await getRequestBody({ + body: formData, + type: "file", + }); + expect(result).toBe(formData); + } + }); + + it("should stringify body if not FormData in Node environment", async () => { + if (RUNTIME.type === "node") { + const body = { key: "value" }; + const result = await getRequestBody({ + body, + type: "json", + }); + expect(result).toBe('{"key":"value"}'); + } + }); + + it("should return FormData in browser environment", async () => { + if (RUNTIME.type === "browser") { + const formData = new (await import("form-data")).default(); + formData.append("key", "value"); + const result = await getRequestBody({ + body: formData, + type: "file", + }); + expect(result).toBe(formData); + } + }); + + it("should stringify body if not FormData in browser environment", async () => { + if (RUNTIME.type === "browser") { + const body = { key: "value" }; + const result = await getRequestBody({ + body, + type: "json", + }); + expect(result).toBe('{"key":"value"}'); + } + }); + + it("should return the Uint8Array", async () => { + const input = new Uint8Array([1, 2, 3]); + const result = await getRequestBody({ + body: input, + type: "bytes", + }); + expect(result).toBe(input); + }); + + it("should return the input for content-type 'application/x-www-form-urlencoded'", async () => { + const input = "key=value&another=param"; + const result = await getRequestBody({ + body: input, + type: "other", + }); + expect(result).toBe(input); + }); + + it("should JSON stringify objects", async () => { + const input = { key: "value" }; + const result = await getRequestBody({ + body: input, + type: "json", + }); + expect(result).toBe('{"key":"value"}'); + }); +}); diff --git a/tests/unit/fetcher/getResponseBody.test.ts b/tests/unit/fetcher/getResponseBody.test.ts new file mode 100644 index 00000000..3510779e --- /dev/null +++ b/tests/unit/fetcher/getResponseBody.test.ts @@ -0,0 +1,68 @@ +import { RUNTIME } from "../../../src/core/runtime"; +import { getResponseBody } from "../../../src/core/fetcher/getResponseBody"; +import { chooseStreamWrapper } from "../../../src/core/fetcher/stream-wrappers/chooseStreamWrapper"; + +if (RUNTIME.type === "browser") { + require("jest-fetch-mock").enableMocks(); +} + +describe("Test getResponseBody", () => { + it("should handle blob response type", async () => { + const mockBlob = new Blob(["test"], { type: "text/plain" }); + const mockResponse = new Response(mockBlob); + const result = await getResponseBody(mockResponse, "blob"); + // @ts-expect-error + expect(result.constructor.name).toBe("Blob"); + }); + + it("should handle sse response type", async () => { + if (RUNTIME.type === "node") { + const mockStream = new ReadableStream(); + const mockResponse = new Response(mockStream); + const result = await getResponseBody(mockResponse, "sse"); + expect(result).toBe(mockStream); + } + }); + + it("should handle streaming response type", async () => { + if (RUNTIME.type === "node") { + const mockStream = new ReadableStream(); + const mockResponse = new Response(mockStream); + const result = await getResponseBody(mockResponse, "streaming"); + // need to reinstantiate string as a result of locked state in Readable Stream after registration with Response + expect(JSON.stringify(result)).toBe(JSON.stringify(await chooseStreamWrapper(new ReadableStream()))); + } + }); + + it("should handle text response type", async () => { + const mockResponse = new Response("test text"); + const result = await getResponseBody(mockResponse, "text"); + expect(result).toBe("test text"); + }); + + it("should handle JSON response", async () => { + const mockJson = { key: "value" }; + const mockResponse = new Response(JSON.stringify(mockJson)); + const result = await getResponseBody(mockResponse); + expect(result).toEqual(mockJson); + }); + + it("should handle empty response", async () => { + const mockResponse = new Response(""); + const result = await getResponseBody(mockResponse); + expect(result).toBeUndefined(); + }); + + it("should handle non-JSON response", async () => { + const mockResponse = new Response("invalid json"); + const result = await getResponseBody(mockResponse); + expect(result).toEqual({ + ok: false, + error: { + reason: "non-json", + statusCode: 200, + rawBody: "invalid json", + }, + }); + }); +}); diff --git a/tests/unit/fetcher/makeRequest.test.ts b/tests/unit/fetcher/makeRequest.test.ts new file mode 100644 index 00000000..5969d515 --- /dev/null +++ b/tests/unit/fetcher/makeRequest.test.ts @@ -0,0 +1,58 @@ +import { RUNTIME } from "../../../src/core/runtime"; +import { makeRequest } from "../../../src/core/fetcher/makeRequest"; + +if (RUNTIME.type === "browser") { + require("jest-fetch-mock").enableMocks(); +} + +describe("Test makeRequest", () => { + const mockPostUrl = "https://httpbin.org/post"; + const mockGetUrl = "https://httpbin.org/get"; + const mockHeaders = { "Content-Type": "application/json" }; + const mockBody = JSON.stringify({ key: "value" }); + + let mockFetch: jest.Mock; + + beforeEach(() => { + mockFetch = jest.fn(); + mockFetch.mockResolvedValue(new Response(JSON.stringify({ test: "successful" }), { status: 200 })); + }); + + it("should handle POST request correctly", async () => { + const response = await makeRequest(mockFetch, mockPostUrl, "POST", mockHeaders, mockBody); + const responseBody = await response.json(); + expect(responseBody).toEqual({ test: "successful" }); + expect(mockFetch).toHaveBeenCalledTimes(1); + const [calledUrl, calledOptions] = mockFetch.mock.calls[0]; + expect(calledUrl).toBe(mockPostUrl); + expect(calledOptions).toEqual( + expect.objectContaining({ + method: "POST", + headers: mockHeaders, + body: mockBody, + credentials: undefined, + }) + ); + expect(calledOptions.signal).toBeDefined(); + expect(calledOptions.signal).toBeInstanceOf(AbortSignal); + }); + + it("should handle GET request correctly", async () => { + const response = await makeRequest(mockFetch, mockGetUrl, "GET", mockHeaders, undefined); + const responseBody = await response.json(); + expect(responseBody).toEqual({ test: "successful" }); + expect(mockFetch).toHaveBeenCalledTimes(1); + const [calledUrl, calledOptions] = mockFetch.mock.calls[0]; + expect(calledUrl).toBe(mockGetUrl); + expect(calledOptions).toEqual( + expect.objectContaining({ + method: "GET", + headers: mockHeaders, + body: undefined, + credentials: undefined, + }) + ); + expect(calledOptions.signal).toBeDefined(); + expect(calledOptions.signal).toBeInstanceOf(AbortSignal); + }); +}); diff --git a/tests/unit/fetcher/requestWithRetries.test.ts b/tests/unit/fetcher/requestWithRetries.test.ts new file mode 100644 index 00000000..b53e0436 --- /dev/null +++ b/tests/unit/fetcher/requestWithRetries.test.ts @@ -0,0 +1,85 @@ +import { RUNTIME } from "../../../src/core/runtime"; +import { requestWithRetries } from "../../../src/core/fetcher/requestWithRetries"; + +if (RUNTIME.type === "browser") { + require("jest-fetch-mock").enableMocks(); +} + +describe("Test exponential backoff", () => { + let mockFetch: jest.Mock; + let originalSetTimeout: typeof setTimeout; + + beforeEach(() => { + mockFetch = jest.fn(); + originalSetTimeout = global.setTimeout; + jest.useFakeTimers(); + }); + + afterEach(() => { + jest.useRealTimers(); + global.setTimeout = originalSetTimeout; + }); + + it("should retry on 408, 409, 429, 500+", async () => { + mockFetch + .mockResolvedValueOnce(new Response("", { status: 408 })) + .mockResolvedValueOnce(new Response("", { status: 409 })) + .mockResolvedValueOnce(new Response("", { status: 429 })) + .mockResolvedValueOnce(new Response("", { status: 500 })) + .mockResolvedValueOnce(new Response("", { status: 502 })) + .mockResolvedValueOnce(new Response("", { status: 200 })) + .mockResolvedValueOnce(new Response("", { status: 408 })); + + const responsePromise = requestWithRetries(() => mockFetch(), 10); + + await jest.advanceTimersByTimeAsync(10000); + const response = await responsePromise; + + expect(mockFetch).toHaveBeenCalledTimes(6); + expect(response.status).toBe(200); + }); + + it("should retry max 3 times", async () => { + mockFetch + .mockResolvedValueOnce(new Response("", { status: 408 })) + .mockResolvedValueOnce(new Response("", { status: 409 })) + .mockResolvedValueOnce(new Response("", { status: 429 })) + .mockResolvedValueOnce(new Response("", { status: 429 })); + + const responsePromise = requestWithRetries(() => mockFetch(), 3); + + await jest.advanceTimersByTimeAsync(10000); + const response = await responsePromise; + + expect(mockFetch).toHaveBeenCalledTimes(4); + expect(response.status).toBe(429); + }); + it("should not retry on 200", async () => { + mockFetch + .mockResolvedValueOnce(new Response("", { status: 200 })) + .mockResolvedValueOnce(new Response("", { status: 409 })); + + const responsePromise = requestWithRetries(() => mockFetch(), 3); + + await jest.advanceTimersByTimeAsync(10000); + const response = await responsePromise; + + expect(mockFetch).toHaveBeenCalledTimes(1); + expect(response.status).toBe(200); + }); + + it("should retry with exponential backoff timing", async () => { + mockFetch.mockResolvedValue(new Response("", { status: 500 })); + const maxRetries = 7; + const responsePromise = requestWithRetries(() => mockFetch(), maxRetries); + expect(mockFetch).toHaveBeenCalledTimes(1); + + const delays = [1, 2, 4, 8, 16, 32, 64]; + for (let i = 0; i < delays.length; i++) { + await jest.advanceTimersByTimeAsync(delays[i] as number); + expect(mockFetch).toHaveBeenCalledTimes(Math.min(i + 2, maxRetries + 1)); + } + const response = await responsePromise; + expect(response.status).toBe(500); + }); +}); diff --git a/tests/unit/fetcher/signals.test.ts b/tests/unit/fetcher/signals.test.ts new file mode 100644 index 00000000..9cabfa07 --- /dev/null +++ b/tests/unit/fetcher/signals.test.ts @@ -0,0 +1,69 @@ +import { anySignal, getTimeoutSignal } from "../../../src/core/fetcher/signals"; + +describe("Test getTimeoutSignal", () => { + beforeEach(() => { + jest.useFakeTimers(); + }); + + afterEach(() => { + jest.useRealTimers(); + }); + + it("should return an object with signal and abortId", () => { + const { signal, abortId } = getTimeoutSignal(1000); + + expect(signal).toBeDefined(); + expect(abortId).toBeDefined(); + expect(signal).toBeInstanceOf(AbortSignal); + expect(signal.aborted).toBe(false); + }); + + it("should create a signal that aborts after the specified timeout", () => { + const timeoutMs = 5000; + const { signal } = getTimeoutSignal(timeoutMs); + + expect(signal.aborted).toBe(false); + + jest.advanceTimersByTime(timeoutMs - 1); + expect(signal.aborted).toBe(false); + + jest.advanceTimersByTime(1); + expect(signal.aborted).toBe(true); + }); +}); + +describe("Test anySignal", () => { + it("should return an AbortSignal", () => { + const signal = anySignal(new AbortController().signal); + expect(signal).toBeInstanceOf(AbortSignal); + }); + + it("should abort when any of the input signals is aborted", () => { + const controller1 = new AbortController(); + const controller2 = new AbortController(); + const signal = anySignal(controller1.signal, controller2.signal); + + expect(signal.aborted).toBe(false); + controller1.abort(); + expect(signal.aborted).toBe(true); + }); + + it("should handle an array of signals", () => { + const controller1 = new AbortController(); + const controller2 = new AbortController(); + const signal = anySignal([controller1.signal, controller2.signal]); + + expect(signal.aborted).toBe(false); + controller2.abort(); + expect(signal.aborted).toBe(true); + }); + + it("should abort immediately if one of the input signals is already aborted", () => { + const controller1 = new AbortController(); + const controller2 = new AbortController(); + controller1.abort(); + + const signal = anySignal(controller1.signal, controller2.signal); + expect(signal.aborted).toBe(true); + }); +}); diff --git a/tests/unit/fetcher/stream-wrappers/Node18UniversalStreamWrapper.test.ts b/tests/unit/fetcher/stream-wrappers/Node18UniversalStreamWrapper.test.ts new file mode 100644 index 00000000..e307b158 --- /dev/null +++ b/tests/unit/fetcher/stream-wrappers/Node18UniversalStreamWrapper.test.ts @@ -0,0 +1,178 @@ +import { Node18UniversalStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper"; + +describe("Node18UniversalStreamWrapper", () => { + it("should set encoding to utf-8", async () => { + const rawStream = new ReadableStream(); + const stream = new Node18UniversalStreamWrapper(rawStream); + const setEncodingSpy = jest.spyOn(stream, "setEncoding"); + + stream.setEncoding("utf-8"); + + expect(setEncodingSpy).toHaveBeenCalledWith("utf-8"); + }); + + it("should register an event listener for readable", async () => { + const rawStream = new ReadableStream(); + const stream = new Node18UniversalStreamWrapper(rawStream); + const onSpy = jest.spyOn(stream, "on"); + + stream.on("readable", () => {}); + + expect(onSpy).toHaveBeenCalledWith("readable", expect.any(Function)); + }); + + it("should remove an event listener for data", async () => { + const rawStream = new ReadableStream(); + const stream = new Node18UniversalStreamWrapper(rawStream); + const offSpy = jest.spyOn(stream, "off"); + + const fn = () => {}; + stream.on("data", fn); + stream.off("data", fn); + + expect(offSpy).toHaveBeenCalledWith("data", expect.any(Function)); + }); + + it("should write to dest when calling pipe to writable stream", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new Node18UniversalStreamWrapper(rawStream); + const dest = new WritableStream({ + write(chunk) { + expect(chunk).toEqual(new TextEncoder().encode("test")); + }, + }); + + stream.pipe(dest); + }); + + it("should write to dest when calling pipe to node writable stream", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new Node18UniversalStreamWrapper(rawStream); + const dest = new (await import("stream")).Writable({ + write(chunk, encoding, callback) { + expect(chunk.toString()).toEqual("test"); + callback(); + }, + }); + + stream.pipe(dest); + }); + + it("should write nothing when calling pipe and unpipe", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new Node18UniversalStreamWrapper(rawStream); + const buffer: Uint8Array[] = []; + const dest = new WritableStream({ + write(chunk) { + buffer.push(chunk); + }, + }); + + stream.pipe(dest); + stream.unpipe(dest); + expect(buffer).toEqual([]); + }); + + it("should destroy the stream", async () => { + const rawStream = new ReadableStream(); + const stream = new Node18UniversalStreamWrapper(rawStream); + const destroySpy = jest.spyOn(stream, "destroy"); + + stream.destroy(); + + expect(destroySpy).toHaveBeenCalled(); + }); + + it("should pause and resume the stream", async () => { + const rawStream = new ReadableStream(); + const stream = new Node18UniversalStreamWrapper(rawStream); + const pauseSpy = jest.spyOn(stream, "pause"); + const resumeSpy = jest.spyOn(stream, "resume"); + + expect(stream.isPaused).toBe(false); + stream.pause(); + expect(stream.isPaused).toBe(true); + stream.resume(); + + expect(pauseSpy).toHaveBeenCalled(); + expect(resumeSpy).toHaveBeenCalled(); + }); + + it("should read the stream", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new Node18UniversalStreamWrapper(rawStream); + + expect(await stream.read()).toEqual(new TextEncoder().encode("test")); + expect(await stream.read()).toEqual(new TextEncoder().encode("test")); + }); + + it("should read the stream as text", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new Node18UniversalStreamWrapper(rawStream); + + const data = await stream.text(); + + expect(data).toEqual("testtest"); + }); + + it("should read the stream as json", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode(JSON.stringify({ test: "test" }))); + controller.close(); + }, + }); + const stream = new Node18UniversalStreamWrapper(rawStream); + + const data = await stream.json(); + + expect(data).toEqual({ test: "test" }); + }); + + it("should allow use with async iteratable stream", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + let data = ""; + const stream = new Node18UniversalStreamWrapper(rawStream); + for await (const chunk of stream) { + data += new TextDecoder().decode(chunk); + } + + expect(data).toEqual("testtest"); + }); +}); diff --git a/tests/unit/fetcher/stream-wrappers/NodePre18StreamWrapper.test.ts b/tests/unit/fetcher/stream-wrappers/NodePre18StreamWrapper.test.ts new file mode 100644 index 00000000..861142a0 --- /dev/null +++ b/tests/unit/fetcher/stream-wrappers/NodePre18StreamWrapper.test.ts @@ -0,0 +1,124 @@ +import { NodePre18StreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/NodePre18StreamWrapper"; + +describe("NodePre18StreamWrapper", () => { + it("should set encoding to utf-8", async () => { + const rawStream = (await import("stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + const setEncodingSpy = jest.spyOn(stream, "setEncoding"); + + stream.setEncoding("utf-8"); + + expect(setEncodingSpy).toHaveBeenCalledWith("utf-8"); + }); + + it("should register an event listener for readable", async () => { + const rawStream = (await import("stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + const onSpy = jest.spyOn(stream, "on"); + + stream.on("readable", () => {}); + + expect(onSpy).toHaveBeenCalledWith("readable", expect.any(Function)); + }); + + it("should remove an event listener for data", async () => { + const rawStream = (await import("stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + const offSpy = jest.spyOn(stream, "off"); + + const fn = () => {}; + stream.on("data", fn); + stream.off("data", fn); + + expect(offSpy).toHaveBeenCalledWith("data", expect.any(Function)); + }); + + it("should write to dest when calling pipe to node writable stream", async () => { + const rawStream = (await import("stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + const dest = new (await import("stream")).Writable({ + write(chunk, encoding, callback) { + expect(chunk.toString()).toEqual("test"); + callback(); + }, + }); + + stream.pipe(dest); + }); + + it("should write nothing when calling pipe and unpipe", async () => { + const rawStream = (await import("stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + const buffer: Uint8Array[] = []; + const dest = new (await import("stream")).Writable({ + write(chunk, encoding, callback) { + buffer.push(chunk); + callback(); + }, + }); + stream.pipe(dest); + stream.unpipe(); + + expect(buffer).toEqual([]); + }); + + it("should destroy the stream", async () => { + const rawStream = (await import("stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + const destroySpy = jest.spyOn(stream, "destroy"); + + stream.destroy(); + + expect(destroySpy).toHaveBeenCalledWith(); + }); + + it("should pause the stream and resume", async () => { + const rawStream = (await import("stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + const pauseSpy = jest.spyOn(stream, "pause"); + + stream.pause(); + expect(stream.isPaused).toBe(true); + stream.resume(); + expect(stream.isPaused).toBe(false); + + expect(pauseSpy).toHaveBeenCalledWith(); + }); + + it("should read the stream", async () => { + const rawStream = (await import("stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + + expect(await stream.read()).toEqual("test"); + expect(await stream.read()).toEqual("test"); + }); + + it("should read the stream as text", async () => { + const rawStream = (await import("stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + + const data = await stream.text(); + + expect(data).toEqual("testtest"); + }); + + it("should read the stream as json", async () => { + const rawStream = (await import("stream")).Readable.from([JSON.stringify({ test: "test" })]); + const stream = new NodePre18StreamWrapper(rawStream); + + const data = await stream.json(); + + expect(data).toEqual({ test: "test" }); + }); + + it("should allow use with async iteratable stream", async () => { + const rawStream = (await import("stream")).Readable.from(["test", "test"]); + let data = ""; + const stream = new NodePre18StreamWrapper(rawStream); + for await (const chunk of stream) { + data += chunk; + } + + expect(data).toEqual("testtest"); + }); +}); diff --git a/tests/unit/fetcher/stream-wrappers/UndiciStreamWrapper.test.ts b/tests/unit/fetcher/stream-wrappers/UndiciStreamWrapper.test.ts new file mode 100644 index 00000000..1d171ce6 --- /dev/null +++ b/tests/unit/fetcher/stream-wrappers/UndiciStreamWrapper.test.ts @@ -0,0 +1,153 @@ +import { UndiciStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/UndiciStreamWrapper"; + +describe("UndiciStreamWrapper", () => { + it("should set encoding to utf-8", async () => { + const rawStream = new ReadableStream(); + const stream = new UndiciStreamWrapper(rawStream); + const setEncodingSpy = jest.spyOn(stream, "setEncoding"); + + stream.setEncoding("utf-8"); + + expect(setEncodingSpy).toHaveBeenCalledWith("utf-8"); + }); + + it("should register an event listener for readable", async () => { + const rawStream = new ReadableStream(); + const stream = new UndiciStreamWrapper(rawStream); + const onSpy = jest.spyOn(stream, "on"); + + stream.on("readable", () => {}); + + expect(onSpy).toHaveBeenCalledWith("readable", expect.any(Function)); + }); + + it("should remove an event listener for data", async () => { + const rawStream = new ReadableStream(); + const stream = new UndiciStreamWrapper(rawStream); + const offSpy = jest.spyOn(stream, "off"); + + const fn = () => {}; + stream.on("data", fn); + stream.off("data", fn); + + expect(offSpy).toHaveBeenCalledWith("data", expect.any(Function)); + }); + + it("should write to dest when calling pipe to writable stream", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new UndiciStreamWrapper(rawStream); + const dest = new WritableStream({ + write(chunk) { + expect(chunk).toEqual(new TextEncoder().encode("test")); + }, + }); + + stream.pipe(dest); + }); + + it("should write nothing when calling pipe and unpipe", async () => { + const rawStream = new ReadableStream(); + const stream = new UndiciStreamWrapper(rawStream); + const buffer: Uint8Array[] = []; + const dest = new WritableStream({ + write(chunk) { + buffer.push(chunk); + }, + }); + stream.pipe(dest); + stream.unpipe(dest); + + expect(buffer).toEqual([]); + }); + + it("should destroy the stream", async () => { + const rawStream = new ReadableStream(); + const stream = new UndiciStreamWrapper(rawStream); + const destroySpy = jest.spyOn(stream, "destroy"); + + stream.destroy(); + + expect(destroySpy).toHaveBeenCalled(); + }); + + it("should pause and resume the stream", async () => { + const rawStream = new ReadableStream(); + const stream = new UndiciStreamWrapper(rawStream); + const pauseSpy = jest.spyOn(stream, "pause"); + const resumeSpy = jest.spyOn(stream, "resume"); + + expect(stream.isPaused).toBe(false); + stream.pause(); + expect(stream.isPaused).toBe(true); + stream.resume(); + + expect(pauseSpy).toHaveBeenCalled(); + expect(resumeSpy).toHaveBeenCalled(); + }); + + it("should read the stream", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new UndiciStreamWrapper(rawStream); + + expect(await stream.read()).toEqual(new TextEncoder().encode("test")); + expect(await stream.read()).toEqual(new TextEncoder().encode("test")); + }); + + it("should read the stream as text", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new UndiciStreamWrapper(rawStream); + + const data = await stream.text(); + + expect(data).toEqual("testtest"); + }); + + it("should read the stream as json", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode(JSON.stringify({ test: "test" }))); + controller.close(); + }, + }); + const stream = new UndiciStreamWrapper(rawStream); + + const data = await stream.json(); + + expect(data).toEqual({ test: "test" }); + }); + + it("should allow use with async iteratable stream", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + let data = ""; + const stream = new UndiciStreamWrapper(rawStream); + for await (const chunk of stream) { + data += new TextDecoder().decode(chunk); + } + + expect(data).toEqual("testtest"); + }); +}); diff --git a/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts b/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts new file mode 100644 index 00000000..aff7579e --- /dev/null +++ b/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts @@ -0,0 +1,43 @@ +import { RUNTIME } from "../../../../src/core/runtime"; +import { chooseStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/chooseStreamWrapper"; +import { Node18UniversalStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper"; +import { NodePre18StreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/NodePre18StreamWrapper"; +import { UndiciStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/UndiciStreamWrapper"; + +describe("chooseStreamWrapper", () => { + beforeEach(() => { + RUNTIME.type = "unknown"; + RUNTIME.parsedVersion = 0; + }); + + it('should return a Node18UniversalStreamWrapper when RUNTIME.type is "node" and RUNTIME.parsedVersion is not null and RUNTIME.parsedVersion is greater than or equal to 18', async () => { + const expected = new Node18UniversalStreamWrapper(new ReadableStream()); + RUNTIME.type = "node"; + RUNTIME.parsedVersion = 18; + + const result = await chooseStreamWrapper(new ReadableStream()); + + expect(JSON.stringify(result)).toBe(JSON.stringify(expected)); + }); + + it('should return a NodePre18StreamWrapper when RUNTIME.type is "node" and RUNTIME.parsedVersion is not null and RUNTIME.parsedVersion is less than 18', async () => { + const stream = await import("stream"); + const expected = new NodePre18StreamWrapper(new stream.Readable()); + + RUNTIME.type = "node"; + RUNTIME.parsedVersion = 16; + + const result = await chooseStreamWrapper(new stream.Readable()); + + expect(JSON.stringify(result)).toEqual(JSON.stringify(expected)); + }); + + it('should return a Undici when RUNTIME.type is not "node"', async () => { + const expected = new UndiciStreamWrapper(new ReadableStream()); + RUNTIME.type = "browser"; + + const result = await chooseStreamWrapper(new ReadableStream()); + + expect(JSON.stringify(result)).toEqual(JSON.stringify(expected)); + }); +}); diff --git a/tests/wire/accessTokens.test.ts b/tests/wire/accessTokens.test.ts new file mode 100644 index 00000000..6a3f852d --- /dev/null +++ b/tests/wire/accessTokens.test.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { AboundClient } from "../../src/Client"; + +const client = new AboundClient({ + environment: process.env.TESTS_BASE_URL || "test", + sampleKey: process.env.TESTS_AUTH || "test", +}); + +describe("AccessTokens", () => { + test("create", async () => { + const response = await client.accessTokens.create({ + expiresIn: 900, + }); + expect(response).toEqual({ + accessToken: + "accessToken_sampleeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2OTY5ODczNTcsImV4cCI6MTY5Njk4NzY1NywiYXVkIjoiYXBwSWRfc2FtcGxlcU5oVmNkWVFZVSIsImlzcyI6Imh0dHBzOi8vc2FuZGJveC1hcGkud2l0aGFib3VuZC5jb20vdjQiLCJzdWIiOiJ1c2VySWRfc2FtcGxlWEdNRm5oT3BlUiJ9.-NrPVQvsnM8vJouyuP5yeFGlYb1xGgR-gS3v87p5BQk", + createdAt: "2024-01-01T00:00:00.000Z", + expiresAt: "2024-01-01T00:15:00.000Z", + }); + }); +}); diff --git a/tests/wire/electronicDeliveryConsents.test.ts b/tests/wire/electronicDeliveryConsents.test.ts new file mode 100644 index 00000000..6b878b14 --- /dev/null +++ b/tests/wire/electronicDeliveryConsents.test.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { AboundClient } from "../../src/Client"; + +const client = new AboundClient({ + environment: process.env.TESTS_BASE_URL || "test", + sampleKey: process.env.TESTS_AUTH || "test", +}); + +describe("ElectronicDeliveryConsents", () => { + test("list", async () => { + const response = await client.electronicDeliveryConsents.list(); + expect(response).toEqual([ + { + id: "eDeliveryConsentId_sample7zmM4xCWxe", + createdAt: "2024-01-01T00:00:00.000Z", + status: "ASSENTED", + email: "your-users-email@domain.com", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + }, + ]); + }); +}); diff --git a/tests/wire/form1099Int.test.ts b/tests/wire/form1099Int.test.ts new file mode 100644 index 00000000..10fc0efd --- /dev/null +++ b/tests/wire/form1099Int.test.ts @@ -0,0 +1,531 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../src/api/index"; +import { AboundClient } from "../../src/Client"; + +const client = new AboundClient({ + environment: process.env.TESTS_BASE_URL || "test", + sampleKey: process.env.TESTS_AUTH || "test", +}); + +describe("Form1099Int", () => { + test("list", async () => { + const response = await client.form1099Int.list(); + expect(response).toEqual([ + { + id: "documentId_samplepWpJ9Snlzb", + formFields: { + isCorrected: false, + isVoid: false, + bondPremium: 19423, + bondPremiumTaxExemptBond: 19423, + bondPremiumTreasury: 19423, + earlyWithdrawalPenalty: 23223, + foreignTaxPaid: 19423, + foreignTaxPaidCountry: "FR", + hasFatcaFilingRequirement: true, + interestIncome: 83232, + investmentExpenses: 19423, + marketDiscount: 19423, + payersRoutingNumber: "054000030", + specifiedPrivateActivityBondInterest: 19423, + taxExemptInterest: 19423, + usSavingsBondsInterest: 19423, + federalIncomeTaxWithheld: 0, + accountNumber: "A006SVmcrieFAbm3gsaV", + stateTaxInfo: [{ filingState: "CA", stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "CREATED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-COPY-C.pdf", + payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-COPY-B.pdf", + }, + ]); + }); + + test("create", async () => { + const response = await client.form1099Int.create({ + body: { + filingYear: 2023, + payer: { + name: "Hooli", + tin: "111111111", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + }, + payee: { + name: "Ada Lovelace", + tin: "000000000", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + }, + formFields: { + bondPremium: 19423, + bondPremiumTaxExemptBond: 19423, + bondPremiumTreasury: 19423, + earlyWithdrawalPenalty: 23223, + foreignTaxPaid: 19423, + foreignTaxPaidCountry: "FR", + hasFatcaFilingRequirement: true, + interestIncome: 83232, + investmentExpenses: 19423, + marketDiscount: 19423, + payersRoutingNumber: "054000030", + specifiedPrivateActivityBondInterest: 19423, + taxExemptInterest: 19423, + usSavingsBondsInterest: 19423, + federalIncomeTaxWithheld: 0, + accountNumber: "A006SVmcrieFAbm3gsaV", + stateTaxInfo: [ + { + filingState: Abound.types.Form1099FilingStateEnum.Ca, + stateTaxWithheld: 0, + }, + ], + }, + }, + }); + expect(response).toEqual({ + id: "documentId_samplepWpJ9Snlzb", + formFields: { + isCorrected: false, + isVoid: false, + bondPremium: 19423, + bondPremiumTaxExemptBond: 19423, + bondPremiumTreasury: 19423, + earlyWithdrawalPenalty: 23223, + foreignTaxPaid: 19423, + foreignTaxPaidCountry: "FR", + hasFatcaFilingRequirement: true, + interestIncome: 83232, + investmentExpenses: 19423, + marketDiscount: 19423, + payersRoutingNumber: "054000030", + specifiedPrivateActivityBondInterest: 19423, + taxExemptInterest: 19423, + usSavingsBondsInterest: 19423, + federalIncomeTaxWithheld: 0, + accountNumber: "A006SVmcrieFAbm3gsaV", + stateTaxInfo: [{ filingState: "CA", stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "CREATED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-COPY-C.pdf", + payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-COPY-B.pdf", + }); + }); + + test("mail", async () => { + const response = await client.form1099Int.mail("documentId_samplepWpJ9Snlzb", { + body: { + to: { + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + name: "Ada Lovelace", + }, + from: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + name: "Hooli", + }, + }, + }); + expect(response).toEqual({ + id: "mailingId_sampleFV9b73IvAD", + createdAt: "2024-01-01T00:00:00.000Z", + status: "CREATED", + url: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-1099-COPY-B.pdf", + mailedFromId: "documentId_sampletTtqNfulW8", + to: { + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + name: "Ada Lovelace", + }, + from: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + name: "Hooli", + }, + }); + }); + + test("file", async () => { + const response = await client.form1099Int.file("documentId_samplepWpJ9Snlzb"); + expect(response).toEqual({ + id: "documentId_samplepWpJ9Snlzb", + formFields: { + isCorrected: false, + isVoid: false, + bondPremium: 19423, + bondPremiumTaxExemptBond: 19423, + bondPremiumTreasury: 19423, + earlyWithdrawalPenalty: 23223, + foreignTaxPaid: 19423, + foreignTaxPaidCountry: "FR", + hasFatcaFilingRequirement: true, + interestIncome: 83232, + investmentExpenses: 19423, + marketDiscount: 19423, + payersRoutingNumber: "054000030", + specifiedPrivateActivityBondInterest: 19423, + taxExemptInterest: 19423, + usSavingsBondsInterest: 19423, + federalIncomeTaxWithheld: 0, + accountNumber: "A006SVmcrieFAbm3gsaV", + stateTaxInfo: [{ filingState: "CA", stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "FILED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-COPY-C.pdf", + payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-COPY-B.pdf", + }); + }); + + test("correct", async () => { + const response = await client.form1099Int.correct("documentId_samplepWpJ9Snlzb", { + body: { + payee: { + name: "Ada Lovelace", + tin: "000000000", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + }, + formFields: { + bondPremium: 19423, + bondPremiumTaxExemptBond: 19423, + bondPremiumTreasury: 19423, + earlyWithdrawalPenalty: 23223, + foreignTaxPaid: 19423, + foreignTaxPaidCountry: "FR", + hasFatcaFilingRequirement: true, + interestIncome: 10000, + investmentExpenses: 19423, + marketDiscount: 19423, + payersRoutingNumber: "054000030", + specifiedPrivateActivityBondInterest: 19423, + taxExemptInterest: 19423, + usSavingsBondsInterest: 19423, + federalIncomeTaxWithheld: 0, + accountNumber: "A006SVmcrieFAbm3gsaV", + stateTaxInfo: [ + { + filingState: Abound.types.Form1099FilingStateEnum.Ca, + }, + ], + }, + }, + }); + expect(response).toEqual({ + id: "documentId_samplexc6Aw2Qr9R", + correctedFromId: "documentId_samplepWpJ9Snlzb", + formFields: { + isCorrected: true, + isVoid: false, + bondPremium: 19423, + bondPremiumTaxExemptBond: 19423, + bondPremiumTreasury: 19423, + earlyWithdrawalPenalty: 23223, + foreignTaxPaid: 19423, + foreignTaxPaidCountry: "FR", + hasFatcaFilingRequirement: true, + interestIncome: 10000, + investmentExpenses: 19423, + marketDiscount: 19423, + payersRoutingNumber: "054000030", + specifiedPrivateActivityBondInterest: 19423, + taxExemptInterest: 19423, + usSavingsBondsInterest: 19423, + federalIncomeTaxWithheld: 0, + accountNumber: "A006SVmcrieFAbm3gsaV", + stateTaxInfo: [{ filingState: "CA", stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "FILED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: + "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-CORRECTED-COPY-C.pdf", + payeeUrl: + "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-CORRECTED-COPY-B.pdf", + }); + }); + + test("void", async () => { + const response = await client.form1099Int.void("documentId_samplepWpJ9Snlzb"); + expect(response).toEqual({ + id: "documentId_sampleVwRnewIBMu", + voidedFromId: "documentId_samplepWpJ9Snlzb", + formFields: { + isCorrected: false, + isVoid: true, + bondPremium: 19423, + bondPremiumTaxExemptBond: 19423, + bondPremiumTreasury: 19423, + earlyWithdrawalPenalty: 23223, + foreignTaxPaid: 19423, + foreignTaxPaidCountry: "FR", + hasFatcaFilingRequirement: true, + interestIncome: 83232, + investmentExpenses: 19423, + marketDiscount: 19423, + payersRoutingNumber: "054000030", + specifiedPrivateActivityBondInterest: 19423, + taxExemptInterest: 19423, + usSavingsBondsInterest: 19423, + federalIncomeTaxWithheld: 0, + accountNumber: "A006SVmcrieFAbm3gsaV", + stateTaxInfo: [{ filingState: "CA", stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "FILED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-VOID-COPY-C.pdf", + payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-VOID-COPY-B.pdf", + }); + }); + + test("retrieve", async () => { + const response = await client.form1099Int.retrieve("documentId_samplepWpJ9Snlzb"); + expect(response).toEqual({ + id: "documentId_samplepWpJ9Snlzb", + formFields: { + isCorrected: false, + isVoid: false, + bondPremium: 19423, + bondPremiumTaxExemptBond: 19423, + bondPremiumTreasury: 19423, + earlyWithdrawalPenalty: 23223, + foreignTaxPaid: 19423, + foreignTaxPaidCountry: "FR", + hasFatcaFilingRequirement: true, + interestIncome: 83232, + investmentExpenses: 19423, + marketDiscount: 19423, + payersRoutingNumber: "054000030", + specifiedPrivateActivityBondInterest: 19423, + taxExemptInterest: 19423, + usSavingsBondsInterest: 19423, + federalIncomeTaxWithheld: 0, + accountNumber: "A006SVmcrieFAbm3gsaV", + stateTaxInfo: [{ filingState: "CA", stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "CREATED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-COPY-C.pdf", + payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-INT-COPY-B.pdf", + }); + }); + + test("delete", async () => { + const response = await client.form1099Int.delete("documentId_samplepWpJ9Snlzb"); + expect(response).toEqual({}); + }); +}); diff --git a/tests/wire/form1099K.test.ts b/tests/wire/form1099K.test.ts new file mode 100644 index 00000000..8f395a04 --- /dev/null +++ b/tests/wire/form1099K.test.ts @@ -0,0 +1,595 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../src/api/index"; +import { AboundClient } from "../../src/Client"; + +const client = new AboundClient({ + environment: process.env.TESTS_BASE_URL || "test", + sampleKey: process.env.TESTS_AUTH || "test", +}); + +describe("Form1099K", () => { + test("list", async () => { + const response = await client.form1099K.list(); + expect(response).toEqual([ + { + id: "documentId_sampletTtqNfulW8", + formFields: { + isCorrected: false, + isVoid: false, + accountNumber: "A0MCFOfvWWL7AVtwrhiU", + aggregateGrossAmount: 27987876, + aggregateGrossAmountCardNotPresent: 2332323, + federalIncomeTaxWithheld: 0, + merchantCategoryCode: "4582", + numberOfPaymentTransactions: 767, + pseName: "Payment Entity", + payerClassification: "PSE", + transactionsReportedClassification: "PAYMENT_CARD", + psePhoneNumber: "5555555555", + grossAmountsByMonth: { + april: 2332323, + august: 2332323, + december: 2332323, + february: 2332323, + january: 2332323, + july: 2332323, + june: 2332323, + march: 2332323, + may: 2332323, + november: 2332323, + october: 2332323, + september: 2332323, + }, + stateTaxInfo: [{ filingState: "CA", stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "CREATED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-COPY-C.pdf", + payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-COPY-B.pdf", + }, + ]); + }); + + test("create", async () => { + const response = await client.form1099K.create({ + body: { + filingYear: 2023, + payer: { + name: "Hooli", + tin: "111111111", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + }, + payee: { + name: "Ada Lovelace", + tin: "000000000", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + }, + formFields: { + accountNumber: "A0MCFOfvWWL7AVtwrhiU", + aggregateGrossAmount: 27987876, + aggregateGrossAmountCardNotPresent: 2332323, + federalIncomeTaxWithheld: 0, + merchantCategoryCode: "4582", + numberOfPaymentTransactions: 767, + pseName: "Payment Entity", + payerClassification: Abound.Form1099KPayerClassificationEnum.Pse, + transactionsReportedClassification: + Abound.Form1099KTransactionsReportedClassificationSchema.PaymentCard, + psePhoneNumber: "5555555555", + grossAmountsByMonth: { + april: 2332323, + august: 2332323, + december: 2332323, + february: 2332323, + january: 2332323, + july: 2332323, + june: 2332323, + march: 2332323, + may: 2332323, + november: 2332323, + october: 2332323, + september: 2332323, + }, + stateTaxInfo: [ + { + filingState: Abound.types.Form1099FilingStateEnum.Ca, + stateTaxWithheld: 0, + }, + ], + }, + }, + }); + expect(response).toEqual({ + id: "documentId_sampletTtqNfulW8", + formFields: { + isCorrected: false, + isVoid: false, + accountNumber: "A0MCFOfvWWL7AVtwrhiU", + aggregateGrossAmount: 27987876, + aggregateGrossAmountCardNotPresent: 2332323, + federalIncomeTaxWithheld: 0, + merchantCategoryCode: "4582", + numberOfPaymentTransactions: 767, + pseName: "Payment Entity", + payerClassification: "PSE", + transactionsReportedClassification: "PAYMENT_CARD", + psePhoneNumber: "5555555555", + grossAmountsByMonth: { + april: 2332323, + august: 2332323, + december: 2332323, + february: 2332323, + january: 2332323, + july: 2332323, + june: 2332323, + march: 2332323, + may: 2332323, + november: 2332323, + october: 2332323, + september: 2332323, + }, + stateTaxInfo: [{ filingState: "CA", stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "CREATED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-COPY-C.pdf", + payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-COPY-B.pdf", + }); + }); + + test("mail", async () => { + const response = await client.form1099K.mail("documentId_sampletTtqNfulW8", { + body: { + to: { + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + name: "Ada Lovelace", + }, + from: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + name: "Hooli", + }, + }, + }); + expect(response).toEqual({ + id: "mailingId_sampleFV9b73IvAD", + createdAt: "2024-01-01T00:00:00.000Z", + status: "CREATED", + url: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-1099-COPY-B.pdf", + mailedFromId: "documentId_sampletTtqNfulW8", + to: { + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + name: "Ada Lovelace", + }, + from: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + name: "Hooli", + }, + }); + }); + + test("file", async () => { + const response = await client.form1099K.file("documentId_sampletTtqNfulW8"); + expect(response).toEqual({ + id: "documentId_sampletTtqNfulW8", + formFields: { + isCorrected: false, + isVoid: false, + accountNumber: "A0MCFOfvWWL7AVtwrhiU", + aggregateGrossAmount: 27987876, + aggregateGrossAmountCardNotPresent: 2332323, + federalIncomeTaxWithheld: 0, + merchantCategoryCode: "4582", + numberOfPaymentTransactions: 767, + pseName: "Payment Entity", + payerClassification: "PSE", + transactionsReportedClassification: "PAYMENT_CARD", + psePhoneNumber: "5555555555", + grossAmountsByMonth: { + april: 2332323, + august: 2332323, + december: 2332323, + february: 2332323, + january: 2332323, + july: 2332323, + june: 2332323, + march: 2332323, + may: 2332323, + november: 2332323, + october: 2332323, + september: 2332323, + }, + stateTaxInfo: [{ filingState: "CA", stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "FILED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-COPY-C.pdf", + payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-COPY-B.pdf", + }); + }); + + test("correct", async () => { + const response = await client.form1099K.correct("documentId_sampletTtqNfulW8", { + body: { + payee: { + name: "Ada Lovelace", + tin: "000000000", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + }, + formFields: { + accountNumber: "A0MCFOfvWWL7AVtwrhiU", + aggregateGrossAmount: 25655553, + aggregateGrossAmountCardNotPresent: 25655553, + federalIncomeTaxWithheld: 0, + merchantCategoryCode: "4582", + numberOfPaymentTransactions: 767, + pseName: "Payment Entity", + payerClassification: Abound.Form1099KPayerClassificationEnum.Pse, + transactionsReportedClassification: + Abound.Form1099KTransactionsReportedClassificationSchema.PaymentCard, + psePhoneNumber: "5555555555", + grossAmountsByMonth: { + april: 2332323, + august: 2332323, + december: 2332323, + february: 2332323, + january: 0, + july: 2332323, + june: 2332323, + march: 2332323, + may: 2332323, + november: 2332323, + october: 2332323, + september: 2332323, + }, + stateTaxInfo: [ + { + filingState: Abound.types.Form1099FilingStateEnum.Ca, + }, + ], + }, + }, + }); + expect(response).toEqual({ + id: "documentId_samplenOHhUUVnh6", + correctedFromId: "documentId_sampletTtqNfulW8", + formFields: { + isCorrected: true, + isVoid: false, + accountNumber: "A0MCFOfvWWL7AVtwrhiU", + aggregateGrossAmount: 25655553, + aggregateGrossAmountCardNotPresent: 25655553, + federalIncomeTaxWithheld: 0, + merchantCategoryCode: "4582", + numberOfPaymentTransactions: 767, + pseName: "Payment Entity", + payerClassification: "PSE", + transactionsReportedClassification: "PAYMENT_CARD", + psePhoneNumber: "5555555555", + grossAmountsByMonth: { + april: 2332323, + august: 2332323, + december: 2332323, + february: 2332323, + january: 0, + july: 2332323, + june: 2332323, + march: 2332323, + may: 2332323, + november: 2332323, + october: 2332323, + september: 2332323, + }, + stateTaxInfo: [{ filingState: "CA", stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "FILED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-CORRECTED-COPY-C.pdf", + payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-CORRECTED-COPY-B.pdf", + }); + }); + + test("void", async () => { + const response = await client.form1099K.void("documentId_sampletTtqNfulW8"); + expect(response).toEqual({ + id: "documentId_sampleb6HQLsVuM9", + voidedFromId: "documentId_sampletTtqNfulW8", + formFields: { + isCorrected: false, + isVoid: true, + accountNumber: "A0MCFOfvWWL7AVtwrhiU", + aggregateGrossAmount: 27987876, + aggregateGrossAmountCardNotPresent: 2332323, + federalIncomeTaxWithheld: 0, + merchantCategoryCode: "4582", + numberOfPaymentTransactions: 767, + pseName: "Payment Entity", + payerClassification: "PSE", + transactionsReportedClassification: "PAYMENT_CARD", + psePhoneNumber: "5555555555", + grossAmountsByMonth: { + april: 2332323, + august: 2332323, + december: 2332323, + february: 2332323, + january: 2332323, + july: 2332323, + june: 2332323, + march: 2332323, + may: 2332323, + november: 2332323, + october: 2332323, + september: 2332323, + }, + stateTaxInfo: [{ filingState: "CA", stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "FILED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-VOID-COPY-C.pdf", + payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-VOID-COPY-B.pdf", + }); + }); + + test("retrieve", async () => { + const response = await client.form1099K.retrieve("documentId_sampletTtqNfulW8"); + expect(response).toEqual({ + id: "documentId_sampletTtqNfulW8", + formFields: { + isCorrected: false, + isVoid: false, + accountNumber: "A0MCFOfvWWL7AVtwrhiU", + aggregateGrossAmount: 27987876, + aggregateGrossAmountCardNotPresent: 2332323, + federalIncomeTaxWithheld: 0, + merchantCategoryCode: "4582", + numberOfPaymentTransactions: 767, + pseName: "Payment Entity", + payerClassification: "PSE", + transactionsReportedClassification: "PAYMENT_CARD", + psePhoneNumber: "5555555555", + grossAmountsByMonth: { + april: 2332323, + august: 2332323, + december: 2332323, + february: 2332323, + january: 2332323, + july: 2332323, + june: 2332323, + march: 2332323, + may: 2332323, + november: 2332323, + october: 2332323, + september: 2332323, + }, + stateTaxInfo: [{ filingState: "CA", stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "CREATED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-COPY-C.pdf", + payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-K-COPY-B.pdf", + }); + }); + + test("delete", async () => { + const response = await client.form1099K.delete("documentId_sampletTtqNfulW8"); + expect(response).toEqual({}); + }); +}); diff --git a/tests/wire/form1099Misc.test.ts b/tests/wire/form1099Misc.test.ts new file mode 100644 index 00000000..2dedeb0d --- /dev/null +++ b/tests/wire/form1099Misc.test.ts @@ -0,0 +1,533 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../src/api/index"; +import { AboundClient } from "../../src/Client"; + +const client = new AboundClient({ + environment: process.env.TESTS_BASE_URL || "test", + sampleKey: process.env.TESTS_AUTH || "test", +}); + +describe("Form1099Misc", () => { + test("list", async () => { + const response = await client.form1099Misc.list(); + expect(response).toEqual([ + { + id: "documentId_sampleGNPOKNmIgF", + formFields: { + isCorrected: false, + isVoid: false, + cropInsuranceProceeds: 97109, + excessGoldenParachutePayments: 97109, + federalIncomeTaxWithheld: 0, + fishPurchasedForResale: 97109, + fishingBoatProceeds: 97109, + grossProceedsPaidToAnAttorney: 97109, + hasDirectSalesOver5000: false, + hasFatcaFilingRequirement: true, + medicalAndHealthCarePayments: 97109, + nonqualifiedDeferredCompensation: 97109, + substitutePaymentsInLieuOfDividendsOrInterest: 97109, + otherIncome: 97109, + rents: 97109, + royalties: 97109, + section409ADeferrals: 97109, + accountNumber: "A00AskD1ZTO4YB8oBHav", + stateTaxInfo: [{ filingState: "CA", stateIncome: 345543, stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "CREATED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-COPY-C.pdf", + payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-COPY-B.pdf", + }, + ]); + }); + + test("create", async () => { + const response = await client.form1099Misc.create({ + body: { + filingYear: 2023, + payer: { + name: "Hooli", + tin: "111111111", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + }, + payee: { + name: "Ada Lovelace", + tin: "000000000", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + }, + formFields: { + cropInsuranceProceeds: 97109, + excessGoldenParachutePayments: 97109, + federalIncomeTaxWithheld: 0, + fishPurchasedForResale: 97109, + fishingBoatProceeds: 97109, + grossProceedsPaidToAnAttorney: 97109, + hasDirectSalesOver5000: false, + hasFatcaFilingRequirement: true, + medicalAndHealthCarePayments: 97109, + nonqualifiedDeferredCompensation: 97109, + substitutePaymentsInLieuOfDividendsOrInterest: 97109, + otherIncome: 97109, + rents: 97109, + royalties: 97109, + section409ADeferrals: 97109, + accountNumber: "A00AskD1ZTO4YB8oBHav", + stateTaxInfo: [ + { + filingState: Abound.types.Form1099FilingStateEnum.Ca, + stateIncome: 345543, + stateTaxWithheld: 0, + }, + ], + }, + }, + }); + expect(response).toEqual({ + id: "documentId_sampleGNPOKNmIgF", + formFields: { + isCorrected: false, + isVoid: false, + cropInsuranceProceeds: 97109, + excessGoldenParachutePayments: 97109, + federalIncomeTaxWithheld: 0, + fishPurchasedForResale: 97109, + fishingBoatProceeds: 97109, + grossProceedsPaidToAnAttorney: 97109, + hasDirectSalesOver5000: false, + hasFatcaFilingRequirement: true, + medicalAndHealthCarePayments: 97109, + nonqualifiedDeferredCompensation: 97109, + substitutePaymentsInLieuOfDividendsOrInterest: 97109, + otherIncome: 97109, + rents: 97109, + royalties: 97109, + section409ADeferrals: 97109, + accountNumber: "A00AskD1ZTO4YB8oBHav", + stateTaxInfo: [{ filingState: "CA", stateIncome: 345543, stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "CREATED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-COPY-C.pdf", + payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-COPY-B.pdf", + }); + }); + + test("mail", async () => { + const response = await client.form1099Misc.mail("documentId_sampleGNPOKNmIgF", { + body: { + to: { + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + name: "Ada Lovelace", + }, + from: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + name: "Hooli", + }, + }, + }); + expect(response).toEqual({ + id: "mailingId_sampleFV9b73IvAD", + createdAt: "2024-01-01T00:00:00.000Z", + status: "CREATED", + url: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-1099-COPY-B.pdf", + mailedFromId: "documentId_sampletTtqNfulW8", + to: { + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + name: "Ada Lovelace", + }, + from: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + name: "Hooli", + }, + }); + }); + + test("file", async () => { + const response = await client.form1099Misc.file("documentId_sampleGNPOKNmIgF"); + expect(response).toEqual({ + id: "documentId_sampleGNPOKNmIgF", + formFields: { + isCorrected: false, + isVoid: false, + cropInsuranceProceeds: 97109, + excessGoldenParachutePayments: 97109, + federalIncomeTaxWithheld: 0, + fishPurchasedForResale: 97109, + fishingBoatProceeds: 97109, + grossProceedsPaidToAnAttorney: 97109, + hasDirectSalesOver5000: false, + hasFatcaFilingRequirement: true, + medicalAndHealthCarePayments: 97109, + nonqualifiedDeferredCompensation: 97109, + substitutePaymentsInLieuOfDividendsOrInterest: 97109, + otherIncome: 97109, + rents: 97109, + royalties: 97109, + section409ADeferrals: 97109, + accountNumber: "A00AskD1ZTO4YB8oBHav", + stateTaxInfo: [{ filingState: "CA", stateIncome: 345543, stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "FILED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-COPY-C.pdf", + payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-COPY-B.pdf", + }); + }); + + test("correct", async () => { + const response = await client.form1099Misc.correct("documentId_sampleGNPOKNmIgF", { + body: { + payee: { + name: "Ada Lovelace", + tin: "000000000", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + }, + formFields: { + cropInsuranceProceeds: 97109, + excessGoldenParachutePayments: 97109, + federalIncomeTaxWithheld: 0, + fishPurchasedForResale: 97109, + fishingBoatProceeds: 97109, + grossProceedsPaidToAnAttorney: 97109, + hasDirectSalesOver5000: false, + hasFatcaFilingRequirement: true, + medicalAndHealthCarePayments: 97109, + nonqualifiedDeferredCompensation: 97109, + substitutePaymentsInLieuOfDividendsOrInterest: 97109, + otherIncome: 97109, + rents: 10000, + royalties: 97109, + section409ADeferrals: 97109, + accountNumber: "A00AskD1ZTO4YB8oBHav", + stateTaxInfo: [ + { + filingState: Abound.types.Form1099FilingStateEnum.Ca, + stateIncome: 258434, + }, + ], + }, + }, + }); + expect(response).toEqual({ + id: "documentId_sampleaTA4jltVVx", + correctedFromId: "documentId_sampleGNPOKNmIgF", + formFields: { + isCorrected: true, + isVoid: false, + cropInsuranceProceeds: 97109, + excessGoldenParachutePayments: 97109, + federalIncomeTaxWithheld: 0, + fishPurchasedForResale: 97109, + fishingBoatProceeds: 97109, + grossProceedsPaidToAnAttorney: 97109, + hasDirectSalesOver5000: false, + hasFatcaFilingRequirement: true, + medicalAndHealthCarePayments: 97109, + nonqualifiedDeferredCompensation: 97109, + substitutePaymentsInLieuOfDividendsOrInterest: 97109, + otherIncome: 97109, + rents: 10000, + royalties: 97109, + section409ADeferrals: 97109, + accountNumber: "A00AskD1ZTO4YB8oBHav", + stateTaxInfo: [{ filingState: "CA", stateIncome: 258434, stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "FILED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: + "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-CORRECTED-COPY-C.pdf", + payeeUrl: + "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-CORRECTED-COPY-B.pdf", + }); + }); + + test("void", async () => { + const response = await client.form1099Misc.void("documentId_sampleGNPOKNmIgF"); + expect(response).toEqual({ + id: "documentId_sampleStGnVcbd57", + voidedFromId: "documentId_sampleGNPOKNmIgF", + formFields: { + isCorrected: false, + isVoid: true, + cropInsuranceProceeds: 97109, + excessGoldenParachutePayments: 97109, + federalIncomeTaxWithheld: 0, + fishPurchasedForResale: 97109, + fishingBoatProceeds: 97109, + grossProceedsPaidToAnAttorney: 97109, + hasDirectSalesOver5000: false, + hasFatcaFilingRequirement: true, + medicalAndHealthCarePayments: 97109, + nonqualifiedDeferredCompensation: 97109, + substitutePaymentsInLieuOfDividendsOrInterest: 97109, + otherIncome: 97109, + rents: 97109, + royalties: 97109, + section409ADeferrals: 97109, + accountNumber: "A00AskD1ZTO4YB8oBHav", + stateTaxInfo: [{ filingState: "CA", stateIncome: 345543, stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "FILED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-VOID-COPY-C.pdf", + payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-VOID-COPY-B.pdf", + }); + }); + + test("retrieve", async () => { + const response = await client.form1099Misc.retrieve("documentId_sampleGNPOKNmIgF"); + expect(response).toEqual({ + id: "documentId_sampleGNPOKNmIgF", + formFields: { + isCorrected: false, + isVoid: false, + cropInsuranceProceeds: 97109, + excessGoldenParachutePayments: 97109, + federalIncomeTaxWithheld: 0, + fishPurchasedForResale: 97109, + fishingBoatProceeds: 97109, + grossProceedsPaidToAnAttorney: 97109, + hasDirectSalesOver5000: false, + hasFatcaFilingRequirement: true, + medicalAndHealthCarePayments: 97109, + nonqualifiedDeferredCompensation: 97109, + substitutePaymentsInLieuOfDividendsOrInterest: 97109, + otherIncome: 97109, + rents: 97109, + royalties: 97109, + section409ADeferrals: 97109, + accountNumber: "A00AskD1ZTO4YB8oBHav", + stateTaxInfo: [{ filingState: "CA", stateIncome: 345543, stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "CREATED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-COPY-C.pdf", + payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-MISC-COPY-B.pdf", + }); + }); + + test("delete", async () => { + const response = await client.form1099Misc.delete("documentId_sampleGNPOKNmIgF"); + expect(response).toEqual({}); + }); +}); diff --git a/tests/wire/form1099Nec.test.ts b/tests/wire/form1099Nec.test.ts new file mode 100644 index 00000000..ce2e0f8b --- /dev/null +++ b/tests/wire/form1099Nec.test.ts @@ -0,0 +1,435 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../src/api/index"; +import { AboundClient } from "../../src/Client"; + +const client = new AboundClient({ + environment: process.env.TESTS_BASE_URL || "test", + sampleKey: process.env.TESTS_AUTH || "test", +}); + +describe("Form1099Nec", () => { + test("list", async () => { + const response = await client.form1099Nec.list(); + expect(response).toEqual([ + { + id: "documentId_samplegU0eR8oc8a", + formFields: { + isCorrected: false, + isVoid: false, + nonemployeeCompensation: 23423, + hasDirectSalesOver5000: false, + federalIncomeTaxWithheld: 0, + accountNumber: "A0NEqtav7n0sBGoq88w0", + stateTaxInfo: [{ filingState: "CA", stateIncome: 23423, stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "CREATED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-COPY-C.pdf", + payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-COPY-B.pdf", + }, + ]); + }); + + test("create", async () => { + const response = await client.form1099Nec.create({ + body: { + filingYear: 2023, + payer: { + name: "Hooli", + tin: "111111111", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + }, + payee: { + name: "Ada Lovelace", + tin: "000000000", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + }, + formFields: { + nonemployeeCompensation: 23423, + hasDirectSalesOver5000: false, + federalIncomeTaxWithheld: 0, + accountNumber: "A0NEqtav7n0sBGoq88w0", + stateTaxInfo: [ + { + filingState: Abound.types.Form1099FilingStateEnum.Ca, + stateIncome: 23423, + stateTaxWithheld: 0, + }, + ], + }, + }, + }); + expect(response).toEqual({ + id: "documentId_samplegU0eR8oc8a", + formFields: { + isCorrected: false, + isVoid: false, + nonemployeeCompensation: 23423, + hasDirectSalesOver5000: false, + federalIncomeTaxWithheld: 0, + accountNumber: "A0NEqtav7n0sBGoq88w0", + stateTaxInfo: [{ filingState: "CA", stateIncome: 23423, stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "CREATED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-COPY-C.pdf", + payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-COPY-B.pdf", + }); + }); + + test("mail", async () => { + const response = await client.form1099Nec.mail("documentId_samplegU0eR8oc8a", { + body: { + to: { + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + name: "Ada Lovelace", + }, + from: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + name: "Hooli", + }, + }, + }); + expect(response).toEqual({ + id: "mailingId_sampleFV9b73IvAD", + createdAt: "2024-01-01T00:00:00.000Z", + status: "CREATED", + url: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-1099-COPY-B.pdf", + mailedFromId: "documentId_sampletTtqNfulW8", + to: { + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + name: "Ada Lovelace", + }, + from: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + name: "Hooli", + }, + }); + }); + + test("file", async () => { + const response = await client.form1099Nec.file("documentId_samplegU0eR8oc8a"); + expect(response).toEqual({ + id: "documentId_samplegU0eR8oc8a", + formFields: { + isCorrected: false, + isVoid: false, + nonemployeeCompensation: 23423, + hasDirectSalesOver5000: false, + federalIncomeTaxWithheld: 0, + accountNumber: "A0NEqtav7n0sBGoq88w0", + stateTaxInfo: [{ filingState: "CA", stateIncome: 23423, stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "FILED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-COPY-C.pdf", + payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-COPY-B.pdf", + }); + }); + + test("correct", async () => { + const response = await client.form1099Nec.correct("documentId_samplegU0eR8oc8a", { + body: { + payee: { + name: "Ada Lovelace", + tin: "000000000", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + }, + formFields: { + nonemployeeCompensation: 10000, + accountNumber: "A0NEqtav7n0sBGoq88w0", + stateTaxInfo: [ + { + filingState: Abound.types.Form1099FilingStateEnum.Ca, + stateIncome: 10000, + }, + ], + }, + }, + }); + expect(response).toEqual({ + id: "documentId_sampletdeUbrEgYw", + correctedFromId: "documentId_samplegU0eR8oc8a", + formFields: { + isCorrected: true, + isVoid: false, + nonemployeeCompensation: 10000, + hasDirectSalesOver5000: false, + federalIncomeTaxWithheld: 0, + accountNumber: "A0NEqtav7n0sBGoq88w0", + stateTaxInfo: [{ filingState: "CA", stateIncome: 10000, stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "FILED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: + "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-CORRECTED-COPY-C.pdf", + payeeUrl: + "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-CORRECTED-COPY-B.pdf", + }); + }); + + test("void", async () => { + const response = await client.form1099Nec.void("documentId_samplegU0eR8oc8a"); + expect(response).toEqual({ + id: "documentId_sampleSaOkfbLdUb", + voidedFromId: "documentId_samplegU0eR8oc8a", + formFields: { + isCorrected: false, + isVoid: true, + nonemployeeCompensation: 23423, + hasDirectSalesOver5000: false, + federalIncomeTaxWithheld: 0, + accountNumber: "A0NEqtav7n0sBGoq88w0", + stateTaxInfo: [{ filingState: "CA", stateIncome: 23423, stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "FILED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-VOID-COPY-C.pdf", + payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-VOID-COPY-B.pdf", + }); + }); + + test("retrieve", async () => { + const response = await client.form1099Nec.retrieve("documentId_samplegU0eR8oc8a"); + expect(response).toEqual({ + id: "documentId_samplegU0eR8oc8a", + formFields: { + isCorrected: false, + isVoid: false, + nonemployeeCompensation: 23423, + hasDirectSalesOver5000: false, + federalIncomeTaxWithheld: 0, + accountNumber: "A0NEqtav7n0sBGoq88w0", + stateTaxInfo: [{ filingState: "CA", stateIncome: 23423, stateTaxWithheld: 0 }], + }, + filingYear: 2023, + createdAt: "2024-01-01T00:00:00.000Z", + status: "CREATED", + payer: { + name: "Hooli", + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + phoneNumber: "6501014096", + tin: "*******11", + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + }, + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + payerUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-COPY-C.pdf", + payeeUrl: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2023-FORM-1099-NEC-COPY-B.pdf", + }); + }); + + test("delete", async () => { + const response = await client.form1099Nec.delete("documentId_samplegU0eR8oc8a"); + expect(response).toEqual({}); + }); +}); diff --git a/tests/wire/formW8Ben.test.ts b/tests/wire/formW8Ben.test.ts new file mode 100644 index 00000000..45147bfb --- /dev/null +++ b/tests/wire/formW8Ben.test.ts @@ -0,0 +1,225 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../src/api/index"; +import { AboundClient } from "../../src/Client"; + +const client = new AboundClient({ + environment: process.env.TESTS_BASE_URL || "test", + sampleKey: process.env.TESTS_AUTH || "test", +}); + +describe("FormW8Ben", () => { + test("list", async () => { + const response = await client.formW8Ben.list(); + expect(response).toEqual([ + { + id: "documentId_samplexEM8PRV7sh", + createdAt: "2024-01-01T00:00:00.000Z", + expiresAt: "2028-01-01T00:00:00.000Z", + url: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-W-8BEN.pdf", + payee: { + name: "Ada Lovelace", + citizenshipCountry: "GB", + dateOfBirth: "1982-12-10", + permanentResidenceAddress: { + address: "43 Hilly Fields", + address2: "Suite 32", + city: "Lewisham", + state: "London", + postalCode: "SE13 7JN", + country: "GB", + }, + mailingAddress: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + postalCode: "94306", + state: "CA", + country: "US", + }, + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + foreignTin: "*******6C", + foreignTinFingerprint: "tinFingerprint_sampleanXo4V9nL9", + }, + formFields: { + taxClassification: "INDIVIDUAL", + isForeignTinNotRequired: false, + taxTreatyBenefits: { + residentCountry: "GB", + claimedProvision: "7", + rateOfWithholding: 0, + incomeCode: "17", + incomeType: "SERVICES", + additionalConditions: "Independent personal services performed in the US", + }, + referenceNumbers: ["123456789"], + isCertified: true, + electronicSignature: { + signature: "Ada Lovelace", + printedName: "Ada Lovelace", + signedAt: "2024-01-01T00:00:00.000Z", + ipAddress: "127.0.0.1", + }, + }, + }, + ]); + }); + + test("create", async () => { + const response = await client.formW8Ben.create({ + payee: { + name: "Ada Lovelace", + citizenshipCountry: "GB", + tin: "000000000", + foreignTin: "DQ123456C", + dateOfBirth: "1982-12-10", + permanentResidenceAddress: { + address: "43 Hilly Fields", + address2: "Suite 32", + city: "Lewisham", + state: "London", + postalCode: "SE13 7JN", + country: "GB", + }, + mailingAddress: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + postalCode: "94306", + state: "CA", + country: "US", + }, + }, + formFields: { + isForeignTinNotRequired: false, + taxTreatyCode: Abound.types.TaxTreatyAboundCodeEnum.Gb17IndependentPersonalServices, + referenceNumbers: ["123456789"], + isCertified: true, + electronicSignature: { + signature: "Ada Lovelace", + printedName: "Ada Lovelace", + signedAt: "2024-01-01T00:00:00.000Z", + ipAddress: "127.0.0.1", + }, + }, + }); + expect(response).toEqual({ + id: "documentId_samplexEM8PRV7sh", + createdAt: "2024-01-01T00:00:00.000Z", + expiresAt: "2028-01-01T00:00:00.000Z", + url: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-W-8BEN.pdf", + payee: { + name: "Ada Lovelace", + citizenshipCountry: "GB", + dateOfBirth: "1982-12-10", + permanentResidenceAddress: { + address: "43 Hilly Fields", + address2: "Suite 32", + city: "Lewisham", + state: "London", + postalCode: "SE13 7JN", + country: "GB", + }, + mailingAddress: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + postalCode: "94306", + state: "CA", + country: "US", + }, + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + foreignTin: "*******6C", + foreignTinFingerprint: "tinFingerprint_sampleanXo4V9nL9", + }, + formFields: { + taxClassification: "INDIVIDUAL", + isForeignTinNotRequired: false, + taxTreatyBenefits: { + residentCountry: "GB", + claimedProvision: "7", + rateOfWithholding: 0, + incomeCode: "17", + incomeType: "SERVICES", + additionalConditions: "Independent personal services performed in the US", + }, + referenceNumbers: ["123456789"], + isCertified: true, + electronicSignature: { + signature: "Ada Lovelace", + printedName: "Ada Lovelace", + signedAt: "2024-01-01T00:00:00.000Z", + ipAddress: "127.0.0.1", + }, + }, + }); + }); + + test("retrieve", async () => { + const response = await client.formW8Ben.retrieve("documentId_samplexEM8PRV7sh"); + expect(response).toEqual({ + id: "documentId_samplexEM8PRV7sh", + createdAt: "2024-01-01T00:00:00.000Z", + expiresAt: "2028-01-01T00:00:00.000Z", + url: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-W-8BEN.pdf", + payee: { + name: "Ada Lovelace", + citizenshipCountry: "GB", + dateOfBirth: "1982-12-10", + permanentResidenceAddress: { + address: "43 Hilly Fields", + address2: "Suite 32", + city: "Lewisham", + state: "London", + postalCode: "SE13 7JN", + country: "GB", + }, + mailingAddress: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + postalCode: "94306", + state: "CA", + country: "US", + }, + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + foreignTin: "*******6C", + foreignTinFingerprint: "tinFingerprint_sampleanXo4V9nL9", + }, + formFields: { + taxClassification: "INDIVIDUAL", + isForeignTinNotRequired: false, + taxTreatyBenefits: { + residentCountry: "GB", + claimedProvision: "7", + rateOfWithholding: 0, + incomeCode: "17", + incomeType: "SERVICES", + additionalConditions: "Independent personal services performed in the US", + }, + referenceNumbers: ["123456789"], + isCertified: true, + electronicSignature: { + signature: "Ada Lovelace", + printedName: "Ada Lovelace", + signedAt: "2024-01-01T00:00:00.000Z", + ipAddress: "127.0.0.1", + }, + }, + }); + }); +}); diff --git a/tests/wire/formW8BenE.test.ts b/tests/wire/formW8BenE.test.ts new file mode 100644 index 00000000..08dc5e32 --- /dev/null +++ b/tests/wire/formW8BenE.test.ts @@ -0,0 +1,222 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../src/api/index"; +import { AboundClient } from "../../src/Client"; + +const client = new AboundClient({ + environment: process.env.TESTS_BASE_URL || "test", + sampleKey: process.env.TESTS_AUTH || "test", +}); + +describe("FormW8BenE", () => { + test("list", async () => { + const response = await client.formW8BenE.list(); + expect(response).toEqual([ + { + id: "documentId_sampleGyuBXlfAwo", + createdAt: "2024-01-01T00:00:00.000Z", + expiresAt: "2028-01-01T00:00:00.000Z", + url: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-W-8BEN-E.pdf", + payee: { + name: "Hooli", + incorporationCountry: "GB", + tin: "*******11", + permanentResidenceAddress: { + address: "43 Hilly Fields", + address2: "Suite 32", + city: "Lewisham", + state: "London", + postalCode: "SE13 7JN", + country: "GB", + }, + mailingAddress: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + postalCode: "94306", + state: "CA", + country: "US", + }, + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + foreignTin: "*******6C", + foreignTinFingerprint: "tinFingerprint_sampleanXo4V9nL9", + }, + formFields: { + taxClassification: "CORPORATION", + isForeignTinNotRequired: false, + taxTreatyBenefits: { + residentCountry: "GB", + claimedProvision: "7", + rateOfWithholding: 0, + incomeCode: "17", + incomeType: "SERVICES", + additionalConditions: "Independent personal services performed in the US", + }, + referenceNumbers: ["123456789"], + isCertified: true, + electronicSignature: { + signature: "Hooli Representative", + printedName: "Hooli Representative", + signedAt: "2024-01-01T00:00:00.000Z", + ipAddress: "127.0.0.1", + }, + }, + }, + ]); + }); + + test("create", async () => { + const response = await client.formW8BenE.create({ + payee: { + name: "Hooli", + incorporationCountry: "GB", + tin: "111111111", + foreignTin: "DQ123456C", + permanentResidenceAddress: { + address: "43 Hilly Fields", + address2: "Suite 32", + city: "Lewisham", + state: "London", + postalCode: "SE13 7JN", + country: "GB", + }, + mailingAddress: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + postalCode: "94306", + state: "CA", + country: "US", + }, + }, + formFields: { + taxClassification: Abound.W8BenETaxClassificationEnum.Corporation, + isForeignTinNotRequired: false, + taxTreatyCode: Abound.types.TaxTreatyAboundCodeEnum.Gb17IndependentPersonalServices, + referenceNumbers: ["123456789"], + isCertified: true, + electronicSignature: { + signature: "Hooli Representative", + printedName: "Hooli Representative", + signedAt: "2024-01-01T00:00:00.000Z", + ipAddress: "127.0.0.1", + }, + }, + }); + expect(response).toEqual({ + id: "documentId_sampleGyuBXlfAwo", + createdAt: "2024-01-01T00:00:00.000Z", + expiresAt: "2028-01-01T00:00:00.000Z", + url: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-W-8BEN-E.pdf", + payee: { + name: "Hooli", + incorporationCountry: "GB", + tin: "*******11", + permanentResidenceAddress: { + address: "43 Hilly Fields", + address2: "Suite 32", + city: "Lewisham", + state: "London", + postalCode: "SE13 7JN", + country: "GB", + }, + mailingAddress: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + postalCode: "94306", + state: "CA", + country: "US", + }, + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + foreignTin: "*******6C", + foreignTinFingerprint: "tinFingerprint_sampleanXo4V9nL9", + }, + formFields: { + taxClassification: "CORPORATION", + isForeignTinNotRequired: false, + taxTreatyBenefits: { + residentCountry: "GB", + claimedProvision: "7", + rateOfWithholding: 0, + incomeCode: "17", + incomeType: "SERVICES", + additionalConditions: "Independent personal services performed in the US", + }, + referenceNumbers: ["123456789"], + isCertified: true, + electronicSignature: { + signature: "Hooli Representative", + printedName: "Hooli Representative", + signedAt: "2024-01-01T00:00:00.000Z", + ipAddress: "127.0.0.1", + }, + }, + }); + }); + + test("retrieve", async () => { + const response = await client.formW8BenE.retrieve("documentId_sampleGyuBXlfAwo"); + expect(response).toEqual({ + id: "documentId_sampleGyuBXlfAwo", + createdAt: "2024-01-01T00:00:00.000Z", + expiresAt: "2028-01-01T00:00:00.000Z", + url: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-W-8BEN-E.pdf", + payee: { + name: "Hooli", + incorporationCountry: "GB", + tin: "*******11", + permanentResidenceAddress: { + address: "43 Hilly Fields", + address2: "Suite 32", + city: "Lewisham", + state: "London", + postalCode: "SE13 7JN", + country: "GB", + }, + mailingAddress: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + postalCode: "94306", + state: "CA", + country: "US", + }, + tinType: "BUSINESS", + tinFingerprint: "tinFingerprint_sample847jI1LwxF", + tinVerificationId: "tinVerificationId_sample1b0E6efa89", + tinVerificationStatus: "MATCH", + foreignTin: "*******6C", + foreignTinFingerprint: "tinFingerprint_sampleanXo4V9nL9", + }, + formFields: { + taxClassification: "CORPORATION", + isForeignTinNotRequired: false, + taxTreatyBenefits: { + residentCountry: "GB", + claimedProvision: "7", + rateOfWithholding: 0, + incomeCode: "17", + incomeType: "SERVICES", + additionalConditions: "Independent personal services performed in the US", + }, + referenceNumbers: ["123456789"], + isCertified: true, + electronicSignature: { + signature: "Hooli Representative", + printedName: "Hooli Representative", + signedAt: "2024-01-01T00:00:00.000Z", + ipAddress: "127.0.0.1", + }, + }, + }); + }); +}); diff --git a/tests/wire/formW9.test.ts b/tests/wire/formW9.test.ts new file mode 100644 index 00000000..9688603c --- /dev/null +++ b/tests/wire/formW9.test.ts @@ -0,0 +1,141 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Abound from "../../src/api/index"; +import { AboundClient } from "../../src/Client"; + +const client = new AboundClient({ + environment: process.env.TESTS_BASE_URL || "test", + sampleKey: process.env.TESTS_AUTH || "test", +}); + +describe("FormW9", () => { + test("list", async () => { + const response = await client.formW9.list(); + expect(response).toEqual([ + { + id: "documentId_sampleVppNzzIbQT", + createdAt: "2024-01-01T00:00:00.000Z", + url: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-W-9.pdf", + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + country: "US", + postalCode: "94043", + state: "CA", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + formFields: { + accountNumbers: ["1234567890", "1234567891"], + taxClassification: "INDIVIDUAL", + isSubjectToBackupWithholding: false, + electronicSignature: { + signature: "Ada Lovelace", + printedName: "Ada Lovelace", + signedAt: "2024-01-01T00:00:00.000Z", + ipAddress: "127.0.0.1", + }, + }, + }, + ]); + }); + + test("create", async () => { + const response = await client.formW9.create({ + body: { + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + country: "US", + postalCode: "94043", + state: "CA", + tin: "000000000", + tinType: Abound.types.TinTypeEnum.Individual, + }, + formFields: { + taxClassification: Abound.W9TaxClassificationSchema.Individual, + isSubjectToBackupWithholding: false, + electronicSignature: { + signature: "Ada Lovelace", + printedName: "Ada Lovelace", + signedAt: "2024-01-01T00:00:00.000Z", + ipAddress: "127.0.0.1", + }, + }, + }, + }); + expect(response).toEqual({ + id: "documentId_sampleVppNzzIbQT", + createdAt: "2024-01-01T00:00:00.000Z", + url: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-W-9.pdf", + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + country: "US", + postalCode: "94043", + state: "CA", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + formFields: { + accountNumbers: ["1234567890", "1234567891"], + taxClassification: "INDIVIDUAL", + isSubjectToBackupWithholding: false, + electronicSignature: { + signature: "Ada Lovelace", + printedName: "Ada Lovelace", + signedAt: "2024-01-01T00:00:00.000Z", + ipAddress: "127.0.0.1", + }, + }, + }); + }); + + test("retrieve", async () => { + const response = await client.formW9.retrieve("documentId_sampleVppNzzIbQT"); + expect(response).toEqual({ + id: "documentId_sampleVppNzzIbQT", + createdAt: "2024-01-01T00:00:00.000Z", + url: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-W-9.pdf", + payee: { + name: "Ada Lovelace", + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + country: "US", + postalCode: "94043", + state: "CA", + tin: "*******00", + tinType: "INDIVIDUAL", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinVerificationId: "tinVerificationId_sample41SD71AV8f", + tinVerificationStatus: "MATCH", + }, + formFields: { + accountNumbers: ["1234567890", "1234567891"], + taxClassification: "INDIVIDUAL", + isSubjectToBackupWithholding: false, + electronicSignature: { + signature: "Ada Lovelace", + printedName: "Ada Lovelace", + signedAt: "2024-01-01T00:00:00.000Z", + ipAddress: "127.0.0.1", + }, + }, + }); + }); +}); diff --git a/tests/wire/mailings.test.ts b/tests/wire/mailings.test.ts new file mode 100644 index 00000000..201a4a31 --- /dev/null +++ b/tests/wire/mailings.test.ts @@ -0,0 +1,127 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { AboundClient } from "../../src/Client"; + +const client = new AboundClient({ + environment: process.env.TESTS_BASE_URL || "test", + sampleKey: process.env.TESTS_AUTH || "test", +}); + +describe("Mailings", () => { + test("list", async () => { + const response = await client.mailings.list(); + expect(response).toEqual([ + { + id: "mailingId_sampleFV9b73IvAD", + createdAt: "2024-01-01T00:00:00.000Z", + url: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-1099-COPY-B.pdf", + status: "CREATED", + to: { + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + name: "Ada Lovelace", + }, + from: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + name: "Hooli", + }, + mailedFromId: "documentId_sampletTtqNfulW8", + }, + ]); + }); + + test("retrieve", async () => { + const response = await client.mailings.retrieve("mailingId_sampleFV9b73IvAD"); + expect(response).toEqual({ + id: "mailingId_sampleFV9b73IvAD", + createdAt: "2024-01-01T00:00:00.000Z", + url: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-1099-COPY-B.pdf", + status: "CREATED", + to: { + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + name: "Ada Lovelace", + }, + from: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + name: "Hooli", + }, + mailedFromId: "documentId_sampletTtqNfulW8", + }); + }); + + test("update", async () => { + const response = await client.mailings.update("mailingId_sampleFV9b73IvAD", { + body: { + to: { + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + name: "Ada Lovelace", + }, + from: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + name: "Hooli", + }, + }, + }); + expect(response).toEqual({ + id: "mailingId_sampleFV9b73IvAD", + createdAt: "2024-01-01T00:00:00.000Z", + url: "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/FORM-1099-COPY-B.pdf", + status: "CREATED", + to: { + address: "1401 N Shoreline Blvd", + address2: "Suite 1", + city: "Mountain View", + state: "CA", + postalCode: "94043", + country: "US", + name: "Ada Lovelace", + }, + from: { + address: "256 Byron Street", + address2: "Suite 32", + city: "Palo Alto", + state: "CA", + postalCode: "94306", + country: "US", + name: "Hooli", + }, + mailedFromId: "documentId_sampletTtqNfulW8", + }); + }); + + test("delete", async () => { + const response = await client.mailings.delete("mailingId_sampleFV9b73IvAD"); + expect(response).toEqual({}); + }); +}); diff --git a/tests/wire/taxTreaties.test.ts b/tests/wire/taxTreaties.test.ts new file mode 100644 index 00000000..48f15ba9 --- /dev/null +++ b/tests/wire/taxTreaties.test.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { AboundClient } from "../../src/Client"; + +const client = new AboundClient({ + environment: process.env.TESTS_BASE_URL || "test", + sampleKey: process.env.TESTS_AUTH || "test", +}); + +describe("TaxTreaties", () => { + test("list", async () => { + const response = await client.taxTreaties.list(); + expect(response).toEqual([ + { + taxTreatyCode: "GB_17_INDEPENDENT_PERSONAL_SERVICES", + residentCountry: "GB", + rateOfWithholding: 0, + description: "Independent personal services performed in the US", + }, + ]); + }); +}); diff --git a/tests/wire/tinVerifications.test.ts b/tests/wire/tinVerifications.test.ts new file mode 100644 index 00000000..b3bb17df --- /dev/null +++ b/tests/wire/tinVerifications.test.ts @@ -0,0 +1,58 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { AboundClient } from "../../src/Client"; + +const client = new AboundClient({ + environment: process.env.TESTS_BASE_URL || "test", + sampleKey: process.env.TESTS_AUTH || "test", +}); + +describe("TinVerifications", () => { + test("list", async () => { + const response = await client.tinVerifications.list(); + expect(response).toEqual([ + { + name: "Ada Lovelace", + id: "tinVerificationId_sample41SD71AV8f", + createdAt: "2024-01-01T00:00:00.000Z", + status: "MATCH", + tin: "*******00", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinType: "INDIVIDUAL", + }, + ]); + }); + + test("create", async () => { + const response = await client.tinVerifications.create({ + body: { + name: "Ada Lovelace", + tin: "000000000", + }, + }); + expect(response).toEqual({ + name: "Ada Lovelace", + id: "tinVerificationId_sample41SD71AV8f", + createdAt: "2024-01-01T00:00:00.000Z", + status: "MATCH", + tin: "*******00", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinType: "INDIVIDUAL", + }); + }); + + test("retrieve", async () => { + const response = await client.tinVerifications.retrieve("tinVerificationId_sample41SD71AV8f"); + expect(response).toEqual({ + name: "Ada Lovelace", + id: "tinVerificationId_sample41SD71AV8f", + createdAt: "2024-01-01T00:00:00.000Z", + status: "MATCH", + tin: "*******00", + tinFingerprint: "tinFingerprint_samplehy2BWO6JJG", + tinType: "INDIVIDUAL", + }); + }); +}); diff --git a/tests/wire/users.test.ts b/tests/wire/users.test.ts new file mode 100644 index 00000000..6dc740f2 --- /dev/null +++ b/tests/wire/users.test.ts @@ -0,0 +1,52 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { AboundClient } from "../../src/Client"; + +const client = new AboundClient({ + environment: process.env.TESTS_BASE_URL || "test", + sampleKey: process.env.TESTS_AUTH || "test", +}); + +describe("Users", () => { + test("list", async () => { + const response = await client.users.list(); + expect(response).toEqual([ + { id: "userId_sampleXGMFnhOpeR", createdAt: "2024-01-01T00:00:00.000Z", foreignId: "my-foreign-id" }, + ]); + }); + + test("create", async () => { + const response = await client.users.create({ + body: { + foreignId: "my-foreign-id", + }, + }); + expect(response).toEqual({ + id: "userId_sampleXGMFnhOpeR", + createdAt: "2024-01-01T00:00:00.000Z", + foreignId: "my-foreign-id", + }); + }); + + test("retrieve", async () => { + const response = await client.users.retrieve("userId_sampleXGMFnhOpeR"); + expect(response).toEqual({ + id: "userId_sampleXGMFnhOpeR", + createdAt: "2024-01-01T00:00:00.000Z", + foreignId: "my-foreign-id", + }); + }); + + test("update", async () => { + const response = await client.users.update("userId_sampleXGMFnhOpeR", { + foreignId: "my-foreign-id", + }); + expect(response).toEqual({ + id: "userId_sampleXGMFnhOpeR", + createdAt: "2024-01-01T00:00:00.000Z", + foreignId: "my-foreign-id", + }); + }); +}); diff --git a/tsconfig.cjs.json b/tsconfig.cjs.json deleted file mode 100644 index 967b85e3..00000000 --- a/tsconfig.cjs.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "CommonJS", - "declaration": false, - "declarationDir": null, - "outDir": "dist/cjs", - "allowSyntheticDefaultImports": true - } -} diff --git a/tsconfig.json b/tsconfig.json index 34b85f01..538c94fe 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,13 +1,17 @@ { - "extends": "@tsconfig/node18/tsconfig.json", - "compilerOptions": { - "module": "ES2020", - "moduleResolution": "Node", - "resolveJsonModule": true, - "declaration": true, - "declarationDir": "dist/types", - "outDir": "dist/esm", - "types": ["node"] - }, - "include": ["src/**/*"] + "compilerOptions": { + "extendedDiagnostics": true, + "strict": true, + "target": "ES6", + "module": "CommonJS", + "moduleResolution": "node", + "esModuleInterop": true, + "skipLibCheck": true, + "declaration": true, + "outDir": "dist", + "rootDir": "src", + "baseUrl": "src" + }, + "include": ["src"], + "exclude": [] } diff --git a/verify_version.sh b/verify_version.sh deleted file mode 100755 index a5fd7e68..00000000 --- a/verify_version.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# Verify package.json version matches version.ts -if ! npx genversion --check-only -v --es6 --semi --double src/version.ts; then - echo "Run the following command to fix: -npx genversion --es6 --semi --double src/version.ts" - - exit 1 -fi diff --git a/xo.config.js b/xo.config.js deleted file mode 100644 index 3e651f22..00000000 --- a/xo.config.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = { - prettier: true, - envs: ["node", "jest"], - ignores: ["**/xo.config.js", "**/prettier.config.js"], - rules: { - // Shut off "capitalized-comments" since commenting a section of code out - // causes this error to be reported. - "capitalized-comments": "off", - // Shut off "n/file-extension-in-import" since TS curretly has issues - // handling this. - "n/file-extension-in-import": "off", - }, -}; diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 00000000..229d0097 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,2794 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@ampproject/remapping@^2.2.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4" + integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.24" + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" + integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== + dependencies: + "@babel/highlight" "^7.24.7" + picocolors "^1.0.0" + +"@babel/compat-data@^7.25.2": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.25.4.tgz#7d2a80ce229890edcf4cc259d4d696cb4dae2fcb" + integrity sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ== + +"@babel/core@^7.0.0", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.25.2.tgz#ed8eec275118d7613e77a352894cd12ded8eba77" + integrity sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.25.0" + "@babel/helper-compilation-targets" "^7.25.2" + "@babel/helper-module-transforms" "^7.25.2" + "@babel/helpers" "^7.25.0" + "@babel/parser" "^7.25.0" + "@babel/template" "^7.25.0" + "@babel/traverse" "^7.25.2" + "@babel/types" "^7.25.2" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + +"@babel/generator@^7.25.0", "@babel/generator@^7.25.6", "@babel/generator@^7.7.2": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.6.tgz#0df1ad8cb32fe4d2b01d8bf437f153d19342a87c" + integrity sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw== + dependencies: + "@babel/types" "^7.25.6" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + jsesc "^2.5.1" + +"@babel/helper-compilation-targets@^7.25.2": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.2.tgz#e1d9410a90974a3a5a66e84ff55ef62e3c02d06c" + integrity sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw== + dependencies: + "@babel/compat-data" "^7.25.2" + "@babel/helper-validator-option" "^7.24.8" + browserslist "^4.23.1" + lru-cache "^5.1.1" + semver "^6.3.1" + +"@babel/helper-module-imports@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz#f2f980392de5b84c3328fc71d38bd81bbb83042b" + integrity sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + +"@babel/helper-module-transforms@^7.25.2": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.25.2.tgz#ee713c29768100f2776edf04d4eb23b8d27a66e6" + integrity sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ== + dependencies: + "@babel/helper-module-imports" "^7.24.7" + "@babel/helper-simple-access" "^7.24.7" + "@babel/helper-validator-identifier" "^7.24.7" + "@babel/traverse" "^7.25.2" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.24.7", "@babel/helper-plugin-utils@^7.24.8", "@babel/helper-plugin-utils@^7.8.0": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz#94ee67e8ec0e5d44ea7baeb51e571bd26af07878" + integrity sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg== + +"@babel/helper-simple-access@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz#bcade8da3aec8ed16b9c4953b74e506b51b5edb3" + integrity sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + +"@babel/helper-string-parser@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz#5b3329c9a58803d5df425e5785865881a81ca48d" + integrity sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ== + +"@babel/helper-validator-identifier@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" + integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== + +"@babel/helper-validator-option@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz#3725cdeea8b480e86d34df15304806a06975e33d" + integrity sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q== + +"@babel/helpers@^7.25.0": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.25.6.tgz#57ee60141829ba2e102f30711ffe3afab357cc60" + integrity sha512-Xg0tn4HcfTijTwfDwYlvVCl43V6h4KyVVX2aEm4qdO/PC6L2YvzLHFdmxhoeSA3eslcE6+ZVXHgWwopXYLNq4Q== + dependencies: + "@babel/template" "^7.25.0" + "@babel/types" "^7.25.6" + +"@babel/highlight@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" + integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== + dependencies: + "@babel/helper-validator-identifier" "^7.24.7" + chalk "^2.4.2" + js-tokens "^4.0.0" + picocolors "^1.0.0" + +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.0", "@babel/parser@^7.25.6": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.6.tgz#85660c5ef388cbbf6e3d2a694ee97a38f18afe2f" + integrity sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q== + dependencies: + "@babel/types" "^7.25.6" + +"@babel/plugin-syntax-async-generators@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" + integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-bigint@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" + integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-class-properties@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" + integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-syntax-class-static-block@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406" + integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-import-attributes@^7.24.7": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.6.tgz#6d4c78f042db0e82fd6436cd65fec5dc78ad2bde" + integrity sha512-sXaDXaJN9SNLymBdlWFA+bjzBhFD617ZaFiY13dGt7TVslVvVgA6fkZOP7Ki3IGElC45lwHdOTrCtKZGVAWeLQ== + dependencies: + "@babel/helper-plugin-utils" "^7.24.8" + +"@babel/plugin-syntax-import-meta@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" + integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-json-strings@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-jsx@^7.7.2": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz#39a1fa4a7e3d3d7f34e2acc6be585b718d30e02d" + integrity sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" + integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" + integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-numeric-separator@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" + integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-object-rest-spread@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-catch-binding@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" + integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-chaining@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" + integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-private-property-in-object@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad" + integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-top-level-await@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" + integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-typescript@^7.7.2": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.4.tgz#04db9ce5a9043d9c635e75ae7969a2cd50ca97ff" + integrity sha512-uMOCoHVU52BsSWxPOMVv5qKRdeSlPuImUCB2dlPuBSU+W2/ROE7/Zg8F2Kepbk+8yBa68LlRKxO+xgEVWorsDg== + dependencies: + "@babel/helper-plugin-utils" "^7.24.8" + +"@babel/runtime@^7.0.0": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.6.tgz#9afc3289f7184d8d7f98b099884c26317b9264d2" + integrity sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ== + dependencies: + regenerator-runtime "^0.14.0" + +"@babel/template@^7.25.0", "@babel/template@^7.3.3": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.0.tgz#e733dc3134b4fede528c15bc95e89cb98c52592a" + integrity sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/parser" "^7.25.0" + "@babel/types" "^7.25.0" + +"@babel/traverse@^7.24.7", "@babel/traverse@^7.25.2": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.6.tgz#04fad980e444f182ecf1520504941940a90fea41" + integrity sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.25.6" + "@babel/parser" "^7.25.6" + "@babel/template" "^7.25.0" + "@babel/types" "^7.25.6" + debug "^4.3.1" + globals "^11.1.0" + +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.24.7", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.25.6", "@babel/types@^7.3.3": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.6.tgz#893942ddb858f32ae7a004ec9d3a76b3463ef8e6" + integrity sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw== + dependencies: + "@babel/helper-string-parser" "^7.24.8" + "@babel/helper-validator-identifier" "^7.24.7" + to-fast-properties "^2.0.0" + +"@bcoe/v8-coverage@^0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" + integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== + +"@istanbuljs/load-nyc-config@^1.0.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" + integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== + dependencies: + camelcase "^5.3.1" + find-up "^4.1.0" + get-package-type "^0.1.0" + js-yaml "^3.13.1" + resolve-from "^5.0.0" + +"@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== + +"@jest/console@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc" + integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg== + dependencies: + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + slash "^3.0.0" + +"@jest/core@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.7.0.tgz#b6cccc239f30ff36609658c5a5e2291757ce448f" + integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg== + dependencies: + "@jest/console" "^29.7.0" + "@jest/reporters" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + ci-info "^3.2.0" + exit "^0.1.2" + graceful-fs "^4.2.9" + jest-changed-files "^29.7.0" + jest-config "^29.7.0" + jest-haste-map "^29.7.0" + jest-message-util "^29.7.0" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-resolve-dependencies "^29.7.0" + jest-runner "^29.7.0" + jest-runtime "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + jest-watcher "^29.7.0" + micromatch "^4.0.4" + pretty-format "^29.7.0" + slash "^3.0.0" + strip-ansi "^6.0.0" + +"@jest/environment@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7" + integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw== + dependencies: + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-mock "^29.7.0" + +"@jest/expect-utils@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6" + integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA== + dependencies: + jest-get-type "^29.6.3" + +"@jest/expect@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.7.0.tgz#76a3edb0cb753b70dfbfe23283510d3d45432bf2" + integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ== + dependencies: + expect "^29.7.0" + jest-snapshot "^29.7.0" + +"@jest/fake-timers@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565" + integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ== + dependencies: + "@jest/types" "^29.6.3" + "@sinonjs/fake-timers" "^10.0.2" + "@types/node" "*" + jest-message-util "^29.7.0" + jest-mock "^29.7.0" + jest-util "^29.7.0" + +"@jest/globals@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d" + integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/types" "^29.6.3" + jest-mock "^29.7.0" + +"@jest/reporters@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7" + integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg== + dependencies: + "@bcoe/v8-coverage" "^0.2.3" + "@jest/console" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@jridgewell/trace-mapping" "^0.3.18" + "@types/node" "*" + chalk "^4.0.0" + collect-v8-coverage "^1.0.0" + exit "^0.1.2" + glob "^7.1.3" + graceful-fs "^4.2.9" + istanbul-lib-coverage "^3.0.0" + istanbul-lib-instrument "^6.0.0" + istanbul-lib-report "^3.0.0" + istanbul-lib-source-maps "^4.0.0" + istanbul-reports "^3.1.3" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + jest-worker "^29.7.0" + slash "^3.0.0" + string-length "^4.0.1" + strip-ansi "^6.0.0" + v8-to-istanbul "^9.0.1" + +"@jest/schemas@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" + integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== + dependencies: + "@sinclair/typebox" "^0.27.8" + +"@jest/source-map@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4" + integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== + dependencies: + "@jridgewell/trace-mapping" "^0.3.18" + callsites "^3.0.0" + graceful-fs "^4.2.9" + +"@jest/test-result@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.7.0.tgz#8db9a80aa1a097bb2262572686734baed9b1657c" + integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA== + dependencies: + "@jest/console" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/istanbul-lib-coverage" "^2.0.0" + collect-v8-coverage "^1.0.0" + +"@jest/test-sequencer@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz#6cef977ce1d39834a3aea887a1726628a6f072ce" + integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw== + dependencies: + "@jest/test-result" "^29.7.0" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + slash "^3.0.0" + +"@jest/transform@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c" + integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== + dependencies: + "@babel/core" "^7.11.6" + "@jest/types" "^29.6.3" + "@jridgewell/trace-mapping" "^0.3.18" + babel-plugin-istanbul "^6.1.1" + chalk "^4.0.0" + convert-source-map "^2.0.0" + fast-json-stable-stringify "^2.1.0" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + jest-regex-util "^29.6.3" + jest-util "^29.7.0" + micromatch "^4.0.4" + pirates "^4.0.4" + slash "^3.0.0" + write-file-atomic "^4.0.2" + +"@jest/types@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" + integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== + dependencies: + "@jest/schemas" "^29.6.3" + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^17.0.8" + chalk "^4.0.0" + +"@jridgewell/gen-mapping@^0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" + integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== + dependencies: + "@jridgewell/set-array" "^1.2.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.24" + +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" + integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== + +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@sinclair/typebox@^0.27.8": + version "0.27.8" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" + integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== + +"@sinonjs/commons@^3.0.0": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.1.tgz#1029357e44ca901a615585f6d27738dbc89084cd" + integrity sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ== + dependencies: + type-detect "4.0.8" + +"@sinonjs/fake-timers@^10.0.2": + version "10.3.0" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66" + integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== + dependencies: + "@sinonjs/commons" "^3.0.0" + +"@tootallnate/once@2": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" + integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== + +"@types/babel__core@^7.1.14": + version "7.20.5" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" + integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== + dependencies: + "@babel/parser" "^7.20.7" + "@babel/types" "^7.20.7" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" + +"@types/babel__generator@*": + version "7.6.8" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.8.tgz#f836c61f48b1346e7d2b0d93c6dacc5b9535d3ab" + integrity sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw== + dependencies: + "@babel/types" "^7.0.0" + +"@types/babel__template@*": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.4.tgz#5672513701c1b2199bc6dad636a9d7491586766f" + integrity sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": + version "7.20.6" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.6.tgz#8dc9f0ae0f202c08d8d4dab648912c8d6038e3f7" + integrity sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg== + dependencies: + "@babel/types" "^7.20.7" + +"@types/graceful-fs@^4.1.3": + version "4.1.9" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4" + integrity sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ== + dependencies: + "@types/node" "*" + +"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7" + integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w== + +"@types/istanbul-lib-report@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz#53047614ae72e19fc0401d872de3ae2b4ce350bf" + integrity sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA== + dependencies: + "@types/istanbul-lib-coverage" "*" + +"@types/istanbul-reports@^3.0.0": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz#0f03e3d2f670fbdac586e34b433783070cc16f54" + integrity sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ== + dependencies: + "@types/istanbul-lib-report" "*" + +"@types/jest@29.5.5": + version "29.5.5" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.5.tgz#727204e06228fe24373df9bae76b90f3e8236a2a" + integrity sha512-ebylz2hnsWR9mYvmBFbXJXr+33UPc4+ZdxyDXh5w0FlPBTfCVN3wPL+kuOiQt3xvrK419v7XWeAs+AeOksafXg== + dependencies: + expect "^29.0.0" + pretty-format "^29.0.0" + +"@types/jsdom@^20.0.0": + version "20.0.1" + resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-20.0.1.tgz#07c14bc19bd2f918c1929541cdaacae894744808" + integrity sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ== + dependencies: + "@types/node" "*" + "@types/tough-cookie" "*" + parse5 "^7.0.0" + +"@types/node-fetch@2.6.9": + version "2.6.9" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.9.tgz#15f529d247f1ede1824f7e7acdaa192d5f28071e" + integrity sha512-bQVlnMLFJ2d35DkPNjEPmd9ueO/rh5EiaZt2bhqiSarPjZIuIV6bPQVqcrEyvNo+AfTrRGVazle1tl597w3gfA== + dependencies: + "@types/node" "*" + form-data "^4.0.0" + +"@types/node@*": + version "22.5.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.1.tgz#de01dce265f6b99ed32b295962045d10b5b99560" + integrity sha512-KkHsxej0j9IW1KKOOAA/XBA0z08UFSrRQHErzEfA3Vgq57eXIMYboIlHJuYIfd+lwCQjtKqUu3UnmKbtUc9yRw== + dependencies: + undici-types "~6.19.2" + +"@types/node@17.0.33": + version "17.0.33" + resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.33.tgz#3c1879b276dc63e73030bb91165e62a4509cd506" + integrity sha512-miWq2m2FiQZmaHfdZNcbpp9PuXg34W5JZ5CrJ/BaS70VuhoJENBEQybeiYSaPBRNq6KQGnjfEnc/F3PN++D+XQ== + +"@types/qs@6.9.8": + version "6.9.8" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.8.tgz#f2a7de3c107b89b441e071d5472e6b726b4adf45" + integrity sha512-u95svzDlTysU5xecFNTgfFG5RUWu1A9P0VzgpcIiGZA9iraHOdSzcxMxQ55DyeRaGCSxQi7LxXDI4rzq/MYfdg== + +"@types/stack-utils@^2.0.0": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8" + integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw== + +"@types/tough-cookie@*": + version "4.0.5" + resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz#cb6e2a691b70cb177c6e3ae9c1d2e8b2ea8cd304" + integrity sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA== + +"@types/url-join@4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@types/url-join/-/url-join-4.0.1.tgz#4989c97f969464647a8586c7252d97b449cdc045" + integrity sha512-wDXw9LEEUHyV+7UWy7U315nrJGJ7p1BzaCxDpEoLr789Dk1WDVMMlf3iBfbG2F8NdWnYyFbtTxUn2ZNbm1Q4LQ== + +"@types/yargs-parser@*": + version "21.0.3" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15" + integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== + +"@types/yargs@^17.0.8": + version "17.0.33" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.33.tgz#8c32303da83eec050a84b3c7ae7b9f922d13e32d" + integrity sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA== + dependencies: + "@types/yargs-parser" "*" + +abab@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" + integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== + +acorn-globals@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-7.0.1.tgz#0dbf05c44fa7c94332914c02066d5beff62c40c3" + integrity sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q== + dependencies: + acorn "^8.1.0" + acorn-walk "^8.0.2" + +acorn-walk@^8.0.2: + version "8.3.3" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.3.tgz#9caeac29eefaa0c41e3d4c65137de4d6f34df43e" + integrity sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw== + dependencies: + acorn "^8.11.0" + +acorn@^8.1.0, acorn@^8.11.0, acorn@^8.8.1: + version "8.12.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" + integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== + +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + +ansi-escapes@^4.2.1: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +ansi-styles@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" + integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== + +anymatch@^3.0.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== + +babel-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" + integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== + dependencies: + "@jest/transform" "^29.7.0" + "@types/babel__core" "^7.1.14" + babel-plugin-istanbul "^6.1.1" + babel-preset-jest "^29.6.3" + chalk "^4.0.0" + graceful-fs "^4.2.9" + slash "^3.0.0" + +babel-plugin-istanbul@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" + integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@istanbuljs/load-nyc-config" "^1.0.0" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-instrument "^5.0.4" + test-exclude "^6.0.0" + +babel-plugin-jest-hoist@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz#aadbe943464182a8922c3c927c3067ff40d24626" + integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg== + dependencies: + "@babel/template" "^7.3.3" + "@babel/types" "^7.3.3" + "@types/babel__core" "^7.1.14" + "@types/babel__traverse" "^7.0.6" + +babel-preset-current-node-syntax@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz#9a929eafece419612ef4ae4f60b1862ebad8ef30" + integrity sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw== + dependencies: + "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/plugin-syntax-bigint" "^7.8.3" + "@babel/plugin-syntax-class-properties" "^7.12.13" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + "@babel/plugin-syntax-import-attributes" "^7.24.7" + "@babel/plugin-syntax-import-meta" "^7.10.4" + "@babel/plugin-syntax-json-strings" "^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + "@babel/plugin-syntax-top-level-await" "^7.14.5" + +babel-preset-jest@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c" + integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA== + dependencies: + babel-plugin-jest-hoist "^29.6.3" + babel-preset-current-node-syntax "^1.0.0" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +browserslist@^4.23.1: + version "4.23.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.3.tgz#debb029d3c93ebc97ffbc8d9cbb03403e227c800" + integrity sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA== + dependencies: + caniuse-lite "^1.0.30001646" + electron-to-chromium "^1.5.4" + node-releases "^2.0.18" + update-browserslist-db "^1.1.0" + +bs-logger@0.x: + version "0.2.6" + resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" + integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== + dependencies: + fast-json-stable-stringify "2.x" + +bser@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" + integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== + dependencies: + node-int64 "^0.4.0" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +camelcase@^6.2.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +caniuse-lite@^1.0.30001646: + version "1.0.30001653" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001653.tgz#b8af452f8f33b1c77f122780a4aecebea0caca56" + integrity sha512-XGWQVB8wFQ2+9NZwZ10GxTYC5hk0Fa+q8cSkr0tgvMhYhMHP/QC+WTgrePMDBWiWc/pV+1ik82Al20XOK25Gcw== + +chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +char-regex@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" + integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== + +ci-info@^3.2.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" + integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== + +cjs-module-lexer@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.0.tgz#677de7ed7efff67cc40c9bf1897fea79d41b5215" + integrity sha512-N1NGmowPlGBLsOZLPvm48StN04V4YvQRL0i6b7ctrVY3epjP/ct7hFLOItz6pDIvRjwpfPxi52a2UWV2ziir8g== + +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== + +collect-v8-coverage@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9" + integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +combined-stream@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +convert-source-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== + +core-js@^3.0.0: + version "3.38.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.38.1.tgz#aa375b79a286a670388a1a363363d53677c0383e" + integrity sha512-OP35aUorbU3Zvlx7pjsFdu1rGNnD4pgw/CWoYzRY3t2EzoVT7shKHY1dlAy3f41cGIO7ZDPQimhGFTlEYkG/Hw== + +create-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" + integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q== + dependencies: + "@jest/types" "^29.6.3" + chalk "^4.0.0" + exit "^0.1.2" + graceful-fs "^4.2.9" + jest-config "^29.7.0" + jest-util "^29.7.0" + prompts "^2.0.1" + +cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +cssom@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.5.0.tgz#d254fa92cd8b6fbd83811b9fbaed34663cc17c36" + integrity sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw== + +cssom@~0.3.6: + version "0.3.8" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" + integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== + +cssstyle@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" + integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== + dependencies: + cssom "~0.3.6" + +data-urls@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-3.0.2.tgz#9cf24a477ae22bcef5cd5f6f0bfbc1d2d3be9143" + integrity sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ== + dependencies: + abab "^2.0.6" + whatwg-mimetype "^3.0.0" + whatwg-url "^11.0.0" + +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: + version "4.3.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" + integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== + dependencies: + ms "2.1.2" + +decimal.js@^10.4.2: + version "10.4.3" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" + integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA== + +dedent@^1.0.0: + version "1.5.3" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.3.tgz#99aee19eb9bae55a67327717b6e848d0bf777e5a" + integrity sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ== + +deepmerge@^4.2.2: + version "4.3.1" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" + integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== + +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== + +detect-newline@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" + integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== + +diff-sequences@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" + integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== + +domexception@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/domexception/-/domexception-4.0.0.tgz#4ad1be56ccadc86fc76d033353999a8037d03673" + integrity sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw== + dependencies: + webidl-conversions "^7.0.0" + +electron-to-chromium@^1.5.4: + version "1.5.13" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz#1abf0410c5344b2b829b7247e031f02810d442e6" + integrity sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q== + +emittery@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" + integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +entities@^4.4.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" + integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +escalade@^3.1.1, escalade@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" + integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + +escodegen@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.1.0.tgz#ba93bbb7a43986d29d6041f99f5262da773e2e17" + integrity sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w== + dependencies: + esprima "^4.0.1" + estraverse "^5.2.0" + esutils "^2.0.2" + optionalDependencies: + source-map "~0.6.1" + +esprima@^4.0.0, esprima@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +execa@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + +exit@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== + +expect@^29.0.0, expect@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" + integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== + dependencies: + "@jest/expect-utils" "^29.7.0" + jest-get-type "^29.6.3" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + +fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fb-watchman@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" + integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== + dependencies: + bser "2.1.1" + +fetch-mock-jest@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/fetch-mock-jest/-/fetch-mock-jest-1.5.1.tgz#0e13df990d286d9239e284f12b279ed509bf53cd" + integrity sha512-+utwzP8C+Pax1GSka3nFXILWMY3Er2L+s090FOgqVNrNCPp0fDqgXnAHAJf12PLHi0z4PhcTaZNTz8e7K3fjqQ== + dependencies: + fetch-mock "^9.11.0" + +fetch-mock@^9.11.0: + version "9.11.0" + resolved "https://registry.yarnpkg.com/fetch-mock/-/fetch-mock-9.11.0.tgz#371c6fb7d45584d2ae4a18ee6824e7ad4b637a3f" + integrity sha512-PG1XUv+x7iag5p/iNHD4/jdpxL9FtVSqRMUQhPab4hVDt80T1MH5ehzVrL2IdXO9Q2iBggArFvPqjUbHFuI58Q== + dependencies: + "@babel/core" "^7.0.0" + "@babel/runtime" "^7.0.0" + core-js "^3.0.0" + debug "^4.1.1" + glob-to-regexp "^0.4.0" + is-subset "^0.1.1" + lodash.isequal "^4.5.0" + path-to-regexp "^2.2.1" + querystring "^0.2.0" + whatwg-url "^6.5.0" + +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + +find-up@^4.0.0, find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +formdata-node@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/formdata-node/-/formdata-node-6.0.3.tgz#48f8e2206ae2befded82af621ef015f08168dc6d" + integrity sha512-8e1++BCiTzUno9v5IZ2J6bv4RU+3UKDmqWUQD0MIMVCd9AdhWkO1gw57oo1mNEX1dMq2EGI+FbWz4B92pscSQg== + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@^2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + +get-package-type@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" + integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +glob-to-regexp@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" + integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== + +glob@^7.1.3, glob@^7.1.4: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + +graceful-fs@^4.2.9: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + +has-proto@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" + integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== + +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +hasown@^2.0.0, hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + +html-encoding-sniffer@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz#2cb1a8cf0db52414776e5b2a7a04d5dd98158de9" + integrity sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA== + dependencies: + whatwg-encoding "^2.0.0" + +html-escaper@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== + +http-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" + integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w== + dependencies: + "@tootallnate/once" "2" + agent-base "6" + debug "4" + +https-proxy-agent@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== + dependencies: + agent-base "6" + debug "4" + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + +iconv-lite@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + +import-local@^3.0.2: + version "3.2.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.2.0.tgz#c3d5c745798c02a6f8b897726aba5100186ee260" + integrity sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== + +is-core-module@^2.13.0: + version "2.15.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" + integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== + dependencies: + hasown "^2.0.2" + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-generator-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" + integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-potential-custom-element-name@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" + integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +is-subset@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" + integrity sha512-6Ybun0IkarhmEqxXCNw/C0bna6Zb/TkfUX9UbwJtK6ObwAVCxmAP308WWTHviM/zAqXk05cdhYsUsZeGQh99iw== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" + integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== + +istanbul-lib-instrument@^5.0.4: + version "5.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" + integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== + dependencies: + "@babel/core" "^7.12.3" + "@babel/parser" "^7.14.7" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.2.0" + semver "^6.3.0" + +istanbul-lib-instrument@^6.0.0: + version "6.0.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765" + integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== + dependencies: + "@babel/core" "^7.23.9" + "@babel/parser" "^7.23.9" + "@istanbuljs/schema" "^0.1.3" + istanbul-lib-coverage "^3.2.0" + semver "^7.5.4" + +istanbul-lib-report@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" + integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== + dependencies: + istanbul-lib-coverage "^3.0.0" + make-dir "^4.0.0" + supports-color "^7.1.0" + +istanbul-lib-source-maps@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" + integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== + dependencies: + debug "^4.1.1" + istanbul-lib-coverage "^3.0.0" + source-map "^0.6.1" + +istanbul-reports@^3.1.3: + version "3.1.7" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.7.tgz#daed12b9e1dca518e15c056e1e537e741280fa0b" + integrity sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g== + dependencies: + html-escaper "^2.0.0" + istanbul-lib-report "^3.0.0" + +jest-changed-files@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a" + integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w== + dependencies: + execa "^5.0.0" + jest-util "^29.7.0" + p-limit "^3.1.0" + +jest-circus@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.7.0.tgz#b6817a45fcc835d8b16d5962d0c026473ee3668a" + integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + co "^4.6.0" + dedent "^1.0.0" + is-generator-fn "^2.0.0" + jest-each "^29.7.0" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-runtime "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + p-limit "^3.1.0" + pretty-format "^29.7.0" + pure-rand "^6.0.0" + slash "^3.0.0" + stack-utils "^2.0.3" + +jest-cli@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.7.0.tgz#5592c940798e0cae677eec169264f2d839a37995" + integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg== + dependencies: + "@jest/core" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" + chalk "^4.0.0" + create-jest "^29.7.0" + exit "^0.1.2" + import-local "^3.0.2" + jest-config "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + yargs "^17.3.1" + +jest-config@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.7.0.tgz#bcbda8806dbcc01b1e316a46bb74085a84b0245f" + integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ== + dependencies: + "@babel/core" "^7.11.6" + "@jest/test-sequencer" "^29.7.0" + "@jest/types" "^29.6.3" + babel-jest "^29.7.0" + chalk "^4.0.0" + ci-info "^3.2.0" + deepmerge "^4.2.2" + glob "^7.1.3" + graceful-fs "^4.2.9" + jest-circus "^29.7.0" + jest-environment-node "^29.7.0" + jest-get-type "^29.6.3" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-runner "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + micromatch "^4.0.4" + parse-json "^5.2.0" + pretty-format "^29.7.0" + slash "^3.0.0" + strip-json-comments "^3.1.1" + +jest-diff@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" + integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== + dependencies: + chalk "^4.0.0" + diff-sequences "^29.6.3" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + +jest-docblock@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a" + integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== + dependencies: + detect-newline "^3.0.0" + +jest-each@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.7.0.tgz#162a9b3f2328bdd991beaabffbb74745e56577d1" + integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ== + dependencies: + "@jest/types" "^29.6.3" + chalk "^4.0.0" + jest-get-type "^29.6.3" + jest-util "^29.7.0" + pretty-format "^29.7.0" + +jest-environment-jsdom@29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz#d206fa3551933c3fd519e5dfdb58a0f5139a837f" + integrity sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/jsdom" "^20.0.0" + "@types/node" "*" + jest-mock "^29.7.0" + jest-util "^29.7.0" + jsdom "^20.0.0" + +jest-environment-node@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" + integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-mock "^29.7.0" + jest-util "^29.7.0" + +jest-get-type@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" + integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== + +jest-haste-map@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz#3c2396524482f5a0506376e6c858c3bbcc17b104" + integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA== + dependencies: + "@jest/types" "^29.6.3" + "@types/graceful-fs" "^4.1.3" + "@types/node" "*" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.9" + jest-regex-util "^29.6.3" + jest-util "^29.7.0" + jest-worker "^29.7.0" + micromatch "^4.0.4" + walker "^1.0.8" + optionalDependencies: + fsevents "^2.3.2" + +jest-leak-detector@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728" + integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw== + dependencies: + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + +jest-matcher-utils@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12" + integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g== + dependencies: + chalk "^4.0.0" + jest-diff "^29.7.0" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + +jest-message-util@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3" + integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w== + dependencies: + "@babel/code-frame" "^7.12.13" + "@jest/types" "^29.6.3" + "@types/stack-utils" "^2.0.0" + chalk "^4.0.0" + graceful-fs "^4.2.9" + micromatch "^4.0.4" + pretty-format "^29.7.0" + slash "^3.0.0" + stack-utils "^2.0.3" + +jest-mock@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347" + integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw== + dependencies: + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-util "^29.7.0" + +jest-pnp-resolver@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" + integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== + +jest-regex-util@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" + integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== + +jest-resolve-dependencies@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz#1b04f2c095f37fc776ff40803dc92921b1e88428" + integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA== + dependencies: + jest-regex-util "^29.6.3" + jest-snapshot "^29.7.0" + +jest-resolve@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30" + integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== + dependencies: + chalk "^4.0.0" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + jest-pnp-resolver "^1.2.2" + jest-util "^29.7.0" + jest-validate "^29.7.0" + resolve "^1.20.0" + resolve.exports "^2.0.0" + slash "^3.0.0" + +jest-runner@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e" + integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ== + dependencies: + "@jest/console" "^29.7.0" + "@jest/environment" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + emittery "^0.13.1" + graceful-fs "^4.2.9" + jest-docblock "^29.7.0" + jest-environment-node "^29.7.0" + jest-haste-map "^29.7.0" + jest-leak-detector "^29.7.0" + jest-message-util "^29.7.0" + jest-resolve "^29.7.0" + jest-runtime "^29.7.0" + jest-util "^29.7.0" + jest-watcher "^29.7.0" + jest-worker "^29.7.0" + p-limit "^3.1.0" + source-map-support "0.5.13" + +jest-runtime@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.7.0.tgz#efecb3141cf7d3767a3a0cc8f7c9990587d3d817" + integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/globals" "^29.7.0" + "@jest/source-map" "^29.6.3" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + cjs-module-lexer "^1.0.0" + collect-v8-coverage "^1.0.0" + glob "^7.1.3" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + jest-message-util "^29.7.0" + jest-mock "^29.7.0" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + slash "^3.0.0" + strip-bom "^4.0.0" + +jest-snapshot@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5" + integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw== + dependencies: + "@babel/core" "^7.11.6" + "@babel/generator" "^7.7.2" + "@babel/plugin-syntax-jsx" "^7.7.2" + "@babel/plugin-syntax-typescript" "^7.7.2" + "@babel/types" "^7.3.3" + "@jest/expect-utils" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + babel-preset-current-node-syntax "^1.0.0" + chalk "^4.0.0" + expect "^29.7.0" + graceful-fs "^4.2.9" + jest-diff "^29.7.0" + jest-get-type "^29.6.3" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + natural-compare "^1.4.0" + pretty-format "^29.7.0" + semver "^7.5.3" + +jest-util@^29.0.0, jest-util@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" + integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== + dependencies: + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + ci-info "^3.2.0" + graceful-fs "^4.2.9" + picomatch "^2.2.3" + +jest-validate@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c" + integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== + dependencies: + "@jest/types" "^29.6.3" + camelcase "^6.2.0" + chalk "^4.0.0" + jest-get-type "^29.6.3" + leven "^3.1.0" + pretty-format "^29.7.0" + +jest-watcher@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.7.0.tgz#7810d30d619c3a62093223ce6bb359ca1b28a2f2" + integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g== + dependencies: + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + emittery "^0.13.1" + jest-util "^29.7.0" + string-length "^4.0.1" + +jest-worker@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" + integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== + dependencies: + "@types/node" "*" + jest-util "^29.7.0" + merge-stream "^2.0.0" + supports-color "^8.0.0" + +jest@29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-29.7.0.tgz#994676fc24177f088f1c5e3737f5697204ff2613" + integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== + dependencies: + "@jest/core" "^29.7.0" + "@jest/types" "^29.6.3" + import-local "^3.0.2" + jest-cli "^29.7.0" + +js-base64@3.7.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-3.7.2.tgz#816d11d81a8aff241603d19ce5761e13e41d7745" + integrity sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ== + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^3.13.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsdom@^20.0.0: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-20.0.3.tgz#886a41ba1d4726f67a8858028c99489fed6ad4db" + integrity sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ== + dependencies: + abab "^2.0.6" + acorn "^8.8.1" + acorn-globals "^7.0.0" + cssom "^0.5.0" + cssstyle "^2.3.0" + data-urls "^3.0.2" + decimal.js "^10.4.2" + domexception "^4.0.0" + escodegen "^2.0.0" + form-data "^4.0.0" + html-encoding-sniffer "^3.0.0" + http-proxy-agent "^5.0.0" + https-proxy-agent "^5.0.1" + is-potential-custom-element-name "^1.0.1" + nwsapi "^2.2.2" + parse5 "^7.1.1" + saxes "^6.0.0" + symbol-tree "^3.2.4" + tough-cookie "^4.1.2" + w3c-xmlserializer "^4.0.0" + webidl-conversions "^7.0.0" + whatwg-encoding "^2.0.0" + whatwg-mimetype "^3.0.0" + whatwg-url "^11.0.0" + ws "^8.11.0" + xml-name-validator "^4.0.0" + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + +json5@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + +kleur@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" + integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== + +leven@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" + integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== + +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== + +lodash.memoize@4.x: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== + +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + integrity sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA== + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +make-dir@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" + integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== + dependencies: + semver "^7.5.3" + +make-error@1.x: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +makeerror@1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" + integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== + dependencies: + tmpl "1.0.5" + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +micromatch@^4.0.4: + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== + dependencies: + braces "^3.0.3" + picomatch "^2.3.1" + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.12: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimatch@^3.0.4, minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + +node-fetch@2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== + +node-releases@^2.0.18: + version "2.0.18" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" + integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g== + +normalize-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +nwsapi@^2.2.2: + version "2.2.12" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.12.tgz#fb6af5c0ec35b27b4581eb3bbad34ec9e5c696f8" + integrity sha512-qXDmcVlZV4XRtKFzddidpfVP4oMSGhga+xdMc25mv8kaLUHtgzCDhUxkrN8exkGdTlLNaXj7CV3GtON7zuGZ+w== + +object-inspect@^1.13.1: + version "1.13.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff" + integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g== + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +parse-json@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" + +parse5@^7.0.0, parse5@^7.1.1: + version "7.1.2" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" + integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== + dependencies: + entities "^4.4.0" + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-to-regexp@^2.2.1: + version "2.4.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-2.4.0.tgz#35ce7f333d5616f1c1e1bfe266c3aba2e5b2e704" + integrity sha512-G6zHoVqC6GGTQkZwF4lkuEyMbVOjoBKAEybQUypI1WTkqinCOrq2x6U2+phkJ1XsEMTy4LjtwPI7HW+NVrRR2w== + +picocolors@^1.0.0, picocolors@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" + integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== + +picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pirates@^4.0.4: + version "4.0.6" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" + integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== + +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + +prettier@2.7.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" + integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== + +pretty-format@^29.0.0, pretty-format@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" + integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== + dependencies: + "@jest/schemas" "^29.6.3" + ansi-styles "^5.0.0" + react-is "^18.0.0" + +prompts@^2.0.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" + integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== + dependencies: + kleur "^3.0.3" + sisteransi "^1.0.5" + +psl@^1.1.33: + version "1.9.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" + integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== + +punycode@^2.1.0, punycode@^2.1.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + +pure-rand@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.1.0.tgz#d173cf23258231976ccbdb05247c9787957604f2" + integrity sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA== + +qs@6.11.2: + version "6.11.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9" + integrity sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA== + dependencies: + side-channel "^1.0.4" + +querystring@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.1.tgz#40d77615bb09d16902a85c3e38aa8b5ed761c2dd" + integrity sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg== + +querystringify@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" + integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== + +react-is@^18.0.0: + version "18.3.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" + integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== + +regenerator-runtime@^0.14.0: + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== + +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve.exports@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" + integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== + +resolve@^1.20.0: + version "1.22.8" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +"safer-buffer@>= 2.1.2 < 3.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +saxes@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/saxes/-/saxes-6.0.0.tgz#fe5b4a4768df4f14a201b1ba6a65c1f3d9988cc5" + integrity sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA== + dependencies: + xmlchars "^2.2.0" + +semver@^6.3.0, semver@^6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +semver@^7.5.3, semver@^7.5.4: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== + +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +side-channel@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" + +signal-exit@^3.0.3, signal-exit@^3.0.7: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +sisteransi@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" + integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +source-map-support@0.5.13: + version "0.5.13" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" + integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== + +stack-utils@^2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" + integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== + dependencies: + escape-string-regexp "^2.0.0" + +string-length@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" + integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== + dependencies: + char-regex "^1.0.2" + strip-ansi "^6.0.0" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-bom@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" + integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +symbol-tree@^3.2.4: + version "3.2.4" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" + integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== + +test-exclude@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== + dependencies: + "@istanbuljs/schema" "^0.1.2" + glob "^7.1.4" + minimatch "^3.0.4" + +tmpl@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" + integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +tough-cookie@^4.1.2: + version "4.1.4" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.4.tgz#945f1461b45b5a8c76821c33ea49c3ac192c1b36" + integrity sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag== + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.2.0" + url-parse "^1.5.3" + +tr46@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" + integrity sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA== + dependencies: + punycode "^2.1.0" + +tr46@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9" + integrity sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA== + dependencies: + punycode "^2.1.1" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + +ts-jest@29.1.1: + version "29.1.1" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.1.tgz#f58fe62c63caf7bfcc5cc6472082f79180f0815b" + integrity sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA== + dependencies: + bs-logger "0.x" + fast-json-stable-stringify "2.x" + jest-util "^29.0.0" + json5 "^2.2.3" + lodash.memoize "4.x" + make-error "1.x" + semver "^7.5.3" + yargs-parser "^21.0.1" + +type-detect@4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +typescript@4.6.4: + version "4.6.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9" + integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== + +undici-types@~6.19.2: + version "6.19.8" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" + integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== + +universalify@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" + integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== + +update-browserslist-db@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz#7ca61c0d8650766090728046e416a8cde682859e" + integrity sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ== + dependencies: + escalade "^3.1.2" + picocolors "^1.0.1" + +url-join@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.1.tgz#b642e21a2646808ffa178c4c5fda39844e12cde7" + integrity sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA== + +url-parse@^1.5.3: + version "1.5.10" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" + integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== + dependencies: + querystringify "^2.1.1" + requires-port "^1.0.0" + +v8-to-istanbul@^9.0.1: + version "9.3.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175" + integrity sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA== + dependencies: + "@jridgewell/trace-mapping" "^0.3.12" + "@types/istanbul-lib-coverage" "^2.0.1" + convert-source-map "^2.0.0" + +w3c-xmlserializer@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz#aebdc84920d806222936e3cdce408e32488a3073" + integrity sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw== + dependencies: + xml-name-validator "^4.0.0" + +walker@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" + integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== + dependencies: + makeerror "1.0.12" + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +webidl-conversions@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== + +webidl-conversions@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" + integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== + +whatwg-encoding@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz#e7635f597fd87020858626805a2729fa7698ac53" + integrity sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg== + dependencies: + iconv-lite "0.6.3" + +whatwg-mimetype@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz#5fa1a7623867ff1af6ca3dc72ad6b8a4208beba7" + integrity sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q== + +whatwg-url@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-11.0.0.tgz#0a849eebb5faf2119b901bb76fd795c2848d4018" + integrity sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ== + dependencies: + tr46 "^3.0.0" + webidl-conversions "^7.0.0" + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +whatwg-url@^6.5.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8" + integrity sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ== + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +write-file-atomic@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" + integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== + dependencies: + imurmurhash "^0.1.4" + signal-exit "^3.0.7" + +ws@^8.11.0: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== + +xml-name-validator@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835" + integrity sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw== + +xmlchars@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" + integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yargs-parser@^21.0.1, yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@^17.3.1: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==