@rulebricks/sdk 1.5.2 → 2.0.0

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 (305) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +17 -12
  3. package/api/resources/assets/client/Client.d.ts +55 -1
  4. package/api/resources/assets/client/Client.js +135 -0
  5. package/api/resources/assets/client/index.d.ts +1 -1
  6. package/api/resources/assets/client/index.js +15 -0
  7. package/api/resources/assets/client/requests/ExportManifestRequest.d.ts +23 -0
  8. package/api/resources/assets/client/requests/ExportManifestRequest.js +3 -0
  9. package/api/resources/assets/client/requests/ImportManifestRequest.d.ts +48 -0
  10. package/api/resources/assets/client/requests/ImportManifestRequest.js +3 -0
  11. package/api/resources/assets/client/requests/index.d.ts +2 -0
  12. package/api/resources/assets/client/requests/index.js +2 -0
  13. package/api/resources/assets/index.d.ts +1 -0
  14. package/api/resources/assets/index.js +1 -0
  15. package/api/resources/assets/types/ExportAssetsResponse.d.ts +2 -0
  16. package/api/resources/assets/types/ExportAssetsResponse.js +3 -0
  17. package/api/resources/assets/types/index.d.ts +1 -0
  18. package/api/resources/assets/types/index.js +17 -0
  19. package/api/resources/contexts/client/Client.d.ts +167 -0
  20. package/api/resources/contexts/client/Client.js +563 -0
  21. package/api/resources/contexts/client/index.d.ts +1 -0
  22. package/api/resources/contexts/client/index.js +17 -0
  23. package/api/resources/contexts/client/requests/CascadeContextRequest.d.ts +15 -0
  24. package/api/resources/contexts/client/requests/CascadeContextRequest.js +3 -0
  25. package/api/resources/contexts/client/requests/DeleteInstanceContextsRequest.d.ts +13 -0
  26. package/api/resources/contexts/client/requests/DeleteInstanceContextsRequest.js +3 -0
  27. package/api/resources/contexts/client/requests/GetHistoryContextsRequest.d.ts +17 -0
  28. package/api/resources/contexts/client/requests/GetHistoryContextsRequest.js +3 -0
  29. package/api/resources/contexts/client/requests/GetInstanceContextsRequest.d.ts +13 -0
  30. package/api/resources/contexts/client/requests/GetInstanceContextsRequest.js +3 -0
  31. package/api/resources/contexts/client/requests/GetPendingContextsRequest.d.ts +13 -0
  32. package/api/resources/contexts/client/requests/GetPendingContextsRequest.js +3 -0
  33. package/api/resources/contexts/client/requests/SolveContextFlowRequest.d.ts +20 -0
  34. package/api/resources/contexts/client/requests/SolveContextFlowRequest.js +3 -0
  35. package/api/resources/contexts/client/requests/SolveContextRuleRequest.d.ts +20 -0
  36. package/api/resources/contexts/client/requests/SolveContextRuleRequest.js +3 -0
  37. package/api/resources/contexts/client/requests/SubmitContextsRequest.d.ts +19 -0
  38. package/api/resources/contexts/client/requests/SubmitContextsRequest.js +3 -0
  39. package/api/resources/contexts/client/requests/index.d.ts +8 -0
  40. package/api/resources/contexts/client/requests/index.js +2 -0
  41. package/api/resources/contexts/index.d.ts +2 -0
  42. package/api/resources/contexts/index.js +18 -0
  43. package/api/resources/contexts/resources/admin/client/Client.d.ts +102 -0
  44. package/api/resources/contexts/resources/admin/client/Client.js +353 -0
  45. package/api/resources/contexts/resources/admin/client/index.d.ts +1 -0
  46. package/api/resources/contexts/resources/admin/client/index.js +17 -0
  47. package/api/resources/contexts/resources/admin/client/requests/CreateContextRequest.d.ts +55 -0
  48. package/api/resources/contexts/resources/admin/client/requests/CreateContextRequest.js +12 -0
  49. package/api/resources/contexts/resources/admin/client/requests/DeleteAdminRequest.d.ts +10 -0
  50. package/api/resources/contexts/resources/admin/client/requests/DeleteAdminRequest.js +3 -0
  51. package/api/resources/contexts/resources/admin/client/requests/GetAdminRequest.d.ts +10 -0
  52. package/api/resources/contexts/resources/admin/client/requests/GetAdminRequest.js +3 -0
  53. package/api/resources/contexts/resources/admin/client/requests/UpdateContextRequest.d.ts +49 -0
  54. package/api/resources/contexts/resources/admin/client/requests/UpdateContextRequest.js +12 -0
  55. package/api/resources/contexts/resources/admin/client/requests/index.d.ts +4 -0
  56. package/api/resources/contexts/resources/admin/client/requests/index.js +2 -0
  57. package/api/resources/contexts/resources/admin/index.d.ts +1 -0
  58. package/api/resources/contexts/resources/admin/index.js +17 -0
  59. package/api/resources/contexts/resources/index.d.ts +4 -0
  60. package/api/resources/contexts/resources/index.js +43 -0
  61. package/api/resources/contexts/resources/relationships/client/Client.d.ts +67 -0
  62. package/api/resources/contexts/resources/relationships/client/Client.js +252 -0
  63. package/api/resources/contexts/resources/relationships/client/index.d.ts +1 -0
  64. package/api/resources/contexts/resources/relationships/client/index.js +17 -0
  65. package/api/resources/contexts/resources/relationships/client/requests/CreateRelationshipRequest.d.ts +33 -0
  66. package/api/resources/contexts/resources/relationships/client/requests/CreateRelationshipRequest.js +13 -0
  67. package/api/resources/contexts/resources/relationships/client/requests/DeleteRelationshipsRequest.d.ts +13 -0
  68. package/api/resources/contexts/resources/relationships/client/requests/DeleteRelationshipsRequest.js +3 -0
  69. package/api/resources/contexts/resources/relationships/client/requests/ListRelationshipsRequest.d.ts +10 -0
  70. package/api/resources/contexts/resources/relationships/client/requests/ListRelationshipsRequest.js +3 -0
  71. package/api/resources/contexts/resources/relationships/client/requests/index.d.ts +3 -0
  72. package/api/resources/contexts/resources/relationships/client/requests/index.js +2 -0
  73. package/api/resources/contexts/resources/relationships/index.d.ts +1 -0
  74. package/api/resources/contexts/resources/relationships/index.js +17 -0
  75. package/api/resources/index.d.ts +4 -0
  76. package/api/resources/index.js +8 -4
  77. package/api/resources/users/client/Client.d.ts +3 -3
  78. package/api/resources/users/client/Client.js +3 -3
  79. package/api/resources/users/client/requests/CreateUserRequest.d.ts +3 -3
  80. package/api/resources/users/client/requests/UserInviteRequest.d.ts +6 -6
  81. package/api/resources/values/client/Client.d.ts +3 -3
  82. package/api/resources/values/client/Client.js +3 -3
  83. package/api/resources/values/client/requests/UpdateValuesRequest.d.ts +6 -6
  84. package/api/types/CascadeContextResponse.d.ts +10 -0
  85. package/api/types/CascadeContextResponse.js +3 -0
  86. package/api/types/CascadeResult.d.ts +29 -0
  87. package/api/types/CascadeResult.js +12 -0
  88. package/api/types/ContextBase.d.ts +33 -0
  89. package/api/types/ContextBase.js +12 -0
  90. package/api/types/ContextDetail.d.ts +58 -0
  91. package/api/types/ContextDetail.js +3 -0
  92. package/api/types/ContextInstanceHistory.d.ts +10 -0
  93. package/api/types/ContextInstanceHistory.js +3 -0
  94. package/api/types/ContextInstanceHistoryEntry.d.ts +9 -0
  95. package/api/types/ContextInstanceHistoryEntry.js +3 -0
  96. package/api/types/ContextInstancePendingEvaluation.d.ts +29 -0
  97. package/api/types/ContextInstancePendingEvaluation.js +12 -0
  98. package/api/types/ContextInstancePendingResponse.d.ts +8 -0
  99. package/api/types/ContextInstancePendingResponse.js +3 -0
  100. package/api/types/ContextInstanceState.d.ts +31 -0
  101. package/api/types/ContextInstanceState.js +12 -0
  102. package/api/types/ContextListResponse.d.ts +2 -0
  103. package/api/types/ContextListResponse.js +3 -0
  104. package/api/types/ContextRelationshipBase.d.ts +21 -0
  105. package/api/types/ContextRelationshipBase.js +13 -0
  106. package/api/types/ContextRelationshipIncoming.d.ts +11 -0
  107. package/api/types/ContextRelationshipIncoming.js +3 -0
  108. package/api/types/ContextRelationshipOutgoing.d.ts +11 -0
  109. package/api/types/ContextRelationshipOutgoing.js +3 -0
  110. package/api/types/ContextRelationshipsResponse.d.ts +5 -0
  111. package/api/types/ContextRelationshipsResponse.js +3 -0
  112. package/api/types/ContextSchema.d.ts +10 -0
  113. package/api/types/ContextSchema.js +3 -0
  114. package/api/types/ContextSchemaField.d.ts +35 -0
  115. package/api/types/ContextSchemaField.js +16 -0
  116. package/api/types/CreateContextResponse.d.ts +2 -0
  117. package/api/types/CreateContextResponse.js +3 -0
  118. package/api/types/CreateRelationshipResponse.d.ts +2 -0
  119. package/api/types/CreateRelationshipResponse.js +3 -0
  120. package/api/types/CreateUserResponse.d.ts +3 -3
  121. package/api/types/DeleteContextInstanceResponse.d.ts +9 -0
  122. package/api/types/DeleteContextInstanceResponse.js +3 -0
  123. package/api/types/DeleteContextResponse.d.ts +13 -0
  124. package/api/types/DeleteContextResponse.js +3 -0
  125. package/api/types/DeleteRelationshipResponse.d.ts +4 -0
  126. package/api/types/DeleteRelationshipResponse.js +3 -0
  127. package/api/types/DynamicValue.d.ts +9 -3
  128. package/api/types/ExportManifestPreviewResponse.d.ts +51 -0
  129. package/api/types/ExportManifestPreviewResponse.js +3 -0
  130. package/api/types/ExportManifestResponse.d.ts +9 -0
  131. package/api/types/ExportManifestResponse.js +3 -0
  132. package/api/types/FlowDetail.d.ts +28 -0
  133. package/api/types/Folder.d.ts +1 -1
  134. package/api/types/ImportManifestResponse.d.ts +38 -0
  135. package/api/types/ImportManifestResponse.js +3 -0
  136. package/api/types/RuleDetail.d.ts +17 -0
  137. package/api/types/SolveContextFlowResponse.d.ts +23 -0
  138. package/api/types/SolveContextFlowResponse.js +12 -0
  139. package/api/types/SolveContextRuleResponse.d.ts +26 -0
  140. package/api/types/SolveContextRuleResponse.js +12 -0
  141. package/api/types/SubmitContextDataRequest.d.ts +4 -0
  142. package/api/types/SubmitContextDataRequest.js +3 -0
  143. package/api/types/SubmitContextDataResponse.d.ts +30 -0
  144. package/api/types/SubmitContextDataResponse.js +12 -0
  145. package/api/types/UpdateContextResponse.d.ts +2 -0
  146. package/api/types/UpdateContextResponse.js +3 -0
  147. package/api/types/UserDetail.d.ts +4 -4
  148. package/api/types/UserInviteResponse.d.ts +2 -2
  149. package/api/types/index.d.ts +29 -0
  150. package/api/types/index.js +29 -0
  151. package/dist/Client.d.ts +3 -0
  152. package/dist/Client.js +17 -12
  153. package/dist/api/resources/assets/client/Client.d.ts +55 -1
  154. package/dist/api/resources/assets/client/Client.js +135 -0
  155. package/dist/api/resources/assets/client/index.d.ts +1 -1
  156. package/dist/api/resources/assets/client/index.js +15 -0
  157. package/dist/api/resources/assets/client/requests/ExportManifestRequest.d.ts +23 -0
  158. package/dist/api/resources/assets/client/requests/ExportManifestRequest.js +3 -0
  159. package/dist/api/resources/assets/client/requests/ImportManifestRequest.d.ts +48 -0
  160. package/dist/api/resources/assets/client/requests/ImportManifestRequest.js +3 -0
  161. package/dist/api/resources/assets/client/requests/index.d.ts +2 -0
  162. package/dist/api/resources/assets/client/requests/index.js +2 -0
  163. package/dist/api/resources/assets/index.d.ts +1 -0
  164. package/dist/api/resources/assets/index.js +1 -0
  165. package/dist/api/resources/assets/types/ExportAssetsResponse.d.ts +2 -0
  166. package/dist/api/resources/assets/types/ExportAssetsResponse.js +3 -0
  167. package/dist/api/resources/assets/types/index.d.ts +1 -0
  168. package/dist/api/resources/assets/types/index.js +17 -0
  169. package/dist/api/resources/contexts/client/Client.d.ts +167 -0
  170. package/dist/api/resources/contexts/client/Client.js +563 -0
  171. package/dist/api/resources/contexts/client/index.d.ts +1 -0
  172. package/dist/api/resources/contexts/client/index.js +17 -0
  173. package/dist/api/resources/contexts/client/requests/CascadeContextRequest.d.ts +15 -0
  174. package/dist/api/resources/contexts/client/requests/CascadeContextRequest.js +3 -0
  175. package/dist/api/resources/contexts/client/requests/DeleteInstanceContextsRequest.d.ts +13 -0
  176. package/dist/api/resources/contexts/client/requests/DeleteInstanceContextsRequest.js +3 -0
  177. package/dist/api/resources/contexts/client/requests/GetHistoryContextsRequest.d.ts +17 -0
  178. package/dist/api/resources/contexts/client/requests/GetHistoryContextsRequest.js +3 -0
  179. package/dist/api/resources/contexts/client/requests/GetInstanceContextsRequest.d.ts +13 -0
  180. package/dist/api/resources/contexts/client/requests/GetInstanceContextsRequest.js +3 -0
  181. package/dist/api/resources/contexts/client/requests/GetPendingContextsRequest.d.ts +13 -0
  182. package/dist/api/resources/contexts/client/requests/GetPendingContextsRequest.js +3 -0
  183. package/dist/api/resources/contexts/client/requests/SolveContextFlowRequest.d.ts +20 -0
  184. package/dist/api/resources/contexts/client/requests/SolveContextFlowRequest.js +3 -0
  185. package/dist/api/resources/contexts/client/requests/SolveContextRuleRequest.d.ts +20 -0
  186. package/dist/api/resources/contexts/client/requests/SolveContextRuleRequest.js +3 -0
  187. package/dist/api/resources/contexts/client/requests/SubmitContextsRequest.d.ts +19 -0
  188. package/dist/api/resources/contexts/client/requests/SubmitContextsRequest.js +3 -0
  189. package/dist/api/resources/contexts/client/requests/index.d.ts +8 -0
  190. package/dist/api/resources/contexts/client/requests/index.js +2 -0
  191. package/dist/api/resources/contexts/index.d.ts +2 -0
  192. package/dist/api/resources/contexts/index.js +18 -0
  193. package/dist/api/resources/contexts/resources/admin/client/Client.d.ts +102 -0
  194. package/dist/api/resources/contexts/resources/admin/client/Client.js +353 -0
  195. package/dist/api/resources/contexts/resources/admin/client/index.d.ts +1 -0
  196. package/dist/api/resources/contexts/resources/admin/client/index.js +17 -0
  197. package/dist/api/resources/contexts/resources/admin/client/requests/CreateContextRequest.d.ts +55 -0
  198. package/dist/api/resources/contexts/resources/admin/client/requests/CreateContextRequest.js +12 -0
  199. package/dist/api/resources/contexts/resources/admin/client/requests/DeleteAdminRequest.d.ts +10 -0
  200. package/dist/api/resources/contexts/resources/admin/client/requests/DeleteAdminRequest.js +3 -0
  201. package/dist/api/resources/contexts/resources/admin/client/requests/GetAdminRequest.d.ts +10 -0
  202. package/dist/api/resources/contexts/resources/admin/client/requests/GetAdminRequest.js +3 -0
  203. package/dist/api/resources/contexts/resources/admin/client/requests/UpdateContextRequest.d.ts +49 -0
  204. package/dist/api/resources/contexts/resources/admin/client/requests/UpdateContextRequest.js +12 -0
  205. package/dist/api/resources/contexts/resources/admin/client/requests/index.d.ts +4 -0
  206. package/dist/api/resources/contexts/resources/admin/client/requests/index.js +2 -0
  207. package/dist/api/resources/contexts/resources/admin/index.d.ts +1 -0
  208. package/dist/api/resources/contexts/resources/admin/index.js +17 -0
  209. package/dist/api/resources/contexts/resources/index.d.ts +4 -0
  210. package/dist/api/resources/contexts/resources/index.js +43 -0
  211. package/dist/api/resources/contexts/resources/relationships/client/Client.d.ts +67 -0
  212. package/dist/api/resources/contexts/resources/relationships/client/Client.js +252 -0
  213. package/dist/api/resources/contexts/resources/relationships/client/index.d.ts +1 -0
  214. package/dist/api/resources/contexts/resources/relationships/client/index.js +17 -0
  215. package/dist/api/resources/contexts/resources/relationships/client/requests/CreateRelationshipRequest.d.ts +33 -0
  216. package/dist/api/resources/contexts/resources/relationships/client/requests/CreateRelationshipRequest.js +13 -0
  217. package/dist/api/resources/contexts/resources/relationships/client/requests/DeleteRelationshipsRequest.d.ts +13 -0
  218. package/dist/api/resources/contexts/resources/relationships/client/requests/DeleteRelationshipsRequest.js +3 -0
  219. package/dist/api/resources/contexts/resources/relationships/client/requests/ListRelationshipsRequest.d.ts +10 -0
  220. package/dist/api/resources/contexts/resources/relationships/client/requests/ListRelationshipsRequest.js +3 -0
  221. package/dist/api/resources/contexts/resources/relationships/client/requests/index.d.ts +3 -0
  222. package/dist/api/resources/contexts/resources/relationships/client/requests/index.js +2 -0
  223. package/dist/api/resources/contexts/resources/relationships/index.d.ts +1 -0
  224. package/dist/api/resources/contexts/resources/relationships/index.js +17 -0
  225. package/dist/api/resources/index.d.ts +4 -0
  226. package/dist/api/resources/index.js +8 -4
  227. package/dist/api/resources/users/client/Client.d.ts +3 -3
  228. package/dist/api/resources/users/client/Client.js +3 -3
  229. package/dist/api/resources/users/client/requests/CreateUserRequest.d.ts +3 -3
  230. package/dist/api/resources/users/client/requests/UserInviteRequest.d.ts +6 -6
  231. package/dist/api/resources/values/client/Client.d.ts +3 -3
  232. package/dist/api/resources/values/client/Client.js +3 -3
  233. package/dist/api/resources/values/client/requests/UpdateValuesRequest.d.ts +6 -6
  234. package/dist/api/types/CascadeContextResponse.d.ts +10 -0
  235. package/dist/api/types/CascadeContextResponse.js +3 -0
  236. package/dist/api/types/CascadeResult.d.ts +29 -0
  237. package/dist/api/types/CascadeResult.js +12 -0
  238. package/dist/api/types/ContextBase.d.ts +33 -0
  239. package/dist/api/types/ContextBase.js +12 -0
  240. package/dist/api/types/ContextDetail.d.ts +58 -0
  241. package/dist/api/types/ContextDetail.js +3 -0
  242. package/dist/api/types/ContextInstanceHistory.d.ts +10 -0
  243. package/dist/api/types/ContextInstanceHistory.js +3 -0
  244. package/dist/api/types/ContextInstanceHistoryEntry.d.ts +9 -0
  245. package/dist/api/types/ContextInstanceHistoryEntry.js +3 -0
  246. package/dist/api/types/ContextInstancePendingEvaluation.d.ts +29 -0
  247. package/dist/api/types/ContextInstancePendingEvaluation.js +12 -0
  248. package/dist/api/types/ContextInstancePendingResponse.d.ts +8 -0
  249. package/dist/api/types/ContextInstancePendingResponse.js +3 -0
  250. package/dist/api/types/ContextInstanceState.d.ts +31 -0
  251. package/dist/api/types/ContextInstanceState.js +12 -0
  252. package/dist/api/types/ContextListResponse.d.ts +2 -0
  253. package/dist/api/types/ContextListResponse.js +3 -0
  254. package/dist/api/types/ContextRelationshipBase.d.ts +21 -0
  255. package/dist/api/types/ContextRelationshipBase.js +13 -0
  256. package/dist/api/types/ContextRelationshipIncoming.d.ts +11 -0
  257. package/dist/api/types/ContextRelationshipIncoming.js +3 -0
  258. package/dist/api/types/ContextRelationshipOutgoing.d.ts +11 -0
  259. package/dist/api/types/ContextRelationshipOutgoing.js +3 -0
  260. package/dist/api/types/ContextRelationshipsResponse.d.ts +5 -0
  261. package/dist/api/types/ContextRelationshipsResponse.js +3 -0
  262. package/dist/api/types/ContextSchema.d.ts +10 -0
  263. package/dist/api/types/ContextSchema.js +3 -0
  264. package/dist/api/types/ContextSchemaField.d.ts +35 -0
  265. package/dist/api/types/ContextSchemaField.js +16 -0
  266. package/dist/api/types/CreateContextResponse.d.ts +2 -0
  267. package/dist/api/types/CreateContextResponse.js +3 -0
  268. package/dist/api/types/CreateRelationshipResponse.d.ts +2 -0
  269. package/dist/api/types/CreateRelationshipResponse.js +3 -0
  270. package/dist/api/types/CreateUserResponse.d.ts +3 -3
  271. package/dist/api/types/DeleteContextInstanceResponse.d.ts +9 -0
  272. package/dist/api/types/DeleteContextInstanceResponse.js +3 -0
  273. package/dist/api/types/DeleteContextResponse.d.ts +13 -0
  274. package/dist/api/types/DeleteContextResponse.js +3 -0
  275. package/dist/api/types/DeleteRelationshipResponse.d.ts +4 -0
  276. package/dist/api/types/DeleteRelationshipResponse.js +3 -0
  277. package/dist/api/types/DynamicValue.d.ts +9 -3
  278. package/dist/api/types/ExportManifestPreviewResponse.d.ts +51 -0
  279. package/dist/api/types/ExportManifestPreviewResponse.js +3 -0
  280. package/dist/api/types/ExportManifestResponse.d.ts +9 -0
  281. package/dist/api/types/ExportManifestResponse.js +3 -0
  282. package/dist/api/types/FlowDetail.d.ts +28 -0
  283. package/dist/api/types/Folder.d.ts +1 -1
  284. package/dist/api/types/ImportManifestResponse.d.ts +38 -0
  285. package/dist/api/types/ImportManifestResponse.js +3 -0
  286. package/dist/api/types/RuleDetail.d.ts +17 -0
  287. package/dist/api/types/SolveContextFlowResponse.d.ts +23 -0
  288. package/dist/api/types/SolveContextFlowResponse.js +12 -0
  289. package/dist/api/types/SolveContextRuleResponse.d.ts +26 -0
  290. package/dist/api/types/SolveContextRuleResponse.js +12 -0
  291. package/dist/api/types/SubmitContextDataRequest.d.ts +4 -0
  292. package/dist/api/types/SubmitContextDataRequest.js +3 -0
  293. package/dist/api/types/SubmitContextDataResponse.d.ts +30 -0
  294. package/dist/api/types/SubmitContextDataResponse.js +12 -0
  295. package/dist/api/types/UpdateContextResponse.d.ts +2 -0
  296. package/dist/api/types/UpdateContextResponse.js +3 -0
  297. package/dist/api/types/UserDetail.d.ts +4 -4
  298. package/dist/api/types/UserInviteResponse.d.ts +2 -2
  299. package/dist/api/types/index.d.ts +29 -0
  300. package/dist/api/types/index.js +29 -0
  301. package/dist/forge/values.d.ts +1 -1
  302. package/dist/forge/values.js +2 -2
  303. package/forge/values.d.ts +1 -1
  304. package/forge/values.js +2 -2
  305. package/package.json +1 -2
