@rippling/rippling-sdk 0.2.0-alpha.84 → 0.2.0-alpha.86
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/manifest/custom-object-creation-workflow/custom-object-creation-workflow.ts +44 -26
- package/examples/manifest/dental-practice-management/dental-practice-management.ts +470 -142
- package/examples/manifest/dental-practice-management/functions/chair-schedule.ts +23 -13
- package/examples/manifest/dental-practice-management/functions/complete-visit.ts +55 -32
- package/examples/manifest/dental-practice-management/functions/operatory-list.ts +23 -13
- package/examples/manifest/dental-practice-management/functions/patient-list.ts +23 -13
- package/examples/manifest/dental-practice-management/functions/treatment-plan-list.ts +23 -13
- package/examples/manifest/existing-manifest-mutations/existing-manifest-mutations.ts +23 -68
- package/examples/manifest/field-service-dispatch/field-service-dispatch.ts +375 -102
- package/examples/manifest/grant-program-management/grant-program-management.ts +419 -125
- package/examples/manifest/gym-membership-management/functions/check-in-desk.ts +23 -13
- package/examples/manifest/gym-membership-management/functions/member-list.ts +23 -13
- package/examples/manifest/gym-membership-management/functions/today-schedule.ts +23 -13
- package/examples/manifest/gym-membership-management/functions/trainer-list.ts +23 -13
- package/examples/manifest/gym-membership-management/gym-membership-management.ts +442 -92
- package/examples/manifest/procurement-approval-hub/procurement-approval-hub.ts +408 -122
- package/examples/manifest/simple-todo-app/functions/mark-done.ts +12 -16
- package/examples/manifest/simple-todo-app/functions/todo-list.ts +23 -13
- package/examples/manifest/simple-todo-app/simple-todo-app.ts +109 -40
- package/examples/manifest/todo-app-without-object-list-view/functions/todo-page.ts +193 -166
- package/examples/manifest/todo-app-without-object-list-view/todo-app-without-object-list-view.ts +47 -24
- package/package.json +13 -7
- package/resources/custom-objects/fields.d.mts +1 -40
- package/resources/custom-objects/fields.d.mts.map +1 -1
- package/resources/custom-objects/fields.d.ts +1 -40
- package/resources/custom-objects/fields.d.ts.map +1 -1
- package/resources/levels.d.mts +25 -4
- package/resources/levels.d.mts.map +1 -1
- package/resources/levels.d.ts +25 -4
- package/resources/levels.d.ts.map +1 -1
- package/src/resources/custom-objects/fields.ts +1 -46
- package/src/resources/levels.ts +28 -4
- package/src/tsconfig.json +1 -1
- 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
- package/core/platform/manifest/custom-objects/action.d.mts +0 -58
- package/core/platform/manifest/custom-objects/action.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/action.d.ts +0 -58
- package/core/platform/manifest/custom-objects/action.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/action.js +0 -44
- package/core/platform/manifest/custom-objects/action.js.map +0 -1
- package/core/platform/manifest/custom-objects/action.mjs +0 -40
- package/core/platform/manifest/custom-objects/action.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/conditions.d.mts +0 -240
- package/core/platform/manifest/custom-objects/conditions.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/conditions.d.ts +0 -240
- package/core/platform/manifest/custom-objects/conditions.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/conditions.js +0 -326
- package/core/platform/manifest/custom-objects/conditions.js.map +0 -1
- package/core/platform/manifest/custom-objects/conditions.mjs +0 -321
- package/core/platform/manifest/custom-objects/conditions.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/existing.d.mts +0 -87
- package/core/platform/manifest/custom-objects/existing.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/existing.d.ts +0 -87
- package/core/platform/manifest/custom-objects/existing.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/existing.js +0 -113
- package/core/platform/manifest/custom-objects/existing.js.map +0 -1
- package/core/platform/manifest/custom-objects/existing.mjs +0 -109
- package/core/platform/manifest/custom-objects/existing.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/field-resolution.d.mts +0 -48
- package/core/platform/manifest/custom-objects/field-resolution.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/field-resolution.d.ts +0 -48
- package/core/platform/manifest/custom-objects/field-resolution.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/field-resolution.js +0 -61
- package/core/platform/manifest/custom-objects/field-resolution.js.map +0 -1
- package/core/platform/manifest/custom-objects/field-resolution.mjs +0 -58
- package/core/platform/manifest/custom-objects/field-resolution.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/function-file.d.mts +0 -87
- package/core/platform/manifest/custom-objects/function-file.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/function-file.d.ts +0 -87
- package/core/platform/manifest/custom-objects/function-file.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/function-file.js +0 -76
- package/core/platform/manifest/custom-objects/function-file.js.map +0 -1
- package/core/platform/manifest/custom-objects/function-file.mjs +0 -69
- package/core/platform/manifest/custom-objects/function-file.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/list-view.d.mts +0 -65
- package/core/platform/manifest/custom-objects/list-view.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/list-view.d.ts +0 -65
- package/core/platform/manifest/custom-objects/list-view.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/list-view.js +0 -33
- package/core/platform/manifest/custom-objects/list-view.js.map +0 -1
- package/core/platform/manifest/custom-objects/list-view.mjs +0 -30
- package/core/platform/manifest/custom-objects/list-view.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/object-list-page.d.mts +0 -43
- package/core/platform/manifest/custom-objects/object-list-page.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/object-list-page.d.ts +0 -43
- package/core/platform/manifest/custom-objects/object-list-page.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/object-list-page.js +0 -54
- package/core/platform/manifest/custom-objects/object-list-page.js.map +0 -1
- package/core/platform/manifest/custom-objects/object-list-page.mjs +0 -50
- package/core/platform/manifest/custom-objects/object-list-page.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/page-layout.d.mts +0 -142
- package/core/platform/manifest/custom-objects/page-layout.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/page-layout.d.ts +0 -142
- package/core/platform/manifest/custom-objects/page-layout.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/page-layout.js +0 -184
- package/core/platform/manifest/custom-objects/page-layout.js.map +0 -1
- package/core/platform/manifest/custom-objects/page-layout.mjs +0 -180
- package/core/platform/manifest/custom-objects/page-layout.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/register.d.mts +0 -87
- package/core/platform/manifest/custom-objects/register.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/register.d.ts +0 -87
- package/core/platform/manifest/custom-objects/register.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/register.js +0 -395
- package/core/platform/manifest/custom-objects/register.js.map +0 -1
- package/core/platform/manifest/custom-objects/register.mjs +0 -391
- package/core/platform/manifest/custom-objects/register.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/rule.d.mts +0 -113
- package/core/platform/manifest/custom-objects/rule.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/rule.d.ts +0 -113
- package/core/platform/manifest/custom-objects/rule.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/rule.js +0 -49
- package/core/platform/manifest/custom-objects/rule.js.map +0 -1
- package/core/platform/manifest/custom-objects/rule.mjs +0 -45
- package/core/platform/manifest/custom-objects/rule.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/sdui-page.d.mts +0 -214
- package/core/platform/manifest/custom-objects/sdui-page.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/sdui-page.d.ts +0 -214
- package/core/platform/manifest/custom-objects/sdui-page.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/sdui-page.js +0 -194
- package/core/platform/manifest/custom-objects/sdui-page.js.map +0 -1
- package/core/platform/manifest/custom-objects/sdui-page.mjs +0 -182
- package/core/platform/manifest/custom-objects/sdui-page.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/typed-condition.d.mts +0 -28
- package/core/platform/manifest/custom-objects/typed-condition.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/typed-condition.d.ts +0 -28
- package/core/platform/manifest/custom-objects/typed-condition.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/typed-condition.js +0 -434
- package/core/platform/manifest/custom-objects/typed-condition.js.map +0 -1
- package/core/platform/manifest/custom-objects/typed-condition.mjs +0 -431
- package/core/platform/manifest/custom-objects/typed-condition.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/types.d.mts +0 -29
- package/core/platform/manifest/custom-objects/types.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/types.d.ts +0 -29
- package/core/platform/manifest/custom-objects/types.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/types.js +0 -3
- package/core/platform/manifest/custom-objects/types.js.map +0 -1
- package/core/platform/manifest/custom-objects/types.mjs +0 -2
- package/core/platform/manifest/custom-objects/types.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/validation.d.mts +0 -44
- package/core/platform/manifest/custom-objects/validation.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/validation.d.ts +0 -44
- package/core/platform/manifest/custom-objects/validation.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/validation.js +0 -30
- package/core/platform/manifest/custom-objects/validation.js.map +0 -1
- package/core/platform/manifest/custom-objects/validation.mjs +0 -27
- package/core/platform/manifest/custom-objects/validation.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/workflow.d.mts +0 -47
- package/core/platform/manifest/custom-objects/workflow.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/workflow.d.ts +0 -47
- package/core/platform/manifest/custom-objects/workflow.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/workflow.js +0 -38
- package/core/platform/manifest/custom-objects/workflow.js.map +0 -1
- package/core/platform/manifest/custom-objects/workflow.mjs +0 -34
- package/core/platform/manifest/custom-objects/workflow.mjs.map +0 -1
- package/core/platform/manifest/custom-objects.d.mts +0 -85
- package/core/platform/manifest/custom-objects.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects.d.ts +0 -85
- package/core/platform/manifest/custom-objects.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects.js +0 -84
- package/core/platform/manifest/custom-objects.js.map +0 -1
- package/core/platform/manifest/custom-objects.mjs +0 -55
- package/core/platform/manifest/custom-objects.mjs.map +0 -1
- package/examples/manifest/custom-object-creation-workflow/functions/intake-request-created.ts +0 -20
- package/examples/manifest/custom-object-creation-workflow/schema.ts +0 -29
- package/examples/manifest/dental-practice-management/schema.ts +0 -298
- package/examples/manifest/field-service-dispatch/schema.ts +0 -248
- package/examples/manifest/grant-program-management/schema.ts +0 -269
- package/examples/manifest/gym-membership-management/schema.ts +0 -266
- package/examples/manifest/procurement-approval-hub/functions/route-purchase-request.ts +0 -20
- package/examples/manifest/procurement-approval-hub/schema.ts +0 -256
- package/examples/manifest/simple-todo-app/schema.ts +0 -60
- package/examples/manifest/todo-app-without-object-list-view/schema.ts +0 -28
- package/src/core/platform/README.md +0 -20
- package/src/core/platform/manifest/README.md +0 -26
- package/src/core/platform/manifest/custom-objects/action.ts +0 -87
- package/src/core/platform/manifest/custom-objects/conditions.ts +0 -762
- package/src/core/platform/manifest/custom-objects/existing.ts +0 -221
- package/src/core/platform/manifest/custom-objects/field-resolution.ts +0 -116
- package/src/core/platform/manifest/custom-objects/function-file.ts +0 -149
- package/src/core/platform/manifest/custom-objects/list-view.ts +0 -95
- package/src/core/platform/manifest/custom-objects/object-list-page.ts +0 -87
- package/src/core/platform/manifest/custom-objects/page-layout.ts +0 -380
- package/src/core/platform/manifest/custom-objects/register.ts +0 -555
- package/src/core/platform/manifest/custom-objects/rule.ts +0 -192
- package/src/core/platform/manifest/custom-objects/sdui-page.ts +0 -515
- package/src/core/platform/manifest/custom-objects/typed-condition.ts +0 -617
- package/src/core/platform/manifest/custom-objects/types.ts +0 -92
- package/src/core/platform/manifest/custom-objects/validation.ts +0 -70
- package/src/core/platform/manifest/custom-objects/workflow.ts +0 -71
- package/src/core/platform/manifest/custom-objects.ts +0 -203
- package/src/pebble-sdui-web-custom-apps-shim.d.ts +0 -3
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Typed custom-object schema definitions for the grant program management example.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
date,
|
|
7
|
-
defineCustomObject,
|
|
8
|
-
email,
|
|
9
|
-
formula,
|
|
10
|
-
longText,
|
|
11
|
-
lookup,
|
|
12
|
-
number,
|
|
13
|
-
parentChild,
|
|
14
|
-
radio,
|
|
15
|
-
section,
|
|
16
|
-
text,
|
|
17
|
-
} from '@rippling/rippling-sdk/core/platform/custom-objects';
|
|
18
|
-
|
|
19
|
-
/** Logical category shared by the grant program management example. */
|
|
20
|
-
export const GRANTS_CATEGORY = 'grants';
|
|
21
|
-
|
|
22
|
-
/** Funding-program schema used by grant cycles. */
|
|
23
|
-
export const programDefinition = defineCustomObject({
|
|
24
|
-
name: 'gpm_program',
|
|
25
|
-
displayName: 'Program',
|
|
26
|
-
pluralLabel: 'Programs',
|
|
27
|
-
category: GRANTS_CATEGORY,
|
|
28
|
-
description: 'Funding program with annual budget and focus area',
|
|
29
|
-
sections: {
|
|
30
|
-
program: section('Program', { sectionId: 'sec_gpm_program' }),
|
|
31
|
-
},
|
|
32
|
-
fields: {
|
|
33
|
-
focus_area: radio({
|
|
34
|
-
displayName: 'Focus area',
|
|
35
|
-
description: 'Program focus area',
|
|
36
|
-
options: ['Education', 'Workforce', 'Climate', 'Health', 'Housing', 'Community safety'],
|
|
37
|
-
required: true,
|
|
38
|
-
section: 'program',
|
|
39
|
-
}),
|
|
40
|
-
annual_budget_cents: number({
|
|
41
|
-
displayName: 'Annual budget (cents)',
|
|
42
|
-
description: 'Annual funding budget in cents',
|
|
43
|
-
decimalPlaces: 0,
|
|
44
|
-
section: 'program',
|
|
45
|
-
}),
|
|
46
|
-
guidelines: longText({
|
|
47
|
-
displayName: 'Guidelines',
|
|
48
|
-
description: 'Eligibility and operating guidelines',
|
|
49
|
-
maxLength: 8000,
|
|
50
|
-
section: 'program',
|
|
51
|
-
}),
|
|
52
|
-
},
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
/** Grant-cycle schema tied to a parent program. */
|
|
56
|
-
export const grantDefinition = defineCustomObject({
|
|
57
|
-
name: 'gpm_grant',
|
|
58
|
-
displayName: 'Grant',
|
|
59
|
-
pluralLabel: 'Grants',
|
|
60
|
-
category: GRANTS_CATEGORY,
|
|
61
|
-
description: 'Grant cycle under a funding program',
|
|
62
|
-
sections: {
|
|
63
|
-
grant: section('Grant', { sectionId: 'sec_gpm_grant' }),
|
|
64
|
-
},
|
|
65
|
-
fields: {
|
|
66
|
-
program_ref: parentChild(programDefinition, {
|
|
67
|
-
displayName: 'Program',
|
|
68
|
-
description: 'Program this grant belongs to',
|
|
69
|
-
relatedDataLabel: 'Grants',
|
|
70
|
-
parentChildType: 'PRIMARY',
|
|
71
|
-
enableParentOwnerInheritance: false,
|
|
72
|
-
section: 'grant',
|
|
73
|
-
}),
|
|
74
|
-
status: radio({
|
|
75
|
-
displayName: 'Status',
|
|
76
|
-
description: 'Grant cycle status',
|
|
77
|
-
options: ['Planning', 'Open', 'Review', 'Awarded', 'Closed'],
|
|
78
|
-
required: true,
|
|
79
|
-
section: 'grant',
|
|
80
|
-
}),
|
|
81
|
-
open_date: date({
|
|
82
|
-
displayName: 'Open date',
|
|
83
|
-
description: 'Application open date',
|
|
84
|
-
section: 'grant',
|
|
85
|
-
}),
|
|
86
|
-
close_date: date({
|
|
87
|
-
displayName: 'Close date',
|
|
88
|
-
description: 'Application close date',
|
|
89
|
-
section: 'grant',
|
|
90
|
-
}),
|
|
91
|
-
award_budget_cents: number({
|
|
92
|
-
displayName: 'Award budget (cents)',
|
|
93
|
-
description: 'Budget allocated to this grant cycle',
|
|
94
|
-
decimalPlaces: 0,
|
|
95
|
-
section: 'grant',
|
|
96
|
-
}),
|
|
97
|
-
},
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
/** Applicant schema used by applications. */
|
|
101
|
-
export const applicantDefinition = defineCustomObject({
|
|
102
|
-
name: 'gpm_applicant',
|
|
103
|
-
displayName: 'Applicant',
|
|
104
|
-
pluralLabel: 'Applicants',
|
|
105
|
-
category: GRANTS_CATEGORY,
|
|
106
|
-
description: 'Applicant organization and contact details',
|
|
107
|
-
sections: {
|
|
108
|
-
applicant: section('Applicant', { sectionId: 'sec_gpm_applicant' }),
|
|
109
|
-
},
|
|
110
|
-
fields: {
|
|
111
|
-
legal_name: text({
|
|
112
|
-
displayName: 'Legal name',
|
|
113
|
-
description: 'Applicant organization legal name',
|
|
114
|
-
maxLength: 200,
|
|
115
|
-
required: true,
|
|
116
|
-
section: 'applicant',
|
|
117
|
-
}),
|
|
118
|
-
applicant_type: radio({
|
|
119
|
-
displayName: 'Applicant type',
|
|
120
|
-
description: 'Applicant organization type',
|
|
121
|
-
options: ['Nonprofit', 'School', 'Government', 'Small business', 'Community group'],
|
|
122
|
-
required: true,
|
|
123
|
-
section: 'applicant',
|
|
124
|
-
}),
|
|
125
|
-
contact_email: email({
|
|
126
|
-
displayName: 'Contact email',
|
|
127
|
-
description: 'Primary applicant contact email',
|
|
128
|
-
section: 'applicant',
|
|
129
|
-
}),
|
|
130
|
-
},
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
/** Application schema tied to a grant and applicant. */
|
|
134
|
-
export const applicationDefinition = defineCustomObject({
|
|
135
|
-
name: 'gpm_application',
|
|
136
|
-
displayName: 'Application',
|
|
137
|
-
pluralLabel: 'Applications',
|
|
138
|
-
category: GRANTS_CATEGORY,
|
|
139
|
-
description: 'Application submitted by an applicant for a grant',
|
|
140
|
-
sections: {
|
|
141
|
-
application: section('Application', { sectionId: 'sec_gpm_application' }),
|
|
142
|
-
},
|
|
143
|
-
fields: {
|
|
144
|
-
grant_ref: parentChild(grantDefinition, {
|
|
145
|
-
displayName: 'Grant',
|
|
146
|
-
description: 'Grant cycle this application targets',
|
|
147
|
-
relatedDataLabel: 'Applications',
|
|
148
|
-
parentChildType: 'PRIMARY',
|
|
149
|
-
enableParentOwnerInheritance: false,
|
|
150
|
-
section: 'application',
|
|
151
|
-
}),
|
|
152
|
-
applicant_ref: lookup(applicantDefinition, {
|
|
153
|
-
displayName: 'Applicant',
|
|
154
|
-
description: 'Applicant submitting this request',
|
|
155
|
-
relatedDataLabel: 'Applications',
|
|
156
|
-
required: true,
|
|
157
|
-
section: 'application',
|
|
158
|
-
}),
|
|
159
|
-
status: radio({
|
|
160
|
-
displayName: 'Status',
|
|
161
|
-
description: 'Application review state',
|
|
162
|
-
options: ['Draft', 'Submitted', 'Eligibility review', 'Panel review', 'Awarded', 'Declined'],
|
|
163
|
-
required: true,
|
|
164
|
-
section: 'application',
|
|
165
|
-
}),
|
|
166
|
-
requested_amount_cents: number({
|
|
167
|
-
displayName: 'Requested amount (cents)',
|
|
168
|
-
description: 'Requested funding amount in cents',
|
|
169
|
-
decimalPlaces: 0,
|
|
170
|
-
required: true,
|
|
171
|
-
section: 'application',
|
|
172
|
-
}),
|
|
173
|
-
review_score: number({
|
|
174
|
-
displayName: 'Review score',
|
|
175
|
-
description: 'Panel score from 0 to 100',
|
|
176
|
-
decimalPlaces: 2,
|
|
177
|
-
section: 'application',
|
|
178
|
-
}),
|
|
179
|
-
proposal_summary: longText({
|
|
180
|
-
displayName: 'Proposal summary',
|
|
181
|
-
description: 'Program plan and impact narrative',
|
|
182
|
-
maxLength: 8000,
|
|
183
|
-
section: 'application',
|
|
184
|
-
}),
|
|
185
|
-
review_label: formula.text({
|
|
186
|
-
displayName: 'Review label',
|
|
187
|
-
description: 'Review queue label',
|
|
188
|
-
formula: "CONCATENATE(status__c, ' - score ', review_score__c)",
|
|
189
|
-
maxLength: 240,
|
|
190
|
-
section: 'application',
|
|
191
|
-
}),
|
|
192
|
-
},
|
|
193
|
-
});
|
|
194
|
-
|
|
195
|
-
/** Milestone schema tied to a parent application. */
|
|
196
|
-
export const milestoneDefinition = defineCustomObject({
|
|
197
|
-
name: 'gpm_milestone',
|
|
198
|
-
displayName: 'Milestone',
|
|
199
|
-
pluralLabel: 'Milestones',
|
|
200
|
-
category: GRANTS_CATEGORY,
|
|
201
|
-
description: 'Deliverable or report due for an awarded application',
|
|
202
|
-
sections: {
|
|
203
|
-
milestone: section('Milestone', { sectionId: 'sec_gpm_milestone' }),
|
|
204
|
-
},
|
|
205
|
-
fields: {
|
|
206
|
-
application_ref: parentChild(applicationDefinition, {
|
|
207
|
-
displayName: 'Application',
|
|
208
|
-
description: 'Application this milestone belongs to',
|
|
209
|
-
relatedDataLabel: 'Milestones',
|
|
210
|
-
parentChildType: 'PRIMARY',
|
|
211
|
-
enableParentOwnerInheritance: true,
|
|
212
|
-
section: 'milestone',
|
|
213
|
-
}),
|
|
214
|
-
due_date: date({
|
|
215
|
-
displayName: 'Due date',
|
|
216
|
-
description: 'Milestone due date',
|
|
217
|
-
required: true,
|
|
218
|
-
section: 'milestone',
|
|
219
|
-
}),
|
|
220
|
-
status: radio({
|
|
221
|
-
displayName: 'Status',
|
|
222
|
-
description: 'Milestone status',
|
|
223
|
-
options: ['Not started', 'In progress', 'Submitted', 'Accepted', 'Late'],
|
|
224
|
-
required: true,
|
|
225
|
-
section: 'milestone',
|
|
226
|
-
}),
|
|
227
|
-
},
|
|
228
|
-
});
|
|
229
|
-
|
|
230
|
-
/** Disbursement schema tied to a parent application. */
|
|
231
|
-
export const disbursementDefinition = defineCustomObject({
|
|
232
|
-
name: 'gpm_disbursement',
|
|
233
|
-
displayName: 'Disbursement',
|
|
234
|
-
pluralLabel: 'Disbursements',
|
|
235
|
-
category: GRANTS_CATEGORY,
|
|
236
|
-
description: 'Payment tranche tied to an awarded application',
|
|
237
|
-
sections: {
|
|
238
|
-
disbursement: section('Disbursement', { sectionId: 'sec_gpm_disbursement' }),
|
|
239
|
-
},
|
|
240
|
-
fields: {
|
|
241
|
-
application_ref: parentChild(applicationDefinition, {
|
|
242
|
-
displayName: 'Application',
|
|
243
|
-
description: 'Application funded by this disbursement',
|
|
244
|
-
relatedDataLabel: 'Disbursements',
|
|
245
|
-
parentChildType: 'PRIMARY',
|
|
246
|
-
enableParentOwnerInheritance: true,
|
|
247
|
-
section: 'disbursement',
|
|
248
|
-
}),
|
|
249
|
-
amount_cents: number({
|
|
250
|
-
displayName: 'Amount (cents)',
|
|
251
|
-
description: 'Disbursement amount in cents',
|
|
252
|
-
decimalPlaces: 0,
|
|
253
|
-
required: true,
|
|
254
|
-
section: 'disbursement',
|
|
255
|
-
}),
|
|
256
|
-
status: radio({
|
|
257
|
-
displayName: 'Status',
|
|
258
|
-
description: 'Disbursement status',
|
|
259
|
-
options: ['Scheduled', 'Approved', 'Paid', 'Held', 'Cancelled'],
|
|
260
|
-
required: true,
|
|
261
|
-
section: 'disbursement',
|
|
262
|
-
}),
|
|
263
|
-
disbursement_date: date({
|
|
264
|
-
displayName: 'Disbursement date',
|
|
265
|
-
description: 'Scheduled or actual payment date',
|
|
266
|
-
section: 'disbursement',
|
|
267
|
-
}),
|
|
268
|
-
},
|
|
269
|
-
});
|
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Typed custom-object schema definitions for the gym membership management example.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
date,
|
|
7
|
-
datetime,
|
|
8
|
-
defineCustomObject,
|
|
9
|
-
email,
|
|
10
|
-
formula,
|
|
11
|
-
longText,
|
|
12
|
-
lookup,
|
|
13
|
-
number,
|
|
14
|
-
parentChild,
|
|
15
|
-
phone,
|
|
16
|
-
radio,
|
|
17
|
-
section,
|
|
18
|
-
select,
|
|
19
|
-
text,
|
|
20
|
-
} from '@rippling/rippling-sdk/core/platform/custom-objects';
|
|
21
|
-
|
|
22
|
-
/** Logical category shared by the gym membership management example. */
|
|
23
|
-
export const GYM_CATEGORY = 'gym';
|
|
24
|
-
|
|
25
|
-
/** Member schema used for directory, enrollment, and check-in flows. */
|
|
26
|
-
export const memberDefinition = defineCustomObject({
|
|
27
|
-
name: 'gym_member',
|
|
28
|
-
displayName: 'Member',
|
|
29
|
-
pluralLabel: 'Members',
|
|
30
|
-
category: GYM_CATEGORY,
|
|
31
|
-
description: 'Gym member profile, contact, and membership status',
|
|
32
|
-
icon: { emoji: '🏋️' },
|
|
33
|
-
sections: {
|
|
34
|
-
profile: section('Profile', { sectionId: 'sec_gm_profile' }),
|
|
35
|
-
membership: section('Membership', { sectionId: 'sec_gm_membership' }),
|
|
36
|
-
},
|
|
37
|
-
fields: {
|
|
38
|
-
first_name: text({
|
|
39
|
-
displayName: 'First name',
|
|
40
|
-
description: 'First name field',
|
|
41
|
-
required: true,
|
|
42
|
-
maxLength: 80,
|
|
43
|
-
section: 'profile',
|
|
44
|
-
}),
|
|
45
|
-
last_name: text({
|
|
46
|
-
displayName: 'Last name',
|
|
47
|
-
description: 'Last name field',
|
|
48
|
-
required: true,
|
|
49
|
-
maxLength: 80,
|
|
50
|
-
section: 'profile',
|
|
51
|
-
}),
|
|
52
|
-
email: email({
|
|
53
|
-
displayName: 'Email',
|
|
54
|
-
description: 'Email field',
|
|
55
|
-
unique: true,
|
|
56
|
-
section: 'profile',
|
|
57
|
-
}),
|
|
58
|
-
phone: phone({
|
|
59
|
-
displayName: 'Phone',
|
|
60
|
-
description: 'Phone field',
|
|
61
|
-
section: 'profile',
|
|
62
|
-
}),
|
|
63
|
-
membership_status: radio({
|
|
64
|
-
displayName: 'Membership status',
|
|
65
|
-
description: 'Membership status field',
|
|
66
|
-
options: ['Active', 'Frozen', 'Cancelled', 'Trial'],
|
|
67
|
-
required: true,
|
|
68
|
-
section: 'membership',
|
|
69
|
-
}),
|
|
70
|
-
join_date: date({
|
|
71
|
-
displayName: 'Join date',
|
|
72
|
-
description: 'Join date field',
|
|
73
|
-
section: 'membership',
|
|
74
|
-
}),
|
|
75
|
-
emergency_contact: longText({
|
|
76
|
-
displayName: 'Emergency contact',
|
|
77
|
-
description: 'Name and phone for emergencies',
|
|
78
|
-
maxLength: 2000,
|
|
79
|
-
section: 'membership',
|
|
80
|
-
}),
|
|
81
|
-
preferred_class_types: select({
|
|
82
|
-
displayName: 'Preferred class types',
|
|
83
|
-
description: 'One or more class types the member enjoys',
|
|
84
|
-
options: ['Yoga', 'Spin', 'HIIT', 'Strength', 'Pilates', 'Dance', 'Aquatics'],
|
|
85
|
-
section: 'membership',
|
|
86
|
-
}),
|
|
87
|
-
},
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
/** Trainer schema used by scheduled class sessions. */
|
|
91
|
-
export const trainerDefinition = defineCustomObject({
|
|
92
|
-
name: 'gym_trainer',
|
|
93
|
-
displayName: 'Trainer',
|
|
94
|
-
pluralLabel: 'Trainers',
|
|
95
|
-
category: GYM_CATEGORY,
|
|
96
|
-
description: 'Instructors and coaches who lead scheduled classes',
|
|
97
|
-
icon: { emoji: '🎯' },
|
|
98
|
-
sections: {
|
|
99
|
-
trainer: section('Trainer', { sectionId: 'sec_tr_profile' }),
|
|
100
|
-
},
|
|
101
|
-
fields: {
|
|
102
|
-
email: email({
|
|
103
|
-
displayName: 'Email',
|
|
104
|
-
description: 'Email field',
|
|
105
|
-
section: 'trainer',
|
|
106
|
-
}),
|
|
107
|
-
specialty: radio({
|
|
108
|
-
displayName: 'Primary specialty',
|
|
109
|
-
description: 'Primary specialty field',
|
|
110
|
-
options: ['Yoga', 'Spin', 'HIIT', 'Strength', 'Pilates', 'Dance', 'Aquatics', 'General'],
|
|
111
|
-
section: 'trainer',
|
|
112
|
-
}),
|
|
113
|
-
bio: longText({
|
|
114
|
-
displayName: 'Bio & certifications',
|
|
115
|
-
description: 'Bio & certifications field',
|
|
116
|
-
maxLength: 4000,
|
|
117
|
-
section: 'trainer',
|
|
118
|
-
}),
|
|
119
|
-
trainer_label: formula.text({
|
|
120
|
-
displayName: 'List label',
|
|
121
|
-
description: 'List label field',
|
|
122
|
-
formula: "CONCATENATE(name, ' · ', specialty__c)",
|
|
123
|
-
maxLength: 220,
|
|
124
|
-
section: 'trainer',
|
|
125
|
-
}),
|
|
126
|
-
},
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
/** Scheduled class-session schema tied to a trainer lookup. */
|
|
130
|
-
export const sessionDefinition = defineCustomObject({
|
|
131
|
-
name: 'gym_class_session',
|
|
132
|
-
displayName: 'Class session',
|
|
133
|
-
pluralLabel: 'Class sessions',
|
|
134
|
-
category: GYM_CATEGORY,
|
|
135
|
-
description: 'A scheduled class with assigned trainer, time, and capacity',
|
|
136
|
-
icon: { emoji: '📅' },
|
|
137
|
-
sections: {
|
|
138
|
-
schedule: section('Schedule', { sectionId: 'sec_cs_schedule' }),
|
|
139
|
-
class_and_room: section('Class & room', { sectionId: 'sec_cs_class' }),
|
|
140
|
-
},
|
|
141
|
-
fields: {
|
|
142
|
-
trainer_ref: lookup(trainerDefinition, {
|
|
143
|
-
displayName: 'Trainer',
|
|
144
|
-
description: 'Instructor leading this session',
|
|
145
|
-
relatedDataLabel: 'Class sessions',
|
|
146
|
-
required: true,
|
|
147
|
-
section: 'schedule',
|
|
148
|
-
}),
|
|
149
|
-
start_time: datetime({
|
|
150
|
-
displayName: 'Start',
|
|
151
|
-
description: 'Session start (local)',
|
|
152
|
-
required: true,
|
|
153
|
-
section: 'schedule',
|
|
154
|
-
}),
|
|
155
|
-
end_time: datetime({
|
|
156
|
-
displayName: 'End',
|
|
157
|
-
description: 'Session end (local)',
|
|
158
|
-
required: true,
|
|
159
|
-
section: 'schedule',
|
|
160
|
-
}),
|
|
161
|
-
class_type: radio({
|
|
162
|
-
displayName: 'Class type',
|
|
163
|
-
description: 'Class type field',
|
|
164
|
-
options: [
|
|
165
|
-
'Yoga',
|
|
166
|
-
'Spin',
|
|
167
|
-
'HIIT',
|
|
168
|
-
'Strength',
|
|
169
|
-
'Pilates',
|
|
170
|
-
'Dance',
|
|
171
|
-
'Aquatics',
|
|
172
|
-
'Recovery / stretch',
|
|
173
|
-
'Other',
|
|
174
|
-
],
|
|
175
|
-
required: true,
|
|
176
|
-
section: 'class_and_room',
|
|
177
|
-
}),
|
|
178
|
-
room_name: text({
|
|
179
|
-
displayName: 'Studio / room',
|
|
180
|
-
description: 'E.g. Studio A, Pool lane 2',
|
|
181
|
-
maxLength: 80,
|
|
182
|
-
section: 'class_and_room',
|
|
183
|
-
}),
|
|
184
|
-
capacity: number({
|
|
185
|
-
displayName: 'Capacity',
|
|
186
|
-
description: 'Maximum attendees for this session',
|
|
187
|
-
decimalPlaces: 0,
|
|
188
|
-
section: 'class_and_room',
|
|
189
|
-
}),
|
|
190
|
-
session_notes: longText({
|
|
191
|
-
displayName: 'Notes',
|
|
192
|
-
description: 'Notes field',
|
|
193
|
-
maxLength: 4000,
|
|
194
|
-
section: 'class_and_room',
|
|
195
|
-
}),
|
|
196
|
-
session_date: formula.date({
|
|
197
|
-
displayName: 'Session date',
|
|
198
|
-
description: 'Calendar day for filtering “today” views',
|
|
199
|
-
formula: "DATETRUNC('DAY', start_time__c)",
|
|
200
|
-
section: 'schedule',
|
|
201
|
-
}),
|
|
202
|
-
session_board_label: formula.text({
|
|
203
|
-
displayName: 'Board label',
|
|
204
|
-
description: 'Board label field',
|
|
205
|
-
formula: "CONCATENATE(class_type__c, ' · ', room_name__c)",
|
|
206
|
-
maxLength: 260,
|
|
207
|
-
section: 'schedule',
|
|
208
|
-
}),
|
|
209
|
-
},
|
|
210
|
-
});
|
|
211
|
-
|
|
212
|
-
/** Enrollment schema tied to a parent class session and member lookup. */
|
|
213
|
-
export const enrollmentDefinition = defineCustomObject({
|
|
214
|
-
name: 'gym_class_enrollment',
|
|
215
|
-
displayName: 'Class enrollment',
|
|
216
|
-
pluralLabel: 'Class enrollments',
|
|
217
|
-
category: GYM_CATEGORY,
|
|
218
|
-
description: 'Member registration for a session with attendance and check-in',
|
|
219
|
-
icon: { emoji: '✅' },
|
|
220
|
-
sections: {
|
|
221
|
-
session_and_member: section('Session & member', { sectionId: 'sec_ce_link' }),
|
|
222
|
-
attendance: section('Attendance', { sectionId: 'sec_ce_att' }),
|
|
223
|
-
},
|
|
224
|
-
fields: {
|
|
225
|
-
class_session_ref: parentChild(sessionDefinition, {
|
|
226
|
-
displayName: 'Class session',
|
|
227
|
-
description: 'Which scheduled class this row belongs to',
|
|
228
|
-
relatedDataLabel: 'Enrollments',
|
|
229
|
-
parentChildType: 'PRIMARY',
|
|
230
|
-
enableParentOwnerInheritance: false,
|
|
231
|
-
section: 'session_and_member',
|
|
232
|
-
}),
|
|
233
|
-
member_ref: lookup(memberDefinition, {
|
|
234
|
-
displayName: 'Member',
|
|
235
|
-
description: 'Member field',
|
|
236
|
-
relatedDataLabel: 'Class enrollments',
|
|
237
|
-
required: true,
|
|
238
|
-
section: 'session_and_member',
|
|
239
|
-
}),
|
|
240
|
-
attendance_status: radio({
|
|
241
|
-
displayName: 'Attendance',
|
|
242
|
-
description: 'Front desk: set to Checked in when the member arrives',
|
|
243
|
-
options: ['Registered', 'Checked in', 'Late', 'No-show', 'Cancelled'],
|
|
244
|
-
required: true,
|
|
245
|
-
section: 'attendance',
|
|
246
|
-
}),
|
|
247
|
-
checked_in_at: datetime({
|
|
248
|
-
displayName: 'Checked in at',
|
|
249
|
-
description: 'Timestamp when staff recorded arrival (optional)',
|
|
250
|
-
section: 'attendance',
|
|
251
|
-
}),
|
|
252
|
-
enrollment_notes: longText({
|
|
253
|
-
displayName: 'Notes',
|
|
254
|
-
description: 'Notes field',
|
|
255
|
-
maxLength: 2000,
|
|
256
|
-
section: 'attendance',
|
|
257
|
-
}),
|
|
258
|
-
roster_row_label: formula.text({
|
|
259
|
-
displayName: 'Roster row label',
|
|
260
|
-
description: 'Roster row label field',
|
|
261
|
-
formula: "CONCATENATE(attendance_status__c, ' · Enrollment')",
|
|
262
|
-
maxLength: 160,
|
|
263
|
-
section: 'attendance',
|
|
264
|
-
}),
|
|
265
|
-
},
|
|
266
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { FunctionContext, FunctionEvent, FunctionResponse } from '@rippling/rippling-sdk';
|
|
2
|
-
|
|
3
|
-
export type Input = FunctionEvent;
|
|
4
|
-
|
|
5
|
-
export type Output = {
|
|
6
|
-
ok: true;
|
|
7
|
-
functionId: string;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export async function onRipplingEvent(
|
|
11
|
-
_event: Input,
|
|
12
|
-
context: FunctionContext,
|
|
13
|
-
): Promise<FunctionResponse<Output>> {
|
|
14
|
-
return new FunctionResponse({
|
|
15
|
-
body: {
|
|
16
|
-
ok: true,
|
|
17
|
-
functionId: context.function.function_id,
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
}
|