@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,395 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Fields for Rippling custom objects (CUSTOM_OBJECT_FIELD v2).
|
|
3
|
+
* Hand-written (not Stainless-generated); mirrors custom_object_field.py.
|
|
4
|
+
*
|
|
5
|
+
* Each concrete field type is its own class that extends the internal `Field`
|
|
6
|
+
* base. Construct like any other component:
|
|
7
|
+
*
|
|
8
|
+
* new TextField(customObject, { apiName, displayName, ... });
|
|
9
|
+
* new LookupField(customObject, { apiName, target: otherCo, ... });
|
|
10
|
+
* new SummaryField(customObject, { apiName, aggregates, using, lookup, ... });
|
|
11
|
+
*
|
|
12
|
+
* This mirrors AWS CDK's per-variant-class pattern (e.g.
|
|
13
|
+
* `new codepipeline_actions.GitHubSourceAction({...})` rather than a single
|
|
14
|
+
* Action class with 30 static factories). Every subclass serializes to the
|
|
15
|
+
* same `CUSTOM_OBJECT_FIELD` wire shape, discriminated by `data_type.field_type`.
|
|
16
|
+
*
|
|
17
|
+
* The parent CO is the first positional arg (the "scope") — its `api_name`
|
|
18
|
+
* becomes `custom_object_api_name` at serialization, and the field
|
|
19
|
+
* auto-registers with the manifest via the CO's scope chain.
|
|
20
|
+
*/
|
|
21
|
+
import { FILTER_OPERATORS_BY_TYPE, } from "./_helpers.mjs";
|
|
22
|
+
function validateApiName(apiName) {
|
|
23
|
+
if (!apiName.endsWith('__c')) {
|
|
24
|
+
throw new Error(`Field api_name must end with __c: ${apiName}`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
// ────────────────────────────────────────────────────────────────────────
|
|
28
|
+
// Base class
|
|
29
|
+
// ────────────────────────────────────────────────────────────────────────
|
|
30
|
+
/**
|
|
31
|
+
* Base class for every custom-object field. Prefer the concrete subclasses
|
|
32
|
+
* (`TextField`, `LookupField`, `SummaryField`, …). Construct `Field` directly
|
|
33
|
+
* only for wire-types the SDK doesn't yet model.
|
|
34
|
+
*/
|
|
35
|
+
export class Field {
|
|
36
|
+
/** Build a new field; enforces `__c` suffix and folds props into `data_type`. */
|
|
37
|
+
constructor(customObject, props) {
|
|
38
|
+
validateApiName(props.apiName);
|
|
39
|
+
this._fieldApiName = props.apiName;
|
|
40
|
+
this._fieldDisplayName = props.displayName;
|
|
41
|
+
this._customObjectApiName = customObject.getApiName();
|
|
42
|
+
const dt = { ...(props.dataType ?? {}) };
|
|
43
|
+
if (props.fieldType != null)
|
|
44
|
+
dt['field_type'] = props.fieldType;
|
|
45
|
+
if (props.maxLength != null)
|
|
46
|
+
dt['max_length'] = props.maxLength;
|
|
47
|
+
if (props.decimalPlaces != null)
|
|
48
|
+
dt['num_of_decimal_places'] = props.decimalPlaces;
|
|
49
|
+
if (props.currency != null)
|
|
50
|
+
dt['currency'] = props.currency;
|
|
51
|
+
if (props.options != null)
|
|
52
|
+
dt['options_list'] = [...props.options];
|
|
53
|
+
this._dataType = dt;
|
|
54
|
+
this._description = props.description ?? null;
|
|
55
|
+
this._isRequired = props.required ?? null;
|
|
56
|
+
this._isUnique = props.unique ?? null;
|
|
57
|
+
this._isIndexed = props.indexed ?? null;
|
|
58
|
+
this._rqlFormula = props.rqlFormula ?? null;
|
|
59
|
+
this._formulaAttrMetas = props.formulaAttrMetas ?? null;
|
|
60
|
+
this._derivedAggregatedFieldStatic = props.derivedAggregatedField ?? null;
|
|
61
|
+
this._derivedFieldFormula = props.derivedFieldFormula ?? null;
|
|
62
|
+
this._summarySpec = props.summarySpec ?? null;
|
|
63
|
+
const rawSection = props.section;
|
|
64
|
+
this._section =
|
|
65
|
+
rawSection == null ? null
|
|
66
|
+
: typeof rawSection === 'string' ? rawSection
|
|
67
|
+
: rawSection.getSectionId();
|
|
68
|
+
customObject._register(this);
|
|
69
|
+
}
|
|
70
|
+
// ── Getters ────────────────────────────────────────────────────────────
|
|
71
|
+
/** Backend api_name for this field. */
|
|
72
|
+
getApiName() {
|
|
73
|
+
return this._fieldApiName;
|
|
74
|
+
}
|
|
75
|
+
/** Human-readable display name. */
|
|
76
|
+
getDisplayName() {
|
|
77
|
+
return this._fieldDisplayName;
|
|
78
|
+
}
|
|
79
|
+
/** api_name of the CustomObject this field lives on. */
|
|
80
|
+
getCustomObjectApiName() {
|
|
81
|
+
return this._customObjectApiName;
|
|
82
|
+
}
|
|
83
|
+
/** Resolved `data_type.field_type`, or null if unset. */
|
|
84
|
+
getFieldType() {
|
|
85
|
+
return this._dataType['field_type'] ?? null;
|
|
86
|
+
}
|
|
87
|
+
/** Raw `data_type` dict (read-only view). */
|
|
88
|
+
getDataType() {
|
|
89
|
+
return this._dataType;
|
|
90
|
+
}
|
|
91
|
+
/** True if this field is a simple formula field. */
|
|
92
|
+
isFormula() {
|
|
93
|
+
return this._derivedFieldFormula != null;
|
|
94
|
+
}
|
|
95
|
+
/** True if this field is a summary/rollup field. */
|
|
96
|
+
isSummary() {
|
|
97
|
+
return this._summarySpec != null;
|
|
98
|
+
}
|
|
99
|
+
// ── Serialization ──────────────────────────────────────────────────────
|
|
100
|
+
/** Serialize to the backend `CUSTOM_OBJECT_FIELD` wire shape. */
|
|
101
|
+
toDict() {
|
|
102
|
+
return {
|
|
103
|
+
type: 'CUSTOM_OBJECT_FIELD',
|
|
104
|
+
custom_object_api_name: this._customObjectApiName,
|
|
105
|
+
field_api_name: this._fieldApiName,
|
|
106
|
+
field_display_name: this._fieldDisplayName,
|
|
107
|
+
data_type: { options_list: [], supported_types: [], ...this._dataType },
|
|
108
|
+
description: this._description,
|
|
109
|
+
is_required: this._isRequired,
|
|
110
|
+
is_unique: this._isUnique,
|
|
111
|
+
is_indexed: this._isIndexed,
|
|
112
|
+
rql_formula: this._rqlFormula ?? null,
|
|
113
|
+
formula_attr_metas: this._formulaAttrMetas,
|
|
114
|
+
// User-authored package fields are never standard (backend invariant).
|
|
115
|
+
is_standard: false,
|
|
116
|
+
derived_aggregated_field: this._resolveAggregatedField(),
|
|
117
|
+
derived_field_formula: this._derivedFieldFormula ?? null,
|
|
118
|
+
section: this._section,
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
/** Build the `derived_aggregated_field` dict from `_summarySpec` with cross-CO checks. */
|
|
122
|
+
_resolveAggregatedField() {
|
|
123
|
+
if (this._summarySpec == null)
|
|
124
|
+
return this._derivedAggregatedFieldStatic;
|
|
125
|
+
const spec = this._summarySpec;
|
|
126
|
+
const aggParent = spec.aggregates.getCustomObjectApiName();
|
|
127
|
+
const lookupParent = spec.lookup.getCustomObjectApiName();
|
|
128
|
+
if (lookupParent !== aggParent) {
|
|
129
|
+
throw new Error(`SummaryField "${this._fieldApiName}": lookup lives on "${lookupParent}" ` +
|
|
130
|
+
`but aggregates lives on "${aggParent}" — both must live on the same ` +
|
|
131
|
+
`child CustomObject.`);
|
|
132
|
+
}
|
|
133
|
+
// Per-filter residency / back-ref / LONG_TEXT / formula checks: backend only.
|
|
134
|
+
return {
|
|
135
|
+
aggregation_function: spec.using,
|
|
136
|
+
child_model_name: aggParent,
|
|
137
|
+
currency_code: spec.currencyCode,
|
|
138
|
+
field_to_aggregate: spec.aggregates.getApiName(),
|
|
139
|
+
filters: spec.filters.map((f) => ({
|
|
140
|
+
field_name: f.field.getApiName(),
|
|
141
|
+
filter_value: f.value,
|
|
142
|
+
operator: f.operator,
|
|
143
|
+
})),
|
|
144
|
+
lookup_field_api_name: spec.lookup.getApiName(),
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
/** Single-line text. */
|
|
149
|
+
export class TextField extends Field {
|
|
150
|
+
constructor(customObject, props) {
|
|
151
|
+
super(customObject, { ...props, fieldType: 'TEXT' });
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
/** Multi-line text. */
|
|
155
|
+
export class LongTextField extends Field {
|
|
156
|
+
constructor(customObject, props) {
|
|
157
|
+
super(customObject, { ...props, fieldType: 'LONG_TEXT' });
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
/** Email address (format-validated by the UI). */
|
|
161
|
+
export class EmailField extends Field {
|
|
162
|
+
constructor(customObject, props) {
|
|
163
|
+
super(customObject, { ...props, fieldType: 'EMAIL' });
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
/** URL (format-validated by the UI). */
|
|
167
|
+
export class UrlField extends Field {
|
|
168
|
+
constructor(customObject, props) {
|
|
169
|
+
super(customObject, { ...props, fieldType: 'URL' });
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
/** Phone number. */
|
|
173
|
+
export class PhoneField extends Field {
|
|
174
|
+
constructor(customObject, props) {
|
|
175
|
+
super(customObject, { ...props, fieldType: 'PHONE_NUMBER' });
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
/** Number. */
|
|
179
|
+
export class NumberField extends Field {
|
|
180
|
+
constructor(customObject, props) {
|
|
181
|
+
super(customObject, { ...props, fieldType: 'NUMBER' });
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
/** Currency amount; `currency` is forwarded only when set. */
|
|
185
|
+
export class CurrencyField extends Field {
|
|
186
|
+
constructor(customObject, props) {
|
|
187
|
+
super(customObject, { ...props, fieldType: 'CURRENCY' });
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
/** Percentage. */
|
|
191
|
+
export class PercentageField extends Field {
|
|
192
|
+
constructor(customObject, props) {
|
|
193
|
+
super(customObject, { ...props, fieldType: 'PERCENTAGE' });
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
/** Date (no time). */
|
|
197
|
+
export class DateField extends Field {
|
|
198
|
+
constructor(customObject, props) {
|
|
199
|
+
super(customObject, { ...props, fieldType: 'DATE' });
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
/** Date + time. */
|
|
203
|
+
export class DatetimeField extends Field {
|
|
204
|
+
constructor(customObject, props) {
|
|
205
|
+
super(customObject, { ...props, fieldType: 'DATETIME' });
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
/** Time of day. */
|
|
209
|
+
export class TimeField extends Field {
|
|
210
|
+
constructor(customObject, props) {
|
|
211
|
+
super(customObject, { ...props, fieldType: 'TIME' });
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
/** Dropdown select. */
|
|
215
|
+
export class SelectField extends Field {
|
|
216
|
+
constructor(customObject, props) {
|
|
217
|
+
super(customObject, { ...props, fieldType: 'SELECT' });
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
/** Radio button group. */
|
|
221
|
+
export class RadioField extends Field {
|
|
222
|
+
constructor(customObject, props) {
|
|
223
|
+
super(customObject, { ...props, fieldType: 'RADIO' });
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
/** Boolean (checkbox). */
|
|
227
|
+
export class BooleanField extends Field {
|
|
228
|
+
constructor(customObject, props) {
|
|
229
|
+
super(customObject, { ...props, fieldType: 'BOOLEAN' });
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
/** File attachment; `allowedType` mirrors the UI's "File type" dropdown. */
|
|
233
|
+
export class FileField extends Field {
|
|
234
|
+
constructor(customObject, props) {
|
|
235
|
+
const { allowedType, ...rest } = props;
|
|
236
|
+
const supported = allowedType === 'any' ? ['*'] : [allowedType];
|
|
237
|
+
super(customObject, {
|
|
238
|
+
...rest,
|
|
239
|
+
fieldType: 'FILE',
|
|
240
|
+
dataType: { supported_types: supported },
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
/** Many-to-one reference. */
|
|
245
|
+
export class LookupField extends Field {
|
|
246
|
+
constructor(customObject, props) {
|
|
247
|
+
const targetApiName = typeof props.target === 'string' ? props.target : props.target.getApiName();
|
|
248
|
+
super(customObject, {
|
|
249
|
+
apiName: props.apiName,
|
|
250
|
+
displayName: props.displayName,
|
|
251
|
+
dataType: {
|
|
252
|
+
field_type: 'OG_REFERENCE_FIELD',
|
|
253
|
+
og_model_rql_name: targetApiName,
|
|
254
|
+
edge_type: 'LOOKUP',
|
|
255
|
+
...(props.relatedDataLabel != null ? { related_data_label: props.relatedDataLabel } : {}),
|
|
256
|
+
},
|
|
257
|
+
required: props.required,
|
|
258
|
+
description: props.description,
|
|
259
|
+
section: props.section,
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
/** Parent-child reference — always required on the wire. */
|
|
264
|
+
export class ParentChildField extends Field {
|
|
265
|
+
constructor(customObject, props) {
|
|
266
|
+
super(customObject, {
|
|
267
|
+
apiName: props.apiName,
|
|
268
|
+
displayName: props.displayName,
|
|
269
|
+
dataType: {
|
|
270
|
+
field_type: 'OG_REFERENCE_FIELD',
|
|
271
|
+
og_model_rql_name: props.target.getApiName(),
|
|
272
|
+
edge_type: 'PARENT_CHILD',
|
|
273
|
+
...(props.relatedDataLabel != null ? { related_data_label: props.relatedDataLabel } : {}),
|
|
274
|
+
...(props.parentChildType != null ? { parent_child_type: props.parentChildType } : {}),
|
|
275
|
+
...(props.enableParentOwnerInheritance != null ?
|
|
276
|
+
{ enable_parent_owner_inheritance: props.enableParentOwnerInheritance }
|
|
277
|
+
: {}),
|
|
278
|
+
},
|
|
279
|
+
required: true,
|
|
280
|
+
description: props.description,
|
|
281
|
+
section: props.section,
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Computed formula field (read-only). `fieldType` is required and narrowed
|
|
287
|
+
* to the 7 variants the UI "Data type" dropdown exposes. `maxLength` is
|
|
288
|
+
* required when `fieldType === 'TEXT'`.
|
|
289
|
+
*/
|
|
290
|
+
export class FormulaField extends Field {
|
|
291
|
+
constructor(customObject, props) {
|
|
292
|
+
if (props.fieldType === 'TEXT' && props.maxLength == null) {
|
|
293
|
+
throw new Error(`FormulaField "${props.apiName}": maxLength is required when fieldType is 'TEXT'.`);
|
|
294
|
+
}
|
|
295
|
+
const { formula, ...rest } = props;
|
|
296
|
+
super(customObject, {
|
|
297
|
+
...rest,
|
|
298
|
+
derivedFieldFormula: formula,
|
|
299
|
+
required: null,
|
|
300
|
+
unique: null,
|
|
301
|
+
indexed: null,
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Summary/rollup field — aggregates a child-object field (read-only).
|
|
307
|
+
* SDK enforces only what backend/UI won't: `lookup` edge_type, output-type
|
|
308
|
+
* inference, per-type filter operators, and same-child-CO residency for
|
|
309
|
+
* `aggregates` + `lookup`. Per-filter residency / LONG_TEXT / formula
|
|
310
|
+
* filter / currency pairing checks are left to the backend.
|
|
311
|
+
*/
|
|
312
|
+
export class SummaryField extends Field {
|
|
313
|
+
constructor(customObject, props) {
|
|
314
|
+
// lookup must be a parentChild field.
|
|
315
|
+
if (props.lookup.getDataType()['edge_type'] !== 'PARENT_CHILD') {
|
|
316
|
+
throw new Error(`SummaryField "${props.apiName}": 'lookup' must be a parentChild ` +
|
|
317
|
+
`field on the child CO (got edge_type=` +
|
|
318
|
+
`${props.lookup.getDataType()['edge_type'] ?? 'undefined'}).`);
|
|
319
|
+
}
|
|
320
|
+
// Infer output fieldType: NUMBER for COUNT, else the aggregated field's type.
|
|
321
|
+
let outputFieldType;
|
|
322
|
+
if (props.using === 'COUNT') {
|
|
323
|
+
outputFieldType = 'NUMBER';
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
const agg = props.aggregates.getFieldType();
|
|
327
|
+
if (agg == null) {
|
|
328
|
+
throw new Error(`SummaryField "${props.apiName}": cannot infer output type — ` +
|
|
329
|
+
`aggregates field "${props.aggregates.getApiName()}" has no ` +
|
|
330
|
+
`known field_type. Construct it with a typed subclass (e.g. ` +
|
|
331
|
+
`CurrencyField / NumberField).`);
|
|
332
|
+
}
|
|
333
|
+
outputFieldType = agg;
|
|
334
|
+
}
|
|
335
|
+
// Summary-filter field restrictions. Mirror the admin condition-builder
|
|
336
|
+
// picker so SDK-authored manifests are fully editable in the UI, and
|
|
337
|
+
// catch the backend's own hard rejects ahead of /validate.
|
|
338
|
+
for (const f of props.filters ?? []) {
|
|
339
|
+
const fname = f.field.getApiName();
|
|
340
|
+
const ft = f.field.getFieldType();
|
|
341
|
+
// (a) Can't filter on the parent-child lookup field itself
|
|
342
|
+
// (backend: parent_child_util.py rejects this explicitly).
|
|
343
|
+
if (f.field === props.lookup) {
|
|
344
|
+
throw new Error(`SummaryField "${props.apiName}": filter field "${fname}" is the ` +
|
|
345
|
+
`parent-child lookup field — that's reserved as the aggregation ` +
|
|
346
|
+
`axis and can't be a filter. Pick a scalar field on the child CO.`);
|
|
347
|
+
}
|
|
348
|
+
// (b) Can't filter on a derived (formula or summary) field
|
|
349
|
+
// (backend rejects both).
|
|
350
|
+
if (f.field.isFormula() || f.field.isSummary()) {
|
|
351
|
+
throw new Error(`SummaryField "${props.apiName}": filter field "${fname}" is ` +
|
|
352
|
+
`itself a derived field (formula/summary). The backend does not ` +
|
|
353
|
+
`allow derived fields as summary-filter fields. Filter on a ` +
|
|
354
|
+
`plain scalar field on the child CO instead.`);
|
|
355
|
+
}
|
|
356
|
+
if (ft == null)
|
|
357
|
+
continue;
|
|
358
|
+
// (c) FILTER_OPERATORS_BY_TYPE is the single source of truth for
|
|
359
|
+
// "which field types can be used as summary-filter fields".
|
|
360
|
+
// Absent key ⇒ UI picker hides this type ⇒ SDK rejects it.
|
|
361
|
+
const allowed = FILTER_OPERATORS_BY_TYPE[ft];
|
|
362
|
+
if (allowed == null) {
|
|
363
|
+
throw new Error(`SummaryField "${props.apiName}": filter field "${fname}" has type ` +
|
|
364
|
+
`${ft}, which the admin UI excludes from summary-filter pickers ` +
|
|
365
|
+
`(ambiguous semantics for aggregations). Model a plain BOOLEAN ` +
|
|
366
|
+
`field on the child CO (updated via a Rule) and filter on that.`);
|
|
367
|
+
}
|
|
368
|
+
// (d) Per-type operator allow-list.
|
|
369
|
+
if (!allowed.has(f.operator)) {
|
|
370
|
+
throw new Error(`SummaryField "${props.apiName}": operator "${f.operator}" is ` +
|
|
371
|
+
`not valid for ${ft} field "${fname}". ` +
|
|
372
|
+
`Allowed: ${[...allowed].join(', ')}.`);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
super(customObject, {
|
|
376
|
+
apiName: props.apiName,
|
|
377
|
+
displayName: props.displayName,
|
|
378
|
+
fieldType: outputFieldType,
|
|
379
|
+
currency: outputFieldType === 'CURRENCY' ? props.currencyCode : undefined,
|
|
380
|
+
required: null,
|
|
381
|
+
unique: null,
|
|
382
|
+
indexed: null,
|
|
383
|
+
description: props.description,
|
|
384
|
+
section: props.section,
|
|
385
|
+
summarySpec: {
|
|
386
|
+
aggregates: props.aggregates,
|
|
387
|
+
using: props.using,
|
|
388
|
+
lookup: props.lookup,
|
|
389
|
+
filters: props.filters ?? [],
|
|
390
|
+
currencyCode: props.currencyCode ?? null,
|
|
391
|
+
},
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
//# sourceMappingURL=field.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.mjs","sourceRoot":"","sources":["../../src/lib/manifest/field.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;OAEI,EACL,wBAAwB,GAKzB;AAqBD,SAAS,eAAe,CAAC,OAAe;IACtC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC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tB,WAAW,EAAE;gBACX,UAAU,EAAE,KAAK,CAAC,UAAU;gBAC5B,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,EAAE;gBAC5B,YAAY,EAAE,KAAK,CAAC,YAAY,IAAI,IAAI;aACzC;SACF,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Manifest builder public API (hand-written, not Stainless-generated). */
|
|
2
|
+
export { generateId, type EdgeType, type FieldType, type FormulaFieldType, type FunctionRuntime, type ObjectScope, type PageType, type SortOrder, type SummaryAggregation, type SummaryFilterOperator, type TriggerType, type UpdateTriggerType, type ValidationLevel, type ValidationState, } from "./_helpers.mjs";
|
|
3
|
+
export { App, type AppIcon, type AppPage, type AppProps } from "./app.mjs";
|
|
4
|
+
export { Category, type CategoryProps } from "./category.mjs";
|
|
5
|
+
export { CustomObject, type CustomObjectProps, type IconConfig } from "./custom-object.mjs";
|
|
6
|
+
export { CustomObjectFieldSection, type CustomObjectFieldSectionProps } from "./custom-object-field-section.mjs";
|
|
7
|
+
export { CustomObjectPageLayout, type CustomObjectPageLayoutProps, type CustomTab, type FieldsSection, type HeaderEdits, type NewHeaderField, type PageLayoutSection, type PageLayoutTab, type SectionField, type SectionFieldsLayout, type SystemHeaderFieldEdit, type SystemSectionEdit, type SystemTabEdit, type TabEdits, type TabWithSections, type VisibilityCondition, type VisibilityConditions, } from "./custom-object-page-layout.mjs";
|
|
8
|
+
export { Field, type FieldProps, type SummaryFilter, TextField, type TextFieldProps, LongTextField, type LongTextFieldProps, EmailField, type EmailFieldProps, UrlField, type UrlFieldProps, PhoneField, type PhoneFieldProps, NumberField, type NumberFieldProps, CurrencyField, type CurrencyFieldProps, PercentageField, type PercentageFieldProps, DateField, type DateFieldProps, DatetimeField, type DatetimeFieldProps, TimeField, type TimeFieldProps, SelectField, type SelectFieldProps, RadioField, type RadioFieldProps, BooleanField, type BooleanFieldProps, FileField, type FileFieldProps, LookupField, type LookupFieldProps, ParentChildField, type ParentChildFieldProps, FormulaField, type FormulaFieldProps, SummaryField, type SummaryFieldProps, } from "./field.mjs";
|
|
9
|
+
export { ListViewDef, type ListViewDefProps } from "./list-view.mjs";
|
|
10
|
+
export { ManifestBuilder, type ManifestBuilderProps, type ManifestComponent, type ManifestScope, } from "./manifest-builder.mjs";
|
|
11
|
+
export { ManifestFunction, ManifestFunction as Function, type ManifestFunctionProps, } from "./manifest-function.mjs";
|
|
12
|
+
export { Rule, type RuleAction, type RuleProps } from "./rule.mjs";
|
|
13
|
+
export { SduiPage, type SduiPageProps } from "./sdui-page.mjs";
|
|
14
|
+
export { Validation, type ValidationProps } from "./validation.mjs";
|
|
15
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/index.ts"],"names":[],"mappings":"AAAA,2EAA2E;OAEpE,EACL,UAAU,EACV,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB;OAEM,EAAE,GAAG,EAAE,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE;OAElD,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE;OAEhC,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,UAAU,EAAE;OAEzD,EAAE,wBAAwB,EAAE,KAAK,6BAA6B,EAAE;OAEhE,EACL,sBAAsB,EACtB,KAAK,2BAA2B,EAChC,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK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,EAAE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Manifest builder public API (hand-written, not Stainless-generated). */
|
|
2
|
+
export { generateId, type EdgeType, type FieldType, type FormulaFieldType, type FunctionRuntime, type ObjectScope, type PageType, type SortOrder, type SummaryAggregation, type SummaryFilterOperator, type TriggerType, type UpdateTriggerType, type ValidationLevel, type ValidationState, } from "./_helpers.js";
|
|
3
|
+
export { App, type AppIcon, type AppPage, type AppProps } from "./app.js";
|
|
4
|
+
export { Category, type CategoryProps } from "./category.js";
|
|
5
|
+
export { CustomObject, type CustomObjectProps, type IconConfig } from "./custom-object.js";
|
|
6
|
+
export { CustomObjectFieldSection, type CustomObjectFieldSectionProps } from "./custom-object-field-section.js";
|
|
7
|
+
export { CustomObjectPageLayout, type CustomObjectPageLayoutProps, type CustomTab, type FieldsSection, type HeaderEdits, type NewHeaderField, type PageLayoutSection, type PageLayoutTab, type SectionField, type SectionFieldsLayout, type SystemHeaderFieldEdit, type SystemSectionEdit, type SystemTabEdit, type TabEdits, type TabWithSections, type VisibilityCondition, type VisibilityConditions, } from "./custom-object-page-layout.js";
|
|
8
|
+
export { Field, type FieldProps, type SummaryFilter, TextField, type TextFieldProps, LongTextField, type LongTextFieldProps, EmailField, type EmailFieldProps, UrlField, type UrlFieldProps, PhoneField, type PhoneFieldProps, NumberField, type NumberFieldProps, CurrencyField, type CurrencyFieldProps, PercentageField, type PercentageFieldProps, DateField, type DateFieldProps, DatetimeField, type DatetimeFieldProps, TimeField, type TimeFieldProps, SelectField, type SelectFieldProps, RadioField, type RadioFieldProps, BooleanField, type BooleanFieldProps, FileField, type FileFieldProps, LookupField, type LookupFieldProps, ParentChildField, type ParentChildFieldProps, FormulaField, type FormulaFieldProps, SummaryField, type SummaryFieldProps, } from "./field.js";
|
|
9
|
+
export { ListViewDef, type ListViewDefProps } from "./list-view.js";
|
|
10
|
+
export { ManifestBuilder, type ManifestBuilderProps, type ManifestComponent, type ManifestScope, } from "./manifest-builder.js";
|
|
11
|
+
export { ManifestFunction, ManifestFunction as Function, type ManifestFunctionProps, } from "./manifest-function.js";
|
|
12
|
+
export { Rule, type RuleAction, type RuleProps } from "./rule.js";
|
|
13
|
+
export { SduiPage, type SduiPageProps } from "./sdui-page.js";
|
|
14
|
+
export { Validation, type ValidationProps } from "./validation.js";
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/index.ts"],"names":[],"mappings":"AAAA,2EAA2E;OAEpE,EACL,UAAU,EACV,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB;OAEM,EAAE,GAAG,EAAE,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE;OAElD,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE;OAEhC,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,UAAU,EAAE;OAEzD,EAAE,wBAAwB,EAAE,KAAK,6BAA6B,EAAE;OAEhE,EACL,sBAAsB,EACtB,KAAK,2BAA2B,EAChC,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,GAC1B;OAEM,EACL,KAAK,EACL,KAAK,UAAU,EACf,KAAK,aAAa,EAIlB,SAAS,EACT,KAAK,cAAc,EACnB,aAAa,EACb,KAAK,kBAAkB,EACvB,UAAU,EACV,KAAK,eAAe,EACpB,QAAQ,EACR,KAAK,aAAa,EAClB,UAAU,EACV,KAAK,eAAe,EACpB,WAAW,EACX,KAAK,gBAAgB,EACrB,aAAa,EACb,KAAK,kBAAkB,EACvB,eAAe,EACf,KAAK,oBAAoB,EACzB,SAAS,EACT,KAAK,cAAc,EACnB,aAAa,EACb,KAAK,kBAAkB,EACvB,SAAS,EACT,KAAK,cAAc,EACnB,WAAW,EACX,KAAK,gBAAgB,EACrB,UAAU,EACV,KAAK,eAAe,EACpB,YAAY,EACZ,KAAK,iBAAiB,EACtB,SAAS,EACT,KAAK,cAAc,EACnB,WAAW,EACX,KAAK,gBAAgB,EACrB,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,YAAY,EACZ,KAAK,iBAAiB,EACtB,YAAY,EACZ,KAAK,iBAAiB,GACvB;OAEM,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE;OAEtC,EACL,eAAe,EACf,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,aAAa,GACnB;OAEM,EACL,gBAAgB,EAChB,gBAAgB,IAAI,QAAQ,EAC5B,KAAK,qBAAqB,GAC3B;OAEM,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE;OAEzC,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE;OAEhC,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/** Manifest builder public API (hand-written, not Stainless-generated). */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Validation = exports.SduiPage = exports.Rule = exports.Function = exports.ManifestFunction = exports.ManifestBuilder = exports.ListViewDef = exports.SummaryField = exports.FormulaField = exports.ParentChildField = exports.LookupField = exports.FileField = exports.BooleanField = exports.RadioField = exports.SelectField = exports.TimeField = exports.DatetimeField = exports.DateField = exports.PercentageField = exports.CurrencyField = exports.NumberField = exports.PhoneField = exports.UrlField = exports.EmailField = exports.LongTextField = exports.TextField = exports.Field = exports.CustomObjectPageLayout = exports.CustomObjectFieldSection = exports.CustomObject = exports.Category = exports.App = exports.generateId = void 0;
|
|
5
|
+
var _helpers_1 = require("./_helpers.js");
|
|
6
|
+
Object.defineProperty(exports, "generateId", { enumerable: true, get: function () { return _helpers_1.generateId; } });
|
|
7
|
+
var app_1 = require("./app.js");
|
|
8
|
+
Object.defineProperty(exports, "App", { enumerable: true, get: function () { return app_1.App; } });
|
|
9
|
+
var category_1 = require("./category.js");
|
|
10
|
+
Object.defineProperty(exports, "Category", { enumerable: true, get: function () { return category_1.Category; } });
|
|
11
|
+
var custom_object_1 = require("./custom-object.js");
|
|
12
|
+
Object.defineProperty(exports, "CustomObject", { enumerable: true, get: function () { return custom_object_1.CustomObject; } });
|
|
13
|
+
var custom_object_field_section_1 = require("./custom-object-field-section.js");
|
|
14
|
+
Object.defineProperty(exports, "CustomObjectFieldSection", { enumerable: true, get: function () { return custom_object_field_section_1.CustomObjectFieldSection; } });
|
|
15
|
+
var custom_object_page_layout_1 = require("./custom-object-page-layout.js");
|
|
16
|
+
Object.defineProperty(exports, "CustomObjectPageLayout", { enumerable: true, get: function () { return custom_object_page_layout_1.CustomObjectPageLayout; } });
|
|
17
|
+
var field_1 = require("./field.js");
|
|
18
|
+
Object.defineProperty(exports, "Field", { enumerable: true, get: function () { return field_1.Field; } });
|
|
19
|
+
// Concrete field variants (one class per wire-level field type, mirroring
|
|
20
|
+
// AWS CDK's per-action-class pattern in `aws-codepipeline-actions`).
|
|
21
|
+
Object.defineProperty(exports, "TextField", { enumerable: true, get: function () { return field_1.TextField; } });
|
|
22
|
+
Object.defineProperty(exports, "LongTextField", { enumerable: true, get: function () { return field_1.LongTextField; } });
|
|
23
|
+
Object.defineProperty(exports, "EmailField", { enumerable: true, get: function () { return field_1.EmailField; } });
|
|
24
|
+
Object.defineProperty(exports, "UrlField", { enumerable: true, get: function () { return field_1.UrlField; } });
|
|
25
|
+
Object.defineProperty(exports, "PhoneField", { enumerable: true, get: function () { return field_1.PhoneField; } });
|
|
26
|
+
Object.defineProperty(exports, "NumberField", { enumerable: true, get: function () { return field_1.NumberField; } });
|
|
27
|
+
Object.defineProperty(exports, "CurrencyField", { enumerable: true, get: function () { return field_1.CurrencyField; } });
|
|
28
|
+
Object.defineProperty(exports, "PercentageField", { enumerable: true, get: function () { return field_1.PercentageField; } });
|
|
29
|
+
Object.defineProperty(exports, "DateField", { enumerable: true, get: function () { return field_1.DateField; } });
|
|
30
|
+
Object.defineProperty(exports, "DatetimeField", { enumerable: true, get: function () { return field_1.DatetimeField; } });
|
|
31
|
+
Object.defineProperty(exports, "TimeField", { enumerable: true, get: function () { return field_1.TimeField; } });
|
|
32
|
+
Object.defineProperty(exports, "SelectField", { enumerable: true, get: function () { return field_1.SelectField; } });
|
|
33
|
+
Object.defineProperty(exports, "RadioField", { enumerable: true, get: function () { return field_1.RadioField; } });
|
|
34
|
+
Object.defineProperty(exports, "BooleanField", { enumerable: true, get: function () { return field_1.BooleanField; } });
|
|
35
|
+
Object.defineProperty(exports, "FileField", { enumerable: true, get: function () { return field_1.FileField; } });
|
|
36
|
+
Object.defineProperty(exports, "LookupField", { enumerable: true, get: function () { return field_1.LookupField; } });
|
|
37
|
+
Object.defineProperty(exports, "ParentChildField", { enumerable: true, get: function () { return field_1.ParentChildField; } });
|
|
38
|
+
Object.defineProperty(exports, "FormulaField", { enumerable: true, get: function () { return field_1.FormulaField; } });
|
|
39
|
+
Object.defineProperty(exports, "SummaryField", { enumerable: true, get: function () { return field_1.SummaryField; } });
|
|
40
|
+
var list_view_1 = require("./list-view.js");
|
|
41
|
+
Object.defineProperty(exports, "ListViewDef", { enumerable: true, get: function () { return list_view_1.ListViewDef; } });
|
|
42
|
+
var manifest_builder_1 = require("./manifest-builder.js");
|
|
43
|
+
Object.defineProperty(exports, "ManifestBuilder", { enumerable: true, get: function () { return manifest_builder_1.ManifestBuilder; } });
|
|
44
|
+
var manifest_function_1 = require("./manifest-function.js");
|
|
45
|
+
Object.defineProperty(exports, "ManifestFunction", { enumerable: true, get: function () { return manifest_function_1.ManifestFunction; } });
|
|
46
|
+
Object.defineProperty(exports, "Function", { enumerable: true, get: function () { return manifest_function_1.ManifestFunction; } });
|
|
47
|
+
var rule_1 = require("./rule.js");
|
|
48
|
+
Object.defineProperty(exports, "Rule", { enumerable: true, get: function () { return rule_1.Rule; } });
|
|
49
|
+
var sdui_page_1 = require("./sdui-page.js");
|
|
50
|
+
Object.defineProperty(exports, "SduiPage", { enumerable: true, get: function () { return sdui_page_1.SduiPage; } });
|
|
51
|
+
var validation_1 = require("./validation.js");
|
|
52
|
+
Object.defineProperty(exports, "Validation", { enumerable: true, get: function () { return validation_1.Validation; } });
|
|
53
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/manifest/index.ts"],"names":[],"mappings":";AAAA,2EAA2E;;;AAE3E,0CAeoB;AAdlB,sGAAA,UAAU,OAAA;AAgBZ,gCAAuE;AAA9D,0FAAA,GAAG,OAAA;AAEZ,0CAA0D;AAAjD,oGAAA,QAAQ,OAAA;AAEjB,oDAAwF;AAA/E,6GAAA,YAAY,OAAA;AAErB,gFAA6G;AAApG,uIAAA,wBAAwB,OAAA;AAEjC,4EAkBqC;AAjBnC,mIAAA,sBAAsB,OAAA;AAmBxB,oCA6CiB;AA5Cf,8FAAA,KAAK,OAAA;AAIL,0EAA0E;AAC1E,qEAAqE;AACrE,kGAAA,SAAS,OAAA;AAET,sGAAA,aAAa,OAAA;AAEb,mGAAA,UAAU,OAAA;AAEV,iGAAA,QAAQ,OAAA;AAER,mGAAA,UAAU,OAAA;AAEV,oGAAA,WAAW,OAAA;AAEX,sGAAA,aAAa,OAAA;AAEb,wGAAA,eAAe,OAAA;AAEf,kGAAA,SAAS,OAAA;AAET,sGAAA,aAAa,OAAA;AAEb,kGAAA,SAAS,OAAA;AAET,oGAAA,WAAW,OAAA;AAEX,mGAAA,UAAU,OAAA;AAEV,qGAAA,YAAY,OAAA;AAEZ,kGAAA,SAAS,OAAA;AAET,oGAAA,WAAW,OAAA;AAEX,yGAAA,gBAAgB,OAAA;AAEhB,qGAAA,YAAY,OAAA;AAEZ,qGAAA,YAAY,OAAA;AAId,4CAAiE;AAAxD,wGAAA,WAAW,OAAA;AAEpB,0DAK4B;AAJ1B,mHAAA,eAAe,OAAA;AAMjB,4DAI6B;AAH3B,qHAAA,gBAAgB,OAAA;AAChB,6GAAA,gBAAgB,OAAY;AAI9B,kCAA+D;AAAtD,4FAAA,IAAI,OAAA;AAEb,4CAA2D;AAAlD,qGAAA,QAAQ,OAAA;AAEjB,8CAAgE;AAAvD,wGAAA,UAAU,OAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Manifest builder public API (hand-written, not Stainless-generated). */
|
|
2
|
+
export { generateId, } from "./_helpers.mjs";
|
|
3
|
+
export { App } from "./app.mjs";
|
|
4
|
+
export { Category } from "./category.mjs";
|
|
5
|
+
export { CustomObject } from "./custom-object.mjs";
|
|
6
|
+
export { CustomObjectFieldSection } from "./custom-object-field-section.mjs";
|
|
7
|
+
export { CustomObjectPageLayout, } from "./custom-object-page-layout.mjs";
|
|
8
|
+
export { Field,
|
|
9
|
+
// Concrete field variants (one class per wire-level field type, mirroring
|
|
10
|
+
// AWS CDK's per-action-class pattern in `aws-codepipeline-actions`).
|
|
11
|
+
TextField, LongTextField, EmailField, UrlField, PhoneField, NumberField, CurrencyField, PercentageField, DateField, DatetimeField, TimeField, SelectField, RadioField, BooleanField, FileField, LookupField, ParentChildField, FormulaField, SummaryField, } from "./field.mjs";
|
|
12
|
+
export { ListViewDef } from "./list-view.mjs";
|
|
13
|
+
export { ManifestBuilder, } from "./manifest-builder.mjs";
|
|
14
|
+
export { ManifestFunction, ManifestFunction as Function, } from "./manifest-function.mjs";
|
|
15
|
+
export { Rule } from "./rule.mjs";
|
|
16
|
+
export { SduiPage } from "./sdui-page.mjs";
|
|
17
|
+
export { Validation } from "./validation.mjs";
|
|
18
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/lib/manifest/index.ts"],"names":[],"mappings":"AAAA,2EAA2E;OAEpE,EACL,UAAU,GAcX;OAEM,EAAE,GAAG,EAA6C;OAElD,EAAE,QAAQ,EAAsB;OAEhC,EAAE,YAAY,EAA2C;OAEzD,EAAE,wBAAwB,EAAsC;OAEhE,EACL,sBAAsB,GAiBvB;OAEM,EACL,KAAK;AAIL,0EAA0E;AAC1E,qEAAqE;AACrE,SAAS,EAET,aAAa,EAEb,UAAU,EAEV,QAAQ,EAER,UAAU,EAEV,WAAW,EAEX,aAAa,EAEb,eAAe,EAEf,SAAS,EAET,aAAa,EAEb,SAAS,EAET,WAAW,EAEX,UAAU,EAEV,YAAY,EAEZ,SAAS,EAET,WAAW,EAEX,gBAAgB,EAEhB,YAAY,EAEZ,YAAY,GAEb;OAEM,EAAE,WAAW,EAAyB;OAEtC,EACL,eAAe,GAIhB;OAEM,EACL,gBAAgB,EAChB,gBAAgB,IAAI,QAAQ,GAE7B;OAEM,EAAE,IAAI,EAAmC;OAEzC,EAAE,QAAQ,EAAsB;OAEhC,EAAE,UAAU,EAAwB"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type ObjectScope, type SortOrder } from "./_helpers.mjs";
|
|
2
|
+
import type { CustomObject } from "./custom-object.mjs";
|
|
3
|
+
import type { Field } from "./field.mjs";
|
|
4
|
+
export interface ListViewDefProps {
|
|
5
|
+
/** Required. Display name of the view. */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Required. Column definitions (live `Field` refs; at least one). */
|
|
8
|
+
fields: Field[];
|
|
9
|
+
/** Required. Whether the view is visible to all users. */
|
|
10
|
+
isPublic: boolean;
|
|
11
|
+
/** Identity override. Override the view identifier. @default generateId('view') */
|
|
12
|
+
viewId?: string;
|
|
13
|
+
/** Optional. Sort column (live `Field` ref). Required if `sortOrder` is set. */
|
|
14
|
+
orderBy?: Field;
|
|
15
|
+
/** Conditional. Sort direction — requires `orderBy`. */
|
|
16
|
+
sortOrder?: SortOrder;
|
|
17
|
+
/** Optional. Object scope. @default 'all' */
|
|
18
|
+
objectScope?: ObjectScope;
|
|
19
|
+
/** Optional. Free-form description. @default null */
|
|
20
|
+
description?: string;
|
|
21
|
+
/** Optional. Per-column configuration overrides. @default {} */
|
|
22
|
+
columnConfig?: Record<string, any>;
|
|
23
|
+
/** Optional. RQL filter expression. @default null */
|
|
24
|
+
rqlFilter?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare class ListViewDef {
|
|
27
|
+
private readonly _viewId;
|
|
28
|
+
private readonly _customObjectApiName;
|
|
29
|
+
private readonly _name;
|
|
30
|
+
private readonly _fields;
|
|
31
|
+
private readonly _isPublic;
|
|
32
|
+
private readonly _orderBy;
|
|
33
|
+
private readonly _sortOrder;
|
|
34
|
+
private readonly _objectScope;
|
|
35
|
+
private readonly _description;
|
|
36
|
+
private readonly _columnConfig;
|
|
37
|
+
private readonly _rqlFilter;
|
|
38
|
+
/** Build a new view def and auto-register with the CO's scope. */
|
|
39
|
+
constructor(customObject: CustomObject, props: ListViewDefProps);
|
|
40
|
+
/** Backend view_id used as this view's identifier. */
|
|
41
|
+
getViewId(): string;
|
|
42
|
+
/** api_name of the CustomObject this view lives on. */
|
|
43
|
+
getCustomObjectApiName(): string;
|
|
44
|
+
/** Serialize to the backend `CUSTOM_OBJECT_LIST_VIEW` wire shape. */
|
|
45
|
+
toDict(): Record<string, any>;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=list-view.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-view.d.mts","sour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