polytomic 1.4.0 → 1.8.4

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 (490) hide show
  1. package/Client.d.ts +10 -0
  2. package/Client.js +25 -20
  3. package/README.md +0 -8
  4. package/api/errors/BadRequestError.d.ts +2 -2
  5. package/api/errors/BadRequestError.js +1 -1
  6. package/api/errors/ForbiddenError.d.ts +2 -2
  7. package/api/errors/ForbiddenError.js +1 -1
  8. package/api/errors/InternalServerError.d.ts +2 -2
  9. package/api/errors/InternalServerError.js +1 -1
  10. package/api/errors/NotFoundError.d.ts +2 -2
  11. package/api/errors/NotFoundError.js +1 -1
  12. package/api/errors/UnauthorizedError.d.ts +2 -2
  13. package/api/errors/UnauthorizedError.js +1 -1
  14. package/api/errors/UnprocessableEntityError.d.ts +2 -2
  15. package/api/errors/UnprocessableEntityError.js +1 -1
  16. package/api/index.d.ts +1 -1
  17. package/api/index.js +1 -1
  18. package/api/resources/bulkSync/client/Client.d.ts +54 -11
  19. package/api/resources/bulkSync/client/Client.js +106 -40
  20. package/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +3 -2
  21. package/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +3 -2
  22. package/api/resources/bulkSync/client/requests/index.d.ts +6 -6
  23. package/api/resources/bulkSync/index.d.ts +1 -0
  24. package/api/resources/bulkSync/index.js +1 -0
  25. package/api/resources/bulkSync/resources/executions/client/Client.d.ts +31 -3
  26. package/api/resources/bulkSync/resources/executions/client/Client.js +106 -10
  27. package/api/resources/bulkSync/resources/executions/client/index.d.ts +1 -1
  28. package/api/resources/bulkSync/resources/executions/client/index.js +15 -0
  29. package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListStatusRequest.d.ts +24 -0
  30. package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListStatusRequest.js +5 -0
  31. package/api/resources/bulkSync/resources/executions/client/requests/index.d.ts +1 -0
  32. package/api/resources/bulkSync/resources/executions/client/requests/index.js +2 -0
  33. package/api/resources/bulkSync/resources/index.d.ts +1 -0
  34. package/api/resources/bulkSync/resources/index.js +1 -0
  35. package/api/resources/bulkSync/resources/schemas/client/Client.d.ts +29 -5
  36. package/api/resources/bulkSync/resources/schemas/client/Client.js +48 -19
  37. package/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.d.ts +1 -1
  38. package/api/resources/bulkSync/resources/schemas/client/requests/SchemasListRequest.d.ts +1 -1
  39. package/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +2 -1
  40. package/api/resources/bulkSync/resources/schemas/client/requests/index.d.ts +3 -3
  41. package/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItem.d.ts +5 -0
  42. package/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItem.js +5 -0
  43. package/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItem.d.ts +5 -0
  44. package/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItem.js +5 -0
  45. package/api/resources/bulkSync/types/index.d.ts +2 -0
  46. package/api/resources/bulkSync/types/index.js +18 -0
  47. package/api/resources/connections/client/Client.d.ts +40 -9
  48. package/api/resources/connections/client/Client.js +78 -30
  49. package/api/resources/connections/client/requests/index.d.ts +4 -4
  50. package/api/resources/events/client/Client.d.ts +15 -3
  51. package/api/resources/events/client/Client.js +19 -8
  52. package/api/resources/events/client/requests/index.d.ts +1 -1
  53. package/api/resources/identity/client/Client.d.ts +11 -2
  54. package/api/resources/identity/client/Client.js +10 -5
  55. package/api/resources/index.d.ts +3 -0
  56. package/api/resources/index.js +4 -1
  57. package/api/resources/jobs/client/Client.d.ts +13 -2
  58. package/api/resources/jobs/client/Client.js +13 -6
  59. package/api/resources/modelSync/client/Client.d.ts +65 -22
  60. package/api/resources/modelSync/client/Client.js +135 -60
  61. package/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +4 -7
  62. package/api/resources/modelSync/client/requests/ModelSyncGetSourceRequest.d.ts +1 -1
  63. package/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +4 -7
  64. package/api/resources/modelSync/client/requests/index.d.ts +6 -6
  65. package/api/resources/modelSync/resources/executions/client/Client.d.ts +30 -5
  66. package/api/resources/modelSync/resources/executions/client/Client.js +48 -18
  67. package/api/resources/models/client/Client.d.ts +46 -9
  68. package/api/resources/models/client/Client.js +85 -31
  69. package/api/resources/models/client/requests/GetEnrichmentInputFieldsRequest.d.ts +1 -1
  70. package/api/resources/models/client/requests/ModelsCreateRequest.d.ts +1 -1
  71. package/api/resources/models/client/requests/ModelsPreviewRequest.d.ts +1 -1
  72. package/api/resources/models/client/requests/UpdateModelRequest.d.ts +1 -1
  73. package/api/resources/models/client/requests/index.d.ts +7 -7
  74. package/api/resources/organization/client/Client.d.ts +33 -6
  75. package/api/resources/organization/client/Client.js +55 -20
  76. package/api/resources/organization/client/requests/index.d.ts +2 -2
  77. package/api/resources/permissions/client/Client.d.ts +7 -0
  78. package/api/resources/permissions/resources/policies/client/Client.d.ts +28 -6
  79. package/api/resources/permissions/resources/policies/client/Client.js +50 -20
  80. package/api/resources/permissions/resources/policies/client/requests/CreatePolicyRequest.d.ts +1 -1
  81. package/api/resources/permissions/resources/policies/client/requests/UpdatePolicyRequest.d.ts +1 -1
  82. package/api/resources/permissions/resources/policies/client/requests/index.d.ts +2 -2
  83. package/api/resources/permissions/resources/roles/client/Client.d.ts +28 -6
  84. package/api/resources/permissions/resources/roles/client/Client.js +50 -20
  85. package/api/resources/permissions/resources/roles/client/requests/index.d.ts +2 -2
  86. package/api/resources/queryRunner/client/Client.d.ts +58 -0
  87. package/api/resources/queryRunner/client/Client.js +223 -0
  88. package/api/resources/queryRunner/client/index.d.ts +1 -0
  89. package/api/resources/queryRunner/client/index.js +17 -0
  90. package/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.d.ts +10 -0
  91. package/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.js +5 -0
  92. package/api/resources/queryRunner/client/requests/V4RunQueryRequest.d.ts +15 -0
  93. package/api/resources/queryRunner/client/requests/V4RunQueryRequest.js +5 -0
  94. package/api/resources/queryRunner/client/requests/index.d.ts +2 -0
  95. package/api/resources/queryRunner/client/requests/index.js +2 -0
  96. package/api/resources/queryRunner/index.d.ts +1 -0
  97. package/api/resources/queryRunner/index.js +17 -0
  98. package/api/resources/schemas/client/Client.d.ts +26 -5
  99. package/api/resources/schemas/client/Client.js +44 -18
  100. package/api/resources/users/client/Client.d.ts +45 -7
  101. package/api/resources/users/client/Client.js +75 -26
  102. package/api/resources/users/client/requests/index.d.ts +3 -3
  103. package/api/resources/webhooks/client/Client.d.ts +32 -6
  104. package/api/resources/webhooks/client/Client.js +54 -20
  105. package/api/resources/webhooks/client/requests/index.d.ts +2 -2
  106. package/api/types/ActivateSyncEnvelope.d.ts +1 -1
  107. package/api/types/ApiKeyResponseEnvelope.d.ts +1 -1
  108. package/api/types/BulkFilter.d.ts +10 -0
  109. package/api/types/BulkFilter.js +5 -0
  110. package/api/types/BulkItemizedSchedule.d.ts +1 -1
  111. package/api/types/BulkMultiScheduleConfiguration.d.ts +2 -2
  112. package/api/types/BulkSchedule.d.ts +1 -1
  113. package/api/types/BulkSchema.d.ts +2 -1
  114. package/api/types/BulkSchemaEnvelope.d.ts +1 -1
  115. package/api/types/BulkSyncCanceledEvent.d.ts +11 -0
  116. package/api/types/BulkSyncCanceledEvent.js +5 -0
  117. package/api/types/BulkSyncCompletedEvent.d.ts +12 -0
  118. package/api/types/BulkSyncCompletedEvent.js +5 -0
  119. package/api/types/BulkSyncCompletedWithErrorEvent.d.ts +12 -0
  120. package/api/types/BulkSyncCompletedWithErrorEvent.js +5 -0
  121. package/api/types/BulkSyncDest.d.ts +1 -1
  122. package/api/types/BulkSyncDestEnvelope.d.ts +1 -1
  123. package/api/types/BulkSyncExecution.d.ts +1 -1
  124. package/api/types/BulkSyncExecutionEnvelope.d.ts +1 -1
  125. package/api/types/BulkSyncExecutionStatus.d.ts +10 -0
  126. package/api/types/BulkSyncExecutionStatus.js +5 -0
  127. package/api/types/BulkSyncFailedEvent.d.ts +12 -0
  128. package/api/types/BulkSyncFailedEvent.js +5 -0
  129. package/api/types/BulkSyncListEnvelope.d.ts +1 -1
  130. package/api/types/BulkSyncResponse.d.ts +1 -1
  131. package/api/types/BulkSyncResponseEnvelope.d.ts +1 -1
  132. package/api/types/BulkSyncRunningEvent.d.ts +11 -0
  133. package/api/types/BulkSyncRunningEvent.js +5 -0
  134. package/api/types/BulkSyncSchemaExecution.d.ts +1 -1
  135. package/api/types/BulkSyncSchemaExecutionStatus.d.ts +15 -0
  136. package/api/types/BulkSyncSchemaExecutionStatus.js +5 -0
  137. package/api/types/BulkSyncSource.d.ts +1 -1
  138. package/api/types/BulkSyncSourceEnvelope.d.ts +1 -1
  139. package/api/types/BulkSyncSourceSchemaEnvelope.d.ts +1 -1
  140. package/api/types/BulkSyncSourceStatusEnvelope.d.ts +1 -1
  141. package/api/types/BulkSyncStatusEnvelope.d.ts +1 -1
  142. package/api/types/BulkSyncStatusResponse.d.ts +1 -1
  143. package/api/types/ConnectCardResponseEnvelope.d.ts +1 -1
  144. package/api/types/ConnectionListResponseEnvelope.d.ts +1 -1
  145. package/api/types/ConnectionMetaResponse.d.ts +1 -1
  146. package/api/types/ConnectionParameterValuesResp.d.ts +1 -1
  147. package/api/types/ConnectionParameterValuesResponseEnvelope.d.ts +1 -1
  148. package/api/types/ConnectionResponseEnvelope.d.ts +1 -1
  149. package/api/types/ConnectionResponseSchema.d.ts +1 -1
  150. package/api/types/ConnectionTypeResponseEnvelope.d.ts +1 -1
  151. package/api/types/CreateConnectionResponseEnvelope.d.ts +1 -1
  152. package/api/types/CreateConnectionResponseSchema.d.ts +1 -1
  153. package/api/types/CreateModelRequest.d.ts +1 -1
  154. package/api/types/Enrichment.d.ts +1 -1
  155. package/api/types/Event.d.ts +2 -1
  156. package/api/types/EventBody.d.ts +5 -0
  157. package/api/types/EventBody.js +5 -0
  158. package/api/types/EventsEnvelope.d.ts +1 -1
  159. package/api/types/ExecutionLogsResponseEnvelope.d.ts +1 -1
  160. package/api/types/FieldConfiguration.d.ts +10 -0
  161. package/api/types/FieldConfiguration.js +5 -0
  162. package/api/types/Filter.d.ts +1 -1
  163. package/api/types/GetConnectionMetaEnvelope.d.ts +1 -1
  164. package/api/types/GetExecutionResponseEnvelope.d.ts +1 -1
  165. package/api/types/GetExecutionResponseSchema.d.ts +1 -1
  166. package/api/types/GetIdentityResponseEnvelope.d.ts +1 -1
  167. package/api/types/GetModelSyncSourceMetaEnvelope.d.ts +1 -1
  168. package/api/types/Identity.d.ts +1 -1
  169. package/api/types/JobResponse.d.ts +1 -1
  170. package/api/types/JobResponseEnvelope.d.ts +1 -1
  171. package/api/types/ListBulkSchema.d.ts +1 -1
  172. package/api/types/ListBulkSyncExecutionStatusEnvelope.d.ts +7 -0
  173. package/api/types/ListBulkSyncExecutionStatusEnvelope.js +5 -0
  174. package/api/types/ListBulkSyncExecutionsEnvelope.d.ts +1 -1
  175. package/api/types/ListExecutionResponseEnvelope.d.ts +1 -1
  176. package/api/types/ListModelSyncResponseEnvelope.d.ts +1 -1
  177. package/api/types/ListPoliciesResponseEnvelope.d.ts +1 -1
  178. package/api/types/ListUsersEnvelope.d.ts +1 -1
  179. package/api/types/ModelFieldResponse.d.ts +1 -1
  180. package/api/types/ModelListResponseEnvelope.d.ts +1 -1
  181. package/api/types/ModelRelation.d.ts +1 -1
  182. package/api/types/ModelResponse.d.ts +1 -1
  183. package/api/types/ModelResponseEnvelope.d.ts +1 -1
  184. package/api/types/ModelSample.d.ts +1 -1
  185. package/api/types/ModelSampleResponseEnvelope.d.ts +1 -1
  186. package/api/types/ModelSyncField.d.ts +6 -2
  187. package/api/types/ModelSyncResponse.d.ts +1 -1
  188. package/api/types/ModelSyncResponseEnvelope.d.ts +1 -1
  189. package/api/types/ModelSyncSourceMetaResponse.d.ts +1 -1
  190. package/api/types/OrganizationEnvelope.d.ts +1 -1
  191. package/api/types/OrganizationsEnvelope.d.ts +1 -1
  192. package/api/types/Override.d.ts +1 -1
  193. package/api/types/Pagination.d.ts +9 -0
  194. package/api/types/Pagination.js +5 -0
  195. package/api/types/PolicyResponse.d.ts +1 -1
  196. package/api/types/PolicyResponseEnvelope.d.ts +1 -1
  197. package/api/types/Relation.d.ts +1 -1
  198. package/api/types/RoleListResponseEnvelope.d.ts +1 -1
  199. package/api/types/RoleResponseEnvelope.d.ts +1 -1
  200. package/api/types/Schedule.d.ts +1 -1
  201. package/api/types/ScheduleOptionResponse.d.ts +1 -1
  202. package/api/types/ScheduleOptionResponseEnvelope.d.ts +1 -1
  203. package/api/types/ScheduleScheduleOption.d.ts +1 -1
  204. package/api/types/Schema.d.ts +1 -1
  205. package/api/types/SchemaConfiguration.d.ts +13 -0
  206. package/api/types/SchemaConfiguration.js +5 -0
  207. package/api/types/SchemaField.d.ts +1 -1
  208. package/api/types/StartModelSyncResponseEnvelope.d.ts +1 -1
  209. package/api/types/StartModelSyncResponseSchema.d.ts +1 -1
  210. package/api/types/SyncCanceledEvent.d.ts +12 -0
  211. package/api/types/SyncCanceledEvent.js +5 -0
  212. package/api/types/SyncCompletedEvent.d.ts +25 -0
  213. package/api/types/SyncCompletedEvent.js +5 -0
  214. package/api/types/SyncCompletedWithErrorsEvent.d.ts +13 -0
  215. package/api/types/SyncCompletedWithErrorsEvent.js +5 -0
  216. package/api/types/SyncDestinationProperties.d.ts +1 -0
  217. package/api/types/SyncFailedEvent.d.ts +11 -0
  218. package/api/types/SyncFailedEvent.js +5 -0
  219. package/api/types/SyncRunningEvent.d.ts +10 -0
  220. package/api/types/SyncRunningEvent.js +5 -0
  221. package/api/types/SyncStatusEnvelope.d.ts +1 -1
  222. package/api/types/SyncStatusResponse.d.ts +1 -1
  223. package/api/types/TargetField.d.ts +1 -1
  224. package/api/types/TargetResponse.d.ts +1 -1
  225. package/api/types/TargetResponseEnvelope.d.ts +1 -1
  226. package/api/types/UserEnvelope.d.ts +1 -1
  227. package/api/types/V2SchemaConfigurationFieldsItem.d.ts +5 -0
  228. package/api/types/V2SchemaConfigurationFieldsItem.js +5 -0
  229. package/api/types/V4QueryResultsEnvelope.d.ts +8 -0
  230. package/api/types/V4QueryResultsEnvelope.js +5 -0
  231. package/api/types/V4RunQueryEnvelope.d.ts +7 -0
  232. package/api/types/V4RunQueryEnvelope.js +5 -0
  233. package/api/types/V4RunQueryResult.d.ts +18 -0
  234. package/api/types/V4RunQueryResult.js +5 -0
  235. package/api/types/WebhookEnvelope.d.ts +1 -1
  236. package/api/types/WebhookListEnvelope.d.ts +1 -1
  237. package/api/types/WorkTaskStatus.d.ts +2 -1
  238. package/api/types/WorkTaskStatus.js +1 -0
  239. package/api/types/index.d.ts +22 -0
  240. package/api/types/index.js +22 -0
  241. package/core/fetcher/Fetcher.d.ts +3 -2
  242. package/core/fetcher/Fetcher.js +130 -19
  243. package/core/runtime/runtime.d.ts +1 -1
  244. package/core/runtime/runtime.js +11 -1
  245. package/dist/Client.d.ts +10 -0
  246. package/dist/Client.js +25 -20
  247. package/dist/api/errors/BadRequestError.d.ts +2 -2
  248. package/dist/api/errors/BadRequestError.js +1 -1
  249. package/dist/api/errors/ForbiddenError.d.ts +2 -2
  250. package/dist/api/errors/ForbiddenError.js +1 -1
  251. package/dist/api/errors/InternalServerError.d.ts +2 -2
  252. package/dist/api/errors/InternalServerError.js +1 -1
  253. package/dist/api/errors/NotFoundError.d.ts +2 -2
  254. package/dist/api/errors/NotFoundError.js +1 -1
  255. package/dist/api/errors/UnauthorizedError.d.ts +2 -2
  256. package/dist/api/errors/UnauthorizedError.js +1 -1
  257. package/dist/api/errors/UnprocessableEntityError.d.ts +2 -2
  258. package/dist/api/errors/UnprocessableEntityError.js +1 -1
  259. package/dist/api/index.d.ts +1 -1
  260. package/dist/api/index.js +1 -1
  261. package/dist/api/resources/bulkSync/client/Client.d.ts +54 -11
  262. package/dist/api/resources/bulkSync/client/Client.js +106 -40
  263. package/dist/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +3 -2
  264. package/dist/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +3 -2
  265. package/dist/api/resources/bulkSync/client/requests/index.d.ts +6 -6
  266. package/dist/api/resources/bulkSync/index.d.ts +1 -0
  267. package/dist/api/resources/bulkSync/index.js +1 -0
  268. package/dist/api/resources/bulkSync/resources/executions/client/Client.d.ts +31 -3
  269. package/dist/api/resources/bulkSync/resources/executions/client/Client.js +106 -10
  270. package/dist/api/resources/bulkSync/resources/executions/client/index.d.ts +1 -1
  271. package/dist/api/resources/bulkSync/resources/executions/client/index.js +15 -0
  272. package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListStatusRequest.d.ts +24 -0
  273. package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListStatusRequest.js +5 -0
  274. package/dist/api/resources/bulkSync/resources/executions/client/requests/index.d.ts +1 -0
  275. package/dist/api/resources/bulkSync/resources/executions/client/requests/index.js +2 -0
  276. package/dist/api/resources/bulkSync/resources/index.d.ts +1 -0
  277. package/dist/api/resources/bulkSync/resources/index.js +1 -0
  278. package/dist/api/resources/bulkSync/resources/schemas/client/Client.d.ts +29 -5
  279. package/dist/api/resources/bulkSync/resources/schemas/client/Client.js +48 -19
  280. package/dist/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.d.ts +1 -1
  281. package/dist/api/resources/bulkSync/resources/schemas/client/requests/SchemasListRequest.d.ts +1 -1
  282. package/dist/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +2 -1
  283. package/dist/api/resources/bulkSync/resources/schemas/client/requests/index.d.ts +3 -3
  284. package/dist/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItem.d.ts +5 -0
  285. package/dist/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItem.js +5 -0
  286. package/dist/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItem.d.ts +5 -0
  287. package/dist/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItem.js +5 -0
  288. package/dist/api/resources/bulkSync/types/index.d.ts +2 -0
  289. package/dist/api/resources/bulkSync/types/index.js +18 -0
  290. package/dist/api/resources/connections/client/Client.d.ts +40 -9
  291. package/dist/api/resources/connections/client/Client.js +78 -30
  292. package/dist/api/resources/connections/client/requests/index.d.ts +4 -4
  293. package/dist/api/resources/events/client/Client.d.ts +15 -3
  294. package/dist/api/resources/events/client/Client.js +19 -8
  295. package/dist/api/resources/events/client/requests/index.d.ts +1 -1
  296. package/dist/api/resources/identity/client/Client.d.ts +11 -2
  297. package/dist/api/resources/identity/client/Client.js +10 -5
  298. package/dist/api/resources/index.d.ts +3 -0
  299. package/dist/api/resources/index.js +4 -1
  300. package/dist/api/resources/jobs/client/Client.d.ts +13 -2
  301. package/dist/api/resources/jobs/client/Client.js +13 -6
  302. package/dist/api/resources/modelSync/client/Client.d.ts +65 -22
  303. package/dist/api/resources/modelSync/client/Client.js +135 -60
  304. package/dist/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +4 -7
  305. package/dist/api/resources/modelSync/client/requests/ModelSyncGetSourceRequest.d.ts +1 -1
  306. package/dist/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +4 -7
  307. package/dist/api/resources/modelSync/client/requests/index.d.ts +6 -6
  308. package/dist/api/resources/modelSync/resources/executions/client/Client.d.ts +30 -5
  309. package/dist/api/resources/modelSync/resources/executions/client/Client.js +48 -18
  310. package/dist/api/resources/models/client/Client.d.ts +46 -9
  311. package/dist/api/resources/models/client/Client.js +85 -31
  312. package/dist/api/resources/models/client/requests/GetEnrichmentInputFieldsRequest.d.ts +1 -1
  313. package/dist/api/resources/models/client/requests/ModelsCreateRequest.d.ts +1 -1
  314. package/dist/api/resources/models/client/requests/ModelsPreviewRequest.d.ts +1 -1
  315. package/dist/api/resources/models/client/requests/UpdateModelRequest.d.ts +1 -1
  316. package/dist/api/resources/models/client/requests/index.d.ts +7 -7
  317. package/dist/api/resources/organization/client/Client.d.ts +33 -6
  318. package/dist/api/resources/organization/client/Client.js +55 -20
  319. package/dist/api/resources/organization/client/requests/index.d.ts +2 -2
  320. package/dist/api/resources/permissions/client/Client.d.ts +7 -0
  321. package/dist/api/resources/permissions/resources/policies/client/Client.d.ts +28 -6
  322. package/dist/api/resources/permissions/resources/policies/client/Client.js +50 -20
  323. package/dist/api/resources/permissions/resources/policies/client/requests/CreatePolicyRequest.d.ts +1 -1
  324. package/dist/api/resources/permissions/resources/policies/client/requests/UpdatePolicyRequest.d.ts +1 -1
  325. package/dist/api/resources/permissions/resources/policies/client/requests/index.d.ts +2 -2
  326. package/dist/api/resources/permissions/resources/roles/client/Client.d.ts +28 -6
  327. package/dist/api/resources/permissions/resources/roles/client/Client.js +50 -20
  328. package/dist/api/resources/permissions/resources/roles/client/requests/index.d.ts +2 -2
  329. package/dist/api/resources/queryRunner/client/Client.d.ts +58 -0
  330. package/dist/api/resources/queryRunner/client/Client.js +223 -0
  331. package/dist/api/resources/queryRunner/client/index.d.ts +1 -0
  332. package/dist/api/resources/queryRunner/client/index.js +17 -0
  333. package/dist/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.d.ts +10 -0
  334. package/dist/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.js +5 -0
  335. package/dist/api/resources/queryRunner/client/requests/V4RunQueryRequest.d.ts +15 -0
  336. package/dist/api/resources/queryRunner/client/requests/V4RunQueryRequest.js +5 -0
  337. package/dist/api/resources/queryRunner/client/requests/index.d.ts +2 -0
  338. package/dist/api/resources/queryRunner/client/requests/index.js +2 -0
  339. package/dist/api/resources/queryRunner/index.d.ts +1 -0
  340. package/dist/api/resources/queryRunner/index.js +17 -0
  341. package/dist/api/resources/schemas/client/Client.d.ts +26 -5
  342. package/dist/api/resources/schemas/client/Client.js +44 -18
  343. package/dist/api/resources/users/client/Client.d.ts +45 -7
  344. package/dist/api/resources/users/client/Client.js +75 -26
  345. package/dist/api/resources/users/client/requests/index.d.ts +3 -3
  346. package/dist/api/resources/webhooks/client/Client.d.ts +32 -6
  347. package/dist/api/resources/webhooks/client/Client.js +54 -20
  348. package/dist/api/resources/webhooks/client/requests/index.d.ts +2 -2
  349. package/dist/api/types/ActivateSyncEnvelope.d.ts +1 -1
  350. package/dist/api/types/ApiKeyResponseEnvelope.d.ts +1 -1
  351. package/dist/api/types/BulkFilter.d.ts +10 -0
  352. package/dist/api/types/BulkFilter.js +5 -0
  353. package/dist/api/types/BulkItemizedSchedule.d.ts +1 -1
  354. package/dist/api/types/BulkMultiScheduleConfiguration.d.ts +2 -2
  355. package/dist/api/types/BulkSchedule.d.ts +1 -1
  356. package/dist/api/types/BulkSchema.d.ts +2 -1
  357. package/dist/api/types/BulkSchemaEnvelope.d.ts +1 -1
  358. package/dist/api/types/BulkSyncCanceledEvent.d.ts +11 -0
  359. package/dist/api/types/BulkSyncCanceledEvent.js +5 -0
  360. package/dist/api/types/BulkSyncCompletedEvent.d.ts +12 -0
  361. package/dist/api/types/BulkSyncCompletedEvent.js +5 -0
  362. package/dist/api/types/BulkSyncCompletedWithErrorEvent.d.ts +12 -0
  363. package/dist/api/types/BulkSyncCompletedWithErrorEvent.js +5 -0
  364. package/dist/api/types/BulkSyncDest.d.ts +1 -1
  365. package/dist/api/types/BulkSyncDestEnvelope.d.ts +1 -1
  366. package/dist/api/types/BulkSyncExecution.d.ts +1 -1
  367. package/dist/api/types/BulkSyncExecutionEnvelope.d.ts +1 -1
  368. package/dist/api/types/BulkSyncExecutionStatus.d.ts +10 -0
  369. package/dist/api/types/BulkSyncExecutionStatus.js +5 -0
  370. package/dist/api/types/BulkSyncFailedEvent.d.ts +12 -0
  371. package/dist/api/types/BulkSyncFailedEvent.js +5 -0
  372. package/dist/api/types/BulkSyncListEnvelope.d.ts +1 -1
  373. package/dist/api/types/BulkSyncResponse.d.ts +1 -1
  374. package/dist/api/types/BulkSyncResponseEnvelope.d.ts +1 -1
  375. package/dist/api/types/BulkSyncRunningEvent.d.ts +11 -0
  376. package/dist/api/types/BulkSyncRunningEvent.js +5 -0
  377. package/dist/api/types/BulkSyncSchemaExecution.d.ts +1 -1
  378. package/dist/api/types/BulkSyncSchemaExecutionStatus.d.ts +15 -0
  379. package/dist/api/types/BulkSyncSchemaExecutionStatus.js +5 -0
  380. package/dist/api/types/BulkSyncSource.d.ts +1 -1
  381. package/dist/api/types/BulkSyncSourceEnvelope.d.ts +1 -1
  382. package/dist/api/types/BulkSyncSourceSchemaEnvelope.d.ts +1 -1
  383. package/dist/api/types/BulkSyncSourceStatusEnvelope.d.ts +1 -1
  384. package/dist/api/types/BulkSyncStatusEnvelope.d.ts +1 -1
  385. package/dist/api/types/BulkSyncStatusResponse.d.ts +1 -1
  386. package/dist/api/types/ConnectCardResponseEnvelope.d.ts +1 -1
  387. package/dist/api/types/ConnectionListResponseEnvelope.d.ts +1 -1
  388. package/dist/api/types/ConnectionMetaResponse.d.ts +1 -1
  389. package/dist/api/types/ConnectionParameterValuesResp.d.ts +1 -1
  390. package/dist/api/types/ConnectionParameterValuesResponseEnvelope.d.ts +1 -1
  391. package/dist/api/types/ConnectionResponseEnvelope.d.ts +1 -1
  392. package/dist/api/types/ConnectionResponseSchema.d.ts +1 -1
  393. package/dist/api/types/ConnectionTypeResponseEnvelope.d.ts +1 -1
  394. package/dist/api/types/CreateConnectionResponseEnvelope.d.ts +1 -1
  395. package/dist/api/types/CreateConnectionResponseSchema.d.ts +1 -1
  396. package/dist/api/types/CreateModelRequest.d.ts +1 -1
  397. package/dist/api/types/Enrichment.d.ts +1 -1
  398. package/dist/api/types/Event.d.ts +2 -1
  399. package/dist/api/types/EventBody.d.ts +5 -0
  400. package/dist/api/types/EventBody.js +5 -0
  401. package/dist/api/types/EventsEnvelope.d.ts +1 -1
  402. package/dist/api/types/ExecutionLogsResponseEnvelope.d.ts +1 -1
  403. package/dist/api/types/FieldConfiguration.d.ts +10 -0
  404. package/dist/api/types/FieldConfiguration.js +5 -0
  405. package/dist/api/types/Filter.d.ts +1 -1
  406. package/dist/api/types/GetConnectionMetaEnvelope.d.ts +1 -1
  407. package/dist/api/types/GetExecutionResponseEnvelope.d.ts +1 -1
  408. package/dist/api/types/GetExecutionResponseSchema.d.ts +1 -1
  409. package/dist/api/types/GetIdentityResponseEnvelope.d.ts +1 -1
  410. package/dist/api/types/GetModelSyncSourceMetaEnvelope.d.ts +1 -1
  411. package/dist/api/types/Identity.d.ts +1 -1
  412. package/dist/api/types/JobResponse.d.ts +1 -1
  413. package/dist/api/types/JobResponseEnvelope.d.ts +1 -1
  414. package/dist/api/types/ListBulkSchema.d.ts +1 -1
  415. package/dist/api/types/ListBulkSyncExecutionStatusEnvelope.d.ts +7 -0
  416. package/dist/api/types/ListBulkSyncExecutionStatusEnvelope.js +5 -0
  417. package/dist/api/types/ListBulkSyncExecutionsEnvelope.d.ts +1 -1
  418. package/dist/api/types/ListExecutionResponseEnvelope.d.ts +1 -1
  419. package/dist/api/types/ListModelSyncResponseEnvelope.d.ts +1 -1
  420. package/dist/api/types/ListPoliciesResponseEnvelope.d.ts +1 -1
  421. package/dist/api/types/ListUsersEnvelope.d.ts +1 -1
  422. package/dist/api/types/ModelFieldResponse.d.ts +1 -1
  423. package/dist/api/types/ModelListResponseEnvelope.d.ts +1 -1
  424. package/dist/api/types/ModelRelation.d.ts +1 -1
  425. package/dist/api/types/ModelResponse.d.ts +1 -1
  426. package/dist/api/types/ModelResponseEnvelope.d.ts +1 -1
  427. package/dist/api/types/ModelSample.d.ts +1 -1
  428. package/dist/api/types/ModelSampleResponseEnvelope.d.ts +1 -1
  429. package/dist/api/types/ModelSyncField.d.ts +6 -2
  430. package/dist/api/types/ModelSyncResponse.d.ts +1 -1
  431. package/dist/api/types/ModelSyncResponseEnvelope.d.ts +1 -1
  432. package/dist/api/types/ModelSyncSourceMetaResponse.d.ts +1 -1
  433. package/dist/api/types/OrganizationEnvelope.d.ts +1 -1
  434. package/dist/api/types/OrganizationsEnvelope.d.ts +1 -1
  435. package/dist/api/types/Override.d.ts +1 -1
  436. package/dist/api/types/Pagination.d.ts +9 -0
  437. package/dist/api/types/Pagination.js +5 -0
  438. package/dist/api/types/PolicyResponse.d.ts +1 -1
  439. package/dist/api/types/PolicyResponseEnvelope.d.ts +1 -1
  440. package/dist/api/types/Relation.d.ts +1 -1
  441. package/dist/api/types/RoleListResponseEnvelope.d.ts +1 -1
  442. package/dist/api/types/RoleResponseEnvelope.d.ts +1 -1
  443. package/dist/api/types/Schedule.d.ts +1 -1
  444. package/dist/api/types/ScheduleOptionResponse.d.ts +1 -1
  445. package/dist/api/types/ScheduleOptionResponseEnvelope.d.ts +1 -1
  446. package/dist/api/types/ScheduleScheduleOption.d.ts +1 -1
  447. package/dist/api/types/Schema.d.ts +1 -1
  448. package/dist/api/types/SchemaConfiguration.d.ts +13 -0
  449. package/dist/api/types/SchemaConfiguration.js +5 -0
  450. package/dist/api/types/SchemaField.d.ts +1 -1
  451. package/dist/api/types/StartModelSyncResponseEnvelope.d.ts +1 -1
  452. package/dist/api/types/StartModelSyncResponseSchema.d.ts +1 -1
  453. package/dist/api/types/SyncCanceledEvent.d.ts +12 -0
  454. package/dist/api/types/SyncCanceledEvent.js +5 -0
  455. package/dist/api/types/SyncCompletedEvent.d.ts +25 -0
  456. package/dist/api/types/SyncCompletedEvent.js +5 -0
  457. package/dist/api/types/SyncCompletedWithErrorsEvent.d.ts +13 -0
  458. package/dist/api/types/SyncCompletedWithErrorsEvent.js +5 -0
  459. package/dist/api/types/SyncDestinationProperties.d.ts +1 -0
  460. package/dist/api/types/SyncFailedEvent.d.ts +11 -0
  461. package/dist/api/types/SyncFailedEvent.js +5 -0
  462. package/dist/api/types/SyncRunningEvent.d.ts +10 -0
  463. package/dist/api/types/SyncRunningEvent.js +5 -0
  464. package/dist/api/types/SyncStatusEnvelope.d.ts +1 -1
  465. package/dist/api/types/SyncStatusResponse.d.ts +1 -1
  466. package/dist/api/types/TargetField.d.ts +1 -1
  467. package/dist/api/types/TargetResponse.d.ts +1 -1
  468. package/dist/api/types/TargetResponseEnvelope.d.ts +1 -1
  469. package/dist/api/types/UserEnvelope.d.ts +1 -1
  470. package/dist/api/types/V2SchemaConfigurationFieldsItem.d.ts +5 -0
  471. package/dist/api/types/V2SchemaConfigurationFieldsItem.js +5 -0
  472. package/dist/api/types/V4QueryResultsEnvelope.d.ts +8 -0
  473. package/dist/api/types/V4QueryResultsEnvelope.js +5 -0
  474. package/dist/api/types/V4RunQueryEnvelope.d.ts +7 -0
  475. package/dist/api/types/V4RunQueryEnvelope.js +5 -0
  476. package/dist/api/types/V4RunQueryResult.d.ts +18 -0
  477. package/dist/api/types/V4RunQueryResult.js +5 -0
  478. package/dist/api/types/WebhookEnvelope.d.ts +1 -1
  479. package/dist/api/types/WebhookListEnvelope.d.ts +1 -1
  480. package/dist/api/types/WorkTaskStatus.d.ts +2 -1
  481. package/dist/api/types/WorkTaskStatus.js +1 -0
  482. package/dist/api/types/index.d.ts +22 -0
  483. package/dist/api/types/index.js +22 -0
  484. package/dist/core/fetcher/Fetcher.d.ts +3 -2
  485. package/dist/core/fetcher/Fetcher.js +130 -19
  486. package/dist/core/runtime/runtime.d.ts +1 -1
  487. package/dist/core/runtime/runtime.js +11 -1
  488. package/jest.config.js +2 -2
  489. package/package.json +13 -6
  490. package/tests/client.test.ts +0 -11
