polytomic 0.1.2 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/Client.d.ts +8 -6
  2. package/Client.js +27 -22
  3. package/api/errors/BadRequestError.d.ts +8 -0
  4. package/api/errors/BadRequestError.js +41 -0
  5. package/api/errors/ForbiddenError.d.ts +8 -0
  6. package/api/errors/ForbiddenError.js +41 -0
  7. package/api/errors/InternalServerError.d.ts +8 -0
  8. package/api/errors/InternalServerError.js +41 -0
  9. package/api/errors/NotFoundError.d.ts +8 -0
  10. package/api/errors/NotFoundError.js +41 -0
  11. package/api/errors/UnprocessableEntityError.d.ts +8 -0
  12. package/api/errors/UnprocessableEntityError.js +41 -0
  13. package/api/errors/index.d.ts +5 -0
  14. package/api/errors/index.js +5 -0
  15. package/api/resources/bulkSync/client/Client.d.ts +62 -46
  16. package/api/resources/bulkSync/client/Client.js +174 -184
  17. package/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.d.ts +0 -1
  18. package/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +1 -1
  19. package/api/resources/bulkSync/{resources/executions/client → client}/requests/StartBulkSyncRequest.d.ts +1 -4
  20. package/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +1 -1
  21. package/api/resources/bulkSync/client/requests/index.d.ts +3 -2
  22. package/api/resources/bulkSync/resources/executions/client/Client.d.ts +5 -14
  23. package/api/resources/bulkSync/resources/executions/client/Client.js +12 -74
  24. package/api/resources/bulkSync/resources/executions/client/index.d.ts +1 -1
  25. package/api/resources/bulkSync/resources/executions/client/index.js +0 -15
  26. package/api/resources/bulkSync/resources/index.d.ts +0 -1
  27. package/api/resources/bulkSync/resources/index.js +0 -1
  28. package/api/resources/bulkSync/resources/schemas/client/Client.d.ts +20 -9
  29. package/api/resources/bulkSync/resources/schemas/client/Client.js +90 -24
  30. package/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.d.ts +11 -0
  31. package/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +1 -4
  32. package/api/resources/bulkSync/resources/schemas/client/requests/index.d.ts +1 -0
  33. package/api/resources/connections/client/Client.d.ts +40 -49
  34. package/api/resources/connections/client/Client.js +113 -298
  35. package/api/resources/connections/client/requests/ConnectCardRequest.d.ts +18 -0
  36. package/api/resources/connections/client/requests/CreateConnectionRequestSchema.d.ts +2 -4
  37. package/api/resources/connections/client/requests/UpdateConnectionRequestSchema.d.ts +1 -4
  38. package/api/resources/connections/client/requests/index.d.ts +2 -4
  39. package/api/resources/events/client/Client.d.ts +9 -8
  40. package/api/resources/events/client/Client.js +16 -18
  41. package/{dist/api/resources/events/client/requests/EventsApiV2GetEventsRequest.d.ts → api/resources/events/client/requests/EventsListRequest.d.ts} +1 -1
  42. package/api/resources/events/client/requests/index.d.ts +1 -1
  43. package/api/resources/identity/client/Client.d.ts +29 -0
  44. package/api/resources/identity/client/Client.js +114 -0
  45. package/api/resources/identity/client/index.d.ts +1 -0
  46. package/api/resources/identity/index.d.ts +1 -0
  47. package/api/resources/identity/index.js +17 -0
  48. package/api/resources/index.d.ts +3 -2
  49. package/api/resources/index.js +4 -3
  50. package/api/resources/jobs/client/Client.d.ts +6 -4
  51. package/api/resources/jobs/client/Client.js +13 -10
  52. package/api/resources/modelSync/client/Client.d.ts +87 -53
  53. package/api/resources/modelSync/client/Client.js +405 -100
  54. package/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +1 -21
  55. package/api/resources/{connections/client/requests/ModelFieldsRequest.d.ts → modelSync/client/requests/ModelSyncGetSourceRequest.d.ts} +2 -2
  56. package/{dist/api/resources/connections/client/requests/TargetRequest.d.ts → api/resources/modelSync/client/requests/ModelSyncGetTargetFieldsRequest.d.ts} +4 -4
  57. package/{dist/api/resources/connections/client/requests/ConnectionsGetTargetRequest.d.ts → api/resources/modelSync/client/requests/ModelSyncGetTargetRequest.d.ts} +2 -5
  58. package/api/resources/modelSync/client/requests/StartModelSyncRequest.d.ts +1 -0
  59. package/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +1 -21
  60. package/api/resources/modelSync/client/requests/index.d.ts +3 -0
  61. package/api/resources/modelSync/resources/executions/client/Client.d.ts +16 -64
  62. package/api/resources/modelSync/resources/executions/client/Client.js +43 -476
  63. package/api/resources/models/client/Client.d.ts +22 -13
  64. package/api/resources/models/client/Client.js +67 -47
  65. package/api/resources/models/client/requests/CreateModelRequest.d.ts +0 -1
  66. package/api/resources/models/client/requests/UpdateModelRequest.d.ts +0 -1
  67. package/api/resources/organization/client/Client.d.ts +23 -26
  68. package/api/resources/organization/client/Client.js +53 -53
  69. package/api/resources/organization/client/requests/CreateOrganizationRequestSchema.d.ts +1 -6
  70. package/api/resources/organization/client/requests/UpdateOrganizationRequestSchema.d.ts +1 -6
  71. package/api/resources/permissions/client/Client.d.ts +2 -3
  72. package/api/resources/permissions/client/Client.js +1 -1
  73. package/api/resources/permissions/resources/policies/client/Client.d.ts +24 -19
  74. package/api/resources/permissions/resources/policies/client/Client.js +66 -46
  75. package/api/resources/permissions/resources/policies/client/requests/CreatePolicyRequest.d.ts +1 -5
  76. package/api/resources/permissions/resources/policies/client/requests/UpdatePolicyRequest.d.ts +1 -5
  77. package/api/resources/permissions/resources/roles/client/Client.d.ts +22 -10
  78. package/api/resources/permissions/resources/roles/client/Client.js +62 -37
  79. package/api/resources/schemas/client/Client.d.ts +39 -6
  80. package/api/resources/schemas/client/Client.js +208 -13
  81. package/api/resources/users/client/Client.d.ts +27 -19
  82. package/api/resources/users/client/Client.js +63 -48
  83. package/api/resources/users/client/requests/CreateUserRequestSchema.d.ts +1 -2
  84. package/api/resources/users/client/requests/UpdateUserRequestSchema.d.ts +1 -2
  85. package/api/resources/webhooks/client/Client.d.ts +22 -15
  86. package/api/resources/webhooks/client/Client.js +56 -46
  87. package/api/types/ApiError.d.ts +8 -0
  88. package/api/types/GetModelSyncSourceMetaEnvelope.d.ts +7 -0
  89. package/api/types/ModelSyncSourceMetaResponse.d.ts +9 -0
  90. package/api/types/SourceMeta.d.ts +8 -0
  91. package/api/types/SourceMeta.js +5 -0
  92. package/api/types/index.d.ts +4 -0
  93. package/api/types/index.js +4 -0
  94. package/dist/Client.d.ts +8 -6
  95. package/dist/Client.js +27 -22
  96. package/dist/api/errors/BadRequestError.d.ts +8 -0
  97. package/dist/api/errors/BadRequestError.js +41 -0
  98. package/dist/api/errors/ForbiddenError.d.ts +8 -0
  99. package/dist/api/errors/ForbiddenError.js +41 -0
  100. package/dist/api/errors/InternalServerError.d.ts +8 -0
  101. package/dist/api/errors/InternalServerError.js +41 -0
  102. package/dist/api/errors/NotFoundError.d.ts +8 -0
  103. package/dist/api/errors/NotFoundError.js +41 -0
  104. package/dist/api/errors/UnprocessableEntityError.d.ts +8 -0
  105. package/dist/api/errors/UnprocessableEntityError.js +41 -0
  106. package/dist/api/errors/index.d.ts +5 -0
  107. package/dist/api/errors/index.js +5 -0
  108. package/dist/api/resources/bulkSync/client/Client.d.ts +62 -46
  109. package/dist/api/resources/bulkSync/client/Client.js +174 -184
  110. package/dist/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.d.ts +0 -1
  111. package/dist/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +1 -1
  112. package/dist/api/resources/bulkSync/{resources/executions/client → client}/requests/StartBulkSyncRequest.d.ts +1 -4
  113. package/dist/api/resources/bulkSync/client/requests/StartBulkSyncRequest.js +5 -0
  114. package/dist/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +1 -1
  115. package/dist/api/resources/bulkSync/client/requests/index.d.ts +3 -2
  116. package/dist/api/resources/bulkSync/resources/executions/client/Client.d.ts +5 -14
  117. package/dist/api/resources/bulkSync/resources/executions/client/Client.js +12 -74
  118. package/dist/api/resources/bulkSync/resources/executions/client/index.d.ts +1 -1
  119. package/dist/api/resources/bulkSync/resources/executions/client/index.js +0 -15
  120. package/dist/api/resources/bulkSync/resources/index.d.ts +0 -1
  121. package/dist/api/resources/bulkSync/resources/index.js +0 -1
  122. package/dist/api/resources/bulkSync/resources/schemas/client/Client.d.ts +20 -9
  123. package/dist/api/resources/bulkSync/resources/schemas/client/Client.js +90 -24
  124. package/dist/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.d.ts +11 -0
  125. package/dist/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.js +5 -0
  126. package/dist/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +1 -4
  127. package/dist/api/resources/bulkSync/resources/schemas/client/requests/index.d.ts +1 -0
  128. package/dist/api/resources/connections/client/Client.d.ts +40 -49
  129. package/dist/api/resources/connections/client/Client.js +113 -298
  130. package/dist/api/resources/connections/client/requests/ConnectCardRequest.d.ts +18 -0
  131. package/dist/api/resources/connections/client/requests/ConnectCardRequest.js +5 -0
  132. package/dist/api/resources/connections/client/requests/CreateConnectionRequestSchema.d.ts +2 -4
  133. package/dist/api/resources/connections/client/requests/UpdateConnectionRequestSchema.d.ts +1 -4
  134. package/dist/api/resources/connections/client/requests/index.d.ts +2 -4
  135. package/dist/api/resources/events/client/Client.d.ts +9 -8
  136. package/dist/api/resources/events/client/Client.js +16 -18
  137. package/{api/resources/events/client/requests/EventsApiV2GetEventsRequest.d.ts → dist/api/resources/events/client/requests/EventsListRequest.d.ts} +1 -1
  138. package/dist/api/resources/events/client/requests/EventsListRequest.js +5 -0
  139. package/dist/api/resources/events/client/requests/index.d.ts +1 -1
  140. package/dist/api/resources/identity/client/Client.d.ts +29 -0
  141. package/dist/api/resources/identity/client/Client.js +114 -0
  142. package/dist/api/resources/identity/client/index.d.ts +1 -0
  143. package/dist/api/resources/identity/index.d.ts +1 -0
  144. package/dist/api/resources/identity/index.js +17 -0
  145. package/dist/api/resources/index.d.ts +3 -2
  146. package/dist/api/resources/index.js +4 -3
  147. package/dist/api/resources/jobs/client/Client.d.ts +6 -4
  148. package/dist/api/resources/jobs/client/Client.js +13 -10
  149. package/dist/api/resources/modelSync/client/Client.d.ts +87 -53
  150. package/dist/api/resources/modelSync/client/Client.js +405 -100
  151. package/dist/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +1 -21
  152. package/dist/api/resources/{connections/client/requests/ModelFieldsRequest.d.ts → modelSync/client/requests/ModelSyncGetSourceRequest.d.ts} +2 -2
  153. package/dist/api/resources/modelSync/client/requests/ModelSyncGetSourceRequest.js +5 -0
  154. package/{api/resources/connections/client/requests/TargetRequest.d.ts → dist/api/resources/modelSync/client/requests/ModelSyncGetTargetFieldsRequest.d.ts} +4 -4
  155. package/dist/api/resources/modelSync/client/requests/ModelSyncGetTargetFieldsRequest.js +5 -0
  156. package/{api/resources/connections/client/requests/ConnectionsGetTargetRequest.d.ts → dist/api/resources/modelSync/client/requests/ModelSyncGetTargetRequest.d.ts} +2 -5
  157. package/dist/api/resources/modelSync/client/requests/ModelSyncGetTargetRequest.js +5 -0
  158. package/dist/api/resources/modelSync/client/requests/StartModelSyncRequest.d.ts +1 -0
  159. package/dist/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +1 -21
  160. package/dist/api/resources/modelSync/client/requests/index.d.ts +3 -0
  161. package/dist/api/resources/modelSync/resources/executions/client/Client.d.ts +16 -64
  162. package/dist/api/resources/modelSync/resources/executions/client/Client.js +43 -476
  163. package/dist/api/resources/models/client/Client.d.ts +22 -13
  164. package/dist/api/resources/models/client/Client.js +67 -47
  165. package/dist/api/resources/models/client/requests/CreateModelRequest.d.ts +0 -1
  166. package/dist/api/resources/models/client/requests/UpdateModelRequest.d.ts +0 -1
  167. package/dist/api/resources/organization/client/Client.d.ts +23 -26
  168. package/dist/api/resources/organization/client/Client.js +53 -53
  169. package/dist/api/resources/organization/client/requests/CreateOrganizationRequestSchema.d.ts +1 -6
  170. package/dist/api/resources/organization/client/requests/UpdateOrganizationRequestSchema.d.ts +1 -6
  171. package/dist/api/resources/permissions/client/Client.d.ts +2 -3
  172. package/dist/api/resources/permissions/client/Client.js +1 -1
  173. package/dist/api/resources/permissions/resources/policies/client/Client.d.ts +24 -19
  174. package/dist/api/resources/permissions/resources/policies/client/Client.js +66 -46
  175. package/dist/api/resources/permissions/resources/policies/client/requests/CreatePolicyRequest.d.ts +1 -5
  176. package/dist/api/resources/permissions/resources/policies/client/requests/UpdatePolicyRequest.d.ts +1 -5
  177. package/dist/api/resources/permissions/resources/roles/client/Client.d.ts +22 -10
  178. package/dist/api/resources/permissions/resources/roles/client/Client.js +62 -37
  179. package/dist/api/resources/schemas/client/Client.d.ts +39 -6
  180. package/dist/api/resources/schemas/client/Client.js +208 -13
  181. package/dist/api/resources/users/client/Client.d.ts +27 -19
  182. package/dist/api/resources/users/client/Client.js +63 -48
  183. package/dist/api/resources/users/client/requests/CreateUserRequestSchema.d.ts +1 -2
  184. package/dist/api/resources/users/client/requests/UpdateUserRequestSchema.d.ts +1 -2
  185. package/dist/api/resources/webhooks/client/Client.d.ts +22 -15
  186. package/dist/api/resources/webhooks/client/Client.js +56 -46
  187. package/dist/api/types/ApiError.d.ts +8 -0
  188. package/dist/api/types/ApiError.js +5 -0
  189. package/dist/api/types/GetModelSyncSourceMetaEnvelope.d.ts +7 -0
  190. package/dist/api/types/GetModelSyncSourceMetaEnvelope.js +5 -0
  191. package/dist/api/types/ModelSyncSourceMetaResponse.d.ts +9 -0
  192. package/dist/api/types/ModelSyncSourceMetaResponse.js +5 -0
  193. package/dist/api/types/SourceMeta.d.ts +8 -0
  194. package/dist/api/types/SourceMeta.js +5 -0
  195. package/dist/api/types/index.d.ts +4 -0
  196. package/dist/api/types/index.js +4 -0
  197. package/package.json +2 -2
  198. package/api/resources/bulkSync/resources/executions/client/requests/index.d.ts +0 -1
  199. package/dist/api/resources/bulkSync/resources/executions/client/requests/index.d.ts +0 -1
  200. /package/api/resources/bulkSync/{resources/executions/client → client}/requests/StartBulkSyncRequest.js +0 -0
  201. /package/api/resources/{connections/client/requests/ConnectionsGetTargetRequest.js → bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.js} +0 -0
  202. /package/api/resources/connections/client/requests/{ModelFieldsRequest.js → ConnectCardRequest.js} +0 -0
  203. /package/api/resources/{connections/client/requests/TargetRequest.js → events/client/requests/EventsListRequest.js} +0 -0
  204. /package/api/resources/{bulkSync/resources/executions/client/requests → identity/client}/index.js +0 -0
  205. /package/api/resources/{events/client/requests/EventsApiV2GetEventsRequest.js → modelSync/client/requests/ModelSyncGetSourceRequest.js} +0 -0
  206. /package/{dist/api/resources/bulkSync/resources/executions/client/requests/StartBulkSyncRequest.js → api/resources/modelSync/client/requests/ModelSyncGetTargetFieldsRequest.js} +0 -0
  207. /package/{dist/api/resources/connections/client/requests/ConnectionsGetTargetRequest.js → api/resources/modelSync/client/requests/ModelSyncGetTargetRequest.js} +0 -0
  208. /package/{dist/api/resources/connections/client/requests/ModelFieldsRequest.js → api/types/ApiError.js} +0 -0
  209. /package/{dist/api/resources/connections/client/requests/TargetRequest.js → api/types/GetModelSyncSourceMetaEnvelope.js} +0 -0
  210. /package/{dist/api/resources/events/client/requests/EventsApiV2GetEventsRequest.js → api/types/ModelSyncSourceMetaResponse.js} +0 -0
  211. /package/dist/api/resources/{bulkSync/resources/executions/client/requests → identity/client}/index.js +0 -0
