@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.
Files changed (191) hide show
  1. package/client.d.mts +8 -2
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts +8 -2
  4. package/client.d.ts.map +1 -1
  5. package/client.js +17 -0
  6. package/client.js.map +1 -1
  7. package/client.mjs +17 -0
  8. package/client.mjs.map +1 -1
  9. package/internal/types.d.mts +6 -6
  10. package/internal/types.d.mts.map +1 -1
  11. package/internal/types.d.ts +6 -6
  12. package/internal/types.d.ts.map +1 -1
  13. package/lib/manifest/_helpers.d.mts +91 -0
  14. package/lib/manifest/_helpers.d.mts.map +1 -0
  15. package/lib/manifest/_helpers.d.ts +91 -0
  16. package/lib/manifest/_helpers.d.ts.map +1 -0
  17. package/lib/manifest/_helpers.js +65 -0
  18. package/lib/manifest/_helpers.js.map +1 -0
  19. package/lib/manifest/_helpers.mjs +61 -0
  20. package/lib/manifest/_helpers.mjs.map +1 -0
  21. package/lib/manifest/app.d.mts +45 -0
  22. package/lib/manifest/app.d.mts.map +1 -0
  23. package/lib/manifest/app.d.ts +45 -0
  24. package/lib/manifest/app.d.ts.map +1 -0
  25. package/lib/manifest/app.js +74 -0
  26. package/lib/manifest/app.js.map +1 -0
  27. package/lib/manifest/app.mjs +70 -0
  28. package/lib/manifest/app.mjs.map +1 -0
  29. package/lib/manifest/category.d.mts +23 -0
  30. package/lib/manifest/category.d.mts.map +1 -0
  31. package/lib/manifest/category.d.ts +23 -0
  32. package/lib/manifest/category.d.ts.map +1 -0
  33. package/lib/manifest/category.js +37 -0
  34. package/lib/manifest/category.js.map +1 -0
  35. package/lib/manifest/category.mjs +33 -0
  36. package/lib/manifest/category.mjs.map +1 -0
  37. package/lib/manifest/custom-object-field-section.d.mts +21 -0
  38. package/lib/manifest/custom-object-field-section.d.mts.map +1 -0
  39. package/lib/manifest/custom-object-field-section.d.ts +21 -0
  40. package/lib/manifest/custom-object-field-section.d.ts.map +1 -0
  41. package/lib/manifest/custom-object-field-section.js +42 -0
  42. package/lib/manifest/custom-object-field-section.js.map +1 -0
  43. package/lib/manifest/custom-object-field-section.mjs +38 -0
  44. package/lib/manifest/custom-object-field-section.mjs.map +1 -0
  45. package/lib/manifest/custom-object-page-layout.d.mts +158 -0
  46. package/lib/manifest/custom-object-page-layout.d.mts.map +1 -0
  47. package/lib/manifest/custom-object-page-layout.d.ts +158 -0
  48. package/lib/manifest/custom-object-page-layout.d.ts.map +1 -0
  49. package/lib/manifest/custom-object-page-layout.js +112 -0
  50. package/lib/manifest/custom-object-page-layout.js.map +1 -0
  51. package/lib/manifest/custom-object-page-layout.mjs +108 -0
  52. package/lib/manifest/custom-object-page-layout.mjs.map +1 -0
  53. package/lib/manifest/custom-object.d.mts +52 -0
  54. package/lib/manifest/custom-object.d.mts.map +1 -0
  55. package/lib/manifest/custom-object.d.ts +52 -0
  56. package/lib/manifest/custom-object.d.ts.map +1 -0
  57. package/lib/manifest/custom-object.js +219 -0
  58. package/lib/manifest/custom-object.js.map +1 -0
  59. package/lib/manifest/custom-object.mjs +215 -0
  60. package/lib/manifest/custom-object.mjs.map +1 -0
  61. package/lib/manifest/field.d.mts +276 -0
  62. package/lib/manifest/field.d.mts.map +1 -0
  63. package/lib/manifest/field.d.ts +276 -0
  64. package/lib/manifest/field.d.ts.map +1 -0
  65. package/lib/manifest/field.js +418 -0
  66. package/lib/manifest/field.js.map +1 -0
  67. package/lib/manifest/field.mjs +395 -0
  68. package/lib/manifest/field.mjs.map +1 -0
  69. package/lib/manifest/index.d.mts +15 -0
  70. package/lib/manifest/index.d.mts.map +1 -0
  71. package/lib/manifest/index.d.ts +15 -0
  72. package/lib/manifest/index.d.ts.map +1 -0
  73. package/lib/manifest/index.js +53 -0
  74. package/lib/manifest/index.js.map +1 -0
  75. package/lib/manifest/index.mjs +18 -0
  76. package/lib/manifest/index.mjs.map +1 -0
  77. package/lib/manifest/list-view.d.mts +47 -0
  78. package/lib/manifest/list-view.d.mts.map +1 -0
  79. package/lib/manifest/list-view.d.ts +47 -0
  80. package/lib/manifest/list-view.d.ts.map +1 -0
  81. package/lib/manifest/list-view.js +73 -0
  82. package/lib/manifest/list-view.js.map +1 -0
  83. package/lib/manifest/list-view.mjs +69 -0
  84. package/lib/manifest/list-view.mjs.map +1 -0
  85. package/lib/manifest/manifest-builder.d.mts +44 -0
  86. package/lib/manifest/manifest-builder.d.mts.map +1 -0
  87. package/lib/manifest/manifest-builder.d.ts +44 -0
  88. package/lib/manifest/manifest-builder.d.ts.map +1 -0
  89. package/lib/manifest/manifest-builder.js +69 -0
  90. package/lib/manifest/manifest-builder.js.map +1 -0
  91. package/lib/manifest/manifest-builder.mjs +65 -0
  92. package/lib/manifest/manifest-builder.mjs.map +1 -0
  93. package/lib/manifest/manifest-function.d.mts +39 -0
  94. package/lib/manifest/manifest-function.d.mts.map +1 -0
  95. package/lib/manifest/manifest-function.d.ts +39 -0
  96. package/lib/manifest/manifest-function.d.ts.map +1 -0
  97. package/lib/manifest/manifest-function.js +56 -0
  98. package/lib/manifest/manifest-function.js.map +1 -0
  99. package/lib/manifest/manifest-function.mjs +52 -0
  100. package/lib/manifest/manifest-function.mjs.map +1 -0
  101. package/lib/manifest/rule.d.mts +50 -0
  102. package/lib/manifest/rule.d.mts.map +1 -0
  103. package/lib/manifest/rule.d.ts +50 -0
  104. package/lib/manifest/rule.d.ts.map +1 -0
  105. package/lib/manifest/rule.js +84 -0
  106. package/lib/manifest/rule.js.map +1 -0
  107. package/lib/manifest/rule.mjs +80 -0
  108. package/lib/manifest/rule.mjs.map +1 -0
  109. package/lib/manifest/sdui-page.d.mts +33 -0
  110. package/lib/manifest/sdui-page.d.mts.map +1 -0
  111. package/lib/manifest/sdui-page.d.ts +33 -0
  112. package/lib/manifest/sdui-page.d.ts.map +1 -0
  113. package/lib/manifest/sdui-page.js +52 -0
  114. package/lib/manifest/sdui-page.js.map +1 -0
  115. package/lib/manifest/sdui-page.mjs +48 -0
  116. package/lib/manifest/sdui-page.mjs.map +1 -0
  117. package/lib/manifest/validation.d.mts +41 -0
  118. package/lib/manifest/validation.d.mts.map +1 -0
  119. package/lib/manifest/validation.d.ts +41 -0
  120. package/lib/manifest/validation.d.ts.map +1 -0
  121. package/lib/manifest/validation.js +57 -0
  122. package/lib/manifest/validation.js.map +1 -0
  123. package/lib/manifest/validation.mjs +53 -0
  124. package/lib/manifest/validation.mjs.map +1 -0
  125. package/package.json +11 -1
  126. package/resources/draft-hires.d.mts +22 -0
  127. package/resources/draft-hires.d.mts.map +1 -1
  128. package/resources/draft-hires.d.ts +22 -0
  129. package/resources/draft-hires.d.ts.map +1 -1
  130. package/resources/earnings-inputs.d.mts +104 -1
  131. package/resources/earnings-inputs.d.mts.map +1 -1
  132. package/resources/earnings-inputs.d.ts +104 -1
  133. package/resources/earnings-inputs.d.ts.map +1 -1
  134. package/resources/earnings-inputs.js +17 -0
  135. package/resources/earnings-inputs.js.map +1 -1
  136. package/resources/earnings-inputs.mjs +17 -0
  137. package/resources/earnings-inputs.mjs.map +1 -1
  138. package/resources/files.d.mts +149 -0
  139. package/resources/files.d.mts.map +1 -0
  140. package/resources/files.d.ts +149 -0
  141. package/resources/files.d.ts.map +1 -0
  142. package/resources/files.js +25 -0
  143. package/resources/files.js.map +1 -0
  144. package/resources/files.mjs +21 -0
  145. package/resources/files.mjs.map +1 -0
  146. package/resources/index.d.mts +2 -1
  147. package/resources/index.d.mts.map +1 -1
  148. package/resources/index.d.ts +2 -1
  149. package/resources/index.d.ts.map +1 -1
  150. package/resources/index.js +4 -2
  151. package/resources/index.js.map +1 -1
  152. package/resources/index.mjs +1 -0
  153. package/resources/index.mjs.map +1 -1
  154. package/resources/object-categories.d.mts +1 -1
  155. package/resources/object-categories.d.ts +1 -1
  156. package/resources/object-categories.js +1 -1
  157. package/resources/object-categories.mjs +1 -1
  158. package/resources/report-runs.d.mts +11 -11
  159. package/resources/report-runs.d.ts +11 -11
  160. package/resources/workflow-action-executions.d.mts +17 -2
  161. package/resources/workflow-action-executions.d.mts.map +1 -1
  162. package/resources/workflow-action-executions.d.ts +17 -2
  163. package/resources/workflow-action-executions.d.ts.map +1 -1
  164. package/src/client.ts +29 -0
  165. package/src/internal/types.ts +6 -8
  166. package/src/lib/manifest/_helpers.ts +164 -0
  167. package/src/lib/manifest/app.ts +108 -0
  168. package/src/lib/manifest/category.ts +51 -0
  169. package/src/lib/manifest/custom-object-field-section.ts +54 -0
  170. package/src/lib/manifest/custom-object-page-layout.ts +292 -0
  171. package/src/lib/manifest/custom-object.ts +269 -0
  172. package/src/lib/manifest/field.ts +632 -0
  173. package/src/lib/manifest/index.ts +114 -0
  174. package/src/lib/manifest/list-view.ts +103 -0
  175. package/src/lib/manifest/manifest-builder.ts +97 -0
  176. package/src/lib/manifest/manifest-function.ts +81 -0
  177. package/src/lib/manifest/rule.ts +125 -0
  178. package/src/lib/manifest/sdui-page.ts +72 -0
  179. package/src/lib/manifest/validation.ts +87 -0
  180. package/src/resources/draft-hires.ts +26 -0
  181. package/src/resources/earnings-inputs.ts +140 -0
  182. package/src/resources/files.ts +186 -0
  183. package/src/resources/index.ts +3 -0
  184. package/src/resources/object-categories.ts +1 -1
  185. package/src/resources/report-runs.ts +32 -32
  186. package/src/resources/workflow-action-executions.ts +22 -1
  187. package/src/version.ts +1 -1
  188. package/version.d.mts +1 -1
  189. package/version.d.ts +1 -1
  190. package/version.js +1 -1
  191. package/version.mjs +1 -1
