Skip to content

Commit 137016c

Browse files
committed
updated
1 parent d87e92f commit 137016c

File tree

5 files changed

+32
-115
lines changed

5 files changed

+32
-115
lines changed

components/workday/actions/create-digital-course/create-digital-course.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export default {
7676
const data = {
7777
topics: parsedTopics,
7878
title: this.title,
79-
availabilityStatus: this.availabilityStatus,
79+
availabilityStatus: utils.parseObject(this.availabilityStatus),
8080
lessons: parsedLessons,
8181
description: this.description,
8282
};

components/workday/actions/create-distribution-request/create-distribution-request.mjs

Lines changed: 0 additions & 80 deletions
This file was deleted.

components/workday/actions/create-mentorship-for-me/create-mentorship-for-me.mjs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ export default {
3030
description: "Purpose of the mentorship.",
3131
},
3232
mentor: {
33-
type: "object",
34-
label: "Mentor",
35-
description: "Object with at least an `id`. Example: `{ id: \"00000000000000000000000000000000\"}`",
33+
propDefinition: [
34+
workday,
35+
"workerId",
36+
],
3637
},
3738
comment: {
3839
type: "string",
@@ -43,8 +44,9 @@ export default {
4344
mentorType: {
4445
type: "object",
4546
label: "Mentor Type",
46-
description: "Object with at least an `id`. Example: `{ id: \"00000000000000000000000000000000\"}`",
47-
optional: true,
47+
description: `Object containing at least an \`id\` property. Example: \`{"id": "00000000000000000000000000000000"}\`.
48+
49+
**Note:** These values are configured within your Workday tenant and can typically be retrieved using a **Workday Report-as-a-Service (RaaS)** or **SOAP API** integration. Please contact your Workday administrator to obtain the valid mentor type IDs available in your environment.`,
4850
},
4951
descriptor: {
5052
type: "string",
@@ -57,20 +59,19 @@ export default {
5759
if (!this.endDate || !this.endDate.trim()) throw new ConfigurationError("End Date is required and cannot be empty.");
5860
if (!this.startDate || !this.startDate.trim()) throw new ConfigurationError("Start Date is required and cannot be empty.");
5961
if (!this.purpose || !this.purpose.trim()) throw new ConfigurationError("Purpose is required and cannot be empty.");
60-
if (!this.mentor || typeof this.mentor !== "object" || !this.mentor.id || !this.mentor.id.trim()) {
61-
throw new ConfigurationError("Mentor is required and must be an object with a non-empty id property.");
62-
}
6362
if (this.mentorType !== undefined) {
6463
if (typeof this.mentorType !== "object" || !this.mentorType.id || !this.mentorType.id.trim()) {
65-
throw new ConfigurationError("If provided, mentorType must be an object with a non-empty id property.");
64+
throw new ConfigurationError("mentorType must be an object with a non-empty id property.");
6665
}
6766
}
6867

6968
const data = {
7069
endDate: this.endDate,
7170
startDate: this.startDate,
7271
purpose: this.purpose,
73-
mentor: this.mentor,
72+
mentor: {
73+
id: this.mentor,
74+
},
7475
};
7576
if (this.comment) data.comment = this.comment;
7677
if (this.mentorType) data.mentorType = this.mentorType;

components/workday/actions/create-mentorship-for-worker/create-mentorship-for-worker.mjs

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,16 @@ export default {
3030
description: "Purpose of the mentorship.",
3131
},
3232
mentor: {
33-
type: "object",
34-
label: "Mentor",
35-
description: "Object with at least an `id` property. Example : `{\"id\": \"00000000000000000000000000000000\"}`",
33+
propDefinition: [
34+
workday,
35+
"workerId",
36+
],
37+
},
38+
mentee: {
39+
propDefinition: [
40+
workday,
41+
"workerId",
42+
],
3643
},
3744
comment: {
3845
type: "string",
@@ -43,12 +50,9 @@ export default {
4350
mentorType: {
4451
type: "object",
4552
label: "Mentor Type",
46-
description: "Object with at least an `id` property. Example payload: `{\"id\": \"00000000000000000000000000000000\"}`",
47-
},
48-
mentee: {
49-
type: "object",
50-
label: "Mentee",
51-
description: "Object with at least an `id` property. Example : `{\"id\": \"00000000000000000000000000000000\"}`",
53+
description: `Object containing at least an \`id\` property. Example: \`{"id": "00000000000000000000000000000000"}\`.
54+
55+
**Note:** These values are configured within your Workday tenant and can typically be retrieved using a **Workday Report-as-a-Service (RaaS)** or **SOAP API** integration. Please contact your Workday administrator to obtain the valid mentor type IDs available in your environment.`,
5256
},
5357
descriptor: {
5458
type: "string",
@@ -61,12 +65,7 @@ export default {
6165
if (!this.endDate || !this.endDate.trim()) throw new ConfigurationError("End Date is required and cannot be empty.");
6266
if (!this.startDate || !this.startDate.trim()) throw new ConfigurationError("Start Date is required and cannot be empty.");
6367
if (!this.purpose || !this.purpose.trim()) throw new ConfigurationError("Purpose is required and cannot be empty.");
64-
if (!this.mentor || typeof this.mentor !== "object" || !this.mentor.id || !this.mentor.id.trim()) {
65-
throw new ConfigurationError("Mentor is required and must be an object with a non-empty id property.");
66-
}
67-
if (!this.mentee || typeof this.mentee !== "object" || !this.mentee.id || !this.mentee.id.trim()) {
68-
throw new ConfigurationError("Mentee is required and must be an object with a non-empty id property.");
69-
}
68+
7069
if (this.mentorType !== undefined) {
7170
if (typeof this.mentorType !== "object" || !this.mentorType.id || !this.mentorType.id.trim()) {
7271
throw new ConfigurationError("If provided, mentorType must be an object with a non-empty id property.");
@@ -77,8 +76,12 @@ export default {
7776
endDate: this.endDate,
7877
startDate: this.startDate,
7978
purpose: this.purpose,
80-
mentor: this.mentor,
81-
mentee: this.mentee,
79+
mentor: {
80+
id: this.mentor,
81+
},
82+
mentee: {
83+
id: this.mentee,
84+
},
8285
mentorType: this.mentorType,
8386
};
8487
if (this.comment) data.comment = this.comment;

components/workday/workday.app.mjs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -836,13 +836,6 @@ export default {
836836
...opts,
837837
});
838838
},
839-
async createDistributionRequest(opts = {}) {
840-
return this._makeRequest({
841-
path: "/distributionRequests",
842-
method: "POST",
843-
...opts,
844-
});
845-
},
846839
async listContent(opts = {}) {
847840
return this._makeRequest({
848841
path: "/content",

0 commit comments

Comments
 (0)