@rippling/rippling-sdk 0.2.0-alpha.84 → 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,97 +0,0 @@
|
|
|
1
|
-
import type { AnyCustomObjectDefinition, CreateInput, FieldNames, LogicalCategoryName, LogicalCustomFieldName, LogicalCustomObjectName, RecordShape, UpdateInput } from "./types.mjs";
|
|
2
|
-
/** Single validation failure returned by schema or record validators. */
|
|
3
|
-
export interface ValidationIssue {
|
|
4
|
-
readonly path: string;
|
|
5
|
-
readonly message: string;
|
|
6
|
-
}
|
|
7
|
-
/** Aggregate validation result returned by runtime validation helpers. */
|
|
8
|
-
export interface ValidationResult {
|
|
9
|
-
readonly valid: boolean;
|
|
10
|
-
readonly issues: readonly ValidationIssue[];
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Throws when a logical custom-object name is invalid.
|
|
14
|
-
*
|
|
15
|
-
* @param value - Candidate logical custom-object name to validate.
|
|
16
|
-
* @typeParam TObjectName - Candidate logical custom-object name.
|
|
17
|
-
*/
|
|
18
|
-
export declare function validateLogicalCustomObjectName<TObjectName extends string>(value: LogicalCustomObjectName<TObjectName> | string): asserts value is LogicalCustomObjectName<TObjectName>;
|
|
19
|
-
/**
|
|
20
|
-
* Throws when a logical category name is invalid.
|
|
21
|
-
*
|
|
22
|
-
* @param value - Candidate logical category name to validate.
|
|
23
|
-
* @typeParam TCategoryName - Candidate logical category name.
|
|
24
|
-
*/
|
|
25
|
-
export declare function validateLogicalCategoryName<TCategoryName extends string>(value: LogicalCategoryName<TCategoryName> | string): asserts value is LogicalCategoryName<TCategoryName>;
|
|
26
|
-
/**
|
|
27
|
-
* Throws when a logical custom-field name is invalid.
|
|
28
|
-
*
|
|
29
|
-
* @param value - Candidate logical custom-field name to validate.
|
|
30
|
-
* @typeParam TFieldName - Candidate logical custom-field name.
|
|
31
|
-
*/
|
|
32
|
-
export declare function validateLogicalCustomFieldName<TFieldName extends string>(value: LogicalCustomFieldName<TFieldName> | string): asserts value is LogicalCustomFieldName<TFieldName>;
|
|
33
|
-
/**
|
|
34
|
-
* Validates a schema definition after the type system has done its part.
|
|
35
|
-
*
|
|
36
|
-
* @param definition - Typed object definition to validate at runtime.
|
|
37
|
-
* @returns Validation issues describing any remaining runtime-level problems.
|
|
38
|
-
*/
|
|
39
|
-
export declare function validateCustomObjectDefinition(definition: AnyCustomObjectDefinition): ValidationIssue[];
|
|
40
|
-
/**
|
|
41
|
-
* Runtime validator for create payloads derived from a schema definition.
|
|
42
|
-
*
|
|
43
|
-
* @param definition - Object definition whose create payload is being validated.
|
|
44
|
-
* @param input - Candidate create payload expressed with logical field names.
|
|
45
|
-
* @returns Aggregate validation result for the supplied create payload.
|
|
46
|
-
* @typeParam TDefinition - Object definition whose create payload is being validated.
|
|
47
|
-
*/
|
|
48
|
-
export declare function validateCreateInput<TDefinition extends AnyCustomObjectDefinition>(definition: TDefinition, input: Record<string, unknown>): ValidationResult;
|
|
49
|
-
/**
|
|
50
|
-
* Runtime validator for update payloads derived from a schema definition.
|
|
51
|
-
*
|
|
52
|
-
* @param definition - Object definition whose update payload is being validated.
|
|
53
|
-
* @param input - Candidate update payload expressed with logical field names.
|
|
54
|
-
* @returns Aggregate validation result for the supplied update payload.
|
|
55
|
-
* @typeParam TDefinition - Object definition whose update payload is being validated.
|
|
56
|
-
*/
|
|
57
|
-
export declare function validateUpdateInput<TDefinition extends AnyCustomObjectDefinition>(definition: TDefinition, input: Record<string, unknown>): ValidationResult;
|
|
58
|
-
/**
|
|
59
|
-
* Throws a detailed error when a create payload is invalid.
|
|
60
|
-
*
|
|
61
|
-
* @param definition - Object definition whose create payload is being asserted.
|
|
62
|
-
* @param input - Candidate create payload expressed with logical field names.
|
|
63
|
-
* @typeParam TDefinition - Object definition whose create payload is being asserted.
|
|
64
|
-
*/
|
|
65
|
-
export declare function assertValidCreateInput<TDefinition extends AnyCustomObjectDefinition>(definition: TDefinition, input: Record<string, unknown>): asserts input is CreateInput<TDefinition>;
|
|
66
|
-
/**
|
|
67
|
-
* Throws a detailed error when an update payload is invalid.
|
|
68
|
-
*
|
|
69
|
-
* @param definition - Object definition whose update payload is being asserted.
|
|
70
|
-
* @param input - Candidate update payload expressed with logical field names.
|
|
71
|
-
* @typeParam TDefinition - Object definition whose update payload is being asserted.
|
|
72
|
-
*/
|
|
73
|
-
export declare function assertValidUpdateInput<TDefinition extends AnyCustomObjectDefinition>(definition: TDefinition, input: Record<string, unknown>): asserts input is UpdateInput<TDefinition>;
|
|
74
|
-
/**
|
|
75
|
-
* Casts a generic record object into the strongly typed shape derived from the
|
|
76
|
-
* schema.
|
|
77
|
-
*
|
|
78
|
-
* This helper does not perform runtime validation by itself; pair it with a
|
|
79
|
-
* schema-aware check when the source data is not trusted.
|
|
80
|
-
*
|
|
81
|
-
* @param _definition - Object definition whose record shape should be applied.
|
|
82
|
-
* @param record - Generic record object to cast into the typed record shape.
|
|
83
|
-
* @returns Record cast to the schema-derived typed record shape.
|
|
84
|
-
* @typeParam TDefinition - Object definition whose record shape should be applied.
|
|
85
|
-
*/
|
|
86
|
-
export declare function asTypedRecord<TDefinition extends AnyCustomObjectDefinition>(_definition: TDefinition, record: Record<string, unknown>): RecordShape<TDefinition>;
|
|
87
|
-
/**
|
|
88
|
-
* Convenience helper for pulling a known field value out of a typed record.
|
|
89
|
-
*
|
|
90
|
-
* @param record - Typed record to read from.
|
|
91
|
-
* @param fieldName - Logical field name to read.
|
|
92
|
-
* @returns Typed value stored at the requested field name.
|
|
93
|
-
* @typeParam TDefinition - Object definition that produced the record shape.
|
|
94
|
-
* @typeParam TFieldName - Logical field name being read from the record.
|
|
95
|
-
*/
|
|
96
|
-
export declare function getRecordValue<TDefinition extends AnyCustomObjectDefinition, TFieldName extends FieldNames<TDefinition>>(record: RecordShape<TDefinition>, fieldName: TFieldName): RecordShape<TDefinition>[TFieldName];
|
|
97
|
-
//# sourceMappingURL=validation.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.mts","sourceRoot":"","sources":["../../../src/core/platform/custom-objects/validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EAEzB,WAAW,EACX,UAAU,EAEV,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,WAAW,EACX,WAAW,EACZ,oBAAgB;AAEjB,yEAAyE;AACzE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,0EAA0E;AAC1E,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAC;CAC7C;AA+GD;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAAC,WAAW,SAAS,MAAM,EACxE,KAAK,EAAE,uBAAuB,CAAC,WAAW,CAAC,GAAG,MAAM,GACnD,OAAO,CAAC,KAAK,IAAI,uBAAuB,CAAC,WAAW,CAAC,CAIvD;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,aAAa,SAAS,MAAM,EACtE,KAAK,EAAE,mBAAmB,CAAC,aAAa,CAAC,GAAG,MAAM,GACjD,OAAO,CAAC,KAAK,IAAI,mBAAmB,CAAC,aAAa,CAAC,CAIrD;AAED;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,UAAU,SAAS,MAAM,EACtE,KAAK,EAAE,sBAAsB,CAAC,UAAU,CAAC,GAAG,MAAM,GACjD,OAAO,CAAC,KAAK,IAAI,sBAAsB,CAAC,UAAU,CAAC,CAIrD;AAgJD;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,UAAU,EAAE,yBAAyB,GAAG,eAAe,EAAE,CA+EvG;AAwED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,SAAS,yBAAyB,EAC/E,UAAU,EAAE,WAAW,EACvB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,gBAAgB,CAGlB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,SAAS,yBAAyB,EAC/E,UAAU,EAAE,WAAW,EACvB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,gBAAgB,CAGlB;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,SAAS,yBAAyB,EAClF,UAAU,EAAE,WAAW,EACvB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,OAAO,CAAC,KAAK,IAAI,WAAW,CAAC,WAAW,CAAC,CAI3C;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,SAAS,yBAAyB,EAClF,UAAU,EAAE,WAAW,EACvB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,OAAO,CAAC,KAAK,IAAI,WAAW,CAAC,WAAW,CAAC,CAI3C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,WAAW,SAAS,yBAAyB,EACzE,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,WAAW,CAAC,WAAW,CAAC,CAE1B;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,WAAW,SAAS,yBAAyB,EAC7C,UAAU,SAAS,UAAU,CAAC,WAAW,CAAC,EAC1C,MAAM,EAAE,WAAW,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,UAAU,GAAG,WAAW,CAAC,WAAW,CAAC,CAAC,UAAU,CAAC,CAE/F"}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import type { AnyCustomObjectDefinition, CreateInput, FieldNames, LogicalCategoryName, LogicalCustomFieldName, LogicalCustomObjectName, RecordShape, UpdateInput } from "./types.js";
|
|
2
|
-
/** Single validation failure returned by schema or record validators. */
|
|
3
|
-
export interface ValidationIssue {
|
|
4
|
-
readonly path: string;
|
|
5
|
-
readonly message: string;
|
|
6
|
-
}
|
|
7
|
-
/** Aggregate validation result returned by runtime validation helpers. */
|
|
8
|
-
export interface ValidationResult {
|
|
9
|
-
readonly valid: boolean;
|
|
10
|
-
readonly issues: readonly ValidationIssue[];
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Throws when a logical custom-object name is invalid.
|
|
14
|
-
*
|
|
15
|
-
* @param value - Candidate logical custom-object name to validate.
|
|
16
|
-
* @typeParam TObjectName - Candidate logical custom-object name.
|
|
17
|
-
*/
|
|
18
|
-
export declare function validateLogicalCustomObjectName<TObjectName extends string>(value: LogicalCustomObjectName<TObjectName> | string): asserts value is LogicalCustomObjectName<TObjectName>;
|
|
19
|
-
/**
|
|
20
|
-
* Throws when a logical category name is invalid.
|
|
21
|
-
*
|
|
22
|
-
* @param value - Candidate logical category name to validate.
|
|
23
|
-
* @typeParam TCategoryName - Candidate logical category name.
|
|
24
|
-
*/
|
|
25
|
-
export declare function validateLogicalCategoryName<TCategoryName extends string>(value: LogicalCategoryName<TCategoryName> | string): asserts value is LogicalCategoryName<TCategoryName>;
|
|
26
|
-
/**
|
|
27
|
-
* Throws when a logical custom-field name is invalid.
|
|
28
|
-
*
|
|
29
|
-
* @param value - Candidate logical custom-field name to validate.
|
|
30
|
-
* @typeParam TFieldName - Candidate logical custom-field name.
|
|
31
|
-
*/
|
|
32
|
-
export declare function validateLogicalCustomFieldName<TFieldName extends string>(value: LogicalCustomFieldName<TFieldName> | string): asserts value is LogicalCustomFieldName<TFieldName>;
|
|
33
|
-
/**
|
|
34
|
-
* Validates a schema definition after the type system has done its part.
|
|
35
|
-
*
|
|
36
|
-
* @param definition - Typed object definition to validate at runtime.
|
|
37
|
-
* @returns Validation issues describing any remaining runtime-level problems.
|
|
38
|
-
*/
|
|
39
|
-
export declare function validateCustomObjectDefinition(definition: AnyCustomObjectDefinition): ValidationIssue[];
|
|
40
|
-
/**
|
|
41
|
-
* Runtime validator for create payloads derived from a schema definition.
|
|
42
|
-
*
|
|
43
|
-
* @param definition - Object definition whose create payload is being validated.
|
|
44
|
-
* @param input - Candidate create payload expressed with logical field names.
|
|
45
|
-
* @returns Aggregate validation result for the supplied create payload.
|
|
46
|
-
* @typeParam TDefinition - Object definition whose create payload is being validated.
|
|
47
|
-
*/
|
|
48
|
-
export declare function validateCreateInput<TDefinition extends AnyCustomObjectDefinition>(definition: TDefinition, input: Record<string, unknown>): ValidationResult;
|
|
49
|
-
/**
|
|
50
|
-
* Runtime validator for update payloads derived from a schema definition.
|
|
51
|
-
*
|
|
52
|
-
* @param definition - Object definition whose update payload is being validated.
|
|
53
|
-
* @param input - Candidate update payload expressed with logical field names.
|
|
54
|
-
* @returns Aggregate validation result for the supplied update payload.
|
|
55
|
-
* @typeParam TDefinition - Object definition whose update payload is being validated.
|
|
56
|
-
*/
|
|
57
|
-
export declare function validateUpdateInput<TDefinition extends AnyCustomObjectDefinition>(definition: TDefinition, input: Record<string, unknown>): ValidationResult;
|
|
58
|
-
/**
|
|
59
|
-
* Throws a detailed error when a create payload is invalid.
|
|
60
|
-
*
|
|
61
|
-
* @param definition - Object definition whose create payload is being asserted.
|
|
62
|
-
* @param input - Candidate create payload expressed with logical field names.
|
|
63
|
-
* @typeParam TDefinition - Object definition whose create payload is being asserted.
|
|
64
|
-
*/
|
|
65
|
-
export declare function assertValidCreateInput<TDefinition extends AnyCustomObjectDefinition>(definition: TDefinition, input: Record<string, unknown>): asserts input is CreateInput<TDefinition>;
|
|
66
|
-
/**
|
|
67
|
-
* Throws a detailed error when an update payload is invalid.
|
|
68
|
-
*
|
|
69
|
-
* @param definition - Object definition whose update payload is being asserted.
|
|
70
|
-
* @param input - Candidate update payload expressed with logical field names.
|
|
71
|
-
* @typeParam TDefinition - Object definition whose update payload is being asserted.
|
|
72
|
-
*/
|
|
73
|
-
export declare function assertValidUpdateInput<TDefinition extends AnyCustomObjectDefinition>(definition: TDefinition, input: Record<string, unknown>): asserts input is UpdateInput<TDefinition>;
|
|
74
|
-
/**
|
|
75
|
-
* Casts a generic record object into the strongly typed shape derived from the
|
|
76
|
-
* schema.
|
|
77
|
-
*
|
|
78
|
-
* This helper does not perform runtime validation by itself; pair it with a
|
|
79
|
-
* schema-aware check when the source data is not trusted.
|
|
80
|
-
*
|
|
81
|
-
* @param _definition - Object definition whose record shape should be applied.
|
|
82
|
-
* @param record - Generic record object to cast into the typed record shape.
|
|
83
|
-
* @returns Record cast to the schema-derived typed record shape.
|
|
84
|
-
* @typeParam TDefinition - Object definition whose record shape should be applied.
|
|
85
|
-
*/
|
|
86
|
-
export declare function asTypedRecord<TDefinition extends AnyCustomObjectDefinition>(_definition: TDefinition, record: Record<string, unknown>): RecordShape<TDefinition>;
|
|
87
|
-
/**
|
|
88
|
-
* Convenience helper for pulling a known field value out of a typed record.
|
|
89
|
-
*
|
|
90
|
-
* @param record - Typed record to read from.
|
|
91
|
-
* @param fieldName - Logical field name to read.
|
|
92
|
-
* @returns Typed value stored at the requested field name.
|
|
93
|
-
* @typeParam TDefinition - Object definition that produced the record shape.
|
|
94
|
-
* @typeParam TFieldName - Logical field name being read from the record.
|
|
95
|
-
*/
|
|
96
|
-
export declare function getRecordValue<TDefinition extends AnyCustomObjectDefinition, TFieldName extends FieldNames<TDefinition>>(record: RecordShape<TDefinition>, fieldName: TFieldName): RecordShape<TDefinition>[TFieldName];
|
|
97
|
-
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/core/platform/custom-objects/validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EAEzB,WAAW,EACX,UAAU,EAEV,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,WAAW,EACX,WAAW,EACZ,mBAAgB;AAEjB,yEAAyE;AACzE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,0EAA0E;AAC1E,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAC;CAC7C;AA+GD;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAAC,WAAW,SAAS,MAAM,EACxE,KAAK,EAAE,uBAAuB,CAAC,WAAW,CAAC,GAAG,MAAM,GACnD,OAAO,CAAC,KAAK,IAAI,uBAAuB,CAAC,WAAW,CAAC,CAIvD;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,aAAa,SAAS,MAAM,EACtE,KAAK,EAAE,mBAAmB,CAAC,aAAa,CAAC,GAAG,MAAM,GACjD,OAAO,CAAC,KAAK,IAAI,mBAAmB,CAAC,aAAa,CAAC,CAIrD;AAED;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,UAAU,SAAS,MAAM,EACtE,KAAK,EAAE,sBAAsB,CAAC,UAAU,CAAC,GAAG,MAAM,GACjD,OAAO,CAAC,KAAK,IAAI,sBAAsB,CAAC,UAAU,CAAC,CAIrD;AAgJD;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,UAAU,EAAE,yBAAyB,GAAG,eAAe,EAAE,CA+EvG;AAwED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,SAAS,yBAAyB,EAC/E,UAAU,EAAE,WAAW,EACvB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,gBAAgB,CAGlB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,SAAS,yBAAyB,EAC/E,UAAU,EAAE,WAAW,EACvB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,gBAAgB,CAGlB;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,SAAS,yBAAyB,EAClF,UAAU,EAAE,WAAW,EACvB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,OAAO,CAAC,KAAK,IAAI,WAAW,CAAC,WAAW,CAAC,CAI3C;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,SAAS,yBAAyB,EAClF,UAAU,EAAE,WAAW,EACvB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,OAAO,CAAC,KAAK,IAAI,WAAW,CAAC,WAAW,CAAC,CAI3C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,WAAW,SAAS,yBAAyB,EACzE,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,WAAW,CAAC,WAAW,CAAC,CAE1B;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,WAAW,SAAS,yBAAyB,EAC7C,UAAU,SAAS,UAAU,CAAC,WAAW,CAAC,EAC1C,MAAM,EAAE,WAAW,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,UAAU,GAAG,WAAW,CAAC,WAAW,CAAC,CAAC,UAAU,CAAC,CAE/F"}
|