@@ -0,0 +1,47 @@
1
+ import { type ObjectScope, type SortOrder } from "./_helpers.js";
2
+ import type { CustomObject } from "./custom-object.js";
3
+ import type { Field } from "./field.js";
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.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-view.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/list-view.ts"],"names":[],"mappings":"OAWO,EAAc,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE;OAChD,KAAK,EAAE,YAAY,EAAE;OACrB,KAAK,EAAE,KAAK,EAAE;AAErB,MAAM,WAAW,gBAAgB;IAC/B,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,0DAA0D;IAC1D,QAAQ,EAAE,OAAO,CAAC;IAClB,mFAAmF;IACnF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gFAAgF;IAChF,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,wDAAwD;IACxD,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnC,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAS;IAC9C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;IAClC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAU;IACpC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAoB;IAC7C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAwB;IACnD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA0B;IACvD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAqB;IAClD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAkC;IAChE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAqB;IAEhD,kEAAkE;gBACtD,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB;IAsB/D,sDAAsD;IACtD,SAAS,IAAI,MAAM;IAInB,uDAAuD;IACvD,sBAAsB,IAAI,MAAM;IAIhC,qEAAqE;IACrE,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAiB9B"}
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ /*
3
+ * The contents of this file were inserted manually and are not generated by Stainless.
4
+ *
5
+ * List view definitions for custom objects (column layout + sorting).
6
+ * Backend schema: CUSTOM_OBJECT_LIST_VIEW (v2)
7
+ *
8
+ * Construction is CDK-style: `new ListViewDef(customObject, props)` — the
9
+ * CO is the first positional arg, and the view auto-registers with the
10
+ * manifest via the CO's scope chain.
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.ListViewDef = void 0;
14
+ const _helpers_1 = require("./_helpers.js");
15
+ class ListViewDef {
16
+ /** Build a new view def and auto-register with the CO's scope. */
17
+ constructor(customObject, props) {
18
+ if (!props.name)
19
+ throw new Error('ListViewDef: name cannot be empty');
20
+ if (!props.fields || props.fields.length === 0) {
21
+ throw new Error('ListViewDef: must have at least one field');
22
+ }
23
+ if (props.sortOrder && !props.orderBy) {
24
+ throw new Error('ListViewDef: sortOrder requires orderBy to be set');
25
+ }
26
+ this._viewId = props.viewId ?? (0, _helpers_1.generateId)('view');
27
+ this._customObjectApiName = customObject.getApiName();
28
+ this._name = props.name;
29
+ this._fields = [...props.fields];
30
+ this._isPublic = props.isPublic;
31
+ this._orderBy = props.orderBy;
32
+ this._sortOrder = props.sortOrder;
33
+ this._objectScope = props.objectScope ?? 'all';
34
+ this._description = props.description;
35
+ this._columnConfig = props.columnConfig;
36
+ this._rqlFilter = props.rqlFilter;
37
+ customObject._register(this);
38
+ }
39
+ /** Backend view_id used as this view's identifier. */
40
+ getViewId() {
41
+ return this._viewId;
42
+ }
43
+ /** api_name of the CustomObject this view lives on. */
44
+ getCustomObjectApiName() {
45
+ return this._customObjectApiName;
46
+ }
47
+ /** Serialize to the backend `CUSTOM_OBJECT_LIST_VIEW` wire shape. */
48
+ toDict() {
49
+ const d = {
50
+ type: 'CUSTOM_OBJECT_LIST_VIEW',
51
+ object_rql_name: this._customObjectApiName,
52
+ view_id: this._viewId,
53
+ name: this._name,
54
+ public: this._isPublic,
55
+ fields: this._fields.map((f) => f.getApiName()),
56
+ };
57
+ if (this._description != null)
58
+ d['description'] = this._description;
59
+ if (this._objectScope != null)
60
+ d['object_scope'] = this._objectScope;
61
+ if (this._sortOrder != null)
62
+ d['sort_order'] = this._sortOrder;
63
+ if (this._orderBy != null)
64
+ d['order_by'] = this._orderBy.getApiName();
65
+ if (this._columnConfig != null)
66
+ d['column_config'] = this._columnConfig;
67
+ if (this._rqlFilter != null)
68
+ d['rql_filter'] = this._rqlFilter;
69
+ return d;
70
+ }
71
+ }
72
+ exports.ListViewDef = ListViewDef;
73
+ //# sourceMappingURL=list-view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-view.js","sourceRoot":"","sources":["../../src/lib/manifest/list-view.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAEH,4CAA0E;AA2B1E,MAAa,WAAW;IAatB,kEAAkE;IAClE,YAAY,YAA0B,EAAE,KAAuB;QAC7D,IAAI,CAAC,KAAK,CAAC,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;QACtE,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/C,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;QAC/D,CAAC;QACD,IAAI,KAAK,CAAC,SAAS,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;YACtC,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;QACvE,CAAC;QACD,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,MAAM,IAAI,IAAA,qBAAU,EAAC,MAAM,CAAC,CAAC;QAClD,IAAI,CAAC,oBAAoB,GAAG,YAAY,CAAC,UAAU,EAAE,CAAC;QACtD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC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AAQ,CAAC,UAAU,EAAE,CAAC;QACtE,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI;YAAE,CAAC,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC;QACxE,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI;YAAE,CAAC,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QAC/D,OAAO,CAAC,CAAC;IACX,CAAC;CACF;AAhED,kCAgEC"}
@@ -0,0 +1,69 @@
1
+ /*
2
+ * The contents of this file were inserted manually and are not generated by Stainless.
3
+ *
4
+ * List view definitions for custom objects (column layout + sorting).
5
+ * Backend schema: CUSTOM_OBJECT_LIST_VIEW (v2)
6
+ *
7
+ * Construction is CDK-style: `new ListViewDef(customObject, props)` — the
8
+ * CO is the first positional arg, and the view auto-registers with the
9
+ * manifest via the CO's scope chain.
10
+ */
11
+ import { generateId } from "./_helpers.mjs";
12
+ export class ListViewDef {
13
+ /** Build a new view def and auto-register with the CO's scope. */
14
+ constructor(customObject, props) {
15
+ if (!props.name)
16
+ throw new Error('ListViewDef: name cannot be empty');
17
+ if (!props.fields || props.fields.length === 0) {
18
+ throw new Error('ListViewDef: must have at least one field');
19
+ }
20
+ if (props.sortOrder && !props.orderBy) {
21
+ throw new Error('ListViewDef: sortOrder requires orderBy to be set');
22
+ }
23
+ this._viewId = props.viewId ?? generateId('view');
24
+ this._customObjectApiName = customObject.getApiName();
25
+ this._name = props.name;
26
+ this._fields = [...props.fields];
27
+ this._isPublic = props.isPublic;
28
+ this._orderBy = props.orderBy;
29
+ this._sortOrder = props.sortOrder;
30
+ this._objectScope = props.objectScope ?? 'all';
31
+ this._description = props.description;
32
+ this._columnConfig = props.columnConfig;
33
+ this._rqlFilter = props.rqlFilter;
34
+ customObject._register(this);
35
+ }
36
+ /** Backend view_id used as this view's identifier. */
37
+ getViewId() {
38
+ return this._viewId;
39
+ }
40
+ /** api_name of the CustomObject this view lives on. */
41
+ getCustomObjectApiName() {
42
+ return this._customObjectApiName;
43
+ }
44
+ /** Serialize to the backend `CUSTOM_OBJECT_LIST_VIEW` wire shape. */
45
+ toDict() {
46
+ const d = {
47
+ type: 'CUSTOM_OBJECT_LIST_VIEW',
48
+ object_rql_name: this._customObjectApiName,
49
+ view_id: this._viewId,
50
+ name: this._name,
51
+ public: this._isPublic,
52
+ fields: this._fields.map((f) => f.getApiName()),
53
+ };
54
+ if (this._description != null)
55
+ d['description'] = this._description;
56
+ if (this._objectScope != null)
57
+ d['object_scope'] = this._objectScope;
58
+ if (this._sortOrder != null)
59
+ d['sort_order'] = this._sortOrder;
60
+ if (this._orderBy != null)
61
+ d['order_by'] = this._orderBy.getApiName();
62
+ if (this._columnConfig != null)
63
+ d['column_config'] = this._columnConfig;
64
+ if (this._rqlFilter != null)
65
+ d['rql_filter'] = this._rqlFilter;
66
+ return d;
67
+ }
68
+ }
69
+ //# sourceMappingURL=list-view.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-view.mjs","sourceRoot":"","sources":["../../src/lib/manifest/list-view.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;OAEI,EAAE,UAAU,EAAoC;AA2BvD,MAAM,OAAO,WAAW;IAatB,kEAAkE;IAClE,YAAY,YAA0B,EAAE,KAAuB;QAC7D,IAAI,CAAC,KAAK,CAAC,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;QACtE,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/C,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;QAC/D,CAAC;QACD,IAAI,KAAK,CAAC,SAAS,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;YACtC,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;QACvE,CAAC;QACD,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,MAAM,IAAI,UAAU,C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aAAa,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC;QACpE,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI;YAAE,CAAC,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC;QACrE,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI;YAAE,CAAC,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QAC/D,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI;YAAE,CAAC,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;QACtE,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI;YAAE,CAAC,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC;QACxE,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI;YAAE,CAAC,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QAC/D,OAAO,CAAC,CAAC;IACX,CAAC;CACF"}
@@ -0,0 +1,44 @@
1
+ /** Any object with a toDict() method can be a manifest component. */
2
+ export interface ManifestComponent {
3
+ toDict(): Record<string, any>;
4
+ }
5
+ /**
6
+ * A scope — anything that can accept a child component for registration.
7
+ * Implemented by `ManifestBuilder` (root) and by nestable parents like
8
+ * `CustomObject` and `CustomObjectFieldSection` that forward to the builder.
9
+ */
10
+ export interface ManifestScope {
11
+ /** @internal Register a child component; builder-bound scopes forward up. */
12
+ _register(component: ManifestComponent): void;
13
+ }
14
+ export interface ManifestBuilderProps {
15
+ /** Unique project key for this manifest. */
16
+ key: string;
17
+ /** Display name (defaults to key if not provided). */
18
+ name?: string;
19
+ /** Optional description. */
20
+ description?: string;
21
+ }
22
+ export declare class ManifestBuilder implements ManifestScope {
23
+ readonly key: string;
24
+ readonly name: string;
25
+ readonly description: string;
26
+ private readonly _components;
27
+ /** Build a new manifest; `name` defaults to `key` when unset. */
28
+ constructor(props: ManifestBuilderProps);
29
+ /**
30
+ * @internal Scope hook invoked by child constructors. Components enter the
31
+ * manifest here — there is no other path.
32
+ */
33
+ _register(component: ManifestComponent): void;
34
+ /** Build the manifest object: metadata + flat component list. */
35
+ buildManifest(): {
36
+ metadata: Record<string, any>;
37
+ components: Record<string, any>[];
38
+ };
39
+ /** Flat list of all component dicts. */
40
+ componentsList(): Record<string, any>[];
41
+ /** Pretty-printed JSON string. */
42
+ preview(): string;
43
+ }
44
+ //# sourceMappingURL=manifest-builder.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest-builder.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/manifest-builder.ts"],"names":[],"mappings":"AAuBA,qEAAqE;AACrE,MAAM,WAAW,iBAAiB;IAChC,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC/B;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,6EAA6E;IAC7E,SAAS,CAAC,SAAS,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC/C;AAED,MAAM,WAAW,oBAAoB;IACnC,4CAA4C;IAC5C,GAAG,EAAE,MAAM,CAAC;IACZ,sDAAsD;IACtD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4BAA4B;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,eAAgB,YAAW,aAAa;IACnD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA2B;IAEvD,iEAAiE;gBACrD,KAAK,EAAE,oBAAoB;IASvC;;;OAGG;IACH,SAAS,CAAC,SAAS,EAAE,iBAAiB,GAAG,IAAI;IAO7C,iEAAiE;IACjE,aAAa,IAAI;QAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAA;KAAE;IAYrF,wCAAwC;IACxC,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE;IAIvC,kCAAkC;IAClC,OAAO,IAAI,MAAM;CAGlB"}
@@ -0,0 +1,44 @@
1
+ /** Any object with a toDict() method can be a manifest component. */
2
+ export interface ManifestComponent {
3
+ toDict(): Record<string, any>;
4
+ }
5
+ /**
6
+ * A scope — anything that can accept a child component for registration.
7
+ * Implemented by `ManifestBuilder` (root) and by nestable parents like
8
+ * `CustomObject` and `CustomObjectFieldSection` that forward to the builder.
9
+ */
10
+ export interface ManifestScope {
11
+ /** @internal Register a child component; builder-bound scopes forward up. */
12
+ _register(component: ManifestComponent): void;
13
+ }
14
+ export interface ManifestBuilderProps {
15
+ /** Unique project key for this manifest. */
16
+ key: string;
17
+ /** Display name (defaults to key if not provided). */
18
+ name?: string;
19
+ /** Optional description. */
20
+ description?: string;
21
+ }
22
+ export declare class ManifestBuilder implements ManifestScope {
23
+ readonly key: string;
24
+ readonly name: string;
25
+ readonly description: string;
26
+ private readonly _components;
27
+ /** Build a new manifest; `name` defaults to `key` when unset. */
28
+ constructor(props: ManifestBuilderProps);
29
+ /**
30
+ * @internal Scope hook invoked by child constructors. Components enter the
31
+ * manifest here — there is no other path.
32
+ */
33
+ _register(component: ManifestComponent): void;
34
+ /** Build the manifest object: metadata + flat component list. */
35
+ buildManifest(): {
36
+ metadata: Record<string, any>;
37
+ components: Record<string, any>[];
38
+ };
39
+ /** Flat list of all component dicts. */
40
+ componentsList(): Record<string, any>[];
41
+ /** Pretty-printed JSON string. */
42
+ preview(): string;
43
+ }
44
+ //# sourceMappingURL=manifest-builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest-builder.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/manifest-builder.ts"],"names":[],"mappings":"AAuBA,qEAAqE;AACrE,MAAM,WAAW,iBAAiB;IAChC,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC/B;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,6EAA6E;IAC7E,SAAS,CAAC,SAAS,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC/C;AAED,MAAM,WAAW,oBAAoB;IACnC,4CAA4C;IAC5C,GAAG,EAAE,MAAM,CAAC;IACZ,sDAAsD;IACtD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4BAA4B;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,eAAgB,YAAW,aAAa;IACnD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA2B;IAEvD,iEAAiE;gBACrD,KAAK,EAAE,oBAAoB;IASvC;;;OAGG;IACH,SAAS,CAAC,SAAS,EAAE,iBAAiB,GAAG,IAAI;IAO7C,iEAAiE;IACjE,aAAa,IAAI;QAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAA;KAAE;IAYrF,wCAAwC;IACxC,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE;IAIvC,kCAAkC;IAClC,OAAO,IAAI,MAAM;CAGlB"}
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ /*
3
+ * The contents of this file were inserted manually and are not generated by Stainless.
4
+ *
5
+ * ManifestBuilder collects manifest components and serializes to JSON.
6
+ *
7
+ * Wiring model (CDK-style scope-first):
8
+ * - Every component takes its parent scope as the first positional
9
+ * constructor arg. The scope is either a `ManifestBuilder` (root) or a
10
+ * `CustomObject` / `CustomObjectFieldSection` for nested children.
11
+ * - Constructing a component auto-registers it with the builder via the
12
+ * scope's `_register` hook. There is no public `addComponent` — the
13
+ * only way a component enters the manifest is by being constructed
14
+ * with a scope that forwards up to this builder.
15
+ * - The builder does not walk into components; each component emits the
16
+ * foreign-key fields (`custom_object_api_name`, `model_rql_name`, ...)
17
+ * itself in `toDict()`.
18
+ *
19
+ * Local operations only (no HTTP):
20
+ * - preview() — render manifest as a JSON string
21
+ * - buildManifest() — return the manifest as a plain object
22
+ * - componentsList() — return the flat list of component dicts
23
+ */
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.ManifestBuilder = void 0;
26
+ class ManifestBuilder {
27
+ /** Build a new manifest; `name` defaults to `key` when unset. */
28
+ constructor(props) {
29
+ this._components = [];
30
+ if (!props.key) {
31
+ throw new Error('key is required');
32
+ }
33
+ this.key = props.key;
34
+ this.name = props.name || props.key;
35
+ this.description = props.description ?? '';
36
+ }
37
+ /**
38
+ * @internal Scope hook invoked by child constructors. Components enter the
39
+ * manifest here — there is no other path.
40
+ */
41
+ _register(component) {
42
+ if (typeof component.toDict !== 'function') {
43
+ throw new TypeError('Component must have a toDict() method');
44
+ }
45
+ this._components.push(component);
46
+ }
47
+ /** Build the manifest object: metadata + flat component list. */
48
+ buildManifest() {
49
+ const metadata = {
50
+ key: this.key,
51
+ name: this.name,
52
+ };
53
+ if (this.description) {
54
+ metadata['description'] = this.description;
55
+ }
56
+ const components = this._components.map((c) => c.toDict());
57
+ return { metadata, components };
58
+ }
59
+ /** Flat list of all component dicts. */
60
+ componentsList() {
61
+ return this._components.map((c) => c.toDict());
62
+ }
63
+ /** Pretty-printed JSON string. */
64
+ preview() {
65
+ return JSON.stringify(this.buildManifest(), null, 2);
66
+ }
67
+ }
68
+ exports.ManifestBuilder = ManifestBuilder;
69
+ //# sourceMappingURL=manifest-builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest-builder.js","sourceRoot":"","sources":["../../src/lib/manifest/manifest-builder.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;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,CAAC;IACjD,CAAC;IAED,kCAAkC;IAClC,OAAO;QACL,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACvD,CAAC;CACF;AAjDD,0CAiDC"}
@@ -0,0 +1,65 @@
1
+ /*
2
+ * The contents of this file were inserted manually and are not generated by Stainless.
3
+ *
4
+ * ManifestBuilder collects manifest components and serializes to JSON.
5
+ *
6
+ * Wiring model (CDK-style scope-first):
7
+ * - Every component takes its parent scope as the first positional
8
+ * constructor arg. The scope is either a `ManifestBuilder` (root) or a
9
+ * `CustomObject` / `CustomObjectFieldSection` for nested children.
10
+ * - Constructing a component auto-registers it with the builder via the
11
+ * scope's `_register` hook. There is no public `addComponent` — the
12
+ * only way a component enters the manifest is by being constructed
13
+ * with a scope that forwards up to this builder.
14
+ * - The builder does not walk into components; each component emits the
15
+ * foreign-key fields (`custom_object_api_name`, `model_rql_name`, ...)
16
+ * itself in `toDict()`.
17
+ *
18
+ * Local operations only (no HTTP):
19
+ * - preview() — render manifest as a JSON string
20
+ * - buildManifest() — return the manifest as a plain object
21
+ * - componentsList() — return the flat list of component dicts
22
+ */
23
+ export class ManifestBuilder {
24
+ /** Build a new manifest; `name` defaults to `key` when unset. */
25
+ constructor(props) {
26
+ this._components = [];
27
+ if (!props.key) {
28
+ throw new Error('key is required');
29
+ }
30
+ this.key = props.key;
31
+ this.name = props.name || props.key;
32
+ this.description = props.description ?? '';
33
+ }
34
+ /**
35
+ * @internal Scope hook invoked by child constructors. Components enter the
36
+ * manifest here — there is no other path.
37
+ */
38
+ _register(component) {
39
+ if (typeof component.toDict !== 'function') {
40
+ throw new TypeError('Component must have a toDict() method');
41
+ }
42
+ this._components.push(component);
43
+ }
44
+ /** Build the manifest object: metadata + flat component list. */
45
+ buildManifest() {
46
+ const metadata = {
47
+ key: this.key,
48
+ name: this.name,
49
+ };
50
+ if (this.description) {
51
+ metadata['description'] = this.description;
52
+ }
53
+ const components = this._components.map((c) => c.toDict());
54
+ return { metadata, components };
55
+ }
56
+ /** Flat list of all component dicts. */
57
+ componentsList() {
58
+ return this._components.map((c) => c.toDict());
59
+ }
60
+ /** Pretty-printed JSON string. */
61
+ preview() {
62
+ return JSON.stringify(this.buildManifest(), null, 2);
63
+ }
64
+ }
65
+ //# sourceMappingURL=manifest-builder.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest-builder.mjs","sourceRoot":"","sources":["../../src/lib/manifest/manifest-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AA0BH,MAAM,OAAO,eAAe;IAM1B,iEAAiE;IACjE,YAAY,KAA2B;QAHtB,gBAAW,GAAwB,EAAE,CAAC;QAIrD,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;QACrC,CAAC;QACD,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,GAAG,CAAC;QACpC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,IAAI,EAAE,CAAC;IAC7C,CAAC;IAED;;;OAGG;IACH,SAAS,CAAC,SAA4B;QACpC,IAAI,OAAO,SAAS,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;YAC3C,MAAM,IAAI,SAAS,CAAC,uCAAuC,CAAC,CAAC;QAC/D,CAAC;QACD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC;IAED,iEAAiE;IACjE,aAAa;QACX,MAAM,QAAQ,GAAwB;YACpC,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;QACF,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,QAAQ,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;QAC7C,CAAC;QACD,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QAC3D,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IAClC,CAAC;IAED,wCAAwC;IACxC,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACjD,CAAC;IAED,kCAAkC;IAClC,OAAO;QACL,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACvD,CAAC;CACF"}
@@ -0,0 +1,39 @@
1
+ import type { FunctionRuntime } from "./_helpers.mjs";
2
+ import type { ManifestScope } from "./manifest-builder.mjs";
3
+ export interface ManifestFunctionProps {
4
+ /** Required. Function api_name (snake_case identifier). */
5
+ apiName: string;
6
+ /** Required. Display name shown in the UI. */
7
+ name: string;
8
+ /** Optional. TypeScript handler source; must export `onRipplingEvent`. @default '' */
9
+ code?: string;
10
+ /** Optional. Function description. @default '' */
11
+ description?: string;
12
+ /** Optional. NPM package dependencies. @default null */
13
+ dependencies?: Record<string, string>;
14
+ /** Optional. Raw deployment options. Prefer `runtime`. @default null */
15
+ deploymentOptions?: Record<string, any>;
16
+ /** Optional. Shorthand: sets `deploymentOptions.runtime`. */
17
+ runtime?: FunctionRuntime;
18
+ /** Optional. Outbound domain allowlist. @default null */
19
+ allowedDomains?: string[];
20
+ /** Optional. Whether the function runs asynchronously. @default false */
21
+ isAsync?: boolean;
22
+ }
23
+ export declare class ManifestFunction {
24
+ private readonly _apiName;
25
+ private readonly _name;
26
+ private readonly _code;
27
+ private readonly _description;
28
+ private readonly _dependencies;
29
+ private readonly _deploymentOptions;
30
+ private readonly _allowedDomains;
31
+ private readonly _isAsync;
32
+ /** Build a new function and auto-register with `scope`; `runtime` is merged into `deploymentOptions` if set. */
33
+ constructor(scope: ManifestScope, props: ManifestFunctionProps);
34
+ /** Backend api_name for this function. */
35
+ getApiName(): string;
36
+ /** Serialize to the backend `FUNCTION` wire shape; empty fields are omitted. */
37
+ toDict(): Record<string, any>;
38
+ }
39
+ //# sourceMappingURL=manifest-function.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest-function.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/manifest-function.ts"],"names":[],"mappings":"OAUO,KAAK,EAAE,eAAe,EAAE;OACxB,KAAK,EAAE,aAAa,EAAE;AAE7B,MAAM,WAAW,qBAAqB;IACpC,2DAA2D;IAC3D,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,sFAAsF;IACtF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,wEAAwE;IACxE,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACxC,6DAA6D;IAC7D,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,yDAAyD;IACzD,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,yEAAyE;IACzE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAqC;IACnE,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAkC;IACrE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAuB;IACvD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;IAEnC,gHAAgH;gBACpG,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,qBAAqB;IAe9D,0CAA0C;IAC1C,UAAU,IAAI,MAAM;IAIpB,gFAAgF;IAChF,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAc9B"}
@@ -0,0 +1,39 @@
1
+ import type { FunctionRuntime } from "./_helpers.js";
2
+ import type { ManifestScope } from "./manifest-builder.js";
3
+ export interface ManifestFunctionProps {
4
+ /** Required. Function api_name (snake_case identifier). */
5
+ apiName: string;
6
+ /** Required. Display name shown in the UI. */
7
+ name: string;
8
+ /** Optional. TypeScript handler source; must export `onRipplingEvent`. @default '' */
9
+ code?: string;
10
+ /** Optional. Function description. @default '' */
11
+ description?: string;
12
+ /** Optional. NPM package dependencies. @default null */
13
+ dependencies?: Record<string, string>;
14
+ /** Optional. Raw deployment options. Prefer `runtime`. @default null */
15
+ deploymentOptions?: Record<string, any>;
16
+ /** Optional. Shorthand: sets `deploymentOptions.runtime`. */
17
+ runtime?: FunctionRuntime;
18
+ /** Optional. Outbound domain allowlist. @default null */
19
+ allowedDomains?: string[];
20
+ /** Optional. Whether the function runs asynchronously. @default false */
21
+ isAsync?: boolean;
22
+ }
23
+ export declare class ManifestFunction {
24
+ private readonly _apiName;
25
+ private readonly _name;
26
+ private readonly _code;
27
+ private readonly _description;
28
+ private readonly _dependencies;
29
+ private readonly _deploymentOptions;
30
+ private readonly _allowedDomains;
31
+ private readonly _isAsync;
32
+ /** Build a new function and auto-register with `scope`; `runtime` is merged into `deploymentOptions` if set. */
33
+ constructor(scope: ManifestScope, props: ManifestFunctionProps);
34
+ /** Backend api_name for this function. */
35
+ getApiName(): string;
36
+ /** Serialize to the backend `FUNCTION` wire shape; empty fields are omitted. */
37
+ toDict(): Record<string, any>;
38
+ }
39
+ //# sourceMappingURL=manifest-function.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest-function.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/manifest-function.ts"],"names":[],"mappings":"OAUO,KAAK,EAAE,eAAe,EAAE;OACxB,KAAK,EAAE,aAAa,EAAE;AAE7B,MAAM,WAAW,qBAAqB;IACpC,2DAA2D;IAC3D,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,sFAAsF;IACtF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,wEAAwE;IACxE,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACxC,6DAA6D;IAC7D,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,yDAAyD;IACzD,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,yEAAyE;IACzE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAqC;IACnE,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAkC;IACrE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAuB;IACvD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;IAEnC,gHAAgH;gBACpG,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,qBAAqB;IAe9D,0CAA0C;IAC1C,UAAU,IAAI,MAAM;IAIpB,gFAAgF;IAChF,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAc9B"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ /*
3
+ * The contents of this file were inserted manually and are not generated by Stainless.
4
+ *
5
+ * Custom function definitions (TypeScript handler code).
6
+ * Backend schema: FUNCTION (v2)
7
+ *
8
+ * Named ManifestFunction to avoid collision with the JavaScript built-in Function.
9
+ * Re-exported as both ManifestFunction and Function from the barrel.
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ManifestFunction = void 0;
13
+ class ManifestFunction {
14
+ /** Build a new function and auto-register with `scope`; `runtime` is merged into `deploymentOptions` if set. */
15
+ constructor(scope, props) {
16
+ this._apiName = props.apiName;
17
+ this._name = props.name;
18
+ this._code = props.code ?? '';
19
+ this._description = props.description ?? '';
20
+ this._dependencies = props.dependencies;
21
+ this._deploymentOptions = props.deploymentOptions;
22
+ if (props.runtime) {
23
+ this._deploymentOptions = { ...(this._deploymentOptions ?? {}), runtime: props.runtime };
24
+ }
25
+ this._allowedDomains = props.allowedDomains;
26
+ this._isAsync = props.isAsync ?? false;
27
+ scope._register(this);
28
+ }
29
+ /** Backend api_name for this function. */
30
+ getApiName() {
31
+ return this._apiName;
32
+ }
33
+ /** Serialize to the backend `FUNCTION` wire shape; empty fields are omitted. */
34
+ toDict() {
35
+ const component = {
36
+ type: 'FUNCTION',
37
+ name: this._name,
38
+ api_name: this._apiName,
39
+ };
40
+ if (this._description)
41
+ component['description'] = this._description;
42
+ if (this._code)
43
+ component['code_draft'] = this._code;
44
+ if (this._dependencies != null)
45
+ component['dependencies'] = this._dependencies;
46
+ if (this._deploymentOptions != null)
47
+ component['deployment_options'] = this._deploymentOptions;
48
+ if (this._allowedDomains != null)
49
+ component['allowed_domains'] = this._allowedDomains;
50
+ if (this._isAsync)
51
+ component['is_async'] = true;
52
+ return component;
53
+ }
54
+ }
55
+ exports.ManifestFunction = ManifestFunction;
56
+ //# sourceMappingURL=manifest-function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest-function.js","sourceRoot":"","sources":["../../src/lib/manifest/manifest-function.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AA0BH,MAAa,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,GAAG,KAAK,CAAC,iBAAiB,CAAC;QAClD,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;YAClB,IAAI,CAAC,kBAAkB,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,kBAAkB,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;QAC3F,CAAC;QACD,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC;QAC5C,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC;QACvC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAED,0CAA0C;IAC1C,UAAU;QACR,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,gFAAgF;IAChF,MAAM;QACJ,MAAM,SAAS,GAAwB;YACrC,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,IAAI,CAAC,KAAK;YAChB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC;QACF,IAAI,IAAI,CAAC,YAAY;YAAE,SAAS,CAAC,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