polytomic 1.16.1 → 1.18.1

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 (394) hide show
  1. package/Client.d.ts +14 -19
  2. package/api/errors/BadRequestError.js +7 -17
  3. package/api/errors/ConflictError.js +7 -17
  4. package/api/errors/ForbiddenError.js +7 -17
  5. package/api/errors/InternalServerError.js +7 -17
  6. package/api/errors/NotFoundError.js +7 -17
  7. package/api/errors/UnauthorizedError.js +7 -17
  8. package/api/errors/UnprocessableEntityError.js +7 -17
  9. package/api/resources/bulkSync/client/Client.d.ts +173 -24
  10. package/api/resources/bulkSync/client/Client.js +339 -118
  11. package/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.d.ts +3 -0
  12. package/api/resources/bulkSync/client/requests/BulkSyncListRequest.d.ts +3 -0
  13. package/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +1 -1
  14. package/api/resources/bulkSync/client/requests/StartBulkSyncRequest.d.ts +4 -0
  15. package/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +1 -1
  16. package/api/resources/bulkSync/resources/executions/client/Client.d.ts +77 -12
  17. package/api/resources/bulkSync/resources/executions/client/Client.js +168 -66
  18. package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +12 -0
  19. package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListStatusRequest.d.ts +3 -3
  20. package/api/resources/bulkSync/resources/index.js +7 -17
  21. package/api/resources/bulkSync/resources/schedules/client/Client.d.ts +44 -15
  22. package/api/resources/bulkSync/resources/schedules/client/Client.js +116 -57
  23. package/api/resources/bulkSync/resources/schedules/client/requests/CreateScheduleRequest.d.ts +1 -1
  24. package/api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.d.ts +1 -1
  25. package/api/resources/bulkSync/resources/schemas/client/Client.d.ts +71 -11
  26. package/api/resources/bulkSync/resources/schemas/client/Client.js +150 -61
  27. package/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.d.ts +1 -0
  28. package/api/resources/bulkSync/resources/schemas/client/requests/SchemasListRequest.d.ts +3 -0
  29. package/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +7 -0
  30. package/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItem.d.ts +1 -1
  31. package/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItem.d.ts +1 -1
  32. package/api/resources/connections/client/Client.d.ts +134 -18
  33. package/api/resources/connections/client/Client.js +359 -104
  34. package/api/resources/connections/client/requests/ApiRequest.d.ts +2 -2
  35. package/api/resources/events/client/Client.d.ts +20 -7
  36. package/api/resources/events/client/Client.js +55 -33
  37. package/api/resources/events/client/requests/EventsListRequest.d.ts +17 -2
  38. package/api/resources/identity/client/Client.d.ts +11 -6
  39. package/api/resources/identity/client/Client.js +31 -24
  40. package/api/resources/index.js +7 -17
  41. package/api/resources/jobs/client/Client.d.ts +15 -8
  42. package/api/resources/jobs/client/Client.js +35 -26
  43. package/api/resources/modelSync/client/Client.d.ts +110 -19
  44. package/api/resources/modelSync/client/Client.js +287 -118
  45. package/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +1 -1
  46. package/api/resources/modelSync/client/requests/ModelSyncGetSourceFieldsRequest.d.ts +3 -0
  47. package/api/resources/modelSync/client/requests/ModelSyncGetSourceRequest.d.ts +3 -0
  48. package/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +1 -1
  49. package/api/resources/modelSync/resources/executions/client/Client.d.ts +41 -12
  50. package/api/resources/modelSync/resources/executions/client/Client.js +115 -56
  51. package/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.d.ts +1 -1
  52. package/api/resources/modelSync/resources/index.js +7 -17
  53. package/api/resources/modelSync/resources/targets/client/Client.d.ts +28 -11
  54. package/api/resources/modelSync/resources/targets/client/Client.js +89 -49
  55. package/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetFieldsRequest.d.ts +6 -0
  56. package/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.d.ts +6 -0
  57. package/api/resources/models/client/Client.d.ts +79 -8
  58. package/api/resources/models/client/Client.js +214 -86
  59. package/api/resources/models/client/requests/ModelsGetEnrichmentSourceRequest.d.ts +3 -0
  60. package/api/resources/notifications/client/Client.d.ts +13 -5
  61. package/api/resources/notifications/client/Client.js +48 -31
  62. package/api/resources/notifications/client/requests/V4GlobalErrorSubscribersRequest.d.ts +1 -0
  63. package/api/resources/organization/client/Client.d.ts +31 -13
  64. package/api/resources/organization/client/Client.js +109 -55
  65. package/api/resources/organization/client/requests/CreateOrganizationRequestSchema.d.ts +6 -0
  66. package/api/resources/organization/client/requests/UpdateOrganizationRequestSchema.d.ts +6 -0
  67. package/api/resources/permissions/client/Client.d.ts +2 -7
  68. package/api/resources/permissions/resources/index.js +7 -17
  69. package/api/resources/permissions/resources/policies/client/Client.d.ts +33 -5
  70. package/api/resources/permissions/resources/policies/client/Client.js +105 -47
  71. package/api/resources/permissions/resources/roles/client/Client.d.ts +38 -5
  72. package/api/resources/permissions/resources/roles/client/Client.js +110 -47
  73. package/api/resources/queryRunner/client/Client.d.ts +26 -7
  74. package/api/resources/queryRunner/client/Client.js +63 -35
  75. package/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.d.ts +3 -0
  76. package/api/resources/schemas/client/Client.d.ts +118 -23
  77. package/api/resources/schemas/client/Client.js +232 -86
  78. package/api/resources/schemas/client/requests/SetPrimaryKeysRequest.d.ts +1 -0
  79. package/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.d.ts +1 -0
  80. package/api/resources/users/client/Client.d.ts +44 -16
  81. package/api/resources/users/client/Client.js +133 -66
  82. package/api/resources/users/client/requests/CreateUserRequestSchema.d.ts +3 -0
  83. package/api/resources/users/client/requests/UpdateUserRequestSchema.d.ts +3 -0
  84. package/api/resources/users/client/requests/UsersCreateApiKeyRequest.d.ts +3 -0
  85. package/api/resources/webhooks/client/Client.d.ts +67 -21
  86. package/api/resources/webhooks/client/Client.js +165 -75
  87. package/api/types/ApiKeyResponse.d.ts +1 -0
  88. package/api/types/BulkBulkSyncSchedule.d.ts +1 -0
  89. package/api/types/BulkDiscover.d.ts +1 -1
  90. package/api/types/BulkExecutionStatus.d.ts +1 -1
  91. package/api/types/BulkFetchMode.d.ts +1 -1
  92. package/api/types/BulkNormalizeNames.d.ts +1 -1
  93. package/api/types/BulkOutputDisposition.d.ts +9 -0
  94. package/api/types/BulkOutputDisposition.js +11 -0
  95. package/api/types/BulkResyncMode.d.ts +9 -0
  96. package/api/types/BulkResyncMode.js +11 -0
  97. package/api/types/BulkScheduleSyncMode.d.ts +1 -1
  98. package/api/types/BulkSchema.d.ts +2 -0
  99. package/api/types/BulkSchemaExecutionStatus.d.ts +2 -1
  100. package/api/types/BulkSchemaExecutionStatus.js +1 -0
  101. package/api/types/BulkSelectiveMode.d.ts +1 -1
  102. package/api/types/BulkSyncDest.d.ts +2 -0
  103. package/api/types/BulkSyncExecution.d.ts +1 -0
  104. package/api/types/BulkSyncExecutionStatus.d.ts +3 -0
  105. package/api/types/BulkSyncIngestionStatus.d.ts +14 -0
  106. package/api/types/BulkSyncMode.d.ts +1 -1
  107. package/api/types/BulkSyncResponse.d.ts +2 -2
  108. package/api/types/BulkSyncSchemaExecutionStatus.d.ts +7 -0
  109. package/api/types/BulkSyncSource.d.ts +1 -0
  110. package/api/types/BulkSyncStatusResponse.d.ts +1 -0
  111. package/api/types/ConnectCardResponse.d.ts +1 -0
  112. package/api/types/ConnectionResponseSchema.d.ts +2 -2
  113. package/api/types/Event.d.ts +4 -0
  114. package/api/types/EventBody.d.ts +1 -1
  115. package/api/types/ExecutionStatus.d.ts +1 -1
  116. package/api/types/FilterFieldReferenceType.d.ts +1 -1
  117. package/api/types/FilterFunction.d.ts +1 -1
  118. package/api/types/GetIdentityResponseSchema.d.ts +2 -0
  119. package/api/types/IngestionStatusLevel.d.ts +12 -0
  120. package/api/types/IngestionStatusLevel.js +11 -0
  121. package/api/types/JobResponse.d.ts +3 -0
  122. package/api/types/JsonschemaDefinitions.d.ts +1 -1
  123. package/api/types/JsonschemaForm.d.ts +1 -1
  124. package/api/types/LabelLabel.d.ts +1 -1
  125. package/api/types/ModelField.d.ts +1 -1
  126. package/api/types/ModelResponse.d.ts +2 -2
  127. package/api/types/ModelSyncMode.d.ts +2 -1
  128. package/api/types/ModelSyncMode.js +1 -0
  129. package/api/types/ModelSyncResponse.d.ts +2 -2
  130. package/api/types/ModelSyncSourceMetaResponse.d.ts +3 -0
  131. package/api/types/Organization.d.ts +5 -0
  132. package/api/types/{CommonOutputActor.d.ts → OutputActor.d.ts} +1 -1
  133. package/api/types/ScheduleFrequency.d.ts +1 -1
  134. package/api/types/SchemaIdentityFunction.d.ts +1 -1
  135. package/api/types/SourceMeta.d.ts +3 -0
  136. package/api/types/TypesType.d.ts +1 -1
  137. package/api/types/User.d.ts +5 -0
  138. package/api/types/UtilFieldType.d.ts +1 -1
  139. package/api/types/V2EnricherConfiguration.d.ts +1 -1
  140. package/api/types/V2EnricherMapping.d.ts +1 -1
  141. package/api/types/V2ExecutionLogType.d.ts +1 -1
  142. package/api/types/V2OrderedMapStringGithubComInvopopJsonschemaSchema.d.ts +1 -1
  143. package/api/types/V2SampleRecord.d.ts +1 -1
  144. package/api/types/V2SchemaConfigurationFieldsItem.d.ts +1 -1
  145. package/api/types/V3BulkSyncSourceCapabilities.d.ts +6 -0
  146. package/{dist/version.js → api/types/V3BulkSyncSourceCapabilities.js} +3 -2
  147. package/api/types/V4BulkSyncExecutionLogs.d.ts +6 -1
  148. package/api/types/V4BulkSyncScheduleApi.d.ts +5 -0
  149. package/api/types/V4ExportSyncLogsResponse.d.ts +1 -0
  150. package/api/types/V4GlobalErrorSubscribersResponse.d.ts +1 -0
  151. package/api/types/V4RunQueryResult.d.ts +2 -1
  152. package/api/types/V4UserFieldRequest.d.ts +4 -0
  153. package/api/types/WorkTaskStatus.d.ts +1 -1
  154. package/api/types/index.d.ts +11 -6
  155. package/api/types/index.js +11 -6
  156. package/core/auth/BearerToken.d.ts +1 -1
  157. package/core/fetcher/APIResponse.d.ts +1 -1
  158. package/core/fetcher/Fetcher.d.ts +3 -6
  159. package/core/fetcher/Fetcher.js +189 -20
  160. package/core/fetcher/Supplier.d.ts +1 -1
  161. package/core/fetcher/getHeader.js +2 -1
  162. package/core/runtime/runtime.d.ts +1 -2
  163. package/core/runtime/runtime.js +41 -52
  164. package/dist/Client.d.ts +14 -19
  165. package/dist/api/errors/BadRequestError.js +7 -17
  166. package/dist/api/errors/ConflictError.js +7 -17
  167. package/dist/api/errors/ForbiddenError.js +7 -17
  168. package/dist/api/errors/InternalServerError.js +7 -17
  169. package/dist/api/errors/NotFoundError.js +7 -17
  170. package/dist/api/errors/UnauthorizedError.js +7 -17
  171. package/dist/api/errors/UnprocessableEntityError.js +7 -17
  172. package/dist/api/resources/bulkSync/client/Client.d.ts +173 -24
  173. package/dist/api/resources/bulkSync/client/Client.js +339 -118
  174. package/dist/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.d.ts +3 -0
  175. package/dist/api/resources/bulkSync/client/requests/BulkSyncListRequest.d.ts +3 -0
  176. package/dist/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +1 -1
  177. package/dist/api/resources/bulkSync/client/requests/StartBulkSyncRequest.d.ts +4 -0
  178. package/dist/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +1 -1
  179. package/dist/api/resources/bulkSync/resources/executions/client/Client.d.ts +77 -12
  180. package/dist/api/resources/bulkSync/resources/executions/client/Client.js +168 -66
  181. package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +12 -0
  182. package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListStatusRequest.d.ts +3 -3
  183. package/dist/api/resources/bulkSync/resources/index.js +7 -17
  184. package/dist/api/resources/bulkSync/resources/schedules/client/Client.d.ts +44 -15
  185. package/dist/api/resources/bulkSync/resources/schedules/client/Client.js +116 -57
  186. package/dist/api/resources/bulkSync/resources/schedules/client/requests/CreateScheduleRequest.d.ts +1 -1
  187. package/dist/api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.d.ts +1 -1
  188. package/dist/api/resources/bulkSync/resources/schemas/client/Client.d.ts +71 -11
  189. package/dist/api/resources/bulkSync/resources/schemas/client/Client.js +150 -61
  190. package/dist/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.d.ts +1 -0
  191. package/dist/api/resources/bulkSync/resources/schemas/client/requests/SchemasListRequest.d.ts +3 -0
  192. package/dist/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +7 -0
  193. package/dist/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItem.d.ts +1 -1
  194. package/dist/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItem.d.ts +1 -1
  195. package/dist/api/resources/connections/client/Client.d.ts +134 -18
  196. package/dist/api/resources/connections/client/Client.js +359 -104
  197. package/dist/api/resources/connections/client/requests/ApiRequest.d.ts +2 -2
  198. package/dist/api/resources/events/client/Client.d.ts +20 -7
  199. package/dist/api/resources/events/client/Client.js +55 -33
  200. package/dist/api/resources/events/client/requests/EventsListRequest.d.ts +17 -2
  201. package/dist/api/resources/identity/client/Client.d.ts +11 -6
  202. package/dist/api/resources/identity/client/Client.js +31 -24
  203. package/dist/api/resources/index.js +7 -17
  204. package/dist/api/resources/jobs/client/Client.d.ts +15 -8
  205. package/dist/api/resources/jobs/client/Client.js +35 -26
  206. package/dist/api/resources/modelSync/client/Client.d.ts +110 -19
  207. package/dist/api/resources/modelSync/client/Client.js +287 -118
  208. package/dist/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +1 -1
  209. package/dist/api/resources/modelSync/client/requests/ModelSyncGetSourceFieldsRequest.d.ts +3 -0
  210. package/dist/api/resources/modelSync/client/requests/ModelSyncGetSourceRequest.d.ts +3 -0
  211. package/dist/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +1 -1
  212. package/dist/api/resources/modelSync/resources/executions/client/Client.d.ts +41 -12
  213. package/dist/api/resources/modelSync/resources/executions/client/Client.js +115 -56
  214. package/dist/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.d.ts +1 -1
  215. package/dist/api/resources/modelSync/resources/index.js +7 -17
  216. package/dist/api/resources/modelSync/resources/targets/client/Client.d.ts +28 -11
  217. package/dist/api/resources/modelSync/resources/targets/client/Client.js +89 -49
  218. package/dist/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetFieldsRequest.d.ts +6 -0
  219. package/dist/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.d.ts +6 -0
  220. package/dist/api/resources/models/client/Client.d.ts +79 -8
  221. package/dist/api/resources/models/client/Client.js +214 -86
  222. package/dist/api/resources/models/client/requests/ModelsGetEnrichmentSourceRequest.d.ts +3 -0
  223. package/dist/api/resources/notifications/client/Client.d.ts +13 -5
  224. package/dist/api/resources/notifications/client/Client.js +48 -31
  225. package/dist/api/resources/notifications/client/requests/V4GlobalErrorSubscribersRequest.d.ts +1 -0
  226. package/dist/api/resources/organization/client/Client.d.ts +31 -13
  227. package/dist/api/resources/organization/client/Client.js +109 -55
  228. package/dist/api/resources/organization/client/requests/CreateOrganizationRequestSchema.d.ts +6 -0
  229. package/dist/api/resources/organization/client/requests/UpdateOrganizationRequestSchema.d.ts +6 -0
  230. package/dist/api/resources/permissions/client/Client.d.ts +2 -7
  231. package/dist/api/resources/permissions/resources/index.js +7 -17
  232. package/dist/api/resources/permissions/resources/policies/client/Client.d.ts +33 -5
  233. package/dist/api/resources/permissions/resources/policies/client/Client.js +105 -47
  234. package/dist/api/resources/permissions/resources/roles/client/Client.d.ts +38 -5
  235. package/dist/api/resources/permissions/resources/roles/client/Client.js +110 -47
  236. package/dist/api/resources/queryRunner/client/Client.d.ts +26 -7
  237. package/dist/api/resources/queryRunner/client/Client.js +63 -35
  238. package/dist/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.d.ts +3 -0
  239. package/dist/api/resources/schemas/client/Client.d.ts +118 -23
  240. package/dist/api/resources/schemas/client/Client.js +232 -86
  241. package/dist/api/resources/schemas/client/requests/SetPrimaryKeysRequest.d.ts +1 -0
  242. package/dist/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.d.ts +1 -0
  243. package/dist/api/resources/users/client/Client.d.ts +44 -16
  244. package/dist/api/resources/users/client/Client.js +133 -66
  245. package/dist/api/resources/users/client/requests/CreateUserRequestSchema.d.ts +3 -0
  246. package/dist/api/resources/users/client/requests/UpdateUserRequestSchema.d.ts +3 -0
  247. package/dist/api/resources/users/client/requests/UsersCreateApiKeyRequest.d.ts +3 -0
  248. package/dist/api/resources/webhooks/client/Client.d.ts +67 -21
  249. package/dist/api/resources/webhooks/client/Client.js +165 -75
  250. package/dist/api/types/ApiKeyResponse.d.ts +1 -0
  251. package/dist/api/types/BulkBulkSyncSchedule.d.ts +1 -0
  252. package/dist/api/types/BulkDiscover.d.ts +1 -1
  253. package/dist/api/types/BulkExecutionStatus.d.ts +1 -1
  254. package/dist/api/types/BulkFetchMode.d.ts +1 -1
  255. package/dist/api/types/BulkNormalizeNames.d.ts +1 -1
  256. package/dist/api/types/BulkOutputDisposition.d.ts +9 -0
  257. package/dist/api/types/BulkOutputDisposition.js +11 -0
  258. package/dist/api/types/BulkResyncMode.d.ts +9 -0
  259. package/dist/api/types/BulkResyncMode.js +11 -0
  260. package/dist/api/types/BulkScheduleSyncMode.d.ts +1 -1
  261. package/dist/api/types/BulkSchema.d.ts +2 -0
  262. package/dist/api/types/BulkSchemaExecutionStatus.d.ts +2 -1
  263. package/dist/api/types/BulkSchemaExecutionStatus.js +1 -0
  264. package/dist/api/types/BulkSelectiveMode.d.ts +1 -1
  265. package/dist/api/types/BulkSyncDest.d.ts +2 -0
  266. package/dist/api/types/BulkSyncExecution.d.ts +1 -0
  267. package/dist/api/types/BulkSyncExecutionStatus.d.ts +3 -0
  268. package/dist/api/types/BulkSyncIngestionStatus.d.ts +14 -0
  269. package/{version.js → dist/api/types/BulkSyncIngestionStatus.js} +3 -2
  270. package/dist/api/types/BulkSyncMode.d.ts +1 -1
  271. package/dist/api/types/BulkSyncResponse.d.ts +2 -2
  272. package/dist/api/types/BulkSyncSchemaExecutionStatus.d.ts +7 -0
  273. package/dist/api/types/BulkSyncSource.d.ts +1 -0
  274. package/dist/api/types/BulkSyncStatusResponse.d.ts +1 -0
  275. package/dist/api/types/ConnectCardResponse.d.ts +1 -0
  276. package/dist/api/types/ConnectionResponseSchema.d.ts +2 -2
  277. package/dist/api/types/Event.d.ts +4 -0
  278. package/dist/api/types/EventBody.d.ts +1 -1
  279. package/dist/api/types/ExecutionStatus.d.ts +1 -1
  280. package/dist/api/types/FilterFieldReferenceType.d.ts +1 -1
  281. package/dist/api/types/FilterFunction.d.ts +1 -1
  282. package/dist/api/types/GetIdentityResponseSchema.d.ts +2 -0
  283. package/dist/api/types/IngestionStatusLevel.d.ts +12 -0
  284. package/dist/api/types/IngestionStatusLevel.js +11 -0
  285. package/dist/api/types/JobResponse.d.ts +3 -0
  286. package/dist/api/types/JsonschemaDefinitions.d.ts +1 -1
  287. package/dist/api/types/JsonschemaForm.d.ts +1 -1
  288. package/dist/api/types/LabelLabel.d.ts +1 -1
  289. package/dist/api/types/ModelField.d.ts +1 -1
  290. package/dist/api/types/ModelResponse.d.ts +2 -2
  291. package/dist/api/types/ModelSyncMode.d.ts +2 -1
  292. package/dist/api/types/ModelSyncMode.js +1 -0
  293. package/dist/api/types/ModelSyncResponse.d.ts +2 -2
  294. package/dist/api/types/ModelSyncSourceMetaResponse.d.ts +3 -0
  295. package/dist/api/types/Organization.d.ts +5 -0
  296. package/dist/api/types/{CommonOutputActor.d.ts → OutputActor.d.ts} +1 -1
  297. package/dist/api/types/OutputActor.js +5 -0
  298. package/dist/api/types/ScheduleFrequency.d.ts +1 -1
  299. package/dist/api/types/SchemaIdentityFunction.d.ts +1 -1
  300. package/dist/api/types/SourceMeta.d.ts +3 -0
  301. package/dist/api/types/TypesType.d.ts +1 -1
  302. package/dist/api/types/User.d.ts +5 -0
  303. package/dist/api/types/UtilFieldType.d.ts +1 -1
  304. package/dist/api/types/V2EnricherConfiguration.d.ts +1 -1
  305. package/dist/api/types/V2EnricherMapping.d.ts +1 -1
  306. package/dist/api/types/V2ExecutionLogType.d.ts +1 -1
  307. package/dist/api/types/V2OrderedMapStringGithubComInvopopJsonschemaSchema.d.ts +1 -1
  308. package/dist/api/types/V2SampleRecord.d.ts +1 -1
  309. package/dist/api/types/V2SchemaConfigurationFieldsItem.d.ts +1 -1
  310. package/dist/api/types/V3BulkSyncSourceCapabilities.d.ts +6 -0
  311. package/dist/api/types/V3BulkSyncSourceCapabilities.js +5 -0
  312. package/dist/api/types/V4BulkSyncExecutionLogs.d.ts +6 -1
  313. package/dist/api/types/V4BulkSyncScheduleApi.d.ts +5 -0
  314. package/dist/api/types/V4ExportSyncLogsResponse.d.ts +1 -0
  315. package/dist/api/types/V4GlobalErrorSubscribersResponse.d.ts +1 -0
  316. package/dist/api/types/V4RunQueryResult.d.ts +2 -1
  317. package/dist/api/types/V4UserFieldRequest.d.ts +4 -0
  318. package/dist/api/types/WorkTaskStatus.d.ts +1 -1
  319. package/dist/api/types/index.d.ts +11 -6
  320. package/dist/api/types/index.js +11 -6
  321. package/dist/core/auth/BearerToken.d.ts +1 -1
  322. package/dist/core/fetcher/APIResponse.d.ts +1 -1
  323. package/dist/core/fetcher/Fetcher.d.ts +3 -6
  324. package/dist/core/fetcher/Fetcher.js +189 -20
  325. package/dist/core/fetcher/Supplier.d.ts +1 -1
  326. package/dist/core/fetcher/getHeader.js +2 -1
  327. package/dist/core/runtime/runtime.d.ts +1 -2
  328. package/dist/core/runtime/runtime.js +41 -52
  329. package/dist/environments.d.ts +1 -1
  330. package/dist/errors/PolytomicError.js +1 -2
  331. package/dist/errors/PolytomicTimeoutError.d.ts +1 -1
  332. package/dist/errors/PolytomicTimeoutError.js +2 -2
  333. package/dist/index.js +7 -17
  334. package/environments.d.ts +1 -1
  335. package/errors/PolytomicError.js +1 -2
  336. package/errors/PolytomicTimeoutError.d.ts +1 -1
  337. package/errors/PolytomicTimeoutError.js +2 -2
  338. package/index.js +7 -17
  339. package/{jest.config.mjs → jest.config.js} +1 -4
  340. package/package.json +17 -18
  341. package/core/fetcher/createRequestUrl.d.ts +0 -1
  342. package/core/fetcher/createRequestUrl.js +0 -12
  343. package/core/fetcher/getFetchFn.d.ts +0 -4
  344. package/core/fetcher/getFetchFn.js +0 -68
  345. package/core/fetcher/getRequestBody.d.ts +0 -7
  346. package/core/fetcher/getRequestBody.js +0 -23
  347. package/core/fetcher/getResponseBody.d.ts +0 -1
  348. package/core/fetcher/getResponseBody.js +0 -54
  349. package/core/fetcher/makeRequest.d.ts +0 -1
  350. package/core/fetcher/makeRequest.js +0 -42
  351. package/core/fetcher/requestWithRetries.d.ts +0 -1
  352. package/core/fetcher/requestWithRetries.js +0 -40
  353. package/core/fetcher/signals.d.ts +0 -11
  354. package/core/fetcher/signals.js +0 -36
  355. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
  356. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
  357. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
  358. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
  359. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
  360. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
  361. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
  362. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
  363. package/core/json.d.ts +0 -15
  364. package/core/json.js +0 -24
  365. package/dist/core/fetcher/createRequestUrl.d.ts +0 -1
  366. package/dist/core/fetcher/createRequestUrl.js +0 -12
  367. package/dist/core/fetcher/getFetchFn.d.ts +0 -4
  368. package/dist/core/fetcher/getFetchFn.js +0 -68
  369. package/dist/core/fetcher/getRequestBody.d.ts +0 -7
  370. package/dist/core/fetcher/getRequestBody.js +0 -23
  371. package/dist/core/fetcher/getResponseBody.d.ts +0 -1
  372. package/dist/core/fetcher/getResponseBody.js +0 -54
  373. package/dist/core/fetcher/makeRequest.d.ts +0 -1
  374. package/dist/core/fetcher/makeRequest.js +0 -42
  375. package/dist/core/fetcher/requestWithRetries.d.ts +0 -1
  376. package/dist/core/fetcher/requestWithRetries.js +0 -40
  377. package/dist/core/fetcher/signals.d.ts +0 -11
  378. package/dist/core/fetcher/signals.js +0 -36
  379. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
  380. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
  381. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
  382. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
  383. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
  384. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
  385. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
  386. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
  387. package/dist/core/json.d.ts +0 -15
  388. package/dist/core/json.js +0 -24
  389. package/dist/version.d.ts +0 -1
  390. package/reference.md +0 -6663
  391. package/scripts/rename-to-esm-files.js +0 -115
  392. package/version.d.ts +0 -1
  393. /package/api/types/{CommonOutputActor.js → BulkSyncIngestionStatus.js} +0 -0
  394. /package/{dist/api/types/CommonOutputActor.js → api/types/OutputActor.js} +0 -0
