@rippling/rippling-sdk 0.2.0-alpha.34 → 0.2.0-alpha.36

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 (270) hide show
  1. package/client.d.mts +6 -0
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts +6 -0
  4. package/client.d.ts.map +1 -1
  5. package/client.js +6 -0
  6. package/client.js.map +1 -1
  7. package/client.mjs +6 -0
  8. package/client.mjs.map +1 -1
  9. package/examples/.keep +4 -0
  10. package/examples/manifest/dental-practice-management/dental-practice-management.ts +651 -0
  11. package/examples/manifest/dental-practice-management/manifest.json +1870 -0
  12. package/examples/manifest/gym-membership-management/gym-membership-management.ts +757 -0
  13. package/examples/manifest/gym-membership-management/manifest.json +1975 -0
  14. package/examples/sdui/sdui-crud-todo/rippling-function.ts +367 -0
  15. package/examples/sdui/sdui-crud-todo/sdui-crud-todo.ts +282 -0
  16. package/examples/sdui/sdui-showcase/rippling-function.ts +381 -0
  17. package/examples/sdui/sdui-showcase/sdui-showcase.ts +351 -0
  18. package/examples/sdui/sdui-tab-multi-view/rippling-function.ts +1061 -0
  19. package/examples/sdui/sdui-tab-multi-view/sdui-tab-multi-view.ts +924 -0
  20. package/examples/sdui/vote/rippling-function.ts +330 -0
  21. package/examples/sdui/vote/vote.ts +298 -0
  22. package/lib/manifest/app.d.mts +81 -13
  23. package/lib/manifest/app.d.mts.map +1 -1
  24. package/lib/manifest/app.d.ts +81 -13
  25. package/lib/manifest/app.d.ts.map +1 -1
  26. package/lib/manifest/app.js +37 -16
  27. package/lib/manifest/app.js.map +1 -1
  28. package/lib/manifest/app.mjs +37 -16
  29. package/lib/manifest/app.mjs.map +1 -1
  30. package/lib/manifest/category.d.mts +63 -7
  31. package/lib/manifest/category.d.mts.map +1 -1
  32. package/lib/manifest/category.d.ts +63 -7
  33. package/lib/manifest/category.d.ts.map +1 -1
  34. package/lib/manifest/category.js +45 -10
  35. package/lib/manifest/category.js.map +1 -1
  36. package/lib/manifest/category.mjs +43 -8
  37. package/lib/manifest/category.mjs.map +1 -1
  38. package/lib/manifest/custom-object-field-section.d.mts +56 -6
  39. package/lib/manifest/custom-object-field-section.d.mts.map +1 -1
  40. package/lib/manifest/custom-object-field-section.d.ts +56 -6
  41. package/lib/manifest/custom-object-field-section.d.ts.map +1 -1
  42. package/lib/manifest/custom-object-field-section.js +41 -14
  43. package/lib/manifest/custom-object-field-section.js.map +1 -1
  44. package/lib/manifest/custom-object-field-section.mjs +39 -12
  45. package/lib/manifest/custom-object-field-section.mjs.map +1 -1
  46. package/lib/manifest/custom-object-page-layout.d.mts +201 -41
  47. package/lib/manifest/custom-object-page-layout.d.mts.map +1 -1
  48. package/lib/manifest/custom-object-page-layout.d.ts +201 -41
  49. package/lib/manifest/custom-object-page-layout.d.ts.map +1 -1
  50. package/lib/manifest/custom-object-page-layout.js +76 -30
  51. package/lib/manifest/custom-object-page-layout.js.map +1 -1
  52. package/lib/manifest/custom-object-page-layout.mjs +74 -28
  53. package/lib/manifest/custom-object-page-layout.mjs.map +1 -1
  54. package/lib/manifest/custom-object.d.mts +128 -15
  55. package/lib/manifest/custom-object.d.mts.map +1 -1
  56. package/lib/manifest/custom-object.d.ts +128 -15
  57. package/lib/manifest/custom-object.d.ts.map +1 -1
  58. package/lib/manifest/custom-object.js +61 -26
  59. package/lib/manifest/custom-object.js.map +1 -1
  60. package/lib/manifest/custom-object.mjs +61 -26
  61. package/lib/manifest/custom-object.mjs.map +1 -1
  62. package/lib/manifest/field.d.mts +265 -54
  63. package/lib/manifest/field.d.mts.map +1 -1
  64. package/lib/manifest/field.d.ts +265 -54
  65. package/lib/manifest/field.d.ts.map +1 -1
  66. package/lib/manifest/field.js +100 -57
  67. package/lib/manifest/field.js.map +1 -1
  68. package/lib/manifest/field.mjs +100 -57
  69. package/lib/manifest/field.mjs.map +1 -1
  70. package/lib/manifest/list-view.d.mts +105 -14
  71. package/lib/manifest/list-view.d.mts.map +1 -1
  72. package/lib/manifest/list-view.d.ts +105 -14
  73. package/lib/manifest/list-view.d.ts.map +1 -1
  74. package/lib/manifest/list-view.js +50 -14
  75. package/lib/manifest/list-view.js.map +1 -1
  76. package/lib/manifest/list-view.mjs +48 -12
  77. package/lib/manifest/list-view.mjs.map +1 -1
  78. package/lib/manifest/manifest-builder.d.mts +77 -11
  79. package/lib/manifest/manifest-builder.d.mts.map +1 -1
  80. package/lib/manifest/manifest-builder.d.ts +77 -11
  81. package/lib/manifest/manifest-builder.d.ts.map +1 -1
  82. package/lib/manifest/manifest-builder.js +46 -24
  83. package/lib/manifest/manifest-builder.js.map +1 -1
  84. package/lib/manifest/manifest-builder.mjs +44 -22
  85. package/lib/manifest/manifest-builder.mjs.map +1 -1
  86. package/lib/manifest/manifest-function.d.mts +92 -12
  87. package/lib/manifest/manifest-function.d.mts.map +1 -1
  88. package/lib/manifest/manifest-function.d.ts +92 -12
  89. package/lib/manifest/manifest-function.d.ts.map +1 -1
  90. package/lib/manifest/manifest-function.js +40 -11
  91. package/lib/manifest/manifest-function.js.map +1 -1
  92. package/lib/manifest/manifest-function.mjs +38 -9
  93. package/lib/manifest/manifest-function.mjs.map +1 -1
  94. package/lib/manifest/rule.d.mts +94 -16
  95. package/lib/manifest/rule.d.mts.map +1 -1
  96. package/lib/manifest/rule.d.ts +94 -16
  97. package/lib/manifest/rule.d.ts.map +1 -1
  98. package/lib/manifest/rule.js +36 -15
  99. package/lib/manifest/rule.js.map +1 -1
  100. package/lib/manifest/rule.mjs +36 -15
  101. package/lib/manifest/rule.mjs.map +1 -1
  102. package/lib/manifest/sdui-page.d.mts +67 -11
  103. package/lib/manifest/sdui-page.d.mts.map +1 -1
  104. package/lib/manifest/sdui-page.d.ts +67 -11
  105. package/lib/manifest/sdui-page.d.ts.map +1 -1
  106. package/lib/manifest/sdui-page.js +44 -13
  107. package/lib/manifest/sdui-page.js.map +1 -1
  108. package/lib/manifest/sdui-page.mjs +42 -11
  109. package/lib/manifest/sdui-page.mjs.map +1 -1
  110. package/lib/manifest/validation.d.mts +87 -12
  111. package/lib/manifest/validation.d.mts.map +1 -1
  112. package/lib/manifest/validation.d.ts +87 -12
  113. package/lib/manifest/validation.d.ts.map +1 -1
  114. package/lib/manifest/validation.js +41 -15
  115. package/lib/manifest/validation.js.map +1 -1
  116. package/lib/manifest/validation.mjs +39 -13
  117. package/lib/manifest/validation.mjs.map +1 -1
  118. package/lib/sdui/actions.d.mts +25 -0
  119. package/lib/sdui/actions.d.mts.map +1 -0
  120. package/lib/sdui/actions.d.ts +25 -0
  121. package/lib/sdui/actions.d.ts.map +1 -0
  122. package/lib/sdui/actions.js +53 -0
  123. package/lib/sdui/actions.js.map +1 -0
  124. package/lib/sdui/actions.mjs +42 -0
  125. package/lib/sdui/actions.mjs.map +1 -0
  126. package/lib/sdui/component.d.mts +41 -0
  127. package/lib/sdui/component.d.mts.map +1 -0
  128. package/lib/sdui/component.d.ts +41 -0
  129. package/lib/sdui/component.d.ts.map +1 -0
  130. package/lib/sdui/component.js +95 -0
  131. package/lib/sdui/component.js.map +1 -0
  132. package/lib/sdui/component.mjs +91 -0
  133. package/lib/sdui/component.mjs.map +1 -0
  134. package/lib/sdui/components.d.mts +149 -0
  135. package/lib/sdui/components.d.mts.map +1 -0
  136. package/lib/sdui/components.d.ts +149 -0
  137. package/lib/sdui/components.d.ts.map +1 -0
  138. package/lib/sdui/components.js +303 -0
  139. package/lib/sdui/components.js.map +1 -0
  140. package/lib/sdui/components.mjs +298 -0
  141. package/lib/sdui/components.mjs.map +1 -0
  142. package/lib/sdui/conditions.d.mts +25 -0
  143. package/lib/sdui/conditions.d.mts.map +1 -0
  144. package/lib/sdui/conditions.d.ts +25 -0
  145. package/lib/sdui/conditions.d.ts.map +1 -0
  146. package/lib/sdui/conditions.js +47 -0
  147. package/lib/sdui/conditions.js.map +1 -0
  148. package/lib/sdui/conditions.mjs +35 -0
  149. package/lib/sdui/conditions.mjs.map +1 -0
  150. package/lib/sdui/directives.d.mts +18 -0
  151. package/lib/sdui/directives.d.mts.map +1 -0
  152. package/lib/sdui/directives.d.ts +18 -0
  153. package/lib/sdui/directives.d.ts.map +1 -0
  154. package/lib/sdui/directives.js +28 -0
  155. package/lib/sdui/directives.js.map +1 -0
  156. package/lib/sdui/directives.mjs +21 -0
  157. package/lib/sdui/directives.mjs.map +1 -0
  158. package/lib/sdui/index.d.mts +362 -0
  159. package/lib/sdui/index.d.mts.map +1 -0
  160. package/lib/sdui/index.d.ts +362 -0
  161. package/lib/sdui/index.d.ts.map +1 -0
  162. package/lib/sdui/index.js +375 -0
  163. package/lib/sdui/index.js.map +1 -0
  164. package/lib/sdui/index.mjs +199 -0
  165. package/lib/sdui/index.mjs.map +1 -0
  166. package/lib/sdui/props.d.mts +12 -0
  167. package/lib/sdui/props.d.mts.map +1 -0
  168. package/lib/sdui/props.d.ts +12 -0
  169. package/lib/sdui/props.d.ts.map +1 -0
  170. package/lib/sdui/props.js +25 -0
  171. package/lib/sdui/props.js.map +1 -0
  172. package/lib/sdui/props.mjs +21 -0
  173. package/lib/sdui/props.mjs.map +1 -0
  174. package/lib/sdui/render.d.mts +23 -0
  175. package/lib/sdui/render.d.mts.map +1 -0
  176. package/lib/sdui/render.d.ts +23 -0
  177. package/lib/sdui/render.d.ts.map +1 -0
  178. package/lib/sdui/render.js +40 -0
  179. package/lib/sdui/render.js.map +1 -0
  180. package/lib/sdui/render.mjs +37 -0
  181. package/lib/sdui/render.mjs.map +1 -0
  182. package/lib/sdui/state.d.mts +22 -0
  183. package/lib/sdui/state.d.mts.map +1 -0
  184. package/lib/sdui/state.d.ts +22 -0
  185. package/lib/sdui/state.d.ts.map +1 -0
  186. package/lib/sdui/state.js +57 -0
  187. package/lib/sdui/state.js.map +1 -0
  188. package/lib/sdui/state.mjs +53 -0
  189. package/lib/sdui/state.mjs.map +1 -0
  190. package/package.json +11 -1
  191. package/resources/company-legal-entity-workers.d.mts +79 -0
  192. package/resources/company-legal-entity-workers.d.mts.map +1 -0
  193. package/resources/company-legal-entity-workers.d.ts +79 -0
  194. package/resources/company-legal-entity-workers.d.ts.map +1 -0
  195. package/resources/company-legal-entity-workers.js +30 -0
  196. package/resources/company-legal-entity-workers.js.map +1 -0
  197. package/resources/company-legal-entity-workers.mjs +26 -0
  198. package/resources/company-legal-entity-workers.mjs.map +1 -0
  199. package/resources/draft-hires.d.mts +4 -0
  200. package/resources/draft-hires.d.mts.map +1 -1
  201. package/resources/draft-hires.d.ts +4 -0
  202. package/resources/draft-hires.d.ts.map +1 -1
  203. package/resources/files.d.mts +16 -1
  204. package/resources/files.d.mts.map +1 -1
  205. package/resources/files.d.ts +16 -1
  206. package/resources/files.d.ts.map +1 -1
  207. package/resources/headcount-positions.d.mts +2 -2
  208. package/resources/headcount-positions.d.mts.map +1 -1
  209. package/resources/headcount-positions.d.ts +2 -2
  210. package/resources/headcount-positions.d.ts.map +1 -1
  211. package/resources/index.d.mts +1 -0
  212. package/resources/index.d.mts.map +1 -1
  213. package/resources/index.d.ts +1 -0
  214. package/resources/index.d.ts.map +1 -1
  215. package/resources/index.js +4 -2
  216. package/resources/index.js.map +1 -1
  217. package/resources/index.mjs +1 -0
  218. package/resources/index.mjs.map +1 -1
  219. package/resources/legal-entities.d.mts +1 -1
  220. package/resources/legal-entities.d.mts.map +1 -1
  221. package/resources/legal-entities.d.ts +1 -1
  222. package/resources/legal-entities.d.ts.map +1 -1
  223. package/resources/location-factors.d.mts +2 -2
  224. package/resources/location-factors.d.mts.map +1 -1
  225. package/resources/location-factors.d.ts +2 -2
  226. package/resources/location-factors.d.ts.map +1 -1
  227. package/resources/shared.d.mts +1 -1
  228. package/resources/shared.d.mts.map +1 -1
  229. package/resources/shared.d.ts +1 -1
  230. package/resources/shared.d.ts.map +1 -1
  231. package/resources/workers.d.mts +2 -2
  232. package/resources/workers.d.mts.map +1 -1
  233. package/resources/workers.d.ts +2 -2
  234. package/resources/workers.d.ts.map +1 -1
  235. package/src/client.ts +20 -0
  236. package/src/lib/manifest/app.ts +81 -26
  237. package/src/lib/manifest/category.ts +63 -14
  238. package/src/lib/manifest/custom-object-field-section.ts +56 -17
  239. package/src/lib/manifest/custom-object-page-layout.ts +201 -66
  240. package/src/lib/manifest/custom-object.ts +128 -37
  241. package/src/lib/manifest/field.ts +265 -75
  242. package/src/lib/manifest/list-view.ts +105 -25
  243. package/src/lib/manifest/manifest-builder.ts +75 -32
  244. package/src/lib/manifest/manifest-function.ts +92 -22
  245. package/src/lib/manifest/rule.ts +95 -29
  246. package/src/lib/manifest/sdui-page.ts +67 -21
  247. package/src/lib/manifest/validation.ts +87 -24
  248. package/src/lib/sdui/actions.ts +58 -0
  249. package/src/lib/sdui/component.ts +122 -0
  250. package/src/lib/sdui/components.ts +308 -0
  251. package/src/lib/sdui/conditions.ts +59 -0
  252. package/src/lib/sdui/directives.ts +42 -0
  253. package/src/lib/sdui/index.ts +365 -0
  254. package/src/lib/sdui/props.ts +32 -0
  255. package/src/lib/sdui/render.ts +58 -0
  256. package/src/lib/sdui/state.ts +60 -0
  257. package/src/resources/company-legal-entity-workers.ts +115 -0
  258. package/src/resources/draft-hires.ts +5 -0
  259. package/src/resources/files.ts +18 -1
  260. package/src/resources/headcount-positions.ts +2 -0
  261. package/src/resources/index.ts +7 -0
  262. package/src/resources/legal-entities.ts +1 -0
  263. package/src/resources/location-factors.ts +2 -0
  264. package/src/resources/shared.ts +1 -0
  265. package/src/resources/workers.ts +2 -0
  266. package/src/version.ts +1 -1
  267. package/version.d.mts +1 -1
  268. package/version.d.ts +1 -1
  269. package/version.js +1 -1
  270. package/version.mjs +1 -1
