@rippling/rippling-sdk 0.2.0-alpha.32 → 0.2.0-alpha.34
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/client.d.mts +8 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -2
- package/client.d.ts.map +1 -1
- package/client.js +17 -0
- package/client.js.map +1 -1
- package/client.mjs +17 -0
- package/client.mjs.map +1 -1
- package/internal/types.d.mts +6 -6
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +6 -6
- package/internal/types.d.ts.map +1 -1
- package/lib/manifest/_helpers.d.mts +91 -0
- package/lib/manifest/_helpers.d.mts.map +1 -0
- package/lib/manifest/_helpers.d.ts +91 -0
- package/lib/manifest/_helpers.d.ts.map +1 -0
- package/lib/manifest/_helpers.js +65 -0
- package/lib/manifest/_helpers.js.map +1 -0
- package/lib/manifest/_helpers.mjs +61 -0
- package/lib/manifest/_helpers.mjs.map +1 -0
- package/lib/manifest/app.d.mts +45 -0
- package/lib/manifest/app.d.mts.map +1 -0
- package/lib/manifest/app.d.ts +45 -0
- package/lib/manifest/app.d.ts.map +1 -0
- package/lib/manifest/app.js +74 -0
- package/lib/manifest/app.js.map +1 -0
- package/lib/manifest/app.mjs +70 -0
- package/lib/manifest/app.mjs.map +1 -0
- package/lib/manifest/category.d.mts +23 -0
- package/lib/manifest/category.d.mts.map +1 -0
- package/lib/manifest/category.d.ts +23 -0
- package/lib/manifest/category.d.ts.map +1 -0
- package/lib/manifest/category.js +37 -0
- package/lib/manifest/category.js.map +1 -0
- package/lib/manifest/category.mjs +33 -0
- package/lib/manifest/category.mjs.map +1 -0
- package/lib/manifest/custom-object-field-section.d.mts +21 -0
- package/lib/manifest/custom-object-field-section.d.mts.map +1 -0
- package/lib/manifest/custom-object-field-section.d.ts +21 -0
- package/lib/manifest/custom-object-field-section.d.ts.map +1 -0
- package/lib/manifest/custom-object-field-section.js +42 -0
- package/lib/manifest/custom-object-field-section.js.map +1 -0
- package/lib/manifest/custom-object-field-section.mjs +38 -0
- package/lib/manifest/custom-object-field-section.mjs.map +1 -0
- package/lib/manifest/custom-object-page-layout.d.mts +158 -0
- package/lib/manifest/custom-object-page-layout.d.mts.map +1 -0
- package/lib/manifest/custom-object-page-layout.d.ts +158 -0
- package/lib/manifest/custom-object-page-layout.d.ts.map +1 -0
- package/lib/manifest/custom-object-page-layout.js +112 -0
- package/lib/manifest/custom-object-page-layout.js.map +1 -0
- package/lib/manifest/custom-object-page-layout.mjs +108 -0
- package/lib/manifest/custom-object-page-layout.mjs.map +1 -0
- package/lib/manifest/custom-object.d.mts +52 -0
- package/lib/manifest/custom-object.d.mts.map +1 -0
- package/lib/manifest/custom-object.d.ts +52 -0
- package/lib/manifest/custom-object.d.ts.map +1 -0
- package/lib/manifest/custom-object.js +219 -0
- package/lib/manifest/custom-object.js.map +1 -0
- package/lib/manifest/custom-object.mjs +215 -0
- package/lib/manifest/custom-object.mjs.map +1 -0
- package/lib/manifest/field.d.mts +276 -0
- package/lib/manifest/field.d.mts.map +1 -0
- package/lib/manifest/field.d.ts +276 -0
- package/lib/manifest/field.d.ts.map +1 -0
- package/lib/manifest/field.js +418 -0
- package/lib/manifest/field.js.map +1 -0
- package/lib/manifest/field.mjs +395 -0
- package/lib/manifest/field.mjs.map +1 -0
- package/lib/manifest/index.d.mts +15 -0
- package/lib/manifest/index.d.mts.map +1 -0
- package/lib/manifest/index.d.ts +15 -0
- package/lib/manifest/index.d.ts.map +1 -0
- package/lib/manifest/index.js +53 -0
- package/lib/manifest/index.js.map +1 -0
- package/lib/manifest/index.mjs +18 -0
- package/lib/manifest/index.mjs.map +1 -0
- package/lib/manifest/list-view.d.mts +47 -0
- package/lib/manifest/list-view.d.mts.map +1 -0
- package/lib/manifest/list-view.d.ts +47 -0
- package/lib/manifest/list-view.d.ts.map +1 -0
- package/lib/manifest/list-view.js +73 -0
- package/lib/manifest/list-view.js.map +1 -0
- package/lib/manifest/list-view.mjs +69 -0
- package/lib/manifest/list-view.mjs.map +1 -0
- package/lib/manifest/manifest-builder.d.mts +44 -0
- package/lib/manifest/manifest-builder.d.mts.map +1 -0
- package/lib/manifest/manifest-builder.d.ts +44 -0
- package/lib/manifest/manifest-builder.d.ts.map +1 -0
- package/lib/manifest/manifest-builder.js +69 -0
- package/lib/manifest/manifest-builder.js.map +1 -0
- package/lib/manifest/manifest-builder.mjs +65 -0
- package/lib/manifest/manifest-builder.mjs.map +1 -0
- package/lib/manifest/manifest-function.d.mts +39 -0
- package/lib/manifest/manifest-function.d.mts.map +1 -0
- package/lib/manifest/manifest-function.d.ts +39 -0
- package/lib/manifest/manifest-function.d.ts.map +1 -0
- package/lib/manifest/manifest-function.js +56 -0
- package/lib/manifest/manifest-function.js.map +1 -0
- package/lib/manifest/manifest-function.mjs +52 -0
- package/lib/manifest/manifest-function.mjs.map +1 -0
- package/lib/manifest/rule.d.mts +50 -0
- package/lib/manifest/rule.d.mts.map +1 -0
- package/lib/manifest/rule.d.ts +50 -0
- package/lib/manifest/rule.d.ts.map +1 -0
- package/lib/manifest/rule.js +84 -0
- package/lib/manifest/rule.js.map +1 -0
- package/lib/manifest/rule.mjs +80 -0
- package/lib/manifest/rule.mjs.map +1 -0
- package/lib/manifest/sdui-page.d.mts +33 -0
- package/lib/manifest/sdui-page.d.mts.map +1 -0
- package/lib/manifest/sdui-page.d.ts +33 -0
- package/lib/manifest/sdui-page.d.ts.map +1 -0
- package/lib/manifest/sdui-page.js +52 -0
- package/lib/manifest/sdui-page.js.map +1 -0
- package/lib/manifest/sdui-page.mjs +48 -0
- package/lib/manifest/sdui-page.mjs.map +1 -0
- package/lib/manifest/validation.d.mts +41 -0
- package/lib/manifest/validation.d.mts.map +1 -0
- package/lib/manifest/validation.d.ts +41 -0
- package/lib/manifest/validation.d.ts.map +1 -0
- package/lib/manifest/validation.js +57 -0
- package/lib/manifest/validation.js.map +1 -0
- package/lib/manifest/validation.mjs +53 -0
- package/lib/manifest/validation.mjs.map +1 -0
- package/package.json +11 -1
- package/resources/draft-hires.d.mts +22 -0
- package/resources/draft-hires.d.mts.map +1 -1
- package/resources/draft-hires.d.ts +22 -0
- package/resources/draft-hires.d.ts.map +1 -1
- package/resources/earnings-inputs.d.mts +104 -1
- package/resources/earnings-inputs.d.mts.map +1 -1
- package/resources/earnings-inputs.d.ts +104 -1
- package/resources/earnings-inputs.d.ts.map +1 -1
- package/resources/earnings-inputs.js +17 -0
- package/resources/earnings-inputs.js.map +1 -1
- package/resources/earnings-inputs.mjs +17 -0
- package/resources/earnings-inputs.mjs.map +1 -1
- package/resources/files.d.mts +149 -0
- package/resources/files.d.mts.map +1 -0
- package/resources/files.d.ts +149 -0
- package/resources/files.d.ts.map +1 -0
- package/resources/files.js +25 -0
- package/resources/files.js.map +1 -0
- package/resources/files.mjs +21 -0
- package/resources/files.mjs.map +1 -0
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/object-categories.d.mts +1 -1
- package/resources/object-categories.d.ts +1 -1
- package/resources/object-categories.js +1 -1
- package/resources/object-categories.mjs +1 -1
- package/resources/report-runs.d.mts +11 -11
- package/resources/report-runs.d.ts +11 -11
- package/resources/workflow-action-executions.d.mts +17 -2
- package/resources/workflow-action-executions.d.mts.map +1 -1
- package/resources/workflow-action-executions.d.ts +17 -2
- package/resources/workflow-action-executions.d.ts.map +1 -1
- package/src/client.ts +29 -0
- package/src/internal/types.ts +6 -8
- package/src/lib/manifest/_helpers.ts +164 -0
- package/src/lib/manifest/app.ts +108 -0
- package/src/lib/manifest/category.ts +51 -0
- package/src/lib/manifest/custom-object-field-section.ts +54 -0
- package/src/lib/manifest/custom-object-page-layout.ts +292 -0
- package/src/lib/manifest/custom-object.ts +269 -0
- package/src/lib/manifest/field.ts +632 -0
- package/src/lib/manifest/index.ts +114 -0
- package/src/lib/manifest/list-view.ts +103 -0
- package/src/lib/manifest/manifest-builder.ts +97 -0
- package/src/lib/manifest/manifest-function.ts +81 -0
- package/src/lib/manifest/rule.ts +125 -0
- package/src/lib/manifest/sdui-page.ts +72 -0
- package/src/lib/manifest/validation.ts +87 -0
- package/src/resources/draft-hires.ts +26 -0
- package/src/resources/earnings-inputs.ts +140 -0
- package/src/resources/files.ts +186 -0
- package/src/resources/index.ts +3 -0
- package/src/resources/object-categories.ts +1 -1
- package/src/resources/report-runs.ts +32 -32
- package/src/resources/workflow-action-executions.ts +22 -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
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The contents of this file were inserted manually and are not generated by Stainless.
|
|
3
|
+
*
|
|
4
|
+
* Custom function definitions (TypeScript handler code).
|
|
5
|
+
* Backend schema: FUNCTION (v2)
|
|
6
|
+
*
|
|
7
|
+
* Named ManifestFunction to avoid collision with the JavaScript built-in Function.
|
|
8
|
+
* Re-exported as both ManifestFunction and Function from the barrel.
|
|
9
|
+
*/
|
|
10
|
+
export class ManifestFunction {
|
|
11
|
+
/** Build a new function and auto-register with `scope`; `runtime` is merged into `deploymentOptions` if set. */
|
|
12
|
+
constructor(scope, props) {
|
|
13
|
+
this._apiName = props.apiName;
|
|
14
|
+
this._name = props.name;
|
|
15
|
+
this._code = props.code ?? '';
|
|
16
|
+
this._description = props.description ?? '';
|
|
17
|
+
this._dependencies = props.dependencies;
|
|
18
|
+
this._deploymentOptions = props.deploymentOptions;
|
|
19
|
+
if (props.runtime) {
|
|
20
|
+
this._deploymentOptions = { ...(this._deploymentOptions ?? {}), runtime: props.runtime };
|
|
21
|
+
}
|
|
22
|
+
this._allowedDomains = props.allowedDomains;
|
|
23
|
+
this._isAsync = props.isAsync ?? false;
|
|
24
|
+
scope._register(this);
|
|
25
|
+
}
|
|
26
|
+
/** Backend api_name for this function. */
|
|
27
|
+
getApiName() {
|
|
28
|
+
return this._apiName;
|
|
29
|
+
}
|
|
30
|
+
/** Serialize to the backend `FUNCTION` wire shape; empty fields are omitted. */
|
|
31
|
+
toDict() {
|
|
32
|
+
const component = {
|
|
33
|
+
type: 'FUNCTION',
|
|
34
|
+
name: this._name,
|
|
35
|
+
api_name: this._apiName,
|
|
36
|
+
};
|
|
37
|
+
if (this._description)
|
|
38
|
+
component['description'] = this._description;
|
|
39
|
+
if (this._code)
|
|
40
|
+
component['code_draft'] = this._code;
|
|
41
|
+
if (this._dependencies != null)
|
|
42
|
+
component['dependencies'] = this._dependencies;
|
|
43
|
+
if (this._deploymentOptions != null)
|
|
44
|
+
component['deployment_options'] = this._deploymentOptions;
|
|
45
|
+
if (this._allowedDomains != null)
|
|
46
|
+
component['allowed_domains'] = this._allowedDomains;
|
|
47
|
+
if (this._isAsync)
|
|
48
|
+
component['is_async'] = true;
|
|
49
|
+
return component;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=manifest-function.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest-function.mjs","sourceRoot":"","sources":["../../src/lib/manifest/manifest-function.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA0BH,MAAM,OAAO,gBAAgB;IAU3B,gHAAgH;IAChH,YAAY,KAAoB,EAAE,KAA4B;QAC5D,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC;QAC9B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,WAAW,IAAI,EAAE,CAAC;QAC5C,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,YAAY,CAAC;QACxC,IAAI,CAAC,kBAAkB,GAA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S,CAAC;IACnB,CAAC;CACF"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type TriggerType, type UpdateTriggerType } from "./_helpers.mjs";
|
|
2
|
+
import type { CustomObject } from "./custom-object.mjs";
|
|
3
|
+
import type { Field } from "./field.mjs";
|
|
4
|
+
export interface RuleAction {
|
|
5
|
+
/** Target field — live `Field` ref. */
|
|
6
|
+
targetField: Field;
|
|
7
|
+
/**
|
|
8
|
+
* Set the target to a fixed value. Mutually exclusive with `rqlFormula`.
|
|
9
|
+
* For `SELECT` / `RADIO` targets, the wire payload uses a list (multichoice
|
|
10
|
+
* shape); pass a string/one value or an array — both are normalized to an array.
|
|
11
|
+
*/
|
|
12
|
+
fixedValue?: any;
|
|
13
|
+
/** Set the target to the result of an RQL formula. */
|
|
14
|
+
rqlFormula?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface RuleProps {
|
|
17
|
+
/** Required. Display name of the flow. */
|
|
18
|
+
flowName: string;
|
|
19
|
+
/** Required. When the flow fires. */
|
|
20
|
+
triggerType: TriggerType;
|
|
21
|
+
/** Identity override. Override the flow identifier. @default generateId('flow') */
|
|
22
|
+
flowId?: string;
|
|
23
|
+
/** Optional. RQL formula guard — fires only when truthy. @default null */
|
|
24
|
+
rqlCondition?: string;
|
|
25
|
+
/** Conditional. Update-trigger condition type. @default 'MEETS_CONDITION_AFTER_ONLY' */
|
|
26
|
+
updateTriggerType?: UpdateTriggerType;
|
|
27
|
+
/** Optional. Internal description. @default null */
|
|
28
|
+
description?: string;
|
|
29
|
+
/** Optional. Actions to run when the flow fires. @default [] */
|
|
30
|
+
actions?: RuleAction[];
|
|
31
|
+
}
|
|
32
|
+
export declare class Rule {
|
|
33
|
+
private readonly _flowId;
|
|
34
|
+
private readonly _customObjectApiName;
|
|
35
|
+
private readonly _flowName;
|
|
36
|
+
private readonly _triggerType;
|
|
37
|
+
private readonly _rqlCondition;
|
|
38
|
+
private readonly _updateTriggerType;
|
|
39
|
+
private readonly _description;
|
|
40
|
+
private readonly _actions;
|
|
41
|
+
/** Build a new rule and auto-register with the CO's scope; validates `triggerType`. */
|
|
42
|
+
constructor(customObject: CustomObject, props: RuleProps);
|
|
43
|
+
/** Backend flow_id used as this rule's identifier. */
|
|
44
|
+
getFlowId(): string;
|
|
45
|
+
/** api_name of the CustomObject this rule lives on. */
|
|
46
|
+
getCustomObjectApiName(): string;
|
|
47
|
+
/** Serialize to the backend `CUSTOM_OBJECT_RECORD_TRIGGERED_FLOW` wire shape. */
|
|
48
|
+
toDict(): Record<string, any>;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=rule.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/rule.ts"],"names":[],"mappings":"OAWO,EAAc,KAAK,WAAW,EAAE,KAAK,iBAAiB,EAAE;OACxD,KAAK,EAAE,YAAY,EAAE;OACrB,KAAK,EAAE,KAAK,EAAE;AAIrB,MAAM,WAAW,UAAU;IACzB,uCAAuC;IACvC,WAAW,EAAE,KAAK,CAAC;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,SAAS;IACxB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,WAAW,EAAE,WAAW,CAAC;IACzB,mFAAmF;IACnF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;CACxB;AA0BD,qBAAa,IAAI;IACf,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAS;IAC9C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAc;IAC3C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAqB;IACnD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAgC;IACnE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAqB;IAClD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAe;IAExC,uFAAuF;gBAC3E,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS;IAiBxD,sDAAsD;IACtD,SAAS,IAAI,MAAM;IAInB,uDAAuD;IACvD,sBAAsB,IAAI,MAAM;IAIhC,iFAAiF;IACjF,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAc9B"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type TriggerType, type UpdateTriggerType } from "./_helpers.js";
|
|
2
|
+
import type { CustomObject } from "./custom-object.js";
|
|
3
|
+
import type { Field } from "./field.js";
|
|
4
|
+
export interface RuleAction {
|
|
5
|
+
/** Target field — live `Field` ref. */
|
|
6
|
+
targetField: Field;
|
|
7
|
+
/**
|
|
8
|
+
* Set the target to a fixed value. Mutually exclusive with `rqlFormula`.
|
|
9
|
+
* For `SELECT` / `RADIO` targets, the wire payload uses a list (multichoice
|
|
10
|
+
* shape); pass a string/one value or an array — both are normalized to an array.
|
|
11
|
+
*/
|
|
12
|
+
fixedValue?: any;
|
|
13
|
+
/** Set the target to the result of an RQL formula. */
|
|
14
|
+
rqlFormula?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface RuleProps {
|
|
17
|
+
/** Required. Display name of the flow. */
|
|
18
|
+
flowName: string;
|
|
19
|
+
/** Required. When the flow fires. */
|
|
20
|
+
triggerType: TriggerType;
|
|
21
|
+
/** Identity override. Override the flow identifier. @default generateId('flow') */
|
|
22
|
+
flowId?: string;
|
|
23
|
+
/** Optional. RQL formula guard — fires only when truthy. @default null */
|
|
24
|
+
rqlCondition?: string;
|
|
25
|
+
/** Conditional. Update-trigger condition type. @default 'MEETS_CONDITION_AFTER_ONLY' */
|
|
26
|
+
updateTriggerType?: UpdateTriggerType;
|
|
27
|
+
/** Optional. Internal description. @default null */
|
|
28
|
+
description?: string;
|
|
29
|
+
/** Optional. Actions to run when the flow fires. @default [] */
|
|
30
|
+
actions?: RuleAction[];
|
|
31
|
+
}
|
|
32
|
+
export declare class Rule {
|
|
33
|
+
private readonly _flowId;
|
|
34
|
+
private readonly _customObjectApiName;
|
|
35
|
+
private readonly _flowName;
|
|
36
|
+
private readonly _triggerType;
|
|
37
|
+
private readonly _rqlCondition;
|
|
38
|
+
private readonly _updateTriggerType;
|
|
39
|
+
private readonly _description;
|
|
40
|
+
private readonly _actions;
|
|
41
|
+
/** Build a new rule and auto-register with the CO's scope; validates `triggerType`. */
|
|
42
|
+
constructor(customObject: CustomObject, props: RuleProps);
|
|
43
|
+
/** Backend flow_id used as this rule's identifier. */
|
|
44
|
+
getFlowId(): string;
|
|
45
|
+
/** api_name of the CustomObject this rule lives on. */
|
|
46
|
+
getCustomObjectApiName(): string;
|
|
47
|
+
/** Serialize to the backend `CUSTOM_OBJECT_RECORD_TRIGGERED_FLOW` wire shape. */
|
|
48
|
+
toDict(): Record<string, any>;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=rule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/rule.ts"],"names":[],"mappings":"OAWO,EAAc,KAAK,WAAW,EAAE,KAAK,iBAAiB,EAAE;OACxD,KAAK,EAAE,YAAY,EAAE;OACrB,KAAK,EAAE,KAAK,EAAE;AAIrB,MAAM,WAAW,UAAU;IACzB,uCAAuC;IACvC,WAAW,EAAE,KAAK,CAAC;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,SAAS;IACxB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,WAAW,EAAE,WAAW,CAAC;IACzB,mFAAmF;IACnF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;CACxB;AA0BD,qBAAa,IAAI;IACf,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAS;IAC9C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAc;IAC3C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAqB;IACnD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAgC;IACnE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAqB;IAClD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAe;IAExC,uFAAuF;gBAC3E,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS;IAiBxD,sDAAsD;IACtD,SAAS,IAAI,MAAM;IAInB,uDAAuD;IACvD,sBAAsB,IAAI,MAAM;IAIhC,iFAAiF;IACjF,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAc9B"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* The contents of this file were inserted manually and are not generated by Stainless.
|
|
4
|
+
*
|
|
5
|
+
* Record-triggered flows (automation rules) for custom objects.
|
|
6
|
+
* Backend schema: CUSTOM_OBJECT_RECORD_TRIGGERED_FLOW (v2)
|
|
7
|
+
*
|
|
8
|
+
* Construction is CDK-style: `new Rule(customObject, props)` — the CO is
|
|
9
|
+
* the first positional arg, and the rule auto-registers with the manifest
|
|
10
|
+
* via the CO's scope chain.
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.Rule = void 0;
|
|
14
|
+
const _helpers_1 = require("./_helpers.js");
|
|
15
|
+
const VALID_TRIGGERS = ['CREATE', 'UPDATE', 'CREATE_OR_UPDATE'];
|
|
16
|
+
/** SELECT / RADIO rule actions use list `fixed_value` (Rippling rule builder). */
|
|
17
|
+
function fixedValueToWire(targetField, value) {
|
|
18
|
+
const ft = targetField.getFieldType();
|
|
19
|
+
if (ft !== 'SELECT' && ft !== 'RADIO') {
|
|
20
|
+
return value;
|
|
21
|
+
}
|
|
22
|
+
if (Array.isArray(value)) {
|
|
23
|
+
return value;
|
|
24
|
+
}
|
|
25
|
+
return [value];
|
|
26
|
+
}
|
|
27
|
+
function actionToDict(action) {
|
|
28
|
+
const out = {
|
|
29
|
+
target_field: action.targetField.getApiName(),
|
|
30
|
+
};
|
|
31
|
+
if (action.fixedValue != null) {
|
|
32
|
+
out['fixed_value'] = fixedValueToWire(action.targetField, action.fixedValue);
|
|
33
|
+
}
|
|
34
|
+
else if (action.rqlFormula != null) {
|
|
35
|
+
out['rql_formula'] = action.rqlFormula;
|
|
36
|
+
}
|
|
37
|
+
return out;
|
|
38
|
+
}
|
|
39
|
+
class Rule {
|
|
40
|
+
/** Build a new rule and auto-register with the CO's scope; validates `triggerType`. */
|
|
41
|
+
constructor(customObject, props) {
|
|
42
|
+
if (!VALID_TRIGGERS.includes(props.triggerType)) {
|
|
43
|
+
throw new Error(`Invalid trigger_type: ${props.triggerType}. Must be one of: ${VALID_TRIGGERS.join(', ')}`);
|
|
44
|
+
}
|
|
45
|
+
this._flowId = props.flowId ?? (0, _helpers_1.generateId)('flow');
|
|
46
|
+
this._customObjectApiName = customObject.getApiName();
|
|
47
|
+
this._flowName = props.flowName;
|
|
48
|
+
this._triggerType = props.triggerType;
|
|
49
|
+
this._rqlCondition = props.rqlCondition;
|
|
50
|
+
this._updateTriggerType = props.updateTriggerType;
|
|
51
|
+
this._description = props.description;
|
|
52
|
+
this._actions = [...(props.actions ?? [])];
|
|
53
|
+
customObject._register(this);
|
|
54
|
+
}
|
|
55
|
+
/** Backend flow_id used as this rule's identifier. */
|
|
56
|
+
getFlowId() {
|
|
57
|
+
return this._flowId;
|
|
58
|
+
}
|
|
59
|
+
/** api_name of the CustomObject this rule lives on. */
|
|
60
|
+
getCustomObjectApiName() {
|
|
61
|
+
return this._customObjectApiName;
|
|
62
|
+
}
|
|
63
|
+
/** Serialize to the backend `CUSTOM_OBJECT_RECORD_TRIGGERED_FLOW` wire shape. */
|
|
64
|
+
toDict() {
|
|
65
|
+
const component = {
|
|
66
|
+
type: 'CUSTOM_OBJECT_RECORD_TRIGGERED_FLOW',
|
|
67
|
+
model_rql_name: this._customObjectApiName,
|
|
68
|
+
flow_id: this._flowId,
|
|
69
|
+
flow_name: this._flowName,
|
|
70
|
+
trigger_type: this._triggerType,
|
|
71
|
+
};
|
|
72
|
+
if (this._description != null)
|
|
73
|
+
component['description'] = this._description;
|
|
74
|
+
if (this._updateTriggerType != null)
|
|
75
|
+
component['update_trigger_type'] = this._updateTriggerType;
|
|
76
|
+
if (this._rqlCondition != null)
|
|
77
|
+
component['rql_condition'] = this._rqlCondition;
|
|
78
|
+
if (this._actions.length > 0)
|
|
79
|
+
component['actions'] = this._actions.map(actionToDict);
|
|
80
|
+
return component;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
exports.Rule = Rule;
|
|
84
|
+
//# sourceMappingURL=rule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule.js","sourceRoot":"","sources":["../../src/lib/manifest/rule.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;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AAa,CAAC;QAChF,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC;YAAE,SAAS,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACrF,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AArDD,oBAqDC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The contents of this file were inserted manually and are not generated by Stainless.
|
|
3
|
+
*
|
|
4
|
+
* Record-triggered flows (automation rules) for custom objects.
|
|
5
|
+
* Backend schema: CUSTOM_OBJECT_RECORD_TRIGGERED_FLOW (v2)
|
|
6
|
+
*
|
|
7
|
+
* Construction is CDK-style: `new Rule(customObject, props)` — the CO is
|
|
8
|
+
* the first positional arg, and the rule auto-registers with the manifest
|
|
9
|
+
* via the CO's scope chain.
|
|
10
|
+
*/
|
|
11
|
+
import { generateId } from "./_helpers.mjs";
|
|
12
|
+
const VALID_TRIGGERS = ['CREATE', 'UPDATE', 'CREATE_OR_UPDATE'];
|
|
13
|
+
/** SELECT / RADIO rule actions use list `fixed_value` (Rippling rule builder). */
|
|
14
|
+
function fixedValueToWire(targetField, value) {
|
|
15
|
+
const ft = targetField.getFieldType();
|
|
16
|
+
if (ft !== 'SELECT' && ft !== 'RADIO') {
|
|
17
|
+
return value;
|
|
18
|
+
}
|
|
19
|
+
if (Array.isArray(value)) {
|
|
20
|
+
return value;
|
|
21
|
+
}
|
|
22
|
+
return [value];
|
|
23
|
+
}
|
|
24
|
+
function actionToDict(action) {
|
|
25
|
+
const out = {
|
|
26
|
+
target_field: action.targetField.getApiName(),
|
|
27
|
+
};
|
|
28
|
+
if (action.fixedValue != null) {
|
|
29
|
+
out['fixed_value'] = fixedValueToWire(action.targetField, action.fixedValue);
|
|
30
|
+
}
|
|
31
|
+
else if (action.rqlFormula != null) {
|
|
32
|
+
out['rql_formula'] = action.rqlFormula;
|
|
33
|
+
}
|
|
34
|
+
return out;
|
|
35
|
+
}
|
|
36
|
+
export class Rule {
|
|
37
|
+
/** Build a new rule and auto-register with the CO's scope; validates `triggerType`. */
|
|
38
|
+
constructor(customObject, props) {
|
|
39
|
+
if (!VALID_TRIGGERS.includes(props.triggerType)) {
|
|
40
|
+
throw new Error(`Invalid trigger_type: ${props.triggerType}. Must be one of: ${VALID_TRIGGERS.join(', ')}`);
|
|
41
|
+
}
|
|
42
|
+
this._flowId = props.flowId ?? generateId('flow');
|
|
43
|
+
this._customObjectApiName = customObject.getApiName();
|
|
44
|
+
this._flowName = props.flowName;
|
|
45
|
+
this._triggerType = props.triggerType;
|
|
46
|
+
this._rqlCondition = props.rqlCondition;
|
|
47
|
+
this._updateTriggerType = props.updateTriggerType;
|
|
48
|
+
this._description = props.description;
|
|
49
|
+
this._actions = [...(props.actions ?? [])];
|
|
50
|
+
customObject._register(this);
|
|
51
|
+
}
|
|
52
|
+
/** Backend flow_id used as this rule's identifier. */
|
|
53
|
+
getFlowId() {
|
|
54
|
+
return this._flowId;
|
|
55
|
+
}
|
|
56
|
+
/** api_name of the CustomObject this rule lives on. */
|
|
57
|
+
getCustomObjectApiName() {
|
|
58
|
+
return this._customObjectApiName;
|
|
59
|
+
}
|
|
60
|
+
/** Serialize to the backend `CUSTOM_OBJECT_RECORD_TRIGGERED_FLOW` wire shape. */
|
|
61
|
+
toDict() {
|
|
62
|
+
const component = {
|
|
63
|
+
type: 'CUSTOM_OBJECT_RECORD_TRIGGERED_FLOW',
|
|
64
|
+
model_rql_name: this._customObjectApiName,
|
|
65
|
+
flow_id: this._flowId,
|
|
66
|
+
flow_name: this._flowName,
|
|
67
|
+
trigger_type: this._triggerType,
|
|
68
|
+
};
|
|
69
|
+
if (this._description != null)
|
|
70
|
+
component['description'] = this._description;
|
|
71
|
+
if (this._updateTriggerType != null)
|
|
72
|
+
component['update_trigger_type'] = this._updateTriggerType;
|
|
73
|
+
if (this._rqlCondition != null)
|
|
74
|
+
component['rql_condition'] = this._rqlCondition;
|
|
75
|
+
if (this._actions.length > 0)
|
|
76
|
+
component['actions'] = this._actions.map(actionToDict);
|
|
77
|
+
return component;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=rule.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule.mjs","sourceRoot":"","sources":["../../src/lib/manifest/rule.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;OAEI,EAAE,UAAU,EAA4C;AAI/D,MAAM,cAAc,GAAkB,CAAC,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,CAAC,CAAC;AAgC/E,kFAAkF;AAClF,SAAS,gBAAgB,CAAC,WAAkB,EAAE,KAAU;IACtD,MAAM,EAAE,GAAG,WAAW,CAAC,YAAY,EAAE,CAAC;IACtC,IAAI,EAAE,KAAK,QAAQ,IAAI,EAAE,KAAK,OAAO,EAAE,CAAC;QACtC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,CAAC,KAAK,CAAC,CAAC;AACjB,CAAC;AAED,SAAS,YAAY,CAAC,MAAkB;IACtC,MAAM,GAAG,GAAwB;QAC/B,YAAY,EAAE,MAAM,CAAC,WAAW,CAAC,UAAU,EAAE;KAC9C,CAAC;IACF,IAAI,MAAM,CAAC,UAAU,IAAI,IAAI,EAAE,CAAC;QAC9B,GAAG,CAAC,aAAa,CAAC,GAAG,gBAAgB,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;IAC/E,CAAC;SAAM,IAAI,MAAM,CAAC,UAAU,IAAI,IAAI,EAAE,CAAC;QACrC,GAAG,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC;IACzC,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,OAAO,IAAI;IAUf,uFAAuF;I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C,YAAY,IAAI,IAAI;YAAE,SAAS,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC;QAC5E,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI;YAAE,SAAS,CAAC,qBAAqB,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC;QAChG,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI;YAAE,SAAS,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC;QAChF,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC;YAAE,SAAS,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACrF,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ManifestFunction } from "./manifest-function.mjs";
|
|
2
|
+
import type { ManifestScope } from "./manifest-builder.mjs";
|
|
3
|
+
export interface SduiPageProps {
|
|
4
|
+
/** Required. Unique ID for this page within the package. */
|
|
5
|
+
sduiPageId: string;
|
|
6
|
+
/** Required. Display name shown as the tab label. */
|
|
7
|
+
name: string;
|
|
8
|
+
/**
|
|
9
|
+
* Required. Backing function. Pass a live `ManifestFunction` ref (the SDK
|
|
10
|
+
* reads its api_name) or a raw api_name string for functions authored
|
|
11
|
+
* outside this manifest.
|
|
12
|
+
*/
|
|
13
|
+
function: ManifestFunction | string;
|
|
14
|
+
/** Optional. Human-readable description. */
|
|
15
|
+
description?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare class SduiPage {
|
|
18
|
+
private readonly _sduiPageId;
|
|
19
|
+
private readonly _name;
|
|
20
|
+
private readonly _functionApiName;
|
|
21
|
+
private readonly _description;
|
|
22
|
+
/** Build a new SDUI page and auto-register with `scope`; resolves the function api_name eagerly. */
|
|
23
|
+
constructor(scope: ManifestScope, props: SduiPageProps);
|
|
24
|
+
/** Identifier slug for this page within the package. */
|
|
25
|
+
getSduiPageId(): string;
|
|
26
|
+
/** Display name (tab label). */
|
|
27
|
+
getName(): string;
|
|
28
|
+
/** api_name of the function backing this page. */
|
|
29
|
+
getFunctionApiName(): string;
|
|
30
|
+
/** Serialize to the backend `SDUI_PAGE` wire shape. */
|
|
31
|
+
toDict(): Record<string, any>;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=sdui-page.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdui-page.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/sdui-page.ts"],"names":[],"mappings":"OAUO,KAAK,EAAE,gBAAgB,EAAE;OACzB,KAAK,EAAE,aAAa,EAAE;AAE7B,MAAM,WAAW,aAAa;IAC5B,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,QAAQ,EAAE,gBAAgB,GAAG,MAAM,CAAC;IACpC,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;IAC1C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IAEtC,oGAAoG;gBACxF,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa;IAWtD,wDAAwD;IACxD,aAAa,IAAI,MAAM;IAIvB,gCAAgC;IAChC,OAAO,IAAI,MAAM;IAIjB,kDAAkD;IAClD,kBAAkB,IAAI,MAAM;IAI5B,uDAAuD;IACvD,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAS9B"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ManifestFunction } from "./manifest-function.js";
|
|
2
|
+
import type { ManifestScope } from "./manifest-builder.js";
|
|
3
|
+
export interface SduiPageProps {
|
|
4
|
+
/** Required. Unique ID for this page within the package. */
|
|
5
|
+
sduiPageId: string;
|
|
6
|
+
/** Required. Display name shown as the tab label. */
|
|
7
|
+
name: string;
|
|
8
|
+
/**
|
|
9
|
+
* Required. Backing function. Pass a live `ManifestFunction` ref (the SDK
|
|
10
|
+
* reads its api_name) or a raw api_name string for functions authored
|
|
11
|
+
* outside this manifest.
|
|
12
|
+
*/
|
|
13
|
+
function: ManifestFunction | string;
|
|
14
|
+
/** Optional. Human-readable description. */
|
|
15
|
+
description?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare class SduiPage {
|
|
18
|
+
private readonly _sduiPageId;
|
|
19
|
+
private readonly _name;
|
|
20
|
+
private readonly _functionApiName;
|
|
21
|
+
private readonly _description;
|
|
22
|
+
/** Build a new SDUI page and auto-register with `scope`; resolves the function api_name eagerly. */
|
|
23
|
+
constructor(scope: ManifestScope, props: SduiPageProps);
|
|
24
|
+
/** Identifier slug for this page within the package. */
|
|
25
|
+
getSduiPageId(): string;
|
|
26
|
+
/** Display name (tab label). */
|
|
27
|
+
getName(): string;
|
|
28
|
+
/** api_name of the function backing this page. */
|
|
29
|
+
getFunctionApiName(): string;
|
|
30
|
+
/** Serialize to the backend `SDUI_PAGE` wire shape. */
|
|
31
|
+
toDict(): Record<string, any>;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=sdui-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdui-page.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/sdui-page.ts"],"names":[],"mappings":"OAUO,KAAK,EAAE,gBAAgB,EAAE;OACzB,KAAK,EAAE,aAAa,EAAE;AAE7B,MAAM,WAAW,aAAa;IAC5B,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,QAAQ,EAAE,gBAAgB,GAAG,MAAM,CAAC;IACpC,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;IAC1C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IAEtC,oGAAoG;gBACxF,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa;IAWtD,wDAAwD;IACxD,aAAa,IAAI,MAAM;IAIvB,gCAAgC;IAChC,OAAO,IAAI,MAAM;IAIjB,kDAAkD;IAClD,kBAAkB,IAAI,MAAM;IAI5B,uDAAuD;IACvD,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAS9B"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* The contents of this file were inserted manually and are not generated by Stainless.
|
|
4
|
+
*
|
|
5
|
+
* SDUI page definitions for Unity packages.
|
|
6
|
+
* Backend schema: SDUI_PAGE (v2) — `SDUIPageConfig` in
|
|
7
|
+
* `app/hub_platform/sdui/unity_package/sdui_page_interface.py`.
|
|
8
|
+
*
|
|
9
|
+
* Dependency order: FUNCTION → SDUI_PAGE → CUSTOM_APP.
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SduiPage = void 0;
|
|
13
|
+
class SduiPage {
|
|
14
|
+
/** Build a new SDUI page and auto-register with `scope`; resolves the function api_name eagerly. */
|
|
15
|
+
constructor(scope, props) {
|
|
16
|
+
if (!props.sduiPageId)
|
|
17
|
+
throw new Error('sduiPageId is required');
|
|
18
|
+
if (!props.name)
|
|
19
|
+
throw new Error('name is required');
|
|
20
|
+
if (!props.function)
|
|
21
|
+
throw new Error('function is required');
|
|
22
|
+
this._sduiPageId = props.sduiPageId;
|
|
23
|
+
this._name = props.name;
|
|
24
|
+
this._functionApiName = typeof props.function === 'string' ? props.function : props.function.getApiName();
|
|
25
|
+
this._description = props.description ?? '';
|
|
26
|
+
scope._register(this);
|
|
27
|
+
}
|
|
28
|
+
/** Identifier slug for this page within the package. */
|
|
29
|
+
getSduiPageId() {
|
|
30
|
+
return this._sduiPageId;
|
|
31
|
+
}
|
|
32
|
+
/** Display name (tab label). */
|
|
33
|
+
getName() {
|
|
34
|
+
return this._name;
|
|
35
|
+
}
|
|
36
|
+
/** api_name of the function backing this page. */
|
|
37
|
+
getFunctionApiName() {
|
|
38
|
+
return this._functionApiName;
|
|
39
|
+
}
|
|
40
|
+
/** Serialize to the backend `SDUI_PAGE` wire shape. */
|
|
41
|
+
toDict() {
|
|
42
|
+
return {
|
|
43
|
+
type: 'SDUI_PAGE',
|
|
44
|
+
name: this._name,
|
|
45
|
+
sdui_page_id: this._sduiPageId,
|
|
46
|
+
function_api_name: this._functionApiName,
|
|
47
|
+
description: this._description,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.SduiPage = SduiPage;
|
|
52
|
+
//# sourceMappingURL=sdui-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdui-page.js","sourceRoot":"","sources":["../../src/lib/manifest/sdui-page.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAoBH,MAAa,QAAQ;IAMnB,oGAAoG;IACpG,YAAY,KAAoB,EAAE,KAAoB;QACpD,IAAI,CAAC,KAAK,CAAC,UAAU;YAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;QACjE,IAAI,CAAC,KAAK,CAAC,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;QACrD,IAAI,CAAC,KAAK,CAAC,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAC7D,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,UAAU,CAAC;QACpC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,gBAAgB,GAAG,OAAO,KAAK,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;QAC1G,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,WAAW,IAAI,EAAE,CAAC;QAC5C,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAED,wDAAwD;IACxD,aAAa;QACX,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,gCAAgC;IAChC,OAAO;QACL,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,kDAAkD;IAClD,kBAAkB;QAChB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAED,uDAAuD;IACvD,MAAM;QACJ,OAAO;YACL,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,IAAI,CAAC,KAAK;YAChB,YAAY,EAAE,IAAI,CAAC,WAAW;YAC9B,iBAAiB,EAAE,IAAI,CAAC,gBAAgB;YACxC,WAAW,EAAE,IAAI,CAAC,YAAY;SAC/B,CAAC;IACJ,CAAC;CACF;AA3CD,4BA2CC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The contents of this file were inserted manually and are not generated by Stainless.
|
|
3
|
+
*
|
|
4
|
+
* SDUI page definitions for Unity packages.
|
|
5
|
+
* Backend schema: SDUI_PAGE (v2) — `SDUIPageConfig` in
|
|
6
|
+
* `app/hub_platform/sdui/unity_package/sdui_page_interface.py`.
|
|
7
|
+
*
|
|
8
|
+
* Dependency order: FUNCTION → SDUI_PAGE → CUSTOM_APP.
|
|
9
|
+
*/
|
|
10
|
+
export class SduiPage {
|
|
11
|
+
/** Build a new SDUI page and auto-register with `scope`; resolves the function api_name eagerly. */
|
|
12
|
+
constructor(scope, props) {
|
|
13
|
+
if (!props.sduiPageId)
|
|
14
|
+
throw new Error('sduiPageId is required');
|
|
15
|
+
if (!props.name)
|
|
16
|
+
throw new Error('name is required');
|
|
17
|
+
if (!props.function)
|
|
18
|
+
throw new Error('function is required');
|
|
19
|
+
this._sduiPageId = props.sduiPageId;
|
|
20
|
+
this._name = props.name;
|
|
21
|
+
this._functionApiName = typeof props.function === 'string' ? props.function : props.function.getApiName();
|
|
22
|
+
this._description = props.description ?? '';
|
|
23
|
+
scope._register(this);
|
|
24
|
+
}
|
|
25
|
+
/** Identifier slug for this page within the package. */
|
|
26
|
+
getSduiPageId() {
|
|
27
|
+
return this._sduiPageId;
|
|
28
|
+
}
|
|
29
|
+
/** Display name (tab label). */
|
|
30
|
+
getName() {
|
|
31
|
+
return this._name;
|
|
32
|
+
}
|
|
33
|
+
/** api_name of the function backing this page. */
|
|
34
|
+
getFunctionApiName() {
|
|
35
|
+
return this._functionApiName;
|
|
36
|
+
}
|
|
37
|
+
/** Serialize to the backend `SDUI_PAGE` wire shape. */
|
|
38
|
+
toDict() {
|
|
39
|
+
return {
|
|
40
|
+
type: 'SDUI_PAGE',
|
|
41
|
+
name: this._name,
|
|
42
|
+
sdui_page_id: this._sduiPageId,
|
|
43
|
+
function_api_name: this._functionApiName,
|
|
44
|
+
description: this._description,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=sdui-page.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdui-page.mjs","sourceRoot":"","sources":["../../src/lib/manifest/sdui-page.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAoBH,MAAM,OAAO,QAAQ;IAMnB,oGAAoG;IACpG,YAAY,KAAoB,EAAE,KAAoB;QACpD,IAAI,CAAC,KAAK,CAAC,UAAU;YAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;QACjE,IAAI,CAAC,KAAK,CAAC,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;QACrD,IAAI,CAAC,KAAK,CAAC,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAC7D,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,UAAU,CAAC;QACpC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,gBAAgB,GAAG,OAAO,KAAK,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;QAC1G,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,WAAW,IAAI,EAAE,CAAC;QAC5C,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAED,wDAAwD;IACxD,aAAa;QACX,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,gCAAgC;IAChC,OAAO;QACL,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,kDAAkD;IAClD,kBAAkB;QAChB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAED,uDAAuD;IACvD,MAAM;QACJ,OAAO;YACL,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,IAAI,CAAC,KAAK;YAChB,YAAY,EAAE,IAAI,CAAC,WAAW;YAC9B,iBAAiB,EAAE,IAAI,CAAC,gBAAgB;YACxC,WAAW,EAAE,IAAI,CAAC,YAAY;SAC/B,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type ValidationLevel, type ValidationState } from "./_helpers.mjs";
|
|
2
|
+
import type { CustomObject } from "./custom-object.mjs";
|
|
3
|
+
import type { Field } from "./field.mjs";
|
|
4
|
+
export interface ValidationProps {
|
|
5
|
+
/** Required. Display name of the validation rule. */
|
|
6
|
+
displayName: string;
|
|
7
|
+
/** Required. RQL formula — returns true when the record is INVALID. */
|
|
8
|
+
rqlFormula: string;
|
|
9
|
+
/** Required. User-facing error message (empty string for no message). */
|
|
10
|
+
errorMessage: string;
|
|
11
|
+
/** Required. Rule state. */
|
|
12
|
+
state: ValidationState;
|
|
13
|
+
/** Required. Rule level. */
|
|
14
|
+
level: ValidationLevel;
|
|
15
|
+
/** Required. Internal description (empty string if unused). */
|
|
16
|
+
ruleDescription: string;
|
|
17
|
+
/** Identity override. Override the rule identifier. @default generateId('rule') */
|
|
18
|
+
ruleId?: string;
|
|
19
|
+
/** Optional. Field reference (typically paired with `level: 'FIELD'`). */
|
|
20
|
+
fieldRef?: Field;
|
|
21
|
+
}
|
|
22
|
+
export declare class Validation {
|
|
23
|
+
private readonly _ruleId;
|
|
24
|
+
private readonly _customObjectApiName;
|
|
25
|
+
private readonly _displayName;
|
|
26
|
+
private readonly _rqlFormula;
|
|
27
|
+
private readonly _errorMessage;
|
|
28
|
+
private readonly _state;
|
|
29
|
+
private readonly _level;
|
|
30
|
+
private readonly _ruleDescription;
|
|
31
|
+
private readonly _fieldRef;
|
|
32
|
+
/** Build a new validation rule and auto-register with the CO's scope. */
|
|
33
|
+
constructor(customObject: CustomObject, props: ValidationProps);
|
|
34
|
+
/** Backend rule_id used as this validation's identifier. */
|
|
35
|
+
getRuleId(): string;
|
|
36
|
+
/** api_name of the CustomObject this validation lives on. */
|
|
37
|
+
getCustomObjectApiName(): string;
|
|
38
|
+
/** Serialize to the backend `CUSTOM_OBJECT_VALIDATION_RULE` wire shape. */
|
|
39
|
+
toDict(): Record<string, any>;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=validation.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/validation.ts"],"names":[],"mappings":"OAYO,EAAc,KAAK,eAAe,EAAE,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./custom-object.js";
|
|
3
|
+
import type { Field } from "./field.js";
|
|
4
|
+
export interface ValidationProps {
|
|
5
|
+
/** Required. Display name of the validation rule. */
|
|
6
|
+
displayName: string;
|
|
7
|
+
/** Required. RQL formula — returns true when the record is INVALID. */
|
|
8
|
+
rqlFormula: string;
|
|
9
|
+
/** Required. User-facing error message (empty string for no message). */
|
|
10
|
+
errorMessage: string;
|
|
11
|
+
/** Required. Rule state. */
|
|
12
|
+
state: ValidationState;
|
|
13
|
+
/** Required. Rule level. */
|
|
14
|
+
level: ValidationLevel;
|
|
15
|
+
/** Required. Internal description (empty string if unused). */
|
|
16
|
+
ruleDescription: string;
|
|
17
|
+
/** Identity override. Override the rule identifier. @default generateId('rule') */
|
|
18
|
+
ruleId?: string;
|
|
19
|
+
/** Optional. Field reference (typically paired with `level: 'FIELD'`). */
|
|
20
|
+
fieldRef?: Field;
|
|
21
|
+
}
|
|
22
|
+
export declare class Validation {
|
|
23
|
+
private readonly _ruleId;
|
|
24
|
+
private readonly _customObjectApiName;
|
|
25
|
+
private readonly _displayName;
|
|
26
|
+
private readonly _rqlFormula;
|
|
27
|
+
private readonly _errorMessage;
|
|
28
|
+
private readonly _state;
|
|
29
|
+
private readonly _level;
|
|
30
|
+
private readonly _ruleDescription;
|
|
31
|
+
private readonly _fieldRef;
|
|
32
|
+
/** Build a new validation rule and auto-register with the CO's scope. */
|
|
33
|
+
constructor(customObject: CustomObject, props: ValidationProps);
|
|
34
|
+
/** Backend rule_id used as this validation's identifier. */
|
|
35
|
+
getRuleId(): string;
|
|
36
|
+
/** api_name of the CustomObject this validation lives on. */
|
|
37
|
+
getCustomObjectApiName(): string;
|
|
38
|
+
/** Serialize to the backend `CUSTOM_OBJECT_VALIDATION_RULE` wire shape. */
|
|
39
|
+
toDict(): Record<string, any>;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot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