@@ -18,23 +18,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
38
28
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
29
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
30
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -59,6 +49,11 @@ class Notifications {
59
49
  this._options = _options;
60
50
  }
61
51
  /**
52
+ * Returns the list of email addresses subscribed to global sync error notifications for the caller's organization.
53
+ *
54
+ * To update the subscriber list, use
55
+ * [`PUT /api/notifications/global-error-subscribers`](../../../api-reference/notifications/set-global-error-subscribers).
56
+ *
62
57
  * @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
63
58
  *
64
59
  * @throws {@link Polytomic.UnauthorizedError}
@@ -68,16 +63,23 @@ class Notifications {
68
63
  * await client.notifications.getGlobalErrorSubscribers()
69
64
  */
70
65
  getGlobalErrorSubscribers(requestOptions) {
66
+ var _a;
71
67
  return __awaiter(this, void 0, void 0, function* () {
72
- var _a, _b;
73
68
  const _response = yield core.fetcher({
74
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, "api/notifications/global-error-subscribers"),
69
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/notifications/global-error-subscribers"),
75
70
  method: "GET",
76
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
71
+ headers: {
72
+ Authorization: yield this._getAuthorizationHeader(),
73
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
77
74
  ? yield core.Supplier.get(this._options.version)
78
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
75
+ : undefined,
76
+ "X-Fern-Language": "JavaScript",
77
+ "X-Fern-SDK-Name": "polytomic",
78
+ "X-Fern-SDK-Version": "1.18.1",
79
+ "X-Fern-Runtime": core.RUNTIME.type,
80
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
81
+ },
79
82
  contentType: "application/json",
80
- requestType: "json",
81
83
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
82
84
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
83
85
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -105,7 +107,7 @@ class Notifications {
105
107
  body: _response.error.rawBody,
106
108
  });
107
109
  case "timeout":
108
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/notifications/global-error-subscribers.");
110
+ throw new errors.PolytomicTimeoutError();
109
111
  case "unknown":
110
112
  throw new errors.PolytomicError({
111
113
  message: _response.error.errorMessage,
@@ -114,6 +116,14 @@ class Notifications {
114
116
  });
115
117
  }
116
118
  /**
119
+ * Replaces the list of email addresses subscribed to global sync error notifications for the caller's organization.
120
+ *
121
+ * This is a **full replacement** — the request body becomes the complete
122
+ * subscriber list. To add or remove a single address without affecting others,
123
+ * fetch the current list with
124
+ * [`GET /api/notifications/global-error-subscribers`](../../../api-reference/notifications/get-global-error-subscribers), apply your change,
125
+ * and send the modified list back.
126
+ *
117
127
  * @param {Polytomic.V4GlobalErrorSubscribersRequest} request
118
128
  * @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
119
129
  *
@@ -124,17 +134,24 @@ class Notifications {
124
134
  * @example
125
135
  * await client.notifications.setGlobalErrorSubscribers()
126
136
  */
127
- setGlobalErrorSubscribers() {
128
- return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
129
- var _a, _b;
137
+ setGlobalErrorSubscribers(request = {}, requestOptions) {
138
+ var _a;
139
+ return __awaiter(this, void 0, void 0, function* () {
130
140
  const _response = yield core.fetcher({
131
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, "api/notifications/global-error-subscribers"),
141
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/notifications/global-error-subscribers"),
132
142
  method: "PUT",
133
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
143
+ headers: {
144
+ Authorization: yield this._getAuthorizationHeader(),
145
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
134
146
  ? yield core.Supplier.get(this._options.version)
135
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
147
+ : undefined,
148
+ "X-Fern-Language": "JavaScript",
149
+ "X-Fern-SDK-Name": "polytomic",
150
+ "X-Fern-SDK-Version": "1.18.1",
151
+ "X-Fern-Runtime": core.RUNTIME.type,
152
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
153
+ },
136
154
  contentType: "application/json",
137
- requestType: "json",
138
155
  body: request,
139
156
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
140
157
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -165,7 +182,7 @@ class Notifications {
165
182
  body: _response.error.rawBody,
166
183
  });
167
184
  case "timeout":
168
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling PUT /api/notifications/global-error-subscribers.");
185
+ throw new errors.PolytomicTimeoutError();
169
186
  case "unknown":
170
187
  throw new errors.PolytomicError({
171
188
  message: _response.error.errorMessage,
@@ -6,5 +6,6 @@
6
6
  * {}
7
7
  */
8
8
  export interface V4GlobalErrorSubscribersRequest {
9
+ /** Email addresses to subscribe to global sync error notifications. Replaces the current subscriber list; pass an empty list to unsubscribe everyone. */
9
10
  emails?: string[];
10
11
  }
@@ -7,10 +7,7 @@ import * as Polytomic from "../../../index";
7
7
  export declare namespace Organization {
8
8
  interface Options {
9
9
  environment?: core.Supplier<environments.PolytomicEnvironment | string>;
10
- /** Specify a custom URL to connect the client to. */
11
- baseUrl?: core.Supplier<string>;
12
10
  token: core.Supplier<core.BearerToken>;
13
- /** Override the X-Polytomic-Version header */
14
11
  version?: core.Supplier<string | undefined>;
15
12
  }
16
13
  interface RequestOptions {
@@ -22,17 +19,25 @@ export declare namespace Organization {
22
19
  abortSignal?: AbortSignal;
23
20
  /** Override the X-Polytomic-Version header */
24
21
  version?: string | undefined;
25
- /** Additional headers to include in the request. */
26
- headers?: Record<string, string>;
27
22
  }
28
23
  }
29
24
  export declare class Organization {
30
25
  protected readonly _options: Organization.Options;
31
26
  constructor(_options: Organization.Options);
32
27
  /**
28
+ * Lists organizations accessible to the caller.
29
+ *
33
30
  * > 🚧 Requires partner key
34
31
  * >
35
- * > Organization endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/guides/obtaining-api-keys#partner-keys).
32
+ * > This endpoint is only accessible using [partner keys](../../guides/obtaining-api-keys#partner-keys).
33
+ *
34
+ * The result depends on the caller type:
35
+ *
36
+ * - User-scoped callers receive their current organization.
37
+ * - Partner callers receive the organizations available within their partner
38
+ * scope.
39
+ * - Deployment-level callers may receive a broader organization list, depending
40
+ * on deployment configuration.
36
41
  *
37
42
  * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
38
43
  *
@@ -44,9 +49,11 @@ export declare class Organization {
44
49
  */
45
50
  list(requestOptions?: Organization.RequestOptions): Promise<Polytomic.OrganizationsEnvelope>;
46
51
  /**
52
+ * Creates a new organization under the calling partner account, optionally configuring SSO or OIDC at creation time.
53
+ *
47
54
  * > 🚧 Requires partner key
48
55
  * >
49
- * > Organization endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/guides/obtaining-api-keys#partner-keys).
56
+ * > This endpoint is only accessible using [partner keys](../../guides/obtaining-api-keys#partner-keys).
50
57
  *
51
58
  * @param {Polytomic.CreateOrganizationRequestSchema} request
52
59
  * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
@@ -63,14 +70,17 @@ export declare class Organization {
63
70
  */
64
71
  create(request: Polytomic.CreateOrganizationRequestSchema, requestOptions?: Organization.RequestOptions): Promise<Polytomic.OrganizationEnvelope>;
65
72
  /**
73
+ * Returns a single organization by ID.
74
+ *
66
75
  * > 🚧 Requires partner key
67
76
  * >
68
- * > Organization endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/guides/obtaining-api-keys#partner-keys).
77
+ * > This endpoint is only accessible using [partner keys](../../../guides/obtaining-api-keys#partner-keys).
69
78
  *
70
- * @param {string} id
79
+ * @param {string} id - Unique identifier of the organization.
71
80
  * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
72
81
  *
73
82
  * @throws {@link Polytomic.UnauthorizedError}
83
+ * @throws {@link Polytomic.ForbiddenError}
74
84
  * @throws {@link Polytomic.NotFoundError}
75
85
  *
76
86
  * @example
@@ -78,15 +88,18 @@ export declare class Organization {
78
88
  */
79
89
  get(id: string, requestOptions?: Organization.RequestOptions): Promise<Polytomic.OrganizationEnvelope>;
80
90
  /**
91
+ * Updates an organization's configuration.
92
+ *
81
93
  * > 🚧 Requires partner key
82
94
  * >
83
- * > Organization endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/guides/obtaining-api-keys#partner-keys).
95
+ * > This endpoint is only accessible using [partner keys](../../../guides/obtaining-api-keys#partner-keys).
84
96
  *
85
- * @param {string} id
97
+ * @param {string} id - Unique identifier of the organization to update.
86
98
  * @param {Polytomic.UpdateOrganizationRequestSchema} request
87
99
  * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
88
100
  *
89
101
  * @throws {@link Polytomic.UnauthorizedError}
102
+ * @throws {@link Polytomic.ForbiddenError}
90
103
  * @throws {@link Polytomic.ConflictError}
91
104
  * @throws {@link Polytomic.UnprocessableEntityError}
92
105
  * @throws {@link Polytomic.InternalServerError}
@@ -98,14 +111,19 @@ export declare class Organization {
98
111
  */
99
112
  update(id: string, request: Polytomic.UpdateOrganizationRequestSchema, requestOptions?: Organization.RequestOptions): Promise<Polytomic.OrganizationEnvelope>;
100
113
  /**
114
+ * Deletes an organization.
115
+ *
101
116
  * > 🚧 Requires partner key
102
117
  * >
103
- * > Organization endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/guides/obtaining-api-keys#partner-keys).
118
+ * > This endpoint is only accessible using [partner keys](../../../guides/obtaining-api-keys#partner-keys).
119
+ *
120
+ * Partner callers cannot delete their own owner organization.
104
121
  *
105
- * @param {string} id
122
+ * @param {string} id - Unique identifier of the organization.
106
123
  * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
107
124
  *
108
125
  * @throws {@link Polytomic.UnauthorizedError}
126
+ * @throws {@link Polytomic.ForbiddenError}
109
127
  * @throws {@link Polytomic.NotFoundError}
110
128
  * @throws {@link Polytomic.InternalServerError}
111
129
  *
@@ -18,23 +18,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
38
28
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
29
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
30
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -59,9 +49,19 @@ class Organization {
59
49
  this._options = _options;
60
50
  }
61
51
  /**
52
+ * Lists organizations accessible to the caller.
53
+ *
62
54
  * > 🚧 Requires partner key
63
55
  * >
64
- * > Organization endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/guides/obtaining-api-keys#partner-keys).
56
+ * > This endpoint is only accessible using [partner keys](../../guides/obtaining-api-keys#partner-keys).
57
+ *
58
+ * The result depends on the caller type:
59
+ *
60
+ * - User-scoped callers receive their current organization.
61
+ * - Partner callers receive the organizations available within their partner
62
+ * scope.
63
+ * - Deployment-level callers may receive a broader organization list, depending
64
+ * on deployment configuration.
65
65
  *
66
66
  * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
67
67
  *
@@ -72,16 +72,23 @@ class Organization {
72
72
  * await client.organization.list()
73
73
  */
74
74
  list(requestOptions) {
75
+ var _a;
75
76
  return __awaiter(this, void 0, void 0, function* () {
76
- var _a, _b;
77
77
  const _response = yield core.fetcher({
78
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, "api/organizations"),
78
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/organizations"),
79
79
  method: "GET",
80
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
80
+ headers: {
81
+ Authorization: yield this._getAuthorizationHeader(),
82
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
81
83
  ? yield core.Supplier.get(this._options.version)
82
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
+ : undefined,
85
+ "X-Fern-Language": "JavaScript",
86
+ "X-Fern-SDK-Name": "polytomic",
87
+ "X-Fern-SDK-Version": "1.18.1",
88
+ "X-Fern-Runtime": core.RUNTIME.type,
89
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
90
+ },
83
91
  contentType: "application/json",
84
- requestType: "json",
85
92
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
86
93
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
87
94
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -109,7 +116,7 @@ class Organization {
109
116
  body: _response.error.rawBody,
110
117
  });
111
118
  case "timeout":
112
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/organizations.");
119
+ throw new errors.PolytomicTimeoutError();
113
120
  case "unknown":
114
121
  throw new errors.PolytomicError({
115
122
  message: _response.error.errorMessage,
@@ -118,9 +125,11 @@ class Organization {
118
125
  });
119
126
  }
120
127
  /**
128
+ * Creates a new organization under the calling partner account, optionally configuring SSO or OIDC at creation time.
129
+ *
121
130
  * > 🚧 Requires partner key
122
131
  * >
123
- * > Organization endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/guides/obtaining-api-keys#partner-keys).
132
+ * > This endpoint is only accessible using [partner keys](../../guides/obtaining-api-keys#partner-keys).
124
133
  *
125
134
  * @param {Polytomic.CreateOrganizationRequestSchema} request
126
135
  * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
@@ -136,16 +145,23 @@ class Organization {
136
145
  * })
137
146
  */
138
147
  create(request, requestOptions) {
148
+ var _a;
139
149
  return __awaiter(this, void 0, void 0, function* () {
140
- var _a, _b;
141
150
  const _response = yield core.fetcher({
142
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, "api/organizations"),
151
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/organizations"),
143
152
  method: "POST",
144
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
153
+ headers: {
154
+ Authorization: yield this._getAuthorizationHeader(),
155
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
145
156
  ? yield core.Supplier.get(this._options.version)
146
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
157
+ : undefined,
158
+ "X-Fern-Language": "JavaScript",
159
+ "X-Fern-SDK-Name": "polytomic",
160
+ "X-Fern-SDK-Version": "1.18.1",
161
+ "X-Fern-Runtime": core.RUNTIME.type,
162
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
163
+ },
147
164
  contentType: "application/json",
148
- requestType: "json",
149
165
  body: request,
150
166
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
151
167
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -178,7 +194,7 @@ class Organization {
178
194
  body: _response.error.rawBody,
179
195
  });
180
196
  case "timeout":
181
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/organizations.");
197
+ throw new errors.PolytomicTimeoutError();
182
198
  case "unknown":
183
199
  throw new errors.PolytomicError({
184
200
  message: _response.error.errorMessage,
@@ -187,30 +203,40 @@ class Organization {
187
203
  });
188
204
  }
189
205
  /**
206
+ * Returns a single organization by ID.
207
+ *
190
208
  * > 🚧 Requires partner key
191
209
  * >
192
- * > Organization endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/guides/obtaining-api-keys#partner-keys).
210
+ * > This endpoint is only accessible using [partner keys](../../../guides/obtaining-api-keys#partner-keys).
193
211
  *
194
- * @param {string} id
212
+ * @param {string} id - Unique identifier of the organization.
195
213
  * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
196
214
  *
197
215
  * @throws {@link Polytomic.UnauthorizedError}
216
+ * @throws {@link Polytomic.ForbiddenError}
198
217
  * @throws {@link Polytomic.NotFoundError}
199
218
  *
200
219
  * @example
201
220
  * await client.organization.get("248df4b7-aa70-47b8-a036-33ac447e668d")
202
221
  */
203
222
  get(id, requestOptions) {
223
+ var _a;
204
224
  return __awaiter(this, void 0, void 0, function* () {
205
- var _a, _b;
206
225
  const _response = yield core.fetcher({
207
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/organizations/${encodeURIComponent(id)}`),
226
+ 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(id)}`),
208
227
  method: "GET",
209
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
228
+ headers: {
229
+ Authorization: yield this._getAuthorizationHeader(),
230
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
210
231
  ? yield core.Supplier.get(this._options.version)
211
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
232
+ : undefined,
233
+ "X-Fern-Language": "JavaScript",
234
+ "X-Fern-SDK-Name": "polytomic",
235
+ "X-Fern-SDK-Version": "1.18.1",
236
+ "X-Fern-Runtime": core.RUNTIME.type,
237
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
238
+ },
212
239
  contentType: "application/json",
213
- requestType: "json",
214
240
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
215
241
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
216
242
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -222,6 +248,8 @@ class Organization {
222
248
  switch (_response.error.statusCode) {
223
249
  case 401:
224
250
  throw new Polytomic.UnauthorizedError(_response.error.body);
251
+ case 403:
252
+ throw new Polytomic.ForbiddenError(_response.error.body);
225
253
  case 404:
226
254
  throw new Polytomic.NotFoundError(_response.error.body);
227
255
  default:
@@ -238,7 +266,7 @@ class Organization {
238
266
  body: _response.error.rawBody,
239
267
  });
240
268
  case "timeout":
241
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/organizations/{id}.");
269
+ throw new errors.PolytomicTimeoutError();
242
270
  case "unknown":
243
271
  throw new errors.PolytomicError({
244
272
  message: _response.error.errorMessage,
@@ -247,15 +275,18 @@ class Organization {
247
275
  });
248
276
  }
249
277
  /**
278
+ * Updates an organization's configuration.
279
+ *
250
280
  * > 🚧 Requires partner key
251
281
  * >
252
- * > Organization endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/guides/obtaining-api-keys#partner-keys).
282
+ * > This endpoint is only accessible using [partner keys](../../../guides/obtaining-api-keys#partner-keys).
253
283
  *
254
- * @param {string} id
284
+ * @param {string} id - Unique identifier of the organization to update.
255
285
  * @param {Polytomic.UpdateOrganizationRequestSchema} request
256
286
  * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
257
287
  *
258
288
  * @throws {@link Polytomic.UnauthorizedError}
289
+ * @throws {@link Polytomic.ForbiddenError}
259
290
  * @throws {@link Polytomic.ConflictError}
260
291
  * @throws {@link Polytomic.UnprocessableEntityError}
261
292
  * @throws {@link Polytomic.InternalServerError}
@@ -266,16 +297,23 @@ class Organization {
266
297
  * })
267
298
  */
268
299
  update(id, request, requestOptions) {
300
+ var _a;
269
301
  return __awaiter(this, void 0, void 0, function* () {
270
- var _a, _b;
271
302
  const _response = yield core.fetcher({
272
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/organizations/${encodeURIComponent(id)}`),
303
+ 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(id)}`),
273
304
  method: "PUT",
274
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
305
+ headers: {
306
+ Authorization: yield this._getAuthorizationHeader(),
307
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
275
308
  ? yield core.Supplier.get(this._options.version)
276
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
309
+ : undefined,
310
+ "X-Fern-Language": "JavaScript",
311
+ "X-Fern-SDK-Name": "polytomic",
312
+ "X-Fern-SDK-Version": "1.18.1",
313
+ "X-Fern-Runtime": core.RUNTIME.type,
314
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
315
+ },
277
316
  contentType: "application/json",
278
- requestType: "json",
279
317
  body: request,
280
318
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
281
319
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -288,6 +326,8 @@ class Organization {
288
326
  switch (_response.error.statusCode) {
289
327
  case 401:
290
328
  throw new Polytomic.UnauthorizedError(_response.error.body);
329
+ case 403:
330
+ throw new Polytomic.ForbiddenError(_response.error.body);
291
331
  case 409:
292
332
  throw new Polytomic.ConflictError(_response.error.body);
293
333
  case 422:
@@ -308,7 +348,7 @@ class Organization {
308
348
  body: _response.error.rawBody,
309
349
  });
310
350
  case "timeout":
311
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling PUT /api/organizations/{id}.");
351
+ throw new errors.PolytomicTimeoutError();
312
352
  case "unknown":
313
353
  throw new errors.PolytomicError({
314
354
  message: _response.error.errorMessage,
@@ -317,14 +357,19 @@ class Organization {
317
357
  });
318
358
  }
319
359
  /**
360
+ * Deletes an organization.
361
+ *
320
362
  * > 🚧 Requires partner key
321
363
  * >
322
- * > Organization endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/guides/obtaining-api-keys#partner-keys).
364
+ * > This endpoint is only accessible using [partner keys](../../../guides/obtaining-api-keys#partner-keys).
365
+ *
366
+ * Partner callers cannot delete their own owner organization.
323
367
  *
324
- * @param {string} id
368
+ * @param {string} id - Unique identifier of the organization.
325
369
  * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
326
370
  *
327
371
  * @throws {@link Polytomic.UnauthorizedError}
372
+ * @throws {@link Polytomic.ForbiddenError}
328
373
  * @throws {@link Polytomic.NotFoundError}
329
374
  * @throws {@link Polytomic.InternalServerError}
330
375
  *
@@ -332,16 +377,23 @@ class Organization {
332
377
  * await client.organization.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
333
378
  */
334
379
  remove(id, requestOptions) {
380
+ var _a;
335
381
  return __awaiter(this, void 0, void 0, function* () {
336
- var _a, _b;
337
382
  const _response = yield core.fetcher({
338
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/organizations/${encodeURIComponent(id)}`),
383
+ 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(id)}`),
339
384
  method: "DELETE",
340
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
385
+ headers: {
386
+ Authorization: yield this._getAuthorizationHeader(),
387
+ "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
341
388
  ? yield core.Supplier.get(this._options.version)
342
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.16.1", "User-Agent": "polytomic/1.16.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
389
+ : undefined,
390
+ "X-Fern-Language": "JavaScript",
391
+ "X-Fern-SDK-Name": "polytomic",
392
+ "X-Fern-SDK-Version": "1.18.1",
393
+ "X-Fern-Runtime": core.RUNTIME.type,
394
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
395
+ },
343
396
  contentType: "application/json",
344
- requestType: "json",
345
397
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
346
398
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
347
399
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -353,6 +405,8 @@ class Organization {
353
405
  switch (_response.error.statusCode) {
354
406
  case 401:
355
407
  throw new Polytomic.UnauthorizedError(_response.error.body);
408
+ case 403:
409
+ throw new Polytomic.ForbiddenError(_response.error.body);
356
410
  case 404:
357
411
  throw new Polytomic.NotFoundError(_response.error.body);
358
412
  case 500:
@@ -371,7 +425,7 @@ class Organization {
371
425
  body: _response.error.rawBody,
372
426
  });
373
427
  case "timeout":
374
- throw new errors.PolytomicTimeoutError("Timeout exceeded when calling DELETE /api/organizations/{id}.");
428
+ throw new errors.PolytomicTimeoutError();
375
429
  case "unknown":
376
430
  throw new errors.PolytomicError({
377
431
  message: _response.error.errorMessage,
@@ -8,10 +8,16 @@
8
8
  * }
9
9
  */
10
10
  export interface CreateOrganizationRequestSchema {
11
+ /** OIDC client ID issued by the identity provider. */
11
12
  client_id?: string;
13
+ /** OIDC client secret issued by the identity provider. Write-only; never returned in responses. */
12
14
  client_secret?: string;
15
+ /** OIDC issuer URL for organizations using OpenID Connect single sign-on. */
13
16
  issuer?: string;
17
+ /** Human-readable name of the organization. Must be unique across the partner account. */
14
18
  name: string;
19
+ /** Email domain used to match users to this organization during SSO sign-in. */
15
20
  sso_domain?: string;
21
+ /** WorkOS organization identifier linking this organization to its SAML/SSO configuration. */
16
22
  sso_org_id?: string;
17
23
  }
@@ -8,10 +8,16 @@
8
8
  * }
9
9
  */
10
10
  export interface UpdateOrganizationRequestSchema {
11
+ /** OIDC client ID issued by the identity provider. */
11
12
  client_id?: string;
13
+ /** OIDC client secret issued by the identity provider. Write-only; never returned in responses. */
12
14
  client_secret?: string;
15
+ /** OIDC issuer URL for organizations using OpenID Connect single sign-on. */
13
16
  issuer?: string;
17
+ /** Human-readable name of the organization. Must be unique across the partner account. */
14
18
  name: string;
19
+ /** Email domain used to match users to this organization during SSO sign-in. */
15
20
  sso_domain?: string;
21
+ /** WorkOS organization identifier linking this organization to its SAML/SSO configuration. */
16
22
  sso_org_id?: string;
17
23
  }