@@ -1,27 +1,34 @@
1
- /*
2
- * The contents of this file were inserted manually and are not generated by Stainless.
1
+ /**
2
+ * Root container for a manifest collects all components and serializes them to JSON.
3
3
  *
4
- * ManifestBuilder collects manifest components and serializes to JSON.
4
+ * You would normally create one `ManifestBuilder` at the top of your manifest file,
5
+ * then pass it as the scope to all top-level components (categories, custom objects,
6
+ * functions, apps, SDUI pages). Each component auto-registers on construction; there
7
+ * is no separate add or register call.
5
8
  *
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()`.
9
+ * After defining all components, call `preview()` to emit the manifest as a
10
+ * pretty-printed JSON string, or `buildManifest()` to get the plain object.
17
11
  *
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
12
+ * @example
13
+ * ```ts
14
+ * const manifest = new ManifestBuilder({
15
+ * key: 'gym_membership_management',
16
+ * name: 'Gym Membership Management',
17
+ * description: 'Members, trainers, schedules, and check-in',
18
+ * });
19
+ *
20
+ * const category = new Category(manifest, { apiName: 'gym__c', name: 'Gym' });
21
+ * const memberObj = new CustomObject(manifest, { apiName: 'gym_member__c', name: 'Member', category });
22
+ * // ... define fields, rules, list views, etc. ...
23
+ *
24
+ * console.log(manifest.preview());
25
+ * ```
22
26
  */
