You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/lucca/actions/approve-leave-request/approve-leave-request.mjs
+9-8Lines changed: 9 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,10 @@
1
1
importluccafrom"../../lucca.app.mjs";
2
-
import{axios}from"@pipedream/platform";
3
2
4
3
exportdefault{
5
4
key: "lucca-approve-leave-request",
6
-
name: "Approve Leave Request",
7
-
description: "Approve a pending leave request. [See the documentation](https://developers.lucca.fr/api-reference/legacy/timmi-absences/leave-requests/approve-or-deny-a-leave-request)",
8
-
version: "0.0.{{ts}}",
5
+
name: "Approve Or Deny Leave Request",
6
+
description: "Approve or Deny a pending leave request. [See the documentation](https://developers.lucca.fr/api-reference/legacy/timmi-absences/leave-requests/approve-or-deny-a-leave-request)",
7
+
version: "0.0.1",
9
8
type: "action",
10
9
props: {
11
10
lucca,
@@ -18,9 +17,8 @@ export default {
18
17
approved: {
19
18
type: "boolean",
20
19
label: "Approved",
21
-
description: "Whether the leave request should be approved. Defaults to `true`.",
20
+
description: "Whether the leave request should be approved.",
Copy file name to clipboardExpand all lines: components/lucca/actions/update-user-info/update-user-info.mjs
+27-65Lines changed: 27 additions & 65 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,10 @@
1
1
importluccafrom"../../lucca.app.mjs";
2
-
import{axios}from"@pipedream/platform";
3
2
4
3
exportdefault{
5
4
key: "lucca-update-user-info",
6
5
name: "Update User Info",
7
6
description: "Update profile or HR information for an existing user. [See the documentation](https://developers.lucca.fr/api-reference/legacy/directory/update-a-user-by-id)",
8
-
version: "0.0.{{ts}}",
7
+
version: "0.0.1",
9
8
type: "action",
10
9
props: {
11
10
lucca,
@@ -15,13 +14,13 @@ export default {
15
14
"userId",
16
15
],
17
16
},
18
-
firstname: {
17
+
firstName: {
19
18
type: "string",
20
19
label: "First Name",
21
20
description: "The user's first name",
22
21
optional: true,
23
22
},
24
-
lastname: {
23
+
lastName: {
25
24
type: "string",
26
25
label: "Last Name",
27
26
description: "The user's last name",
@@ -39,67 +38,55 @@ export default {
39
38
description: "The user's login",
40
39
optional: true,
41
40
},
42
-
legalentityid: {
41
+
legalEntityId: {
43
42
type: "integer",
44
43
label: "Legal Entity ID",
45
44
description: "The ID of the legal entity",
46
45
optional: true,
47
46
},
48
-
cspid: {
47
+
cspId: {
49
48
type: "integer",
50
49
label: "CSP ID",
51
50
description: "The ID of the CSP",
52
51
optional: true,
53
52
},
54
-
calendarid: {
53
+
calendarId: {
55
54
type: "integer",
56
55
label: "Calendar ID",
57
56
description: "The ID of the calendar",
58
57
optional: true,
59
58
},
60
-
employeenumber: {
59
+
employeeNumber: {
61
60
type: "string",
62
61
label: "Employee Number",
63
62
description: "The employee number",
64
63
optional: true,
65
64
},
66
-
birthdate: {
65
+
birthDate: {
67
66
type: "string",
68
67
label: "Birth Date",
69
68
description: "The birth date of the user. Format: 'YYYY-MM-DD'.",
70
69
optional: true,
71
70
},
72
-
userworkcycles: {
73
-
type: "string[]",
74
-
label: "User Work Cycles",
75
-
description: "An array of user work cycles in JSON format",
76
-
optional: true,
77
-
},
78
-
departmentid: {
71
+
departmentId: {
79
72
type: "integer",
80
73
label: "Department ID",
81
74
description: "The ID of the department",
82
75
optional: true,
83
76
},
84
-
managerid: {
77
+
managerId: {
85
78
type: "integer",
86
79
label: "Manager ID",
87
80
description: "The ID of the manager",
88
81
optional: true,
89
82
},
90
-
roleprincipalid: {
83
+
rolePrincipalId: {
91
84
type: "integer",
92
85
label: "Role Principal ID",
93
86
description: "The ID of the role principal",
94
87
optional: true,
95
88
},
96
-
habilitedroles: {
97
-
type: "string[]",
98
-
label: "Habilited Roles",
99
-
description: "An array of habilited roles in JSON format",
100
-
optional: true,
101
-
},
102
-
cultureid: {
89
+
cultureId: {
103
90
type: "integer",
104
91
label: "Culture ID",
105
92
description: "The ID of the culture",
@@ -111,19 +98,19 @@ export default {
111
98
description: "The address of the user",
112
99
optional: true,
113
100
},
114
-
bankname: {
101
+
bankName: {
115
102
type: "string",
116
103
label: "Bank Name",
117
104
description: "The name of the bank",
118
105
optional: true,
119
106
},
120
-
directline: {
107
+
directLine: {
121
108
type: "string",
122
109
label: "Direct Line",
123
110
description: "The direct line of the user",
124
111
optional: true,
125
112
},
126
-
jobtitle: {
113
+
jobTitle: {
127
114
type: "string",
128
115
label: "Job Title",
129
116
description: "The job title of the user",
@@ -141,19 +128,19 @@ export default {
141
128
description: "The nationality of the user",
142
129
optional: true,
143
130
},
144
-
personalemail: {
131
+
personalEmail: {
145
132
type: "string",
146
133
label: "Personal Email",
147
134
description: "The personal email of the user",
148
135
optional: true,
149
136
},
150
-
personalmobile: {
137
+
personalMobile: {
151
138
type: "string",
152
139
label: "Personal Mobile",
153
140
description: "The personal mobile of the user",
154
141
optional: true,
155
142
},
156
-
professionalmobile: {
143
+
professionalMobile: {
157
144
type: "string",
158
145
label: "Professional Mobile",
159
146
description: "The professional mobile of the user",
@@ -167,41 +154,16 @@ export default {
167
154
},
168
155
},
169
156
asyncrun({ $ }){
170
-
constdata={
171
-
firstName: this.firstname,
172
-
lastName: this.lastname,
173
-
mail: this.mail,
174
-
login: this.login,
175
-
legalEntityId: this.legalentityid,
176
-
cspId: this.cspid,
177
-
calendarId: this.calendarid,
178
-
employeeNumber: this.employeenumber,
179
-
birthDate: this.birthdate,
180
-
userWorkCycles: this.userworkcycles
181
-
? this.userworkcycles.map(JSON.parse)
182
-
: [],
183
-
departmentId: this.departmentid,
184
-
managerId: this.managerid,
185
-
rolePrincipalId: this.roleprincipalid,
186
-
habilitedRoles: this.habilitedroles
187
-
? this.habilitedroles.map(JSON.parse)
188
-
: [],
189
-
cultureId: this.cultureid,
190
-
address: this.address,
191
-
bankName: this.bankname,
192
-
directLine: this.directline,
193
-
jobTitle: this.jobtitle,
194
-
gender: this.gender,
195
-
nationality: this.nationality,
196
-
personalEmail: this.personalemail,
197
-
personalMobile: this.personalmobile,
198
-
professionalMobile: this.professionalmobile,
199
-
quote: this.quote,
200
-
};
157
+
const{
158
+
lucca,
159
+
userId,
160
+
...data
161
+
}=this;
201
162
202
-
constresponse=awaitthis.lucca.updateUserProfile({
203
-
userId: this.userId,
204
-
...data,
163
+
constresponse=awaitlucca.updateUserProfile({
164
+
$,
165
+
userId,
166
+
data,
205
167
});
206
168
207
169
$.export("$summary",`Successfully updated user with ID: ${this.userId}`);
0 commit comments