@rippling/rippling-sdk 0.2.0-alpha.112 → 0.2.0-alpha.114

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 (277) hide show
  1. package/client.d.mts +41 -8
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts +41 -8
  4. package/client.d.ts.map +1 -1
  5. package/client.js +35 -0
  6. package/client.js.map +1 -1
  7. package/client.mjs +35 -0
  8. package/client.mjs.map +1 -1
  9. package/lib/manifest/app.d.mts +20 -1
  10. package/lib/manifest/app.d.mts.map +1 -1
  11. package/lib/manifest/app.d.ts +20 -1
  12. package/lib/manifest/app.d.ts.map +1 -1
  13. package/lib/manifest/app.js +50 -0
  14. package/lib/manifest/app.js.map +1 -1
  15. package/lib/manifest/app.mjs +51 -1
  16. package/lib/manifest/app.mjs.map +1 -1
  17. package/lib/manifest/composition.d.mts +3 -0
  18. package/lib/manifest/composition.d.mts.map +1 -1
  19. package/lib/manifest/composition.d.ts +3 -0
  20. package/lib/manifest/composition.d.ts.map +1 -1
  21. package/lib/manifest/composition.js.map +1 -1
  22. package/lib/manifest/composition.mjs.map +1 -1
  23. package/lib/manifest/definitions/app.js +4 -1
  24. package/lib/manifest/definitions/app.js.map +1 -1
  25. package/lib/manifest/definitions/app.mjs +4 -1
  26. package/lib/manifest/definitions/app.mjs.map +1 -1
  27. package/lib/manifest/definitions/canvas-instance.d.mts +114 -0
  28. package/lib/manifest/definitions/canvas-instance.d.mts.map +1 -0
  29. package/lib/manifest/definitions/canvas-instance.d.ts +114 -0
  30. package/lib/manifest/definitions/canvas-instance.d.ts.map +1 -0
  31. package/lib/manifest/definitions/canvas-instance.js +31 -0
  32. package/lib/manifest/definitions/canvas-instance.js.map +1 -0
  33. package/lib/manifest/definitions/canvas-instance.mjs +28 -0
  34. package/lib/manifest/definitions/canvas-instance.mjs.map +1 -0
  35. package/lib/manifest/definitions/function.d.mts.map +1 -1
  36. package/lib/manifest/definitions/function.d.ts.map +1 -1
  37. package/lib/manifest/definitions/function.js +1 -0
  38. package/lib/manifest/definitions/function.js.map +1 -1
  39. package/lib/manifest/definitions/function.mjs +1 -0
  40. package/lib/manifest/definitions/function.mjs.map +1 -1
  41. package/lib/manifest/definitions/group.d.mts +64 -0
  42. package/lib/manifest/definitions/group.d.mts.map +1 -0
  43. package/lib/manifest/definitions/group.d.ts +64 -0
  44. package/lib/manifest/definitions/group.d.ts.map +1 -0
  45. package/lib/manifest/definitions/group.js +57 -0
  46. package/lib/manifest/definitions/group.js.map +1 -0
  47. package/lib/manifest/definitions/group.mjs +50 -0
  48. package/lib/manifest/definitions/group.mjs.map +1 -0
  49. package/lib/manifest/definitions/index.d.mts +5 -0
  50. package/lib/manifest/definitions/index.d.mts.map +1 -1
  51. package/lib/manifest/definitions/index.d.ts +5 -0
  52. package/lib/manifest/definitions/index.d.ts.map +1 -1
  53. package/lib/manifest/definitions/index.js +9 -1
  54. package/lib/manifest/definitions/index.js.map +1 -1
  55. package/lib/manifest/definitions/index.mjs +3 -0
  56. package/lib/manifest/definitions/index.mjs.map +1 -1
  57. package/lib/manifest/definitions/saved-super-group.d.mts +12 -0
  58. package/lib/manifest/definitions/saved-super-group.d.mts.map +1 -0
  59. package/lib/manifest/definitions/saved-super-group.d.ts +12 -0
  60. package/lib/manifest/definitions/saved-super-group.d.ts.map +1 -0
  61. package/lib/manifest/definitions/saved-super-group.js +26 -0
  62. package/lib/manifest/definitions/saved-super-group.js.map +1 -0
  63. package/lib/manifest/definitions/saved-super-group.mjs +21 -0
  64. package/lib/manifest/definitions/saved-super-group.mjs.map +1 -0
  65. package/lib/manifest/existing-manifest-context.d.mts +3 -0
  66. package/lib/manifest/existing-manifest-context.d.mts.map +1 -1
  67. package/lib/manifest/existing-manifest-context.d.ts +3 -0
  68. package/lib/manifest/existing-manifest-context.d.ts.map +1 -1
  69. package/lib/manifest/existing-manifest-context.js +15 -0
  70. package/lib/manifest/existing-manifest-context.js.map +1 -1
  71. package/lib/manifest/existing-manifest-context.mjs +15 -0
  72. package/lib/manifest/existing-manifest-context.mjs.map +1 -1
  73. package/lib/manifest/group.d.mts +83 -0
  74. package/lib/manifest/group.d.mts.map +1 -0
  75. package/lib/manifest/group.d.ts +83 -0
  76. package/lib/manifest/group.d.ts.map +1 -0
  77. package/lib/manifest/group.js +207 -0
  78. package/lib/manifest/group.js.map +1 -0
  79. package/lib/manifest/group.mjs +203 -0
  80. package/lib/manifest/group.mjs.map +1 -0
  81. package/lib/manifest/index.d.mts +2 -0
  82. package/lib/manifest/index.d.mts.map +1 -1
  83. package/lib/manifest/index.d.ts +2 -0
  84. package/lib/manifest/index.d.ts.map +1 -1
  85. package/lib/manifest/index.js +5 -1
  86. package/lib/manifest/index.js.map +1 -1
  87. package/lib/manifest/index.mjs +2 -0
  88. package/lib/manifest/index.mjs.map +1 -1
  89. package/lib/manifest/manifest-builder.d.mts +1 -1
  90. package/lib/manifest/manifest-builder.d.mts.map +1 -1
  91. package/lib/manifest/manifest-builder.d.ts +1 -1
  92. package/lib/manifest/manifest-builder.d.ts.map +1 -1
  93. package/lib/manifest/manifest-builder.js.map +1 -1
  94. package/lib/manifest/manifest-builder.mjs.map +1 -1
  95. package/lib/manifest/manifest-function.d.mts +16 -0
  96. package/lib/manifest/manifest-function.d.mts.map +1 -1
  97. package/lib/manifest/manifest-function.d.ts +16 -0
  98. package/lib/manifest/manifest-function.d.ts.map +1 -1
  99. package/lib/manifest/manifest-function.js +67 -0
  100. package/lib/manifest/manifest-function.js.map +1 -1
  101. package/lib/manifest/manifest-function.mjs +68 -1
  102. package/lib/manifest/manifest-function.mjs.map +1 -1
  103. package/lib/manifest/saved-super-group.d.mts +43 -0
  104. package/lib/manifest/saved-super-group.d.mts.map +1 -0
  105. package/lib/manifest/saved-super-group.d.ts +43 -0
  106. package/lib/manifest/saved-super-group.d.ts.map +1 -0
  107. package/lib/manifest/saved-super-group.js +136 -0
  108. package/lib/manifest/saved-super-group.js.map +1 -0
  109. package/lib/manifest/saved-super-group.mjs +132 -0
  110. package/lib/manifest/saved-super-group.mjs.map +1 -0
  111. package/package.json +1 -1
  112. package/resources/application-submissions.d.mts +261 -0
  113. package/resources/application-submissions.d.mts.map +1 -0
  114. package/resources/application-submissions.d.ts +261 -0
  115. package/resources/application-submissions.d.ts.map +1 -0
  116. package/resources/application-submissions.js +112 -0
  117. package/resources/application-submissions.js.map +1 -0
  118. package/resources/application-submissions.mjs +108 -0
  119. package/resources/application-submissions.mjs.map +1 -0
  120. package/resources/bills.d.mts +913 -12
  121. package/resources/bills.d.mts.map +1 -1
  122. package/resources/bills.d.ts +913 -12
  123. package/resources/bills.d.ts.map +1 -1
  124. package/resources/bills.js +221 -0
  125. package/resources/bills.js.map +1 -1
  126. package/resources/bills.mjs +221 -0
  127. package/resources/bills.mjs.map +1 -1
  128. package/resources/candidate-applications.d.mts +247 -9
  129. package/resources/candidate-applications.d.mts.map +1 -1
  130. package/resources/candidate-applications.d.ts +247 -9
  131. package/resources/candidate-applications.d.ts.map +1 -1
  132. package/resources/candidate-applications.js +37 -5
  133. package/resources/candidate-applications.js.map +1 -1
  134. package/resources/candidate-applications.mjs +37 -5
  135. package/resources/candidate-applications.mjs.map +1 -1
  136. package/resources/card-transactions.d.mts +1580 -30
  137. package/resources/card-transactions.d.mts.map +1 -1
  138. package/resources/card-transactions.d.ts +1580 -30
  139. package/resources/card-transactions.d.ts.map +1 -1
  140. package/resources/card-transactions.js +404 -4
  141. package/resources/card-transactions.js.map +1 -1
  142. package/resources/card-transactions.mjs +404 -4
  143. package/resources/card-transactions.mjs.map +1 -1
  144. package/resources/custom-objects/custom-objects.d.mts +4 -0
  145. package/resources/custom-objects/custom-objects.d.mts.map +1 -1
  146. package/resources/custom-objects/custom-objects.d.ts +4 -0
  147. package/resources/custom-objects/custom-objects.d.ts.map +1 -1
  148. package/resources/custom-objects/custom-objects.js +4 -0
  149. package/resources/custom-objects/custom-objects.js.map +1 -1
  150. package/resources/custom-objects/custom-objects.mjs +4 -0
  151. package/resources/custom-objects/custom-objects.mjs.map +1 -1
  152. package/resources/custom-objects/index.d.mts +1 -0
  153. package/resources/custom-objects/index.d.mts.map +1 -1
  154. package/resources/custom-objects/index.d.ts +1 -0
  155. package/resources/custom-objects/index.d.ts.map +1 -1
  156. package/resources/custom-objects/index.js +3 -1
  157. package/resources/custom-objects/index.js.map +1 -1
  158. package/resources/custom-objects/index.mjs +1 -0
  159. package/resources/custom-objects/index.mjs.map +1 -1
  160. package/resources/custom-objects/record-actions.d.mts +98 -0
  161. package/resources/custom-objects/record-actions.d.mts.map +1 -0
  162. package/resources/custom-objects/record-actions.d.ts +98 -0
  163. package/resources/custom-objects/record-actions.d.ts.map +1 -0
  164. package/resources/custom-objects/record-actions.js +58 -0
  165. package/resources/custom-objects/record-actions.js.map +1 -0
  166. package/resources/custom-objects/record-actions.mjs +54 -0
  167. package/resources/custom-objects/record-actions.mjs.map +1 -0
  168. package/resources/earnings-inputs.d.mts +14 -2
  169. package/resources/earnings-inputs.d.mts.map +1 -1
  170. package/resources/earnings-inputs.d.ts +14 -2
  171. package/resources/earnings-inputs.d.ts.map +1 -1
  172. package/resources/earnings-inputs.js +14 -2
  173. package/resources/earnings-inputs.js.map +1 -1
  174. package/resources/earnings-inputs.mjs +14 -2
  175. package/resources/earnings-inputs.mjs.map +1 -1
  176. package/resources/index.d.mts +9 -4
  177. package/resources/index.d.mts.map +1 -1
  178. package/resources/index.d.ts +9 -4
  179. package/resources/index.d.ts.map +1 -1
  180. package/resources/index.js +13 -3
  181. package/resources/index.js.map +1 -1
  182. package/resources/index.mjs +5 -0
  183. package/resources/index.mjs.map +1 -1
  184. package/resources/job-posts.d.mts +345 -0
  185. package/resources/job-posts.d.mts.map +1 -0
  186. package/resources/job-posts.d.ts +345 -0
  187. package/resources/job-posts.d.ts.map +1 -0
  188. package/resources/job-posts.js +110 -0
  189. package/resources/job-posts.js.map +1 -0
  190. package/resources/job-posts.mjs +106 -0
  191. package/resources/job-posts.mjs.map +1 -0
  192. package/resources/job-requisitions.d.mts +96 -4
  193. package/resources/job-requisitions.d.mts.map +1 -1
  194. package/resources/job-requisitions.d.ts +96 -4
  195. package/resources/job-requisitions.d.ts.map +1 -1
  196. package/resources/job-requisitions.js +64 -3
  197. package/resources/job-requisitions.js.map +1 -1
  198. package/resources/job-requisitions.mjs +64 -3
  199. package/resources/job-requisitions.mjs.map +1 -1
  200. package/resources/record-detail-related-records.d.mts +60 -30
  201. package/resources/record-detail-related-records.d.mts.map +1 -1
  202. package/resources/record-detail-related-records.d.ts +60 -30
  203. package/resources/record-detail-related-records.d.ts.map +1 -1
  204. package/resources/record-details.d.mts +120 -60
  205. package/resources/record-details.d.mts.map +1 -1
  206. package/resources/record-details.d.ts +120 -60
  207. package/resources/record-details.d.ts.map +1 -1
  208. package/resources/reimbursements.d.mts +1106 -64
  209. package/resources/reimbursements.d.mts.map +1 -1
  210. package/resources/reimbursements.d.ts +1106 -64
  211. package/resources/reimbursements.d.ts.map +1 -1
  212. package/resources/reimbursements.js +208 -0
  213. package/resources/reimbursements.js.map +1 -1
  214. package/resources/reimbursements.mjs +208 -0
  215. package/resources/reimbursements.mjs.map +1 -1
  216. package/resources/scheduled-payout-labels.d.mts +267 -0
  217. package/resources/scheduled-payout-labels.d.mts.map +1 -0
  218. package/resources/scheduled-payout-labels.d.ts +267 -0
  219. package/resources/scheduled-payout-labels.d.ts.map +1 -0
  220. package/resources/scheduled-payout-labels.js +151 -0
  221. package/resources/scheduled-payout-labels.js.map +1 -0
  222. package/resources/scheduled-payout-labels.mjs +147 -0
  223. package/resources/scheduled-payout-labels.mjs.map +1 -0
  224. package/resources/scheduled-payout-types.d.mts +680 -0
  225. package/resources/scheduled-payout-types.d.mts.map +1 -0
  226. package/resources/scheduled-payout-types.d.ts +680 -0
  227. package/resources/scheduled-payout-types.d.ts.map +1 -0
  228. package/resources/scheduled-payout-types.js +546 -0
  229. package/resources/scheduled-payout-types.js.map +1 -0
  230. package/resources/scheduled-payout-types.mjs +542 -0
  231. package/resources/scheduled-payout-types.mjs.map +1 -0
  232. package/resources/scheduled-payouts.d.mts +1588 -0
  233. package/resources/scheduled-payouts.d.mts.map +1 -0
  234. package/resources/scheduled-payouts.d.ts +1588 -0
  235. package/resources/scheduled-payouts.d.ts.map +1 -0
  236. package/resources/scheduled-payouts.js +582 -0
  237. package/resources/scheduled-payouts.js.map +1 -0
  238. package/resources/scheduled-payouts.mjs +578 -0
  239. package/resources/scheduled-payouts.mjs.map +1 -0
  240. package/src/client.ts +150 -0
  241. package/src/lib/manifest/app.ts +72 -2
  242. package/src/lib/manifest/composition.ts +8 -2
  243. package/src/lib/manifest/definitions/README.md +3 -1
  244. package/src/lib/manifest/definitions/app.ts +4 -1
  245. package/src/lib/manifest/definitions/canvas-instance.ts +143 -0
  246. package/src/lib/manifest/definitions/function.ts +1 -0
  247. package/src/lib/manifest/definitions/group.ts +159 -0
  248. package/src/lib/manifest/definitions/index.ts +42 -0
  249. package/src/lib/manifest/definitions/saved-super-group.ts +28 -0
  250. package/src/lib/manifest/existing-manifest-context.ts +24 -0
  251. package/src/lib/manifest/group.ts +282 -0
  252. package/src/lib/manifest/index.ts +16 -0
  253. package/src/lib/manifest/manifest-builder.ts +2 -0
  254. package/src/lib/manifest/manifest-function.ts +91 -1
  255. package/src/lib/manifest/saved-super-group.ts +171 -0
  256. package/src/resources/application-submissions.ts +315 -0
  257. package/src/resources/bills.ts +1085 -12
  258. package/src/resources/candidate-applications.ts +282 -9
  259. package/src/resources/card-transactions.ts +1874 -32
  260. package/src/resources/custom-objects/custom-objects.ts +16 -0
  261. package/src/resources/custom-objects/index.ts +6 -0
  262. package/src/resources/custom-objects/record-actions.ts +125 -0
  263. package/src/resources/earnings-inputs.ts +14 -2
  264. package/src/resources/index.ts +57 -0
  265. package/src/resources/job-posts.ts +415 -0
  266. package/src/resources/job-requisitions.ts +110 -3
  267. package/src/resources/record-detail-related-records.ts +60 -30
  268. package/src/resources/record-details.ts +120 -60
  269. package/src/resources/reimbursements.ts +1299 -63
  270. package/src/resources/scheduled-payout-labels.ts +373 -0
  271. package/src/resources/scheduled-payout-types.ts +755 -0
  272. package/src/resources/scheduled-payouts.ts +1947 -0
  273. package/src/version.ts +1 -1
  274. package/version.d.mts +1 -1
  275. package/version.d.ts +1 -1
  276. package/version.js +1 -1
  277. package/version.mjs +1 -1
