@probo/n8n-nodes-probo 0.98.0 → 0.99.0

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.
Files changed (25) hide show
  1. package/dist/nodes/Probo/Probo.node.js +5 -0
  2. package/dist/nodes/Probo/Probo.node.js.map +1 -1
  3. package/dist/nodes/Probo/actions/index.js +2 -0
  4. package/dist/nodes/Probo/actions/index.js.map +1 -1
  5. package/dist/nodes/Probo/actions/people/create.operation.d.ts +3 -0
  6. package/dist/nodes/Probo/actions/people/create.operation.js +166 -0
  7. package/dist/nodes/Probo/actions/people/create.operation.js.map +1 -0
  8. package/dist/nodes/Probo/actions/people/delete.operation.d.ts +3 -0
  9. package/dist/nodes/Probo/actions/people/delete.operation.js +37 -0
  10. package/dist/nodes/Probo/actions/people/delete.operation.js.map +1 -0
  11. package/dist/nodes/Probo/actions/people/get.operation.d.ts +3 -0
  12. package/dist/nodes/Probo/actions/people/get.operation.js +51 -0
  13. package/dist/nodes/Probo/actions/people/get.operation.js.map +1 -0
  14. package/dist/nodes/Probo/actions/people/getAll.operation.d.ts +3 -0
  15. package/dist/nodes/Probo/actions/people/getAll.operation.js +94 -0
  16. package/dist/nodes/Probo/actions/people/getAll.operation.js.map +1 -0
  17. package/dist/nodes/Probo/actions/people/index.d.ts +8 -0
  18. package/dist/nodes/Probo/actions/people/index.js +98 -0
  19. package/dist/nodes/Probo/actions/people/index.js.map +1 -0
  20. package/dist/nodes/Probo/actions/people/update.operation.d.ts +3 -0
  21. package/dist/nodes/Probo/actions/people/update.operation.js +167 -0
  22. package/dist/nodes/Probo/actions/people/update.operation.js.map +1 -0
  23. package/dist/package.json +1 -1
  24. package/dist/tsconfig.tsbuildinfo +1 -1
  25. package/package.json +1 -1
