api-sdk-rb 1.11.66

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 (854) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE +122 -0
  4. data/README.md +648 -0
  5. data/Rakefile +10 -0
  6. data/api-sdk-rb.gemspec +39 -0
  7. data/docs/AccountCreditBalance.md +26 -0
  8. data/docs/AccountCreditBalanceResponse.md +22 -0
  9. data/docs/AccountCreditTransaction.md +30 -0
  10. data/docs/AdapterConnection.md +30 -0
  11. data/docs/AdapterConnectionRemoval.md +18 -0
  12. data/docs/AddAiAnswersKnowledgeDocument201Response.md +22 -0
  13. data/docs/AddAiAnswersKnowledgeDocumentRequest.md +20 -0
  14. data/docs/AddDomainRequest.md +18 -0
  15. data/docs/AiAnswersKnowledge.md +20 -0
  16. data/docs/AiAnswersKnowledgeDocument.md +30 -0
  17. data/docs/AiAnswersKnowledgeRemoval.md +18 -0
  18. data/docs/AiAnswersKnowledgeTotals.md +24 -0
  19. data/docs/ApiKeyScope.md +15 -0
  20. data/docs/Canvas.md +32 -0
  21. data/docs/CanvasResponse.md +22 -0
  22. data/docs/CanvasesApi.md +377 -0
  23. data/docs/CheckCompositionAccessResponse.md +22 -0
  24. data/docs/CheckCompositionAccessResponseData.md +20 -0
  25. data/docs/Composition.md +46 -0
  26. data/docs/CompositionDataSource.md +20 -0
  27. data/docs/CompositionDataSourceResponse.md +22 -0
  28. data/docs/CompositionEntriesDescription.md +22 -0
  29. data/docs/CompositionEntriesDescriptionResponse.md +22 -0
  30. data/docs/CompositionEntriesReading.md +34 -0
  31. data/docs/CompositionEntriesReadingResponse.md +22 -0
  32. data/docs/CompositionEntryAggregateTally.md +28 -0
  33. data/docs/CompositionEntryAggregatesBlock.md +22 -0
  34. data/docs/CompositionEntryColumn.md +20 -0
  35. data/docs/CompositionEntryDeleteSuccess.md +20 -0
  36. data/docs/CompositionEntryDeleteSuccessData.md +18 -0
  37. data/docs/CompositionEntryItem.md +26 -0
  38. data/docs/CompositionEntryItemsMeta.md +22 -0
  39. data/docs/CompositionEntryItemsPageSuccess.md +22 -0
  40. data/docs/CompositionEntryTable.md +22 -0
  41. data/docs/CompositionEntryTally.md +20 -0
  42. data/docs/CompositionResponse.md +22 -0
  43. data/docs/CompositionVersion.md +26 -0
  44. data/docs/CompositionsApi.md +2768 -0
  45. data/docs/ContentCheckFinding.md +24 -0
  46. data/docs/ContentItemWriteResult.md +28 -0
  47. data/docs/ContentItemWriteResultValidationResult.md +22 -0
  48. data/docs/CopyPartnerPresetRequest.md +18 -0
  49. data/docs/CreateCanvasRequest.md +28 -0
  50. data/docs/CreateCompositionContentItem201Response.md +22 -0
  51. data/docs/CreateCompositionContentItemRequest.md +18 -0
  52. data/docs/CreateCompositionDatabaseRecord201Response.md +22 -0
  53. data/docs/CreateCompositionFromPresetRequest.md +26 -0
  54. data/docs/CreateCompositionFromWidget201Response.md +22 -0
  55. data/docs/CreateCompositionFromWidgetRequest.md +28 -0
  56. data/docs/CreateUserApiKeyRequest.md +24 -0
  57. data/docs/CreateWidget201Response.md +22 -0
  58. data/docs/CreateWidget201ResponseData.md +62 -0
  59. data/docs/CreatedUserApiKey.md +34 -0
  60. data/docs/CreatedUserApiKeyResponse.md +22 -0
  61. data/docs/CreditsApi.md +155 -0
  62. data/docs/DeleteCompositionContentItemResponse.md +22 -0
  63. data/docs/DeleteCompositionContentItemResponseData.md +20 -0
  64. data/docs/DeleteCompositionDataSourceResponse.md +22 -0
  65. data/docs/DeleteCompositionDataSourceResponseData.md +18 -0
  66. data/docs/DeleteManagedUser200Response.md +22 -0
  67. data/docs/DeletePersonalWorkspaceDomainResponse.md +22 -0
  68. data/docs/DeletePersonalWorkspaceDomainResponseData.md +18 -0
  69. data/docs/DeleteUserApiKeyResponse.md +22 -0
  70. data/docs/DeleteUserApiKeyResponseData.md +18 -0
  71. data/docs/DesignDefaults.md +18 -0
  72. data/docs/DuplicateComposition202Response.md +22 -0
  73. data/docs/DuplicateComposition202ResponseData.md +18 -0
  74. data/docs/DuplicateCompositionRequest.md +20 -0
  75. data/docs/EditorSession.md +34 -0
  76. data/docs/EditorSessionResponse.md +22 -0
  77. data/docs/Entitlement.md +38 -0
  78. data/docs/EntitlementsApi.md +163 -0
  79. data/docs/ErrorDetail.md +34 -0
  80. data/docs/ErrorResponse.md +22 -0
  81. data/docs/ExportCompositionEntryItems200Response.md +22 -0
  82. data/docs/ExportCompositionEntryItems200ResponseMeta.md +20 -0
  83. data/docs/GetAiAnswersKnowledge200Response.md +22 -0
  84. data/docs/GetAllCanvasesResponse.md +22 -0
  85. data/docs/GetAllCanvasesResponseData.md +24 -0
  86. data/docs/GetAllCompositions200Response.md +22 -0
  87. data/docs/GetAllManagedUsers200Response.md +22 -0
  88. data/docs/GetCompositionContentResponse.md +22 -0
  89. data/docs/GetCompositionContentSchemaResponse.md +22 -0
  90. data/docs/GetCompositionContentSchemaResponseData.md +28 -0
  91. data/docs/GetCompositionDataSourceResponse.md +22 -0
  92. data/docs/GetCompositionDatabaseRecords200Response.md +22 -0
  93. data/docs/GetCompositionDesignResponse.md +22 -0
  94. data/docs/GetCompositionDesignSchemaResponse.md +22 -0
  95. data/docs/GetCompositionDesignSchemaResponseData.md +28 -0
  96. data/docs/GetCompositionEmbedSchemaResponse.md +22 -0
  97. data/docs/GetCompositionEmbedSchemaResponseData.md +28 -0
  98. data/docs/GetCompositionEmbedSettingsResponse.md +22 -0
  99. data/docs/GetCompositionPreviewResponse.md +22 -0
  100. data/docs/GetCompositionPreviewResponseData.md +24 -0
  101. data/docs/GetCompositionVersions200Response.md +22 -0
  102. data/docs/GetCompositionsBatchRequest.md +18 -0
  103. data/docs/GetCompositionsBatchResponse.md +22 -0
  104. data/docs/GetCompositionsBatchResponseData.md +20 -0
  105. data/docs/GetInvoicesByPartnerId200Response.md +22 -0
  106. data/docs/GetManagedUserEntitlementsResponse.md +22 -0
  107. data/docs/GetManagedUserEntitlementsResponseData.md +20 -0
  108. data/docs/GetManagedUserLimits200Response.md +22 -0
  109. data/docs/GetManagedUserStorageUsage200Response.md +22 -0
  110. data/docs/GetManagedUserStorageUsage200ResponseData.md +22 -0
  111. data/docs/GetManagedUserStorageUsage200ResponseDataByPurpose.md +24 -0
  112. data/docs/GetManagedUsersByManagerIdResponse.md +22 -0
  113. data/docs/GetManagedUsersByManagerIdResponseData.md +24 -0
  114. data/docs/GetPartnerBillingOverview200Response.md +22 -0
  115. data/docs/GetPartnerCreditTransactions200Response.md +22 -0
  116. data/docs/GetPartnerDesignDefaults200Response.md +22 -0
  117. data/docs/GetPartnerEntitlementsResponse.md +22 -0
  118. data/docs/GetPartnerEntitlementsResponseData.md +20 -0
  119. data/docs/GetPersonalWorkspaceDomains200Response.md +22 -0
  120. data/docs/GetPublicCompositionEmbed200Response.md +46 -0
  121. data/docs/GetPublicCompositionEmbed200ResponseDataSource.md +20 -0
  122. data/docs/GetPublicCompositionEmbed200ResponseDirect.md +22 -0
  123. data/docs/GetUserAdapterConnections200Response.md +22 -0
  124. data/docs/GetUserApiKeyUsageLogsResponse.md +22 -0
  125. data/docs/GetUserApiKeyUsageLogsResponseData.md +18 -0
  126. data/docs/GetUserApiKeys200Response.md +22 -0
  127. data/docs/GetWidgets200Response.md +22 -0
  128. data/docs/GetWidgetsBatchRequest.md +18 -0
  129. data/docs/GetWidgetsBatchResponse.md +22 -0
  130. data/docs/GetWidgetsBatchResponseData.md +20 -0
  131. data/docs/GetWidgetsBatchResponseDataErrorsInner.md +20 -0
  132. data/docs/InvoicesApi.md +85 -0
  133. data/docs/ListPartnerPresets200Response.md +22 -0
  134. data/docs/ManagedUser.md +30 -0
  135. data/docs/ManagedUserEntriesMeta.md +26 -0
  136. data/docs/ManagedUserEntriesPageSuccess.md +22 -0
  137. data/docs/ManagedUserEntryItem.md +30 -0
  138. data/docs/ManagedUserLimits.md +24 -0
  139. data/docs/ManagedUserOperationUsage.md +26 -0
  140. data/docs/ManagedUserRemoval.md +20 -0
  141. data/docs/ManagedUserResponse.md +22 -0
  142. data/docs/ManagedUserUsage.md +28 -0
  143. data/docs/ManagedUserUsageResponse.md +22 -0
  144. data/docs/ManagedUserUsageTotals.md +24 -0
  145. data/docs/ManagedUsersApi.md +1239 -0
  146. data/docs/MyPartner.md +34 -0
  147. data/docs/MyPartners.md +22 -0
  148. data/docs/MyPartnersResponse.md +22 -0
  149. data/docs/NewComposition.md +38 -0
  150. data/docs/NewEditorSession.md +24 -0
  151. data/docs/NewManagedUser.md +22 -0
  152. data/docs/NewWidget.md +38 -0
  153. data/docs/OperationsApi.md +77 -0
  154. data/docs/OperationsIdGetResponse.md +22 -0
  155. data/docs/OperationsIdGetResponseData.md +32 -0
  156. data/docs/PartnerAnalyticsByManagedUser.md +24 -0
  157. data/docs/PartnerAnalyticsByManagedUserResponse.md +22 -0
  158. data/docs/PartnerAnalyticsOfDay.md +24 -0
  159. data/docs/PartnerAnalyticsOfManagedUser.md +36 -0
  160. data/docs/PartnerAnalyticsOfWidget.md +28 -0
  161. data/docs/PartnerAnalyticsSummary.md +32 -0
  162. data/docs/PartnerAnalyticsSummaryResponse.md +22 -0
  163. data/docs/PartnerAnalyticsTimeline.md +24 -0
  164. data/docs/PartnerAnalyticsTimelineResponse.md +22 -0
  165. data/docs/PartnerAnalyticsTopWidgets.md +24 -0
  166. data/docs/PartnerAnalyticsTopWidgetsResponse.md +22 -0
  167. data/docs/PartnerApi.md +9892 -0
  168. data/docs/PartnerBillingOverview.md +24 -0
  169. data/docs/PartnerBillingOverviewBillingIntegration.md +24 -0
  170. data/docs/PartnerBillingOverviewOperationalCredits.md +24 -0
  171. data/docs/PartnerBillingOverviewPartner.md +24 -0
  172. data/docs/PartnerContract.md +48 -0
  173. data/docs/PartnerContractResponse.md +22 -0
  174. data/docs/PartnerCustomization.md +50 -0
  175. data/docs/PartnerDataDatabase.md +32 -0
  176. data/docs/PartnerDataDatabaseRemoval.md +18 -0
  177. data/docs/PartnerDataDatabaseRemovalResponse.md +22 -0
  178. data/docs/PartnerDataDatabaseResponse.md +22 -0
  179. data/docs/PartnerEntryContextSecret.md +20 -0
  180. data/docs/PartnerEntryContextSecretResponse.md +22 -0
  181. data/docs/PartnerEntryContextSigning.md +28 -0
  182. data/docs/PartnerEntryContextSigningResponse.md +22 -0
  183. data/docs/PartnerExtraCreditsInvoice.md +40 -0
  184. data/docs/PartnerExtraCreditsInvoiceResponse.md +22 -0
  185. data/docs/PartnerInvoice.md +64 -0
  186. data/docs/PartnerNotification.md +30 -0
  187. data/docs/PartnerNotificationDefaultRecipients.md +20 -0
  188. data/docs/PartnerNotificationDelivery.md +46 -0
  189. data/docs/PartnerNotificationDeliveryLog.md +18 -0
  190. data/docs/PartnerNotificationDeliveryLogResponse.md +22 -0
  191. data/docs/PartnerNotificationDeliveryResponse.md +22 -0
  192. data/docs/PartnerNotificationEvent.md +28 -0
  193. data/docs/PartnerNotificationEventType.md +15 -0
  194. data/docs/PartnerNotificationPage.md +20 -0
  195. data/docs/PartnerNotificationPageResponse.md +22 -0
  196. data/docs/PartnerNotificationSettings.md +36 -0
  197. data/docs/PartnerNotificationSettingsChange.md +20 -0
  198. data/docs/PartnerNotificationSettingsChangeResponse.md +22 -0
  199. data/docs/PartnerNotificationSettingsResponse.md +22 -0
  200. data/docs/PartnerNotificationTestEventRequest.md +18 -0
  201. data/docs/PartnerNotificationTestEventResult.md +24 -0
  202. data/docs/PartnerNotificationTestEventResultResponse.md +22 -0
  203. data/docs/PartnerPreset.md +34 -0
  204. data/docs/PartnerPresetCopy.md +28 -0
  205. data/docs/PartnerPresetCopyResponse.md +22 -0
  206. data/docs/PartnerPresetRemoval.md +18 -0
  207. data/docs/PartnerPresetRemovalResponse.md +22 -0
  208. data/docs/PartnerPresetResponse.md +22 -0
  209. data/docs/PartnerReportPage.md +22 -0
  210. data/docs/PartnerReportPeriod.md +20 -0
  211. data/docs/PartnerStorageDestination.md +40 -0
  212. data/docs/PartnerStorageDestinationResponse.md +22 -0
  213. data/docs/PartnerStorageRemoval.md +18 -0
  214. data/docs/PartnerStorageRemovalResponse.md +22 -0
  215. data/docs/PartnerStorageUsage.md +24 -0
  216. data/docs/PartnerStorageUsageOfManagedUser.md +34 -0
  217. data/docs/PartnerStorageUsageResponse.md +22 -0
  218. data/docs/PartnerStorageUsageTotals.md +24 -0
  219. data/docs/PartnersApi.md +2708 -0
  220. data/docs/PersonalWorkspaceDomain.md +26 -0
  221. data/docs/PersonalWorkspaceDomainResult.md +20 -0
  222. data/docs/PersonalWorkspaceDomainResultResponse.md +22 -0
  223. data/docs/PostPublicCompositionEmbedStatus200Response.md +22 -0
  224. data/docs/PostPublicCompositionEmbedStatus200ResponseData.md +18 -0
  225. data/docs/PostPublicCompositionEmbedStatusRequest.md +18 -0
  226. data/docs/PublicAdapterCallError.md +24 -0
  227. data/docs/PublicAdapterCallRequest.md +26 -0
  228. data/docs/PublicAdapterCallResult.md +20 -0
  229. data/docs/PublicAdapterCallResultData.md +18 -0
  230. data/docs/PublicAdapterFileResult.md +20 -0
  231. data/docs/PublicAdapterFileResultData.md +18 -0
  232. data/docs/PublicAdapterFileResultDataFile.md +28 -0
  233. data/docs/PublicCompositionEntryCreated.md +20 -0
  234. data/docs/PublicCompositionEntryCreatedData.md +22 -0
  235. data/docs/PublicCompositionEntryRequest.md +22 -0
  236. data/docs/PublicEmbedApi.md +415 -0
  237. data/docs/PublicEmbedFailure.md +28 -0
  238. data/docs/PublicEmbedFailureDetails.md +20 -0
  239. data/docs/PublicEmbedFailureError.md +28 -0
  240. data/docs/PurposeStorageBucket.md +20 -0
  241. data/docs/RemoveAiAnswersKnowledgeDocument200Response.md +22 -0
  242. data/docs/RemoveUserAdapterConnection200Response.md +22 -0
  243. data/docs/RequestExtraCredits.md +18 -0
  244. data/docs/ResponseMeta.md +34 -0
  245. data/docs/RevokeManagedUserEditorSessionsResponse.md +22 -0
  246. data/docs/RevokeManagedUserEditorSessionsResponseData.md +18 -0
  247. data/docs/SetAdapterConnectionRequest.md +18 -0
  248. data/docs/SetCompositionDataSourceRequest.md +20 -0
  249. data/docs/SetDynamicContentRequest.md +26 -0
  250. data/docs/SetDynamicContentResponse.md +22 -0
  251. data/docs/SetDynamicContentResponseData.md +26 -0
  252. data/docs/SetDynamicContentResponseDataValidationResult.md +22 -0
  253. data/docs/SetManagedUserLimitsRequest.md +18 -0
  254. data/docs/SetPartnerDataDatabaseRequest.md +18 -0
  255. data/docs/SetPartnerDesignDefaultsRequest.md +18 -0
  256. data/docs/SetPartnerPresetRequest.md +24 -0
  257. data/docs/SetPartnerStorageDestinationRequest.md +32 -0
  258. data/docs/SetUserAdapterConnection200Response.md +22 -0
  259. data/docs/SuccessResponse.md +22 -0
  260. data/docs/TokensApi.md +77 -0
  261. data/docs/UpdateCanvasRequest.md +22 -0
  262. data/docs/UpdateComposition.md +32 -0
  263. data/docs/UpdateCompositionStatusRequest.md +18 -0
  264. data/docs/UpdateDomainRequest.md +18 -0
  265. data/docs/UpdateManagedUser.md +22 -0
  266. data/docs/UpdatePartnerEntryContextSigningRequest.md +18 -0
  267. data/docs/UpdatePartnerNotificationSettingsRequest.md +24 -0
  268. data/docs/UpdateUserApiKeyRequest.md +20 -0
  269. data/docs/Upload.md +44 -0
  270. data/docs/UploadLimits.md +28 -0
  271. data/docs/UploadLimitsResponse.md +22 -0
  272. data/docs/UploadResponse.md +22 -0
  273. data/docs/UploadsApi.md +372 -0
  274. data/docs/UploadsGet200Response.md +22 -0
  275. data/docs/UploadsIdDelete200Response.md +22 -0
  276. data/docs/UploadsIdDelete200ResponseData.md +18 -0
  277. data/docs/UserApiKey.md +34 -0
  278. data/docs/UserApiKeyResponse.md +22 -0
  279. data/docs/UserApiKeyUsageLog.md +32 -0
  280. data/docs/UsersApi.md +881 -0
  281. data/docs/ValidateCompositionContentResponse.md +22 -0
  282. data/docs/ValidateCompositionContentResponseData.md +24 -0
  283. data/docs/ValidateToken200Response.md +22 -0
  284. data/docs/ValidateToken200ResponseData.md +26 -0
  285. data/docs/Widget.md +60 -0
  286. data/docs/WidgetsApi.md +303 -0
  287. data/git_push.sh +57 -0
  288. data/lib/api-sdk-rb/api/canvases_api.rb +390 -0
  289. data/lib/api-sdk-rb/api/compositions_api.rb +3267 -0
  290. data/lib/api-sdk-rb/api/credits_api.rb +169 -0
  291. data/lib/api-sdk-rb/api/entitlements_api.rb +166 -0
  292. data/lib/api-sdk-rb/api/invoices_api.rb +110 -0
  293. data/lib/api-sdk-rb/api/managed_users_api.rb +1299 -0
  294. data/lib/api-sdk-rb/api/operations_api.rb +85 -0
  295. data/lib/api-sdk-rb/api/partner_api.rb +10693 -0
  296. data/lib/api-sdk-rb/api/partners_api.rb +2799 -0
  297. data/lib/api-sdk-rb/api/public_embed_api.rb +496 -0
  298. data/lib/api-sdk-rb/api/tokens_api.rb +77 -0
  299. data/lib/api-sdk-rb/api/uploads_api.rb +383 -0
  300. data/lib/api-sdk-rb/api/users_api.rb +934 -0
  301. data/lib/api-sdk-rb/api/widgets_api.rb +347 -0
  302. data/lib/api-sdk-rb/api_client.rb +394 -0
  303. data/lib/api-sdk-rb/api_error.rb +58 -0
  304. data/lib/api-sdk-rb/configuration.rb +425 -0
  305. data/lib/api-sdk-rb/models/account_credit_balance.rb +253 -0
  306. data/lib/api-sdk-rb/models/account_credit_balance_response.rb +247 -0
  307. data/lib/api-sdk-rb/models/account_credit_transaction.rb +277 -0
  308. data/lib/api-sdk-rb/models/adapter_connection.rb +355 -0
  309. data/lib/api-sdk-rb/models/adapter_connection_removal.rb +222 -0
  310. data/lib/api-sdk-rb/models/add_ai_answers_knowledge_document201_response.rb +246 -0
  311. data/lib/api-sdk-rb/models/add_ai_answers_knowledge_document_request.rb +277 -0
  312. data/lib/api-sdk-rb/models/add_domain_request.rb +222 -0
  313. data/lib/api-sdk-rb/models/ai_answers_knowledge.rb +240 -0
  314. data/lib/api-sdk-rb/models/ai_answers_knowledge_document.rb +373 -0
  315. data/lib/api-sdk-rb/models/ai_answers_knowledge_removal.rb +222 -0
  316. data/lib/api-sdk-rb/models/ai_answers_knowledge_totals.rb +273 -0
  317. data/lib/api-sdk-rb/models/api_key_scope.rb +47 -0
  318. data/lib/api-sdk-rb/models/canvas.rb +315 -0
  319. data/lib/api-sdk-rb/models/canvas_response.rb +247 -0
  320. data/lib/api-sdk-rb/models/check_composition_access_response.rb +247 -0
  321. data/lib/api-sdk-rb/models/check_composition_access_response_data.rb +225 -0
  322. data/lib/api-sdk-rb/models/composition.rb +447 -0
  323. data/lib/api-sdk-rb/models/composition_data_source.rb +287 -0
  324. data/lib/api-sdk-rb/models/composition_data_source_response.rb +247 -0
  325. data/lib/api-sdk-rb/models/composition_entries_description.rb +258 -0
  326. data/lib/api-sdk-rb/models/composition_entries_description_response.rb +247 -0
  327. data/lib/api-sdk-rb/models/composition_entries_reading.rb +368 -0
  328. data/lib/api-sdk-rb/models/composition_entries_reading_response.rb +247 -0
  329. data/lib/api-sdk-rb/models/composition_entry_aggregate_tally.rb +271 -0
  330. data/lib/api-sdk-rb/models/composition_entry_aggregates_block.rb +252 -0
  331. data/lib/api-sdk-rb/models/composition_entry_column.rb +239 -0
  332. data/lib/api-sdk-rb/models/composition_entry_delete_success.rb +237 -0
  333. data/lib/api-sdk-rb/models/composition_entry_delete_success_data.rb +221 -0
  334. data/lib/api-sdk-rb/models/composition_entry_item.rb +274 -0
  335. data/lib/api-sdk-rb/models/composition_entry_items_meta.rb +279 -0
  336. data/lib/api-sdk-rb/models/composition_entry_items_page_success.rb +255 -0
  337. data/lib/api-sdk-rb/models/composition_entry_table.rb +269 -0
  338. data/lib/api-sdk-rb/models/composition_entry_tally.rb +254 -0
  339. data/lib/api-sdk-rb/models/composition_response.rb +247 -0
  340. data/lib/api-sdk-rb/models/composition_version.rb +255 -0
  341. data/lib/api-sdk-rb/models/content_check_finding.rb +260 -0
  342. data/lib/api-sdk-rb/models/content_item_write_result.rb +266 -0
  343. data/lib/api-sdk-rb/models/content_item_write_result_validation_result.rb +236 -0
  344. data/lib/api-sdk-rb/models/copy_partner_preset_request.rb +243 -0
  345. data/lib/api-sdk-rb/models/create_canvas_request.rb +291 -0
  346. data/lib/api-sdk-rb/models/create_composition_content_item201_response.rb +246 -0
  347. data/lib/api-sdk-rb/models/create_composition_content_item_request.rb +233 -0
  348. data/lib/api-sdk-rb/models/create_composition_database_record201_response.rb +249 -0
  349. data/lib/api-sdk-rb/models/create_composition_from_preset_request.rb +259 -0
  350. data/lib/api-sdk-rb/models/create_composition_from_widget201_response.rb +246 -0
  351. data/lib/api-sdk-rb/models/create_composition_from_widget_request.rb +267 -0
  352. data/lib/api-sdk-rb/models/create_user_api_key_request.rb +335 -0
  353. data/lib/api-sdk-rb/models/create_widget201_response.rb +246 -0
  354. data/lib/api-sdk-rb/models/create_widget201_response_data.rb +493 -0
  355. data/lib/api-sdk-rb/models/created_user_api_key.rb +384 -0
  356. data/lib/api-sdk-rb/models/created_user_api_key_response.rb +247 -0
  357. data/lib/api-sdk-rb/models/delete_composition_content_item_response.rb +247 -0
  358. data/lib/api-sdk-rb/models/delete_composition_content_item_response_data.rb +223 -0
  359. data/lib/api-sdk-rb/models/delete_composition_data_source_response.rb +247 -0
  360. data/lib/api-sdk-rb/models/delete_composition_data_source_response_data.rb +222 -0
  361. data/lib/api-sdk-rb/models/delete_managed_user200_response.rb +246 -0
  362. data/lib/api-sdk-rb/models/delete_personal_workspace_domain_response.rb +247 -0
  363. data/lib/api-sdk-rb/models/delete_personal_workspace_domain_response_data.rb +214 -0
  364. data/lib/api-sdk-rb/models/delete_user_api_key_response.rb +247 -0
  365. data/lib/api-sdk-rb/models/delete_user_api_key_response_data.rb +214 -0
  366. data/lib/api-sdk-rb/models/design_defaults.rb +221 -0
  367. data/lib/api-sdk-rb/models/duplicate_composition202_response.rb +246 -0
  368. data/lib/api-sdk-rb/models/duplicate_composition202_response_data.rb +215 -0
  369. data/lib/api-sdk-rb/models/duplicate_composition_request.rb +227 -0
  370. data/lib/api-sdk-rb/models/editor_session.rb +367 -0
  371. data/lib/api-sdk-rb/models/editor_session_response.rb +247 -0
  372. data/lib/api-sdk-rb/models/entitlement.rb +350 -0
  373. data/lib/api-sdk-rb/models/error_detail.rb +317 -0
  374. data/lib/api-sdk-rb/models/error_response.rb +255 -0
  375. data/lib/api-sdk-rb/models/export_composition_entry_items200_response.rb +255 -0
  376. data/lib/api-sdk-rb/models/export_composition_entry_items200_response_meta.rb +237 -0
  377. data/lib/api-sdk-rb/models/get_ai_answers_knowledge200_response.rb +246 -0
  378. data/lib/api-sdk-rb/models/get_all_canvases_response.rb +247 -0
  379. data/lib/api-sdk-rb/models/get_all_canvases_response_data.rb +244 -0
  380. data/lib/api-sdk-rb/models/get_all_compositions200_response.rb +248 -0
  381. data/lib/api-sdk-rb/models/get_all_managed_users200_response.rb +248 -0
  382. data/lib/api-sdk-rb/models/get_composition_content_response.rb +247 -0
  383. data/lib/api-sdk-rb/models/get_composition_content_schema_response.rb +247 -0
  384. data/lib/api-sdk-rb/models/get_composition_content_schema_response_data.rb +261 -0
  385. data/lib/api-sdk-rb/models/get_composition_data_source_response.rb +243 -0
  386. data/lib/api-sdk-rb/models/get_composition_database_records200_response.rb +248 -0
  387. data/lib/api-sdk-rb/models/get_composition_design_response.rb +247 -0
  388. data/lib/api-sdk-rb/models/get_composition_design_schema_response.rb +247 -0
  389. data/lib/api-sdk-rb/models/get_composition_design_schema_response_data.rb +262 -0
  390. data/lib/api-sdk-rb/models/get_composition_embed_schema_response.rb +247 -0
  391. data/lib/api-sdk-rb/models/get_composition_embed_schema_response_data.rb +302 -0
  392. data/lib/api-sdk-rb/models/get_composition_embed_settings_response.rb +247 -0
  393. data/lib/api-sdk-rb/models/get_composition_preview_response.rb +247 -0
  394. data/lib/api-sdk-rb/models/get_composition_preview_response_data.rb +245 -0
  395. data/lib/api-sdk-rb/models/get_composition_versions200_response.rb +248 -0
  396. data/lib/api-sdk-rb/models/get_compositions_batch_request.rb +243 -0
  397. data/lib/api-sdk-rb/models/get_compositions_batch_response.rb +247 -0
  398. data/lib/api-sdk-rb/models/get_compositions_batch_response_data.rb +227 -0
  399. data/lib/api-sdk-rb/models/get_invoices_by_partner_id200_response.rb +248 -0
  400. data/lib/api-sdk-rb/models/get_managed_user_entitlements_response.rb +247 -0
  401. data/lib/api-sdk-rb/models/get_managed_user_entitlements_response_data.rb +225 -0
  402. data/lib/api-sdk-rb/models/get_managed_user_limits200_response.rb +246 -0
  403. data/lib/api-sdk-rb/models/get_managed_user_storage_usage200_response.rb +246 -0
  404. data/lib/api-sdk-rb/models/get_managed_user_storage_usage200_response_data.rb +253 -0
  405. data/lib/api-sdk-rb/models/get_managed_user_storage_usage200_response_data_by_purpose.rb +241 -0
  406. data/lib/api-sdk-rb/models/get_managed_users_by_manager_id_response.rb +247 -0
  407. data/lib/api-sdk-rb/models/get_managed_users_by_manager_id_response_data.rb +243 -0
  408. data/lib/api-sdk-rb/models/get_partner_billing_overview200_response.rb +246 -0
  409. data/lib/api-sdk-rb/models/get_partner_credit_transactions200_response.rb +248 -0
  410. data/lib/api-sdk-rb/models/get_partner_design_defaults200_response.rb +246 -0
  411. data/lib/api-sdk-rb/models/get_partner_entitlements_response.rb +247 -0
  412. data/lib/api-sdk-rb/models/get_partner_entitlements_response_data.rb +225 -0
  413. data/lib/api-sdk-rb/models/get_personal_workspace_domains200_response.rb +248 -0
  414. data/lib/api-sdk-rb/models/get_public_composition_embed200_response.rb +348 -0
  415. data/lib/api-sdk-rb/models/get_public_composition_embed200_response_data_source.rb +223 -0
  416. data/lib/api-sdk-rb/models/get_public_composition_embed200_response_direct.rb +234 -0
  417. data/lib/api-sdk-rb/models/get_user_adapter_connections200_response.rb +248 -0
  418. data/lib/api-sdk-rb/models/get_user_api_key_usage_logs_response.rb +247 -0
  419. data/lib/api-sdk-rb/models/get_user_api_key_usage_logs_response_data.rb +223 -0
  420. data/lib/api-sdk-rb/models/get_user_api_keys200_response.rb +248 -0
  421. data/lib/api-sdk-rb/models/get_widgets200_response.rb +248 -0
  422. data/lib/api-sdk-rb/models/get_widgets_batch_request.rb +223 -0
  423. data/lib/api-sdk-rb/models/get_widgets_batch_response.rb +247 -0
  424. data/lib/api-sdk-rb/models/get_widgets_batch_response_data.rb +227 -0
  425. data/lib/api-sdk-rb/models/get_widgets_batch_response_data_errors_inner.rb +223 -0
  426. data/lib/api-sdk-rb/models/list_partner_presets200_response.rb +248 -0
  427. data/lib/api-sdk-rb/models/managed_user.rb +312 -0
  428. data/lib/api-sdk-rb/models/managed_user_entries_meta.rb +274 -0
  429. data/lib/api-sdk-rb/models/managed_user_entries_page_success.rb +255 -0
  430. data/lib/api-sdk-rb/models/managed_user_entry_item.rb +313 -0
  431. data/lib/api-sdk-rb/models/managed_user_limits.rb +264 -0
  432. data/lib/api-sdk-rb/models/managed_user_operation_usage.rb +291 -0
  433. data/lib/api-sdk-rb/models/managed_user_removal.rb +239 -0
  434. data/lib/api-sdk-rb/models/managed_user_response.rb +247 -0
  435. data/lib/api-sdk-rb/models/managed_user_usage.rb +308 -0
  436. data/lib/api-sdk-rb/models/managed_user_usage_response.rb +247 -0
  437. data/lib/api-sdk-rb/models/managed_user_usage_totals.rb +270 -0
  438. data/lib/api-sdk-rb/models/my_partner.rb +368 -0
  439. data/lib/api-sdk-rb/models/my_partners.rb +288 -0
  440. data/lib/api-sdk-rb/models/my_partners_response.rb +247 -0
  441. data/lib/api-sdk-rb/models/new_composition.rb +350 -0
  442. data/lib/api-sdk-rb/models/new_editor_session.rb +340 -0
  443. data/lib/api-sdk-rb/models/new_managed_user.rb +242 -0
  444. data/lib/api-sdk-rb/models/new_widget.rb +434 -0
  445. data/lib/api-sdk-rb/models/operations_id_get_response.rb +247 -0
  446. data/lib/api-sdk-rb/models/operations_id_get_response_data.rb +348 -0
  447. data/lib/api-sdk-rb/models/partner_analytics_by_managed_user.rb +272 -0
  448. data/lib/api-sdk-rb/models/partner_analytics_by_managed_user_response.rb +247 -0
  449. data/lib/api-sdk-rb/models/partner_analytics_of_day.rb +270 -0
  450. data/lib/api-sdk-rb/models/partner_analytics_of_managed_user.rb +354 -0
  451. data/lib/api-sdk-rb/models/partner_analytics_of_widget.rb +300 -0
  452. data/lib/api-sdk-rb/models/partner_analytics_summary.rb +336 -0
  453. data/lib/api-sdk-rb/models/partner_analytics_summary_response.rb +247 -0
  454. data/lib/api-sdk-rb/models/partner_analytics_timeline.rb +270 -0
  455. data/lib/api-sdk-rb/models/partner_analytics_timeline_response.rb +247 -0
  456. data/lib/api-sdk-rb/models/partner_analytics_top_widgets.rb +269 -0
  457. data/lib/api-sdk-rb/models/partner_analytics_top_widgets_response.rb +247 -0
  458. data/lib/api-sdk-rb/models/partner_billing_overview.rb +265 -0
  459. data/lib/api-sdk-rb/models/partner_billing_overview_billing_integration.rb +304 -0
  460. data/lib/api-sdk-rb/models/partner_billing_overview_operational_credits.rb +276 -0
  461. data/lib/api-sdk-rb/models/partner_billing_overview_partner.rb +304 -0
  462. data/lib/api-sdk-rb/models/partner_contract.rb +400 -0
  463. data/lib/api-sdk-rb/models/partner_contract_response.rb +247 -0
  464. data/lib/api-sdk-rb/models/partner_customization.rb +414 -0
  465. data/lib/api-sdk-rb/models/partner_data_database.rb +332 -0
  466. data/lib/api-sdk-rb/models/partner_data_database_removal.rb +222 -0
  467. data/lib/api-sdk-rb/models/partner_data_database_removal_response.rb +247 -0
  468. data/lib/api-sdk-rb/models/partner_data_database_response.rb +247 -0
  469. data/lib/api-sdk-rb/models/partner_entry_context_secret.rb +239 -0
  470. data/lib/api-sdk-rb/models/partner_entry_context_secret_response.rb +247 -0
  471. data/lib/api-sdk-rb/models/partner_entry_context_signing.rb +299 -0
  472. data/lib/api-sdk-rb/models/partner_entry_context_signing_response.rb +247 -0
  473. data/lib/api-sdk-rb/models/partner_extra_credits_invoice.rb +394 -0
  474. data/lib/api-sdk-rb/models/partner_extra_credits_invoice_response.rb +247 -0
  475. data/lib/api-sdk-rb/models/partner_invoice.rb +489 -0
  476. data/lib/api-sdk-rb/models/partner_notification.rb +358 -0
  477. data/lib/api-sdk-rb/models/partner_notification_default_recipients.rb +244 -0
  478. data/lib/api-sdk-rb/models/partner_notification_delivery.rb +466 -0
  479. data/lib/api-sdk-rb/models/partner_notification_delivery_log.rb +224 -0
  480. data/lib/api-sdk-rb/models/partner_notification_delivery_log_response.rb +247 -0
  481. data/lib/api-sdk-rb/models/partner_notification_delivery_response.rb +247 -0
  482. data/lib/api-sdk-rb/models/partner_notification_event.rb +351 -0
  483. data/lib/api-sdk-rb/models/partner_notification_event_type.rb +54 -0
  484. data/lib/api-sdk-rb/models/partner_notification_page.rb +237 -0
  485. data/lib/api-sdk-rb/models/partner_notification_page_response.rb +247 -0
  486. data/lib/api-sdk-rb/models/partner_notification_settings.rb +366 -0
  487. data/lib/api-sdk-rb/models/partner_notification_settings_change.rb +235 -0
  488. data/lib/api-sdk-rb/models/partner_notification_settings_change_response.rb +247 -0
  489. data/lib/api-sdk-rb/models/partner_notification_settings_response.rb +247 -0
  490. data/lib/api-sdk-rb/models/partner_notification_test_event_request.rb +244 -0
  491. data/lib/api-sdk-rb/models/partner_notification_test_event_result.rb +263 -0
  492. data/lib/api-sdk-rb/models/partner_notification_test_event_result_response.rb +247 -0
  493. data/lib/api-sdk-rb/models/partner_preset.rb +344 -0
  494. data/lib/api-sdk-rb/models/partner_preset_copy.rb +308 -0
  495. data/lib/api-sdk-rb/models/partner_preset_copy_response.rb +247 -0
  496. data/lib/api-sdk-rb/models/partner_preset_removal.rb +222 -0
  497. data/lib/api-sdk-rb/models/partner_preset_removal_response.rb +247 -0
  498. data/lib/api-sdk-rb/models/partner_preset_response.rb +247 -0
  499. data/lib/api-sdk-rb/models/partner_report_page.rb +257 -0
  500. data/lib/api-sdk-rb/models/partner_report_period.rb +240 -0
  501. data/lib/api-sdk-rb/models/partner_storage_destination.rb +393 -0
  502. data/lib/api-sdk-rb/models/partner_storage_destination_response.rb +247 -0
  503. data/lib/api-sdk-rb/models/partner_storage_removal.rb +222 -0
  504. data/lib/api-sdk-rb/models/partner_storage_removal_response.rb +247 -0
  505. data/lib/api-sdk-rb/models/partner_storage_usage.rb +272 -0
  506. data/lib/api-sdk-rb/models/partner_storage_usage_of_managed_user.rb +334 -0
  507. data/lib/api-sdk-rb/models/partner_storage_usage_response.rb +247 -0
  508. data/lib/api-sdk-rb/models/partner_storage_usage_totals.rb +273 -0
  509. data/lib/api-sdk-rb/models/personal_workspace_domain.rb +275 -0
  510. data/lib/api-sdk-rb/models/personal_workspace_domain_result.rb +237 -0
  511. data/lib/api-sdk-rb/models/personal_workspace_domain_result_response.rb +247 -0
  512. data/lib/api-sdk-rb/models/post_public_composition_embed_status200_response.rb +246 -0
  513. data/lib/api-sdk-rb/models/post_public_composition_embed_status200_response_data.rb +239 -0
  514. data/lib/api-sdk-rb/models/post_public_composition_embed_status_request.rb +251 -0
  515. data/lib/api-sdk-rb/models/public_adapter_call_error.rb +265 -0
  516. data/lib/api-sdk-rb/models/public_adapter_call_request.rb +332 -0
  517. data/lib/api-sdk-rb/models/public_adapter_call_result.rb +237 -0
  518. data/lib/api-sdk-rb/models/public_adapter_call_result_data.rb +224 -0
  519. data/lib/api-sdk-rb/models/public_adapter_file_result.rb +237 -0
  520. data/lib/api-sdk-rb/models/public_adapter_file_result_data.rb +221 -0
  521. data/lib/api-sdk-rb/models/public_adapter_file_result_data_file.rb +318 -0
  522. data/lib/api-sdk-rb/models/public_composition_entry_created.rb +237 -0
  523. data/lib/api-sdk-rb/models/public_composition_entry_created_data.rb +253 -0
  524. data/lib/api-sdk-rb/models/public_composition_entry_request.rb +246 -0
  525. data/lib/api-sdk-rb/models/public_embed_failure.rb +291 -0
  526. data/lib/api-sdk-rb/models/public_embed_failure_details.rb +260 -0
  527. data/lib/api-sdk-rb/models/public_embed_failure_error.rb +283 -0
  528. data/lib/api-sdk-rb/models/purpose_storage_bucket.rb +237 -0
  529. data/lib/api-sdk-rb/models/remove_ai_answers_knowledge_document200_response.rb +246 -0
  530. data/lib/api-sdk-rb/models/remove_user_adapter_connection200_response.rb +246 -0
  531. data/lib/api-sdk-rb/models/request_extra_credits.rb +250 -0
  532. data/lib/api-sdk-rb/models/response_meta.rb +297 -0
  533. data/lib/api-sdk-rb/models/revoke_managed_user_editor_sessions_response.rb +247 -0
  534. data/lib/api-sdk-rb/models/revoke_managed_user_editor_sessions_response_data.rb +215 -0
  535. data/lib/api-sdk-rb/models/set_adapter_connection_request.rb +241 -0
  536. data/lib/api-sdk-rb/models/set_composition_data_source_request.rb +284 -0
  537. data/lib/api-sdk-rb/models/set_dynamic_content_request.rb +266 -0
  538. data/lib/api-sdk-rb/models/set_dynamic_content_response.rb +247 -0
  539. data/lib/api-sdk-rb/models/set_dynamic_content_response_data.rb +251 -0
  540. data/lib/api-sdk-rb/models/set_dynamic_content_response_data_validation_result.rb +236 -0
  541. data/lib/api-sdk-rb/models/set_managed_user_limits_request.rb +241 -0
  542. data/lib/api-sdk-rb/models/set_partner_data_database_request.rb +222 -0
  543. data/lib/api-sdk-rb/models/set_partner_design_defaults_request.rb +217 -0
  544. data/lib/api-sdk-rb/models/set_partner_preset_request.rb +322 -0
  545. data/lib/api-sdk-rb/models/set_partner_storage_destination_request.rb +331 -0
  546. data/lib/api-sdk-rb/models/set_user_adapter_connection200_response.rb +246 -0
  547. data/lib/api-sdk-rb/models/success_response.rb +250 -0
  548. data/lib/api-sdk-rb/models/update_canvas_request.rb +236 -0
  549. data/lib/api-sdk-rb/models/update_composition.rb +285 -0
  550. data/lib/api-sdk-rb/models/update_composition_status_request.rb +256 -0
  551. data/lib/api-sdk-rb/models/update_domain_request.rb +223 -0
  552. data/lib/api-sdk-rb/models/update_managed_user.rb +235 -0
  553. data/lib/api-sdk-rb/models/update_partner_entry_context_signing_request.rb +222 -0
  554. data/lib/api-sdk-rb/models/update_partner_notification_settings_request.rb +289 -0
  555. data/lib/api-sdk-rb/models/update_user_api_key_request.rb +254 -0
  556. data/lib/api-sdk-rb/models/upload.rb +462 -0
  557. data/lib/api-sdk-rb/models/upload_limits.rb +269 -0
  558. data/lib/api-sdk-rb/models/upload_limits_response.rb +247 -0
  559. data/lib/api-sdk-rb/models/upload_response.rb +247 -0
  560. data/lib/api-sdk-rb/models/uploads_get200_response.rb +248 -0
  561. data/lib/api-sdk-rb/models/uploads_id_delete200_response.rb +246 -0
  562. data/lib/api-sdk-rb/models/uploads_id_delete200_response_data.rb +214 -0
  563. data/lib/api-sdk-rb/models/user_api_key.rb +382 -0
  564. data/lib/api-sdk-rb/models/user_api_key_response.rb +247 -0
  565. data/lib/api-sdk-rb/models/user_api_key_usage_log.rb +326 -0
  566. data/lib/api-sdk-rb/models/validate_composition_content_response.rb +247 -0
  567. data/lib/api-sdk-rb/models/validate_composition_content_response_data.rb +258 -0
  568. data/lib/api-sdk-rb/models/validate_token200_response.rb +246 -0
  569. data/lib/api-sdk-rb/models/validate_token200_response_data.rb +286 -0
  570. data/lib/api-sdk-rb/models/widget.rb +475 -0
  571. data/lib/api-sdk-rb/version.rb +15 -0
  572. data/lib/api-sdk-rb.rb +319 -0
  573. data/spec/api/canvases_api_spec.rb +104 -0
  574. data/spec/api/compositions_api_spec.rb +578 -0
  575. data/spec/api/credits_api_spec.rb +62 -0
  576. data/spec/api/entitlements_api_spec.rb +65 -0
  577. data/spec/api/invoices_api_spec.rb +50 -0
  578. data/spec/api/managed_users_api_spec.rb +256 -0
  579. data/spec/api/operations_api_spec.rb +47 -0
  580. data/spec/api/partner_api_spec.rb +1895 -0
  581. data/spec/api/partners_api_spec.rb +525 -0
  582. data/spec/api/public_embed_api_spec.rb +115 -0
  583. data/spec/api/tokens_api_spec.rb +45 -0
  584. data/spec/api/uploads_api_spec.rb +101 -0
  585. data/spec/api/users_api_spec.rb +195 -0
  586. data/spec/api/widgets_api_spec.rb +90 -0
  587. data/spec/models/account_credit_balance_response_spec.rb +48 -0
  588. data/spec/models/account_credit_balance_spec.rb +60 -0
  589. data/spec/models/account_credit_transaction_spec.rb +72 -0
  590. data/spec/models/adapter_connection_removal_spec.rb +36 -0
  591. data/spec/models/adapter_connection_spec.rb +76 -0
  592. data/spec/models/add_ai_answers_knowledge_document201_response_spec.rb +48 -0
  593. data/spec/models/add_ai_answers_knowledge_document_request_spec.rb +42 -0
  594. data/spec/models/add_domain_request_spec.rb +36 -0
  595. data/spec/models/ai_answers_knowledge_document_spec.rb +76 -0
  596. data/spec/models/ai_answers_knowledge_removal_spec.rb +36 -0
  597. data/spec/models/ai_answers_knowledge_spec.rb +42 -0
  598. data/spec/models/ai_answers_knowledge_totals_spec.rb +54 -0
  599. data/spec/models/api_key_scope_spec.rb +30 -0
  600. data/spec/models/canvas_response_spec.rb +48 -0
  601. data/spec/models/canvas_spec.rb +78 -0
  602. data/spec/models/check_composition_access_response_data_spec.rb +42 -0
  603. data/spec/models/check_composition_access_response_spec.rb +48 -0
  604. data/spec/models/composition_data_source_response_spec.rb +48 -0
  605. data/spec/models/composition_data_source_spec.rb +42 -0
  606. data/spec/models/composition_entries_description_response_spec.rb +48 -0
  607. data/spec/models/composition_entries_description_spec.rb +48 -0
  608. data/spec/models/composition_entries_reading_response_spec.rb +48 -0
  609. data/spec/models/composition_entries_reading_spec.rb +84 -0
  610. data/spec/models/composition_entry_aggregate_tally_spec.rb +66 -0
  611. data/spec/models/composition_entry_aggregates_block_spec.rb +48 -0
  612. data/spec/models/composition_entry_column_spec.rb +42 -0
  613. data/spec/models/composition_entry_delete_success_data_spec.rb +36 -0
  614. data/spec/models/composition_entry_delete_success_spec.rb +42 -0
  615. data/spec/models/composition_entry_item_spec.rb +60 -0
  616. data/spec/models/composition_entry_items_meta_spec.rb +52 -0
  617. data/spec/models/composition_entry_items_page_success_spec.rb +48 -0
  618. data/spec/models/composition_entry_table_spec.rb +48 -0
  619. data/spec/models/composition_entry_tally_spec.rb +42 -0
  620. data/spec/models/composition_response_spec.rb +48 -0
  621. data/spec/models/composition_spec.rb +124 -0
  622. data/spec/models/composition_version_spec.rb +60 -0
  623. data/spec/models/content_check_finding_spec.rb +54 -0
  624. data/spec/models/content_item_write_result_spec.rb +66 -0
  625. data/spec/models/content_item_write_result_validation_result_spec.rb +48 -0
  626. data/spec/models/copy_partner_preset_request_spec.rb +36 -0
  627. data/spec/models/create_canvas_request_spec.rb +66 -0
  628. data/spec/models/create_composition_content_item201_response_spec.rb +48 -0
  629. data/spec/models/create_composition_content_item_request_spec.rb +36 -0
  630. data/spec/models/create_composition_database_record201_response_spec.rb +48 -0
  631. data/spec/models/create_composition_from_preset_request_spec.rb +60 -0
  632. data/spec/models/create_composition_from_widget201_response_spec.rb +48 -0
  633. data/spec/models/create_composition_from_widget_request_spec.rb +66 -0
  634. data/spec/models/create_user_api_key_request_spec.rb +58 -0
  635. data/spec/models/create_widget201_response_data_spec.rb +172 -0
  636. data/spec/models/create_widget201_response_spec.rb +48 -0
  637. data/spec/models/created_user_api_key_response_spec.rb +48 -0
  638. data/spec/models/created_user_api_key_spec.rb +88 -0
  639. data/spec/models/delete_composition_content_item_response_data_spec.rb +42 -0
  640. data/spec/models/delete_composition_content_item_response_spec.rb +48 -0
  641. data/spec/models/delete_composition_data_source_response_data_spec.rb +36 -0
  642. data/spec/models/delete_composition_data_source_response_spec.rb +48 -0
  643. data/spec/models/delete_managed_user200_response_spec.rb +48 -0
  644. data/spec/models/delete_personal_workspace_domain_response_data_spec.rb +36 -0
  645. data/spec/models/delete_personal_workspace_domain_response_spec.rb +48 -0
  646. data/spec/models/delete_user_api_key_response_data_spec.rb +36 -0
  647. data/spec/models/delete_user_api_key_response_spec.rb +48 -0
  648. data/spec/models/design_defaults_spec.rb +36 -0
  649. data/spec/models/duplicate_composition202_response_data_spec.rb +36 -0
  650. data/spec/models/duplicate_composition202_response_spec.rb +48 -0
  651. data/spec/models/duplicate_composition_request_spec.rb +42 -0
  652. data/spec/models/editor_session_response_spec.rb +48 -0
  653. data/spec/models/editor_session_spec.rb +88 -0
  654. data/spec/models/entitlement_spec.rb +100 -0
  655. data/spec/models/error_detail_spec.rb +84 -0
  656. data/spec/models/error_response_spec.rb +48 -0
  657. data/spec/models/export_composition_entry_items200_response_meta_spec.rb +42 -0
  658. data/spec/models/export_composition_entry_items200_response_spec.rb +48 -0
  659. data/spec/models/get_ai_answers_knowledge200_response_spec.rb +48 -0
  660. data/spec/models/get_all_canvases_response_data_spec.rb +54 -0
  661. data/spec/models/get_all_canvases_response_spec.rb +48 -0
  662. data/spec/models/get_all_compositions200_response_spec.rb +48 -0
  663. data/spec/models/get_all_managed_users200_response_spec.rb +48 -0
  664. data/spec/models/get_composition_content_response_spec.rb +48 -0
  665. data/spec/models/get_composition_content_schema_response_data_spec.rb +66 -0
  666. data/spec/models/get_composition_content_schema_response_spec.rb +48 -0
  667. data/spec/models/get_composition_data_source_response_spec.rb +48 -0
  668. data/spec/models/get_composition_database_records200_response_spec.rb +48 -0
  669. data/spec/models/get_composition_design_response_spec.rb +48 -0
  670. data/spec/models/get_composition_design_schema_response_data_spec.rb +66 -0
  671. data/spec/models/get_composition_design_schema_response_spec.rb +48 -0
  672. data/spec/models/get_composition_embed_schema_response_data_spec.rb +70 -0
  673. data/spec/models/get_composition_embed_schema_response_spec.rb +48 -0
  674. data/spec/models/get_composition_embed_settings_response_spec.rb +48 -0
  675. data/spec/models/get_composition_preview_response_data_spec.rb +54 -0
  676. data/spec/models/get_composition_preview_response_spec.rb +48 -0
  677. data/spec/models/get_composition_versions200_response_spec.rb +48 -0
  678. data/spec/models/get_compositions_batch_request_spec.rb +36 -0
  679. data/spec/models/get_compositions_batch_response_data_spec.rb +42 -0
  680. data/spec/models/get_compositions_batch_response_spec.rb +48 -0
  681. data/spec/models/get_invoices_by_partner_id200_response_spec.rb +48 -0
  682. data/spec/models/get_managed_user_entitlements_response_data_spec.rb +42 -0
  683. data/spec/models/get_managed_user_entitlements_response_spec.rb +48 -0
  684. data/spec/models/get_managed_user_limits200_response_spec.rb +48 -0
  685. data/spec/models/get_managed_user_storage_usage200_response_data_by_purpose_spec.rb +54 -0
  686. data/spec/models/get_managed_user_storage_usage200_response_data_spec.rb +48 -0
  687. data/spec/models/get_managed_user_storage_usage200_response_spec.rb +48 -0
  688. data/spec/models/get_managed_users_by_manager_id_response_data_spec.rb +54 -0
  689. data/spec/models/get_managed_users_by_manager_id_response_spec.rb +48 -0
  690. data/spec/models/get_partner_billing_overview200_response_spec.rb +48 -0
  691. data/spec/models/get_partner_credit_transactions200_response_spec.rb +48 -0
  692. data/spec/models/get_partner_design_defaults200_response_spec.rb +48 -0
  693. data/spec/models/get_partner_entitlements_response_data_spec.rb +42 -0
  694. data/spec/models/get_partner_entitlements_response_spec.rb +48 -0
  695. data/spec/models/get_personal_workspace_domains200_response_spec.rb +48 -0
  696. data/spec/models/get_public_composition_embed200_response_data_source_spec.rb +42 -0
  697. data/spec/models/get_public_composition_embed200_response_direct_spec.rb +48 -0
  698. data/spec/models/get_public_composition_embed200_response_spec.rb +120 -0
  699. data/spec/models/get_user_adapter_connections200_response_spec.rb +48 -0
  700. data/spec/models/get_user_api_key_usage_logs_response_data_spec.rb +36 -0
  701. data/spec/models/get_user_api_key_usage_logs_response_spec.rb +48 -0
  702. data/spec/models/get_user_api_keys200_response_spec.rb +48 -0
  703. data/spec/models/get_widgets200_response_spec.rb +48 -0
  704. data/spec/models/get_widgets_batch_request_spec.rb +36 -0
  705. data/spec/models/get_widgets_batch_response_data_errors_inner_spec.rb +42 -0
  706. data/spec/models/get_widgets_batch_response_data_spec.rb +42 -0
  707. data/spec/models/get_widgets_batch_response_spec.rb +48 -0
  708. data/spec/models/list_partner_presets200_response_spec.rb +48 -0
  709. data/spec/models/managed_user_entries_meta_spec.rb +60 -0
  710. data/spec/models/managed_user_entries_page_success_spec.rb +48 -0
  711. data/spec/models/managed_user_entry_item_spec.rb +72 -0
  712. data/spec/models/managed_user_limits_spec.rb +54 -0
  713. data/spec/models/managed_user_operation_usage_spec.rb +60 -0
  714. data/spec/models/managed_user_removal_spec.rb +42 -0
  715. data/spec/models/managed_user_response_spec.rb +48 -0
  716. data/spec/models/managed_user_spec.rb +72 -0
  717. data/spec/models/managed_user_usage_response_spec.rb +48 -0
  718. data/spec/models/managed_user_usage_spec.rb +66 -0
  719. data/spec/models/managed_user_usage_totals_spec.rb +54 -0
  720. data/spec/models/my_partner_spec.rb +88 -0
  721. data/spec/models/my_partners_response_spec.rb +48 -0
  722. data/spec/models/my_partners_spec.rb +52 -0
  723. data/spec/models/new_composition_spec.rb +96 -0
  724. data/spec/models/new_editor_session_spec.rb +58 -0
  725. data/spec/models/new_managed_user_spec.rb +48 -0
  726. data/spec/models/new_widget_spec.rb +100 -0
  727. data/spec/models/operations_id_get_response_data_spec.rb +82 -0
  728. data/spec/models/operations_id_get_response_spec.rb +48 -0
  729. data/spec/models/partner_analytics_by_managed_user_response_spec.rb +48 -0
  730. data/spec/models/partner_analytics_by_managed_user_spec.rb +54 -0
  731. data/spec/models/partner_analytics_of_day_spec.rb +54 -0
  732. data/spec/models/partner_analytics_of_managed_user_spec.rb +90 -0
  733. data/spec/models/partner_analytics_of_widget_spec.rb +66 -0
  734. data/spec/models/partner_analytics_summary_response_spec.rb +48 -0
  735. data/spec/models/partner_analytics_summary_spec.rb +78 -0
  736. data/spec/models/partner_analytics_timeline_response_spec.rb +48 -0
  737. data/spec/models/partner_analytics_timeline_spec.rb +54 -0
  738. data/spec/models/partner_analytics_top_widgets_response_spec.rb +48 -0
  739. data/spec/models/partner_analytics_top_widgets_spec.rb +54 -0
  740. data/spec/models/partner_billing_overview_billing_integration_spec.rb +58 -0
  741. data/spec/models/partner_billing_overview_operational_credits_spec.rb +54 -0
  742. data/spec/models/partner_billing_overview_partner_spec.rb +58 -0
  743. data/spec/models/partner_billing_overview_spec.rb +54 -0
  744. data/spec/models/partner_contract_response_spec.rb +48 -0
  745. data/spec/models/partner_contract_spec.rb +130 -0
  746. data/spec/models/partner_customization_spec.rb +136 -0
  747. data/spec/models/partner_data_database_removal_response_spec.rb +48 -0
  748. data/spec/models/partner_data_database_removal_spec.rb +36 -0
  749. data/spec/models/partner_data_database_response_spec.rb +48 -0
  750. data/spec/models/partner_data_database_spec.rb +78 -0
  751. data/spec/models/partner_entry_context_secret_response_spec.rb +48 -0
  752. data/spec/models/partner_entry_context_secret_spec.rb +42 -0
  753. data/spec/models/partner_entry_context_signing_response_spec.rb +48 -0
  754. data/spec/models/partner_entry_context_signing_spec.rb +66 -0
  755. data/spec/models/partner_extra_credits_invoice_response_spec.rb +48 -0
  756. data/spec/models/partner_extra_credits_invoice_spec.rb +102 -0
  757. data/spec/models/partner_invoice_spec.rb +178 -0
  758. data/spec/models/partner_notification_default_recipients_spec.rb +42 -0
  759. data/spec/models/partner_notification_delivery_log_response_spec.rb +48 -0
  760. data/spec/models/partner_notification_delivery_log_spec.rb +36 -0
  761. data/spec/models/partner_notification_delivery_response_spec.rb +48 -0
  762. data/spec/models/partner_notification_delivery_spec.rb +128 -0
  763. data/spec/models/partner_notification_event_spec.rb +74 -0
  764. data/spec/models/partner_notification_event_type_spec.rb +30 -0
  765. data/spec/models/partner_notification_page_response_spec.rb +48 -0
  766. data/spec/models/partner_notification_page_spec.rb +42 -0
  767. data/spec/models/partner_notification_settings_change_response_spec.rb +48 -0
  768. data/spec/models/partner_notification_settings_change_spec.rb +42 -0
  769. data/spec/models/partner_notification_settings_response_spec.rb +48 -0
  770. data/spec/models/partner_notification_settings_spec.rb +90 -0
  771. data/spec/models/partner_notification_spec.rb +76 -0
  772. data/spec/models/partner_notification_test_event_request_spec.rb +36 -0
  773. data/spec/models/partner_notification_test_event_result_response_spec.rb +48 -0
  774. data/spec/models/partner_notification_test_event_result_spec.rb +54 -0
  775. data/spec/models/partner_preset_copy_response_spec.rb +48 -0
  776. data/spec/models/partner_preset_copy_spec.rb +66 -0
  777. data/spec/models/partner_preset_removal_response_spec.rb +48 -0
  778. data/spec/models/partner_preset_removal_spec.rb +36 -0
  779. data/spec/models/partner_preset_response_spec.rb +48 -0
  780. data/spec/models/partner_preset_spec.rb +84 -0
  781. data/spec/models/partner_report_page_spec.rb +48 -0
  782. data/spec/models/partner_report_period_spec.rb +42 -0
  783. data/spec/models/partner_storage_destination_response_spec.rb +48 -0
  784. data/spec/models/partner_storage_destination_spec.rb +102 -0
  785. data/spec/models/partner_storage_removal_response_spec.rb +48 -0
  786. data/spec/models/partner_storage_removal_spec.rb +36 -0
  787. data/spec/models/partner_storage_usage_of_managed_user_spec.rb +84 -0
  788. data/spec/models/partner_storage_usage_response_spec.rb +48 -0
  789. data/spec/models/partner_storage_usage_spec.rb +54 -0
  790. data/spec/models/partner_storage_usage_totals_spec.rb +54 -0
  791. data/spec/models/personal_workspace_domain_result_response_spec.rb +48 -0
  792. data/spec/models/personal_workspace_domain_result_spec.rb +42 -0
  793. data/spec/models/personal_workspace_domain_spec.rb +60 -0
  794. data/spec/models/post_public_composition_embed_status200_response_data_spec.rb +40 -0
  795. data/spec/models/post_public_composition_embed_status200_response_spec.rb +48 -0
  796. data/spec/models/post_public_composition_embed_status_request_spec.rb +36 -0
  797. data/spec/models/public_adapter_call_error_spec.rb +54 -0
  798. data/spec/models/public_adapter_call_request_spec.rb +60 -0
  799. data/spec/models/public_adapter_call_result_data_spec.rb +36 -0
  800. data/spec/models/public_adapter_call_result_spec.rb +42 -0
  801. data/spec/models/public_adapter_file_result_data_file_spec.rb +66 -0
  802. data/spec/models/public_adapter_file_result_data_spec.rb +36 -0
  803. data/spec/models/public_adapter_file_result_spec.rb +42 -0
  804. data/spec/models/public_composition_entry_created_data_spec.rb +48 -0
  805. data/spec/models/public_composition_entry_created_spec.rb +42 -0
  806. data/spec/models/public_composition_entry_request_spec.rb +48 -0
  807. data/spec/models/public_embed_failure_details_spec.rb +46 -0
  808. data/spec/models/public_embed_failure_error_spec.rb +66 -0
  809. data/spec/models/public_embed_failure_spec.rb +66 -0
  810. data/spec/models/purpose_storage_bucket_spec.rb +42 -0
  811. data/spec/models/remove_ai_answers_knowledge_document200_response_spec.rb +48 -0
  812. data/spec/models/remove_user_adapter_connection200_response_spec.rb +48 -0
  813. data/spec/models/request_extra_credits_spec.rb +36 -0
  814. data/spec/models/response_meta_spec.rb +84 -0
  815. data/spec/models/revoke_managed_user_editor_sessions_response_data_spec.rb +36 -0
  816. data/spec/models/revoke_managed_user_editor_sessions_response_spec.rb +48 -0
  817. data/spec/models/set_adapter_connection_request_spec.rb +36 -0
  818. data/spec/models/set_composition_data_source_request_spec.rb +42 -0
  819. data/spec/models/set_dynamic_content_request_spec.rb +60 -0
  820. data/spec/models/set_dynamic_content_response_data_spec.rb +60 -0
  821. data/spec/models/set_dynamic_content_response_data_validation_result_spec.rb +48 -0
  822. data/spec/models/set_dynamic_content_response_spec.rb +48 -0
  823. data/spec/models/set_managed_user_limits_request_spec.rb +36 -0
  824. data/spec/models/set_partner_data_database_request_spec.rb +36 -0
  825. data/spec/models/set_partner_design_defaults_request_spec.rb +36 -0
  826. data/spec/models/set_partner_preset_request_spec.rb +54 -0
  827. data/spec/models/set_partner_storage_destination_request_spec.rb +78 -0
  828. data/spec/models/set_user_adapter_connection200_response_spec.rb +48 -0
  829. data/spec/models/success_response_spec.rb +48 -0
  830. data/spec/models/update_canvas_request_spec.rb +48 -0
  831. data/spec/models/update_composition_spec.rb +78 -0
  832. data/spec/models/update_composition_status_request_spec.rb +40 -0
  833. data/spec/models/update_domain_request_spec.rb +36 -0
  834. data/spec/models/update_managed_user_spec.rb +48 -0
  835. data/spec/models/update_partner_entry_context_signing_request_spec.rb +36 -0
  836. data/spec/models/update_partner_notification_settings_request_spec.rb +54 -0
  837. data/spec/models/update_user_api_key_request_spec.rb +42 -0
  838. data/spec/models/upload_limits_response_spec.rb +48 -0
  839. data/spec/models/upload_limits_spec.rb +66 -0
  840. data/spec/models/upload_response_spec.rb +48 -0
  841. data/spec/models/upload_spec.rb +126 -0
  842. data/spec/models/uploads_get200_response_spec.rb +48 -0
  843. data/spec/models/uploads_id_delete200_response_data_spec.rb +36 -0
  844. data/spec/models/uploads_id_delete200_response_spec.rb +48 -0
  845. data/spec/models/user_api_key_response_spec.rb +48 -0
  846. data/spec/models/user_api_key_spec.rb +88 -0
  847. data/spec/models/user_api_key_usage_log_spec.rb +78 -0
  848. data/spec/models/validate_composition_content_response_data_spec.rb +54 -0
  849. data/spec/models/validate_composition_content_response_spec.rb +48 -0
  850. data/spec/models/validate_token200_response_data_spec.rb +64 -0
  851. data/spec/models/validate_token200_response_spec.rb +48 -0
  852. data/spec/models/widget_spec.rb +166 -0
  853. data/spec/spec_helper.rb +111 -0
  854. metadata +1216 -0