package/Client.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { AssetsClient } from "./api/resources/assets/client/Client.js";
2
+ import { ContextsClient } from "./api/resources/contexts/client/Client.js";
2
3
  import { DecisionsClient } from "./api/resources/decisions/client/Client.js";
3
4
  import { FlowsClient } from "./api/resources/flows/client/Client.js";
4
5
  import { RulesClient } from "./api/resources/rules/client/Client.js";
@@ -20,6 +21,7 @@ export declare class RulebricksClient {
20
21
  protected _users: UsersClient | undefined;
21
22
  protected _assets: AssetsClient | undefined;
22
23
  protected _values: ValuesClient | undefined;
24
+ protected _contexts: ContextsClient | undefined;
23
25
  protected _tests: TestsClient | undefined;
24
26
  constructor(options: RulebricksClient.Options);
25
27
  get rules(): RulesClient;
@@ -28,5 +30,6 @@ export declare class RulebricksClient {
28
30
  get users(): UsersClient;
29
31
  get assets(): AssetsClient;
30
32
  get values(): ValuesClient;
33
+ get contexts(): ContextsClient;
31
34
  get tests(): TestsClient;
32
35
  }
package/Client.js CHANGED
@@ -3,12 +3,13 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.RulebricksClient = void 0;
5
5
  const Client_js_1 = require("./api/resources/assets/client/Client.js");
6
- const Client_js_2 = require("./api/resources/decisions/client/Client.js");
7
- const Client_js_3 = require("./api/resources/flows/client/Client.js");
8
- const Client_js_4 = require("./api/resources/rules/client/Client.js");
9
- const Client_js_5 = require("./api/resources/tests/client/Client.js");
10
- const Client_js_6 = require("./api/resources/users/client/Client.js");
11
- const Client_js_7 = require("./api/resources/values/client/Client.js");
6
+ const Client_js_2 = require("./api/resources/contexts/client/Client.js");
7
+ const Client_js_3 = require("./api/resources/decisions/client/Client.js");
8
+ const Client_js_4 = require("./api/resources/flows/client/Client.js");
9
+ const Client_js_5 = require("./api/resources/rules/client/Client.js");
10
+ const Client_js_6 = require("./api/resources/tests/client/Client.js");
11
+ const Client_js_7 = require("./api/resources/users/client/Client.js");
12
+ const Client_js_8 = require("./api/resources/values/client/Client.js");
12
13
  const BaseClient_js_1 = require("./BaseClient.js");
13
14
  class RulebricksClient {
14
15
  constructor(options) {
@@ -16,19 +17,19 @@ class RulebricksClient {
16
17
  }
17
18
  get rules() {
18
19
  var _a;
19
- return ((_a = this._rules) !== null && _a !== void 0 ? _a : (this._rules = new Client_js_4.RulesClient(this._options)));
20
+ return ((_a = this._rules) !== null && _a !== void 0 ? _a : (this._rules = new Client_js_5.RulesClient(this._options)));
20
21
  }
21
22
  get flows() {
22
23
  var _a;
23
- return ((_a = this._flows) !== null && _a !== void 0 ? _a : (this._flows = new Client_js_3.FlowsClient(this._options)));
24
+ return ((_a = this._flows) !== null && _a !== void 0 ? _a : (this._flows = new Client_js_4.FlowsClient(this._options)));
24
25
  }
25
26
  get decisions() {
26
27
  var _a;
27
- return ((_a = this._decisions) !== null && _a !== void 0 ? _a : (this._decisions = new Client_js_2.DecisionsClient(this._options)));
28
+ return ((_a = this._decisions) !== null && _a !== void 0 ? _a : (this._decisions = new Client_js_3.DecisionsClient(this._options)));
28
29
  }
29
30
  get users() {
30
31
  var _a;
31
- return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_js_6.UsersClient(this._options)));
32
+ return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_js_7.UsersClient(this._options)));
32
33
  }
