@resolution/jira-api-client 0.4.6 → 0.5.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 (83) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +27 -4
  3. package/lib/index.d.ts +19 -2
  4. package/lib/index.js +27 -5
  5. package/lib/index.js.map +1 -1
  6. package/lib/openapi/platform/BaseJiraPlatformApiClient.d.ts +1 -1
  7. package/lib/openapi/platform/BaseJiraPlatformApiClient.js +1 -1
  8. package/lib/openapi/platform/services/DashboardsService.d.ts +7 -1
  9. package/lib/openapi/platform/services/DashboardsService.js +4 -1
  10. package/lib/openapi/platform/services/DashboardsService.js.map +1 -1
  11. package/lib/openapi/platform/services/IssueSearchService.d.ts +8 -1
  12. package/lib/openapi/platform/services/IssueSearchService.js +2 -1
  13. package/lib/openapi/platform/services/IssueSearchService.js.map +1 -1
  14. package/lib/openapi/platform/services/IssuesService.d.ts +8 -1
  15. package/lib/openapi/platform/services/IssuesService.js +2 -1
  16. package/lib/openapi/platform/services/IssuesService.js.map +1 -1
  17. package/lib/openapi/platform/services/PermissionsService.d.ts +7 -0
  18. package/lib/openapi/platform/services/PermissionsService.js +7 -0
  19. package/lib/openapi/platform/services/PermissionsService.js.map +1 -1
  20. package/lib/openapi/serviceManagement/BaseJiraServiceManagementApiClient.d.ts +46 -0
  21. package/lib/openapi/serviceManagement/BaseJiraServiceManagementApiClient.js +78 -0
  22. package/lib/openapi/serviceManagement/BaseJiraServiceManagementApiClient.js.map +1 -0
  23. package/lib/openapi/serviceManagement/core/CommonHttpClient.d.ts +196 -0
  24. package/lib/openapi/serviceManagement/core/CommonHttpClient.js +390 -0
  25. package/lib/openapi/serviceManagement/core/CommonHttpClient.js.map +1 -0
  26. package/lib/openapi/serviceManagement/core/CommonHttpService.d.ts +9 -0
  27. package/lib/openapi/serviceManagement/core/CommonHttpService.js +29 -0
  28. package/lib/openapi/serviceManagement/core/CommonHttpService.js.map +1 -0
  29. package/lib/openapi/serviceManagement/core/CommonValidationSchemaStorage.d.ts +35 -0
  30. package/lib/openapi/serviceManagement/core/CommonValidationSchemaStorage.js +65 -0
  31. package/lib/openapi/serviceManagement/core/CommonValidationSchemaStorage.js.map +1 -0
  32. package/lib/openapi/serviceManagement/models/assets.d.ts +54 -0
  33. package/lib/openapi/serviceManagement/models/assets.js +60 -0
  34. package/lib/openapi/serviceManagement/models/assets.js.map +1 -0
  35. package/lib/openapi/serviceManagement/models/common.d.ts +228 -0
  36. package/lib/openapi/serviceManagement/models/common.js +172 -0
  37. package/lib/openapi/serviceManagement/models/common.js.map +1 -0
  38. package/lib/openapi/serviceManagement/models/customer.d.ts +30 -0
  39. package/lib/openapi/serviceManagement/models/customer.js +27 -0
  40. package/lib/openapi/serviceManagement/models/customer.js.map +1 -0
  41. package/lib/openapi/serviceManagement/models/info.d.ts +18 -0
  42. package/lib/openapi/serviceManagement/models/info.js +24 -0
  43. package/lib/openapi/serviceManagement/models/info.js.map +1 -0
  44. package/lib/openapi/serviceManagement/models/knowledgebase.d.ts +24 -0
  45. package/lib/openapi/serviceManagement/models/knowledgebase.js +32 -0
  46. package/lib/openapi/serviceManagement/models/knowledgebase.js.map +1 -0
  47. package/lib/openapi/serviceManagement/models/organization.d.ts +76 -0
  48. package/lib/openapi/serviceManagement/models/organization.js +65 -0
  49. package/lib/openapi/serviceManagement/models/organization.js.map +1 -0
  50. package/lib/openapi/serviceManagement/models/request.d.ts +594 -0
  51. package/lib/openapi/serviceManagement/models/request.js +516 -0
  52. package/lib/openapi/serviceManagement/models/request.js.map +1 -0
  53. package/lib/openapi/serviceManagement/models/servicedesk.d.ts +525 -0
  54. package/lib/openapi/serviceManagement/models/servicedesk.js +442 -0
  55. package/lib/openapi/serviceManagement/models/servicedesk.js.map +1 -0
  56. package/lib/openapi/serviceManagement/services/AssetsService.d.ts +61 -0
  57. package/lib/openapi/serviceManagement/services/AssetsService.js +113 -0
  58. package/lib/openapi/serviceManagement/services/AssetsService.js.map +1 -0
  59. package/lib/openapi/serviceManagement/services/CustomerService.d.ts +63 -0
  60. package/lib/openapi/serviceManagement/services/CustomerService.js +93 -0
  61. package/lib/openapi/serviceManagement/services/CustomerService.js.map +1 -0
  62. package/lib/openapi/serviceManagement/services/InfoService.d.ts +34 -0
  63. package/lib/openapi/serviceManagement/services/InfoService.js +71 -0
  64. package/lib/openapi/serviceManagement/services/InfoService.js.map +1 -0
  65. package/lib/openapi/serviceManagement/services/KnowledgebaseService.d.ts +81 -0
  66. package/lib/openapi/serviceManagement/services/KnowledgebaseService.js +106 -0
  67. package/lib/openapi/serviceManagement/services/KnowledgebaseService.js.map +1 -0
  68. package/lib/openapi/serviceManagement/services/OrganizationService.d.ts +589 -0
  69. package/lib/openapi/serviceManagement/services/OrganizationService.js +762 -0
  70. package/lib/openapi/serviceManagement/services/OrganizationService.js.map +1 -0
  71. package/lib/openapi/serviceManagement/services/RequestService.d.ts +2736 -0
  72. package/lib/openapi/serviceManagement/services/RequestService.js +3056 -0
  73. package/lib/openapi/serviceManagement/services/RequestService.js.map +1 -0
  74. package/lib/openapi/serviceManagement/services/RequesttypeService.d.ts +166 -0
  75. package/lib/openapi/serviceManagement/services/RequesttypeService.js +190 -0
  76. package/lib/openapi/serviceManagement/services/RequesttypeService.js.map +1 -0
  77. package/lib/openapi/serviceManagement/services/ServicedeskService.d.ts +1268 -0
  78. package/lib/openapi/serviceManagement/services/ServicedeskService.js +1510 -0
  79. package/lib/openapi/serviceManagement/services/ServicedeskService.js.map +1 -0
  80. package/lib/openapi/serviceManagement/validationSchemaStorage.d.ts +3 -0
  81. package/lib/openapi/serviceManagement/validationSchemaStorage.js +144 -0
  82. package/lib/openapi/serviceManagement/validationSchemaStorage.js.map +1 -0
  83. package/package.json +3 -3