@@ -0,0 +1,167 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.description = void 0;
4
+ exports.execute = execute;
5
+ const GenericFunctions_1 = require("../../GenericFunctions");
6
+ exports.description = [
7
+ {
8
+ displayName: 'People ID',
9
+ name: 'peopleId',
10
+ type: 'string',
11
+ displayOptions: {
12
+ show: {
13
+ resource: ['people'],
14
+ operation: ['update'],
15
+ },
16
+ },
17
+ default: '',
18
+ description: 'The ID of the person to update',
19
+ required: true,
20
+ },
21
+ {
22
+ displayName: 'Full Name',
23
+ name: 'fullName',
24
+ type: 'string',
25
+ displayOptions: {
26
+ show: {
27
+ resource: ['people'],
28
+ operation: ['update'],
29
+ },
30
+ },
31
+ default: '',
32
+ description: 'The full name of the person',
33
+ },
34
+ {
35
+ displayName: 'Primary Email Address',
36
+ name: 'primaryEmailAddress',
37
+ type: 'string',
38
+ displayOptions: {
39
+ show: {
40
+ resource: ['people'],
41
+ operation: ['update'],
42
+ },
43
+ },
44
+ default: '',
45
+ description: 'The primary email address of the person',
46
+ },
47
+ {
48
+ displayName: 'Kind',
49
+ name: 'kind',
50
+ type: 'options',
51
+ displayOptions: {
52
+ show: {
53
+ resource: ['people'],
54
+ operation: ['update'],
55
+ },
56
+ },
57
+ options: [
58
+ {
59
+ name: 'Employee',
60
+ value: 'EMPLOYEE',
61
+ },
62
+ {
63
+ name: 'Contractor',
64
+ value: 'CONTRACTOR',
65
+ },
66
+ {
67
+ name: 'Service Account',
68
+ value: 'SERVICE_ACCOUNT',
69
+ },
70
+ ],
71
+ default: 'EMPLOYEE',
72
+ description: 'The kind of person',
73
+ },
74
+ {
75
+ displayName: 'Additional Fields',
76
+ name: 'additionalFields',
77
+ type: 'collection',
78
+ placeholder: 'Add Field',
79
+ default: {},
80
+ displayOptions: {
81
+ show: {
82
+ resource: ['people'],
83
+ operation: ['update'],
84
+ },
85
+ },
86
+ options: [
87
+ {
88
+ displayName: 'Additional Email Addresses',
89
+ name: 'additionalEmailAddresses',
90
+ type: 'string',
91
+ default: '',
92
+ description: 'Comma-separated list of additional email addresses',
93
+ },
94
+ {
95
+ displayName: 'Position',
96
+ name: 'position',
97
+ type: 'string',
98
+ default: '',
99
+ description: 'The position of the person',
100
+ },
101
+ {
102
+ displayName: 'Contract Start Date',
103
+ name: 'contractStartDate',
104
+ type: 'dateTime',
105
+ default: '',
106
+ },
107
+ {
108
+ displayName: 'Contract End Date',
109
+ name: 'contractEndDate',
110
+ type: 'dateTime',
111
+ default: '',
112
+ },
113
+ ],
114
+ },
115
+ ];
116
+ async function execute(itemIndex) {
117
+ const peopleId = this.getNodeParameter('peopleId', itemIndex);
118
+ const fullName = this.getNodeParameter('fullName', itemIndex, '');
119
+ const primaryEmailAddress = this.getNodeParameter('primaryEmailAddress', itemIndex, '');
120
+ const kind = this.getNodeParameter('kind', itemIndex, '');
121
+ const additionalFields = this.getNodeParameter('additionalFields', itemIndex, {});
122
+ const query = `
123
+ mutation UpdatePeople($input: UpdatePeopleInput!) {
124
+ updatePeople(input: $input) {
125
+ people {
126
+ id
127
+ fullName
128
+ primaryEmailAddress
129
+ additionalEmailAddresses
130
+ kind
131
+ position
132
+ contractStartDate
133
+ contractEndDate
134
+ createdAt
135
+ updatedAt
136
+ }
137
+ }
138
+ }
139
+ `;
140
+ const input = { id: peopleId };
141
+ if (fullName)
142
+ input.fullName = fullName;
143
+ if (primaryEmailAddress)
144
+ input.primaryEmailAddress = primaryEmailAddress;
145
+ if (kind)
146
+ input.kind = kind;
147
+ if (additionalFields.additionalEmailAddresses !== undefined) {
148
+ if (additionalFields.additionalEmailAddresses === '') {
149
+ input.additionalEmailAddresses = [];
150
+ }
151
+ else {
152
+ input.additionalEmailAddresses = additionalFields.additionalEmailAddresses.split(',').map((e) => e.trim()).filter(Boolean);
153
+ }
154
+ }
155
+ if (additionalFields.position !== undefined)
156
+ input.position = additionalFields.position === '' ? null : additionalFields.position;
157
+ if (additionalFields.contractStartDate !== undefined)
158
+ input.contractStartDate = additionalFields.contractStartDate === '' ? null : additionalFields.contractStartDate;
159
+ if (additionalFields.contractEndDate !== undefined)
160
+ input.contractEndDate = additionalFields.contractEndDate === '' ? null : additionalFields.contractEndDate;
161
+ const responseData = await GenericFunctions_1.proboApiRequest.call(this, query, { input });
162
+ return {
163
+ json: responseData,
164
+ pairedItem: { item: itemIndex },
165
+ };
166
+ }
167
+ //# sourceMappingURL=update.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.operation.js","sourceRoot":"","sources":["../../../../../nodes/Probo/actions/people/update.operation.ts"],"names":[],"mappings":";;;AAkHA,0BAuDC;AAxKD,6DAAyD;AAE5C,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,QAAQ,CAAC;gBACpB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACrB;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,gCAAgC;QAC7C,QAAQ,EAAE,IAAI;KACd;IACD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,QAAQ,CAAC;gBACpB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACrB;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,6BAA6B;KAC1C;IACD;QACC,WAAW,EAAE,uBAAuB;QACpC,IAAI,EAAE,qBAAqB;QAC3B,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,QAAQ,CAAC;gBACpB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACrB;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,yCAAyC;KACtD;IACD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,SAAS;QACf,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,QAAQ,CAAC;gBACpB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