@@ -0,0 +1,1299 @@
1
+ =begin
2
+ #Widgetic API Gateway
3
+
4
+ #API documentation for the Widgetic API Gateway
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.9.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module ApiSdkRb
16
+ class ManagedUsersApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Give a managed user a copy of one of your presets
23
+ # Copies the preset `key` (see `setPartnerPreset`) onto a new canvas for one of your managed users, so their widget creator opens on a widget of their own that starts from yours. The copy is a draft widget in your account, filed under the managed user: `getAllWidgets` with `managedUserId` lists it, and no other managed user's editor can reach it. The copy carries the preset's code, design and content schemas, and thumbnail, and starts from a fork of its code repository, so the user's chat edits begin where yours left off. It does not carry the preset's database or its compositions. It is not a preset itself, and changing or removing the preset afterwards never touches it. To start a composition (the content and design editor) instead, you do not need a copy: call `createComposition` with the preset's `widgetId` (from `listPartnerPresets`) and the managed user. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one copy is made, not two. A copy that could not be made leaves nothing behind (503 `PRESET_COPY_FAILED`). The managed user must be yours and active.
24
+ # @param id [String] The managed user to give the copy to (Widgetic's id for the user)
25
+ # @param key [String] The key of the preset to copy
26
+ # @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [CopyPartnerPresetRequest] :copy_partner_preset_request
29
+ # @return [PartnerPresetCopyResponse]
30
+ def copy_preset_for_managed_user_0(id, key, idempotency_key, opts = {})
31
+ data, _status_code, _headers = copy_preset_for_managed_user_0_with_http_info(id, key, idempotency_key, opts)
32
+ data
33
+ end
34
+
35
+ # Give a managed user a copy of one of your presets
36
+ # Copies the preset `key` (see `setPartnerPreset`) onto a new canvas for one of your managed users, so their widget creator opens on a widget of their own that starts from yours. The copy is a draft widget in your account, filed under the managed user: `getAllWidgets` with `managedUserId` lists it, and no other managed user's editor can reach it. The copy carries the preset's code, design and content schemas, and thumbnail, and starts from a fork of its code repository, so the user's chat edits begin where yours left off. It does not carry the preset's database or its compositions. It is not a preset itself, and changing or removing the preset afterwards never touches it. To start a composition (the content and design editor) instead, you do not need a copy: call `createComposition` with the preset's `widgetId` (from `listPartnerPresets`) and the managed user. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one copy is made, not two. A copy that could not be made leaves nothing behind (503 `PRESET_COPY_FAILED`). The managed user must be yours and active.
37
+ # @param id [String] The managed user to give the copy to (Widgetic's id for the user)
38
+ # @param key [String] The key of the preset to copy
39
+ # @param idempotency_key [String] Required: a call without it is refused with `400`. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, `-` and `_`. Send the same key again when you retry (after a timeout, a dropped connection or a `5xx`) and the call is carried out once: the retry gets the first answer back, marked `X-Idempotency-Cached: true`. The same key with a different body is refused with `422`, and a retry that arrives while the first call is still running with `409` (see `Retry-After`).
40
+ # @param [Hash] opts the optional parameters
41
+ # @option opts [CopyPartnerPresetRequest] :copy_partner_preset_request
42
+ # @return [Array<(PartnerPresetCopyResponse, Integer, Hash)>] PartnerPresetCopyResponse data, response status code and response headers
43
+ def copy_preset_for_managed_user_0_with_http_info(id, key, idempotency_key, opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: ManagedUsersApi.copy_preset_for_managed_user_0 ...'
46
+ end
47
+ # verify the required parameter 'id' is set
48
+ if @api_client.config.client_side_validation && id.nil?
49
+ fail ArgumentError, "Missing the required parameter 'id' when calling ManagedUsersApi.copy_preset_for_managed_user_0"
50
+ end
51
+ # verify the required parameter 'key' is set
52
+ if @api_client.config.client_side_validation && key.nil?
53
+ fail ArgumentError, "Missing the required parameter 'key' when calling ManagedUsersApi.copy_preset_for_managed_user_0"
54
+ end
55
+ pattern = Regexp.new(/^[a-z0-9][a-z0-9_-]{0,63}$/)
56
+ if @api_client.config.client_side_validation && key !~ pattern
57
+ fail ArgumentError, "invalid value for 'key' when calling ManagedUsersApi.copy_preset_for_managed_user_0, must conform to the pattern #{pattern}."
58
+ end
59
+
60
+ # verify the required parameter 'idempotency_key' is set
61
+ if @api_client.config.client_side_validation && idempotency_key.nil?
62
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling ManagedUsersApi.copy_preset_for_managed_user_0"
63
+ end
64
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
65
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling ManagedUsersApi.copy_preset_for_managed_user_0, the character length must be smaller than or equal to 50.'
66
+ end
67
+
68
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
69
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling ManagedUsersApi.copy_preset_for_managed_user_0, the character length must be great than or equal to 8.'
70
+ end
71
+
72
+ pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
73
+ if @api_client.config.client_side_validation && idempotency_key !~ pattern
74
+ fail ArgumentError, "invalid value for 'idempotency_key' when calling ManagedUsersApi.copy_preset_for_managed_user_0, must conform to the pattern #{pattern}."
75
+ end
76
+
77
+ # resource path
78
+ local_var_path = '/managed-users/{id}/presets/{key}/copy'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
79
+
80
+ # query parameters
81
+ query_params = opts[:query_params] || {}
82
+
83
+ # header parameters
84
+ header_params = opts[:header_params] || {}
85
+ # HTTP header 'Accept' (if needed)
86
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
87
+ # HTTP header 'Content-Type'
88
+ content_type = @api_client.select_header_content_type(['application/json'])
89
+ if !content_type.nil?
90
+ header_params['Content-Type'] = content_type
91
+ end
92
+ header_params[:'Idempotency-Key'] = idempotency_key
93
+
94
+ # form parameters
95
+ form_params = opts[:form_params] || {}
96
+
97
+ # http body (model)
98
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'copy_partner_preset_request'])
99
+
100
+ # return_type
101
+ return_type = opts[:debug_return_type] || 'PartnerPresetCopyResponse'
102
+
103
+ # auth_names
104
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
105
+
106
+ new_options = opts.merge(
107
+ :operation => :"ManagedUsersApi.copy_preset_for_managed_user_0",
108
+ :header_params => header_params,
109
+ :query_params => query_params,
110
+ :form_params => form_params,
111
+ :body => post_body,
112
+ :auth_names => auth_names,
113
+ :return_type => return_type
114
+ )
115
+
116
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
117
+ if @api_client.config.debugging
118
+ @api_client.config.logger.debug "API called: ManagedUsersApi#copy_preset_for_managed_user_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
119
+ end
120
+ return data, status_code, headers
121
+ end
122
+
123
+ # Create a composition from one of your presets in one call
124
+ # Validates the name, optional content, design, embed settings and locale, then creates a draft composition filed under the managed user, built on the preset's widget, in a single insert. A failure never leaves a half-made composition. The preset's widget must be published. The managed user must be yours and active. A widget that keeps what visitors send (a form, a vote, a rating) declares its tables in its own source (`src/lib/meta/database.json`); they are made for the composition here, in a schema of its own, as the widget was when it was last published. A widget that keeps nothing leaves the composition without tables. If the tables cannot be made just now, or the widget's file cannot be used, the composition is still created (`201`) and `meta.warnings` says why; the tables are made the next time the widget is generated. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one composition is created, not two.
125
+ # @param id [String]
126
+ # @param key [String]
127
+ # @param idempotency_key [String] Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
128
+ # @param create_composition_from_preset_request [CreateCompositionFromPresetRequest]
129
+ # @param [Hash] opts the optional parameters
130
+ # @return [CreateCompositionFromWidget201Response]
131
+ def create_composition_from_preset_0(id, key, idempotency_key, create_composition_from_preset_request, opts = {})
132
+ data, _status_code, _headers = create_composition_from_preset_0_with_http_info(id, key, idempotency_key, create_composition_from_preset_request, opts)
133
+ data
134
+ end
135
+
136
+ # Create a composition from one of your presets in one call
137
+ # Validates the name, optional content, design, embed settings and locale, then creates a draft composition filed under the managed user, built on the preset&#39;s widget, in a single insert. A failure never leaves a half-made composition. The preset&#39;s widget must be published. The managed user must be yours and active. A widget that keeps what visitors send (a form, a vote, a rating) declares its tables in its own source (&#x60;src/lib/meta/database.json&#x60;); they are made for the composition here, in a schema of its own, as the widget was when it was last published. A widget that keeps nothing leaves the composition without tables. If the tables cannot be made just now, or the widget&#39;s file cannot be used, the composition is still created (&#x60;201&#x60;) and &#x60;meta.warnings&#x60; says why; the tables are made the next time the widget is generated. The &#x60;Idempotency-Key&#x60; header is required (&#x60;400&#x60; without it). Send the same key when you retry, so one composition is created, not two.
138
+ # @param id [String]
139
+ # @param key [String]
140
+ # @param idempotency_key [String] Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
141
+ # @param create_composition_from_preset_request [CreateCompositionFromPresetRequest]
142
+ # @param [Hash] opts the optional parameters
143
+ # @return [Array<(CreateCompositionFromWidget201Response, Integer, Hash)>] CreateCompositionFromWidget201Response data, response status code and response headers
144
+ def create_composition_from_preset_0_with_http_info(id, key, idempotency_key, create_composition_from_preset_request, opts = {})
145
+ if @api_client.config.debugging
146
+ @api_client.config.logger.debug 'Calling API: ManagedUsersApi.create_composition_from_preset_0 ...'
147
+ end
148
+ # verify the required parameter 'id' is set
149
+ if @api_client.config.client_side_validation && id.nil?
150
+ fail ArgumentError, "Missing the required parameter 'id' when calling ManagedUsersApi.create_composition_from_preset_0"
151
+ end
152
+ # verify the required parameter 'key' is set
153
+ if @api_client.config.client_side_validation && key.nil?
154
+ fail ArgumentError, "Missing the required parameter 'key' when calling ManagedUsersApi.create_composition_from_preset_0"
155
+ end
156
+ # verify the required parameter 'idempotency_key' is set
157
+ if @api_client.config.client_side_validation && idempotency_key.nil?
158
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling ManagedUsersApi.create_composition_from_preset_0"
159
+ end
160
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
161
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling ManagedUsersApi.create_composition_from_preset_0, the character length must be smaller than or equal to 50.'
162
+ end
163
+
164
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
165
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling ManagedUsersApi.create_composition_from_preset_0, the character length must be great than or equal to 8.'
166
+ end
167
+
168
+ pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
169
+ if @api_client.config.client_side_validation && idempotency_key !~ pattern
170
+ fail ArgumentError, "invalid value for 'idempotency_key' when calling ManagedUsersApi.create_composition_from_preset_0, must conform to the pattern #{pattern}."
171
+ end
172
+
173
+ # verify the required parameter 'create_composition_from_preset_request' is set
174
+ if @api_client.config.client_side_validation && create_composition_from_preset_request.nil?
175
+ fail ArgumentError, "Missing the required parameter 'create_composition_from_preset_request' when calling ManagedUsersApi.create_composition_from_preset_0"
176
+ end
177
+ # resource path
178
+ local_var_path = '/managed-users/{id}/presets/{key}/composition'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
179
+
180
+ # query parameters
181
+ query_params = opts[:query_params] || {}
182
+
183
+ # header parameters
184
+ header_params = opts[:header_params] || {}
185
+ # HTTP header 'Accept' (if needed)
186
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
187
+ # HTTP header 'Content-Type'
188
+ content_type = @api_client.select_header_content_type(['application/json'])
189
+ if !content_type.nil?
190
+ header_params['Content-Type'] = content_type
191
+ end
192
+ header_params[:'Idempotency-Key'] = idempotency_key
193
+
194
+ # form parameters
195
+ form_params = opts[:form_params] || {}
196
+
197
+ # http body (model)
198
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_composition_from_preset_request)
199
+
200
+ # return_type
201
+ return_type = opts[:debug_return_type] || 'CreateCompositionFromWidget201Response'
202
+
203
+ # auth_names
204
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
205
+
206
+ new_options = opts.merge(
207
+ :operation => :"ManagedUsersApi.create_composition_from_preset_0",
208
+ :header_params => header_params,
209
+ :query_params => query_params,
210
+ :form_params => form_params,
211
+ :body => post_body,
212
+ :auth_names => auth_names,
213
+ :return_type => return_type
214
+ )
215
+
216
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
217
+ if @api_client.config.debugging
218
+ @api_client.config.logger.debug "API called: ManagedUsersApi#create_composition_from_preset_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
219
+ end
220
+ return data, status_code, headers
221
+ end
222
+
223
+ # Create Managed User
224
+ # Creates a new managed user for a partner account. The `Idempotency-Key` header is required (`400` without it). Send the same key when you retry, so one managed user is created, not two.
225
+ # @param idempotency_key [String] Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
226
+ # @param new_managed_user [NewManagedUser]
227
+ # @param [Hash] opts the optional parameters
228
+ # @return [ManagedUserResponse]
229
+ def create_managed_user_0(idempotency_key, new_managed_user, opts = {})
230
+ data, _status_code, _headers = create_managed_user_0_with_http_info(idempotency_key, new_managed_user, opts)
231
+ data
232
+ end
233
+
234
+ # Create Managed User
235
+ # Creates a new managed user for a partner account. The &#x60;Idempotency-Key&#x60; header is required (&#x60;400&#x60; without it). Send the same key when you retry, so one managed user is created, not two.
236
+ # @param idempotency_key [String] Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
237
+ # @param new_managed_user [NewManagedUser]
238
+ # @param [Hash] opts the optional parameters
239
+ # @return [Array<(ManagedUserResponse, Integer, Hash)>] ManagedUserResponse data, response status code and response headers
240
+ def create_managed_user_0_with_http_info(idempotency_key, new_managed_user, opts = {})
241
+ if @api_client.config.debugging
242
+ @api_client.config.logger.debug 'Calling API: ManagedUsersApi.create_managed_user_0 ...'
243
+ end
244
+ # verify the required parameter 'idempotency_key' is set
245
+ if @api_client.config.client_side_validation && idempotency_key.nil?
246
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling ManagedUsersApi.create_managed_user_0"
247
+ end
248
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
249
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling ManagedUsersApi.create_managed_user_0, the character length must be smaller than or equal to 50.'
250
+ end
251
+
252
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
253
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling ManagedUsersApi.create_managed_user_0, the character length must be great than or equal to 8.'
254
+ end
255
+
256
+ pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
257
+ if @api_client.config.client_side_validation && idempotency_key !~ pattern
258
+ fail ArgumentError, "invalid value for 'idempotency_key' when calling ManagedUsersApi.create_managed_user_0, must conform to the pattern #{pattern}."
259
+ end
260
+
261
+ # verify the required parameter 'new_managed_user' is set
262
+ if @api_client.config.client_side_validation && new_managed_user.nil?
263
+ fail ArgumentError, "Missing the required parameter 'new_managed_user' when calling ManagedUsersApi.create_managed_user_0"
264
+ end
265
+ # resource path
266
+ local_var_path = '/managed-users'
267
+
268
+ # query parameters
269
+ query_params = opts[:query_params] || {}
270
+
271
+ # header parameters
272
+ header_params = opts[:header_params] || {}
273
+ # HTTP header 'Accept' (if needed)
274
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
275
+ # HTTP header 'Content-Type'
276
+ content_type = @api_client.select_header_content_type(['application/json'])
277
+ if !content_type.nil?
278
+ header_params['Content-Type'] = content_type
279
+ end
280
+ header_params[:'Idempotency-Key'] = idempotency_key
281
+
282
+ # form parameters
283
+ form_params = opts[:form_params] || {}
284
+
285
+ # http body (model)
286
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(new_managed_user)
287
+
288
+ # return_type
289
+ return_type = opts[:debug_return_type] || 'ManagedUserResponse'
290
+
291
+ # auth_names
292
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
293
+
294
+ new_options = opts.merge(
295
+ :operation => :"ManagedUsersApi.create_managed_user_0",
296
+ :header_params => header_params,
297
+ :query_params => query_params,
298
+ :form_params => form_params,
299
+ :body => post_body,
300
+ :auth_names => auth_names,
301
+ :return_type => return_type
302
+ )
303
+
304
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
305
+ if @api_client.config.debugging
306
+ @api_client.config.logger.debug "API called: ManagedUsersApi#create_managed_user_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
307
+ end
308
+ return data, status_code, headers
309
+ end
310
+
311
+ # Create an editor session for a managed user
312
+ # Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic's editor pieces, such as the File Browser and the composition editor, without your API key ever reaching that browser. Call this from your server when the page that hosts the editor opens, and hand the `token` in the answer to that page. The token is shown once. It starts with `wgt_ses_` and the browser sends it as `Authorization: Bearer <token>`. It can do only what the `surfaces` you name allow, and only for this managed user: - `files`: upload a file (`uploadsPost`) and list the files uploaded for this user (`uploadsGet`). Every file is filed for this user and stored in your own storage destination, never in Widgetic's: a file a customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not optional, so no session, whatever its surfaces, can be made until you have set a destination (`setPartnerStorageDestination`); until then it is refused with 409 and `PARTNER_STORAGE_REQUIRED`, and when the destination cannot be used with 503 and `STORAGE_DESTINATION_UNAVAILABLE`. A destination you remove after the session was made stops its uploads too (the same 409; the browser is only told that the feature is not available right now). To keep a customer from uploading, leave `files` out of the session and hand the editors your own media library instead (`mediaLibrary`). - `editor`: edit one of this user's compositions: read it (`getCompositionById`, its content, design, embed settings and schemas), check a content change (`validateCompositionContent`), and change its name, content, design and embed settings (`updateComposition`, `setDynamicContent`). It can reach only compositions you created for this managed user (tag them with `managedUserId` when you create them); any other composition, including another of your users', answers 404. - `creator`: use Widgetic's widget creator for this user, including its AI. Draw on canvases and save them (`getAllCanvases`, `getCanvas`, `createCanvas`, `updateCanvas`, `previewDeleteCanvas`, `deleteCanvas`); make, change, copy and delete the widgets on them (`createWidget`, `getWidgets`, `getWidgetsBatch`, `updateWidget`, `uploadWidgetThumbnail`, `duplicateWidget`, `deleteWidget`); list and make the compositions of a widget it built (`getAllCompositions`, `createComposition`), which is how it shows the widget with sample values; keep the conversation of each widget (`getConversationsByWidgetId`, `createConversationForWidget`, `updateConversation`, `getMessages`, `createMessage`, `updateMessage`, `restoreCheckpoint`); and read a widget's schemas and give it its repository (`getWidgetContentSchema`, `getWidgetDesignSchema`, `updateWidgetRepository`). The AI that builds a widget is part of it: list the models (`agentModelsGet`), open the widget's repository (`agentRepositoriesPost`, `agentRepositoriesRepoIdGet`), start a generation and follow or cancel it (`agentCodeGeneratePost`, `operationsStreamGet`, `operationsIdGet`, `operationsIdCancelPost`), build and preview the result (`agentWidgetBuilderRepoHeadWidgetIdGet`, `buildWidgetFromRepo`, `previewWidgetVersion`), publish a version of the widget and move between its versions (`agentWidgetBuilderPublishWidgetIdPost`, `getWidgetPublishHistory`, `setWidgetPublishHistoryLive`, `renameWidgetPublishHistoryTitle`), and turn a stroke or a sentence into a decision (`agentShapeRecognizePost`, `agentDesignResolvePost`). It can also offer the customer your presets as starting points: read them and ask for a copy for this customer (`listMyPresets`, `copyMyPreset`; you choose the presets with `setPartnerPreset`). What the session makes is filed for this managed user, and the lists it reads hold only this user's canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories, uploaded files and operations made for this managed user (tag the canvases and widgets you create with `managedUserId`); any other canvas, widget, composition, conversation, message, repository, file or operation, including another of your users', answers 404. The creator also saves the composition it is editing (`updateComposition`, from the `editor` surface) and attaches pictures to its chat (`uploadsPost`, from the `files` surface), and the surfaces do not imply one another: to open the whole creator for a user, ask for `creator`, `editor` and `files` together. A generation or a build one user starts can be followed and cancelled by that user and by you, never by another of your users. The AI is paid for by your account, as your own calls are: its credits and allowances are yours. A session cannot make a widget public (publishing a version does not), file one under a project or an organization, or set anything the creator does not set: a body with another field is refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`. Everything else is refused with 403 and `EDITOR_SESSION_ROUTE_NOT_ALLOWED`: a session cannot read your account, make more sessions, change your presets or delete a composition, and a session without the `creator` surface cannot create or list compositions. Create the composition yourself with your API key, then open the editor on it. A session ends at `expiresAt` (at most four hours), when you end it (`revokeManagedUserEditorSession`), or when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at once (`429 EDITOR_SESSION_LIMIT_REACHED`). A session that is bound to a web page (`allowedOrigin`) is refused from any other origin. The AI the session runs is paid for with your credits. Set `maxCredits` to hold the session to a number of them: once its generations have taken that many (a generation that fails is refunded and does not count), the next one is refused with 402 and `EDITOR_SESSION_CREDIT_LIMIT_REACHED`, and the browser is told only that the feature is not available right now. Without it, the limit Widgetic has set for your account applies when it has set one (the same limit for every session you make, and `maxCredits: null` asks for none), and otherwise the credits of your account are the only ceiling. What each of your users' sessions has spent is in `getManagedUserUsage`. Each call makes a new session. It does not take an `Idempotency-Key`: the answer holds the token, and the token is never stored where a retry could read it back. The answer is sent with `Cache-Control: no-store`.
313
+ # @param id [String] The managed user the session is for (Widgetic&#39;s id for the user)
314
+ # @param new_editor_session [NewEditorSession]
315
+ # @param [Hash] opts the optional parameters
316
+ # @return [EditorSessionResponse]
317
+ def create_managed_user_editor_session_0(id, new_editor_session, opts = {})
318
+ data, _status_code, _headers = create_managed_user_editor_session_0_with_http_info(id, new_editor_session, opts)
319
+ data
320
+ end
321
+
322
+ # Create an editor session for a managed user
323
+ # Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic&#39;s editor pieces, such as the File Browser and the composition editor, without your API key ever reaching that browser. Call this from your server when the page that hosts the editor opens, and hand the &#x60;token&#x60; in the answer to that page. The token is shown once. It starts with &#x60;wgt_ses_&#x60; and the browser sends it as &#x60;Authorization: Bearer &lt;token&gt;&#x60;. It can do only what the &#x60;surfaces&#x60; you name allow, and only for this managed user: - &#x60;files&#x60;: upload a file (&#x60;uploadsPost&#x60;) and list the files uploaded for this user (&#x60;uploadsGet&#x60;). Every file is filed for this user and stored in your own storage destination, never in Widgetic&#39;s: a file a customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not optional, so no session, whatever its surfaces, can be made until you have set a destination (&#x60;setPartnerStorageDestination&#x60;); until then it is refused with 409 and &#x60;PARTNER_STORAGE_REQUIRED&#x60;, and when the destination cannot be used with 503 and &#x60;STORAGE_DESTINATION_UNAVAILABLE&#x60;. A destination you remove after the session was made stops its uploads too (the same 409; the browser is only told that the feature is not available right now). To keep a customer from uploading, leave &#x60;files&#x60; out of the session and hand the editors your own media library instead (&#x60;mediaLibrary&#x60;). - &#x60;editor&#x60;: edit one of this user&#39;s compositions: read it (&#x60;getCompositionById&#x60;, its content, design, embed settings and schemas), check a content change (&#x60;validateCompositionContent&#x60;), and change its name, content, design and embed settings (&#x60;updateComposition&#x60;, &#x60;setDynamicContent&#x60;). It can reach only compositions you created for this managed user (tag them with &#x60;managedUserId&#x60; when you create them); any other composition, including another of your users&#39;, answers 404. - &#x60;creator&#x60;: use Widgetic&#39;s widget creator for this user, including its AI. Draw on canvases and save them (&#x60;getAllCanvases&#x60;, &#x60;getCanvas&#x60;, &#x60;createCanvas&#x60;, &#x60;updateCanvas&#x60;, &#x60;previewDeleteCanvas&#x60;, &#x60;deleteCanvas&#x60;); make, change, copy and delete the widgets on them (&#x60;createWidget&#x60;, &#x60;getWidgets&#x60;, &#x60;getWidgetsBatch&#x60;, &#x60;updateWidget&#x60;, &#x60;uploadWidgetThumbnail&#x60;, &#x60;duplicateWidget&#x60;, &#x60;deleteWidget&#x60;); list and make the compositions of a widget it built (&#x60;getAllCompositions&#x60;, &#x60;createComposition&#x60;), which is how it shows the widget with sample values; keep the conversation of each widget (&#x60;getConversationsByWidgetId&#x60;, &#x60;createConversationForWidget&#x60;, &#x60;updateConversation&#x60;, &#x60;getMessages&#x60;, &#x60;createMessage&#x60;, &#x60;updateMessage&#x60;, &#x60;restoreCheckpoint&#x60;); and read a widget&#39;s schemas and give it its repository (&#x60;getWidgetContentSchema&#x60;, &#x60;getWidgetDesignSchema&#x60;, &#x60;updateWidgetRepository&#x60;). The AI that builds a widget is part of it: list the models (&#x60;agentModelsGet&#x60;), open the widget&#39;s repository (&#x60;agentRepositoriesPost&#x60;, &#x60;agentRepositoriesRepoIdGet&#x60;), start a generation and follow or cancel it (&#x60;agentCodeGeneratePost&#x60;, &#x60;operationsStreamGet&#x60;, &#x60;operationsIdGet&#x60;, &#x60;operationsIdCancelPost&#x60;), build and preview the result (&#x60;agentWidgetBuilderRepoHeadWidgetIdGet&#x60;, &#x60;buildWidgetFromRepo&#x60;, &#x60;previewWidgetVersion&#x60;), publish a version of the widget and move between its versions (&#x60;agentWidgetBuilderPublishWidgetIdPost&#x60;, &#x60;getWidgetPublishHistory&#x60;, &#x60;setWidgetPublishHistoryLive&#x60;, &#x60;renameWidgetPublishHistoryTitle&#x60;), and turn a stroke or a sentence into a decision (&#x60;agentShapeRecognizePost&#x60;, &#x60;agentDesignResolvePost&#x60;). It can also offer the customer your presets as starting points: read them and ask for a copy for this customer (&#x60;listMyPresets&#x60;, &#x60;copyMyPreset&#x60;; you choose the presets with &#x60;setPartnerPreset&#x60;). What the session makes is filed for this managed user, and the lists it reads hold only this user&#39;s canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories, uploaded files and operations made for this managed user (tag the canvases and widgets you create with &#x60;managedUserId&#x60;); any other canvas, widget, composition, conversation, message, repository, file or operation, including another of your users&#39;, answers 404. The creator also saves the composition it is editing (&#x60;updateComposition&#x60;, from the &#x60;editor&#x60; surface) and attaches pictures to its chat (&#x60;uploadsPost&#x60;, from the &#x60;files&#x60; surface), and the surfaces do not imply one another: to open the whole creator for a user, ask for &#x60;creator&#x60;, &#x60;editor&#x60; and &#x60;files&#x60; together. A generation or a build one user starts can be followed and cancelled by that user and by you, never by another of your users. The AI is paid for by your account, as your own calls are: its credits and allowances are yours. A session cannot make a widget public (publishing a version does not), file one under a project or an organization, or set anything the creator does not set: a body with another field is refused with 403 and &#x60;EDITOR_SESSION_FIELD_NOT_ALLOWED&#x60;. Everything else is refused with 403 and &#x60;EDITOR_SESSION_ROUTE_NOT_ALLOWED&#x60;: a session cannot read your account, make more sessions, change your presets or delete a composition, and a session without the &#x60;creator&#x60; surface cannot create or list compositions. Create the composition yourself with your API key, then open the editor on it. A session ends at &#x60;expiresAt&#x60; (at most four hours), when you end it (&#x60;revokeManagedUserEditorSession&#x60;), or when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at once (&#x60;429 EDITOR_SESSION_LIMIT_REACHED&#x60;). A session that is bound to a web page (&#x60;allowedOrigin&#x60;) is refused from any other origin. The AI the session runs is paid for with your credits. Set &#x60;maxCredits&#x60; to hold the session to a number of them: once its generations have taken that many (a generation that fails is refunded and does not count), the next one is refused with 402 and &#x60;EDITOR_SESSION_CREDIT_LIMIT_REACHED&#x60;, and the browser is told only that the feature is not available right now. Without it, the limit Widgetic has set for your account applies when it has set one (the same limit for every session you make, and &#x60;maxCredits: null&#x60; asks for none), and otherwise the credits of your account are the only ceiling. What each of your users&#39; sessions has spent is in &#x60;getManagedUserUsage&#x60;. Each call makes a new session. It does not take an &#x60;Idempotency-Key&#x60;: the answer holds the token, and the token is never stored where a retry could read it back. The answer is sent with &#x60;Cache-Control: no-store&#x60;.
324
+ # @param id [String] The managed user the session is for (Widgetic&#39;s id for the user)
325
+ # @param new_editor_session [NewEditorSession]
326
+ # @param [Hash] opts the optional parameters
327
+ # @return [Array<(EditorSessionResponse, Integer, Hash)>] EditorSessionResponse data, response status code and response headers
328
+ def create_managed_user_editor_session_0_with_http_info(id, new_editor_session, opts = {})
329
+ if @api_client.config.debugging
330
+ @api_client.config.logger.debug 'Calling API: ManagedUsersApi.create_managed_user_editor_session_0 ...'
331
+ end
332
+ # verify the required parameter 'id' is set
333
+ if @api_client.config.client_side_validation && id.nil?
334
+ fail ArgumentError, "Missing the required parameter 'id' when calling ManagedUsersApi.create_managed_user_editor_session_0"
335
+ end
336
+ # verify the required parameter 'new_editor_session' is set
337
+ if @api_client.config.client_side_validation && new_editor_session.nil?
338
+ fail ArgumentError, "Missing the required parameter 'new_editor_session' when calling ManagedUsersApi.create_managed_user_editor_session_0"
339
+ end
340
+ # resource path
341
+ local_var_path = '/managed-users/{id}/editor-sessions'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
342
+
343
+ # query parameters
344
+ query_params = opts[:query_params] || {}
345
+
346
+ # header parameters
347
+ header_params = opts[:header_params] || {}
348
+ # HTTP header 'Accept' (if needed)
349
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
350
+ # HTTP header 'Content-Type'
351
+ content_type = @api_client.select_header_content_type(['application/json'])
352
+ if !content_type.nil?
353
+ header_params['Content-Type'] = content_type
354
+ end
355
+
356
+ # form parameters
357
+ form_params = opts[:form_params] || {}
358
+
359
+ # http body (model)
360
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(new_editor_session)
361
+
362
+ # return_type
363
+ return_type = opts[:debug_return_type] || 'EditorSessionResponse'
364
+
365
+ # auth_names
366
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
367
+
368
+ new_options = opts.merge(
369
+ :operation => :"ManagedUsersApi.create_managed_user_editor_session_0",
370
+ :header_params => header_params,
371
+ :query_params => query_params,
372
+ :form_params => form_params,
373
+ :body => post_body,
374
+ :auth_names => auth_names,
375
+ :return_type => return_type
376
+ )
377
+
378
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
379
+ if @api_client.config.debugging
380
+ @api_client.config.logger.debug "API called: ManagedUsersApi#create_managed_user_editor_session_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
381
+ end
382
+ return data, status_code, headers
383
+ end
384
+
385
+ # Delete Managed User
386
+ # Deletes a managed user by ID. Its editor sessions end with it. What was filed under it (compositions, widgets, uploads) stays in your account, untagged.
387
+ # @param id [String] ID of the managed user to delete
388
+ # @param [Hash] opts the optional parameters
389
+ # @return [DeleteManagedUser200Response]
390
+ def delete_managed_user_0(id, opts = {})
391
+ data, _status_code, _headers = delete_managed_user_0_with_http_info(id, opts)
392
+ data
393
+ end
394
+
395
+ # Delete Managed User
396
+ # Deletes a managed user by ID. Its editor sessions end with it. What was filed under it (compositions, widgets, uploads) stays in your account, untagged.
397
+ # @param id [String] ID of the managed user to delete
398
+ # @param [Hash] opts the optional parameters
399
+ # @return [Array<(DeleteManagedUser200Response, Integer, Hash)>] DeleteManagedUser200Response data, response status code and response headers
400
+ def delete_managed_user_0_with_http_info(id, opts = {})
401
+ if @api_client.config.debugging
402
+ @api_client.config.logger.debug 'Calling API: ManagedUsersApi.delete_managed_user_0 ...'
403
+ end
404
+ # verify the required parameter 'id' is set
405
+ if @api_client.config.client_side_validation && id.nil?
406
+ fail ArgumentError, "Missing the required parameter 'id' when calling ManagedUsersApi.delete_managed_user_0"
407
+ end
408
+ # resource path
409
+ local_var_path = '/managed-users/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
410
+
411
+ # query parameters
412
+ query_params = opts[:query_params] || {}
413
+
414
+ # header parameters
415
+ header_params = opts[:header_params] || {}
416
+ # HTTP header 'Accept' (if needed)
417
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
418
+
419
+ # form parameters
420
+ form_params = opts[:form_params] || {}
421
+
422
+ # http body (model)
423
+ post_body = opts[:debug_body]
424
+
425
+ # return_type
426
+ return_type = opts[:debug_return_type] || 'DeleteManagedUser200Response'
427
+
428
+ # auth_names
429
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
430
+
431
+ new_options = opts.merge(
432
+ :operation => :"ManagedUsersApi.delete_managed_user_0",
433
+ :header_params => header_params,
434
+ :query_params => query_params,
435
+ :form_params => form_params,
436
+ :body => post_body,
437
+ :auth_names => auth_names,
438
+ :return_type => return_type
439
+ )
440
+
441
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
442
+ if @api_client.config.debugging
443
+ @api_client.config.logger.debug "API called: ManagedUsersApi#delete_managed_user_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
444
+ end
445
+ return data, status_code, headers
446
+ end
447
+
448
+ # Get Managed Users
449
+ # Retrieve the managed users you manage, with pagination support. (Admins see every partner's managed users.)
450
+ # @param [Hash] opts the optional parameters
451
+ # @option opts [Integer] :page Page number for pagination (default to 1)
452
+ # @option opts [Integer] :size Number of items per page (default to 10)
453
+ # @option opts [String] :sort Sort field and direction, &#x60;&lt;field&gt;:&lt;asc|desc&gt;&#x60;. The field is &#x60;createdAt&#x60;, &#x60;updatedAt&#x60; or &#x60;externalId&#x60; (the snake_case spellings &#x60;created_at&#x60;, &#x60;updated_at&#x60; and &#x60;external_id&#x60; work too); &#x60;asc&#x60; or &#x60;desc&#x60; alone sorts by &#x60;createdAt&#x60;. Any other field is a 400. (default to 'createdAt:desc')
454
+ # @return [GetAllManagedUsers200Response]
455
+ def get_all_managed_users_0(opts = {})
456
+ data, _status_code, _headers = get_all_managed_users_0_with_http_info(opts)
457
+ data
458
+ end
459
+
460
+ # Get Managed Users
461
+ # Retrieve the managed users you manage, with pagination support. (Admins see every partner&#39;s managed users.)
462
+ # @param [Hash] opts the optional parameters
463
+ # @option opts [Integer] :page Page number for pagination (default to 1)
464
+ # @option opts [Integer] :size Number of items per page (default to 10)
465
+ # @option opts [String] :sort Sort field and direction, &#x60;&lt;field&gt;:&lt;asc|desc&gt;&#x60;. The field is &#x60;createdAt&#x60;, &#x60;updatedAt&#x60; or &#x60;externalId&#x60; (the snake_case spellings &#x60;created_at&#x60;, &#x60;updated_at&#x60; and &#x60;external_id&#x60; work too); &#x60;asc&#x60; or &#x60;desc&#x60; alone sorts by &#x60;createdAt&#x60;. Any other field is a 400. (default to 'createdAt:desc')
466
+ # @return [Array<(GetAllManagedUsers200Response, Integer, Hash)>] GetAllManagedUsers200Response data, response status code and response headers
467
+ def get_all_managed_users_0_with_http_info(opts = {})
468
+ if @api_client.config.debugging
469
+ @api_client.config.logger.debug 'Calling API: ManagedUsersApi.get_all_managed_users_0 ...'
470
+ end
471
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
472
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ManagedUsersApi.get_all_managed_users_0, must be greater than or equal to 1.'
473
+ end
474
+
475
+ if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
476
+ fail ArgumentError, 'invalid value for "opts[:"size"]" when calling ManagedUsersApi.get_all_managed_users_0, must be smaller than or equal to 100.'
477
+ end
478
+
479
+ if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] < 1
480
+ fail ArgumentError, 'invalid value for "opts[:"size"]" when calling ManagedUsersApi.get_all_managed_users_0, must be greater than or equal to 1.'
481
+ end
482
+
483
+ # resource path
484
+ local_var_path = '/managed-users'
485
+
486
+ # query parameters
487
+ query_params = opts[:query_params] || {}
488
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
489
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
490
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
491
+
492
+ # header parameters
493
+ header_params = opts[:header_params] || {}
494
+ # HTTP header 'Accept' (if needed)
495
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
496
+
497
+ # form parameters
498
+ form_params = opts[:form_params] || {}
499
+
500
+ # http body (model)
501
+ post_body = opts[:debug_body]
502
+
503
+ # return_type
504
+ return_type = opts[:debug_return_type] || 'GetAllManagedUsers200Response'
505
+
506
+ # auth_names
507
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
508
+
509
+ new_options = opts.merge(
510
+ :operation => :"ManagedUsersApi.get_all_managed_users_0",
511
+ :header_params => header_params,
512
+ :query_params => query_params,
513
+ :form_params => form_params,
514
+ :body => post_body,
515
+ :auth_names => auth_names,
516
+ :return_type => return_type
517
+ )
518
+
519
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
520
+ if @api_client.config.debugging
521
+ @api_client.config.logger.debug "API called: ManagedUsersApi#get_all_managed_users_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
522
+ end
523
+ return data, status_code, headers
524
+ end
525
+
526
+ # Get Managed User By ID
527
+ # Retrieves a specific managed user by ID.
528
+ # @param id [String] ID of the managed user to retrieve
529
+ # @param [Hash] opts the optional parameters
530
+ # @return [ManagedUserResponse]
531
+ def get_managed_user_by_id_0(id, opts = {})
532
+ data, _status_code, _headers = get_managed_user_by_id_0_with_http_info(id, opts)
533
+ data
534
+ end
535
+
536
+ # Get Managed User By ID
537
+ # Retrieves a specific managed user by ID.
538
+ # @param id [String] ID of the managed user to retrieve
539
+ # @param [Hash] opts the optional parameters
540
+ # @return [Array<(ManagedUserResponse, Integer, Hash)>] ManagedUserResponse data, response status code and response headers
541
+ def get_managed_user_by_id_0_with_http_info(id, opts = {})
542
+ if @api_client.config.debugging
543
+ @api_client.config.logger.debug 'Calling API: ManagedUsersApi.get_managed_user_by_id_0 ...'
544
+ end
545
+ # verify the required parameter 'id' is set
546
+ if @api_client.config.client_side_validation && id.nil?
547
+ fail ArgumentError, "Missing the required parameter 'id' when calling ManagedUsersApi.get_managed_user_by_id_0"
548
+ end
549
+ # resource path
550
+ local_var_path = '/managed-users/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
551
+
552
+ # query parameters
553
+ query_params = opts[:query_params] || {}
554
+
555
+ # header parameters
556
+ header_params = opts[:header_params] || {}
557
+ # HTTP header 'Accept' (if needed)
558
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
559
+
560
+ # form parameters
561
+ form_params = opts[:form_params] || {}
562
+
563
+ # http body (model)
564
+ post_body = opts[:debug_body]
565
+
566
+ # return_type
567
+ return_type = opts[:debug_return_type] || 'ManagedUserResponse'
568
+
569
+ # auth_names
570
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
571
+
572
+ new_options = opts.merge(
573
+ :operation => :"ManagedUsersApi.get_managed_user_by_id_0",
574
+ :header_params => header_params,
575
+ :query_params => query_params,
576
+ :form_params => form_params,
577
+ :body => post_body,
578
+ :auth_names => auth_names,
579
+ :return_type => return_type
580
+ )
581
+
582
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
583
+ if @api_client.config.debugging
584
+ @api_client.config.logger.debug "API called: ManagedUsersApi#get_managed_user_by_id_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
585
+ end
586
+ return data, status_code, headers
587
+ end
588
+
589
+ # Read design defaults for one managed user
590
+ # @param id [String]
591
+ # @param [Hash] opts the optional parameters
592
+ # @return [GetPartnerDesignDefaults200Response]
593
+ def get_managed_user_design_defaults_0(id, opts = {})
594
+ data, _status_code, _headers = get_managed_user_design_defaults_0_with_http_info(id, opts)
595
+ data
596
+ end
597
+
598
+ # Read design defaults for one managed user
599
+ # @param id [String]
600
+ # @param [Hash] opts the optional parameters
601
+ # @return [Array<(GetPartnerDesignDefaults200Response, Integer, Hash)>] GetPartnerDesignDefaults200Response data, response status code and response headers
602
+ def get_managed_user_design_defaults_0_with_http_info(id, opts = {})
603
+ if @api_client.config.debugging
604
+ @api_client.config.logger.debug 'Calling API: ManagedUsersApi.get_managed_user_design_defaults_0 ...'
605
+ end
606
+ # verify the required parameter 'id' is set
607
+ if @api_client.config.client_side_validation && id.nil?
608
+ fail ArgumentError, "Missing the required parameter 'id' when calling ManagedUsersApi.get_managed_user_design_defaults_0"
609
+ end
610
+ # resource path
611
+ local_var_path = '/managed-users/{id}/design-defaults'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
612
+
613
+ # query parameters
614
+ query_params = opts[:query_params] || {}
615
+
616
+ # header parameters
617
+ header_params = opts[:header_params] || {}
618
+ # HTTP header 'Accept' (if needed)
619
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
620
+
621
+ # form parameters
622
+ form_params = opts[:form_params] || {}
623
+
624
+ # http body (model)
625
+ post_body = opts[:debug_body]
626
+
627
+ # return_type
628
+ return_type = opts[:debug_return_type] || 'GetPartnerDesignDefaults200Response'
629
+
630
+ # auth_names
631
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
632
+
633
+ new_options = opts.merge(
634
+ :operation => :"ManagedUsersApi.get_managed_user_design_defaults_0",
635
+ :header_params => header_params,
636
+ :query_params => query_params,
637
+ :form_params => form_params,
638
+ :body => post_body,
639
+ :auth_names => auth_names,
640
+ :return_type => return_type
641
+ )
642
+
643
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
644
+ if @api_client.config.debugging
645
+ @api_client.config.logger.debug "API called: ManagedUsersApi#get_managed_user_design_defaults_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
646
+ end
647
+ return data, status_code, headers
648
+ end
649
+
650
+ # Read monthly credit cap and usage for one managed user
651
+ # @param id [String]
652
+ # @param [Hash] opts the optional parameters
653
+ # @return [GetManagedUserLimits200Response]
654
+ def get_managed_user_limits_0(id, opts = {})
655
+ data, _status_code, _headers = get_managed_user_limits_0_with_http_info(id, opts)
656
+ data
657
+ end
658
+
659
+ # Read monthly credit cap and usage for one managed user
660
+ # @param id [String]
661
+ # @param [Hash] opts the optional parameters
662
+ # @return [Array<(GetManagedUserLimits200Response, Integer, Hash)>] GetManagedUserLimits200Response data, response status code and response headers
663
+ def get_managed_user_limits_0_with_http_info(id, opts = {})
664
+ if @api_client.config.debugging
665
+ @api_client.config.logger.debug 'Calling API: ManagedUsersApi.get_managed_user_limits_0 ...'
666
+ end
667
+ # verify the required parameter 'id' is set
668
+ if @api_client.config.client_side_validation && id.nil?
669
+ fail ArgumentError, "Missing the required parameter 'id' when calling ManagedUsersApi.get_managed_user_limits_0"
670
+ end
671
+ # resource path
672
+ local_var_path = '/managed-users/{id}/limits'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
673
+
674
+ # query parameters
675
+ query_params = opts[:query_params] || {}
676
+
677
+ # header parameters
678
+ header_params = opts[:header_params] || {}
679
+ # HTTP header 'Accept' (if needed)
680
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
681
+
682
+ # form parameters
683
+ form_params = opts[:form_params] || {}
684
+
685
+ # http body (model)
686
+ post_body = opts[:debug_body]
687
+
688
+ # return_type
689
+ return_type = opts[:debug_return_type] || 'GetManagedUserLimits200Response'
690
+
691
+ # auth_names
692
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
693
+
694
+ new_options = opts.merge(
695
+ :operation => :"ManagedUsersApi.get_managed_user_limits_0",
696
+ :header_params => header_params,
697
+ :query_params => query_params,
698
+ :form_params => form_params,
699
+ :body => post_body,
700
+ :auth_names => auth_names,
701
+ :return_type => return_type
702
+ )
703
+
704
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
705
+ if @api_client.config.debugging
706
+ @api_client.config.logger.debug "API called: ManagedUsersApi#get_managed_user_limits_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
707
+ end
708
+ return data, status_code, headers
709
+ end
710
+
711
+ # Storage used by one managed user's uploads
712
+ # @param id [String]
713
+ # @param [Hash] opts the optional parameters
714
+ # @return [GetManagedUserStorageUsage200Response]
715
+ def get_managed_user_storage_usage_0(id, opts = {})
716
+ data, _status_code, _headers = get_managed_user_storage_usage_0_with_http_info(id, opts)
717
+ data
718
+ end
719
+
720
+ # Storage used by one managed user&#39;s uploads
721
+ # @param id [String]
722
+ # @param [Hash] opts the optional parameters
723
+ # @return [Array<(GetManagedUserStorageUsage200Response, Integer, Hash)>] GetManagedUserStorageUsage200Response data, response status code and response headers
724
+ def get_managed_user_storage_usage_0_with_http_info(id, opts = {})
725
+ if @api_client.config.debugging
726
+ @api_client.config.logger.debug 'Calling API: ManagedUsersApi.get_managed_user_storage_usage_0 ...'
727
+ end
728
+ # verify the required parameter 'id' is set
729
+ if @api_client.config.client_side_validation && id.nil?
730
+ fail ArgumentError, "Missing the required parameter 'id' when calling ManagedUsersApi.get_managed_user_storage_usage_0"
731
+ end
732
+ # resource path
733
+ local_var_path = '/managed-users/{id}/storage-usage'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
734
+
735
+ # query parameters
736
+ query_params = opts[:query_params] || {}
737
+
738
+ # header parameters
739
+ header_params = opts[:header_params] || {}
740
+ # HTTP header 'Accept' (if needed)
741
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
742
+
743
+ # form parameters
744
+ form_params = opts[:form_params] || {}
745
+
746
+ # http body (model)
747
+ post_body = opts[:debug_body]
748
+
749
+ # return_type
750
+ return_type = opts[:debug_return_type] || 'GetManagedUserStorageUsage200Response'
751
+
752
+ # auth_names
753
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
754
+
755
+ new_options = opts.merge(
756
+ :operation => :"ManagedUsersApi.get_managed_user_storage_usage_0",
757
+ :header_params => header_params,
758
+ :query_params => query_params,
759
+ :form_params => form_params,
760
+ :body => post_body,
761
+ :auth_names => auth_names,
762
+ :return_type => return_type
763
+ )
764
+
765
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
766
+ if @api_client.config.debugging
767
+ @api_client.config.logger.debug "API called: ManagedUsersApi#get_managed_user_storage_usage_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
768
+ end
769
+ return data, status_code, headers
770
+ end
771
+
772
+ # What a managed user's editor sessions spent
773
+ # Says how many credits the editor sessions of one of your managed users took from your account over a period, in total and for each operation. A generation costs one credit, taken from your account when it starts; one that fails is refunded and is counted as refunded, not as spent. Only what was spent through editor sessions is here, and only since usage was first recorded: what you spend with your API key, and anything from before, is not. Use it to see which of your users spend the most, or to charge them for it. To hold one session to a number of credits, set `max_credits` when you make it (`createManagedUserEditorSession`). The period runs from `startDate` (included) to `endDate` (not included): the 30 days before now when you give neither, and at most 366 days. A date without a time is midnight UTC at the start of that day, so for all of October give `startDate=2026-10-01` and `endDate=2026-11-01`.
774
+ # @param id [String] The managed user whose usage you want (Widgetic&#39;s id for the user)
775
+ # @param [Hash] opts the optional parameters
776
+ # @option opts [String] :start_date Start of the period, included: an ISO 8601 date (&#x60;2026-10-01&#x60;) or date-time with its offset (&#x60;2026-10-01T08:00:00Z&#x60;). Default: 30 days before &#x60;endDate&#x60;.
777
+ # @option opts [String] :end_date End of the period, not included, in the same forms. Default: now. It must be after &#x60;startDate&#x60;, by at most 366 days.
778
+ # @return [ManagedUserUsageResponse]
779
+ def get_managed_user_usage_0(id, opts = {})
780
+ data, _status_code, _headers = get_managed_user_usage_0_with_http_info(id, opts)
781
+ data
782
+ end
783
+
784
+ # What a managed user&#39;s editor sessions spent
785
+ # Says how many credits the editor sessions of one of your managed users took from your account over a period, in total and for each operation. A generation costs one credit, taken from your account when it starts; one that fails is refunded and is counted as refunded, not as spent. Only what was spent through editor sessions is here, and only since usage was first recorded: what you spend with your API key, and anything from before, is not. Use it to see which of your users spend the most, or to charge them for it. To hold one session to a number of credits, set &#x60;max_credits&#x60; when you make it (&#x60;createManagedUserEditorSession&#x60;). The period runs from &#x60;startDate&#x60; (included) to &#x60;endDate&#x60; (not included): the 30 days before now when you give neither, and at most 366 days. A date without a time is midnight UTC at the start of that day, so for all of October give &#x60;startDate&#x3D;2026-10-01&#x60; and &#x60;endDate&#x3D;2026-11-01&#x60;.
786
+ # @param id [String] The managed user whose usage you want (Widgetic&#39;s id for the user)
787
+ # @param [Hash] opts the optional parameters
788
+ # @option opts [String] :start_date Start of the period, included: an ISO 8601 date (&#x60;2026-10-01&#x60;) or date-time with its offset (&#x60;2026-10-01T08:00:00Z&#x60;). Default: 30 days before &#x60;endDate&#x60;.
789
+ # @option opts [String] :end_date End of the period, not included, in the same forms. Default: now. It must be after &#x60;startDate&#x60;, by at most 366 days.
790
+ # @return [Array<(ManagedUserUsageResponse, Integer, Hash)>] ManagedUserUsageResponse data, response status code and response headers
791
+ def get_managed_user_usage_0_with_http_info(id, opts = {})
792
+ if @api_client.config.debugging
793
+ @api_client.config.logger.debug 'Calling API: ManagedUsersApi.get_managed_user_usage_0 ...'
794
+ end
795
+ # verify the required parameter 'id' is set
796
+ if @api_client.config.client_side_validation && id.nil?
797
+ fail ArgumentError, "Missing the required parameter 'id' when calling ManagedUsersApi.get_managed_user_usage_0"
798
+ end
799
+ # resource path
800
+ local_var_path = '/managed-users/{id}/usage'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
801
+
802
+ # query parameters
803
+ query_params = opts[:query_params] || {}
804
+ query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
805
+ query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
806
+
807
+ # header parameters
808
+ header_params = opts[:header_params] || {}
809
+ # HTTP header 'Accept' (if needed)
810
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
811
+
812
+ # form parameters
813
+ form_params = opts[:form_params] || {}
814
+
815
+ # http body (model)
816
+ post_body = opts[:debug_body]
817
+
818
+ # return_type
819
+ return_type = opts[:debug_return_type] || 'ManagedUserUsageResponse'
820
+
821
+ # auth_names
822
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
823
+
824
+ new_options = opts.merge(
825
+ :operation => :"ManagedUsersApi.get_managed_user_usage_0",
826
+ :header_params => header_params,
827
+ :query_params => query_params,
828
+ :form_params => form_params,
829
+ :body => post_body,
830
+ :auth_names => auth_names,
831
+ :return_type => return_type
832
+ )
833
+
834
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
835
+ if @api_client.config.debugging
836
+ @api_client.config.logger.debug "API called: ManagedUsersApi#get_managed_user_usage_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
837
+ end
838
+ return data, status_code, headers
839
+ end
840
+
841
+ # Get Managed Users By Manager
842
+ # Retrieve managed users for a specific manager with pagination support.
843
+ # @param manager_id [String] ID of the manager
844
+ # @param [Hash] opts the optional parameters
845
+ # @option opts [Integer] :page Page number for pagination (default to 1)
846
+ # @option opts [Integer] :size Number of items per page (default to 10)
847
+ # @option opts [String] :sort Sort field and direction, &#x60;&lt;field&gt;:&lt;asc|desc&gt;&#x60;. The field is &#x60;createdAt&#x60;, &#x60;updatedAt&#x60; or &#x60;externalId&#x60; (the snake_case spellings &#x60;created_at&#x60;, &#x60;updated_at&#x60; and &#x60;external_id&#x60; work too); &#x60;asc&#x60; or &#x60;desc&#x60; alone sorts by &#x60;createdAt&#x60;. Any other field is a 400. (default to 'createdAt:desc')
848
+ # @return [GetManagedUsersByManagerIdResponse]
849
+ def get_managed_users_by_manager_id_0(manager_id, opts = {})
850
+ data, _status_code, _headers = get_managed_users_by_manager_id_0_with_http_info(manager_id, opts)
851
+ data
852
+ end
853
+
854
+ # Get Managed Users By Manager
855
+ # Retrieve managed users for a specific manager with pagination support.
856
+ # @param manager_id [String] ID of the manager
857
+ # @param [Hash] opts the optional parameters
858
+ # @option opts [Integer] :page Page number for pagination (default to 1)
859
+ # @option opts [Integer] :size Number of items per page (default to 10)
860
+ # @option opts [String] :sort Sort field and direction, &#x60;&lt;field&gt;:&lt;asc|desc&gt;&#x60;. The field is &#x60;createdAt&#x60;, &#x60;updatedAt&#x60; or &#x60;externalId&#x60; (the snake_case spellings &#x60;created_at&#x60;, &#x60;updated_at&#x60; and &#x60;external_id&#x60; work too); &#x60;asc&#x60; or &#x60;desc&#x60; alone sorts by &#x60;createdAt&#x60;. Any other field is a 400. (default to 'createdAt:desc')
861
+ # @return [Array<(GetManagedUsersByManagerIdResponse, Integer, Hash)>] GetManagedUsersByManagerIdResponse data, response status code and response headers
862
+ def get_managed_users_by_manager_id_0_with_http_info(manager_id, opts = {})
863
+ if @api_client.config.debugging
864
+ @api_client.config.logger.debug 'Calling API: ManagedUsersApi.get_managed_users_by_manager_id_0 ...'
865
+ end
866
+ # verify the required parameter 'manager_id' is set
867
+ if @api_client.config.client_side_validation && manager_id.nil?
868
+ fail ArgumentError, "Missing the required parameter 'manager_id' when calling ManagedUsersApi.get_managed_users_by_manager_id_0"
869
+ end
870
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
871
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ManagedUsersApi.get_managed_users_by_manager_id_0, must be greater than or equal to 1.'
872
+ end
873
+
874
+ if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
875
+ fail ArgumentError, 'invalid value for "opts[:"size"]" when calling ManagedUsersApi.get_managed_users_by_manager_id_0, must be smaller than or equal to 100.'
876
+ end
877
+
878
+ if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] < 1
879
+ fail ArgumentError, 'invalid value for "opts[:"size"]" when calling ManagedUsersApi.get_managed_users_by_manager_id_0, must be greater than or equal to 1.'
880
+ end
881
+
882
+ # resource path
883
+ local_var_path = '/users/{managerId}/managed-users'.sub('{' + 'managerId' + '}', CGI.escape(manager_id.to_s))
884
+
885
+ # query parameters
886
+ query_params = opts[:query_params] || {}
887
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
888
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
889
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
890
+
891
+ # header parameters
892
+ header_params = opts[:header_params] || {}
893
+ # HTTP header 'Accept' (if needed)
894
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
895
+
896
+ # form parameters
897
+ form_params = opts[:form_params] || {}
898
+
899
+ # http body (model)
900
+ post_body = opts[:debug_body]
901
+
902
+ # return_type
903
+ return_type = opts[:debug_return_type] || 'GetManagedUsersByManagerIdResponse'
904
+
905
+ # auth_names
906
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
907
+
908
+ new_options = opts.merge(
909
+ :operation => :"ManagedUsersApi.get_managed_users_by_manager_id_0",
910
+ :header_params => header_params,
911
+ :query_params => query_params,
912
+ :form_params => form_params,
913
+ :body => post_body,
914
+ :auth_names => auth_names,
915
+ :return_type => return_type
916
+ )
917
+
918
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
919
+ if @api_client.config.debugging
920
+ @api_client.config.logger.debug "API called: ManagedUsersApi#get_managed_users_by_manager_id_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
921
+ end
922
+ return data, status_code, headers
923
+ end
924
+
925
+ # End one editor session of a managed user
926
+ # Ends the session at once: its token stops working on the next request (on another server of ours, within a few seconds). Ending a session that has already ended is fine.
927
+ # @param id [String] The managed user the session is for
928
+ # @param session_id [String] The &#x60;sessionId&#x60; of the session, from &#x60;createManagedUserEditorSession&#x60;
929
+ # @param [Hash] opts the optional parameters
930
+ # @return [DeleteManagedUser200Response]
931
+ def revoke_managed_user_editor_session_0(id, session_id, opts = {})
932
+ data, _status_code, _headers = revoke_managed_user_editor_session_0_with_http_info(id, session_id, opts)
933
+ data
934
+ end
935
+
936
+ # End one editor session of a managed user
937
+ # Ends the session at once: its token stops working on the next request (on another server of ours, within a few seconds). Ending a session that has already ended is fine.
938
+ # @param id [String] The managed user the session is for
939
+ # @param session_id [String] The &#x60;sessionId&#x60; of the session, from &#x60;createManagedUserEditorSession&#x60;
940
+ # @param [Hash] opts the optional parameters
941
+ # @return [Array<(DeleteManagedUser200Response, Integer, Hash)>] DeleteManagedUser200Response data, response status code and response headers
942
+ def revoke_managed_user_editor_session_0_with_http_info(id, session_id, opts = {})
943
+ if @api_client.config.debugging
944
+ @api_client.config.logger.debug 'Calling API: ManagedUsersApi.revoke_managed_user_editor_session_0 ...'
945
+ end
946
+ # verify the required parameter 'id' is set
947
+ if @api_client.config.client_side_validation && id.nil?
948
+ fail ArgumentError, "Missing the required parameter 'id' when calling ManagedUsersApi.revoke_managed_user_editor_session_0"
949
+ end
950
+ # verify the required parameter 'session_id' is set
951
+ if @api_client.config.client_side_validation && session_id.nil?
952
+ fail ArgumentError, "Missing the required parameter 'session_id' when calling ManagedUsersApi.revoke_managed_user_editor_session_0"
953
+ end
954
+ # resource path
955
+ local_var_path = '/managed-users/{id}/editor-sessions/{sessionId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
956
+
957
+ # query parameters
958
+ query_params = opts[:query_params] || {}
959
+
960
+ # header parameters
961
+ header_params = opts[:header_params] || {}
962
+ # HTTP header 'Accept' (if needed)
963
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
964
+
965
+ # form parameters
966
+ form_params = opts[:form_params] || {}
967
+
968
+ # http body (model)
969
+ post_body = opts[:debug_body]
970
+
971
+ # return_type
972
+ return_type = opts[:debug_return_type] || 'DeleteManagedUser200Response'
973
+
974
+ # auth_names
975
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
976
+
977
+ new_options = opts.merge(
978
+ :operation => :"ManagedUsersApi.revoke_managed_user_editor_session_0",
979
+ :header_params => header_params,
980
+ :query_params => query_params,
981
+ :form_params => form_params,
982
+ :body => post_body,
983
+ :auth_names => auth_names,
984
+ :return_type => return_type
985
+ )
986
+
987
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
988
+ if @api_client.config.debugging
989
+ @api_client.config.logger.debug "API called: ManagedUsersApi#revoke_managed_user_editor_session_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
990
+ end
991
+ return data, status_code, headers
992
+ end
993
+
994
+ # End every editor session of a managed user
995
+ # Ends all of the managed user's live editor sessions at once, for example when the user signs out of your platform. Their tokens stop working on the next request (on another server of ours, within a few seconds). It is fine to call it for a user who has none.
996
+ # @param id [String] The managed user whose sessions end
997
+ # @param [Hash] opts the optional parameters
998
+ # @return [RevokeManagedUserEditorSessionsResponse]
999
+ def revoke_managed_user_editor_sessions_0(id, opts = {})
1000
+ data, _status_code, _headers = revoke_managed_user_editor_sessions_0_with_http_info(id, opts)
1001
+ data
1002
+ end
1003
+
1004
+ # End every editor session of a managed user
1005
+ # Ends all of the managed user&#39;s live editor sessions at once, for example when the user signs out of your platform. Their tokens stop working on the next request (on another server of ours, within a few seconds). It is fine to call it for a user who has none.
1006
+ # @param id [String] The managed user whose sessions end
1007
+ # @param [Hash] opts the optional parameters
1008
+ # @return [Array<(RevokeManagedUserEditorSessionsResponse, Integer, Hash)>] RevokeManagedUserEditorSessionsResponse data, response status code and response headers
1009
+ def revoke_managed_user_editor_sessions_0_with_http_info(id, opts = {})
1010
+ if @api_client.config.debugging
1011
+ @api_client.config.logger.debug 'Calling API: ManagedUsersApi.revoke_managed_user_editor_sessions_0 ...'
1012
+ end
1013
+ # verify the required parameter 'id' is set
1014
+ if @api_client.config.client_side_validation && id.nil?
1015
+ fail ArgumentError, "Missing the required parameter 'id' when calling ManagedUsersApi.revoke_managed_user_editor_sessions_0"
1016
+ end
1017
+ # resource path
1018
+ local_var_path = '/managed-users/{id}/editor-sessions'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1019
+
1020
+ # query parameters
1021
+ query_params = opts[:query_params] || {}
1022
+
1023
+ # header parameters
1024
+ header_params = opts[:header_params] || {}
1025
+ # HTTP header 'Accept' (if needed)
1026
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1027
+
1028
+ # form parameters
1029
+ form_params = opts[:form_params] || {}
1030
+
1031
+ # http body (model)
1032
+ post_body = opts[:debug_body]
1033
+
1034
+ # return_type
1035
+ return_type = opts[:debug_return_type] || 'RevokeManagedUserEditorSessionsResponse'
1036
+
1037
+ # auth_names
1038
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
1039
+
1040
+ new_options = opts.merge(
1041
+ :operation => :"ManagedUsersApi.revoke_managed_user_editor_sessions_0",
1042
+ :header_params => header_params,
1043
+ :query_params => query_params,
1044
+ :form_params => form_params,
1045
+ :body => post_body,
1046
+ :auth_names => auth_names,
1047
+ :return_type => return_type
1048
+ )
1049
+
1050
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1051
+ if @api_client.config.debugging
1052
+ @api_client.config.logger.debug "API called: ManagedUsersApi#revoke_managed_user_editor_sessions_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1053
+ end
1054
+ return data, status_code, headers
1055
+ end
1056
+
1057
+ # Set or clear design defaults for one managed user
1058
+ # Send `{ \"design\": { ... } }` to store a JSON object (at most 64 KB, nesting depth 32), or `{ \"design\": null }` to remove the override. New compositions for this customer merge this layer over the partner default and under the request body.
1059
+ # @param id [String]
1060
+ # @param set_partner_design_defaults_request [SetPartnerDesignDefaultsRequest]
1061
+ # @param [Hash] opts the optional parameters
1062
+ # @return [GetPartnerDesignDefaults200Response]
1063
+ def set_managed_user_design_defaults_0(id, set_partner_design_defaults_request, opts = {})
1064
+ data, _status_code, _headers = set_managed_user_design_defaults_0_with_http_info(id, set_partner_design_defaults_request, opts)
1065
+ data
1066
+ end
1067
+
1068
+ # Set or clear design defaults for one managed user
1069
+ # Send &#x60;{ \&quot;design\&quot;: { ... } }&#x60; to store a JSON object (at most 64 KB, nesting depth 32), or &#x60;{ \&quot;design\&quot;: null }&#x60; to remove the override. New compositions for this customer merge this layer over the partner default and under the request body.
1070
+ # @param id [String]
1071
+ # @param set_partner_design_defaults_request [SetPartnerDesignDefaultsRequest]
1072
+ # @param [Hash] opts the optional parameters
1073
+ # @return [Array<(GetPartnerDesignDefaults200Response, Integer, Hash)>] GetPartnerDesignDefaults200Response data, response status code and response headers
1074
+ def set_managed_user_design_defaults_0_with_http_info(id, set_partner_design_defaults_request, opts = {})
1075
+ if @api_client.config.debugging
1076
+ @api_client.config.logger.debug 'Calling API: ManagedUsersApi.set_managed_user_design_defaults_0 ...'
1077
+ end
1078
+ # verify the required parameter 'id' is set
1079
+ if @api_client.config.client_side_validation && id.nil?
1080
+ fail ArgumentError, "Missing the required parameter 'id' when calling ManagedUsersApi.set_managed_user_design_defaults_0"
1081
+ end
1082
+ # verify the required parameter 'set_partner_design_defaults_request' is set
1083
+ if @api_client.config.client_side_validation && set_partner_design_defaults_request.nil?
1084
+ fail ArgumentError, "Missing the required parameter 'set_partner_design_defaults_request' when calling ManagedUsersApi.set_managed_user_design_defaults_0"
1085
+ end
1086
+ # resource path
1087
+ local_var_path = '/managed-users/{id}/design-defaults'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1088
+
1089
+ # query parameters
1090
+ query_params = opts[:query_params] || {}
1091
+
1092
+ # header parameters
1093
+ header_params = opts[:header_params] || {}
1094
+ # HTTP header 'Accept' (if needed)
1095
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1096
+ # HTTP header 'Content-Type'
1097
+ content_type = @api_client.select_header_content_type(['application/json'])
1098
+ if !content_type.nil?
1099
+ header_params['Content-Type'] = content_type
1100
+ end
1101
+
1102
+ # form parameters
1103
+ form_params = opts[:form_params] || {}
1104
+
1105
+ # http body (model)
1106
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(set_partner_design_defaults_request)
1107
+
1108
+ # return_type
1109
+ return_type = opts[:debug_return_type] || 'GetPartnerDesignDefaults200Response'
1110
+
1111
+ # auth_names
1112
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
1113
+
1114
+ new_options = opts.merge(
1115
+ :operation => :"ManagedUsersApi.set_managed_user_design_defaults_0",
1116
+ :header_params => header_params,
1117
+ :query_params => query_params,
1118
+ :form_params => form_params,
1119
+ :body => post_body,
1120
+ :auth_names => auth_names,
1121
+ :return_type => return_type
1122
+ )
1123
+
1124
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1125
+ if @api_client.config.debugging
1126
+ @api_client.config.logger.debug "API called: ManagedUsersApi#set_managed_user_design_defaults_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1127
+ end
1128
+ return data, status_code, headers
1129
+ end
1130
+
1131
+ # Set or clear the monthly credit cap for one managed user
1132
+ # Send monthlyCredits as a whole number from 0 up to 2147483647 to cap what this customer's editor sessions may spend in a UTC calendar month, or null to remove the cap. The cap counts the credits the customer's sessions spent that month (refunded credits do not count) and applies to all of the customer's sessions together, beside any `max_credits` a single session was given. A cap of 0 stops all paid work by this customer until you raise it. The cap starts counting from the first of the month (UTC); a cap set below what was already spent this month stops further work at once.
1133
+ # @param id [String]
1134
+ # @param set_managed_user_limits_request [SetManagedUserLimitsRequest]
1135
+ # @param [Hash] opts the optional parameters
1136
+ # @return [GetManagedUserLimits200Response]
1137
+ def set_managed_user_limits_0(id, set_managed_user_limits_request, opts = {})
1138
+ data, _status_code, _headers = set_managed_user_limits_0_with_http_info(id, set_managed_user_limits_request, opts)
1139
+ data
1140
+ end
1141
+
1142
+ # Set or clear the monthly credit cap for one managed user
1143
+ # Send monthlyCredits as a whole number from 0 up to 2147483647 to cap what this customer&#39;s editor sessions may spend in a UTC calendar month, or null to remove the cap. The cap counts the credits the customer&#39;s sessions spent that month (refunded credits do not count) and applies to all of the customer&#39;s sessions together, beside any &#x60;max_credits&#x60; a single session was given. A cap of 0 stops all paid work by this customer until you raise it. The cap starts counting from the first of the month (UTC); a cap set below what was already spent this month stops further work at once.
1144
+ # @param id [String]
1145
+ # @param set_managed_user_limits_request [SetManagedUserLimitsRequest]
1146
+ # @param [Hash] opts the optional parameters
1147
+ # @return [Array<(GetManagedUserLimits200Response, Integer, Hash)>] GetManagedUserLimits200Response data, response status code and response headers
1148
+ def set_managed_user_limits_0_with_http_info(id, set_managed_user_limits_request, opts = {})
1149
+ if @api_client.config.debugging
1150
+ @api_client.config.logger.debug 'Calling API: ManagedUsersApi.set_managed_user_limits_0 ...'
1151
+ end
1152
+ # verify the required parameter 'id' is set
1153
+ if @api_client.config.client_side_validation && id.nil?
1154
+ fail ArgumentError, "Missing the required parameter 'id' when calling ManagedUsersApi.set_managed_user_limits_0"
1155
+ end
1156
+ # verify the required parameter 'set_managed_user_limits_request' is set
1157
+ if @api_client.config.client_side_validation && set_managed_user_limits_request.nil?
1158
+ fail ArgumentError, "Missing the required parameter 'set_managed_user_limits_request' when calling ManagedUsersApi.set_managed_user_limits_0"
1159
+ end
1160
+ # resource path
1161
+ local_var_path = '/managed-users/{id}/limits'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1162
+
1163
+ # query parameters
1164
+ query_params = opts[:query_params] || {}
1165
+
1166
+ # header parameters
1167
+ header_params = opts[:header_params] || {}
1168
+ # HTTP header 'Accept' (if needed)
1169
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1170
+ # HTTP header 'Content-Type'
1171
+ content_type = @api_client.select_header_content_type(['application/json'])
1172
+ if !content_type.nil?
1173
+ header_params['Content-Type'] = content_type
1174
+ end
1175
+
1176
+ # form parameters
1177
+ form_params = opts[:form_params] || {}
1178
+
1179
+ # http body (model)
1180
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(set_managed_user_limits_request)
1181
+
1182
+ # return_type
1183
+ return_type = opts[:debug_return_type] || 'GetManagedUserLimits200Response'
1184
+
1185
+ # auth_names
1186
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
1187
+
1188
+ new_options = opts.merge(
1189
+ :operation => :"ManagedUsersApi.set_managed_user_limits_0",
1190
+ :header_params => header_params,
1191
+ :query_params => query_params,
1192
+ :form_params => form_params,
1193
+ :body => post_body,
1194
+ :auth_names => auth_names,
1195
+ :return_type => return_type
1196
+ )
1197
+
1198
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1199
+ if @api_client.config.debugging
1200
+ @api_client.config.logger.debug "API called: ManagedUsersApi#set_managed_user_limits_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1201
+ end
1202
+ return data, status_code, headers
1203
+ end
1204
+
1205
+ # Update Managed User
1206
+ # Updates an existing managed user. Only `externalId`, `metadata` and `isActive` can change, and `metadata` is replaced as a whole, so send all of it. `isActive: false` switches the managed user off: what it already has stays, and nothing new can be filed under it until you send `isActive: true`. Switching it off also ends all of its editor sessions, and they do not come back when you switch it on again. The `Idempotency-Key` header is required (`400` without it).
1207
+ # @param id [String] ID of the managed user to update
1208
+ # @param idempotency_key [String] Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
1209
+ # @param update_managed_user [UpdateManagedUser]
1210
+ # @param [Hash] opts the optional parameters
1211
+ # @return [ManagedUserResponse]
1212
+ def update_managed_user_0(id, idempotency_key, update_managed_user, opts = {})
1213
+ data, _status_code, _headers = update_managed_user_0_with_http_info(id, idempotency_key, update_managed_user, opts)
1214
+ data
1215
+ end
1216
+
1217
+ # Update Managed User
1218
+ # Updates an existing managed user. Only &#x60;externalId&#x60;, &#x60;metadata&#x60; and &#x60;isActive&#x60; can change, and &#x60;metadata&#x60; is replaced as a whole, so send all of it. &#x60;isActive: false&#x60; switches the managed user off: what it already has stays, and nothing new can be filed under it until you send &#x60;isActive: true&#x60;. Switching it off also ends all of its editor sessions, and they do not come back when you switch it on again. The &#x60;Idempotency-Key&#x60; header is required (&#x60;400&#x60; without it).
1219
+ # @param id [String] ID of the managed user to update
1220
+ # @param idempotency_key [String] Required: a call without it is refused with &#x60;400&#x60;. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, &#x60;-&#x60; and &#x60;_&#x60;. Send the same key again when you retry (after a timeout, a dropped connection or a &#x60;5xx&#x60;) and the call is carried out once: the retry gets the first answer back, marked &#x60;X-Idempotency-Cached: true&#x60;. The same key with a different body is refused with &#x60;422&#x60;, and a retry that arrives while the first call is still running with &#x60;409&#x60; (see &#x60;Retry-After&#x60;).
1221
+ # @param update_managed_user [UpdateManagedUser]
1222
+ # @param [Hash] opts the optional parameters
1223
+ # @return [Array<(ManagedUserResponse, Integer, Hash)>] ManagedUserResponse data, response status code and response headers
1224
+ def update_managed_user_0_with_http_info(id, idempotency_key, update_managed_user, opts = {})
1225
+ if @api_client.config.debugging
1226
+ @api_client.config.logger.debug 'Calling API: ManagedUsersApi.update_managed_user_0 ...'
1227
+ end
1228
+ # verify the required parameter 'id' is set
1229
+ if @api_client.config.client_side_validation && id.nil?
1230
+ fail ArgumentError, "Missing the required parameter 'id' when calling ManagedUsersApi.update_managed_user_0"
1231
+ end
1232
+ # verify the required parameter 'idempotency_key' is set
1233
+ if @api_client.config.client_side_validation && idempotency_key.nil?
1234
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling ManagedUsersApi.update_managed_user_0"
1235
+ end
1236
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
1237
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling ManagedUsersApi.update_managed_user_0, the character length must be smaller than or equal to 50.'
1238
+ end
1239
+
1240
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
1241
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling ManagedUsersApi.update_managed_user_0, the character length must be great than or equal to 8.'
1242
+ end
1243
+
1244
+ pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
1245
+ if @api_client.config.client_side_validation && idempotency_key !~ pattern
1246
+ fail ArgumentError, "invalid value for 'idempotency_key' when calling ManagedUsersApi.update_managed_user_0, must conform to the pattern #{pattern}."
1247
+ end
1248
+
1249
+ # verify the required parameter 'update_managed_user' is set
1250
+ if @api_client.config.client_side_validation && update_managed_user.nil?
1251
+ fail ArgumentError, "Missing the required parameter 'update_managed_user' when calling ManagedUsersApi.update_managed_user_0"
1252
+ end
1253
+ # resource path
1254
+ local_var_path = '/managed-users/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1255
+
1256
+ # query parameters
1257
+ query_params = opts[:query_params] || {}
1258
+
1259
+ # header parameters
1260
+ header_params = opts[:header_params] || {}
1261
+ # HTTP header 'Accept' (if needed)
1262
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1263
+ # HTTP header 'Content-Type'
1264
+ content_type = @api_client.select_header_content_type(['application/json'])
1265
+ if !content_type.nil?
1266
+ header_params['Content-Type'] = content_type
1267
+ end
1268
+ header_params[:'Idempotency-Key'] = idempotency_key
1269
+
1270
+ # form parameters
1271
+ form_params = opts[:form_params] || {}
1272
+
1273
+ # http body (model)
1274
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_managed_user)
1275
+
1276
+ # return_type
1277
+ return_type = opts[:debug_return_type] || 'ManagedUserResponse'
1278
+
1279
+ # auth_names
1280
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
1281
+
1282
+ new_options = opts.merge(
1283
+ :operation => :"ManagedUsersApi.update_managed_user_0",
1284
+ :header_params => header_params,
1285
+ :query_params => query_params,
1286
+ :form_params => form_params,
1287
+ :body => post_body,
1288
+ :auth_names => auth_names,
1289
+ :return_type => return_type
1290
+ )
1291
+
1292
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1293
+ if @api_client.config.debugging
1294
+ @api_client.config.logger.debug "API called: ManagedUsersApi#update_managed_user_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1295
+ end
1296
+ return data, status_code, headers
1297
+ end
1298
+ end
1299
+ end