@worknice/js-sdk 0.0.1
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/LICENSE +16 -0
- package/README.md +5 -0
- package/dist/_types-DsB4q143.d.ts +127 -0
- package/dist/api/ApiError.d.ts +12 -0
- package/dist/api/ApiError.js +27 -0
- package/dist/api/ApiError.js.map +1 -0
- package/dist/api/_generated.d.ts +5040 -0
- package/dist/api/_generated.js +386 -0
- package/dist/api/_generated.js.map +1 -0
- package/dist/api/_types.d.ts +2 -0
- package/dist/api/_types.js +1 -0
- package/dist/api/_types.js.map +1 -0
- package/dist/api/assertNotNull.d.ts +5 -0
- package/dist/api/assertNotNull.js +14 -0
- package/dist/api/assertNotNull.js.map +1 -0
- package/dist/api/createApiOperation.d.ts +11 -0
- package/dist/api/createApiOperation.js +6 -0
- package/dist/api/createApiOperation.js.map +1 -0
- package/dist/api/createWorkniceClient.d.ts +2 -0
- package/dist/api/createWorkniceClient.js +101 -0
- package/dist/api/createWorkniceClient.js.map +1 -0
- package/dist/api/operations/activateIntegration.d.ts +22 -0
- package/dist/api/operations/activateIntegration.js +29 -0
- package/dist/api/operations/activateIntegration.js.map +1 -0
- package/dist/api/operations/createApiToken.d.ts +14 -0
- package/dist/api/operations/createApiToken.js +31 -0
- package/dist/api/operations/createApiToken.js.map +1 -0
- package/dist/api/operations/deleteApiToken.d.ts +10 -0
- package/dist/api/operations/deleteApiToken.js +21 -0
- package/dist/api/operations/deleteApiToken.js.map +1 -0
- package/dist/api/operations/getApiTokens.d.ts +14 -0
- package/dist/api/operations/getApiTokens.js +33 -0
- package/dist/api/operations/getApiTokens.js.map +1 -0
- package/dist/api/operations/initializeIntegration.d.ts +20 -0
- package/dist/api/operations/initializeIntegration.js +23 -0
- package/dist/api/operations/initializeIntegration.js.map +1 -0
- package/dist/employee-records/EQUALITY_CHECKS.d.ts +9 -0
- package/dist/employee-records/EQUALITY_CHECKS.js +100 -0
- package/dist/employee-records/EQUALITY_CHECKS.js.map +1 -0
- package/dist/employee-records/_types.d.ts +171 -0
- package/dist/employee-records/_types.js +1 -0
- package/dist/employee-records/_types.js.map +1 -0
- package/dist/employee-records/comparePersonDataTransferLines.d.ts +5 -0
- package/dist/employee-records/comparePersonDataTransferLines.js +338 -0
- package/dist/employee-records/comparePersonDataTransferLines.js.map +1 -0
- package/dist/employee-records/index.d.ts +16 -0
- package/dist/employee-records/index.js +25 -0
- package/dist/employee-records/index.js.map +1 -0
- package/dist/employee-records/mergePersonDataTransferLines.d.ts +5 -0
- package/dist/employee-records/mergePersonDataTransferLines.js +27 -0
- package/dist/employee-records/mergePersonDataTransferLines.js.map +1 -0
- package/dist/employee-records/validatePersonDataTransferLine.d.ts +5 -0
- package/dist/employee-records/validatePersonDataTransferLine.js +23 -0
- package/dist/employee-records/validatePersonDataTransferLine.js.map +1 -0
- package/dist/employee-records/validatePersonDataTransferLineBankAccounts.d.ts +5 -0
- package/dist/employee-records/validatePersonDataTransferLineBankAccounts.js +240 -0
- package/dist/employee-records/validatePersonDataTransferLineBankAccounts.js.map +1 -0
- package/dist/employee-records/validatePersonDataTransferLineEmergencyContacts.d.ts +5 -0
- package/dist/employee-records/validatePersonDataTransferLineEmergencyContacts.js +6 -0
- package/dist/employee-records/validatePersonDataTransferLineEmergencyContacts.js.map +1 -0
- package/dist/employee-records/validatePersonDataTransferLinePersonalDetails.d.ts +5 -0
- package/dist/employee-records/validatePersonDataTransferLinePersonalDetails.js +40 -0
- package/dist/employee-records/validatePersonDataTransferLinePersonalDetails.js.map +1 -0
- package/dist/employee-records/validatePersonDataTransferLinePostalAddress.d.ts +5 -0
- package/dist/employee-records/validatePersonDataTransferLinePostalAddress.js +39 -0
- package/dist/employee-records/validatePersonDataTransferLinePostalAddress.js.map +1 -0
- package/dist/employee-records/validatePersonDataTransferLineResidentialAddress.d.ts +5 -0
- package/dist/employee-records/validatePersonDataTransferLineResidentialAddress.js +39 -0
- package/dist/employee-records/validatePersonDataTransferLineResidentialAddress.js.map +1 -0
- package/dist/employee-records/validatePersonDataTransferLineSuperFunds.d.ts +5 -0
- package/dist/employee-records/validatePersonDataTransferLineSuperFunds.js +46 -0
- package/dist/employee-records/validatePersonDataTransferLineSuperFunds.js.map +1 -0
- package/dist/employee-records/validatePersonDataTransferLineTaxDetails.d.ts +5 -0
- package/dist/employee-records/validatePersonDataTransferLineTaxDetails.js +46 -0
- package/dist/employee-records/validatePersonDataTransferLineTaxDetails.js.map +1 -0
- package/dist/employee-records/validatePersonDataTransferLineTenure.d.ts +5 -0
- package/dist/employee-records/validatePersonDataTransferLineTenure.js +20 -0
- package/dist/employee-records/validatePersonDataTransferLineTenure.js.map +1 -0
- package/dist/helpers/_types.d.ts +17 -0
- package/dist/helpers/_types.js +1 -0
- package/dist/helpers/_types.js.map +1 -0
- package/dist/helpers/handleCreateIntegrationWebhook.d.ts +11 -0
- package/dist/helpers/handleCreateIntegrationWebhook.js +20 -0
- package/dist/helpers/handleCreateIntegrationWebhook.js.map +1 -0
- package/dist/helpers/handleGetAuthorizationUrlWebhook.d.ts +11 -0
- package/dist/helpers/handleGetAuthorizationUrlWebhook.js +19 -0
- package/dist/helpers/handleGetAuthorizationUrlWebhook.js.map +1 -0
- package/dist/helpers/handleRequestWithWorknice.d.ts +19 -0
- package/dist/helpers/handleRequestWithWorknice.js +46 -0
- package/dist/helpers/handleRequestWithWorknice.js.map +1 -0
- package/dist/helpers/index.d.ts +5 -0
- package/dist/helpers/index.js +5 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/utils/errorToString.d.ts +22 -0
- package/dist/utils/errorToString.js +28 -0
- package/dist/utils/errorToString.js.map +1 -0
- package/dist/utils/isAfter.d.ts +4 -0
- package/dist/utils/isAfter.js +5 -0
- package/dist/utils/isAfter.js.map +1 -0
- package/dist/utils/isSamePlainDate.d.ts +1 -0
- package/dist/utils/isSamePlainDate.js +5 -0
- package/dist/utils/isSamePlainDate.js.map +1 -0
- package/dist/utils/isValidPlainDate.d.ts +1 -0
- package/dist/utils/isValidPlainDate.js +5 -0
- package/dist/utils/isValidPlainDate.js.map +1 -0
- package/dist/utils/parsePlainDate.d.ts +1 -0
- package/dist/utils/parsePlainDate.js +5 -0
- package/dist/utils/parsePlainDate.js.map +1 -0
- package/package.json +71 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { C as ClientConfig, a as FailedQueryResult, F as FetchOptions, Q as QueryResult, S as SuccessfulQueryResult, W as WorkniceClient } from '../_types-DsB4q143.js';
|
|
2
|
+
export { Account, AccountFeatures, AccountFeaturesInput, AccountFlag, ActivateIntegrationMutation, ActivateIntegrationMutationVariables, AllocationMethod, AnniversaryEvent, ApiToken, App, AppCategory, AppStatus, Approval, ApprovalStatus, Assignment, AssignmentNotification, AssignmentNotificationsArgs, AssignmentRelation, AssignmentStatus, AssignmentType, AuthMethod, AuthProvider, AuthState, BasicAbnForm, BasicAbnFormNotificationsArgs, BasicAbnFormTemplate, BasicBankAccountForm, BasicBankAccountFormNotificationsArgs, BasicBankAccountFormTemplate, BasicEmergencyContactForm, BasicEmergencyContactFormNotificationsArgs, BasicEmergencyContactFormTemplate, BasicPersonalDetailsForm, BasicPersonalDetailsFormNotificationsArgs, BasicPersonalDetailsFormTemplate, BasicPreEmploymentForm, BasicPreEmploymentFormNotificationsArgs, BasicPreEmploymentFormTemplate, BasicSuperForm, BasicSuperFormNotificationsArgs, BasicSuperFormTemplate, BasicTaxForm, BasicTaxFormNotificationsArgs, BasicTaxFormTemplate, Birthday, BirthdayEvent, BirthdayInput, Bundle, BundledPerson, BundledTemplate, BundledTemplateInput, Certificate, CertificateNotificationsArgs, CertificateProof, CertificateTemplate, ConnectionRemote, ConnectionRemoteInput, ConnectionStatus, CreateApiTokenMutation, CreateApiTokenMutationVariables, DataExport, DataExportType, DataImport, DataImportLine, DeleteApiTokenMutation, DeleteApiTokenMutationVariables, Department, Document, DocumentField, DocumentFieldConfigInput, DocumentFieldInput, DocumentFieldType, DocumentNotificationsArgs, DocumentTemplate, EmailNotificationSettings, EmailNotificationSettingsInput, Exact, ExpiryStatus, FieldPresence, Form, FormNotificationsArgs, FormOrderBy, FormType, Gender, GenericIntegration, GetApiTokensQuery, GetApiTokensQueryVariables, Incremental, InitializeIntegrationMutation, InitializeIntegrationMutationVariables, InputMaybe, Integration, IntegrationConnection, IntegrationFeatures, IntegrationLog, IntegrationLogInput, IntegrationStatus, IntegrationSync, IntegrationSyncEvent, IntegrationSyncEventType, IntegrationSyncStatus, IntegrationType, Job, JobStatus, KeypayBusiness, KeypayEmployee, KeypayEmployeeForm, KeypayEmployeeFormNotificationsArgs, KeypayEmployeeFormTemplate, KeypayEmployeeStatus, KeypayEmploymentType, KeypayGender, KeypayIntegration, KeypayLeaveEmployee, KeypayLeaveIntegration, LeaveBalance, LeaveCategory, LeaveCategoryInput, LeaveHoursEstimate, LeaveRequest, LeaveRequestNotification, LeaveRequestNotificationsArgs, LeaveRequestStatus, Location, Login, MakeEmpty, MakeMaybe, MakeOptional, Maybe, Media, Mutation, MutationAcceptLoginArgs, MutationActivateIntegrationArgs, MutationActivatePersonArgs, MutationAddPeopleToBundlesArgs, MutationAddPeopleToTagsArgs, MutationAppendIntegrationLogArgs, MutationApproveAssignmentArgs, MutationApproveKeypayLeaveLeaveRequestArgs, MutationApproveLeaveRequestArgs, MutationApproveXeroLeaveRequestArgs, MutationArchiveAssignmentArgs, MutationArchiveBundleArgs, MutationArchiveIntegrationArgs, MutationArchiveNotesArgs, MutationArchiveOrgArgs, MutationArchivePersonArgs, MutationArchiveReviewCycleArgs, MutationArchiveSavedQuestionArgs, MutationArchiveStandardReviewArgs, MutationArchiveStandardReviewTemplateArgs, MutationArchiveTemplateArgs, MutationAssignAssignmentsArgs, MutationAssignBasicAbnFormArgs, MutationAssignBasicBankAccountFormArgs, MutationAssignBasicEmergencyContactFormArgs, MutationAssignBasicPersonalDetailsFormArgs, MutationAssignBasicPreEmploymentFormArgs, MutationAssignBasicSuperFormArgs, MutationAssignBasicTaxFormArgs, MutationAssignCertificateArgs, MutationAssignDocumentArgs, MutationAssignKeypayEmployeeFormArgs, MutationAssignQuestionnaireArgs, MutationAssignStandardReviewArgs, MutationAssignTaskArgs, MutationAuthorizeIntegrationArgs, MutationCancelLeaveRequestArgs, MutationCompleteIntegrationSyncArgs, MutationCompletePasswordResetArgs, MutationConfirmEmailArgs, MutationConfirmProfileArgs, MutationConfirmProviderArgs, MutationCreateAccountArgs, MutationCreateApiTokenArgs, MutationCreateAssignmentsArgs, MutationCreateBasicAbnFormArgs, MutationCreateBasicAbnFormTemplateArgs, MutationCreateBasicBankAccountFormArgs, MutationCreateBasicBankAccountFormTemplateArgs, MutationCreateBasicEmergencyContactFormArgs, MutationCreateBasicEmergencyContactFormTemplateArgs, MutationCreateBasicPersonalDetailsFormArgs, MutationCreateBasicPersonalDetailsFormTemplateArgs, MutationCreateBasicPreEmploymentFormArgs, MutationCreateBasicPreEmploymentFormTemplateArgs, MutationCreateBasicSuperFormArgs, MutationCreateBasicSuperFormTemplateArgs, MutationCreateBasicTaxFormArgs, MutationCreateBasicTaxFormTemplateArgs, MutationCreateBundleArgs, MutationCreateBundledPersonArgs, MutationCreateCertificateArgs, MutationCreateCertificateTemplateArgs, MutationCreateDataExportArgs, MutationCreateDataImportArgs, MutationCreateDocumentArgs, MutationCreateDocumentTemplateArgs, MutationCreateIntegrationArgs, MutationCreateIntegrationLogArgs, MutationCreateJobArgs, MutationCreateKeypayEmployeeFormArgs, MutationCreateKeypayEmployeeFormTemplateArgs, MutationCreateKeypayLeaveLeaveRequestArgs, MutationCreateLeaveRequestArgs, MutationCreateLocalPersonConnectionsArgs, MutationCreateLocationArgs, MutationCreateLoginArgs, MutationCreateNoteArgs, MutationCreateOrgArgs, MutationCreatePersonArgs, MutationCreatePersonConnectionArgs, MutationCreatePersonDataImportLineArgs, MutationCreatePersonDataImportLinesArgs, MutationCreatePositionArgs, MutationCreateQuestionnaireArgs, MutationCreateQuestionnaireTemplateArgs, MutationCreateReviewCycleArgs, MutationCreateSavedQuestionArgs, MutationCreateStandaloneCertificateArgs, MutationCreateStandaloneDocumentArgs, MutationCreateStandaloneQuestionnaireArgs, MutationCreateStandaloneStandardReviewArgs, MutationCreateStandaloneTaskArgs, MutationCreateStandardReviewArgs, MutationCreateStandardReviewQuestionArgs, MutationCreateStandardReviewTemplateArgs, MutationCreateStandardReviewTemplateQuestionArgs, MutationCreateTagArgs, MutationCreateTagsArgs, MutationCreateTaskArgs, MutationCreateTaskTemplateArgs, MutationCreateXeroLeaveRequestArgs, MutationDeleteApiTokenArgs, MutationDeleteBundledPersonArgs, MutationDeleteLeaveRequestArgs, MutationDeleteLoginArgs, MutationDeletePersonConnectionArgs, MutationDeletePersonConnectionsArgs, MutationDeleteStandardReviewQuestionArgs, MutationDeleteStandardReviewTemplateQuestionArgs, MutationDeleteTagArgs, MutationDenyKeypayLeaveLeaveRequestArgs, MutationDenyLeaveRequestArgs, MutationDenyXeroLeaveRequestArgs, MutationDuplicateTemplateArgs, MutationInitializeIntegrationArgs, MutationInvitePersonArgs, MutationJoinOrgArgs, MutationLogInArgs, MutationLogInWithProviderArgs, MutationMarkNotificationsReadArgs, MutationMarkNotificationsUnreadArgs, MutationPauseIntegrationArgs, MutationProcessAssignmentArgs, MutationProcessAssignmentsArgs, MutationProcessLeaveRequestArgs, MutationProcessStandardReviewArgs, MutationReassignAssignmentArgs, MutationReassignCertificateArgs, MutationReassignTaskArgs, MutationReinviteLoginArgs, MutationRemovePeopleFromBundlesArgs, MutationRemovePeopleFromTagsArgs, MutationRequestApprovalsArgs, MutationRequestPasswordResetArgs, MutationResetXeroAuIntegrationArgs, MutationRestoreAssignmentArgs, MutationRestoreBundleArgs, MutationRestoreIntegrationArgs, MutationRestoreNotesArgs, MutationRestorePersonArgs, MutationRestoreReviewCycleArgs, MutationRestoreSavedQuestionArgs, MutationRestoreStandardReviewArgs, MutationRestoreStandardReviewTemplateArgs, MutationRestoreTemplateArgs, MutationScheduleStandardReviewArgs, MutationSetActiveLoginArgs, MutationSignUpArgs, MutationSubmitBasicAbnFormArgs, MutationSubmitBasicBankAccountFormArgs, MutationSubmitBasicEmergencyContactFormArgs, MutationSubmitBasicPersonalDetailsFormArgs, MutationSubmitBasicPreEmploymentFormArgs, MutationSubmitBasicSuperFormArgs, MutationSubmitBasicTaxFormArgs, MutationSubmitCertificateArgs, MutationSubmitDocumentArgs, MutationSubmitKeypayEmployeeFormArgs, MutationSubmitQuestionnaireArgs, MutationSubmitStandardReviewArgs, MutationSubmitStandardReviewQuestionArgs, MutationSubmitTaskArgs, MutationTerminatePersonArgs, MutationTriggerIntegrationSyncArgs, MutationUninvitePersonArgs, MutationUnmatchPersonConnectionsArgs, MutationUnpauseIntegrationArgs, MutationUnscheduleStandardReviewArgs, MutationUpdateAccountArgs, MutationUpdateAssignmentArgs, MutationUpdateAssignmentsArgs, MutationUpdateBasicAbnFormTemplateArgs, MutationUpdateBasicBankAccountFormTemplateArgs, MutationUpdateBasicEmergencyContactFormTemplateArgs, MutationUpdateBasicPersonalDetailsFormTemplateArgs, MutationUpdateBasicPreEmploymentFormTemplateArgs, MutationUpdateBasicSuperFormTemplateArgs, MutationUpdateBasicTaxFormTemplateArgs, MutationUpdateBundleArgs, MutationUpdateCertificateTemplateArgs, MutationUpdateDocumentArgs, MutationUpdateDocumentTemplateArgs, MutationUpdateIntegrationArgs, MutationUpdateJobArgs, MutationUpdateKeypayEmployeeFormTemplateArgs, MutationUpdateKeypayIntegrationArgs, MutationUpdateKeypayLeaveIntegrationArgs, MutationUpdateLocationArgs, MutationUpdateNoteArgs, MutationUpdateOnboardingAssignmentsArgs, MutationUpdateOrgArgs, MutationUpdatePaperworkAssignmentArgs, MutationUpdatePersonArgs, MutationUpdatePersonConnectionArgs, MutationUpdatePositionArgs, MutationUpdateQuestionnaireArgs, MutationUpdateQuestionnaireTemplateArgs, MutationUpdateReviewCycleArgs, MutationUpdateSavedQuestionArgs, MutationUpdateStandardReviewArgs, MutationUpdateStandardReviewQuestionArgs, MutationUpdateStandardReviewTemplateArgs, MutationUpdateStandardReviewTemplateQuestionArgs, MutationUpdateTagArgs, MutationUpdateTaskArgs, MutationUpdateTaskTemplateArgs, MutationUpdateUserPasswordArgs, MutationUpdateXeroAuIntegrationArgs, Note, Notification, NotificationType, Org, OrgBundlesArgs, OrgFeatures, OrgFeaturesInput, OrgIntegrationsArgs, OrgPeopleArgs, OrgReviewCyclesArgs, OrgSavedQuestionsArgs, OrgTemplatesArgs, PaperworkAssignment, PaperworkAssignmentNotificationsArgs, PaperworkSummary, PayPeriod, Person, PersonAssignmentsArgs, PersonBankAccountsChange, PersonBankAccountsChangeInput, PersonCertificatesArgs, PersonChange, PersonConnection, PersonConnectionLeaveHoursEstimateArgs, PersonDataImportLine, PersonDataTransferConfigInput, PersonDocumentsArgs, PersonEmergencyContactsChange, PersonEmergencyContactsChangeInput, PersonFormsArgs, PersonNotesArgs, PersonNotificationsArgs, PersonPersonalDetailsChange, PersonPersonalDetailsChangeInput, PersonPostalAddressChange, PersonPostalAddressChangeInput, PersonQuestionnairesArgs, PersonRemunerationChange, PersonResidentialAddressChange, PersonResidentialAddressChangeInput, PersonReviewsArgs, PersonRole, PersonStatus, PersonSuperFundsChange, PersonSuperFundsChangeInput, PersonTasksArgs, PersonTaxDetailsChange, PersonTaxDetailsChangeInput, PersonTenureChange, PersonTenureChangeInput, Position, Query, QueryAccountArgs, QueryAssignmentArgs, QueryBasicAbnFormTemplateArgs, QueryBasicBankAccountFormTemplateArgs, QueryBasicEmergencyContactFormTemplateArgs, QueryBasicPersonalDetailsFormTemplateArgs, QueryBasicPreEmploymentFormTemplateArgs, QueryBasicSuperFormTemplateArgs, QueryBasicTaxFormTemplateArgs, QueryBundleArgs, QueryCertificateArgs, QueryCertificateTemplateArgs, QueryCertificatesArgs, QueryDataImportArgs, QueryDataImportLineArgs, QueryDocumentArgs, QueryDocumentTemplateArgs, QueryDocumentTemplatesArgs, QueryDocumentsArgs, QueryFormArgs, QueryFormsArgs, QueryIntegrationArgs, QueryJobArgs, QueryKeypayEmployeeArgs, QueryKeypayEmployeeFormTemplateArgs, QueryKeypayLeaveEmployeeArgs, QueryLeaveRequestArgs, QueryNoteArgs, QueryOrgArgs, QueryPersonArgs, QueryPersonConnectionArgs, QueryQuestionnaireArgs, QueryQuestionnaireTemplateArgs, QueryQuestionnairesArgs, QueryReviewCycleArgs, QuerySavedQuestionArgs, QueryStandardReviewArgs, QueryStandardReviewTemplateArgs, QueryTaskArgs, QueryTaskTemplateArgs, QueryTemplateArgs, QueryUserArgs, Question, QuestionConfig, QuestionConfigInput, QuestionLikert5Config, QuestionLikert5ConfigInput, QuestionLikert5Response, QuestionLikert5ResponseInput, QuestionMultipleChoiceConfig, QuestionMultipleChoiceConfigInput, QuestionMultipleChoiceOtherConfig, QuestionMultipleChoiceOtherConfigInput, QuestionMultipleChoiceOtherResponse, QuestionMultipleChoiceOtherResponseInput, QuestionMultipleChoiceResponse, QuestionMultipleChoiceResponseInput, QuestionResponse, QuestionResponseInput, QuestionTemplateInput, QuestionTextConfig, QuestionTextConfigInput, QuestionTextResponse, QuestionTextResponseInput, QuestionType, Questionnaire, QuestionnaireNotificationsArgs, QuestionnaireQuestion, QuestionnaireQuestionAnswerInput, QuestionnaireQuestionInput, QuestionnaireTemplate, QuestionnaireTemplateQuestion, ReviewCycle, ReviewCycleReviewsArgs, ReviewRelation, SavedQuestion, Scalars, Session, SharedCalendarEvent, StandardReview, StandardReviewNotification, StandardReviewNotificationsArgs, StandardReviewQuestion, StandardReviewQuestionRespondent, StandardReviewQuestionsArgs, StandardReviewStatus, StandardReviewTemplate, StandardReviewTemplateQuestion, SuperFundNomination, Tag, TagColor, TagInput, Task, TaskNotificationsArgs, TaskTemplate, TaxEmploymentBasis, TaxFileNumberExemption, TaxResidencyStatus, Template, TemplateInput, TemplateParameter, TemplateParameterInput, TemplateParameterInputValue, TemplateParameterType, TemplateParameterValue, Upload, User, XeroAuBankAccount, XeroAuEmployee, XeroAuEmploymentBasis, XeroAuGender, XeroAuIntegration, XeroAuResidencyStatus, XeroAuSuperFund, XeroAuSuperMembership, XeroAuTfnExemptionType, XeroLeaveEmployee, XeroLeaveIntegration } from './_generated.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=_types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import ApiError, { ApiErrorCode } from "./ApiError.js";
|
|
2
|
+
function assertNotNull(condition, identifier, errorCode) {
|
|
3
|
+
if (condition !== null && condition !== void 0) {
|
|
4
|
+
return;
|
|
5
|
+
}
|
|
6
|
+
throw new ApiError(errorCode ?? ApiErrorCode.UNEXPECTED_RESPONSE, {
|
|
7
|
+
cause: Error(`Unexpected null or undefined value for "${identifier}".`)
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
var assertNotNull_default = assertNotNull;
|
|
11
|
+
export {
|
|
12
|
+
assertNotNull_default as default
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=assertNotNull.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/api/assertNotNull.ts"],"sourcesContent":["import ApiError, { ApiErrorCode } from \"./ApiError.js\";\n\nfunction assertNotNull<T>(\n condition: T,\n identifier: string,\n errorCode?: ApiErrorCode,\n): asserts condition is NonNullable<T> {\n if (condition !== null && condition !== undefined) {\n return;\n }\n\n throw new ApiError(errorCode ?? ApiErrorCode.UNEXPECTED_RESPONSE, {\n cause: Error(`Unexpected null or undefined value for \"${identifier}\".`),\n });\n}\n\nexport default assertNotNull;\n"],"mappings":"AAAA,OAAO,YAAY,oBAAoB;AAEvC,SAAS,cACP,WACA,YACA,WACqC;AACrC,MAAI,cAAc,QAAQ,cAAc,QAAW;AACjD;AAAA,EACF;AAEA,QAAM,IAAI,SAAS,aAAa,aAAa,qBAAqB;AAAA,IAChE,OAAO,MAAM,2CAA2C,UAAU,IAAI;AAAA,EACxE,CAAC;AACH;AAEA,IAAO,wBAAQ;","names":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { F as FetchOptions, S as SuccessfulQueryResult } from '../_types-DsB4q143.js';
|
|
2
|
+
import './_generated.js';
|
|
3
|
+
|
|
4
|
+
type Context = {
|
|
5
|
+
fetchFromApi: FetchFromApi;
|
|
6
|
+
};
|
|
7
|
+
type Operation<Result, Variables> = (variables: Variables, fetchOptions?: FetchOptions) => Promise<Result>;
|
|
8
|
+
type FetchFromApi = <Data extends object, Variables extends object>(query: string, variables?: Variables, fetchOptions?: FetchOptions) => Promise<SuccessfulQueryResult<Data>>;
|
|
9
|
+
declare const createApiOperation: <Result, Variables>(fn: (context: Context) => Operation<Result, Variables>) => (context: Context) => Operation<Result, Variables>;
|
|
10
|
+
|
|
11
|
+
export { createApiOperation as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/api/createApiOperation.ts"],"sourcesContent":["import type { FetchOptions, SuccessfulQueryResult } from \"./_types.js\";\n\ntype Context = {\n fetchFromApi: FetchFromApi;\n};\n\ntype Operation<Result, Variables> = (\n variables: Variables,\n fetchOptions?: FetchOptions,\n) => Promise<Result>;\n\ntype FetchFromApi = <Data extends object, Variables extends object>(\n query: string,\n variables?: Variables,\n fetchOptions?: FetchOptions,\n) => Promise<SuccessfulQueryResult<Data>>;\n\nconst createApiOperation =\n <Result, Variables>(fn: (context: Context) => Operation<Result, Variables>) =>\n (context: Context) =>\n fn(context);\n\nexport default createApiOperation;\n"],"mappings":"AAiBA,MAAM,qBACJ,CAAoB,OACpB,CAAC,YACC,GAAG,OAAO;AAEd,IAAO,6BAAQ;","names":[]}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import RequestError from "@worknice/shared/errors/RequestError";
|
|
2
|
+
import ApiError, { ApiErrorCode } from "./ApiError.js";
|
|
3
|
+
import activateIntegration from "./operations/activateIntegration.js";
|
|
4
|
+
import createApiToken from "./operations/createApiToken.js";
|
|
5
|
+
import deleteApiToken from "./operations/deleteApiToken.js";
|
|
6
|
+
import getApiTokens from "./operations/getApiTokens.js";
|
|
7
|
+
import initializeIntegration from "./operations/initializeIntegration.js";
|
|
8
|
+
const createWorkniceClient = (clientConfig) => {
|
|
9
|
+
const apiUrl = clientConfig?.apiUrl ?? "https://app.worknice.com/api/graphql";
|
|
10
|
+
const headers = clientConfig?.accessToken ? {
|
|
11
|
+
"worknice-api-token": clientConfig.accessToken,
|
|
12
|
+
"content-type": "application/json"
|
|
13
|
+
} : {
|
|
14
|
+
"content-type": "application/json"
|
|
15
|
+
};
|
|
16
|
+
const fetchFromApi = async (query, variables, fetchOptions) => {
|
|
17
|
+
try {
|
|
18
|
+
const response = await fetch(apiUrl, {
|
|
19
|
+
...fetchOptions,
|
|
20
|
+
body: JSON.stringify({
|
|
21
|
+
query,
|
|
22
|
+
variables
|
|
23
|
+
}),
|
|
24
|
+
credentials: "include",
|
|
25
|
+
headers,
|
|
26
|
+
method: "POST"
|
|
27
|
+
});
|
|
28
|
+
if (!response.ok) {
|
|
29
|
+
throw new RequestError("POST", response);
|
|
30
|
+
}
|
|
31
|
+
let result;
|
|
32
|
+
try {
|
|
33
|
+
result = await response.json();
|
|
34
|
+
} catch (error) {
|
|
35
|
+
throw Error("Unable to parse response body as JSON.", { cause: error });
|
|
36
|
+
}
|
|
37
|
+
if (typeof result !== "object" || result === null) {
|
|
38
|
+
throw Error("Response body is not an object.");
|
|
39
|
+
}
|
|
40
|
+
if (!("data" in result) || result.data === null) {
|
|
41
|
+
const cause = "errors" in result && Array.isArray(result.errors) ? new AggregateError(
|
|
42
|
+
result.errors.map(
|
|
43
|
+
(error) => Error(
|
|
44
|
+
typeof error === "object" && error !== null && "message" in error && typeof error.message === "string" ? error.message : "Unknown error."
|
|
45
|
+
)
|
|
46
|
+
)
|
|
47
|
+
) : void 0;
|
|
48
|
+
if (!("data" in result)) {
|
|
49
|
+
throw new ApiError(ApiErrorCode.INVALID_QUERY, { cause });
|
|
50
|
+
}
|
|
51
|
+
if (result.data === null) {
|
|
52
|
+
throw new ApiError(ApiErrorCode.QUERY_EXECUTION_FAILED, { cause });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return result;
|
|
56
|
+
} catch (error) {
|
|
57
|
+
if (error instanceof ApiError) {
|
|
58
|
+
throw error;
|
|
59
|
+
}
|
|
60
|
+
throw new ApiError(ApiErrorCode.UNEXPECTED_RESPONSE, { cause: error });
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const context = {
|
|
64
|
+
fetchFromApi
|
|
65
|
+
};
|
|
66
|
+
return {
|
|
67
|
+
fetchFromApi,
|
|
68
|
+
/**
|
|
69
|
+
* Transitions an integration with an 'UNAUTHORIZED' or 'UNCONFIGURED'
|
|
70
|
+
* status to an 'ACTIVE' status. Optionally, the name of the integration can
|
|
71
|
+
* be set at the same time.
|
|
72
|
+
*/
|
|
73
|
+
activateIntegration: activateIntegration(context),
|
|
74
|
+
/**
|
|
75
|
+
* Creates a new API token belonging to the current person.
|
|
76
|
+
*/
|
|
77
|
+
createApiToken: createApiToken(context),
|
|
78
|
+
/**
|
|
79
|
+
* Permanently deletes an API token belonging to the current person.
|
|
80
|
+
*/
|
|
81
|
+
deleteApiToken: deleteApiToken(context),
|
|
82
|
+
/**
|
|
83
|
+
* Transitions an integration with an 'UNINITIALIZED' status to an 'UNAUTHORIZED' status.
|
|
84
|
+
*/
|
|
85
|
+
initializeIntegration: initializeIntegration(context),
|
|
86
|
+
/**
|
|
87
|
+
* Returns a list of API tokens belonging to the current person. This will not
|
|
88
|
+
* include the token values themselves as they are only available when the
|
|
89
|
+
* token is initially created.
|
|
90
|
+
*
|
|
91
|
+
* If there is no person associated with the session, a `NO_PERSON` error will
|
|
92
|
+
* be thrown.
|
|
93
|
+
*/
|
|
94
|
+
getApiTokens: getApiTokens(context)
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
var createWorkniceClient_default = createWorkniceClient;
|
|
98
|
+
export {
|
|
99
|
+
createWorkniceClient_default as default
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=createWorkniceClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/api/createWorkniceClient.ts"],"sourcesContent":["import RequestError from \"@worknice/shared/errors/RequestError\";\nimport ApiError, { ApiErrorCode } from \"./ApiError.js\";\nimport type { ClientConfig, FetchOptions, SuccessfulQueryResult } from \"./_types.js\";\nimport activateIntegration from \"./operations/activateIntegration.js\";\nimport createApiToken from \"./operations/createApiToken.js\";\nimport deleteApiToken from \"./operations/deleteApiToken.js\";\nimport getApiTokens from \"./operations/getApiTokens.js\";\nimport initializeIntegration from \"./operations/initializeIntegration.js\";\n\nconst createWorkniceClient = (clientConfig?: ClientConfig) => {\n const apiUrl = clientConfig?.apiUrl ?? \"https://app.worknice.com/api/graphql\";\n\n const headers: HeadersInit = clientConfig?.accessToken\n ? {\n \"worknice-api-token\": clientConfig.accessToken,\n \"content-type\": \"application/json\",\n }\n : {\n \"content-type\": \"application/json\",\n };\n\n /**\n * Generic helper function for interacting with the Worknice GraphQL API.\n */\n const fetchFromApi = async <Data extends object, Variables extends object>(\n query: string,\n variables?: Variables,\n fetchOptions?: FetchOptions,\n ): Promise<SuccessfulQueryResult<Data>> => {\n try {\n const response = await fetch(apiUrl, {\n ...fetchOptions,\n body: JSON.stringify({\n query,\n variables,\n }),\n credentials: \"include\",\n headers,\n method: \"POST\",\n });\n\n if (!response.ok) {\n throw new RequestError(\"POST\", response);\n }\n\n let result: unknown;\n\n try {\n result = await response.json();\n } catch (error) {\n throw Error(\"Unable to parse response body as JSON.\", { cause: error });\n }\n\n if (typeof result !== \"object\" || result === null) {\n throw Error(\"Response body is not an object.\");\n }\n\n if (!(\"data\" in result) || result.data === null) {\n const cause =\n \"errors\" in result && Array.isArray(result.errors)\n ? new AggregateError(\n result.errors.map((error: unknown) =>\n Error(\n typeof error === \"object\" &&\n error !== null &&\n \"message\" in error &&\n typeof error.message === \"string\"\n ? error.message\n : \"Unknown error.\",\n ),\n ),\n )\n : undefined;\n\n if (!(\"data\" in result)) {\n throw new ApiError(ApiErrorCode.INVALID_QUERY, { cause });\n }\n\n if (result.data === null) {\n throw new ApiError(ApiErrorCode.QUERY_EXECUTION_FAILED, { cause });\n }\n }\n\n return result as SuccessfulQueryResult<Data>;\n } catch (error) {\n if (error instanceof ApiError) {\n throw error;\n }\n throw new ApiError(ApiErrorCode.UNEXPECTED_RESPONSE, { cause: error });\n }\n };\n\n const context = {\n fetchFromApi,\n };\n\n return {\n fetchFromApi,\n\n /**\n * Transitions an integration with an 'UNAUTHORIZED' or 'UNCONFIGURED'\n * status to an 'ACTIVE' status. Optionally, the name of the integration can\n * be set at the same time.\n */\n activateIntegration: activateIntegration(context),\n\n /**\n * Creates a new API token belonging to the current person.\n */\n createApiToken: createApiToken(context),\n\n /**\n * Permanently deletes an API token belonging to the current person.\n */\n deleteApiToken: deleteApiToken(context),\n\n /**\n * Transitions an integration with an 'UNINITIALIZED' status to an 'UNAUTHORIZED' status.\n */\n initializeIntegration: initializeIntegration(context),\n\n /**\n * Returns a list of API tokens belonging to the current person. This will not\n * include the token values themselves as they are only available when the\n * token is initially created.\n *\n * If there is no person associated with the session, a `NO_PERSON` error will\n * be thrown.\n */\n getApiTokens: getApiTokens(context),\n };\n};\n\nexport default createWorkniceClient;\n"],"mappings":"AAAA,OAAO,kBAAkB;AACzB,OAAO,YAAY,oBAAoB;AAEvC,OAAO,yBAAyB;AAChC,OAAO,oBAAoB;AAC3B,OAAO,oBAAoB;AAC3B,OAAO,kBAAkB;AACzB,OAAO,2BAA2B;AAElC,MAAM,uBAAuB,CAAC,iBAAgC;AAC5D,QAAM,SAAS,cAAc,UAAU;AAEvC,QAAM,UAAuB,cAAc,cACvC;AAAA,IACE,sBAAsB,aAAa;AAAA,IACnC,gBAAgB;AAAA,EAClB,IACA;AAAA,IACE,gBAAgB;AAAA,EAClB;AAKJ,QAAM,eAAe,OACnB,OACA,WACA,iBACyC;AACzC,QAAI;AACF,YAAM,WAAW,MAAM,MAAM,QAAQ;AAAA,QACnC,GAAG;AAAA,QACH,MAAM,KAAK,UAAU;AAAA,UACnB;AAAA,UACA;AAAA,QACF,CAAC;AAAA,QACD,aAAa;AAAA,QACb;AAAA,QACA,QAAQ;AAAA,MACV,CAAC;AAED,UAAI,CAAC,SAAS,IAAI;AAChB,cAAM,IAAI,aAAa,QAAQ,QAAQ;AAAA,MACzC;AAEA,UAAI;AAEJ,UAAI;AACF,iBAAS,MAAM,SAAS,KAAK;AAAA,MAC/B,SAAS,OAAO;AACd,cAAM,MAAM,0CAA0C,EAAE,OAAO,MAAM,CAAC;AAAA,MACxE;AAEA,UAAI,OAAO,WAAW,YAAY,WAAW,MAAM;AACjD,cAAM,MAAM,iCAAiC;AAAA,MAC/C;AAEA,UAAI,EAAE,UAAU,WAAW,OAAO,SAAS,MAAM;AAC/C,cAAM,QACJ,YAAY,UAAU,MAAM,QAAQ,OAAO,MAAM,IAC7C,IAAI;AAAA,UACF,OAAO,OAAO;AAAA,YAAI,CAAC,UACjB;AAAA,cACE,OAAO,UAAU,YACf,UAAU,QACV,aAAa,SACb,OAAO,MAAM,YAAY,WACvB,MAAM,UACN;AAAA,YACN;AAAA,UACF;AAAA,QACF,IACA;AAEN,YAAI,EAAE,UAAU,SAAS;AACvB,gBAAM,IAAI,SAAS,aAAa,eAAe,EAAE,MAAM,CAAC;AAAA,QAC1D;AAEA,YAAI,OAAO,SAAS,MAAM;AACxB,gBAAM,IAAI,SAAS,aAAa,wBAAwB,EAAE,MAAM,CAAC;AAAA,QACnE;AAAA,MACF;AAEA,aAAO;AAAA,IACT,SAAS,OAAO;AACd,UAAI,iBAAiB,UAAU;AAC7B,cAAM;AAAA,MACR;AACA,YAAM,IAAI,SAAS,aAAa,qBAAqB,EAAE,OAAO,MAAM,CAAC;AAAA,IACvE;AAAA,EACF;AAEA,QAAM,UAAU;AAAA,IACd;AAAA,EACF;AAEA,SAAO;AAAA,IACL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,qBAAqB,oBAAoB,OAAO;AAAA;AAAA;AAAA;AAAA,IAKhD,gBAAgB,eAAe,OAAO;AAAA;AAAA;AAAA;AAAA,IAKtC,gBAAgB,eAAe,OAAO;AAAA;AAAA;AAAA;AAAA,IAKtC,uBAAuB,sBAAsB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUpD,cAAc,aAAa,OAAO;AAAA,EACpC;AACF;AAEA,IAAO,+BAAQ;","names":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Exact, Scalars, InputMaybe } from '../_generated.js';
|
|
2
|
+
import { F as FetchOptions, S as SuccessfulQueryResult } from '../../_types-DsB4q143.js';
|
|
3
|
+
|
|
4
|
+
declare const activateIntegration: (context: {
|
|
5
|
+
fetchFromApi: <Data extends object, Variables extends object>(query: string, variables?: Variables, fetchOptions?: FetchOptions) => Promise<SuccessfulQueryResult<Data>>;
|
|
6
|
+
}) => (variables: Pick<Exact<{
|
|
7
|
+
id: Scalars["ID"]["input"];
|
|
8
|
+
name?: InputMaybe<Scalars["String"]["input"]>;
|
|
9
|
+
rename: Scalars["Boolean"]["input"];
|
|
10
|
+
}>, "id" | "name">, fetchOptions?: FetchOptions) => Promise<{
|
|
11
|
+
id: string;
|
|
12
|
+
} | {
|
|
13
|
+
id: string;
|
|
14
|
+
} | {
|
|
15
|
+
id: string;
|
|
16
|
+
} | {
|
|
17
|
+
id: string;
|
|
18
|
+
} | {
|
|
19
|
+
id: string;
|
|
20
|
+
}>;
|
|
21
|
+
|
|
22
|
+
export { activateIntegration as default };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import gql from "dedent";
|
|
2
|
+
import createApiOperation from "../createApiOperation.js";
|
|
3
|
+
const activateIntegration = createApiOperation(
|
|
4
|
+
({ fetchFromApi }) => async (variables, fetchOptions) => {
|
|
5
|
+
const result = await fetchFromApi(
|
|
6
|
+
gql`
|
|
7
|
+
mutation ActivateIntegration($id: ID!, $name: String, $rename: Boolean!) {
|
|
8
|
+
activateIntegration(integrationId: $id) {
|
|
9
|
+
id
|
|
10
|
+
}
|
|
11
|
+
updateIntegration(integrationId: $id, name: $name) @include(if: $rename) {
|
|
12
|
+
id
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
`,
|
|
16
|
+
{
|
|
17
|
+
...variables,
|
|
18
|
+
rename: typeof variables.name === "string"
|
|
19
|
+
},
|
|
20
|
+
fetchOptions
|
|
21
|
+
);
|
|
22
|
+
return result.data.activateIntegration;
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
var activateIntegration_default = activateIntegration;
|
|
26
|
+
export {
|
|
27
|
+
activateIntegration_default as default
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=activateIntegration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/api/operations/activateIntegration.ts"],"sourcesContent":["import gql from \"dedent\";\nimport type {\n ActivateIntegrationMutation,\n ActivateIntegrationMutationVariables,\n} from \"../_types.js\";\nimport createApiOperation from \"../createApiOperation.js\";\n\nconst activateIntegration = createApiOperation(\n ({ fetchFromApi }) =>\n async (variables: Pick<ActivateIntegrationMutationVariables, \"id\" | \"name\">, fetchOptions?) => {\n const result = await fetchFromApi<\n ActivateIntegrationMutation,\n ActivateIntegrationMutationVariables\n >(\n gql`\n mutation ActivateIntegration($id: ID!, $name: String, $rename: Boolean!) {\n activateIntegration(integrationId: $id) {\n id\n }\n updateIntegration(integrationId: $id, name: $name) @include(if: $rename) {\n id\n }\n }\n `,\n {\n ...variables,\n rename: typeof variables.name === \"string\",\n },\n fetchOptions,\n );\n\n return result.data.activateIntegration;\n },\n);\n\nexport default activateIntegration;\n"],"mappings":"AAAA,OAAO,SAAS;AAKhB,OAAO,wBAAwB;AAE/B,MAAM,sBAAsB;AAAA,EAC1B,CAAC,EAAE,aAAa,MACd,OAAO,WAAsE,iBAAkB;AAC7F,UAAM,SAAS,MAAM;AAAA,MAInB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAUA;AAAA,QACE,GAAG;AAAA,QACH,QAAQ,OAAO,UAAU,SAAS;AAAA,MACpC;AAAA,MACA;AAAA,IACF;AAEA,WAAO,OAAO,KAAK;AAAA,EACrB;AACJ;AAEA,IAAO,8BAAQ;","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Exact, Scalars } from '../_generated.js';
|
|
2
|
+
import { F as FetchOptions, S as SuccessfulQueryResult } from '../../_types-DsB4q143.js';
|
|
3
|
+
|
|
4
|
+
declare const createApiToken: (context: {
|
|
5
|
+
fetchFromApi: <Data extends object, Variables extends object>(query: string, variables?: Variables, fetchOptions?: FetchOptions) => Promise<SuccessfulQueryResult<Data>>;
|
|
6
|
+
}) => (variables: Exact<{
|
|
7
|
+
name: Scalars["String"]["input"];
|
|
8
|
+
}>, fetchOptions?: FetchOptions) => Promise<{
|
|
9
|
+
token: string;
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
}>;
|
|
13
|
+
|
|
14
|
+
export { createApiToken as default };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import gql from "dedent";
|
|
2
|
+
import assertNotNull from "../assertNotNull.js";
|
|
3
|
+
import createApiOperation from "../createApiOperation.js";
|
|
4
|
+
const createApiToken = createApiOperation(
|
|
5
|
+
({ fetchFromApi }) => async (variables, fetchOptions) => {
|
|
6
|
+
const result = await fetchFromApi(
|
|
7
|
+
gql`
|
|
8
|
+
mutation CreateApiToken($name: String!) {
|
|
9
|
+
createApiToken(name: $name) {
|
|
10
|
+
id
|
|
11
|
+
name
|
|
12
|
+
token
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
`,
|
|
16
|
+
variables,
|
|
17
|
+
fetchOptions
|
|
18
|
+
);
|
|
19
|
+
const token = result.data.createApiToken.token;
|
|
20
|
+
assertNotNull(token, "token");
|
|
21
|
+
return {
|
|
22
|
+
...result.data.createApiToken,
|
|
23
|
+
token
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
var createApiToken_default = createApiToken;
|
|
28
|
+
export {
|
|
29
|
+
createApiToken_default as default
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=createApiToken.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/api/operations/createApiToken.ts"],"sourcesContent":["import gql from \"dedent\";\nimport type { CreateApiTokenMutation, CreateApiTokenMutationVariables } from \"../_types.js\";\nimport assertNotNull from \"../assertNotNull.js\";\nimport createApiOperation from \"../createApiOperation.js\";\n\nconst createApiToken = createApiOperation(\n ({ fetchFromApi }) =>\n async (variables: CreateApiTokenMutationVariables, fetchOptions?) => {\n const result = await fetchFromApi<CreateApiTokenMutation, CreateApiTokenMutationVariables>(\n gql`\n mutation CreateApiToken($name: String!) {\n createApiToken(name: $name) {\n id\n name\n token\n }\n }\n `,\n variables,\n fetchOptions,\n );\n\n const token = result.data.createApiToken.token;\n\n assertNotNull(token, \"token\");\n\n return {\n ...result.data.createApiToken,\n token,\n };\n },\n);\n\nexport default createApiToken;\n"],"mappings":"AAAA,OAAO,SAAS;AAEhB,OAAO,mBAAmB;AAC1B,OAAO,wBAAwB;AAE/B,MAAM,iBAAiB;AAAA,EACrB,CAAC,EAAE,aAAa,MACd,OAAO,WAA4C,iBAAkB;AACnE,UAAM,SAAS,MAAM;AAAA,MACnB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MASA;AAAA,MACA;AAAA,IACF;AAEA,UAAM,QAAQ,OAAO,KAAK,eAAe;AAEzC,kBAAc,OAAO,OAAO;AAE5B,WAAO;AAAA,MACL,GAAG,OAAO,KAAK;AAAA,MACf;AAAA,IACF;AAAA,EACF;AACJ;AAEA,IAAO,yBAAQ;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exact, Scalars } from '../_generated.js';
|
|
2
|
+
import { F as FetchOptions, S as SuccessfulQueryResult } from '../../_types-DsB4q143.js';
|
|
3
|
+
|
|
4
|
+
declare const deleteApiToken: (context: {
|
|
5
|
+
fetchFromApi: <Data extends object, Variables extends object>(query: string, variables?: Variables, fetchOptions?: FetchOptions) => Promise<SuccessfulQueryResult<Data>>;
|
|
6
|
+
}) => (variables: Exact<{
|
|
7
|
+
tokenId: Scalars["ID"]["input"];
|
|
8
|
+
}>, fetchOptions?: FetchOptions) => Promise<boolean>;
|
|
9
|
+
|
|
10
|
+
export { deleteApiToken as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import gql from "dedent";
|
|
2
|
+
import createApiOperation from "../createApiOperation.js";
|
|
3
|
+
const deleteApiToken = createApiOperation(
|
|
4
|
+
({ fetchFromApi }) => async (variables, fetchOptions) => {
|
|
5
|
+
const result = await fetchFromApi(
|
|
6
|
+
gql`
|
|
7
|
+
mutation DeleteApiToken($tokenId: ID!) {
|
|
8
|
+
deleteApiToken(tokenId: $tokenId)
|
|
9
|
+
}
|
|
10
|
+
`,
|
|
11
|
+
variables,
|
|
12
|
+
fetchOptions
|
|
13
|
+
);
|
|
14
|
+
return result.data.deleteApiToken;
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
var deleteApiToken_default = deleteApiToken;
|
|
18
|
+
export {
|
|
19
|
+
deleteApiToken_default as default
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=deleteApiToken.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/api/operations/deleteApiToken.ts"],"sourcesContent":["import gql from \"dedent\";\nimport type { DeleteApiTokenMutation, DeleteApiTokenMutationVariables } from \"../_types.js\";\nimport createApiOperation from \"../createApiOperation.js\";\n\nconst deleteApiToken = createApiOperation(\n ({ fetchFromApi }) =>\n async (variables: DeleteApiTokenMutationVariables, fetchOptions?) => {\n const result = await fetchFromApi<DeleteApiTokenMutation, DeleteApiTokenMutationVariables>(\n gql`\n mutation DeleteApiToken($tokenId: ID!) {\n deleteApiToken(tokenId: $tokenId)\n }\n `,\n variables,\n fetchOptions,\n );\n\n return result.data.deleteApiToken;\n },\n);\n\nexport default deleteApiToken;\n"],"mappings":"AAAA,OAAO,SAAS;AAEhB,OAAO,wBAAwB;AAE/B,MAAM,iBAAiB;AAAA,EACrB,CAAC,EAAE,aAAa,MACd,OAAO,WAA4C,iBAAkB;AACnE,UAAM,SAAS,MAAM;AAAA,MACnB;AAAA;AAAA;AAAA;AAAA;AAAA,MAKA;AAAA,MACA;AAAA,IACF;AAEA,WAAO,OAAO,KAAK;AAAA,EACrB;AACJ;AAEA,IAAO,yBAAQ;","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Exact } from '../_generated.js';
|
|
2
|
+
import { F as FetchOptions, S as SuccessfulQueryResult } from '../../_types-DsB4q143.js';
|
|
3
|
+
|
|
4
|
+
declare const getApiTokens: (context: {
|
|
5
|
+
fetchFromApi: <Data extends object, Variables extends object>(query: string, variables?: Variables, fetchOptions?: FetchOptions) => Promise<SuccessfulQueryResult<Data>>;
|
|
6
|
+
}) => (variables: Exact<{
|
|
7
|
+
[key: string]: never;
|
|
8
|
+
}>, fetchOptions?: FetchOptions) => Promise<{
|
|
9
|
+
createdAt: string;
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
}[]>;
|
|
13
|
+
|
|
14
|
+
export { getApiTokens as default };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import gql from "dedent";
|
|
2
|
+
import { ApiErrorCode } from "../ApiError.js";
|
|
3
|
+
import assertNotNull from "../assertNotNull.js";
|
|
4
|
+
import createApiOperation from "../createApiOperation.js";
|
|
5
|
+
const getApiTokens = createApiOperation(
|
|
6
|
+
({ fetchFromApi }) => async (variables, fetchOptions) => {
|
|
7
|
+
const result = await fetchFromApi(
|
|
8
|
+
gql`
|
|
9
|
+
query GetApiTokens {
|
|
10
|
+
session {
|
|
11
|
+
person {
|
|
12
|
+
apiTokens {
|
|
13
|
+
createdAt
|
|
14
|
+
id
|
|
15
|
+
name
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
`,
|
|
21
|
+
variables,
|
|
22
|
+
fetchOptions
|
|
23
|
+
);
|
|
24
|
+
const person = result.data.session.person;
|
|
25
|
+
assertNotNull(person, "person", ApiErrorCode.NO_PERSON);
|
|
26
|
+
return person.apiTokens;
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
var getApiTokens_default = getApiTokens;
|
|
30
|
+
export {
|
|
31
|
+
getApiTokens_default as default
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=getApiTokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/api/operations/getApiTokens.ts"],"sourcesContent":["import gql from \"dedent\";\nimport type { GetApiTokensQuery, GetApiTokensQueryVariables } from \"../_types.js\";\nimport { ApiErrorCode } from \"../ApiError.js\";\nimport assertNotNull from \"../assertNotNull.js\";\nimport createApiOperation from \"../createApiOperation.js\";\n\nconst getApiTokens = createApiOperation(\n ({ fetchFromApi }) =>\n async (variables: GetApiTokensQueryVariables, fetchOptions?) => {\n const result = await fetchFromApi<GetApiTokensQuery, GetApiTokensQueryVariables>(\n gql`\n query GetApiTokens {\n session {\n person {\n apiTokens {\n createdAt\n id\n name\n }\n }\n }\n }\n `,\n variables,\n fetchOptions,\n );\n\n const person = result.data.session.person;\n\n assertNotNull(person, \"person\", ApiErrorCode.NO_PERSON);\n\n return person.apiTokens;\n },\n);\n\nexport default getApiTokens;\n"],"mappings":"AAAA,OAAO,SAAS;AAEhB,SAAS,oBAAoB;AAC7B,OAAO,mBAAmB;AAC1B,OAAO,wBAAwB;AAE/B,MAAM,eAAe;AAAA,EACnB,CAAC,EAAE,aAAa,MACd,OAAO,WAAuC,iBAAkB;AAC9D,UAAM,SAAS,MAAM;AAAA,MACnB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAaA;AAAA,MACA;AAAA,IACF;AAEA,UAAM,SAAS,OAAO,KAAK,QAAQ;AAEnC,kBAAc,QAAQ,UAAU,aAAa,SAAS;AAEtD,WAAO,OAAO;AAAA,EAChB;AACJ;AAEA,IAAO,uBAAQ;","names":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Exact, Scalars } from '../_generated.js';
|
|
2
|
+
import { F as FetchOptions, S as SuccessfulQueryResult } from '../../_types-DsB4q143.js';
|
|
3
|
+
|
|
4
|
+
declare const initializeIntegration: (context: {
|
|
5
|
+
fetchFromApi: <Data extends object, Variables extends object>(query: string, variables?: Variables, fetchOptions?: FetchOptions) => Promise<SuccessfulQueryResult<Data>>;
|
|
6
|
+
}) => (variables: Exact<{
|
|
7
|
+
id: Scalars["ID"]["input"];
|
|
8
|
+
}>, fetchOptions?: FetchOptions) => Promise<{
|
|
9
|
+
id: string;
|
|
10
|
+
} | {
|
|
11
|
+
id: string;
|
|
12
|
+
} | {
|
|
13
|
+
id: string;
|
|
14
|
+
} | {
|
|
15
|
+
id: string;
|
|
16
|
+
} | {
|
|
17
|
+
id: string;
|
|
18
|
+
}>;
|
|
19
|
+
|
|
20
|
+
export { initializeIntegration as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import gql from "dedent";
|
|
2
|
+
import createApiOperation from "../createApiOperation.js";
|
|
3
|
+
const initializeIntegration = createApiOperation(
|
|
4
|
+
({ fetchFromApi }) => async (variables, fetchOptions) => {
|
|
5
|
+
const result = await fetchFromApi(
|
|
6
|
+
gql`
|
|
7
|
+
mutation InitializeIntegration($id: ID!) {
|
|
8
|
+
initializeIntegration(integrationId: $id) {
|
|
9
|
+
id
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
`,
|
|
13
|
+
variables,
|
|
14
|
+
fetchOptions
|
|
15
|
+
);
|
|
16
|
+
return result.data.initializeIntegration;
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
var initializeIntegration_default = initializeIntegration;
|
|
20
|
+
export {
|
|
21
|
+
initializeIntegration_default as default
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=initializeIntegration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/api/operations/initializeIntegration.ts"],"sourcesContent":["import gql from \"dedent\";\nimport type {\n InitializeIntegrationMutation,\n InitializeIntegrationMutationVariables,\n} from \"../_types.js\";\nimport createApiOperation from \"../createApiOperation.js\";\n\nconst initializeIntegration = createApiOperation(\n ({ fetchFromApi }) =>\n async (variables: InitializeIntegrationMutationVariables, fetchOptions?) => {\n const result = await fetchFromApi<\n InitializeIntegrationMutation,\n InitializeIntegrationMutationVariables\n >(\n gql`\n mutation InitializeIntegration($id: ID!) {\n initializeIntegration(integrationId: $id) {\n id\n }\n }\n `,\n variables,\n fetchOptions,\n );\n\n return result.data.initializeIntegration;\n },\n);\n\nexport default initializeIntegration;\n"],"mappings":"AAAA,OAAO,SAAS;AAKhB,OAAO,wBAAwB;AAE/B,MAAM,wBAAwB;AAAA,EAC5B,CAAC,EAAE,aAAa,MACd,OAAO,WAAmD,iBAAkB;AAC1E,UAAM,SAAS,MAAM;AAAA,MAInB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAOA;AAAA,MACA;AAAA,IACF;AAEA,WAAO,OAAO,KAAK;AAAA,EACrB;AACJ;AAEA,IAAO,gCAAQ;","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PersonDataTransferLine, PartialPersonDataTransferLine } from './_types.js';
|
|
2
|
+
|
|
3
|
+
declare const EQUALITY_CHECKS: {
|
|
4
|
+
[S in keyof PersonDataTransferLine]: {
|
|
5
|
+
[F in keyof NonNullable<PersonDataTransferLine[S]>]: (a: PartialPersonDataTransferLine, b: PartialPersonDataTransferLine) => boolean;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export { EQUALITY_CHECKS as default };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import isSamePlainDate from "@worknice/shared/utils/isSamePlainDate";
|
|
2
|
+
const EQUALITY_CHECKS = {
|
|
3
|
+
bankAccounts: {
|
|
4
|
+
bankAccount1Allocation: (a, b) => a.bankAccounts?.bankAccount1Allocation === b.bankAccounts?.bankAccount1Allocation,
|
|
5
|
+
bankAccount1AllocationMethod: (a, b) => a.bankAccounts?.bankAccount1AllocationMethod === b.bankAccounts?.bankAccount1AllocationMethod,
|
|
6
|
+
bankAccount1Bsb: (a, b) => (a.bankAccounts?.bankAccount1Bsb ?? "").trim() === (b.bankAccounts?.bankAccount1Bsb ?? "").trim(),
|
|
7
|
+
bankAccount1Name: (a, b) => (a.bankAccounts?.bankAccount1Name ?? "").trim() === (b.bankAccounts?.bankAccount1Name ?? "").trim(),
|
|
8
|
+
bankAccount1Number: (a, b) => (a.bankAccounts?.bankAccount1Number ?? "").trim() === (b.bankAccounts?.bankAccount1Number ?? "").trim(),
|
|
9
|
+
bankAccount2Allocation: (a, b) => true,
|
|
10
|
+
bankAccount2AllocationMethod: (a, b) => a.bankAccounts?.bankAccount2AllocationMethod === b.bankAccounts?.bankAccount2AllocationMethod,
|
|
11
|
+
bankAccount2Bsb: (a, b) => (a.bankAccounts?.bankAccount2Number ?? "").trim() === (b.bankAccounts?.bankAccount2Number ?? "").trim(),
|
|
12
|
+
bankAccount2Name: (a, b) => (a.bankAccounts?.bankAccount2Number ?? "").trim() === (b.bankAccounts?.bankAccount2Number ?? "").trim(),
|
|
13
|
+
bankAccount2Number: (a, b) => (a.bankAccounts?.bankAccount2Number ?? "").trim() === (b.bankAccounts?.bankAccount2Number ?? "").trim(),
|
|
14
|
+
bankAccount3Allocation: (a, b) => true,
|
|
15
|
+
bankAccount3AllocationMethod: (a, b) => a.bankAccounts?.bankAccount3AllocationMethod === b.bankAccounts?.bankAccount3AllocationMethod,
|
|
16
|
+
bankAccount3Bsb: (a, b) => (a.bankAccounts?.bankAccount3Number ?? "").trim() === (b.bankAccounts?.bankAccount3Number ?? "").trim(),
|
|
17
|
+
bankAccount3Name: (a, b) => (a.bankAccounts?.bankAccount3Number ?? "").trim() === (b.bankAccounts?.bankAccount3Number ?? "").trim(),
|
|
18
|
+
bankAccount3Number: (a, b) => (a.bankAccounts?.bankAccount3Number ?? "").trim() === (b.bankAccounts?.bankAccount3Number ?? "").trim(),
|
|
19
|
+
bankAccount4Allocation: (a, b) => true,
|
|
20
|
+
bankAccount4AllocationMethod: (a, b) => a.bankAccounts?.bankAccount4AllocationMethod === b.bankAccounts?.bankAccount4AllocationMethod,
|
|
21
|
+
bankAccount4Bsb: (a, b) => (a.bankAccounts?.bankAccount4Number ?? "").trim() === (b.bankAccounts?.bankAccount4Number ?? "").trim(),
|
|
22
|
+
bankAccount4Name: (a, b) => (a.bankAccounts?.bankAccount4Number ?? "").trim() === (b.bankAccounts?.bankAccount4Number ?? "").trim(),
|
|
23
|
+
bankAccount4Number: (a, b) => (a.bankAccounts?.bankAccount4Number ?? "").trim() === (b.bankAccounts?.bankAccount4Number ?? "").trim(),
|
|
24
|
+
bankAccount5Allocation: (a, b) => true,
|
|
25
|
+
bankAccount5AllocationMethod: (a, b) => a.bankAccounts?.bankAccount5AllocationMethod === b.bankAccounts?.bankAccount5AllocationMethod,
|
|
26
|
+
bankAccount5Bsb: (a, b) => (a.bankAccounts?.bankAccount5Number ?? "").trim() === (b.bankAccounts?.bankAccount5Number ?? "").trim(),
|
|
27
|
+
bankAccount5Name: (a, b) => (a.bankAccounts?.bankAccount5Number ?? "").trim() === (b.bankAccounts?.bankAccount5Number ?? "").trim(),
|
|
28
|
+
bankAccount5Number: (a, b) => (a.bankAccounts?.bankAccount5Number ?? "").trim() === (b.bankAccounts?.bankAccount5Number ?? "").trim()
|
|
29
|
+
},
|
|
30
|
+
emergencyContacts: {
|
|
31
|
+
emergencyContact1AddressCity: (a, b) => (a.emergencyContacts?.emergencyContact1AddressCity ?? "").trim() === (b.emergencyContacts?.emergencyContact1AddressCity ?? "").trim(),
|
|
32
|
+
emergencyContact1AddressCountry: (a, b) => (a.emergencyContacts?.emergencyContact1AddressCountry ?? "").trim() === (b.emergencyContacts?.emergencyContact1AddressCountry ?? "").trim(),
|
|
33
|
+
emergencyContact1AddressLine1: (a, b) => (a.emergencyContacts?.emergencyContact1AddressLine1 ?? "").trim() === (b.emergencyContacts?.emergencyContact1AddressLine1 ?? "").trim(),
|
|
34
|
+
emergencyContact1AddressLine2: (a, b) => (a.emergencyContacts?.emergencyContact1AddressLine2 ?? "").trim() === (b.emergencyContacts?.emergencyContact1AddressLine2 ?? "").trim(),
|
|
35
|
+
emergencyContact1AddressPostcode: (a, b) => (a.emergencyContacts?.emergencyContact1AddressPostcode ?? "").trim() === (b.emergencyContacts?.emergencyContact1AddressPostcode ?? "").trim(),
|
|
36
|
+
emergencyContact1AddressState: (a, b) => (a.emergencyContacts?.emergencyContact1AddressState ?? "").trim() === (b.emergencyContacts?.emergencyContact1AddressState ?? "").trim(),
|
|
37
|
+
emergencyContact1Email: (a, b) => (a.emergencyContacts?.emergencyContact1Email ?? "").trim() === (b.emergencyContacts?.emergencyContact1Email ?? "").trim(),
|
|
38
|
+
emergencyContact1Name: (a, b) => (a.emergencyContacts?.emergencyContact1Name ?? "").trim() === (b.emergencyContacts?.emergencyContact1Name ?? "").trim(),
|
|
39
|
+
emergencyContact1Phone: (a, b) => (a.emergencyContacts?.emergencyContact1Phone ?? "").trim() === (b.emergencyContacts?.emergencyContact1Phone ?? "").trim(),
|
|
40
|
+
emergencyContact1Relationship: (a, b) => (a.emergencyContacts?.emergencyContact1Relationship ?? "").trim() === (b.emergencyContacts?.emergencyContact1Relationship ?? "").trim(),
|
|
41
|
+
emergencyContact2AddressCity: (a, b) => (a.emergencyContacts?.emergencyContact2AddressCity ?? "").trim() === (b.emergencyContacts?.emergencyContact2AddressCity ?? "").trim(),
|
|
42
|
+
emergencyContact2AddressCountry: (a, b) => (a.emergencyContacts?.emergencyContact2AddressCountry ?? "").trim() === (b.emergencyContacts?.emergencyContact2AddressCountry ?? "").trim(),
|
|
43
|
+
emergencyContact2AddressLine1: (a, b) => (a.emergencyContacts?.emergencyContact2AddressLine1 ?? "").trim() === (b.emergencyContacts?.emergencyContact2AddressLine1 ?? "").trim(),
|
|
44
|
+
emergencyContact2AddressLine2: (a, b) => (a.emergencyContacts?.emergencyContact2AddressLine2 ?? "").trim() === (b.emergencyContacts?.emergencyContact2AddressLine2 ?? "").trim(),
|
|
45
|
+
emergencyContact2AddressPostcode: (a, b) => (a.emergencyContacts?.emergencyContact2AddressPostcode ?? "").trim() === (b.emergencyContacts?.emergencyContact2AddressPostcode ?? "").trim(),
|
|
46
|
+
emergencyContact2AddressState: (a, b) => (a.emergencyContacts?.emergencyContact2AddressState ?? "").trim() === (b.emergencyContacts?.emergencyContact2AddressState ?? "").trim(),
|
|
47
|
+
emergencyContact2Email: (a, b) => (a.emergencyContacts?.emergencyContact2Email ?? "").trim() === (b.emergencyContacts?.emergencyContact2Email ?? "").trim(),
|
|
48
|
+
emergencyContact2Name: (a, b) => (a.emergencyContacts?.emergencyContact2Name ?? "").trim() === (b.emergencyContacts?.emergencyContact2Name ?? "").trim(),
|
|
49
|
+
emergencyContact2Phone: (a, b) => (a.emergencyContacts?.emergencyContact2Phone ?? "").trim() === (b.emergencyContacts?.emergencyContact2Phone ?? "").trim(),
|
|
50
|
+
emergencyContact2Relationship: (a, b) => (a.emergencyContacts?.emergencyContact2Relationship ?? "").trim() === (b.emergencyContacts?.emergencyContact2Relationship ?? "").trim()
|
|
51
|
+
},
|
|
52
|
+
personalDetails: {
|
|
53
|
+
dateOfBirth: (a, b) => isSamePlainDate(a.personalDetails?.dateOfBirth, b.personalDetails?.dateOfBirth),
|
|
54
|
+
familyName: (a, b) => (a.personalDetails?.familyName ?? "").trim() === (b.personalDetails?.familyName ?? "").trim(),
|
|
55
|
+
employeeCode: (a, b) => (a.personalDetails?.employeeCode ?? "").trim() === (b.personalDetails?.employeeCode ?? "").trim(),
|
|
56
|
+
gender: (a, b) => a.personalDetails?.gender === b.personalDetails?.gender,
|
|
57
|
+
givenName: (a, b) => (a.personalDetails?.givenName ?? "").trim() === (b.personalDetails?.givenName ?? "").trim(),
|
|
58
|
+
otherGivenNames: (a, b) => (a.personalDetails?.otherGivenNames ?? "").trim() === (b.personalDetails?.otherGivenNames ?? "").trim(),
|
|
59
|
+
personalEmail: (a, b) => (a.personalDetails?.personalEmail ?? "").trim() === (b.personalDetails?.personalEmail ?? "").trim(),
|
|
60
|
+
personalPhone: (a, b) => (a.personalDetails?.personalPhone ?? "").trim() === (b.personalDetails?.personalPhone ?? "").trim()
|
|
61
|
+
},
|
|
62
|
+
postalAddress: {
|
|
63
|
+
postalAddressCity: (a, b) => (a.postalAddress?.postalAddressCity ?? "").trim() === (b.postalAddress?.postalAddressCity ?? "").trim(),
|
|
64
|
+
postalAddressCountry: (a, b) => (a.postalAddress?.postalAddressCountry ?? "").trim() === (b.postalAddress?.postalAddressCountry ?? "").trim(),
|
|
65
|
+
postalAddressLine1: (a, b) => (a.postalAddress?.postalAddressLine1 ?? "").trim() === (b.postalAddress?.postalAddressLine1 ?? "").trim(),
|
|
66
|
+
postalAddressLine2: (a, b) => (a.postalAddress?.postalAddressLine2 ?? "").trim() === (b.postalAddress?.postalAddressLine2 ?? "").trim(),
|
|
67
|
+
postalAddressPostcode: (a, b) => (a.postalAddress?.postalAddressPostcode ?? "").trim() === (b.postalAddress?.postalAddressPostcode ?? "").trim(),
|
|
68
|
+
postalAddressState: (a, b) => (a.postalAddress?.postalAddressState ?? "").trim() === (b.postalAddress?.postalAddressState ?? "").trim()
|
|
69
|
+
},
|
|
70
|
+
residentialAddress: {
|
|
71
|
+
residentialAddressCity: (a, b) => (a.residentialAddress?.residentialAddressCity ?? "").trim() === (b.residentialAddress?.residentialAddressCity ?? "").trim(),
|
|
72
|
+
residentialAddressCountry: (a, b) => (a.residentialAddress?.residentialAddressCountry ?? "").trim() === (b.residentialAddress?.residentialAddressCountry ?? "").trim(),
|
|
73
|
+
residentialAddressLine1: (a, b) => (a.residentialAddress?.residentialAddressLine1 ?? "").trim() === (b.residentialAddress?.residentialAddressLine1 ?? "").trim(),
|
|
74
|
+
residentialAddressLine2: (a, b) => (a.residentialAddress?.residentialAddressLine2 ?? "").trim() === (b.residentialAddress?.residentialAddressLine2 ?? "").trim(),
|
|
75
|
+
residentialAddressPostcode: (a, b) => (a.residentialAddress?.residentialAddressPostcode ?? "").trim() === (b.residentialAddress?.residentialAddressPostcode ?? "").trim(),
|
|
76
|
+
residentialAddressState: (a, b) => (a.residentialAddress?.residentialAddressState ?? "").trim() === (b.residentialAddress?.residentialAddressState ?? "").trim()
|
|
77
|
+
},
|
|
78
|
+
superFunds: {
|
|
79
|
+
superFund1MemberName: (a, b) => (a.superFunds?.superFund1MemberName ?? "").trim() === (b.superFunds?.superFund1MemberName ?? "").trim(),
|
|
80
|
+
superFund1MemberNumber: (a, b) => (a.superFunds?.superFund1MemberNumber ?? "").trim() === (b.superFunds?.superFund1MemberNumber ?? "").trim(),
|
|
81
|
+
superFund1Nomination: (a, b) => (a.superFunds?.superFund1Nomination ?? "").trim() === (b.superFunds?.superFund1Nomination ?? "").trim(),
|
|
82
|
+
superFund1Usi: (a, b) => (a.superFunds?.superFund1Usi ?? "").trim() === (b.superFunds?.superFund1Usi ?? "").trim()
|
|
83
|
+
},
|
|
84
|
+
taxDetails: {
|
|
85
|
+
hasLoanOrStudentDebt: (a, b) => a.taxDetails?.hasLoanOrStudentDebt === b.taxDetails?.hasLoanOrStudentDebt,
|
|
86
|
+
residencyStatus: (a, b) => a.taxDetails?.residencyStatus === b.taxDetails?.residencyStatus,
|
|
87
|
+
taxFreeThresholdClaimed: (a, b) => a.taxDetails?.taxFreeThresholdClaimed === b.taxDetails?.taxFreeThresholdClaimed,
|
|
88
|
+
taxFileNumber: (a, b) => (a.taxDetails?.taxFileNumber ?? "").trim() === (b.taxDetails?.taxFileNumber ?? "").trim(),
|
|
89
|
+
taxFileNumberExemption: (a, b) => a.taxDetails?.taxFileNumberExemption === b.taxDetails?.taxFileNumberExemption
|
|
90
|
+
},
|
|
91
|
+
tenure: {
|
|
92
|
+
endDate: (a, b) => isSamePlainDate(a.tenure?.endDate, b.tenure?.endDate),
|
|
93
|
+
startDate: (a, b) => isSamePlainDate(a.tenure?.startDate, b.tenure?.startDate)
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
var EQUALITY_CHECKS_default = EQUALITY_CHECKS;
|
|
97
|
+
export {
|
|
98
|
+
EQUALITY_CHECKS_default as default
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=EQUALITY_CHECKS.js.map
|