polytomic 25.9.11 → 25.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (638) hide show
  1. package/BaseClient.js +2 -2
  2. package/Client.d.ts +0 -3
  3. package/Client.js +38 -43
  4. package/api/resources/bulkSync/client/Client.d.ts +54 -29
  5. package/api/resources/bulkSync/client/Client.js +65 -32
  6. package/api/resources/bulkSync/client/requests/ActivateBulkSyncInput.d.ts +10 -0
  7. package/api/resources/bulkSync/client/requests/BulkSyncDeleteRequest.d.ts +1 -0
  8. package/api/resources/bulkSync/client/requests/BulkSyncGetDestinationRequest.d.ts +10 -0
  9. package/api/resources/bulkSync/client/requests/BulkSyncGetRequest.d.ts +1 -0
  10. package/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +10 -5
  11. package/api/resources/bulkSync/client/requests/StartBulkSyncRequest.d.ts +2 -0
  12. package/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +10 -5
  13. package/api/resources/bulkSync/client/requests/index.d.ts +2 -0
  14. package/api/resources/bulkSync/resources/errorHandling/client/Client.d.ts +2 -2
  15. package/api/resources/bulkSync/resources/errorHandling/client/Client.js +2 -2
  16. package/api/resources/bulkSync/resources/executions/client/Client.d.ts +32 -25
  17. package/api/resources/bulkSync/resources/executions/client/Client.js +32 -25
  18. package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsGetIngestConsoleLogsRequest.d.ts +1 -1
  19. package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +1 -1
  20. package/api/resources/bulkSync/resources/schedules/client/Client.d.ts +16 -8
  21. package/api/resources/bulkSync/resources/schedules/client/Client.js +16 -8
  22. package/api/resources/bulkSync/resources/schedules/client/requests/CreateScheduleRequest.d.ts +1 -0
  23. package/api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.d.ts +1 -0
  24. package/api/resources/bulkSync/resources/schemas/client/Client.d.ts +20 -9
  25. package/api/resources/bulkSync/resources/schemas/client/Client.js +20 -9
  26. package/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +7 -4
  27. package/api/resources/connections/client/Client.d.ts +18 -16
  28. package/api/resources/connections/client/Client.js +22 -16
  29. package/api/resources/connections/client/requests/ConnectCardRequest.d.ts +11 -8
  30. package/api/resources/connections/client/requests/ConnectionsDeleteRequest.d.ts +1 -0
  31. package/api/resources/connections/client/requests/CreateConnectionRequestSchema.d.ts +4 -2
  32. package/api/resources/connections/client/requests/GetConnectionTypeParameterValuesRequestSchema.d.ts +6 -1
  33. package/api/resources/connections/client/requests/TestConnectionRequest.d.ts +2 -2
  34. package/api/resources/connections/client/requests/UpdateConnectionRequestSchema.d.ts +4 -1
  35. package/api/resources/connections/resources/proxy/client/Client.d.ts +17 -6
  36. package/api/resources/connections/resources/proxy/client/Client.js +17 -6
  37. package/api/resources/connections/resources/proxy/client/requests/ExecuteConnectionProxyRequest.d.ts +2 -1
  38. package/api/resources/connections/resources/proxy/client/requests/UpdateConnectionProxySettingsRequest.d.ts +1 -1
  39. package/api/resources/connections/resources/sharedConnections/client/Client.d.ts +5 -5
  40. package/api/resources/connections/resources/sharedConnections/client/Client.js +5 -5
  41. package/api/resources/connections/resources/sharedConnections/client/requests/PartnerCreateSharedConnectionRequestSchema.d.ts +1 -1
  42. package/api/resources/entities/client/Client.d.ts +2 -2
  43. package/api/resources/entities/client/Client.js +2 -2
  44. package/api/resources/entities/client/requests/EntitiesSearchRequest.d.ts +1 -1
  45. package/api/resources/events/client/Client.d.ts +10 -7
  46. package/api/resources/events/client/Client.js +10 -7
  47. package/api/resources/harbors/client/Client.d.ts +78 -1295
  48. package/api/resources/harbors/client/Client.js +113 -3358
  49. package/api/resources/harbors/client/requests/CreateHarborRequest.d.ts +1 -1
  50. package/api/resources/harbors/client/requests/HarborsCloseSessionRequest.d.ts +6 -0
  51. package/api/resources/harbors/client/requests/HarborsListRequest.d.ts +1 -1
  52. package/api/resources/harbors/client/requests/RegisterHarborSessionRequest.d.ts +8 -3
  53. package/api/resources/harbors/client/requests/RunHarborQueryRequest.d.ts +3 -1
  54. package/api/resources/harbors/client/requests/UpdateHarborRequest.d.ts +1 -1
  55. package/api/resources/harbors/client/requests/index.d.ts +0 -29
  56. package/api/resources/harbors/resources/actionConfiguration/client/Client.d.ts +267 -0
  57. package/api/resources/harbors/resources/actionConfiguration/client/Client.js +686 -0
  58. package/api/resources/harbors/{client/requests/HarborsListActionConfigurationSchemasRequest.d.ts → resources/actionConfiguration/client/requests/ActionConfigurationListSchemasRequest.d.ts} +3 -3
  59. package/api/resources/harbors/{client/requests/HarborsRemoveActionConfigurationRequest.d.ts → resources/actionConfiguration/client/requests/ActionConfigurationRemoveRequest.d.ts} +2 -2
  60. package/api/resources/harbors/{client → resources/actionConfiguration/client}/requests/SetHarborActionConfigurationRequest.d.ts +2 -2
  61. package/api/resources/harbors/resources/actionConfiguration/client/requests/index.d.ts +3 -0
  62. package/api/resources/harbors/resources/actionConfiguration/exports.d.ts +2 -0
  63. package/api/resources/harbors/resources/actionConfiguration/exports.js +21 -0
  64. package/api/resources/harbors/resources/actionConfiguration/index.d.ts +1 -0
  65. package/api/resources/harbors/resources/actionConfiguration/index.js +17 -0
  66. package/api/resources/harbors/resources/actions/client/Client.d.ts +11 -7
  67. package/api/resources/harbors/resources/actions/client/Client.js +11 -7
  68. package/api/resources/harbors/resources/actions/client/requests/ActionsDescribeRequest.d.ts +5 -0
  69. package/api/resources/harbors/resources/actions/client/requests/ActionsGetExecutionRequest.d.ts +2 -0
  70. package/api/resources/harbors/resources/actions/client/requests/ActionsListRequest.d.ts +3 -0
  71. package/api/resources/harbors/resources/actions/client/requests/ExecuteHarborActionRequest.d.ts +2 -0
  72. package/api/resources/harbors/resources/actions/client/requests/LookupHarborActionRequest.d.ts +6 -3
  73. package/api/resources/harbors/resources/actions/client/requests/PrepareHarborActionRequest.d.ts +6 -2
  74. package/api/resources/{activity → harbors/resources/activity}/client/Client.d.ts +15 -15
  75. package/api/resources/{activity → harbors/resources/activity}/client/Client.js +22 -18
  76. package/api/resources/harbors/resources/activity/client/index.d.ts +1 -0
  77. package/api/resources/harbors/resources/activity/client/index.js +17 -0
  78. package/api/resources/{activity → harbors/resources/activity}/client/requests/ActivityGetSessionRequest.d.ts +2 -2
  79. package/api/resources/{activity → harbors/resources/activity}/client/requests/ActivityListRequest.d.ts +7 -7
  80. package/api/resources/harbors/resources/activity/client/requests/index.js +2 -0
  81. package/api/resources/harbors/resources/connections/client/Client.d.ts +64 -0
  82. package/api/resources/harbors/resources/connections/client/Client.js +236 -0
  83. package/api/resources/harbors/resources/connections/client/index.d.ts +1 -0
  84. package/api/resources/harbors/resources/connections/client/index.js +17 -0
  85. package/api/resources/harbors/resources/connections/client/requests/ConnectionsGetSchemaRequest.d.ts +10 -0
  86. package/api/resources/harbors/resources/connections/client/requests/ConnectionsListRequest.d.ts +17 -0
  87. package/api/resources/harbors/resources/connections/client/requests/ConnectionsListSchemasRequest.d.ts +17 -0
  88. package/api/resources/harbors/resources/connections/client/requests/index.d.ts +3 -0
  89. package/api/resources/harbors/resources/connections/client/requests/index.js +2 -0
  90. package/api/resources/harbors/resources/connections/exports.d.ts +2 -0
  91. package/api/resources/harbors/resources/connections/exports.js +21 -0
  92. package/api/resources/harbors/resources/connections/index.d.ts +1 -0
  93. package/api/resources/harbors/resources/connections/index.js +17 -0
  94. package/api/resources/harbors/resources/contexts/client/Client.d.ts +395 -0
  95. package/api/resources/harbors/resources/contexts/client/Client.js +1142 -0
  96. package/api/resources/harbors/resources/contexts/client/index.d.ts +1 -0
  97. package/api/resources/harbors/resources/contexts/client/index.js +17 -0
  98. package/api/resources/harbors/resources/contexts/client/requests/ContextsDeleteDraftRequest.d.ts +10 -0
  99. package/api/resources/harbors/resources/contexts/client/requests/ContextsDeleteRequest.d.ts +10 -0
  100. package/api/resources/harbors/resources/contexts/client/requests/ContextsGetDraftRequest.d.ts +10 -0
  101. package/api/resources/harbors/resources/contexts/client/requests/ContextsGetRequest.d.ts +10 -0
  102. package/api/resources/harbors/resources/contexts/client/requests/ContextsGetVersionRequest.d.ts +10 -0
  103. package/api/resources/harbors/{client/requests/HarborsListContextDraftsRequest.d.ts → resources/contexts/client/requests/ContextsListDraftsRequest.d.ts} +2 -2
  104. package/api/resources/harbors/{client/requests/HarborsListContextsRequest.d.ts → resources/contexts/client/requests/ContextsListRequest.d.ts} +4 -2
  105. package/api/resources/harbors/{client/requests/HarborsListContextVersionsRequest.d.ts → resources/contexts/client/requests/ContextsListVersionsRequest.d.ts} +4 -2
  106. package/api/resources/harbors/resources/contexts/client/requests/ContextsPromoteDraftRequest.d.ts +10 -0
  107. package/api/resources/harbors/{client → resources/contexts/client}/requests/CreateHarborContextDraftRequest.d.ts +1 -1
  108. package/api/resources/harbors/{client → resources/contexts/client}/requests/ResolveHarborSourceMappingsRequest.d.ts +6 -2
  109. package/api/resources/harbors/{client → resources/contexts/client}/requests/SaveHarborContextDraftRequest.d.ts +3 -1
  110. package/api/resources/harbors/{client → resources/contexts/client}/requests/SaveHarborContextRequest.d.ts +3 -1
  111. package/api/resources/harbors/resources/contexts/client/requests/index.d.ts +14 -0
  112. package/api/resources/harbors/resources/contexts/client/requests/index.js +2 -0
  113. package/api/resources/harbors/resources/contexts/exports.d.ts +2 -0
  114. package/api/resources/harbors/resources/contexts/exports.js +21 -0
  115. package/api/resources/harbors/resources/contexts/index.d.ts +1 -0
  116. package/api/resources/harbors/resources/contexts/index.js +17 -0
  117. package/api/resources/harbors/resources/index.d.ts +15 -0
  118. package/api/resources/harbors/resources/index.js +16 -1
  119. package/api/resources/harbors/resources/keys/client/Client.d.ts +86 -0
  120. package/api/resources/harbors/resources/keys/client/Client.js +266 -0
  121. package/api/resources/harbors/resources/keys/client/index.d.ts +1 -0
  122. package/api/resources/harbors/resources/keys/client/index.js +17 -0
  123. package/api/resources/harbors/{client/requests/HarborsListKeysRequest.d.ts → resources/keys/client/requests/KeysListRequest.d.ts} +2 -2
  124. package/api/resources/harbors/resources/keys/client/requests/index.d.ts +1 -0
  125. package/api/resources/harbors/resources/keys/client/requests/index.js +2 -0
  126. package/api/resources/harbors/resources/keys/exports.d.ts +2 -0
  127. package/api/resources/harbors/resources/keys/exports.js +21 -0
  128. package/api/resources/harbors/resources/keys/index.d.ts +1 -0
  129. package/api/resources/harbors/resources/keys/index.js +17 -0
  130. package/api/resources/harbors/resources/savedQueries/client/Client.d.ts +430 -0
  131. package/api/resources/harbors/resources/savedQueries/client/Client.js +1008 -0
  132. package/api/resources/harbors/resources/savedQueries/client/index.d.ts +1 -0
  133. package/api/resources/harbors/resources/savedQueries/client/index.js +17 -0
  134. package/api/resources/harbors/{client → resources/savedQueries/client}/requests/CreateHarborSavedQueryDraftRequest.d.ts +5 -5
  135. package/api/resources/harbors/{client → resources/savedQueries/client}/requests/ExecuteHarborSavedQueryRequest.d.ts +2 -0
  136. package/api/resources/harbors/{client → resources/savedQueries/client}/requests/SaveHarborSavedQueryDraftRequest.d.ts +5 -5
  137. package/api/resources/harbors/resources/savedQueries/client/requests/SavedQueriesGetRequest.d.ts +10 -0
  138. package/api/resources/harbors/{client/requests/HarborsListSavedQueryDraftsRequest.d.ts → resources/savedQueries/client/requests/SavedQueriesListDraftsRequest.d.ts} +3 -3
  139. package/api/resources/harbors/resources/savedQueries/client/requests/SavedQueriesListRequest.d.ts +17 -0
  140. package/api/resources/harbors/resources/savedQueries/client/requests/index.d.ts +6 -0
  141. package/api/resources/harbors/resources/savedQueries/client/requests/index.js +2 -0
  142. package/api/resources/harbors/resources/savedQueries/exports.d.ts +2 -0
  143. package/api/resources/harbors/resources/savedQueries/exports.js +21 -0
  144. package/api/resources/harbors/resources/savedQueries/index.d.ts +1 -0
  145. package/api/resources/harbors/resources/savedQueries/index.js +17 -0
  146. package/api/resources/harbors/resources/users/client/Client.d.ts +105 -0
  147. package/api/resources/harbors/resources/users/client/Client.js +342 -0
  148. package/api/resources/harbors/resources/users/client/index.d.ts +1 -0
  149. package/api/resources/harbors/resources/users/client/index.js +17 -0
  150. package/api/resources/harbors/{client → resources/users/client}/requests/InviteHarborUserRequest.d.ts +1 -1
  151. package/api/resources/harbors/{client/requests/HarborsListUsersRequest.d.ts → resources/users/client/requests/UsersListRequest.d.ts} +2 -2
  152. package/api/resources/harbors/resources/users/client/requests/UsersListRequest.js +3 -0
  153. package/api/resources/harbors/resources/users/client/requests/index.d.ts +2 -0
  154. package/api/resources/harbors/resources/users/client/requests/index.js +2 -0
  155. package/api/resources/harbors/resources/users/exports.d.ts +2 -0
  156. package/api/resources/harbors/resources/users/exports.js +21 -0
  157. package/api/resources/harbors/resources/users/index.d.ts +1 -0
  158. package/api/resources/harbors/resources/users/index.js +17 -0
  159. package/api/resources/index.d.ts +0 -3
  160. package/api/resources/index.js +1 -4
  161. package/api/resources/jobs/client/Client.d.ts +1 -1
  162. package/api/resources/jobs/client/Client.js +1 -1
  163. package/api/resources/modelSync/client/Client.d.ts +10 -9
  164. package/api/resources/modelSync/client/Client.js +10 -9
  165. package/api/resources/modelSync/client/requests/ActivateSyncInput.d.ts +10 -0
  166. package/api/resources/modelSync/client/requests/ActivateSyncInput.js +3 -0
  167. package/api/resources/modelSync/client/requests/CreateModelSyncV5Request.d.ts +14 -7
  168. package/api/resources/modelSync/client/requests/ModelSyncGetSourceFieldsRequest.d.ts +1 -1
  169. package/api/resources/modelSync/client/requests/StartModelSyncRequest.d.ts +4 -2
  170. package/api/resources/modelSync/client/requests/UpdateModelSyncV5Request.d.ts +14 -7
  171. package/api/resources/modelSync/client/requests/index.d.ts +1 -0
  172. package/api/resources/modelSync/resources/errorHandling/client/Client.d.ts +2 -2
  173. package/api/resources/modelSync/resources/errorHandling/client/Client.js +2 -2
  174. package/api/resources/modelSync/resources/executions/client/Client.d.ts +28 -22
  175. package/api/resources/modelSync/resources/executions/client/Client.js +28 -22
  176. package/api/resources/modelSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +3 -0
  177. package/api/resources/modelSync/resources/targets/client/Client.d.ts +4 -4
  178. package/api/resources/modelSync/resources/targets/client/Client.js +4 -4
  179. package/api/resources/models/client/Client.d.ts +19 -20
  180. package/api/resources/models/client/Client.js +21 -20
  181. package/api/resources/models/client/requests/EnrichmentInputFieldsRequest.d.ts +1 -0
  182. package/api/resources/models/client/requests/ModelsCreateRequest.d.ts +1 -0
  183. package/api/resources/models/client/requests/ModelsDeleteRequest.d.ts +1 -0
  184. package/api/resources/models/client/requests/ModelsGetRequest.d.ts +1 -0
  185. package/api/resources/models/client/requests/ModelsPreviewRequest.d.ts +1 -0
  186. package/api/resources/models/client/requests/ModelsSampleRequest.d.ts +1 -0
  187. package/api/resources/models/client/requests/UpdateModelRequest.d.ts +13 -0
  188. package/api/resources/notifications/client/Client.d.ts +1 -0
  189. package/api/resources/notifications/client/Client.js +3 -0
  190. package/api/resources/operations/client/requests/SearchOperationsRequest.d.ts +3 -3
  191. package/api/resources/organization/client/Client.d.ts +3 -3
  192. package/api/resources/organization/client/Client.js +3 -3
  193. package/api/resources/organization/client/requests/CreateOrganizationRequestSchema.d.ts +4 -4
  194. package/api/resources/organization/client/requests/UpdateOrganizationRequestSchema.d.ts +4 -4
  195. package/api/resources/organization/client/requests/UpdateRecordLoggingSettingsRequest.d.ts +1 -1
  196. package/api/resources/permissions/resources/policies/client/Client.d.ts +13 -5
  197. package/api/resources/permissions/resources/policies/client/Client.js +13 -5
  198. package/api/resources/permissions/resources/policies/client/requests/CreatePolicyRequest.d.ts +6 -1
  199. package/api/resources/permissions/resources/policies/client/requests/UpdatePolicyRequest.d.ts +6 -1
  200. package/api/resources/permissions/resources/roles/client/Client.d.ts +3 -3
  201. package/api/resources/permissions/resources/roles/client/Client.js +3 -3
  202. package/api/resources/permissions/resources/roles/client/requests/CreateRoleRequest.d.ts +1 -0
  203. package/api/resources/permissions/resources/roles/client/requests/UpdateRoleRequest.d.ts +1 -0
  204. package/api/resources/queryRunner/client/Client.d.ts +2 -2
  205. package/api/resources/queryRunner/client/Client.js +2 -2
  206. package/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.d.ts +3 -1
  207. package/api/resources/queryRunner/client/requests/RunQueryRequest.d.ts +3 -1
  208. package/api/resources/recordViewLinks/client/Client.d.ts +5 -0
  209. package/api/resources/recordViewLinks/client/Client.js +5 -0
  210. package/api/resources/recordViewLinks/client/requests/CreateRecordViewLinkRequest.d.ts +6 -4
  211. package/api/resources/recordViewLinks/client/requests/RecordViewLinksGetCapabilitiesRequest.d.ts +4 -2
  212. package/api/resources/schemas/client/Client.d.ts +21 -28
  213. package/api/resources/schemas/client/Client.js +21 -28
  214. package/api/resources/schemas/client/requests/PatchSchemaFieldRequest.d.ts +3 -2
  215. package/api/resources/temporaryCredentials/client/Client.d.ts +3 -0
  216. package/api/resources/temporaryCredentials/client/Client.js +3 -0
  217. package/api/resources/temporaryCredentials/client/requests/CreateTemporaryCredentialRequest.d.ts +1 -0
  218. package/api/resources/users/client/Client.d.ts +43 -28
  219. package/api/resources/users/client/Client.js +43 -28
  220. package/api/resources/users/client/requests/CreateUserRequestSchema.d.ts +1 -1
  221. package/api/resources/users/client/requests/CurrentOrgCreateUserRequestSchema.d.ts +1 -1
  222. package/api/resources/users/client/requests/UpdateUserRequestSchema.d.ts +1 -1
  223. package/api/resources/webhooks/client/Client.d.ts +13 -13
  224. package/api/resources/webhooks/client/Client.js +13 -13
  225. package/api/resources/webhooks/client/requests/CreateWebhooksSchema.d.ts +1 -0
  226. package/api/resources/webhooks/client/requests/UpdateWebhooksSchema.d.ts +1 -0
  227. package/api/resources/webhooks/client/requests/WebhooksListDeliveriesRequest.d.ts +2 -1
  228. package/api/types/ActionLookup.d.ts +2 -0
  229. package/api/types/ActivateSyncEnvelope.d.ts +1 -0
  230. package/api/types/ActivateSyncOutput.d.ts +2 -0
  231. package/api/types/ApiError.d.ts +4 -0
  232. package/api/types/BackendConnectionCapabilities.d.ts +5 -0
  233. package/api/types/BackendOAuthPrompt.d.ts +3 -0
  234. package/api/types/BulkBulkSyncSchedule.d.ts +16 -0
  235. package/api/types/BulkField.d.ts +5 -0
  236. package/api/types/BulkFilter.d.ts +3 -1
  237. package/api/types/BulkSchema.d.ts +11 -1
  238. package/api/types/BulkSchemaEnvelope.d.ts +1 -0
  239. package/api/types/BulkSchemaListItem.d.ts +4 -4
  240. package/api/types/BulkSelectiveMode.d.ts +9 -0
  241. package/api/types/BulkSelectiveMode.js +9 -0
  242. package/api/types/BulkSyncAdditionalScheduleRequest.d.ts +8 -5
  243. package/api/types/BulkSyncAdditionalScheduleResponse.d.ts +12 -8
  244. package/api/types/BulkSyncDefaultScheduleRequest.d.ts +7 -5
  245. package/api/types/BulkSyncDefaultScheduleResponse.d.ts +11 -8
  246. package/api/types/BulkSyncDest.d.ts +6 -2
  247. package/api/types/BulkSyncDestEnvelope.d.ts +1 -0
  248. package/api/types/BulkSyncErrorHandling.d.ts +1 -1
  249. package/api/types/BulkSyncErrorHandlingEnvelope.d.ts +1 -0
  250. package/api/types/BulkSyncExecution.d.ts +18 -1
  251. package/api/types/BulkSyncExecutionEnvelope.d.ts +1 -0
  252. package/api/types/BulkSyncExecutionLogs.d.ts +1 -1
  253. package/api/types/BulkSyncExecutionLogsEnvelope.d.ts +1 -0
  254. package/api/types/BulkSyncExecutionStatus.d.ts +4 -3
  255. package/api/types/BulkSyncIngestionStatus.d.ts +8 -0
  256. package/api/types/BulkSyncListEnvelope.d.ts +1 -0
  257. package/api/types/BulkSyncResponse.d.ts +17 -10
  258. package/api/types/BulkSyncResponseEnvelope.d.ts +1 -0
  259. package/api/types/BulkSyncScheduleApi.d.ts +6 -5
  260. package/api/types/BulkSyncSchemaExecution.d.ts +12 -1
  261. package/api/types/BulkSyncSchemaExecutionStatus.d.ts +8 -7
  262. package/api/types/BulkSyncSearchHit.d.ts +10 -1
  263. package/api/types/BulkSyncSource.d.ts +3 -0
  264. package/api/types/BulkSyncSourceCapabilities.d.ts +3 -0
  265. package/api/types/BulkSyncSourceEnvelope.d.ts +1 -0
  266. package/api/types/BulkSyncSourceSchemaEnvelope.d.ts +1 -0
  267. package/api/types/BulkSyncSourceStatus.d.ts +3 -0
  268. package/api/types/BulkSyncSourceStatusEnvelope.d.ts +1 -0
  269. package/api/types/BulkSyncStatusEnvelope.d.ts +1 -0
  270. package/api/types/BulkSyncStatusResponse.d.ts +4 -0
  271. package/api/types/CancelBulkSyncResponse.d.ts +1 -0
  272. package/api/types/CancelBulkSyncResponseEnvelope.d.ts +1 -0
  273. package/api/types/CancelSyncExecutionResponse.d.ts +1 -0
  274. package/api/types/CancelSyncExecutionResponseEnvelope.d.ts +1 -0
  275. package/api/types/CancelSyncResponse.d.ts +1 -0
  276. package/api/types/CancelSyncResponseEnvelope.d.ts +1 -0
  277. package/api/types/CloseHarborSessionEnvelope.d.ts +6 -0
  278. package/api/types/CompletionValue.d.ts +4 -0
  279. package/api/types/ConfigurationValue.d.ts +2 -0
  280. package/api/types/ConnectAccessLevel.d.ts +5 -0
  281. package/api/types/ConnectAccessLevel.js +8 -0
  282. package/api/types/ConnectCardResponse.d.ts +2 -2
  283. package/api/types/ConnectCardResponseEnvelope.d.ts +1 -0
  284. package/api/types/ConnectSessionResponse.d.ts +10 -10
  285. package/api/types/ConnectSessionResponseEnvelope.d.ts +1 -0
  286. package/api/types/ConnectionProxyApi.d.ts +4 -3
  287. package/api/types/ConnectionProxyContract.d.ts +10 -10
  288. package/api/types/ConnectionProxyInfoResponse.d.ts +6 -2
  289. package/api/types/ConnectionProxyLockedHeader.d.ts +2 -2
  290. package/api/types/ConnectionProxyMergeRules.d.ts +2 -2
  291. package/api/types/ConnectionProxyResponse.d.ts +8 -7
  292. package/api/types/ConnectionProxySettingsEnvelope.d.ts +1 -0
  293. package/api/types/ConnectionProxySettingsResponse.d.ts +4 -4
  294. package/api/types/ConnectionProxyStats.d.ts +6 -6
  295. package/api/types/ConnectionResponseSchema.d.ts +2 -2
  296. package/api/types/ConnectionSearchHit.d.ts +5 -1
  297. package/api/types/ConnectionType.d.ts +2 -0
  298. package/api/types/ConnectionUsageCategoryStats.d.ts +3 -3
  299. package/api/types/ConnectionUsageResponse.d.ts +3 -3
  300. package/api/types/ConnectionUsageSyncStats.d.ts +6 -6
  301. package/api/types/CreateConnectionResponseSchema.d.ts +3 -3
  302. package/api/types/CreateHarborEnvelope.d.ts +1 -0
  303. package/api/types/CreateHarborResponse.d.ts +2 -0
  304. package/api/types/CreateModelRequest.d.ts +11 -0
  305. package/api/types/CreateRecordViewLinkEnvelope.d.ts +1 -0
  306. package/api/types/CreateRecordViewLinkResponse.d.ts +4 -4
  307. package/api/types/CreateSharedConnectionResponseEnvelope.d.ts +1 -0
  308. package/api/types/CreateSharedConnectionResponseSchema.d.ts +1 -0
  309. package/api/types/CurrentOrgListUsersEnvelope.d.ts +1 -0
  310. package/api/types/CurrentOrgUserEnvelope.d.ts +1 -0
  311. package/api/types/CurrentOrgUserResponse.d.ts +6 -6
  312. package/api/types/DeletedHarborContextDraftEnvelope.d.ts +5 -1
  313. package/api/types/DeletedHarborContextEnvelope.d.ts +5 -1
  314. package/api/types/DeletedHarborEnvelope.d.ts +1 -0
  315. package/api/types/DeletedHarborResponse.d.ts +1 -1
  316. package/api/types/DeletedHarborSavedQueryDraftEnvelope.d.ts +5 -1
  317. package/api/types/DeletedHarborSavedQueryEnvelope.d.ts +5 -1
  318. package/api/types/Enrichment.d.ts +3 -0
  319. package/api/types/EntityRelationship.d.ts +2 -2
  320. package/api/types/EntityResponse.d.ts +3 -3
  321. package/api/types/EntityResponseEnvelope.d.ts +1 -0
  322. package/api/types/Event.d.ts +5 -4
  323. package/api/types/EventPayload.d.ts +1 -1
  324. package/api/types/EventingBulkSyncCanceledEvent.d.ts +9 -0
  325. package/api/types/EventingBulkSyncCompletedEvent.d.ts +11 -0
  326. package/api/types/EventingBulkSyncCompletedWithErrorEvent.d.ts +11 -0
  327. package/api/types/EventingBulkSyncFailedEvent.d.ts +12 -0
  328. package/api/types/EventingBulkSyncRunningEvent.d.ts +9 -0
  329. package/api/types/EventingBulkSyncSchedule.d.ts +2 -0
  330. package/api/types/EventingIngestionRecoveredEvent.d.ts +17 -0
  331. package/api/types/EventingIngestionRecoveredEvent.js +3 -0
  332. package/api/types/EventingIngestionStalledEvent.d.ts +19 -0
  333. package/api/types/EventingIngestionStalledEvent.js +3 -0
  334. package/api/types/EventingSyncCanceledEvent.d.ts +9 -0
  335. package/api/types/EventingSyncCompletedEvent.d.ts +26 -1
  336. package/api/types/EventingSyncCompletedWithErrorsEvent.d.ts +11 -0
  337. package/api/types/EventingSyncFailedEvent.d.ts +9 -0
  338. package/api/types/EventingSyncRunningEvent.d.ts +8 -0
  339. package/api/types/EventingSyncSchedule.d.ts +1 -0
  340. package/api/types/ExecuteConnectionProxyEnvelope.d.ts +1 -0
  341. package/api/types/ExecuteHarborSavedQueryEnvelope.d.ts +10 -5
  342. package/api/types/ExecutionConsoleLogEntry.d.ts +5 -0
  343. package/api/types/ExecutionConsoleLogsResponse.d.ts +2 -0
  344. package/api/types/ExecutionConsoleLogsResponseEnvelope.d.ts +1 -0
  345. package/api/types/ExecutionCounts.d.ts +7 -0
  346. package/api/types/ExecutionLogResponse.d.ts +2 -0
  347. package/api/types/ExecutionLogsResponseEnvelope.d.ts +1 -0
  348. package/api/types/ExportSyncLogsEnvelope.d.ts +2 -0
  349. package/api/types/ExportSyncLogsResponse.d.ts +1 -1
  350. package/api/types/FieldConfiguration.d.ts +3 -2
  351. package/api/types/Filter.d.ts +6 -1
  352. package/api/types/GetConnectionProxyInfoEnvelope.d.ts +1 -0
  353. package/api/types/GetConnectionUsageEnvelope.d.ts +1 -0
  354. package/api/types/GetEnrichmentInputFieldsResponseEnvelope.d.ts +1 -0
  355. package/api/types/GetExecutionResponseEnvelope.d.ts +1 -0
  356. package/api/types/GetExecutionResponseSchema.d.ts +9 -1
  357. package/api/types/GetIdentityResponseSchema.d.ts +8 -7
  358. package/api/types/GetRecordViewCapabilitiesEnvelope.d.ts +1 -0
  359. package/api/types/GetSyncSourceMetaEnvelope.d.ts +1 -0
  360. package/api/types/GlobalErrorSubscribersResponse.d.ts +1 -1
  361. package/api/types/HarborActionCapability.d.ts +9 -0
  362. package/api/types/HarborActionConfigurationEnvelope.d.ts +1 -1
  363. package/api/types/HarborActionConfigurationFieldResponse.d.ts +9 -9
  364. package/api/types/HarborActionConfigurationIdempotencyResponse.d.ts +2 -2
  365. package/api/types/HarborActionConfigurationOperationResponse.d.ts +10 -9
  366. package/api/types/HarborActionConfigurationOperationResponse.js +1 -1
  367. package/api/types/HarborActionConfigurationOperationsEnvelope.d.ts +1 -0
  368. package/api/types/HarborActionConfigurationResponse.d.ts +5 -5
  369. package/api/types/HarborActionConfigurationSchemasEnvelope.d.ts +2 -0
  370. package/api/types/HarborActionDescribeEnvelope.d.ts +1 -0
  371. package/api/types/HarborActionExecutionEnvelope.d.ts +1 -0
  372. package/api/types/HarborActionExecutionResponse.d.ts +14 -2
  373. package/api/types/HarborActionExecutionResponse.js +1 -0
  374. package/api/types/HarborActionField.d.ts +11 -0
  375. package/api/types/HarborActionGrantSchema.d.ts +3 -3
  376. package/api/types/HarborActionListEnvelope.d.ts +6 -0
  377. package/api/types/HarborActionLookupEnvelope.d.ts +1 -0
  378. package/api/types/HarborActionPreparation.d.ts +2 -0
  379. package/api/types/HarborActionPreparationEnvelope.d.ts +1 -0
  380. package/api/types/HarborActionSchemaResponse.d.ts +2 -2
  381. package/api/types/HarborActionSourceConnectionResponse.d.ts +3 -3
  382. package/api/types/HarborActionSourceConnectionsEnvelope.d.ts +1 -0
  383. package/api/types/HarborActionSummary.d.ts +5 -0
  384. package/api/types/HarborActivityEventEnvelope.d.ts +1 -0
  385. package/api/types/HarborActivityListEnvelope.d.ts +2 -0
  386. package/api/types/HarborActivitySessionEnvelope.d.ts +2 -0
  387. package/api/types/HarborApiKeyCreatedResponse.d.ts +3 -3
  388. package/api/types/HarborConnectionCapability.d.ts +6 -0
  389. package/api/types/HarborConnectionCapability.js +9 -0
  390. package/api/types/HarborConnectionListEnvelope.d.ts +2 -0
  391. package/api/types/HarborConnectionResponse.d.ts +6 -1
  392. package/api/types/HarborConnectionSchemaEnvelope.d.ts +1 -0
  393. package/api/types/HarborContextDraftEnvelope.d.ts +1 -0
  394. package/api/types/HarborContextDraftListEnvelope.d.ts +2 -0
  395. package/api/types/HarborContextDraftMetadataResponse.d.ts +8 -8
  396. package/api/types/HarborContextDraftResponse.d.ts +9 -9
  397. package/api/types/HarborContextEnvelope.d.ts +1 -0
  398. package/api/types/HarborContextListEnvelope.d.ts +2 -0
  399. package/api/types/HarborContextMetadataResponse.d.ts +7 -7
  400. package/api/types/HarborContextResponse.d.ts +8 -8
  401. package/api/types/HarborContextVersionEnvelope.d.ts +1 -0
  402. package/api/types/HarborContextVersionListEnvelope.d.ts +2 -0
  403. package/api/types/HarborContextVersionMetadataResponse.d.ts +7 -7
  404. package/api/types/HarborContextVersionResponse.d.ts +8 -8
  405. package/api/types/HarborDatasetStatusResponse.d.ts +2 -2
  406. package/api/types/HarborEnvelope.d.ts +1 -0
  407. package/api/types/HarborKeyEnvelope.d.ts +1 -0
  408. package/api/types/HarborKeyListEnvelope.d.ts +2 -0
  409. package/api/types/HarborKeyResponse.d.ts +5 -5
  410. package/api/types/HarborListEnvelope.d.ts +2 -0
  411. package/api/types/HarborPipelineStatusResponse.d.ts +6 -6
  412. package/api/types/HarborPipelineStatusResponse.js +1 -1
  413. package/api/types/HarborResponse.d.ts +9 -9
  414. package/api/types/HarborSavedQueryDraftEnvelope.d.ts +1 -0
  415. package/api/types/HarborSavedQueryDraftListEnvelope.d.ts +2 -0
  416. package/api/types/HarborSavedQueryDraftResponse.d.ts +13 -13
  417. package/api/types/HarborSavedQueryEnvelope.d.ts +1 -0
  418. package/api/types/HarborSavedQueryListEnvelope.d.ts +2 -0
  419. package/api/types/HarborSavedQueryMetadataResponse.d.ts +9 -9
  420. package/api/types/HarborSavedQueryParameter.d.ts +4 -4
  421. package/api/types/HarborSavedQueryParameter.js +1 -1
  422. package/api/types/HarborSavedQueryPreviewResponse.d.ts +2 -2
  423. package/api/types/HarborSavedQueryResponse.d.ts +13 -13
  424. package/api/types/HarborSavedQueryValidationEnvelope.d.ts +1 -0
  425. package/api/types/HarborSchemaListEnvelope.d.ts +3 -0
  426. package/api/types/HarborSchemaResponse.d.ts +2 -0
  427. package/api/types/HarborSourceMappingResponse.d.ts +2 -2
  428. package/api/types/HarborSourceReference.d.ts +5 -3
  429. package/api/types/HarborStatusEnvelope.d.ts +1 -0
  430. package/api/types/HarborStatusResponse.d.ts +1 -1
  431. package/api/types/HarborStatusScheduleResponse.d.ts +12 -10
  432. package/api/types/HarborUserEnvelope.d.ts +1 -0
  433. package/api/types/HarborUserListEnvelope.d.ts +2 -0
  434. package/api/types/HarborUserResponse.d.ts +7 -7
  435. package/api/types/HarboractivityEventType.d.ts +29 -0
  436. package/api/types/HarboractivityEventType.js +32 -0
  437. package/api/types/HarboractivityOutcome.d.ts +7 -0
  438. package/api/types/HarboractivityOutcome.js +10 -0
  439. package/api/types/HarboractivityProvenance.d.ts +6 -0
  440. package/api/types/HarboractivityProvenance.js +9 -0
  441. package/api/types/HarboractivityQueryPhase.d.ts +6 -0
  442. package/api/types/HarboractivityQueryPhase.js +9 -0
  443. package/api/types/HarboractivityStatementCategory.d.ts +6 -0
  444. package/api/types/HarboractivityStatementCategory.js +9 -0
  445. package/api/types/HarboractivityapiHarborActivityActorSnapshot.d.ts +4 -0
  446. package/api/types/HarboractivityapiHarborActivityEvent.d.ts +24 -3
  447. package/api/types/HarboractivityapiHarborActivityIdentitySnapshot.d.ts +1 -0
  448. package/api/types/HarboractivityapiHarborActivityMetadata.d.ts +37 -5
  449. package/api/types/HarboractivityapiHarborActivityQuerySource.d.ts +4 -0
  450. package/api/types/HarboractivityapiHarborActivitySavedQuerySource.d.ts +5 -0
  451. package/api/types/HarboractivityapiHarborActivitySession.d.ts +16 -1
  452. package/api/types/HarboractivityapiHarborActivitySession.js +1 -0
  453. package/api/types/HarboractivityapiHarborActivityTarget.d.ts +6 -0
  454. package/api/types/Identity.d.ts +5 -0
  455. package/api/types/IdentityCredentialApiKeyProfileSchema.d.ts +5 -4
  456. package/api/types/IdentityCredentialCapabilitiesSchema.d.ts +2 -0
  457. package/api/types/IdentityCredentialConnectionCapabilitySchema.d.ts +1 -1
  458. package/api/types/IdentityCredentialHarborSchema.d.ts +3 -3
  459. package/api/types/IdentityCredentialSchema.d.ts +7 -5
  460. package/api/types/IdentityFunction.d.ts +1 -1
  461. package/api/types/JobResponse.d.ts +3 -2
  462. package/api/types/ListBulkSchemaEnvelope.d.ts +1 -0
  463. package/api/types/ListBulkSyncExecutionsEnvelope.d.ts +2 -0
  464. package/api/types/ListBulkSyncExecutionsStatusEnvelope.d.ts +1 -0
  465. package/api/types/ListExecutionResponseEnvelope.d.ts +2 -0
  466. package/api/types/ListSyncItem.d.ts +13 -10
  467. package/api/types/ListSyncResponseEnvelope.d.ts +2 -0
  468. package/api/types/LogsIndexEntry.d.ts +2 -2
  469. package/api/types/LogsIndexResponse.d.ts +6 -0
  470. package/api/types/LogsIndexResponseEnvelope.d.ts +1 -0
  471. package/api/types/Mode.d.ts +5 -5
  472. package/api/types/ModelField.d.ts +12 -0
  473. package/api/types/ModelFieldResponse.d.ts +1 -0
  474. package/api/types/ModelFieldSearchHit.d.ts +10 -2
  475. package/api/types/ModelFilterCondition.d.ts +2 -2
  476. package/api/types/ModelListResponseEnvelope.d.ts +1 -0
  477. package/api/types/ModelModelFieldRequest.d.ts +4 -0
  478. package/api/types/ModelRelation.d.ts +2 -0
  479. package/api/types/ModelRelationTo.d.ts +2 -0
  480. package/api/types/ModelResponse.d.ts +18 -0
  481. package/api/types/ModelResponseEnvelope.d.ts +2 -0
  482. package/api/types/ModelSample.d.ts +2 -0
  483. package/api/types/ModelSampleResponseEnvelope.d.ts +2 -0
  484. package/api/types/ModelSearchHit.d.ts +7 -1
  485. package/api/types/ModelSyncProblem.d.ts +2 -2
  486. package/api/types/ModelSyncSearchHit.d.ts +8 -1
  487. package/api/types/ModelSyncSourceConnection.d.ts +3 -0
  488. package/api/types/ModelSyncSourceIdentity.d.ts +2 -1
  489. package/api/types/ModelSyncV5Response.d.ts +23 -2
  490. package/api/types/ModelSyncV5ResponseEnvelope.d.ts +1 -0
  491. package/api/types/ModelSyncV5Target.d.ts +4 -1
  492. package/api/types/OperationMatch.d.ts +6 -6
  493. package/api/types/OperationSearchAvailabilityEnvelope.d.ts +6 -1
  494. package/api/types/OperationSearchRateLimit.d.ts +3 -3
  495. package/api/types/OperationSearchRateLimit.js +1 -1
  496. package/api/types/OperationSearchResult.d.ts +3 -3
  497. package/api/types/Organization.d.ts +5 -5
  498. package/api/types/OutputActor.d.ts +3 -0
  499. package/api/types/Override.d.ts +5 -1
  500. package/api/types/OverrideField.d.ts +2 -2
  501. package/api/types/OverrideFieldInput.d.ts +2 -2
  502. package/api/types/PaginationDetails.d.ts +1 -0
  503. package/api/types/PickValue.d.ts +2 -0
  504. package/api/types/PolicyAction.d.ts +1 -0
  505. package/api/types/QueryResultsEnvelope.d.ts +2 -0
  506. package/api/types/RecordLoggingSettingsEnvelope.d.ts +1 -0
  507. package/api/types/RecordLoggingSettingsResponse.d.ts +3 -3
  508. package/api/types/RecordviewCapabilities.d.ts +11 -1
  509. package/api/types/RegisterHarborSessionEnvelope.d.ts +1 -0
  510. package/api/types/RegisterHarborSessionResponse.d.ts +3 -1
  511. package/api/types/Relation.d.ts +2 -0
  512. package/api/types/RelationTo.d.ts +2 -0
  513. package/api/types/ResolveHarborSourceMappingsEnvelope.d.ts +6 -2
  514. package/api/types/RevokedHarborKeyEnvelope.d.ts +5 -1
  515. package/api/types/RunAfter.d.ts +2 -0
  516. package/api/types/RunQueryEnvelope.d.ts +1 -0
  517. package/api/types/RunQueryResult.d.ts +3 -2
  518. package/api/types/Schedule.d.ts +9 -0
  519. package/api/types/ScheduleEnvelope.d.ts +1 -0
  520. package/api/types/ScheduleOptionResponse.d.ts +1 -0
  521. package/api/types/ScheduleOptionResponseEnvelope.d.ts +1 -0
  522. package/api/types/ScheduleScheduleOption.d.ts +4 -0
  523. package/api/types/SchedulesEnvelope.d.ts +1 -0
  524. package/api/types/Schema.d.ts +3 -0
  525. package/api/types/SchemaAssociation.d.ts +4 -0
  526. package/api/types/SchemaConfiguration.d.ts +10 -2
  527. package/api/types/SchemaField.d.ts +12 -6
  528. package/api/types/SchemaFieldResponseEnvelope.d.ts +1 -0
  529. package/api/types/SchemaOperationIdempotency.d.ts +2 -0
  530. package/api/types/SchemaPrimaryKeyOverrideInput.d.ts +2 -0
  531. package/api/types/SchemaRecordsResponseEnvelope.d.ts +1 -0
  532. package/api/types/SearchEnvelope.d.ts +2 -0
  533. package/api/types/SearchMatch.d.ts +3 -1
  534. package/api/types/SearchMatchAttribute.d.ts +3 -3
  535. package/api/types/SearchMatchMapping.d.ts +9 -1
  536. package/api/types/SearchMatchMapping.js +1 -0
  537. package/api/types/SearchMatchSchema.d.ts +3 -3
  538. package/api/types/SearchOperationsEnvelope.d.ts +1 -0
  539. package/api/types/SearchOperationsResponse.d.ts +2 -2
  540. package/api/types/SearchResultLinks.d.ts +6 -0
  541. package/api/types/Source.d.ts +2 -0
  542. package/api/types/SourceMeta.d.ts +1 -1
  543. package/api/types/StartSyncResponseEnvelope.d.ts +1 -0
  544. package/api/types/StartSyncResponseSchema.d.ts +2 -0
  545. package/api/types/SupportedBulkMode.d.ts +6 -0
  546. package/api/types/SupportedFilterFunction.d.ts +3 -2
  547. package/api/types/SupportedMode.d.ts +4 -3
  548. package/api/types/SyncDestinationProperties.d.ts +13 -13
  549. package/api/types/SyncErrorHandling.d.ts +4 -4
  550. package/api/types/SyncErrorHandlingEnvelope.d.ts +1 -0
  551. package/api/types/SyncField.d.ts +3 -2
  552. package/api/types/SyncSourceMetaResponse.d.ts +3 -3
  553. package/api/types/SyncStatusEnvelope.d.ts +1 -0
  554. package/api/types/SyncStatusResponse.d.ts +3 -0
  555. package/api/types/TargetCreator.d.ts +2 -2
  556. package/api/types/TargetField.d.ts +12 -12
  557. package/api/types/TargetFilterCondition.d.ts +2 -2
  558. package/api/types/TargetObject.d.ts +3 -3
  559. package/api/types/TargetObjectsResponseEnvelope.d.ts +2 -0
  560. package/api/types/TargetPropertyValues.d.ts +4 -4
  561. package/api/types/TargetPropertyValuesEnvelope.d.ts +1 -0
  562. package/api/types/TargetResponse.d.ts +2 -1
  563. package/api/types/TargetResponseEnvelope.d.ts +1 -0
  564. package/api/types/TemporaryCredentialResponse.d.ts +2 -2
  565. package/api/types/TemporaryCredentialResponseEnvelope.d.ts +1 -0
  566. package/api/types/TemporaryCredentialSubject.d.ts +1 -1
  567. package/api/types/UnassignedHarborUserEnvelope.d.ts +5 -1
  568. package/api/types/UpdateBulkField.d.ts +4 -0
  569. package/api/types/UpdateBulkSyncSchemasEnvelope.d.ts +1 -0
  570. package/api/types/User.d.ts +4 -4
  571. package/api/types/UserFieldRequest.d.ts +4 -3
  572. package/api/types/UtilEnumValue.d.ts +2 -0
  573. package/api/types/WebhookDelivery.d.ts +1 -1
  574. package/api/types/index.d.ts +9 -1
  575. package/api/types/index.js +9 -1
  576. package/package.json +1 -1
  577. package/reference.md +2782 -2650
  578. package/version.d.ts +1 -1
  579. package/version.js +1 -1
  580. package/api/resources/harbors/client/requests/HarborsDeleteContextDraftRequest.d.ts +0 -8
  581. package/api/resources/harbors/client/requests/HarborsDeleteContextRequest.d.ts +0 -8
  582. package/api/resources/harbors/client/requests/HarborsGetAuthorizedSchemaRequest.d.ts +0 -8
  583. package/api/resources/harbors/client/requests/HarborsGetContextDraftRequest.d.ts +0 -8
  584. package/api/resources/harbors/client/requests/HarborsGetContextRequest.d.ts +0 -8
  585. package/api/resources/harbors/client/requests/HarborsGetContextVersionRequest.d.ts +0 -8
  586. package/api/resources/harbors/client/requests/HarborsGetSavedQueryRequest.d.ts +0 -8
  587. package/api/resources/harbors/client/requests/HarborsListAuthorizedConnectionsRequest.d.ts +0 -13
  588. package/api/resources/harbors/client/requests/HarborsListAuthorizedSchemasRequest.d.ts +0 -13
  589. package/api/resources/harbors/client/requests/HarborsListSavedQueriesRequest.d.ts +0 -15
  590. package/api/resources/harbors/client/requests/HarborsPromoteContextDraftRequest.d.ts +0 -8
  591. package/api/types/ActivateSyncInput.d.ts +0 -3
  592. /package/api/resources/{activity/client/requests/ActivityGetSessionRequest.js → bulkSync/client/requests/ActivateBulkSyncInput.js} +0 -0
  593. /package/api/resources/{activity/client/requests/ActivityListRequest.js → bulkSync/client/requests/BulkSyncGetDestinationRequest.js} +0 -0
  594. /package/api/resources/{activity → harbors/resources/actionConfiguration}/client/index.d.ts +0 -0
  595. /package/api/resources/{activity → harbors/resources/actionConfiguration}/client/index.js +0 -0
  596. /package/api/resources/harbors/{client/requests/CreateHarborContextDraftRequest.js → resources/actionConfiguration/client/requests/ActionConfigurationListSchemasRequest.js} +0 -0
  597. /package/api/resources/harbors/{client/requests/CreateHarborContextRequest.js → resources/actionConfiguration/client/requests/ActionConfigurationRemoveRequest.js} +0 -0
  598. /package/api/resources/harbors/{client → resources/actionConfiguration/client}/requests/SetHarborActionConfigurationRequest.js +0 -0
  599. /package/api/resources/{activity → harbors/resources/actionConfiguration}/client/requests/index.js +0 -0
  600. /package/api/resources/harbors/{client/requests/CreateHarborSavedQueryDraftRequest.js → resources/activity/client/requests/ActivityGetSessionRequest.js} +0 -0
  601. /package/api/resources/harbors/{client/requests/ExecuteHarborSavedQueryRequest.js → resources/activity/client/requests/ActivityListRequest.js} +0 -0
  602. /package/api/resources/{activity → harbors/resources/activity}/client/requests/index.d.ts +0 -0
  603. /package/api/resources/{activity → harbors/resources/activity}/exports.d.ts +0 -0
  604. /package/api/resources/{activity → harbors/resources/activity}/exports.js +0 -0
  605. /package/api/resources/{activity → harbors/resources/activity}/index.d.ts +0 -0
  606. /package/api/resources/{activity → harbors/resources/activity}/index.js +0 -0
  607. /package/api/resources/{activity → harbors/resources/activity}/types/ActivityGetSessionRequestOrder.d.ts +0 -0
  608. /package/api/resources/{activity → harbors/resources/activity}/types/ActivityGetSessionRequestOrder.js +0 -0
  609. /package/api/resources/{activity → harbors/resources/activity}/types/ActivityListRequestOrder.d.ts +0 -0
  610. /package/api/resources/{activity → harbors/resources/activity}/types/ActivityListRequestOrder.js +0 -0
  611. /package/api/resources/{activity → harbors/resources/activity}/types/index.d.ts +0 -0
  612. /package/api/resources/{activity → harbors/resources/activity}/types/index.js +0 -0
  613. /package/api/resources/harbors/{client/requests/HarborsDeleteContextDraftRequest.js → resources/connections/client/requests/ConnectionsGetSchemaRequest.js} +0 -0
  614. /package/api/resources/harbors/{client/requests/HarborsDeleteContextRequest.js → resources/connections/client/requests/ConnectionsListRequest.js} +0 -0
  615. /package/api/resources/harbors/{client/requests/HarborsGetAuthorizedSchemaRequest.js → resources/connections/client/requests/ConnectionsListSchemasRequest.js} +0 -0
  616. /package/api/resources/harbors/{client/requests/HarborsGetContextDraftRequest.js → resources/contexts/client/requests/ContextsDeleteDraftRequest.js} +0 -0
  617. /package/api/resources/harbors/{client/requests/HarborsGetContextRequest.js → resources/contexts/client/requests/ContextsDeleteRequest.js} +0 -0
  618. /package/api/resources/harbors/{client/requests/HarborsGetContextVersionRequest.js → resources/contexts/client/requests/ContextsGetDraftRequest.js} +0 -0
  619. /package/api/resources/harbors/{client/requests/HarborsGetSavedQueryRequest.js → resources/contexts/client/requests/ContextsGetRequest.js} +0 -0
  620. /package/api/resources/harbors/{client/requests/HarborsListActionConfigurationSchemasRequest.js → resources/contexts/client/requests/ContextsGetVersionRequest.js} +0 -0
  621. /package/api/resources/harbors/{client/requests/HarborsListAuthorizedConnectionsRequest.js → resources/contexts/client/requests/ContextsListDraftsRequest.js} +0 -0
  622. /package/api/resources/harbors/{client/requests/HarborsListAuthorizedSchemasRequest.js → resources/contexts/client/requests/ContextsListRequest.js} +0 -0
  623. /package/api/resources/harbors/{client/requests/HarborsListContextDraftsRequest.js → resources/contexts/client/requests/ContextsListVersionsRequest.js} +0 -0
  624. /package/api/resources/harbors/{client/requests/HarborsListContextVersionsRequest.js → resources/contexts/client/requests/ContextsPromoteDraftRequest.js} +0 -0
  625. /package/api/resources/harbors/{client/requests/HarborsListContextsRequest.js → resources/contexts/client/requests/CreateHarborContextDraftRequest.js} +0 -0
  626. /package/api/resources/harbors/{client → resources/contexts/client}/requests/CreateHarborContextRequest.d.ts +0 -0
  627. /package/api/resources/harbors/{client/requests/HarborsListKeysRequest.js → resources/contexts/client/requests/CreateHarborContextRequest.js} +0 -0
  628. /package/api/resources/harbors/{client → resources/contexts/client}/requests/ResolveHarborSourceMappingsRequest.js +0 -0
  629. /package/api/resources/harbors/{client → resources/contexts/client}/requests/SaveHarborContextDraftRequest.js +0 -0
  630. /package/api/resources/harbors/{client → resources/contexts/client}/requests/SaveHarborContextRequest.js +0 -0
  631. /package/api/resources/harbors/{client/requests/HarborsListSavedQueriesRequest.js → resources/keys/client/requests/KeysListRequest.js} +0 -0
  632. /package/api/resources/harbors/{client/requests/HarborsListSavedQueryDraftsRequest.js → resources/savedQueries/client/requests/CreateHarborSavedQueryDraftRequest.js} +0 -0
  633. /package/api/resources/harbors/{client/requests/HarborsListUsersRequest.js → resources/savedQueries/client/requests/ExecuteHarborSavedQueryRequest.js} +0 -0
  634. /package/api/resources/harbors/{client → resources/savedQueries/client}/requests/SaveHarborSavedQueryDraftRequest.js +0 -0
  635. /package/api/resources/harbors/{client/requests/HarborsPromoteContextDraftRequest.js → resources/savedQueries/client/requests/SavedQueriesGetRequest.js} +0 -0
  636. /package/api/resources/harbors/{client/requests/HarborsRemoveActionConfigurationRequest.js → resources/savedQueries/client/requests/SavedQueriesListDraftsRequest.js} +0 -0
  637. /package/api/resources/harbors/{client/requests/InviteHarborUserRequest.js → resources/savedQueries/client/requests/SavedQueriesListRequest.js} +0 -0
  638. /package/api/{types/ActivateSyncInput.js → resources/harbors/resources/users/client/requests/InviteHarborUserRequest.js} +0 -0
