polytomic 0.1.2 → 0.2.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 (187) 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 +78 -47
  16. package/api/resources/bulkSync/client/Client.js +188 -183
  17. package/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.d.ts +0 -1
  18. package/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +8 -2
  19. package/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +8 -2
  20. package/api/resources/bulkSync/client/requests/index.d.ts +3 -2
  21. package/api/resources/bulkSync/resources/executions/client/Client.d.ts +5 -14
  22. package/api/resources/bulkSync/resources/executions/client/Client.js +12 -74
  23. package/api/resources/bulkSync/resources/executions/client/index.d.ts +1 -1
  24. package/api/resources/bulkSync/resources/executions/client/index.js +0 -15
  25. package/api/resources/bulkSync/resources/index.d.ts +0 -1
  26. package/api/resources/bulkSync/resources/index.js +0 -1
  27. package/api/resources/bulkSync/resources/schemas/client/Client.d.ts +23 -9
  28. package/api/resources/bulkSync/resources/schemas/client/Client.js +93 -24
  29. package/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.d.ts +11 -0
  30. package/api/resources/bulkSync/resources/schemas/client/requests/index.d.ts +1 -0
  31. package/api/resources/connections/client/Client.d.ts +43 -45
  32. package/api/resources/connections/client/Client.js +116 -294
  33. package/api/resources/connections/client/requests/ConnectCardRequest.d.ts +20 -0
  34. package/api/resources/connections/client/requests/CreateConnectionRequestSchema.d.ts +2 -2
  35. package/api/resources/connections/client/requests/UpdateConnectionRequestSchema.d.ts +2 -2
  36. package/api/resources/connections/client/requests/index.d.ts +2 -4
  37. package/api/resources/events/client/Client.d.ts +9 -8
  38. package/api/resources/events/client/Client.js +16 -18
  39. package/{dist/api/resources/events/client/requests/EventsApiV2GetEventsRequest.d.ts → api/resources/events/client/requests/EventsListRequest.d.ts} +1 -1
  40. package/api/resources/events/client/requests/index.d.ts +1 -1
  41. package/api/resources/identity/client/Client.d.ts +29 -0
  42. package/api/resources/identity/client/Client.js +114 -0
  43. package/api/resources/identity/client/index.d.ts +1 -0
  44. package/api/resources/identity/index.d.ts +1 -0
  45. package/api/resources/identity/index.js +17 -0
  46. package/api/resources/index.d.ts +3 -2
  47. package/api/resources/index.js +4 -3
  48. package/api/resources/jobs/client/Client.d.ts +6 -4
  49. package/api/resources/jobs/client/Client.js +13 -10
  50. package/api/resources/modelSync/client/Client.d.ts +82 -11
  51. package/api/resources/modelSync/client/Client.js +421 -79
  52. package/api/resources/{connections/client/requests/ModelFieldsRequest.d.ts → modelSync/client/requests/ModelSyncGetSourceRequest.d.ts} +2 -2
  53. package/{dist/api/resources/connections/client/requests/TargetRequest.d.ts → api/resources/modelSync/client/requests/ModelSyncGetTargetFieldsRequest.d.ts} +4 -4
  54. package/{dist/api/resources/connections/client/requests/ConnectionsGetTargetRequest.d.ts → api/resources/modelSync/client/requests/ModelSyncGetTargetRequest.d.ts} +2 -5
  55. package/api/resources/modelSync/client/requests/index.d.ts +3 -0
  56. package/api/resources/modelSync/resources/executions/client/Client.d.ts +16 -64
  57. package/api/resources/modelSync/resources/executions/client/Client.js +43 -476
  58. package/api/resources/models/client/Client.d.ts +22 -11
  59. package/api/resources/models/client/Client.js +68 -46
  60. package/api/resources/organization/client/Client.d.ts +21 -14
  61. package/api/resources/organization/client/Client.js +52 -42
  62. package/api/resources/permissions/client/Client.d.ts +2 -3
  63. package/api/resources/permissions/client/Client.js +1 -1
  64. package/api/resources/permissions/resources/policies/client/Client.d.ts +24 -11
  65. package/api/resources/permissions/resources/policies/client/Client.js +69 -41
  66. package/api/resources/permissions/resources/roles/client/Client.d.ts +22 -10
  67. package/api/resources/permissions/resources/roles/client/Client.js +62 -37
  68. package/api/resources/schemas/client/Client.d.ts +39 -6
  69. package/api/resources/schemas/client/Client.js +208 -13
  70. package/api/resources/users/client/Client.d.ts +21 -11
  71. package/api/resources/users/client/Client.js +57 -40
  72. package/api/resources/webhooks/client/Client.d.ts +18 -11
  73. package/api/resources/webhooks/client/Client.js +53 -43
  74. package/api/types/ApiError.d.ts +8 -0
  75. package/api/types/GetModelSyncSourceMetaEnvelope.d.ts +7 -0
  76. package/api/types/ModelSyncSourceMetaResponse.d.ts +9 -0
  77. package/api/types/SourceMeta.d.ts +8 -0
  78. package/api/types/SourceMeta.js +5 -0
  79. package/api/types/index.d.ts +4 -0
  80. package/api/types/index.js +4 -0
  81. package/dist/Client.d.ts +8 -6
  82. package/dist/Client.js +27 -22
  83. package/dist/api/errors/BadRequestError.d.ts +8 -0
  84. package/dist/api/errors/BadRequestError.js +41 -0
  85. package/dist/api/errors/ForbiddenError.d.ts +8 -0
  86. package/dist/api/errors/ForbiddenError.js +41 -0
  87. package/dist/api/errors/InternalServerError.d.ts +8 -0
  88. package/dist/api/errors/InternalServerError.js +41 -0
  89. package/dist/api/errors/NotFoundError.d.ts +8 -0
  90. package/dist/api/errors/NotFoundError.js +41 -0
  91. package/dist/api/errors/UnprocessableEntityError.d.ts +8 -0
  92. package/dist/api/errors/UnprocessableEntityError.js +41 -0
  93. package/dist/api/errors/index.d.ts +5 -0
  94. package/dist/api/errors/index.js +5 -0
  95. package/dist/api/resources/bulkSync/client/Client.d.ts +78 -47
  96. package/dist/api/resources/bulkSync/client/Client.js +188 -183
  97. package/dist/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.d.ts +0 -1
  98. package/dist/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +8 -2
  99. package/dist/api/resources/bulkSync/client/requests/StartBulkSyncRequest.js +5 -0
  100. package/dist/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +8 -2
  101. package/dist/api/resources/bulkSync/client/requests/index.d.ts +3 -2
  102. package/dist/api/resources/bulkSync/resources/executions/client/Client.d.ts +5 -14
  103. package/dist/api/resources/bulkSync/resources/executions/client/Client.js +12 -74
  104. package/dist/api/resources/bulkSync/resources/executions/client/index.d.ts +1 -1
  105. package/dist/api/resources/bulkSync/resources/executions/client/index.js +0 -15
  106. package/dist/api/resources/bulkSync/resources/index.d.ts +0 -1
  107. package/dist/api/resources/bulkSync/resources/index.js +0 -1
  108. package/dist/api/resources/bulkSync/resources/schemas/client/Client.d.ts +23 -9
  109. package/dist/api/resources/bulkSync/resources/schemas/client/Client.js +93 -24
  110. package/dist/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.d.ts +11 -0
  111. package/dist/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.js +5 -0
  112. package/dist/api/resources/bulkSync/resources/schemas/client/requests/index.d.ts +1 -0
  113. package/dist/api/resources/connections/client/Client.d.ts +43 -45
  114. package/dist/api/resources/connections/client/Client.js +116 -294
  115. package/dist/api/resources/connections/client/requests/ConnectCardRequest.d.ts +20 -0
  116. package/dist/api/resources/connections/client/requests/ConnectCardRequest.js +5 -0
  117. package/dist/api/resources/connections/client/requests/CreateConnectionRequestSchema.d.ts +2 -2
  118. package/dist/api/resources/connections/client/requests/UpdateConnectionRequestSchema.d.ts +2 -2
  119. package/dist/api/resources/connections/client/requests/index.d.ts +2 -4
  120. package/dist/api/resources/events/client/Client.d.ts +9 -8
  121. package/dist/api/resources/events/client/Client.js +16 -18
  122. package/{api/resources/events/client/requests/EventsApiV2GetEventsRequest.d.ts → dist/api/resources/events/client/requests/EventsListRequest.d.ts} +1 -1
  123. package/dist/api/resources/events/client/requests/EventsListRequest.js +5 -0
  124. package/dist/api/resources/events/client/requests/index.d.ts +1 -1
  125. package/dist/api/resources/identity/client/Client.d.ts +29 -0
  126. package/dist/api/resources/identity/client/Client.js +114 -0
  127. package/dist/api/resources/identity/client/index.d.ts +1 -0
  128. package/dist/api/resources/identity/index.d.ts +1 -0
  129. package/dist/api/resources/identity/index.js +17 -0
  130. package/dist/api/resources/index.d.ts +3 -2
  131. package/dist/api/resources/index.js +4 -3
  132. package/dist/api/resources/jobs/client/Client.d.ts +6 -4
  133. package/dist/api/resources/jobs/client/Client.js +13 -10
  134. package/dist/api/resources/modelSync/client/Client.d.ts +82 -11
  135. package/dist/api/resources/modelSync/client/Client.js +421 -79
  136. package/dist/api/resources/{connections/client/requests/ModelFieldsRequest.d.ts → modelSync/client/requests/ModelSyncGetSourceRequest.d.ts} +2 -2
  137. package/dist/api/resources/modelSync/client/requests/ModelSyncGetSourceRequest.js +5 -0
  138. package/{api/resources/connections/client/requests/TargetRequest.d.ts → dist/api/resources/modelSync/client/requests/ModelSyncGetTargetFieldsRequest.d.ts} +4 -4
  139. package/dist/api/resources/modelSync/client/requests/ModelSyncGetTargetFieldsRequest.js +5 -0
  140. package/{api/resources/connections/client/requests/ConnectionsGetTargetRequest.d.ts → dist/api/resources/modelSync/client/requests/ModelSyncGetTargetRequest.d.ts} +2 -5
  141. package/dist/api/resources/modelSync/client/requests/ModelSyncGetTargetRequest.js +5 -0
  142. package/dist/api/resources/modelSync/client/requests/index.d.ts +3 -0
  143. package/dist/api/resources/modelSync/resources/executions/client/Client.d.ts +16 -64
  144. package/dist/api/resources/modelSync/resources/executions/client/Client.js +43 -476
  145. package/dist/api/resources/models/client/Client.d.ts +22 -11
  146. package/dist/api/resources/models/client/Client.js +68 -46
  147. package/dist/api/resources/organization/client/Client.d.ts +21 -14
  148. package/dist/api/resources/organization/client/Client.js +52 -42
  149. package/dist/api/resources/permissions/client/Client.d.ts +2 -3
  150. package/dist/api/resources/permissions/client/Client.js +1 -1
  151. package/dist/api/resources/permissions/resources/policies/client/Client.d.ts +24 -11
  152. package/dist/api/resources/permissions/resources/policies/client/Client.js +69 -41
  153. package/dist/api/resources/permissions/resources/roles/client/Client.d.ts +22 -10
  154. package/dist/api/resources/permissions/resources/roles/client/Client.js +62 -37
  155. package/dist/api/resources/schemas/client/Client.d.ts +39 -6
  156. package/dist/api/resources/schemas/client/Client.js +208 -13
  157. package/dist/api/resources/users/client/Client.d.ts +21 -11
  158. package/dist/api/resources/users/client/Client.js +57 -40
  159. package/dist/api/resources/webhooks/client/Client.d.ts +18 -11
  160. package/dist/api/resources/webhooks/client/Client.js +53 -43
  161. package/dist/api/types/ApiError.d.ts +8 -0
  162. package/dist/api/types/ApiError.js +5 -0
  163. package/dist/api/types/GetModelSyncSourceMetaEnvelope.d.ts +7 -0
  164. package/dist/api/types/GetModelSyncSourceMetaEnvelope.js +5 -0
  165. package/dist/api/types/ModelSyncSourceMetaResponse.d.ts +9 -0
  166. package/dist/api/types/ModelSyncSourceMetaResponse.js +5 -0
  167. package/dist/api/types/SourceMeta.d.ts +8 -0
  168. package/dist/api/types/SourceMeta.js +5 -0
  169. package/dist/api/types/index.d.ts +4 -0
  170. package/dist/api/types/index.js +4 -0
  171. package/package.json +1 -1
  172. package/api/resources/bulkSync/resources/executions/client/requests/index.d.ts +0 -1
  173. package/dist/api/resources/bulkSync/resources/executions/client/requests/index.d.ts +0 -1
  174. /package/api/resources/bulkSync/{resources/executions/client → client}/requests/StartBulkSyncRequest.d.ts +0 -0
  175. /package/api/resources/bulkSync/{resources/executions/client → client}/requests/StartBulkSyncRequest.js +0 -0
  176. /package/api/resources/{connections/client/requests/ConnectionsGetTargetRequest.js → bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.js} +0 -0
  177. /package/api/resources/connections/client/requests/{ModelFieldsRequest.js → ConnectCardRequest.js} +0 -0
  178. /package/api/resources/{connections/client/requests/TargetRequest.js → events/client/requests/EventsListRequest.js} +0 -0
  179. /package/api/resources/{bulkSync/resources/executions/client/requests → identity/client}/index.js +0 -0
  180. /package/api/resources/{events/client/requests/EventsApiV2GetEventsRequest.js → modelSync/client/requests/ModelSyncGetSourceRequest.js} +0 -0
  181. /package/{dist/api/resources/bulkSync/resources/executions/client/requests/StartBulkSyncRequest.js → api/resources/modelSync/client/requests/ModelSyncGetTargetFieldsRequest.js} +0 -0
  182. /package/{dist/api/resources/connections/client/requests/ConnectionsGetTargetRequest.js → api/resources/modelSync/client/requests/ModelSyncGetTargetRequest.js} +0 -0
  183. /package/{dist/api/resources/connections/client/requests/ModelFieldsRequest.js → api/types/ApiError.js} +0 -0
  184. /package/{dist/api/resources/connections/client/requests/TargetRequest.js → api/types/GetModelSyncSourceMetaEnvelope.js} +0 -0
  185. /package/{dist/api/resources/events/client/requests/EventsApiV2GetEventsRequest.js → api/types/ModelSyncSourceMetaResponse.js} +0 -0
  186. /package/dist/api/resources/bulkSync/{resources/executions/client → client}/requests/StartBulkSyncRequest.d.ts +0 -0
  187. /package/dist/api/resources/{bulkSync/resources/executions/client/requests → identity/client}/index.js +0 -0
