@worknice/js-sdk 0.0.2 → 0.0.4
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/dist/_types-BXw9D0Qi.d.ts +642 -0
- package/dist/api/WorkniceIntegrationLogger.d.ts +99 -0
- package/dist/api/WorkniceIntegrationLogger.js +173 -0
- package/dist/api/WorkniceIntegrationLogger.js.map +1 -0
- package/dist/api/_generated.d.ts +357 -22
- package/dist/api/_generated.js.map +1 -1
- package/dist/api/_types.d.ts +2 -2
- package/dist/api/_types.js +1 -0
- package/dist/api/_types.js.map +1 -1
- package/dist/api/createApiOperation.d.ts +1 -1
- package/dist/api/createWorkniceClient.d.ts +1 -1
- package/dist/api/createWorkniceClient.js +21 -1
- package/dist/api/createWorkniceClient.js.map +1 -1
- package/dist/api/operations/activateIntegration.d.ts +1 -1
- package/dist/api/operations/authorizeIntegration.d.ts +20 -0
- package/dist/api/operations/authorizeIntegration.js +23 -0
- package/dist/api/operations/authorizeIntegration.js.map +1 -0
- package/dist/api/operations/completeSync.d.ts +20 -0
- package/dist/api/operations/completeSync.js +23 -0
- package/dist/api/operations/completeSync.js.map +1 -0
- package/dist/api/operations/createApiToken.d.ts +1 -1
- package/dist/api/operations/createDataImport.d.ts +12 -0
- package/dist/api/operations/createDataImport.js +25 -0
- package/dist/api/operations/createDataImport.js.map +1 -0
- package/dist/api/operations/createPersonConnection.d.ts +132 -0
- package/dist/api/operations/createPersonConnection.js +65 -0
- package/dist/api/operations/createPersonConnection.js.map +1 -0
- package/dist/api/operations/createPersonDataImportLine.d.ts +22 -0
- package/dist/api/operations/createPersonDataImportLine.js +49 -0
- package/dist/api/operations/createPersonDataImportLine.js.map +1 -0
- package/dist/api/operations/deleteApiToken.d.ts +1 -1
- package/dist/api/operations/deletePersonConnection.d.ts +10 -0
- package/dist/api/operations/deletePersonConnection.js +21 -0
- package/dist/api/operations/deletePersonConnection.js.map +1 -0
- package/dist/api/operations/getApiTokens.d.ts +1 -1
- package/dist/api/operations/getIntegration.d.ts +65 -0
- package/dist/api/operations/getIntegration.js +32 -0
- package/dist/api/operations/getIntegration.js.map +1 -0
- package/dist/api/operations/getPeople.d.ts +65 -0
- package/dist/api/operations/getPeople.js +79 -0
- package/dist/api/operations/getPeople.js.map +1 -0
- package/dist/api/operations/getPersonConnections.d.ts +107 -0
- package/dist/api/operations/getPersonConnections.js +43 -0
- package/dist/api/operations/getPersonConnections.js.map +1 -0
- package/dist/api/operations/initializeIntegration.d.ts +1 -1
- package/dist/api/operations/updatePersonConnection.d.ts +132 -0
- package/dist/api/operations/updatePersonConnection.js +65 -0
- package/dist/api/operations/updatePersonConnection.js.map +1 -0
- package/dist/employee-records/EQUALITY_CHECKS.d.ts +1 -0
- package/dist/employee-records/EQUALITY_CHECKS.js +0 -1
- package/dist/employee-records/EQUALITY_CHECKS.js.map +1 -1
- package/dist/employee-records/_types.d.ts +13 -12
- package/dist/employee-records/comparePersonDataTransferLines.d.ts +1 -0
- package/dist/employee-records/comparePersonDataTransferLines.js +0 -3
- package/dist/employee-records/comparePersonDataTransferLines.js.map +1 -1
- package/dist/employee-records/index.d.ts +1 -0
- package/dist/employee-records/mergePersonDataTransferLines.d.ts +1 -0
- package/dist/employee-records/mergePersonDataTransferLines.js +0 -1
- package/dist/employee-records/mergePersonDataTransferLines.js.map +1 -1
- package/dist/employee-records/validatePersonDataTransferLine.d.ts +1 -0
- package/dist/employee-records/validatePersonDataTransferLineBankAccounts.d.ts +1 -0
- package/dist/employee-records/validatePersonDataTransferLineBankAccounts.js +10 -9
- package/dist/employee-records/validatePersonDataTransferLineBankAccounts.js.map +1 -1
- package/dist/employee-records/validatePersonDataTransferLineEmergencyContacts.d.ts +1 -0
- package/dist/employee-records/validatePersonDataTransferLinePersonalDetails.d.ts +1 -0
- package/dist/employee-records/validatePersonDataTransferLinePersonalDetails.js +0 -2
- package/dist/employee-records/validatePersonDataTransferLinePersonalDetails.js.map +1 -1
- package/dist/employee-records/validatePersonDataTransferLinePostalAddress.d.ts +1 -0
- package/dist/employee-records/validatePersonDataTransferLineResidentialAddress.d.ts +1 -0
- package/dist/employee-records/validatePersonDataTransferLineSuperFunds.d.ts +1 -0
- package/dist/employee-records/validatePersonDataTransferLineTaxDetails.d.ts +1 -0
- package/dist/employee-records/validatePersonDataTransferLineTenure.d.ts +1 -0
- package/dist/helpers/_types.d.ts +7 -6
- package/dist/helpers/handleCreateIntegrationWebhook.d.ts +2 -1
- package/dist/helpers/handleCreateIntegrationWebhook.js +6 -4
- package/dist/helpers/handleCreateIntegrationWebhook.js.map +1 -1
- package/dist/helpers/handleGetAuthorizationUrlWebhook.d.ts +2 -1
- package/dist/helpers/handleGetAuthorizationUrlWebhook.js +4 -1
- package/dist/helpers/handleGetAuthorizationUrlWebhook.js.map +1 -1
- package/dist/helpers/handleGetLeaveBalancesWebhook.d.ts +14 -0
- package/dist/helpers/handleGetLeaveBalancesWebhook.js +22 -0
- package/dist/helpers/handleGetLeaveBalancesWebhook.js.map +1 -0
- package/dist/helpers/handleRequestWithWorknice.d.ts +9 -14
- package/dist/helpers/handleRequestWithWorknice.js +40 -19
- package/dist/helpers/handleRequestWithWorknice.js.map +1 -1
- package/dist/helpers/handleTriggerIntegrationSyncWebhook.d.ts +73 -0
- package/dist/helpers/handleTriggerIntegrationSyncWebhook.js +612 -0
- package/dist/helpers/handleTriggerIntegrationSyncWebhook.js.map +1 -0
- package/dist/helpers/index.d.ts +7 -1
- package/dist/helpers/index.js +9 -1
- package/dist/helpers/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/utils/disambiguatePersonConnections.d.ts +25 -0
- package/dist/utils/disambiguatePersonConnections.js +18 -0
- package/dist/utils/disambiguatePersonConnections.js.map +1 -0
- package/dist/utils/isNotNullable.d.ts +10 -0
- package/dist/utils/isNotNullable.js +6 -0
- package/dist/utils/isNotNullable.js.map +1 -0
- package/dist/webhooks.d.ts +13 -1
- package/package.json +8 -4
- package/dist/_types-DsB4q143.d.ts +0 -127
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Exact, Scalars } from '../_generated.js';
|
|
2
|
-
import { F as FetchOptions, S as SuccessfulQueryResult } from '../../_types-
|
|
2
|
+
import { F as FetchOptions, S as SuccessfulQueryResult } from '../../_types-BXw9D0Qi.js';
|
|
3
3
|
|
|
4
4
|
declare const deleteApiToken: (context: {
|
|
5
5
|
fetchFromApi: <Data extends object, Variables extends object>(query: string, variables?: Variables, fetchOptions?: FetchOptions) => Promise<SuccessfulQueryResult<Data>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exact, Scalars } from '../_generated.js';
|
|
2
|
+
import { F as FetchOptions, S as SuccessfulQueryResult } from '../../_types-BXw9D0Qi.js';
|
|
3
|
+
|
|
4
|
+
declare const deletePersonConnection: (context: {
|
|
5
|
+
fetchFromApi: <Data extends object, Variables extends object>(query: string, variables?: Variables, fetchOptions?: FetchOptions) => Promise<SuccessfulQueryResult<Data>>;
|
|
6
|
+
}) => (variables: Exact<{
|
|
7
|
+
personConnectionId: Scalars["ID"]["input"];
|
|
8
|
+
}>, fetchOptions?: FetchOptions) => Promise<boolean>;
|
|
9
|
+
|
|
10
|
+
export { deletePersonConnection as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import gql from "dedent";
|
|
2
|
+
import createApiOperation from "../createApiOperation.js";
|
|
3
|
+
const deletePersonConnection = createApiOperation(
|
|
4
|
+
({ fetchFromApi }) => async (variables, fetchOptions) => {
|
|
5
|
+
const result = await fetchFromApi(
|
|
6
|
+
gql`
|
|
7
|
+
mutation DeletePersonConnection($personConnectionId: ID!) {
|
|
8
|
+
deletePersonConnection(id: $personConnectionId)
|
|
9
|
+
}
|
|
10
|
+
`,
|
|
11
|
+
variables,
|
|
12
|
+
fetchOptions
|
|
13
|
+
);
|
|
14
|
+
return result.data.deletePersonConnection;
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
var deletePersonConnection_default = deletePersonConnection;
|
|
18
|
+
export {
|
|
19
|
+
deletePersonConnection_default as default
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=deletePersonConnection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/api/operations/deletePersonConnection.ts"],"sourcesContent":["import gql from \"dedent\";\nimport type {\n DeletePersonConnectionMutation,\n DeletePersonConnectionMutationVariables,\n} from \"../_types.js\";\nimport createApiOperation from \"../createApiOperation.js\";\n\nconst deletePersonConnection = createApiOperation(\n ({ fetchFromApi }) =>\n async (variables: DeletePersonConnectionMutationVariables, fetchOptions?) => {\n const result = await fetchFromApi<\n DeletePersonConnectionMutation,\n DeletePersonConnectionMutationVariables\n >(\n gql`\n mutation DeletePersonConnection($personConnectionId: ID!) {\n deletePersonConnection(id: $personConnectionId)\n }\n `,\n variables,\n fetchOptions,\n );\n\n return result.data.deletePersonConnection;\n },\n);\n\nexport default deletePersonConnection;\n"],"mappings":"AAAA,OAAO,SAAS;AAKhB,OAAO,wBAAwB;AAE/B,MAAM,yBAAyB;AAAA,EAC7B,CAAC,EAAE,aAAa,MACd,OAAO,WAAoD,iBAAkB;AAC3E,UAAM,SAAS,MAAM;AAAA,MAInB;AAAA;AAAA;AAAA;AAAA;AAAA,MAKA;AAAA,MACA;AAAA,IACF;AAEA,WAAO,OAAO,KAAK;AAAA,EACrB;AACJ;AAEA,IAAO,iCAAQ;","names":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Exact } from '../_generated.js';
|
|
2
|
-
import { F as FetchOptions, S as SuccessfulQueryResult } from '../../_types-
|
|
2
|
+
import { F as FetchOptions, S as SuccessfulQueryResult } from '../../_types-BXw9D0Qi.js';
|
|
3
3
|
|
|
4
4
|
declare const getApiTokens: (context: {
|
|
5
5
|
fetchFromApi: <Data extends object, Variables extends object>(query: string, variables?: Variables, fetchOptions?: FetchOptions) => Promise<SuccessfulQueryResult<Data>>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Exact, Scalars, IntegrationStatus, AppCategory } from '../_generated.js';
|
|
2
|
+
import { F as FetchOptions, S as SuccessfulQueryResult } from '../../_types-BXw9D0Qi.js';
|
|
3
|
+
|
|
4
|
+
declare const getIntegration: (context: {
|
|
5
|
+
fetchFromApi: <Data extends object, Variables extends object>(query: string, variables?: Variables, fetchOptions?: FetchOptions) => Promise<SuccessfulQueryResult<Data>>;
|
|
6
|
+
}) => (variables: Exact<{
|
|
7
|
+
integrationId: Scalars["ID"]["input"];
|
|
8
|
+
}>, fetchOptions?: FetchOptions) => Promise<{
|
|
9
|
+
archived: boolean;
|
|
10
|
+
id: string;
|
|
11
|
+
status: IntegrationStatus;
|
|
12
|
+
app: {
|
|
13
|
+
category: AppCategory;
|
|
14
|
+
name: string;
|
|
15
|
+
};
|
|
16
|
+
org: {
|
|
17
|
+
id: string;
|
|
18
|
+
};
|
|
19
|
+
} | {
|
|
20
|
+
archived: boolean;
|
|
21
|
+
id: string;
|
|
22
|
+
status: IntegrationStatus;
|
|
23
|
+
app: {
|
|
24
|
+
category: AppCategory;
|
|
25
|
+
name: string;
|
|
26
|
+
};
|
|
27
|
+
org: {
|
|
28
|
+
id: string;
|
|
29
|
+
};
|
|
30
|
+
} | {
|
|
31
|
+
archived: boolean;
|
|
32
|
+
id: string;
|
|
33
|
+
status: IntegrationStatus;
|
|
34
|
+
app: {
|
|
35
|
+
category: AppCategory;
|
|
36
|
+
name: string;
|
|
37
|
+
};
|
|
38
|
+
org: {
|
|
39
|
+
id: string;
|
|
40
|
+
};
|
|
41
|
+
} | {
|
|
42
|
+
archived: boolean;
|
|
43
|
+
id: string;
|
|
44
|
+
status: IntegrationStatus;
|
|
45
|
+
app: {
|
|
46
|
+
category: AppCategory;
|
|
47
|
+
name: string;
|
|
48
|
+
};
|
|
49
|
+
org: {
|
|
50
|
+
id: string;
|
|
51
|
+
};
|
|
52
|
+
} | {
|
|
53
|
+
archived: boolean;
|
|
54
|
+
id: string;
|
|
55
|
+
status: IntegrationStatus;
|
|
56
|
+
app: {
|
|
57
|
+
category: AppCategory;
|
|
58
|
+
name: string;
|
|
59
|
+
};
|
|
60
|
+
org: {
|
|
61
|
+
id: string;
|
|
62
|
+
};
|
|
63
|
+
}>;
|
|
64
|
+
|
|
65
|
+
export { getIntegration as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import gql from "dedent";
|
|
2
|
+
import createApiOperation from "../createApiOperation.js";
|
|
3
|
+
const getIntegration = createApiOperation(
|
|
4
|
+
({ fetchFromApi }) => async (variables, fetchOptions) => {
|
|
5
|
+
const result = await fetchFromApi(
|
|
6
|
+
gql`
|
|
7
|
+
query GetIntegration($integrationId: ID!) {
|
|
8
|
+
integration(id: $integrationId) {
|
|
9
|
+
app {
|
|
10
|
+
category
|
|
11
|
+
name
|
|
12
|
+
}
|
|
13
|
+
archived
|
|
14
|
+
id
|
|
15
|
+
org {
|
|
16
|
+
id
|
|
17
|
+
}
|
|
18
|
+
status
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
`,
|
|
22
|
+
variables,
|
|
23
|
+
fetchOptions
|
|
24
|
+
);
|
|
25
|
+
return result.data.integration;
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
var getIntegration_default = getIntegration;
|
|
29
|
+
export {
|
|
30
|
+
getIntegration_default as default
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=getIntegration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/api/operations/getIntegration.ts"],"sourcesContent":["import gql from \"dedent\";\nimport type { GetIntegrationQuery, GetIntegrationQueryVariables } from \"../_types.js\";\nimport createApiOperation from \"../createApiOperation.js\";\n\nconst getIntegration = createApiOperation(\n ({ fetchFromApi }) =>\n async (variables: GetIntegrationQueryVariables, fetchOptions?) => {\n const result = await fetchFromApi<GetIntegrationQuery, GetIntegrationQueryVariables>(\n gql`\n query GetIntegration($integrationId: ID!) {\n integration(id: $integrationId) {\n app {\n category\n name\n }\n archived\n id\n org {\n id\n }\n status\n }\n }\n `,\n variables,\n fetchOptions,\n );\n return result.data.integration;\n },\n);\n\nexport default getIntegration;\n"],"mappings":"AAAA,OAAO,SAAS;AAEhB,OAAO,wBAAwB;AAE/B,MAAM,iBAAiB;AAAA,EACrB,CAAC,EAAE,aAAa,MACd,OAAO,WAAyC,iBAAkB;AAChE,UAAM,SAAS,MAAM;AAAA,MACnB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAgBA;AAAA,MACA;AAAA,IACF;AACA,WAAO,OAAO,KAAK;AAAA,EACrB;AACJ;AAEA,IAAO,yBAAQ;","names":[]}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Exact, Scalars, AllocationMethod, Gender, TaxResidencyStatus, SuperFundNomination, TaxFileNumberExemption } from '../_generated.js';
|
|
2
|
+
import { F as FetchOptions, S as SuccessfulQueryResult } from '../../_types-BXw9D0Qi.js';
|
|
3
|
+
|
|
4
|
+
declare const getPeople: (context: {
|
|
5
|
+
fetchFromApi: <Data extends object, Variables extends object>(query: string, variables?: Variables, fetchOptions?: FetchOptions) => Promise<SuccessfulQueryResult<Data>>;
|
|
6
|
+
}) => (variables: Exact<{
|
|
7
|
+
orgId: Scalars["ID"]["input"];
|
|
8
|
+
}>, fetchOptions?: FetchOptions) => Promise<{
|
|
9
|
+
bankAccount1Allocation?: string | null;
|
|
10
|
+
bankAccount1AllocationMethod?: AllocationMethod | null;
|
|
11
|
+
bankAccount1Bsb?: string | null;
|
|
12
|
+
bankAccount1Name?: string | null;
|
|
13
|
+
bankAccount1Number?: string | null;
|
|
14
|
+
bankAccount2Allocation?: string | null;
|
|
15
|
+
bankAccount2AllocationMethod?: AllocationMethod | null;
|
|
16
|
+
bankAccount2Bsb?: string | null;
|
|
17
|
+
bankAccount2Name?: string | null;
|
|
18
|
+
bankAccount2Number?: string | null;
|
|
19
|
+
bankAccount3Allocation?: string | null;
|
|
20
|
+
bankAccount3AllocationMethod?: AllocationMethod | null;
|
|
21
|
+
bankAccount3Bsb?: string | null;
|
|
22
|
+
bankAccount3Name?: string | null;
|
|
23
|
+
bankAccount3Number?: string | null;
|
|
24
|
+
bankAccount4Allocation?: string | null;
|
|
25
|
+
bankAccount4AllocationMethod?: AllocationMethod | null;
|
|
26
|
+
bankAccount4Bsb?: string | null;
|
|
27
|
+
bankAccount4Name?: string | null;
|
|
28
|
+
bankAccount4Number?: string | null;
|
|
29
|
+
bankAccount5Allocation?: string | null;
|
|
30
|
+
bankAccount5AllocationMethod?: AllocationMethod | null;
|
|
31
|
+
bankAccount5Bsb?: string | null;
|
|
32
|
+
bankAccount5Name?: string | null;
|
|
33
|
+
bankAccount5Number?: string | null;
|
|
34
|
+
dateOfBirth?: string | null;
|
|
35
|
+
displayName: string;
|
|
36
|
+
employeeCode?: string | null;
|
|
37
|
+
endDate?: string | null;
|
|
38
|
+
familyName?: string | null;
|
|
39
|
+
gender?: Gender | null;
|
|
40
|
+
givenName?: string | null;
|
|
41
|
+
hasLoanOrStudentDebt?: boolean | null;
|
|
42
|
+
id: string;
|
|
43
|
+
otherGivenNames?: string | null;
|
|
44
|
+
personalEmail?: string | null;
|
|
45
|
+
personalPhone?: string | null;
|
|
46
|
+
profileEmail?: string | null;
|
|
47
|
+
residencyStatus?: TaxResidencyStatus | null;
|
|
48
|
+
residentialAddressCity?: string | null;
|
|
49
|
+
residentialAddressCountry?: string | null;
|
|
50
|
+
residentialAddressLine1?: string | null;
|
|
51
|
+
residentialAddressLine2?: string | null;
|
|
52
|
+
residentialAddressPostcode?: string | null;
|
|
53
|
+
residentialAddressState?: string | null;
|
|
54
|
+
startDate?: string | null;
|
|
55
|
+
superFund1MemberName?: string | null;
|
|
56
|
+
superFund1MemberNumber?: string | null;
|
|
57
|
+
superFund1Nomination?: SuperFundNomination | null;
|
|
58
|
+
superFund1Usi?: string | null;
|
|
59
|
+
taxFileNumber?: string | null;
|
|
60
|
+
taxFileNumberExemption?: TaxFileNumberExemption | null;
|
|
61
|
+
taxFreeThresholdClaimed?: boolean | null;
|
|
62
|
+
updatedAt: string;
|
|
63
|
+
}[]>;
|
|
64
|
+
|
|
65
|
+
export { getPeople as default };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import gql from "dedent";
|
|
2
|
+
import createApiOperation from "../createApiOperation.js";
|
|
3
|
+
import isNotNullable from "../../utils/isNotNullable.js";
|
|
4
|
+
const getPeople = createApiOperation(
|
|
5
|
+
({ fetchFromApi }) => async (variables, fetchOptions) => {
|
|
6
|
+
const result = await fetchFromApi(
|
|
7
|
+
gql`
|
|
8
|
+
query GetPeople($orgId: ID!) {
|
|
9
|
+
org(id: $orgId) {
|
|
10
|
+
people(status: [DRAFT, ONBOARDING, ACTIVE, TERMINATED]) {
|
|
11
|
+
bankAccount1Allocation
|
|
12
|
+
bankAccount1AllocationMethod
|
|
13
|
+
bankAccount1Bsb
|
|
14
|
+
bankAccount1Name
|
|
15
|
+
bankAccount1Number
|
|
16
|
+
bankAccount2Allocation
|
|
17
|
+
bankAccount2AllocationMethod
|
|
18
|
+
bankAccount2Bsb
|
|
19
|
+
bankAccount2Name
|
|
20
|
+
bankAccount2Number
|
|
21
|
+
bankAccount3Allocation
|
|
22
|
+
bankAccount3AllocationMethod
|
|
23
|
+
bankAccount3Bsb
|
|
24
|
+
bankAccount3Name
|
|
25
|
+
bankAccount3Number
|
|
26
|
+
bankAccount4Allocation
|
|
27
|
+
bankAccount4AllocationMethod
|
|
28
|
+
bankAccount4Bsb
|
|
29
|
+
bankAccount4Name
|
|
30
|
+
bankAccount4Number
|
|
31
|
+
bankAccount5Allocation
|
|
32
|
+
bankAccount5AllocationMethod
|
|
33
|
+
bankAccount5Bsb
|
|
34
|
+
bankAccount5Name
|
|
35
|
+
bankAccount5Number
|
|
36
|
+
dateOfBirth
|
|
37
|
+
displayName
|
|
38
|
+
employeeCode
|
|
39
|
+
endDate
|
|
40
|
+
familyName
|
|
41
|
+
gender
|
|
42
|
+
givenName
|
|
43
|
+
hasLoanOrStudentDebt
|
|
44
|
+
id
|
|
45
|
+
otherGivenNames
|
|
46
|
+
personalEmail
|
|
47
|
+
personalPhone
|
|
48
|
+
profileEmail
|
|
49
|
+
residencyStatus
|
|
50
|
+
residentialAddressCity
|
|
51
|
+
residentialAddressCountry
|
|
52
|
+
residentialAddressLine1
|
|
53
|
+
residentialAddressLine2
|
|
54
|
+
residentialAddressPostcode
|
|
55
|
+
residentialAddressState
|
|
56
|
+
startDate
|
|
57
|
+
superFund1MemberName
|
|
58
|
+
superFund1MemberNumber
|
|
59
|
+
superFund1Nomination
|
|
60
|
+
superFund1Usi
|
|
61
|
+
taxFileNumber
|
|
62
|
+
taxFileNumberExemption
|
|
63
|
+
taxFreeThresholdClaimed
|
|
64
|
+
updatedAt
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
`,
|
|
69
|
+
variables,
|
|
70
|
+
fetchOptions
|
|
71
|
+
);
|
|
72
|
+
return result.data.org.people.filter(isNotNullable);
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
var getPeople_default = getPeople;
|
|
76
|
+
export {
|
|
77
|
+
getPeople_default as default
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=getPeople.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/api/operations/getPeople.ts"],"sourcesContent":["import gql from \"dedent\";\nimport type { GetPeopleQuery, GetPeopleQueryVariables } from \"../_types.js\";\nimport createApiOperation from \"../createApiOperation.js\";\nimport isNotNullable from \"../../utils/isNotNullable.js\";\n\nconst getPeople = createApiOperation(\n ({ fetchFromApi }) =>\n async (variables: GetPeopleQueryVariables, fetchOptions?) => {\n const result = await fetchFromApi<GetPeopleQuery, GetPeopleQueryVariables>(\n gql`\n query GetPeople($orgId: ID!) {\n org(id: $orgId) {\n people(status: [DRAFT, ONBOARDING, ACTIVE, TERMINATED]) {\n bankAccount1Allocation\n bankAccount1AllocationMethod\n bankAccount1Bsb\n bankAccount1Name\n bankAccount1Number\n bankAccount2Allocation\n bankAccount2AllocationMethod\n bankAccount2Bsb\n bankAccount2Name\n bankAccount2Number\n bankAccount3Allocation\n bankAccount3AllocationMethod\n bankAccount3Bsb\n bankAccount3Name\n bankAccount3Number\n bankAccount4Allocation\n bankAccount4AllocationMethod\n bankAccount4Bsb\n bankAccount4Name\n bankAccount4Number\n bankAccount5Allocation\n bankAccount5AllocationMethod\n bankAccount5Bsb\n bankAccount5Name\n bankAccount5Number\n dateOfBirth\n displayName\n employeeCode\n endDate\n familyName\n gender\n givenName\n hasLoanOrStudentDebt\n id\n otherGivenNames\n personalEmail\n personalPhone\n profileEmail\n residencyStatus\n residentialAddressCity\n residentialAddressCountry\n residentialAddressLine1\n residentialAddressLine2\n residentialAddressPostcode\n residentialAddressState\n startDate\n superFund1MemberName\n superFund1MemberNumber\n superFund1Nomination\n superFund1Usi\n taxFileNumber\n taxFileNumberExemption\n taxFreeThresholdClaimed\n updatedAt\n }\n }\n }\n `,\n variables,\n fetchOptions,\n );\n return result.data.org.people.filter(isNotNullable);\n },\n);\n\nexport default getPeople;\n"],"mappings":"AAAA,OAAO,SAAS;AAEhB,OAAO,wBAAwB;AAC/B,OAAO,mBAAmB;AAE1B,MAAM,YAAY;AAAA,EAChB,CAAC,EAAE,aAAa,MACd,OAAO,WAAoC,iBAAkB;AAC3D,UAAM,SAAS,MAAM;AAAA,MACnB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MA8DA;AAAA,MACA;AAAA,IACF;AACA,WAAO,OAAO,KAAK,IAAI,OAAO,OAAO,aAAa;AAAA,EACpD;AACJ;AAEA,IAAO,oBAAQ;","names":[]}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Exact, Scalars, ConnectionStatus } from '../_generated.js';
|
|
2
|
+
import { F as FetchOptions, S as SuccessfulQueryResult } from '../../_types-BXw9D0Qi.js';
|
|
3
|
+
|
|
4
|
+
declare const getPersonConnections: (context: {
|
|
5
|
+
fetchFromApi: <Data extends object, Variables extends object>(query: string, variables?: Variables, fetchOptions?: FetchOptions) => Promise<SuccessfulQueryResult<Data>>;
|
|
6
|
+
}) => (variables: Exact<{
|
|
7
|
+
integrationId: Scalars["ID"]["input"];
|
|
8
|
+
}>, fetchOptions?: FetchOptions) => Promise<(({
|
|
9
|
+
__typename: "PersonConnection";
|
|
10
|
+
createdAt: string;
|
|
11
|
+
id: string;
|
|
12
|
+
status: ConnectionStatus;
|
|
13
|
+
updatedAt: string;
|
|
14
|
+
person?: {
|
|
15
|
+
displayName: string;
|
|
16
|
+
id: string;
|
|
17
|
+
} | null;
|
|
18
|
+
remote?: {
|
|
19
|
+
name: string;
|
|
20
|
+
id: string;
|
|
21
|
+
url?: string | null;
|
|
22
|
+
} | null;
|
|
23
|
+
} & {
|
|
24
|
+
status: ConnectionStatus.Connected;
|
|
25
|
+
remote: {
|
|
26
|
+
name: string;
|
|
27
|
+
id: string;
|
|
28
|
+
url?: string | null;
|
|
29
|
+
};
|
|
30
|
+
person: {
|
|
31
|
+
displayName: string;
|
|
32
|
+
id: string;
|
|
33
|
+
};
|
|
34
|
+
}) | ({
|
|
35
|
+
__typename: "PersonConnection";
|
|
36
|
+
createdAt: string;
|
|
37
|
+
id: string;
|
|
38
|
+
status: ConnectionStatus;
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
person?: {
|
|
41
|
+
displayName: string;
|
|
42
|
+
id: string;
|
|
43
|
+
} | null;
|
|
44
|
+
remote?: {
|
|
45
|
+
name: string;
|
|
46
|
+
id: string;
|
|
47
|
+
url?: string | null;
|
|
48
|
+
} | null;
|
|
49
|
+
} & {
|
|
50
|
+
status: ConnectionStatus.Merged;
|
|
51
|
+
remote: {
|
|
52
|
+
name: string;
|
|
53
|
+
id: string;
|
|
54
|
+
url?: string | null;
|
|
55
|
+
};
|
|
56
|
+
person: {
|
|
57
|
+
displayName: string;
|
|
58
|
+
id: string;
|
|
59
|
+
};
|
|
60
|
+
}) | ({
|
|
61
|
+
__typename: "PersonConnection";
|
|
62
|
+
createdAt: string;
|
|
63
|
+
id: string;
|
|
64
|
+
status: ConnectionStatus;
|
|
65
|
+
updatedAt: string;
|
|
66
|
+
person?: {
|
|
67
|
+
displayName: string;
|
|
68
|
+
id: string;
|
|
69
|
+
} | null;
|
|
70
|
+
remote?: {
|
|
71
|
+
name: string;
|
|
72
|
+
id: string;
|
|
73
|
+
url?: string | null;
|
|
74
|
+
} | null;
|
|
75
|
+
} & {
|
|
76
|
+
status: ConnectionStatus.LocalOnly;
|
|
77
|
+
person: {
|
|
78
|
+
displayName: string;
|
|
79
|
+
id: string;
|
|
80
|
+
};
|
|
81
|
+
remote: null;
|
|
82
|
+
}) | ({
|
|
83
|
+
__typename: "PersonConnection";
|
|
84
|
+
createdAt: string;
|
|
85
|
+
id: string;
|
|
86
|
+
status: ConnectionStatus;
|
|
87
|
+
updatedAt: string;
|
|
88
|
+
person?: {
|
|
89
|
+
displayName: string;
|
|
90
|
+
id: string;
|
|
91
|
+
} | null;
|
|
92
|
+
remote?: {
|
|
93
|
+
name: string;
|
|
94
|
+
id: string;
|
|
95
|
+
url?: string | null;
|
|
96
|
+
} | null;
|
|
97
|
+
} & {
|
|
98
|
+
status: ConnectionStatus.RemoteOnly;
|
|
99
|
+
remote: {
|
|
100
|
+
name: string;
|
|
101
|
+
id: string;
|
|
102
|
+
url?: string | null;
|
|
103
|
+
};
|
|
104
|
+
person: null;
|
|
105
|
+
}))[]>;
|
|
106
|
+
|
|
107
|
+
export { getPersonConnections as default };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import gql from "dedent";
|
|
2
|
+
import disambiguatePersonConnections from "../../utils/disambiguatePersonConnections.js";
|
|
3
|
+
import {
|
|
4
|
+
} from "../_types.js";
|
|
5
|
+
import createApiOperation from "../createApiOperation.js";
|
|
6
|
+
const getPersonConnections = createApiOperation(
|
|
7
|
+
({ fetchFromApi }) => async (variables, fetchOptions) => {
|
|
8
|
+
const result = await fetchFromApi(
|
|
9
|
+
gql`
|
|
10
|
+
query GetPersonConnections($integrationId: ID!) {
|
|
11
|
+
integration(id: $integrationId) {
|
|
12
|
+
connections {
|
|
13
|
+
__typename
|
|
14
|
+
... on PersonConnection {
|
|
15
|
+
createdAt
|
|
16
|
+
id
|
|
17
|
+
person {
|
|
18
|
+
displayName
|
|
19
|
+
id
|
|
20
|
+
}
|
|
21
|
+
remote {
|
|
22
|
+
name
|
|
23
|
+
id
|
|
24
|
+
url
|
|
25
|
+
}
|
|
26
|
+
status
|
|
27
|
+
updatedAt
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`,
|
|
33
|
+
variables,
|
|
34
|
+
fetchOptions
|
|
35
|
+
);
|
|
36
|
+
return result.data.integration.connections.map(disambiguatePersonConnections);
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
var getPersonConnections_default = getPersonConnections;
|
|
40
|
+
export {
|
|
41
|
+
getPersonConnections_default as default
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=getPersonConnections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/api/operations/getPersonConnections.ts"],"sourcesContent":["import gql from \"dedent\";\nimport disambiguatePersonConnections from \"../../utils/disambiguatePersonConnections.js\";\nimport {\n type GetPersonConnectionsQuery,\n type GetPersonConnectionsQueryVariables,\n} from \"../_types.js\";\nimport createApiOperation from \"../createApiOperation.js\";\n\nconst getPersonConnections = createApiOperation(\n ({ fetchFromApi }) =>\n async (variables: GetPersonConnectionsQueryVariables, fetchOptions?) => {\n const result = await fetchFromApi<\n GetPersonConnectionsQuery,\n GetPersonConnectionsQueryVariables\n >(\n gql`\n query GetPersonConnections($integrationId: ID!) {\n integration(id: $integrationId) {\n connections {\n __typename\n ... on PersonConnection {\n createdAt\n id\n person {\n displayName\n id\n }\n remote {\n name\n id\n url\n }\n status\n updatedAt\n }\n }\n }\n }\n `,\n variables,\n fetchOptions,\n );\n\n return result.data.integration.connections.map(disambiguatePersonConnections);\n },\n);\n\nexport default getPersonConnections;\n"],"mappings":"AAAA,OAAO,SAAS;AAChB,OAAO,mCAAmC;AAC1C;AAAA,OAGO;AACP,OAAO,wBAAwB;AAE/B,MAAM,uBAAuB;AAAA,EAC3B,CAAC,EAAE,aAAa,MACd,OAAO,WAA+C,iBAAkB;AACtE,UAAM,SAAS,MAAM;AAAA,MAInB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAwBA;AAAA,MACA;AAAA,IACF;AAEA,WAAO,OAAO,KAAK,YAAY,YAAY,IAAI,6BAA6B;AAAA,EAC9E;AACJ;AAEA,IAAO,+BAAQ;","names":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Exact, Scalars } from '../_generated.js';
|
|
2
|
-
import { F as FetchOptions, S as SuccessfulQueryResult } from '../../_types-
|
|
2
|
+
import { F as FetchOptions, S as SuccessfulQueryResult } from '../../_types-BXw9D0Qi.js';
|
|
3
3
|
|
|
4
4
|
declare const initializeIntegration: (context: {
|
|
5
5
|
fetchFromApi: <Data extends object, Variables extends object>(query: string, variables?: Variables, fetchOptions?: FetchOptions) => Promise<SuccessfulQueryResult<Data>>;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { F as FetchOptions, S as SuccessfulQueryResult } from '../../_types-BXw9D0Qi.js';
|
|
2
|
+
import { ConnectionStatus } from '../_generated.js';
|
|
3
|
+
|
|
4
|
+
declare const updatePersonConnection: (context: {
|
|
5
|
+
fetchFromApi: <Data extends object, Variables extends object>(query: string, variables?: Variables, fetchOptions?: FetchOptions) => Promise<SuccessfulQueryResult<Data>>;
|
|
6
|
+
}) => (variables: {
|
|
7
|
+
personConnectionId: string;
|
|
8
|
+
personId: string;
|
|
9
|
+
remote: {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
};
|
|
13
|
+
status: ConnectionStatus.Connected;
|
|
14
|
+
} | {
|
|
15
|
+
personConnectionId: string;
|
|
16
|
+
personId: string;
|
|
17
|
+
status: ConnectionStatus.LocalOnly;
|
|
18
|
+
} | {
|
|
19
|
+
personConnectionId: string;
|
|
20
|
+
personId: string;
|
|
21
|
+
remote: {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
};
|
|
25
|
+
status: ConnectionStatus.Merged;
|
|
26
|
+
} | {
|
|
27
|
+
personConnectionId: string;
|
|
28
|
+
remote: {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
};
|
|
32
|
+
status: ConnectionStatus.RemoteOnly;
|
|
33
|
+
}, fetchOptions?: FetchOptions) => Promise<({
|
|
34
|
+
__typename: "PersonConnection";
|
|
35
|
+
createdAt: string;
|
|
36
|
+
id: string;
|
|
37
|
+
status: ConnectionStatus;
|
|
38
|
+
updatedAt: string;
|
|
39
|
+
person?: {
|
|
40
|
+
displayName: string;
|
|
41
|
+
id: string;
|
|
42
|
+
} | null;
|
|
43
|
+
remote?: {
|
|
44
|
+
name: string;
|
|
45
|
+
id: string;
|
|
46
|
+
url?: string | null;
|
|
47
|
+
} | null;
|
|
48
|
+
} & {
|
|
49
|
+
status: ConnectionStatus.Connected;
|
|
50
|
+
remote: {
|
|
51
|
+
name: string;
|
|
52
|
+
id: string;
|
|
53
|
+
url?: string | null;
|
|
54
|
+
};
|
|
55
|
+
person: {
|
|
56
|
+
displayName: string;
|
|
57
|
+
id: string;
|
|
58
|
+
};
|
|
59
|
+
}) | ({
|
|
60
|
+
__typename: "PersonConnection";
|
|
61
|
+
createdAt: string;
|
|
62
|
+
id: string;
|
|
63
|
+
status: ConnectionStatus;
|
|
64
|
+
updatedAt: string;
|
|
65
|
+
person?: {
|
|
66
|
+
displayName: string;
|
|
67
|
+
id: string;
|
|
68
|
+
} | null;
|
|
69
|
+
remote?: {
|
|
70
|
+
name: string;
|
|
71
|
+
id: string;
|
|
72
|
+
url?: string | null;
|
|
73
|
+
} | null;
|
|
74
|
+
} & {
|
|
75
|
+
status: ConnectionStatus.Merged;
|
|
76
|
+
remote: {
|
|
77
|
+
name: string;
|
|
78
|
+
id: string;
|
|
79
|
+
url?: string | null;
|
|
80
|
+
};
|
|
81
|
+
person: {
|
|
82
|
+
displayName: string;
|
|
83
|
+
id: string;
|
|
84
|
+
};
|
|
85
|
+
}) | ({
|
|
86
|
+
__typename: "PersonConnection";
|
|
87
|
+
createdAt: string;
|
|
88
|
+
id: string;
|
|
89
|
+
status: ConnectionStatus;
|
|
90
|
+
updatedAt: string;
|
|
91
|
+
person?: {
|
|
92
|
+
displayName: string;
|
|
93
|
+
id: string;
|
|
94
|
+
} | null;
|
|
95
|
+
remote?: {
|
|
96
|
+
name: string;
|
|
97
|
+
id: string;
|
|
98
|
+
url?: string | null;
|
|
99
|
+
} | null;
|
|
100
|
+
} & {
|
|
101
|
+
status: ConnectionStatus.LocalOnly;
|
|
102
|
+
person: {
|
|
103
|
+
displayName: string;
|
|
104
|
+
id: string;
|
|
105
|
+
};
|
|
106
|
+
remote: null;
|
|
107
|
+
}) | ({
|
|
108
|
+
__typename: "PersonConnection";
|
|
109
|
+
createdAt: string;
|
|
110
|
+
id: string;
|
|
111
|
+
status: ConnectionStatus;
|
|
112
|
+
updatedAt: string;
|
|
113
|
+
person?: {
|
|
114
|
+
displayName: string;
|
|
115
|
+
id: string;
|
|
116
|
+
} | null;
|
|
117
|
+
remote?: {
|
|
118
|
+
name: string;
|
|
119
|
+
id: string;
|
|
120
|
+
url?: string | null;
|
|
121
|
+
} | null;
|
|
122
|
+
} & {
|
|
123
|
+
status: ConnectionStatus.RemoteOnly;
|
|
124
|
+
remote: {
|
|
125
|
+
name: string;
|
|
126
|
+
id: string;
|
|
127
|
+
url?: string | null;
|
|
128
|
+
};
|
|
129
|
+
person: null;
|
|
130
|
+
})>;
|
|
131
|
+
|
|
132
|
+
export { updatePersonConnection as default };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import gql from "dedent";
|
|
2
|
+
import disambiguatePersonConnections from "../../utils/disambiguatePersonConnections.js";
|
|
3
|
+
import {
|
|
4
|
+
ConnectionStatus
|
|
5
|
+
} from "../_types.js";
|
|
6
|
+
import createApiOperation from "../createApiOperation.js";
|
|
7
|
+
const updatePersonConnection = createApiOperation(
|
|
8
|
+
({ fetchFromApi }) => async (variables, fetchOptions) => {
|
|
9
|
+
const result = await fetchFromApi(
|
|
10
|
+
gql`
|
|
11
|
+
mutation UpdatePersonConnection(
|
|
12
|
+
$personConnectionId: ID!
|
|
13
|
+
$personId: ID
|
|
14
|
+
$remote: ConnectionRemoteInput
|
|
15
|
+
$status: ConnectionStatus!
|
|
16
|
+
) {
|
|
17
|
+
updatePersonConnection(
|
|
18
|
+
connectionId: $personConnectionId
|
|
19
|
+
personId: $personId
|
|
20
|
+
remote: $remote
|
|
21
|
+
status: $status
|
|
22
|
+
) {
|
|
23
|
+
__typename
|
|
24
|
+
createdAt
|
|
25
|
+
id
|
|
26
|
+
person {
|
|
27
|
+
displayName
|
|
28
|
+
id
|
|
29
|
+
}
|
|
30
|
+
remote {
|
|
31
|
+
name
|
|
32
|
+
id
|
|
33
|
+
url
|
|
34
|
+
}
|
|
35
|
+
status
|
|
36
|
+
updatedAt
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
`,
|
|
40
|
+
variables.status === ConnectionStatus.Connected || variables.status === ConnectionStatus.Merged ? {
|
|
41
|
+
personConnectionId: variables.personConnectionId,
|
|
42
|
+
personId: variables.personId,
|
|
43
|
+
remote: variables.remote,
|
|
44
|
+
status: variables.status
|
|
45
|
+
} : variables.status === ConnectionStatus.LocalOnly ? {
|
|
46
|
+
personConnectionId: variables.personConnectionId,
|
|
47
|
+
personId: variables.personId,
|
|
48
|
+
remote: null,
|
|
49
|
+
status: variables.status
|
|
50
|
+
} : {
|
|
51
|
+
personConnectionId: variables.personConnectionId,
|
|
52
|
+
personId: null,
|
|
53
|
+
remote: variables.remote,
|
|
54
|
+
status: variables.status
|
|
55
|
+
},
|
|
56
|
+
fetchOptions
|
|
57
|
+
);
|
|
58
|
+
return disambiguatePersonConnections(result.data.updatePersonConnection);
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
var updatePersonConnection_default = updatePersonConnection;
|
|
62
|
+
export {
|
|
63
|
+
updatePersonConnection_default as default
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=updatePersonConnection.js.map
|