33
34
  get assets() {
34
35
  var _a;
@@ -36,11 +37,15 @@ class RulebricksClient {
36
37
  }
37
38
  get values() {
38
39
  var _a;
39
- return ((_a = this._values) !== null && _a !== void 0 ? _a : (this._values = new Client_js_7.ValuesClient(this._options)));
40
+ return ((_a = this._values) !== null && _a !== void 0 ? _a : (this._values = new Client_js_8.ValuesClient(this._options)));
41
+ }
42
+ get contexts() {
43
+ var _a;
44
+ return ((_a = this._contexts) !== null && _a !== void 0 ? _a : (this._contexts = new Client_js_2.ContextsClient(this._options)));
40
45
  }
41
46
  get tests() {
42
47
  var _a;
43
- return ((_a = this._tests) !== null && _a !== void 0 ? _a : (this._tests = new Client_js_5.TestsClient(this._options)));
48
+ return ((_a = this._tests) !== null && _a !== void 0 ? _a : (this._tests = new Client_js_6.TestsClient(this._options)));
44
49
  }
45
50
  }
46
51
  exports.RulebricksClient = RulebricksClient;
@@ -1,7 +1,7 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
3
  import * as core from "../../../../core/index.js";
4
- import type * as Rulebricks from "../../../index.js";
4
+ import * as Rulebricks from "../../../index.js";
5
5
  import { FlowsClient } from "../resources/flows/client/Client.js";
