@thera-hr/api-sdk 0.0.1503 → 0.0.1547
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 +6 -3
- package/api/resources/api/resources/thera/client/Client.js +16 -12
- 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 +5 -5
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +67 -50
- package/api/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateContractor.d.ts +1 -1
- 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 +4 -4
- package/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +58 -46
- package/api/resources/api/resources/thera/resources/employment/client/Client.d.ts +17 -0
- package/api/resources/api/resources/thera/resources/employment/client/Client.js +17 -0
- package/api/resources/api/resources/thera/resources/employment/client/index.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/employment/client/index.js +2 -0
- package/api/resources/api/resources/thera/resources/employment/index.d.ts +2 -0
- package/api/resources/api/resources/thera/resources/employment/index.js +18 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.d.ts +20 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +109 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/index.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/index.js +2 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/index.d.ts +2 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/index.js +18 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ContractEstimateRequest.d.ts +9 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateRequest.d.ts +8 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateResponse.d.ts +10 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimate.d.ts +8 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimate.js +5 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimateRequest.d.ts +11 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimateRequest.js +5 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ProRata.d.ts +9 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ProRata.js +5 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/index.d.ts +6 -0
- package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/index.js +22 -0
- package/api/resources/api/resources/thera/resources/employment/resources/index.d.ts +2 -0
- package/api/resources/api/resources/thera/resources/employment/resources/index.js +31 -0
- package/api/resources/api/resources/thera/resources/index.d.ts +1 -0
- package/api/resources/api/resources/thera/resources/index.js +2 -1
- 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 -1
- package/api/resources/db/resources/user/types/{FernUser.d.ts → User.d.ts} +1 -1
- package/api/resources/db/resources/user/types/User.js +5 -0
- 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 +6 -3
- package/dist/api/resources/api/resources/thera/client/Client.js +16 -12
- 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 +5 -5
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/client/Client.js +67 -50
- package/dist/api/resources/api/resources/thera/resources/company/resources/companyApi/types/CreateContractor.d.ts +1 -1
- 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/InviteContractorResponse.js +5 -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 +4 -4
- package/dist/api/resources/api/resources/thera/resources/disbursement/resources/disbursementWebhookApi/client/Client.js +58 -46
- package/dist/api/resources/api/resources/thera/resources/employment/client/Client.d.ts +17 -0
- package/dist/api/resources/api/resources/thera/resources/employment/client/Client.js +17 -0
- package/dist/api/resources/api/resources/thera/resources/employment/client/index.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/employment/client/index.js +2 -0
- package/dist/api/resources/api/resources/thera/resources/employment/index.d.ts +2 -0
- package/dist/api/resources/api/resources/thera/resources/employment/index.js +18 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.d.ts +20 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/Client.js +109 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/index.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/client/index.js +2 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/index.d.ts +2 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/index.js +18 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ContractEstimateRequest.d.ts +9 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ContractEstimateRequest.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateRequest.d.ts +8 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateRequest.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateResponse.d.ts +10 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateResponse.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimate.d.ts +8 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimate.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimateRequest.d.ts +11 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimateRequest.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ProRata.d.ts +9 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ProRata.js +5 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/index.d.ts +6 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/index.js +22 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/index.d.ts +2 -0
- package/dist/api/resources/api/resources/thera/resources/employment/resources/index.js +31 -0
- package/dist/api/resources/api/resources/thera/resources/index.d.ts +1 -0
- package/dist/api/resources/api/resources/thera/resources/index.js +2 -1
- 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 -1
- package/dist/api/resources/db/resources/user/types/{FernUser.d.ts → User.d.ts} +1 -1
- package/dist/api/resources/db/resources/user/types/User.js +5 -0
- 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.d.ts +1 -1
- 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/thera/resources/employment/index.d.ts +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/index.js +17 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/index.d.ts +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/index.js +17 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ContractEstimateRequest.d.ts +14 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ContractEstimateRequest.js +44 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateRequest.d.ts +13 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateRequest.js +43 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateResponse.d.ts +13 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateResponse.js +45 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimate.d.ts +14 -0
- package/dist/serialization/resources/{db/resources/user/types/EmployeeInformationAddress.js → api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimate.js} +6 -9
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimateRequest.d.ts +15 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimateRequest.js +45 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ProRata.d.ts +14 -0
- package/{serialization/resources/db/resources/user/types/EmployeeInformationAddress.js → dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ProRata.js} +6 -9
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/index.d.ts +6 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/index.js +22 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/index.d.ts +2 -0
- package/dist/serialization/resources/api/resources/thera/resources/employment/resources/index.js +31 -0
- package/dist/serialization/resources/api/resources/thera/resources/index.d.ts +1 -0
- package/dist/serialization/resources/api/resources/thera/resources/index.js +2 -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 -1
- package/dist/serialization/resources/db/resources/user/types/EmployeeInformation.js +14 -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/User.js +48 -0
- 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.d.ts +1 -1
- 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/thera/resources/employment/index.d.ts +1 -0
- package/serialization/resources/api/resources/thera/resources/employment/index.js +17 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/index.d.ts +1 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/index.js +17 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ContractEstimateRequest.d.ts +14 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ContractEstimateRequest.js +44 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateRequest.d.ts +13 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateRequest.js +43 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateResponse.d.ts +13 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateResponse.js +45 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimate.d.ts +14 -0
- package/{dist/serialization/resources/db/resources/user/types/FernUser.js → serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimate.js} +6 -10
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimateRequest.d.ts +15 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/PayCycleEstimateRequest.js +45 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/ProRata.d.ts +14 -0
- package/serialization/resources/{db/resources/user/types/FernUser.js → api/resources/thera/resources/employment/resources/employmentApi/types/ProRata.js} +6 -10
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/index.d.ts +6 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/employmentApi/types/index.js +22 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/index.d.ts +2 -0
- package/serialization/resources/api/resources/thera/resources/employment/resources/index.js +31 -0
- package/serialization/resources/api/resources/thera/resources/index.d.ts +1 -0
- package/serialization/resources/api/resources/thera/resources/index.js +2 -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 -1
- package/serialization/resources/db/resources/user/types/EmployeeInformation.js +14 -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/User.js +48 -0
- 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/serialization/resources/db/resources/user/types/EmployeeInformationAddress.d.ts +0 -17
- /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 → api/resources/thera/resources/employment/resources/employmentApi/types/ContractEstimateRequest.js} +0 -0
- /package/{dist/api/resources/db/resources/user/types/EmployeeInformationAddress.js → api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateRequest.js} +0 -0
- /package/{dist/api/resources/db/resources/user/types/FernUser.js → api/resources/api/resources/thera/resources/employment/resources/employmentApi/types/CreateContractEstimateResponse.js} +0 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
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
|
+
};
|
|
37
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.EmploymentApi = void 0;
|
|
42
|
+
const core = __importStar(require("../../../../../../../../../../core"));
|
|
43
|
+
const serializers = __importStar(require("../../../../../../../../../../serialization"));
|
|
44
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
45
|
+
const errors = __importStar(require("../../../../../../../../../../errors"));
|
|
46
|
+
class EmploymentApi {
|
|
47
|
+
constructor(_options) {
|
|
48
|
+
this._options = _options;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* In Staging. Get estimate for this contract (cycle date, list of cycles, etc) based on provided paycycle
|
|
52
|
+
*/
|
|
53
|
+
estimateContract(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), "contracts/estimate"),
|
|
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.1547",
|
|
63
|
+
},
|
|
64
|
+
contentType: "application/json",
|
|
65
|
+
body: yield serializers.api.thera.employment.CreateContractEstimateRequest.jsonOrThrow(request, {
|
|
66
|
+
unrecognizedObjectKeys: "strip",
|
|
67
|
+
}),
|
|
68
|
+
timeoutMs: 60000,
|
|
69
|
+
});
|
|
70
|
+
if (_response.ok) {
|
|
71
|
+
return yield serializers.api.thera.employment.CreateContractEstimateResponse.parseOrThrow(_response.body, {
|
|
72
|
+
unrecognizedObjectKeys: "passthrough",
|
|
73
|
+
allowUnrecognizedUnionMembers: true,
|
|
74
|
+
allowUnrecognizedEnumValues: true,
|
|
75
|
+
breadcrumbsPrefix: ["response"],
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
if (_response.error.reason === "status-code") {
|
|
79
|
+
throw new errors.TheraApiError({
|
|
80
|
+
statusCode: _response.error.statusCode,
|
|
81
|
+
body: _response.error.body,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
switch (_response.error.reason) {
|
|
85
|
+
case "non-json":
|
|
86
|
+
throw new errors.TheraApiError({
|
|
87
|
+
statusCode: _response.error.statusCode,
|
|
88
|
+
body: _response.error.rawBody,
|
|
89
|
+
});
|
|
90
|
+
case "timeout":
|
|
91
|
+
throw new errors.TheraApiTimeoutError();
|
|
92
|
+
case "unknown":
|
|
93
|
+
throw new errors.TheraApiError({
|
|
94
|
+
message: _response.error.errorMessage,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
_getAuthorizationHeader() {
|
|
100
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
102
|
+
if (bearer != null) {
|
|
103
|
+
return `Bearer ${bearer}`;
|
|
104
|
+
}
|
|
105
|
+
return undefined;
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.EmploymentApi = EmploymentApi;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/api/resources/api/resources/thera/resources/employment/resources/employmentApi/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./client"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as TheraApi from "../../../../../../../../..";
|
|
5
|
+
export interface ContractEstimateRequest {
|
|
6
|
+
contractType: TheraApi.model.thera.ContractType;
|
|
7
|
+
wageType: TheraApi.model.thera.WageType;
|
|
8
|
+
rate: number;
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as TheraApi from "../../../../../../../../..";
|
|
5
|
+
export interface CreateContractEstimateRequest {
|
|
6
|
+
contractEstimateRequest: TheraApi.api.thera.employment.ContractEstimateRequest;
|
|
7
|
+
payCycle: TheraApi.api.thera.employment.PayCycleEstimateRequest;
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as TheraApi from "../../../../../../../../..";
|
|
5
|
+
export interface CreateContractEstimateResponse {
|
|
6
|
+
/** Sorted ascendingly by the start date */
|
|
7
|
+
paymentCycles: TheraApi.api.thera.employment.PayCycleEstimate[];
|
|
8
|
+
/** Only available for Fixed Rate contract */
|
|
9
|
+
proRata?: TheraApi.api.thera.employment.ProRata;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as TheraApi from "../../../../../../../../..";
|
|
5
|
+
export interface PayCycleEstimateRequest {
|
|
6
|
+
/** This field is currently not used. Adheres to Timezone DB version tzdata2022g. */
|
|
7
|
+
timezone: string;
|
|
8
|
+
cycleStartDate: string;
|
|
9
|
+
cycleEnd: TheraApi.model.thera.PayCycleEnd;
|
|
10
|
+
paymentDueDays: number;
|
|
11
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./CreateContractEstimateRequest"), exports);
|
|
18
|
+
__exportStar(require("./ContractEstimateRequest"), exports);
|
|
19
|
+
__exportStar(require("./PayCycleEstimateRequest"), exports);
|
|
20
|
+
__exportStar(require("./CreateContractEstimateResponse"), exports);
|
|
21
|
+
__exportStar(require("./PayCycleEstimate"), exports);
|
|
22
|
+
__exportStar(require("./ProRata"), exports);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.employmentApi = void 0;
|
|
30
|
+
exports.employmentApi = __importStar(require("./employmentApi"));
|
|
31
|
+
__exportStar(require("./employmentApi/types"), exports);
|
|
@@ -23,9 +23,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.payroll = exports.disbursement = exports.company = exports.bank = exports.address = void 0;
|
|
26
|
+
exports.payroll = exports.employment = exports.disbursement = exports.company = exports.bank = exports.address = void 0;
|
|
27
27
|
exports.address = __importStar(require("./address"));
|
|
28
28
|
exports.bank = __importStar(require("./bank"));
|
|
29
29
|
exports.company = __importStar(require("./company"));
|
|
30
30
|
exports.disbursement = __importStar(require("./disbursement"));
|
|
31
|
+
exports.employment = __importStar(require("./employment"));
|
|
31
32
|
exports.payroll = __importStar(require("./payroll"));
|
|
@@ -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
|
*/
|
package/api/resources/api/resources/thera/resources/payroll/resources/oncycleApi/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
|
};
|
|
@@ -35,60 +44,63 @@ const url_join_1 = __importDefault(require("url-join"));
|
|
|
35
44
|
const serializers = __importStar(require("../../../../../../../../../../serialization"));
|
|
36
45
|
const errors = __importStar(require("../../../../../../../../../../errors"));
|
|
37
46
|
class OncycleApi {
|
|
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
|
-
if (_response.ok) {
|
|
59
|
-
return await serializers.api.thera.payroll.ApproveOnCycleChecksResponse.parseOrThrow(_response.body, {
|
|
60
|
-
unrecognizedObjectKeys: "passthrough",
|
|
61
|
-
allowUnrecognizedUnionMembers: true,
|
|
62
|
-
allowUnrecognizedEnumValues: true,
|
|
63
|
-
breadcrumbsPrefix: ["response"],
|
|
53
|
+
approveOncycleChecks(companyId) {
|
|
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), `companies/${companyId}/w2-payroll/on-cycle-checks/approve`),
|
|
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.1547",
|
|
63
|
+
},
|
|
64
|
+
contentType: "application/json",
|
|
65
|
+
timeoutMs: 60000,
|
|
64
66
|
});
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
switch (_response.error.reason) {
|
|
73
|
-
case "non-json":
|
|
74
|
-
throw new errors.TheraApiError({
|
|
75
|
-
statusCode: _response.error.statusCode,
|
|
76
|
-
body: _response.error.rawBody,
|
|
67
|
+
if (_response.ok) {
|
|
68
|
+
return yield serializers.api.thera.payroll.ApproveOnCycleChecksResponse.parseOrThrow(_response.body, {
|
|
69
|
+
unrecognizedObjectKeys: "passthrough",
|
|
70
|
+
allowUnrecognizedUnionMembers: true,
|
|
71
|
+
allowUnrecognizedEnumValues: true,
|
|
72
|
+
breadcrumbsPrefix: ["response"],
|
|
77
73
|
});
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
case "unknown":
|
|
74
|
+
}
|
|
75
|
+
if (_response.error.reason === "status-code") {
|
|
81
76
|
throw new errors.TheraApiError({
|
|
82
|
-
|
|
77
|
+
statusCode: _response.error.statusCode,
|
|
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.OncycleApi = OncycleApi;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export declare type ComplianceDocumentType = "PASSPORT" | "ID" | "PASSPORT_OR_ID" | "AADHAR" | "SSN" | "LICENSE";
|
|
4
|
+
export declare type ComplianceDocumentType = "PASSPORT" | "ID" | "PASSPORT_OR_ID" | "AADHAR" | "SSN" | "LICENSE" | "GST_REGISTRATION_NUMBER_OR_TAN" | "TIN";
|
|
5
5
|
export declare const ComplianceDocumentType: {
|
|
6
6
|
readonly Passport: "PASSPORT";
|
|
7
7
|
readonly Id: "ID";
|
|
@@ -9,4 +9,6 @@ export declare const ComplianceDocumentType: {
|
|
|
9
9
|
readonly Aadhar: "AADHAR";
|
|
10
10
|
readonly Ssn: "SSN";
|
|
11
11
|
readonly License: "LICENSE";
|
|
12
|
+
readonly GstRegistrationNumberOrTan: "GST_REGISTRATION_NUMBER_OR_TAN";
|
|
13
|
+
readonly Tin: "TIN";
|
|
12
14
|
};
|
|
@@ -5,7 +5,9 @@ import * as TheraApi from "../../../../..";
|
|
|
5
5
|
export interface EmployeeInformation {
|
|
6
6
|
stripeId: string;
|
|
7
7
|
onboardingStatus: TheraApi.db.EmployeeOnboardingStatus;
|
|
8
|
+
employeeOnboardingStatus: TheraApi.db.EmployeeOnboardingStatus;
|
|
8
9
|
country: string;
|
|
9
|
-
address: TheraApi.
|
|
10
|
+
address: TheraApi.api.thera.address.Address;
|
|
10
11
|
complianceInformation: TheraApi.db.ComplianceInformation;
|
|
12
|
+
w8BenFileS3Key: string;
|
|
11
13
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export * from "./ComplianceDocumentType";
|
|
2
2
|
export * from "./ComplianceDocument";
|
|
3
3
|
export * from "./ComplianceInformation";
|
|
4
|
-
export * from "./EmployeeInformationAddress";
|
|
5
4
|
export * from "./EmployeeOnboardingStatus";
|
|
6
5
|
export * from "./EmployeeInformation";
|
|
7
|
-
export * from "./
|
|
6
|
+
export * from "./User";
|
|
@@ -17,7 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./ComplianceDocumentType"), exports);
|
|
18
18
|
__exportStar(require("./ComplianceDocument"), exports);
|
|
19
19
|
__exportStar(require("./ComplianceInformation"), exports);
|
|
20
|
-
__exportStar(require("./EmployeeInformationAddress"), exports);
|
|
21
20
|
__exportStar(require("./EmployeeOnboardingStatus"), exports);
|
|
22
21
|
__exportStar(require("./EmployeeInformation"), exports);
|
|
23
|
-
__exportStar(require("./
|
|
22
|
+
__exportStar(require("./User"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import URLSearchParams from "@ungap/url-search-params";
|
|
2
|
-
import { AxiosAdapter } from "axios";
|
|
1
|
+
import { default as URLSearchParams } from "@ungap/url-search-params";
|
|
2
|
+
import { AxiosAdapter, AxiosProgressEvent } from "axios";
|
|
3
3
|
import { APIResponse } from "./APIResponse";
|
|
4
|
-
export declare type FetchFunction = (args: Fetcher.Args) => Promise<APIResponse<
|
|
4
|
+
export declare type FetchFunction = <R = unknown>(args: Fetcher.Args) => Promise<APIResponse<R, Fetcher.Error>>;
|
|
5
5
|
export declare namespace Fetcher {
|
|
6
6
|
interface Args {
|
|
7
7
|
url: string;
|
|
@@ -12,8 +12,9 @@ export declare namespace Fetcher {
|
|
|
12
12
|
body?: unknown;
|
|
13
13
|
timeoutMs?: number;
|
|
14
14
|
withCredentials?: boolean;
|
|
15
|
+
responseType?: "json" | "blob";
|
|
15
16
|
adapter?: AxiosAdapter;
|
|
16
|
-
onUploadProgress?: (event:
|
|
17
|
+
onUploadProgress?: (event: AxiosProgressEvent) => void;
|
|
17
18
|
}
|
|
18
19
|
type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError;
|
|
19
20
|
interface FailedStatusCodeError {
|