@rippling/rippling-sdk 0.2.0-alpha.71 → 0.2.0-alpha.73

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.
@@ -1,9 +1,9 @@
1
1
  import RipplingSDK, { DurableFunctionContext, FunctionEvent, FunctionResponse } from '@rippling/rippling-sdk';
2
2
 
3
- type OfferLetterCompletedEvent = {
4
- status: 'signed' | 'declined';
5
- signedDocumentId?: string;
6
- declinedReason?: string;
3
+ type QueryReviewCompletedEvent = {
4
+ status: 'approved' | 'rejected';
5
+ reviewerId?: string;
6
+ rejectionReason?: string;
7
7
  completedAt?: string;
8
8
  };
9
9
 
@@ -16,81 +16,70 @@ export async function onRipplingEvent(
16
16
  });
17
17
 
18
18
  const workflowDefinitionId = event['workflow_definition_id'] as string | undefined;
19
- const supergroupId = event['employee_id'] as string | undefined;
20
- const offerLetterDocumentId = event['offer_letter_document_id'] as string | undefined;
21
- const startDate = event['start_date'] as string | undefined;
22
- const signingBonusAmount = Number(event['signing_bonus_amount'] ?? 0);
19
+ const initialQuery = event['initial_query'] as string | undefined;
20
+ const followUpQuery = event['follow_up_query'] as string | undefined;
21
+ const followUpTime = event['follow_up_time'] as string | undefined;
23
22
 