6
6
  import { FoldersClient } from "../resources/folders/client/Client.js";
7
7
  import { RulesClient } from "../resources/rules/client/Client.js";
@@ -32,4 +32,58 @@ export declare class AssetsClient {
32
32
  */
33
33
  getUsage(requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.UsageStatistics>;
34
34
  private __getUsage;
35
+ /**
36
+ * Import rules, flows, contexts, and values from an RBM manifest file.
37
+ *
38
+ * @param {Rulebricks.ImportManifestRequest} request
39
+ * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
40
+ *
41
+ * @throws {@link Rulebricks.BadRequestError}
42
+ * @throws {@link Rulebricks.InternalServerError}
43
+ *
44
+ * @example
45
+ * await client.assets.import({
46
+ * manifest: {
47
+ * version: "1.0",
48
+ * rules: [{
49
+ * "name": "Pricing Rule",
50
+ * "slug": "pricing-rule"
51
+ * }],
52
+ * flows: [{
53
+ * "name": "Onboarding Flow",
54
+ * "slug": "onboarding-flow"
55
+ * }],
56
+ * contexts: [{
57
+ * "name": "Customer",
58
+ * "slug": "customer"
59
+ * }],
60
+ * values: [{
61
+ * "key": "tax_rate",
62
+ * "value": 0.08
63
+ * }]
64
+ * },
65
+ * overwrite: false
66
+ * })
67
+ */
68
+ import(request: Rulebricks.ImportManifestRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.ImportManifestResponse>;
69
+ private __import;
70
+ /**
71
+ * Export selected rules, flows, contexts, and values to an RBM manifest file.
72
+ *
73
+ * @param {Rulebricks.ExportManifestRequest} request
74
+ * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
75
+ *
76
+ * @throws {@link Rulebricks.BadRequestError}
77
+ * @throws {@link Rulebricks.InternalServerError}
78
+ *
79
+ * @example
80
+ * await client.assets.export({
81
+ * rules: ["pricing-rule", "eligibility-check"],
82
+ * flows: ["onboarding-flow"],
83
+ * contexts: ["customer"],
84
+ * values: ["tax_rate", "discount_threshold"]
85
+ * })
86
+ */
87
+ export(request?: Rulebricks.ExportManifestRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.ExportAssetsResponse>;
88
+ private __export;
35
89
  }
@@ -50,6 +50,7 @@ const core = __importStar(require("../../../../core/index.js"));
50
50
  const environments = __importStar(require("../../../../environments.js"));
51
51
  const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
52
52
  const errors = __importStar(require("../../../../errors/index.js"));
53
+ const Rulebricks = __importStar(require("../../../index.js"));
53
54
  const Client_js_1 = require("../resources/flows/client/Client.js");
54
55
  const Client_js_2 = require("../resources/folders/client/Client.js");
55
56
  const Client_js_3 = require("../resources/rules/client/Client.js");
@@ -112,5 +113,139 @@ class AssetsClient {
112
113
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/admin/usage");
113
114
  });
114
115
  }
116
+ /**
117
+ * Import rules, flows, contexts, and values from an RBM manifest file.
118
+ *
119
+ * @param {Rulebricks.ImportManifestRequest} request
120
+ * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
121
+ *
122
+ * @throws {@link Rulebricks.BadRequestError}
123
+ * @throws {@link Rulebricks.InternalServerError}
124
+ *
125
+ * @example
126
+ * await client.assets.import({
127
+ * manifest: {
128
+ * version: "1.0",
129
+ * rules: [{
130
+ * "name": "Pricing Rule",
131
+ * "slug": "pricing-rule"
132
+ * }],
133
+ * flows: [{
134
+ * "name": "Onboarding Flow",
135
+ * "slug": "onboarding-flow"
136
+ * }],
137
+ * contexts: [{
138
+ * "name": "Customer",
139
+ * "slug": "customer"
140
+ * }],
141
+ * values: [{
142
+ * "key": "tax_rate",
143
+ * "value": 0.08
144
+ * }]
145
+ * },
146
+ * overwrite: false
147
+ * })
148
+ */
149
+ import(request, requestOptions) {
150
+ return core.HttpResponsePromise.fromPromise(this.__import(request, requestOptions));
151
+ }
152
+ __import(request, requestOptions) {
153
+ return __awaiter(this, void 0, void 0, function* () {
154
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
155
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
156
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
157
+ const _response = yield core.fetcher({
158
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.RulebricksEnvironment.Default, "admin/import"),
159
+ method: "POST",
160
+ headers: _headers,
161
+ contentType: "application/json",
162
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
163
+ requestType: "json",
164
+ body: request,
165
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
166
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
167
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
168
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
169
+ logging: this._options.logging,
170
+ });
171
+ if (_response.ok) {
172
+ return { data: _response.body, rawResponse: _response.rawResponse };
173
+ }
174
+ if (_response.error.reason === "status-code") {
175
+ switch (_response.error.statusCode) {
176
+ case 400:
177
+ throw new Rulebricks.BadRequestError(_response.error.body, _response.rawResponse);
178
+ case 500:
179
+ throw new Rulebricks.InternalServerError(_response.error.body, _response.rawResponse);
180
+ default:
181
+ throw new errors.RulebricksError({
182
+ statusCode: _response.error.statusCode,
183
+ body: _response.error.body,
184
+ rawResponse: _response.rawResponse,
185
+ });
186
+ }
187
+ }
188
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/admin/import");
189
+ });
190
+ }
191
+ /**
192
+ * Export selected rules, flows, contexts, and values to an RBM manifest file.
193
+ *
194
+ * @param {Rulebricks.ExportManifestRequest} request
195
+ * @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
196
+ *
197
+ * @throws {@link Rulebricks.BadRequestError}
198
+ * @throws {@link Rulebricks.InternalServerError}
199
+ *
200
+ * @example
201
+ * await client.assets.export({
202
+ * rules: ["pricing-rule", "eligibility-check"],
203
+ * flows: ["onboarding-flow"],
204
+ * contexts: ["customer"],
205
+ * values: ["tax_rate", "discount_threshold"]
206
+ * })
207
+ */
208
+ export(request = {}, requestOptions) {
209
+ return core.HttpResponsePromise.fromPromise(this.__export(request, requestOptions));
210
+ }
211
+ __export() {
212
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
213
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
214
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
215
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
216
+ const _response = yield core.fetcher({
217
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.RulebricksEnvironment.Default, "admin/export"),
218
+ method: "POST",
219
+ headers: _headers,
220
+ contentType: "application/json",
221
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
222
+ requestType: "json",
223
+ body: request,
224
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
225
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
226
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
227
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
228
+ logging: this._options.logging,
229
+ });
230
+ if (_response.ok) {
231
+ return { data: _response.body, rawResponse: _response.rawResponse };
232
+ }
233
+ if (_response.error.reason === "status-code") {
234
+ switch (_response.error.statusCode) {
235
+ case 400:
236
+ throw new Rulebricks.BadRequestError(_response.error.body, _response.rawResponse);
237
+ case 500:
238
+ throw new Rulebricks.InternalServerError(_response.error.body, _response.rawResponse);
239
+ default:
240
+ throw new errors.RulebricksError({
241
+ statusCode: _response.error.statusCode,
242
+ body: _response.error.body,
243
+ rawResponse: _response.rawResponse,
244
+ });
245
+ }
246
+ }
247
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/admin/export");
248
+ });
249
+ }
115
250
  }
