@servicenow/sdk-build-plugins 4.2.0 → 4.4.0
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/dist/acl-plugin.js +11 -0
- package/dist/acl-plugin.js.map +1 -1
- package/dist/applicability-plugin.d.ts +2 -0
- package/dist/applicability-plugin.js +72 -0
- package/dist/applicability-plugin.js.map +1 -0
- package/dist/atf/test-plugin.js +5 -2
- package/dist/atf/test-plugin.js.map +1 -1
- package/dist/basic-syntax-plugin.js +7 -1
- package/dist/basic-syntax-plugin.js.map +1 -1
- package/dist/business-rule-plugin.js +1 -0
- package/dist/business-rule-plugin.js.map +1 -1
- package/dist/call-expression-plugin.js +1 -107
- package/dist/call-expression-plugin.js.map +1 -1
- package/dist/column/column-to-record.d.ts +10 -3
- package/dist/column/column-to-record.js +44 -7
- package/dist/column/column-to-record.js.map +1 -1
- package/dist/column-plugin.d.ts +3 -1
- package/dist/column-plugin.js +12 -12
- package/dist/column-plugin.js.map +1 -1
- package/dist/dashboard/dashboard-component-property-defaults.d.ts +152 -0
- package/dist/dashboard/dashboard-component-property-defaults.js +264 -0
- package/dist/dashboard/dashboard-component-property-defaults.js.map +1 -0
- package/dist/dashboard/dashboard-component-resolver.d.ts +13 -0
- package/dist/dashboard/dashboard-component-resolver.js +69 -0
- package/dist/dashboard/dashboard-component-resolver.js.map +1 -0
- package/dist/dashboard/dashboard-plugin.d.ts +12 -0
- package/dist/dashboard/dashboard-plugin.js +397 -0
- package/dist/dashboard/dashboard-plugin.js.map +1 -0
- package/dist/data-plugin.d.ts +3 -0
- package/dist/data-plugin.js +61 -113
- package/dist/data-plugin.js.map +1 -1
- package/dist/email-notification-plugin.d.ts +2 -0
- package/dist/email-notification-plugin.js +541 -0
- package/dist/email-notification-plugin.js.map +1 -0
- package/dist/flow/constants/flow-plugin-constants.d.ts +58 -0
- package/dist/flow/constants/flow-plugin-constants.js +70 -0
- package/dist/flow/constants/flow-plugin-constants.js.map +1 -0
- package/dist/flow/flow-logic/flow-logic-constants.d.ts +38 -0
- package/dist/flow/flow-logic/flow-logic-constants.js +118 -0
- package/dist/flow/flow-logic/flow-logic-constants.js.map +1 -0
- package/dist/flow/flow-logic/flow-logic-diagnostics.d.ts +19 -0
- package/dist/flow/flow-logic/flow-logic-diagnostics.js +503 -0
- package/dist/flow/flow-logic/flow-logic-diagnostics.js.map +1 -0
- package/dist/flow/flow-logic/flow-logic-plugin-helpers.d.ts +62 -0
- package/dist/flow/flow-logic/flow-logic-plugin-helpers.js +2092 -0
- package/dist/flow/flow-logic/flow-logic-plugin-helpers.js.map +1 -0
- package/dist/flow/flow-logic/flow-logic-plugin.d.ts +52 -0
- package/dist/flow/flow-logic/flow-logic-plugin.js +283 -0
- package/dist/flow/flow-logic/flow-logic-plugin.js.map +1 -0
- package/dist/flow/flow-logic/flow-logic-shapes.d.ts +104 -0
- package/dist/flow/flow-logic/flow-logic-shapes.js +201 -0
- package/dist/flow/flow-logic/flow-logic-shapes.js.map +1 -0
- package/dist/flow/plugins/approval-rules-plugin.d.ts +2 -0
- package/dist/flow/plugins/approval-rules-plugin.js +49 -0
- package/dist/flow/plugins/approval-rules-plugin.js.map +1 -0
- package/dist/flow/plugins/flow-action-definition-plugin.d.ts +2 -0
- package/dist/flow/plugins/flow-action-definition-plugin.js +286 -0
- package/dist/flow/plugins/flow-action-definition-plugin.js.map +1 -0
- package/dist/flow/plugins/flow-data-pill-plugin.d.ts +9 -0
- package/dist/flow/plugins/flow-data-pill-plugin.js +212 -0
- package/dist/flow/plugins/flow-data-pill-plugin.js.map +1 -0
- package/dist/flow/plugins/flow-definition-plugin.d.ts +2 -0
- package/dist/flow/plugins/flow-definition-plugin.js +1668 -0
- package/dist/flow/plugins/flow-definition-plugin.js.map +1 -0
- package/dist/flow/plugins/flow-diagnostics-plugin.d.ts +26 -0
- package/dist/flow/plugins/flow-diagnostics-plugin.js +217 -0
- package/dist/flow/plugins/flow-diagnostics-plugin.js.map +1 -0
- package/dist/flow/plugins/flow-instance-plugin.d.ts +12 -0
- package/dist/flow/plugins/flow-instance-plugin.js +1205 -0
- package/dist/flow/plugins/flow-instance-plugin.js.map +1 -0
- package/dist/flow/plugins/flow-trigger-instance-plugin.d.ts +2 -0
- package/dist/flow/plugins/flow-trigger-instance-plugin.js +338 -0
- package/dist/flow/plugins/flow-trigger-instance-plugin.js.map +1 -0
- package/dist/flow/plugins/inline-script-plugin.d.ts +39 -0
- package/dist/flow/plugins/inline-script-plugin.js +80 -0
- package/dist/flow/plugins/inline-script-plugin.js.map +1 -0
- package/dist/flow/plugins/step-definition-plugin.d.ts +5 -0
- package/dist/flow/plugins/step-definition-plugin.js +71 -0
- package/dist/flow/plugins/step-definition-plugin.js.map +1 -0
- package/dist/flow/plugins/step-instance-plugin.d.ts +31 -0
- package/dist/flow/plugins/step-instance-plugin.js +339 -0
- package/dist/flow/plugins/step-instance-plugin.js.map +1 -0
- package/dist/flow/plugins/trigger-plugin.d.ts +2 -0
- package/dist/flow/plugins/trigger-plugin.js +96 -0
- package/dist/flow/plugins/trigger-plugin.js.map +1 -0
- package/dist/flow/plugins/wfa-datapill-plugin.d.ts +15 -0
- package/dist/flow/plugins/wfa-datapill-plugin.js +178 -0
- package/dist/flow/plugins/wfa-datapill-plugin.js.map +1 -0
- package/dist/flow/utils/approval-rules-processor.d.ts +13 -0
- package/dist/flow/utils/approval-rules-processor.js +267 -0
- package/dist/flow/utils/approval-rules-processor.js.map +1 -0
- package/dist/flow/utils/built-in-complex-objects.d.ts +19 -0
- package/dist/flow/utils/built-in-complex-objects.js +62 -0
- package/dist/flow/utils/built-in-complex-objects.js.map +1 -0
- package/dist/flow/utils/complex-object-resolver.d.ts +8 -0
- package/dist/flow/utils/complex-object-resolver.js +614 -0
- package/dist/flow/utils/complex-object-resolver.js.map +1 -0
- package/dist/flow/utils/complex-objects.d.ts +36 -0
- package/dist/flow/utils/complex-objects.js +481 -0
- package/dist/flow/utils/complex-objects.js.map +1 -0
- package/dist/flow/utils/data-pill-shapes.d.ts +58 -0
- package/dist/flow/utils/data-pill-shapes.js +135 -0
- package/dist/flow/utils/data-pill-shapes.js.map +1 -0
- package/dist/flow/utils/datapill-transformer.d.ts +110 -0
- package/dist/flow/utils/datapill-transformer.js +503 -0
- package/dist/flow/utils/datapill-transformer.js.map +1 -0
- package/dist/flow/utils/flow-constants.d.ts +72 -0
- package/dist/flow/utils/flow-constants.js +230 -0
- package/dist/flow/utils/flow-constants.js.map +1 -0
- package/dist/flow/utils/flow-io-to-record.d.ts +44 -0
- package/dist/flow/utils/flow-io-to-record.js +409 -0
- package/dist/flow/utils/flow-io-to-record.js.map +1 -0
- package/dist/flow/utils/flow-shapes.d.ts +161 -0
- package/dist/flow/utils/flow-shapes.js +255 -0
- package/dist/flow/utils/flow-shapes.js.map +1 -0
- package/dist/flow/utils/flow-to-xml.d.ts +16 -0
- package/dist/flow/utils/flow-to-xml.js +237 -0
- package/dist/flow/utils/flow-to-xml.js.map +1 -0
- package/dist/flow/utils/flow-variable-processor.d.ts +51 -0
- package/dist/flow/utils/flow-variable-processor.js +69 -0
- package/dist/flow/utils/flow-variable-processor.js.map +1 -0
- package/dist/flow/utils/label-cache-parser.d.ts +7 -0
- package/dist/flow/utils/label-cache-parser.js +24 -0
- package/dist/flow/utils/label-cache-parser.js.map +1 -0
- package/dist/flow/utils/label-cache-processor.d.ts +119 -0
- package/dist/flow/utils/label-cache-processor.js +719 -0
- package/dist/flow/utils/label-cache-processor.js.map +1 -0
- package/dist/flow/utils/pill-string-parser.d.ts +88 -0
- package/dist/flow/utils/pill-string-parser.js +306 -0
- package/dist/flow/utils/pill-string-parser.js.map +1 -0
- package/dist/flow/utils/schema-to-flow-object.d.ts +22 -0
- package/dist/flow/utils/schema-to-flow-object.js +318 -0
- package/dist/flow/utils/schema-to-flow-object.js.map +1 -0
- package/dist/flow/utils/service-catalog.d.ts +47 -0
- package/dist/flow/utils/service-catalog.js +137 -0
- package/dist/flow/utils/service-catalog.js.map +1 -0
- package/dist/flow/utils/utils.d.ts +117 -0
- package/dist/flow/utils/utils.js +345 -0
- package/dist/flow/utils/utils.js.map +1 -0
- package/dist/index.d.ts +20 -1
- package/dist/index.js +21 -1
- package/dist/index.js.map +1 -1
- package/dist/list-plugin.js +1 -1
- package/dist/list-plugin.js.map +1 -1
- package/dist/now-attach-plugin.d.ts +1 -0
- package/dist/now-attach-plugin.js +10 -10
- package/dist/now-attach-plugin.js.map +1 -1
- package/dist/now-ref-plugin.js +1 -1
- package/dist/now-ref-plugin.js.map +1 -1
- package/dist/record-plugin.d.ts +29 -0
- package/dist/record-plugin.js +66 -7
- package/dist/record-plugin.js.map +1 -1
- package/dist/repack/index.d.ts +2 -0
- package/dist/repack/index.js +8 -0
- package/dist/repack/index.js.map +1 -1
- package/dist/rest-api-plugin.js +54 -44
- package/dist/rest-api-plugin.js.map +1 -1
- package/dist/server-module-plugin/index.d.ts +10 -0
- package/dist/server-module-plugin/index.js +83 -59
- package/dist/server-module-plugin/index.js.map +1 -1
- package/dist/service-catalog/catalog-clientscript-plugin.d.ts +2 -0
- package/dist/service-catalog/catalog-clientscript-plugin.js +117 -0
- package/dist/service-catalog/catalog-clientscript-plugin.js.map +1 -0
- package/dist/service-catalog/catalog-item-plugin.d.ts +2 -0
- package/dist/service-catalog/catalog-item-plugin.js +115 -0
- package/dist/service-catalog/catalog-item-plugin.js.map +1 -0
- package/dist/service-catalog/catalog-ui-policy-plugin.d.ts +2 -0
- package/dist/service-catalog/catalog-ui-policy-plugin.js +266 -0
- package/dist/service-catalog/catalog-ui-policy-plugin.js.map +1 -0
- package/dist/service-catalog/index.d.ts +5 -0
- package/dist/service-catalog/index.js +22 -0
- package/dist/service-catalog/index.js.map +1 -0
- package/dist/service-catalog/record-to-shape.d.ts +6 -0
- package/dist/service-catalog/record-to-shape.js +93 -0
- package/dist/service-catalog/record-to-shape.js.map +1 -0
- package/dist/service-catalog/sc-record-producer-plugin.d.ts +2 -0
- package/dist/service-catalog/sc-record-producer-plugin.js +140 -0
- package/dist/service-catalog/sc-record-producer-plugin.js.map +1 -0
- package/dist/service-catalog/service-catalog-base.d.ts +311 -0
- package/dist/service-catalog/service-catalog-base.js +542 -0
- package/dist/service-catalog/service-catalog-base.js.map +1 -0
- package/dist/service-catalog/service-catalog-diagnostics.d.ts +45 -0
- package/dist/service-catalog/service-catalog-diagnostics.js +172 -0
- package/dist/service-catalog/service-catalog-diagnostics.js.map +1 -0
- package/dist/service-catalog/shape-to-record.d.ts +8 -0
- package/dist/service-catalog/shape-to-record.js +235 -0
- package/dist/service-catalog/shape-to-record.js.map +1 -0
- package/dist/service-catalog/utils.d.ts +323 -0
- package/dist/service-catalog/utils.js +1216 -0
- package/dist/service-catalog/utils.js.map +1 -0
- package/dist/service-catalog/variable-helper.d.ts +43 -0
- package/dist/service-catalog/variable-helper.js +92 -0
- package/dist/service-catalog/variable-helper.js.map +1 -0
- package/dist/service-catalog/variable-set-plugin.d.ts +2 -0
- package/dist/service-catalog/variable-set-plugin.js +175 -0
- package/dist/service-catalog/variable-set-plugin.js.map +1 -0
- package/dist/service-catalog/variables-transform.d.ts +139 -0
- package/dist/service-catalog/variables-transform.js +403 -0
- package/dist/service-catalog/variables-transform.js.map +1 -0
- package/dist/sla/sla-validators.d.ts +61 -0
- package/dist/sla/sla-validators.js +224 -0
- package/dist/sla/sla-validators.js.map +1 -0
- package/dist/sla-plugin.d.ts +5 -0
- package/dist/sla-plugin.js +280 -0
- package/dist/sla-plugin.js.map +1 -0
- package/dist/static-content-plugin.js +25 -2
- package/dist/static-content-plugin.js.map +1 -1
- package/dist/table-plugin.js +32 -15
- package/dist/table-plugin.js.map +1 -1
- package/dist/ui-page-plugin.js +832 -19
- package/dist/ui-page-plugin.js.map +1 -1
- package/dist/ui-policy-plugin.js +5 -7
- package/dist/ui-policy-plugin.js.map +1 -1
- package/dist/utils.d.ts +10 -1
- package/dist/utils.js +16 -0
- package/dist/utils.js.map +1 -1
- package/dist/ux-list-menu-config-plugin.d.ts +2 -0
- package/dist/ux-list-menu-config-plugin.js +292 -0
- package/dist/ux-list-menu-config-plugin.js.map +1 -0
- package/dist/workspace-plugin/chrome-tab.d.ts +2 -0
- package/dist/workspace-plugin/chrome-tab.js +46 -0
- package/dist/workspace-plugin/chrome-tab.js.map +1 -0
- package/dist/workspace-plugin/constants.d.ts +52 -0
- package/dist/workspace-plugin/constants.js +56 -0
- package/dist/workspace-plugin/constants.js.map +1 -0
- package/dist/workspace-plugin/fluent-utils.d.ts +9 -0
- package/dist/workspace-plugin/fluent-utils.js +60 -0
- package/dist/workspace-plugin/fluent-utils.js.map +1 -0
- package/dist/workspace-plugin/page.d.ts +8 -0
- package/dist/workspace-plugin/page.js +108 -0
- package/dist/workspace-plugin/page.js.map +1 -0
- package/dist/workspace-plugin/screen.d.ts +1 -0
- package/dist/workspace-plugin/screen.js +38 -0
- package/dist/workspace-plugin/screen.js.map +1 -0
- package/dist/workspace-plugin/templates/index.d.ts +10 -0
- package/dist/workspace-plugin/templates/index.js +20 -0
- package/dist/workspace-plugin/templates/index.js.map +1 -0
- package/dist/workspace-plugin/templates/record-page-composition.d.ts +1 -0
- package/dist/workspace-plugin/templates/record-page-composition.js +4043 -0
- package/dist/workspace-plugin/templates/record-page-composition.js.map +1 -0
- package/dist/workspace-plugin/templates/record-page-data.d.ts +1 -0
- package/dist/workspace-plugin/templates/record-page-data.js +527 -0
- package/dist/workspace-plugin/templates/record-page-data.js.map +1 -0
- package/dist/workspace-plugin/templates/record-page-interalEventMappings.d.ts +1 -0
- package/dist/workspace-plugin/templates/record-page-interalEventMappings.js +39 -0
- package/dist/workspace-plugin/templates/record-page-interalEventMappings.js.map +1 -0
- package/dist/workspace-plugin/templates/record-page-layoutModel.d.ts +1 -0
- package/dist/workspace-plugin/templates/record-page-layoutModel.js +55 -0
- package/dist/workspace-plugin/templates/record-page-layoutModel.js.map +1 -0
- package/dist/workspace-plugin/templates/record-page-properties.d.ts +1 -0
- package/dist/workspace-plugin/templates/record-page-properties.js +135 -0
- package/dist/workspace-plugin/templates/record-page-properties.js.map +1 -0
- package/dist/workspace-plugin/templates/record-page.d.ts +3 -0
- package/dist/workspace-plugin/templates/record-page.js +8 -0
- package/dist/workspace-plugin/templates/record-page.js.map +1 -0
- package/dist/workspace-plugin.d.ts +2 -0
- package/dist/workspace-plugin.js +453 -0
- package/dist/workspace-plugin.js.map +1 -0
- package/package.json +10 -12
- package/src/acl-plugin.ts +16 -1
- package/src/applicability-plugin.ts +82 -0
- package/src/atf/test-plugin.ts +6 -3
- package/src/basic-syntax-plugin.ts +10 -1
- package/src/business-rule-plugin.ts +2 -1
- package/src/call-expression-plugin.ts +2 -130
- package/src/column/column-to-record.ts +54 -8
- package/src/column-plugin.ts +29 -13
- package/src/dashboard/dashboard-component-property-defaults.ts +277 -0
- package/src/dashboard/dashboard-component-resolver.ts +69 -0
- package/src/dashboard/dashboard-plugin.ts +450 -0
- package/src/data-plugin.ts +67 -139
- package/src/email-notification-plugin.ts +850 -0
- package/src/flow/constants/flow-plugin-constants.ts +79 -0
- package/src/flow/flow-logic/flow-logic-constants.ts +120 -0
- package/src/flow/flow-logic/flow-logic-diagnostics.ts +591 -0
- package/src/flow/flow-logic/flow-logic-plugin-helpers.ts +2550 -0
- package/src/flow/flow-logic/flow-logic-plugin.ts +337 -0
- package/src/flow/flow-logic/flow-logic-shapes.ts +215 -0
- package/src/flow/plugins/approval-rules-plugin.ts +48 -0
- package/src/flow/plugins/flow-action-definition-plugin.ts +295 -0
- package/src/flow/plugins/flow-data-pill-plugin.ts +258 -0
- package/src/flow/plugins/flow-definition-plugin.ts +2173 -0
- package/src/flow/plugins/flow-diagnostics-plugin.ts +280 -0
- package/src/flow/plugins/flow-instance-plugin.ts +1499 -0
- package/src/flow/plugins/flow-trigger-instance-plugin.ts +444 -0
- package/src/flow/plugins/inline-script-plugin.ts +83 -0
- package/src/flow/plugins/step-definition-plugin.ts +67 -0
- package/src/flow/plugins/step-instance-plugin.ts +431 -0
- package/src/flow/plugins/trigger-plugin.ts +95 -0
- package/src/flow/plugins/wfa-datapill-plugin.ts +213 -0
- package/src/flow/utils/approval-rules-processor.ts +298 -0
- package/src/flow/utils/built-in-complex-objects.ts +81 -0
- package/src/flow/utils/complex-object-resolver.ts +875 -0
- package/src/flow/utils/complex-objects.ts +656 -0
- package/src/flow/utils/data-pill-shapes.ts +165 -0
- package/src/flow/utils/datapill-transformer.ts +632 -0
- package/src/flow/utils/flow-constants.ts +285 -0
- package/src/flow/utils/flow-io-to-record.ts +533 -0
- package/src/flow/utils/flow-shapes.ts +296 -0
- package/src/flow/utils/flow-to-xml.ts +318 -0
- package/src/flow/utils/flow-variable-processor.ts +100 -0
- package/src/flow/utils/label-cache-parser.ts +37 -0
- package/src/flow/utils/label-cache-processor.ts +870 -0
- package/src/flow/utils/pill-string-parser.ts +375 -0
- package/src/flow/utils/schema-to-flow-object.ts +385 -0
- package/src/flow/utils/service-catalog.ts +174 -0
- package/src/flow/utils/utils.ts +395 -0
- package/src/index.ts +20 -1
- package/src/list-plugin.ts +1 -1
- package/src/now-attach-plugin.ts +14 -11
- package/src/now-ref-plugin.ts +1 -1
- package/src/record-plugin.ts +76 -11
- package/src/repack/index.ts +14 -0
- package/src/rest-api-plugin.ts +62 -50
- package/src/server-module-plugin/index.ts +112 -86
- package/src/service-catalog/catalog-clientscript-plugin.ts +140 -0
- package/src/service-catalog/catalog-item-plugin.ts +162 -0
- package/src/service-catalog/catalog-ui-policy-plugin.ts +324 -0
- package/src/service-catalog/index.ts +5 -0
- package/src/service-catalog/record-to-shape.ts +109 -0
- package/src/service-catalog/sc-record-producer-plugin.ts +201 -0
- package/src/service-catalog/service-catalog-base.ts +600 -0
- package/src/service-catalog/service-catalog-diagnostics.ts +254 -0
- package/src/service-catalog/shape-to-record.ts +279 -0
- package/src/service-catalog/utils.ts +1455 -0
- package/src/service-catalog/variable-helper.ts +135 -0
- package/src/service-catalog/variable-set-plugin.ts +197 -0
- package/src/service-catalog/variables-transform.ts +438 -0
- package/src/sla/sla-validators.ts +331 -0
- package/src/sla-plugin.ts +358 -0
- package/src/static-content-plugin.ts +25 -2
- package/src/table-plugin.ts +49 -16
- package/src/ui-page-plugin.ts +1063 -20
- package/src/ui-policy-plugin.ts +5 -9
- package/src/utils.ts +24 -1
- package/src/ux-list-menu-config-plugin.ts +312 -0
- package/src/workspace-plugin/chrome-tab.ts +44 -0
- package/src/workspace-plugin/constants.ts +53 -0
- package/src/workspace-plugin/fluent-utils.ts +60 -0
- package/src/workspace-plugin/page.ts +139 -0
- package/src/workspace-plugin/screen.ts +34 -0
- package/src/workspace-plugin/templates/index.ts +17 -0
- package/src/workspace-plugin/templates/record-page-composition.ts +4051 -0
- package/src/workspace-plugin/templates/record-page-data.ts +523 -0
- package/src/workspace-plugin/templates/record-page-interalEventMappings.ts +35 -0
- package/src/workspace-plugin/templates/record-page-layoutModel.ts +51 -0
- package/src/workspace-plugin/templates/record-page-properties.ts +131 -0
- package/src/workspace-plugin/templates/record-page.ts +6 -0
- package/src/workspace-plugin.ts +574 -0
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import { CallExpressionShape, type Diagnostics, type Factory, type Record } from '@servicenow/sdk-build-core'
|
|
2
|
+
import { getDocumentationRecords } from '../../column/column-to-record'
|
|
3
|
+
import { formatComplexObjectAttributes } from './complex-objects'
|
|
4
|
+
|
|
5
|
+
//Flow tables
|
|
6
|
+
export const TRIGGER_INSTANCE_TABLE = 'sys_hub_trigger_instance'
|
|
7
|
+
export const ACTION_INSTANCE_TABLE = 'sys_hub_action_instance'
|
|
8
|
+
export const SUBFLOW_INSTANCE_TABLE = 'sys_hub_sub_flow_instance'
|
|
9
|
+
export const SUBFLOW_INSTANCE_TABLE_V2 = 'sys_hub_sub_flow_instance_v2'
|
|
10
|
+
export const FLOW_LOGIC_INSTANCE_TABLE = 'sys_hub_flow_logic'
|
|
11
|
+
export const FLOW_STAGE_TABLE = 'sys_hub_flow_stage'
|
|
12
|
+
export const PILL_COMPOUND_TABLE = 'sys_hub_pill_compound'
|
|
13
|
+
export const CATALOG_ITEM_TABLE = 'sc_cat_item'
|
|
14
|
+
export const CATALOG_VARIABLE_TABLE = 'item_option_new'
|
|
15
|
+
export const CATALOG_VARIABLE_SET_TABLE = 'io_set_item'
|
|
16
|
+
|
|
17
|
+
export const UNSUPPORTED_FLOW_DESCENDANTS = [
|
|
18
|
+
FLOW_STAGE_TABLE,
|
|
19
|
+
PILL_COMPOUND_TABLE,
|
|
20
|
+
TRIGGER_INSTANCE_TABLE,
|
|
21
|
+
ACTION_INSTANCE_TABLE,
|
|
22
|
+
SUBFLOW_INSTANCE_TABLE,
|
|
23
|
+
FLOW_LOGIC_INSTANCE_TABLE,
|
|
24
|
+
SUBFLOW_INSTANCE_TABLE_V2,
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
//Plugins callee names
|
|
28
|
+
export const FLOW_API_NAME = 'Flow'
|
|
29
|
+
export const SUBFLOW_API_NAME = 'Subflow'
|
|
30
|
+
export const ACTION_DEFINITION_API_NAME = 'ActionDefinition'
|
|
31
|
+
export const TRIGGER_DEFINITION_API_NAME = 'TriggerDefinition'
|
|
32
|
+
|
|
33
|
+
export const TRIGGER_INSTANCE_API_NAME = 'wfa.trigger'
|
|
34
|
+
export const ACTION_INSTANCE_API_NAME = 'wfa.action'
|
|
35
|
+
export const SUBFLOW_INSTANCE_API_NAME = 'wfa.subflow'
|
|
36
|
+
export const ACTION_STEP_INSTANCE_API_NAME = 'wfa.action_step'
|
|
37
|
+
export const APPROVAL_RULES_API_NAME = 'wfa.approvalRules'
|
|
38
|
+
export const APPROVAL_DUE_DATE_API_NAME = 'wfa.approvalDueDate'
|
|
39
|
+
|
|
40
|
+
export const ELEMENT_MAPPING_PROVIDER = 'com.glide.flow_design.action.data.FlowDesignVariableMapper'
|
|
41
|
+
|
|
42
|
+
export const TRIGGER_TYPE_KEY_NAME = 'trigger_type'
|
|
43
|
+
export const ACTION_TYPE_KEY_NAME = 'action_type'
|
|
44
|
+
|
|
45
|
+
export const APPROVAL_RULES_INTERNAL_TYPE = 'approval_rules'
|
|
46
|
+
export const APPROVAL_ACTION_TYPE_APPROVE_VALUE = 'Approves'
|
|
47
|
+
export const APPROVAL_ACTION_TYPES = ['Approves', 'Rejects', 'ApprovesRejects']
|
|
48
|
+
|
|
49
|
+
export const STRING_API_NAME = 'StringColumn'
|
|
50
|
+
export const STRING_FULL_UTF8_ATTRIBUTE_NAME = 'isFullUTF8'
|
|
51
|
+
export const STRING_FULL_UTF8_DATA_TYPE_VALUE = 'string_full_utf8'
|
|
52
|
+
|
|
53
|
+
export const TIME_DATA_TYPE_VALUE = 'glide_time'
|
|
54
|
+
export const DURATION_DATA_TYPE_VALUE = 'glide_duration'
|
|
55
|
+
export const TEMPLATE_DATA_TYPE_VALUE = 'template_value'
|
|
56
|
+
export const APPROVAL_RULES_DATA_TYPE_VALUE = 'approval_rules'
|
|
57
|
+
export const APPROVAL_DUE_DATE_DATA_TYPE_VALUE = 'schedule_date_time'
|
|
58
|
+
|
|
59
|
+
export const UTC_TIMEZONE_VALUE = 'UTC'
|
|
60
|
+
|
|
61
|
+
export const UNSUPPORTED_DATA_TYPES = ['dynamic_choice', 'dynamic_inputs']
|
|
62
|
+
|
|
63
|
+
export const ACTION_DEF_COLUMN_NAME = 'action_type'
|
|
64
|
+
|
|
65
|
+
export const CORE_ACTIONS_PREFIX = 'action.core'
|
|
66
|
+
|
|
67
|
+
export const RUN_ON_EXTENDED = 'run_on_extended'
|
|
68
|
+
|
|
69
|
+
export const APPROVAL_DUE_DATE_INPUT_FIELD_ACTIONS = [
|
|
70
|
+
'f8f2e9920b10030085c083eb37673abd',
|
|
71
|
+
'cd04ac7573011010791f94596bf6a716',
|
|
72
|
+
]
|
|
73
|
+
|
|
74
|
+
export const CORE_ACTIONS_SYS_ID_NAME_MAP: { [sysId: string]: string } = {
|
|
75
|
+
fd4a0fb70f003300ecf0cc52ff767e2a: 'addWorknoteLinkToContext',
|
|
76
|
+
f8f2e9920b10030085c083eb37673abd: 'askForApproval',
|
|
77
|
+
'7b95a4c0a73133008299b39f087901b4': 'associateRecordToEmail',
|
|
78
|
+
'30fe6cdb0f973300dfd3694e68767e5a': 'copyAttachment',
|
|
79
|
+
af51fd0e73141300612c273ffff6a785: 'createCatalogTask',
|
|
80
|
+
ab575ae253b3230034c6ddeeff7b12f1: 'createOrUpdateRecord',
|
|
81
|
+
'2de05916c31332002841b63b12d3aee1': 'createRecord',
|
|
82
|
+
'2b3a6335531003003bf1d9109ec58759': 'createTask',
|
|
83
|
+
bdc2a0170f973300dfd3694e68767e47: 'deleteAttachment',
|
|
84
|
+
c3e09916c31332002841b63b12d3aedf: 'deleteRecord',
|
|
85
|
+
'80a30edeff30311077a95dac793bf19b': 'fireEvent',
|
|
86
|
+
'082e70db0f4273003788001ea8767e02': 'getAttachmentsOnRecord',
|
|
87
|
+
'330ba3abc31013002841b63b12d3aee8': 'getCatalogVariables',
|
|
88
|
+
a8cfa3efa70223008299b39f0879018b: 'getEmailHeader',
|
|
89
|
+
a159d7820f13101051218e8ebc767eea: 'getLatestResponseTextFromEmail',
|
|
90
|
+
'5bc1bcc6531003003bf1d9109ec587d4': 'log',
|
|
91
|
+
'2dbeaf29c7322300f4eba1425a976340': 'lookUpEmailAttachments',
|
|
92
|
+
'9d09f99587003300663ca1bb36cb0ba3': 'lookUpRecord',
|
|
93
|
+
'43400a1587003300663ca1bb36cb0b4b': 'lookUpRecords',
|
|
94
|
+
'6ecdee36935023005e69925cf67ffb47': 'lookupAttachment',
|
|
95
|
+
'7159823353cc10103a33ddeeff7b1216': 'moveAttachment',
|
|
96
|
+
bd8fcd48a73133008299b39f087901fc: 'moveEmailAttachmentsToRecord',
|
|
97
|
+
'87a397837333001098e194596bf6a7bc': 'recordProducer',
|
|
98
|
+
c1806bf4a70323008299b39f087901cb: 'sendEmail',
|
|
99
|
+
'0d8dd9f10f11101051218e8ebc767e27': 'sendNotification',
|
|
100
|
+
'027499be7333001099792f163cf6a7a7': 'sendSms',
|
|
101
|
+
a1a50c4573873300d70877186bf6a762: 'slaPercentageTimer',
|
|
102
|
+
c7a04c4607312001098e194596bf6a72a: 'submitCatalogItemRequest',
|
|
103
|
+
'9daf2a72c75100105312134c95c26073': 'updateMultipleRecords',
|
|
104
|
+
f9d01dd2c31332002841b63b12d3aea1: 'updateRecord',
|
|
105
|
+
'89ce8a4187120010663ca1bb36cb0be3': 'waitForCondition',
|
|
106
|
+
'8e38de067f0312108e688c90ac866501': 'waitForEmailReply',
|
|
107
|
+
'605d0ab8931012105cd18166448918db': 'waitForMessage',
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export const COLUMN_DEFAULTS = {
|
|
111
|
+
string: '',
|
|
112
|
+
boolean: false,
|
|
113
|
+
integer: 0,
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export enum ChoiceDropdown {
|
|
117
|
+
DROPDOWN_WITH_NONE = 1,
|
|
118
|
+
DROPDOWN_WITHOUT_NONE = 3,
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const actionStatusProps = {
|
|
122
|
+
name: '__action_status__',
|
|
123
|
+
label: 'Action Status',
|
|
124
|
+
}
|
|
125
|
+
const actionErrorProps = {
|
|
126
|
+
name: '__dont_treat_as_error__',
|
|
127
|
+
label: `Don't Treat as Error`,
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function getActionOutputAttributes(actionId: string, key: 'action_status' | 'action_error') {
|
|
131
|
+
const commonProps = {
|
|
132
|
+
element_mapping_provider: ELEMENT_MAPPING_PROVIDER,
|
|
133
|
+
action_error_output: true,
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const props = {
|
|
137
|
+
action_status: {
|
|
138
|
+
...commonProps,
|
|
139
|
+
uiType: 'object',
|
|
140
|
+
uiTypeLabel: 'Object',
|
|
141
|
+
uiUniqueId: `${actionId}-action-status`,
|
|
142
|
+
co_type_name: 'FDACTIONSTATUS',
|
|
143
|
+
},
|
|
144
|
+
action_error: {
|
|
145
|
+
...commonProps,
|
|
146
|
+
uiType: 'boolean',
|
|
147
|
+
uiTypeLabel: 'True/False',
|
|
148
|
+
uiUniqueId: `${actionId}-action-error`,
|
|
149
|
+
visible_in_ui: false,
|
|
150
|
+
},
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return formatComplexObjectAttributes(props[key])
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// action_error_output=true,co_type_name=FDACTIONSTATUS,element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=object,uiTypeLabel=Object,uiUniqueId=2e98ff63-bb27-4fa1-ba86-9f0a3893b656</attributes>
|
|
157
|
+
// action_error_output=true,element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=boolean,uiTypeLabel=True/False,uiUniqueId=ec7915fc-9e29-4c47-8674-dc6d0d67e32b,visible_in_ui=false
|
|
158
|
+
export async function createActionErrorAndStatusRecords(
|
|
159
|
+
source: Record,
|
|
160
|
+
tableName: string,
|
|
161
|
+
varTable: string,
|
|
162
|
+
factory: Factory,
|
|
163
|
+
diagnostics: Diagnostics
|
|
164
|
+
) {
|
|
165
|
+
const records: Record[] = []
|
|
166
|
+
|
|
167
|
+
const actionStatus = new CallExpressionShape({
|
|
168
|
+
source,
|
|
169
|
+
callee: 'StringColumn',
|
|
170
|
+
args: [
|
|
171
|
+
{
|
|
172
|
+
table: tableName,
|
|
173
|
+
...actionStatusProps,
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
})
|
|
177
|
+
|
|
178
|
+
const actionError = new CallExpressionShape({
|
|
179
|
+
source,
|
|
180
|
+
callee: 'StringColumn',
|
|
181
|
+
args: [
|
|
182
|
+
{
|
|
183
|
+
table: tableName,
|
|
184
|
+
...actionErrorProps,
|
|
185
|
+
},
|
|
186
|
+
],
|
|
187
|
+
})
|
|
188
|
+
|
|
189
|
+
const actionStatusRecords = await getDocumentationRecords(actionStatus, {}, factory, diagnostics, true)
|
|
190
|
+
const actionErrorRecords = await getDocumentationRecords(actionError, {}, factory, diagnostics, true)
|
|
191
|
+
|
|
192
|
+
records.push(...actionStatusRecords)
|
|
193
|
+
records.push(...actionErrorRecords)
|
|
194
|
+
const actionTypeId = source.getId().getValue()
|
|
195
|
+
const props = {
|
|
196
|
+
active: true,
|
|
197
|
+
model: actionTypeId,
|
|
198
|
+
model_id: actionTypeId,
|
|
199
|
+
model_table: source.getTable(),
|
|
200
|
+
name: tableName,
|
|
201
|
+
internal_type: 'string',
|
|
202
|
+
mandatory: false,
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
const statusVarRecord = await factory.createRecord({
|
|
206
|
+
source: source,
|
|
207
|
+
table: varTable,
|
|
208
|
+
properties: {
|
|
209
|
+
element: actionStatusProps['name'],
|
|
210
|
+
label: actionStatusProps['label'],
|
|
211
|
+
order: 1,
|
|
212
|
+
max_length: 65000,
|
|
213
|
+
...props,
|
|
214
|
+
attributes: getActionOutputAttributes(actionTypeId, 'action_status'),
|
|
215
|
+
},
|
|
216
|
+
})
|
|
217
|
+
|
|
218
|
+
const errorVarRecord = await factory.createRecord({
|
|
219
|
+
source: source,
|
|
220
|
+
table: varTable,
|
|
221
|
+
properties: {
|
|
222
|
+
element: actionErrorProps['name'],
|
|
223
|
+
label: actionErrorProps['label'],
|
|
224
|
+
order: 2,
|
|
225
|
+
max_length: 40,
|
|
226
|
+
...props,
|
|
227
|
+
attributes: getActionOutputAttributes(actionTypeId, 'action_error'),
|
|
228
|
+
},
|
|
229
|
+
})
|
|
230
|
+
|
|
231
|
+
records.push(statusVarRecord)
|
|
232
|
+
records.push(errorVarRecord)
|
|
233
|
+
|
|
234
|
+
return records
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// -------------------------------------------------------------
|
|
238
|
+
// slugifyName
|
|
239
|
+
// -------------------------------------------------------------
|
|
240
|
+
/**
|
|
241
|
+
* Converts arbitrary strings to snake_case slugs suitable for internal_name, etc.
|
|
242
|
+
* Handles:
|
|
243
|
+
* • Unicode accents (café → cafe)
|
|
244
|
+
* • Multiple / leading / trailing separators
|
|
245
|
+
* • Leading digits (prefixes with underscore)
|
|
246
|
+
* • Empty results (returns `fallback`)
|
|
247
|
+
*/
|
|
248
|
+
export interface SlugifyOptions {
|
|
249
|
+
prefixIfDigit?: string
|
|
250
|
+
fallback?: string
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export function slugifyString(value: unknown, opts: SlugifyOptions = {}): string {
|
|
254
|
+
const { prefixIfDigit = '_', fallback = '' } = opts
|
|
255
|
+
|
|
256
|
+
let str = value == null ? '' : String(value)
|
|
257
|
+
|
|
258
|
+
// Trim & normalize
|
|
259
|
+
str = str
|
|
260
|
+
.trim()
|
|
261
|
+
.normalize('NFKD')
|
|
262
|
+
.replace(/\p{Diacritic}/gu, '')
|
|
263
|
+
|
|
264
|
+
// Replace non-alphanumerics with underscore
|
|
265
|
+
str = str.replace(/[^a-zA-Z0-9]+/g, '_')
|
|
266
|
+
|
|
267
|
+
// Collapse and trim underscores
|
|
268
|
+
str = str.replace(/_+/g, '_').replace(/^_+|_+$/g, '')
|
|
269
|
+
|
|
270
|
+
// Prefix if starts with digit
|
|
271
|
+
if (/^[0-9]/.test(str)) {
|
|
272
|
+
str = `${prefixIfDigit}${str}`
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
if (str === '') {
|
|
276
|
+
return fallback
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
return str.toLowerCase()
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Core actions that require special catalog variable handling
|
|
284
|
+
*/
|
|
285
|
+
export const CATALOG_VARIABLE_ACTIONS = ['getCatalogVariables', 'createCatalogTask']
|