24
- if (!workflowDefinitionId || !supergroupId || !offerLetterDocumentId || !startDate) {
25
- context.fail('Missing required onboarding inputs.', {
26
- code: 'missing_onboarding_inputs',
23
+ if (!workflowDefinitionId || !initialQuery || !followUpQuery || !followUpTime) {
24
+ context.fail('Missing required query inputs.', {
25
+ code: 'missing_query_inputs',
27
26
  details: {
28
27
  hasWorkflowDefinitionId: Boolean(workflowDefinitionId),
29
- hasSupergroupId: Boolean(supergroupId),
30
- hasOfferLetterDocumentId: Boolean(offerLetterDocumentId),
31
- hasStartDate: Boolean(startDate),
28
+ hasInitialQuery: Boolean(initialQuery),
29
+ hasFollowUpQuery: Boolean(followUpQuery),
30
+ hasFollowUpTime: Boolean(followUpTime),
32
31
  },
33
32
  });
34
33
  }
35
34
 
36
- await context.step('send offer letter document', async () => {
35
+ await context.step('run initial query', async () => {
37
36
  await client.workflowActionExecutions.create({
38
- action_type: 'send_document',
37
+ action_type: 'run_query',
39
38
  payload: {
40
- document: offerLetterDocumentId,
41
- recipients: supergroupId,
39
+ query: initialQuery,
42
40
  },
43
41
  workflow_definition_id: workflowDefinitionId,
44
42
  });
45
43
  });
46
44
 
47
- const offerCompletion = await context.waitForEvent<OfferLetterCompletedEvent>(
48
- 'wait for signed offer letter',
49
- {
50
- type: 'offer_letter_completed',
51
- timeout: '7 days',
52
- },
53
- );
45
+ const queryReview = await context.waitForEvent<QueryReviewCompletedEvent>('wait for query review', {
46
+ type: 'query_review_completed',
47
+ timeout: '7 days',
48
+ });
54
49
 
55
- if (offerCompletion.isTimeout()) {
56
- context.fail('Offer letter was not completed before the deadline.', {
57
- code: 'offer_letter_timeout',
58
- details: offerCompletion,
50
+ if (queryReview.isTimeout()) {
51
+ context.fail('The query was not reviewed before the deadline.', {
52
+ code: 'query_review_timeout',
53
+ details: queryReview,
59
54
  });
60
55
  }
61
56
 
62
- if (offerCompletion.payload.status !== 'signed') {
63
- context.fail('Offer letter was declined.', {
64
- code: 'offer_letter_declined',
65
- details: offerCompletion.payload,
57
+ if (queryReview.payload.status !== 'approved') {
58
+ context.fail('The query was rejected.', {
59
+ code: 'query_rejected',
60
+ details: queryReview.payload,
66
61
  });
67
62
  }
68
63
 
69
- await context.sleepUntil('wait until employee start date', startDate);
64
+ await context.sleepUntil('wait until follow-up time', followUpTime);
70
65
 
71
- if (signingBonusAmount > 0) {
72
- await context.step('schedule signing bonus payment', async () => {
73
- await client.workflowActionExecutions.create({
74
- action_type: 'make_payment',
75
- payload: {
76
- apply_cap: false,
77
- description: `Signing bonus for durable run ${context.function.run_id}`,
78
- payment_amount: signingBonusAmount,
79
- recipients: supergroupId,
80
- },
81
- workflow_definition_id: workflowDefinitionId,
82
- });
66
+ await context.step('run follow-up query', async () => {
67
+ await client.workflowActionExecutions.create({
68
+ action_type: 'run_query',
69
+ payload: {
70
+ query: followUpQuery,
71
+ },
72
+ workflow_definition_id: workflowDefinitionId,
83
73
  });
84
- }
74
+ });
85
75
 
86
76
  return new FunctionResponse({
87
77
  statusCode: 200,
88
78
  body: {
89
- supergroupId: supergroupId,
90
- offerStatus: offerCompletion.payload.status,
91
- signedDocumentId: offerCompletion.payload.signedDocumentId,
92
- completedAt: offerCompletion.payload.completedAt,
93
- signingBonusScheduled: signingBonusAmount > 0,
79
+ reviewStatus: queryReview.payload.status,
80
+ reviewerId: queryReview.payload.reviewerId,
81
+ completedAt: queryReview.payload.completedAt,
82
+ followUpQueryCompleted: true,
94
83
  },
95
84
  });
96
85
  }
@@ -15,7 +15,7 @@ import {
15
15
  CustomObjectFieldSection,
16
16
  ManifestBuilder,
17
17
  ManifestFunction,
18
- SelectField,
18
+ RadioField,
19
19
  Workflow,
20
20
  } from '@rippling/rippling-sdk/lib/manifest';
21
21
 
@@ -44,7 +44,7 @@ const detailsSection = new CustomObjectFieldSection(intakeRequest, {
44
44
  sectionId: 'sec_intake_request_details',
45
45
  });
46
46
 
47
- new SelectField(intakeRequest, {
47
+ new RadioField(intakeRequest, {
48
48
  apiName: 'status__c',
49
49
  displayName: 'Status',
50
50
  description: 'Request status',
@@ -35,7 +35,7 @@ import {
35
35
  ParentChildField,
36
36
  PhoneField,
37
37
  Rule,
38
- SelectField,
38
+ RadioField,
39
39
  SduiPage,
40
40
  SummaryField,
41
41
  TextField,
@@ -164,7 +164,7 @@ const providerSection = new CustomObjectFieldSection(providerObj, {
164
164
 
165
165
  const providerNameField = providerObj.standardFields.name;
166
166
 
167
- const providerStatusField = new SelectField(providerObj, {
167
+ const providerStatusField = new RadioField(providerObj, {
168
168
  apiName: 'provider_status__c',
169
169
  displayName: 'Status',
170
170
  description: 'Whether this provider is active in the practice',
@@ -173,7 +173,7 @@ const providerStatusField = new SelectField(providerObj, {
173
173
  section: providerSection,
174
174
  });
175
175
 
176
- const providerBookingStatusField = new SelectField(providerObj, {
176
+ const providerBookingStatusField = new RadioField(providerObj, {
177
177
  apiName: 'booking_status__c',
178
178
  displayName: 'Booking status',
179
179
  description: 'Whether scheduling should offer this provider for new appointments',
@@ -287,7 +287,7 @@ const apptProviderRef = new LookupField(apptObj, {
287
287
  section: apptPatientSection,
288
288
  });
289
289
 
290
- const apptVisitTypeField = new SelectField(apptObj, {
290
+ const apptVisitTypeField = new RadioField(apptObj, {
291
291
  apiName: 'visit_type__c',
292
292
  displayName: 'Visit type',
293
293
  description: 'Visit type field',
@@ -307,7 +307,7 @@ const apptVisitTypeField = new SelectField(apptObj, {
307
307
  section: apptPatientSection,
308
308
  });
309
309
 
310
- const apptStatusField = new SelectField(apptObj, {
310
+ const apptStatusField = new RadioField(apptObj, {
311
311
  apiName: 'appointment_status__c',
312
312
  displayName: 'Visit status',
313
313
  options: ['Scheduled', 'Checked in', 'In treatment', 'Completed', 'Cancelled', 'No-show'],
@@ -367,7 +367,7 @@ const planPatientRef = new ParentChildField(planObj, {
367
367
  section: planLinkSection,
368
368
  });
369
369
 
370
- const planStatusField = new SelectField(planObj, {
370
+ const planStatusField = new RadioField(planObj, {
371
371
  apiName: 'plan_status__c',
372
372
  displayName: 'Status',
373
373
  description: 'Status field',
@@ -437,7 +437,7 @@ new Rule(apptObj, {
437
437
  flowName: 'Default visit status to Scheduled',
438
438
  triggerType: 'CREATE',
439
439
  description: 'New bookings start as Scheduled unless the team changes it',
440
- actions: [{ targetField: apptStatusField, fixedValue: ['Scheduled'] }],
440
+ actions: [{ targetField: apptStatusField, fixedValue: 'Scheduled' }],
441
441
  });
442
442
 
443
443
  // ── List views ─────────────────────────────────────────────────────────────
@@ -16,7 +16,7 @@ import {
16
16
  CustomObjectPageLayout,
17
17
  type ExistingManifest,
18
18
  ManifestBuilder,
19
- SelectField,
19
+ RadioField,
20
20
  TextField,
21
21
  } from '@rippling/rippling-sdk/lib/manifest';
22
22
 
@@ -200,7 +200,7 @@ const marketingSection = new CustomObjectFieldSection(memberObj, {
200
200
  sectionId: 'sec_gm_marketing',
201
201
  name: 'Marketing',
202
202
  });
203
- const marketingOptIn = new SelectField(memberObj, {
203
+ const marketingOptIn = new RadioField(memberObj, {
204
204
  apiName: 'marketing_opt_in__c',
205
205
  displayName: 'Marketing opt-in',
206
206
  description: 'Marketing opt-in field',
@@ -27,7 +27,7 @@ import {
27
27
  NumberField,
28
28
  ParentChildField,
29
29
  Rule,
30
- SelectField,
30
+ RadioField,
31
31
  SummaryField,
32
32
  TextField,
33
33
  Validation,
@@ -75,7 +75,7 @@ const siteAddressField = new LongTextField(siteObj, {
75
75
  section: siteSection,
76
76
  });
77
77
 
78
- const siteTierField = new SelectField(siteObj, {
78
+ const siteTierField = new RadioField(siteObj, {
79
79
  apiName: 'service_tier__c',
80
80
  displayName: 'Service tier',
81
81
  description: 'SLA tier for dispatch prioritization',
@@ -116,7 +116,7 @@ const assetSerialField = new TextField(assetObj, {
116
116
  section: assetSection,
117
117
  });
118
118
 
119
- const assetTypeField = new SelectField(assetObj, {
119
+ const assetTypeField = new RadioField(assetObj, {
120
120
  apiName: 'asset_type__c',
121
121
  displayName: 'Asset type',
122
122
  description: 'Equipment category',
@@ -165,7 +165,7 @@ const workOrderAssetRef = new LookupField(workOrderObj, {
165
165
  section: workOrderSection,
166
166
  });
167
167
 
168
- const workOrderPriorityField = new SelectField(workOrderObj, {
168
+ const workOrderPriorityField = new RadioField(workOrderObj, {
169
169
  apiName: 'priority__c',
170
170
  displayName: 'Priority',
171
171
  description: 'Dispatch priority',
@@ -174,7 +174,7 @@ const workOrderPriorityField = new SelectField(workOrderObj, {
174
174
  section: workOrderSection,
175
175
  });
176
176
 
177
- const workOrderStatusField = new SelectField(workOrderObj, {
177
+ const workOrderStatusField = new RadioField(workOrderObj, {
178
178
  apiName: 'status__c',
179
179
  displayName: 'Status',
180
180
  description: 'Current dispatch status',
@@ -229,7 +229,7 @@ const taskWorkOrderRef = new ParentChildField(taskObj, {
229
229
  section: taskSection,
230
230
  });
231
231
 
232
- const taskTypeField = new SelectField(taskObj, {
232
+ const taskTypeField = new RadioField(taskObj, {
233
233
  apiName: 'task_type__c',
234
234
  displayName: 'Task type',
235
235
  description: 'Type of work required',
@@ -238,7 +238,7 @@ const taskTypeField = new SelectField(taskObj, {
238
238
  section: taskSection,
239
239
  });
240
240
 
241
- const taskStatusField = new SelectField(taskObj, {
241
+ const taskStatusField = new RadioField(taskObj, {
242
242
  apiName: 'status__c',
243
243
  displayName: 'Status',
244
244
  description: 'Task status',
@@ -399,7 +399,7 @@ new Rule(workOrderObj, {
399
399
  flowName: 'Default work order status',
400
400
  triggerType: 'CREATE',
401
401
  description: 'New work orders start in New status',
402
- actions: [{ targetField: workOrderStatusField, fixedValue: ['New'] }],
402
+ actions: [{ targetField: workOrderStatusField, fixedValue: 'New' }],
403
403
  });
404
404
 
405
405
  new Rule(taskObj, {
@@ -407,7 +407,7 @@ new Rule(taskObj, {
407
407
  flowName: 'Default task status',
408
408
  triggerType: 'CREATE',
409
409
  description: 'New tasks start Open',
410
- actions: [{ targetField: taskStatusField, fixedValue: ['Open'] }],
410
+ actions: [{ targetField: taskStatusField, fixedValue: 'Open' }],
411
411
  });
412
412
 
413
413
  new ListViewDef(siteObj, {
@@ -28,7 +28,7 @@ import {
28
28
  NumberField,
29
29
  ParentChildField,
30
30
  Rule,
31
- SelectField,
31
+ RadioField,
32
32
  SummaryField,
33
33
  TextField,
34
34
  Validation,
@@ -59,7 +59,7 @@ const programSection = new CustomObjectFieldSection(programObj, {
59
59
  sectionId: 'sec_gpm_program',
60
60
  });
61
61
 
62
- const programFocusField = new SelectField(programObj, {
62
+ const programFocusField = new RadioField(programObj, {
63
63
  apiName: 'focus_area__c',
64
64
  displayName: 'Focus area',
65
65
  description: 'Program focus area',
@@ -108,7 +108,7 @@ const grantProgramRef = new ParentChildField(grantObj, {
108
108
  section: grantSection,
109
109
  });
110
110
 
111
- const grantStatusField = new SelectField(grantObj, {
111
+ const grantStatusField = new RadioField(grantObj, {
112
112
  apiName: 'status__c',
113
113
  displayName: 'Status',
114
114
  description: 'Grant cycle status',
@@ -161,7 +161,7 @@ const applicantLegalNameField = new TextField(applicantObj, {
161
161
  section: applicantSection,
162
162
  });
163
163
 
164
- const applicantTypeField = new SelectField(applicantObj, {
164
+ const applicantTypeField = new RadioField(applicantObj, {
165
165
  apiName: 'applicant_type__c',
166
166
  displayName: 'Applicant type',
167
167
  description: 'Applicant organization type',
@@ -211,7 +211,7 @@ const applicationApplicantRef = new LookupField(applicationObj, {
211
211
  section: applicationSection,
212
212
  });
213
213
 
214
- const applicationStatusField = new SelectField(applicationObj, {
214
+ const applicationStatusField = new RadioField(applicationObj, {
215
215
  apiName: 'status__c',
216
216
  displayName: 'Status',
217
217
  description: 'Application review state',
@@ -277,7 +277,7 @@ const milestoneDueDateField = new DateField(milestoneObj, {
277
277
  section: milestoneSection,
278
278
  });
279
279
 
280
- const milestoneStatusField = new SelectField(milestoneObj, {
280
+ const milestoneStatusField = new RadioField(milestoneObj, {
281
281
  apiName: 'status__c',
282
282
  displayName: 'Status',
283
283
  description: 'Milestone status',
@@ -319,7 +319,7 @@ const disbursementAmountCentsField = new NumberField(disbursementObj, {
319
319
  section: disbursementSection,
320
320
  });
321
321
 
322
- const disbursementStatusField = new SelectField(disbursementObj, {
322
+ const disbursementStatusField = new RadioField(disbursementObj, {
323
323
  apiName: 'status__c',
324
324
  displayName: 'Status',
325
325
  description: 'Disbursement status',
@@ -433,7 +433,7 @@ new Rule(applicationObj, {
433
433
  flowName: 'Default application status',
434
434
  triggerType: 'CREATE',
435
435
  description: 'New applications start as Draft',
436
- actions: [{ targetField: applicationStatusField, fixedValue: ['Draft'] }],
436
+ actions: [{ targetField: applicationStatusField, fixedValue: 'Draft' }],
437
437
  });
438
438
 
439
439
  new Rule(milestoneObj, {
@@ -441,7 +441,7 @@ new Rule(milestoneObj, {
441
441
  flowName: 'Default milestone status',
442
442
  triggerType: 'CREATE',
443
443
  description: 'New milestones start Not started',
444
- actions: [{ targetField: milestoneStatusField, fixedValue: ['Not started'] }],
444
+ actions: [{ targetField: milestoneStatusField, fixedValue: 'Not started' }],
445
445
  });
446
446
 
447
447
  new ListViewDef(programObj, {
@@ -34,6 +34,7 @@ import {
34
34
  NumberField,
35
35
  ParentChildField,
36
36
  PhoneField,
37
+ RadioField,
37
38
  Rule,
38
39
  SelectField,
39
40
  SduiPage,
@@ -108,7 +109,7 @@ const memberPhone = new PhoneField(memberObj, {
108
109
  section: memberProfileSection,
109
110
  });
110
111
 
111
- const memberStatusField = new SelectField(memberObj, {
112
+ const memberStatusField = new RadioField(memberObj, {
112
113
  apiName: 'membership_status__c',
113
114
  displayName: 'Membership status',
114
115
  description: 'Membership status field',
@@ -132,6 +133,14 @@ const memberEmergencyField = new LongTextField(memberObj, {
132
133
  section: memberMembershipSection,
133
134
  });
134
135
 
136
+ const memberPreferredClassTypesField = new SelectField(memberObj, {
137
+ apiName: 'preferred_class_types__c',
138
+ displayName: 'Preferred class types',
139
+ description: 'One or more class types the member enjoys',
140
+ options: ['Yoga', 'Spin', 'HIIT', 'Strength', 'Pilates', 'Dance', 'Aquatics'],
141
+ section: memberMembershipSection,
142
+ });
143
+
135
144
  // ── Trainer ─────────────────────────────────────────────────────────────────
136
145
  const trainerObj = new CustomObject(manifest, {
137
146
  apiName: 'gym_trainer__c',
@@ -154,7 +163,7 @@ const trainerEmailField = new EmailField(trainerObj, {
154
163
  section: trainerSection,
155
164
  });
156
165
 
157
- const trainerSpecialtyField = new SelectField(trainerObj, {
166
+ const trainerSpecialtyField = new RadioField(trainerObj, {
158
167
  apiName: 'specialty__c',
159
168
  displayName: 'Primary specialty',
160
169
  description: 'Primary specialty field',
@@ -226,7 +235,7 @@ const sessionEndField = new DatetimeField(sessionObj, {
226
235
  section: sessionScheduleSection,
227
236
  });
228
237
 
229
- const sessionClassTypeField = new SelectField(sessionObj, {
238
+ const sessionClassTypeField = new RadioField(sessionObj, {
230
239
  apiName: 'class_type__c',
231
240
  displayName: 'Class type',
232
241
  description: 'Class type field',
@@ -329,7 +338,7 @@ const enrollmentMemberRef = new LookupField(enrollmentObj, {
329
338
  section: enrollmentSessionSection,
330
339
  });
331
340
 
332
- const enrollmentAttendanceField = new SelectField(enrollmentObj, {
341
+ const enrollmentAttendanceField = new RadioField(enrollmentObj, {
333
342
  apiName: 'attendance_status__c',
334
343
  displayName: 'Attendance',
335
344
  options: ['Registered', 'Checked in', 'Late', 'No-show', 'Cancelled'],
@@ -395,7 +404,7 @@ new Rule(enrollmentObj, {
395
404
  flowName: 'Default attendance to Registered',
396
405
  triggerType: 'CREATE',
397
406
  description: 'New roster rows start as Registered unless changed',
398
- actions: [{ targetField: enrollmentAttendanceField, fixedValue: ['Registered'] }],
407
+ actions: [{ targetField: enrollmentAttendanceField, fixedValue: 'Registered' }],
399
408
  });
400
409
 
401
410
  // ── List views ───────────────────────────────────────────────────────────────
@@ -403,7 +412,14 @@ new ListViewDef(memberObj, {
403
412
  viewId: 'view_gym_all_members',
404
413
  name: 'All members',
405
414
  description: 'Directory with membership status',
406
- fields: ['name', memberEmail, memberPhone, memberStatusField, memberJoinDate],
415
+ fields: [
416
+ 'name',
417
+ memberEmail,
418
+ memberPhone,
419
+ memberStatusField,
420
+ memberPreferredClassTypesField,
421
+ memberJoinDate,
422
+ ],
407
423
  orderBy: 'name',
408
424
  sortOrder: 'ASC',
409
425
  isPublic: true,
@@ -510,7 +526,7 @@ new CustomObjectPageLayout(memberObj, {
510
526
  name: 'Membership',
511
527
  type: 'fields_section',
512
528
  section: memberMembershipSection,
513
- fields: [memberStatusField, memberJoinDate, memberEmergencyField],
529
+ fields: [memberStatusField, memberPreferredClassTypesField, memberJoinDate, memberEmergencyField],
514
530
  },
515
531
  ],
516
532
  },
@@ -28,7 +28,7 @@ import {
28
28
  NumberField,
29
29
  ParentChildField,
30
30
  Rule,
31
- SelectField,
31
+ RadioField,
32
32
  SummaryField,
33
33
  TextField,
34
34
  Validation,
@@ -69,7 +69,7 @@ const vendorLegalNameField = new TextField(vendorObj, {
69
69
  section: vendorSection,
70
70
  });
71
71
 
72
- const vendorCategoryField = new SelectField(vendorObj, {
72
+ const vendorCategoryField = new RadioField(vendorObj, {
73
73
  apiName: 'vendor_category__c',
74
74
  displayName: 'Vendor category',
75
75
  description: 'Primary spend category',
@@ -78,7 +78,7 @@ const vendorCategoryField = new SelectField(vendorObj, {
78
78
  section: vendorSection,
79
79
  });
80
80
 
81
- const vendorRiskField = new SelectField(vendorObj, {
81
+ const vendorRiskField = new RadioField(vendorObj, {
82
82
  apiName: 'risk_tier__c',
83
83
  displayName: 'Risk tier',
84
84
  description: 'Risk tier from diligence review',
@@ -118,7 +118,7 @@ const contractVendorRef = new ParentChildField(contractObj, {
118
118
  section: contractSection,
119
119
  });
120
120
 
121
- const contractStatusField = new SelectField(contractObj, {
121
+ const contractStatusField = new RadioField(contractObj, {
122
122
  apiName: 'status__c',
123
123
  displayName: 'Status',
124
124
  description: 'Contract lifecycle status',
@@ -198,7 +198,7 @@ const requestAmountCentsField = new NumberField(requestObj, {
198
198
  section: requestSection,
199
199
  });
200
200
 
201
- const requestStatusField = new SelectField(requestObj, {
201
+ const requestStatusField = new RadioField(requestObj, {
202
202
  apiName: 'status__c',
203
203
  displayName: 'Status',
204
204
  description: 'Approval status',
@@ -255,7 +255,7 @@ const approvalSequenceField = new NumberField(approvalObj, {
255
255
  section: approvalSection,
256
256
  });
257
257
 
258
- const approvalRoleField = new SelectField(approvalObj, {
258
+ const approvalRoleField = new RadioField(approvalObj, {
259
259
  apiName: 'approval_role__c',
260
260
  displayName: 'Approval role',
261
261
  description: 'Approval lane',
@@ -264,7 +264,7 @@ const approvalRoleField = new SelectField(approvalObj, {
264
264
  section: approvalSection,
265
265
  });
266
266
 
267
- const approvalStatusField = new SelectField(approvalObj, {
267
+ const approvalStatusField = new RadioField(approvalObj, {
268
268
  apiName: 'status__c',
269
269
  displayName: 'Status',
270
270
  description: 'Approval step status',
@@ -315,7 +315,7 @@ const invoiceAmountCentsField = new NumberField(invoiceObj, {
315
315
  section: invoiceSection,
316
316
  });
317
317
 
318
- const invoiceStatusField = new SelectField(invoiceObj, {
318
+ const invoiceStatusField = new RadioField(invoiceObj, {
319
319
  apiName: 'status__c',
320
320
  displayName: 'Status',
321
321
  description: 'Invoice processing status',
@@ -391,7 +391,7 @@ new Rule(requestObj, {
391
391
  flowName: 'Default purchase request status',
392
392
  triggerType: 'CREATE',
393
393
  description: 'New purchase requests start as Draft',
394
- actions: [{ targetField: requestStatusField, fixedValue: ['Draft'] }],
394
+ actions: [{ targetField: requestStatusField, fixedValue: 'Draft' }],
395
395
  });
396
396
 
397
397
  new Rule(approvalObj, {
@@ -399,7 +399,7 @@ new Rule(approvalObj, {
399
399
  flowName: 'Default approval step status',
400
400
  triggerType: 'CREATE',
401
401
  description: 'New approval steps start Pending',
402
- actions: [{ targetField: approvalStatusField, fixedValue: ['Pending'] }],
402
+ actions: [{ targetField: approvalStatusField, fixedValue: 'Pending' }],
403
403
  });
404
404
 
405
405
  new ListViewDef(vendorObj, {
@@ -25,6 +25,7 @@ import {
25
25
  LongTextField,
26
26
  ManifestBuilder,
27
27
  ManifestFunction,
28
+ RadioField,
28
29
  SduiPage,
29
30
  SelectField,
30
31
  } from '@rippling/rippling-sdk/lib/manifest';
@@ -56,7 +57,7 @@ const detailsSection = new CustomObjectFieldSection(todoObj, {
56
57
  sectionId: 'sec_todo_details',
57
58
  });
58
59
 
59
- const statusField = new SelectField(todoObj, {
60
+ const statusField = new RadioField(todoObj, {
60
61
  apiName: 'status__c',
61
62
  displayName: 'Status',
62
63
  description: 'Status field',
@@ -65,7 +66,7 @@ const statusField = new SelectField(todoObj, {
65
66
  section: detailsSection,
66
67
  });
67
68
 
68
- const priorityField = new SelectField(todoObj, {
69
+ const priorityField = new RadioField(todoObj, {
69
70
  apiName: 'priority__c',
70
71
  displayName: 'Priority',
71
72
  description: 'Priority field',
@@ -73,6 +74,14 @@ const priorityField = new SelectField(todoObj, {
73
74
  section: detailsSection,
74
75
  });
75
76
 
77
+ const labelsField = new SelectField(todoObj, {
78
+ apiName: 'labels__c',
79
+ displayName: 'Labels',
80
+ description: 'One or more labels for organizing the task',
81
+ options: ['Personal', 'Work', 'Urgent', 'Follow-up'],
82
+ section: detailsSection,
83
+ });
84
+
76
85
  const dueDateField = new DateField(todoObj, {
77
86
  apiName: 'due_date__c',
78
87
  displayName: 'Due date',
@@ -93,7 +102,7 @@ new ListViewDef(todoObj, {
93
102
  viewId: 'view_simple_todo_open',
94
103
  name: 'Open todos',
95
104
  description: 'Everything that is not Done, ordered by due date',
96
- fields: ['name', statusField, priorityField, dueDateField],
105
+ fields: ['name', statusField, priorityField, labelsField, dueDateField],
97
106
  orderBy: dueDateField,
98
107
  sortOrder: 'ASC',
99
108
  isPublic: true,
@@ -117,7 +126,14 @@ new CustomObjectPageLayout(todoObj, {
117
126
  name: 'Details',
118
127
  type: 'fields_section',
119
128
  section: detailsSection,
120
- fields: [{ field: 'name', editable: true }, statusField, priorityField, dueDateField, notesField],
129
+ fields: [
130
+ { field: 'name', editable: true },
131
+ statusField,
132
+ priorityField,
133
+ labelsField,
134
+ dueDateField,
135
+ notesField,
136
+ ],
121
137
  },
122
138
  ],
123
139
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rippling/rippling-sdk",
3
- "version": "0.2.0-alpha.71",
3
+ "version": "0.2.0-alpha.73",
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",