@rippling/rippling-sdk 0.2.0-alpha.33 → 0.2.0-alpha.35

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 (284) 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 +113 -0
  22. package/lib/manifest/app.d.mts.map +1 -0
  23. package/lib/manifest/app.d.ts +113 -0
  24. package/lib/manifest/app.d.ts.map +1 -0
  25. package/lib/manifest/app.js +95 -0
  26. package/lib/manifest/app.js.map +1 -0
  27. package/lib/manifest/app.mjs +91 -0
  28. package/lib/manifest/app.mjs.map +1 -0
  29. package/lib/manifest/category.d.mts +79 -0
  30. package/lib/manifest/category.d.mts.map +1 -0
  31. package/lib/manifest/category.d.ts +79 -0
  32. package/lib/manifest/category.d.ts.map +1 -0
  33. package/lib/manifest/category.js +72 -0
  34. package/lib/manifest/category.js.map +1 -0
  35. package/lib/manifest/category.mjs +68 -0
  36. package/lib/manifest/category.mjs.map +1 -0
  37. package/lib/manifest/custom-object-field-section.d.mts +71 -0
  38. package/lib/manifest/custom-object-field-section.d.mts.map +1 -0
  39. package/lib/manifest/custom-object-field-section.d.ts +71 -0
  40. package/lib/manifest/custom-object-field-section.d.ts.map +1 -0
  41. package/lib/manifest/custom-object-field-section.js +69 -0
  42. package/lib/manifest/custom-object-field-section.js.map +1 -0
  43. package/lib/manifest/custom-object-field-section.mjs +65 -0
  44. package/lib/manifest/custom-object-field-section.mjs.map +1 -0
  45. package/lib/manifest/custom-object-page-layout.d.mts +318 -0
  46. package/lib/manifest/custom-object-page-layout.d.mts.map +1 -0
  47. package/lib/manifest/custom-object-page-layout.d.ts +318 -0
  48. package/lib/manifest/custom-object-page-layout.d.ts.map +1 -0
  49. package/lib/manifest/custom-object-page-layout.js +158 -0
  50. package/lib/manifest/custom-object-page-layout.js.map +1 -0
  51. package/lib/manifest/custom-object-page-layout.mjs +154 -0
  52. package/lib/manifest/custom-object-page-layout.mjs.map +1 -0
  53. package/lib/manifest/custom-object.d.mts +165 -0
  54. package/lib/manifest/custom-object.d.mts.map +1 -0
  55. package/lib/manifest/custom-object.d.ts +165 -0
  56. package/lib/manifest/custom-object.d.ts.map +1 -0
  57. package/lib/manifest/custom-object.js +254 -0
  58. package/lib/manifest/custom-object.js.map +1 -0
  59. package/lib/manifest/custom-object.mjs +250 -0
  60. package/lib/manifest/custom-object.mjs.map +1 -0
  61. package/lib/manifest/field.d.mts +487 -0
  62. package/lib/manifest/field.d.mts.map +1 -0
  63. package/lib/manifest/field.d.ts +487 -0
  64. package/lib/manifest/field.d.ts.map +1 -0
  65. package/lib/manifest/field.js +461 -0
  66. package/lib/manifest/field.js.map +1 -0
  67. package/lib/manifest/field.mjs +438 -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 +138 -0
  78. package/lib/manifest/list-view.d.mts.map +1 -0
  79. package/lib/manifest/list-view.d.ts +138 -0
  80. package/lib/manifest/list-view.d.ts.map +1 -0
  81. package/lib/manifest/list-view.js +109 -0
  82. package/lib/manifest/list-view.js.map +1 -0
  83. package/lib/manifest/list-view.mjs +105 -0
  84. package/lib/manifest/list-view.mjs.map +1 -0
  85. package/lib/manifest/manifest-builder.d.mts +110 -0
  86. package/lib/manifest/manifest-builder.d.mts.map +1 -0
  87. package/lib/manifest/manifest-builder.d.ts +110 -0
  88. package/lib/manifest/manifest-builder.d.ts.map +1 -0
  89. package/lib/manifest/manifest-builder.js +91 -0
  90. package/lib/manifest/manifest-builder.js.map +1 -0
  91. package/lib/manifest/manifest-builder.mjs +87 -0
  92. package/lib/manifest/manifest-builder.mjs.map +1 -0
  93. package/lib/manifest/manifest-function.d.mts +119 -0
  94. package/lib/manifest/manifest-function.d.mts.map +1 -0
  95. package/lib/manifest/manifest-function.d.ts +119 -0
  96. package/lib/manifest/manifest-function.d.ts.map +1 -0
  97. package/lib/manifest/manifest-function.js +85 -0
  98. package/lib/manifest/manifest-function.js.map +1 -0
  99. package/lib/manifest/manifest-function.mjs +81 -0
  100. package/lib/manifest/manifest-function.mjs.map +1 -0
  101. package/lib/manifest/rule.d.mts +128 -0
  102. package/lib/manifest/rule.d.mts.map +1 -0
  103. package/lib/manifest/rule.d.ts +128 -0
  104. package/lib/manifest/rule.d.ts.map +1 -0
  105. package/lib/manifest/rule.js +105 -0
  106. package/lib/manifest/rule.js.map +1 -0
  107. package/lib/manifest/rule.mjs +101 -0
  108. package/lib/manifest/rule.mjs.map +1 -0
  109. package/lib/manifest/sdui-page.d.mts +89 -0
  110. package/lib/manifest/sdui-page.d.mts.map +1 -0
  111. package/lib/manifest/sdui-page.d.ts +89 -0
  112. package/lib/manifest/sdui-page.d.ts.map +1 -0
  113. package/lib/manifest/sdui-page.js +83 -0
  114. package/lib/manifest/sdui-page.js.map +1 -0
  115. package/lib/manifest/sdui-page.mjs +79 -0
  116. package/lib/manifest/sdui-page.mjs.map +1 -0
  117. package/lib/manifest/validation.d.mts +116 -0
  118. package/lib/manifest/validation.d.mts.map +1 -0
  119. package/lib/manifest/validation.d.ts +116 -0
  120. package/lib/manifest/validation.d.ts.map +1 -0
  121. package/lib/manifest/validation.js +83 -0
  122. package/lib/manifest/validation.js.map +1 -0
  123. package/lib/manifest/validation.mjs +79 -0
  124. package/lib/manifest/validation.mjs.map +1 -0
  125. package/lib/sdui/actions.d.mts +25 -0
  126. package/lib/sdui/actions.d.mts.map +1 -0
  127. package/lib/sdui/actions.d.ts +25 -0
  128. package/lib/sdui/actions.d.ts.map +1 -0
  129. package/lib/sdui/actions.js +53 -0
  130. package/lib/sdui/actions.js.map +1 -0
  131. package/lib/sdui/actions.mjs +42 -0
  132. package/lib/sdui/actions.mjs.map +1 -0
  133. package/lib/sdui/component.d.mts +41 -0
  134. package/lib/sdui/component.d.mts.map +1 -0
  135. package/lib/sdui/component.d.ts +41 -0
  136. package/lib/sdui/component.d.ts.map +1 -0
  137. package/lib/sdui/component.js +95 -0
  138. package/lib/sdui/component.js.map +1 -0
  139. package/lib/sdui/component.mjs +91 -0
  140. package/lib/sdui/component.mjs.map +1 -0
  141. package/lib/sdui/components.d.mts +149 -0
  142. package/lib/sdui/components.d.mts.map +1 -0
  143. package/lib/sdui/components.d.ts +149 -0
  144. package/lib/sdui/components.d.ts.map +1 -0
  145. package/lib/sdui/components.js +303 -0
  146. package/lib/sdui/components.js.map +1 -0
  147. package/lib/sdui/components.mjs +298 -0
  148. package/lib/sdui/components.mjs.map +1 -0
  149. package/lib/sdui/conditions.d.mts +25 -0
  150. package/lib/sdui/conditions.d.mts.map +1 -0
  151. package/lib/sdui/conditions.d.ts +25 -0
  152. package/lib/sdui/conditions.d.ts.map +1 -0
  153. package/lib/sdui/conditions.js +47 -0
  154. package/lib/sdui/conditions.js.map +1 -0
  155. package/lib/sdui/conditions.mjs +35 -0
  156. package/lib/sdui/conditions.mjs.map +1 -0
  157. package/lib/sdui/directives.d.mts +18 -0
  158. package/lib/sdui/directives.d.mts.map +1 -0
  159. package/lib/sdui/directives.d.ts +18 -0
  160. package/lib/sdui/directives.d.ts.map +1 -0
  161. package/lib/sdui/directives.js +28 -0
  162. package/lib/sdui/directives.js.map +1 -0
  163. package/lib/sdui/directives.mjs +21 -0
  164. package/lib/sdui/directives.mjs.map +1 -0
  165. package/lib/sdui/index.d.mts +362 -0
  166. package/lib/sdui/index.d.mts.map +1 -0
  167. package/lib/sdui/index.d.ts +362 -0
  168. package/lib/sdui/index.d.ts.map +1 -0
  169. package/lib/sdui/index.js +375 -0
  170. package/lib/sdui/index.js.map +1 -0
  171. package/lib/sdui/index.mjs +199 -0
  172. package/lib/sdui/index.mjs.map +1 -0
  173. package/lib/sdui/props.d.mts +12 -0
  174. package/lib/sdui/props.d.mts.map +1 -0
  175. package/lib/sdui/props.d.ts +12 -0
  176. package/lib/sdui/props.d.ts.map +1 -0
  177. package/lib/sdui/props.js +25 -0
  178. package/lib/sdui/props.js.map +1 -0
  179. package/lib/sdui/props.mjs +21 -0
  180. package/lib/sdui/props.mjs.map +1 -0
  181. package/lib/sdui/render.d.mts +23 -0
  182. package/lib/sdui/render.d.mts.map +1 -0
  183. package/lib/sdui/render.d.ts +23 -0
  184. package/lib/sdui/render.d.ts.map +1 -0
  185. package/lib/sdui/render.js +40 -0
  186. package/lib/sdui/render.js.map +1 -0
  187. package/lib/sdui/render.mjs +37 -0
  188. package/lib/sdui/render.mjs.map +1 -0
  189. package/lib/sdui/state.d.mts +22 -0
  190. package/lib/sdui/state.d.mts.map +1 -0
  191. package/lib/sdui/state.d.ts +22 -0
  192. package/lib/sdui/state.d.ts.map +1 -0
  193. package/lib/sdui/state.js +57 -0
  194. package/lib/sdui/state.js.map +1 -0
  195. package/lib/sdui/state.mjs +53 -0
  196. package/lib/sdui/state.mjs.map +1 -0
  197. package/package.json +11 -1
  198. package/resources/draft-hires.d.mts +26 -0
  199. package/resources/draft-hires.d.mts.map +1 -1
  200. package/resources/draft-hires.d.ts +26 -0
  201. package/resources/draft-hires.d.ts.map +1 -1
  202. package/resources/earnings-inputs.d.mts +99 -1
  203. package/resources/earnings-inputs.d.mts.map +1 -1
  204. package/resources/earnings-inputs.d.ts +99 -1
  205. package/resources/earnings-inputs.d.ts.map +1 -1
  206. package/resources/earnings-inputs.js +6 -0
  207. package/resources/earnings-inputs.js.map +1 -1
  208. package/resources/earnings-inputs.mjs +6 -0
  209. package/resources/earnings-inputs.mjs.map +1 -1
  210. package/resources/files.d.mts +164 -0
  211. package/resources/files.d.mts.map +1 -0
  212. package/resources/files.d.ts +164 -0
  213. package/resources/files.d.ts.map +1 -0
  214. package/resources/files.js +25 -0
  215. package/resources/files.js.map +1 -0
  216. package/resources/files.mjs +21 -0
  217. package/resources/files.mjs.map +1 -0
  218. package/resources/headcount-positions.d.mts +2 -2
  219. package/resources/headcount-positions.d.mts.map +1 -1
  220. package/resources/headcount-positions.d.ts +2 -2
  221. package/resources/headcount-positions.d.ts.map +1 -1
  222. package/resources/index.d.mts +2 -1
  223. package/resources/index.d.mts.map +1 -1
  224. package/resources/index.d.ts +2 -1
  225. package/resources/index.d.ts.map +1 -1
  226. package/resources/index.js +4 -2
  227. package/resources/index.js.map +1 -1
  228. package/resources/index.mjs +1 -0
  229. package/resources/index.mjs.map +1 -1
  230. package/resources/legal-entities.d.mts +1 -1
  231. package/resources/legal-entities.d.mts.map +1 -1
  232. package/resources/legal-entities.d.ts +1 -1
  233. package/resources/legal-entities.d.ts.map +1 -1
  234. package/resources/location-factors.d.mts +2 -2
  235. package/resources/location-factors.d.mts.map +1 -1
  236. package/resources/location-factors.d.ts +2 -2
  237. package/resources/location-factors.d.ts.map +1 -1
  238. package/resources/shared.d.mts +1 -1
  239. package/resources/shared.d.mts.map +1 -1
  240. package/resources/shared.d.ts +1 -1
  241. package/resources/shared.d.ts.map +1 -1
  242. package/resources/workers.d.mts +2 -2
  243. package/resources/workers.d.mts.map +1 -1
  244. package/resources/workers.d.ts +2 -2
  245. package/resources/workers.d.ts.map +1 -1
  246. package/src/client.ts +29 -0
  247. package/src/internal/types.ts +6 -8
  248. package/src/lib/manifest/_helpers.ts +164 -0
  249. package/src/lib/manifest/app.ts +163 -0
  250. package/src/lib/manifest/category.ts +100 -0
  251. package/src/lib/manifest/custom-object-field-section.ts +93 -0
  252. package/src/lib/manifest/custom-object-page-layout.ts +427 -0
  253. package/src/lib/manifest/custom-object.ts +360 -0
  254. package/src/lib/manifest/field.ts +822 -0
  255. package/src/lib/manifest/index.ts +114 -0
  256. package/src/lib/manifest/list-view.ts +183 -0
  257. package/src/lib/manifest/manifest-builder.ts +140 -0
  258. package/src/lib/manifest/manifest-function.ts +151 -0
  259. package/src/lib/manifest/rule.ts +191 -0
  260. package/src/lib/manifest/sdui-page.ts +118 -0
  261. package/src/lib/manifest/validation.ts +150 -0
  262. package/src/lib/sdui/actions.ts +58 -0
  263. package/src/lib/sdui/component.ts +122 -0
  264. package/src/lib/sdui/components.ts +308 -0
  265. package/src/lib/sdui/conditions.ts +59 -0
  266. package/src/lib/sdui/directives.ts +42 -0
  267. package/src/lib/sdui/index.ts +365 -0
  268. package/src/lib/sdui/props.ts +32 -0
  269. package/src/lib/sdui/render.ts +58 -0
  270. package/src/lib/sdui/state.ts +60 -0
  271. package/src/resources/draft-hires.ts +31 -0
  272. package/src/resources/earnings-inputs.ts +127 -0
  273. package/src/resources/files.ts +203 -0
  274. package/src/resources/headcount-positions.ts +2 -0
  275. package/src/resources/index.ts +3 -0
  276. package/src/resources/legal-entities.ts +1 -0
  277. package/src/resources/location-factors.ts +2 -0
  278. package/src/resources/shared.ts +1 -0
  279. package/src/resources/workers.ts +2 -0
  280. package/src/version.ts +1 -1
  281. package/version.d.mts +1 -1
  282. package/version.d.ts +1 -1
  283. package/version.js +1 -1
  284. package/version.mjs +1 -1
