@elementumai/edk 0.9.2 → 0.9.6
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/README.md +34 -26
- package/dist-sdk/elementum-entity-client/clients/automation/models/automation.d.ts +1 -1
- package/dist-sdk/elementum-entity-client/clients/skills/models/skill.d.ts +1 -1
- package/dist-sdk/elementum-entity-client/clients/skills/models/skill.js +1 -1
- package/dist-sdk/pull/util.d.ts +1 -1
- package/dist-sdk/pull/util.js +3 -3
- package/dist-sdk/src/catalog/factories.d.ts +49 -10
- package/dist-sdk/src/catalog/factories.js +94 -13
- package/dist-sdk/src/catalog/from-authoring.d.ts +5 -5
- package/dist-sdk/src/catalog/from-authoring.js +7 -7
- package/dist-sdk/src/catalog/index.d.ts +2 -2
- package/dist-sdk/src/catalog/index.js +1 -1
- package/dist-sdk/src/catalog/org.js +62 -4
- package/dist-sdk/src/catalog/render-helpers.d.ts +1 -1
- package/dist-sdk/src/catalog/render-helpers.js +1 -1
- package/dist-sdk/src/catalog/render.d.ts +1 -0
- package/dist-sdk/src/catalog/render.js +2 -2
- package/dist-sdk/src/catalog/token.js +11 -4
- package/dist-sdk/src/catalog/types.d.ts +33 -4
- package/dist-sdk/src/catalog/types.js +5 -0
- package/dist-sdk/src/core/index.d.ts +10 -10
- package/dist-sdk/src/core/index.js +9 -9
- package/dist-sdk/src/core/render-tree.d.ts +1 -1
- package/dist-sdk/src/core/render-tree.js +1 -2
- package/dist-sdk/src/core/types/ai-provider.d.ts +1 -1
- package/dist-sdk/src/core/types/ai-provider.js +1 -1
- package/dist-sdk/src/core/types/app.d.ts +66 -30
- package/dist-sdk/src/core/types/app.js +2 -2
- package/dist-sdk/src/core/types/aspect-category.d.ts +4 -4
- package/dist-sdk/src/core/types/aspect-category.js +4 -4
- package/dist-sdk/src/core/types/cloud-link.d.ts +3 -3
- package/dist-sdk/src/core/types/cloud-link.js +3 -3
- package/dist-sdk/src/core/types/display-block.d.ts +2 -2
- package/dist-sdk/src/core/types/display-block.js +2 -2
- package/dist-sdk/src/core/types/group.d.ts +1 -1
- package/dist-sdk/src/core/types/group.js +1 -1
- package/dist-sdk/src/core/types/user.d.ts +1 -1
- package/dist-sdk/src/core/types/user.js +1 -1
- package/dist-sdk/src/core/wire/ref-serializer.js +3 -3
- package/dist-sdk/src/engine/build/context.d.ts +20 -13
- package/dist-sdk/src/engine/entity.d.ts +1 -1
- package/dist-sdk/src/engine/pull/context.d.ts +34 -0
- package/dist-sdk/src/engine/pull/context.js +14 -0
- package/dist-sdk/src/engine/pull/org.d.ts +9 -0
- package/dist-sdk/src/engine/pull/org.js +33 -0
- package/dist-sdk/src/engine/pull/ref-only.d.ts +37 -0
- package/dist-sdk/src/engine/pull/ref-only.js +204 -0
- package/dist-sdk/src/engine/tf/expr.d.ts +6 -2
- package/dist-sdk/src/engine/tf/expr.js +18 -13
- package/dist-sdk/src/engine/tf/index.d.ts +1 -1
- package/dist-sdk/src/engine/tf/index.js +1 -1
- package/dist-sdk/src/engine/tf/model.d.ts +8 -1
- package/dist-sdk/src/engine/tf/model.js +4 -0
- package/dist-sdk/src/engine/tf/parse.js +13 -2
- package/dist-sdk/src/engine/tf/render.js +4 -0
- package/dist-sdk/src/entities/access-policy/build.d.ts +4 -5
- package/dist-sdk/src/entities/access-policy/build.js +1 -1
- package/dist-sdk/src/entities/access-policy/from-tf.d.ts +4 -4
- package/dist-sdk/src/entities/access-policy/from-tf.js +12 -13
- package/dist-sdk/src/entities/access-policy/principal.d.ts +14 -4
- package/dist-sdk/src/entities/access-policy/to-tf.d.ts +14 -2
- package/dist-sdk/src/entities/access-policy/to-tf.js +36 -6
- package/dist-sdk/src/entities/agent/build.d.ts +3 -3
- package/dist-sdk/src/entities/agent/build.js +5 -5
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.d.ts +6 -1
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +68 -18
- package/dist-sdk/src/entities/agent/from-tf.d.ts +3 -1
- package/dist-sdk/src/entities/agent/from-tf.js +12 -4
- package/dist-sdk/src/entities/agent/index.d.ts +2 -2
- package/dist-sdk/src/entities/agent/index.js +1 -1
- package/dist-sdk/src/entities/agent/module.js +2 -0
- package/dist-sdk/src/entities/agent/to-tf.d.ts +5 -2
- package/dist-sdk/src/entities/agent/to-tf.js +56 -8
- package/dist-sdk/src/entities/agent/tools.d.ts +38 -23
- package/dist-sdk/src/entities/agent/tools.js +21 -7
- package/dist-sdk/src/entities/agent-evaluation/build.d.ts +19 -0
- package/dist-sdk/src/entities/agent-evaluation/build.js +41 -0
- package/dist-sdk/src/entities/agent-evaluation/deserializer/print-agent-evaluation.d.ts +4 -0
- package/dist-sdk/src/entities/agent-evaluation/deserializer/print-agent-evaluation.js +30 -0
- package/dist-sdk/src/entities/agent-evaluation/from-tf.d.ts +12 -0
- package/dist-sdk/src/entities/agent-evaluation/from-tf.js +46 -0
- package/dist-sdk/src/entities/agent-evaluation/index.d.ts +1 -0
- package/dist-sdk/src/entities/agent-evaluation/index.js +1 -0
- package/dist-sdk/src/entities/agent-evaluation/module.d.ts +3 -0
- package/dist-sdk/src/entities/agent-evaluation/module.js +58 -0
- package/dist-sdk/src/entities/agent-evaluation/to-tf.d.ts +12 -0
- package/dist-sdk/src/entities/agent-evaluation/to-tf.js +35 -0
- package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +8 -7
- package/dist-sdk/src/entities/agent-tool/from-tf.js +48 -6
- package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +10 -2
- package/dist-sdk/src/entities/agent-tool/to-tf.js +76 -28
- package/dist-sdk/src/entities/agent-tool/types.d.ts +0 -1
- package/dist-sdk/src/entities/agent-tool/types.js +10 -37
- package/dist-sdk/src/entities/app/build.d.ts +97 -42
- package/dist-sdk/src/entities/app/build.js +25 -14
- package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +32 -24
- package/dist-sdk/src/entities/app/deserializer/pulled-expression.d.ts +1 -1
- package/dist-sdk/src/entities/app/deserializer/pulled-expression.js +2 -0
- package/dist-sdk/src/entities/app/index.d.ts +11 -8
- package/dist-sdk/src/entities/app/index.js +10 -7
- package/dist-sdk/src/entities/app/module.js +2 -2
- package/dist-sdk/src/entities/app/to-tf.d.ts +1 -1
- package/dist-sdk/src/entities/app/to-tf.js +22 -6
- package/dist-sdk/src/entities/approval-chain/build.d.ts +1 -1
- package/dist-sdk/src/entities/approval-chain/build.js +5 -5
- package/dist-sdk/src/entities/approval-chain/index.d.ts +1 -1
- package/dist-sdk/src/entities/approval-chain/index.js +1 -1
- package/dist-sdk/src/entities/approval-chain/printer.js +2 -2
- package/dist-sdk/src/entities/automation/build.d.ts +172 -94
- package/dist-sdk/src/entities/automation/build.js +159 -68
- package/dist-sdk/src/entities/automation/calculation-expression.d.ts +191 -0
- package/dist-sdk/src/entities/automation/calculation-expression.js +57 -0
- package/dist-sdk/src/entities/automation/deserializer/ast.d.ts +11 -4
- package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +18 -14
- package/dist-sdk/src/entities/automation/deserializer/print-automation.js +164 -198
- package/dist-sdk/src/entities/automation/from-tf.d.ts +26 -2
- package/dist-sdk/src/entities/automation/from-tf.js +510 -80
- package/dist-sdk/src/entities/automation/index.d.ts +9 -12
- package/dist-sdk/src/entities/automation/index.js +11 -13
- package/dist-sdk/src/entities/automation/module.js +74 -6
- package/dist-sdk/src/entities/automation/operators.d.ts +32 -48
- package/dist-sdk/src/entities/automation/operators.js +10 -37
- package/dist-sdk/src/entities/automation/output-key-wire-name.d.ts +1 -1
- package/dist-sdk/src/entities/automation/output-key-wire-name.js +1 -1
- package/dist-sdk/src/entities/automation/script-code.js +13 -22
- package/dist-sdk/src/entities/automation/serialize.js +1 -1
- package/dist-sdk/src/entities/automation/tasks.d.ts +153 -89
- package/dist-sdk/src/entities/automation/tasks.js +64 -11
- package/dist-sdk/src/entities/automation/to-tf.d.ts +10 -1
- package/dist-sdk/src/entities/automation/to-tf.js +342 -71
- package/dist-sdk/src/entities/automation/triggers.d.ts +17 -10
- package/dist-sdk/src/entities/automation/triggers.js +7 -1
- package/dist-sdk/src/entities/automation/types.d.ts +3 -2
- package/dist-sdk/src/entities/automation/types.js +3 -2
- package/dist-sdk/src/entities/chart/build.d.ts +95 -0
- package/dist-sdk/src/entities/chart/build.js +42 -0
- package/dist-sdk/src/entities/chart/from-tf.d.ts +55 -0
- package/dist-sdk/src/entities/chart/from-tf.js +269 -0
- package/dist-sdk/src/entities/chart/index.d.ts +4 -0
- package/dist-sdk/src/entities/chart/index.js +3 -0
- package/dist-sdk/src/entities/chart/module.d.ts +3 -0
- package/dist-sdk/src/entities/chart/module.js +61 -0
- package/dist-sdk/src/entities/chart/printer.d.ts +5 -0
- package/dist-sdk/src/entities/chart/printer.js +104 -0
- package/dist-sdk/src/entities/chart/to-tf.d.ts +15 -0
- package/dist-sdk/src/entities/chart/to-tf.js +150 -0
- package/dist-sdk/src/entities/chart/types.d.ts +53 -0
- package/dist-sdk/src/entities/chart/types.js +22 -0
- package/dist-sdk/src/entities/dashboard/build.d.ts +34 -7
- package/dist-sdk/src/entities/dashboard/build.js +16 -1
- package/dist-sdk/src/entities/dashboard/from-tf.js +22 -4
- package/dist-sdk/src/entities/dashboard/to-tf.d.ts +16 -3
- package/dist-sdk/src/entities/dashboard/to-tf.js +37 -10
- package/dist-sdk/src/entities/datamine/module.js +1 -1
- package/dist-sdk/src/entities/dynamic-layout/build.d.ts +4 -3
- package/dist-sdk/src/entities/dynamic-layout/build.js +1 -1
- package/dist-sdk/src/entities/dynamic-layout/dialect.d.ts +2 -0
- package/dist-sdk/src/entities/dynamic-layout/dialect.js +43 -5
- package/dist-sdk/src/entities/dynamic-layout/from-tf.js +12 -6
- package/dist-sdk/src/entities/dynamic-layout/to-tf.js +10 -10
- package/dist-sdk/src/entities/element/build.d.ts +25 -32
- package/dist-sdk/src/entities/element/build.js +15 -32
- package/dist-sdk/src/entities/element/index.d.ts +7 -5
- package/dist-sdk/src/entities/element/index.js +7 -4
- package/dist-sdk/src/entities/element/module.js +7 -3
- package/dist-sdk/src/entities/element/to-tf.d.ts +2 -1
- package/dist-sdk/src/entities/element/to-tf.js +7 -3
- package/dist-sdk/src/entities/field/build.d.ts +51 -24
- package/dist-sdk/src/entities/field/build.js +31 -6
- package/dist-sdk/src/entities/field/calc/aggregate.d.ts +52 -21
- package/dist-sdk/src/entities/field/calc/aggregate.js +59 -29
- package/dist-sdk/src/entities/field/calc/date.d.ts +78 -29
- package/dist-sdk/src/entities/field/calc/date.js +120 -29
- package/dist-sdk/src/entities/field/calc/index.d.ts +80 -85
- package/dist-sdk/src/entities/field/calc/index.js +82 -139
- package/dist-sdk/src/entities/field/calc/numeric.d.ts +8 -12
- package/dist-sdk/src/entities/field/calc/numeric.js +10 -27
- package/dist-sdk/src/entities/field/calc/runtime.d.ts +19 -2
- package/dist-sdk/src/entities/field/calc/runtime.js +79 -8
- package/dist-sdk/src/entities/field/calc/text.d.ts +32 -23
- package/dist-sdk/src/entities/field/calc/text.js +43 -31
- package/dist-sdk/src/entities/field/calc/types.d.ts +36 -81
- package/dist-sdk/src/entities/field/calc/types.js +1 -22
- package/dist-sdk/src/entities/field/calc.d.ts +71 -48
- package/dist-sdk/src/entities/field/calc.js +5 -15
- package/dist-sdk/src/entities/field/calculation-types.js +10 -3
- package/dist-sdk/src/entities/field/from-tf.js +156 -10
- package/dist-sdk/src/entities/field/locals.d.ts +11 -3
- package/dist-sdk/src/entities/field/locals.js +15 -2
- package/dist-sdk/src/entities/field/module.js +23 -6
- package/dist-sdk/src/entities/field/record-shape.d.ts +24 -10
- package/dist-sdk/src/entities/field/to-tf.d.ts +40 -1
- package/dist-sdk/src/entities/field/to-tf.js +293 -35
- package/dist-sdk/src/entities/field/types.d.ts +1 -1
- package/dist-sdk/src/entities/field/types.js +7 -1
- package/dist-sdk/src/entities/file-reader/build.d.ts +5 -0
- package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.js +1 -1
- package/dist-sdk/src/entities/org/cloud-link.js +4 -5
- package/dist-sdk/src/entities/org/email-alias.d.ts +2 -0
- package/dist-sdk/src/entities/org/email-alias.js +12 -0
- package/dist-sdk/src/entities/org/index.d.ts +1 -0
- package/dist-sdk/src/entities/org/index.js +1 -0
- package/dist-sdk/src/entities/org/phone-provider.js +4 -7
- package/dist-sdk/src/entities/organization/build.d.ts +214 -2
- package/dist-sdk/src/entities/organization/build.js +145 -4
- package/dist-sdk/src/entities/organization/index.d.ts +1 -1
- package/dist-sdk/src/entities/organization/index.js +1 -1
- package/dist-sdk/src/entities/organization/module.js +4 -1
- package/dist-sdk/src/entities/organization/to-tf.d.ts +1 -0
- package/dist-sdk/src/entities/organization/to-tf.js +118 -1
- package/dist-sdk/src/entities/phone-service/build.d.ts +1 -1
- package/dist-sdk/src/entities/phone-service/build.js +2 -2
- package/dist-sdk/src/entities/phone-service/deserializer/print-phone-service.js +5 -3
- package/dist-sdk/src/entities/phone-service/index.d.ts +1 -1
- package/dist-sdk/src/entities/phone-service/index.js +1 -1
- package/dist-sdk/src/entities/phone-service/types.js +1 -1
- package/dist-sdk/src/entities/record-create-form/to-tf.js +9 -1
- package/dist-sdk/src/entities/relationship/to-tf.d.ts +1 -0
- package/dist-sdk/src/entities/relationship/to-tf.js +5 -13
- package/dist-sdk/src/entities/search-table/build.d.ts +4 -4
- package/dist-sdk/src/entities/search-table/build.js +13 -13
- package/dist-sdk/src/entities/search-table/index.d.ts +2 -2
- package/dist-sdk/src/entities/search-table/index.js +2 -2
- package/dist-sdk/src/entities/search-table/printer.js +5 -5
- package/dist-sdk/src/entities/service-account/to-tf.d.ts +21 -0
- package/dist-sdk/src/entities/service-account/to-tf.js +32 -1
- package/dist-sdk/src/entities/shared/context.d.ts +25 -24
- package/dist-sdk/src/entities/shared/context.js +36 -35
- package/dist-sdk/src/entities/shared/filters/ast.d.ts +10 -3
- package/dist-sdk/src/entities/shared/filters/ast.js +1 -0
- package/dist-sdk/src/entities/shared/filters/index.d.ts +2 -1
- package/dist-sdk/src/entities/shared/filters/index.js +11 -4
- package/dist-sdk/src/entities/shared/foreign-ref.d.ts +14 -0
- package/dist-sdk/src/entities/shared/foreign-ref.js +12 -0
- package/dist-sdk/src/entities/shared/ref.d.ts +26 -11
- package/dist-sdk/src/entities/shared/ref.js +8 -3
- package/dist-sdk/src/entities/shared/types/common.d.ts +2 -2
- package/dist-sdk/src/entities/shared/types/field-types.d.ts +1 -1
- package/dist-sdk/src/entities/shared/types/field-types.js +1 -1
- package/dist-sdk/src/entities/skill/build.d.ts +2 -2
- package/dist-sdk/src/entities/skill/build.js +3 -3
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +1 -1
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +26 -7
- package/dist-sdk/src/entities/skill/index.d.ts +1 -1
- package/dist-sdk/src/entities/skill/index.js +1 -1
- package/dist-sdk/src/entities/skill/module.js +2 -2
- package/dist-sdk/src/entities/skill/to-tf.d.ts +1 -1
- package/dist-sdk/src/entities/skill/to-tf.js +2 -2
- package/dist-sdk/src/entities/skill/tools.d.ts +4 -3
- package/dist-sdk/src/entities/skill/tools.js +4 -3
- package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +13 -0
- package/dist-sdk/src/entities/skill-tool/from-tf.js +42 -0
- package/dist-sdk/src/entities/skill-tool/to-tf.js +6 -6
- package/dist-sdk/src/entities/table/build.d.ts +1 -1
- package/dist-sdk/src/entities/table/build.js +9 -9
- package/dist-sdk/src/entities/table/catalog-render.js +9 -1
- package/dist-sdk/src/entities/table/deserializer/normalize.js +4 -4
- package/dist-sdk/src/entities/table/fields/types.d.ts +1 -1
- package/dist-sdk/src/entities/table/fields/types.js +1 -1
- package/dist-sdk/src/entities/table/index.d.ts +2 -2
- package/dist-sdk/src/entities/table/index.js +3 -3
- package/dist-sdk/src/entities/table/module.js +1 -1
- package/dist-sdk/src/entities/table/to-tf.js +22 -30
- package/dist-sdk/src/entities/task/build.d.ts +1 -1
- package/dist-sdk/src/entities/task/build.js +5 -5
- package/dist-sdk/src/entities/task/index.d.ts +1 -1
- package/dist-sdk/src/entities/task/index.js +1 -1
- package/dist-sdk/src/entities/view/build.d.ts +46 -0
- package/dist-sdk/src/entities/view/build.js +19 -0
- package/dist-sdk/src/entities/view/from-tf.js +68 -18
- package/dist-sdk/src/entities/view/module.d.ts +6 -13
- package/dist-sdk/src/entities/view/module.js +7 -14
- package/dist-sdk/src/entities/view/sharing.d.ts +10 -0
- package/dist-sdk/src/entities/view/sharing.js +6 -0
- package/dist-sdk/src/entities/view/to-tf.d.ts +21 -19
- package/dist-sdk/src/entities/view/to-tf.js +61 -26
- package/dist-sdk/src/entities/view/types.js +3 -0
- package/dist-sdk/src/entities/visual-flow/build.d.ts +1 -1
- package/dist-sdk/src/entities/visual-flow/build.js +8 -8
- package/dist-sdk/src/entities/visual-flow/index.d.ts +1 -1
- package/dist-sdk/src/entities/visual-flow/index.js +1 -1
- package/dist-sdk/src/entities/visual-flow/module.js +1 -1
- package/dist-sdk/src/entities/visual-flow/printer.js +3 -3
- package/dist-sdk/src/entities/visual-flow/to-tf.d.ts +1 -0
- package/dist-sdk/src/entities/visual-flow/to-tf.js +3 -7
- package/dist-sdk/src/entities/widget/to-tf.d.ts +1 -0
- package/dist-sdk/src/entities/widget/to-tf.js +9 -7
- package/dist-sdk/src/graph/index.d.ts +5 -1
- package/dist-sdk/src/graph/index.js +4 -1
- package/dist-sdk/src/graph/modules.js +6 -1
- package/dist-sdk/src/graph/types.d.ts +52 -1
- package/dist-sdk/src/internal/safe-identifier.d.ts +4 -0
- package/dist-sdk/src/internal/safe-identifier.js +13 -0
- package/dist-sdk/src/internal/sdk-package.d.ts +1 -1
- package/dist-sdk/src/internal/sdk-package.js +1 -0
- package/package.json +12 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Typed field factories — the authoring surface for `
|
|
3
|
-
* `
|
|
2
|
+
* Typed field factories — the authoring surface for `app`'s (and
|
|
3
|
+
* `element`'s) `fields:` bag. One factory per field sub-type row
|
|
4
4
|
* (types.ts), each taking only the options valid for its kind:
|
|
5
5
|
*
|
|
6
6
|
* fields: {
|
|
@@ -14,9 +14,10 @@
|
|
|
14
14
|
* literal form (`{ name, type: "TEXT" }`) remains valid where ever an
|
|
15
15
|
* AppField is accepted.
|
|
16
16
|
*/
|
|
17
|
+
import { coerce } from "./calc/runtime.js";
|
|
17
18
|
// Generic over the literal type discriminator so a field factory's return
|
|
18
19
|
// type carries e.g. `type: "PICKLIST"`, not the widened `WorkflowFieldType`
|
|
19
|
-
// union — required for the live catalog path (`
|
|
20
|
+
// union — required for the live catalog path (`app`'s `.ref()`) to
|
|
20
21
|
// preserve per-field literal typing all the way to `RecordShape`
|
|
21
22
|
// (`entities/field/record-shape.ts`), the same way the old baked
|
|
22
23
|
// `fieldRef({ fieldType: "PICKLIST" })` literal did.
|
|
@@ -26,8 +27,8 @@ function field(type, opts) {
|
|
|
26
27
|
export function textField(opts) {
|
|
27
28
|
return field("TEXT", opts);
|
|
28
29
|
}
|
|
29
|
-
export function
|
|
30
|
-
return field("
|
|
30
|
+
export function richTextField(opts) {
|
|
31
|
+
return field("RICH_TEXT", opts);
|
|
31
32
|
}
|
|
32
33
|
export function numberField(opts) {
|
|
33
34
|
return field("NUMBER", opts);
|
|
@@ -65,10 +66,34 @@ export function multiPicklistField(opts) {
|
|
|
65
66
|
export function relationField(opts) {
|
|
66
67
|
return field("RELATION", opts);
|
|
67
68
|
}
|
|
69
|
+
/** Create a calculated field whose platform field kind is inferred from its expression. */
|
|
70
|
+
export function calculatedField(opts) {
|
|
71
|
+
const expression = coerce(opts.expression);
|
|
72
|
+
const type = (() => {
|
|
73
|
+
switch (expression.__exprType) {
|
|
74
|
+
case "number": return "NUMBER";
|
|
75
|
+
case "decimal": return "DECIMAL";
|
|
76
|
+
case "bool": return "BOOLEAN";
|
|
77
|
+
case "date": return "DATE";
|
|
78
|
+
case "datetime": return "DATETIME";
|
|
79
|
+
case "handle": return "HANDLE";
|
|
80
|
+
case "html": return "HTML";
|
|
81
|
+
case "json": return "JSON";
|
|
82
|
+
case "picklist": return "PICKLIST";
|
|
83
|
+
case "multiPicklist": return "MULTI_PICKLIST";
|
|
84
|
+
case "user": return "USER";
|
|
85
|
+
case "group": return "GROUP";
|
|
86
|
+
case "attachment": return "ATTACHMENT";
|
|
87
|
+
case "text":
|
|
88
|
+
case "uuid": return "TEXT";
|
|
89
|
+
}
|
|
90
|
+
})();
|
|
91
|
+
return { ...opts, expression, type };
|
|
92
|
+
}
|
|
68
93
|
/** Authoring field type → its factory's exported name (the printer's emission table). */
|
|
69
94
|
export const FIELD_FACTORY_BY_TYPE = new Map([
|
|
70
95
|
["TEXT", "textField"],
|
|
71
|
-
["
|
|
96
|
+
["RICH_TEXT", "richTextField"],
|
|
72
97
|
["NUMBER", "numberField"],
|
|
73
98
|
["DECIMAL", "decimalField"],
|
|
74
99
|
["BOOLEAN", "booleanField"],
|
|
@@ -10,14 +10,22 @@
|
|
|
10
10
|
* free-form string. The serializer assembles the wire predicate
|
|
11
11
|
* text.
|
|
12
12
|
*
|
|
13
|
-
* - `stringAgg` accepts
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* direction defaults to ASC if omitted.
|
|
13
|
+
* - `stringAgg` accepts a variadic `ORDER BY` clause embedded inside its
|
|
14
|
+
* separator argument on the wire. The EDK models that as
|
|
15
|
+
* `{ orderBy: [{ field, direction }, ...] }`; direction defaults to ASC.
|
|
17
16
|
*/
|
|
18
|
-
import type {
|
|
19
|
-
/**
|
|
20
|
-
export
|
|
17
|
+
import type { ComposedExpr, ExprLike, ExprType } from "./types.js";
|
|
18
|
+
/** Discoverable comparison operators accepted by COUNTIF and SUMIF. */
|
|
19
|
+
export declare const predicateOp: {
|
|
20
|
+
readonly equal: "=";
|
|
21
|
+
readonly notEqual: "!=";
|
|
22
|
+
readonly notEqualSql: "<>";
|
|
23
|
+
readonly greaterThan: ">";
|
|
24
|
+
readonly greaterThanOrEqual: ">=";
|
|
25
|
+
readonly lessThan: "<";
|
|
26
|
+
readonly lessThanOrEqual: "<=";
|
|
27
|
+
};
|
|
28
|
+
export type PredicateOp = (typeof predicateOp)[keyof typeof predicateOp];
|
|
21
29
|
/**
|
|
22
30
|
* Predicate for `countIf` / `sumIf`. The operator defaults to `"="`
|
|
23
31
|
* when omitted (matches the wire form: a bare value like `'30'` means
|
|
@@ -27,34 +35,57 @@ export interface Predicate {
|
|
|
27
35
|
readonly op?: PredicateOp;
|
|
28
36
|
readonly value: string | number;
|
|
29
37
|
}
|
|
38
|
+
export type ErgonomicPredicate = {
|
|
39
|
+
readonly equal: string | number;
|
|
40
|
+
} | {
|
|
41
|
+
readonly notEqual: string | number;
|
|
42
|
+
} | {
|
|
43
|
+
readonly greaterThan: string | number;
|
|
44
|
+
} | {
|
|
45
|
+
readonly greaterThanOrEqual: string | number;
|
|
46
|
+
} | {
|
|
47
|
+
readonly lessThan: string | number;
|
|
48
|
+
} | {
|
|
49
|
+
readonly lessThanOrEqual: string | number;
|
|
50
|
+
};
|
|
51
|
+
export type PredicateInput = Predicate | ErgonomicPredicate;
|
|
30
52
|
/**
|
|
31
53
|
* Count rows where `field` matches the predicate. Wire form:
|
|
32
54
|
* `COUNTIF(field, 'predicate')` — the predicate is a quoted string
|
|
33
55
|
* with the comparison operator prefix (e.g. `'>30'`) and value.
|
|
34
56
|
*/
|
|
35
|
-
export declare function countIf<
|
|
57
|
+
export declare function countIf<const Field extends ExprLike<"text"> | ExprLike<"number"> | ExprLike<"decimal">>(field: Field, predicate: PredicateInput): ComposedExpr<"number", [Field]>;
|
|
36
58
|
/**
|
|
37
59
|
* Sum rows of `field` where the value matches the predicate. Wire form:
|
|
38
|
-
* `SUMIF(field, 'predicate')`.
|
|
39
|
-
*
|
|
40
|
-
* the wider brand.
|
|
60
|
+
* `SUMIF(field, 'predicate')`. The output preserves the field's NUMBER or
|
|
61
|
+
* DECIMAL brand.
|
|
41
62
|
*/
|
|
42
|
-
export declare function sumIf
|
|
43
|
-
|
|
44
|
-
|
|
63
|
+
export declare function sumIf<const Field extends ExprLike<"number">>(field: Field, predicate: PredicateInput): ComposedExpr<"number", [Field]>;
|
|
64
|
+
export declare function sumIf<const Field extends ExprLike<"decimal">>(field: Field, predicate: PredicateInput): ComposedExpr<"decimal", [Field]>;
|
|
65
|
+
/** Discoverable sort directions for STRING_AGG's ORDER BY clause. */
|
|
66
|
+
export declare const orderByDirection: {
|
|
67
|
+
readonly ascending: "ASC";
|
|
68
|
+
readonly descending: "DESC";
|
|
69
|
+
};
|
|
70
|
+
export type OrderByDirection = (typeof orderByDirection)[keyof typeof orderByDirection];
|
|
71
|
+
export type ErgonomicOrderByDirection = "asc" | "desc";
|
|
45
72
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* aggregated, but the server accepts any.
|
|
73
|
+
* One ORDER BY term for `stringAgg`. The field can be any expression;
|
|
74
|
+
* `stringAggUnique` has no ORDER BY grammar slot.
|
|
49
75
|
*/
|
|
50
76
|
export interface StringAggOrderBy {
|
|
51
|
-
readonly field
|
|
52
|
-
readonly
|
|
77
|
+
readonly field?: ExprLike<ExprType>;
|
|
78
|
+
readonly value?: ExprLike<ExprType>;
|
|
79
|
+
readonly direction?: OrderByDirection | ErgonomicOrderByDirection;
|
|
80
|
+
}
|
|
81
|
+
/** Typed options for STRING_AGG's optional, variadic ORDER BY clause. */
|
|
82
|
+
export interface StringAggOptions {
|
|
83
|
+
readonly orderBy: readonly [StringAggOrderBy, ...StringAggOrderBy[]];
|
|
53
84
|
}
|
|
54
85
|
/**
|
|
55
86
|
* Concatenate `field` values across related rows, separated by
|
|
56
87
|
* `separator`. Optional `orderBy` controls row ordering.
|
|
57
88
|
*/
|
|
58
|
-
export declare function stringAgg
|
|
89
|
+
export declare function stringAgg<const Field extends ExprLike<"text">, const Separator extends ExprLike<"text">>(field: Field, separator: Separator, options?: StringAggOptions): ComposedExpr<"text", [Field, Separator]>;
|
|
59
90
|
/** Distinct-only variant of `stringAgg`. Server emits duplicates once. */
|
|
60
|
-
export declare function stringAggUnique
|
|
91
|
+
export declare function stringAggUnique<const Field extends ExprLike<"text">, const Separator extends ExprLike<"text">>(field: Field, separator: Separator): ComposedExpr<"text", [Field, Separator]>;
|
|
@@ -10,13 +10,30 @@
|
|
|
10
10
|
* free-form string. The serializer assembles the wire predicate
|
|
11
11
|
* text.
|
|
12
12
|
*
|
|
13
|
-
* - `stringAgg` accepts
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* direction defaults to ASC if omitted.
|
|
13
|
+
* - `stringAgg` accepts a variadic `ORDER BY` clause embedded inside its
|
|
14
|
+
* separator argument on the wire. The EDK models that as
|
|
15
|
+
* `{ orderBy: [{ field, direction }, ...] }`; direction defaults to ASC.
|
|
17
16
|
*/
|
|
18
|
-
import { coerce, emitStringLiteral,
|
|
17
|
+
import { coerce, emitStringLiteral, makeComposedExpr } from "./runtime.js";
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
// Predicate shape for countIf / sumIf
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
21
|
+
/** Discoverable comparison operators accepted by COUNTIF and SUMIF. */
|
|
22
|
+
export const predicateOp = {
|
|
23
|
+
equal: "=",
|
|
24
|
+
notEqual: "!=",
|
|
25
|
+
notEqualSql: "<>",
|
|
26
|
+
greaterThan: ">",
|
|
27
|
+
greaterThanOrEqual: ">=",
|
|
28
|
+
lessThan: "<",
|
|
29
|
+
lessThanOrEqual: "<=",
|
|
30
|
+
};
|
|
19
31
|
function formatPredicate(p) {
|
|
32
|
+
if (!("value" in p)) {
|
|
33
|
+
const [name, value] = Object.entries(p)[0];
|
|
34
|
+
const op = predicateOp[name];
|
|
35
|
+
return emitStringLiteral(`${op === "=" ? "" : op}${String(value)}`);
|
|
36
|
+
}
|
|
20
37
|
const op = p.op === undefined || p.op === "=" ? "" : p.op;
|
|
21
38
|
return emitStringLiteral(`${op}${String(p.value)}`);
|
|
22
39
|
}
|
|
@@ -30,42 +47,55 @@ function formatPredicate(p) {
|
|
|
30
47
|
*/
|
|
31
48
|
export function countIf(field, predicate) {
|
|
32
49
|
const f = coerce(field);
|
|
33
|
-
return
|
|
50
|
+
return makeComposedExpr("number", [f], () => `COUNTIF(${f.toCalcString()}, ${formatPredicate(predicate)})`);
|
|
34
51
|
}
|
|
35
|
-
/**
|
|
36
|
-
* Sum rows of `field` where the value matches the predicate. Wire form:
|
|
37
|
-
* `SUMIF(field, 'predicate')`. Output brand is `decimal` — server may
|
|
38
|
-
* return either NUMBER or DECIMAL depending on input; we collapse to
|
|
39
|
-
* the wider brand.
|
|
40
|
-
*/
|
|
41
52
|
export function sumIf(field, predicate) {
|
|
42
53
|
const f = coerce(field);
|
|
43
|
-
return
|
|
54
|
+
return makeComposedExpr(f.__exprType, [f], () => `SUMIF(${f.toCalcString()}, ${formatPredicate(predicate)})`);
|
|
44
55
|
}
|
|
45
|
-
|
|
56
|
+
// ---------------------------------------------------------------------------
|
|
57
|
+
// STRING_AGG / STRING_AGG_UNIQUE
|
|
58
|
+
// ---------------------------------------------------------------------------
|
|
59
|
+
/** Discoverable sort directions for STRING_AGG's ORDER BY clause. */
|
|
60
|
+
export const orderByDirection = {
|
|
61
|
+
ascending: "ASC",
|
|
62
|
+
descending: "DESC",
|
|
63
|
+
};
|
|
64
|
+
function stringAggParts(field, separator, options) {
|
|
46
65
|
const f = coerce(field);
|
|
47
66
|
const s = coerce(separator);
|
|
48
|
-
if (
|
|
49
|
-
return
|
|
67
|
+
if (options === undefined) {
|
|
68
|
+
return {
|
|
69
|
+
dependencies: [f, s],
|
|
70
|
+
render: () => `${f.toCalcString()}, ${s.toCalcString()}`,
|
|
71
|
+
};
|
|
50
72
|
}
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
73
|
+
const orderBy = options.orderBy.map((item) => {
|
|
74
|
+
const source = item.value ?? item.field;
|
|
75
|
+
if (source === undefined)
|
|
76
|
+
throw new Error("calc.stringAgg: orderBy requires `value`.");
|
|
77
|
+
const expression = coerce(source);
|
|
78
|
+
const direction = item.direction === "desc" ? "DESC" : item.direction === "asc" ? "ASC" : (item.direction ?? "ASC");
|
|
79
|
+
return { expression, direction };
|
|
80
|
+
});
|
|
81
|
+
// Wire form: STRING_AGG(field, 'sep' ORDER BY field [ASC|DESC], …).
|
|
82
|
+
return {
|
|
83
|
+
dependencies: [f, s, ...orderBy.map(({ expression }) => expression)],
|
|
84
|
+
render: () => `${f.toCalcString()}, ${s.toCalcString()} ORDER BY ${orderBy
|
|
85
|
+
.map(({ expression, direction }) => `${expression.toCalcString()}${direction === "ASC" ? "" : ` ${direction}`}`)
|
|
86
|
+
.join(", ")}`,
|
|
87
|
+
};
|
|
58
88
|
}
|
|
59
89
|
/**
|
|
60
90
|
* Concatenate `field` values across related rows, separated by
|
|
61
91
|
* `separator`. Optional `orderBy` controls row ordering.
|
|
62
92
|
*/
|
|
63
|
-
export function stringAgg(field, separator,
|
|
64
|
-
const
|
|
65
|
-
return
|
|
93
|
+
export function stringAgg(field, separator, options) {
|
|
94
|
+
const parts = stringAggParts(field, separator, options);
|
|
95
|
+
return makeComposedExpr("text", parts.dependencies, () => `STRING_AGG(${parts.render()})`);
|
|
66
96
|
}
|
|
67
97
|
/** Distinct-only variant of `stringAgg`. Server emits duplicates once. */
|
|
68
|
-
export function stringAggUnique(field, separator
|
|
69
|
-
const
|
|
70
|
-
return
|
|
98
|
+
export function stringAggUnique(field, separator) {
|
|
99
|
+
const parts = stringAggParts(field, separator);
|
|
100
|
+
return makeComposedExpr("text", parts.dependencies, () => `STRING_AGG_UNIQUE(${parts.render()})`);
|
|
71
101
|
}
|
|
@@ -3,71 +3,120 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The platform's calc grammar treats DATE and DATETIME as distinct
|
|
5
5
|
* brands — DATE is calendar date (no time component), DATETIME is
|
|
6
|
-
* instant-in-time.
|
|
7
|
-
*
|
|
6
|
+
* instant-in-time. Knowhere accepts either brand for date-part extraction
|
|
7
|
+
* and DATETIME_TRUNC.
|
|
8
8
|
*
|
|
9
9
|
* Constrained string arguments are typed as literal unions so the
|
|
10
10
|
* agent gets autocomplete and compile-time validation:
|
|
11
|
-
* - `dateDif` unit: '
|
|
11
|
+
* - `dateDif` unit: 'S' | 'MIN' | 'H' | 'Y' | 'M' | 'D'
|
|
12
12
|
* - `dateTimeTrunc` precision: a date-part literal union
|
|
13
13
|
* - `weekday` mode: 1 | 2 | 3
|
|
14
14
|
*/
|
|
15
|
-
import type { Expr, ExprLike } from "./types.js";
|
|
15
|
+
import type { ComposedExpr, Expr, ExprLike } from "./types.js";
|
|
16
16
|
/** Either a DATE-typed or DATETIME-typed expression. */
|
|
17
17
|
type DateOrDateTimeLike = ExprLike<"date"> | ExprLike<"datetime">;
|
|
18
18
|
/** Current instant. Wire `NOW()`. Returns DATETIME. */
|
|
19
19
|
export declare function now(): Expr<"datetime">;
|
|
20
|
-
/** Today's calendar date. Wire `TODAY()`. Returns DATE. */
|
|
21
|
-
export declare function today(): Expr<"date">;
|
|
22
20
|
/**
|
|
23
21
|
* Build a DATE from numeric year / month / day components.
|
|
24
22
|
* Wire `DATE(year, month, day)`. The `make` prefix avoids colliding
|
|
25
23
|
* with the JS `Date` global if someone destructures `calc`.
|
|
26
24
|
*/
|
|
27
|
-
export declare function makeDate
|
|
25
|
+
export declare function makeDate<const Year extends ExprLike<"number">, const Month extends ExprLike<"number">, const Day extends ExprLike<"number">>(year: Year, month: Month, day: Day): ComposedExpr<"date", [Year, Month, Day]>;
|
|
26
|
+
/**
|
|
27
|
+
* Build a DATETIME from numeric date and time components.
|
|
28
|
+
* Wire `DATETIME(year, month, day, hour, minute, second)`.
|
|
29
|
+
*/
|
|
30
|
+
export declare function dateTime<const Parts extends readonly [ExprLike<"number">, ExprLike<"number">, ExprLike<"number">, ExprLike<"number">, ExprLike<"number">, ExprLike<"number">]>(...values: Parts): ComposedExpr<"datetime", Parts>;
|
|
28
31
|
/**
|
|
29
32
|
* Parse a text expression into a DATE. The server accepts ISO-style
|
|
30
33
|
* `YYYY-MM-DD` literals; with a text expression as input the server
|
|
31
34
|
* does a TRY_CAST and returns null on parse failure.
|
|
32
35
|
*/
|
|
33
|
-
export declare function dateValue
|
|
34
|
-
/**
|
|
35
|
-
export
|
|
36
|
+
export declare function dateValue<const Value extends ExprLike<"text"> | ExprLike<"datetime">>(value: Value): ComposedExpr<"date", [Value]>;
|
|
37
|
+
/** Discoverable unit codes accepted by the wire `DATEDIF` function. */
|
|
38
|
+
export declare const dateDifUnit: {
|
|
39
|
+
readonly seconds: "S";
|
|
40
|
+
readonly minutes: "MIN";
|
|
41
|
+
readonly hours: "H";
|
|
42
|
+
readonly years: "Y";
|
|
43
|
+
readonly months: "M";
|
|
44
|
+
readonly days: "D";
|
|
45
|
+
};
|
|
46
|
+
export type DateDifUnit = (typeof dateDifUnit)[keyof typeof dateDifUnit];
|
|
47
|
+
/** Human-readable date difference units accepted by {@link dateDiff}. */
|
|
48
|
+
export declare const dateDiffUnit: {
|
|
49
|
+
readonly seconds: "seconds";
|
|
50
|
+
readonly minutes: "minutes";
|
|
51
|
+
readonly hours: "hours";
|
|
52
|
+
readonly years: "years";
|
|
53
|
+
readonly months: "months";
|
|
54
|
+
readonly days: "days";
|
|
55
|
+
};
|
|
56
|
+
export type DateDiffUnit = keyof typeof dateDiffUnit;
|
|
36
57
|
/**
|
|
37
58
|
* Difference between `end` and `start` in the specified unit.
|
|
38
|
-
* - `'
|
|
39
|
-
* - `'
|
|
40
|
-
* - `'M'` — months
|
|
59
|
+
* - `'S'` — seconds; `'MIN'` — minutes; `'H'` — hours
|
|
60
|
+
* - `'D'` — days; `'M'` — months; `'Y'` — years
|
|
41
61
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
62
|
+
/** @deprecated Prefer {@link dateDiff} with human-readable units. */
|
|
63
|
+
export declare function dateDif<const Start extends DateOrDateTimeLike, const End extends DateOrDateTimeLike>(start: Start, end: End, unit: DateDifUnit): ComposedExpr<"number", [Start, End]>;
|
|
64
|
+
/** Difference between two dates using a readable unit name. */
|
|
65
|
+
export declare function dateDiff<const Start extends DateOrDateTimeLike, const End extends DateOrDateTimeLike>(start: Start, end: End, unit: DateDiffUnit): ComposedExpr<"number", [Start, End]>;
|
|
66
|
+
/** Discoverable precision values accepted by `DATETIME_TRUNC`. */
|
|
67
|
+
export declare const dateTimeTruncPrecision: {
|
|
68
|
+
readonly microseconds: "MICROSECONDS";
|
|
69
|
+
readonly milliseconds: "MILLISECONDS";
|
|
70
|
+
readonly second: "SECOND";
|
|
71
|
+
readonly minute: "MINUTE";
|
|
72
|
+
readonly hour: "HOUR";
|
|
73
|
+
readonly day: "DAY";
|
|
74
|
+
readonly week: "WEEK";
|
|
75
|
+
readonly month: "MONTH";
|
|
76
|
+
readonly quarter: "QUARTER";
|
|
77
|
+
readonly year: "YEAR";
|
|
78
|
+
readonly decade: "DECADE";
|
|
79
|
+
readonly century: "CENTURY";
|
|
80
|
+
readonly millennium: "MILLENNIUM";
|
|
81
|
+
};
|
|
82
|
+
export type DateTimeTruncPrecision = (typeof dateTimeTruncPrecision)[keyof typeof dateTimeTruncPrecision];
|
|
83
|
+
/** Human-readable precisions accepted by {@link truncateDateTime}. */
|
|
84
|
+
export type DateTimePrecision = "microseconds" | "milliseconds" | "second" | "minute" | "hour" | "day" | "week" | "month" | "quarter" | "year" | "decade" | "century" | "millennium";
|
|
45
85
|
/**
|
|
46
|
-
* Truncate a DATETIME to the given precision. E.g.
|
|
86
|
+
* Truncate a DATE or DATETIME to the given precision. E.g.
|
|
47
87
|
* `dateTimeTrunc(t, "MONTH")` returns the first instant of `t`'s month.
|
|
48
88
|
*/
|
|
49
|
-
|
|
89
|
+
/** @deprecated Prefer {@link truncateDateTime} with human-readable precision. */
|
|
90
|
+
export declare function dateTimeTrunc<const Value extends DateOrDateTimeLike>(value: Value, precision: DateTimeTruncPrecision): ComposedExpr<"datetime", [Value]>;
|
|
91
|
+
/** Truncate a date/datetime using a readable precision name. */
|
|
92
|
+
export declare function truncateDateTime<const Value extends DateOrDateTimeLike>(value: Value, precision: DateTimePrecision): ComposedExpr<"datetime", [Value]>;
|
|
50
93
|
/**
|
|
51
94
|
* Modes accepted by the wire `WEEKDAY` function.
|
|
52
95
|
* - 1 — Sunday=1 .. Saturday=7 (default)
|
|
53
96
|
* - 2 — Monday=1 .. Sunday=7
|
|
54
97
|
* - 3 — Monday=0 .. Sunday=6
|
|
55
98
|
*/
|
|
56
|
-
export
|
|
99
|
+
export declare const weekdayMode: {
|
|
100
|
+
readonly sundayOne: 1;
|
|
101
|
+
readonly mondayOne: 2;
|
|
102
|
+
readonly mondayZero: 3;
|
|
103
|
+
};
|
|
104
|
+
export type WeekdayMode = (typeof weekdayMode)[keyof typeof weekdayMode];
|
|
105
|
+
export type WeekdayConvention = keyof typeof weekdayMode;
|
|
57
106
|
/**
|
|
58
107
|
* Day-of-week as a numeric, optionally selecting the numbering scheme.
|
|
59
108
|
*/
|
|
60
|
-
export declare function weekday(value:
|
|
109
|
+
export declare function weekday<const Value extends DateOrDateTimeLike>(value: Value, mode?: WeekdayMode | WeekdayConvention): ComposedExpr<"number", [Value]>;
|
|
61
110
|
/** Year component as NUMBER. */
|
|
62
|
-
export declare function year(value:
|
|
111
|
+
export declare function year<const Value extends DateOrDateTimeLike>(value: Value): ComposedExpr<"number", [Value]>;
|
|
63
112
|
/** Month component (1–12) as NUMBER. */
|
|
64
|
-
export declare function month(value:
|
|
113
|
+
export declare function month<const Value extends DateOrDateTimeLike>(value: Value): ComposedExpr<"number", [Value]>;
|
|
65
114
|
/** Day-of-month (1–31) as NUMBER. */
|
|
66
|
-
export declare function day(value:
|
|
67
|
-
/** Hour (0–23) from a DATETIME. */
|
|
68
|
-
export declare function hour(value:
|
|
69
|
-
/** Minute (0–59) from a DATETIME. */
|
|
70
|
-
export declare function minute(value:
|
|
71
|
-
/** Second (0–59) from a DATETIME. */
|
|
72
|
-
export declare function second(value:
|
|
115
|
+
export declare function day<const Value extends DateOrDateTimeLike>(value: Value): ComposedExpr<"number", [Value]>;
|
|
116
|
+
/** Hour (0–23) from a DATE or DATETIME. */
|
|
117
|
+
export declare function hour<const Value extends DateOrDateTimeLike>(value: Value): ComposedExpr<"number", [Value]>;
|
|
118
|
+
/** Minute (0–59) from a DATE or DATETIME. */
|
|
119
|
+
export declare function minute<const Value extends DateOrDateTimeLike>(value: Value): ComposedExpr<"number", [Value]>;
|
|
120
|
+
/** Second (0–59) from a DATE or DATETIME. */
|
|
121
|
+
export declare function second<const Value extends DateOrDateTimeLike>(value: Value): ComposedExpr<"number", [Value]>;
|
|
73
122
|
export {};
|