@digital8/security-registers-backend-ts-sdk 0.0.848 → 0.0.849

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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @digital8/security-registers-backend-ts-sdk@0.0.848
1
+ ## @digital8/security-registers-backend-ts-sdk@0.0.849
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @digital8/security-registers-backend-ts-sdk@0.0.848 --save
39
+ npm install @digital8/security-registers-backend-ts-sdk@0.0.849 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -115,6 +115,11 @@ export interface IncidentsUpdateTitleOperationRequest {
115
115
  export interface IncidentsVersionsRequest {
116
116
  incident: number;
117
117
  }
118
+ export interface IncidentsVersionsExportPdfRequest {
119
+ incident: number;
120
+ version: number;
121
+ incidentsExportPdfRequest?: IncidentsExportPdfRequest;
122
+ }
118
123
  export interface IncidentsVersionsShowRequest {
119
124
  incident: number;
120
125
  version: number;
@@ -648,6 +653,14 @@ export declare class GeneralApi extends runtime.BaseAPI {
648
653
  * Auto-generated: incidents.versions
649
654
  */
650
655
  incidentsVersions(requestParameters: IncidentsVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentVersionResourceArrayResponse>;
656
+ /**
657
+ * Auto-generated: incidents.versions.exportPdf
658
+ */
659
+ incidentsVersionsExportPdfRaw(requestParameters: IncidentsVersionsExportPdfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExportQueuedResource>>;
660
+ /**
661
+ * Auto-generated: incidents.versions.exportPdf
662
+ */
663
+ incidentsVersionsExportPdf(requestParameters: IncidentsVersionsExportPdfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExportQueuedResource>;
651
664
  /**
652
665
  * Auto-generated: incidents.versions.show
653
666
  */
@@ -2019,6 +2019,68 @@ var GeneralApi = /** @class */ (function (_super) {
2019
2019
  });
2020
2020
  });
2021
2021
  };
2022
+ /**
2023
+ * Auto-generated: incidents.versions.exportPdf
2024
+ */
2025
+ GeneralApi.prototype.incidentsVersionsExportPdfRaw = function (requestParameters, initOverrides) {
2026
+ return __awaiter(this, void 0, void 0, function () {
2027
+ var queryParameters, headerParameters, token, tokenString, urlPath, response;
2028
+ return __generator(this, function (_a) {
2029
+ switch (_a.label) {
2030
+ case 0:
2031
+ if (requestParameters['incident'] == null) {
2032
+ throw new runtime.RequiredError('incident', 'Required parameter "incident" was null or undefined when calling incidentsVersionsExportPdf().');
2033
+ }
2034
+ if (requestParameters['version'] == null) {
2035
+ throw new runtime.RequiredError('version', 'Required parameter "version" was null or undefined when calling incidentsVersionsExportPdf().');
2036
+ }
2037
+ queryParameters = {};
2038
+ headerParameters = {};
2039
+ headerParameters['Content-Type'] = 'application/json';
2040
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
2041
+ token = this.configuration.accessToken;
2042
+ return [4 /*yield*/, token("bearerAuth", [])];
2043
+ case 1:
2044
+ tokenString = _a.sent();
2045
+ if (tokenString) {
2046
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
2047
+ }
2048
+ _a.label = 2;
2049
+ case 2:
2050
+ urlPath = "/api/incidents/{incident}/versions/{version}/export-pdf";
2051
+ urlPath = urlPath.replace("{".concat("incident", "}"), encodeURIComponent(String(requestParameters['incident'])));
2052
+ urlPath = urlPath.replace("{".concat("version", "}"), encodeURIComponent(String(requestParameters['version'])));
2053
+ return [4 /*yield*/, this.request({
2054
+ path: urlPath,
2055
+ method: 'POST',
2056
+ headers: headerParameters,
2057
+ query: queryParameters,
2058
+ body: (0, index_1.IncidentsExportPdfRequestToJSON)(requestParameters['incidentsExportPdfRequest']),
2059
+ }, initOverrides)];
2060
+ case 3:
2061
+ response = _a.sent();
2062
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ExportQueuedResourceFromJSON)(jsonValue); })];
2063
+ }
2064
+ });
2065
+ });
2066
+ };
2067
+ /**
2068
+ * Auto-generated: incidents.versions.exportPdf
2069
+ */
2070
+ GeneralApi.prototype.incidentsVersionsExportPdf = function (requestParameters, initOverrides) {
2071
+ return __awaiter(this, void 0, void 0, function () {
2072
+ var response;
2073
+ return __generator(this, function (_a) {
2074
+ switch (_a.label) {
2075
+ case 0: return [4 /*yield*/, this.incidentsVersionsExportPdfRaw(requestParameters, initOverrides)];
2076
+ case 1:
2077
+ response = _a.sent();
2078
+ return [4 /*yield*/, response.value()];
2079
+ case 2: return [2 /*return*/, _a.sent()];
2080
+ }
2081
+ });
2082
+ });
2083
+ };
2022
2084
  /**
2023
2085
  * Auto-generated: incidents.versions.show
2024
2086
  */