116
251
  exports.AssetsClient = AssetsClient;
@@ -1 +1 @@
1
- export {};
1
+ export * from "./requests/index.js";
@@ -1,2 +1,17 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * rules: ["pricing-rule", "eligibility-check"],
5
+ * flows: ["onboarding-flow"],
6
+ * contexts: ["customer"],
7
+ * values: ["tax_rate", "discount_threshold"]
8
+ * }
9
+ */
10
+ export interface ExportManifestRequest {
11
+ /** Rule IDs or slugs to export. */
12
+ rules?: string[];
13
+ /** Flow IDs or slugs to export. */
14
+ flows?: string[];
15
+ /** Context IDs or slugs to export. */
16
+ contexts?: string[];
17
+ /** Value IDs or names to export. */
18
+ values?: string[];
19
+ /** Export all assets of specified types. */
20
+ includeAll?: boolean;
21
+ /** Return a preview of what would be exported without the full data. */
22
+ preview?: boolean;
23
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,48 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * manifest: {
5
+ * version: "1.0",
6
+ * rules: [{
7
+ * "name": "Pricing Rule",
8
+ * "slug": "pricing-rule"
9
+ * }],
10
+ * flows: [{
11
+ * "name": "Onboarding Flow",
12
+ * "slug": "onboarding-flow"
13
+ * }],
14
+ * contexts: [{
15
+ * "name": "Customer",
16
+ * "slug": "customer"
17
+ * }],
18
+ * values: [{
19
+ * "key": "tax_rate",
20
+ * "value": 0.08
21
+ * }]
22
+ * },
23
+ * overwrite: false
24
+ * }
25
+ */
26
+ export interface ImportManifestRequest {
27
+ /** The RBM manifest object containing assets to import. */
28
+ manifest: ImportManifestRequest.Manifest;
29
+ /** Whether to overwrite existing assets with the same ID/slug. */
30
+ overwrite?: boolean;
31
+ }
32
+ export declare namespace ImportManifestRequest {
33
+ /**
34
+ * The RBM manifest object containing assets to import.
35
+ */
36
+ interface Manifest {
37
+ /** Manifest format version. */
38
+ version?: string;
39
+ /** Rules to import. */
40
+ rules?: Record<string, unknown>[];
41
+ /** Flows to import. */
42
+ flows?: Record<string, unknown>[];
43
+ /** Contexts (entities) to import. */
44
+ contexts?: Record<string, unknown>[];
45
+ /** Dynamic values to import. */
46
+ values?: Record<string, unknown>[];
47
+ }
48
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export type { ExportManifestRequest } from "./ExportManifestRequest.js";
2
+ export type { ImportManifestRequest } from "./ImportManifestRequest.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,3 @@
1
1
  export * from "./client/index.js";
2
2
  export * from "./resources/index.js";
3
+ export * from "./types/index.js";
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./client/index.js"), exports);
18
18
  __exportStar(require("./resources/index.js"), exports);
19
+ __exportStar(require("./types/index.js"), exports);
@@ -0,0 +1,2 @@
1
+ import type * as Rulebricks from "../../../index.js";
2
+ export type ExportAssetsResponse = Rulebricks.ExportManifestResponse | Rulebricks.ExportManifestPreviewResponse;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./ExportAssetsResponse.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ExportAssetsResponse.js"), exports);
@@ -0,0 +1,167 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
+ import * as core from "../../../../core/index.js";
4
+ import * as Rulebricks from "../../../index.js";
5
+ import { AdminClient } from "../resources/admin/client/Client.js";
6
+ import { RelationshipsClient } from "../resources/relationships/client/Client.js";
7
+ export declare namespace ContextsClient {
8
+ type Options = BaseClientOptions;
9
+ interface RequestOptions extends BaseRequestOptions {
10
+ }
11
+ }
12
+ /**
13
+ * Operations for managing and interacting with Contexts (Entities) and their instances
14
+ */
15
+ export declare class ContextsClient {
16
+ protected readonly _options: NormalizedClientOptionsWithAuth<ContextsClient.Options>;
17
+ protected _admin: AdminClient | undefined;
18
+ protected _relationships: RelationshipsClient | undefined;
19
+ constructor(options: ContextsClient.Options);
20
+ get admin(): AdminClient;
21
+ get relationships(): RelationshipsClient;
22
+ /**
23
+ * Retrieve the current state of a context instance.
24
+ *
25
+ * @param {Rulebricks.GetInstanceContextsRequest} request
26
+ * @param {ContextsClient.RequestOptions} requestOptions - Request-specific configuration.
27
+ *
28
+ * @throws {@link Rulebricks.NotFoundError}
29
+ * @throws {@link Rulebricks.InternalServerError}
30
+ *
31
+ * @example
32
+ * await client.contexts.getInstance({
33
+ * slug: "customer",
34
+ * instance: "cust-12345"
35
+ * })
36
+ */
37
+ getInstance(request: Rulebricks.GetInstanceContextsRequest, requestOptions?: ContextsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.ContextInstanceState>;
38
+ private __getInstance;
39
+ /**
40
+ * Submit data to a context instance, creating it if it doesn't exist. May trigger bound rule/flow evaluations.
41
+ *
42
+ * @param {Rulebricks.SubmitContextsRequest} request
43
+ * @param {ContextsClient.RequestOptions} requestOptions - Request-specific configuration.
44
+ *
45
+ * @throws {@link Rulebricks.BadRequestError}
46
+ * @throws {@link Rulebricks.NotFoundError}
47
+ * @throws {@link Rulebricks.InternalServerError}
48
+ *
49
+ * @example
50
+ * await client.contexts.submit({
51
+ * slug: "customer",
52
+ * instance: "cust-12345",
53
+ * body: {
54
+ * "email": "customer@example.com",
55
+ * "age": 30
56
+ * }
57
+ * })
58
+ */
59
+ submit(request: Rulebricks.SubmitContextsRequest, requestOptions?: ContextsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.SubmitContextDataResponse>;
60
+ private __submit;
61
+ /**
62
+ * Delete a specific context instance and its history.
63
+ *
64
+ * @param {Rulebricks.DeleteInstanceContextsRequest} request
65
+ * @param {ContextsClient.RequestOptions} requestOptions - Request-specific configuration.
66
+ *
67
+ * @throws {@link Rulebricks.NotFoundError}
68
+ * @throws {@link Rulebricks.InternalServerError}
69
+ *
70
+ * @example
71
+ * await client.contexts.deleteInstance({
72
+ * slug: "customer",
73
+ * instance: "cust-12345"
74
+ * })
75
+ */
76
+ deleteInstance(request: Rulebricks.DeleteInstanceContextsRequest, requestOptions?: ContextsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.DeleteContextInstanceResponse>;
77
+ private __deleteInstance;
78
+ /**
79
+ * Retrieve the change history for a context instance.
80
+ *
81
+ * @param {Rulebricks.GetHistoryContextsRequest} request
82
+ * @param {ContextsClient.RequestOptions} requestOptions - Request-specific configuration.
83
+ *
84
+ * @throws {@link Rulebricks.NotFoundError}
85
+ * @throws {@link Rulebricks.InternalServerError}
86
+ *
87
+ * @example
88
+ * await client.contexts.getHistory({
89
+ * slug: "customer",
90
+ * instance: "cust-12345"
91
+ * })
92
+ */
93
+ getHistory(request: Rulebricks.GetHistoryContextsRequest, requestOptions?: ContextsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.ContextInstanceHistory>;
94
+ private __getHistory;
95
+ /**
96
+ * Get list of rules/flows that need to be evaluated for this instance.
97
+ *
98
+ * @param {Rulebricks.GetPendingContextsRequest} request
99
+ * @param {ContextsClient.RequestOptions} requestOptions - Request-specific configuration.
100
+ *
101
+ * @throws {@link Rulebricks.NotFoundError}
102
+ * @throws {@link Rulebricks.InternalServerError}
103
+ *
104
+ * @example
105
+ * await client.contexts.getPending({
106
+ * slug: "customer",
107
+ * instance: "cust-12345"
108
+ * })
109
+ */
110
+ getPending(request: Rulebricks.GetPendingContextsRequest, requestOptions?: ContextsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.ContextInstancePendingResponse>;
111
+ private __getPending;
112
+ /**
113
+ * Execute a specific rule using the context instance's state as input.
114
+ *
115
+ * @param {Rulebricks.SolveContextRuleRequest} request
116
+ * @param {ContextsClient.RequestOptions} requestOptions - Request-specific configuration.
117
+ *
118
+ * @throws {@link Rulebricks.BadRequestError}
119
+ * @throws {@link Rulebricks.NotFoundError}
120
+ * @throws {@link Rulebricks.InternalServerError}
121
+ *
122
+ * @example
123
+ * await client.contexts.solve({
124
+ * slug: "customer",
125
+ * instance: "cust-12345",
126
+ * ruleSlug: "eligibility-check"
127
+ * })
128
+ */
129
+ solve(request: Rulebricks.SolveContextRuleRequest, requestOptions?: ContextsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.SolveContextRuleResponse>;
130
+ private __solve;
131
+ /**
132
+ * Trigger re-evaluation of all bound rules and flows for the instance.
133
+ *
134
+ * @param {Rulebricks.CascadeContextRequest} request
135
+ * @param {ContextsClient.RequestOptions} requestOptions - Request-specific configuration.
136
+ *
137
+ * @throws {@link Rulebricks.NotFoundError}
138
+ * @throws {@link Rulebricks.InternalServerError}
139
+ *
140
+ * @example
141
+ * await client.contexts.cascade({
142
+ * slug: "customer",
143
+ * instance: "cust-12345"
144
+ * })
145
+ */
146
+ cascade(request: Rulebricks.CascadeContextRequest, requestOptions?: ContextsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.CascadeContextResponse>;
147
+ private __cascade;
148
+ /**
149
+ * Execute a specific flow using the context instance's state as input.
150
+ *
151
+ * @param {Rulebricks.SolveContextFlowRequest} request
152
+ * @param {ContextsClient.RequestOptions} requestOptions - Request-specific configuration.
153
+ *
154
+ * @throws {@link Rulebricks.BadRequestError}
155
+ * @throws {@link Rulebricks.NotFoundError}
156
+ * @throws {@link Rulebricks.InternalServerError}
157
+ *
158
+ * @example
159
+ * await client.contexts.execute({
160
+ * slug: "customer",
161
+ * instance: "cust-12345",
162
+ * flowSlug: "onboarding-flow"
163
+ * })
164
+ */
165
+ execute(request: Rulebricks.SolveContextFlowRequest, requestOptions?: ContextsClient.RequestOptions): core.HttpResponsePromise<Rulebricks.SolveContextFlowResponse>;
166
+ private __execute;
167
+ }