@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,326 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createManifestConditionHelpers = createManifestConditionHelpers;
|
|
4
|
-
exports.resolveManifestConditionInput = resolveManifestConditionInput;
|
|
5
|
-
exports.customObjectLifecycle = customObjectLifecycle;
|
|
6
|
-
const STANDARD_MANIFEST_CONDITION_FIELDS = [
|
|
7
|
-
'id',
|
|
8
|
-
'name',
|
|
9
|
-
'created_at',
|
|
10
|
-
'updated_at',
|
|
11
|
-
'system_updated_at',
|
|
12
|
-
'external_id',
|
|
13
|
-
'owner_role',
|
|
14
|
-
'created_by',
|
|
15
|
-
'last_modified_by',
|
|
16
|
-
];
|
|
17
|
-
function isManifestRegistration(target) {
|
|
18
|
-
return typeof target === 'object' && target != null && 'definition' in target && 'object' in target;
|
|
19
|
-
}
|
|
20
|
-
function resolveTargetDefinition(target) {
|
|
21
|
-
return isManifestRegistration(target) ? target.definition : target;
|
|
22
|
-
}
|
|
23
|
-
/** Creates one immutable manifest-condition fragment. */
|
|
24
|
-
function createFragment(text) {
|
|
25
|
-
return Object.freeze({ text });
|
|
26
|
-
}
|
|
27
|
-
/** Encodes one raw string into single-quoted manifest-condition syntax. */
|
|
28
|
-
function encodeConditionString(value) {
|
|
29
|
-
return `'${value.replace(/\\/g, '\\\\').replace(/'/g, "\\'")}'`;
|
|
30
|
-
}
|
|
31
|
-
/** Encodes one scalar literal into backend-ready manifest-condition syntax. */
|
|
32
|
-
function encodeConditionScalarLiteral(value) {
|
|
33
|
-
if (value === null)
|
|
34
|
-
return 'null';
|
|
35
|
-
if (typeof value === 'string')
|
|
36
|
-
return encodeConditionString(value);
|
|
37
|
-
if (typeof value === 'number') {
|
|
38
|
-
if (!Number.isFinite(value)) {
|
|
39
|
-
throw new Error(`Manifest-condition numeric literals must be finite. Received ${String(value)}.`);
|
|
40
|
-
}
|
|
41
|
-
return String(value);
|
|
42
|
-
}
|
|
43
|
-
if (typeof value === 'boolean')
|
|
44
|
-
return value ? 'True' : 'False';
|
|
45
|
-
return encodeConditionString(value.id);
|
|
46
|
-
}
|
|
47
|
-
/** Encodes one condition operand, which may be a literal, field token, function token, or literal array. */
|
|
48
|
-
function encodeConditionOperand(value) {
|
|
49
|
-
if (Array.isArray(value)) {
|
|
50
|
-
return `[${value
|
|
51
|
-
.map((item) => encodeConditionScalarLiteral(item))
|
|
52
|
-
.join(', ')}]`;
|
|
53
|
-
}
|
|
54
|
-
if (typeof value === 'object' && value != null && 'kind' in value) {
|
|
55
|
-
return value.kind === 'field' ? value.apiName : value.text;
|
|
56
|
-
}
|
|
57
|
-
return encodeConditionScalarLiteral(value);
|
|
58
|
-
}
|
|
59
|
-
/** Resolves the runtime API name and comparable category for one typed field token. */
|
|
60
|
-
function resolveRuntimeFieldMetadata(definition, fieldName) {
|
|
61
|
-
if (STANDARD_MANIFEST_CONDITION_FIELDS.includes(fieldName)) {
|
|
62
|
-
return {
|
|
63
|
-
apiName: fieldName,
|
|
64
|
-
category: fieldName === 'owner_role' || fieldName === 'created_by' || fieldName === 'last_modified_by' ?
|
|
65
|
-
'lookup'
|
|
66
|
-
: 'string',
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
const field = definition.fields[fieldName];
|
|
70
|
-
if (field == null) {
|
|
71
|
-
throw new Error(`Unknown manifest-condition field "${fieldName}" for "${definition.apiName}". Valid fields: ${[
|
|
72
|
-
...STANDARD_MANIFEST_CONDITION_FIELDS,
|
|
73
|
-
...Object.keys(definition.fields).sort(),
|
|
74
|
-
].join(', ')}.`);
|
|
75
|
-
}
|
|
76
|
-
switch (field.kind) {
|
|
77
|
-
case 'text':
|
|
78
|
-
case 'long-text':
|
|
79
|
-
case 'email':
|
|
80
|
-
case 'url':
|
|
81
|
-
case 'phone':
|
|
82
|
-
case 'date':
|
|
83
|
-
case 'datetime':
|
|
84
|
-
case 'time':
|
|
85
|
-
case 'select':
|
|
86
|
-
case 'radio':
|
|
87
|
-
case 'formula-text':
|
|
88
|
-
case 'formula-date':
|
|
89
|
-
case 'formula-url':
|
|
90
|
-
return { apiName: field.apiName, category: 'string' };
|
|
91
|
-
case 'number':
|
|
92
|
-
case 'currency':
|
|
93
|
-
case 'percentage':
|
|
94
|
-
case 'formula-number':
|
|
95
|
-
case 'formula-currency':
|
|
96
|
-
case 'formula-percentage':
|
|
97
|
-
return { apiName: field.apiName, category: 'number' };
|
|
98
|
-
case 'boolean':
|
|
99
|
-
case 'formula-boolean':
|
|
100
|
-
return { apiName: field.apiName, category: 'boolean' };
|
|
101
|
-
case 'lookup':
|
|
102
|
-
case 'parent-child':
|
|
103
|
-
return { apiName: field.apiName, category: 'lookup' };
|
|
104
|
-
default:
|
|
105
|
-
return { apiName: field.apiName, category: 'unsupported' };
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
function createFieldToken(fieldName, metadata) {
|
|
109
|
-
return Object.freeze({
|
|
110
|
-
kind: 'field',
|
|
111
|
-
fieldName,
|
|
112
|
-
apiName: metadata.apiName,
|
|
113
|
-
category: metadata.category,
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
function createFunctionToken(text, category) {
|
|
117
|
-
return Object.freeze({ kind: 'function', text, category });
|
|
118
|
-
}
|
|
119
|
-
function joinConditionFragments(operator, fragments) {
|
|
120
|
-
if (fragments.length === 0) {
|
|
121
|
-
throw new Error(`Manifest-condition ${operator} requires at least one fragment.`);
|
|
122
|
-
}
|
|
123
|
-
return createFragment(`(${fragments.map((fragment) => fragment.text).join(` ${operator} `)})`);
|
|
124
|
-
}
|
|
125
|
-
function buildComparison(field, operator, value) {
|
|
126
|
-
return createFragment(`(${field.apiName} ${operator} ${encodeConditionOperand(value)})`);
|
|
127
|
-
}
|
|
128
|
-
function createFieldComparator(field) {
|
|
129
|
-
return Object.freeze({
|
|
130
|
-
field,
|
|
131
|
-
eq(value) {
|
|
132
|
-
return buildComparison(field, '==', value);
|
|
133
|
-
},
|
|
134
|
-
ne(value) {
|
|
135
|
-
return buildComparison(field, '!=', value);
|
|
136
|
-
},
|
|
137
|
-
lt(value) {
|
|
138
|
-
return buildComparison(field, '<', value);
|
|
139
|
-
},
|
|
140
|
-
lte(value) {
|
|
141
|
-
return buildComparison(field, '<=', value);
|
|
142
|
-
},
|
|
143
|
-
gt(value) {
|
|
144
|
-
return buildComparison(field, '>', value);
|
|
145
|
-
},
|
|
146
|
-
gte(value) {
|
|
147
|
-
return buildComparison(field, '>=', value);
|
|
148
|
-
},
|
|
149
|
-
in(values) {
|
|
150
|
-
return buildComparison(field, 'IN', values);
|
|
151
|
-
},
|
|
152
|
-
notIn(values) {
|
|
153
|
-
return buildComparison(field, 'NOT_IN', values);
|
|
154
|
-
},
|
|
155
|
-
isNull() {
|
|
156
|
-
return buildComparison(field, '==', null);
|
|
157
|
-
},
|
|
158
|
-
isNotNull() {
|
|
159
|
-
return buildComparison(field, '!=', null);
|
|
160
|
-
},
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Creates typed manifest-condition helpers for one custom object target.
|
|
165
|
-
*
|
|
166
|
-
* The resulting helper family can be reused anywhere the manifest expects an
|
|
167
|
-
* RQL-like object condition or formula string: list-view filters, validation
|
|
168
|
-
* formulas, workflow guards, and rule conditions.
|
|
169
|
-
*
|
|
170
|
-
* @param target - Typed custom-object definition or manifest registration.
|
|
171
|
-
* @returns Immutable field-aware manifest-condition helper surface.
|
|
172
|
-
* @typeParam TDefinition - Typed custom-object definition whose field namespace should be enforced.
|
|
173
|
-
*/
|
|
174
|
-
function createManifestConditionHelpers(target) {
|
|
175
|
-
const definition = resolveTargetDefinition(target);
|
|
176
|
-
const fieldTokenCache = new Map();
|
|
177
|
-
const todayToken = createFunctionToken('TODAY()', 'string');
|
|
178
|
-
const helper = {
|
|
179
|
-
definition,
|
|
180
|
-
get fields() {
|
|
181
|
-
const out = {};
|
|
182
|
-
for (const fieldName of STANDARD_MANIFEST_CONDITION_FIELDS) {
|
|
183
|
-
out[fieldName] = helper.field(fieldName);
|
|
184
|
-
}
|
|
185
|
-
for (const fieldName of Object.keys(definition.fields)) {
|
|
186
|
-
out[fieldName] = helper.field(fieldName);
|
|
187
|
-
}
|
|
188
|
-
return Object.freeze(out);
|
|
189
|
-
},
|
|
190
|
-
field(fieldName) {
|
|
191
|
-
const cached = fieldTokenCache.get(fieldName);
|
|
192
|
-
if (cached != null) {
|
|
193
|
-
return cached;
|
|
194
|
-
}
|
|
195
|
-
const metadata = resolveRuntimeFieldMetadata(definition, fieldName);
|
|
196
|
-
const token = createFieldToken(fieldName, metadata);
|
|
197
|
-
fieldTokenCache.set(fieldName, token);
|
|
198
|
-
return token;
|
|
199
|
-
},
|
|
200
|
-
where(fieldName) {
|
|
201
|
-
return createFieldComparator(helper.field(fieldName));
|
|
202
|
-
},
|
|
203
|
-
today() {
|
|
204
|
-
return todayToken;
|
|
205
|
-
},
|
|
206
|
-
eq(field, value) {
|
|
207
|
-
return buildComparison(field, '==', value);
|
|
208
|
-
},
|
|
209
|
-
ne(field, value) {
|
|
210
|
-
return buildComparison(field, '!=', value);
|
|
211
|
-
},
|
|
212
|
-
lt(field, value) {
|
|
213
|
-
return buildComparison(field, '<', value);
|
|
214
|
-
},
|
|
215
|
-
lte(field, value) {
|
|
216
|
-
return buildComparison(field, '<=', value);
|
|
217
|
-
},
|
|
218
|
-
gt(field, value) {
|
|
219
|
-
return buildComparison(field, '>', value);
|
|
220
|
-
},
|
|
221
|
-
gte(field, value) {
|
|
222
|
-
return buildComparison(field, '>=', value);
|
|
223
|
-
},
|
|
224
|
-
in(field, values) {
|
|
225
|
-
return buildComparison(field, 'IN', values);
|
|
226
|
-
},
|
|
227
|
-
notIn(field, values) {
|
|
228
|
-
return buildComparison(field, 'NOT_IN', values);
|
|
229
|
-
},
|
|
230
|
-
isNull(field) {
|
|
231
|
-
return buildComparison(field, '==', null);
|
|
232
|
-
},
|
|
233
|
-
isNotNull(field) {
|
|
234
|
-
return buildComparison(field, '!=', null);
|
|
235
|
-
},
|
|
236
|
-
and(...fragments) {
|
|
237
|
-
return joinConditionFragments('AND', fragments);
|
|
238
|
-
},
|
|
239
|
-
all(...fragments) {
|
|
240
|
-
return joinConditionFragments('AND', fragments);
|
|
241
|
-
},
|
|
242
|
-
or(...fragments) {
|
|
243
|
-
return joinConditionFragments('OR', fragments);
|
|
244
|
-
},
|
|
245
|
-
any(...fragments) {
|
|
246
|
-
return joinConditionFragments('OR', fragments);
|
|
247
|
-
},
|
|
248
|
-
not(fragment) {
|
|
249
|
-
return createFragment(`(NOT ${fragment.text})`);
|
|
250
|
-
},
|
|
251
|
-
none(...fragments) {
|
|
252
|
-
return createFragment(`(NOT ${joinConditionFragments('OR', fragments).text})`);
|
|
253
|
-
},
|
|
254
|
-
raw(text) {
|
|
255
|
-
return createFragment(text);
|
|
256
|
-
},
|
|
257
|
-
render(fragment) {
|
|
258
|
-
return fragment.text;
|
|
259
|
-
},
|
|
260
|
-
};
|
|
261
|
-
return helper;
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* Resolves one manifest-condition input into final manifest string text.
|
|
265
|
-
*
|
|
266
|
-
* @param target - Typed custom-object definition or manifest registration.
|
|
267
|
-
* @param input - Condition fragment or helper callback to resolve.
|
|
268
|
-
* @returns Final manifest condition/formula string.
|
|
269
|
-
* @typeParam TDefinition - Typed custom-object definition that owns the helper field namespace.
|
|
270
|
-
*/
|
|
271
|
-
function resolveManifestConditionInput(target, input) {
|
|
272
|
-
const helpers = createManifestConditionHelpers(target);
|
|
273
|
-
const fragment = typeof input === 'function' ? input(helpers) : input;
|
|
274
|
-
return helpers.render(fragment);
|
|
275
|
-
}
|
|
276
|
-
class CustomObjectLifecycleTriggerBuilder {
|
|
277
|
-
constructor(definition, operation, condition) {
|
|
278
|
-
this.definition = definition;
|
|
279
|
-
this.operation = operation;
|
|
280
|
-
this.condition = condition;
|
|
281
|
-
}
|
|
282
|
-
when(condition) {
|
|
283
|
-
return new CustomObjectLifecycleTriggerBuilder(this.definition, this.operation, condition);
|
|
284
|
-
}
|
|
285
|
-
build() {
|
|
286
|
-
return Object.freeze({
|
|
287
|
-
automation_event_type: 'AUTOMATION_EVENT_TYPE_RECORD_CHANGE',
|
|
288
|
-
og_module: 'custom_objects',
|
|
289
|
-
base_model: this.definition.apiName,
|
|
290
|
-
record_change_operation_type: this.operation,
|
|
291
|
-
...(this.condition != null ?
|
|
292
|
-
{ rql_formula: resolveManifestConditionInput(this.definition, this.condition) }
|
|
293
|
-
: {}),
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
/**
|
|
298
|
-
* Creates the typed lifecycle helper namespace for one custom object.
|
|
299
|
-
*
|
|
300
|
-
* The lifecycle helper keeps workflows and custom objects as separate concepts
|
|
301
|
-
* while exposing the custom object's record lifecycle as a fluent, typed join
|
|
302
|
-
* point for workflow composition.
|
|
303
|
-
*
|
|
304
|
-
* @param target - Typed custom-object definition or manifest registration.
|
|
305
|
-
* @returns Immutable lifecycle helper namespace for that custom object.
|
|
306
|
-
* @typeParam TDefinition - Typed custom-object definition whose lifecycle events should be exposed.
|
|
307
|
-
*/
|
|
308
|
-
function customObjectLifecycle(target) {
|
|
309
|
-
const definition = resolveTargetDefinition(target);
|
|
310
|
-
return Object.freeze({
|
|
311
|
-
definition,
|
|
312
|
-
onCreate() {
|
|
313
|
-
return new CustomObjectLifecycleTriggerBuilder(definition, 'RECORD_CHANGE_OPERATION_TYPE_CREATE');
|
|
314
|
-
},
|
|
315
|
-
onUpdate() {
|
|
316
|
-
return new CustomObjectLifecycleTriggerBuilder(definition, 'RECORD_CHANGE_OPERATION_TYPE_UPDATE');
|
|
317
|
-
},
|
|
318
|
-
onDelete() {
|
|
319
|
-
return new CustomObjectLifecycleTriggerBuilder(definition, 'RECORD_CHANGE_OPERATION_TYPE_DELETE');
|
|
320
|
-
},
|
|
321
|
-
onCreateOrUpdate() {
|
|
322
|
-
return new CustomObjectLifecycleTriggerBuilder(definition, 'RECORD_CHANGE_OPERATION_TYPE_CREATE_OR_UPDATE');
|
|
323
|
-
},
|
|
324
|
-
});
|
|
325
|
-
}
|
|
326
|
-
//# sourceMappingURL=conditions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conditions.js","sourceRoot":"","sources":["../../../../src/core/platform/manifest/custom-objects/conditions.ts"],"names":[],"mappings":";;AAsjBA,wEAuGC;AAUD,sEAOC;AAqDD,sDAsBC;AApvBD,MAAM,kCAAkC,GAAG;IACzC,IAAI;IACJ,MAAM;IACN,YAAY;IACZ,YAAY;IACZ,mBAAmB;IACnB,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,kBAAkB;CACgE,CAAC;AAmWrF,SAAS,sBAAsB,CAC7B,MAA+C;IAE/C,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,IAAI,IAAI,IAAI,YAAY,IAAI,MAAM,IAAI,QAAQ,IAAI,MAAM,CAAC;AACtG,CAAC;AAED,SAAS,uBAAuB,CAC9B,MAA+C;IAE/C,OAAO,sBAAsB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC;AACrE,CAAC;AAED,yDAAyD;AACzD,SAAS,cAAc,CAAC,IAAY;IAClC,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;AACjC,CAAC;AAED,2E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CAC5C,UAAU,EACV,+CAA+C,CAChD,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
const STANDARD_MANIFEST_CONDITION_FIELDS = [
|
|
2
|
-
'id',
|
|
3
|
-
'name',
|
|
4
|
-
'created_at',
|
|
5
|
-
'updated_at',
|
|
6
|
-
'system_updated_at',
|
|
7
|
-
'external_id',
|
|
8
|
-
'owner_role',
|
|
9
|
-
'created_by',
|
|
10
|
-
'last_modified_by',
|
|
11
|
-
];
|
|
12
|
-
function isManifestRegistration(target) {
|
|
13
|
-
return typeof target === 'object' && target != null && 'definition' in target && 'object' in target;
|
|
14
|
-
}
|
|
15
|
-
function resolveTargetDefinition(target) {
|
|
16
|
-
return isManifestRegistration(target) ? target.definition : target;
|
|
17
|
-
}
|
|
18
|
-
/** Creates one immutable manifest-condition fragment. */
|
|
19
|
-
function createFragment(text) {
|
|
20
|
-
return Object.freeze({ text });
|
|
21
|
-
}
|
|
22
|
-
/** Encodes one raw string into single-quoted manifest-condition syntax. */
|
|
23
|
-
function encodeConditionString(value) {
|
|
24
|
-
return `'${value.replace(/\\/g, '\\\\').replace(/'/g, "\\'")}'`;
|
|
25
|
-
}
|
|
26
|
-
/** Encodes one scalar literal into backend-ready manifest-condition syntax. */
|
|
27
|
-
function encodeConditionScalarLiteral(value) {
|
|
28
|
-
if (value === null)
|
|
29
|
-
return 'null';
|
|
30
|
-
if (typeof value === 'string')
|
|
31
|
-
return encodeConditionString(value);
|
|
32
|
-
if (typeof value === 'number') {
|
|
33
|
-
if (!Number.isFinite(value)) {
|
|
34
|
-
throw new Error(`Manifest-condition numeric literals must be finite. Received ${String(value)}.`);
|
|
35
|
-
}
|
|
36
|
-
return String(value);
|
|
37
|
-
}
|
|
38
|
-
if (typeof value === 'boolean')
|
|
39
|
-
return value ? 'True' : 'False';
|
|
40
|
-
return encodeConditionString(value.id);
|
|
41
|
-
}
|
|
42
|
-
/** Encodes one condition operand, which may be a literal, field token, function token, or literal array. */
|
|
43
|
-
function encodeConditionOperand(value) {
|
|
44
|
-
if (Array.isArray(value)) {
|
|
45
|
-
return `[${value
|
|
46
|
-
.map((item) => encodeConditionScalarLiteral(item))
|
|
47
|
-
.join(', ')}]`;
|
|
48
|
-
}
|
|
49
|
-
if (typeof value === 'object' && value != null && 'kind' in value) {
|
|
50
|
-
return value.kind === 'field' ? value.apiName : value.text;
|
|
51
|
-
}
|
|
52
|
-
return encodeConditionScalarLiteral(value);
|
|
53
|
-
}
|
|
54
|
-
/** Resolves the runtime API name and comparable category for one typed field token. */
|
|
55
|
-
function resolveRuntimeFieldMetadata(definition, fieldName) {
|
|
56
|
-
if (STANDARD_MANIFEST_CONDITION_FIELDS.includes(fieldName)) {
|
|
57
|
-
return {
|
|
58
|
-
apiName: fieldName,
|
|
59
|
-
category: fieldName === 'owner_role' || fieldName === 'created_by' || fieldName === 'last_modified_by' ?
|
|
60
|
-
'lookup'
|
|
61
|
-
: 'string',
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
const field = definition.fields[fieldName];
|
|
65
|
-
if (field == null) {
|
|
66
|
-
throw new Error(`Unknown manifest-condition field "${fieldName}" for "${definition.apiName}". Valid fields: ${[
|
|
67
|
-
...STANDARD_MANIFEST_CONDITION_FIELDS,
|
|
68
|
-
...Object.keys(definition.fields).sort(),
|
|
69
|
-
].join(', ')}.`);
|
|
70
|
-
}
|
|
71
|
-
switch (field.kind) {
|
|
72
|
-
case 'text':
|
|
73
|
-
case 'long-text':
|
|
74
|
-
case 'email':
|
|
75
|
-
case 'url':
|
|
76
|
-
case 'phone':
|
|
77
|
-
case 'date':
|
|
78
|
-
case 'datetime':
|
|
79
|
-
case 'time':
|
|
80
|
-
case 'select':
|
|
81
|
-
case 'radio':
|
|
82
|
-
case 'formula-text':
|
|
83
|
-
case 'formula-date':
|
|
84
|
-
case 'formula-url':
|
|
85
|
-
return { apiName: field.apiName, category: 'string' };
|
|
86
|
-
case 'number':
|
|
87
|
-
case 'currency':
|
|
88
|
-
case 'percentage':
|
|
89
|
-
case 'formula-number':
|
|
90
|
-
case 'formula-currency':
|
|
91
|
-
case 'formula-percentage':
|
|
92
|
-
return { apiName: field.apiName, category: 'number' };
|
|
93
|
-
case 'boolean':
|
|
94
|
-
case 'formula-boolean':
|
|
95
|
-
return { apiName: field.apiName, category: 'boolean' };
|
|
96
|
-
case 'lookup':
|
|
97
|
-
case 'parent-child':
|
|
98
|
-
return { apiName: field.apiName, category: 'lookup' };
|
|
99
|
-
default:
|
|
100
|
-
return { apiName: field.apiName, category: 'unsupported' };
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
function createFieldToken(fieldName, metadata) {
|
|
104
|
-
return Object.freeze({
|
|
105
|
-
kind: 'field',
|
|
106
|
-
fieldName,
|
|
107
|
-
apiName: metadata.apiName,
|
|
108
|
-
category: metadata.category,
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
function createFunctionToken(text, category) {
|
|
112
|
-
return Object.freeze({ kind: 'function', text, category });
|
|
113
|
-
}
|
|
114
|
-
function joinConditionFragments(operator, fragments) {
|
|
115
|
-
if (fragments.length === 0) {
|
|
116
|
-
throw new Error(`Manifest-condition ${operator} requires at least one fragment.`);
|
|
117
|
-
}
|
|
118
|
-
return createFragment(`(${fragments.map((fragment) => fragment.text).join(` ${operator} `)})`);
|
|
119
|
-
}
|
|
120
|
-
function buildComparison(field, operator, value) {
|
|
121
|
-
return createFragment(`(${field.apiName} ${operator} ${encodeConditionOperand(value)})`);
|
|
122
|
-
}
|
|
123
|
-
function createFieldComparator(field) {
|
|
124
|
-
return Object.freeze({
|
|
125
|
-
field,
|
|
126
|
-
eq(value) {
|
|
127
|
-
return buildComparison(field, '==', value);
|
|
128
|
-
},
|
|
129
|
-
ne(value) {
|
|
130
|
-
return buildComparison(field, '!=', value);
|
|
131
|
-
},
|
|
132
|
-
lt(value) {
|
|
133
|
-
return buildComparison(field, '<', value);
|
|
134
|
-
},
|
|
135
|
-
lte(value) {
|
|
136
|
-
return buildComparison(field, '<=', value);
|
|
137
|
-
},
|
|
138
|
-
gt(value) {
|
|
139
|
-
return buildComparison(field, '>', value);
|
|
140
|
-
},
|
|
141
|
-
gte(value) {
|
|
142
|
-
return buildComparison(field, '>=', value);
|
|
143
|
-
},
|
|
144
|
-
in(values) {
|
|
145
|
-
return buildComparison(field, 'IN', values);
|
|
146
|
-
},
|
|
147
|
-
notIn(values) {
|
|
148
|
-
return buildComparison(field, 'NOT_IN', values);
|
|
149
|
-
},
|
|
150
|
-
isNull() {
|
|
151
|
-
return buildComparison(field, '==', null);
|
|
152
|
-
},
|
|
153
|
-
isNotNull() {
|
|
154
|
-
return buildComparison(field, '!=', null);
|
|
155
|
-
},
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Creates typed manifest-condition helpers for one custom object target.
|
|
160
|
-
*
|
|
161
|
-
* The resulting helper family can be reused anywhere the manifest expects an
|
|
162
|
-
* RQL-like object condition or formula string: list-view filters, validation
|
|
163
|
-
* formulas, workflow guards, and rule conditions.
|
|
164
|
-
*
|
|
165
|
-
* @param target - Typed custom-object definition or manifest registration.
|
|
166
|
-
* @returns Immutable field-aware manifest-condition helper surface.
|
|
167
|
-
* @typeParam TDefinition - Typed custom-object definition whose field namespace should be enforced.
|
|
168
|
-
*/
|
|
169
|
-
export function createManifestConditionHelpers(target) {
|
|
170
|
-
const definition = resolveTargetDefinition(target);
|
|
171
|
-
const fieldTokenCache = new Map();
|
|
172
|
-
const todayToken = createFunctionToken('TODAY()', 'string');
|
|
173
|
-
const helper = {
|
|
174
|
-
definition,
|
|
175
|
-
get fields() {
|
|
176
|
-
const out = {};
|
|
177
|
-
for (const fieldName of STANDARD_MANIFEST_CONDITION_FIELDS) {
|
|
178
|
-
out[fieldName] = helper.field(fieldName);
|
|
179
|
-
}
|
|
180
|
-
for (const fieldName of Object.keys(definition.fields)) {
|
|
181
|
-
out[fieldName] = helper.field(fieldName);
|
|
182
|
-
}
|
|
183
|
-
return Object.freeze(out);
|
|
184
|
-
},
|
|
185
|
-
field(fieldName) {
|
|
186
|
-
const cached = fieldTokenCache.get(fieldName);
|
|
187
|
-
if (cached != null) {
|
|
188
|
-
return cached;
|
|
189
|
-
}
|
|
190
|
-
const metadata = resolveRuntimeFieldMetadata(definition, fieldName);
|
|
191
|
-
const token = createFieldToken(fieldName, metadata);
|
|
192
|
-
fieldTokenCache.set(fieldName, token);
|
|
193
|
-
return token;
|
|
194
|
-
},
|
|
195
|
-
where(fieldName) {
|
|
196
|
-
return createFieldComparator(helper.field(fieldName));
|
|
197
|
-
},
|
|
198
|
-
today() {
|
|
199
|
-
return todayToken;
|
|
200
|
-
},
|
|
201
|
-
eq(field, value) {
|
|
202
|
-
return buildComparison(field, '==', value);
|
|
203
|
-
},
|
|
204
|
-
ne(field, value) {
|
|
205
|
-
return buildComparison(field, '!=', value);
|
|
206
|
-
},
|
|
207
|
-
lt(field, value) {
|
|
208
|
-
return buildComparison(field, '<', value);
|
|
209
|
-
},
|
|
210
|
-
lte(field, value) {
|
|
211
|
-
return buildComparison(field, '<=', value);
|
|
212
|
-
},
|
|
213
|
-
gt(field, value) {
|
|
214
|
-
return buildComparison(field, '>', value);
|
|
215
|
-
},
|
|
216
|
-
gte(field, value) {
|
|
217
|
-
return buildComparison(field, '>=', value);
|
|
218
|
-
},
|
|
219
|
-
in(field, values) {
|
|
220
|
-
return buildComparison(field, 'IN', values);
|
|
221
|
-
},
|
|
222
|
-
notIn(field, values) {
|
|
223
|
-
return buildComparison(field, 'NOT_IN', values);
|
|
224
|
-
},
|
|
225
|
-
isNull(field) {
|
|
226
|
-
return buildComparison(field, '==', null);
|
|
227
|
-
},
|
|
228
|
-
isNotNull(field) {
|
|
229
|
-
return buildComparison(field, '!=', null);
|
|
230
|
-
},
|
|
231
|
-
and(...fragments) {
|
|
232
|
-
return joinConditionFragments('AND', fragments);
|
|
233
|
-
},
|
|
234
|
-
all(...fragments) {
|
|
235
|
-
return joinConditionFragments('AND', fragments);
|
|
236
|
-
},
|
|
237
|
-
or(...fragments) {
|
|
238
|
-
return joinConditionFragments('OR', fragments);
|
|
239
|
-
},
|
|
240
|
-
any(...fragments) {
|
|
241
|
-
return joinConditionFragments('OR', fragments);
|
|
242
|
-
},
|
|
243
|
-
not(fragment) {
|
|
244
|
-
return createFragment(`(NOT ${fragment.text})`);
|
|
245
|
-
},
|
|
246
|
-
none(...fragments) {
|
|
247
|
-
return createFragment(`(NOT ${joinConditionFragments('OR', fragments).text})`);
|
|
248
|
-
},
|
|
249
|
-
raw(text) {
|
|
250
|
-
return createFragment(text);
|
|
251
|
-
},
|
|
252
|
-
render(fragment) {
|
|
253
|
-
return fragment.text;
|
|
254
|
-
},
|
|
255
|
-
};
|
|
256
|
-
return helper;
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* Resolves one manifest-condition input into final manifest string text.
|
|
260
|
-
*
|
|
261
|
-
* @param target - Typed custom-object definition or manifest registration.
|
|
262
|
-
* @param input - Condition fragment or helper callback to resolve.
|
|
263
|
-
* @returns Final manifest condition/formula string.
|
|
264
|
-
* @typeParam TDefinition - Typed custom-object definition that owns the helper field namespace.
|
|
265
|
-
*/
|
|
266
|
-
export function resolveManifestConditionInput(target, input) {
|
|
267
|
-
const helpers = createManifestConditionHelpers(target);
|
|
268
|
-
const fragment = typeof input === 'function' ? input(helpers) : input;
|
|
269
|
-
return helpers.render(fragment);
|
|
270
|
-
}
|
|
271
|
-
class CustomObjectLifecycleTriggerBuilder {
|
|
272
|
-
constructor(definition, operation, condition) {
|
|
273
|
-
this.definition = definition;
|
|
274
|
-
this.operation = operation;
|
|
275
|
-
this.condition = condition;
|
|
276
|
-
}
|
|
277
|
-
when(condition) {
|
|
278
|
-
return new CustomObjectLifecycleTriggerBuilder(this.definition, this.operation, condition);
|
|
279
|
-
}
|
|
280
|
-
build() {
|
|
281
|
-
return Object.freeze({
|
|
282
|
-
automation_event_type: 'AUTOMATION_EVENT_TYPE_RECORD_CHANGE',
|
|
283
|
-
og_module: 'custom_objects',
|
|
284
|
-
base_model: this.definition.apiName,
|
|
285
|
-
record_change_operation_type: this.operation,
|
|
286
|
-
...(this.condition != null ?
|
|
287
|
-
{ rql_formula: resolveManifestConditionInput(this.definition, this.condition) }
|
|
288
|
-
: {}),
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* Creates the typed lifecycle helper namespace for one custom object.
|
|
294
|
-
*
|
|
295
|
-
* The lifecycle helper keeps workflows and custom objects as separate concepts
|
|
296
|
-
* while exposing the custom object's record lifecycle as a fluent, typed join
|
|
297
|
-
* point for workflow composition.
|
|
298
|
-
*
|
|
299
|
-
* @param target - Typed custom-object definition or manifest registration.
|
|
300
|
-
* @returns Immutable lifecycle helper namespace for that custom object.
|
|
301
|
-
* @typeParam TDefinition - Typed custom-object definition whose lifecycle events should be exposed.
|
|
302
|
-
*/
|
|
303
|
-
export function customObjectLifecycle(target) {
|
|
304
|
-
const definition = resolveTargetDefinition(target);
|
|
305
|
-
return Object.freeze({
|
|
306
|
-
definition,
|
|
307
|
-
onCreate() {
|
|
308
|
-
return new CustomObjectLifecycleTriggerBuilder(definition, 'RECORD_CHANGE_OPERATION_TYPE_CREATE');
|
|
309
|
-
},
|
|
310
|
-
onUpdate() {
|
|
311
|
-
return new CustomObjectLifecycleTriggerBuilder(definition, 'RECORD_CHANGE_OPERATION_TYPE_UPDATE');
|
|
312
|
-
},
|
|
313
|
-
onDelete() {
|
|
314
|
-
return new CustomObjectLifecycleTriggerBuilder(definition, 'RECORD_CHANGE_OPERATION_TYPE_DELETE');
|
|
315
|
-
},
|
|
316
|
-
onCreateOrUpdate() {
|
|
317
|
-
return new CustomObjectLifecycleTriggerBuilder(definition, 'RECORD_CHANGE_OPERATION_TYPE_CREATE_OR_UPDATE');
|
|
318
|
-
},
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
//# sourceMappingURL=conditions.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conditions.mjs","sourceRoot":"","sources":["../../../../src/core/platform/manifest/custom-objects/conditions.ts"],"names":[],"mappings":"AAKA,MAAM,kCAAkC,GAAG;IACzC,IAAI;IACJ,MAAM;IACN,YAAY;IACZ,YAAY;IACZ,mBAAmB;IACnB,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,kBAAkB;CACgE,CAAC;AAmWrF,SAAS,sBAAsB,CAC7B,MAA+C;IAE/C,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,IAAI,IAAI,IAAI,YAAY,IAAI,MAAM,IAAI,QAAQ,IAAI,MAAM,CAAC;AACtG,CAAC;AAED,SAAS,uBAAuB,CAC9B,MAA+C;IAE/C,OAAO,sBAAsB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC;AACrE,CAAC;AAED,yDAAyD;AACzD,SAAS,cAAc,CAAC,IAAY;IAClC,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;AACjC,CAAC;AAED,2EAA2E;AAC3E,SAAS,qBAAqB,CAAC,KAAa;IAC1C,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;AAClE,CAAC;AAED,+EAA+E;AAC/E,SAAS,4BAA4B,CAAC,KAAqC;IACzE,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,MAAM,CAAC;IAClC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;IACnE,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK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