package/src/client.ts CHANGED
@@ -22,6 +22,7 @@ import {
22
22
  import { createObjectClient, type ObjectClient } from './lib/manifest/definitions/custom-object';
23
23
  import { createAgentClient, type AgentClient } from './lib/manifest/definitions/agent';
24
24
  import type { ACPAgent } from './lib/manifest/acp-agent';
25
+ import { createGroupClient, type GroupClient, type GroupReference } from './lib/manifest/definitions/group';
25
26
  import * as Errors from './core/error';
26
27
  import * as Pagination from './core/pagination';
27
28
  import { AbstractPage, PageCursorURLResponse } from './core/pagination';
@@ -44,6 +45,12 @@ import {
44
45
  AppUserRetrieveResponse,
45
46
  AppUsers,
46
47
  } from './resources/app-users';
48
+ import {
49
+ ApplicationSubmissionCreateParams,
50
+ ApplicationSubmissionCreateResponse,
51
+ ApplicationSubmissionRetrieveResponse,
52
+ ApplicationSubmissions,
53
+ } from './resources/application-submissions';
47
54
  import {
48
55
  BackgroundCheckCandidateCreateParams,
49
56
  BackgroundCheckCandidateCreateResponse,
@@ -61,6 +68,8 @@ import {
61
68
  BillListResponsesPageCursorURL,
62
69
  BillRetrieveParams,
63
70
  BillRetrieveResponse,
71
+ BillUpdateParams,
72
+ BillUpdateResponse,
64
73
  Bills,
65
74
  } from './resources/bills';
66
75
  import {
@@ -125,6 +134,10 @@ import {
125
134
  CardTransactionListResponsesPageCursorURL,
126
135
  CardTransactionRetrieveParams,
127
136
  CardTransactionRetrieveResponse,
137
+ CardTransactionUpdateParams,
138
+ CardTransactionUpdateResponse,
139
+ CardTransactionUploadReceiptParams,
140
+ CardTransactionUploadReceiptResponse,
128
141
  CardTransactions,
129
142
  } from './resources/card-transactions';
130
143
  import { Companies, CompaniesPageCursorURL, Company, CompanyListParams } from './resources/companies';
@@ -360,9 +373,19 @@ import {
360
373
  JobPayRateExceptions,
361
374
  JobPayRateExceptionsPageCursorURL,
362
375
  } from './resources/job-pay-rate-exceptions';
376
+ import {
377
+ JobPostListParams,
378
+ JobPostListResponse,
379
+ JobPostListResponsesPageCursorURL,
380
+ JobPostRetrieveParams,
381
+ JobPostRetrieveResponse,
382
+ JobPosts,
383
+ } from './resources/job-posts';
363
384
  import {
364
385
  JobRequisition,
365
386
  JobRequisitionListParams,
387
+ JobRequisitionPipelineResponse,
388
+ JobRequisitionRetrieveResponse,
366
389
  JobRequisitions,
367
390
  JobRequisitionsPageCursorURL,
368
391
  } from './resources/job-requisitions';
@@ -567,6 +590,8 @@ import {
567
590
  ReimbursementRetrieveResponse,
568
591
  ReimbursementUpdateParams,
569
592
  ReimbursementUpdateResponse,
593
+ ReimbursementUploadReceiptParams,
594
+ ReimbursementUploadReceiptResponse,
570
595
  Reimbursements,
571
596
  } from './resources/reimbursements';
572
597
  import {
@@ -592,6 +617,39 @@ import {
592
617
  ScheduledJobAssignmentRetrieveResponse,
593
618
  ScheduledJobAssignments,
594
619
  } from './resources/scheduled-job-assignments';
620
+ import {
621
+ ScheduledPayoutLabelCreateParams,
622
+ ScheduledPayoutLabelCreateResponse,
623
+ ScheduledPayoutLabelListParams,
624
+ ScheduledPayoutLabelListResponse,
625
+ ScheduledPayoutLabelListResponsesPageCursorURL,
626
+ ScheduledPayoutLabelRetrieveResponse,
627
+ ScheduledPayoutLabelUpdateParams,
628
+ ScheduledPayoutLabelUpdateResponse,
629
+ ScheduledPayoutLabels,
630
+ } from './resources/scheduled-payout-labels';
631
+ import {
632
+ ScheduledPayoutTypeCreateParams,
633
+ ScheduledPayoutTypeCreateResponse,
634
+ ScheduledPayoutTypeListParams,
635
+ ScheduledPayoutTypeListResponse,
636
+ ScheduledPayoutTypeListResponsesPageCursorURL,
637
+ ScheduledPayoutTypeRetrieveResponse,
638
+ ScheduledPayoutTypeUpdateParams,
639
+ ScheduledPayoutTypeUpdateResponse,
640
+ ScheduledPayoutTypes,
641
+ } from './resources/scheduled-payout-types';
642
+ import {
643
+ ScheduledPayoutCancelParams,
644
+ ScheduledPayoutCancelResponse,
645
+ ScheduledPayoutCreateParams,
646
+ ScheduledPayoutCreateResponse,
647
+ ScheduledPayoutListParams,
648
+ ScheduledPayoutListResponse,
649
+ ScheduledPayoutListResponsesPageCursorURL,
650
+ ScheduledPayoutRetrieveResponse,
651
+ ScheduledPayouts,
652
+ } from './resources/scheduled-payouts';
595
653
  import {
596
654
  ScheduleCreateParams,
597
655
  ScheduleCreateResponse,
@@ -1013,6 +1071,11 @@ export class RipplingSDK {
1013
1071
  return createAgentClient(this, definition);
1014
1072
  }
1015
1073
 
1074
+ /** Access Supergroup retrieval and membership operations using an explicit deployed ID. */
1075
+ group(definition: GroupReference | string): GroupClient {
1076
+ return createGroupClient(this, definition);
1077
+ }
1078
+
1016
1079
  bearerToken: string;
1017
1080
 
1018
1081
  baseURL: string;
@@ -1798,6 +1861,10 @@ export class RipplingSDK {
1798
1861
  * Mappings between Rippling workers and their user accounts in third-party apps
1799
1862
  */
1800
1863
  appUsers: API.AppUsers = new API.AppUsers(this);
1864
+ /**
1865
+ * An application by a candidate to a specific job requisition
1866
+ */
1867
+ applicationSubmissions: API.ApplicationSubmissions = new API.ApplicationSubmissions(this);
1801
1868
  /**
1802
1869
  * Candidates who have been submitted for background check screening
1803
1870
  */
@@ -1933,6 +2000,10 @@ export class RipplingSDK {
1933
2000
  * Organizational job categories that group similar roles and responsibilities within a company
1934
2001
  */
1935
2002
  jobFunctions: API.JobFunctions = new API.JobFunctions(this);
2003
+ /**
2004
+ * Customer-facing postings associated with job requisitions
2005
+ */
2006
+ jobPosts: API.JobPosts = new API.JobPosts(this);
1936
2007
  /**
1937
2008
  * A request for a job to be filled by a candidate
1938
2009
  */
@@ -2037,6 +2108,18 @@ export class RipplingSDK {
2037
2108
  * Job related information for the company
2038
2109
  */
2039
2110
  scheduledJobAssignments: API.ScheduledJobAssignments = new API.ScheduledJobAssignments(this);
2111
+ /**
2112
+ * Compensation associated with workers
2113
+ */
2114
+ scheduledPayouts: API.ScheduledPayouts = new API.ScheduledPayouts(this);
2115
+ /**
2116
+ * Compensation associated with workers
2117
+ */
2118
+ scheduledPayoutLabels: API.ScheduledPayoutLabels = new API.ScheduledPayoutLabels(this);
2119
+ /**
2120
+ * Compensation associated with workers
2121
+ */
2122
+ scheduledPayoutTypes: API.ScheduledPayoutTypes = new API.ScheduledPayoutTypes(this);
2040
2123
  /**
2041
2124
  * Shift assignments assigned to workers
2042
2125
  */
@@ -2143,6 +2226,7 @@ RipplingSDK.JobPayRateExceptions = JobPayRateExceptions;
2143
2226
  RipplingSDK.ActivityLog = ActivityLog;
2144
2227
  RipplingSDK.Agents = Agents;
2145
2228
  RipplingSDK.AppUsers = AppUsers;
2229
+ RipplingSDK.ApplicationSubmissions = ApplicationSubmissions;
2146
2230
  RipplingSDK.BackgroundCheckCandidates = BackgroundCheckCandidates;
2147
2231
  RipplingSDK.Bills = Bills;
2148
2232
  RipplingSDK.BreakPolicies = BreakPolicies;
@@ -2179,6 +2263,7 @@ RipplingSDK.HeadcountPriorities = HeadcountPriorities;
2179
2263
  RipplingSDK.Hires = Hires;
2180
2264
  RipplingSDK.HireRequirements = HireRequirements;
2181
2265
  RipplingSDK.JobFunctions = JobFunctions;
2266
+ RipplingSDK.JobPosts = JobPosts;
2182
2267
  RipplingSDK.JobRequisitionsWrite = JobRequisitionsWrite;
2183
2268
  RipplingSDK.LeaveAccruals = LeaveAccruals;
2184
2269
  RipplingSDK.LeaveProgramEvaluations = LeaveProgramEvaluations;
@@ -2206,6 +2291,9 @@ RipplingSDK.ReportRuns = ReportRuns;
2206
2291
  RipplingSDK.Sandboxes = Sandboxes;
2207
2292
  RipplingSDK.Schedules = Schedules;
2208
2293
  RipplingSDK.ScheduledJobAssignments = ScheduledJobAssignments;
2294
+ RipplingSDK.ScheduledPayouts = ScheduledPayouts;
2295
+ RipplingSDK.ScheduledPayoutLabels = ScheduledPayoutLabels;
2296
+ RipplingSDK.ScheduledPayoutTypes = ScheduledPayoutTypes;
2209
2297
  RipplingSDK.Shiftassignments = Shiftassignments;
2210
2298
  RipplingSDK.Sites = Sites;
2211
2299
  RipplingSDK.SoftwareDeployments = SoftwareDeployments;
@@ -2301,6 +2389,8 @@ export declare namespace RipplingSDK {
2301
2389
  export {
2302
2390
  JobRequisitions as JobRequisitions,
2303
2391
  type JobRequisition as JobRequisition,
2392
+ type JobRequisitionRetrieveResponse as JobRequisitionRetrieveResponse,
2393
+ type JobRequisitionPipelineResponse as JobRequisitionPipelineResponse,
2304
2394
  type JobRequisitionsPageCursorURL as JobRequisitionsPageCursorURL,
2305
2395
  type JobRequisitionListParams as JobRequisitionListParams,
2306
2396
  };
@@ -2562,6 +2652,13 @@ export declare namespace RipplingSDK {
2562
2652
  type AppUserRetrieveParams as AppUserRetrieveParams,
2563
2653
  };
2564
2654
 
2655
+ export {
2656
+ ApplicationSubmissions as ApplicationSubmissions,
2657
+ type ApplicationSubmissionRetrieveResponse as ApplicationSubmissionRetrieveResponse,
2658
+ type ApplicationSubmissionCreateResponse as ApplicationSubmissionCreateResponse,
2659
+ type ApplicationSubmissionCreateParams as ApplicationSubmissionCreateParams,
2660
+ };
2661
+
2565
2662
  export {
2566
2663
  BackgroundCheckCandidates as BackgroundCheckCandidates,
2567
2664
  type BackgroundCheckCandidateListResponse as BackgroundCheckCandidateListResponse,
@@ -2578,9 +2675,11 @@ export declare namespace RipplingSDK {
2578
2675
  Bills as Bills,
2579
2676
  type BillListResponse as BillListResponse,
2580
2677
  type BillRetrieveResponse as BillRetrieveResponse,
2678
+ type BillUpdateResponse as BillUpdateResponse,
2581
2679
  type BillListResponsesPageCursorURL as BillListResponsesPageCursorURL,
2582
2680
  type BillListParams as BillListParams,
2583
2681
  type BillRetrieveParams as BillRetrieveParams,
2682
+ type BillUpdateParams as BillUpdateParams,
2584
2683
  };
2585
2684
 
2586
2685
  export {
@@ -2629,9 +2728,13 @@ export declare namespace RipplingSDK {
2629
2728
  CardTransactions as CardTransactions,
2630
2729
  type CardTransactionListResponse as CardTransactionListResponse,
2631
2730
  type CardTransactionRetrieveResponse as CardTransactionRetrieveResponse,
2731
+ type CardTransactionUpdateResponse as CardTransactionUpdateResponse,
2732
+ type CardTransactionUploadReceiptResponse as CardTransactionUploadReceiptResponse,
2632
2733
  type CardTransactionListResponsesPageCursorURL as CardTransactionListResponsesPageCursorURL,
2633
2734
  type CardTransactionListParams as CardTransactionListParams,
2634
2735
  type CardTransactionRetrieveParams as CardTransactionRetrieveParams,
2736
+ type CardTransactionUpdateParams as CardTransactionUpdateParams,
2737
+ type CardTransactionUploadReceiptParams as CardTransactionUploadReceiptParams,
2635
2738
  };
2636
2739
 
2637
2740
  export {
@@ -2856,6 +2959,15 @@ export declare namespace RipplingSDK {
2856
2959
  type JobFunctionListParams as JobFunctionListParams,
2857
2960
  };
2858
2961
 
2962
+ export {
2963
+ JobPosts as JobPosts,
2964
+ type JobPostListResponse as JobPostListResponse,
2965
+ type JobPostRetrieveResponse as JobPostRetrieveResponse,
2966
+ type JobPostListResponsesPageCursorURL as JobPostListResponsesPageCursorURL,
2967
+ type JobPostListParams as JobPostListParams,
2968
+ type JobPostRetrieveParams as JobPostRetrieveParams,
2969
+ };
2970
+
2859
2971
  export {
2860
2972
  JobRequisitionsWrite as JobRequisitionsWrite,
2861
2973
  type JobRequisitionsWriteCreateResponse as JobRequisitionsWriteCreateResponse,
@@ -3021,10 +3133,12 @@ export declare namespace RipplingSDK {
3021
3133
  type ReimbursementListResponse as ReimbursementListResponse,
3022
3134
  type ReimbursementRetrieveResponse as ReimbursementRetrieveResponse,
3023
3135
  type ReimbursementUpdateResponse as ReimbursementUpdateResponse,
3136
+ type ReimbursementUploadReceiptResponse as ReimbursementUploadReceiptResponse,
3024
3137
  type ReimbursementListResponsesPageCursorURL as ReimbursementListResponsesPageCursorURL,
3025
3138
  type ReimbursementListParams as ReimbursementListParams,
3026
3139
  type ReimbursementRetrieveParams as ReimbursementRetrieveParams,
3027
3140
  type ReimbursementUpdateParams as ReimbursementUpdateParams,
3141
+ type ReimbursementUploadReceiptParams as ReimbursementUploadReceiptParams,
3028
3142
  };
3029
3143
 
3030
3144
  export { Reports as Reports, type ReportRetrieveResponse as ReportRetrieveResponse };
@@ -3068,6 +3182,42 @@ export declare namespace RipplingSDK {
3068
3182
  type ScheduledJobAssignmentListParams as ScheduledJobAssignmentListParams,
3069
3183
  };
3070
3184
 
3185
+ export {
3186
+ ScheduledPayouts as ScheduledPayouts,
3187
+ type ScheduledPayoutListResponse as ScheduledPayoutListResponse,
3188
+ type ScheduledPayoutCreateResponse as ScheduledPayoutCreateResponse,
3189
+ type ScheduledPayoutRetrieveResponse as ScheduledPayoutRetrieveResponse,
3190
+ type ScheduledPayoutCancelResponse as ScheduledPayoutCancelResponse,
3191
+ type ScheduledPayoutListResponsesPageCursorURL as ScheduledPayoutListResponsesPageCursorURL,
3192
+ type ScheduledPayoutListParams as ScheduledPayoutListParams,
3193
+ type ScheduledPayoutCreateParams as ScheduledPayoutCreateParams,
3194
+ type ScheduledPayoutCancelParams as ScheduledPayoutCancelParams,
3195
+ };
3196
+
3197
+ export {
3198
+ ScheduledPayoutLabels as ScheduledPayoutLabels,
3199
+ type ScheduledPayoutLabelListResponse as ScheduledPayoutLabelListResponse,
3200
+ type ScheduledPayoutLabelCreateResponse as ScheduledPayoutLabelCreateResponse,
3201
+ type ScheduledPayoutLabelRetrieveResponse as ScheduledPayoutLabelRetrieveResponse,
3202
+ type ScheduledPayoutLabelUpdateResponse as ScheduledPayoutLabelUpdateResponse,
3203
+ type ScheduledPayoutLabelListResponsesPageCursorURL as ScheduledPayoutLabelListResponsesPageCursorURL,
3204
+ type ScheduledPayoutLabelListParams as ScheduledPayoutLabelListParams,
3205
+ type ScheduledPayoutLabelCreateParams as ScheduledPayoutLabelCreateParams,
3206
+ type ScheduledPayoutLabelUpdateParams as ScheduledPayoutLabelUpdateParams,
3207
+ };
3208
+
3209
+ export {
3210
+ ScheduledPayoutTypes as ScheduledPayoutTypes,
3211
+ type ScheduledPayoutTypeListResponse as ScheduledPayoutTypeListResponse,
3212
+ type ScheduledPayoutTypeCreateResponse as ScheduledPayoutTypeCreateResponse,
3213
+ type ScheduledPayoutTypeRetrieveResponse as ScheduledPayoutTypeRetrieveResponse,
3214
+ type ScheduledPayoutTypeUpdateResponse as ScheduledPayoutTypeUpdateResponse,
3215
+ type ScheduledPayoutTypeListResponsesPageCursorURL as ScheduledPayoutTypeListResponsesPageCursorURL,
3216
+ type ScheduledPayoutTypeListParams as ScheduledPayoutTypeListParams,
3217
+ type ScheduledPayoutTypeCreateParams as ScheduledPayoutTypeCreateParams,
3218
+ type ScheduledPayoutTypeUpdateParams as ScheduledPayoutTypeUpdateParams,
3219
+ };
3220
+
3071
3221
  export {
3072
3222
  Shiftassignments as Shiftassignments,
3073
3223
  type ShiftassignmentListResponse as ShiftassignmentListResponse,
@@ -1,9 +1,12 @@
1
1
  import { getExistingManifestContext, type ExistingManifestContextOptions } from './existing-manifest-context';
2
2
  import type { ManifestComponentDeletion, ManifestScope } from './manifest-builder';
3
3
  import { SduiPage } from './sdui-page';
4
+ import { Group, type GroupConfig } from './group';
5
+ import type { SavedSuperGroup } from './saved-super-group';
4
6
  import {
5
7
  optionalArrayComponentField,
6
8
  optionalStringComponentField,
9
+ requireObjectComponentField,
7
10
  requireStringComponentField,
8
11
  } from './_existing-component-fields';
9
12
  import type { AppVisibilityPlatform } from './_helpers';
@@ -72,6 +75,22 @@ export interface AppProps {
72
75
  * Required. Must include at least one page.
73
76
  */
74
77
  pages: AppPage[];
78
+ /** Embedded app audiences; use defineGroup, not a standalone saved-group wrapper. */
79
+ sharedGroup?: Group | null;
80
+ adminGroup?: Group | null;
81
+ }
82
+
83
+ interface AppConfig extends Record<string, unknown> {
84
+ type: 'CUSTOM_APP';
85
+ shared_group_config?: GroupConfig | null;
86
+ admin_group_config?: GroupConfig | null;
87
+ }
88
+
89
+ function inlineGroup(group: Group | null | undefined): Group | null | undefined {
90
+ if (group != null && typeof group._toDict !== 'function') {
91
+ throw new TypeError('Inline app groups must be created with defineGroup or Group.');
92
+ }
93
+ return group;
75
94
  }
76
95
 
77
96
  function resolvePage(entry: AppPage): Record<string, any> {
@@ -147,6 +166,8 @@ export class App {
147
166
  private readonly _visibilityPlatforms: AppVisibilityPlatform[] | undefined;
148
167
  /** Wire-format pages, resolved eagerly at construction. */
149
168
  private readonly _pages: Record<string, any>[];
169
+ private readonly _sharedGroup: Group | null | undefined;
170
+ private readonly _adminGroup: Group | null | undefined;
150
171
 
151
172
  /**
152
173
  * @param scope - The manifest to register this app with.
@@ -160,6 +181,8 @@ export class App {
160
181
  this._icon = props.icon;
161
182
  this._visibilityPlatforms = props.visibilityPlatforms ? [...props.visibilityPlatforms] : undefined;
162
183
  this._pages = resolvePages(props.pages);
184
+ this._sharedGroup = inlineGroup(props.sharedGroup);
185
+ this._adminGroup = inlineGroup(props.adminGroup);
163
186
  scope._register(this);
164
187
  }
165
188
 
@@ -184,11 +207,27 @@ export class App {
184
207
  App.componentType,
185
208
  ),
186
209
  _pages: clonePages(component['pages']),
210
+ _sharedGroup: App.groupFromExistingComponent(component, 'shared_group_config'),
211
+ _adminGroup: App.groupFromExistingComponent(component, 'admin_group_config'),
187
212
  });
188
213
  scope._register(app);
189
214
  return app;
190
215
  }
191
216
 
217
+ private static groupFromExistingComponent(
218
+ component: Record<string, unknown>,
219
+ key: 'shared_group_config' | 'admin_group_config',
220
+ ): Group | null | undefined {
221
+ const value = component[key];
222
+ if (value == null) return value;
223
+ const apiName = requireStringComponentField(component, 'api_name', App.componentType);
224
+ const slot = key === 'shared_group_config' ? 'shared' : 'admin';
225
+ return Group._fromExistingConfig(requireObjectComponentField(component, key, App.componentType), {
226
+ meObjId: `CUSTOM_APP:${apiName}:${slot}`,
227
+ spokeOwnerHandle: 'DUMMY_UNITY_ADMIN',
228
+ });
229
+ }
230
+
192
231
  private static appIconFromExistingComponent(value: unknown): AppIcon | undefined {
193
232
  if (value == null || typeof value !== 'object') return undefined;
194
233
  const wire = value as Record<string, any>;
@@ -210,13 +249,30 @@ export class App {
210
249
  return this._name;
211
250
  }
212
251
 
252
+ /** Embedded groups remain owned by this app; edit their rules without replacing the slot. */
253
+ getSharedGroup(): Group | null | undefined {
254
+ return this._sharedGroup;
255
+ }
256
+
257
+ getAdminGroup(): Group | null | undefined {
258
+ return this._adminGroup;
259
+ }
260
+
261
+ /** @internal Only saved groups referenced by embedded rules become manifest dependencies. */
262
+ getReferencedGroups(): SavedSuperGroup[] {
263
+ return [
264
+ ...(this._sharedGroup?.getReferencedGroups() ?? []),
265
+ ...(this._adminGroup?.getReferencedGroups() ?? []),
266
+ ];
267
+ }
268
+
213
269
  /**
214
270
  * Serializes this app to the wire format consumed by the manifest install endpoint.
215
271
  *
216
272
  * @returns A plain object with `type: 'CUSTOM_APP'`. Optional fields are omitted when unset.
217
273
  */
218
- toDict(): Record<string, any> {
219
- const component: Record<string, any> = {
274
+ toDict(): AppConfig {
275
+ const component: AppConfig = {
220
276
  type: App.componentType,
221
277
  api_name: this._apiName,
222
278
  name: this._name,
@@ -228,6 +284,20 @@ export class App {
228
284
  if (this._appType != null) component['app_type'] = this._appType;
229
285
  if (this._visibilityPlatforms != null) component['visibility_platforms'] = [...this._visibilityPlatforms];
230
286
  component['pages'] = this._pages.map((p) => ({ ...p }));
287
+ if (this._sharedGroup !== undefined) {
288
+ component['shared_group_config'] =
289
+ this._sharedGroup?._toDict({
290
+ meObjId: `CUSTOM_APP:${this._apiName}:shared`,
291
+ spokeOwnerHandle: 'DUMMY_UNITY_ADMIN',
292
+ }) ?? null;
293
+ }
294
+ if (this._adminGroup !== undefined) {
295
+ component['admin_group_config'] =
296
+ this._adminGroup?._toDict({
297
+ meObjId: `CUSTOM_APP:${this._apiName}:admin`,
298
+ spokeOwnerHandle: 'DUMMY_UNITY_ADMIN',
299
+ }) ?? null;
300
+ }
231
301
  return component;
232
302
  }
233
303
  }
@@ -18,6 +18,7 @@ export interface DefineManifestOptions {
18
18
  }
19
19
 
20
20
  export interface ManifestDefinition extends BuiltManifest {
21
+ components: Array<Record<string, any> & { type: string }>;
21
22
  readonly [manifestBuilds]?: readonly DeferredBuild[];
22
23
  }
23
24
 
@@ -80,8 +81,13 @@ export function defineManifest(options: DefineManifestOptions): Readonly<Manifes
80
81
  entries.push('type' in output ? { config: output } : output);
81
82
  }
82
83
 
83
- const snapshots: Record<string, any>[] = JSON.parse(JSON.stringify(entries.map((entry) => entry.config)));
84
- const unique = new Map<string, { config: Record<string, any>; entry: MetadataEntry }>();
84
+ const snapshots: ManifestDefinition['components'] = JSON.parse(
85
+ JSON.stringify(entries.map((entry) => entry.config)),
86
+ );
87
+ const unique = new Map<
88
+ string,
89
+ { config: ManifestDefinition['components'][number]; entry: MetadataEntry }
90
+ >();
85
91
  for (const [index, config] of snapshots.entries()) {
86
92
  const entry = entries[index]!;
87
93
  const key = entryKey(entry);
@@ -56,11 +56,13 @@ Definition-based record writes accept `null` for optional writable custom fields
56
56
 
57
57
  `defineManifest` collects dependencies declared by the component's `references` hook, such as an app's pages and their rendering functions. Include other desired children as roots: listing an object does not include every view or action created for it. Raw strings and opaque JSON do not create dependencies.
58
58
 
59
+ `defineCanvasInstance` accepts Canvas components, actions, and variables in the backend wire format. Grid positions, event handlers, property metadata, media references, and versions are typed; property values and extra grid fields remain JSON because they vary by widget. Each component requires a nested `gridProperties.position`. Media entries must include the source `s3_bucket` and `s3_key` required for installation. For a `ripplingFunction` action, use `properties.values.functionApiName` rather than `functionId`, and pass the matching `defineFunction` definitions in `functions` (or include them as manifest roots). Use `sourceId` only to preserve the source ID of an extracted config; Canvas identity is its API name. Custom App Canvas page references are not supported by `defineApp`.
60
+
59
61
  New custom objects require at least one list view, including objects included through lookup dependencies. Add their views as explicit roots.
60
62
 
61
63
  Composition snapshots the existing `{ metadata, components }` wire format. Identical serialized keys are deduplicated; different configs with the same key are rejected. Fields and layouts use object-scoped names; native fields and sections use model-scoped names. Custom-object sections, actions, views, validations, and record-triggered flows require names unique across objects because their backend lookups or installation maps are company-scoped. Authored metadata replaces generated defaults, and base/extended objects share generated layouts.
62
64
 
63
- Supply complete API names: objects, categories, nested field and section keys, actions, validations, record-triggered flows, workflows, pages, custom skills, and ACP agents require `__c`. The helpers validate names rather than adding suffixes. Category string references also use the complete API name. Native sections require `__cfs`; native fields require `__cfv2`. Employee custom fields use `applicableGroupId` for an existing applicability group. Owner permissions are created by the backend when it installs the object.
65
+ Supply complete API names: objects, categories, nested field and section keys, actions, validations, record-triggered flows, workflows, pages, Canvas instances, custom skills, and ACP agents require `__c`. The helpers validate names rather than adding suffixes. Category string references also use the complete API name. Native sections require `__cfs`; native fields require `__cfv2`. Employee custom fields use `applicableGroupId` for an existing applicability group. Owner permissions are created by the backend when it installs the object.
64
66
 
65
67
  Definitions with file sources require `compileManifest(manifest, readSource)` or `rippling project export` before JSON serialization. Source files are read only at compilation, unchanged; export does not bundle local imports. `fn.setCode(...)` and `agent.setSource(...)` replace file sources for subsequent manifests. Previously composed manifests keep their source snapshots.
66
68
 
@@ -8,5 +8,8 @@ export function defineApp(props: AppProps): App {
8
8
  const appComponent: ComponentDefinition<typeof defineApp> = defineComponent({
9
9
  type: 'CUSTOM_APP',
10
10
  define: defineApp,
11
- references: (_definition, props) => props.pages,
11
+ references: (definition, props) => {
12
+ const pages = [...props.pages];
13
+ return () => [...pages, ...definition.getReferencedGroups()];
14
+ },
12
15
  });
@@ -0,0 +1,143 @@
1
+ import { defineComponent, validateCustomApiName, type ComponentDefinition } from './component';
2
+ import type { JsonValue } from '../custom-object-page-layout';
3
+ import type { DefinedFunction } from './function';
4
+
5
+ type CanvasGridFields = {
6
+ x?: number;
7
+ y?: number;
8
+ width?: number;
9
+ height?: number;
10
+ defaultWidth?: number;
11
+ defaultHeight?: number;
12
+ previousWidth?: number;
13
+ previousHeight?: number;
14
+ minWidth?: number;
15
+ minHeight?: number;
16
+ disableVerticalResize?: boolean;
17
+ } & Record<string, JsonValue>;
18
+
19
+ export type CanvasGridPosition = CanvasGridFields & { x: number; y: number; width: number; height: number };
20
+
21
+ export type CanvasGridProperties = CanvasGridFields & { position: CanvasGridPosition };
22
+
23
+ export type CanvasPropertyMeta = { isExpression?: boolean } & Record<string, JsonValue>;
24
+
25
+ export type CanvasEventHandler = {
26
+ event: string;
27
+ type: string;
28
+ properties: Record<string, JsonValue>;
29
+ } & Record<string, JsonValue>;
30
+
31
+ export type CanvasPropertyValues = {
32
+ eventHandlers?: CanvasEventHandler[] | null;
33
+ } & Record<string, JsonValue>;
34
+
35
+ export type CanvasProperties = {
36
+ values?: CanvasPropertyValues | null;
37
+ meta?: Record<string, CanvasPropertyMeta | null> | null;
38
+ } & Record<string, JsonValue>;
39
+
40
+ export type CanvasActionProperties = CanvasProperties & {
41
+ values?: (CanvasPropertyValues & { functionApiName?: string | null }) | null;
42
+ };
43
+
44
+ export type CanvasMedia = {
45
+ name: string;
46
+ mime_type: string;
47
+ s3_bucket: string;
48
+ s3_key: string;
49
+ /** Decimal string or number; numeric strings are validated by the server during installation. */
50
+ aspect_ratio?: `${number}` | number;
51
+ };
52
+
53
+ export type CanvasVersion = { major: number; minor: number };
54
+
55
+ export type CanvasComponent = {
56
+ uuid: string;
57
+ slug: string;
58
+ type: string;
59
+ gridProperties: CanvasGridProperties;
60
+ properties?: CanvasProperties;
61
+ parentComponent?: string | null;
62
+ layoutContainer?: string | null;
63
+ };
64
+
65
+ export type CanvasAction = {
66
+ uuid: string;
67
+ slug: string;
68
+ type: string;
69
+ properties?: CanvasActionProperties;
70
+ };
71
+
72
+ export type CanvasVariable = {
73
+ uuid: string;
74
+ slug: string;
75
+ type?: string;
76
+ name?: string | null;
77
+ description?: string | null;
78
+ value?: string | null;
79
+ properties: CanvasProperties;
80
+ };
81
+
82
+ export interface DefineCanvasInstanceProps {
83
+ apiName: `${string}__c`;
84
+ name: string | null;
85
+ components: CanvasComponent[];
86
+ actions?: CanvasAction[] | null;
87
+ canvasActions?: CanvasAction[] | null;
88
+ variables?: CanvasVariable[] | null;
89
+ media?: Record<string, CanvasMedia> | null;
90
+ version?: CanvasVersion | null;
91
+ /** Source ID from an extracted config; never used as the Canvas identity. */
92
+ sourceId?: string | null;
93
+ /** Function definitions referenced by actions, included in the manifest. */
94
+ functions?: readonly DefinedFunction<any, any>[];
95
+ }
96
+
97
+ export interface DefinedCanvasInstance {
98
+ readonly apiName: string;
99
+ toDict(): {
100
+ type: 'CANVAS_INSTANCE';
101
+ api_name: string;
102
+ identity_format_version: 2;
103
+ name: string | null;
104
+ components: CanvasComponent[];
105
+ actions?: CanvasAction[] | null;
106
+ canvas_actions?: CanvasAction[] | null;
107
+ variables?: CanvasVariable[] | null;
108
+ media?: Record<string, CanvasMedia> | null;
109
+ version?: CanvasVersion | null;
110
+ obj_id?: string | null;
111
+ };
112
+ }
113
+
114
+ /** Defines Canvas metadata. Nested components and actions use the backend's wire format. */
115
+ export function defineCanvasInstance(props: DefineCanvasInstanceProps): DefinedCanvasInstance {
116
+ const { apiName } = props;
117
+ validateCustomApiName(apiName);
118
+ return canvasInstanceComponent.register(
119
+ {
120
+ apiName,
121
+ toDict: () => ({
122
+ type: 'CANVAS_INSTANCE' as const,
123
+ api_name: apiName,
124
+ identity_format_version: 2 as const,
125
+ name: props.name,
126
+ components: props.components,
127
+ ...(props.actions === undefined ? {} : { actions: props.actions }),
128
+ ...(props.canvasActions === undefined ? {} : { canvas_actions: props.canvasActions }),
129
+ ...(props.variables === undefined ? {} : { variables: props.variables }),
130
+ ...(props.media === undefined ? {} : { media: props.media }),
131
+ ...(props.version === undefined ? {} : { version: props.version }),
132
+ ...(props.sourceId === undefined ? {} : { obj_id: props.sourceId }),
133
+ }),
134
+ },
135
+ props,
136
+ );
137
+ }
138
+
139
+ const canvasInstanceComponent: ComponentDefinition<typeof defineCanvasInstance> = defineComponent({
140
+ type: 'CANVAS_INSTANCE',
141
+ define: defineCanvasInstance,
142
+ references: (_definition, props) => () => props.functions ?? [],
143
+ });
@@ -169,6 +169,7 @@ interface FunctionMetadata {
169
169
  const functionComponent = defineComponent({
170
170
  type: 'FUNCTION',
171
171
  define: defineFunction,
172
+ references: (definition) => () => definition.getReferencedGroups(),
172
173
  serialize: (definition) =>
173
174
  sourceEntry(definition.toDict() as FunctionMetadata, definition.source, (config, code_draft) => ({
174
175
  ...config,