@@ -0,0 +1,1008 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ var __rest = (this && this.__rest) || function (s, e) {
46
+ var t = {};
47
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
48
+ t[p] = s[p];
49
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
50
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
51
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
52
+ t[p[i]] = s[p[i]];
53
+ }
54
+ return t;
55
+ };
56
+ Object.defineProperty(exports, "__esModule", { value: true });
57
+ exports.SavedQueriesClient = void 0;
58
+ const BaseClient_1 = require("../../../../../../BaseClient");
59
+ const core = __importStar(require("../../../../../../core"));
60
+ const headers_1 = require("../../../../../../core/headers");
61
+ const requestBody_1 = require("../../../../../../core/requestBody");
62
+ const environments = __importStar(require("../../../../../../environments"));
63
+ const handleNonStatusCodeError_1 = require("../../../../../../errors/handleNonStatusCodeError");
64
+ const errors = __importStar(require("../../../../../../errors/index"));
65
+ const Polytomic = __importStar(require("../../../../../index"));
66
+ class SavedQueriesClient {
67
+ constructor(options = {}) {
68
+ this._options = (0, BaseClient_1.normalizeClientOptionsWithAuth)(options);
69
+ }
70
+ /**
71
+ * Lists current published saved queries for a Harbor.
72
+ *
73
+ * Saved queries are supported only for Polytomic-managed Harbors whose backing
74
+ * Connection type is `polytomic_harbor`.
75
+ *
76
+ * Collection items contain current published metadata and omit SQL, parameter
77
+ * values, and unpublished drafts. A Harbor profile credential can list saved
78
+ * queries only when `harbor_id` identifies its own Harbor.
79
+ *
80
+ * ## Harbor Activity
81
+ *
82
+ * When you use a Harbor profile credential, send a new nonzero UUID in
83
+ * `X-Polytomic-Activity-Request-ID` for each request, including each page. A
84
+ * missing or invalid ID returns `400 Bad Request`. Reusing a consumed ID returns
85
+ * `409 Conflict`.
86
+ *
87
+ * If you supply `X-Polytomic-Harbor-Session`, the session must be active and bound
88
+ * to your credential and Harbor. An invalid session returns `403 Forbidden`.
89
+ * Direct scoped REST requests may omit the session header.
90
+ *
91
+ * Polytomic records `saved_query.listed` before returning data. The event describes
92
+ * only the returned page, including saved-query IDs, immutable revision IDs,
93
+ * version numbers, and bounded name snapshots. Activity excludes SQL, parameter
94
+ * values, and expected column names. If Polytomic cannot record the event, the
95
+ * request returns `503 Service Unavailable` without saved-query data.
96
+ *
97
+ * @param {string} harbor_id - Unique identifier of the Harbor
98
+ * @param {Polytomic.harbors.SavedQueriesListRequest} request
99
+ * @param {SavedQueriesClient.RequestOptions} requestOptions - Request-specific configuration.
100
+ *
101
+ * @throws {@link Polytomic.BadRequestError}
102
+ * @throws {@link Polytomic.ForbiddenError}
103
+ * @throws {@link Polytomic.NotFoundError}
104
+ * @throws {@link Polytomic.ConflictError}
105
+ * @throws {@link Polytomic.UnprocessableEntityError}
106
+ * @throws {@link Polytomic.InternalServerError}
107
+ * @throws {@link Polytomic.ServiceUnavailableError}
108
+ * @throws {@link errors.PolytomicError}
109
+ * @throws {@link errors.PolytomicTimeoutError}
110
+ *
111
+ * @example
112
+ * await client.harbors.savedQueries.list("248df4b7-aa70-47b8-a036-33ac447e668d", {
113
+ * limit: 1,
114
+ * page_token: "page_token"
115
+ * })
116
+ */
117
+ list(harbor_id, request = {}, requestOptions) {
118
+ return core.HttpResponsePromise.fromPromise(this.__list(harbor_id, request, requestOptions));
119
+ }
120
+ __list(harbor_id_1) {
121
+ return __awaiter(this, arguments, void 0, function* (harbor_id, request = {}, requestOptions) {
122
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
123
+ const { limit, page_token: pageToken, "X-Polytomic-Harbor-Session": polytomicHarborSession, "X-Polytomic-Activity-Request-ID": polytomicActivityRequestId, } = request;
124
+ const _queryParams = {
125
+ limit,
126
+ page_token: pageToken,
127
+ };
128
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
129
+ const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
130
+ "X-Polytomic-Harbor-Session": polytomicHarborSession,
131
+ "X-Polytomic-Activity-Request-ID": polytomicActivityRequestId,
132
+ "X-Polytomic-Version": (_d = (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : "2025-09-18",
133
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
134
+ const _response = yield core.fetcher({
135
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, `api/harbors/${core.url.encodePathParam(harbor_id)}/saved-queries`),
136
+ method: "GET",
137
+ headers: _headers,
138
+ queryString: core.url
139
+ .queryBuilder()
140
+ .addMany(_queryParams)
141
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
142
+ .build(),
143
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
144
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
145
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
146
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
147
+ logging: this._options.logging,
148
+ });
149
+ if (_response.ok) {
150
+ return {
151
+ data: _response.body,
152
+ rawResponse: _response.rawResponse,
153
+ };
154
+ }
155
+ if (_response.error.reason === "status-code") {
156
+ switch (_response.error.statusCode) {
157
+ case 400:
158
+ throw new Polytomic.BadRequestError(_response.error.body, _response.rawResponse);
159
+ case 403:
160
+ throw new Polytomic.ForbiddenError(_response.error.body, _response.rawResponse);
161
+ case 404:
162
+ throw new Polytomic.NotFoundError(_response.error.body, _response.rawResponse);
163
+ case 409:
164
+ throw new Polytomic.ConflictError(_response.error.body, _response.rawResponse);
165
+ case 422:
166
+ throw new Polytomic.UnprocessableEntityError(_response.error.body, _response.rawResponse);
167
+ case 500:
168
+ throw new Polytomic.InternalServerError(_response.error.body, _response.rawResponse);
169
+ case 503:
170
+ throw new Polytomic.ServiceUnavailableError(_response.error.body, _response.rawResponse);
171
+ default:
172
+ throw new errors.PolytomicError({
173
+ statusCode: _response.error.statusCode,
174
+ body: _response.error.body,
175
+ rawResponse: _response.rawResponse,
176
+ });
177
+ }
178
+ }
179
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/harbors/{harbor_id}/saved-queries");
180
+ });
181
+ }
182
+ /**
183
+ * Creates a stable Harbor saved query with its initial mutable draft.
184
+ *
185
+ * Saved queries are supported only for Polytomic-managed Harbors whose backing
186
+ * Connection type is `polytomic_harbor`. Customer-managed Harbor backings return
187
+ * an unsupported-backing error.
188
+ *
189
+ * The saved query receives a stable ID, but it remains absent from published
190
+ * saved-query reads until an administrator publishes its initial draft.
191
+ *
192
+ * Use `{{parameter_name}}` references in `sql_template`. Each reference must have
193
+ * one scalar declaration. Validation values and defaults must match the declared
194
+ * `string`, `number`, `boolean`, `date`, `timestamp`, or `uuid` type.
195
+ *
196
+ * Unknown JSON fields, including fields inside parameter declarations, return
197
+ * `400 Bad Request` before the draft is saved. Use `default_value`, not `default`,
198
+ * for parameter defaults.
199
+ *
200
+ * When you omit a parameter during execution, Polytomic uses its published
201
+ * `default_value`, never its draft validation value. An omitted optional parameter
202
+ * without a default binds SQL `NULL`. A required parameter allows omission when a
203
+ * default exists, but rejects explicit `null` even with a default.
204
+ *
205
+ * For a report window, use a required parameter with a default so omission selects
206
+ * a useful window and explicit `null` is rejected:
207
+ *
208
+ * ```json
209
+ * {"name": "days", "type": "number", "required": true, "default_value": 7}
210
+ * ```
211
+ *
212
+ * @param {string} harbor_id - Unique identifier of the Harbor
213
+ * @param {Polytomic.harbors.CreateHarborSavedQueryDraftRequest} request
214
+ * @param {SavedQueriesClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
215
+ *
216
+ * @throws {@link Polytomic.BadRequestError}
217
+ * @throws {@link Polytomic.ForbiddenError}
218
+ * @throws {@link Polytomic.NotFoundError}
219
+ * @throws {@link Polytomic.UnprocessableEntityError}
220
+ * @throws {@link Polytomic.InternalServerError}
221
+ * @throws {@link errors.PolytomicError}
222
+ * @throws {@link errors.PolytomicTimeoutError}
223
+ *
224
+ * @example
225
+ * await client.harbors.savedQueries.createDraft("248df4b7-aa70-47b8-a036-33ac447e668d", {
226
+ * name: "Monthly revenue",
227
+ * sql_template: "SELECT account_id, sum(amount) AS revenue FROM orders WHERE created_at >= {{start_date}} GROUP BY account_id"
228
+ * })
229
+ */
230
+ createDraft(harbor_id, request, requestOptions) {
231
+ return core.HttpResponsePromise.fromPromise(this.__createDraft(harbor_id, request, requestOptions));
232
+ }
233
+ __createDraft(harbor_id, request, requestOptions) {
234
+ return __awaiter(this, void 0, void 0, function* () {
235
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
236
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
237
+ const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
238
+ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey,
239
+ "X-Polytomic-Version": (_d = (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : "2025-09-18",
240
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
241
+ const _response = yield core.fetcher({
242
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, `api/harbors/${core.url.encodePathParam(harbor_id)}/saved-queries`),
243
+ method: "POST",
244
+ headers: _headers,
245
+ contentType: "application/json",
246
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
247
+ requestType: "json",
248
+ body: (0, requestBody_1.mergeAdditionalBodyParameters)(request, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
249
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
250
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
251
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
252
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
253
+ logging: this._options.logging,
254
+ });
255
+ if (_response.ok) {
256
+ return {
257
+ data: _response.body,
258
+ rawResponse: _response.rawResponse,
259
+ };
260
+ }
261
+ if (_response.error.reason === "status-code") {
262
+ switch (_response.error.statusCode) {
263
+ case 400:
264
+ throw new Polytomic.BadRequestError(_response.error.body, _response.rawResponse);
265
+ case 403:
266
+ throw new Polytomic.ForbiddenError(_response.error.body, _response.rawResponse);
267
+ case 404:
268
+ throw new Polytomic.NotFoundError(_response.error.body, _response.rawResponse);
269
+ case 422:
270
+ throw new Polytomic.UnprocessableEntityError(_response.error.body, _response.rawResponse);
271
+ case 500:
272
+ throw new Polytomic.InternalServerError(_response.error.body, _response.rawResponse);
273
+ default:
274
+ throw new errors.PolytomicError({
275
+ statusCode: _response.error.statusCode,
276
+ body: _response.error.body,
277
+ rawResponse: _response.rawResponse,
278
+ });
279
+ }
280
+ }
281
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/api/harbors/{harbor_id}/saved-queries");
282
+ });
283
+ }
284
+ /**
285
+ * Lists mutable Harbor saved-query drafts.
286
+ *
287
+ * Drafts are ordered from newest to oldest and include complete SQL, typed
288
+ * parameter declarations, and author-supplied validation values. Harbor profile
289
+ * credentials cannot access this endpoint.
290
+ *
291
+ * @param {string} harbor_id - Unique identifier of the Harbor
292
+ * @param {Polytomic.harbors.SavedQueriesListDraftsRequest} request
293
+ * @param {SavedQueriesClient.RequestOptions} requestOptions - Request-specific configuration.
294
+ *
295
+ * @throws {@link Polytomic.ForbiddenError}
296
+ * @throws {@link Polytomic.NotFoundError}
297
+ * @throws {@link Polytomic.UnprocessableEntityError}
298
+ * @throws {@link Polytomic.InternalServerError}
299
+ * @throws {@link errors.PolytomicError}
300
+ * @throws {@link errors.PolytomicTimeoutError}
301
+ *
302
+ * @example
303
+ * await client.harbors.savedQueries.listDrafts("248df4b7-aa70-47b8-a036-33ac447e668d", {
304
+ * limit: 1,
305
+ * page_token: "page_token"
306
+ * })
307
+ */
308
+ listDrafts(harbor_id, request = {}, requestOptions) {
309
+ return core.HttpResponsePromise.fromPromise(this.__listDrafts(harbor_id, request, requestOptions));
310
+ }
311
+ __listDrafts(harbor_id_1) {
312
+ return __awaiter(this, arguments, void 0, function* (harbor_id, request = {}, requestOptions) {
313
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
314
+ const { limit, page_token: pageToken } = request;
315
+ const _queryParams = {
316
+ limit,
317
+ page_token: pageToken,
318
+ };
319
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
320
+ const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
321
+ "X-Polytomic-Version": (_d = (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : "2025-09-18",
322
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
323
+ const _response = yield core.fetcher({
324
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, `api/harbors/${core.url.encodePathParam(harbor_id)}/saved-queries/drafts`),
325
+ method: "GET",
326
+ headers: _headers,
327
+ queryString: core.url
328
+ .queryBuilder()
329
+ .addMany(_queryParams)
330
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
331
+ .build(),
332
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
333
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
334
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
335
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
336
+ logging: this._options.logging,
337
+ });
338
+ if (_response.ok) {
339
+ return {
340
+ data: _response.body,
341
+ rawResponse: _response.rawResponse,
342
+ };
343
+ }
344
+ if (_response.error.reason === "status-code") {
345
+ switch (_response.error.statusCode) {
346
+ case 403:
347
+ throw new Polytomic.ForbiddenError(_response.error.body, _response.rawResponse);
348
+ case 404:
349
+ throw new Polytomic.NotFoundError(_response.error.body, _response.rawResponse);
350
+ case 422:
351
+ throw new Polytomic.UnprocessableEntityError(_response.error.body, _response.rawResponse);
352
+ case 500:
353
+ throw new Polytomic.InternalServerError(_response.error.body, _response.rawResponse);
354
+ default:
355
+ throw new errors.PolytomicError({
356
+ statusCode: _response.error.statusCode,
357
+ body: _response.error.body,
358
+ rawResponse: _response.rawResponse,
359
+ });
360
+ }
361
+ }
362
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/harbors/{harbor_id}/saved-queries/drafts");
363
+ });
364
+ }
365
+ /**
366
+ * Returns the current published version of one Harbor saved query.
367
+ *
368
+ * The response contains the current immutable `revision_id`, SQL template,
369
+ * parameter contract, expected columns, and publication provenance. Validation
370
+ * inputs are draft-only and are never part of a published response.
371
+ *
372
+ * A Harbor profile credential can retrieve a saved query only from its own Harbor.
373
+ *
374
+ * ## Harbor Activity
375
+ *
376
+ * When you use a Harbor profile credential, send a new nonzero UUID in
377
+ * `X-Polytomic-Activity-Request-ID` for each request. A missing or invalid ID
378
+ * returns `400 Bad Request`. Reusing a consumed ID returns `409 Conflict`.
379
+ *
380
+ * If you supply `X-Polytomic-Harbor-Session`, the session must be active and bound
381
+ * to your credential and Harbor. An invalid session returns `403 Forbidden`.
382
+ * Direct scoped REST requests may omit the session header.
383
+ *
384
+ * Polytomic records `saved_query.fetched` before returning the definition. The
385
+ * event identifies the saved query, exact immutable revision, published version,
386
+ * and bounded name snapshot. It does not indicate query execution. Activity
387
+ * excludes SQL, parameter defaults and validation values, expected column names,
388
+ * and result rows. If Polytomic cannot record the event, the request returns
389
+ * `503 Service Unavailable` without saved-query data.
390
+ *
391
+ * @param {string} harbor_id - Unique identifier of the Harbor
392
+ * @param {string} saved_query_id - Unique stable identifier of the saved query
393
+ * @param {Polytomic.harbors.SavedQueriesGetRequest} request
394
+ * @param {SavedQueriesClient.RequestOptions} requestOptions - Request-specific configuration.
395
+ *
396
+ * @throws {@link Polytomic.BadRequestError}
397
+ * @throws {@link Polytomic.ForbiddenError}
398
+ * @throws {@link Polytomic.NotFoundError}
399
+ * @throws {@link Polytomic.ConflictError}
400
+ * @throws {@link Polytomic.UnprocessableEntityError}
401
+ * @throws {@link Polytomic.InternalServerError}
402
+ * @throws {@link Polytomic.ServiceUnavailableError}
403
+ * @throws {@link errors.PolytomicError}
404
+ * @throws {@link errors.PolytomicTimeoutError}
405
+ *
406
+ * @example
407
+ * await client.harbors.savedQueries.get("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d")
408
+ */
409
+ get(harbor_id, saved_query_id, request = {}, requestOptions) {
410
+ return core.HttpResponsePromise.fromPromise(this.__get(harbor_id, saved_query_id, request, requestOptions));
411
+ }
412
+ __get(harbor_id_1, saved_query_id_1) {
413
+ return __awaiter(this, arguments, void 0, function* (harbor_id, saved_query_id, request = {}, requestOptions) {
414
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
415
+ const { "X-Polytomic-Harbor-Session": polytomicHarborSession, "X-Polytomic-Activity-Request-ID": polytomicActivityRequestId, } = request;
416
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
417
+ const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
418
+ "X-Polytomic-Harbor-Session": polytomicHarborSession,
419
+ "X-Polytomic-Activity-Request-ID": polytomicActivityRequestId,
420
+ "X-Polytomic-Version": (_d = (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : "2025-09-18",
421
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
422
+ const _response = yield core.fetcher({
423
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, `api/harbors/${core.url.encodePathParam(harbor_id)}/saved-queries/${core.url.encodePathParam(saved_query_id)}`),
424
+ method: "GET",
425
+ headers: _headers,
426
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
427
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
428
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
429
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
430
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
431
+ logging: this._options.logging,
432
+ });
433
+ if (_response.ok) {
434
+ return { data: _response.body, rawResponse: _response.rawResponse };
435
+ }
436
+ if (_response.error.reason === "status-code") {
437
+ switch (_response.error.statusCode) {
438
+ case 400:
439
+ throw new Polytomic.BadRequestError(_response.error.body, _response.rawResponse);
440
+ case 403:
441
+ throw new Polytomic.ForbiddenError(_response.error.body, _response.rawResponse);
442
+ case 404:
443
+ throw new Polytomic.NotFoundError(_response.error.body, _response.rawResponse);
444
+ case 409:
445
+ throw new Polytomic.ConflictError(_response.error.body, _response.rawResponse);
446
+ case 422:
447
+ throw new Polytomic.UnprocessableEntityError(_response.error.body, _response.rawResponse);
448
+ case 500:
449
+ throw new Polytomic.InternalServerError(_response.error.body, _response.rawResponse);
450
+ case 503:
451
+ throw new Polytomic.ServiceUnavailableError(_response.error.body, _response.rawResponse);
452
+ default:
453
+ throw new errors.PolytomicError({
454
+ statusCode: _response.error.statusCode,
455
+ body: _response.error.body,
456
+ rawResponse: _response.rawResponse,
457
+ });
458
+ }
459
+ }
460
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/harbors/{harbor_id}/saved-queries/{saved_query_id}");
461
+ });
462
+ }
463
+ /**
464
+ * Archives one Harbor saved query and removes it from active reads.
465
+ *
466
+ * Archiving removes the saved query and any draft from active reads while
467
+ * retaining its immutable revisions for provenance. The operation does not run
468
+ * the saved SQL or modify the Harbor backing Connection. Archiving does not cancel
469
+ * in-flight execution requests or queued executions.
470
+ *
471
+ * This REST operation archives the saved query; it does not merely unpublish it.
472
+ * Unpublish is available only through the GraphQL `unpublishHarborSavedQuery`
473
+ * mutation. There is no REST unpublish endpoint.
474
+ *
475
+ * @param {string} harbor_id - Unique identifier of the Harbor
476
+ * @param {string} saved_query_id - Unique stable identifier of the saved query
477
+ * @param {SavedQueriesClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
478
+ *
479
+ * @throws {@link Polytomic.ForbiddenError}
480
+ * @throws {@link Polytomic.NotFoundError}
481
+ * @throws {@link Polytomic.UnprocessableEntityError}
482
+ * @throws {@link Polytomic.InternalServerError}
483
+ * @throws {@link errors.PolytomicError}
484
+ * @throws {@link errors.PolytomicTimeoutError}
485
+ *
486
+ * @example
487
+ * await client.harbors.savedQueries.delete("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d")
488
+ */
489
+ delete(harbor_id, saved_query_id, requestOptions) {
490
+ return core.HttpResponsePromise.fromPromise(this.__delete(harbor_id, saved_query_id, requestOptions));
491
+ }
492
+ __delete(harbor_id, saved_query_id, requestOptions) {
493
+ return __awaiter(this, void 0, void 0, function* () {
494
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
495
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
496
+ const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
497
+ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey,
498
+ "X-Polytomic-Version": (_d = (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : "2025-09-18",
499
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
500
+ const _response = yield core.fetcher({
501
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, `api/harbors/${core.url.encodePathParam(harbor_id)}/saved-queries/${core.url.encodePathParam(saved_query_id)}`),
502
+ method: "DELETE",
503
+ headers: _headers,
504
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
505
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
506
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
507
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
508
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
509
+ logging: this._options.logging,
510
+ });
511
+ if (_response.ok) {
512
+ return {
513
+ data: _response.body,
514
+ rawResponse: _response.rawResponse,
515
+ };
516
+ }
517
+ if (_response.error.reason === "status-code") {
518
+ switch (_response.error.statusCode) {
519
+ case 403:
520
+ throw new Polytomic.ForbiddenError(_response.error.body, _response.rawResponse);
521
+ case 404:
522
+ throw new Polytomic.NotFoundError(_response.error.body, _response.rawResponse);
523
+ case 422:
524
+ throw new Polytomic.UnprocessableEntityError(_response.error.body, _response.rawResponse);
525
+ case 500:
526
+ throw new Polytomic.InternalServerError(_response.error.body, _response.rawResponse);
527
+ default:
528
+ throw new errors.PolytomicError({
529
+ statusCode: _response.error.statusCode,
530
+ body: _response.error.body,
531
+ rawResponse: _response.rawResponse,
532
+ });
533
+ }
534
+ }
535
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/api/harbors/{harbor_id}/saved-queries/{saved_query_id}");
536
+ });
537
+ }
538
+ /**
539
+ * Creates or completely replaces the mutable draft for a Harbor saved query.
540
+ *
541
+ * Replacement is complete rather than partial. The next validation or publication
542
+ * uses the replacement SQL, parameter declarations, and validation values.
543
+ *
544
+ * Unknown JSON fields, including fields inside parameter declarations, return
545
+ * `400 Bad Request` before the draft is saved. Use `default_value`, not `default`,
546
+ * for parameter defaults.
547
+ *
548
+ * When you omit a parameter during execution, Polytomic uses its published
549
+ * `default_value`, never its draft validation value. An omitted optional parameter
550
+ * without a default binds SQL `NULL`. A required parameter allows omission when a
551
+ * default exists, but rejects explicit `null` even with a default.
552
+ *
553
+ * For a report window, use a required parameter with a default so omission selects
554
+ * a useful window and explicit `null` is rejected:
555
+ *
556
+ * ```json
557
+ * {"name": "days", "type": "number", "required": true, "default_value": 7}
558
+ * ```
559
+ *
560
+ * @param {string} harbor_id - Unique identifier of the Harbor
561
+ * @param {string} saved_query_id - Unique stable identifier of the saved query
562
+ * @param {Polytomic.harbors.SaveHarborSavedQueryDraftRequest} request
563
+ * @param {SavedQueriesClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
564
+ *
565
+ * @throws {@link Polytomic.BadRequestError}
566
+ * @throws {@link Polytomic.ForbiddenError}
567
+ * @throws {@link Polytomic.NotFoundError}
568
+ * @throws {@link Polytomic.UnprocessableEntityError}
569
+ * @throws {@link Polytomic.InternalServerError}
570
+ * @throws {@link errors.PolytomicError}
571
+ * @throws {@link errors.PolytomicTimeoutError}
572
+ *
573
+ * @example
574
+ * await client.harbors.savedQueries.saveDraft("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d", {
575
+ * name: "Monthly revenue",
576
+ * sql_template: "SELECT account_id, sum(amount) AS revenue FROM orders WHERE created_at >= {{start_date}} GROUP BY account_id"
577
+ * })
578
+ */
579
+ saveDraft(harbor_id, saved_query_id, request, requestOptions) {
580
+ return core.HttpResponsePromise.fromPromise(this.__saveDraft(harbor_id, saved_query_id, request, requestOptions));
581
+ }
582
+ __saveDraft(harbor_id, saved_query_id, request, requestOptions) {
583
+ return __awaiter(this, void 0, void 0, function* () {
584
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
585
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
586
+ const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
587
+ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey,
588
+ "X-Polytomic-Version": (_d = (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : "2025-09-18",
589
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
590
+ const _response = yield core.fetcher({
591
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, `api/harbors/${core.url.encodePathParam(harbor_id)}/saved-queries/${core.url.encodePathParam(saved_query_id)}/draft`),
592
+ method: "PUT",
593
+ headers: _headers,
594
+ contentType: "application/json",
595
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
596
+ requestType: "json",
597
+ body: (0, requestBody_1.mergeAdditionalBodyParameters)(request, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
598
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
599
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
600
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
601
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
602
+ logging: this._options.logging,
603
+ });
604
+ if (_response.ok) {
605
+ return {
606
+ data: _response.body,
607
+ rawResponse: _response.rawResponse,
608
+ };
609
+ }
610
+ if (_response.error.reason === "status-code") {
611
+ switch (_response.error.statusCode) {
612
+ case 400:
613
+ throw new Polytomic.BadRequestError(_response.error.body, _response.rawResponse);
614
+ case 403:
615
+ throw new Polytomic.ForbiddenError(_response.error.body, _response.rawResponse);
616
+ case 404:
617
+ throw new Polytomic.NotFoundError(_response.error.body, _response.rawResponse);
618
+ case 422:
619
+ throw new Polytomic.UnprocessableEntityError(_response.error.body, _response.rawResponse);
620
+ case 500:
621
+ throw new Polytomic.InternalServerError(_response.error.body, _response.rawResponse);
622
+ default:
623
+ throw new errors.PolytomicError({
624
+ statusCode: _response.error.statusCode,
625
+ body: _response.error.body,
626
+ rawResponse: _response.rawResponse,
627
+ });
628
+ }
629
+ }
630
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/api/harbors/{harbor_id}/saved-queries/{saved_query_id}/draft");
631
+ });
632
+ }
633
+ /**
634
+ * Discards the mutable draft for one Harbor saved query.
635
+ *
636
+ * Discarding an initial unpublished draft also removes its otherwise empty stable
637
+ * saved-query identity. Discarding a later draft preserves every immutable
638
+ * published version.
639
+ *
640
+ * @param {string} harbor_id - Unique identifier of the Harbor
641
+ * @param {string} saved_query_id - Unique stable identifier of the saved query
642
+ * @param {SavedQueriesClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
643
+ *
644
+ * @throws {@link Polytomic.ForbiddenError}
645
+ * @throws {@link Polytomic.NotFoundError}
646
+ * @throws {@link Polytomic.ConflictError}
647
+ * @throws {@link Polytomic.UnprocessableEntityError}
648
+ * @throws {@link Polytomic.InternalServerError}
649
+ * @throws {@link errors.PolytomicError}
650
+ * @throws {@link errors.PolytomicTimeoutError}
651
+ *
652
+ * @example
653
+ * await client.harbors.savedQueries.deleteDraft("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d")
654
+ */
655
+ deleteDraft(harbor_id, saved_query_id, requestOptions) {
656
+ return core.HttpResponsePromise.fromPromise(this.__deleteDraft(harbor_id, saved_query_id, requestOptions));
657
+ }
658
+ __deleteDraft(harbor_id, saved_query_id, requestOptions) {
659
+ return __awaiter(this, void 0, void 0, function* () {
660
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
661
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
662
+ const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
663
+ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey,
664
+ "X-Polytomic-Version": (_d = (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : "2025-09-18",
665
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
666
+ const _response = yield core.fetcher({
667
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, `api/harbors/${core.url.encodePathParam(harbor_id)}/saved-queries/${core.url.encodePathParam(saved_query_id)}/draft`),
668
+ method: "DELETE",
669
+ headers: _headers,
670
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
671
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
672
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
673
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
674
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
675
+ logging: this._options.logging,
676
+ });
677
+ if (_response.ok) {
678
+ return {
679
+ data: _response.body,
680
+ rawResponse: _response.rawResponse,
681
+ };
682
+ }
683
+ if (_response.error.reason === "status-code") {
684
+ switch (_response.error.statusCode) {
685
+ case 403:
686
+ throw new Polytomic.ForbiddenError(_response.error.body, _response.rawResponse);
687
+ case 404:
688
+ throw new Polytomic.NotFoundError(_response.error.body, _response.rawResponse);
689
+ case 409:
690
+ throw new Polytomic.ConflictError(_response.error.body, _response.rawResponse);
691
+ case 422:
692
+ throw new Polytomic.UnprocessableEntityError(_response.error.body, _response.rawResponse);
693
+ case 500:
694
+ throw new Polytomic.InternalServerError(_response.error.body, _response.rawResponse);
695
+ default:
696
+ throw new errors.PolytomicError({
697
+ statusCode: _response.error.statusCode,
698
+ body: _response.error.body,
699
+ rawResponse: _response.rawResponse,
700
+ });
701
+ }
702
+ }
703
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/api/harbors/{harbor_id}/saved-queries/{saved_query_id}/draft");
704
+ });
705
+ }
706
+ /**
707
+ * Validates and publishes the current draft as the next immutable saved-query version.
708
+ *
709
+ * Only organization administrators can publish. Publication executes and validates
710
+ * the current draft with the Polytomic-managed Harbor's MotherDuck `read_scaling`
711
+ * credential. It fails instead of using the Harbor writer credential when the
712
+ * reader credential is missing or incomplete.
713
+ *
714
+ * After execution, publication verifies that the draft did not change. A
715
+ * concurrent edit returns a conflict and remains a draft. Successful publication
716
+ * creates the next immutable revision, records the observed ordered columns as its
717
+ * output contract, removes validation inputs from the published definition, and
718
+ * deletes the mutable draft. The response includes the immutable `revision_id`
719
+ * that future executions use for exact provenance.
720
+ *
721
+ * @param {string} harbor_id - Unique identifier of the Harbor
722
+ * @param {string} saved_query_id - Unique stable identifier of the saved query
723
+ * @param {SavedQueriesClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
724
+ *
725
+ * @throws {@link Polytomic.ForbiddenError}
726
+ * @throws {@link Polytomic.NotFoundError}
727
+ * @throws {@link Polytomic.ConflictError}
728
+ * @throws {@link Polytomic.UnprocessableEntityError}
729
+ * @throws {@link Polytomic.InternalServerError}
730
+ * @throws {@link errors.PolytomicError}
731
+ * @throws {@link errors.PolytomicTimeoutError}
732
+ *
733
+ * @example
734
+ * await client.harbors.savedQueries.publishDraft("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d")
735
+ */
736
+ publishDraft(harbor_id, saved_query_id, requestOptions) {
737
+ return core.HttpResponsePromise.fromPromise(this.__publishDraft(harbor_id, saved_query_id, requestOptions));
738
+ }
739
+ __publishDraft(harbor_id, saved_query_id, requestOptions) {
740
+ return __awaiter(this, void 0, void 0, function* () {
741
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
742
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
743
+ const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
744
+ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey,
745
+ "X-Polytomic-Version": (_d = (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : "2025-09-18",
746
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
747
+ const _response = yield core.fetcher({
748
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, `api/harbors/${core.url.encodePathParam(harbor_id)}/saved-queries/${core.url.encodePathParam(saved_query_id)}/draft/publish`),
749
+ method: "POST",
750
+ headers: _headers,
751
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
752
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
753
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
754
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
755
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
756
+ logging: this._options.logging,
757
+ });
758
+ if (_response.ok) {
759
+ return { data: _response.body, rawResponse: _response.rawResponse };
760
+ }
761
+ if (_response.error.reason === "status-code") {
762
+ switch (_response.error.statusCode) {
763
+ case 403:
764
+ throw new Polytomic.ForbiddenError(_response.error.body, _response.rawResponse);
765
+ case 404:
766
+ throw new Polytomic.NotFoundError(_response.error.body, _response.rawResponse);
767
+ case 409:
768
+ throw new Polytomic.ConflictError(_response.error.body, _response.rawResponse);
769
+ case 422:
770
+ throw new Polytomic.UnprocessableEntityError(_response.error.body, _response.rawResponse);
771
+ case 500:
772
+ throw new Polytomic.InternalServerError(_response.error.body, _response.rawResponse);
773
+ default:
774
+ throw new errors.PolytomicError({
775
+ statusCode: _response.error.statusCode,
776
+ body: _response.error.body,
777
+ rawResponse: _response.rawResponse,
778
+ });
779
+ }
780
+ }
781
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/api/harbors/{harbor_id}/saved-queries/{saved_query_id}/draft/publish");
782
+ });
783
+ }
784
+ /**
785
+ * Validates the exact current saved-query draft and returns a bounded ephemeral preview.
786
+ *
787
+ * Only organization administrators can validate drafts. Named template references
788
+ * compile to DuckDB placeholders, and typed values are passed separately rather
789
+ * than interpolated into SQL.
790
+ *
791
+ * The query runs with the Polytomic-managed Harbor's MotherDuck `read_scaling`
792
+ * credential. Validation fails when that credential is missing or incomplete and
793
+ * never falls back to the Harbor writer credential. Preview rows and serialized
794
+ * response size are bounded. The preview and validation attempt are not persisted.
795
+ *
796
+ * @param {string} harbor_id - Unique identifier of the Harbor
797
+ * @param {string} saved_query_id - Unique stable identifier of the saved query
798
+ * @param {SavedQueriesClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
799
+ *
800
+ * @throws {@link Polytomic.ForbiddenError}
801
+ * @throws {@link Polytomic.NotFoundError}
802
+ * @throws {@link Polytomic.UnprocessableEntityError}
803
+ * @throws {@link Polytomic.InternalServerError}
804
+ * @throws {@link errors.PolytomicError}
805
+ * @throws {@link errors.PolytomicTimeoutError}
806
+ *
807
+ * @example
808
+ * await client.harbors.savedQueries.validateDraft("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d")
809
+ */
810
+ validateDraft(harbor_id, saved_query_id, requestOptions) {
811
+ return core.HttpResponsePromise.fromPromise(this.__validateDraft(harbor_id, saved_query_id, requestOptions));
812
+ }
813
+ __validateDraft(harbor_id, saved_query_id, requestOptions) {
814
+ return __awaiter(this, void 0, void 0, function* () {
815
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
816
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
817
+ const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
818
+ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey,
819
+ "X-Polytomic-Version": (_d = (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : "2025-09-18",
820
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
821
+ const _response = yield core.fetcher({
822
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, `api/harbors/${core.url.encodePathParam(harbor_id)}/saved-queries/${core.url.encodePathParam(saved_query_id)}/draft/validate`),
823
+ method: "POST",
824
+ headers: _headers,
825
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
826
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
827
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
828
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
829
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
830
+ logging: this._options.logging,
831
+ });
832
+ if (_response.ok) {
833
+ return {
834
+ data: _response.body,
835
+ rawResponse: _response.rawResponse,
836
+ };
837
+ }
838
+ if (_response.error.reason === "status-code") {
839
+ switch (_response.error.statusCode) {
840
+ case 403:
841
+ throw new Polytomic.ForbiddenError(_response.error.body, _response.rawResponse);
842
+ case 404:
843
+ throw new Polytomic.NotFoundError(_response.error.body, _response.rawResponse);
844
+ case 422:
845
+ throw new Polytomic.UnprocessableEntityError(_response.error.body, _response.rawResponse);
846
+ case 500:
847
+ throw new Polytomic.InternalServerError(_response.error.body, _response.rawResponse);
848
+ default:
849
+ throw new errors.PolytomicError({
850
+ statusCode: _response.error.statusCode,
851
+ body: _response.error.body,
852
+ rawResponse: _response.rawResponse,
853
+ });
854
+ }
855
+ }
856
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/api/harbors/{harbor_id}/saved-queries/{saved_query_id}/draft/validate");
857
+ });
858
+ }
859
+ /**
860
+ * Submits the current published Harbor saved query for asynchronous reader-only execution.
861
+ *
862
+ * Use a Harbor-bound scoped credential with query access to the Harbor's backing
863
+ * Connection. Administrator credentials cannot submit executions here. Saved
864
+ * queries require a Polytomic-managed Harbor.
865
+ *
866
+ * Polytomic selects the current published revision while processing your request.
867
+ * The response identifies that exact immutable revision. Selection happens before
868
+ * Polytomic accepts the execution. Drafts, unpublished queries, and archived
869
+ * queries are unavailable for selection. You cannot select a historical revision
870
+ * or supply SQL through this endpoint.
871
+ *
872
+ * > ⚠️ Concurrent publication changes
873
+ * >
874
+ * > Publishing, unpublishing, or archiving a saved query after selection does not
875
+ * > change the selected revision. An in-flight request may still be accepted and
876
+ * > execute that revision. Unpublishing or archiving does not cancel in-flight
877
+ * > requests or queued executions. Query access is checked again before execution
878
+ * > and result retrieval.
879
+ *
880
+ * Parameter values are bound separately from SQL. Omitted parameters use the
881
+ * published `default_value`, never draft validation values. An omitted optional
882
+ * parameter without a default binds SQL `NULL`. Required parameters allow omission
883
+ * when a default exists, but reject explicit `null` even with a default. Missing
884
+ * required values without defaults, explicit `null` for required parameters,
885
+ * unknown parameter names, and invalid scalar types return
886
+ * `422 Unprocessable Entity` without accepting an execution. Execution requires
887
+ * reader credentials and never falls back to writer credentials.
888
+ *
889
+ * For report windows, define parameters with `required: true` and a
890
+ * `default_value`, such as `7` for a `days` parameter. This allows omission while
891
+ * preventing explicit `null` from turning a time filter into a SQL `NULL`
892
+ * comparison.
893
+ *
894
+ * To archive a saved query through REST, use
895
+ * [`DELETE /api/harbors/{harbor_id}/saved-queries/{saved_query_id}`](../../../../../../api-reference/harbors/saved-queries/delete).
896
+ * Unpublish is available only through the GraphQL `unpublishHarborSavedQuery`
897
+ * mutation, not a REST endpoint.
898
+ *
899
+ * ## Results
900
+ *
901
+ * The response returns a task ID with status `created`, not result rows. Poll
902
+ * [`GET /api/queries/{id}`](../../../../../../api-reference/query-runner/get-query) using a credential
903
+ * from the same Harbor profile. Query access is checked again before execution and
904
+ * result retrieval. Stop polling at `done`, `failed`, or `unknown`; `unknown` means
905
+ * execution started but no durable terminal result is available.
906
+ *
907
+ * Results and detailed failure information expire after 24 hours. Use the
908
+ * `expires` field and follow `links.next` to retrieve additional result pages.
909
+ *
910
+ * ## Harbor Activity
911
+ *
912
+ * Send a new nonzero UUID in `X-Polytomic-Activity-Request-ID`. Missing or invalid
913
+ * IDs return `400 Bad Request`. Reusing a consumed ID returns `409 Conflict` and
914
+ * does not create another execution.
915
+ *
916
+ * You may omit `X-Polytomic-Harbor-Session` for direct REST requests. If supplied,
917
+ * the session must be active and bound to your credential and Harbor.
918
+ *
919
+ * Polytomic records `query.submitted` atomically with acceptance. The event
920
+ * identifies the saved query, immutable revision, published version, and bounded
921
+ * name snapshot. SQL, parameter values and defaults, column names, and result rows
922
+ * remain outside Activity metadata. If Activity persistence is unavailable, the
923
+ * request returns `503 Service Unavailable` without accepting an execution.
924
+ *
925
+ * `query.started` records provider invocation. `query.succeeded` means results are
926
+ * available for authorized retrieval, not that you have consumed them.
927
+ *
928
+ * @param {string} harbor_id - Unique identifier of the Harbor
929
+ * @param {string} saved_query_id - Unique stable identifier of the saved query
930
+ * @param {Polytomic.harbors.ExecuteHarborSavedQueryRequest} request
931
+ * @param {SavedQueriesClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
932
+ *
933
+ * @throws {@link Polytomic.BadRequestError}
934
+ * @throws {@link Polytomic.ForbiddenError}
935
+ * @throws {@link Polytomic.NotFoundError}
936
+ * @throws {@link Polytomic.ConflictError}
937
+ * @throws {@link Polytomic.UnprocessableEntityError}
938
+ * @throws {@link Polytomic.InternalServerError}
939
+ * @throws {@link Polytomic.ServiceUnavailableError}
940
+ * @throws {@link errors.PolytomicError}
941
+ * @throws {@link errors.PolytomicTimeoutError}
942
+ *
943
+ * @example
944
+ * await client.harbors.savedQueries.execute("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d")
945
+ */
946
+ execute(harbor_id, saved_query_id, request = {}, requestOptions) {
947
+ return core.HttpResponsePromise.fromPromise(this.__execute(harbor_id, saved_query_id, request, requestOptions));
948
+ }
949
+ __execute(harbor_id_1, saved_query_id_1) {
950
+ return __awaiter(this, arguments, void 0, function* (harbor_id, saved_query_id, request = {}, requestOptions) {
951
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
952
+ const { "X-Polytomic-Harbor-Session": polytomicHarborSession, "X-Polytomic-Activity-Request-ID": polytomicActivityRequestId } = request, _body = __rest(request, ["X-Polytomic-Harbor-Session", "X-Polytomic-Activity-Request-ID"]);
953
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
954
+ const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
955
+ "X-Polytomic-Harbor-Session": polytomicHarborSession,
956
+ "X-Polytomic-Activity-Request-ID": polytomicActivityRequestId,
957
+ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey,
958
+ "X-Polytomic-Version": (_d = (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : "2025-09-18",
959
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
960
+ const _response = yield core.fetcher({
961
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, `api/harbors/${core.url.encodePathParam(harbor_id)}/saved-queries/${core.url.encodePathParam(saved_query_id)}/execute`),
962
+ method: "POST",
963
+ headers: _headers,
964
+ contentType: "application/json",
965
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
966
+ requestType: "json",
967
+ body: (0, requestBody_1.mergeAdditionalBodyParameters)(_body, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
968
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
969
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
970
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
971
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
972
+ logging: this._options.logging,
973
+ });
974
+ if (_response.ok) {
975
+ return {
976
+ data: _response.body,
977
+ rawResponse: _response.rawResponse,
978
+ };
979
+ }
980
+ if (_response.error.reason === "status-code") {
981
+ switch (_response.error.statusCode) {
982
+ case 400:
983
+ throw new Polytomic.BadRequestError(_response.error.body, _response.rawResponse);
984
+ case 403:
985
+ throw new Polytomic.ForbiddenError(_response.error.body, _response.rawResponse);
986
+ case 404:
987
+ throw new Polytomic.NotFoundError(_response.error.body, _response.rawResponse);
988
+ case 409:
989
+ throw new Polytomic.ConflictError(_response.error.body, _response.rawResponse);
990
+ case 422:
991
+ throw new Polytomic.UnprocessableEntityError(_response.error.body, _response.rawResponse);
992
+ case 500:
993
+ throw new Polytomic.InternalServerError(_response.error.body, _response.rawResponse);
994
+ case 503:
995
+ throw new Polytomic.ServiceUnavailableError(_response.error.body, _response.rawResponse);
996
+ default:
997
+ throw new errors.PolytomicError({
998
+ statusCode: _response.error.statusCode,
999
+ body: _response.error.body,
1000
+ rawResponse: _response.rawResponse,
1001
+ });
1002
+ }
1003
+ }
1004
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/api/harbors/{harbor_id}/saved-queries/{saved_query_id}/execute");
1005
+ });
1006
+ }
1007
+ }
1008
+ exports.SavedQueriesClient = SavedQueriesClient;