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,2799 @@
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 PartnersApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Buy extra credits for a partner
23
+ # Asks Widgetic for an invoice for extra credits, on top of the credits of the contract. Name the dollars; the invoice is for the most whole credits they buy at the **list price** of a credit (the price a contract may lower belongs to the contract), so it is never for more than you asked: 12.34 buys 123 credits and the invoice says 12.30. The smallest purchase is 10 dollars and one request buys at most 100000 (ask Widgetic for an invoice for more). Pay the invoice with the link in the answer. When it is paid the credits are added **once, for good**, to the account of the person who administers the partner, which is the account everything the partner builds is charged to (`getPartnerCreditBalance` shows it). Extra credits **do not expire**, unlike the credits of a contract period, which end with it. Nothing is added before the invoice is paid, and an unpaid invoice for extra credits never stops the partner: only an unpaid invoice of the contract does (`payment_arrears`). Allowed whatever the partner's standing: a partner that has run out of credits, or is stopped for an unpaid contract invoice, can still buy. No contract is needed. An `Idempotency-Key` is required, and it is what makes a retry safe: the same key with the same body returns the invoice already issued, the same key with a different body is refused with 422, and a duplicate that arrives while the first is still running is refused with 409. Use one key per purchase you mean to make, and a new key for the next one. At most 10 requests an hour. Who may ask: the person who administers the partner, or a Widgetic administrator. A key limited to scopes needs `billing:write`.
24
+ # @param partner_id [String] Partner ID
25
+ # @param idempotency_key [String] A key of your own for this purchase, so that a retry cannot make a second invoice
26
+ # @param request_extra_credits [RequestExtraCredits]
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [PartnerExtraCreditsInvoiceResponse]
29
+ def create_partner_extra_credits_invoice_0(partner_id, idempotency_key, request_extra_credits, opts = {})
30
+ data, _status_code, _headers = create_partner_extra_credits_invoice_0_with_http_info(partner_id, idempotency_key, request_extra_credits, opts)
31
+ data
32
+ end
33
+
34
+ # Buy extra credits for a partner
35
+ # Asks Widgetic for an invoice for extra credits, on top of the credits of the contract. Name the dollars; the invoice is for the most whole credits they buy at the **list price** of a credit (the price a contract may lower belongs to the contract), so it is never for more than you asked: 12.34 buys 123 credits and the invoice says 12.30. The smallest purchase is 10 dollars and one request buys at most 100000 (ask Widgetic for an invoice for more). Pay the invoice with the link in the answer. When it is paid the credits are added **once, for good**, to the account of the person who administers the partner, which is the account everything the partner builds is charged to (`getPartnerCreditBalance` shows it). Extra credits **do not expire**, unlike the credits of a contract period, which end with it. Nothing is added before the invoice is paid, and an unpaid invoice for extra credits never stops the partner: only an unpaid invoice of the contract does (`payment_arrears`). Allowed whatever the partner's standing: a partner that has run out of credits, or is stopped for an unpaid contract invoice, can still buy. No contract is needed. An `Idempotency-Key` is required, and it is what makes a retry safe: the same key with the same body returns the invoice already issued, the same key with a different body is refused with 422, and a duplicate that arrives while the first is still running is refused with 409. Use one key per purchase you mean to make, and a new key for the next one. At most 10 requests an hour. Who may ask: the person who administers the partner, or a Widgetic administrator. A key limited to scopes needs `billing:write`.
36
+ # @param partner_id [String] Partner ID
37
+ # @param idempotency_key [String] A key of your own for this purchase, so that a retry cannot make a second invoice
38
+ # @param request_extra_credits [RequestExtraCredits]
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [Array<(PartnerExtraCreditsInvoiceResponse, Integer, Hash)>] PartnerExtraCreditsInvoiceResponse data, response status code and response headers
41
+ def create_partner_extra_credits_invoice_0_with_http_info(partner_id, idempotency_key, request_extra_credits, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: PartnersApi.create_partner_extra_credits_invoice_0 ...'
44
+ end
45
+ # verify the required parameter 'partner_id' is set
46
+ if @api_client.config.client_side_validation && partner_id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.create_partner_extra_credits_invoice_0"
48
+ end
49
+ # verify the required parameter 'idempotency_key' is set
50
+ if @api_client.config.client_side_validation && idempotency_key.nil?
51
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling PartnersApi.create_partner_extra_credits_invoice_0"
52
+ end
53
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
54
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling PartnersApi.create_partner_extra_credits_invoice_0, the character length must be smaller than or equal to 50.'
55
+ end
56
+
57
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
58
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling PartnersApi.create_partner_extra_credits_invoice_0, the character length must be great than or equal to 8.'
59
+ end
60
+
61
+ pattern = Regexp.new(/^[A-Za-z0-9_-]+$/)
62
+ if @api_client.config.client_side_validation && idempotency_key !~ pattern
63
+ fail ArgumentError, "invalid value for 'idempotency_key' when calling PartnersApi.create_partner_extra_credits_invoice_0, must conform to the pattern #{pattern}."
64
+ end
65
+
66
+ # verify the required parameter 'request_extra_credits' is set
67
+ if @api_client.config.client_side_validation && request_extra_credits.nil?
68
+ fail ArgumentError, "Missing the required parameter 'request_extra_credits' when calling PartnersApi.create_partner_extra_credits_invoice_0"
69
+ end
70
+ # resource path
71
+ local_var_path = '/partners/{partnerId}/credits/extra-invoice'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
72
+
73
+ # query parameters
74
+ query_params = opts[:query_params] || {}
75
+
76
+ # header parameters
77
+ header_params = opts[:header_params] || {}
78
+ # HTTP header 'Accept' (if needed)
79
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
80
+ # HTTP header 'Content-Type'
81
+ content_type = @api_client.select_header_content_type(['application/json'])
82
+ if !content_type.nil?
83
+ header_params['Content-Type'] = content_type
84
+ end
85
+ header_params[:'Idempotency-Key'] = idempotency_key
86
+
87
+ # form parameters
88
+ form_params = opts[:form_params] || {}
89
+
90
+ # http body (model)
91
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_extra_credits)
92
+
93
+ # return_type
94
+ return_type = opts[:debug_return_type] || 'PartnerExtraCreditsInvoiceResponse'
95
+
96
+ # auth_names
97
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
98
+
99
+ new_options = opts.merge(
100
+ :operation => :"PartnersApi.create_partner_extra_credits_invoice_0",
101
+ :header_params => header_params,
102
+ :query_params => query_params,
103
+ :form_params => form_params,
104
+ :body => post_body,
105
+ :auth_names => auth_names,
106
+ :return_type => return_type
107
+ )
108
+
109
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
110
+ if @api_client.config.debugging
111
+ @api_client.config.logger.debug "API called: PartnersApi#create_partner_extra_credits_invoice_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
112
+ end
113
+ return data, status_code, headers
114
+ end
115
+
116
+ # Find the partner you administer
117
+ # Returns the partner (nearly always one) that the signed-in account administers, with the id every other partner route asks for and the standing it is in: `active`, `inactive` (not activated yet), `suspended` (paused, with the reason Widgetic gave) or `payment_arrears` (a contract invoice is past its due date and unpaid, since `overdueSince`; the partner is stopped until it is paid). A partner API key is that account's key, so it reads its own partner here. An account that administers no partner is not refused: it gets `standing: not_a_partner` and an empty list, so a dashboard can tell \"this is not a partner account\" from \"something failed\". The call stays open while the partner is paused, not yet active or in payment arrears: that is when its dashboard has to say why.
118
+ # @param [Hash] opts the optional parameters
119
+ # @return [MyPartnersResponse]
120
+ def get_my_partners_0(opts = {})
121
+ data, _status_code, _headers = get_my_partners_0_with_http_info(opts)
122
+ data
123
+ end
124
+
125
+ # Find the partner you administer
126
+ # Returns the partner (nearly always one) that the signed-in account administers, with the id every other partner route asks for and the standing it is in: &#x60;active&#x60;, &#x60;inactive&#x60; (not activated yet), &#x60;suspended&#x60; (paused, with the reason Widgetic gave) or &#x60;payment_arrears&#x60; (a contract invoice is past its due date and unpaid, since &#x60;overdueSince&#x60;; the partner is stopped until it is paid). A partner API key is that account&#39;s key, so it reads its own partner here. An account that administers no partner is not refused: it gets &#x60;standing: not_a_partner&#x60; and an empty list, so a dashboard can tell \&quot;this is not a partner account\&quot; from \&quot;something failed\&quot;. The call stays open while the partner is paused, not yet active or in payment arrears: that is when its dashboard has to say why.
127
+ # @param [Hash] opts the optional parameters
128
+ # @return [Array<(MyPartnersResponse, Integer, Hash)>] MyPartnersResponse data, response status code and response headers
129
+ def get_my_partners_0_with_http_info(opts = {})
130
+ if @api_client.config.debugging
131
+ @api_client.config.logger.debug 'Calling API: PartnersApi.get_my_partners_0 ...'
132
+ end
133
+ # resource path
134
+ local_var_path = '/partners/mine'
135
+
136
+ # query parameters
137
+ query_params = opts[:query_params] || {}
138
+
139
+ # header parameters
140
+ header_params = opts[:header_params] || {}
141
+ # HTTP header 'Accept' (if needed)
142
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
143
+
144
+ # form parameters
145
+ form_params = opts[:form_params] || {}
146
+
147
+ # http body (model)
148
+ post_body = opts[:debug_body]
149
+
150
+ # return_type
151
+ return_type = opts[:debug_return_type] || 'MyPartnersResponse'
152
+
153
+ # auth_names
154
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
155
+
156
+ new_options = opts.merge(
157
+ :operation => :"PartnersApi.get_my_partners_0",
158
+ :header_params => header_params,
159
+ :query_params => query_params,
160
+ :form_params => form_params,
161
+ :body => post_body,
162
+ :auth_names => auth_names,
163
+ :return_type => return_type
164
+ )
165
+
166
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
167
+ if @api_client.config.debugging
168
+ @api_client.config.logger.debug "API called: PartnersApi#get_my_partners_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
169
+ end
170
+ return data, status_code, headers
171
+ end
172
+
173
+ # See which adapter keys a partner has connected
174
+ # Widget adapters are capabilities a widget can use, and some of them act through a service the account that made the widget has with a provider: an adapter that sends email needs an email provider key, one that sends texts needs an SMS provider key. For the widgets of the customers a partner manages, those keys are the partner's. This lists every key an adapter takes from a partner and whether the partner has connected it. An empty list means no adapter takes a key from a partner at the moment. The list never contains a key: only whether one is connected and when it was last set. Connect a key with `setPartnerAdapterConnection`; take it away with `removePartnerAdapterConnection`. A managed customer never holds a key: the widgets of a managed customer use the partner's, and never the personal key of the person who administers the partner. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
175
+ # @param partner_id [String] The partner whose adapter keys to list
176
+ # @param [Hash] opts the optional parameters
177
+ # @return [GetUserAdapterConnections200Response]
178
+ def get_partner_adapter_connections_0(partner_id, opts = {})
179
+ data, _status_code, _headers = get_partner_adapter_connections_0_with_http_info(partner_id, opts)
180
+ data
181
+ end
182
+
183
+ # See which adapter keys a partner has connected
184
+ # Widget adapters are capabilities a widget can use, and some of them act through a service the account that made the widget has with a provider: an adapter that sends email needs an email provider key, one that sends texts needs an SMS provider key. For the widgets of the customers a partner manages, those keys are the partner&#39;s. This lists every key an adapter takes from a partner and whether the partner has connected it. An empty list means no adapter takes a key from a partner at the moment. The list never contains a key: only whether one is connected and when it was last set. Connect a key with &#x60;setPartnerAdapterConnection&#x60;; take it away with &#x60;removePartnerAdapterConnection&#x60;. A managed customer never holds a key: the widgets of a managed customer use the partner&#39;s, and never the personal key of the person who administers the partner. The caller must be the person who administers the partner (an API key of that account works, with the &#x60;partner:read&#x60; scope), or a Widgetic administrator.
185
+ # @param partner_id [String] The partner whose adapter keys to list
186
+ # @param [Hash] opts the optional parameters
187
+ # @return [Array<(GetUserAdapterConnections200Response, Integer, Hash)>] GetUserAdapterConnections200Response data, response status code and response headers
188
+ def get_partner_adapter_connections_0_with_http_info(partner_id, opts = {})
189
+ if @api_client.config.debugging
190
+ @api_client.config.logger.debug 'Calling API: PartnersApi.get_partner_adapter_connections_0 ...'
191
+ end
192
+ # verify the required parameter 'partner_id' is set
193
+ if @api_client.config.client_side_validation && partner_id.nil?
194
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.get_partner_adapter_connections_0"
195
+ end
196
+ # resource path
197
+ local_var_path = '/partners/{partnerId}/adapter-connections'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
198
+
199
+ # query parameters
200
+ query_params = opts[:query_params] || {}
201
+
202
+ # header parameters
203
+ header_params = opts[:header_params] || {}
204
+ # HTTP header 'Accept' (if needed)
205
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
206
+
207
+ # form parameters
208
+ form_params = opts[:form_params] || {}
209
+
210
+ # http body (model)
211
+ post_body = opts[:debug_body]
212
+
213
+ # return_type
214
+ return_type = opts[:debug_return_type] || 'GetUserAdapterConnections200Response'
215
+
216
+ # auth_names
217
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
218
+
219
+ new_options = opts.merge(
220
+ :operation => :"PartnersApi.get_partner_adapter_connections_0",
221
+ :header_params => header_params,
222
+ :query_params => query_params,
223
+ :form_params => form_params,
224
+ :body => post_body,
225
+ :auth_names => auth_names,
226
+ :return_type => return_type
227
+ )
228
+
229
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
230
+ if @api_client.config.debugging
231
+ @api_client.config.logger.debug "API called: PartnersApi#get_partner_adapter_connections_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
232
+ end
233
+ return data, status_code, headers
234
+ end
235
+
236
+ # What each managed user's widgets did
237
+ # Lists every one of your managed users with what their widgets and compositions did in a period: views, interactions and visitors, and how many widgets and compositions they have made. A managed user whose widgets were not viewed is listed too, with zeros. The most viewed come first, and `page.hasMore` says whether more follow. Only the compositions made for a managed user count for it: file them under the user when you create them (`managedUserId` on `createComposition`), or let the user's editor session do it, which files everything under its user. What a visitor did with a composition that is not filed under anyone is in the summary of the whole account (`getPartnerAnalyticsSummary`) and in no managed user's row. The period works as it does for `getPartnerAnalyticsSummary`. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
238
+ # @param partner_id [String] The partner whose managed users to report on
239
+ # @param [Hash] opts the optional parameters
240
+ # @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. Default 30 days before &#x60;endDate&#x60;.
241
+ # @option opts [String] :end_date End of the period, not included, in the same forms. Default now. At most 366 days after &#x60;startDate&#x60;.
242
+ # @option opts [Integer] :limit How many managed users to list at most (default to 50)
243
+ # @option opts [Integer] :offset How many managed users to skip (default to 0)
244
+ # @return [PartnerAnalyticsByManagedUserResponse]
245
+ def get_partner_analytics_by_managed_user_0(partner_id, opts = {})
246
+ data, _status_code, _headers = get_partner_analytics_by_managed_user_0_with_http_info(partner_id, opts)
247
+ data
248
+ end
249
+
250
+ # What each managed user&#39;s widgets did
251
+ # Lists every one of your managed users with what their widgets and compositions did in a period: views, interactions and visitors, and how many widgets and compositions they have made. A managed user whose widgets were not viewed is listed too, with zeros. The most viewed come first, and &#x60;page.hasMore&#x60; says whether more follow. Only the compositions made for a managed user count for it: file them under the user when you create them (&#x60;managedUserId&#x60; on &#x60;createComposition&#x60;), or let the user&#39;s editor session do it, which files everything under its user. What a visitor did with a composition that is not filed under anyone is in the summary of the whole account (&#x60;getPartnerAnalyticsSummary&#x60;) and in no managed user&#39;s row. The period works as it does for &#x60;getPartnerAnalyticsSummary&#x60;. The caller must be the person who administers the partner (an API key of that account works, with the &#x60;partner:read&#x60; scope), or a Widgetic administrator.
252
+ # @param partner_id [String] The partner whose managed users to report on
253
+ # @param [Hash] opts the optional parameters
254
+ # @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. Default 30 days before &#x60;endDate&#x60;.
255
+ # @option opts [String] :end_date End of the period, not included, in the same forms. Default now. At most 366 days after &#x60;startDate&#x60;.
256
+ # @option opts [Integer] :limit How many managed users to list at most (default to 50)
257
+ # @option opts [Integer] :offset How many managed users to skip (default to 0)
258
+ # @return [Array<(PartnerAnalyticsByManagedUserResponse, Integer, Hash)>] PartnerAnalyticsByManagedUserResponse data, response status code and response headers
259
+ def get_partner_analytics_by_managed_user_0_with_http_info(partner_id, opts = {})
260
+ if @api_client.config.debugging
261
+ @api_client.config.logger.debug 'Calling API: PartnersApi.get_partner_analytics_by_managed_user_0 ...'
262
+ end
263
+ # verify the required parameter 'partner_id' is set
264
+ if @api_client.config.client_side_validation && partner_id.nil?
265
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.get_partner_analytics_by_managed_user_0"
266
+ end
267
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
268
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PartnersApi.get_partner_analytics_by_managed_user_0, must be smaller than or equal to 100.'
269
+ end
270
+
271
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
272
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PartnersApi.get_partner_analytics_by_managed_user_0, must be greater than or equal to 1.'
273
+ end
274
+
275
+ if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] > 100000
276
+ fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling PartnersApi.get_partner_analytics_by_managed_user_0, must be smaller than or equal to 100000.'
277
+ end
278
+
279
+ if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
280
+ fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling PartnersApi.get_partner_analytics_by_managed_user_0, must be greater than or equal to 0.'
281
+ end
282
+
283
+ # resource path
284
+ local_var_path = '/partners/{partnerId}/analytics/managed-users'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
285
+
286
+ # query parameters
287
+ query_params = opts[:query_params] || {}
288
+ query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
289
+ query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
290
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
291
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
292
+
293
+ # header parameters
294
+ header_params = opts[:header_params] || {}
295
+ # HTTP header 'Accept' (if needed)
296
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
297
+
298
+ # form parameters
299
+ form_params = opts[:form_params] || {}
300
+
301
+ # http body (model)
302
+ post_body = opts[:debug_body]
303
+
304
+ # return_type
305
+ return_type = opts[:debug_return_type] || 'PartnerAnalyticsByManagedUserResponse'
306
+
307
+ # auth_names
308
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
309
+
310
+ new_options = opts.merge(
311
+ :operation => :"PartnersApi.get_partner_analytics_by_managed_user_0",
312
+ :header_params => header_params,
313
+ :query_params => query_params,
314
+ :form_params => form_params,
315
+ :body => post_body,
316
+ :auth_names => auth_names,
317
+ :return_type => return_type
318
+ )
319
+
320
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
321
+ if @api_client.config.debugging
322
+ @api_client.config.logger.debug "API called: PartnersApi#get_partner_analytics_by_managed_user_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
323
+ end
324
+ return data, status_code, headers
325
+ end
326
+
327
+ # What was done with a partner's published widgets
328
+ # Counts what the visitors of the compositions made through your account did in a period: how many times a composition was **viewed**, how many times a visitor **interacted** with one, and how many different visitors there were. It covers every composition of your account, your own and the ones made for your managed users; narrow it to one managed user with `managedUserId` or `managedUserExternalId` (not both). The numbers come from the events the embedded widgets send while they are shown (the Widgetic embed SDK sends them by itself), counted when you ask. Only views and interactions are counted; the events that describe a visit (its start, its end, the device and the referrer) are not. 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`. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
329
+ # @param partner_id [String] The partner whose widgets to report on
330
+ # @param [Hash] opts the optional parameters
331
+ # @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;.
332
+ # @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.
333
+ # @option opts [String] :managed_user_id Report only on this managed user (Widgetic&#39;s id for the user). Send this or &#x60;managedUserExternalId&#x60;, not both.
334
+ # @option opts [String] :managed_user_external_id Report only on the managed user you registered with this &#x60;externalId&#x60; (your own identifier for the user). Send this or &#x60;managedUserId&#x60;, not both.
335
+ # @return [PartnerAnalyticsSummaryResponse]
336
+ def get_partner_analytics_summary_0(partner_id, opts = {})
337
+ data, _status_code, _headers = get_partner_analytics_summary_0_with_http_info(partner_id, opts)
338
+ data
339
+ end
340
+
341
+ # What was done with a partner&#39;s published widgets
342
+ # Counts what the visitors of the compositions made through your account did in a period: how many times a composition was **viewed**, how many times a visitor **interacted** with one, and how many different visitors there were. It covers every composition of your account, your own and the ones made for your managed users; narrow it to one managed user with &#x60;managedUserId&#x60; or &#x60;managedUserExternalId&#x60; (not both). The numbers come from the events the embedded widgets send while they are shown (the Widgetic embed SDK sends them by itself), counted when you ask. Only views and interactions are counted; the events that describe a visit (its start, its end, the device and the referrer) are not. 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;. The caller must be the person who administers the partner (an API key of that account works, with the &#x60;partner:read&#x60; scope), or a Widgetic administrator.
343
+ # @param partner_id [String] The partner whose widgets to report on
344
+ # @param [Hash] opts the optional parameters
345
+ # @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;.
346
+ # @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.
347
+ # @option opts [String] :managed_user_id Report only on this managed user (Widgetic&#39;s id for the user). Send this or &#x60;managedUserExternalId&#x60;, not both.
348
+ # @option opts [String] :managed_user_external_id Report only on the managed user you registered with this &#x60;externalId&#x60; (your own identifier for the user). Send this or &#x60;managedUserId&#x60;, not both.
349
+ # @return [Array<(PartnerAnalyticsSummaryResponse, Integer, Hash)>] PartnerAnalyticsSummaryResponse data, response status code and response headers
350
+ def get_partner_analytics_summary_0_with_http_info(partner_id, opts = {})
351
+ if @api_client.config.debugging
352
+ @api_client.config.logger.debug 'Calling API: PartnersApi.get_partner_analytics_summary_0 ...'
353
+ end
354
+ # verify the required parameter 'partner_id' is set
355
+ if @api_client.config.client_side_validation && partner_id.nil?
356
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.get_partner_analytics_summary_0"
357
+ end
358
+ if @api_client.config.client_side_validation && !opts[:'managed_user_external_id'].nil? && opts[:'managed_user_external_id'].to_s.length > 255
359
+ fail ArgumentError, 'invalid value for "opts[:"managed_user_external_id"]" when calling PartnersApi.get_partner_analytics_summary_0, the character length must be smaller than or equal to 255.'
360
+ end
361
+
362
+ # resource path
363
+ local_var_path = '/partners/{partnerId}/analytics/summary'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
364
+
365
+ # query parameters
366
+ query_params = opts[:query_params] || {}
367
+ query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
368
+ query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
369
+ query_params[:'managedUserId'] = opts[:'managed_user_id'] if !opts[:'managed_user_id'].nil?
370
+ query_params[:'managedUserExternalId'] = opts[:'managed_user_external_id'] if !opts[:'managed_user_external_id'].nil?
371
+
372
+ # header parameters
373
+ header_params = opts[:header_params] || {}
374
+ # HTTP header 'Accept' (if needed)
375
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
376
+
377
+ # form parameters
378
+ form_params = opts[:form_params] || {}
379
+
380
+ # http body (model)
381
+ post_body = opts[:debug_body]
382
+
383
+ # return_type
384
+ return_type = opts[:debug_return_type] || 'PartnerAnalyticsSummaryResponse'
385
+
386
+ # auth_names
387
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
388
+
389
+ new_options = opts.merge(
390
+ :operation => :"PartnersApi.get_partner_analytics_summary_0",
391
+ :header_params => header_params,
392
+ :query_params => query_params,
393
+ :form_params => form_params,
394
+ :body => post_body,
395
+ :auth_names => auth_names,
396
+ :return_type => return_type
397
+ )
398
+
399
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
400
+ if @api_client.config.debugging
401
+ @api_client.config.logger.debug "API called: PartnersApi#get_partner_analytics_summary_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
402
+ end
403
+ return data, status_code, headers
404
+ end
405
+
406
+ # What was done with a partner's widgets, day by day
407
+ # Counts views, interactions and visitors for each day of a period (UTC days), oldest first, for a chart. Every day of the period is in the list, also one on which nothing happened (all zeros), so the list can be drawn as it is. Narrow it to one managed user with `managedUserId` or `managedUserExternalId` (not both). The period works as it does for `getPartnerAnalyticsSummary`; `startDate` and `endDate` are best given as dates, so that the first and the last day are whole days. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
408
+ # @param partner_id [String] The partner whose widgets to report on
409
+ # @param [Hash] opts the optional parameters
410
+ # @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. Default 30 days before &#x60;endDate&#x60;.
411
+ # @option opts [String] :end_date End of the period, not included, in the same forms. Default now. At most 366 days after &#x60;startDate&#x60;.
412
+ # @option opts [String] :managed_user_id Report only on this managed user (Widgetic&#39;s id for the user). Send this or &#x60;managedUserExternalId&#x60;, not both.
413
+ # @option opts [String] :managed_user_external_id Report only on the managed user you registered with this &#x60;externalId&#x60;. Send this or &#x60;managedUserId&#x60;, not both.
414
+ # @return [PartnerAnalyticsTimelineResponse]
415
+ def get_partner_analytics_timeline_0(partner_id, opts = {})
416
+ data, _status_code, _headers = get_partner_analytics_timeline_0_with_http_info(partner_id, opts)
417
+ data
418
+ end
419
+
420
+ # What was done with a partner&#39;s widgets, day by day
421
+ # Counts views, interactions and visitors for each day of a period (UTC days), oldest first, for a chart. Every day of the period is in the list, also one on which nothing happened (all zeros), so the list can be drawn as it is. Narrow it to one managed user with &#x60;managedUserId&#x60; or &#x60;managedUserExternalId&#x60; (not both). The period works as it does for &#x60;getPartnerAnalyticsSummary&#x60;; &#x60;startDate&#x60; and &#x60;endDate&#x60; are best given as dates, so that the first and the last day are whole days. The caller must be the person who administers the partner (an API key of that account works, with the &#x60;partner:read&#x60; scope), or a Widgetic administrator.
422
+ # @param partner_id [String] The partner whose widgets to report on
423
+ # @param [Hash] opts the optional parameters
424
+ # @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. Default 30 days before &#x60;endDate&#x60;.
425
+ # @option opts [String] :end_date End of the period, not included, in the same forms. Default now. At most 366 days after &#x60;startDate&#x60;.
426
+ # @option opts [String] :managed_user_id Report only on this managed user (Widgetic&#39;s id for the user). Send this or &#x60;managedUserExternalId&#x60;, not both.
427
+ # @option opts [String] :managed_user_external_id Report only on the managed user you registered with this &#x60;externalId&#x60;. Send this or &#x60;managedUserId&#x60;, not both.
428
+ # @return [Array<(PartnerAnalyticsTimelineResponse, Integer, Hash)>] PartnerAnalyticsTimelineResponse data, response status code and response headers
429
+ def get_partner_analytics_timeline_0_with_http_info(partner_id, opts = {})
430
+ if @api_client.config.debugging
431
+ @api_client.config.logger.debug 'Calling API: PartnersApi.get_partner_analytics_timeline_0 ...'
432
+ end
433
+ # verify the required parameter 'partner_id' is set
434
+ if @api_client.config.client_side_validation && partner_id.nil?
435
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.get_partner_analytics_timeline_0"
436
+ end
437
+ if @api_client.config.client_side_validation && !opts[:'managed_user_external_id'].nil? && opts[:'managed_user_external_id'].to_s.length > 255
438
+ fail ArgumentError, 'invalid value for "opts[:"managed_user_external_id"]" when calling PartnersApi.get_partner_analytics_timeline_0, the character length must be smaller than or equal to 255.'
439
+ end
440
+
441
+ # resource path
442
+ local_var_path = '/partners/{partnerId}/analytics/timeline'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
443
+
444
+ # query parameters
445
+ query_params = opts[:query_params] || {}
446
+ query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
447
+ query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
448
+ query_params[:'managedUserId'] = opts[:'managed_user_id'] if !opts[:'managed_user_id'].nil?
449
+ query_params[:'managedUserExternalId'] = opts[:'managed_user_external_id'] if !opts[:'managed_user_external_id'].nil?
450
+
451
+ # header parameters
452
+ header_params = opts[:header_params] || {}
453
+ # HTTP header 'Accept' (if needed)
454
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
455
+
456
+ # form parameters
457
+ form_params = opts[:form_params] || {}
458
+
459
+ # http body (model)
460
+ post_body = opts[:debug_body]
461
+
462
+ # return_type
463
+ return_type = opts[:debug_return_type] || 'PartnerAnalyticsTimelineResponse'
464
+
465
+ # auth_names
466
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
467
+
468
+ new_options = opts.merge(
469
+ :operation => :"PartnersApi.get_partner_analytics_timeline_0",
470
+ :header_params => header_params,
471
+ :query_params => query_params,
472
+ :form_params => form_params,
473
+ :body => post_body,
474
+ :auth_names => auth_names,
475
+ :return_type => return_type
476
+ )
477
+
478
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
479
+ if @api_client.config.debugging
480
+ @api_client.config.logger.debug "API called: PartnersApi#get_partner_analytics_timeline_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
481
+ end
482
+ return data, status_code, headers
483
+ end
484
+
485
+ # Which widgets were viewed the most
486
+ # Lists the widgets whose compositions were viewed the most in a period, with their views, interactions, visitors and how many of their compositions were viewed. A widget that nobody viewed or used is not listed. The most viewed come first (then the most used), and at most `limit` are listed. Narrow it to one managed user with `managedUserId` or `managedUserExternalId` (not both). The period works as it does for `getPartnerAnalyticsSummary`. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
487
+ # @param partner_id [String] The partner whose widgets to report on
488
+ # @param [Hash] opts the optional parameters
489
+ # @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. Default 30 days before &#x60;endDate&#x60;.
490
+ # @option opts [String] :end_date End of the period, not included, in the same forms. Default now. At most 366 days after &#x60;startDate&#x60;.
491
+ # @option opts [String] :managed_user_id Report only on this managed user (Widgetic&#39;s id for the user). Send this or &#x60;managedUserExternalId&#x60;, not both.
492
+ # @option opts [String] :managed_user_external_id Report only on the managed user you registered with this &#x60;externalId&#x60;. Send this or &#x60;managedUserId&#x60;, not both.
493
+ # @option opts [Integer] :limit How many widgets to list at most (default to 10)
494
+ # @return [PartnerAnalyticsTopWidgetsResponse]
495
+ def get_partner_analytics_top_widgets_0(partner_id, opts = {})
496
+ data, _status_code, _headers = get_partner_analytics_top_widgets_0_with_http_info(partner_id, opts)
497
+ data
498
+ end
499
+
500
+ # Which widgets were viewed the most
501
+ # Lists the widgets whose compositions were viewed the most in a period, with their views, interactions, visitors and how many of their compositions were viewed. A widget that nobody viewed or used is not listed. The most viewed come first (then the most used), and at most &#x60;limit&#x60; are listed. Narrow it to one managed user with &#x60;managedUserId&#x60; or &#x60;managedUserExternalId&#x60; (not both). The period works as it does for &#x60;getPartnerAnalyticsSummary&#x60;. The caller must be the person who administers the partner (an API key of that account works, with the &#x60;partner:read&#x60; scope), or a Widgetic administrator.
502
+ # @param partner_id [String] The partner whose widgets to report on
503
+ # @param [Hash] opts the optional parameters
504
+ # @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. Default 30 days before &#x60;endDate&#x60;.
505
+ # @option opts [String] :end_date End of the period, not included, in the same forms. Default now. At most 366 days after &#x60;startDate&#x60;.
506
+ # @option opts [String] :managed_user_id Report only on this managed user (Widgetic&#39;s id for the user). Send this or &#x60;managedUserExternalId&#x60;, not both.
507
+ # @option opts [String] :managed_user_external_id Report only on the managed user you registered with this &#x60;externalId&#x60;. Send this or &#x60;managedUserId&#x60;, not both.
508
+ # @option opts [Integer] :limit How many widgets to list at most (default to 10)
509
+ # @return [Array<(PartnerAnalyticsTopWidgetsResponse, Integer, Hash)>] PartnerAnalyticsTopWidgetsResponse data, response status code and response headers
510
+ def get_partner_analytics_top_widgets_0_with_http_info(partner_id, opts = {})
511
+ if @api_client.config.debugging
512
+ @api_client.config.logger.debug 'Calling API: PartnersApi.get_partner_analytics_top_widgets_0 ...'
513
+ end
514
+ # verify the required parameter 'partner_id' is set
515
+ if @api_client.config.client_side_validation && partner_id.nil?
516
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.get_partner_analytics_top_widgets_0"
517
+ end
518
+ if @api_client.config.client_side_validation && !opts[:'managed_user_external_id'].nil? && opts[:'managed_user_external_id'].to_s.length > 255
519
+ fail ArgumentError, 'invalid value for "opts[:"managed_user_external_id"]" when calling PartnersApi.get_partner_analytics_top_widgets_0, the character length must be smaller than or equal to 255.'
520
+ end
521
+
522
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50
523
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PartnersApi.get_partner_analytics_top_widgets_0, must be smaller than or equal to 50.'
524
+ end
525
+
526
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
527
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PartnersApi.get_partner_analytics_top_widgets_0, must be greater than or equal to 1.'
528
+ end
529
+
530
+ # resource path
531
+ local_var_path = '/partners/{partnerId}/analytics/top-widgets'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
532
+
533
+ # query parameters
534
+ query_params = opts[:query_params] || {}
535
+ query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
536
+ query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
537
+ query_params[:'managedUserId'] = opts[:'managed_user_id'] if !opts[:'managed_user_id'].nil?
538
+ query_params[:'managedUserExternalId'] = opts[:'managed_user_external_id'] if !opts[:'managed_user_external_id'].nil?
539
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
540
+
541
+ # header parameters
542
+ header_params = opts[:header_params] || {}
543
+ # HTTP header 'Accept' (if needed)
544
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
545
+
546
+ # form parameters
547
+ form_params = opts[:form_params] || {}
548
+
549
+ # http body (model)
550
+ post_body = opts[:debug_body]
551
+
552
+ # return_type
553
+ return_type = opts[:debug_return_type] || 'PartnerAnalyticsTopWidgetsResponse'
554
+
555
+ # auth_names
556
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
557
+
558
+ new_options = opts.merge(
559
+ :operation => :"PartnersApi.get_partner_analytics_top_widgets_0",
560
+ :header_params => header_params,
561
+ :query_params => query_params,
562
+ :form_params => form_params,
563
+ :body => post_body,
564
+ :auth_names => auth_names,
565
+ :return_type => return_type
566
+ )
567
+
568
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
569
+ if @api_client.config.debugging
570
+ @api_client.config.logger.debug "API called: PartnersApi#get_partner_analytics_top_widgets_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
571
+ end
572
+ return data, status_code, headers
573
+ end
574
+
575
+ # Get comprehensive partner billing overview
576
+ # Retrieves the partner's credits (`operationalCredits`), the partner's contract terms (`partnerCustomization`, the same fields as `getPartnerContract`) and billing integration status. Internal negotiation notes are not part of it. `operationalCredits` is the one account a partner has for its credits: the account of the person who administers it. It holds `balance` (the same balance `getPartnerCreditBalance` reads), `reservedBalance`, `availableBalance` (what a new operation can use) and `recentTransactions` (the ten newest entries of the ledger `getPartnerCreditTransactions` lists). A partner with no administrator has no account, and reads 0 and an empty list.
577
+ # @param partner_id [String] Partner ID
578
+ # @param [Hash] opts the optional parameters
579
+ # @return [GetPartnerBillingOverview200Response]
580
+ def get_partner_billing_overview_0(partner_id, opts = {})
581
+ data, _status_code, _headers = get_partner_billing_overview_0_with_http_info(partner_id, opts)
582
+ data
583
+ end
584
+
585
+ # Get comprehensive partner billing overview
586
+ # Retrieves the partner&#39;s credits (&#x60;operationalCredits&#x60;), the partner&#39;s contract terms (&#x60;partnerCustomization&#x60;, the same fields as &#x60;getPartnerContract&#x60;) and billing integration status. Internal negotiation notes are not part of it. &#x60;operationalCredits&#x60; is the one account a partner has for its credits: the account of the person who administers it. It holds &#x60;balance&#x60; (the same balance &#x60;getPartnerCreditBalance&#x60; reads), &#x60;reservedBalance&#x60;, &#x60;availableBalance&#x60; (what a new operation can use) and &#x60;recentTransactions&#x60; (the ten newest entries of the ledger &#x60;getPartnerCreditTransactions&#x60; lists). A partner with no administrator has no account, and reads 0 and an empty list.
587
+ # @param partner_id [String] Partner ID
588
+ # @param [Hash] opts the optional parameters
589
+ # @return [Array<(GetPartnerBillingOverview200Response, Integer, Hash)>] GetPartnerBillingOverview200Response data, response status code and response headers
590
+ def get_partner_billing_overview_0_with_http_info(partner_id, opts = {})
591
+ if @api_client.config.debugging
592
+ @api_client.config.logger.debug 'Calling API: PartnersApi.get_partner_billing_overview_0 ...'
593
+ end
594
+ # verify the required parameter 'partner_id' is set
595
+ if @api_client.config.client_side_validation && partner_id.nil?
596
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.get_partner_billing_overview_0"
597
+ end
598
+ # resource path
599
+ local_var_path = '/partners/{partnerId}/billing-overview'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
600
+
601
+ # query parameters
602
+ query_params = opts[:query_params] || {}
603
+
604
+ # header parameters
605
+ header_params = opts[:header_params] || {}
606
+ # HTTP header 'Accept' (if needed)
607
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
608
+
609
+ # form parameters
610
+ form_params = opts[:form_params] || {}
611
+
612
+ # http body (model)
613
+ post_body = opts[:debug_body]
614
+
615
+ # return_type
616
+ return_type = opts[:debug_return_type] || 'GetPartnerBillingOverview200Response'
617
+
618
+ # auth_names
619
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
620
+
621
+ new_options = opts.merge(
622
+ :operation => :"PartnersApi.get_partner_billing_overview_0",
623
+ :header_params => header_params,
624
+ :query_params => query_params,
625
+ :form_params => form_params,
626
+ :body => post_body,
627
+ :auth_names => auth_names,
628
+ :return_type => return_type
629
+ )
630
+
631
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
632
+ if @api_client.config.debugging
633
+ @api_client.config.logger.debug "API called: PartnersApi#get_partner_billing_overview_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
634
+ end
635
+ return data, status_code, headers
636
+ end
637
+
638
+ # Get a partner's contract
639
+ # Returns the commercial terms agreed with the partner: price, included credits and storage, billing cycle, commitment, support level, and the dates the contract runs between. A partner reads its own: the caller must be the person who administers the partner (an API key of that account works), and anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can read any partner's. Responds 404 while no contract has been recorded for the partner, which is the case until Widgetic sets its terms.
640
+ # @param partner_id [String] The partner whose contract to read
641
+ # @param [Hash] opts the optional parameters
642
+ # @return [PartnerContractResponse]
643
+ def get_partner_contract_0(partner_id, opts = {})
644
+ data, _status_code, _headers = get_partner_contract_0_with_http_info(partner_id, opts)
645
+ data
646
+ end
647
+
648
+ # Get a partner&#39;s contract
649
+ # Returns the commercial terms agreed with the partner: price, included credits and storage, billing cycle, commitment, support level, and the dates the contract runs between. A partner reads its own: the caller must be the person who administers the partner (an API key of that account works), and anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can read any partner&#39;s. Responds 404 while no contract has been recorded for the partner, which is the case until Widgetic sets its terms.
650
+ # @param partner_id [String] The partner whose contract to read
651
+ # @param [Hash] opts the optional parameters
652
+ # @return [Array<(PartnerContractResponse, Integer, Hash)>] PartnerContractResponse data, response status code and response headers
653
+ def get_partner_contract_0_with_http_info(partner_id, opts = {})
654
+ if @api_client.config.debugging
655
+ @api_client.config.logger.debug 'Calling API: PartnersApi.get_partner_contract_0 ...'
656
+ end
657
+ # verify the required parameter 'partner_id' is set
658
+ if @api_client.config.client_side_validation && partner_id.nil?
659
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.get_partner_contract_0"
660
+ end
661
+ # resource path
662
+ local_var_path = '/partners/{partnerId}/contract'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
663
+
664
+ # query parameters
665
+ query_params = opts[:query_params] || {}
666
+
667
+ # header parameters
668
+ header_params = opts[:header_params] || {}
669
+ # HTTP header 'Accept' (if needed)
670
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
671
+
672
+ # form parameters
673
+ form_params = opts[:form_params] || {}
674
+
675
+ # http body (model)
676
+ post_body = opts[:debug_body]
677
+
678
+ # return_type
679
+ return_type = opts[:debug_return_type] || 'PartnerContractResponse'
680
+
681
+ # auth_names
682
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
683
+
684
+ new_options = opts.merge(
685
+ :operation => :"PartnersApi.get_partner_contract_0",
686
+ :header_params => header_params,
687
+ :query_params => query_params,
688
+ :form_params => form_params,
689
+ :body => post_body,
690
+ :auth_names => auth_names,
691
+ :return_type => return_type
692
+ )
693
+
694
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
695
+ if @api_client.config.debugging
696
+ @api_client.config.logger.debug "API called: PartnersApi#get_partner_contract_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
697
+ end
698
+ return data, status_code, headers
699
+ end
700
+
701
+ # Get partner credit balance
702
+ # Returns the credits the partner has, and how much of that is reserved by operations that are still running. A partner has ONE account for its credits: the account of the person who administers it, the same account its API key acts as. There is nothing else to create or to fund. What its customers' editor sessions and its own API calls spend comes out of that account, and the credits a paid invoice carries are added to it, so this is the same balance `getUserCreditBalance` reads for that person. A partner with no administrator has no account to hold credits, and reads a balance of 0. Access: the person who administers the partner, or a Widgetic administrator.
703
+ # @param partner_id [String] Partner ID
704
+ # @param [Hash] opts the optional parameters
705
+ # @return [AccountCreditBalanceResponse]
706
+ def get_partner_credit_balance_0(partner_id, opts = {})
707
+ data, _status_code, _headers = get_partner_credit_balance_0_with_http_info(partner_id, opts)
708
+ data
709
+ end
710
+
711
+ # Get partner credit balance
712
+ # Returns the credits the partner has, and how much of that is reserved by operations that are still running. A partner has ONE account for its credits: the account of the person who administers it, the same account its API key acts as. There is nothing else to create or to fund. What its customers&#39; editor sessions and its own API calls spend comes out of that account, and the credits a paid invoice carries are added to it, so this is the same balance &#x60;getUserCreditBalance&#x60; reads for that person. A partner with no administrator has no account to hold credits, and reads a balance of 0. Access: the person who administers the partner, or a Widgetic administrator.
713
+ # @param partner_id [String] Partner ID
714
+ # @param [Hash] opts the optional parameters
715
+ # @return [Array<(AccountCreditBalanceResponse, Integer, Hash)>] AccountCreditBalanceResponse data, response status code and response headers
716
+ def get_partner_credit_balance_0_with_http_info(partner_id, opts = {})
717
+ if @api_client.config.debugging
718
+ @api_client.config.logger.debug 'Calling API: PartnersApi.get_partner_credit_balance_0 ...'
719
+ end
720
+ # verify the required parameter 'partner_id' is set
721
+ if @api_client.config.client_side_validation && partner_id.nil?
722
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.get_partner_credit_balance_0"
723
+ end
724
+ # resource path
725
+ local_var_path = '/partners/{partnerId}/credits/balance'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
726
+
727
+ # query parameters
728
+ query_params = opts[:query_params] || {}
729
+
730
+ # header parameters
731
+ header_params = opts[:header_params] || {}
732
+ # HTTP header 'Accept' (if needed)
733
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
734
+
735
+ # form parameters
736
+ form_params = opts[:form_params] || {}
737
+
738
+ # http body (model)
739
+ post_body = opts[:debug_body]
740
+
741
+ # return_type
742
+ return_type = opts[:debug_return_type] || 'AccountCreditBalanceResponse'
743
+
744
+ # auth_names
745
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
746
+
747
+ new_options = opts.merge(
748
+ :operation => :"PartnersApi.get_partner_credit_balance_0",
749
+ :header_params => header_params,
750
+ :query_params => query_params,
751
+ :form_params => form_params,
752
+ :body => post_body,
753
+ :auth_names => auth_names,
754
+ :return_type => return_type
755
+ )
756
+
757
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
758
+ if @api_client.config.debugging
759
+ @api_client.config.logger.debug "API called: PartnersApi#get_partner_credit_balance_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
760
+ end
761
+ return data, status_code, headers
762
+ end
763
+
764
+ # Get partner credit transaction history
765
+ # Lists what happened to the partner's credits, newest first: the entries of the credit ledger of the account of the person who administers it, the one account a partner has for its credits. Every operation that spends credits is a `debit` entry, and the credits an invoice carried arrive as `credit` entries when the invoice is paid, so this is also how the partner's usage is read. It is the same ledger `getUserCreditTransactions` reads for that person. A partner with no administrator has no account, and an empty ledger. The page is always bounded: `limit` defaults to 20 and is capped at 100, `offset` defaults to 0. Access: the person who administers the partner, or a Widgetic administrator.
766
+ # @param partner_id [String] Partner ID
767
+ # @param [Hash] opts the optional parameters
768
+ # @option opts [Integer] :limit Number of transactions to return (default to 20)
769
+ # @option opts [Integer] :offset Number of transactions to skip (default to 0)
770
+ # @option opts [String] :type Only entries of this type, for instance &#x60;debit&#x60; for the credits spent. The types are listed on &#x60;AccountCreditTransaction&#x60;.
771
+ # @return [GetPartnerCreditTransactions200Response]
772
+ def get_partner_credit_transactions_0(partner_id, opts = {})
773
+ data, _status_code, _headers = get_partner_credit_transactions_0_with_http_info(partner_id, opts)
774
+ data
775
+ end
776
+
777
+ # Get partner credit transaction history
778
+ # Lists what happened to the partner&#39;s credits, newest first: the entries of the credit ledger of the account of the person who administers it, the one account a partner has for its credits. Every operation that spends credits is a &#x60;debit&#x60; entry, and the credits an invoice carried arrive as &#x60;credit&#x60; entries when the invoice is paid, so this is also how the partner&#39;s usage is read. It is the same ledger &#x60;getUserCreditTransactions&#x60; reads for that person. A partner with no administrator has no account, and an empty ledger. The page is always bounded: &#x60;limit&#x60; defaults to 20 and is capped at 100, &#x60;offset&#x60; defaults to 0. Access: the person who administers the partner, or a Widgetic administrator.
779
+ # @param partner_id [String] Partner ID
780
+ # @param [Hash] opts the optional parameters
781
+ # @option opts [Integer] :limit Number of transactions to return (default to 20)
782
+ # @option opts [Integer] :offset Number of transactions to skip (default to 0)
783
+ # @option opts [String] :type Only entries of this type, for instance &#x60;debit&#x60; for the credits spent. The types are listed on &#x60;AccountCreditTransaction&#x60;.
784
+ # @return [Array<(GetPartnerCreditTransactions200Response, Integer, Hash)>] GetPartnerCreditTransactions200Response data, response status code and response headers
785
+ def get_partner_credit_transactions_0_with_http_info(partner_id, opts = {})
786
+ if @api_client.config.debugging
787
+ @api_client.config.logger.debug 'Calling API: PartnersApi.get_partner_credit_transactions_0 ...'
788
+ end
789
+ # verify the required parameter 'partner_id' is set
790
+ if @api_client.config.client_side_validation && partner_id.nil?
791
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.get_partner_credit_transactions_0"
792
+ end
793
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
794
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PartnersApi.get_partner_credit_transactions_0, must be smaller than or equal to 100.'
795
+ end
796
+
797
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
798
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PartnersApi.get_partner_credit_transactions_0, must be greater than or equal to 1.'
799
+ end
800
+
801
+ if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
802
+ fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling PartnersApi.get_partner_credit_transactions_0, must be greater than or equal to 0.'
803
+ end
804
+
805
+ # resource path
806
+ local_var_path = '/partners/{partnerId}/credits/transactions'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
807
+
808
+ # query parameters
809
+ query_params = opts[:query_params] || {}
810
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
811
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
812
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
813
+
814
+ # header parameters
815
+ header_params = opts[:header_params] || {}
816
+ # HTTP header 'Accept' (if needed)
817
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
818
+
819
+ # form parameters
820
+ form_params = opts[:form_params] || {}
821
+
822
+ # http body (model)
823
+ post_body = opts[:debug_body]
824
+
825
+ # return_type
826
+ return_type = opts[:debug_return_type] || 'GetPartnerCreditTransactions200Response'
827
+
828
+ # auth_names
829
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
830
+
831
+ new_options = opts.merge(
832
+ :operation => :"PartnersApi.get_partner_credit_transactions_0",
833
+ :header_params => header_params,
834
+ :query_params => query_params,
835
+ :form_params => form_params,
836
+ :body => post_body,
837
+ :auth_names => auth_names,
838
+ :return_type => return_type
839
+ )
840
+
841
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
842
+ if @api_client.config.debugging
843
+ @api_client.config.logger.debug "API called: PartnersApi#get_partner_credit_transactions_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
844
+ end
845
+ return data, status_code, headers
846
+ end
847
+
848
+ # See the Neon database a partner keeps the data of its compositions in
849
+ # Returns the database set with `setPartnerDataDatabase`, without its password: the host, the database and the role, when it last passed the check, and why the latest re-check failed if it did. Responds 404 while the partner has no database of its own, which means the data of its compositions is kept by Widgetic. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
850
+ # @param partner_id [String] The partner whose database to read
851
+ # @param [Hash] opts the optional parameters
852
+ # @return [PartnerDataDatabaseResponse]
853
+ def get_partner_data_database_0(partner_id, opts = {})
854
+ data, _status_code, _headers = get_partner_data_database_0_with_http_info(partner_id, opts)
855
+ data
856
+ end
857
+
858
+ # See the Neon database a partner keeps the data of its compositions in
859
+ # Returns the database set with &#x60;setPartnerDataDatabase&#x60;, without its password: the host, the database and the role, when it last passed the check, and why the latest re-check failed if it did. Responds 404 while the partner has no database of its own, which means the data of its compositions is kept by Widgetic. The caller must be the person who administers the partner (an API key of that account works, with the &#x60;partner:read&#x60; scope), or a Widgetic administrator.
860
+ # @param partner_id [String] The partner whose database to read
861
+ # @param [Hash] opts the optional parameters
862
+ # @return [Array<(PartnerDataDatabaseResponse, Integer, Hash)>] PartnerDataDatabaseResponse data, response status code and response headers
863
+ def get_partner_data_database_0_with_http_info(partner_id, opts = {})
864
+ if @api_client.config.debugging
865
+ @api_client.config.logger.debug 'Calling API: PartnersApi.get_partner_data_database_0 ...'
866
+ end
867
+ # verify the required parameter 'partner_id' is set
868
+ if @api_client.config.client_side_validation && partner_id.nil?
869
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.get_partner_data_database_0"
870
+ end
871
+ # resource path
872
+ local_var_path = '/partners/{partnerId}/data-database'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
873
+
874
+ # query parameters
875
+ query_params = opts[:query_params] || {}
876
+
877
+ # header parameters
878
+ header_params = opts[:header_params] || {}
879
+ # HTTP header 'Accept' (if needed)
880
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
881
+
882
+ # form parameters
883
+ form_params = opts[:form_params] || {}
884
+
885
+ # http body (model)
886
+ post_body = opts[:debug_body]
887
+
888
+ # return_type
889
+ return_type = opts[:debug_return_type] || 'PartnerDataDatabaseResponse'
890
+
891
+ # auth_names
892
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
893
+
894
+ new_options = opts.merge(
895
+ :operation => :"PartnersApi.get_partner_data_database_0",
896
+ :header_params => header_params,
897
+ :query_params => query_params,
898
+ :form_params => form_params,
899
+ :body => post_body,
900
+ :auth_names => auth_names,
901
+ :return_type => return_type
902
+ )
903
+
904
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
905
+ if @api_client.config.debugging
906
+ @api_client.config.logger.debug "API called: PartnersApi#get_partner_data_database_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
907
+ end
908
+ return data, status_code, headers
909
+ end
910
+
911
+ # Read partner-wide design defaults
912
+ # @param partner_id [String]
913
+ # @param [Hash] opts the optional parameters
914
+ # @return [GetPartnerDesignDefaults200Response]
915
+ def get_partner_design_defaults_0(partner_id, opts = {})
916
+ data, _status_code, _headers = get_partner_design_defaults_0_with_http_info(partner_id, opts)
917
+ data
918
+ end
919
+
920
+ # Read partner-wide design defaults
921
+ # @param partner_id [String]
922
+ # @param [Hash] opts the optional parameters
923
+ # @return [Array<(GetPartnerDesignDefaults200Response, Integer, Hash)>] GetPartnerDesignDefaults200Response data, response status code and response headers
924
+ def get_partner_design_defaults_0_with_http_info(partner_id, opts = {})
925
+ if @api_client.config.debugging
926
+ @api_client.config.logger.debug 'Calling API: PartnersApi.get_partner_design_defaults_0 ...'
927
+ end
928
+ # verify the required parameter 'partner_id' is set
929
+ if @api_client.config.client_side_validation && partner_id.nil?
930
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.get_partner_design_defaults_0"
931
+ end
932
+ # resource path
933
+ local_var_path = '/partners/{partnerId}/design-defaults'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
934
+
935
+ # query parameters
936
+ query_params = opts[:query_params] || {}
937
+
938
+ # header parameters
939
+ header_params = opts[:header_params] || {}
940
+ # HTTP header 'Accept' (if needed)
941
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
942
+
943
+ # form parameters
944
+ form_params = opts[:form_params] || {}
945
+
946
+ # http body (model)
947
+ post_body = opts[:debug_body]
948
+
949
+ # return_type
950
+ return_type = opts[:debug_return_type] || 'GetPartnerDesignDefaults200Response'
951
+
952
+ # auth_names
953
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
954
+
955
+ new_options = opts.merge(
956
+ :operation => :"PartnersApi.get_partner_design_defaults_0",
957
+ :header_params => header_params,
958
+ :query_params => query_params,
959
+ :form_params => form_params,
960
+ :body => post_body,
961
+ :auth_names => auth_names,
962
+ :return_type => return_type
963
+ )
964
+
965
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
966
+ if @api_client.config.debugging
967
+ @api_client.config.logger.debug "API called: PartnersApi#get_partner_design_defaults_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
968
+ end
969
+ return data, status_code, headers
970
+ end
971
+
972
+ # See how the context of your embeds is signed
973
+ # Says whether you have a secret to sign the `context` of your embeds with, when it was made, whether the secret it replaced is still accepted, and whether an entry without a valid signature is refused (`required`). The secret itself is never part of the answer: it is shown once, when it is made (`rotatePartnerEntryContextSecret`, which also explains what signing is for and how to sign). Signing covers the entries written through the gateway into the compositions of your managed users and into those of your own account. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
974
+ # @param partner_id [String] The partner whose context signing to read
975
+ # @param [Hash] opts the optional parameters
976
+ # @return [PartnerEntryContextSigningResponse]
977
+ def get_partner_entry_context_signing_0(partner_id, opts = {})
978
+ data, _status_code, _headers = get_partner_entry_context_signing_0_with_http_info(partner_id, opts)
979
+ data
980
+ end
981
+
982
+ # See how the context of your embeds is signed
983
+ # Says whether you have a secret to sign the &#x60;context&#x60; of your embeds with, when it was made, whether the secret it replaced is still accepted, and whether an entry without a valid signature is refused (&#x60;required&#x60;). The secret itself is never part of the answer: it is shown once, when it is made (&#x60;rotatePartnerEntryContextSecret&#x60;, which also explains what signing is for and how to sign). Signing covers the entries written through the gateway into the compositions of your managed users and into those of your own account. The caller must be the person who administers the partner (an API key of that account works, with the &#x60;partner:read&#x60; scope), or a Widgetic administrator.
984
+ # @param partner_id [String] The partner whose context signing to read
985
+ # @param [Hash] opts the optional parameters
986
+ # @return [Array<(PartnerEntryContextSigningResponse, Integer, Hash)>] PartnerEntryContextSigningResponse data, response status code and response headers
987
+ def get_partner_entry_context_signing_0_with_http_info(partner_id, opts = {})
988
+ if @api_client.config.debugging
989
+ @api_client.config.logger.debug 'Calling API: PartnersApi.get_partner_entry_context_signing_0 ...'
990
+ end
991
+ # verify the required parameter 'partner_id' is set
992
+ if @api_client.config.client_side_validation && partner_id.nil?
993
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.get_partner_entry_context_signing_0"
994
+ end
995
+ # resource path
996
+ local_var_path = '/partners/{partnerId}/entry-context-signing'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
997
+
998
+ # query parameters
999
+ query_params = opts[:query_params] || {}
1000
+
1001
+ # header parameters
1002
+ header_params = opts[:header_params] || {}
1003
+ # HTTP header 'Accept' (if needed)
1004
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1005
+
1006
+ # form parameters
1007
+ form_params = opts[:form_params] || {}
1008
+
1009
+ # http body (model)
1010
+ post_body = opts[:debug_body]
1011
+
1012
+ # return_type
1013
+ return_type = opts[:debug_return_type] || 'PartnerEntryContextSigningResponse'
1014
+
1015
+ # auth_names
1016
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
1017
+
1018
+ new_options = opts.merge(
1019
+ :operation => :"PartnersApi.get_partner_entry_context_signing_0",
1020
+ :header_params => header_params,
1021
+ :query_params => query_params,
1022
+ :form_params => form_params,
1023
+ :body => post_body,
1024
+ :auth_names => auth_names,
1025
+ :return_type => return_type
1026
+ )
1027
+
1028
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1029
+ if @api_client.config.debugging
1030
+ @api_client.config.logger.debug "API called: PartnersApi#get_partner_entry_context_signing_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1031
+ end
1032
+ return data, status_code, headers
1033
+ end
1034
+
1035
+ # Where your notifications go
1036
+ # Returns who gets the emails, which events you want by email and by webhook, the address of your webhook, and whether it has a secret to sign with. The secret itself is never returned: it is shown once, when it is made. `events` lists every kind of event there is, for a settings screen. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
1037
+ # @param partner_id [String] The partner whose notification settings to read
1038
+ # @param [Hash] opts the optional parameters
1039
+ # @return [PartnerNotificationSettingsResponse]
1040
+ def get_partner_notification_settings_0(partner_id, opts = {})
1041
+ data, _status_code, _headers = get_partner_notification_settings_0_with_http_info(partner_id, opts)
1042
+ data
1043
+ end
1044
+
1045
+ # Where your notifications go
1046
+ # Returns who gets the emails, which events you want by email and by webhook, the address of your webhook, and whether it has a secret to sign with. The secret itself is never returned: it is shown once, when it is made. &#x60;events&#x60; lists every kind of event there is, for a settings screen. The caller must be the person who administers the partner (an API key of that account works, with the &#x60;partner:read&#x60; scope), or a Widgetic administrator.
1047
+ # @param partner_id [String] The partner whose notification settings to read
1048
+ # @param [Hash] opts the optional parameters
1049
+ # @return [Array<(PartnerNotificationSettingsResponse, Integer, Hash)>] PartnerNotificationSettingsResponse data, response status code and response headers
1050
+ def get_partner_notification_settings_0_with_http_info(partner_id, opts = {})
1051
+ if @api_client.config.debugging
1052
+ @api_client.config.logger.debug 'Calling API: PartnersApi.get_partner_notification_settings_0 ...'
1053
+ end
1054
+ # verify the required parameter 'partner_id' is set
1055
+ if @api_client.config.client_side_validation && partner_id.nil?
1056
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.get_partner_notification_settings_0"
1057
+ end
1058
+ # resource path
1059
+ local_var_path = '/partners/{partnerId}/notifications/settings'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
1060
+
1061
+ # query parameters
1062
+ query_params = opts[:query_params] || {}
1063
+
1064
+ # header parameters
1065
+ header_params = opts[:header_params] || {}
1066
+ # HTTP header 'Accept' (if needed)
1067
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1068
+
1069
+ # form parameters
1070
+ form_params = opts[:form_params] || {}
1071
+
1072
+ # http body (model)
1073
+ post_body = opts[:debug_body]
1074
+
1075
+ # return_type
1076
+ return_type = opts[:debug_return_type] || 'PartnerNotificationSettingsResponse'
1077
+
1078
+ # auth_names
1079
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
1080
+
1081
+ new_options = opts.merge(
1082
+ :operation => :"PartnersApi.get_partner_notification_settings_0",
1083
+ :header_params => header_params,
1084
+ :query_params => query_params,
1085
+ :form_params => form_params,
1086
+ :body => post_body,
1087
+ :auth_names => auth_names,
1088
+ :return_type => return_type
1089
+ )
1090
+
1091
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1092
+ if @api_client.config.debugging
1093
+ @api_client.config.logger.debug "API called: PartnersApi#get_partner_notification_settings_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1094
+ end
1095
+ return data, status_code, headers
1096
+ end
1097
+
1098
+ # Get where a partner's uploaded files are stored
1099
+ # Returns the partner's storage destination without its secret: the endpoint, bucket, folder and public address, the last four characters of the access key id, when the destination last passed the check, and why the latest re-check failed if it did. Responds 404 while the partner has no destination, which means the partner cannot be activated, its uploads are refused, and no editor session is made for its customers until a destination is set. The caller must be the person who administers the partner, or a Widgetic administrator.
1100
+ # @param partner_id [String] The partner whose storage destination to read
1101
+ # @param [Hash] opts the optional parameters
1102
+ # @return [PartnerStorageDestinationResponse]
1103
+ def get_partner_storage_destination_0(partner_id, opts = {})
1104
+ data, _status_code, _headers = get_partner_storage_destination_0_with_http_info(partner_id, opts)
1105
+ data
1106
+ end
1107
+
1108
+ # Get where a partner&#39;s uploaded files are stored
1109
+ # Returns the partner&#39;s storage destination without its secret: the endpoint, bucket, folder and public address, the last four characters of the access key id, when the destination last passed the check, and why the latest re-check failed if it did. Responds 404 while the partner has no destination, which means the partner cannot be activated, its uploads are refused, and no editor session is made for its customers until a destination is set. The caller must be the person who administers the partner, or a Widgetic administrator.
1110
+ # @param partner_id [String] The partner whose storage destination to read
1111
+ # @param [Hash] opts the optional parameters
1112
+ # @return [Array<(PartnerStorageDestinationResponse, Integer, Hash)>] PartnerStorageDestinationResponse data, response status code and response headers
1113
+ def get_partner_storage_destination_0_with_http_info(partner_id, opts = {})
1114
+ if @api_client.config.debugging
1115
+ @api_client.config.logger.debug 'Calling API: PartnersApi.get_partner_storage_destination_0 ...'
1116
+ end
1117
+ # verify the required parameter 'partner_id' is set
1118
+ if @api_client.config.client_side_validation && partner_id.nil?
1119
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.get_partner_storage_destination_0"
1120
+ end
1121
+ # resource path
1122
+ local_var_path = '/partners/{partnerId}/storage'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
1123
+
1124
+ # query parameters
1125
+ query_params = opts[:query_params] || {}
1126
+
1127
+ # header parameters
1128
+ header_params = opts[:header_params] || {}
1129
+ # HTTP header 'Accept' (if needed)
1130
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1131
+
1132
+ # form parameters
1133
+ form_params = opts[:form_params] || {}
1134
+
1135
+ # http body (model)
1136
+ post_body = opts[:debug_body]
1137
+
1138
+ # return_type
1139
+ return_type = opts[:debug_return_type] || 'PartnerStorageDestinationResponse'
1140
+
1141
+ # auth_names
1142
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
1143
+
1144
+ new_options = opts.merge(
1145
+ :operation => :"PartnersApi.get_partner_storage_destination_0",
1146
+ :header_params => header_params,
1147
+ :query_params => query_params,
1148
+ :form_params => form_params,
1149
+ :body => post_body,
1150
+ :auth_names => auth_names,
1151
+ :return_type => return_type
1152
+ )
1153
+
1154
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1155
+ if @api_client.config.debugging
1156
+ @api_client.config.logger.debug "API called: PartnersApi#get_partner_storage_destination_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1157
+ end
1158
+ return data, status_code, headers
1159
+ end
1160
+
1161
+ # What a partner's customers store
1162
+ # Says how many files, and how many bytes, your account keeps, in total and for each of your managed users, and how much of it is in Widgetic's storage and how much in your own storage destination (`setPartnerStorageDestination`). Use it to see which customers store the most, or to charge them for it. A file is counted for a managed user when it was filed under that user: by naming `managed_user_id` or `managed_user_external_id` when you upload it (`uploadsPost`, or the metadata of a resumable upload), or because it was uploaded through that user's editor session, which files everything under its user. The files that are not filed under anyone (your own, and the ones uploaded without naming a managed user) are the row whose `managedUserId` is null. Deleted files are not counted. To list the files of one managed user, use the `managed_user_id` filter of `uploadsGet`. The answer is counted when you ask, so it is always current. The groups are ordered by size, the heaviest first, and `page.hasMore` says whether more follow. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
1163
+ # @param partner_id [String] The partner whose storage to report on
1164
+ # @param [Hash] opts the optional parameters
1165
+ # @option opts [Integer] :limit How many managed users to list at most (default to 50)
1166
+ # @option opts [Integer] :offset How many managed users to skip (default to 0)
1167
+ # @return [PartnerStorageUsageResponse]
1168
+ def get_partner_storage_usage_0(partner_id, opts = {})
1169
+ data, _status_code, _headers = get_partner_storage_usage_0_with_http_info(partner_id, opts)
1170
+ data
1171
+ end
1172
+
1173
+ # What a partner&#39;s customers store
1174
+ # Says how many files, and how many bytes, your account keeps, in total and for each of your managed users, and how much of it is in Widgetic&#39;s storage and how much in your own storage destination (&#x60;setPartnerStorageDestination&#x60;). Use it to see which customers store the most, or to charge them for it. A file is counted for a managed user when it was filed under that user: by naming &#x60;managed_user_id&#x60; or &#x60;managed_user_external_id&#x60; when you upload it (&#x60;uploadsPost&#x60;, or the metadata of a resumable upload), or because it was uploaded through that user&#39;s editor session, which files everything under its user. The files that are not filed under anyone (your own, and the ones uploaded without naming a managed user) are the row whose &#x60;managedUserId&#x60; is null. Deleted files are not counted. To list the files of one managed user, use the &#x60;managed_user_id&#x60; filter of &#x60;uploadsGet&#x60;. The answer is counted when you ask, so it is always current. The groups are ordered by size, the heaviest first, and &#x60;page.hasMore&#x60; says whether more follow. The caller must be the person who administers the partner (an API key of that account works, with the &#x60;partner:read&#x60; scope), or a Widgetic administrator.
1175
+ # @param partner_id [String] The partner whose storage to report on
1176
+ # @param [Hash] opts the optional parameters
1177
+ # @option opts [Integer] :limit How many managed users to list at most (default to 50)
1178
+ # @option opts [Integer] :offset How many managed users to skip (default to 0)
1179
+ # @return [Array<(PartnerStorageUsageResponse, Integer, Hash)>] PartnerStorageUsageResponse data, response status code and response headers
1180
+ def get_partner_storage_usage_0_with_http_info(partner_id, opts = {})
1181
+ if @api_client.config.debugging
1182
+ @api_client.config.logger.debug 'Calling API: PartnersApi.get_partner_storage_usage_0 ...'
1183
+ end
1184
+ # verify the required parameter 'partner_id' is set
1185
+ if @api_client.config.client_side_validation && partner_id.nil?
1186
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.get_partner_storage_usage_0"
1187
+ end
1188
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
1189
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PartnersApi.get_partner_storage_usage_0, must be smaller than or equal to 100.'
1190
+ end
1191
+
1192
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
1193
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PartnersApi.get_partner_storage_usage_0, must be greater than or equal to 1.'
1194
+ end
1195
+
1196
+ if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] > 100000
1197
+ fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling PartnersApi.get_partner_storage_usage_0, must be smaller than or equal to 100000.'
1198
+ end
1199
+
1200
+ if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
1201
+ fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling PartnersApi.get_partner_storage_usage_0, must be greater than or equal to 0.'
1202
+ end
1203
+
1204
+ # resource path
1205
+ local_var_path = '/partners/{partnerId}/storage/usage'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
1206
+
1207
+ # query parameters
1208
+ query_params = opts[:query_params] || {}
1209
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1210
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1211
+
1212
+ # header parameters
1213
+ header_params = opts[:header_params] || {}
1214
+ # HTTP header 'Accept' (if needed)
1215
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1216
+
1217
+ # form parameters
1218
+ form_params = opts[:form_params] || {}
1219
+
1220
+ # http body (model)
1221
+ post_body = opts[:debug_body]
1222
+
1223
+ # return_type
1224
+ return_type = opts[:debug_return_type] || 'PartnerStorageUsageResponse'
1225
+
1226
+ # auth_names
1227
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
1228
+
1229
+ new_options = opts.merge(
1230
+ :operation => :"PartnersApi.get_partner_storage_usage_0",
1231
+ :header_params => header_params,
1232
+ :query_params => query_params,
1233
+ :form_params => form_params,
1234
+ :body => post_body,
1235
+ :auth_names => auth_names,
1236
+ :return_type => return_type
1237
+ )
1238
+
1239
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1240
+ if @api_client.config.debugging
1241
+ @api_client.config.logger.debug "API called: PartnersApi#get_partner_storage_usage_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1242
+ end
1243
+ return data, status_code, headers
1244
+ end
1245
+
1246
+ # How your notifications reached you
1247
+ # Lists the sends of your notifications, the newest first: each email to one address and each call to your webhook, with whether it was delivered, when it is tried again if not, how many attempts it had, and why the last one failed. Use it to find out why a webhook of yours did not receive an event. An email counts as delivered when it was handed to the mail service; a call to your webhook counts as delivered when your endpoint answered with a 2xx status. Anything else is tried again, after 1 minute, then 5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours and a day, eight attempts in all, because your address is read again at each attempt and you may have mended it. Two answers end the delivery at once: `410 Gone` and `413 Payload Too Large`. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
1248
+ # @param partner_id [String] The partner whose deliveries to list
1249
+ # @param [Hash] opts the optional parameters
1250
+ # @option opts [Integer] :limit How many deliveries to list at most (default to 100)
1251
+ # @return [PartnerNotificationDeliveryLogResponse]
1252
+ def list_partner_notification_deliveries_0(partner_id, opts = {})
1253
+ data, _status_code, _headers = list_partner_notification_deliveries_0_with_http_info(partner_id, opts)
1254
+ data
1255
+ end
1256
+
1257
+ # How your notifications reached you
1258
+ # Lists the sends of your notifications, the newest first: each email to one address and each call to your webhook, with whether it was delivered, when it is tried again if not, how many attempts it had, and why the last one failed. Use it to find out why a webhook of yours did not receive an event. An email counts as delivered when it was handed to the mail service; a call to your webhook counts as delivered when your endpoint answered with a 2xx status. Anything else is tried again, after 1 minute, then 5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours and a day, eight attempts in all, because your address is read again at each attempt and you may have mended it. Two answers end the delivery at once: &#x60;410 Gone&#x60; and &#x60;413 Payload Too Large&#x60;. The caller must be the person who administers the partner (an API key of that account works, with the &#x60;partner:read&#x60; scope), or a Widgetic administrator.
1259
+ # @param partner_id [String] The partner whose deliveries to list
1260
+ # @param [Hash] opts the optional parameters
1261
+ # @option opts [Integer] :limit How many deliveries to list at most (default to 100)
1262
+ # @return [Array<(PartnerNotificationDeliveryLogResponse, Integer, Hash)>] PartnerNotificationDeliveryLogResponse data, response status code and response headers
1263
+ def list_partner_notification_deliveries_0_with_http_info(partner_id, opts = {})
1264
+ if @api_client.config.debugging
1265
+ @api_client.config.logger.debug 'Calling API: PartnersApi.list_partner_notification_deliveries_0 ...'
1266
+ end
1267
+ # verify the required parameter 'partner_id' is set
1268
+ if @api_client.config.client_side_validation && partner_id.nil?
1269
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.list_partner_notification_deliveries_0"
1270
+ end
1271
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
1272
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PartnersApi.list_partner_notification_deliveries_0, must be smaller than or equal to 200.'
1273
+ end
1274
+
1275
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
1276
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PartnersApi.list_partner_notification_deliveries_0, must be greater than or equal to 1.'
1277
+ end
1278
+
1279
+ # resource path
1280
+ local_var_path = '/partners/{partnerId}/notifications/deliveries'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
1281
+
1282
+ # query parameters
1283
+ query_params = opts[:query_params] || {}
1284
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1285
+
1286
+ # header parameters
1287
+ header_params = opts[:header_params] || {}
1288
+ # HTTP header 'Accept' (if needed)
1289
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1290
+
1291
+ # form parameters
1292
+ form_params = opts[:form_params] || {}
1293
+
1294
+ # http body (model)
1295
+ post_body = opts[:debug_body]
1296
+
1297
+ # return_type
1298
+ return_type = opts[:debug_return_type] || 'PartnerNotificationDeliveryLogResponse'
1299
+
1300
+ # auth_names
1301
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
1302
+
1303
+ new_options = opts.merge(
1304
+ :operation => :"PartnersApi.list_partner_notification_deliveries_0",
1305
+ :header_params => header_params,
1306
+ :query_params => query_params,
1307
+ :form_params => form_params,
1308
+ :body => post_body,
1309
+ :auth_names => auth_names,
1310
+ :return_type => return_type
1311
+ )
1312
+
1313
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1314
+ if @api_client.config.debugging
1315
+ @api_client.config.logger.debug "API called: PartnersApi#list_partner_notification_deliveries_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1316
+ end
1317
+ return data, status_code, headers
1318
+ end
1319
+
1320
+ # What your partner account was told
1321
+ # Lists the notifications of a partner, the newest first: the invoices Widgetic issued and their payments, the reminders to pay them, a warning when your credits run low, and the changes to the standing of the account (activated, paused, resumed). It is the same list your dashboard shows, and each entry is what your webhook receives as `data` when you have one (`updatePartnerNotificationSettings`). A page holds `limit` notifications (20 by default, at most 100). When there are older ones `nextBefore` is set: ask again with it as `before` to get the next page. The caller must be the person who administers the partner (an API key of that account works, with the `partner:read` scope), or a Widgetic administrator.
1322
+ # @param partner_id [String] The partner whose notifications to list
1323
+ # @param [Hash] opts the optional parameters
1324
+ # @option opts [Integer] :limit How many notifications to list at most (default to 20)
1325
+ # @option opts [Time] :before Only the notifications made before this moment. Give the &#x60;nextBefore&#x60; of the previous page.
1326
+ # @return [PartnerNotificationPageResponse]
1327
+ def list_partner_notifications_0(partner_id, opts = {})
1328
+ data, _status_code, _headers = list_partner_notifications_0_with_http_info(partner_id, opts)
1329
+ data
1330
+ end
1331
+
1332
+ # What your partner account was told
1333
+ # Lists the notifications of a partner, the newest first: the invoices Widgetic issued and their payments, the reminders to pay them, a warning when your credits run low, and the changes to the standing of the account (activated, paused, resumed). It is the same list your dashboard shows, and each entry is what your webhook receives as &#x60;data&#x60; when you have one (&#x60;updatePartnerNotificationSettings&#x60;). A page holds &#x60;limit&#x60; notifications (20 by default, at most 100). When there are older ones &#x60;nextBefore&#x60; is set: ask again with it as &#x60;before&#x60; to get the next page. The caller must be the person who administers the partner (an API key of that account works, with the &#x60;partner:read&#x60; scope), or a Widgetic administrator.
1334
+ # @param partner_id [String] The partner whose notifications to list
1335
+ # @param [Hash] opts the optional parameters
1336
+ # @option opts [Integer] :limit How many notifications to list at most (default to 20)
1337
+ # @option opts [Time] :before Only the notifications made before this moment. Give the &#x60;nextBefore&#x60; of the previous page.
1338
+ # @return [Array<(PartnerNotificationPageResponse, Integer, Hash)>] PartnerNotificationPageResponse data, response status code and response headers
1339
+ def list_partner_notifications_0_with_http_info(partner_id, opts = {})
1340
+ if @api_client.config.debugging
1341
+ @api_client.config.logger.debug 'Calling API: PartnersApi.list_partner_notifications_0 ...'
1342
+ end
1343
+ # verify the required parameter 'partner_id' is set
1344
+ if @api_client.config.client_side_validation && partner_id.nil?
1345
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.list_partner_notifications_0"
1346
+ end
1347
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
1348
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PartnersApi.list_partner_notifications_0, must be smaller than or equal to 100.'
1349
+ end
1350
+
1351
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
1352
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PartnersApi.list_partner_notifications_0, must be greater than or equal to 1.'
1353
+ end
1354
+
1355
+ # resource path
1356
+ local_var_path = '/partners/{partnerId}/notifications'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
1357
+
1358
+ # query parameters
1359
+ query_params = opts[:query_params] || {}
1360
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1361
+ query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
1362
+
1363
+ # header parameters
1364
+ header_params = opts[:header_params] || {}
1365
+ # HTTP header 'Accept' (if needed)
1366
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1367
+
1368
+ # form parameters
1369
+ form_params = opts[:form_params] || {}
1370
+
1371
+ # http body (model)
1372
+ post_body = opts[:debug_body]
1373
+
1374
+ # return_type
1375
+ return_type = opts[:debug_return_type] || 'PartnerNotificationPageResponse'
1376
+
1377
+ # auth_names
1378
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
1379
+
1380
+ new_options = opts.merge(
1381
+ :operation => :"PartnersApi.list_partner_notifications_0",
1382
+ :header_params => header_params,
1383
+ :query_params => query_params,
1384
+ :form_params => form_params,
1385
+ :body => post_body,
1386
+ :auth_names => auth_names,
1387
+ :return_type => return_type
1388
+ )
1389
+
1390
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1391
+ if @api_client.config.debugging
1392
+ @api_client.config.logger.debug "API called: PartnersApi#list_partner_notifications_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1393
+ end
1394
+ return data, status_code, headers
1395
+ end
1396
+
1397
+ # List the widgets a partner offers as presets
1398
+ # Returns the partner's presets, ordered by `position` and then by `key`: the widgets it offers its managed users as starting points. The list is the same for every managed user. Use a preset in one of two ways: - **Make a composition of it** (the content and design editor): call `createComposition` with the preset's `widgetId` and the managed user. The widget itself stays yours; a composition is the user's own content. - **Give the user a copy to build on** (the widget creator): call `copyPresetForManagedUser`. The user gets a widget and a canvas of their own. Presets are not the same as the widgets Widgetic puts on every new Widgetic account. Those are chosen by Widgetic and are copied at sign-up. A preset here is yours, and is copied only when you ask. The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator.
1399
+ # @param partner_id [String] The partner whose presets to list
1400
+ # @param [Hash] opts the optional parameters
1401
+ # @return [ListPartnerPresets200Response]
1402
+ def list_partner_presets_0(partner_id, opts = {})
1403
+ data, _status_code, _headers = list_partner_presets_0_with_http_info(partner_id, opts)
1404
+ data
1405
+ end
1406
+
1407
+ # List the widgets a partner offers as presets
1408
+ # Returns the partner&#39;s presets, ordered by &#x60;position&#x60; and then by &#x60;key&#x60;: the widgets it offers its managed users as starting points. The list is the same for every managed user. Use a preset in one of two ways: - **Make a composition of it** (the content and design editor): call &#x60;createComposition&#x60; with the preset&#39;s &#x60;widgetId&#x60; and the managed user. The widget itself stays yours; a composition is the user&#39;s own content. - **Give the user a copy to build on** (the widget creator): call &#x60;copyPresetForManagedUser&#x60;. The user gets a widget and a canvas of their own. Presets are not the same as the widgets Widgetic puts on every new Widgetic account. Those are chosen by Widgetic and are copied at sign-up. A preset here is yours, and is copied only when you ask. The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator.
1409
+ # @param partner_id [String] The partner whose presets to list
1410
+ # @param [Hash] opts the optional parameters
1411
+ # @return [Array<(ListPartnerPresets200Response, Integer, Hash)>] ListPartnerPresets200Response data, response status code and response headers
1412
+ def list_partner_presets_0_with_http_info(partner_id, opts = {})
1413
+ if @api_client.config.debugging
1414
+ @api_client.config.logger.debug 'Calling API: PartnersApi.list_partner_presets_0 ...'
1415
+ end
1416
+ # verify the required parameter 'partner_id' is set
1417
+ if @api_client.config.client_side_validation && partner_id.nil?
1418
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.list_partner_presets_0"
1419
+ end
1420
+ # resource path
1421
+ local_var_path = '/partners/{partnerId}/presets'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
1422
+
1423
+ # query parameters
1424
+ query_params = opts[:query_params] || {}
1425
+
1426
+ # header parameters
1427
+ header_params = opts[:header_params] || {}
1428
+ # HTTP header 'Accept' (if needed)
1429
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1430
+
1431
+ # form parameters
1432
+ form_params = opts[:form_params] || {}
1433
+
1434
+ # http body (model)
1435
+ post_body = opts[:debug_body]
1436
+
1437
+ # return_type
1438
+ return_type = opts[:debug_return_type] || 'ListPartnerPresets200Response'
1439
+
1440
+ # auth_names
1441
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
1442
+
1443
+ new_options = opts.merge(
1444
+ :operation => :"PartnersApi.list_partner_presets_0",
1445
+ :header_params => header_params,
1446
+ :query_params => query_params,
1447
+ :form_params => form_params,
1448
+ :body => post_body,
1449
+ :auth_names => auth_names,
1450
+ :return_type => return_type
1451
+ )
1452
+
1453
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1454
+ if @api_client.config.debugging
1455
+ @api_client.config.logger.debug "API called: PartnersApi#list_partner_presets_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1456
+ end
1457
+ return data, status_code, headers
1458
+ end
1459
+
1460
+ # Remove an adapter key from a partner
1461
+ # Removes a key an adapter was given. The adapter stops working for the widgets of the partner's customers that need it: their visitors are told the feature is unavailable. Nothing else of the widgets changes, and connecting a key again brings them back. Removing a key that is not connected answers 200 with `removed: false`: the state asked for is the state it is in. A key of an adapter that has since been retired from the catalog can still be removed. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
1462
+ # @param partner_id [String] The partner that keeps the key
1463
+ # @param adapter_id [String] The adapter the key is for
1464
+ # @param credential_key [String] The key&#39;s name within the adapter
1465
+ # @param [Hash] opts the optional parameters
1466
+ # @return [RemoveUserAdapterConnection200Response]
1467
+ def remove_partner_adapter_connection_0(partner_id, adapter_id, credential_key, opts = {})
1468
+ data, _status_code, _headers = remove_partner_adapter_connection_0_with_http_info(partner_id, adapter_id, credential_key, opts)
1469
+ data
1470
+ end
1471
+
1472
+ # Remove an adapter key from a partner
1473
+ # Removes a key an adapter was given. The adapter stops working for the widgets of the partner&#39;s customers that need it: their visitors are told the feature is unavailable. Nothing else of the widgets changes, and connecting a key again brings them back. Removing a key that is not connected answers 200 with &#x60;removed: false&#x60;: the state asked for is the state it is in. A key of an adapter that has since been retired from the catalog can still be removed. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
1474
+ # @param partner_id [String] The partner that keeps the key
1475
+ # @param adapter_id [String] The adapter the key is for
1476
+ # @param credential_key [String] The key&#39;s name within the adapter
1477
+ # @param [Hash] opts the optional parameters
1478
+ # @return [Array<(RemoveUserAdapterConnection200Response, Integer, Hash)>] RemoveUserAdapterConnection200Response data, response status code and response headers
1479
+ def remove_partner_adapter_connection_0_with_http_info(partner_id, adapter_id, credential_key, opts = {})
1480
+ if @api_client.config.debugging
1481
+ @api_client.config.logger.debug 'Calling API: PartnersApi.remove_partner_adapter_connection_0 ...'
1482
+ end
1483
+ # verify the required parameter 'partner_id' is set
1484
+ if @api_client.config.client_side_validation && partner_id.nil?
1485
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.remove_partner_adapter_connection_0"
1486
+ end
1487
+ # verify the required parameter 'adapter_id' is set
1488
+ if @api_client.config.client_side_validation && adapter_id.nil?
1489
+ fail ArgumentError, "Missing the required parameter 'adapter_id' when calling PartnersApi.remove_partner_adapter_connection_0"
1490
+ end
1491
+ if @api_client.config.client_side_validation && adapter_id.to_s.length > 40
1492
+ fail ArgumentError, 'invalid value for "adapter_id" when calling PartnersApi.remove_partner_adapter_connection_0, the character length must be smaller than or equal to 40.'
1493
+ end
1494
+
1495
+ # verify the required parameter 'credential_key' is set
1496
+ if @api_client.config.client_side_validation && credential_key.nil?
1497
+ fail ArgumentError, "Missing the required parameter 'credential_key' when calling PartnersApi.remove_partner_adapter_connection_0"
1498
+ end
1499
+ if @api_client.config.client_side_validation && credential_key.to_s.length > 40
1500
+ fail ArgumentError, 'invalid value for "credential_key" when calling PartnersApi.remove_partner_adapter_connection_0, the character length must be smaller than or equal to 40.'
1501
+ end
1502
+
1503
+ # resource path
1504
+ local_var_path = '/partners/{partnerId}/adapter-connections/{adapterId}/{credentialKey}'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s)).sub('{' + 'adapterId' + '}', CGI.escape(adapter_id.to_s)).sub('{' + 'credentialKey' + '}', CGI.escape(credential_key.to_s))
1505
+
1506
+ # query parameters
1507
+ query_params = opts[:query_params] || {}
1508
+
1509
+ # header parameters
1510
+ header_params = opts[:header_params] || {}
1511
+ # HTTP header 'Accept' (if needed)
1512
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1513
+
1514
+ # form parameters
1515
+ form_params = opts[:form_params] || {}
1516
+
1517
+ # http body (model)
1518
+ post_body = opts[:debug_body]
1519
+
1520
+ # return_type
1521
+ return_type = opts[:debug_return_type] || 'RemoveUserAdapterConnection200Response'
1522
+
1523
+ # auth_names
1524
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
1525
+
1526
+ new_options = opts.merge(
1527
+ :operation => :"PartnersApi.remove_partner_adapter_connection_0",
1528
+ :header_params => header_params,
1529
+ :query_params => query_params,
1530
+ :form_params => form_params,
1531
+ :body => post_body,
1532
+ :auth_names => auth_names,
1533
+ :return_type => return_type
1534
+ )
1535
+
1536
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1537
+ if @api_client.config.debugging
1538
+ @api_client.config.logger.debug "API called: PartnersApi#remove_partner_adapter_connection_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1539
+ end
1540
+ return data, status_code, headers
1541
+ end
1542
+
1543
+ # Stop keeping the data of a partner's compositions in its own database
1544
+ # Removes the partner's database from Widgetic: Widgetic forgets the connection string, and from then on the data of the partner's compositions is kept in Widgetic's database again. Nothing in your database is deleted. Removing is refused with 409 `PARTNER_DATABASE_HOLDS_DATA` while any composition of the partner keeps its data in your database: it would read as empty from then on, and what it holds would stay where nothing reads it. Delete the compositions you no longer need, or keep the database. If Widgetic cannot check what your database holds (it cannot be reached) the answer is 503 `PARTNER_DATABASE_UNAVAILABLE`; check it with `verifyPartnerDataDatabase`, or set the same database again to repair its connection. Removing a database the partner does not have is not an error: the answer is `removed: false`. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
1545
+ # @param partner_id [String] The partner whose database to remove
1546
+ # @param [Hash] opts the optional parameters
1547
+ # @return [PartnerDataDatabaseRemovalResponse]
1548
+ def remove_partner_data_database_0(partner_id, opts = {})
1549
+ data, _status_code, _headers = remove_partner_data_database_0_with_http_info(partner_id, opts)
1550
+ data
1551
+ end
1552
+
1553
+ # Stop keeping the data of a partner&#39;s compositions in its own database
1554
+ # Removes the partner&#39;s database from Widgetic: Widgetic forgets the connection string, and from then on the data of the partner&#39;s compositions is kept in Widgetic&#39;s database again. Nothing in your database is deleted. Removing is refused with 409 &#x60;PARTNER_DATABASE_HOLDS_DATA&#x60; while any composition of the partner keeps its data in your database: it would read as empty from then on, and what it holds would stay where nothing reads it. Delete the compositions you no longer need, or keep the database. If Widgetic cannot check what your database holds (it cannot be reached) the answer is 503 &#x60;PARTNER_DATABASE_UNAVAILABLE&#x60;; check it with &#x60;verifyPartnerDataDatabase&#x60;, or set the same database again to repair its connection. Removing a database the partner does not have is not an error: the answer is &#x60;removed: false&#x60;. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
1555
+ # @param partner_id [String] The partner whose database to remove
1556
+ # @param [Hash] opts the optional parameters
1557
+ # @return [Array<(PartnerDataDatabaseRemovalResponse, Integer, Hash)>] PartnerDataDatabaseRemovalResponse data, response status code and response headers
1558
+ def remove_partner_data_database_0_with_http_info(partner_id, opts = {})
1559
+ if @api_client.config.debugging
1560
+ @api_client.config.logger.debug 'Calling API: PartnersApi.remove_partner_data_database_0 ...'
1561
+ end
1562
+ # verify the required parameter 'partner_id' is set
1563
+ if @api_client.config.client_side_validation && partner_id.nil?
1564
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.remove_partner_data_database_0"
1565
+ end
1566
+ # resource path
1567
+ local_var_path = '/partners/{partnerId}/data-database'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
1568
+
1569
+ # query parameters
1570
+ query_params = opts[:query_params] || {}
1571
+
1572
+ # header parameters
1573
+ header_params = opts[:header_params] || {}
1574
+ # HTTP header 'Accept' (if needed)
1575
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1576
+
1577
+ # form parameters
1578
+ form_params = opts[:form_params] || {}
1579
+
1580
+ # http body (model)
1581
+ post_body = opts[:debug_body]
1582
+
1583
+ # return_type
1584
+ return_type = opts[:debug_return_type] || 'PartnerDataDatabaseRemovalResponse'
1585
+
1586
+ # auth_names
1587
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
1588
+
1589
+ new_options = opts.merge(
1590
+ :operation => :"PartnersApi.remove_partner_data_database_0",
1591
+ :header_params => header_params,
1592
+ :query_params => query_params,
1593
+ :form_params => form_params,
1594
+ :body => post_body,
1595
+ :auth_names => auth_names,
1596
+ :return_type => return_type
1597
+ )
1598
+
1599
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1600
+ if @api_client.config.debugging
1601
+ @api_client.config.logger.debug "API called: PartnersApi#remove_partner_data_database_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1602
+ end
1603
+ return data, status_code, headers
1604
+ end
1605
+
1606
+ # Take a widget off the partner's presets
1607
+ # Removes the preset under `key`. The widget itself is not touched, and neither are the copies and the compositions already made from it. Removing a preset the partner does not have is not an error: the answer is `removed: false`.
1608
+ # @param partner_id [String] The partner whose preset to remove
1609
+ # @param key [String] The key of the preset to remove
1610
+ # @param [Hash] opts the optional parameters
1611
+ # @return [PartnerPresetRemovalResponse]
1612
+ def remove_partner_preset_0(partner_id, key, opts = {})
1613
+ data, _status_code, _headers = remove_partner_preset_0_with_http_info(partner_id, key, opts)
1614
+ data
1615
+ end
1616
+
1617
+ # Take a widget off the partner&#39;s presets
1618
+ # Removes the preset under &#x60;key&#x60;. The widget itself is not touched, and neither are the copies and the compositions already made from it. Removing a preset the partner does not have is not an error: the answer is &#x60;removed: false&#x60;.
1619
+ # @param partner_id [String] The partner whose preset to remove
1620
+ # @param key [String] The key of the preset to remove
1621
+ # @param [Hash] opts the optional parameters
1622
+ # @return [Array<(PartnerPresetRemovalResponse, Integer, Hash)>] PartnerPresetRemovalResponse data, response status code and response headers
1623
+ def remove_partner_preset_0_with_http_info(partner_id, key, opts = {})
1624
+ if @api_client.config.debugging
1625
+ @api_client.config.logger.debug 'Calling API: PartnersApi.remove_partner_preset_0 ...'
1626
+ end
1627
+ # verify the required parameter 'partner_id' is set
1628
+ if @api_client.config.client_side_validation && partner_id.nil?
1629
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.remove_partner_preset_0"
1630
+ end
1631
+ # verify the required parameter 'key' is set
1632
+ if @api_client.config.client_side_validation && key.nil?
1633
+ fail ArgumentError, "Missing the required parameter 'key' when calling PartnersApi.remove_partner_preset_0"
1634
+ end
1635
+ pattern = Regexp.new(/^[a-z0-9][a-z0-9_-]{0,63}$/)
1636
+ if @api_client.config.client_side_validation && key !~ pattern
1637
+ fail ArgumentError, "invalid value for 'key' when calling PartnersApi.remove_partner_preset_0, must conform to the pattern #{pattern}."
1638
+ end
1639
+
1640
+ # resource path
1641
+ local_var_path = '/partners/{partnerId}/presets/{key}'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
1642
+
1643
+ # query parameters
1644
+ query_params = opts[:query_params] || {}
1645
+
1646
+ # header parameters
1647
+ header_params = opts[:header_params] || {}
1648
+ # HTTP header 'Accept' (if needed)
1649
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1650
+
1651
+ # form parameters
1652
+ form_params = opts[:form_params] || {}
1653
+
1654
+ # http body (model)
1655
+ post_body = opts[:debug_body]
1656
+
1657
+ # return_type
1658
+ return_type = opts[:debug_return_type] || 'PartnerPresetRemovalResponse'
1659
+
1660
+ # auth_names
1661
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
1662
+
1663
+ new_options = opts.merge(
1664
+ :operation => :"PartnersApi.remove_partner_preset_0",
1665
+ :header_params => header_params,
1666
+ :query_params => query_params,
1667
+ :form_params => form_params,
1668
+ :body => post_body,
1669
+ :auth_names => auth_names,
1670
+ :return_type => return_type
1671
+ )
1672
+
1673
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1674
+ if @api_client.config.debugging
1675
+ @api_client.config.logger.debug "API called: PartnersApi#remove_partner_preset_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1676
+ end
1677
+ return data, status_code, headers
1678
+ end
1679
+
1680
+ # Stop storing a partner's uploaded files in its own bucket
1681
+ # Removes the partner's storage destination. Partner storage is not optional, so after this every upload of the account, on any route, and the uploads of your customers' editor sessions are refused (409 `PARTNER_STORAGE_REQUIRED`) until a destination is set again, and no editor session can be made. Files already in the partner's bucket are not touched and are not moved: they stay where they are, at the addresses they were given. Removing a destination the partner does not have is not an error: the answer is `removed: false`. The caller must be the person who administers the partner, or a Widgetic administrator.
1682
+ # @param partner_id [String] The partner whose storage destination to remove
1683
+ # @param [Hash] opts the optional parameters
1684
+ # @return [PartnerStorageRemovalResponse]
1685
+ def remove_partner_storage_destination_0(partner_id, opts = {})
1686
+ data, _status_code, _headers = remove_partner_storage_destination_0_with_http_info(partner_id, opts)
1687
+ data
1688
+ end
1689
+
1690
+ # Stop storing a partner&#39;s uploaded files in its own bucket
1691
+ # Removes the partner&#39;s storage destination. Partner storage is not optional, so after this every upload of the account, on any route, and the uploads of your customers&#39; editor sessions are refused (409 &#x60;PARTNER_STORAGE_REQUIRED&#x60;) until a destination is set again, and no editor session can be made. Files already in the partner&#39;s bucket are not touched and are not moved: they stay where they are, at the addresses they were given. Removing a destination the partner does not have is not an error: the answer is &#x60;removed: false&#x60;. The caller must be the person who administers the partner, or a Widgetic administrator.
1692
+ # @param partner_id [String] The partner whose storage destination to remove
1693
+ # @param [Hash] opts the optional parameters
1694
+ # @return [Array<(PartnerStorageRemovalResponse, Integer, Hash)>] PartnerStorageRemovalResponse data, response status code and response headers
1695
+ def remove_partner_storage_destination_0_with_http_info(partner_id, opts = {})
1696
+ if @api_client.config.debugging
1697
+ @api_client.config.logger.debug 'Calling API: PartnersApi.remove_partner_storage_destination_0 ...'
1698
+ end
1699
+ # verify the required parameter 'partner_id' is set
1700
+ if @api_client.config.client_side_validation && partner_id.nil?
1701
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.remove_partner_storage_destination_0"
1702
+ end
1703
+ # resource path
1704
+ local_var_path = '/partners/{partnerId}/storage'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
1705
+
1706
+ # query parameters
1707
+ query_params = opts[:query_params] || {}
1708
+
1709
+ # header parameters
1710
+ header_params = opts[:header_params] || {}
1711
+ # HTTP header 'Accept' (if needed)
1712
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1713
+
1714
+ # form parameters
1715
+ form_params = opts[:form_params] || {}
1716
+
1717
+ # http body (model)
1718
+ post_body = opts[:debug_body]
1719
+
1720
+ # return_type
1721
+ return_type = opts[:debug_return_type] || 'PartnerStorageRemovalResponse'
1722
+
1723
+ # auth_names
1724
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
1725
+
1726
+ new_options = opts.merge(
1727
+ :operation => :"PartnersApi.remove_partner_storage_destination_0",
1728
+ :header_params => header_params,
1729
+ :query_params => query_params,
1730
+ :form_params => form_params,
1731
+ :body => post_body,
1732
+ :auth_names => auth_names,
1733
+ :return_type => return_type
1734
+ )
1735
+
1736
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1737
+ if @api_client.config.debugging
1738
+ @api_client.config.logger.debug "API called: PartnersApi#remove_partner_storage_destination_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1739
+ end
1740
+ return data, status_code, headers
1741
+ end
1742
+
1743
+ # Send a webhook delivery again
1744
+ # Sends one earlier **webhook** delivery again to your **current** webhook address, with the same event `id` (`webhook-id`) as the original notification so a receiver that remembers ids can ignore a duplicate, and a new `createdAt` and signature made with your current secret. The attempt is recorded in the delivery log as a new row that points at the delivery you replayed. Set a webhook address (and secret) under notification settings before you replay. Changing the settings needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
1745
+ # @param partner_id [String] The partner whose delivery to replay
1746
+ # @param delivery_id [String] The delivery to send again (must be a webhook delivery of this partner)
1747
+ # @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;).
1748
+ # @param [Hash] opts the optional parameters
1749
+ # @return [PartnerNotificationDeliveryResponse]
1750
+ def replay_partner_notification_delivery_0(partner_id, delivery_id, idempotency_key, opts = {})
1751
+ data, _status_code, _headers = replay_partner_notification_delivery_0_with_http_info(partner_id, delivery_id, idempotency_key, opts)
1752
+ data
1753
+ end
1754
+
1755
+ # Send a webhook delivery again
1756
+ # Sends one earlier **webhook** delivery again to your **current** webhook address, with the same event &#x60;id&#x60; (&#x60;webhook-id&#x60;) as the original notification so a receiver that remembers ids can ignore a duplicate, and a new &#x60;createdAt&#x60; and signature made with your current secret. The attempt is recorded in the delivery log as a new row that points at the delivery you replayed. Set a webhook address (and secret) under notification settings before you replay. Changing the settings needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
1757
+ # @param partner_id [String] The partner whose delivery to replay
1758
+ # @param delivery_id [String] The delivery to send again (must be a webhook delivery of this partner)
1759
+ # @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;).
1760
+ # @param [Hash] opts the optional parameters
1761
+ # @return [Array<(PartnerNotificationDeliveryResponse, Integer, Hash)>] PartnerNotificationDeliveryResponse data, response status code and response headers
1762
+ def replay_partner_notification_delivery_0_with_http_info(partner_id, delivery_id, idempotency_key, opts = {})
1763
+ if @api_client.config.debugging
1764
+ @api_client.config.logger.debug 'Calling API: PartnersApi.replay_partner_notification_delivery_0 ...'
1765
+ end
1766
+ # verify the required parameter 'partner_id' is set
1767
+ if @api_client.config.client_side_validation && partner_id.nil?
1768
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.replay_partner_notification_delivery_0"
1769
+ end
1770
+ # verify the required parameter 'delivery_id' is set
1771
+ if @api_client.config.client_side_validation && delivery_id.nil?
1772
+ fail ArgumentError, "Missing the required parameter 'delivery_id' when calling PartnersApi.replay_partner_notification_delivery_0"
1773
+ end
1774
+ # verify the required parameter 'idempotency_key' is set
1775
+ if @api_client.config.client_side_validation && idempotency_key.nil?
1776
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling PartnersApi.replay_partner_notification_delivery_0"
1777
+ end
1778
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
1779
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling PartnersApi.replay_partner_notification_delivery_0, the character length must be smaller than or equal to 50.'
1780
+ end
1781
+
1782
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
1783
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling PartnersApi.replay_partner_notification_delivery_0, the character length must be great than or equal to 8.'
1784
+ end
1785
+
1786
+ pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
1787
+ if @api_client.config.client_side_validation && idempotency_key !~ pattern
1788
+ fail ArgumentError, "invalid value for 'idempotency_key' when calling PartnersApi.replay_partner_notification_delivery_0, must conform to the pattern #{pattern}."
1789
+ end
1790
+
1791
+ # resource path
1792
+ local_var_path = '/partners/{partnerId}/notifications/deliveries/{deliveryId}/replay'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s)).sub('{' + 'deliveryId' + '}', CGI.escape(delivery_id.to_s))
1793
+
1794
+ # query parameters
1795
+ query_params = opts[:query_params] || {}
1796
+
1797
+ # header parameters
1798
+ header_params = opts[:header_params] || {}
1799
+ # HTTP header 'Accept' (if needed)
1800
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1801
+ header_params[:'Idempotency-Key'] = idempotency_key
1802
+
1803
+ # form parameters
1804
+ form_params = opts[:form_params] || {}
1805
+
1806
+ # http body (model)
1807
+ post_body = opts[:debug_body]
1808
+
1809
+ # return_type
1810
+ return_type = opts[:debug_return_type] || 'PartnerNotificationDeliveryResponse'
1811
+
1812
+ # auth_names
1813
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
1814
+
1815
+ new_options = opts.merge(
1816
+ :operation => :"PartnersApi.replay_partner_notification_delivery_0",
1817
+ :header_params => header_params,
1818
+ :query_params => query_params,
1819
+ :form_params => form_params,
1820
+ :body => post_body,
1821
+ :auth_names => auth_names,
1822
+ :return_type => return_type
1823
+ )
1824
+
1825
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1826
+ if @api_client.config.debugging
1827
+ @api_client.config.logger.debug "API called: PartnersApi#replay_partner_notification_delivery_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1828
+ end
1829
+ return data, status_code, headers
1830
+ end
1831
+
1832
+ # Make a secret to sign the context of your embeds
1833
+ # Makes a secret to sign the `context` of your embeds with, and returns it in `secret`: **keep it now, it is shown once** and cannot be read again. Keep it on your server only: whoever holds it can write contexts your compositions accept. Call this again to make a new secret; the one it replaces is still accepted for a day, so that your server can switch without an entry being refused (making another within that day ends the overlap with the first). **What signing is for.** `<widgetic composition-id=\"...\" context='{\"customerId\":\"c_42\"}'>` hands attribution to a widget, which sends it with every entry it saves. The page is yours but the browser is the visitor's: anybody can change that attribute and file an entry under another customer's id. When your server signs the context, the gateway refuses an entry whose context was changed, and the entries you keep hold attribution your server wrote. **How to sign** (on your server, for each page you render): 1. Take the context to give the widget. It may hold text and whole numbers only (within ±2^53, written without a fraction or an exponent). 2. Choose when the signature stops being good: `widgetic_exp`, in seconds since 1970 (UTC), no more than seven days from now. A minute of difference between clocks is forgiven. 3. Write the text to sign, with no spaces except those inside values: `widgetic-context.v1.<compositionId>.<widgetic_exp>.<json>`. `<compositionId>` is the id of the composition in lower case. `<json>` is the context as JSON with the keys in character-code order (so `Z` comes before `a`, and `10` before `9`), no spaces, strings escaped as JSON escapes them, and the two keys of the signature left out. 4. Sign that text: HMAC-SHA256 with the 32 bytes the secret stands for (the base64 text after `ctxsec_`), and write the result as base64url without padding. 5. Give the widget the context with two keys added: `widgetic_exp` and `widgetic_sig` (the signature). The whole attribute, the two keys included, stays within the limits of any context: at most 20 keys, 2048 bytes of JSON, strings up to 500 characters. The two keys take two of the 20 keys and 87 bytes of the 2048. A test vector, to check your code against before you rely on it. Secret `ctxsec_AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8=` (the bytes 0 to 31), composition `7c9e6679-7425-40de-944b-e07fc1f90ae7`, `widgetic_exp` 1792000000 and context `{\"customerId\":\"c_42\",\"plan\":\"pro\",\"seats\":3}` sign the text `widgetic-context.v1.7c9e6679-7425-40de-944b-e07fc1f90ae7.1792000000.{\"customerId\":\"c_42\",\"plan\":\"pro\",\"seats\":3}` and give the signature `j6g7151F54tl9C8oEY9levaYSppHME4fAPZ7WPwL8C8`. (The secret is the example's, not a real one.) **What the gateway does with an entry.** When you have a secret, an entry whose context carries a signature is checked: a signature that does not match is refused with 403 `CONTEXT_SIGNATURE_INVALID`, and one that is past `widgetic_exp` with 403 `CONTEXT_SIGNATURE_EXPIRED`. When you also require signatures (`updatePartnerEntryContextSigning`) an entry whose context carries none is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`. The two keys are taken out before the entry is stored or announced: your entries and your `entry.created` events hold the context you wrote. A change you make reaches every part of the gateway within a minute. **What it does not do.** A signed context that has been seen (a page's source is public) can be sent again by anyone until `widgetic_exp`; when you must not accept the same context twice, put a value that is new for each page view in it (a `submissionId` you made up) and keep the ones you have seen. The signature covers the entries that reach Widgetic's gateway: a row that gets into a table another way (your own code writing straight into a database you brought, or the record calls of the composition's owner) does not pass through it, and carries no context. Retry this call with the same `Idempotency-Key` if its answer was lost: the answer, secret included, is then given again, and no second secret is made. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
1834
+ # @param partner_id [String] The partner whose secret to make
1835
+ # @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;).
1836
+ # @param [Hash] opts the optional parameters
1837
+ # @return [PartnerEntryContextSecretResponse]
1838
+ def rotate_partner_entry_context_secret_0(partner_id, idempotency_key, opts = {})
1839
+ data, _status_code, _headers = rotate_partner_entry_context_secret_0_with_http_info(partner_id, idempotency_key, opts)
1840
+ data
1841
+ end
1842
+
1843
+ # Make a secret to sign the context of your embeds
1844
+ # Makes a secret to sign the &#x60;context&#x60; of your embeds with, and returns it in &#x60;secret&#x60;: **keep it now, it is shown once** and cannot be read again. Keep it on your server only: whoever holds it can write contexts your compositions accept. Call this again to make a new secret; the one it replaces is still accepted for a day, so that your server can switch without an entry being refused (making another within that day ends the overlap with the first). **What signing is for.** &#x60;&lt;widgetic composition-id&#x3D;\&quot;...\&quot; context&#x3D;&#39;{\&quot;customerId\&quot;:\&quot;c_42\&quot;}&#39;&gt;&#x60; hands attribution to a widget, which sends it with every entry it saves. The page is yours but the browser is the visitor&#39;s: anybody can change that attribute and file an entry under another customer&#39;s id. When your server signs the context, the gateway refuses an entry whose context was changed, and the entries you keep hold attribution your server wrote. **How to sign** (on your server, for each page you render): 1. Take the context to give the widget. It may hold text and whole numbers only (within ±2^53, written without a fraction or an exponent). 2. Choose when the signature stops being good: &#x60;widgetic_exp&#x60;, in seconds since 1970 (UTC), no more than seven days from now. A minute of difference between clocks is forgiven. 3. Write the text to sign, with no spaces except those inside values: &#x60;widgetic-context.v1.&lt;compositionId&gt;.&lt;widgetic_exp&gt;.&lt;json&gt;&#x60;. &#x60;&lt;compositionId&gt;&#x60; is the id of the composition in lower case. &#x60;&lt;json&gt;&#x60; is the context as JSON with the keys in character-code order (so &#x60;Z&#x60; comes before &#x60;a&#x60;, and &#x60;10&#x60; before &#x60;9&#x60;), no spaces, strings escaped as JSON escapes them, and the two keys of the signature left out. 4. Sign that text: HMAC-SHA256 with the 32 bytes the secret stands for (the base64 text after &#x60;ctxsec_&#x60;), and write the result as base64url without padding. 5. Give the widget the context with two keys added: &#x60;widgetic_exp&#x60; and &#x60;widgetic_sig&#x60; (the signature). The whole attribute, the two keys included, stays within the limits of any context: at most 20 keys, 2048 bytes of JSON, strings up to 500 characters. The two keys take two of the 20 keys and 87 bytes of the 2048. A test vector, to check your code against before you rely on it. Secret &#x60;ctxsec_AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8&#x3D;&#x60; (the bytes 0 to 31), composition &#x60;7c9e6679-7425-40de-944b-e07fc1f90ae7&#x60;, &#x60;widgetic_exp&#x60; 1792000000 and context &#x60;{\&quot;customerId\&quot;:\&quot;c_42\&quot;,\&quot;plan\&quot;:\&quot;pro\&quot;,\&quot;seats\&quot;:3}&#x60; sign the text &#x60;widgetic-context.v1.7c9e6679-7425-40de-944b-e07fc1f90ae7.1792000000.{\&quot;customerId\&quot;:\&quot;c_42\&quot;,\&quot;plan\&quot;:\&quot;pro\&quot;,\&quot;seats\&quot;:3}&#x60; and give the signature &#x60;j6g7151F54tl9C8oEY9levaYSppHME4fAPZ7WPwL8C8&#x60;. (The secret is the example&#39;s, not a real one.) **What the gateway does with an entry.** When you have a secret, an entry whose context carries a signature is checked: a signature that does not match is refused with 403 &#x60;CONTEXT_SIGNATURE_INVALID&#x60;, and one that is past &#x60;widgetic_exp&#x60; with 403 &#x60;CONTEXT_SIGNATURE_EXPIRED&#x60;. When you also require signatures (&#x60;updatePartnerEntryContextSigning&#x60;) an entry whose context carries none is refused with 403 &#x60;CONTEXT_SIGNATURE_REQUIRED&#x60;. The two keys are taken out before the entry is stored or announced: your entries and your &#x60;entry.created&#x60; events hold the context you wrote. A change you make reaches every part of the gateway within a minute. **What it does not do.** A signed context that has been seen (a page&#39;s source is public) can be sent again by anyone until &#x60;widgetic_exp&#x60;; when you must not accept the same context twice, put a value that is new for each page view in it (a &#x60;submissionId&#x60; you made up) and keep the ones you have seen. The signature covers the entries that reach Widgetic&#39;s gateway: a row that gets into a table another way (your own code writing straight into a database you brought, or the record calls of the composition&#39;s owner) does not pass through it, and carries no context. Retry this call with the same &#x60;Idempotency-Key&#x60; if its answer was lost: the answer, secret included, is then given again, and no second secret is made. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
1845
+ # @param partner_id [String] The partner whose secret to make
1846
+ # @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;).
1847
+ # @param [Hash] opts the optional parameters
1848
+ # @return [Array<(PartnerEntryContextSecretResponse, Integer, Hash)>] PartnerEntryContextSecretResponse data, response status code and response headers
1849
+ def rotate_partner_entry_context_secret_0_with_http_info(partner_id, idempotency_key, opts = {})
1850
+ if @api_client.config.debugging
1851
+ @api_client.config.logger.debug 'Calling API: PartnersApi.rotate_partner_entry_context_secret_0 ...'
1852
+ end
1853
+ # verify the required parameter 'partner_id' is set
1854
+ if @api_client.config.client_side_validation && partner_id.nil?
1855
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.rotate_partner_entry_context_secret_0"
1856
+ end
1857
+ # verify the required parameter 'idempotency_key' is set
1858
+ if @api_client.config.client_side_validation && idempotency_key.nil?
1859
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling PartnersApi.rotate_partner_entry_context_secret_0"
1860
+ end
1861
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
1862
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling PartnersApi.rotate_partner_entry_context_secret_0, the character length must be smaller than or equal to 50.'
1863
+ end
1864
+
1865
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
1866
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling PartnersApi.rotate_partner_entry_context_secret_0, the character length must be great than or equal to 8.'
1867
+ end
1868
+
1869
+ pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
1870
+ if @api_client.config.client_side_validation && idempotency_key !~ pattern
1871
+ fail ArgumentError, "invalid value for 'idempotency_key' when calling PartnersApi.rotate_partner_entry_context_secret_0, must conform to the pattern #{pattern}."
1872
+ end
1873
+
1874
+ # resource path
1875
+ local_var_path = '/partners/{partnerId}/entry-context-signing/secret'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
1876
+
1877
+ # query parameters
1878
+ query_params = opts[:query_params] || {}
1879
+
1880
+ # header parameters
1881
+ header_params = opts[:header_params] || {}
1882
+ # HTTP header 'Accept' (if needed)
1883
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1884
+ header_params[:'Idempotency-Key'] = idempotency_key
1885
+
1886
+ # form parameters
1887
+ form_params = opts[:form_params] || {}
1888
+
1889
+ # http body (model)
1890
+ post_body = opts[:debug_body]
1891
+
1892
+ # return_type
1893
+ return_type = opts[:debug_return_type] || 'PartnerEntryContextSecretResponse'
1894
+
1895
+ # auth_names
1896
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
1897
+
1898
+ new_options = opts.merge(
1899
+ :operation => :"PartnersApi.rotate_partner_entry_context_secret_0",
1900
+ :header_params => header_params,
1901
+ :query_params => query_params,
1902
+ :form_params => form_params,
1903
+ :body => post_body,
1904
+ :auth_names => auth_names,
1905
+ :return_type => return_type
1906
+ )
1907
+
1908
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1909
+ if @api_client.config.debugging
1910
+ @api_client.config.logger.debug "API called: PartnersApi#rotate_partner_entry_context_secret_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1911
+ end
1912
+ return data, status_code, headers
1913
+ end
1914
+
1915
+ # Make a new secret for your webhook
1916
+ # Makes a new secret to sign your webhook with, and returns it in `webhookSecret`: **keep it now, it is shown once** and cannot be read again. Use it when the secret was lost, or may have leaked. The secret you had keeps signing beside the new one for a day, so that your receiver can switch without a call being rejected: during that day each call carries two signatures (see `updatePartnerNotificationSettings` for how they are verified). Rotating again within the day ends the overlap with the first secret. Retry this call with the same `Idempotency-Key` if its answer was lost: the answer, secret included, is then given again, and no second secret is made. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
1917
+ # @param partner_id [String] The partner whose webhook secret to replace
1918
+ # @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;).
1919
+ # @param [Hash] opts the optional parameters
1920
+ # @return [PartnerNotificationSettingsChangeResponse]
1921
+ def rotate_partner_webhook_secret_0(partner_id, idempotency_key, opts = {})
1922
+ data, _status_code, _headers = rotate_partner_webhook_secret_0_with_http_info(partner_id, idempotency_key, opts)
1923
+ data
1924
+ end
1925
+
1926
+ # Make a new secret for your webhook
1927
+ # Makes a new secret to sign your webhook with, and returns it in &#x60;webhookSecret&#x60;: **keep it now, it is shown once** and cannot be read again. Use it when the secret was lost, or may have leaked. The secret you had keeps signing beside the new one for a day, so that your receiver can switch without a call being rejected: during that day each call carries two signatures (see &#x60;updatePartnerNotificationSettings&#x60; for how they are verified). Rotating again within the day ends the overlap with the first secret. Retry this call with the same &#x60;Idempotency-Key&#x60; if its answer was lost: the answer, secret included, is then given again, and no second secret is made. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
1928
+ # @param partner_id [String] The partner whose webhook secret to replace
1929
+ # @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;).
1930
+ # @param [Hash] opts the optional parameters
1931
+ # @return [Array<(PartnerNotificationSettingsChangeResponse, Integer, Hash)>] PartnerNotificationSettingsChangeResponse data, response status code and response headers
1932
+ def rotate_partner_webhook_secret_0_with_http_info(partner_id, idempotency_key, opts = {})
1933
+ if @api_client.config.debugging
1934
+ @api_client.config.logger.debug 'Calling API: PartnersApi.rotate_partner_webhook_secret_0 ...'
1935
+ end
1936
+ # verify the required parameter 'partner_id' is set
1937
+ if @api_client.config.client_side_validation && partner_id.nil?
1938
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.rotate_partner_webhook_secret_0"
1939
+ end
1940
+ # verify the required parameter 'idempotency_key' is set
1941
+ if @api_client.config.client_side_validation && idempotency_key.nil?
1942
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling PartnersApi.rotate_partner_webhook_secret_0"
1943
+ end
1944
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
1945
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling PartnersApi.rotate_partner_webhook_secret_0, the character length must be smaller than or equal to 50.'
1946
+ end
1947
+
1948
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
1949
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling PartnersApi.rotate_partner_webhook_secret_0, the character length must be great than or equal to 8.'
1950
+ end
1951
+
1952
+ pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
1953
+ if @api_client.config.client_side_validation && idempotency_key !~ pattern
1954
+ fail ArgumentError, "invalid value for 'idempotency_key' when calling PartnersApi.rotate_partner_webhook_secret_0, must conform to the pattern #{pattern}."
1955
+ end
1956
+
1957
+ # resource path
1958
+ local_var_path = '/partners/{partnerId}/notifications/webhook-secret'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
1959
+
1960
+ # query parameters
1961
+ query_params = opts[:query_params] || {}
1962
+
1963
+ # header parameters
1964
+ header_params = opts[:header_params] || {}
1965
+ # HTTP header 'Accept' (if needed)
1966
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1967
+ header_params[:'Idempotency-Key'] = idempotency_key
1968
+
1969
+ # form parameters
1970
+ form_params = opts[:form_params] || {}
1971
+
1972
+ # http body (model)
1973
+ post_body = opts[:debug_body]
1974
+
1975
+ # return_type
1976
+ return_type = opts[:debug_return_type] || 'PartnerNotificationSettingsChangeResponse'
1977
+
1978
+ # auth_names
1979
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
1980
+
1981
+ new_options = opts.merge(
1982
+ :operation => :"PartnersApi.rotate_partner_webhook_secret_0",
1983
+ :header_params => header_params,
1984
+ :query_params => query_params,
1985
+ :form_params => form_params,
1986
+ :body => post_body,
1987
+ :auth_names => auth_names,
1988
+ :return_type => return_type
1989
+ )
1990
+
1991
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1992
+ if @api_client.config.debugging
1993
+ @api_client.config.logger.debug "API called: PartnersApi#rotate_partner_webhook_secret_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1994
+ end
1995
+ return data, status_code, headers
1996
+ end
1997
+
1998
+ # Send a test event to your webhook
1999
+ # Sends ONE signed call, right now, to the webhook address you saved under notification settings, with a sample of what an event of the type you name carries, and answers how it went: whether your receiver answered with a 2xx status, which status, how long it took, and why not when it did not arrive. Use it to write and try your receiver (above all the signature check) before a real event happens. The call is made like every other: it is signed with your current secret (and the previous one while a rotation overlaps), it carries the headers `webhook-id`, `webhook-timestamp`, `webhook-signature` and `x-widgetic-event` (the event type), and its body is `{ \"id\", \"type\", \"createdAt\", \"partnerId\", \"data\" }`. Three things differ. `id` starts with `evt_test_` and is new every time, so a receiver that remembers ids can tell a test from an event and drop it. `data` holds made-up values of the shape a real event of that type carries (`PartnerNotification` describes each), never anything about your account. And the call is made once: it is not tried again, nothing is stored, and it appears neither in the delivery log nor in the notification list. It is sent whatever `webhookEvents` says: a test is not filtered by what you subscribed to. The answer is 200 whether or not your receiver took the call (read `delivered`); a call that gets no answer within ten seconds is given up and reported as a `timeout`. A webhook address and a signing secret must be saved first (`updatePartnerNotificationSettings`); until then the answer is 409. This needs an API key with full access, and `Idempotency-Key` is required: a retry with the same key gets the first answer back and no second call is made. The caller must be the person who administers the partner, or a Widgetic administrator. Five tests a minute.
2000
+ # @param partner_id [String] The partner whose webhook to try
2001
+ # @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;).
2002
+ # @param partner_notification_test_event_request [PartnerNotificationTestEventRequest]
2003
+ # @param [Hash] opts the optional parameters
2004
+ # @return [PartnerNotificationTestEventResultResponse]
2005
+ def send_partner_notification_test_event_0(partner_id, idempotency_key, partner_notification_test_event_request, opts = {})
2006
+ data, _status_code, _headers = send_partner_notification_test_event_0_with_http_info(partner_id, idempotency_key, partner_notification_test_event_request, opts)
2007
+ data
2008
+ end
2009
+
2010
+ # Send a test event to your webhook
2011
+ # Sends ONE signed call, right now, to the webhook address you saved under notification settings, with a sample of what an event of the type you name carries, and answers how it went: whether your receiver answered with a 2xx status, which status, how long it took, and why not when it did not arrive. Use it to write and try your receiver (above all the signature check) before a real event happens. The call is made like every other: it is signed with your current secret (and the previous one while a rotation overlaps), it carries the headers &#x60;webhook-id&#x60;, &#x60;webhook-timestamp&#x60;, &#x60;webhook-signature&#x60; and &#x60;x-widgetic-event&#x60; (the event type), and its body is &#x60;{ \&quot;id\&quot;, \&quot;type\&quot;, \&quot;createdAt\&quot;, \&quot;partnerId\&quot;, \&quot;data\&quot; }&#x60;. Three things differ. &#x60;id&#x60; starts with &#x60;evt_test_&#x60; and is new every time, so a receiver that remembers ids can tell a test from an event and drop it. &#x60;data&#x60; holds made-up values of the shape a real event of that type carries (&#x60;PartnerNotification&#x60; describes each), never anything about your account. And the call is made once: it is not tried again, nothing is stored, and it appears neither in the delivery log nor in the notification list. It is sent whatever &#x60;webhookEvents&#x60; says: a test is not filtered by what you subscribed to. The answer is 200 whether or not your receiver took the call (read &#x60;delivered&#x60;); a call that gets no answer within ten seconds is given up and reported as a &#x60;timeout&#x60;. A webhook address and a signing secret must be saved first (&#x60;updatePartnerNotificationSettings&#x60;); until then the answer is 409. This needs an API key with full access, and &#x60;Idempotency-Key&#x60; is required: a retry with the same key gets the first answer back and no second call is made. The caller must be the person who administers the partner, or a Widgetic administrator. Five tests a minute.
2012
+ # @param partner_id [String] The partner whose webhook to try
2013
+ # @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;).
2014
+ # @param partner_notification_test_event_request [PartnerNotificationTestEventRequest]
2015
+ # @param [Hash] opts the optional parameters
2016
+ # @return [Array<(PartnerNotificationTestEventResultResponse, Integer, Hash)>] PartnerNotificationTestEventResultResponse data, response status code and response headers
2017
+ def send_partner_notification_test_event_0_with_http_info(partner_id, idempotency_key, partner_notification_test_event_request, opts = {})
2018
+ if @api_client.config.debugging
2019
+ @api_client.config.logger.debug 'Calling API: PartnersApi.send_partner_notification_test_event_0 ...'
2020
+ end
2021
+ # verify the required parameter 'partner_id' is set
2022
+ if @api_client.config.client_side_validation && partner_id.nil?
2023
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.send_partner_notification_test_event_0"
2024
+ end
2025
+ # verify the required parameter 'idempotency_key' is set
2026
+ if @api_client.config.client_side_validation && idempotency_key.nil?
2027
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling PartnersApi.send_partner_notification_test_event_0"
2028
+ end
2029
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 50
2030
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling PartnersApi.send_partner_notification_test_event_0, the character length must be smaller than or equal to 50.'
2031
+ end
2032
+
2033
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length < 8
2034
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling PartnersApi.send_partner_notification_test_event_0, the character length must be great than or equal to 8.'
2035
+ end
2036
+
2037
+ pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
2038
+ if @api_client.config.client_side_validation && idempotency_key !~ pattern
2039
+ fail ArgumentError, "invalid value for 'idempotency_key' when calling PartnersApi.send_partner_notification_test_event_0, must conform to the pattern #{pattern}."
2040
+ end
2041
+
2042
+ # verify the required parameter 'partner_notification_test_event_request' is set
2043
+ if @api_client.config.client_side_validation && partner_notification_test_event_request.nil?
2044
+ fail ArgumentError, "Missing the required parameter 'partner_notification_test_event_request' when calling PartnersApi.send_partner_notification_test_event_0"
2045
+ end
2046
+ # resource path
2047
+ local_var_path = '/partners/{partnerId}/notifications/test-event'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
2048
+
2049
+ # query parameters
2050
+ query_params = opts[:query_params] || {}
2051
+
2052
+ # header parameters
2053
+ header_params = opts[:header_params] || {}
2054
+ # HTTP header 'Accept' (if needed)
2055
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2056
+ # HTTP header 'Content-Type'
2057
+ content_type = @api_client.select_header_content_type(['application/json'])
2058
+ if !content_type.nil?
2059
+ header_params['Content-Type'] = content_type
2060
+ end
2061
+ header_params[:'Idempotency-Key'] = idempotency_key
2062
+
2063
+ # form parameters
2064
+ form_params = opts[:form_params] || {}
2065
+
2066
+ # http body (model)
2067
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(partner_notification_test_event_request)
2068
+
2069
+ # return_type
2070
+ return_type = opts[:debug_return_type] || 'PartnerNotificationTestEventResultResponse'
2071
+
2072
+ # auth_names
2073
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
2074
+
2075
+ new_options = opts.merge(
2076
+ :operation => :"PartnersApi.send_partner_notification_test_event_0",
2077
+ :header_params => header_params,
2078
+ :query_params => query_params,
2079
+ :form_params => form_params,
2080
+ :body => post_body,
2081
+ :auth_names => auth_names,
2082
+ :return_type => return_type
2083
+ )
2084
+
2085
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2086
+ if @api_client.config.debugging
2087
+ @api_client.config.logger.debug "API called: PartnersApi#send_partner_notification_test_event_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2088
+ end
2089
+ return data, status_code, headers
2090
+ end
2091
+
2092
+ # Connect an adapter key to a partner
2093
+ # Gives an adapter the key it needs to act through a service the partner has an account with, for the widgets of the customers the partner manages. Take the `adapterId` and `credentialKey` from `getPartnerAdapterConnections`. Saving a key that is already connected replaces it. **What Widgetic does with it.** The key is stored encrypted, bound to this partner, this adapter and this credential, so that a stored value cannot be moved to another. It is never returned, never logged and never shown to a visitor of a widget or to your customers. A server of Widgetic opens it for the one call a widget makes through the adapter, uses it to call the provider on the partner's behalf, and discards it. To cut that off, remove the key here, or revoke it with the provider. **What is checked.** That the adapter exists and takes this credential, that a partner may keep it (some are for an owner only) and that the text is one line of at most 2048 characters. Whether the provider accepts the key is not checked here: it shows the first time a widget uses it. A widget whose adapter has no key connected is not charged and does not run that adapter: its visitors are told the feature is unavailable, and the partner is told once a day what to connect. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator. A retry is harmless: saving the same key twice only refreshes when it was set.
2094
+ # @param partner_id [String] The partner that keeps the key
2095
+ # @param adapter_id [String] The adapter the key is for
2096
+ # @param credential_key [String] The key&#39;s name within the adapter
2097
+ # @param set_adapter_connection_request [SetAdapterConnectionRequest]
2098
+ # @param [Hash] opts the optional parameters
2099
+ # @return [SetUserAdapterConnection200Response]
2100
+ def set_partner_adapter_connection_0(partner_id, adapter_id, credential_key, set_adapter_connection_request, opts = {})
2101
+ data, _status_code, _headers = set_partner_adapter_connection_0_with_http_info(partner_id, adapter_id, credential_key, set_adapter_connection_request, opts)
2102
+ data
2103
+ end
2104
+
2105
+ # Connect an adapter key to a partner
2106
+ # Gives an adapter the key it needs to act through a service the partner has an account with, for the widgets of the customers the partner manages. Take the &#x60;adapterId&#x60; and &#x60;credentialKey&#x60; from &#x60;getPartnerAdapterConnections&#x60;. Saving a key that is already connected replaces it. **What Widgetic does with it.** The key is stored encrypted, bound to this partner, this adapter and this credential, so that a stored value cannot be moved to another. It is never returned, never logged and never shown to a visitor of a widget or to your customers. A server of Widgetic opens it for the one call a widget makes through the adapter, uses it to call the provider on the partner&#39;s behalf, and discards it. To cut that off, remove the key here, or revoke it with the provider. **What is checked.** That the adapter exists and takes this credential, that a partner may keep it (some are for an owner only) and that the text is one line of at most 2048 characters. Whether the provider accepts the key is not checked here: it shows the first time a widget uses it. A widget whose adapter has no key connected is not charged and does not run that adapter: its visitors are told the feature is unavailable, and the partner is told once a day what to connect. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator. A retry is harmless: saving the same key twice only refreshes when it was set.
2107
+ # @param partner_id [String] The partner that keeps the key
2108
+ # @param adapter_id [String] The adapter the key is for
2109
+ # @param credential_key [String] The key&#39;s name within the adapter
2110
+ # @param set_adapter_connection_request [SetAdapterConnectionRequest]
2111
+ # @param [Hash] opts the optional parameters
2112
+ # @return [Array<(SetUserAdapterConnection200Response, Integer, Hash)>] SetUserAdapterConnection200Response data, response status code and response headers
2113
+ def set_partner_adapter_connection_0_with_http_info(partner_id, adapter_id, credential_key, set_adapter_connection_request, opts = {})
2114
+ if @api_client.config.debugging
2115
+ @api_client.config.logger.debug 'Calling API: PartnersApi.set_partner_adapter_connection_0 ...'
2116
+ end
2117
+ # verify the required parameter 'partner_id' is set
2118
+ if @api_client.config.client_side_validation && partner_id.nil?
2119
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.set_partner_adapter_connection_0"
2120
+ end
2121
+ # verify the required parameter 'adapter_id' is set
2122
+ if @api_client.config.client_side_validation && adapter_id.nil?
2123
+ fail ArgumentError, "Missing the required parameter 'adapter_id' when calling PartnersApi.set_partner_adapter_connection_0"
2124
+ end
2125
+ if @api_client.config.client_side_validation && adapter_id.to_s.length > 40
2126
+ fail ArgumentError, 'invalid value for "adapter_id" when calling PartnersApi.set_partner_adapter_connection_0, the character length must be smaller than or equal to 40.'
2127
+ end
2128
+
2129
+ # verify the required parameter 'credential_key' is set
2130
+ if @api_client.config.client_side_validation && credential_key.nil?
2131
+ fail ArgumentError, "Missing the required parameter 'credential_key' when calling PartnersApi.set_partner_adapter_connection_0"
2132
+ end
2133
+ if @api_client.config.client_side_validation && credential_key.to_s.length > 40
2134
+ fail ArgumentError, 'invalid value for "credential_key" when calling PartnersApi.set_partner_adapter_connection_0, the character length must be smaller than or equal to 40.'
2135
+ end
2136
+
2137
+ # verify the required parameter 'set_adapter_connection_request' is set
2138
+ if @api_client.config.client_side_validation && set_adapter_connection_request.nil?
2139
+ fail ArgumentError, "Missing the required parameter 'set_adapter_connection_request' when calling PartnersApi.set_partner_adapter_connection_0"
2140
+ end
2141
+ # resource path
2142
+ local_var_path = '/partners/{partnerId}/adapter-connections/{adapterId}/{credentialKey}'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s)).sub('{' + 'adapterId' + '}', CGI.escape(adapter_id.to_s)).sub('{' + 'credentialKey' + '}', CGI.escape(credential_key.to_s))
2143
+
2144
+ # query parameters
2145
+ query_params = opts[:query_params] || {}
2146
+
2147
+ # header parameters
2148
+ header_params = opts[:header_params] || {}
2149
+ # HTTP header 'Accept' (if needed)
2150
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2151
+ # HTTP header 'Content-Type'
2152
+ content_type = @api_client.select_header_content_type(['application/json'])
2153
+ if !content_type.nil?
2154
+ header_params['Content-Type'] = content_type
2155
+ end
2156
+
2157
+ # form parameters
2158
+ form_params = opts[:form_params] || {}
2159
+
2160
+ # http body (model)
2161
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(set_adapter_connection_request)
2162
+
2163
+ # return_type
2164
+ return_type = opts[:debug_return_type] || 'SetUserAdapterConnection200Response'
2165
+
2166
+ # auth_names
2167
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
2168
+
2169
+ new_options = opts.merge(
2170
+ :operation => :"PartnersApi.set_partner_adapter_connection_0",
2171
+ :header_params => header_params,
2172
+ :query_params => query_params,
2173
+ :form_params => form_params,
2174
+ :body => post_body,
2175
+ :auth_names => auth_names,
2176
+ :return_type => return_type
2177
+ )
2178
+
2179
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2180
+ if @api_client.config.debugging
2181
+ @api_client.config.logger.debug "API called: PartnersApi#set_partner_adapter_connection_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2182
+ end
2183
+ return data, status_code, headers
2184
+ end
2185
+
2186
+ # Keep the data of a partner's compositions in a Neon database of its own
2187
+ # Points the partner at a Neon database of its own. From then on, what visitors leave in the compositions of the partner's managed users, and of the compositions made in the partner's own account (the votes, ratings, answers and form submissions of the widgets that collect them), is stored in that database and nowhere else. Widgetic's own database is not used for them any more, and nothing of it is copied there. **What to give.** The connection string of a Neon database and a role made for this, as Neon shows it under *Connect* (`postgresql://<role>:<password>@ep-<name>.<region>.aws.neon.tech/<database>`). Only Neon databases are accepted; a string for any other host is refused with 400. What the database needs: - an empty database of its own, so that nothing else of yours shares it. Widgetic makes one schema in it for each composition (named `comp_` followed by the composition's id). In that schema go the tables the widget declares for what its visitors leave, and two small tables of Widgetic's own, whose names start with `_widgetic_`: the context a host page sent with an entry, and how far Widgetic has read the entries to tell you about new ones. It touches nothing else; - a role that may create schemas and tables in it (the CREATE privilege on the database). The role Neon makes with a project has it. A role made in the Neon console can also read and write every other database of the same project, so if you keep other data in Neon give Widgetic a project of its own, or make the role with SQL (`CREATE ROLE ... LOGIN PASSWORD ...`) and grant it only the CREATE privilege on this database; - connections from anywhere: Widgetic's addresses are not fixed, so a Neon project that only accepts connections from an allow list of addresses cannot be used. A suspended compute is fine: it wakes on the first request. **It is checked before it is saved.** Widgetic makes a schema in your database, creates a table in it, writes a row, reads it back, and removes the schema again, all in one step, so that nothing is left if anything fails. If it cannot be done nothing is saved and the answer is 422 `PARTNER_DATABASE_UNVERIFIED`: `details.reason` says why (`INVALID_CREDENTIALS`, `DATABASE_NOT_FOUND`, `ACCESS_DENIED`, `ACCESS_BLOCKED`, `ENDPOINT_NOT_FOUND`, `ENDPOINT_UNREACHABLE`, `TIMEOUT`, `READ_ONLY`, `RATE_LIMITED`, `DATABASE_UNAVAILABLE`, `PROBE_MISMATCH` or `DATABASE_ERROR`) and `message` says what to do. **Existing data does not move.** The data of a composition lives in one database. If any composition of the partner already keeps data somewhere else (in Widgetic's database, or in the database you had set), and the new database does not hold it, the change is refused with 409 `PARTNER_DATABASE_HOLDS_DATA` and nothing is changed: those compositions would read as empty from then on. `details.compositionsWithData` says how many. Set your database before your customers collect data, or delete the compositions you no longer need. Saving the same database again (a new password) moves nothing and is never refused. **It is never a fallback.** Once a database is set, a request that needs it while it cannot be used (the password was changed, the project was deleted) is refused with 503 `PARTNER_DATABASE_UNAVAILABLE`. What the visitor sent is not stored with Widgetic instead. Fix the connection and set the database again, or check it with `verifyPartnerDataDatabase`. **When it takes effect.** A change reaches every part of Widgetic within about a minute. **What Widgetic keeps.** The connection string is stored encrypted and is never returned or logged; a response shows the host, the database and the role, never the password. Widgetic's servers open it to read and write the data of your compositions while they handle a request for it. To cut that off, change the role's password in Neon: the compositions stop saving until you set the new string. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator. A retry is harmless: saving the same database twice only refreshes when it was checked and saved.
2188
+ # @param partner_id [String] The partner whose database to set
2189
+ # @param set_partner_data_database_request [SetPartnerDataDatabaseRequest]
2190
+ # @param [Hash] opts the optional parameters
2191
+ # @return [PartnerDataDatabaseResponse]
2192
+ def set_partner_data_database_0(partner_id, set_partner_data_database_request, opts = {})
2193
+ data, _status_code, _headers = set_partner_data_database_0_with_http_info(partner_id, set_partner_data_database_request, opts)
2194
+ data
2195
+ end
2196
+
2197
+ # Keep the data of a partner&#39;s compositions in a Neon database of its own
2198
+ # Points the partner at a Neon database of its own. From then on, what visitors leave in the compositions of the partner&#39;s managed users, and of the compositions made in the partner&#39;s own account (the votes, ratings, answers and form submissions of the widgets that collect them), is stored in that database and nowhere else. Widgetic&#39;s own database is not used for them any more, and nothing of it is copied there. **What to give.** The connection string of a Neon database and a role made for this, as Neon shows it under *Connect* (&#x60;postgresql://&lt;role&gt;:&lt;password&gt;@ep-&lt;name&gt;.&lt;region&gt;.aws.neon.tech/&lt;database&gt;&#x60;). Only Neon databases are accepted; a string for any other host is refused with 400. What the database needs: - an empty database of its own, so that nothing else of yours shares it. Widgetic makes one schema in it for each composition (named &#x60;comp_&#x60; followed by the composition&#39;s id). In that schema go the tables the widget declares for what its visitors leave, and two small tables of Widgetic&#39;s own, whose names start with &#x60;_widgetic_&#x60;: the context a host page sent with an entry, and how far Widgetic has read the entries to tell you about new ones. It touches nothing else; - a role that may create schemas and tables in it (the CREATE privilege on the database). The role Neon makes with a project has it. A role made in the Neon console can also read and write every other database of the same project, so if you keep other data in Neon give Widgetic a project of its own, or make the role with SQL (&#x60;CREATE ROLE ... LOGIN PASSWORD ...&#x60;) and grant it only the CREATE privilege on this database; - connections from anywhere: Widgetic&#39;s addresses are not fixed, so a Neon project that only accepts connections from an allow list of addresses cannot be used. A suspended compute is fine: it wakes on the first request. **It is checked before it is saved.** Widgetic makes a schema in your database, creates a table in it, writes a row, reads it back, and removes the schema again, all in one step, so that nothing is left if anything fails. If it cannot be done nothing is saved and the answer is 422 &#x60;PARTNER_DATABASE_UNVERIFIED&#x60;: &#x60;details.reason&#x60; says why (&#x60;INVALID_CREDENTIALS&#x60;, &#x60;DATABASE_NOT_FOUND&#x60;, &#x60;ACCESS_DENIED&#x60;, &#x60;ACCESS_BLOCKED&#x60;, &#x60;ENDPOINT_NOT_FOUND&#x60;, &#x60;ENDPOINT_UNREACHABLE&#x60;, &#x60;TIMEOUT&#x60;, &#x60;READ_ONLY&#x60;, &#x60;RATE_LIMITED&#x60;, &#x60;DATABASE_UNAVAILABLE&#x60;, &#x60;PROBE_MISMATCH&#x60; or &#x60;DATABASE_ERROR&#x60;) and &#x60;message&#x60; says what to do. **Existing data does not move.** The data of a composition lives in one database. If any composition of the partner already keeps data somewhere else (in Widgetic&#39;s database, or in the database you had set), and the new database does not hold it, the change is refused with 409 &#x60;PARTNER_DATABASE_HOLDS_DATA&#x60; and nothing is changed: those compositions would read as empty from then on. &#x60;details.compositionsWithData&#x60; says how many. Set your database before your customers collect data, or delete the compositions you no longer need. Saving the same database again (a new password) moves nothing and is never refused. **It is never a fallback.** Once a database is set, a request that needs it while it cannot be used (the password was changed, the project was deleted) is refused with 503 &#x60;PARTNER_DATABASE_UNAVAILABLE&#x60;. What the visitor sent is not stored with Widgetic instead. Fix the connection and set the database again, or check it with &#x60;verifyPartnerDataDatabase&#x60;. **When it takes effect.** A change reaches every part of Widgetic within about a minute. **What Widgetic keeps.** The connection string is stored encrypted and is never returned or logged; a response shows the host, the database and the role, never the password. Widgetic&#39;s servers open it to read and write the data of your compositions while they handle a request for it. To cut that off, change the role&#39;s password in Neon: the compositions stop saving until you set the new string. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator. A retry is harmless: saving the same database twice only refreshes when it was checked and saved.
2199
+ # @param partner_id [String] The partner whose database to set
2200
+ # @param set_partner_data_database_request [SetPartnerDataDatabaseRequest]
2201
+ # @param [Hash] opts the optional parameters
2202
+ # @return [Array<(PartnerDataDatabaseResponse, Integer, Hash)>] PartnerDataDatabaseResponse data, response status code and response headers
2203
+ def set_partner_data_database_0_with_http_info(partner_id, set_partner_data_database_request, opts = {})
2204
+ if @api_client.config.debugging
2205
+ @api_client.config.logger.debug 'Calling API: PartnersApi.set_partner_data_database_0 ...'
2206
+ end
2207
+ # verify the required parameter 'partner_id' is set
2208
+ if @api_client.config.client_side_validation && partner_id.nil?
2209
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.set_partner_data_database_0"
2210
+ end
2211
+ # verify the required parameter 'set_partner_data_database_request' is set
2212
+ if @api_client.config.client_side_validation && set_partner_data_database_request.nil?
2213
+ fail ArgumentError, "Missing the required parameter 'set_partner_data_database_request' when calling PartnersApi.set_partner_data_database_0"
2214
+ end
2215
+ # resource path
2216
+ local_var_path = '/partners/{partnerId}/data-database'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
2217
+
2218
+ # query parameters
2219
+ query_params = opts[:query_params] || {}
2220
+
2221
+ # header parameters
2222
+ header_params = opts[:header_params] || {}
2223
+ # HTTP header 'Accept' (if needed)
2224
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2225
+ # HTTP header 'Content-Type'
2226
+ content_type = @api_client.select_header_content_type(['application/json'])
2227
+ if !content_type.nil?
2228
+ header_params['Content-Type'] = content_type
2229
+ end
2230
+
2231
+ # form parameters
2232
+ form_params = opts[:form_params] || {}
2233
+
2234
+ # http body (model)
2235
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(set_partner_data_database_request)
2236
+
2237
+ # return_type
2238
+ return_type = opts[:debug_return_type] || 'PartnerDataDatabaseResponse'
2239
+
2240
+ # auth_names
2241
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
2242
+
2243
+ new_options = opts.merge(
2244
+ :operation => :"PartnersApi.set_partner_data_database_0",
2245
+ :header_params => header_params,
2246
+ :query_params => query_params,
2247
+ :form_params => form_params,
2248
+ :body => post_body,
2249
+ :auth_names => auth_names,
2250
+ :return_type => return_type
2251
+ )
2252
+
2253
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2254
+ if @api_client.config.debugging
2255
+ @api_client.config.logger.debug "API called: PartnersApi#set_partner_data_database_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2256
+ end
2257
+ return data, status_code, headers
2258
+ end
2259
+
2260
+ # Set or clear partner-wide design defaults
2261
+ # Send `{ \"design\": { ... } }` or `{ \"design\": null }` to remove. New compositions merge this layer over the widget base and under each managed user's default and the request body.
2262
+ # @param partner_id [String]
2263
+ # @param set_partner_design_defaults_request [SetPartnerDesignDefaultsRequest]
2264
+ # @param [Hash] opts the optional parameters
2265
+ # @return [GetPartnerDesignDefaults200Response]
2266
+ def set_partner_design_defaults_0(partner_id, set_partner_design_defaults_request, opts = {})
2267
+ data, _status_code, _headers = set_partner_design_defaults_0_with_http_info(partner_id, set_partner_design_defaults_request, opts)
2268
+ data
2269
+ end
2270
+
2271
+ # Set or clear partner-wide design defaults
2272
+ # Send &#x60;{ \&quot;design\&quot;: { ... } }&#x60; or &#x60;{ \&quot;design\&quot;: null }&#x60; to remove. New compositions merge this layer over the widget base and under each managed user&#39;s default and the request body.
2273
+ # @param partner_id [String]
2274
+ # @param set_partner_design_defaults_request [SetPartnerDesignDefaultsRequest]
2275
+ # @param [Hash] opts the optional parameters
2276
+ # @return [Array<(GetPartnerDesignDefaults200Response, Integer, Hash)>] GetPartnerDesignDefaults200Response data, response status code and response headers
2277
+ def set_partner_design_defaults_0_with_http_info(partner_id, set_partner_design_defaults_request, opts = {})
2278
+ if @api_client.config.debugging
2279
+ @api_client.config.logger.debug 'Calling API: PartnersApi.set_partner_design_defaults_0 ...'
2280
+ end
2281
+ # verify the required parameter 'partner_id' is set
2282
+ if @api_client.config.client_side_validation && partner_id.nil?
2283
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.set_partner_design_defaults_0"
2284
+ end
2285
+ # verify the required parameter 'set_partner_design_defaults_request' is set
2286
+ if @api_client.config.client_side_validation && set_partner_design_defaults_request.nil?
2287
+ fail ArgumentError, "Missing the required parameter 'set_partner_design_defaults_request' when calling PartnersApi.set_partner_design_defaults_0"
2288
+ end
2289
+ # resource path
2290
+ local_var_path = '/partners/{partnerId}/design-defaults'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
2291
+
2292
+ # query parameters
2293
+ query_params = opts[:query_params] || {}
2294
+
2295
+ # header parameters
2296
+ header_params = opts[:header_params] || {}
2297
+ # HTTP header 'Accept' (if needed)
2298
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2299
+ # HTTP header 'Content-Type'
2300
+ content_type = @api_client.select_header_content_type(['application/json'])
2301
+ if !content_type.nil?
2302
+ header_params['Content-Type'] = content_type
2303
+ end
2304
+
2305
+ # form parameters
2306
+ form_params = opts[:form_params] || {}
2307
+
2308
+ # http body (model)
2309
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(set_partner_design_defaults_request)
2310
+
2311
+ # return_type
2312
+ return_type = opts[:debug_return_type] || 'GetPartnerDesignDefaults200Response'
2313
+
2314
+ # auth_names
2315
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
2316
+
2317
+ new_options = opts.merge(
2318
+ :operation => :"PartnersApi.set_partner_design_defaults_0",
2319
+ :header_params => header_params,
2320
+ :query_params => query_params,
2321
+ :form_params => form_params,
2322
+ :body => post_body,
2323
+ :auth_names => auth_names,
2324
+ :return_type => return_type
2325
+ )
2326
+
2327
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2328
+ if @api_client.config.debugging
2329
+ @api_client.config.logger.debug "API called: PartnersApi#set_partner_design_defaults_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2330
+ end
2331
+ return data, status_code, headers
2332
+ end
2333
+
2334
+ # Make a widget a preset, or replace a preset
2335
+ # Offers one of the partner's own widgets as a preset under `key`. If the partner already has a preset under that key it is replaced, so sending the same request twice is safe. Saving replaces the whole preset: a `title`, `description` or `position` you leave out goes back to its default. Keys are 1 to 64 characters: lowercase letters, digits, hyphens and underscores, the first a letter or a digit (`rating`, `quiz-3`). The widget must belong to the partner's account; a widget that does not exist and one that belongs to somebody else are refused in the same way (404 `PRESET_WIDGET_NOT_FOUND`). A widget is a preset under at most one key (409 `PRESET_WIDGET_ALREADY_USED`; `details.key` says which), and an account can have at most 100 presets (409 `PRESET_LIMIT_REACHED`). Later changes to the widget reach new copies and new compositions; copies made earlier are not touched. Deleting the widget removes its preset.
2336
+ # @param partner_id [String] The partner whose preset to set
2337
+ # @param key [String] The name your code uses for the preset
2338
+ # @param set_partner_preset_request [SetPartnerPresetRequest]
2339
+ # @param [Hash] opts the optional parameters
2340
+ # @return [PartnerPresetResponse]
2341
+ def set_partner_preset_0(partner_id, key, set_partner_preset_request, opts = {})
2342
+ data, _status_code, _headers = set_partner_preset_0_with_http_info(partner_id, key, set_partner_preset_request, opts)
2343
+ data
2344
+ end
2345
+
2346
+ # Make a widget a preset, or replace a preset
2347
+ # Offers one of the partner&#39;s own widgets as a preset under &#x60;key&#x60;. If the partner already has a preset under that key it is replaced, so sending the same request twice is safe. Saving replaces the whole preset: a &#x60;title&#x60;, &#x60;description&#x60; or &#x60;position&#x60; you leave out goes back to its default. Keys are 1 to 64 characters: lowercase letters, digits, hyphens and underscores, the first a letter or a digit (&#x60;rating&#x60;, &#x60;quiz-3&#x60;). The widget must belong to the partner&#39;s account; a widget that does not exist and one that belongs to somebody else are refused in the same way (404 &#x60;PRESET_WIDGET_NOT_FOUND&#x60;). A widget is a preset under at most one key (409 &#x60;PRESET_WIDGET_ALREADY_USED&#x60;; &#x60;details.key&#x60; says which), and an account can have at most 100 presets (409 &#x60;PRESET_LIMIT_REACHED&#x60;). Later changes to the widget reach new copies and new compositions; copies made earlier are not touched. Deleting the widget removes its preset.
2348
+ # @param partner_id [String] The partner whose preset to set
2349
+ # @param key [String] The name your code uses for the preset
2350
+ # @param set_partner_preset_request [SetPartnerPresetRequest]
2351
+ # @param [Hash] opts the optional parameters
2352
+ # @return [Array<(PartnerPresetResponse, Integer, Hash)>] PartnerPresetResponse data, response status code and response headers
2353
+ def set_partner_preset_0_with_http_info(partner_id, key, set_partner_preset_request, opts = {})
2354
+ if @api_client.config.debugging
2355
+ @api_client.config.logger.debug 'Calling API: PartnersApi.set_partner_preset_0 ...'
2356
+ end
2357
+ # verify the required parameter 'partner_id' is set
2358
+ if @api_client.config.client_side_validation && partner_id.nil?
2359
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.set_partner_preset_0"
2360
+ end
2361
+ # verify the required parameter 'key' is set
2362
+ if @api_client.config.client_side_validation && key.nil?
2363
+ fail ArgumentError, "Missing the required parameter 'key' when calling PartnersApi.set_partner_preset_0"
2364
+ end
2365
+ pattern = Regexp.new(/^[a-z0-9][a-z0-9_-]{0,63}$/)
2366
+ if @api_client.config.client_side_validation && key !~ pattern
2367
+ fail ArgumentError, "invalid value for 'key' when calling PartnersApi.set_partner_preset_0, must conform to the pattern #{pattern}."
2368
+ end
2369
+
2370
+ # verify the required parameter 'set_partner_preset_request' is set
2371
+ if @api_client.config.client_side_validation && set_partner_preset_request.nil?
2372
+ fail ArgumentError, "Missing the required parameter 'set_partner_preset_request' when calling PartnersApi.set_partner_preset_0"
2373
+ end
2374
+ # resource path
2375
+ local_var_path = '/partners/{partnerId}/presets/{key}'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
2376
+
2377
+ # query parameters
2378
+ query_params = opts[:query_params] || {}
2379
+
2380
+ # header parameters
2381
+ header_params = opts[:header_params] || {}
2382
+ # HTTP header 'Accept' (if needed)
2383
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2384
+ # HTTP header 'Content-Type'
2385
+ content_type = @api_client.select_header_content_type(['application/json'])
2386
+ if !content_type.nil?
2387
+ header_params['Content-Type'] = content_type
2388
+ end
2389
+
2390
+ # form parameters
2391
+ form_params = opts[:form_params] || {}
2392
+
2393
+ # http body (model)
2394
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(set_partner_preset_request)
2395
+
2396
+ # return_type
2397
+ return_type = opts[:debug_return_type] || 'PartnerPresetResponse'
2398
+
2399
+ # auth_names
2400
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
2401
+
2402
+ new_options = opts.merge(
2403
+ :operation => :"PartnersApi.set_partner_preset_0",
2404
+ :header_params => header_params,
2405
+ :query_params => query_params,
2406
+ :form_params => form_params,
2407
+ :body => post_body,
2408
+ :auth_names => auth_names,
2409
+ :return_type => return_type
2410
+ )
2411
+
2412
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2413
+ if @api_client.config.debugging
2414
+ @api_client.config.logger.debug "API called: PartnersApi#set_partner_preset_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2415
+ end
2416
+ return data, status_code, headers
2417
+ end
2418
+
2419
+ # Set where a partner's uploaded files are stored
2420
+ # Points the partner at a bucket of its own on an S3-compatible service (Cloudflare R2, Amazon S3, Wasabi, MinIO and the like). From then on, every file the account that administers the partner stores is kept in that bucket instead of with Widgetic, whichever way it arrives: a file sent with `uploadsPost` (with an API key, an SDK token, an editor session or from the Widgetic website), a resumable upload, the media library, and the files the agent tools and the MCP server save. It takes none of the account's storage allowance, and its `url` is served from `publicBaseUrl`. The chunks of a resumable upload wait in Widgetic's temporary staging area until it is completed and are removed then: the finished file is stored in your bucket and nowhere else. A destination is required. Partner storage is not optional: your customers' files, and your own however they arrive, are kept in this destination and nowhere else. An editor session (`createManagedUserEditorSession`) of any surface cannot be made until a destination is set (409 `PARTNER_STORAGE_REQUIRED`), a destination removed later stops the uploads of the sessions already made (the same 409), and your own upload with no destination (on any route, including a resumable upload, which is refused when it is started) is refused in the same way instead of being stored with Widgetic. A partner cannot be activated until it has a destination that works. The destination is checked before it is saved. Widgetic writes a small test file under `<keyPrefix>widgetic-check/`, reads it back from `<publicBaseUrl>/<its key>`, and deletes it. If any step fails nothing is saved and the answer is 422 `STORAGE_DESTINATION_UNVERIFIED`: `details.step` says where (`endpoint`, `write` or `public_read`), `details.reason` says why, and `param` names the field most likely to be wrong. What the bucket needs: - an access key that may put objects into it (it may also delete objects, which lets the test file be cleaned up, but that is not required); - its files publicly readable at `publicBaseUrl`, either because the bucket is public or through a CDN. The secret access key is stored encrypted and is never returned or logged; a response shows only the last four characters of the access key id (`accessKeyHint`). Saving replaces the whole destination, so send every field again, including the secret. Files already stored stay where they are, and keep working for as long as that bucket stays publicly readable. Once a destination is set, an upload is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 `STORAGE_DESTINATION_UNAVAILABLE`, and when the bucket rejects the file with 502 `STORAGE_DESTINATION_WRITE_FAILED`. The caller must be the person who administers the partner (an API key of that account works); anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can set any partner's.
2421
+ # @param partner_id [String] The partner whose storage destination to set
2422
+ # @param set_partner_storage_destination_request [SetPartnerStorageDestinationRequest]
2423
+ # @param [Hash] opts the optional parameters
2424
+ # @return [PartnerStorageDestinationResponse]
2425
+ def set_partner_storage_destination_0(partner_id, set_partner_storage_destination_request, opts = {})
2426
+ data, _status_code, _headers = set_partner_storage_destination_0_with_http_info(partner_id, set_partner_storage_destination_request, opts)
2427
+ data
2428
+ end
2429
+
2430
+ # Set where a partner&#39;s uploaded files are stored
2431
+ # Points the partner at a bucket of its own on an S3-compatible service (Cloudflare R2, Amazon S3, Wasabi, MinIO and the like). From then on, every file the account that administers the partner stores is kept in that bucket instead of with Widgetic, whichever way it arrives: a file sent with &#x60;uploadsPost&#x60; (with an API key, an SDK token, an editor session or from the Widgetic website), a resumable upload, the media library, and the files the agent tools and the MCP server save. It takes none of the account&#39;s storage allowance, and its &#x60;url&#x60; is served from &#x60;publicBaseUrl&#x60;. The chunks of a resumable upload wait in Widgetic&#39;s temporary staging area until it is completed and are removed then: the finished file is stored in your bucket and nowhere else. A destination is required. Partner storage is not optional: your customers&#39; files, and your own however they arrive, are kept in this destination and nowhere else. An editor session (&#x60;createManagedUserEditorSession&#x60;) of any surface cannot be made until a destination is set (409 &#x60;PARTNER_STORAGE_REQUIRED&#x60;), a destination removed later stops the uploads of the sessions already made (the same 409), and your own upload with no destination (on any route, including a resumable upload, which is refused when it is started) is refused in the same way instead of being stored with Widgetic. A partner cannot be activated until it has a destination that works. The destination is checked before it is saved. Widgetic writes a small test file under &#x60;&lt;keyPrefix&gt;widgetic-check/&#x60;, reads it back from &#x60;&lt;publicBaseUrl&gt;/&lt;its key&gt;&#x60;, and deletes it. If any step fails nothing is saved and the answer is 422 &#x60;STORAGE_DESTINATION_UNVERIFIED&#x60;: &#x60;details.step&#x60; says where (&#x60;endpoint&#x60;, &#x60;write&#x60; or &#x60;public_read&#x60;), &#x60;details.reason&#x60; says why, and &#x60;param&#x60; names the field most likely to be wrong. What the bucket needs: - an access key that may put objects into it (it may also delete objects, which lets the test file be cleaned up, but that is not required); - its files publicly readable at &#x60;publicBaseUrl&#x60;, either because the bucket is public or through a CDN. The secret access key is stored encrypted and is never returned or logged; a response shows only the last four characters of the access key id (&#x60;accessKeyHint&#x60;). Saving replaces the whole destination, so send every field again, including the secret. Files already stored stay where they are, and keep working for as long as that bucket stays publicly readable. Once a destination is set, an upload is never stored with Widgetic instead: when the destination cannot be used the upload is refused with 503 &#x60;STORAGE_DESTINATION_UNAVAILABLE&#x60;, and when the bucket rejects the file with 502 &#x60;STORAGE_DESTINATION_WRITE_FAILED&#x60;. The caller must be the person who administers the partner (an API key of that account works); anyone else is refused with 403 whether or not the partner exists. Widgetic administrators can set any partner&#39;s.
2432
+ # @param partner_id [String] The partner whose storage destination to set
2433
+ # @param set_partner_storage_destination_request [SetPartnerStorageDestinationRequest]
2434
+ # @param [Hash] opts the optional parameters
2435
+ # @return [Array<(PartnerStorageDestinationResponse, Integer, Hash)>] PartnerStorageDestinationResponse data, response status code and response headers
2436
+ def set_partner_storage_destination_0_with_http_info(partner_id, set_partner_storage_destination_request, opts = {})
2437
+ if @api_client.config.debugging
2438
+ @api_client.config.logger.debug 'Calling API: PartnersApi.set_partner_storage_destination_0 ...'
2439
+ end
2440
+ # verify the required parameter 'partner_id' is set
2441
+ if @api_client.config.client_side_validation && partner_id.nil?
2442
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.set_partner_storage_destination_0"
2443
+ end
2444
+ # verify the required parameter 'set_partner_storage_destination_request' is set
2445
+ if @api_client.config.client_side_validation && set_partner_storage_destination_request.nil?
2446
+ fail ArgumentError, "Missing the required parameter 'set_partner_storage_destination_request' when calling PartnersApi.set_partner_storage_destination_0"
2447
+ end
2448
+ # resource path
2449
+ local_var_path = '/partners/{partnerId}/storage'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
2450
+
2451
+ # query parameters
2452
+ query_params = opts[:query_params] || {}
2453
+
2454
+ # header parameters
2455
+ header_params = opts[:header_params] || {}
2456
+ # HTTP header 'Accept' (if needed)
2457
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2458
+ # HTTP header 'Content-Type'
2459
+ content_type = @api_client.select_header_content_type(['application/json'])
2460
+ if !content_type.nil?
2461
+ header_params['Content-Type'] = content_type
2462
+ end
2463
+
2464
+ # form parameters
2465
+ form_params = opts[:form_params] || {}
2466
+
2467
+ # http body (model)
2468
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(set_partner_storage_destination_request)
2469
+
2470
+ # return_type
2471
+ return_type = opts[:debug_return_type] || 'PartnerStorageDestinationResponse'
2472
+
2473
+ # auth_names
2474
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
2475
+
2476
+ new_options = opts.merge(
2477
+ :operation => :"PartnersApi.set_partner_storage_destination_0",
2478
+ :header_params => header_params,
2479
+ :query_params => query_params,
2480
+ :form_params => form_params,
2481
+ :body => post_body,
2482
+ :auth_names => auth_names,
2483
+ :return_type => return_type
2484
+ )
2485
+
2486
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2487
+ if @api_client.config.debugging
2488
+ @api_client.config.logger.debug "API called: PartnersApi#set_partner_storage_destination_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2489
+ end
2490
+ return data, status_code, headers
2491
+ end
2492
+
2493
+ # Require a signed context, or stop requiring it
2494
+ # Chooses what the gateway does with an entry whose `context` carries no valid signature. With `required: false` (the default) an entry that carries a signature is checked and refused when the signature is wrong or out of date, and an entry that carries none is accepted, as it always was. With `required: true` an entry without a valid signature is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`: use it once every page of yours that embeds a composition signs its context. Signatures cannot be required before you have made a secret (`rotatePartnerEntryContextSecret`): the answer is 409, so that you cannot lock your own compositions out of taking entries. The change reaches every part of the gateway within a minute. Saving the same choice twice leaves the same state, so a retry is harmless and `Idempotency-Key` is optional. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
2495
+ # @param partner_id [String] The partner whose context signing to change
2496
+ # @param update_partner_entry_context_signing_request [UpdatePartnerEntryContextSigningRequest]
2497
+ # @param [Hash] opts the optional parameters
2498
+ # @option opts [String] :idempotency_key Optional: without it the call is carried out every time it is sent. 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;).
2499
+ # @return [PartnerEntryContextSigningResponse]
2500
+ def update_partner_entry_context_signing_0(partner_id, update_partner_entry_context_signing_request, opts = {})
2501
+ data, _status_code, _headers = update_partner_entry_context_signing_0_with_http_info(partner_id, update_partner_entry_context_signing_request, opts)
2502
+ data
2503
+ end
2504
+
2505
+ # Require a signed context, or stop requiring it
2506
+ # Chooses what the gateway does with an entry whose &#x60;context&#x60; carries no valid signature. With &#x60;required: false&#x60; (the default) an entry that carries a signature is checked and refused when the signature is wrong or out of date, and an entry that carries none is accepted, as it always was. With &#x60;required: true&#x60; an entry without a valid signature is refused with 403 &#x60;CONTEXT_SIGNATURE_REQUIRED&#x60;: use it once every page of yours that embeds a composition signs its context. Signatures cannot be required before you have made a secret (&#x60;rotatePartnerEntryContextSecret&#x60;): the answer is 409, so that you cannot lock your own compositions out of taking entries. The change reaches every part of the gateway within a minute. Saving the same choice twice leaves the same state, so a retry is harmless and &#x60;Idempotency-Key&#x60; is optional. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
2507
+ # @param partner_id [String] The partner whose context signing to change
2508
+ # @param update_partner_entry_context_signing_request [UpdatePartnerEntryContextSigningRequest]
2509
+ # @param [Hash] opts the optional parameters
2510
+ # @option opts [String] :idempotency_key Optional: without it the call is carried out every time it is sent. 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;).
2511
+ # @return [Array<(PartnerEntryContextSigningResponse, Integer, Hash)>] PartnerEntryContextSigningResponse data, response status code and response headers
2512
+ def update_partner_entry_context_signing_0_with_http_info(partner_id, update_partner_entry_context_signing_request, opts = {})
2513
+ if @api_client.config.debugging
2514
+ @api_client.config.logger.debug 'Calling API: PartnersApi.update_partner_entry_context_signing_0 ...'
2515
+ end
2516
+ # verify the required parameter 'partner_id' is set
2517
+ if @api_client.config.client_side_validation && partner_id.nil?
2518
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.update_partner_entry_context_signing_0"
2519
+ end
2520
+ # verify the required parameter 'update_partner_entry_context_signing_request' is set
2521
+ if @api_client.config.client_side_validation && update_partner_entry_context_signing_request.nil?
2522
+ fail ArgumentError, "Missing the required parameter 'update_partner_entry_context_signing_request' when calling PartnersApi.update_partner_entry_context_signing_0"
2523
+ end
2524
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 50
2525
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling PartnersApi.update_partner_entry_context_signing_0, the character length must be smaller than or equal to 50.'
2526
+ end
2527
+
2528
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 8
2529
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling PartnersApi.update_partner_entry_context_signing_0, the character length must be great than or equal to 8.'
2530
+ end
2531
+
2532
+ pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
2533
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'] !~ pattern
2534
+ fail ArgumentError, "invalid value for 'opts[:\"idempotency_key\"]' when calling PartnersApi.update_partner_entry_context_signing_0, must conform to the pattern #{pattern}."
2535
+ end
2536
+
2537
+ # resource path
2538
+ local_var_path = '/partners/{partnerId}/entry-context-signing'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
2539
+
2540
+ # query parameters
2541
+ query_params = opts[:query_params] || {}
2542
+
2543
+ # header parameters
2544
+ header_params = opts[:header_params] || {}
2545
+ # HTTP header 'Accept' (if needed)
2546
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2547
+ # HTTP header 'Content-Type'
2548
+ content_type = @api_client.select_header_content_type(['application/json'])
2549
+ if !content_type.nil?
2550
+ header_params['Content-Type'] = content_type
2551
+ end
2552
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
2553
+
2554
+ # form parameters
2555
+ form_params = opts[:form_params] || {}
2556
+
2557
+ # http body (model)
2558
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_partner_entry_context_signing_request)
2559
+
2560
+ # return_type
2561
+ return_type = opts[:debug_return_type] || 'PartnerEntryContextSigningResponse'
2562
+
2563
+ # auth_names
2564
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
2565
+
2566
+ new_options = opts.merge(
2567
+ :operation => :"PartnersApi.update_partner_entry_context_signing_0",
2568
+ :header_params => header_params,
2569
+ :query_params => query_params,
2570
+ :form_params => form_params,
2571
+ :body => post_body,
2572
+ :auth_names => auth_names,
2573
+ :return_type => return_type
2574
+ )
2575
+
2576
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2577
+ if @api_client.config.debugging
2578
+ @api_client.config.logger.debug "API called: PartnersApi#update_partner_entry_context_signing_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2579
+ end
2580
+ return data, status_code, headers
2581
+ end
2582
+
2583
+ # Choose where your notifications go
2584
+ # Changes who gets the emails, which events you want by email and by webhook, and the address of your webhook. A key you leave out of the body is left as it was; send only what changes. **Email.** `emailRecipients` is the list of addresses (at most five). While it is empty the emails about invoices go to the billing emails of your billing profile (your contact email when there are none), and the others to your contact email. The events about money and about the standing of your account are always emailed, whatever `emailEvents` says; it narrows the others. **Webhook.** `webhookUrl` is where Widgetic sends a signed `POST` for each event, so that your own system can act on it (mark an invoice paid, warn your team that credits are low). The address must be `https` on the standard port, on a public site, and must not redirect. Setting an address when you have no secret yet makes one, and the answer carries it as `webhookSecret`: **keep it now, it is shown once**. `webhookEvents` narrows what is sent. Each call has a JSON body, `{ \"id\": \"evt_...\", \"type\": \"invoice.paid\", \"createdAt\": \"...\", \"partnerId\": \"...\", \"data\": { ... } }` (`data` is the `data` of `PartnerNotification`), and these headers: `webhook-id` (the same as `id`, and the same on every retry), `webhook-timestamp` (seconds since 1970) and `webhook-signature` (`v1,` and a base64 HMAC-SHA256). It is the Standard Webhooks scheme, so any of its libraries verifies it. By hand: take your secret without the `whsec_` prefix, decode it from base64, and sign the text `<webhook-id>.<webhook-timestamp>.<the raw body>` with it; the header holds `v1,<base64 of the result>` (two signatures separated by a space while a rotated secret overlaps). Reject a `webhook-timestamp` that is more than five minutes old. Answer with a 2xx status within ten seconds. Anything else is tried again, eight attempts in all over about two days (`listPartnerNotificationDeliveries` shows each). Delivery is at least once: if your answer was lost the same event arrives again with the same `id`, so drop what you have already handled by it. Changing the settings needs an API key with full access: they decide where your notifications go. The caller must be the person who administers the partner, or a Widgetic administrator.
2585
+ # @param partner_id [String] The partner whose notification settings to change
2586
+ # @param update_partner_notification_settings_request [UpdatePartnerNotificationSettingsRequest]
2587
+ # @param [Hash] opts the optional parameters
2588
+ # @option opts [String] :idempotency_key Optional: without it the call is carried out every time it is sent. 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;).
2589
+ # @return [PartnerNotificationSettingsChangeResponse]
2590
+ def update_partner_notification_settings_0(partner_id, update_partner_notification_settings_request, opts = {})
2591
+ data, _status_code, _headers = update_partner_notification_settings_0_with_http_info(partner_id, update_partner_notification_settings_request, opts)
2592
+ data
2593
+ end
2594
+
2595
+ # Choose where your notifications go
2596
+ # Changes who gets the emails, which events you want by email and by webhook, and the address of your webhook. A key you leave out of the body is left as it was; send only what changes. **Email.** &#x60;emailRecipients&#x60; is the list of addresses (at most five). While it is empty the emails about invoices go to the billing emails of your billing profile (your contact email when there are none), and the others to your contact email. The events about money and about the standing of your account are always emailed, whatever &#x60;emailEvents&#x60; says; it narrows the others. **Webhook.** &#x60;webhookUrl&#x60; is where Widgetic sends a signed &#x60;POST&#x60; for each event, so that your own system can act on it (mark an invoice paid, warn your team that credits are low). The address must be &#x60;https&#x60; on the standard port, on a public site, and must not redirect. Setting an address when you have no secret yet makes one, and the answer carries it as &#x60;webhookSecret&#x60;: **keep it now, it is shown once**. &#x60;webhookEvents&#x60; narrows what is sent. Each call has a JSON body, &#x60;{ \&quot;id\&quot;: \&quot;evt_...\&quot;, \&quot;type\&quot;: \&quot;invoice.paid\&quot;, \&quot;createdAt\&quot;: \&quot;...\&quot;, \&quot;partnerId\&quot;: \&quot;...\&quot;, \&quot;data\&quot;: { ... } }&#x60; (&#x60;data&#x60; is the &#x60;data&#x60; of &#x60;PartnerNotification&#x60;), and these headers: &#x60;webhook-id&#x60; (the same as &#x60;id&#x60;, and the same on every retry), &#x60;webhook-timestamp&#x60; (seconds since 1970) and &#x60;webhook-signature&#x60; (&#x60;v1,&#x60; and a base64 HMAC-SHA256). It is the Standard Webhooks scheme, so any of its libraries verifies it. By hand: take your secret without the &#x60;whsec_&#x60; prefix, decode it from base64, and sign the text &#x60;&lt;webhook-id&gt;.&lt;webhook-timestamp&gt;.&lt;the raw body&gt;&#x60; with it; the header holds &#x60;v1,&lt;base64 of the result&gt;&#x60; (two signatures separated by a space while a rotated secret overlaps). Reject a &#x60;webhook-timestamp&#x60; that is more than five minutes old. Answer with a 2xx status within ten seconds. Anything else is tried again, eight attempts in all over about two days (&#x60;listPartnerNotificationDeliveries&#x60; shows each). Delivery is at least once: if your answer was lost the same event arrives again with the same &#x60;id&#x60;, so drop what you have already handled by it. Changing the settings needs an API key with full access: they decide where your notifications go. The caller must be the person who administers the partner, or a Widgetic administrator.
2597
+ # @param partner_id [String] The partner whose notification settings to change
2598
+ # @param update_partner_notification_settings_request [UpdatePartnerNotificationSettingsRequest]
2599
+ # @param [Hash] opts the optional parameters
2600
+ # @option opts [String] :idempotency_key Optional: without it the call is carried out every time it is sent. 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;).
2601
+ # @return [Array<(PartnerNotificationSettingsChangeResponse, Integer, Hash)>] PartnerNotificationSettingsChangeResponse data, response status code and response headers
2602
+ def update_partner_notification_settings_0_with_http_info(partner_id, update_partner_notification_settings_request, opts = {})
2603
+ if @api_client.config.debugging
2604
+ @api_client.config.logger.debug 'Calling API: PartnersApi.update_partner_notification_settings_0 ...'
2605
+ end
2606
+ # verify the required parameter 'partner_id' is set
2607
+ if @api_client.config.client_side_validation && partner_id.nil?
2608
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.update_partner_notification_settings_0"
2609
+ end
2610
+ # verify the required parameter 'update_partner_notification_settings_request' is set
2611
+ if @api_client.config.client_side_validation && update_partner_notification_settings_request.nil?
2612
+ fail ArgumentError, "Missing the required parameter 'update_partner_notification_settings_request' when calling PartnersApi.update_partner_notification_settings_0"
2613
+ end
2614
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 50
2615
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling PartnersApi.update_partner_notification_settings_0, the character length must be smaller than or equal to 50.'
2616
+ end
2617
+
2618
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 8
2619
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling PartnersApi.update_partner_notification_settings_0, the character length must be great than or equal to 8.'
2620
+ end
2621
+
2622
+ pattern = Regexp.new(/^[a-zA-Z0-9_-]{8,50}$/)
2623
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'] !~ pattern
2624
+ fail ArgumentError, "invalid value for 'opts[:\"idempotency_key\"]' when calling PartnersApi.update_partner_notification_settings_0, must conform to the pattern #{pattern}."
2625
+ end
2626
+
2627
+ # resource path
2628
+ local_var_path = '/partners/{partnerId}/notifications/settings'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
2629
+
2630
+ # query parameters
2631
+ query_params = opts[:query_params] || {}
2632
+
2633
+ # header parameters
2634
+ header_params = opts[:header_params] || {}
2635
+ # HTTP header 'Accept' (if needed)
2636
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2637
+ # HTTP header 'Content-Type'
2638
+ content_type = @api_client.select_header_content_type(['application/json'])
2639
+ if !content_type.nil?
2640
+ header_params['Content-Type'] = content_type
2641
+ end
2642
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
2643
+
2644
+ # form parameters
2645
+ form_params = opts[:form_params] || {}
2646
+
2647
+ # http body (model)
2648
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_partner_notification_settings_request)
2649
+
2650
+ # return_type
2651
+ return_type = opts[:debug_return_type] || 'PartnerNotificationSettingsChangeResponse'
2652
+
2653
+ # auth_names
2654
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
2655
+
2656
+ new_options = opts.merge(
2657
+ :operation => :"PartnersApi.update_partner_notification_settings_0",
2658
+ :header_params => header_params,
2659
+ :query_params => query_params,
2660
+ :form_params => form_params,
2661
+ :body => post_body,
2662
+ :auth_names => auth_names,
2663
+ :return_type => return_type
2664
+ )
2665
+
2666
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2667
+ if @api_client.config.debugging
2668
+ @api_client.config.logger.debug "API called: PartnersApi#update_partner_notification_settings_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2669
+ end
2670
+ return data, status_code, headers
2671
+ end
2672
+
2673
+ # Check that a partner's own database still works
2674
+ # Runs the same check as `setPartnerDataDatabase` against the database already saved: a schema is made in it, a table created, a row written and read back, and the schema removed again. Use it after changing the role's password or the project's settings in Neon, or when saving is failing with 503 `PARTNER_DATABASE_UNAVAILABLE`. The result is recorded either way. A pass refreshes `verifiedAt` and clears `lastVerificationError`; a failure answers 422 `PARTNER_DATABASE_UNVERIFIED` and is recorded in `lastVerificationError` and `lastVerificationFailedAt`, so the database shows what went wrong the next time it is read. A failed check does not remove the database. `details.reason` is one of the reasons `setPartnerDataDatabase` lists, or `STORED_STRING_UNREADABLE` when the connection string Widgetic stored can no longer be read: set the database again, with its connection string. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
2675
+ # @param partner_id [String] The partner whose database to check
2676
+ # @param [Hash] opts the optional parameters
2677
+ # @return [PartnerDataDatabaseResponse]
2678
+ def verify_partner_data_database_0(partner_id, opts = {})
2679
+ data, _status_code, _headers = verify_partner_data_database_0_with_http_info(partner_id, opts)
2680
+ data
2681
+ end
2682
+
2683
+ # Check that a partner&#39;s own database still works
2684
+ # Runs the same check as &#x60;setPartnerDataDatabase&#x60; against the database already saved: a schema is made in it, a table created, a row written and read back, and the schema removed again. Use it after changing the role&#39;s password or the project&#39;s settings in Neon, or when saving is failing with 503 &#x60;PARTNER_DATABASE_UNAVAILABLE&#x60;. The result is recorded either way. A pass refreshes &#x60;verifiedAt&#x60; and clears &#x60;lastVerificationError&#x60;; a failure answers 422 &#x60;PARTNER_DATABASE_UNVERIFIED&#x60; and is recorded in &#x60;lastVerificationError&#x60; and &#x60;lastVerificationFailedAt&#x60;, so the database shows what went wrong the next time it is read. A failed check does not remove the database. &#x60;details.reason&#x60; is one of the reasons &#x60;setPartnerDataDatabase&#x60; lists, or &#x60;STORED_STRING_UNREADABLE&#x60; when the connection string Widgetic stored can no longer be read: set the database again, with its connection string. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
2685
+ # @param partner_id [String] The partner whose database to check
2686
+ # @param [Hash] opts the optional parameters
2687
+ # @return [Array<(PartnerDataDatabaseResponse, Integer, Hash)>] PartnerDataDatabaseResponse data, response status code and response headers
2688
+ def verify_partner_data_database_0_with_http_info(partner_id, opts = {})
2689
+ if @api_client.config.debugging
2690
+ @api_client.config.logger.debug 'Calling API: PartnersApi.verify_partner_data_database_0 ...'
2691
+ end
2692
+ # verify the required parameter 'partner_id' is set
2693
+ if @api_client.config.client_side_validation && partner_id.nil?
2694
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.verify_partner_data_database_0"
2695
+ end
2696
+ # resource path
2697
+ local_var_path = '/partners/{partnerId}/data-database/verify'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
2698
+
2699
+ # query parameters
2700
+ query_params = opts[:query_params] || {}
2701
+
2702
+ # header parameters
2703
+ header_params = opts[:header_params] || {}
2704
+ # HTTP header 'Accept' (if needed)
2705
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2706
+
2707
+ # form parameters
2708
+ form_params = opts[:form_params] || {}
2709
+
2710
+ # http body (model)
2711
+ post_body = opts[:debug_body]
2712
+
2713
+ # return_type
2714
+ return_type = opts[:debug_return_type] || 'PartnerDataDatabaseResponse'
2715
+
2716
+ # auth_names
2717
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
2718
+
2719
+ new_options = opts.merge(
2720
+ :operation => :"PartnersApi.verify_partner_data_database_0",
2721
+ :header_params => header_params,
2722
+ :query_params => query_params,
2723
+ :form_params => form_params,
2724
+ :body => post_body,
2725
+ :auth_names => auth_names,
2726
+ :return_type => return_type
2727
+ )
2728
+
2729
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2730
+ if @api_client.config.debugging
2731
+ @api_client.config.logger.debug "API called: PartnersApi#verify_partner_data_database_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2732
+ end
2733
+ return data, status_code, headers
2734
+ end
2735
+
2736
+ # Check that a partner's storage destination still works
2737
+ # Runs the same check as `setPartnerStorageDestination` against the destination already saved: a test file is written, read back from the public address and deleted. Use it after rotating a key or changing a bucket policy, or when uploads are failing with 502 or 503. The result is recorded either way. A pass refreshes `verifiedAt` and clears `lastVerificationError`; a failure answers 422 `STORAGE_DESTINATION_UNVERIFIED` and is recorded in `lastVerificationError` and `lastVerificationFailedAt`, so the destination shows what went wrong the next time it is read. A failed check does not remove the destination or stop uploads from using it. The caller must be the person who administers the partner, or a Widgetic administrator.
2738
+ # @param partner_id [String] The partner whose storage destination to check
2739
+ # @param [Hash] opts the optional parameters
2740
+ # @return [PartnerStorageDestinationResponse]
2741
+ def verify_partner_storage_destination_0(partner_id, opts = {})
2742
+ data, _status_code, _headers = verify_partner_storage_destination_0_with_http_info(partner_id, opts)
2743
+ data
2744
+ end
2745
+
2746
+ # Check that a partner&#39;s storage destination still works
2747
+ # Runs the same check as &#x60;setPartnerStorageDestination&#x60; against the destination already saved: a test file is written, read back from the public address and deleted. Use it after rotating a key or changing a bucket policy, or when uploads are failing with 502 or 503. The result is recorded either way. A pass refreshes &#x60;verifiedAt&#x60; and clears &#x60;lastVerificationError&#x60;; a failure answers 422 &#x60;STORAGE_DESTINATION_UNVERIFIED&#x60; and is recorded in &#x60;lastVerificationError&#x60; and &#x60;lastVerificationFailedAt&#x60;, so the destination shows what went wrong the next time it is read. A failed check does not remove the destination or stop uploads from using it. The caller must be the person who administers the partner, or a Widgetic administrator.
2748
+ # @param partner_id [String] The partner whose storage destination to check
2749
+ # @param [Hash] opts the optional parameters
2750
+ # @return [Array<(PartnerStorageDestinationResponse, Integer, Hash)>] PartnerStorageDestinationResponse data, response status code and response headers
2751
+ def verify_partner_storage_destination_0_with_http_info(partner_id, opts = {})
2752
+ if @api_client.config.debugging
2753
+ @api_client.config.logger.debug 'Calling API: PartnersApi.verify_partner_storage_destination_0 ...'
2754
+ end
2755
+ # verify the required parameter 'partner_id' is set
2756
+ if @api_client.config.client_side_validation && partner_id.nil?
2757
+ fail ArgumentError, "Missing the required parameter 'partner_id' when calling PartnersApi.verify_partner_storage_destination_0"
2758
+ end
2759
+ # resource path
2760
+ local_var_path = '/partners/{partnerId}/storage/verify'.sub('{' + 'partnerId' + '}', CGI.escape(partner_id.to_s))
2761
+
2762
+ # query parameters
2763
+ query_params = opts[:query_params] || {}
2764
+
2765
+ # header parameters
2766
+ header_params = opts[:header_params] || {}
2767
+ # HTTP header 'Accept' (if needed)
2768
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2769
+
2770
+ # form parameters
2771
+ form_params = opts[:form_params] || {}
2772
+
2773
+ # http body (model)
2774
+ post_body = opts[:debug_body]
2775
+
2776
+ # return_type
2777
+ return_type = opts[:debug_return_type] || 'PartnerStorageDestinationResponse'
2778
+
2779
+ # auth_names
2780
+ auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
2781
+
2782
+ new_options = opts.merge(
2783
+ :operation => :"PartnersApi.verify_partner_storage_destination_0",
2784
+ :header_params => header_params,
2785
+ :query_params => query_params,
2786
+ :form_params => form_params,
2787
+ :body => post_body,
2788
+ :auth_names => auth_names,
2789
+ :return_type => return_type
2790
+ )
2791
+
2792
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2793
+ if @api_client.config.debugging
2794
+ @api_client.config.logger.debug "API called: PartnersApi#verify_partner_storage_destination_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2795
+ end
2796
+ return data, status_code, headers
2797
+ end
2798
+ end
2799
+ end