@@ -0,0 +1,250 @@
1
+ // ────────────────────────────────────────────────────────────────────────
2
+ // Platform-managed standard fields — mirrors
3
+ // `app/hub_platform/custom_objects/constants.py::STANDARD_FIELDS`.
4
+ // Kept here (not in `field.ts`) so the `Field` class stays focused on
5
+ // user-authored `__c` fields with full validation.
6
+ // ────────────────────────────────────────────────────────────────────────
7
+ /** Specs for the 9 standard fields every CO ships with. Order matches the backend constant. */
8
+ const STANDARD_FIELD_SPECS = [
9
+ {
10
+ apiName: 'id',
11
+ displayName: 'ID',
12
+ description: 'The Rippling ID of a record',
13
+ dataType: { field_type: 'TEXT' },
14
+ required: true,
15
+ unique: true,
16
+ },
17
+ {
18
+ apiName: 'created_at',
19
+ displayName: 'Created Date',
20
+ description: 'The date and time a record was created',
21
+ dataType: { field_type: 'DATETIME' },
22
+ required: false,
23
+ unique: false,
24
+ },
25
+ {
26
+ apiName: 'updated_at',
27
+ displayName: 'Last Modified Date',
28
+ description: 'The date and time a record was last updated',
29
+ dataType: { field_type: 'DATETIME' },
30
+ required: false,
31
+ unique: false,
32
+ },
33
+ {
34
+ apiName: 'system_updated_at',
35
+ displayName: 'System Modified At',
36
+ description: 'The date and time a record was last updated by the system',
37
+ dataType: { field_type: 'DATETIME' },
38
+ required: false,
39
+ unique: false,
40
+ },
41
+ {
42
+ apiName: 'external_id',
43
+ displayName: 'External ID',
44
+ description: 'The external identifier for a record used in third party integrations',
45
+ dataType: { field_type: 'TEXT' },
46
+ required: false,
47
+ unique: true,
48
+ },
49
+ {
50
+ apiName: 'name',
51
+ displayName: 'Name',
52
+ description: 'A string used to describe a record. This is used for display purposes as well as search',
53
+ dataType: { field_type: 'TEXT' },
54
+ required: true,
55
+ unique: false,
56
+ },
57
+ {
58
+ apiName: 'owner_role',
59
+ displayName: 'Owner',
60
+ description: 'The Employee responsible for the record. This is used by Permissions to determine who has ability to view, edit, and delete data',
61
+ dataType: {
62
+ field_type: 'NATIVE_EDGE',
63
+ og_model_rql_name: 'Employee',
64
+ db_model_name: 'RoleWithCompany',
65
+ reference_column_storage_type: 'STRING',
66
+ },
67
+ required: false,
68
+ unique: false,
69
+ },
70
+ {
71
+ apiName: 'last_modified_by',
72
+ displayName: 'Last Modified by',
73
+ description: 'The Employee who made the latest change.',
74
+ dataType: {
75
+ field_type: 'NATIVE_EDGE',
76
+ og_model_rql_name: 'Employee',
77
+ db_model_name: 'RoleWithCompany',
78
+ reference_column_storage_type: 'STRING',
79
+ },
80
+ required: false,
81
+ unique: false,
82
+ },
83
+ {
84
+ apiName: 'created_by',
85
+ displayName: 'Created by',
86
+ description: 'The Employee who created the record',
87
+ dataType: {
88
+ field_type: 'NATIVE_EDGE',
89
+ og_model_rql_name: 'Employee',
90
+ db_model_name: 'RoleWithCompany',
91
+ reference_column_storage_type: 'STRING',
92
+ },
93
+ required: false,
94
+ unique: false,
95
+ },
96
+ ];
97
+ /**
98
+ * Minimal `ManifestComponent` that emits a single standard field stub.
99
+ * Intentionally bypasses `Field`'s `__c` validator since standard api_names
100
+ * (`id`, `created_at`, …) don't carry the custom-field suffix.
101
+ */
102
+ class _StandardField {
103
+ constructor(customObjectApiName, spec) {
104
+ this.customObjectApiName = customObjectApiName;
105
+ this.spec = spec;
106
+ }
107
+ toDict() {
108
+ return {
109
+ type: 'CUSTOM_OBJECT_FIELD',
110
+ custom_object_api_name: this.customObjectApiName,
111
+ field_api_name: this.spec.apiName,
112
+ field_display_name: this.spec.displayName,
113
+ data_type: { options_list: [], supported_types: [], ...this.spec.dataType },
114
+ description: this.spec.description,
115
+ is_required: this.spec.required,
116
+ is_unique: this.spec.unique,
117
+ is_indexed: null,
118
+ rql_formula: null,
119
+ formula_attr_metas: null,
120
+ is_standard: true,
121
+ derived_aggregated_field: null,
122
+ derived_field_formula: null,
123
+ section: null,
124
+ };
125
+ }
126
+ }
127
+ /**
128
+ * Defines a custom object and registers it with the manifest.
129
+ *
130
+ * A custom object is a new entity type with its own fields, validations, rules, list views,
131
+ * and page layouts. You would normally define all custom objects near the top of your manifest
132
+ * file, then define their children (fields, sections, rules, etc.) below. Each child takes
133
+ * the `CustomObject` instance as its first argument and registers automatically.
134
+ *
135
+ * @example
136
+ * ```ts
137
+ * const manifest = new ManifestBuilder({
138
+ * key: 'gym_membership_management',
139
+ * name: 'Gym Membership Management',
140
+ * });
141
+ *
142
+ * const gymCategory = new Category(manifest, { apiName: 'gym__c', name: 'Gym' });
143
+ *
144
+ * const memberObj = new CustomObject(manifest, {
145
+ * apiName: 'gym_member__c',
146
+ * name: 'Member',
147
+ * pluralLabel: 'Members',
148
+ * category: gymCategory,
149
+ * description: 'Gym member profile, contact, and membership status',
150
+ * icon: { emoji: '🏋️' },
151
+ * });
152
+ *
153
+ * // The object is now a scope — children register through it:
154
+ * const firstName = new TextField(memberObj, {
155
+ * apiName: 'first_name__c',
156
+ * displayName: 'First name',
157
+ * required: true,
158
+ * });
159
+ * ```
160
+ *
161
+ * @remarks
162
+ * **Required: every `CustomObject` must have at least one `CustomObjectPageLayout` in the
163
+ * manifest.** Omitting it passes component-level validation but fails at the package level
164
+ * with `DEPENDENCY_ERROR: Page layout config for CO (api_name=...) not found in package
165
+ * configs. CO requires at least one page layout in the package.`
166
+ * Use {@link CustomObjectPageLayout.basic} for a minimal single-tab layout.
167
+ */
168
+ export class CustomObject {
169
+ /**
170
+ * @param scope - The manifest or parent scope to register this object with.
171
+ * @param props - Initialization properties.
172
+ * @throws {Error} If `props.apiName` does not end with `__c`.
173
+ */
174
+ constructor(scope, props) {
175
+ if (!props.apiName.endsWith('__c')) {
176
+ throw new Error(`Custom object api_name must end with __c: ${props.apiName}`);
177
+ }
178
+ this._scope = scope;
179
+ this._apiName = props.apiName;
180
+ this._name = props.name;
181
+ this._category = props.category;
182
+ this._description = props.description;
183
+ this._icon = props.icon;
184
+ this._pluralLabel = props.pluralLabel;
185
+ this._nameFieldDetails = props.nameFieldDetails;
186
+ this._defaultFieldSectionName = props.defaultFieldSectionName;
187
+ scope._register(this);
188
+ // Backend closed-world validation requires these 9 configs for every new CO.
189
+ for (const spec of STANDARD_FIELD_SPECS) {
190
+ scope._register(new _StandardField(this._apiName, spec));
191
+ }
192
+ }
193
+ /** @internal Scope hook — forwards child registration up to the root builder. */
194
+ _register(component) {
195
+ this._scope._register(component);
196
+ }
197
+ /**
198
+ * Returns the api_name of this custom object (e.g. `'gym_member__c'`).
199
+ *
200
+ * Use the return value wherever a field or layout needs to reference this object by name.
201
+ */
202
+ getApiName() {
203
+ return this._apiName;
204
+ }
205
+ /**
206
+ * Returns the singular display name of this custom object (e.g. `'Member'`).
207
+ */
208
+ getName() {
209
+ return this._name;
210
+ }
211
+ /**
212
+ * Serializes this custom object to the wire format consumed by the manifest install endpoint.
213
+ *
214
+ * @returns A plain object with `type: 'CUSTOM_OBJECT'` and all configured fields.
215
+ * Optional fields are omitted when `null`. An `icon` with no populated keys is omitted entirely.
216
+ */
217
+ toDict() {
218
+ const component = {
219
+ type: 'CUSTOM_OBJECT',
220
+ api_name: this._apiName,
221
+ name: this._name,
222
+ description: this._description ?? null,
223
+ category_api_name: typeof this._category === 'string' ? this._category : this._category.getApiName(),
224
+ };
225
+ if (this._icon != null) {
226
+ const iconDict = {};
227
+ if (this._icon.emoji != null)
228
+ iconDict['emoji'] = this._icon.emoji;
229
+ if (this._icon.ripplingIcon != null)
230
+ iconDict['rippling_icon'] = this._icon.ripplingIcon;
231
+ if (this._icon.s3Bucket != null)
232
+ iconDict['s3_bucket'] = this._icon.s3Bucket;
233
+ if (this._icon.s3Key != null)
234
+ iconDict['s3_key'] = this._icon.s3Key;
235
+ // Mirror backend `if self.icon:` — empty dict is falsy and gets omitted.
236
+ if (Object.keys(iconDict).length > 0) {
237
+ component['icon'] = iconDict;
238
+ }
239
+ }
240
+ if (this._pluralLabel != null)
241
+ component['plural_label'] = this._pluralLabel;
242
+ if (this._nameFieldDetails != null)
243
+ component['name_field_details'] = this._nameFieldDetails;
244
+ if (this._defaultFieldSectionName != null) {
245
+ component['default_field_section_name'] = this._defaultFieldSectionName;
246
+ }
247
+ return component;
248
+ }
249
+ }
250
+ //# sourceMappingURL=custom-object.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-object.mjs","sourceRoot":"","sources":["../../src/lib/manifest/custom-object.ts"],"names":[],"mappings":"AAGA,2EAA2E;AAC3E,6CAA6C;AAC7C,mEAAmE;AACnE,sEAAsE;AACtE,mDAAmD;AACnD,2EAA2E;AAE3E,+FAA+F;AAC/F,MAAM,oBAAoB,GAOrB;IACH;QACE,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,6BAA6B;QAC1C,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE;QAChC,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE,IAAI;KACb;IACD;QACE,OAAO,EAAE,YAAY;QACrB,WAAW,EAAE,cAAc;QAC3B,WAAW,EAAE,wCAAwC;QACrD,QAAQ,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE;QACpC,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,KAAK;KACd;IACD;QACE,OAAO,EAAE,YAAY;QACrB,WAAW,EAAE,oBAAoB;QACjC,WAAW,EAAE,6CAA6C;QAC1D,QAAQ,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE;QACpC,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,KAAK;KACd;IACD;QACE,OAAO,EAAE,mBAAmB;QAC5B,WAAW,EAAE,oBAAoB;QACjC,WAAW,EAAE,2DAA2D;QACxE,QAAQ,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE;QACpC,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,KAAK;KACd;IACD;QACE,OAAO,EAAE,aAAa;QACtB,WAAW,EAAE,aAAa;QAC1B,WAAW,EAAE,uEAAuE;QACpF,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE;QAChC,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,IAAI;KACb;IACD;QACE,OAAO,EAAE,MAAM;QACf,WAAW,EAAE,MAAM;QACnB,WAAW,EAAE,yFAAyF;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