@@ -7,8 +7,7 @@ import * as Polytomic from "../../..";
7
7
  export declare namespace Models {
8
8
  interface Options {
9
9
  environment?: core.Supplier<environments.PolytomicEnvironment | string>;
10
- token?: core.Supplier<core.BearerToken | undefined>;
11
- xPolytomicVersion?: core.Supplier<"2023-04-25" | undefined>;
10
+ token: core.Supplier<core.BearerToken>;
12
11
  }
13
12
  interface RequestOptions {
14
13
  timeoutInSeconds?: number;
@@ -17,16 +16,20 @@ export declare namespace Models {
17
16
  }
18
17
  export declare class Models {
19
18
  protected readonly _options: Models.Options;
20
- constructor(_options?: Models.Options);
19
+ constructor(_options: Models.Options);
21
20
  /**
22
21
  * @throws {@link Polytomic.UnauthorizedError}
22
+ * @throws {@link Polytomic.NotFoundError}
23
23
  *
24
24
  * @example
25
25
  * await polytomic.models.list()
26
26
  */
27
27
  list(requestOptions?: Models.RequestOptions): Promise<Polytomic.ModelListResponseEnvelope>;
28
28
  /**
29
+ * @throws {@link Polytomic.BadRequestError}
29
30
  * @throws {@link Polytomic.UnauthorizedError}
31
+ * @throws {@link Polytomic.ForbiddenError}
32
+ * @throws {@link Polytomic.InternalServerError}
30
33
  *
31
34
  * @example
32
35
  * await polytomic.models.create({
@@ -38,20 +41,18 @@ export declare class Models {
38
41
  create(request: Polytomic.CreateModelRequest, requestOptions?: Models.RequestOptions): Promise<Polytomic.ModelResponseEnvelope>;
39
42
  /**
40
43
  * @throws {@link Polytomic.UnauthorizedError}
44
+ * @throws {@link Polytomic.NotFoundError}
45
+ * @throws {@link Polytomic.InternalServerError}
41
46
  *
42
47
  * @example
43
48
  * await polytomic.models.get("248df4b7-aa70-47b8-a036-33ac447e668d")
44
49
  */
45
50
  get(id: string, requestOptions?: Models.RequestOptions): Promise<Polytomic.ModelResponseEnvelope>;
46
51
  /**
52
+ * @throws {@link Polytomic.BadRequestError}
47
53
  * @throws {@link Polytomic.UnauthorizedError}
48
- *
49
- * @example
50
- * await polytomic.models.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
51
- */
52
- remove(id: string, requestOptions?: Models.RequestOptions): Promise<void>;
53
- /**
54
- * @throws {@link Polytomic.UnauthorizedError}
54
+ * @throws {@link Polytomic.NotFoundError}
55
+ * @throws {@link Polytomic.InternalServerError}
55
56
  *
56
57
  * @example
57
58
  * await polytomic.models.update("248df4b7-aa70-47b8-a036-33ac447e668d", {
@@ -62,5 +63,15 @@ export declare class Models {
62
63
  * })
63
64
  */
64
65
  update(id: string, request: Polytomic.UpdateModelRequest, requestOptions?: Models.RequestOptions): Promise<Polytomic.ModelResponseEnvelope>;
65
- protected _getAuthorizationHeader(): Promise<string | undefined>;
66
+ /**
67
+ * @throws {@link Polytomic.UnauthorizedError}
68
+ * @throws {@link Polytomic.ForbiddenError}
69
+ * @throws {@link Polytomic.NotFoundError}
70
+ * @throws {@link Polytomic.InternalServerError}
71
+ *
72
+ * @example
73
+ * await polytomic.models.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
74
+ */
75
+ remove(id: string, requestOptions?: Models.RequestOptions): Promise<void>;
76
+ protected _getAuthorizationHeader(): Promise<string>;
66
77
  }
@@ -56,11 +56,12 @@ const Polytomic = __importStar(require("../../.."));
56
56
  const url_join_1 = __importDefault(require("url-join"));
57
57
  const errors = __importStar(require("../../../../errors"));
58
58
  class Models {
59
- constructor(_options = {}) {
59
+ constructor(_options) {
60
60
  this._options = _options;
61
61
  }
62
62
  /**
63
63
  * @throws {@link Polytomic.UnauthorizedError}
64
+ * @throws {@link Polytomic.NotFoundError}
64
65
  *
65
66
  * @example
66
67
  * await polytomic.models.list()
@@ -73,12 +74,10 @@ class Models {
73
74
  method: "GET",
74
75
  headers: {
75
76
  Authorization: yield this._getAuthorizationHeader(),
76
- "X-Polytomic-Version": (yield core.Supplier.get(this._options.xPolytomicVersion)) != null
77
- ? yield core.Supplier.get(this._options.xPolytomicVersion)
78
- : undefined,
77
+ "X-Polytomic-Version": "2024-02-08",
79
78
  "X-Fern-Language": "JavaScript",
80
79
  "X-Fern-SDK-Name": "polytomic",
81
- "X-Fern-SDK-Version": "0.1.2",
80
+ "X-Fern-SDK-Version": "0.2.0",
82
81
  "X-Fern-Runtime": core.RUNTIME.type,
83
82
  "X-Fern-Runtime-Version": core.RUNTIME.version,
84
83
  },
@@ -93,6 +92,8 @@ class Models {
93
92
  switch (_response.error.statusCode) {
94
93
  case 401:
95
94
  throw new Polytomic.UnauthorizedError(_response.error.body);
95
+ case 404:
96
+ throw new Polytomic.NotFoundError(_response.error.body);
96
97
  default:
97
98
  throw new errors.PolytomicError({
98
99
  statusCode: _response.error.statusCode,
@@ -116,7 +117,10 @@ class Models {
116
117
  });
117
118
  }
118
119
  /**
120
+ * @throws {@link Polytomic.BadRequestError}
119
121
  * @throws {@link Polytomic.UnauthorizedError}
122
+ * @throws {@link Polytomic.ForbiddenError}
123
+ * @throws {@link Polytomic.InternalServerError}
120
124
  *
121
125
  * @example
122
126
  * await polytomic.models.create({
@@ -138,12 +142,10 @@ class Models {
138
142
  method: "POST",
139
143
  headers: {
140
144
  Authorization: yield this._getAuthorizationHeader(),
141
- "X-Polytomic-Version": (yield core.Supplier.get(this._options.xPolytomicVersion)) != null
142
- ? yield core.Supplier.get(this._options.xPolytomicVersion)
143
- : undefined,
145
+ "X-Polytomic-Version": "2024-02-08",
144
146
  "X-Fern-Language": "JavaScript",
145
147
  "X-Fern-SDK-Name": "polytomic",
146
- "X-Fern-SDK-Version": "0.1.2",
148
+ "X-Fern-SDK-Version": "0.2.0",
147
149
  "X-Fern-Runtime": core.RUNTIME.type,
148
150
  "X-Fern-Runtime-Version": core.RUNTIME.version,
149
151
  },
@@ -158,8 +160,14 @@ class Models {
158
160
  }
159
161
  if (_response.error.reason === "status-code") {
160
162
  switch (_response.error.statusCode) {
163
+ case 400:
164
+ throw new Polytomic.BadRequestError(_response.error.body);
161
165
  case 401:
162
166
  throw new Polytomic.UnauthorizedError(_response.error.body);
167
+ case 403:
168
+ throw new Polytomic.ForbiddenError(_response.error.body);
169
+ case 500:
170
+ throw new Polytomic.InternalServerError(_response.error.body);
163
171
  default:
164
172
  throw new errors.PolytomicError({
165
173
  statusCode: _response.error.statusCode,
@@ -184,6 +192,8 @@ class Models {
184
192
  }
185
193
  /**
186
194
  * @throws {@link Polytomic.UnauthorizedError}
195
+ * @throws {@link Polytomic.NotFoundError}
196
+ * @throws {@link Polytomic.InternalServerError}
187
197
  *
188
198
  * @example
189
199
  * await polytomic.models.get("248df4b7-aa70-47b8-a036-33ac447e668d")
@@ -196,12 +206,10 @@ class Models {
196
206
  method: "GET",
197
207
  headers: {
198
208
  Authorization: yield this._getAuthorizationHeader(),
199
- "X-Polytomic-Version": (yield core.Supplier.get(this._options.xPolytomicVersion)) != null
200
- ? yield core.Supplier.get(this._options.xPolytomicVersion)
201
- : undefined,
209
+ "X-Polytomic-Version": "2024-02-08",
202
210
  "X-Fern-Language": "JavaScript",
203
211
  "X-Fern-SDK-Name": "polytomic",
204
- "X-Fern-SDK-Version": "0.1.2",
212
+ "X-Fern-SDK-Version": "0.2.0",
205
213
  "X-Fern-Runtime": core.RUNTIME.type,
206
214
  "X-Fern-Runtime-Version": core.RUNTIME.version,
207
215
  },
@@ -216,6 +224,10 @@ class Models {
216
224
  switch (_response.error.statusCode) {
217
225
  case 401:
218
226
  throw new Polytomic.UnauthorizedError(_response.error.body);
227
+ case 404:
228
+ throw new Polytomic.NotFoundError(_response.error.body);
229
+ case 500:
230
+ throw new Polytomic.InternalServerError(_response.error.body);
219
231
  default:
220
232
  throw new errors.PolytomicError({
221
233
  statusCode: _response.error.statusCode,
@@ -239,39 +251,58 @@ class Models {
239
251
  });
240
252
  }
241
253
  /**
254
+ * @throws {@link Polytomic.BadRequestError}
242
255
  * @throws {@link Polytomic.UnauthorizedError}
256
+ * @throws {@link Polytomic.NotFoundError}
257
+ * @throws {@link Polytomic.InternalServerError}
243
258
  *
244
259
  * @example
245
- * await polytomic.models.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
260
+ * await polytomic.models.update("248df4b7-aa70-47b8-a036-33ac447e668d", {
261
+ * async: false,
262
+ * connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
263
+ * identifier: "id",
264
+ * name: "Users"
265
+ * })
246
266
  */
247
- remove(id, requestOptions) {
267
+ update(id, request, requestOptions) {
248
268
  var _a;
249
269
  return __awaiter(this, void 0, void 0, function* () {
270
+ const { async } = request, _body = __rest(request, ["async"]);
271
+ const _queryParams = {};
272
+ if (async != null) {
273
+ _queryParams["async"] = async.toString();
274
+ }
250
275
  const _response = yield core.fetcher({
251
276
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/models/${id}`),
252
- method: "DELETE",
277
+ method: "PUT",
253
278
  headers: {
254
279
  Authorization: yield this._getAuthorizationHeader(),
255
- "X-Polytomic-Version": (yield core.Supplier.get(this._options.xPolytomicVersion)) != null
256
- ? yield core.Supplier.get(this._options.xPolytomicVersion)
257
- : undefined,
280
+ "X-Polytomic-Version": "2024-02-08",
258
281
  "X-Fern-Language": "JavaScript",
259
282
  "X-Fern-SDK-Name": "polytomic",
260
- "X-Fern-SDK-Version": "0.1.2",
283
+ "X-Fern-SDK-Version": "0.2.0",
261
284
  "X-Fern-Runtime": core.RUNTIME.type,
262
285
  "X-Fern-Runtime-Version": core.RUNTIME.version,
263
286
  },
264
287
  contentType: "application/json",
288
+ queryParameters: _queryParams,
289
+ body: _body,
265
290
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
266
291
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
267
292
  });
268
293
  if (_response.ok) {
269
- return;
294
+ return _response.body;
270
295
  }
271
296
  if (_response.error.reason === "status-code") {
272
297
  switch (_response.error.statusCode) {
298
+ case 400:
299
+ throw new Polytomic.BadRequestError(_response.error.body);
273
300
  case 401:
274
301
  throw new Polytomic.UnauthorizedError(_response.error.body);
302
+ case 404:
303
+ throw new Polytomic.NotFoundError(_response.error.body);
304
+ case 500:
305
+ throw new Polytomic.InternalServerError(_response.error.body);
275
306
  default:
276
307
  throw new errors.PolytomicError({
277
308
  statusCode: _response.error.statusCode,
@@ -296,50 +327,45 @@ class Models {
296
327
  }
297
328
  /**
298
329
  * @throws {@link Polytomic.UnauthorizedError}
330
+ * @throws {@link Polytomic.ForbiddenError}
331
+ * @throws {@link Polytomic.NotFoundError}
332
+ * @throws {@link Polytomic.InternalServerError}
299
333
  *
300
334
  * @example
301
- * await polytomic.models.update("248df4b7-aa70-47b8-a036-33ac447e668d", {
302
- * async: false,
303
- * connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
304
- * identifier: "id",
305
- * name: "Users"
306
- * })
335
+ * await polytomic.models.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
307
336
  */
308
- update(id, request, requestOptions) {
337
+ remove(id, requestOptions) {
309
338
  var _a;
310
339
  return __awaiter(this, void 0, void 0, function* () {
311
- const { async } = request, _body = __rest(request, ["async"]);
312
- const _queryParams = {};
313
- if (async != null) {
314
- _queryParams["async"] = async.toString();
315
- }
316
340
  const _response = yield core.fetcher({
317
341
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/models/${id}`),
318
- method: "PATCH",
342
+ method: "DELETE",
319
343
  headers: {
320
344
  Authorization: yield this._getAuthorizationHeader(),
321
- "X-Polytomic-Version": (yield core.Supplier.get(this._options.xPolytomicVersion)) != null
322
- ? yield core.Supplier.get(this._options.xPolytomicVersion)
323
- : undefined,
345
+ "X-Polytomic-Version": "2024-02-08",
324
346
  "X-Fern-Language": "JavaScript",
325
347
  "X-Fern-SDK-Name": "polytomic",
326
- "X-Fern-SDK-Version": "0.1.2",
348
+ "X-Fern-SDK-Version": "0.2.0",
327
349
  "X-Fern-Runtime": core.RUNTIME.type,
328
350
  "X-Fern-Runtime-Version": core.RUNTIME.version,
329
351
  },
330
352
  contentType: "application/json",
331
- queryParameters: _queryParams,
332
- body: _body,
333
353
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
334
354
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
335
355
  });
336
356
  if (_response.ok) {
337
- return _response.body;
357
+ return;
338
358
  }
339
359
  if (_response.error.reason === "status-code") {
340
360
  switch (_response.error.statusCode) {
341
361
  case 401:
342
362
  throw new Polytomic.UnauthorizedError(_response.error.body);
363
+ case 403:
364
+ throw new Polytomic.ForbiddenError(_response.error.body);
365
+ case 404:
366
+ throw new Polytomic.NotFoundError(_response.error.body);
367
+ case 500:
368
+ throw new Polytomic.InternalServerError(_response.error.body);
343
369
  default:
344
370
  throw new errors.PolytomicError({
345
371
  statusCode: _response.error.statusCode,
@@ -364,11 +390,7 @@ class Models {
364
390
  }
365
391
  _getAuthorizationHeader() {
366
392
  return __awaiter(this, void 0, void 0, function* () {
367
- const bearer = yield core.Supplier.get(this._options.token);
368
- if (bearer != null) {
369
- return `Bearer ${bearer}`;
370
- }
371
- return undefined;
393
+ return `Bearer ${yield core.Supplier.get(this._options.token)}`;
372
394
  });
373
395
  }
374
396
  }
@@ -7,8 +7,7 @@ import * as Polytomic from "../../..";
7
7
  export declare namespace Organization {
8
8
  interface Options {
9
9
  environment?: core.Supplier<environments.PolytomicEnvironment | string>;
10
- token?: core.Supplier<core.BearerToken | undefined>;
11
- xPolytomicVersion?: core.Supplier<"2023-04-25" | undefined>;
10
+ token: core.Supplier<core.BearerToken>;
12
11
  }
13
12
  interface RequestOptions {
14
13
  timeoutInSeconds?: number;
@@ -17,12 +16,13 @@ export declare namespace Organization {
17
16
  }
18
17
  export declare class Organization {
19
18
  protected readonly _options: Organization.Options;
20
- constructor(_options?: Organization.Options);
19
+ constructor(_options: Organization.Options);
21
20
  /**
22
21
  * > 🚧 Requires partner key
23
22
  * >
24
23
  * > Organization endpoints are only accessible using [partner keys](https://docs.polytomic.com/reference/authentication#partner-keys)
25
24
  * @throws {@link Polytomic.UnauthorizedError}
25
+ * @throws {@link Polytomic.InternalServerError}
26
26
  *
27
27
  * @example
28
28
  * await polytomic.organization.list()
@@ -33,6 +33,8 @@ export declare class Organization {
33
33
  * >
34
34
  * > Organization endpoints are only accessible using [partner keys](https://docs.polytomic.com/reference/authentication#partner-keys)
35
35
  * @throws {@link Polytomic.UnauthorizedError}
36
+ * @throws {@link Polytomic.UnprocessableEntityError}
37
+ * @throws {@link Polytomic.InternalServerError}
36
38
  *
37
39
  * @example
38
40
  * await polytomic.organization.create({
@@ -50,6 +52,7 @@ export declare class Organization {
50
52
  * >
51
53
  * > Organization endpoints are only accessible using [partner keys](https://docs.polytomic.com/reference/authentication#partner-keys)
52
54
  * @throws {@link Polytomic.UnauthorizedError}
55
+ * @throws {@link Polytomic.NotFoundError}
53
56
  *
54
57
  * @example
55
58
  * await polytomic.organization.get("248df4b7-aa70-47b8-a036-33ac447e668d")
@@ -60,16 +63,8 @@ export declare class Organization {
60
63
  * >
61
64
  * > Organization endpoints are only accessible using [partner keys](https://docs.polytomic.com/reference/authentication#partner-keys)
62
65
  * @throws {@link Polytomic.UnauthorizedError}
63
- *
64
- * @example
65
- * await polytomic.organization.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
66
- */
67
- remove(id: string, requestOptions?: Organization.RequestOptions): Promise<void>;
68
- /**
69
- * > 🚧 Requires partner key
70
- * >
71
- * > Organization endpoints are only accessible using [partner keys](https://docs.polytomic.com/reference/authentication#partner-keys)
72
- * @throws {@link Polytomic.UnauthorizedError}
66
+ * @throws {@link Polytomic.UnprocessableEntityError}
67
+ * @throws {@link Polytomic.InternalServerError}
73
68
  *
74
69
  * @example
75
70
  * await polytomic.organization.update("248df4b7-aa70-47b8-a036-33ac447e668d", {
@@ -82,5 +77,17 @@ export declare class Organization {
82
77
  * })
83
78
  */
84
79
  update(id: string, request: Polytomic.UpdateOrganizationRequestSchema, requestOptions?: Organization.RequestOptions): Promise<Polytomic.OrganizationEnvelope>;
85
- protected _getAuthorizationHeader(): Promise<string | undefined>;
80
+ /**
81
+ * > 🚧 Requires partner key
82
+ * >
83
+ * > Organization endpoints are only accessible using [partner keys](https://docs.polytomic.com/reference/authentication#partner-keys)
84
+ * @throws {@link Polytomic.UnauthorizedError}
85
+ * @throws {@link Polytomic.NotFoundError}
86
+ * @throws {@link Polytomic.InternalServerError}
87
+ *
88
+ * @example
89
+ * await polytomic.organization.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
90
+ */
91
+ remove(id: string, requestOptions?: Organization.RequestOptions): Promise<void>;
92
+ protected _getAuthorizationHeader(): Promise<string>;
86
93
  }
@@ -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 Organization {
48
- constructor(_options = {}) {
48
+ constructor(_options) {
49
49
  this._options = _options;
50
50
  }
51
51
  /**
@@ -53,6 +53,7 @@ class Organization {
53
53
  * >
54
54
  * > Organization endpoints are only accessible using [partner keys](https://docs.polytomic.com/reference/authentication#partner-keys)
55
55
  * @throws {@link Polytomic.UnauthorizedError}
56
+ * @throws {@link Polytomic.InternalServerError}
56
57
  *
57
58
  * @example
58
59
  * await polytomic.organization.list()
@@ -65,12 +66,10 @@ class Organization {
65
66
  method: "GET",
66
67
  headers: {
67
68
  Authorization: yield this._getAuthorizationHeader(),
68
- "X-Polytomic-Version": (yield core.Supplier.get(this._options.xPolytomicVersion)) != null
69
- ? yield core.Supplier.get(this._options.xPolytomicVersion)
70
- : undefined,
69
+ "X-Polytomic-Version": "2024-02-08",
71
70
  "X-Fern-Language": "JavaScript",
72
71
  "X-Fern-SDK-Name": "polytomic",
73
- "X-Fern-SDK-Version": "0.1.2",
72
+ "X-Fern-SDK-Version": "0.2.0",
74
73
  "X-Fern-Runtime": core.RUNTIME.type,
75
74
  "X-Fern-Runtime-Version": core.RUNTIME.version,
76
75
  },
@@ -85,6 +84,8 @@ class Organization {
85
84
  switch (_response.error.statusCode) {
86
85
  case 401:
87
86
  throw new Polytomic.UnauthorizedError(_response.error.body);
87
+ case 500:
88
+ throw new Polytomic.InternalServerError(_response.error.body);
88
89
  default:
89
90
  throw new errors.PolytomicError({
90
91
  statusCode: _response.error.statusCode,
@@ -112,6 +113,8 @@ class Organization {
112
113
  * >
113
114
  * > Organization endpoints are only accessible using [partner keys](https://docs.polytomic.com/reference/authentication#partner-keys)
114
115
  * @throws {@link Polytomic.UnauthorizedError}
116
+ * @throws {@link Polytomic.UnprocessableEntityError}
117
+ * @throws {@link Polytomic.InternalServerError}
115
118
  *
116
119
  * @example
117
120
  * await polytomic.organization.create({
@@ -131,12 +134,10 @@ class Organization {
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": "0.2.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 Organization {
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,6 +184,7 @@ class Organization {
179
184
  * >
180
185
  * > Organization endpoints are only accessible using [partner keys](https://docs.polytomic.com/reference/authentication#partner-keys)
181
186
  * @throws {@link Polytomic.UnauthorizedError}
187
+ * @throws {@link Polytomic.NotFoundError}
182
188
  *
183
189
  * @example
184
190
  * await polytomic.organization.get("248df4b7-aa70-47b8-a036-33ac447e668d")
@@ -191,12 +197,10 @@ class Organization {
191
197
  method: "GET",
192
198
  headers: {
193
199
  Authorization: yield this._getAuthorizationHeader(),
194
- "X-Polytomic-Version": (yield core.Supplier.get(this._options.xPolytomicVersion)) != null
195
- ? yield core.Supplier.get(this._options.xPolytomicVersion)
196
- : undefined,
200
+ "X-Polytomic-Version": "2024-02-08",
197
201
  "X-Fern-Language": "JavaScript",
198
202
  "X-Fern-SDK-Name": "polytomic",
199
- "X-Fern-SDK-Version": "0.1.2",
203
+ "X-Fern-SDK-Version": "0.2.0",
200
204
  "X-Fern-Runtime": core.RUNTIME.type,
201
205
  "X-Fern-Runtime-Version": core.RUNTIME.version,
202
206
  },
@@ -211,6 +215,8 @@ class Organization {
211
215
  switch (_response.error.statusCode) {
212
216
  case 401:
213
217
  throw new Polytomic.UnauthorizedError(_response.error.body);
218
+ case 404:
219
+ throw new Polytomic.NotFoundError(_response.error.body);
214
220
  default:
215
221
  throw new errors.PolytomicError({
216
222
  statusCode: _response.error.statusCode,
@@ -238,38 +244,50 @@ class Organization {
238
244
  * >
239
245
  * > Organization endpoints are only accessible using [partner keys](https://docs.polytomic.com/reference/authentication#partner-keys)
240
246
  * @throws {@link Polytomic.UnauthorizedError}
247
+ * @throws {@link Polytomic.UnprocessableEntityError}
248
+ * @throws {@link Polytomic.InternalServerError}
241
249
  *
242
250
  * @example
243
- * await polytomic.organization.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
251
+ * await polytomic.organization.update("248df4b7-aa70-47b8-a036-33ac447e668d", {
252
+ * client_id: "client_id",
253
+ * client_secret: "client_secret",
254
+ * issuer: "https://example.com",
255
+ * name: "My Organization",
256
+ * sso_domain: "example.com",
257
+ * sso_org_id: "123456"
258
+ * })
244
259
  */
245
- remove(id, requestOptions) {
260
+ update(id, request, requestOptions) {
246
261
  var _a;
247
262
  return __awaiter(this, void 0, void 0, function* () {
248
263
  const _response = yield core.fetcher({
249
264
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${id}`),
250
- method: "DELETE",
265
+ method: "PUT",
251
266
  headers: {
252
267
  Authorization: yield this._getAuthorizationHeader(),
253
- "X-Polytomic-Version": (yield core.Supplier.get(this._options.xPolytomicVersion)) != null
254
- ? yield core.Supplier.get(this._options.xPolytomicVersion)
255
- : undefined,
268
+ "X-Polytomic-Version": "2024-02-08",
256
269
  "X-Fern-Language": "JavaScript",
257
270
  "X-Fern-SDK-Name": "polytomic",
258
- "X-Fern-SDK-Version": "0.1.2",
271
+ "X-Fern-SDK-Version": "0.2.0",
259
272
  "X-Fern-Runtime": core.RUNTIME.type,
260
273
  "X-Fern-Runtime-Version": core.RUNTIME.version,
261
274
  },
262
275
  contentType: "application/json",
276
+ body: request,
263
277
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
264
278
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
265
279
  });
266
280
  if (_response.ok) {
267
- return;
281
+ return _response.body;
268
282
  }
269
283
  if (_response.error.reason === "status-code") {
270
284
  switch (_response.error.statusCode) {
271
285
  case 401:
272
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);
273
291
  default:
274
292
  throw new errors.PolytomicError({
275
293
  statusCode: _response.error.statusCode,
@@ -297,46 +315,42 @@ class Organization {
297
315
  * >
298
316
  * > Organization endpoints are only accessible using [partner keys](https://docs.polytomic.com/reference/authentication#partner-keys)
299
317
  * @throws {@link Polytomic.UnauthorizedError}
318
+ * @throws {@link Polytomic.NotFoundError}
319
+ * @throws {@link Polytomic.InternalServerError}
300
320
  *
301
321
  * @example
302
- * await polytomic.organization.update("248df4b7-aa70-47b8-a036-33ac447e668d", {
303
- * client_id: "client_id",
304
- * client_secret: "client_secret",
305
- * issuer: "https://example.com",
306
- * name: "My Organization",
307
- * sso_domain: "example.com",
308
- * sso_org_id: "123456"
309
- * })
322
+ * await polytomic.organization.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
310
323
  */
311
- update(id, request, requestOptions) {
324
+ remove(id, requestOptions) {
312
325
  var _a;
313
326
  return __awaiter(this, void 0, void 0, function* () {
314
327
  const _response = yield core.fetcher({
315
328
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${id}`),
316
- method: "PATCH",
329
+ method: "DELETE",
317
330
  headers: {
318
331
  Authorization: yield this._getAuthorizationHeader(),
319
- "X-Polytomic-Version": (yield core.Supplier.get(this._options.xPolytomicVersion)) != null
320
- ? yield core.Supplier.get(this._options.xPolytomicVersion)
321
- : undefined,
332
+ "X-Polytomic-Version": "2024-02-08",
322
333
  "X-Fern-Language": "JavaScript",
323
334
  "X-Fern-SDK-Name": "polytomic",
324
- "X-Fern-SDK-Version": "0.1.2",
335
+ "X-Fern-SDK-Version": "0.2.0",
325
336
  "X-Fern-Runtime": core.RUNTIME.type,
326
337
  "X-Fern-Runtime-Version": core.RUNTIME.version,
327
338
  },
328
339
  contentType: "application/json",
329
- body: request,
330
340
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
331
341
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
332
342
  });
333
343
  if (_response.ok) {
334
- return _response.body;
344
+ return;
335
345
  }
336
346
  if (_response.error.reason === "status-code") {
337
347
  switch (_response.error.statusCode) {
338
348
  case 401:
339
349
  throw new Polytomic.UnauthorizedError(_response.error.body);
350
+ case 404:
351
+ throw new Polytomic.NotFoundError(_response.error.body);
352
+ case 500:
353
+ throw new Polytomic.InternalServerError(_response.error.body);
340
354
  default:
341
355
  throw new errors.PolytomicError({
342
356
  statusCode: _response.error.statusCode,
@@ -361,11 +375,7 @@ class Organization {
361
375
  }
362
376
  _getAuthorizationHeader() {
363
377
  return __awaiter(this, void 0, void 0, function* () {
364
- const bearer = yield core.Supplier.get(this._options.token);
365
- if (bearer != null) {
366
- return `Bearer ${bearer}`;
367
- }
368
- return undefined;
378
+ return `Bearer ${yield core.Supplier.get(this._options.token)}`;
369
379
  });
370
380
  }
371
381
  }
@@ -8,8 +8,7 @@ import { Roles } from "../resources/roles/client/Client";
8
8
  export declare namespace Permissions {
9
9
  interface Options {
10
10
  environment?: core.Supplier<environments.PolytomicEnvironment | string>;
11
- token?: core.Supplier<core.BearerToken | undefined>;
12
- xPolytomicVersion?: core.Supplier<"2023-04-25" | undefined>;
11
+ token: core.Supplier<core.BearerToken>;
13
12
  }
14
13
  interface RequestOptions {
15
14
  timeoutInSeconds?: number;
@@ -18,7 +17,7 @@ export declare namespace Permissions {
18
17
  }
19
18
  export declare class Permissions {
20
19
  protected readonly _options: Permissions.Options;
21
- constructor(_options?: Permissions.Options);
20
+ constructor(_options: Permissions.Options);
22
21
  protected _policies: Policies | undefined;
23
22
  get policies(): Policies;
24
23
  protected _roles: Roles | undefined;