@@ -16,6 +16,7 @@
16
16
  export declare const PdfExportKind: {
17
17
  readonly Roster: "roster";
18
18
  readonly IncidentSingle: "incident_single";
19
+ readonly IncidentVersion: "incident_version";
19
20
  readonly IncidentBulk: "incident_bulk";
20
21
  readonly IncidentCsvSingle: "incident_csv_single";
21
22
  readonly IncidentCsvBulk: "incident_csv_bulk";
@@ -26,6 +26,7 @@ exports.PdfExportKindToJSONTyped = PdfExportKindToJSONTyped;
26
26
  exports.PdfExportKind = {
27
27
  Roster: 'roster',
28
28
  IncidentSingle: 'incident_single',
29
+ IncidentVersion: 'incident_version',
29
30
  IncidentBulk: 'incident_bulk',
30
31
  IncidentCsvSingle: 'incident_csv_single',
31
32
  IncidentCsvBulk: 'incident_csv_bulk'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital8/security-registers-backend-ts-sdk",
3
- "version": "0.0.848",
3
+ "version": "0.0.849",
4
4
  "description": "OpenAPI client for @digital8/security-registers-backend-ts-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -486,6 +486,12 @@ export interface IncidentsVersionsRequest {
486
486
  incident: number;
487
487
  }
488
488
 
489
+ export interface IncidentsVersionsExportPdfRequest {
490
+ incident: number;
491
+ version: number;
492
+ incidentsExportPdfRequest?: IncidentsExportPdfRequest;
493
+ }
494
+
489
495
  export interface IncidentsVersionsShowRequest {
490
496
  incident: number;
491
497
  version: number;
@@ -2299,6 +2305,62 @@ export class GeneralApi extends runtime.BaseAPI {
2299
2305
  return await response.value();
2300
2306
  }
2301
2307
 
2308
+ /**
2309
+ * Auto-generated: incidents.versions.exportPdf
2310
+ */
2311
+ async incidentsVersionsExportPdfRaw(requestParameters: IncidentsVersionsExportPdfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExportQueuedResource>> {
2312
+ if (requestParameters['incident'] == null) {
2313
+ throw new runtime.RequiredError(
2314
+ 'incident',
2315
+ 'Required parameter "incident" was null or undefined when calling incidentsVersionsExportPdf().'
2316
+ );
2317
+ }
2318
+
2319
+ if (requestParameters['version'] == null) {
2320
+ throw new runtime.RequiredError(
2321
+ 'version',
2322
+ 'Required parameter "version" was null or undefined when calling incidentsVersionsExportPdf().'
2323
+ );
2324
+ }
2325
+
2326
+ const queryParameters: any = {};
2327
+
2328
+ const headerParameters: runtime.HTTPHeaders = {};
2329
+
2330
+ headerParameters['Content-Type'] = 'application/json';
2331
+
2332
+ if (this.configuration && this.configuration.accessToken) {
2333
+ const token = this.configuration.accessToken;
2334
+ const tokenString = await token("bearerAuth", []);
2335
+
2336
+ if (tokenString) {
2337
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2338
+ }
2339
+ }
2340
+
2341
+ let urlPath = `/api/incidents/{incident}/versions/{version}/export-pdf`;
2342
+ urlPath = urlPath.replace(`{${"incident"}}`, encodeURIComponent(String(requestParameters['incident'])));
2343
+ urlPath = urlPath.replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version'])));
2344
+
2345
+ const response = await this.request({
2346
+ path: urlPath,
2347
+ method: 'POST',
2348
+ headers: headerParameters,
2349
+ query: queryParameters,
2350
+ body: IncidentsExportPdfRequestToJSON(requestParameters['incidentsExportPdfRequest']),
2351
+ }, initOverrides);
2352
+
2353
+ return new runtime.JSONApiResponse(response, (jsonValue) => ExportQueuedResourceFromJSON(jsonValue));
2354
+ }
2355
+
2356
+ /**
2357
+ * Auto-generated: incidents.versions.exportPdf
2358
+ */
2359
+ async incidentsVersionsExportPdf(requestParameters: IncidentsVersionsExportPdfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExportQueuedResource> {
2360
+ const response = await this.incidentsVersionsExportPdfRaw(requestParameters, initOverrides);
2361
+ return await response.value();
2362
+ }
2363
+
2302
2364
  /**
2303
2365
  * Auto-generated: incidents.versions.show
2304
2366
  */
@@ -20,6 +20,7 @@
20
20
  export const PdfExportKind = {
21
21
  Roster: 'roster',
22
22
  IncidentSingle: 'incident_single',
23
+ IncidentVersion: 'incident_version',
23
24
  IncidentBulk: 'incident_bulk',
24
25
  IncidentCsvSingle: 'incident_csv_single',
25
26
  IncidentCsvBulk: 'incident_csv_bulk'