@rippling/rippling-sdk 0.2.0-alpha.54 → 0.2.0-alpha.55
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/examples/functions/durable.ts +6 -6
- package/package.json +1 -1
- package/resources/workflow-action-executions.d.mts +1481 -1345
- package/resources/workflow-action-executions.d.mts.map +1 -1
- package/resources/workflow-action-executions.d.ts +1481 -1345
- package/resources/workflow-action-executions.d.ts.map +1 -1
- package/src/resources/workflow-action-executions.ts +1717 -1530
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -16,17 +16,17 @@ export async function onRipplingEvent(
|
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
const workflowDefinitionId = event['workflow_definition_id'] as string | undefined;
|
|
19
|
-
const
|
|
19
|
+
const supergroupId = event['employee_id'] as string | undefined;
|
|
20
20
|
const offerLetterDocumentId = event['offer_letter_document_id'] as string | undefined;
|
|
21
21
|
const startDate = event['start_date'] as string | undefined;
|
|
22
22
|
const signingBonusAmount = Number(event['signing_bonus_amount'] ?? 0);
|
|
23
23
|
|
|
24
|
-
if (!workflowDefinitionId || !
|
|
24
|
+
if (!workflowDefinitionId || !supergroupId || !offerLetterDocumentId || !startDate) {
|
|
25
25
|
context.fail('Missing required onboarding inputs.', {
|
|
26
26
|
code: 'missing_onboarding_inputs',
|
|
27
27
|
details: {
|
|
28
28
|
hasWorkflowDefinitionId: Boolean(workflowDefinitionId),
|
|
29
|
-
|
|
29
|
+
hasSupergroupId: Boolean(supergroupId),
|
|
30
30
|
hasOfferLetterDocumentId: Boolean(offerLetterDocumentId),
|
|
31
31
|
hasStartDate: Boolean(startDate),
|
|
32
32
|
},
|
|
@@ -38,7 +38,7 @@ export async function onRipplingEvent(
|
|
|
38
38
|
action_type: 'send_document',
|
|
39
39
|
payload: {
|
|
40
40
|
document: offerLetterDocumentId,
|
|
41
|
-
recipients:
|
|
41
|
+
recipients: supergroupId,
|
|
42
42
|
},
|
|
43
43
|
workflow_definition_id: workflowDefinitionId,
|
|
44
44
|
});
|
|
@@ -76,7 +76,7 @@ export async function onRipplingEvent(
|
|
|
76
76
|
apply_cap: false,
|
|
77
77
|
description: `Signing bonus for durable run ${context.function.run_id}`,
|
|
78
78
|
payment_amount: signingBonusAmount,
|
|
79
|
-
recipients:
|
|
79
|
+
recipients: supergroupId,
|
|
80
80
|
},
|
|
81
81
|
workflow_definition_id: workflowDefinitionId,
|
|
82
82
|
});
|
|
@@ -86,7 +86,7 @@ export async function onRipplingEvent(
|
|
|
86
86
|
return new FunctionResponse({
|
|
87
87
|
statusCode: 200,
|
|
88
88
|
body: {
|
|
89
|
-
|
|
89
|
+
supergroupId: supergroupId,
|
|
90
90
|
offerStatus: offerCompletion.payload.status,
|
|
91
91
|
signedDocumentId: offerCompletion.payload.signedDocumentId,
|
|
92
92
|
completedAt: offerCompletion.payload.completedAt,
|
package/package.json
CHANGED