@@ -45,7 +45,7 @@ const Polytomic = __importStar(require("../../.."));
45
45
  const url_join_1 = __importDefault(require("url-join"));
46
46
  const errors = __importStar(require("../../../../errors"));
47
47
  class Webhooks {
48
- constructor(_options = {}) {
48
+ constructor(_options) {
49
49
  this._options = _options;
50
50
  }
51
51
  /**
@@ -53,8 +53,9 @@ class Webhooks {
53
53
  * webhook may be created per organization. The webhook will be called for events
54
54
  * in that organization.
55
55
  *
56
- * Consult the [Events documentation](https://docs.polytomic.com/reference/events) for more information.
56
+ * Consult the [Events documentation](https://apidocs.polytomic.com/getting-started/events) for more information.
57
57
  * @throws {@link Polytomic.UnauthorizedError}
58
+ * @throws {@link Polytomic.InternalServerError}
58
59
  *
59
60
  * @example
60
61
  * await polytomic.webhooks.list()
@@ -67,12 +68,10 @@ class Webhooks {
67
68
  method: "GET",
68
69
  headers: {
69
70
  Authorization: yield this._getAuthorizationHeader(),
70
- "X-Polytomic-Version": (yield core.Supplier.get(this._options.xPolytomicVersion)) != null
71
- ? yield core.Supplier.get(this._options.xPolytomicVersion)
72
- : undefined,
71
+ "X-Polytomic-Version": "2024-02-08",
73
72
  "X-Fern-Language": "JavaScript",
74
73
  "X-Fern-SDK-Name": "polytomic",
75
- "X-Fern-SDK-Version": "0.1.2",
74
+ "X-Fern-SDK-Version": "1.0.0",
76
75
  "X-Fern-Runtime": core.RUNTIME.type,
77
76
  "X-Fern-Runtime-Version": core.RUNTIME.version,
78
77
  },
@@ -87,6 +86,8 @@ class Webhooks {
87
86
  switch (_response.error.statusCode) {
88
87
  case 401:
89
88
  throw new Polytomic.UnauthorizedError(_response.error.body);
89
+ case 500:
90
+ throw new Polytomic.InternalServerError(_response.error.body);
90
91
  default:
91
92
  throw new errors.PolytomicError({
92
93
  statusCode: _response.error.statusCode,
@@ -114,8 +115,10 @@ class Webhooks {
114
115
  * webhook may be created per organization. The webhook will be called for events
115
116
  * in that organization.
116
117
  *
117
- * Consult the [Events documentation](https://docs.polytomic.com/reference/events) for more information.
118
+ * Consult the [Events documentation](https://apidocs.polytomic.com/getting-started/events) for more information.
118
119
  * @throws {@link Polytomic.UnauthorizedError}
120
+ * @throws {@link Polytomic.UnprocessableEntityError}
121
+ * @throws {@link Polytomic.InternalServerError}
119
122
  *
120
123
  * @example
121
124
  * await polytomic.webhooks.create({
@@ -131,12 +134,10 @@ class Webhooks {
131
134
  method: "POST",
132
135
  headers: {
133
136
  Authorization: yield this._getAuthorizationHeader(),
134
- "X-Polytomic-Version": (yield core.Supplier.get(this._options.xPolytomicVersion)) != null
135
- ? yield core.Supplier.get(this._options.xPolytomicVersion)
136
- : undefined,
137
+ "X-Polytomic-Version": "2024-02-08",
137
138
  "X-Fern-Language": "JavaScript",
138
139
  "X-Fern-SDK-Name": "polytomic",
139
- "X-Fern-SDK-Version": "0.1.2",
140
+ "X-Fern-SDK-Version": "1.0.0",
140
141
  "X-Fern-Runtime": core.RUNTIME.type,
141
142
  "X-Fern-Runtime-Version": core.RUNTIME.version,
142
143
  },
@@ -152,6 +153,10 @@ class Webhooks {
152
153
  switch (_response.error.statusCode) {
153
154
  case 401:
154
155
  throw new Polytomic.UnauthorizedError(_response.error.body);
156
+ case 422:
157
+ throw new Polytomic.UnprocessableEntityError(_response.error.body);
158
+ case 500:
159
+ throw new Polytomic.InternalServerError(_response.error.body);
155
160
  default:
156
161
  throw new errors.PolytomicError({
157
162
  statusCode: _response.error.statusCode,
@@ -179,8 +184,9 @@ class Webhooks {
179
184
  * webhook may be created per organization. The webhook will be called for events
180
185
  * in that organization.
181
186
  *
182
- * Consult the [Events documentation](https://docs.polytomic.com/reference/events) for more information.
187
+ * Consult the [Events documentation](https://apidocs.polytomic.com/getting-started/events) for more information.
183
188
  * @throws {@link Polytomic.UnauthorizedError}
189
+ * @throws {@link Polytomic.NotFoundError}
184
190
  *
185
191
  * @example
186
192
  * await polytomic.webhooks.get("248df4b7-aa70-47b8-a036-33ac447e668d")
@@ -193,12 +199,10 @@ class Webhooks {
193
199
  method: "GET",
194
200
  headers: {
195
201
  Authorization: yield this._getAuthorizationHeader(),
196
- "X-Polytomic-Version": (yield core.Supplier.get(this._options.xPolytomicVersion)) != null
197
- ? yield core.Supplier.get(this._options.xPolytomicVersion)
198
- : undefined,
202
+ "X-Polytomic-Version": "2024-02-08",
199
203
  "X-Fern-Language": "JavaScript",
200
204
  "X-Fern-SDK-Name": "polytomic",
201
- "X-Fern-SDK-Version": "0.1.2",
205
+ "X-Fern-SDK-Version": "1.0.0",
202
206
  "X-Fern-Runtime": core.RUNTIME.type,
203
207
  "X-Fern-Runtime-Version": core.RUNTIME.version,
204
208
  },
@@ -213,6 +217,8 @@ class Webhooks {
213
217
  switch (_response.error.statusCode) {
214
218
  case 401:
215
219
  throw new Polytomic.UnauthorizedError(_response.error.body);
220
+ case 404:
221
+ throw new Polytomic.NotFoundError(_response.error.body);
216
222
  default:
217
223
  throw new errors.PolytomicError({
218
224
  statusCode: _response.error.statusCode,
@@ -236,39 +242,52 @@ class Webhooks {
236
242
  });
237
243
  }
238
244
  /**
245
+ * Webooks can be set up using the webhook API endpoints. Currently, only one
246
+ * webhook may be created per organization. The webhook will be called for events
247
+ * in that organization.
248
+ *
249
+ * Consult the [Events documentation](https://apidocs.polytomic.com/getting-started/events) for more information.
239
250
  * @throws {@link Polytomic.UnauthorizedError}
251
+ * @throws {@link Polytomic.UnprocessableEntityError}
252
+ * @throws {@link Polytomic.InternalServerError}
240
253
  *
241
254
  * @example
242
- * await polytomic.webhooks.delete("248df4b7-aa70-47b8-a036-33ac447e668d")
255
+ * await polytomic.webhooks.update("248df4b7-aa70-47b8-a036-33ac447e668d", {
256
+ * endpoint: "https://example.com/webhook",
257
+ * secret: "secret"
258
+ * })
243
259
  */
244
- delete(id, requestOptions) {
260
+ update(id, request, requestOptions) {
245
261
  var _a;
246
262
  return __awaiter(this, void 0, void 0, function* () {
247
263
  const _response = yield core.fetcher({
248
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}`),
249
- method: "DELETE",
265
+ method: "PUT",
250
266
  headers: {
251
267
  Authorization: yield this._getAuthorizationHeader(),
252
- "X-Polytomic-Version": (yield core.Supplier.get(this._options.xPolytomicVersion)) != null
253
- ? yield core.Supplier.get(this._options.xPolytomicVersion)
254
- : undefined,
268
+ "X-Polytomic-Version": "2024-02-08",
255
269
  "X-Fern-Language": "JavaScript",
256
270
  "X-Fern-SDK-Name": "polytomic",
257
- "X-Fern-SDK-Version": "0.1.2",
271
+ "X-Fern-SDK-Version": "1.0.0",
258
272
  "X-Fern-Runtime": core.RUNTIME.type,
259
273
  "X-Fern-Runtime-Version": core.RUNTIME.version,
260
274
  },
261
275
  contentType: "application/json",
276
+ body: request,
262
277
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
263
278
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
264
279
  });
265
280
  if (_response.ok) {
266
- return;
281
+ return _response.body;
267
282
  }
268
283
  if (_response.error.reason === "status-code") {
269
284
  switch (_response.error.statusCode) {
270
285
  case 401:
271
286
  throw new Polytomic.UnauthorizedError(_response.error.body);
287
+ case 422:
288
+ throw new Polytomic.UnprocessableEntityError(_response.error.body);
289
+ case 500:
290
+ throw new Polytomic.InternalServerError(_response.error.body);
272
291
  default:
273
292
  throw new errors.PolytomicError({
274
293
  statusCode: _response.error.statusCode,
@@ -292,48 +311,43 @@ class Webhooks {
292
311
  });
293
312
  }
294
313
  /**
295
- * Webooks can be set up using the webhook API endpoints. Currently, only one
296
- * webhook may be created per organization. The webhook will be called for events
297
- * in that organization.
298
- *
299
- * Consult the [Events documentation](https://docs.polytomic.com/reference/events) for more information.
300
314
  * @throws {@link Polytomic.UnauthorizedError}
315
+ * @throws {@link Polytomic.NotFoundError}
316
+ * @throws {@link Polytomic.InternalServerError}
301
317
  *
302
318
  * @example
303
- * await polytomic.webhooks.update("248df4b7-aa70-47b8-a036-33ac447e668d", {
304
- * endpoint: "https://example.com/webhook",
305
- * secret: "secret"
306
- * })
319
+ * await polytomic.webhooks.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
307
320
  */
308
- update(id, request, requestOptions) {
321
+ remove(id, requestOptions) {
309
322
  var _a;
310
323
  return __awaiter(this, void 0, void 0, function* () {
311
324
  const _response = yield core.fetcher({
312
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}`),
313
- method: "PATCH",
326
+ method: "DELETE",
314
327
  headers: {
315
328
  Authorization: yield this._getAuthorizationHeader(),
316
- "X-Polytomic-Version": (yield core.Supplier.get(this._options.xPolytomicVersion)) != null
317
- ? yield core.Supplier.get(this._options.xPolytomicVersion)
318
- : undefined,
329
+ "X-Polytomic-Version": "2024-02-08",
319
330
  "X-Fern-Language": "JavaScript",
320
331
  "X-Fern-SDK-Name": "polytomic",
321
- "X-Fern-SDK-Version": "0.1.2",
332
+ "X-Fern-SDK-Version": "1.0.0",
322
333
  "X-Fern-Runtime": core.RUNTIME.type,
323
334
  "X-Fern-Runtime-Version": core.RUNTIME.version,
324
335
  },
325
336
  contentType: "application/json",
326
- body: request,
327
337
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
328
338
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
329
339
  });
330
340
  if (_response.ok) {
331
- return _response.body;
341
+ return;
332
342
  }
333
343
  if (_response.error.reason === "status-code") {
334
344
  switch (_response.error.statusCode) {
335
345
  case 401:
336
346
  throw new Polytomic.UnauthorizedError(_response.error.body);
347
+ case 404:
348
+ throw new Polytomic.NotFoundError(_response.error.body);
349
+ case 500:
350
+ throw new Polytomic.InternalServerError(_response.error.body);
337
351
  default:
338
352
  throw new errors.PolytomicError({
339
353
  statusCode: _response.error.statusCode,
@@ -358,11 +372,7 @@ class Webhooks {
358
372
  }
359
373
  _getAuthorizationHeader() {
360
374
  return __awaiter(this, void 0, void 0, function* () {
361
- const bearer = yield core.Supplier.get(this._options.token);
362
- if (bearer != null) {
363
- return `Bearer ${bearer}`;
364
- }
365
- return undefined;
375
+ return `Bearer ${yield core.Supplier.get(this._options.token)}`;
366
376
  });
367
377
  }
368
378
  }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated from our API Definition.
3
+ */
4
+ export interface ApiError {
5
+ message?: string;
6
+ metadata?: unknown;
7
+ status?: number;
8
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated from our API Definition.
3
+ */
4
+ import * as Polytomic from "..";
5
+ export interface GetModelSyncSourceMetaEnvelope {
6
+ data?: Polytomic.ModelSyncSourceMetaResponse;
7
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated from our API Definition.
3
+ */
4
+ import * as Polytomic from "..";
5
+ export interface ModelSyncSourceMetaResponse {
6
+ configuration?: Record<string, Polytomic.ConfigurationValue>;
7
+ items?: Record<string, Polytomic.SourceMeta | undefined>;
8
+ requires_one_of?: string[];
9
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated from our API Definition.
3
+ */
4
+ export interface SourceMeta {
5
+ has_items?: boolean;
6
+ items?: unknown[];
7
+ requires_one_of?: string[];
8
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,4 @@
1
+ export * from "./ApiError";
1
2
  export * from "./BulkDiscover";
2
3
  export * from "./BulkExecutionStatus";
3
4
  export * from "./BulkItemizedSchedule";
@@ -121,4 +122,7 @@ export * from "./PickValue";
121
122
  export * from "./Schema";
122
123
  export * from "./SchemaField";
123
124
  export * from "./SchemaRecordsResponseEnvelope";
125
+ export * from "./GetModelSyncSourceMetaEnvelope";
126
+ export * from "./SourceMeta";
127
+ export * from "./ModelSyncSourceMetaResponse";
124
128
  export * from "./WorkTaskStatus";
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ApiError"), exports);
17
18
  __exportStar(require("./BulkDiscover"), exports);
18
19
  __exportStar(require("./BulkExecutionStatus"), exports);
19
20
  __exportStar(require("./BulkItemizedSchedule"), exports);
@@ -137,4 +138,7 @@ __exportStar(require("./PickValue"), exports);
137
138
  __exportStar(require("./Schema"), exports);
138
139
  __exportStar(require("./SchemaField"), exports);
139
140
  __exportStar(require("./SchemaRecordsResponseEnvelope"), exports);
141
+ __exportStar(require("./GetModelSyncSourceMetaEnvelope"), exports);
142
+ __exportStar(require("./SourceMeta"), exports);
143
+ __exportStar(require("./ModelSyncSourceMetaResponse"), exports);
140
144
  __exportStar(require("./WorkTaskStatus"), exports);
package/dist/Client.d.ts CHANGED
@@ -5,20 +5,20 @@ import * as environments from "./environments";
5
5
  import * as core from "./core";
6
6
  import { BulkSync } from "./api/resources/bulkSync/client/Client";
7
7
  import { Connections } from "./api/resources/connections/client/Client";
8
+ import { ModelSync } from "./api/resources/modelSync/client/Client";
8
9
  import { Schemas } from "./api/resources/schemas/client/Client";
9
10
  import { Events } from "./api/resources/events/client/Client";
10
11
  import { Jobs } from "./api/resources/jobs/client/Client";
12
+ import { Identity } from "./api/resources/identity/client/Client";
11
13
  import { Models } from "./api/resources/models/client/Client";
12
14
  import { Organization } from "./api/resources/organization/client/Client";
13
15
  import { Users } from "./api/resources/users/client/Client";
14
16
  import { Permissions } from "./api/resources/permissions/client/Client";
15
- import { ModelSync } from "./api/resources/modelSync/client/Client";
16
17
  import { Webhooks } from "./api/resources/webhooks/client/Client";
17
18
  export declare namespace PolytomicClient {
18
19
  interface Options {
19
20
  environment?: core.Supplier<environments.PolytomicEnvironment | string>;
20
- token?: core.Supplier<core.BearerToken | undefined>;
21
- xPolytomicVersion?: core.Supplier<"2023-04-25" | undefined>;
21
+ token: core.Supplier<core.BearerToken>;
22
22
  }
23
23
  interface RequestOptions {
24
24
  timeoutInSeconds?: number;
@@ -27,17 +27,21 @@ export declare namespace PolytomicClient {
27
27
  }
28
28
  export declare class PolytomicClient {
29
29
  protected readonly _options: PolytomicClient.Options;
30
- constructor(_options?: PolytomicClient.Options);
30
+ constructor(_options: PolytomicClient.Options);
31
31
  protected _bulkSync: BulkSync | undefined;
32
32
  get bulkSync(): BulkSync;
33
33
  protected _connections: Connections | undefined;
34
34
  get connections(): Connections;
35
+ protected _modelSync: ModelSync | undefined;
36
+ get modelSync(): ModelSync;
35
37
  protected _schemas: Schemas | undefined;
36
38
  get schemas(): Schemas;
37
39
  protected _events: Events | undefined;
38
40
  get events(): Events;
39
41
  protected _jobs: Jobs | undefined;
40
42
  get jobs(): Jobs;
43
+ protected _identity: Identity | undefined;
44
+ get identity(): Identity;
41
45
  protected _models: Models | undefined;
42
46
  get models(): Models;
43
47
  protected _organization: Organization | undefined;
@@ -46,8 +50,6 @@ export declare class PolytomicClient {
46
50
  get users(): Users;
47
51
  protected _permissions: Permissions | undefined;
48
52
  get permissions(): Permissions;
49
- protected _modelSync: ModelSync | undefined;
50
- get modelSync(): ModelSync;
51
53
  protected _webhooks: Webhooks | undefined;
52
54
  get webhooks(): Webhooks;
53
55
  }
package/dist/Client.js CHANGED
@@ -6,17 +6,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.PolytomicClient = void 0;
7
7
  const Client_1 = require("./api/resources/bulkSync/client/Client");
8
8
  const Client_2 = require("./api/resources/connections/client/Client");
9
- const Client_3 = require("./api/resources/schemas/client/Client");
10
- const Client_4 = require("./api/resources/events/client/Client");
11
- const Client_5 = require("./api/resources/jobs/client/Client");
12
- const Client_6 = require("./api/resources/models/client/Client");
13
- const Client_7 = require("./api/resources/organization/client/Client");
14
- const Client_8 = require("./api/resources/users/client/Client");
15
- const Client_9 = require("./api/resources/permissions/client/Client");
16
- const Client_10 = require("./api/resources/modelSync/client/Client");
17
- const Client_11 = require("./api/resources/webhooks/client/Client");
9
+ const Client_3 = require("./api/resources/modelSync/client/Client");
10
+ const Client_4 = require("./api/resources/schemas/client/Client");
11
+ const Client_5 = require("./api/resources/events/client/Client");
12
+ const Client_6 = require("./api/resources/jobs/client/Client");
13
+ const Client_7 = require("./api/resources/identity/client/Client");
14
+ const Client_8 = require("./api/resources/models/client/Client");
15
+ const Client_9 = require("./api/resources/organization/client/Client");
16
+ const Client_10 = require("./api/resources/users/client/Client");
17
+ const Client_11 = require("./api/resources/permissions/client/Client");
18
+ const Client_12 = require("./api/resources/webhooks/client/Client");
18
19
  class PolytomicClient {
19
- constructor(_options = {}) {
20
+ constructor(_options) {
20
21
  this._options = _options;
21
22
  }
22
23
  get bulkSync() {
@@ -27,41 +28,45 @@ class PolytomicClient {
27
28
  var _a;
28
29
  return ((_a = this._connections) !== null && _a !== void 0 ? _a : (this._connections = new Client_2.Connections(this._options)));
29
30
  }
31
+ get modelSync() {
32
+ var _a;
33
+ return ((_a = this._modelSync) !== null && _a !== void 0 ? _a : (this._modelSync = new Client_3.ModelSync(this._options)));
34
+ }
30
35
  get schemas() {
31
36
  var _a;
32
- return ((_a = this._schemas) !== null && _a !== void 0 ? _a : (this._schemas = new Client_3.Schemas(this._options)));
37
+ return ((_a = this._schemas) !== null && _a !== void 0 ? _a : (this._schemas = new Client_4.Schemas(this._options)));
33
38
  }
34
39
  get events() {
35
40
  var _a;
36
- return ((_a = this._events) !== null && _a !== void 0 ? _a : (this._events = new Client_4.Events(this._options)));
41
+ return ((_a = this._events) !== null && _a !== void 0 ? _a : (this._events = new Client_5.Events(this._options)));
37
42
  }
38
43
  get jobs() {
39
44
  var _a;
40
- return ((_a = this._jobs) !== null && _a !== void 0 ? _a : (this._jobs = new Client_5.Jobs(this._options)));
45
+ return ((_a = this._jobs) !== null && _a !== void 0 ? _a : (this._jobs = new Client_6.Jobs(this._options)));
46
+ }
47
+ get identity() {
48
+ var _a;
49
+ return ((_a = this._identity) !== null && _a !== void 0 ? _a : (this._identity = new Client_7.Identity(this._options)));
41
50
  }
42
51
  get models() {
43
52
  var _a;
44
- return ((_a = this._models) !== null && _a !== void 0 ? _a : (this._models = new Client_6.Models(this._options)));
53
+ return ((_a = this._models) !== null && _a !== void 0 ? _a : (this._models = new Client_8.Models(this._options)));
45
54
  }
46
55
  get organization() {
47
56
  var _a;
48
- return ((_a = this._organization) !== null && _a !== void 0 ? _a : (this._organization = new Client_7.Organization(this._options)));
57
+ return ((_a = this._organization) !== null && _a !== void 0 ? _a : (this._organization = new Client_9.Organization(this._options)));
49
58
  }
50
59
  get users() {
51
60
  var _a;
52
- return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_8.Users(this._options)));
61
+ return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_10.Users(this._options)));
53
62
  }
54
63
  get permissions() {
55
64
  var _a;
56
- return ((_a = this._permissions) !== null && _a !== void 0 ? _a : (this._permissions = new Client_9.Permissions(this._options)));
57
- }
58
- get modelSync() {
59
- var _a;
60
- return ((_a = this._modelSync) !== null && _a !== void 0 ? _a : (this._modelSync = new Client_10.ModelSync(this._options)));
65
+ return ((_a = this._permissions) !== null && _a !== void 0 ? _a : (this._permissions = new Client_11.Permissions(this._options)));
61
66
  }
62
67
  get webhooks() {
63
68
  var _a;
64
- return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_11.Webhooks(this._options)));
69
+ return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_12.Webhooks(this._options)));
65
70
  }
66
71
  }
67
72
  exports.PolytomicClient = PolytomicClient;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated from our API Definition.
3
+ */
4
+ import * as errors from "../../errors";
5
+ import * as Polytomic from "..";
6
+ export declare class BadRequestError extends errors.PolytomicError {
7
+ constructor(body: Polytomic.ApiError);
8
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
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
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.BadRequestError = void 0;
30
+ const errors = __importStar(require("../../errors"));
31
+ class BadRequestError extends errors.PolytomicError {
32
+ constructor(body) {
33
+ super({
34
+ message: "BadRequestError",
35
+ statusCode: 400,
36
+ body: body,
37
+ });
38
+ Object.setPrototypeOf(this, BadRequestError.prototype);
39
+ }
40
+ }
41
+ exports.BadRequestError = BadRequestError;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated from our API Definition.
3
+ */
4
+ import * as errors from "../../errors";
5
+ import * as Polytomic from "..";
6
+ export declare class ForbiddenError extends errors.PolytomicError {
7
+ constructor(body: Polytomic.ApiError);
8
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
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
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.ForbiddenError = void 0;
30
+ const errors = __importStar(require("../../errors"));
31
+ class ForbiddenError extends errors.PolytomicError {
32
+ constructor(body) {
33
+ super({
34
+ message: "ForbiddenError",
35
+ statusCode: 403,
36
+ body: body,
37
+ });
38
+ Object.setPrototypeOf(this, ForbiddenError.prototype);
39
+ }
40
+ }
41
+ exports.ForbiddenError = ForbiddenError;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated from our API Definition.
3
+ */
4
+ import * as errors from "../../errors";
5
+ import * as Polytomic from "..";
6
+ export declare class InternalServerError extends errors.PolytomicError {
7
+ constructor(body: Polytomic.ApiError);
8
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
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
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.InternalServerError = void 0;
30
+ const errors = __importStar(require("../../errors"));
31
+ class InternalServerError extends errors.PolytomicError {
32
+ constructor(body) {
33
+ super({
34
+ message: "InternalServerError",
35
+ statusCode: 500,
36
+ body: body,
37
+ });
38
+ Object.setPrototypeOf(this, InternalServerError.prototype);
39
+ }
40
+ }
41
+ exports.InternalServerError = InternalServerError;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated from our API Definition.
3
+ */
4
+ import * as errors from "../../errors";
5
+ import * as Polytomic from "..";
6
+ export declare class NotFoundError extends errors.PolytomicError {
7
+ constructor(body: Polytomic.ApiError);
8
+ }