23
27
  export class ManifestBuilder {
24
- /** Build a new manifest; `name` defaults to `key` when unset. */
28
+ /**
29
+ * @param props - Initialization properties.
30
+ * @throws {Error} If `props.key` is empty or missing.
31
+ */
25
32
  constructor(props) {
26
33
  this._components = [];
27
34
  if (!props.key) {
@@ -41,7 +48,11 @@ export class ManifestBuilder {
41
48
  }
42
49
  this._components.push(component);
43
50
  }
44
- /** Build the manifest object: metadata + flat component list. */
51
+ /**
52
+ * Returns the manifest as a plain object with `metadata` and a flat `components` array.
53
+ *
54
+ * @returns `{ metadata: { key, name, description? }, components: Record<string, any>[] }`
55
+ */
45
56
  buildManifest() {
46
57
  const metadata = {
47
58
  key: this.key,
@@ -53,11 +64,22 @@ export class ManifestBuilder {
53
64
  const components = this._components.map((c) => c.toDict());
54
65
  return { metadata, components };
55
66
  }
56
- /** Flat list of all component dicts. */
67
+ /**
68
+ * Returns the flat list of all registered component dicts.
69
+ *
70
+ * @returns An array of wire-format component objects, in registration order.
71
+ */
57
72
  componentsList() {
58
73
  return this._components.map((c) => c.toDict());
59
74
  }
60
- /** Pretty-printed JSON string. */
75
+ /**
76
+ * Returns the full manifest as a pretty-printed JSON string.
77
+ *
78
+ * Typically used as the final line of a manifest file to emit the output:
79
+ * `console.log(manifest.preview())`.
80
+ *
81
+ * @returns Indented JSON string of the complete manifest.
82
+ */
61
83
  preview() {
62
84
  return JSON.stringify(this.buildManifest(), null, 2);
63
85
  }
@@ -1 +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,IAA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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;;;;OAIG;IACH,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;;;;OAIG;IACH,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACjD,CAAC;IAED;;;;;;;OAOG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACvD,CAAC;CACF"}
@@ -1,25 +1,96 @@
1
1
  import type { FunctionRuntime } from "./_helpers.mjs";
2
2
  import type { ManifestScope } from "./manifest-builder.mjs";
3
+ /**
4
+ * Initialization properties for {@link ManifestFunction}.
5
+ */
3
6
  export interface ManifestFunctionProps {
4
- /** Required. Function api_name (snake_case identifier). */
7
+ /**
8
+ * Unique identifier for this function (e.g. `'gym_today_schedule_fn'`).
9
+ *
10
+ * Required.
11
+ */
5
12
  apiName: string;
6
- /** Required. Display name shown in the UI. */
13
+ /**
14
+ * Display name shown in the Rippling UI.
15
+ *
16
+ * Required.
17
+ */
7
18
  name: string;
8
- /** Optional. TypeScript handler source; must export `onRipplingEvent`. @default '' */
19
+ /**
20
+ * TypeScript handler source code. Must export an `onRipplingEvent` function.
21
+ *
22
+ * Optional. @default `''`
23
+ */
9
24
  code?: string;
10
- /** Optional. Function description. @default '' */
25
+ /**
26
+ * Human-readable description of what this function does.
27
+ *
28
+ * Optional. @default `''`
29
+ */
11
30
  description?: string;
12
- /** Optional. NPM package dependencies. @default null */
31
+ /**
32
+ * NPM package dependencies as a `{ packageName: versionRange }` map
33
+ * (e.g. `{ '@rippling/rippling-sdk': '^0.2.0' }`).
34
+ *
35
+ * Optional. @default null
36
+ */
13
37
  dependencies?: Record<string, string>;
14
- /** Optional. Raw deployment options. Prefer `runtime`. @default null */
38
+ /**
39
+ * Raw deployment options object. Prefer `runtime` for the common case.
40
+ *
41
+ * Optional. @default null
42
+ */
15
43
  deploymentOptions?: Record<string, any>;
16
- /** Optional. Shorthand: sets `deploymentOptions.runtime`. */
44
+ /**
45
+ * Deployment runtime shorthand. Sets `deploymentOptions.runtime` and is merged
46
+ * with any explicit `deploymentOptions`. One of `'cloudflare-js'` | `'lambda-deno'`
47
+ * | `'lambda-python'`.
48
+ *
49
+ * Optional.
50
+ */
17
51
  runtime?: FunctionRuntime;
18
- /** Optional. Outbound domain allowlist. @default null */
52
+ /**
53
+ * Outbound domain allowlist. Requests to domains not in this list will be blocked.
54
+ *
55
+ * Optional. @default null
56
+ */
19
57
  allowedDomains?: string[];
20
- /** Optional. Whether the function runs asynchronously. @default false */
58
+ /**
59
+ * Whether this function runs asynchronously (fire-and-forget).
60
+ *
61
+ * Optional. @default `false`
62
+ */
21
63
  isAsync?: boolean;
22
64
  }
65
+ /**
66
+ * Defines a serverless function and registers it with the manifest.
67
+ *
68
+ * A `ManifestFunction` packages TypeScript handler code that runs on Rippling's
69
+ * serverless infrastructure. Functions are the backing implementation for
70
+ * {@link SduiPage} surfaces. The handler must export `onRipplingEvent`.
71
+ *
72
+ * This class is named `ManifestFunction` to avoid collision with the JavaScript
73
+ * built-in `Function`. It is also re-exported as `Function` from the barrel for
74
+ * convenience.
75
+ *
76
+ * @example
77
+ * ```ts
78
+ * const todayScheduleFn = new ManifestFunction(manifest, {
79
+ * apiName: 'gym_today_schedule_fn',
80
+ * name: 'Today\'s schedule (SDUI)',
81
+ * description: 'Searchable grid of class sessions',
82
+ * runtime: 'lambda-deno',
83
+ * code: handlerSource,
84
+ * dependencies: {
85
+ * '@rippling/rippling-sdk': '^0.2.0-alpha.33',
86
+ * '@rippling/sdui-builder': '^0.1.0',
87
+ * },
88
+ * isAsync: false,
89
+ * });
90
+ * ```
91
+ *
92
+ * @see {@link SduiPage} — wraps a `ManifestFunction` as a navigable UI surface.
93
+ */
23
94
  export declare class ManifestFunction {
24
95
  private readonly _apiName;
25
96
  private readonly _name;
@@ -29,11 +100,20 @@ export declare class ManifestFunction {
29
100
  private readonly _deploymentOptions;
30
101
  private readonly _allowedDomains;
31
102
  private readonly _isAsync;
32
- /** Build a new function and auto-register with `scope`; `runtime` is merged into `deploymentOptions` if set. */
103
+ /**
104
+ * @param scope - The manifest to register this function with.
105
+ * @param props - Initialization properties.
106
+ */
33
107
  constructor(scope: ManifestScope, props: ManifestFunctionProps);
34
- /** Backend api_name for this function. */
108
+ /**
109
+ * Returns the api_name of this function (e.g. `'gym_today_schedule_fn'`).
110
+ */
35
111
  getApiName(): string;
36
- /** Serialize to the backend `FUNCTION` wire shape; empty fields are omitted. */
112
+ /**
113
+ * Serializes this function to the wire format consumed by the manifest install endpoint.
114
+ *
115
+ * @returns A plain object with `type: 'FUNCTION'`. Empty or unset optional fields are omitted.
116
+ */
37
117
  toDict(): Record<string, any>;
38
118
  }
39
119
  //# sourceMappingURL=manifest-function.d.mts.map
@@ -1 +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,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KAAK,EAAE,qBAAqB;IAe9D;;OAEG;IACH,UAAU,IAAI,MAAM;IAIpB;;;;OAIG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAc9B"}
@@ -1,25 +1,96 @@
1
1
  import type { FunctionRuntime } from "./_helpers.js";
2
2
  import type { ManifestScope } from "./manifest-builder.js";
3
+ /**
4
+ * Initialization properties for {@link ManifestFunction}.
5
+ */
3
6
  export interface ManifestFunctionProps {
4
- /** Required. Function api_name (snake_case identifier). */
7
+ /**
8
+ * Unique identifier for this function (e.g. `'gym_today_schedule_fn'`).
9
+ *
10
+ * Required.
11
+ */
5
12
  apiName: string;
6
- /** Required. Display name shown in the UI. */
13
+ /**
14
+ * Display name shown in the Rippling UI.
15
+ *
16
+ * Required.
17
+ */
7
18
  name: string;
8
- /** Optional. TypeScript handler source; must export `onRipplingEvent`. @default '' */
19
+ /**
20
+ * TypeScript handler source code. Must export an `onRipplingEvent` function.
21
+ *
22
+ * Optional. @default `''`
23
+ */
9
24
  code?: string;
10
- /** Optional. Function description. @default '' */
25
+ /**
26
+ * Human-readable description of what this function does.
27
+ *
28
+ * Optional. @default `''`
29
+ */
11
30
  description?: string;
12
- /** Optional. NPM package dependencies. @default null */
31
+ /**
32
+ * NPM package dependencies as a `{ packageName: versionRange }` map
33
+ * (e.g. `{ '@rippling/rippling-sdk': '^0.2.0' }`).
34
+ *
35
+ * Optional. @default null
36
+ */
13
37
  dependencies?: Record<string, string>;
14
- /** Optional. Raw deployment options. Prefer `runtime`. @default null */
38
+ /**
39
+ * Raw deployment options object. Prefer `runtime` for the common case.
40
+ *
41
+ * Optional. @default null
42
+ */
15
43
  deploymentOptions?: Record<string, any>;
16
- /** Optional. Shorthand: sets `deploymentOptions.runtime`. */
44
+ /**
45
+ * Deployment runtime shorthand. Sets `deploymentOptions.runtime` and is merged
46
+ * with any explicit `deploymentOptions`. One of `'cloudflare-js'` | `'lambda-deno'`
47
+ * | `'lambda-python'`.
48
+ *
49
+ * Optional.
50
+ */
17
51
  runtime?: FunctionRuntime;
18
- /** Optional. Outbound domain allowlist. @default null */
52
+ /**
53
+ * Outbound domain allowlist. Requests to domains not in this list will be blocked.
54
+ *
55
+ * Optional. @default null
56
+ */
19
57
  allowedDomains?: string[];
20
- /** Optional. Whether the function runs asynchronously. @default false */
58
+ /**
59
+ * Whether this function runs asynchronously (fire-and-forget).
60
+ *
61
+ * Optional. @default `false`
62
+ */
21
63
  isAsync?: boolean;
22
64
  }
65
+ /**
66
+ * Defines a serverless function and registers it with the manifest.
67
+ *
68
+ * A `ManifestFunction` packages TypeScript handler code that runs on Rippling's
69
+ * serverless infrastructure. Functions are the backing implementation for
70
+ * {@link SduiPage} surfaces. The handler must export `onRipplingEvent`.
71
+ *
72
+ * This class is named `ManifestFunction` to avoid collision with the JavaScript
73
+ * built-in `Function`. It is also re-exported as `Function` from the barrel for
74
+ * convenience.
75
+ *
76
+ * @example
77
+ * ```ts
78
+ * const todayScheduleFn = new ManifestFunction(manifest, {
79
+ * apiName: 'gym_today_schedule_fn',
80
+ * name: 'Today\'s schedule (SDUI)',
81
+ * description: 'Searchable grid of class sessions',
82
+ * runtime: 'lambda-deno',
83
+ * code: handlerSource,
84
+ * dependencies: {
85
+ * '@rippling/rippling-sdk': '^0.2.0-alpha.33',
86
+ * '@rippling/sdui-builder': '^0.1.0',
87
+ * },
88
+ * isAsync: false,
89
+ * });
90
+ * ```
91
+ *
92
+ * @see {@link SduiPage} — wraps a `ManifestFunction` as a navigable UI surface.
93
+ */
23
94
  export declare class ManifestFunction {
24
95
  private readonly _apiName;
25
96
  private readonly _name;
@@ -29,11 +100,20 @@ export declare class ManifestFunction {
29
100
  private readonly _deploymentOptions;
30
101
  private readonly _allowedDomains;
31
102
  private readonly _isAsync;
32
- /** Build a new function and auto-register with `scope`; `runtime` is merged into `deploymentOptions` if set. */
103
+ /**
104
+ * @param scope - The manifest to register this function with.
105
+ * @param props - Initialization properties.
106
+ */
33
107
  constructor(scope: ManifestScope, props: ManifestFunctionProps);
34
- /** Backend api_name for this function. */
108
+ /**
109
+ * Returns the api_name of this function (e.g. `'gym_today_schedule_fn'`).
110
+ */
35
111
  getApiName(): string;
36
- /** Serialize to the backend `FUNCTION` wire shape; empty fields are omitted. */
112
+ /**
113
+ * Serializes this function to the wire format consumed by the manifest install endpoint.
114
+ *
115
+ * @returns A plain object with `type: 'FUNCTION'`. Empty or unset optional fields are omitted.
116
+ */
37
117
  toDict(): Record<string, any>;
38
118
  }
39
119
  //# sourceMappingURL=manifest-function.d.ts.map
@@ -1 +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,CA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AAK,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;;;OAGG;gBACS,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,qBAAqB;IAe9D;;OAEG;IACH,UAAU,IAAI,MAAM;IAIpB;;;;OAIG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAc9B"}
@@ -1,17 +1,40 @@
1
1
  "use strict";
2
- /*
3
- * The contents of this file were inserted manually and are not generated by Stainless.
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ManifestFunction = void 0;
4
+ /**
5
+ * Defines a serverless function and registers it with the manifest.
6
+ *
7
+ * A `ManifestFunction` packages TypeScript handler code that runs on Rippling's
8
+ * serverless infrastructure. Functions are the backing implementation for
9
+ * {@link SduiPage} surfaces. The handler must export `onRipplingEvent`.
4
10
  *
5
- * Custom function definitions (TypeScript handler code).
6
- * Backend schema: FUNCTION (v2)
11
+ * This class is named `ManifestFunction` to avoid collision with the JavaScript
12
+ * built-in `Function`. It is also re-exported as `Function` from the barrel for
13
+ * convenience.
7
14
  *
8
- * Named ManifestFunction to avoid collision with the JavaScript built-in Function.
9
- * Re-exported as both ManifestFunction and Function from the barrel.
15
+ * @example
16
+ * ```ts
17
+ * const todayScheduleFn = new ManifestFunction(manifest, {
18
+ * apiName: 'gym_today_schedule_fn',
19
+ * name: 'Today\'s schedule (SDUI)',
20
+ * description: 'Searchable grid of class sessions',
21
+ * runtime: 'lambda-deno',
22
+ * code: handlerSource,
23
+ * dependencies: {
24
+ * '@rippling/rippling-sdk': '^0.2.0-alpha.33',
25
+ * '@rippling/sdui-builder': '^0.1.0',
26
+ * },
27
+ * isAsync: false,
28
+ * });
29
+ * ```
30
+ *
31
+ * @see {@link SduiPage} — wraps a `ManifestFunction` as a navigable UI surface.
10
32
  */
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ManifestFunction = void 0;
13
33
  class ManifestFunction {
14
- /** Build a new function and auto-register with `scope`; `runtime` is merged into `deploymentOptions` if set. */
34
+ /**
35
+ * @param scope - The manifest to register this function with.
36
+ * @param props - Initialization properties.
37
+ */
15
38
  constructor(scope, props) {
16
39
  this._apiName = props.apiName;
17
40
  this._name = props.name;
@@ -26,11 +49,17 @@ class ManifestFunction {
26
49
  this._isAsync = props.isAsync ?? false;
27
50
  scope._register(this);
28
51
  }
29
- /** Backend api_name for this function. */
52
+ /**
53
+ * Returns the api_name of this function (e.g. `'gym_today_schedule_fn'`).
54
+ */
30
55
  getApiName() {
31
56
  return this._apiName;
32
57
  }
33
- /** Serialize to the backend `FUNCTION` wire shape; empty fields are omitted. */
58
+ /**
59
+ * Serializes this function to the wire format consumed by the manifest install endpoint.
60
+ *
61
+ * @returns A plain object with `type: 'FUNCTION'`. Empty or unset optional fields are omitted.
62
+ */
34
63
  toDict() {
35
64
  const component = {
36
65
  type: 'FUNCTION',
@@ -1 +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,CAA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AQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC;QACF,IAAI,IAAI,CAAC,YAAY;YAAE,SAAS,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC;QACpE,IAAI,IAAI,CAAC,KAAK;YAAE,SAAS,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QACrD,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI;YAAE,SAAS,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC;QAC/E,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI;YAAE,SAAS,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC;QAC/F,IAAI,IAAI,CAAC,eAAe,IAAI,IAAI;YAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC;QACtF,IAAI,IAAI,CAAC,QAAQ;YAAE,SAAS,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;QAChD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAvDD,4CAuDC"}
@@ -1,14 +1,37 @@
1
- /*
2
- * The contents of this file were inserted manually and are not generated by Stainless.
1
+ /**
2
+ * Defines a serverless function and registers it with the manifest.
3
3
  *
4
- * Custom function definitions (TypeScript handler code).
5
- * Backend schema: FUNCTION (v2)
4
+ * A `ManifestFunction` packages TypeScript handler code that runs on Rippling's
5
+ * serverless infrastructure. Functions are the backing implementation for
6
+ * {@link SduiPage} surfaces. The handler must export `onRipplingEvent`.
6
7
  *
7
- * Named ManifestFunction to avoid collision with the JavaScript built-in Function.
8
- * Re-exported as both ManifestFunction and Function from the barrel.
8
+ * This class is named `ManifestFunction` to avoid collision with the JavaScript
9
+ * built-in `Function`. It is also re-exported as `Function` from the barrel for
10
+ * convenience.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const todayScheduleFn = new ManifestFunction(manifest, {
15
+ * apiName: 'gym_today_schedule_fn',
16
+ * name: 'Today\'s schedule (SDUI)',
17
+ * description: 'Searchable grid of class sessions',
18
+ * runtime: 'lambda-deno',
19
+ * code: handlerSource,
20
+ * dependencies: {
21
+ * '@rippling/rippling-sdk': '^0.2.0-alpha.33',
22
+ * '@rippling/sdui-builder': '^0.1.0',
23
+ * },
24
+ * isAsync: false,
25
+ * });
26
+ * ```
27
+ *
28
+ * @see {@link SduiPage} — wraps a `ManifestFunction` as a navigable UI surface.
9
29
  */
10
30
  export class ManifestFunction {
11
- /** Build a new function and auto-register with `scope`; `runtime` is merged into `deploymentOptions` if set. */
31
+ /**
32
+ * @param scope - The manifest to register this function with.
33
+ * @param props - Initialization properties.
34
+ */
12
35
  constructor(scope, props) {
13
36
  this._apiName = props.apiName;
14
37
  this._name = props.name;
@@ -23,11 +46,17 @@ export class ManifestFunction {
23
46
  this._isAsync = props.isAsync ?? false;
24
47
  scope._register(this);
25
48
  }
26
- /** Backend api_name for this function. */
49
+ /**
50
+ * Returns the api_name of this function (e.g. `'gym_today_schedule_fn'`).
51
+ */
27
52
  getApiName() {
28
53
  return this._apiName;
29
54
  }
30
- /** Serialize to the backend `FUNCTION` wire shape; empty fields are omitted. */
55
+ /**
56
+ * Serializes this function to the wire format consumed by the manifest install endpoint.
57
+ *
58
+ * @returns A plain object with `type: 'FUNCTION'`. Empty or unset optional fields are omitted.
59
+ */
31
60
  toDict() {
32
61
  const component = {
33
62
  type: 'FUNCTION',
@@ -1 +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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