@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/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.d.ts
CHANGED
|
@@ -5,16 +5,16 @@ import * as core from "../../../../../../../../../../core";
|
|
|
5
5
|
import * as TheraApi from "../../../../../../../../..";
|
|
6
6
|
export declare namespace CompanyApi {
|
|
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 CompanyApi {
|
|
13
|
-
protected readonly
|
|
14
|
-
constructor(
|
|
13
|
+
protected readonly _options: CompanyApi.Options;
|
|
14
|
+
constructor(_options: CompanyApi.Options);
|
|
15
15
|
/**
|
|
16
16
|
* Invite Contractor or Create Contract
|
|
17
17
|
*/
|
|
18
|
-
inviteContractor(request: TheraApi.api.thera.company.InviteContractorReq): Promise<
|
|
18
|
+
inviteContractor(request: TheraApi.api.thera.company.InviteContractorReq): Promise<TheraApi.api.thera.company.InviteContractorResponse>;
|
|
19
19
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
20
20
|
}
|
package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js
CHANGED
|
@@ -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
|
};
|
|
@@ -36,64 +45,72 @@ const serializers = __importStar(require("../../../../../../../../../../serializ
|
|
|
36
45
|
const url_join_1 = __importDefault(require("url-join"));
|
|
37
46
|
const errors = __importStar(require("../../../../../../../../../../errors"));
|
|
38
47
|
class CompanyApi {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
this.options = options;
|
|
48
|
+
constructor(_options) {
|
|
49
|
+
this._options = _options;
|
|
42
50
|
}
|
|
43
51
|
/**
|
|
44
52
|
* Invite Contractor or Create Contract
|
|
45
53
|
*/
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if (_response.ok) {
|
|
69
|
-
return _response.body;
|
|
70
|
-
}
|
|
71
|
-
if (_response.error.reason === "status-code") {
|
|
72
|
-
throw new errors.TheraApiError({
|
|
73
|
-
statusCode: _response.error.statusCode,
|
|
74
|
-
body: _response.error.body,
|
|
54
|
+
inviteContractor(request) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
const { skipEmail, body: _body } = request;
|
|
57
|
+
const _queryParams = new url_search_params_1.default();
|
|
58
|
+
if (skipEmail != null) {
|
|
59
|
+
_queryParams.append("skipEmail", skipEmail.toString());
|
|
60
|
+
}
|
|
61
|
+
const _response = yield core.fetcher({
|
|
62
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "companies/employees"),
|
|
63
|
+
method: "POST",
|
|
64
|
+
headers: {
|
|
65
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
66
|
+
"X-Fern-Language": "JavaScript",
|
|
67
|
+
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
68
|
+
"X-Fern-SDK-Version": "0.0.1520",
|
|
69
|
+
},
|
|
70
|
+
contentType: "application/json",
|
|
71
|
+
queryParameters: _queryParams,
|
|
72
|
+
body: yield serializers.api.thera.company.InviteContractorRequest.jsonOrThrow(_body, {
|
|
73
|
+
unrecognizedObjectKeys: "strip",
|
|
74
|
+
}),
|
|
75
|
+
timeoutMs: 60000,
|
|
75
76
|
});
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
if (_response.ok) {
|
|
78
|
+
return yield serializers.api.thera.company.InviteContractorResponse.parseOrThrow(_response.body, {
|
|
79
|
+
unrecognizedObjectKeys: "passthrough",
|
|
80
|
+
allowUnrecognizedUnionMembers: true,
|
|
81
|
+
allowUnrecognizedEnumValues: true,
|
|
82
|
+
breadcrumbsPrefix: ["response"],
|
|
82
83
|
});
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
case "unknown":
|
|
84
|
+
}
|
|
85
|
+
if (_response.error.reason === "status-code") {
|
|
86
86
|
throw new errors.TheraApiError({
|
|
87
|
-
|
|
87
|
+
statusCode: _response.error.statusCode,
|
|
88
|
+
body: _response.error.body,
|
|
88
89
|
});
|
|
89
|
-
|
|
90
|
+
}
|
|
91
|
+
switch (_response.error.reason) {
|
|
92
|
+
case "non-json":
|
|
93
|
+
throw new errors.TheraApiError({
|
|
94
|
+
statusCode: _response.error.statusCode,
|
|
95
|
+
body: _response.error.rawBody,
|
|
96
|
+
});
|
|
97
|
+
case "timeout":
|
|
98
|
+
throw new errors.TheraApiTimeoutError();
|
|
99
|
+
case "unknown":
|
|
100
|
+
throw new errors.TheraApiError({
|
|
101
|
+
message: _response.error.errorMessage,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
});
|
|
90
105
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
106
|
+
_getAuthorizationHeader() {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
109
|
+
if (bearer != null) {
|
|
110
|
+
return `Bearer ${bearer}`;
|
|
111
|
+
}
|
|
112
|
+
return undefined;
|
|
113
|
+
});
|
|
97
114
|
}
|
|
98
115
|
}
|
|
99
116
|
exports.CompanyApi = CompanyApi;
|
package/api/resources/api/resources/thera/resources/company/resources/companyApi/types/index.js
CHANGED
|
@@ -20,4 +20,5 @@ __exportStar(require("./CreateEmployeeInformation"), exports);
|
|
|
20
20
|
__exportStar(require("./CreateEmployment"), exports);
|
|
21
21
|
__exportStar(require("./CreateMilestoneDetails"), exports);
|
|
22
22
|
__exportStar(require("./CreateMilestone"), exports);
|
|
23
|
+
__exportStar(require("./InviteContractorResponse"), exports);
|
|
23
24
|
__exportStar(require("./CompanyPayFrequency"), exports);
|
|
@@ -5,13 +5,13 @@ import * as core from "../../../../../../../../../../core";
|
|
|
5
5
|
import * as TheraApi from "../../../../../../../../..";
|
|
6
6
|
export declare namespace CompanyW2PayrollApi {
|
|
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 CompanyW2PayrollApi {
|
|
13
|
-
protected readonly
|
|
14
|
-
constructor(
|
|
13
|
+
protected readonly _options: CompanyW2PayrollApi.Options;
|
|
14
|
+
constructor(_options: CompanyW2PayrollApi.Options);
|
|
15
15
|
/**
|
|
16
16
|
*
|
|
17
17
|
*/
|
|
@@ -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,58 +44,61 @@ const serializers = __importStar(require("../../../../../../../../../../serializ
|
|
|
35
44
|
const url_join_1 = __importDefault(require("url-join"));
|
|
36
45
|
const errors = __importStar(require("../../../../../../../../../../errors"));
|
|
37
46
|
class CompanyW2PayrollApi {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
this.options = options;
|
|
47
|
+
constructor(_options) {
|
|
48
|
+
this._options = _options;
|
|
41
49
|
}
|
|
42
50
|
/**
|
|
43
51
|
*
|
|
44
52
|
*/
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
if (_response.ok) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
if (_response.error.reason === "status-code") {
|
|
65
|
-
throw new errors.TheraApiError({
|
|
66
|
-
statusCode: _response.error.statusCode,
|
|
67
|
-
body: _response.error.body,
|
|
53
|
+
onboardW2Payroll(request) {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
const _response = yield core.fetcher({
|
|
56
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "company/w2Payroll"),
|
|
57
|
+
method: "POST",
|
|
58
|
+
headers: {
|
|
59
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
60
|
+
"X-Fern-Language": "JavaScript",
|
|
61
|
+
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
62
|
+
"X-Fern-SDK-Version": "0.0.1520",
|
|
63
|
+
},
|
|
64
|
+
contentType: "application/json",
|
|
65
|
+
body: yield serializers.api.thera.company.OnboardW2PayrollRequest.jsonOrThrow(request, {
|
|
66
|
+
unrecognizedObjectKeys: "strip",
|
|
67
|
+
}),
|
|
68
|
+
timeoutMs: 60000,
|
|
68
69
|
});
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
if (_response.ok) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (_response.error.reason === "status-code") {
|
|
72
74
|
throw new errors.TheraApiError({
|
|
73
75
|
statusCode: _response.error.statusCode,
|
|
74
|
-
body: _response.error.
|
|
75
|
-
});
|
|
76
|
-
case "timeout":
|
|
77
|
-
throw new errors.TheraApiTimeoutError();
|
|
78
|
-
case "unknown":
|
|
79
|
-
throw new errors.TheraApiError({
|
|
80
|
-
message: _response.error.errorMessage,
|
|
76
|
+
body: _response.error.body,
|
|
81
77
|
});
|
|
82
|
-
|
|
78
|
+
}
|
|
79
|
+
switch (_response.error.reason) {
|
|
80
|
+
case "non-json":
|
|
81
|
+
throw new errors.TheraApiError({
|
|
82
|
+
statusCode: _response.error.statusCode,
|
|
83
|
+
body: _response.error.rawBody,
|
|
84
|
+
});
|
|
85
|
+
case "timeout":
|
|
86
|
+
throw new errors.TheraApiTimeoutError();
|
|
87
|
+
case "unknown":
|
|
88
|
+
throw new errors.TheraApiError({
|
|
89
|
+
message: _response.error.errorMessage,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
});
|
|
83
93
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
94
|
+
_getAuthorizationHeader() {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
97
|
+
if (bearer != null) {
|
|
98
|
+
return `Bearer ${bearer}`;
|
|
99
|
+
}
|
|
100
|
+
return undefined;
|
|
101
|
+
});
|
|
90
102
|
}
|
|
91
103
|
}
|
|
92
104
|
exports.CompanyW2PayrollApi = CompanyW2PayrollApi;
|
|
@@ -5,13 +5,13 @@ import * as core from "../../../../../../../../core";
|
|
|
5
5
|
import { DisbursementWebhookApi } from "../resources/disbursementWebhookApi/client/Client";
|
|
6
6
|
export declare namespace Disbursement {
|
|
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 Disbursement {
|
|
13
|
-
protected readonly
|
|
14
|
-
constructor(
|
|
13
|
+
protected readonly _options: Disbursement.Options;
|
|
14
|
+
constructor(_options: Disbursement.Options);
|
|
15
15
|
protected _disbursementWebhookApi: DisbursementWebhookApi | undefined;
|
|
16
16
|
get disbursementWebhookApi(): DisbursementWebhookApi;
|
|
17
17
|
}
|
|
@@ -6,13 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Disbursement = void 0;
|
|
7
7
|
const Client_1 = require("../resources/disbursementWebhookApi/client/Client");
|
|
8
8
|
class Disbursement {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
this.options = options;
|
|
9
|
+
constructor(_options) {
|
|
10
|
+
this._options = _options;
|
|
12
11
|
}
|
|
13
|
-
_disbursementWebhookApi;
|
|
14
12
|
get disbursementWebhookApi() {
|
|
15
|
-
|
|
13
|
+
var _a;
|
|
14
|
+
return ((_a = this._disbursementWebhookApi) !== null && _a !== void 0 ? _a : (this._disbursementWebhookApi = new Client_1.DisbursementWebhookApi(this._options)));
|
|
16
15
|
}
|
|
17
16
|
}
|
|
18
17
|
exports.Disbursement = Disbursement;
|
|
@@ -5,13 +5,13 @@ import * as core from "../../../../../../../../../../core";
|
|
|
5
5
|
import * as TheraApi from "../../../../../../../../..";
|
|
6
6
|
export declare namespace DisbursementWebhookApi {
|
|
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 DisbursementWebhookApi {
|
|
13
|
-
protected readonly
|
|
14
|
-
constructor(
|
|
13
|
+
protected readonly _options: DisbursementWebhookApi.Options;
|
|
14
|
+
constructor(_options: DisbursementWebhookApi.Options);
|
|
15
15
|
/**
|
|
16
16
|
* IN DEVELOPMENT
|
|
17
17
|
*/
|
|
@@ -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,60 +44,63 @@ const serializers = __importStar(require("../../../../../../../../../../serializ
|
|
|
35
44
|
const url_join_1 = __importDefault(require("url-join"));
|
|
36
45
|
const errors = __importStar(require("../../../../../../../../../../errors"));
|
|
37
46
|
class DisbursementWebhookApi {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
this.options = options;
|
|
47
|
+
constructor(_options) {
|
|
48
|
+
this._options = _options;
|
|
41
49
|
}
|
|
42
50
|
/**
|
|
43
51
|
* IN DEVELOPMENT
|
|
44
52
|
*/
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
if (_response.ok) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
if (_response.error.reason === "status-code") {
|
|
67
|
-
throw new errors.TheraApiError({
|
|
68
|
-
statusCode: _response.error.statusCode,
|
|
69
|
-
body: _response.error.body,
|
|
53
|
+
invoiceWebhook(request) {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
const { theraWebhookSignatureHeader, body: _body } = request;
|
|
56
|
+
const _response = yield core.fetcher({
|
|
57
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "webhook/disbursement/invoice"),
|
|
58
|
+
method: "POST",
|
|
59
|
+
headers: {
|
|
60
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
61
|
+
"X-Fern-Language": "JavaScript",
|
|
62
|
+
"X-Fern-SDK-Name": "@thera-hr/api-sdk",
|
|
63
|
+
"X-Fern-SDK-Version": "0.0.1520",
|
|
64
|
+
"Thera-Webhook-Signature-Header": theraWebhookSignatureHeader,
|
|
65
|
+
},
|
|
66
|
+
contentType: "application/json",
|
|
67
|
+
body: yield serializers.api.thera.disbursement.InvoiceWebhookEvent.jsonOrThrow(_body, {
|
|
68
|
+
unrecognizedObjectKeys: "strip",
|
|
69
|
+
}),
|
|
70
|
+
timeoutMs: 60000,
|
|
70
71
|
});
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
if (_response.ok) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (_response.error.reason === "status-code") {
|
|
74
76
|
throw new errors.TheraApiError({
|
|
75
77
|
statusCode: _response.error.statusCode,
|
|
76
|
-
body: _response.error.
|
|
77
|
-
});
|
|
78
|
-
case "timeout":
|
|
79
|
-
throw new errors.TheraApiTimeoutError();
|
|
80
|
-
case "unknown":
|
|
81
|
-
throw new errors.TheraApiError({
|
|
82
|
-
message: _response.error.errorMessage,
|
|
78
|
+
body: _response.error.body,
|
|
83
79
|
});
|
|
84
|
-
|
|
80
|
+
}
|
|
81
|
+
switch (_response.error.reason) {
|
|
82
|
+
case "non-json":
|
|
83
|
+
throw new errors.TheraApiError({
|
|
84
|
+
statusCode: _response.error.statusCode,
|
|
85
|
+
body: _response.error.rawBody,
|
|
86
|
+
});
|
|
87
|
+
case "timeout":
|
|
88
|
+
throw new errors.TheraApiTimeoutError();
|
|
89
|
+
case "unknown":
|
|
90
|
+
throw new errors.TheraApiError({
|
|
91
|
+
message: _response.error.errorMessage,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
});
|
|
85
95
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
96
|
+
_getAuthorizationHeader() {
|
|
97
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
99
|
+
if (bearer != null) {
|
|
100
|
+
return `Bearer ${bearer}`;
|
|
101
|
+
}
|
|
102
|
+
return undefined;
|
|
103
|
+
});
|
|
92
104
|
}
|
|
93
105
|
}
|
|
94
106
|
exports.DisbursementWebhookApi = DisbursementWebhookApi;
|
|
@@ -5,13 +5,13 @@ import * as core from "../../../../../../../../core";
|
|
|
5
5
|
import { OncycleApi } from "../resources/oncycleApi/client/Client";
|
|
6
6
|
export declare namespace Payroll {
|
|
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 Payroll {
|
|
13
|
-
protected readonly
|
|
14
|
-
constructor(
|
|
13
|
+
protected readonly _options: Payroll.Options;
|
|
14
|
+
constructor(_options: Payroll.Options);
|
|
15
15
|
protected _oncycleApi: OncycleApi | undefined;
|
|
16
16
|
get oncycleApi(): OncycleApi;
|
|
17
17
|
}
|
|
@@ -6,13 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Payroll = void 0;
|
|
7
7
|
const Client_1 = require("../resources/oncycleApi/client/Client");
|
|
8
8
|
class Payroll {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
this.options = options;
|
|
9
|
+
constructor(_options) {
|
|
10
|
+
this._options = _options;
|
|
12
11
|
}
|
|
13
|
-
_oncycleApi;
|
|
14
12
|
get oncycleApi() {
|
|
15
|
-
|
|
13
|
+
var _a;
|
|
14
|
+
return ((_a = this._oncycleApi) !== null && _a !== void 0 ? _a : (this._oncycleApi = new Client_1.OncycleApi(this._options)));
|
|
16
15
|
}
|
|
17
16
|
}
|
|
18
17
|
exports.Payroll = Payroll;
|
package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/client/Client.d.ts
CHANGED
|
@@ -5,13 +5,13 @@ import * as core from "../../../../../../../../../../core";
|
|
|
5
5
|
import * as TheraApi from "../../../../../../../../..";
|
|
6
6
|
export declare namespace OncycleApi {
|
|
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 OncycleApi {
|
|
13
|
-
protected readonly
|
|
14
|
-
constructor(
|
|
13
|
+
protected readonly _options: OncycleApi.Options;
|
|
14
|
+
constructor(_options: OncycleApi.Options);
|
|
15
15
|
/**
|
|
16
16
|
*
|
|
17
17
|
*/
|