@@ -0,0 +1,390 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __rest = (this && this.__rest) || function (s, e) {
12
+ var t = {};
13
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
+ t[p] = s[p];
15
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
+ t[p[i]] = s[p[i]];
19
+ }
20
+ return t;
21
+ };
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ exports.CommonHttpClient = exports.createClientWithServices = exports.discardResult = exports.castResponse = exports.getBody = exports.asCreatedResponse = exports.isJsonMediaType = exports.checkReponseMediaType = exports.CommonHttpClientError = void 0;
24
+ class CommonHttpClientError extends Error {
25
+ constructor(url, request, response, options, message) {
26
+ super(message);
27
+ this.name = "OpenApiClientError";
28
+ this.url = url;
29
+ this.request = request;
30
+ this.response = response;
31
+ this.options = options;
32
+ }
33
+ }
34
+ exports.CommonHttpClientError = CommonHttpClientError;
35
+ const jsonContentTypeRegExp = /^application\/(\w+\+)?json/;
36
+ function readableStreamToBlob(stream) {
37
+ const chunks = [];
38
+ const reader = stream.getReader();
39
+ return new Promise((resolve, reject) => {
40
+ reader.read().then(function process({ done, value }) {
41
+ if (value) {
42
+ chunks.push(value);
43
+ }
44
+ if (done) {
45
+ resolve(new Blob(chunks));
46
+ return;
47
+ }
48
+ reader.read().then(process, reject);
49
+ }, reject);
50
+ });
51
+ }
52
+ function convertResponseBody(body, destType) {
53
+ return __awaiter(this, void 0, void 0, function* () {
54
+ if (body.type === destType) {
55
+ return body;
56
+ }
57
+ if (body.type === "json") {
58
+ const blob = new Blob([JSON.stringify(body.data)]);
59
+ if (destType === "blob") {
60
+ return {
61
+ type: "blob",
62
+ data: blob,
63
+ };
64
+ }
65
+ else if (destType === "readableStream") {
66
+ return {
67
+ type: "readableStream",
68
+ data: blob.stream(),
69
+ };
70
+ }
71
+ else {
72
+ throw new Error("Invalid destination type.");
73
+ }
74
+ }
75
+ if (body.type === "blob") {
76
+ if (destType === "json") {
77
+ return {
78
+ type: "json",
79
+ data: JSON.parse(yield body.data.text()),
80
+ };
81
+ }
82
+ else if (destType === "readableStream") {
83
+ return {
84
+ type: "readableStream",
85
+ data: body.data.stream(),
86
+ };
87
+ }
88
+ else {
89
+ throw new Error("Invalid destination type.");
90
+ }
91
+ }
92
+ if (body.type === "readableStream") {
93
+ if (destType === "json") {
94
+ return {
95
+ type: "json",
96
+ data: JSON.parse(yield (yield readableStreamToBlob(body.data)).text()),
97
+ };
98
+ }
99
+ else if (destType === "blob") {
100
+ return {
101
+ type: "blob",
102
+ data: yield readableStreamToBlob(body.data),
103
+ };
104
+ }
105
+ else {
106
+ throw new Error("Invalid destination type.");
107
+ }
108
+ }
109
+ throw new Error("Invalid response body type.");
110
+ });
111
+ }
112
+ function checkReponseMediaType(response, mediaType) {
113
+ return response.mediaType === mediaType;
114
+ }
115
+ exports.checkReponseMediaType = checkReponseMediaType;
116
+ function isJsonMediaType(mediaType) {
117
+ return Boolean(mediaType.match(jsonContentTypeRegExp));
118
+ }
119
+ exports.isJsonMediaType = isJsonMediaType;
120
+ function asCreatedResponse(...keys) {
121
+ var _a;
122
+ const keyCreated = keys[0];
123
+ const keyOther = (_a = keys[1]) !== null && _a !== void 0 ? _a : keyCreated;
124
+ return (response) => {
125
+ if (response.status === 201) {
126
+ return {
127
+ created: true,
128
+ [keyCreated]: response.body,
129
+ };
130
+ }
131
+ else {
132
+ return {
133
+ created: false,
134
+ [keyOther]: response.body,
135
+ };
136
+ }
137
+ };
138
+ }
139
+ exports.asCreatedResponse = asCreatedResponse;
140
+ const getBody = ({ body }) => body;
141
+ exports.getBody = getBody;
142
+ const castResponse = () => (response) => response;
143
+ exports.castResponse = castResponse;
144
+ const discardResult = () => { };
145
+ exports.discardResult = discardResult;
146
+ function createClientWithServices(services, options) {
147
+ const client = new this(options);
148
+ const extension = {};
149
+ for (const serviceName in services) {
150
+ if (Object.prototype.hasOwnProperty.call(services, serviceName)) {
151
+ extension[serviceName
152
+ .replace(/[^\b]Service$/, "")
153
+ .replace(/^\w/, (s) => s.toLowerCase())] = new services[serviceName](client.getClient());
154
+ }
155
+ }
156
+ return Object.assign(client, extension);
157
+ }
158
+ exports.createClientWithServices = createClientWithServices;
159
+ function getErrorMessage(e) {
160
+ return e instanceof Error ? e.message : String(e);
161
+ }
162
+ class CommonHttpClient {
163
+ constructor(options) {
164
+ this.options = options;
165
+ }
166
+ setOptions(options) {
167
+ this.options = options;
168
+ }
169
+ getOptions() {
170
+ return this.options;
171
+ }
172
+ getSearchParams(params) {
173
+ const result = new URLSearchParams();
174
+ const process = (key, value) => {
175
+ if (value !== undefined && value !== null) {
176
+ if (Array.isArray(value)) {
177
+ for (const arrayVal of value) {
178
+ process(key, arrayVal);
179
+ }
180
+ }
181
+ else if (typeof value === "object") {
182
+ for (const [subKey, subValue] of Object.entries(params)) {
183
+ process(`${key}[${subKey}]`, subValue);
184
+ }
185
+ }
186
+ else {
187
+ result.append(key, String(value));
188
+ }
189
+ }
190
+ };
191
+ for (const [key, value] of Object.entries(params)) {
192
+ process(key, value);
193
+ }
194
+ return result;
195
+ }
196
+ buildUrlPath(request) {
197
+ const pathParams = request.pathParams;
198
+ if (pathParams) {
199
+ return request.path.replace(/\{(.*?)}/g, (original, paramName) => {
200
+ if (Object.prototype.hasOwnProperty.call(pathParams, paramName)) {
201
+ return encodeURI(String(pathParams[paramName]));
202
+ }
203
+ return original;
204
+ });
205
+ }
206
+ return request.path;
207
+ }
208
+ buildUrl(request) {
209
+ const url = new URL(this.buildUrlPath(request).replace(/^\//, ""), this.options.baseUrl.replace(/\/?$/, "/"));
210
+ if (request.query) {
211
+ for (const [key, value] of this.getSearchParams(request.query)) {
212
+ url.searchParams.append(key, value);
213
+ }
214
+ }
215
+ return url;
216
+ }
217
+ fetch(url, request) {
218
+ var _a;
219
+ return __awaiter(this, void 0, void 0, function* () {
220
+ const requestProps = __rest(request, []);
221
+ const requestInit = requestProps;
222
+ const response = yield fetch(url, requestInit);
223
+ const body = isJsonMediaType((_a = response.headers.get("content-type")) !== null && _a !== void 0 ? _a : "")
224
+ ? {
225
+ type: "json",
226
+ data: yield response.json(),
227
+ }
228
+ : {
229
+ type: "blob",
230
+ data: yield response.blob(),
231
+ };
232
+ const headers = {};
233
+ response.headers.forEach((value, key) => {
234
+ headers[key] = value;
235
+ });
236
+ if (response.headers.has("set-cookie") &&
237
+ "getSetCookie" in response.headers) {
238
+ headers["set-cookie"] = response.headers.getSetCookie();
239
+ }
240
+ return {
241
+ status: response.status,
242
+ statusText: response.statusText,
243
+ body,
244
+ url: response.url,
245
+ headers,
246
+ ok: response.ok,
247
+ customRequestProps: request.customRequestProps,
248
+ };
249
+ });
250
+ }
251
+ request(request) {
252
+ return __awaiter(this, void 0, void 0, function* () {
253
+ try {
254
+ request = yield this.preprocessRequest(request);
255
+ }
256
+ catch (e) {
257
+ let url;
258
+ try {
259
+ url = this.buildUrl(request);
260
+ }
261
+ catch (e) {
262
+ throw new this.options.errorClass(new URL(request.path, this.options.baseUrl), undefined, undefined, this.options, `Error building request URL: ${getErrorMessage(e)}`);
263
+ }
264
+ throw new this.options.errorClass(url, undefined, undefined, this.options, `preprocessRequest error: ${getErrorMessage(e)}`);
265
+ }
266
+ let url;
267
+ try {
268
+ url = this.buildUrl(request);
269
+ }
270
+ catch (e) {
271
+ throw new this.options.errorClass(new URL(request.path, this.options.baseUrl), undefined, undefined, this.options, `Error building request URL: ${getErrorMessage(e)}`);
272
+ }
273
+ const { body, path: _path, pathParams: _pathParams, query: _query, headers: requestHeaders, cache, credentials, redirect } = request, otherRequestProps = __rest(request, ["body", "path", "pathParams", "query", "headers", "cache", "credentials", "redirect"]);
274
+ const headers = this.cleanupHeaders(requestHeaders);
275
+ const fetchRequest = Object.assign(Object.assign({}, otherRequestProps), { headers, cache: cache !== null && cache !== void 0 ? cache : "default", credentials: credentials !== null && credentials !== void 0 ? credentials : "same-origin", redirect: redirect !== null && redirect !== void 0 ? redirect : "follow", body: this.getRequestBody(request) });
276
+ let fetchResponse;
277
+ try {
278
+ if (this.options.fetch) {
279
+ fetchResponse = yield this.options.fetch(url, fetchRequest);
280
+ }
281
+ else {
282
+ fetchResponse = yield this.fetch(url, fetchRequest);
283
+ }
284
+ }
285
+ catch (e) {
286
+ throw new this.options.errorClass(url, fetchRequest, undefined, this.options, getErrorMessage(e));
287
+ }
288
+ if (this.options.preprocessFetchResponse) {
289
+ try {
290
+ fetchResponse = yield this.options.preprocessFetchResponse(fetchResponse, fetchRequest);
291
+ }
292
+ catch (e) {
293
+ throw new this.options.errorClass(url, fetchRequest, fetchResponse, this.options, `preprocessFetchResponse error: ${getErrorMessage(e)}`);
294
+ }
295
+ }
296
+ if (!fetchResponse.ok) {
297
+ throw new this.options.errorClass(url, fetchRequest, fetchResponse, this.options, this.options.formatHttpErrorMessage
298
+ ? this.options.formatHttpErrorMessage(fetchResponse, fetchRequest)
299
+ : `HTTP Error ${fetchResponse.status} (${fetchResponse.statusText})`);
300
+ }
301
+ return fetchResponse;
302
+ });
303
+ }
304
+ responseHandler(distribution) {
305
+ return (response) => __awaiter(this, void 0, void 0, function* () {
306
+ var _a;
307
+ const body = response.body;
308
+ const contentType = response.headers["content-type"];
309
+ const mediaType = contentType
310
+ ? contentType.replace(/;.*$/, "")
311
+ : undefined;
312
+ const mediaTypes = (_a = distribution[response.status]) !== null && _a !== void 0 ? _a : {};
313
+ let destType;
314
+ if (mediaType) {
315
+ destType = mediaTypes[mediaType];
316
+ if (!destType) {
317
+ destType = mediaTypes[mediaType.replace(/\/.*$/, "/*")];
318
+ }
319
+ if (!destType) {
320
+ destType = mediaTypes[mediaType.replace(/^.*\//, "*/")];
321
+ }
322
+ if (!destType) {
323
+ destType = mediaTypes["*/*"];
324
+ }
325
+ }
326
+ else {
327
+ destType = mediaTypes["*/*"];
328
+ }
329
+ if (!destType) {
330
+ let binaryBody;
331
+ try {
332
+ binaryBody = yield convertResponseBody(body, this.options.binaryResponseType);
333
+ }
334
+ catch (e) {
335
+ throw new this.options.errorClass(new URL(response.url), undefined, response, this.options, `Error converting response body: ${getErrorMessage(e)}`);
336
+ }
337
+ return {
338
+ mediaType,
339
+ status: response.status,
340
+ body: binaryBody,
341
+ response,
342
+ };
343
+ }
344
+ try {
345
+ const convertedBody = yield convertResponseBody(body, destType);
346
+ return {
347
+ mediaType,
348
+ status: response.status,
349
+ body: convertedBody.data,
350
+ response,
351
+ };
352
+ }
353
+ catch (e) {
354
+ throw new this.options.errorClass(new URL(response.url), undefined, response, this.options, `Error converting response body: ${getErrorMessage(e)}`);
355
+ }
356
+ });
357
+ }
358
+ cleanupHeaders(headers) {
359
+ if (headers === undefined) {
360
+ return {};
361
+ }
362
+ return Object.fromEntries(Object.entries(headers !== null && headers !== void 0 ? headers : {})
363
+ .filter((header) => header[1] !== undefined && header[1] !== null)
364
+ .map(([key, value]) => [key.toLowerCase(), value]));
365
+ }
366
+ getRequestBody(request) {
367
+ var _a;
368
+ if (request.body === undefined) {
369
+ return undefined;
370
+ }
371
+ for (const [key, value] of Object.entries((_a = request.headers) !== null && _a !== void 0 ? _a : {})) {
372
+ if (key.toLowerCase() === "content-type" &&
373
+ value &&
374
+ isJsonMediaType(value)) {
375
+ return JSON.stringify(request.body);
376
+ }
377
+ }
378
+ return request.body;
379
+ }
380
+ preprocessRequest(request) {
381
+ return __awaiter(this, void 0, void 0, function* () {
382
+ const requestWithHeaders = Object.assign(Object.assign({}, request), { headers: Object.assign(Object.assign({}, this.options.headers), this.cleanupHeaders(request.headers)) });
383
+ return this.options.preprocessRequest
384
+ ? this.options.preprocessRequest(requestWithHeaders)
385
+ : requestWithHeaders;
386
+ });
387
+ }
388
+ }
389
+ exports.CommonHttpClient = CommonHttpClient;
390
+ //# sourceMappingURL=CommonHttpClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommonHttpClient.js","sourceRoot":"","sources":["../../../../src/openapi/serviceManagement/core/CommonHttpClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA6KA,MAAa,qBAAsB,SAAQ,KAAK;IAK9C,YACE,GAAQ,EACR,OAAiD,EACjD,QAAmD,EACnD,OAA4C,EAC5C,OAAe;QAEf,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;QACjC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF;AAnBD,sDAmBC;AACD,MAAM,qBAAqB,GAAG,4BAA4B,CAAC;AAC3D,SAAS,oBAAoB,CAC3B,MAAkC;IAElC,MAAM,MAAM,GAAiB,EAAE,CAAC;IAChC,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;IAClC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,SAAS,OAAO,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE;YACjD,IAAI,KAAK,EAAE,CAAC;gBACV,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC;YACD,IAAI,IAAI,EAAE,CAAC;gBACT,OAAO,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;gBAC1B,OAAO;YACT,CAAC;YAC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AAC,OAAO,CAAC,iBAAiB,CAAC,kBAAkB,CAAC;gBACpD,CAAC,CAAC,kBAAkB,CAAC;QACzB,CAAC;KAAA;CACF;AAlUD,4CAkUC"}
@@ -0,0 +1,9 @@
1
+ import type * as commonHttpClient from "./CommonHttpClient";
2
+ export declare class CommonHttpService {
3
+ protected serviceInstancesMap: Map<new (getClientInstance: () => commonHttpClient.CommonHttpClient) => CommonHttpService, CommonHttpService>;
4
+ protected getServiceInstance<T extends CommonHttpService>(serviceClass: new (getClientInstance: () => commonHttpClient.CommonHttpClient) => T): T;
5
+ protected getClientInstance: () => commonHttpClient.CommonHttpClient;
6
+ constructor(getClientInstance: () => commonHttpClient.CommonHttpClient);
7
+ protected static initialized: boolean | undefined;
8
+ protected static initialize: (() => void) | undefined;
9
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CommonHttpService = void 0;
4
+ class CommonHttpService {
5
+ getServiceInstance(serviceClass) {
6
+ let serviceInstance = this.serviceInstancesMap.get(serviceClass);
7
+ if (!serviceInstance) {
8
+ serviceInstance = new serviceClass(this.getClientInstance);
9
+ this.serviceInstancesMap.set(serviceClass, serviceInstance);
10
+ }
11
+ return serviceInstance;
12
+ }
13
+ constructor(getClientInstance) {
14
+ this.serviceInstancesMap = new Map();
15
+ this.getClientInstance = () => {
16
+ const classInstance = this.constructor;
17
+ if (classInstance.initialized !== true) {
18
+ classInstance.initialized = true;
19
+ if (classInstance.initialize !== undefined) {
20
+ classInstance.initialize();
21
+ }
22
+ }
23
+ this.getClientInstance = getClientInstance;
24
+ return getClientInstance();
25
+ };
26
+ }
27
+ }
28
+ exports.CommonHttpService = CommonHttpService;
29
+ //# sourceMappingURL=CommonHttpService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommonHttpService.js","sourceRoot":"","sources":["../../../../src/openapi/serviceManagement/core/CommonHttpService.ts"],"names":[],"mappings":";;;AAIA,MAAa,iBAAiB;IAOlB,kBAAkB,CAC1B,YAEM;QAEN,IAAI,eAAe,GAAG,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACjE,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,eAAe,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;YAC3D,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;QAC9D,CAAC;QACD,OAAO,eAAoB,CAAC;IAC9B,CAAC;IAED,YAAY,iBAA0D;QAnB5D,wBAAmB,GAKzB,IAAI,GAAG,EAAE,CAAC;QAeZ,IAAI,CAAC,iBAAiB,GAAG,GAAG,EAAE;YAC5B,MAAM,aAAa,GAAG,IAAI,CAAC,WAAuC,CAAC;YACnE,IAAI,aAAa,CAAC,WAAW,KAAK,IAAI,EAAE,CAAC;gBACvC,aAAa,CAAC,WAAW,GAAG,IAAI,CAAC;gBACjC,IAAI,aAAa,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;oBAC3C,aAAa,CAAC,UAAU,EAAE,CAAC;gBAC7B,CAAC;YACH,CAAC;YACD,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;YAC3C,OAAO,iBAAiB,EAAE,CAAC;QAC7B,CAAC,CAAC;IACJ,CAAC;CAGF;AAnCD,8CAmCC"}
@@ -0,0 +1,35 @@
1
+ import { type CommonHttpClientFetchResponse, type CommonHttpClientOptions } from "./CommonHttpClient";
2
+ type CommonValidationSchemaStorageAssertDataShape<T> = <D>(schema: T, data: D) => void;
3
+ type RegisterOnceCallback<T> = (validationSchemaStorage: CommonValidationSchemaStorage<T>) => void;
4
+ type CommonValidationSchemaStorageMakeExtensible<T> = (schema: T) => T;
5
+ type CommonValidationSchemaStorageFormatErrorMessage<T> = (error: Error, schema: T) => string;
6
+ type CommonValidationSchemaStorageLazyGetter<T> = (callback: () => T) => T;
7
+ export declare class CommonValidationSchemaStorage<T> {
8
+ protected assertDataShape: CommonValidationSchemaStorageAssertDataShape<T>;
9
+ protected makeExtensible: CommonValidationSchemaStorageMakeExtensible<T>;
10
+ protected schemas: Record<string, T>;
11
+ protected registeredCallbacks: Set<RegisterOnceCallback<T>>;
12
+ protected errorClass: CommonHttpClientOptions["errorClass"];
13
+ protected formatErrorMessage: CommonValidationSchemaStorageFormatErrorMessage<T>;
14
+ protected lazyGetter: CommonValidationSchemaStorageLazyGetter<T>;
15
+ constructor({ assertDataShape, makeExtensible, formatErrorMessage, lazyGetter, }: {
16
+ assertDataShape: CommonValidationSchemaStorageAssertDataShape<T>;
17
+ makeExtensible: CommonValidationSchemaStorageMakeExtensible<T>;
18
+ formatErrorMessage: CommonValidationSchemaStorageFormatErrorMessage<T>;
19
+ lazyGetter: CommonValidationSchemaStorageLazyGetter<T>;
20
+ });
21
+ register(key: string, schema: T): void;
22
+ registerExtensible(key: string, schema: T): void;
23
+ registerOnce(callbacks: RegisterOnceCallback<T>[]): void;
24
+ get(key: string): T;
25
+ lazy(key: string): T;
26
+ validator<D extends {
27
+ mediaType: string;
28
+ status: number;
29
+ body: unknown;
30
+ response: CommonHttpClientFetchResponse;
31
+ }>(key: string): (data: D) => D;
32
+ getErrorClass(): new (url: URL, request: import("./CommonHttpClient").CommonHttpClientFetchRequest | undefined, response: CommonHttpClientFetchResponse | undefined, options: CommonHttpClientOptions | undefined, message: string) => Error;
33
+ setErrorClass(errorClass: CommonHttpClientOptions["errorClass"]): void;
34
+ }
35
+ export {};
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CommonValidationSchemaStorage = void 0;
4
+ // DO NOT EDIT!
5
+ // This file is generated by "api-typescript-generator".
6
+ // To update this file run "yarn build:openapi".
7
+ const CommonHttpClient_1 = require("./CommonHttpClient");
8
+ class CommonValidationSchemaStorage {
9
+ constructor({ assertDataShape, makeExtensible, formatErrorMessage, lazyGetter, }) {
10
+ this.schemas = {};
11
+ this.registeredCallbacks = new Set();
12
+ this.errorClass = CommonHttpClient_1.CommonHttpClientError;
13
+ this.assertDataShape = assertDataShape;
14
+ this.makeExtensible = makeExtensible;
15
+ this.formatErrorMessage = formatErrorMessage;
16
+ this.lazyGetter = lazyGetter;
17
+ }
18
+ register(key, schema) {
19
+ this.schemas[key] = schema;
20
+ }
21
+ registerExtensible(key, schema) {
22
+ this.schemas[key] = this.makeExtensible(schema);
23
+ }
24
+ registerOnce(callbacks) {
25
+ for (const callback of callbacks) {
26
+ if (!this.registeredCallbacks.has(callback)) {
27
+ this.registeredCallbacks.add(callback);
28
+ callback(this);
29
+ }
30
+ }
31
+ }
32
+ get(key) {
33
+ return this.schemas[key];
34
+ }
35
+ lazy(key) {
36
+ return this.lazyGetter(() => this.schemas[key]);
37
+ }
38
+ validator(key) {
39
+ return (data) => {
40
+ const schema = this.schemas[key];
41
+ if (schema === undefined) {
42
+ throw new Error(`Schema with key "${key}" not found`);
43
+ }
44
+ if (data.mediaType !== undefined && (0, CommonHttpClient_1.isJsonMediaType)(data.mediaType)) {
45
+ try {
46
+ this.assertDataShape(schema, data);
47
+ }
48
+ catch (error) {
49
+ throw new this.errorClass(new URL(data.response.url), undefined, data.response, undefined, error instanceof Error
50
+ ? this.formatErrorMessage(error, schema)
51
+ : String(error));
52
+ }
53
+ }
54
+ return data;
55
+ };
56
+ }
57
+ getErrorClass() {
58
+ return this.errorClass;
59
+ }
60
+ setErrorClass(errorClass) {
61
+ this.errorClass = errorClass;
62
+ }
63
+ }
64
+ exports.CommonValidationSchemaStorage = CommonValidationSchemaStorage;
65
+ //# sourceMappingURL=CommonValidationSchemaStorage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommonValidationSchemaStorage.js","sourceRoot":"","sources":["../../../../src/openapi/serviceManagement/core/CommonValidationSchemaStorage.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,yDAK4B;AAc5B,MAAa,6BAA6B;IASxC,YA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AG,CAAC,CAAC;YACjC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBACzB,MAAM,IAAI,KAAK,CAAC,oBAAoB,GAAG,aAAa,CAAC,CAAC;YACxD,CAAC;YACD,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,IAAI,IAAA,kCAAe,EAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;gBACpE,IAAI,CAAC;oBACH,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;gBACrC,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,MAAM,IAAI,IAAI,CAAC,UAAU,CACvB,IAAI,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAC1B,SAAS,EACT,IAAI,CAAC,QAAQ,EACb,SAAS,EACT,KAAK,YAAY,KAAK;wBACpB,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC;wBACxC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAClB,CAAC;gBACJ,CAAC;YACH,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC;IACJ,CAAC;IACD,aAAa;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IACD,aAAa,CAAC,UAAiD;QAC7D,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF;AAlFD,sEAkFC"}
@@ -0,0 +1,54 @@
1
+ import { type ZodTypeAny } from "zod";
2
+ import type { CommonValidationSchemaStorage } from "../core/CommonValidationSchemaStorage";
3
+ import { type PagedLinkDto } from "./common";
4
+ /** Details of an Assets workspace ID. */
5
+ export interface AssetsWorkspaceDto {
6
+ /** The workspace ID used as the identifier to access the Assets REST API. */
7
+ workspaceId?: string;
8
+ }
9
+ export interface I18nErrorMessage {
10
+ i18nKey?: string;
11
+ parameters?: string[];
12
+ }
13
+ /** Details of an insight workspace ID. */
14
+ export interface InsightWorkspaceDto {
15
+ /** The workspace ID used as the identifier to access the Insight REST API. */
16
+ workspaceId?: string;
17
+ }
18
+ export interface PagedDtoAssetsWorkspaceDto {
19
+ _expands?: string[];
20
+ /** List of the links relating to the page. */
21
+ _links?: PagedLinkDto;
22
+ /** Indicates if this is the last page of records (true) or not (false). */
23
+ isLastPage?: boolean;
24
+ /**
25
+ * Number of items to be returned per page, up to the maximum set for these
26
+ * objects in the current implementation.
27
+ */
28
+ limit?: number;
29
+ /** Number of items returned in the page. */
30
+ size?: number;
31
+ /** Index of the first item returned in the page. */
32
+ start?: number;
33
+ /** Details of the items included in the page. */
34
+ values?: AssetsWorkspaceDto[];
35
+ }
36
+ export interface PagedDtoInsightWorkspaceDto {
37
+ _expands?: string[];
38
+ /** List of the links relating to the page. */
39
+ _links?: PagedLinkDto;
40
+ /** Indicates if this is the last page of records (true) or not (false). */
41
+ isLastPage?: boolean;
42
+ /**
43
+ * Number of items to be returned per page, up to the maximum set for these
44
+ * objects in the current implementation.
45
+ */
46
+ limit?: number;
47
+ /** Number of items returned in the page. */
48
+ size?: number;
49
+ /** Index of the first item returned in the page. */
50
+ start?: number;
51
+ /** Details of the items included in the page. */
52
+ values?: InsightWorkspaceDto[];
53
+ }
54
+ export declare function registerAssetsValidationSchemas(validationSchemaStorage: CommonValidationSchemaStorage<ZodTypeAny>): void;