@thera-hr/api-sdk 0.0.1503 → 0.0.1520
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +3 -3
- package/Client.js +4 -5
- package/api/resources/api/client/Client.d.ts +3 -3
- package/api/resources/api/client/Client.js +8 -9
- package/api/resources/api/resources/services/client/Client.d.ts +3 -3
- package/api/resources/api/resources/services/client/Client.js +4 -5
- package/api/resources/api/resources/services/resources/file/client/Client.d.ts +3 -3
- package/api/resources/api/resources/services/resources/file/client/Client.js +167 -149
- package/api/resources/api/resources/test/client/Client.d.ts +3 -3
- package/api/resources/api/resources/test/client/Client.js +4 -5
- package/api/resources/api/resources/test/resources/invoices/client/Client.d.ts +3 -3
- package/api/resources/api/resources/test/resources/invoices/client/Client.js +60 -48
- package/api/resources/api/resources/thera/client/Client.d.ts +3 -3
- package/api/resources/api/resources/thera/client/Client.js +10 -11
- package/api/resources/api/resources/thera/resources/bank/client/Client.d.ts +3 -3
- package/api/resources/api/resources/thera/resources/bank/client/Client.js +4 -5
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.d.ts +3 -3
- package/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +168 -150
- package/api/resources/api/resources/thera/resources/company/client/Client.d.ts +3 -3
- package/api/resources/api/resources/thera/resources/company/client/Client.js +6 -7
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.d.ts +4 -4
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +66 -49
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/types/InviteContractorResponse.d.ts +8 -0
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/types/index.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/types/index.js +1 -0
- package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.d.ts +3 -3
- package/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +55 -43
- package/api/resources/api/resources/thera/resources/disbursement/client/Client.d.ts +3 -3
- package/api/resources/api/resources/thera/resources/disbursement/client/Client.js +4 -5
- package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.d.ts +3 -3
- package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +57 -45
- package/api/resources/api/resources/thera/resources/payroll/client/Client.d.ts +3 -3
- package/api/resources/api/resources/thera/resources/payroll/client/Client.js +4 -5
- package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.d.ts +3 -3
- package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +57 -45
- package/api/resources/db/resources/user/types/ComplianceDocumentType.d.ts +3 -1
- package/api/resources/db/resources/user/types/ComplianceDocumentType.js +2 -0
- package/api/resources/db/resources/user/types/EmployeeInformation.d.ts +3 -2
- package/api/resources/db/resources/user/types/{FernUser.d.ts → User.d.ts} +1 -1
- package/api/resources/db/resources/user/types/index.d.ts +1 -2
- package/api/resources/db/resources/user/types/index.js +1 -2
- package/core/fetcher/Fetcher.d.ts +5 -4
- package/core/fetcher/Fetcher.js +82 -66
- package/core/fetcher/Supplier.js +11 -2
- package/core/fetcher/index.d.ts +3 -2
- package/core/index.d.ts +1 -1
- package/core/index.js +1 -1
- package/core/schemas/builders/date/date.js +1 -4
- package/core/schemas/builders/lazy/index.d.ts +2 -1
- package/core/schemas/builders/lazy/lazy.js +21 -13
- package/core/schemas/builders/lazy/lazyObject.js +11 -11
- package/core/schemas/builders/list/list.js +51 -41
- package/core/schemas/builders/object/index.d.ts +3 -2
- package/core/schemas/builders/object/object.js +148 -140
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +17 -17
- package/core/schemas/builders/object-like/index.d.ts +1 -1
- package/core/schemas/builders/record/index.d.ts +1 -1
- package/core/schemas/builders/record/record.js +80 -75
- package/core/schemas/builders/schema-utils/JsonError.js +0 -1
- package/core/schemas/builders/schema-utils/ParseError.js +0 -1
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +23 -20
- package/core/schemas/builders/schema-utils/index.d.ts +2 -1
- package/core/schemas/builders/set/set.js +18 -11
- package/core/schemas/builders/undiscriminated-union/index.d.ts +1 -1
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +34 -26
- package/core/schemas/builders/union/index.d.ts +3 -2
- package/core/schemas/builders/union/union.js +93 -75
- package/core/schemas/index.d.ts +1 -1
- package/core/schemas/utils/createIdentitySchemaCreator.js +1 -4
- package/core/schemas/utils/maybeSkipValidation.js +14 -9
- package/dist/Client.d.ts +3 -3
- package/dist/Client.js +4 -5
- package/dist/api/resources/api/client/Client.d.ts +3 -3
- package/dist/api/resources/api/client/Client.js +8 -9
- package/dist/api/resources/api/resources/services/client/Client.d.ts +3 -3
- package/dist/api/resources/api/resources/services/client/Client.js +4 -5
- package/dist/api/resources/api/resources/services/resources/file/client/Client.d.ts +3 -3
- package/dist/api/resources/api/resources/services/resources/file/client/Client.js +167 -149
- package/dist/api/resources/api/resources/test/client/Client.d.ts +3 -3
- package/dist/api/resources/api/resources/test/client/Client.js +4 -5
- package/dist/api/resources/api/resources/test/resources/invoices/client/Client.d.ts +3 -3
- package/dist/api/resources/api/resources/test/resources/invoices/client/Client.js +60 -48
- package/dist/api/resources/api/resources/thera/client/Client.d.ts +3 -3
- package/dist/api/resources/api/resources/thera/client/Client.js +10 -11
- package/dist/api/resources/api/resources/thera/resources/bank/client/Client.d.ts +3 -3
- package/dist/api/resources/api/resources/thera/resources/bank/client/Client.js +4 -5
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.d.ts +3 -3
- package/dist/api/resources/api/resources/thera/resources/bank/resources/bankApi/client/Client.js +168 -150
- package/dist/api/resources/api/resources/thera/resources/company/client/Client.d.ts +3 -3
- package/dist/api/resources/api/resources/thera/resources/company/client/Client.js +6 -7
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.d.ts +4 -4
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +66 -49
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/types/InviteContractorResponse.d.ts +8 -0
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/types/index.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/types/index.js +1 -0
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.d.ts +3 -3
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/client/Client.js +55 -43
- package/dist/api/resources/api/resources/thera/resources/disbursement/client/Client.d.ts +3 -3
- package/dist/api/resources/api/resources/thera/resources/disbursement/client/Client.js +4 -5
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.d.ts +3 -3
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +57 -45
- package/dist/api/resources/api/resources/thera/resources/payroll/client/Client.d.ts +3 -3
- package/dist/api/resources/api/resources/thera/resources/payroll/client/Client.js +4 -5
- package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.d.ts +3 -3
- package/dist/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.js +57 -45
- package/dist/api/resources/db/resources/user/types/ComplianceDocumentType.d.ts +3 -1
- package/dist/api/resources/db/resources/user/types/ComplianceDocumentType.js +2 -0
- package/dist/api/resources/db/resources/user/types/EmployeeInformation.d.ts +3 -2
- package/dist/api/resources/db/resources/user/types/{FernUser.d.ts → User.d.ts} +1 -1
- package/dist/api/resources/db/resources/user/types/index.d.ts +1 -2
- package/dist/api/resources/db/resources/user/types/index.js +1 -2
- package/dist/core/fetcher/Fetcher.d.ts +5 -4
- package/dist/core/fetcher/Fetcher.js +82 -66
- package/dist/core/fetcher/Supplier.js +11 -2
- package/dist/core/fetcher/index.d.ts +3 -2
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/schemas/builders/date/date.js +1 -4
- package/dist/core/schemas/builders/lazy/index.d.ts +2 -1
- package/dist/core/schemas/builders/lazy/lazy.js +21 -13
- package/dist/core/schemas/builders/lazy/lazyObject.js +11 -11
- package/dist/core/schemas/builders/list/list.js +51 -41
- package/dist/core/schemas/builders/object/index.d.ts +3 -2
- package/dist/core/schemas/builders/object/object.js +148 -140
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +17 -17
- package/dist/core/schemas/builders/object-like/index.d.ts +1 -1
- package/dist/core/schemas/builders/record/index.d.ts +1 -1
- package/dist/core/schemas/builders/record/record.js +80 -75
- package/dist/core/schemas/builders/schema-utils/JsonError.js +0 -1
- package/dist/core/schemas/builders/schema-utils/ParseError.js +0 -1
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +23 -20
- package/dist/core/schemas/builders/schema-utils/index.d.ts +2 -1
- package/dist/core/schemas/builders/set/set.js +18 -11
- package/dist/core/schemas/builders/undiscriminated-union/index.d.ts +1 -1
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +34 -26
- package/dist/core/schemas/builders/union/index.d.ts +3 -2
- package/dist/core/schemas/builders/union/union.js +93 -75
- package/dist/core/schemas/index.d.ts +1 -1
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +1 -4
- package/dist/core/schemas/utils/maybeSkipValidation.js +14 -9
- package/dist/errors/TheraApiError.js +14 -3
- package/dist/serialization/resources/api/resources/request/resources/thera/resources/disbursement/types/CreateDisbursementDetail.js +11 -2
- package/dist/serialization/resources/api/resources/request/resources/thera/resources/disbursement/types/CreateDisbursementRequest.js +10 -1
- package/dist/serialization/resources/api/resources/request/resources/thera/resources/document/types/CreateDocumentDetail.js +10 -1
- package/dist/serialization/resources/api/resources/request/resources/thera/resources/document/types/CreateDocumentRequest.js +10 -1
- package/dist/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/deduction/types/AdditionalFields.js +10 -1
- package/dist/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/deduction/types/Deduction.js +13 -4
- package/dist/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/deduction/types/EmployeeContribution.js +10 -1
- package/dist/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/deduction/types/EmployerContribution.js +10 -1
- package/dist/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/employee/types/Disbursement.js +10 -1
- package/dist/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/employee/types/EmployeeCheck.js +14 -5
- package/dist/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/reportingPeriod/types/ReportingPeriod.js +10 -1
- package/dist/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/shift/types/Shift.js +12 -3
- package/dist/serialization/resources/api/resources/request/resources/zeal/resources/deduction/resources/create/types/CreateDeduction.js +10 -1
- package/dist/serialization/resources/api/resources/request/resources/zeal/resources/deduction/resources/create/types/CreateDeductionDetails.js +11 -2
- package/dist/serialization/resources/api/resources/request/resources/zeal/resources/employee/resources/employee/types/ZealEmployee.js +10 -1
- package/dist/serialization/resources/api/resources/test/resources/invoices/types/DemoFernInvoice.js +11 -2
- package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateContractor.js +10 -1
- package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateEmployment.js +15 -6
- package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateMilestoneDetails.js +10 -1
- package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/InviteContractorRequest.js +11 -2
- package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/InviteContractorResponse.d.ts +13 -0
- package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/InviteContractorResponse.js +43 -0
- package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/index.d.ts +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/index.js +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/types/OnboardW2PayrollRequest.js +11 -2
- package/dist/serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/types/InvoiceWebhookEvent.js +10 -1
- package/dist/serialization/resources/api/resources/zeal/resources/company/resources/create/types/ZealCreateCompanyResponse.js +10 -1
- package/dist/serialization/resources/db/resources/document/types/FernDocument.js +11 -2
- package/dist/serialization/resources/db/resources/document/types/FernRecipient.js +10 -1
- package/dist/serialization/resources/db/resources/employment/types/Earning.js +10 -1
- package/dist/serialization/resources/db/resources/employment/types/Employment.js +19 -10
- package/dist/serialization/resources/db/resources/employment/types/EmploymentDocuments.js +10 -1
- package/dist/serialization/resources/db/resources/employment/types/EmploymentW2PayrollDetails.js +10 -1
- package/dist/serialization/resources/db/resources/employment/types/EorDetails.js +10 -1
- package/dist/serialization/resources/db/resources/employment/types/Frequency.js +10 -1
- package/dist/serialization/resources/db/resources/employment/types/Milestone.js +10 -1
- package/dist/serialization/resources/db/resources/employment/types/MilestoneDetails.js +10 -1
- package/dist/serialization/resources/db/resources/employment/types/ModifyRecurrencesRequest.js +10 -1
- package/dist/serialization/resources/db/resources/employment/types/Recurrence.js +11 -2
- package/dist/serialization/resources/db/resources/employment/types/RecurrenceDetails.js +11 -2
- package/dist/serialization/resources/db/resources/employment/types/RecurrenceModifications.js +11 -2
- package/dist/serialization/resources/db/resources/payment/resources/invoice/types/FernInvoice.js +11 -2
- package/dist/serialization/resources/db/resources/user/types/ComplianceDocument.js +10 -1
- package/dist/serialization/resources/db/resources/user/types/ComplianceDocumentType.d.ts +1 -1
- package/dist/serialization/resources/db/resources/user/types/ComplianceDocumentType.js +10 -1
- package/dist/serialization/resources/db/resources/user/types/ComplianceInformation.js +10 -1
- package/dist/serialization/resources/db/resources/user/types/EmployeeInformation.d.ts +3 -2
- package/dist/serialization/resources/db/resources/user/types/EmployeeInformation.js +13 -3
- package/{serialization/resources/db/resources/user/types/FernUser.d.ts → dist/serialization/resources/db/resources/user/types/User.d.ts} +2 -2
- package/dist/serialization/resources/db/resources/user/types/{FernUser.js → User.js} +12 -3
- package/dist/serialization/resources/db/resources/user/types/index.d.ts +1 -2
- package/dist/serialization/resources/db/resources/user/types/index.js +1 -2
- package/dist/serialization/resources/model/resources/thera/resources/employment/types/BiWeeklyPayCycleEnd.js +10 -1
- package/dist/serialization/resources/model/resources/thera/resources/employment/types/MonthlyPayCycleEnd.js +11 -2
- package/dist/serialization/resources/model/resources/thera/resources/employment/types/PayCycle.js +10 -1
- package/dist/serialization/resources/model/resources/thera/resources/employment/types/PayCycleEnd.js +13 -4
- package/dist/serialization/resources/model/resources/thera/resources/employment/types/SemiMonthlyPayCycleEnd.js +10 -1
- package/dist/serialization/resources/model/resources/thera/resources/employment/types/WeeklyPayCycleEnd.js +10 -1
- package/errors/TheraApiError.js +14 -3
- package/package.json +3 -3
- package/serialization/resources/api/resources/request/resources/thera/resources/disbursement/types/CreateDisbursementDetail.js +11 -2
- package/serialization/resources/api/resources/request/resources/thera/resources/disbursement/types/CreateDisbursementRequest.js +10 -1
- package/serialization/resources/api/resources/request/resources/thera/resources/document/types/CreateDocumentDetail.js +10 -1
- package/serialization/resources/api/resources/request/resources/thera/resources/document/types/CreateDocumentRequest.js +10 -1
- package/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/deduction/types/AdditionalFields.js +10 -1
- package/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/deduction/types/Deduction.js +13 -4
- package/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/deduction/types/EmployeeContribution.js +10 -1
- package/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/deduction/types/EmployerContribution.js +10 -1
- package/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/employee/types/Disbursement.js +10 -1
- package/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/employee/types/EmployeeCheck.js +14 -5
- package/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/reportingPeriod/types/ReportingPeriod.js +10 -1
- package/serialization/resources/api/resources/request/resources/zeal/resources/check/resources/shift/types/Shift.js +12 -3
- package/serialization/resources/api/resources/request/resources/zeal/resources/deduction/resources/create/types/CreateDeduction.js +10 -1
- package/serialization/resources/api/resources/request/resources/zeal/resources/deduction/resources/create/types/CreateDeductionDetails.js +11 -2
- package/serialization/resources/api/resources/request/resources/zeal/resources/employee/resources/employee/types/ZealEmployee.js +10 -1
- package/serialization/resources/api/resources/test/resources/invoices/types/DemoFernInvoice.js +11 -2
- package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateContractor.js +10 -1
- package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateEmployment.js +15 -6
- package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateMilestoneDetails.js +10 -1
- package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/InviteContractorRequest.js +11 -2
- package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/InviteContractorResponse.d.ts +13 -0
- package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/InviteContractorResponse.js +43 -0
- package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/index.d.ts +1 -0
- package/serialization/resources/api/resources/thera/resources/company/resources/companyApi/types/index.js +1 -0
- package/serialization/resources/api/resources/thera/resources/company/resources/companyW2PayrollApi/types/OnboardW2PayrollRequest.js +11 -2
- package/serialization/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/types/InvoiceWebhookEvent.js +10 -1
- package/serialization/resources/api/resources/zeal/resources/company/resources/create/types/ZealCreateCompanyResponse.js +10 -1
- package/serialization/resources/db/resources/document/types/FernDocument.js +11 -2
- package/serialization/resources/db/resources/document/types/FernRecipient.js +10 -1
- package/serialization/resources/db/resources/employment/types/Earning.js +10 -1
- package/serialization/resources/db/resources/employment/types/Employment.js +19 -10
- package/serialization/resources/db/resources/employment/types/EmploymentDocuments.js +10 -1
- package/serialization/resources/db/resources/employment/types/EmploymentW2PayrollDetails.js +10 -1
- package/serialization/resources/db/resources/employment/types/EorDetails.js +10 -1
- package/serialization/resources/db/resources/employment/types/Frequency.js +10 -1
- package/serialization/resources/db/resources/employment/types/Milestone.js +10 -1
- package/serialization/resources/db/resources/employment/types/MilestoneDetails.js +10 -1
- package/serialization/resources/db/resources/employment/types/ModifyRecurrencesRequest.js +10 -1
- package/serialization/resources/db/resources/employment/types/Recurrence.js +11 -2
- package/serialization/resources/db/resources/employment/types/RecurrenceDetails.js +11 -2
- package/serialization/resources/db/resources/employment/types/RecurrenceModifications.js +11 -2
- package/serialization/resources/db/resources/payment/resources/invoice/types/FernInvoice.js +11 -2
- package/serialization/resources/db/resources/user/types/ComplianceDocument.js +10 -1
- package/serialization/resources/db/resources/user/types/ComplianceDocumentType.d.ts +1 -1
- package/serialization/resources/db/resources/user/types/ComplianceDocumentType.js +10 -1
- package/serialization/resources/db/resources/user/types/ComplianceInformation.js +10 -1
- package/serialization/resources/db/resources/user/types/EmployeeInformation.d.ts +3 -2
- package/serialization/resources/db/resources/user/types/EmployeeInformation.js +13 -3
- package/{dist/serialization/resources/db/resources/user/types/FernUser.d.ts → serialization/resources/db/resources/user/types/User.d.ts} +2 -2
- package/serialization/resources/db/resources/user/types/{FernUser.js → User.js} +12 -3
- package/serialization/resources/db/resources/user/types/index.d.ts +1 -2
- package/serialization/resources/db/resources/user/types/index.js +1 -2
- package/serialization/resources/model/resources/thera/resources/employment/types/BiWeeklyPayCycleEnd.js +10 -1
- package/serialization/resources/model/resources/thera/resources/employment/types/MonthlyPayCycleEnd.js +11 -2
- package/serialization/resources/model/resources/thera/resources/employment/types/PayCycle.js +10 -1
- package/serialization/resources/model/resources/thera/resources/employment/types/PayCycleEnd.js +13 -4
- package/serialization/resources/model/resources/thera/resources/employment/types/SemiMonthlyPayCycleEnd.js +10 -1
- package/serialization/resources/model/resources/thera/resources/employment/types/WeeklyPayCycleEnd.js +10 -1
- package/api/resources/db/resources/user/types/EmployeeInformationAddress.d.ts +0 -11
- package/dist/api/resources/db/resources/user/types/EmployeeInformationAddress.d.ts +0 -11
- package/dist/serialization/resources/db/resources/user/types/EmployeeInformationAddress.d.ts +0 -17
- package/dist/serialization/resources/db/resources/user/types/EmployeeInformationAddress.js +0 -38
- package/serialization/resources/db/resources/user/types/EmployeeInformationAddress.d.ts +0 -17
- package/serialization/resources/db/resources/user/types/EmployeeInformationAddress.js +0 -38
- /package/api/resources/{db/resources/user/types/EmployeeInformationAddress.js → api/resources/thera/resources/company/resources/companyApi/types/InviteContractorResponse.js} +0 -0
- /package/api/resources/db/resources/user/types/{FernUser.js → User.js} +0 -0
- /package/dist/api/resources/{db/resources/user/types/EmployeeInformationAddress.js → api/resources/thera/resources/company/resources/companyApi/types/InviteContractorResponse.js} +0 -0
- /package/dist/api/resources/db/resources/user/types/{FernUser.js → User.js} +0 -0
package/Client.d.ts
CHANGED
|
@@ -5,13 +5,13 @@ import * as core from "./core";
|
|
|
5
5
|
import { Api } from "./api/resources/api/client/Client";
|
|
6
6
|
export declare namespace TheraApiClient {
|
|
7
7
|
interface Options {
|
|
8
|
-
environment: string
|
|
8
|
+
environment: core.Supplier<string>;
|
|
9
9
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
export declare class TheraApiClient {
|
|
13
|
-
protected readonly
|
|
14
|
-
constructor(
|
|
13
|
+
protected readonly _options: TheraApiClient.Options;
|
|
14
|
+
constructor(_options: TheraApiClient.Options);
|
|
15
15
|
protected _api: Api | undefined;
|
|
16
16
|
get api(): Api;
|
|
17
17
|
}
|
package/Client.js
CHANGED
|
@@ -6,13 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.TheraApiClient = void 0;
|
|
7
7
|
const Client_1 = require("./api/resources/api/client/Client");
|
|
8
8
|
class TheraApiClient {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
this.options = options;
|
|
9
|
+
constructor(_options) {
|
|
10
|
+
this._options = _options;
|
|
12
11
|
}
|
|
13
|
-
_api;
|
|
14
12
|
get api() {
|
|
15
|
-
|
|
13
|
+
var _a;
|
|
14
|
+
return ((_a = this._api) !== null && _a !== void 0 ? _a : (this._api = new Client_1.Api(this._options)));
|
|
16
15
|
}
|
|
17
16
|
}
|
|
18
17
|
exports.TheraApiClient = TheraApiClient;
|
|
@@ -7,13 +7,13 @@ import { Test } from "../resources/test/client/Client";
|
|
|
7
7
|
import { Thera } from "../resources/thera/client/Client";
|
|
8
8
|
export declare namespace Api {
|
|
9
9
|
interface Options {
|
|
10
|
-
environment: string
|
|
10
|
+
environment: core.Supplier<string>;
|
|
11
11
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
export declare class Api {
|
|
15
|
-
protected readonly
|
|
16
|
-
constructor(
|
|
15
|
+
protected readonly _options: Api.Options;
|
|
16
|
+
constructor(_options: Api.Options);
|
|
17
17
|
protected _services: Services | undefined;
|
|
18
18
|
get services(): Services;
|
|
19
19
|
protected _test: Test | undefined;
|
|
@@ -8,21 +8,20 @@ const Client_1 = require("../resources/services/client/Client");
|
|
|
8
8
|
const Client_2 = require("../resources/test/client/Client");
|
|
9
9
|
const Client_3 = require("../resources/thera/client/Client");
|
|
10
10
|
class Api {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
this.options = options;
|
|
11
|
+
constructor(_options) {
|
|
12
|
+
this._options = _options;
|
|
14
13
|
}
|
|
15
|
-
_services;
|
|
16
14
|
get services() {
|
|
17
|
-
|
|
15
|
+
var _a;
|
|
16
|
+
return ((_a = this._services) !== null && _a !== void 0 ? _a : (this._services = new Client_1.Services(this._options)));
|
|
18
17
|
}
|
|
19
|
-
_test;
|
|
20
18
|
get test() {
|
|
21
|
-
|
|
19
|
+
var _a;
|
|
20
|
+
return ((_a = this._test) !== null && _a !== void 0 ? _a : (this._test = new Client_2.Test(this._options)));
|
|
22
21
|
}
|
|
23
|
-
_thera;
|
|
24
22
|
get thera() {
|
|
25
|
-
|
|
23
|
+
var _a;
|
|
24
|
+
return ((_a = this._thera) !== null && _a !== void 0 ? _a : (this._thera = new Client_3.Thera(this._options)));
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
27
|
exports.Api = Api;
|
|
@@ -5,13 +5,13 @@ import * as core from "../../../../../../core";
|
|
|
5
5
|
import { File_ } from "../resources/file/client/Client";
|
|
6
6
|
export declare namespace Services {
|
|
7
7
|
interface Options {
|
|
8
|
-
environment: string
|
|
8
|
+
environment: core.Supplier<string>;
|
|
9
9
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
export declare class Services {
|
|
13
|
-
protected readonly
|
|
14
|
-
constructor(
|
|
13
|
+
protected readonly _options: Services.Options;
|
|
14
|
+
constructor(_options: Services.Options);
|
|
15
15
|
protected _file: File_ | undefined;
|
|
16
16
|
get file(): File_;
|
|
17
17
|
}
|
|
@@ -6,13 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Services = void 0;
|
|
7
7
|
const Client_1 = require("../resources/file/client/Client");
|
|
8
8
|
class Services {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
this.options = options;
|
|
9
|
+
constructor(_options) {
|
|
10
|
+
this._options = _options;
|
|
12
11
|
}
|
|
13
|
-
_file;
|
|
14
12
|
get file() {
|
|
15
|
-
|
|
13
|
+
var _a;
|
|
14
|
+
return ((_a = this._file) !== null && _a !== void 0 ? _a : (this._file = new Client_1.File_(this._options)));
|
|
16
15
|
}
|
|
17
16
|
}
|
|
18
17
|
exports.Services = Services;
|
|
@@ -5,13 +5,13 @@ import * as core from "../../../../../../../../core";
|
|
|
5
5
|
import * as TheraApi from "../../../../../../..";
|
|
6
6
|
export declare namespace File_ {
|
|
7
7
|
interface Options {
|
|
8
|
-
environment: string
|
|
8
|
+
environment: core.Supplier<string>;
|
|
9
9
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
export declare class File_ {
|
|
13
|
-
protected readonly
|
|
14
|
-
constructor(
|
|
13
|
+
protected readonly _options: File_.Options;
|
|
14
|
+
constructor(_options: File_.Options);
|
|
15
15
|
attachDocumentToEmployment(contractId: string, request: TheraApi.api.services.AttachDocumentToEmploymentRequest): Promise<void>;
|
|
16
16
|
deleteDocumentFromEmployment(contractId: string, s3Key: string, request: TheraApi.api.services.DeleteDocumentFromEmploymentRequest): Promise<void>;
|
|
17
17
|
loadGenericDocumentFromEmployment(contractId: string, s3Key: string): Promise<TheraApi.api.services.LoadGenericDocumentFromEmploymentResponse>;
|
|
@@ -25,6 +25,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
__setModuleDefault(result, mod);
|
|
26
26
|
return result;
|
|
27
27
|
};
|
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
28
37
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
38
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
39
|
};
|
|
@@ -35,176 +44,185 @@ const serializers = __importStar(require("../../../../../../../../serialization"
|
|
|
35
44
|
const url_join_1 = __importDefault(require("url-join"));
|
|
36
45
|
const errors = __importStar(require("../../../../../../../../errors"));
|
|
37
46
|
class File_ {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
this.options = options;
|
|
47
|
+
constructor(_options) {
|
|
48
|
+
this._options = _options;
|
|
41
49
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
if (_response.ok) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
if (_response.error.reason === "status-code") {
|
|
62
|
-
throw new errors.TheraApiError({
|
|
63
|
-
statusCode: _response.error.statusCode,
|
|
64
|
-
body: _response.error.body,
|
|
50
|
+
attachDocumentToEmployment(contractId, request) {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
const _response = yield core.fetcher({
|
|
53
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/contracts/${contractId}/generic-document`),
|
|
54
|
+
method: "POST",
|
|
55
|
+
headers: {
|
|
56
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
57
|
+
"X-Fern-Language": "JavaScript",
|
|
58
|
+
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
59
|
+
"X-Fern-SDK-Version": "0.0.1520",
|
|
60
|
+
},
|
|
61
|
+
contentType: "application/json",
|
|
62
|
+
body: yield serializers.api.services.AttachDocumentToEmploymentRequest.jsonOrThrow(request, {
|
|
63
|
+
unrecognizedObjectKeys: "strip",
|
|
64
|
+
}),
|
|
65
|
+
timeoutMs: 60000,
|
|
65
66
|
});
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
if (_response.ok) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (_response.error.reason === "status-code") {
|
|
69
71
|
throw new errors.TheraApiError({
|
|
70
72
|
statusCode: _response.error.statusCode,
|
|
71
|
-
body: _response.error.
|
|
72
|
-
});
|
|
73
|
-
case "timeout":
|
|
74
|
-
throw new errors.TheraApiTimeoutError();
|
|
75
|
-
case "unknown":
|
|
76
|
-
throw new errors.TheraApiError({
|
|
77
|
-
message: _response.error.errorMessage,
|
|
73
|
+
body: _response.error.body,
|
|
78
74
|
});
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
unrecognizedObjectKeys: "strip",
|
|
94
|
-
}),
|
|
95
|
-
timeoutMs: 60000,
|
|
75
|
+
}
|
|
76
|
+
switch (_response.error.reason) {
|
|
77
|
+
case "non-json":
|
|
78
|
+
throw new errors.TheraApiError({
|
|
79
|
+
statusCode: _response.error.statusCode,
|
|
80
|
+
body: _response.error.rawBody,
|
|
81
|
+
});
|
|
82
|
+
case "timeout":
|
|
83
|
+
throw new errors.TheraApiTimeoutError();
|
|
84
|
+
case "unknown":
|
|
85
|
+
throw new errors.TheraApiError({
|
|
86
|
+
message: _response.error.errorMessage,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
96
89
|
});
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
90
|
+
}
|
|
91
|
+
deleteDocumentFromEmployment(contractId, s3Key, request) {
|
|
92
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
+
const _response = yield core.fetcher({
|
|
94
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/contracts/${contractId}/generic-document/${s3Key}`),
|
|
95
|
+
method: "DELETE",
|
|
96
|
+
headers: {
|
|
97
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
98
|
+
"X-Fern-Language": "JavaScript",
|
|
99
|
+
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
100
|
+
"X-Fern-SDK-Version": "0.0.1520",
|
|
101
|
+
},
|
|
102
|
+
contentType: "application/json",
|
|
103
|
+
body: yield serializers.api.services.DeleteDocumentFromEmploymentRequest.jsonOrThrow(request, {
|
|
104
|
+
unrecognizedObjectKeys: "strip",
|
|
105
|
+
}),
|
|
106
|
+
timeoutMs: 60000,
|
|
104
107
|
});
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
+
if (_response.ok) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if (_response.error.reason === "status-code") {
|
|
108
112
|
throw new errors.TheraApiError({
|
|
109
113
|
statusCode: _response.error.statusCode,
|
|
110
|
-
body: _response.error.
|
|
114
|
+
body: _response.error.body,
|
|
111
115
|
});
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
"X-Fern-Language": "JavaScript",
|
|
127
|
-
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
128
|
-
"X-Fern-SDK-Version": "0.0.1503",
|
|
129
|
-
},
|
|
130
|
-
contentType: "application/json",
|
|
131
|
-
timeoutMs: 60000,
|
|
116
|
+
}
|
|
117
|
+
switch (_response.error.reason) {
|
|
118
|
+
case "non-json":
|
|
119
|
+
throw new errors.TheraApiError({
|
|
120
|
+
statusCode: _response.error.statusCode,
|
|
121
|
+
body: _response.error.rawBody,
|
|
122
|
+
});
|
|
123
|
+
case "timeout":
|
|
124
|
+
throw new errors.TheraApiTimeoutError();
|
|
125
|
+
case "unknown":
|
|
126
|
+
throw new errors.TheraApiError({
|
|
127
|
+
message: _response.error.errorMessage,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
132
130
|
});
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
131
|
+
}
|
|
132
|
+
loadGenericDocumentFromEmployment(contractId, s3Key) {
|
|
133
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
134
|
+
const _response = yield core.fetcher({
|
|
135
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/contracts/${contractId}/generic-document/${s3Key}/file-url`),
|
|
136
|
+
method: "GET",
|
|
137
|
+
headers: {
|
|
138
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
139
|
+
"X-Fern-Language": "JavaScript",
|
|
140
|
+
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
141
|
+
"X-Fern-SDK-Version": "0.0.1520",
|
|
142
|
+
},
|
|
143
|
+
contentType: "application/json",
|
|
144
|
+
timeoutMs: 60000,
|
|
145
145
|
});
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
146
|
+
if (_response.ok) {
|
|
147
|
+
return yield serializers.api.services.LoadGenericDocumentFromEmploymentResponse.parseOrThrow(_response.body, {
|
|
148
|
+
unrecognizedObjectKeys: "passthrough",
|
|
149
|
+
allowUnrecognizedUnionMembers: true,
|
|
150
|
+
allowUnrecognizedEnumValues: true,
|
|
151
|
+
breadcrumbsPrefix: ["response"],
|
|
152
152
|
});
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
case "unknown":
|
|
153
|
+
}
|
|
154
|
+
if (_response.error.reason === "status-code") {
|
|
156
155
|
throw new errors.TheraApiError({
|
|
157
|
-
|
|
156
|
+
statusCode: _response.error.statusCode,
|
|
157
|
+
body: _response.error.body,
|
|
158
158
|
});
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
"
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
159
|
+
}
|
|
160
|
+
switch (_response.error.reason) {
|
|
161
|
+
case "non-json":
|
|
162
|
+
throw new errors.TheraApiError({
|
|
163
|
+
statusCode: _response.error.statusCode,
|
|
164
|
+
body: _response.error.rawBody,
|
|
165
|
+
});
|
|
166
|
+
case "timeout":
|
|
167
|
+
throw new errors.TheraApiTimeoutError();
|
|
168
|
+
case "unknown":
|
|
169
|
+
throw new errors.TheraApiError({
|
|
170
|
+
message: _response.error.errorMessage,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
173
|
});
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
174
|
+
}
|
|
175
|
+
loadPayslipFromEorEmployment(contractId, s3Key) {
|
|
176
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
177
|
+
const _response = yield core.fetcher({
|
|
178
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/contracts/eor/${contractId}/payslips/${s3Key}/fileUrl`),
|
|
179
|
+
method: "GET",
|
|
180
|
+
headers: {
|
|
181
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
182
|
+
"X-Fern-Language": "JavaScript",
|
|
183
|
+
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
184
|
+
"X-Fern-SDK-Version": "0.0.1520",
|
|
185
|
+
},
|
|
186
|
+
contentType: "application/json",
|
|
187
|
+
timeoutMs: 60000,
|
|
186
188
|
});
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
189
|
+
if (_response.ok) {
|
|
190
|
+
return yield serializers.api.services.LoadPayslipForEorEmployeeResponse.parseOrThrow(_response.body, {
|
|
191
|
+
unrecognizedObjectKeys: "passthrough",
|
|
192
|
+
allowUnrecognizedUnionMembers: true,
|
|
193
|
+
allowUnrecognizedEnumValues: true,
|
|
194
|
+
breadcrumbsPrefix: ["response"],
|
|
193
195
|
});
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
case "unknown":
|
|
196
|
+
}
|
|
197
|
+
if (_response.error.reason === "status-code") {
|
|
197
198
|
throw new errors.TheraApiError({
|
|
198
|
-
|
|
199
|
+
statusCode: _response.error.statusCode,
|
|
200
|
+
body: _response.error.body,
|
|
199
201
|
});
|
|
200
|
-
|
|
202
|
+
}
|
|
203
|
+
switch (_response.error.reason) {
|
|
204
|
+
case "non-json":
|
|
205
|
+
throw new errors.TheraApiError({
|
|
206
|
+
statusCode: _response.error.statusCode,
|
|
207
|
+
body: _response.error.rawBody,
|
|
208
|
+
});
|
|
209
|
+
case "timeout":
|
|
210
|
+
throw new errors.TheraApiTimeoutError();
|
|
211
|
+
case "unknown":
|
|
212
|
+
throw new errors.TheraApiError({
|
|
213
|
+
message: _response.error.errorMessage,
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
});
|
|
201
217
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
218
|
+
_getAuthorizationHeader() {
|
|
219
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
220
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
221
|
+
if (bearer != null) {
|
|
222
|
+
return `Bearer ${bearer}`;
|
|
223
|
+
}
|
|
224
|
+
return undefined;
|
|
225
|
+
});
|
|
208
226
|
}
|
|
209
227
|
}
|
|
210
228
|
exports.File_ = File_;
|
|
@@ -5,13 +5,13 @@ import * as core from "../../../../../../core";
|
|
|
5
5
|
import { Invoices } from "../resources/invoices/client/Client";
|
|
6
6
|
export declare namespace Test {
|
|
7
7
|
interface Options {
|
|
8
|
-
environment: string
|
|
8
|
+
environment: core.Supplier<string>;
|
|
9
9
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
export declare class Test {
|
|
13
|
-
protected readonly
|
|
14
|
-
constructor(
|
|
13
|
+
protected readonly _options: Test.Options;
|
|
14
|
+
constructor(_options: Test.Options);
|
|
15
15
|
protected _invoices: Invoices | undefined;
|
|
16
16
|
get invoices(): Invoices;
|
|
17
17
|
}
|
|
@@ -6,13 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Test = void 0;
|
|
7
7
|
const Client_1 = require("../resources/invoices/client/Client");
|
|
8
8
|
class Test {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
this.options = options;
|
|
9
|
+
constructor(_options) {
|
|
10
|
+
this._options = _options;
|
|
12
11
|
}
|
|
13
|
-
_invoices;
|
|
14
12
|
get invoices() {
|
|
15
|
-
|
|
13
|
+
var _a;
|
|
14
|
+
return ((_a = this._invoices) !== null && _a !== void 0 ? _a : (this._invoices = new Client_1.Invoices(this._options)));
|
|
16
15
|
}
|
|
17
16
|
}
|
|
18
17
|
exports.Test = Test;
|
|
@@ -5,13 +5,13 @@ import * as core from "../../../../../../../../core";
|
|
|
5
5
|
import * as TheraApi from "../../../../../../..";
|
|
6
6
|
export declare namespace Invoices {
|
|
7
7
|
interface Options {
|
|
8
|
-
environment: string
|
|
8
|
+
environment: core.Supplier<string>;
|
|
9
9
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
export declare class Invoices {
|
|
13
|
-
protected readonly
|
|
14
|
-
constructor(
|
|
13
|
+
protected readonly _options: Invoices.Options;
|
|
14
|
+
constructor(_options: Invoices.Options);
|
|
15
15
|
voidInvoice(invoiceId: TheraApi.api.test.DemoFernInvoiceId, request: TheraApi.api.test.VoidInvoiceRequest): Promise<TheraApi.api.test.DemoFernInvoice>;
|
|
16
16
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
17
17
|
}
|