@rippling/rippling-sdk 0.2.0-alpha.83 → 0.2.0-alpha.85
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/custom-objects.d.mts +0 -7
- package/resources/custom-objects/custom-objects.d.mts.map +1 -1
- package/resources/custom-objects/custom-objects.d.ts +0 -7
- package/resources/custom-objects/custom-objects.d.ts.map +1 -1
- package/resources/custom-objects/custom-objects.js.map +1 -1
- package/resources/custom-objects/custom-objects.mjs.map +1 -1
- package/resources/custom-objects/fields.d.mts +14 -128
- package/resources/custom-objects/fields.d.mts.map +1 -1
- package/resources/custom-objects/fields.d.ts +14 -128
- package/resources/custom-objects/fields.d.ts.map +1 -1
- package/src/resources/custom-objects/custom-objects.ts +0 -8
- package/src/resources/custom-objects/fields.ts +13 -191
- 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/custom-objects/category.d.mts +0 -125
- package/core/platform/custom-objects/category.d.mts.map +0 -1
- package/core/platform/custom-objects/category.d.ts +0 -125
- package/core/platform/custom-objects/category.d.ts.map +0 -1
- package/core/platform/custom-objects/category.js +0 -188
- package/core/platform/custom-objects/category.js.map +0 -1
- package/core/platform/custom-objects/category.mjs +0 -178
- package/core/platform/custom-objects/category.mjs.map +0 -1
- package/core/platform/custom-objects/definition.d.mts +0 -147
- package/core/platform/custom-objects/definition.d.mts.map +0 -1
- package/core/platform/custom-objects/definition.d.ts +0 -147
- package/core/platform/custom-objects/definition.d.ts.map +0 -1
- package/core/platform/custom-objects/definition.js +0 -200
- package/core/platform/custom-objects/definition.js.map +0 -1
- package/core/platform/custom-objects/definition.mjs +0 -190
- package/core/platform/custom-objects/definition.mjs.map +0 -1
- package/core/platform/custom-objects/fields.d.mts +0 -302
- package/core/platform/custom-objects/fields.d.mts.map +0 -1
- package/core/platform/custom-objects/fields.d.ts +0 -302
- package/core/platform/custom-objects/fields.d.ts.map +0 -1
- package/core/platform/custom-objects/fields.js +0 -369
- package/core/platform/custom-objects/fields.js.map +0 -1
- package/core/platform/custom-objects/fields.mjs +0 -347
- package/core/platform/custom-objects/fields.mjs.map +0 -1
- package/core/platform/custom-objects/function-runtime.d.mts +0 -42
- package/core/platform/custom-objects/function-runtime.d.mts.map +0 -1
- package/core/platform/custom-objects/function-runtime.d.ts +0 -42
- package/core/platform/custom-objects/function-runtime.d.ts.map +0 -1
- package/core/platform/custom-objects/function-runtime.js +0 -38
- package/core/platform/custom-objects/function-runtime.js.map +0 -1
- package/core/platform/custom-objects/function-runtime.mjs +0 -35
- package/core/platform/custom-objects/function-runtime.mjs.map +0 -1
- package/core/platform/custom-objects/lifecycle.d.mts +0 -83
- package/core/platform/custom-objects/lifecycle.d.mts.map +0 -1
- package/core/platform/custom-objects/lifecycle.d.ts +0 -83
- package/core/platform/custom-objects/lifecycle.d.ts.map +0 -1
- package/core/platform/custom-objects/lifecycle.js +0 -372
- package/core/platform/custom-objects/lifecycle.js.map +0 -1
- package/core/platform/custom-objects/lifecycle.mjs +0 -367
- package/core/platform/custom-objects/lifecycle.mjs.map +0 -1
- package/core/platform/custom-objects/manager.d.mts +0 -354
- package/core/platform/custom-objects/manager.d.mts.map +0 -1
- package/core/platform/custom-objects/manager.d.ts +0 -354
- package/core/platform/custom-objects/manager.d.ts.map +0 -1
- package/core/platform/custom-objects/manager.js +0 -646
- package/core/platform/custom-objects/manager.js.map +0 -1
- package/core/platform/custom-objects/manager.mjs +0 -637
- package/core/platform/custom-objects/manager.mjs.map +0 -1
- package/core/platform/custom-objects/provisioning.d.mts +0 -138
- package/core/platform/custom-objects/provisioning.d.mts.map +0 -1
- package/core/platform/custom-objects/provisioning.d.ts +0 -138
- package/core/platform/custom-objects/provisioning.d.ts.map +0 -1
- package/core/platform/custom-objects/provisioning.js +0 -455
- package/core/platform/custom-objects/provisioning.js.map +0 -1
- package/core/platform/custom-objects/provisioning.mjs +0 -447
- package/core/platform/custom-objects/provisioning.mjs.map +0 -1
- package/core/platform/custom-objects/rql.d.mts +0 -122
- package/core/platform/custom-objects/rql.d.mts.map +0 -1
- package/core/platform/custom-objects/rql.d.ts +0 -122
- package/core/platform/custom-objects/rql.d.ts.map +0 -1
- package/core/platform/custom-objects/rql.js +0 -225
- package/core/platform/custom-objects/rql.js.map +0 -1
- package/core/platform/custom-objects/rql.mjs +0 -222
- package/core/platform/custom-objects/rql.mjs.map +0 -1
- package/core/platform/custom-objects/schema-manager.d.mts +0 -203
- package/core/platform/custom-objects/schema-manager.d.mts.map +0 -1
- package/core/platform/custom-objects/schema-manager.d.ts +0 -203
- package/core/platform/custom-objects/schema-manager.d.ts.map +0 -1
- package/core/platform/custom-objects/schema-manager.js +0 -256
- package/core/platform/custom-objects/schema-manager.js.map +0 -1
- package/core/platform/custom-objects/schema-manager.mjs +0 -249
- package/core/platform/custom-objects/schema-manager.mjs.map +0 -1
- package/core/platform/custom-objects/typed-rql.d.mts +0 -157
- package/core/platform/custom-objects/typed-rql.d.mts.map +0 -1
- package/core/platform/custom-objects/typed-rql.d.ts +0 -157
- package/core/platform/custom-objects/typed-rql.d.ts.map +0 -1
- package/core/platform/custom-objects/typed-rql.js +0 -583
- package/core/platform/custom-objects/typed-rql.js.map +0 -1
- package/core/platform/custom-objects/typed-rql.mjs +0 -580
- package/core/platform/custom-objects/typed-rql.mjs.map +0 -1
- package/core/platform/custom-objects/types.d.mts +0 -549
- package/core/platform/custom-objects/types.d.mts.map +0 -1
- package/core/platform/custom-objects/types.d.ts +0 -549
- package/core/platform/custom-objects/types.d.ts.map +0 -1
- package/core/platform/custom-objects/types.js +0 -20
- package/core/platform/custom-objects/types.js.map +0 -1
- package/core/platform/custom-objects/types.mjs +0 -17
- package/core/platform/custom-objects/types.mjs.map +0 -1
- package/core/platform/custom-objects/validation.d.mts +0 -97
- package/core/platform/custom-objects/validation.d.mts.map +0 -1
- package/core/platform/custom-objects/validation.d.ts +0 -97
- package/core/platform/custom-objects/validation.d.ts.map +0 -1
- package/core/platform/custom-objects/validation.js +0 -477
- package/core/platform/custom-objects/validation.js.map +0 -1
- package/core/platform/custom-objects/validation.mjs +0 -465
- package/core/platform/custom-objects/validation.mjs.map +0 -1
- package/core/platform/custom-objects.d.mts +0 -67
- package/core/platform/custom-objects.d.mts.map +0 -1
- package/core/platform/custom-objects.d.ts +0 -67
- package/core/platform/custom-objects.d.ts.map +0 -1
- package/core/platform/custom-objects.js +0 -118
- package/core/platform/custom-objects.js.map +0 -1
- package/core/platform/custom-objects.mjs +0 -45
- package/core/platform/custom-objects.mjs.map +0 -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/custom-objects/category.ts +0 -294
- package/src/core/platform/custom-objects/definition.ts +0 -373
- package/src/core/platform/custom-objects/fields.ts +0 -653
- package/src/core/platform/custom-objects/function-runtime.ts +0 -76
- package/src/core/platform/custom-objects/lifecycle.ts +0 -557
- package/src/core/platform/custom-objects/manager.ts +0 -959
- package/src/core/platform/custom-objects/provisioning.ts +0 -672
- package/src/core/platform/custom-objects/rql.ts +0 -375
- package/src/core/platform/custom-objects/schema-manager.ts +0 -351
- package/src/core/platform/custom-objects/typed-rql.ts +0 -1273
- package/src/core/platform/custom-objects/types.ts +0 -753
- package/src/core/platform/custom-objects/validation.ts +0 -573
- package/src/core/platform/custom-objects.ts +0 -269
- 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,6 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Procurement Approval Hub - vendors, contracts, purchase requests, approvals,
|
|
3
|
-
* and invoices.
|
|
2
|
+
* Procurement Approval Hub - vendors, contracts, purchase requests, approvals, and invoices.
|
|
4
3
|
*
|
|
5
4
|
* pa_vendor__c <- vendor profile and risk tier
|
|
6
5
|
* pa_contract__c <- vendor agreement and spend ceiling
|
|
@@ -13,25 +12,28 @@
|
|
|
13
12
|
* > examples/manifest/procurement-approval-hub/manifest.json
|
|
14
13
|
*/
|
|
15
14
|
|
|
16
|
-
import { toCustomCategoryApiName } from '@rippling/rippling-sdk/core/platform/custom-objects';
|
|
17
15
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
16
|
+
Category,
|
|
17
|
+
CustomObject,
|
|
18
|
+
CustomObjectFieldSection,
|
|
19
|
+
CustomObjectPageLayout,
|
|
20
|
+
DateField,
|
|
21
|
+
EmailField,
|
|
22
|
+
FormulaField,
|
|
23
|
+
ListViewDef,
|
|
24
|
+
LongTextField,
|
|
25
|
+
LookupField,
|
|
26
|
+
ManifestBuilder,
|
|
27
|
+
ManifestFunction,
|
|
28
|
+
NumberField,
|
|
29
|
+
ParentChildField,
|
|
30
|
+
Rule,
|
|
31
|
+
RadioField,
|
|
32
|
+
SummaryField,
|
|
33
|
+
TextField,
|
|
34
|
+
Validation,
|
|
35
|
+
Workflow,
|
|
36
|
+
} from '@rippling/rippling-sdk/lib/manifest';
|
|
35
37
|
|
|
36
38
|
const manifest = new ManifestBuilder({
|
|
37
39
|
key: 'procurement_approval_hub',
|
|
@@ -40,229 +42,513 @@ const manifest = new ManifestBuilder({
|
|
|
40
42
|
});
|
|
41
43
|
|
|
42
44
|
const category = new Category(manifest, {
|
|
43
|
-
apiName:
|
|
45
|
+
apiName: 'procurement__c',
|
|
44
46
|
name: 'Procurement',
|
|
45
47
|
description: 'Procurement workflow and vendor governance records',
|
|
46
48
|
});
|
|
47
49
|
|
|
48
|
-
const
|
|
50
|
+
const vendorObj = new CustomObject(manifest, {
|
|
51
|
+
apiName: 'pa_vendor__c',
|
|
52
|
+
name: 'Vendor',
|
|
53
|
+
pluralLabel: 'Vendors',
|
|
54
|
+
category,
|
|
55
|
+
description: 'Vendor profile, risk tier, and compliance owner',
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
const vendorSection = new CustomObjectFieldSection(vendorObj, {
|
|
59
|
+
name: 'Vendor',
|
|
60
|
+
sectionId: 'sec_pa_vendor',
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
const vendorLegalNameField = new TextField(vendorObj, {
|
|
64
|
+
apiName: 'legal_name__c',
|
|
65
|
+
displayName: 'Legal name',
|
|
66
|
+
description: 'Registered legal vendor name',
|
|
67
|
+
required: true,
|
|
68
|
+
maxLength: 200,
|
|
69
|
+
section: vendorSection,
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
const vendorCategoryField = new RadioField(vendorObj, {
|
|
73
|
+
apiName: 'vendor_category__c',
|
|
74
|
+
displayName: 'Vendor category',
|
|
75
|
+
description: 'Primary spend category',
|
|
76
|
+
options: ['Software', 'Facilities', 'Professional services', 'Marketing', 'Hardware', 'Other'],
|
|
77
|
+
required: true,
|
|
78
|
+
section: vendorSection,
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
const vendorRiskField = new RadioField(vendorObj, {
|
|
82
|
+
apiName: 'risk_tier__c',
|
|
83
|
+
displayName: 'Risk tier',
|
|
84
|
+
description: 'Risk tier from diligence review',
|
|
85
|
+
options: ['Low', 'Medium', 'High', 'Critical'],
|
|
86
|
+
required: true,
|
|
87
|
+
section: vendorSection,
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
const vendorContactEmailField = new EmailField(vendorObj, {
|
|
91
|
+
apiName: 'contact_email__c',
|
|
92
|
+
displayName: 'Contact email',
|
|
93
|
+
description: 'Primary vendor contact email',
|
|
94
|
+
section: vendorSection,
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
const contractObj = new CustomObject(manifest, {
|
|
98
|
+
apiName: 'pa_contract__c',
|
|
99
|
+
name: 'Contract',
|
|
100
|
+
pluralLabel: 'Contracts',
|
|
101
|
+
category,
|
|
102
|
+
description: 'Vendor contract with dates, status, and spend ceiling',
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
const contractSection = new CustomObjectFieldSection(contractObj, {
|
|
106
|
+
name: 'Contract',
|
|
107
|
+
sectionId: 'sec_pa_contract',
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
const contractVendorRef = new ParentChildField(contractObj, {
|
|
111
|
+
apiName: 'vendor_ref__c',
|
|
112
|
+
displayName: 'Vendor',
|
|
113
|
+
target: vendorObj,
|
|
114
|
+
relatedDataLabel: 'Contracts',
|
|
115
|
+
parentChildType: 'PRIMARY',
|
|
116
|
+
enableParentOwnerInheritance: false,
|
|
117
|
+
description: 'Vendor this contract belongs to',
|
|
118
|
+
section: contractSection,
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
const contractStatusField = new RadioField(contractObj, {
|
|
122
|
+
apiName: 'status__c',
|
|
123
|
+
displayName: 'Status',
|
|
124
|
+
description: 'Contract lifecycle status',
|
|
125
|
+
options: ['Draft', 'In review', 'Active', 'Expired', 'Terminated'],
|
|
126
|
+
required: true,
|
|
127
|
+
section: contractSection,
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
const contractStartDateField = new DateField(contractObj, {
|
|
131
|
+
apiName: 'start_date__c',
|
|
132
|
+
displayName: 'Start date',
|
|
133
|
+
description: 'Contract effective date',
|
|
134
|
+
section: contractSection,
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
const contractEndDateField = new DateField(contractObj, {
|
|
138
|
+
apiName: 'end_date__c',
|
|
139
|
+
displayName: 'End date',
|
|
140
|
+
description: 'Contract expiration date',
|
|
141
|
+
section: contractSection,
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
const contractCeilingCentsField = new NumberField(contractObj, {
|
|
145
|
+
apiName: 'spend_ceiling_cents__c',
|
|
146
|
+
displayName: 'Spend ceiling (cents)',
|
|
147
|
+
description: 'Approved maximum spend in cents',
|
|
148
|
+
decimalPlaces: 0,
|
|
149
|
+
section: contractSection,
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
const contractTermsField = new LongTextField(contractObj, {
|
|
153
|
+
apiName: 'key_terms__c',
|
|
154
|
+
displayName: 'Key terms',
|
|
155
|
+
description: 'Renewal, data processing, and termination notes',
|
|
156
|
+
maxLength: 6000,
|
|
157
|
+
section: contractSection,
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
const requestObj = new CustomObject(manifest, {
|
|
161
|
+
apiName: 'pa_purchase_request__c',
|
|
162
|
+
name: 'Purchase request',
|
|
163
|
+
pluralLabel: 'Purchase requests',
|
|
49
164
|
category,
|
|
50
|
-
|
|
51
|
-
vendorDefinition,
|
|
52
|
-
contractDefinition,
|
|
53
|
-
requestDefinition,
|
|
54
|
-
approvalDefinition,
|
|
55
|
-
invoiceDefinition,
|
|
56
|
-
] as const,
|
|
165
|
+
description: 'Purchase request with business justification and approval state',
|
|
57
166
|
});
|
|
58
167
|
|
|
59
|
-
const
|
|
168
|
+
const requestSection = new CustomObjectFieldSection(requestObj, {
|
|
169
|
+
name: 'Purchase request',
|
|
170
|
+
sectionId: 'sec_pa_request',
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
const requestVendorRef = new LookupField(requestObj, {
|
|
174
|
+
apiName: 'vendor_ref__c',
|
|
175
|
+
displayName: 'Vendor',
|
|
176
|
+
target: vendorObj,
|
|
177
|
+
relatedDataLabel: 'Purchase requests',
|
|
178
|
+
description: 'Preferred or selected vendor',
|
|
179
|
+
required: true,
|
|
180
|
+
section: requestSection,
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
const requestContractRef = new LookupField(requestObj, {
|
|
184
|
+
apiName: 'contract_ref__c',
|
|
185
|
+
displayName: 'Contract',
|
|
186
|
+
target: contractObj,
|
|
187
|
+
relatedDataLabel: 'Purchase requests',
|
|
188
|
+
description: 'Contract used for this request, if any',
|
|
189
|
+
section: requestSection,
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
const requestAmountCentsField = new NumberField(requestObj, {
|
|
193
|
+
apiName: 'amount_cents__c',
|
|
194
|
+
displayName: 'Amount (cents)',
|
|
195
|
+
description: 'Requested spend amount in cents',
|
|
196
|
+
decimalPlaces: 0,
|
|
197
|
+
required: true,
|
|
198
|
+
section: requestSection,
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
const requestStatusField = new RadioField(requestObj, {
|
|
202
|
+
apiName: 'status__c',
|
|
203
|
+
displayName: 'Status',
|
|
204
|
+
description: 'Approval status',
|
|
205
|
+
options: ['Draft', 'Submitted', 'In approval', 'Approved', 'Rejected', 'Ordered'],
|
|
206
|
+
required: true,
|
|
207
|
+
section: requestSection,
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
const requestNeedByField = new DateField(requestObj, {
|
|
211
|
+
apiName: 'need_by__c',
|
|
212
|
+
displayName: 'Need by',
|
|
213
|
+
description: 'Requested delivery or purchase date',
|
|
214
|
+
section: requestSection,
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
const requestJustificationField = new LongTextField(requestObj, {
|
|
218
|
+
apiName: 'business_justification__c',
|
|
219
|
+
displayName: 'Business justification',
|
|
220
|
+
description: 'Why the purchase is needed',
|
|
221
|
+
maxLength: 6000,
|
|
222
|
+
section: requestSection,
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
const approvalObj = new CustomObject(manifest, {
|
|
226
|
+
apiName: 'pa_approval_step__c',
|
|
227
|
+
name: 'Approval step',
|
|
228
|
+
pluralLabel: 'Approval steps',
|
|
229
|
+
category,
|
|
230
|
+
description: 'Approval routing line tied to a purchase request',
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
const approvalSection = new CustomObjectFieldSection(approvalObj, {
|
|
234
|
+
name: 'Approval step',
|
|
235
|
+
sectionId: 'sec_pa_approval',
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
const approvalRequestRef = new ParentChildField(approvalObj, {
|
|
239
|
+
apiName: 'purchase_request_ref__c',
|
|
240
|
+
displayName: 'Purchase request',
|
|
241
|
+
target: requestObj,
|
|
242
|
+
relatedDataLabel: 'Approval steps',
|
|
243
|
+
parentChildType: 'PRIMARY',
|
|
244
|
+
enableParentOwnerInheritance: true,
|
|
245
|
+
description: 'Purchase request this approval belongs to',
|
|
246
|
+
section: approvalSection,
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
const approvalSequenceField = new NumberField(approvalObj, {
|
|
250
|
+
apiName: 'sequence__c',
|
|
251
|
+
displayName: 'Sequence',
|
|
252
|
+
description: 'Approval sequence number',
|
|
253
|
+
decimalPlaces: 0,
|
|
254
|
+
required: true,
|
|
255
|
+
section: approvalSection,
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
const approvalRoleField = new RadioField(approvalObj, {
|
|
259
|
+
apiName: 'approval_role__c',
|
|
260
|
+
displayName: 'Approval role',
|
|
261
|
+
description: 'Approval lane',
|
|
262
|
+
options: ['Budget owner', 'Finance', 'Security', 'Legal', 'Procurement'],
|
|
263
|
+
required: true,
|
|
264
|
+
section: approvalSection,
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
const approvalStatusField = new RadioField(approvalObj, {
|
|
268
|
+
apiName: 'status__c',
|
|
269
|
+
displayName: 'Status',
|
|
270
|
+
description: 'Approval step status',
|
|
271
|
+
options: ['Pending', 'Approved', 'Rejected', 'Skipped'],
|
|
272
|
+
required: true,
|
|
273
|
+
section: approvalSection,
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
const invoiceObj = new CustomObject(manifest, {
|
|
277
|
+
apiName: 'pa_invoice__c',
|
|
278
|
+
name: 'Invoice',
|
|
279
|
+
pluralLabel: 'Invoices',
|
|
280
|
+
category,
|
|
281
|
+
description: 'Invoice received against a vendor contract',
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
const invoiceSection = new CustomObjectFieldSection(invoiceObj, {
|
|
285
|
+
name: 'Invoice',
|
|
286
|
+
sectionId: 'sec_pa_invoice',
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
const invoiceContractRef = new ParentChildField(invoiceObj, {
|
|
290
|
+
apiName: 'contract_ref__c',
|
|
291
|
+
displayName: 'Contract',
|
|
292
|
+
target: contractObj,
|
|
293
|
+
relatedDataLabel: 'Invoices',
|
|
294
|
+
parentChildType: 'PRIMARY',
|
|
295
|
+
enableParentOwnerInheritance: false,
|
|
296
|
+
description: 'Contract this invoice is billed against',
|
|
297
|
+
section: invoiceSection,
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
const invoiceNumberField = new TextField(invoiceObj, {
|
|
301
|
+
apiName: 'invoice_number__c',
|
|
302
|
+
displayName: 'Invoice number',
|
|
303
|
+
description: 'Vendor invoice number',
|
|
304
|
+
maxLength: 120,
|
|
305
|
+
required: true,
|
|
306
|
+
section: invoiceSection,
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
const invoiceAmountCentsField = new NumberField(invoiceObj, {
|
|
310
|
+
apiName: 'amount_cents__c',
|
|
311
|
+
displayName: 'Amount (cents)',
|
|
312
|
+
description: 'Invoice amount in cents',
|
|
313
|
+
decimalPlaces: 0,
|
|
314
|
+
required: true,
|
|
315
|
+
section: invoiceSection,
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
const invoiceStatusField = new RadioField(invoiceObj, {
|
|
319
|
+
apiName: 'status__c',
|
|
320
|
+
displayName: 'Status',
|
|
321
|
+
description: 'Invoice processing status',
|
|
322
|
+
options: ['Received', 'Matched', 'Approved', 'Paid', 'Exception'],
|
|
323
|
+
required: true,
|
|
324
|
+
section: invoiceSection,
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
const contractCountOnVendor = new SummaryField(vendorObj, {
|
|
60
328
|
apiName: 'contract_count__c',
|
|
61
329
|
displayName: 'Contracts',
|
|
62
|
-
aggregates:
|
|
330
|
+
aggregates: contractStatusField,
|
|
63
331
|
using: 'COUNT',
|
|
64
|
-
lookup:
|
|
332
|
+
lookup: contractVendorRef,
|
|
65
333
|
description: 'Contracts for this vendor',
|
|
66
|
-
section:
|
|
334
|
+
section: vendorSection,
|
|
67
335
|
});
|
|
68
336
|
|
|
69
|
-
const approvalCountOnRequest = new SummaryField(
|
|
337
|
+
const approvalCountOnRequest = new SummaryField(requestObj, {
|
|
70
338
|
apiName: 'approval_step_count__c',
|
|
71
339
|
displayName: 'Approval steps',
|
|
72
|
-
aggregates:
|
|
340
|
+
aggregates: approvalRoleField,
|
|
73
341
|
using: 'COUNT',
|
|
74
|
-
lookup:
|
|
342
|
+
lookup: approvalRequestRef,
|
|
75
343
|
description: 'Approval steps attached to this request',
|
|
76
|
-
section:
|
|
344
|
+
section: requestSection,
|
|
77
345
|
});
|
|
78
346
|
|
|
79
|
-
const invoicedAmountOnContract = new SummaryField(
|
|
347
|
+
const invoicedAmountOnContract = new SummaryField(contractObj, {
|
|
80
348
|
apiName: 'invoiced_amount_cents__c',
|
|
81
349
|
displayName: 'Invoiced amount (cents)',
|
|
82
|
-
aggregates:
|
|
350
|
+
aggregates: invoiceAmountCentsField,
|
|
83
351
|
using: 'SUM',
|
|
84
|
-
lookup:
|
|
352
|
+
lookup: invoiceContractRef,
|
|
85
353
|
description: 'Total invoice amount billed against this contract',
|
|
86
|
-
section:
|
|
354
|
+
section: contractSection,
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
const requestLabelField = new FormulaField(requestObj, {
|
|
358
|
+
apiName: 'approval_label__c',
|
|
359
|
+
displayName: 'Approval label',
|
|
360
|
+
description: 'Status and amount for approval queues',
|
|
361
|
+
fieldType: 'TEXT',
|
|
362
|
+
maxLength: 240,
|
|
363
|
+
formula: "CONCATENATE(status__c, ' - ', amount_cents__c)",
|
|
364
|
+
section: requestSection,
|
|
87
365
|
});
|
|
88
366
|
|
|
89
|
-
|
|
90
|
-
defineTypedValidation(contract, {
|
|
367
|
+
new Validation(contractObj, {
|
|
91
368
|
ruleId: 'pa_contract_end_after_start',
|
|
92
369
|
displayName: 'Contract end must be after start',
|
|
93
|
-
|
|
370
|
+
rqlFormula: '(end_date__c <= start_date__c)',
|
|
94
371
|
errorMessage: 'Contract end date must be after start date.',
|
|
95
372
|
ruleDescription: 'Prevents inverted contract terms',
|
|
96
373
|
state: 'ACTIVE',
|
|
97
374
|
level: 'FIELD',
|
|
98
|
-
|
|
375
|
+
fieldRef: contractEndDateField,
|
|
99
376
|
});
|
|
100
377
|
|
|
101
|
-
|
|
378
|
+
new Validation(requestObj, {
|
|
102
379
|
ruleId: 'pa_request_amount_positive',
|
|
103
380
|
displayName: 'Request amount must be positive',
|
|
104
|
-
|
|
381
|
+
rqlFormula: '(amount_cents__c <= 0)',
|
|
105
382
|
errorMessage: 'Amount must be greater than zero.',
|
|
106
383
|
ruleDescription: 'Blocks zero-value purchase requests',
|
|
107
384
|
state: 'ACTIVE',
|
|
108
385
|
level: 'FIELD',
|
|
109
|
-
|
|
386
|
+
fieldRef: requestAmountCentsField,
|
|
110
387
|
});
|
|
111
388
|
|
|
112
|
-
|
|
389
|
+
new Rule(requestObj, {
|
|
113
390
|
flowId: 'pa_default_request_status',
|
|
114
391
|
flowName: 'Default purchase request status',
|
|
115
392
|
triggerType: 'CREATE',
|
|
116
393
|
description: 'New purchase requests start as Draft',
|
|
117
|
-
actions:
|
|
394
|
+
actions: [{ targetField: requestStatusField, fixedValue: 'Draft' }],
|
|
118
395
|
});
|
|
119
396
|
|
|
120
|
-
|
|
397
|
+
new Rule(approvalObj, {
|
|
121
398
|
flowId: 'pa_default_approval_status',
|
|
122
399
|
flowName: 'Default approval step status',
|
|
123
400
|
triggerType: 'CREATE',
|
|
124
401
|
description: 'New approval steps start Pending',
|
|
125
|
-
actions:
|
|
402
|
+
actions: [{ targetField: approvalStatusField, fixedValue: 'Pending' }],
|
|
126
403
|
});
|
|
127
404
|
|
|
128
|
-
|
|
129
|
-
defineTypedListView(vendor, {
|
|
405
|
+
new ListViewDef(vendorObj, {
|
|
130
406
|
viewId: 'view_pa_vendors',
|
|
131
407
|
name: 'Vendors',
|
|
132
408
|
description: 'Vendor directory with risk and contract count',
|
|
133
|
-
fields: [
|
|
134
|
-
|
|
409
|
+
fields: [
|
|
410
|
+
'name',
|
|
411
|
+
vendorLegalNameField,
|
|
412
|
+
vendorCategoryField,
|
|
413
|
+
vendorRiskField,
|
|
414
|
+
vendorContactEmailField,
|
|
415
|
+
contractCountOnVendor,
|
|
416
|
+
],
|
|
417
|
+
orderBy: vendorLegalNameField,
|
|
135
418
|
sortOrder: 'ASC',
|
|
136
419
|
isPublic: true,
|
|
137
420
|
objectScope: 'all',
|
|
138
421
|
});
|
|
139
422
|
|
|
140
|
-
|
|
423
|
+
new ListViewDef(contractObj, {
|
|
141
424
|
viewId: 'view_pa_contracts',
|
|
142
425
|
name: 'Contracts',
|
|
143
426
|
description: 'Contract inventory with dates and invoiced amount',
|
|
144
427
|
fields: [
|
|
145
428
|
'name',
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
429
|
+
contractVendorRef,
|
|
430
|
+
contractStatusField,
|
|
431
|
+
contractStartDateField,
|
|
432
|
+
contractEndDateField,
|
|
433
|
+
contractCeilingCentsField,
|
|
151
434
|
invoicedAmountOnContract,
|
|
152
435
|
],
|
|
153
|
-
orderBy:
|
|
436
|
+
orderBy: contractEndDateField,
|
|
154
437
|
sortOrder: 'ASC',
|
|
155
438
|
isPublic: true,
|
|
156
439
|
objectScope: 'all',
|
|
157
440
|
});
|
|
158
441
|
|
|
159
|
-
|
|
442
|
+
new ListViewDef(requestObj, {
|
|
160
443
|
viewId: 'view_pa_purchase_requests',
|
|
161
444
|
name: 'Purchase requests',
|
|
162
445
|
description: 'Approval queue for purchase requests',
|
|
163
446
|
fields: [
|
|
164
447
|
'name',
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
448
|
+
requestVendorRef,
|
|
449
|
+
requestContractRef,
|
|
450
|
+
requestAmountCentsField,
|
|
451
|
+
requestStatusField,
|
|
452
|
+
requestNeedByField,
|
|
170
453
|
approvalCountOnRequest,
|
|
171
|
-
|
|
454
|
+
requestLabelField,
|
|
172
455
|
],
|
|
173
|
-
orderBy:
|
|
456
|
+
orderBy: requestNeedByField,
|
|
174
457
|
sortOrder: 'ASC',
|
|
175
458
|
isPublic: true,
|
|
176
459
|
objectScope: 'all',
|
|
177
|
-
filter: (c) => c.where('status').in(['Submitted', 'In approval']),
|
|
178
460
|
});
|
|
179
461
|
|
|
180
|
-
|
|
462
|
+
new ListViewDef(approvalObj, {
|
|
181
463
|
viewId: 'view_pa_approval_steps',
|
|
182
464
|
name: 'Approval steps',
|
|
183
465
|
description: 'Approval routing lines by request',
|
|
184
|
-
fields: ['name',
|
|
185
|
-
orderBy:
|
|
466
|
+
fields: ['name', approvalRequestRef, approvalSequenceField, approvalRoleField, approvalStatusField],
|
|
467
|
+
orderBy: approvalSequenceField,
|
|
186
468
|
sortOrder: 'ASC',
|
|
187
469
|
isPublic: true,
|
|
188
470
|
objectScope: 'all',
|
|
189
|
-
filter: (c) => c.where('status').eq('Pending'),
|
|
190
471
|
});
|
|
191
472
|
|
|
192
|
-
|
|
473
|
+
new ListViewDef(invoiceObj, {
|
|
193
474
|
viewId: 'view_pa_invoices',
|
|
194
475
|
name: 'Invoices',
|
|
195
476
|
description: 'Invoices received against contracts',
|
|
196
|
-
fields: ['name',
|
|
197
|
-
orderBy:
|
|
477
|
+
fields: ['name', invoiceContractRef, invoiceNumberField, invoiceAmountCentsField, invoiceStatusField],
|
|
478
|
+
orderBy: invoiceContractRef,
|
|
198
479
|
sortOrder: 'ASC',
|
|
199
480
|
isPublic: true,
|
|
200
481
|
objectScope: 'all',
|
|
201
482
|
});
|
|
202
483
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
484
|
+
CustomObjectPageLayout.basic(vendorObj, {
|
|
485
|
+
section: vendorSection,
|
|
486
|
+
fields: [
|
|
487
|
+
'name',
|
|
488
|
+
vendorLegalNameField,
|
|
489
|
+
vendorCategoryField,
|
|
490
|
+
vendorRiskField,
|
|
491
|
+
vendorContactEmailField,
|
|
492
|
+
contractCountOnVendor,
|
|
493
|
+
],
|
|
207
494
|
});
|
|
208
495
|
|
|
209
|
-
|
|
210
|
-
section:
|
|
496
|
+
CustomObjectPageLayout.basic(contractObj, {
|
|
497
|
+
section: contractSection,
|
|
211
498
|
fields: [
|
|
212
499
|
'name',
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
500
|
+
contractVendorRef,
|
|
501
|
+
contractStatusField,
|
|
502
|
+
contractStartDateField,
|
|
503
|
+
contractEndDateField,
|
|
504
|
+
contractCeilingCentsField,
|
|
218
505
|
invoicedAmountOnContract,
|
|
219
|
-
|
|
506
|
+
contractTermsField,
|
|
220
507
|
],
|
|
221
508
|
});
|
|
222
509
|
|
|
223
|
-
|
|
224
|
-
section:
|
|
510
|
+
CustomObjectPageLayout.basic(requestObj, {
|
|
511
|
+
section: requestSection,
|
|
225
512
|
fields: [
|
|
226
513
|
'name',
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
514
|
+
requestVendorRef,
|
|
515
|
+
requestContractRef,
|
|
516
|
+
requestAmountCentsField,
|
|
517
|
+
requestStatusField,
|
|
518
|
+
requestNeedByField,
|
|
232
519
|
approvalCountOnRequest,
|
|
233
|
-
|
|
234
|
-
|
|
520
|
+
requestLabelField,
|
|
521
|
+
requestJustificationField,
|
|
235
522
|
],
|
|
236
523
|
});
|
|
237
524
|
|
|
238
|
-
|
|
239
|
-
section:
|
|
240
|
-
fields: ['name',
|
|
525
|
+
CustomObjectPageLayout.basic(approvalObj, {
|
|
526
|
+
section: approvalSection,
|
|
527
|
+
fields: ['name', approvalRequestRef, approvalSequenceField, approvalRoleField, approvalStatusField],
|
|
241
528
|
});
|
|
242
529
|
|
|
243
|
-
|
|
244
|
-
section:
|
|
245
|
-
fields: ['name',
|
|
530
|
+
CustomObjectPageLayout.basic(invoiceObj, {
|
|
531
|
+
section: invoiceSection,
|
|
532
|
+
fields: ['name', invoiceContractRef, invoiceNumberField, invoiceAmountCentsField, invoiceStatusField],
|
|
246
533
|
});
|
|
247
534
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
codeFilename: 'functions/route-purchase-request.ts',
|
|
256
|
-
dependencies: {
|
|
257
|
-
'@rippling/rippling-sdk': '^0.2.0-alpha.78',
|
|
258
|
-
},
|
|
259
|
-
},
|
|
535
|
+
const routeApprovalFunction = new ManifestFunction(manifest, {
|
|
536
|
+
apiName: 'pa_route_purchase_request_fn',
|
|
537
|
+
name: 'Route purchase request approvals',
|
|
538
|
+
description: 'Function invoked by workflow when a purchase request is submitted',
|
|
539
|
+
});
|
|
540
|
+
|
|
541
|
+
new Workflow(manifest, {
|
|
260
542
|
definitionId: 'pa_purchase_request_submitted_workflow',
|
|
261
543
|
title: 'Purchase request submitted',
|
|
262
|
-
description: 'Routes purchase requests into approval steps when request records are
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
544
|
+
description: 'Routes purchase requests into approval steps when request records are created',
|
|
545
|
+
function: routeApprovalFunction,
|
|
546
|
+
trigger: {
|
|
547
|
+
automation_event_type: 'AUTOMATION_EVENT_TYPE_RECORD_CHANGE',
|
|
548
|
+
og_module: 'custom_objects',
|
|
549
|
+
base_model: requestObj.getApiName(),
|
|
550
|
+
record_change_operation_type: 'RECORD_CHANGE_OPERATION_TYPE_CREATE',
|
|
551
|
+
},
|
|
266
552
|
});
|
|
267
553
|
|
|
268
554
|
console.log(manifest.preview());
|