@@ -41,9 +41,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
41
41
  exports.Users = void 0;
42
42
  const environments = __importStar(require("../../../../environments"));
43
43
  const core = __importStar(require("../../../../core"));
44
- const Polytomic = __importStar(require("../../.."));
44
+ const Polytomic = __importStar(require("../../../index"));
45
45
  const url_join_1 = __importDefault(require("url-join"));
46
- const errors = __importStar(require("../../../../errors"));
46
+ const errors = __importStar(require("../../../../errors/index"));
47
47
  class Users {
48
48
  constructor(_options) {
49
49
  this._options = _options;
@@ -52,30 +52,37 @@ class Users {
52
52
  * > 🚧 Requires partner key
53
53
  * >
54
54
  * > User endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/getting-started/obtaining-api-keys#partner-keys)
55
+ *
56
+ * @param {string} orgId
57
+ * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
58
+ *
55
59
  * @throws {@link Polytomic.UnauthorizedError}
56
60
  * @throws {@link Polytomic.NotFoundError}
57
61
  *
58
62
  * @example
59
- * await polytomic.users.list("248df4b7-aa70-47b8-a036-33ac447e668d")
63
+ * await client.users.list("248df4b7-aa70-47b8-a036-33ac447e668d")
60
64
  */
61
65
  list(orgId, requestOptions) {
62
66
  var _a;
63
67
  return __awaiter(this, void 0, void 0, function* () {
64
68
  const _response = yield core.fetcher({
65
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${orgId}/users`),
69
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${encodeURIComponent(orgId)}/users`),
66
70
  method: "GET",
67
71
  headers: {
68
72
  Authorization: yield this._getAuthorizationHeader(),
69
- "X-Polytomic-Version": "2024-02-08",
73
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
74
+ ? yield core.Supplier.get(this._options.version)
75
+ : undefined,
70
76
  "X-Fern-Language": "JavaScript",
71
77
  "X-Fern-SDK-Name": "polytomic",
72
- "X-Fern-SDK-Version": "1.4.0",
78
+ "X-Fern-SDK-Version": "1.8.4",
73
79
  "X-Fern-Runtime": core.RUNTIME.type,
74
80
  "X-Fern-Runtime-Version": core.RUNTIME.version,
75
81
  },
76
82
  contentType: "application/json",
77
83
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
78
84
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
85
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
79
86
  });
80
87
  if (_response.ok) {
81
88
  return _response.body;
@@ -112,12 +119,17 @@ class Users {
112
119
  * > 🚧 Requires partner key
113
120
  * >
114
121
  * > User endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/getting-started/obtaining-api-keys#partner-keys)
122
+ *
123
+ * @param {string} orgId
124
+ * @param {Polytomic.CreateUserRequestSchema} request
125
+ * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
126
+ *
115
127
  * @throws {@link Polytomic.UnauthorizedError}
116
128
  * @throws {@link Polytomic.UnprocessableEntityError}
117
129
  * @throws {@link Polytomic.InternalServerError}
118
130
  *
119
131
  * @example
120
- * await polytomic.users.create("248df4b7-aa70-47b8-a036-33ac447e668d", {
132
+ * await client.users.create("248df4b7-aa70-47b8-a036-33ac447e668d", {
121
133
  * email: "mail@example.com"
122
134
  * })
123
135
  */
@@ -125,14 +137,16 @@ class Users {
125
137
  var _a;
126
138
  return __awaiter(this, void 0, void 0, function* () {
127
139
  const _response = yield core.fetcher({
128
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${orgId}/users`),
140
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${encodeURIComponent(orgId)}/users`),
129
141
  method: "POST",
130
142
  headers: {
131
143
  Authorization: yield this._getAuthorizationHeader(),
132
- "X-Polytomic-Version": "2024-02-08",
144
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
145
+ ? yield core.Supplier.get(this._options.version)
146
+ : undefined,
133
147
  "X-Fern-Language": "JavaScript",
134
148
  "X-Fern-SDK-Name": "polytomic",
135
- "X-Fern-SDK-Version": "1.4.0",
149
+ "X-Fern-SDK-Version": "1.8.4",
136
150
  "X-Fern-Runtime": core.RUNTIME.type,
137
151
  "X-Fern-Runtime-Version": core.RUNTIME.version,
138
152
  },
@@ -140,6 +154,7 @@ class Users {
140
154
  body: request,
141
155
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
142
156
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
157
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
143
158
  });
144
159
  if (_response.ok) {
145
160
  return _response.body;
@@ -178,31 +193,39 @@ class Users {
178
193
  * > 🚧 Requires partner key
179
194
  * >
180
195
  * > User endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/getting-started/obtaining-api-keys#partner-keys)
196
+ *
197
+ * @param {string} id
198
+ * @param {string} orgId
199
+ * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
200
+ *
181
201
  * @throws {@link Polytomic.UnauthorizedError}
182
202
  * @throws {@link Polytomic.NotFoundError}
183
203
  * @throws {@link Polytomic.InternalServerError}
184
204
  *
185
205
  * @example
186
- * await polytomic.users.get("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d")
206
+ * await client.users.get("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d")
187
207
  */
188
208
  get(id, orgId, requestOptions) {
189
209
  var _a;
190
210
  return __awaiter(this, void 0, void 0, function* () {
191
211
  const _response = yield core.fetcher({
192
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${orgId}/users/${id}`),
212
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${encodeURIComponent(orgId)}/users/${encodeURIComponent(id)}`),
193
213
  method: "GET",
194
214
  headers: {
195
215
  Authorization: yield this._getAuthorizationHeader(),
196
- "X-Polytomic-Version": "2024-02-08",
216
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
217
+ ? yield core.Supplier.get(this._options.version)
218
+ : undefined,
197
219
  "X-Fern-Language": "JavaScript",
198
220
  "X-Fern-SDK-Name": "polytomic",
199
- "X-Fern-SDK-Version": "1.4.0",
221
+ "X-Fern-SDK-Version": "1.8.4",
200
222
  "X-Fern-Runtime": core.RUNTIME.type,
201
223
  "X-Fern-Runtime-Version": core.RUNTIME.version,
202
224
  },
203
225
  contentType: "application/json",
204
226
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
205
227
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
228
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
206
229
  });
207
230
  if (_response.ok) {
208
231
  return _response.body;
@@ -241,12 +264,18 @@ class Users {
241
264
  * > 🚧 Requires partner key
242
265
  * >
243
266
  * > User endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/getting-started/obtaining-api-keys#partner-keys)
267
+ *
268
+ * @param {string} id
269
+ * @param {string} orgId
270
+ * @param {Polytomic.UpdateUserRequestSchema} request
271
+ * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
272
+ *
244
273
  * @throws {@link Polytomic.UnauthorizedError}
245
274
  * @throws {@link Polytomic.UnprocessableEntityError}
246
275
  * @throws {@link Polytomic.InternalServerError}
247
276
  *
248
277
  * @example
249
- * await polytomic.users.update("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d", {
278
+ * await client.users.update("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d", {
250
279
  * email: "mail@example.com"
251
280
  * })
252
281
  */
@@ -254,14 +283,16 @@ class Users {
254
283
  var _a;
255
284
  return __awaiter(this, void 0, void 0, function* () {
256
285
  const _response = yield core.fetcher({
257
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${orgId}/users/${id}`),
286
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${encodeURIComponent(orgId)}/users/${encodeURIComponent(id)}`),
258
287
  method: "PUT",
259
288
  headers: {
260
289
  Authorization: yield this._getAuthorizationHeader(),
261
- "X-Polytomic-Version": "2024-02-08",
290
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
291
+ ? yield core.Supplier.get(this._options.version)
292
+ : undefined,
262
293
  "X-Fern-Language": "JavaScript",
263
294
  "X-Fern-SDK-Name": "polytomic",
264
- "X-Fern-SDK-Version": "1.4.0",
295
+ "X-Fern-SDK-Version": "1.8.4",
265
296
  "X-Fern-Runtime": core.RUNTIME.type,
266
297
  "X-Fern-Runtime-Version": core.RUNTIME.version,
267
298
  },
@@ -269,6 +300,7 @@ class Users {
269
300
  body: request,
270
301
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
271
302
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
303
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
272
304
  });
273
305
  if (_response.ok) {
274
306
  return _response.body;
@@ -307,31 +339,39 @@ class Users {
307
339
  * > 🚧 Requires partner key
308
340
  * >
309
341
  * > User endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/getting-started/obtaining-api-keys#partner-keys)
342
+ *
343
+ * @param {string} id
344
+ * @param {string} orgId
345
+ * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
346
+ *
310
347
  * @throws {@link Polytomic.UnauthorizedError}
311
348
  * @throws {@link Polytomic.NotFoundError}
312
349
  * @throws {@link Polytomic.InternalServerError}
313
350
  *
314
351
  * @example
315
- * await polytomic.users.remove("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d")
352
+ * await client.users.remove("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d")
316
353
  */
317
354
  remove(id, orgId, requestOptions) {
318
355
  var _a;
319
356
  return __awaiter(this, void 0, void 0, function* () {
320
357
  const _response = yield core.fetcher({
321
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${orgId}/users/${id}`),
358
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${encodeURIComponent(orgId)}/users/${encodeURIComponent(id)}`),
322
359
  method: "DELETE",
323
360
  headers: {
324
361
  Authorization: yield this._getAuthorizationHeader(),
325
- "X-Polytomic-Version": "2024-02-08",
362
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
363
+ ? yield core.Supplier.get(this._options.version)
364
+ : undefined,
326
365
  "X-Fern-Language": "JavaScript",
327
366
  "X-Fern-SDK-Name": "polytomic",
328
- "X-Fern-SDK-Version": "1.4.0",
367
+ "X-Fern-SDK-Version": "1.8.4",
329
368
  "X-Fern-Runtime": core.RUNTIME.type,
330
369
  "X-Fern-Runtime-Version": core.RUNTIME.version,
331
370
  },
332
371
  contentType: "application/json",
333
372
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
334
373
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
374
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
335
375
  });
336
376
  if (_response.ok) {
337
377
  return _response.body;
@@ -370,12 +410,18 @@ class Users {
370
410
  * > 🚧 Requires partner key
371
411
  * >
372
412
  * > User endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/getting-started/obtaining-api-keys#partner-keys)
413
+ *
414
+ * @param {string} orgId
415
+ * @param {string} id
416
+ * @param {Polytomic.UsersCreateApiKeyRequest} request
417
+ * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
418
+ *
373
419
  * @throws {@link Polytomic.UnauthorizedError}
374
420
  * @throws {@link Polytomic.NotFoundError}
375
421
  * @throws {@link Polytomic.InternalServerError}
376
422
  *
377
423
  * @example
378
- * await polytomic.users.createApiKey("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d", {
424
+ * await client.users.createApiKey("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d", {
379
425
  * force: true
380
426
  * })
381
427
  */
@@ -388,14 +434,16 @@ class Users {
388
434
  _queryParams["force"] = force.toString();
389
435
  }
390
436
  const _response = yield core.fetcher({
391
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${orgId}/users/${id}/keys`),
437
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${encodeURIComponent(orgId)}/users/${encodeURIComponent(id)}/keys`),
392
438
  method: "POST",
393
439
  headers: {
394
440
  Authorization: yield this._getAuthorizationHeader(),
395
- "X-Polytomic-Version": "2024-02-08",
441
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
442
+ ? yield core.Supplier.get(this._options.version)
443
+ : undefined,
396
444
  "X-Fern-Language": "JavaScript",
397
445
  "X-Fern-SDK-Name": "polytomic",
398
- "X-Fern-SDK-Version": "1.4.0",
446
+ "X-Fern-SDK-Version": "1.8.4",
399
447
  "X-Fern-Runtime": core.RUNTIME.type,
400
448
  "X-Fern-Runtime-Version": core.RUNTIME.version,
401
449
  },
@@ -403,6 +451,7 @@ class Users {
403
451
  queryParameters: _queryParams,
404
452
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
405
453
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
454
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
406
455
  });
407
456
  if (_response.ok) {
408
457
  return _response.body;
@@ -1,3 +1,3 @@
1
- export { CreateUserRequestSchema } from "./CreateUserRequestSchema";
2
- export { UpdateUserRequestSchema } from "./UpdateUserRequestSchema";
3
- export { UsersCreateApiKeyRequest } from "./UsersCreateApiKeyRequest";
1
+ export { type CreateUserRequestSchema } from "./CreateUserRequestSchema";
2
+ export { type UpdateUserRequestSchema } from "./UpdateUserRequestSchema";
3
+ export { type UsersCreateApiKeyRequest } from "./UsersCreateApiKeyRequest";
@@ -3,15 +3,22 @@
3
3
  */
4
4
  import * as environments from "../../../../environments";
5
5
  import * as core from "../../../../core";
6
- import * as Polytomic from "../../..";
6
+ import * as Polytomic from "../../../index";
7
7
  export declare namespace Webhooks {
8
8
  interface Options {
9
9
  environment?: core.Supplier<environments.PolytomicEnvironment | string>;
10
10
  token: core.Supplier<core.BearerToken>;
11
+ version?: core.Supplier<string | undefined>;
11
12
  }
12
13
  interface RequestOptions {
14
+ /** The maximum time to wait for a response in seconds. */
13
15
  timeoutInSeconds?: number;
16
+ /** The number of times to retry the request. Defaults to 2. */
14
17
  maxRetries?: number;
18
+ /** A hook to abort the request. */
19
+ abortSignal?: AbortSignal;
20
+ /** Override the X-Polytomic-Version header */
21
+ version?: string | undefined;
15
22
  }
16
23
  }
17
24
  export declare class Webhooks {
@@ -23,11 +30,14 @@ export declare class Webhooks {
23
30
  * in that organization.
24
31
  *
25
32
  * Consult the [Events documentation](https://apidocs.polytomic.com/getting-started/events) for more information.
33
+ *
34
+ * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
35
+ *
26
36
  * @throws {@link Polytomic.UnauthorizedError}
27
37
  * @throws {@link Polytomic.InternalServerError}
28
38
  *
29
39
  * @example
30
- * await polytomic.webhooks.list()
40
+ * await client.webhooks.list()
31
41
  */
32
42
  list(requestOptions?: Webhooks.RequestOptions): Promise<Polytomic.WebhookListEnvelope>;
33
43
  /**
@@ -36,12 +46,16 @@ export declare class Webhooks {
36
46
  * in that organization.
37
47
  *
38
48
  * Consult the [Events documentation](https://apidocs.polytomic.com/getting-started/events) for more information.
49
+ *
50
+ * @param {Polytomic.CreateWebhooksSchema} request
51
+ * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
52
+ *
39
53
  * @throws {@link Polytomic.UnauthorizedError}
40
54
  * @throws {@link Polytomic.UnprocessableEntityError}
41
55
  * @throws {@link Polytomic.InternalServerError}
42
56
  *
43
57
  * @example
44
- * await polytomic.webhooks.create({
58
+ * await client.webhooks.create({
45
59
  * endpoint: "https://example.com/webhook",
46
60
  * secret: "secret"
47
61
  * })
@@ -53,11 +67,15 @@ export declare class Webhooks {
53
67
  * in that organization.
54
68
  *
55
69
  * Consult the [Events documentation](https://apidocs.polytomic.com/getting-started/events) for more information.
70
+ *
71
+ * @param {string} id
72
+ * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
73
+ *
56
74
  * @throws {@link Polytomic.UnauthorizedError}
57
75
  * @throws {@link Polytomic.NotFoundError}
58
76
  *
59
77
  * @example
60
- * await polytomic.webhooks.get("248df4b7-aa70-47b8-a036-33ac447e668d")
78
+ * await client.webhooks.get("248df4b7-aa70-47b8-a036-33ac447e668d")
61
79
  */
62
80
  get(id: string, requestOptions?: Webhooks.RequestOptions): Promise<Polytomic.WebhookEnvelope>;
63
81
  /**
@@ -66,24 +84,32 @@ export declare class Webhooks {
66
84
  * in that organization.
67
85
  *
68
86
  * Consult the [Events documentation](https://apidocs.polytomic.com/getting-started/events) for more information.
87
+ *
88
+ * @param {string} id
89
+ * @param {Polytomic.UpdateWebhooksSchema} request
90
+ * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
91
+ *
69
92
  * @throws {@link Polytomic.UnauthorizedError}
70
93
  * @throws {@link Polytomic.UnprocessableEntityError}
71
94
  * @throws {@link Polytomic.InternalServerError}
72
95
  *
73
96
  * @example
74
- * await polytomic.webhooks.update("248df4b7-aa70-47b8-a036-33ac447e668d", {
97
+ * await client.webhooks.update("248df4b7-aa70-47b8-a036-33ac447e668d", {
75
98
  * endpoint: "https://example.com/webhook",
76
99
  * secret: "secret"
77
100
  * })
78
101
  */
79
102
  update(id: string, request: Polytomic.UpdateWebhooksSchema, requestOptions?: Webhooks.RequestOptions): Promise<Polytomic.WebhookEnvelope>;
80
103
  /**
104
+ * @param {string} id
105
+ * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
106
+ *
81
107
  * @throws {@link Polytomic.UnauthorizedError}
82
108
  * @throws {@link Polytomic.NotFoundError}
83
109
  * @throws {@link Polytomic.InternalServerError}
84
110
  *
85
111
  * @example
86
- * await polytomic.webhooks.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
112
+ * await client.webhooks.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
87
113
  */
88
114
  remove(id: string, requestOptions?: Webhooks.RequestOptions): Promise<void>;
89
115
  protected _getAuthorizationHeader(): Promise<string>;
@@ -41,9 +41,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
41
41
  exports.Webhooks = void 0;
42
42
  const environments = __importStar(require("../../../../environments"));
43
43
  const core = __importStar(require("../../../../core"));
44
- const Polytomic = __importStar(require("../../.."));
44
+ const Polytomic = __importStar(require("../../../index"));
45
45
  const url_join_1 = __importDefault(require("url-join"));
46
- const errors = __importStar(require("../../../../errors"));
46
+ const errors = __importStar(require("../../../../errors/index"));
47
47
  class Webhooks {
48
48
  constructor(_options) {
49
49
  this._options = _options;
@@ -54,11 +54,14 @@ class Webhooks {
54
54
  * in that organization.
55
55
  *
56
56
  * Consult the [Events documentation](https://apidocs.polytomic.com/getting-started/events) for more information.
57
+ *
58
+ * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
59
+ *
57
60
  * @throws {@link Polytomic.UnauthorizedError}
58
61
  * @throws {@link Polytomic.InternalServerError}
59
62
  *
60
63
  * @example
61
- * await polytomic.webhooks.list()
64
+ * await client.webhooks.list()
62
65
  */
63
66
  list(requestOptions) {
64
67
  var _a;
@@ -68,16 +71,19 @@ class Webhooks {
68
71
  method: "GET",
69
72
  headers: {
70
73
  Authorization: yield this._getAuthorizationHeader(),
71
- "X-Polytomic-Version": "2024-02-08",
74
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
75
+ ? yield core.Supplier.get(this._options.version)
76
+ : undefined,
72
77
  "X-Fern-Language": "JavaScript",
73
78
  "X-Fern-SDK-Name": "polytomic",
74
- "X-Fern-SDK-Version": "1.4.0",
79
+ "X-Fern-SDK-Version": "1.8.4",
75
80
  "X-Fern-Runtime": core.RUNTIME.type,
76
81
  "X-Fern-Runtime-Version": core.RUNTIME.version,
77
82
  },
78
83
  contentType: "application/json",
79
84
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
80
85
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
86
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
81
87
  });
82
88
  if (_response.ok) {
83
89
  return _response.body;
@@ -116,12 +122,16 @@ class Webhooks {
116
122
  * in that organization.
117
123
  *
118
124
  * Consult the [Events documentation](https://apidocs.polytomic.com/getting-started/events) for more information.
125
+ *
126
+ * @param {Polytomic.CreateWebhooksSchema} request
127
+ * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
128
+ *
119
129
  * @throws {@link Polytomic.UnauthorizedError}
120
130
  * @throws {@link Polytomic.UnprocessableEntityError}
121
131
  * @throws {@link Polytomic.InternalServerError}
122
132
  *
123
133
  * @example
124
- * await polytomic.webhooks.create({
134
+ * await client.webhooks.create({
125
135
  * endpoint: "https://example.com/webhook",
126
136
  * secret: "secret"
127
137
  * })
@@ -134,10 +144,12 @@ class Webhooks {
134
144
  method: "POST",
135
145
  headers: {
136
146
  Authorization: yield this._getAuthorizationHeader(),
137
- "X-Polytomic-Version": "2024-02-08",
147
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
148
+ ? yield core.Supplier.get(this._options.version)
149
+ : undefined,
138
150
  "X-Fern-Language": "JavaScript",
139
151
  "X-Fern-SDK-Name": "polytomic",
140
- "X-Fern-SDK-Version": "1.4.0",
152
+ "X-Fern-SDK-Version": "1.8.4",
141
153
  "X-Fern-Runtime": core.RUNTIME.type,
142
154
  "X-Fern-Runtime-Version": core.RUNTIME.version,
143
155
  },
@@ -145,6 +157,7 @@ class Webhooks {
145
157
  body: request,
146
158
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
147
159
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
160
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
148
161
  });
149
162
  if (_response.ok) {
150
163
  return _response.body;
@@ -185,30 +198,37 @@ class Webhooks {
185
198
  * in that organization.
186
199
  *
187
200
  * Consult the [Events documentation](https://apidocs.polytomic.com/getting-started/events) for more information.
201
+ *
202
+ * @param {string} id
203
+ * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
204
+ *
188
205
  * @throws {@link Polytomic.UnauthorizedError}
189
206
  * @throws {@link Polytomic.NotFoundError}
190
207
  *
191
208
  * @example
192
- * await polytomic.webhooks.get("248df4b7-aa70-47b8-a036-33ac447e668d")
209
+ * await client.webhooks.get("248df4b7-aa70-47b8-a036-33ac447e668d")
193
210
  */
194
211
  get(id, requestOptions) {
195
212
  var _a;
196
213
  return __awaiter(this, void 0, void 0, function* () {
197
214
  const _response = yield core.fetcher({
198
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/webhooks/${id}`),
215
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/webhooks/${encodeURIComponent(id)}`),
199
216
  method: "GET",
200
217
  headers: {
201
218
  Authorization: yield this._getAuthorizationHeader(),
202
- "X-Polytomic-Version": "2024-02-08",
219
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
220
+ ? yield core.Supplier.get(this._options.version)
221
+ : undefined,
203
222
  "X-Fern-Language": "JavaScript",
204
223
  "X-Fern-SDK-Name": "polytomic",
205
- "X-Fern-SDK-Version": "1.4.0",
224
+ "X-Fern-SDK-Version": "1.8.4",
206
225
  "X-Fern-Runtime": core.RUNTIME.type,
207
226
  "X-Fern-Runtime-Version": core.RUNTIME.version,
208
227
  },
209
228
  contentType: "application/json",
210
229
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
211
230
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
231
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
212
232
  });
213
233
  if (_response.ok) {
214
234
  return _response.body;
@@ -247,12 +267,17 @@ class Webhooks {
247
267
  * in that organization.
248
268
  *
249
269
  * Consult the [Events documentation](https://apidocs.polytomic.com/getting-started/events) for more information.
270
+ *
271
+ * @param {string} id
272
+ * @param {Polytomic.UpdateWebhooksSchema} request
273
+ * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
274
+ *
250
275
  * @throws {@link Polytomic.UnauthorizedError}
251
276
  * @throws {@link Polytomic.UnprocessableEntityError}
252
277
  * @throws {@link Polytomic.InternalServerError}
253
278
  *
254
279
  * @example
255
- * await polytomic.webhooks.update("248df4b7-aa70-47b8-a036-33ac447e668d", {
280
+ * await client.webhooks.update("248df4b7-aa70-47b8-a036-33ac447e668d", {
256
281
  * endpoint: "https://example.com/webhook",
257
282
  * secret: "secret"
258
283
  * })
@@ -261,14 +286,16 @@ class Webhooks {
261
286
  var _a;
262
287
  return __awaiter(this, void 0, void 0, function* () {
263
288
  const _response = yield core.fetcher({
264
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/webhooks/${id}`),
289
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/webhooks/${encodeURIComponent(id)}`),
265
290
  method: "PUT",
266
291
  headers: {
267
292
  Authorization: yield this._getAuthorizationHeader(),
268
- "X-Polytomic-Version": "2024-02-08",
293
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
294
+ ? yield core.Supplier.get(this._options.version)
295
+ : undefined,
269
296
  "X-Fern-Language": "JavaScript",
270
297
  "X-Fern-SDK-Name": "polytomic",
271
- "X-Fern-SDK-Version": "1.4.0",
298
+ "X-Fern-SDK-Version": "1.8.4",
272
299
  "X-Fern-Runtime": core.RUNTIME.type,
273
300
  "X-Fern-Runtime-Version": core.RUNTIME.version,
274
301
  },
@@ -276,6 +303,7 @@ class Webhooks {
276
303
  body: request,
277
304
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
278
305
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
306
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
279
307
  });
280
308
  if (_response.ok) {
281
309
  return _response.body;
@@ -311,31 +339,37 @@ class Webhooks {
311
339
  });
312
340
  }
313
341
  /**
342
+ * @param {string} id
343
+ * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
344
+ *
314
345
  * @throws {@link Polytomic.UnauthorizedError}
315
346
  * @throws {@link Polytomic.NotFoundError}
316
347
  * @throws {@link Polytomic.InternalServerError}
317
348
  *
318
349
  * @example
319
- * await polytomic.webhooks.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
350
+ * await client.webhooks.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
320
351
  */
321
352
  remove(id, requestOptions) {
322
353
  var _a;
323
354
  return __awaiter(this, void 0, void 0, function* () {
324
355
  const _response = yield core.fetcher({
325
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/webhooks/${id}`),
356
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/webhooks/${encodeURIComponent(id)}`),
326
357
  method: "DELETE",
327
358
  headers: {
328
359
  Authorization: yield this._getAuthorizationHeader(),
329
- "X-Polytomic-Version": "2024-02-08",
360
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
361
+ ? yield core.Supplier.get(this._options.version)
362
+ : undefined,
330
363
  "X-Fern-Language": "JavaScript",
331
364
  "X-Fern-SDK-Name": "polytomic",
332
- "X-Fern-SDK-Version": "1.4.0",
365
+ "X-Fern-SDK-Version": "1.8.4",
333
366
  "X-Fern-Runtime": core.RUNTIME.type,
334
367
  "X-Fern-Runtime-Version": core.RUNTIME.version,
335
368
  },
336
369
  contentType: "application/json",
337
370
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
338
371
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
372
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
339
373
  });
340
374
  if (_response.ok) {
341
375
  return;
@@ -1,2 +1,2 @@
1
- export { CreateWebhooksSchema } from "./CreateWebhooksSchema";
2
- export { UpdateWebhooksSchema } from "./UpdateWebhooksSchema";
1
+ export { type CreateWebhooksSchema } from "./CreateWebhooksSchema";
2
+ export { type UpdateWebhooksSchema } from "./UpdateWebhooksSchema";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated from our API Definition.
3
3
  */
4
- import * as Polytomic from "..";
4
+ import * as Polytomic from "../index";
5
5
  export interface ActivateSyncEnvelope {
6
6
  data?: Polytomic.ActivateSyncOutput;
7
7
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated from our API Definition.
3
3
  */
4
- import * as Polytomic from "..";
4
+ import * as Polytomic from "../index";
5
5
  export interface ApiKeyResponseEnvelope {
6
6
  data?: Polytomic.ApiKeyResponse;
7
7
  }