@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.
@@ -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 employeeId = event['employee_id'] as string | undefined;
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 || !employeeId || !offerLetterDocumentId || !startDate) {
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
- hasEmployeeId: Boolean(employeeId),
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: [employeeId],
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: [employeeId],
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
- employeeId,
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rippling/rippling-sdk",
3
- "version": "0.2.0-alpha.54",
3
+ "version": "0.2.0-alpha.55",
4
4
  "description": "The official TypeScript library for the Rippling SDK API",
5
5
  "author": "Rippling SDK <no-reply@rippling.com>",
6
6
  "types": "./index.d.ts",