ffmpeglab-sdk 0.3.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 (98) hide show
  1. package/README.md +45 -0
  2. package/dist/apis/AppApi.d.ts +9 -0
  3. package/dist/apis/AppApi.js +46 -0
  4. package/dist/apis/AppApi.js.map +1 -0
  5. package/dist/apis/RendersApi.d.ts +17 -0
  6. package/dist/apis/RendersApi.js +169 -0
  7. package/dist/apis/RendersApi.js.map +1 -0
  8. package/dist/apis/baseapi.d.ts +18 -0
  9. package/dist/apis/baseapi.js +22 -0
  10. package/dist/apis/baseapi.js.map +1 -0
  11. package/dist/apis/exception.d.ts +10 -0
  12. package/dist/apis/exception.js +10 -0
  13. package/dist/apis/exception.js.map +1 -0
  14. package/dist/auth/auth.d.ts +35 -0
  15. package/dist/auth/auth.js +34 -0
  16. package/dist/auth/auth.js.map +1 -0
  17. package/dist/configuration.d.ts +26 -0
  18. package/dist/configuration.js +56 -0
  19. package/dist/configuration.js.map +1 -0
  20. package/dist/http/http.d.ts +71 -0
  21. package/dist/http/http.js +185 -0
  22. package/dist/http/http.js.map +1 -0
  23. package/dist/http/isomorphic-fetch.d.ts +6 -0
  24. package/dist/http/isomorphic-fetch.js +28 -0
  25. package/dist/http/isomorphic-fetch.js.map +1 -0
  26. package/dist/index.d.ts +11 -0
  27. package/dist/index.js +10 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/middleware.d.ts +16 -0
  30. package/dist/middleware.js +13 -0
  31. package/dist/middleware.js.map +1 -0
  32. package/dist/models/EditorLayer.d.ts +30 -0
  33. package/dist/models/EditorLayer.js +66 -0
  34. package/dist/models/EditorLayer.js.map +1 -0
  35. package/dist/models/EditorLayerParams.d.ts +22 -0
  36. package/dist/models/EditorLayerParams.js +30 -0
  37. package/dist/models/EditorLayerParams.js.map +1 -0
  38. package/dist/models/EditorProject.d.ts +27 -0
  39. package/dist/models/EditorProject.js +54 -0
  40. package/dist/models/EditorProject.js.map +1 -0
  41. package/dist/models/EditorProjectConfiguration.d.ts +57 -0
  42. package/dist/models/EditorProjectConfiguration.js +128 -0
  43. package/dist/models/EditorProjectConfiguration.js.map +1 -0
  44. package/dist/models/EncoderProject.d.ts +44 -0
  45. package/dist/models/EncoderProject.js +156 -0
  46. package/dist/models/EncoderProject.js.map +1 -0
  47. package/dist/models/EncoderProjectEncoding.d.ts +167 -0
  48. package/dist/models/EncoderProjectEncoding.js +282 -0
  49. package/dist/models/EncoderProjectEncoding.js.map +1 -0
  50. package/dist/models/Media.d.ts +42 -0
  51. package/dist/models/Media.js +150 -0
  52. package/dist/models/Media.js.map +1 -0
  53. package/dist/models/ObjectSerializer.d.ts +23 -0
  54. package/dist/models/ObjectSerializer.js +299 -0
  55. package/dist/models/ObjectSerializer.js.map +1 -0
  56. package/dist/models/PositionParams.d.ts +23 -0
  57. package/dist/models/PositionParams.js +36 -0
  58. package/dist/models/PositionParams.js.map +1 -0
  59. package/dist/models/RGB.d.ts +22 -0
  60. package/dist/models/RGB.js +30 -0
  61. package/dist/models/RGB.js.map +1 -0
  62. package/dist/models/RenderData.d.ts +23 -0
  63. package/dist/models/RenderData.js +24 -0
  64. package/dist/models/RenderData.js.map +1 -0
  65. package/dist/models/RenderDto.d.ts +23 -0
  66. package/dist/models/RenderDto.js +24 -0
  67. package/dist/models/RenderDto.js.map +1 -0
  68. package/dist/models/RenderResponse.d.ts +31 -0
  69. package/dist/models/RenderResponse.js +72 -0
  70. package/dist/models/RenderResponse.js.map +1 -0
  71. package/dist/models/Resize.d.ts +21 -0
  72. package/dist/models/Resize.js +24 -0
  73. package/dist/models/Resize.js.map +1 -0
  74. package/dist/models/RunDto.d.ts +20 -0
  75. package/dist/models/RunDto.js +18 -0
  76. package/dist/models/RunDto.js.map +1 -0
  77. package/dist/models/all.d.ts +14 -0
  78. package/dist/models/all.js +15 -0
  79. package/dist/models/all.js.map +1 -0
  80. package/dist/rxjsStub.d.ts +10 -0
  81. package/dist/rxjsStub.js +24 -0
  82. package/dist/rxjsStub.js.map +1 -0
  83. package/dist/servers.d.ts +17 -0
  84. package/dist/servers.js +26 -0
  85. package/dist/servers.js.map +1 -0
  86. package/dist/types/ObjectParamAPI.d.ts +37 -0
  87. package/dist/types/ObjectParamAPI.js +43 -0
  88. package/dist/types/ObjectParamAPI.js.map +1 -0
  89. package/dist/types/ObservableAPI.d.ts +29 -0
  90. package/dist/types/ObservableAPI.js +115 -0
  91. package/dist/types/ObservableAPI.js.map +1 -0
  92. package/dist/types/PromiseAPI.d.ts +24 -0
  93. package/dist/types/PromiseAPI.js +64 -0
  94. package/dist/types/PromiseAPI.js.map +1 -0
  95. package/dist/util.d.ts +2 -0
  96. package/dist/util.js +24 -0
  97. package/dist/util.js.map +1 -0
  98. package/package.json +41 -0
package/README.md ADDED
@@ -0,0 +1,45 @@
1
+ ## ffmpeglab-sdk
2
+
3
+ Welcome to ffmpeglab typescript sdk.
4
+
5
+
6
+ ### Usage
7
+
8
+ Below code snippet shows exemplary usage of the configuration and the API based
9
+ on the typical `FFmpegLab` example used for OpenAPI.
10
+
11
+ ```
12
+ import ffmpeglab from 'ffmpeglab-sdk'
13
+
14
+ // Covers all auth methods included in your OpenAPI yaml definition
15
+ const authConfig: your_api.AuthMethodsConfiguration = {
16
+ "api_key": "YOUR_API_KEY"
17
+ }
18
+
19
+ // Implements a simple middleware to modify requests before (`pre`) they are sent
20
+ // and after (`post`) they have been received
21
+ class Test implements your_api.Middleware {
22
+ pre(context: your_api.RequestContext): Promise<your_api.RequestContext> {
23
+ // Modify context here and return
24
+ return Promise.resolve(context);
25
+ }
26
+
27
+ post(context: your_api.ResponseContext): Promise<your_api.ResponseContext> {
28
+ return Promise.resolve(context);
29
+ }
30
+
31
+ }
32
+
33
+ // Create configuration parameter object
34
+ const configurationParameters = {
35
+ httpApi: new your_api.JQueryHttpLibrary(), // Can also be ignored - default is usually fine
36
+ baseServer: your_api.servers[0], // First server is default
37
+ authMethods: authConfig, // No auth is default
38
+ promiseMiddleware: [new Test()],
39
+ }
40
+
41
+ // Convert to actual configuration
42
+ const config = your_api.createConfiguration(configurationParameters);
43
+
44
+
45
+ ```
@@ -0,0 +1,9 @@
1
+ import { BaseAPIRequestFactory } from './baseapi';
2
+ import { Configuration } from '../configuration';
3
+ import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
4
+ export declare class AppApiRequestFactory extends BaseAPIRequestFactory {
5
+ appControllerGetHello(_options?: Configuration): Promise<RequestContext>;
6
+ }
7
+ export declare class AppApiResponseProcessor {
8
+ appControllerGetHelloWithHttpInfo(response: ResponseContext): Promise<HttpInfo<void>>;
9
+ }
@@ -0,0 +1,46 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { BaseAPIRequestFactory } from './baseapi';
11
+ import { HttpMethod, HttpInfo } from '../http/http';
12
+ import { ObjectSerializer } from '../models/ObjectSerializer';
13
+ import { ApiException } from './exception';
14
+ import { isCodeInRange } from '../util';
15
+ export class AppApiRequestFactory extends BaseAPIRequestFactory {
16
+ appControllerGetHello(_options) {
17
+ return __awaiter(this, void 0, void 0, function* () {
18
+ var _a;
19
+ let _config = _options || this.configuration;
20
+ const localVarPath = '/';
21
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
22
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
23
+ const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default;
24
+ if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
25
+ yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
26
+ }
27
+ return requestContext;
28
+ });
29
+ }
30
+ }
31
+ export class AppApiResponseProcessor {
32
+ appControllerGetHelloWithHttpInfo(response) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
35
+ if (isCodeInRange("200", response.httpStatusCode)) {
36
+ return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
37
+ }
38
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
39
+ const body = ObjectSerializer.deserialize(ObjectSerializer.parse(yield response.body.text(), contentType), "void", "");
40
+ return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
41
+ }
42
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
43
+ });
44
+ }
45
+ }
46
+ //# sourceMappingURL=AppApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppApi.js","sourceRoot":"","sources":["../../apis/AppApi.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAC,qBAAqB,EAAoC,MAAM,WAAW,CAAC;AAEnF,OAAO,EAAiB,UAAU,EAA6B,QAAQ,EAAC,MAAM,cAAc,CAAC;AAC7F,OAAO,EAAC,gBAAgB,EAAC,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AACzC,OAAO,EAAiB,aAAa,EAAC,MAAM,SAAS,CAAC;AAQtD,MAAM,OAAO,oBAAqB,SAAQ,qBAAqB;IAI9C,qBAAqB,CAAC,QAAwB;;;YACvD,IAAI,OAAO,GAAG,QAAQ,IAAI,IAAI,CAAC,aAAa,CAAC;YAG7C,MAAM,YAAY,GAAG,GAAG,CAAC;YAGzB,MAAM,cAAc,GAAG,OAAO,CAAC,UAAU,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AAM,IAAI,YAAY,CAA4B,QAAQ,CAAC,cAAc,EAAE,0BAA0B,EAAE,MAAM,QAAQ,CAAC,YAAY,EAAE,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC5J,CAAC;KAAA;CAEJ"}
@@ -0,0 +1,17 @@
1
+ import { BaseAPIRequestFactory } from './baseapi';
2
+ import { Configuration } from '../configuration';
3
+ import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
4
+ import { RenderDto } from '../models/RenderDto';
5
+ import { RunDto } from '../models/RunDto';
6
+ export declare class RendersApiRequestFactory extends BaseAPIRequestFactory {
7
+ rendersControllerCreate(renderDto: RenderDto, _options?: Configuration): Promise<RequestContext>;
8
+ rendersControllerFindAll(_options?: Configuration): Promise<RequestContext>;
9
+ rendersControllerFindOne(id: string, _options?: Configuration): Promise<RequestContext>;
10
+ rendersControllerRunRender(runDto: RunDto, _options?: Configuration): Promise<RequestContext>;
11
+ }
12
+ export declare class RendersApiResponseProcessor {
13
+ rendersControllerCreateWithHttpInfo(response: ResponseContext): Promise<HttpInfo<void>>;
14
+ rendersControllerFindAllWithHttpInfo(response: ResponseContext): Promise<HttpInfo<void>>;
15
+ rendersControllerFindOneWithHttpInfo(response: ResponseContext): Promise<HttpInfo<void>>;
16
+ rendersControllerRunRenderWithHttpInfo(response: ResponseContext): Promise<HttpInfo<void>>;
17
+ }
@@ -0,0 +1,169 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { BaseAPIRequestFactory, RequiredError } from './baseapi';
11
+ import { HttpMethod, HttpInfo } from '../http/http';
12
+ import { ObjectSerializer } from '../models/ObjectSerializer';
13
+ import { ApiException } from './exception';
14
+ import { isCodeInRange } from '../util';
15
+ export class RendersApiRequestFactory extends BaseAPIRequestFactory {
16
+ rendersControllerCreate(renderDto, _options) {
17
+ return __awaiter(this, void 0, void 0, function* () {
18
+ var _a;
19
+ let _config = _options || this.configuration;
20
+ if (renderDto === null || renderDto === undefined) {
21
+ throw new RequiredError("RendersApi", "rendersControllerCreate", "renderDto");
22
+ }
23
+ const localVarPath = '/renders';
24
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
25
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
26
+ const contentType = ObjectSerializer.getPreferredMediaType([
27
+ "application/json"
28
+ ]);
29
+ requestContext.setHeaderParam("Content-Type", contentType);
30
+ const serializedBody = ObjectSerializer.stringify(ObjectSerializer.serialize(renderDto, "RenderDto", ""), contentType);
31
+ requestContext.setBody(serializedBody);
32
+ let authMethod;
33
+ authMethod = _config.authMethods["bearer"];
34
+ if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
35
+ yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
36
+ }
37
+ const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default;
38
+ if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
39
+ yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
40
+ }
41
+ return requestContext;
42
+ });
43
+ }
44
+ rendersControllerFindAll(_options) {
45
+ return __awaiter(this, void 0, void 0, function* () {
46
+ var _a;
47
+ let _config = _options || this.configuration;
48
+ const localVarPath = '/renders';
49
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
50
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
51
+ let authMethod;
52
+ authMethod = _config.authMethods["bearer"];
53
+ if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
54
+ yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
55
+ }
56
+ const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default;
57
+ if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
58
+ yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
59
+ }
60
+ return requestContext;
61
+ });
62
+ }
63
+ rendersControllerFindOne(id, _options) {
64
+ return __awaiter(this, void 0, void 0, function* () {
65
+ var _a;
66
+ let _config = _options || this.configuration;
67
+ if (id === null || id === undefined) {
68
+ throw new RequiredError("RendersApi", "rendersControllerFindOne", "id");
69
+ }
70
+ const localVarPath = '/renders/{id}'
71
+ .replace('{id}', encodeURIComponent(String(id)));
72
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
73
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
74
+ let authMethod;
75
+ authMethod = _config.authMethods["bearer"];
76
+ if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
77
+ yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
78
+ }
79
+ const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default;
80
+ if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
81
+ yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
82
+ }
83
+ return requestContext;
84
+ });
85
+ }
86
+ rendersControllerRunRender(runDto, _options) {
87
+ return __awaiter(this, void 0, void 0, function* () {
88
+ var _a;
89
+ let _config = _options || this.configuration;
90
+ if (runDto === null || runDto === undefined) {
91
+ throw new RequiredError("RendersApi", "rendersControllerRunRender", "runDto");
92
+ }
93
+ const localVarPath = '/renders/run';
94
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
95
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
96
+ const contentType = ObjectSerializer.getPreferredMediaType([
97
+ "application/json"
98
+ ]);
99
+ requestContext.setHeaderParam("Content-Type", contentType);
100
+ const serializedBody = ObjectSerializer.stringify(ObjectSerializer.serialize(runDto, "RunDto", ""), contentType);
101
+ requestContext.setBody(serializedBody);
102
+ let authMethod;
103
+ authMethod = _config.authMethods["bearer"];
104
+ if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
105
+ yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
106
+ }
107
+ const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default;
108
+ if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
109
+ yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
110
+ }
111
+ return requestContext;
112
+ });
113
+ }
114
+ }
115
+ export class RendersApiResponseProcessor {
116
+ rendersControllerCreateWithHttpInfo(response) {
117
+ return __awaiter(this, void 0, void 0, function* () {
118
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
119
+ if (isCodeInRange("0", response.httpStatusCode)) {
120
+ const body = ObjectSerializer.deserialize(ObjectSerializer.parse(yield response.body.text(), contentType), "RenderResponse", "");
121
+ throw new ApiException(response.httpStatusCode, "", body, response.headers);
122
+ }
123
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
124
+ return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
125
+ }
126
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
127
+ });
128
+ }
129
+ rendersControllerFindAllWithHttpInfo(response) {
130
+ return __awaiter(this, void 0, void 0, function* () {
131
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
132
+ if (isCodeInRange("0", response.httpStatusCode)) {
133
+ const body = ObjectSerializer.deserialize(ObjectSerializer.parse(yield response.body.text(), contentType), "Array<RenderResponse>", "");
134
+ throw new ApiException(response.httpStatusCode, "", body, response.headers);
135
+ }
136
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
137
+ return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
138
+ }
139
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
140
+ });
141
+ }
142
+ rendersControllerFindOneWithHttpInfo(response) {
143
+ return __awaiter(this, void 0, void 0, function* () {
144
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
145
+ if (isCodeInRange("0", response.httpStatusCode)) {
146
+ const body = ObjectSerializer.deserialize(ObjectSerializer.parse(yield response.body.text(), contentType), "RenderResponse", "");
147
+ throw new ApiException(response.httpStatusCode, "", body, response.headers);
148
+ }
149
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
150
+ return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
151
+ }
152
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
153
+ });
154
+ }
155
+ rendersControllerRunRenderWithHttpInfo(response) {
156
+ return __awaiter(this, void 0, void 0, function* () {
157
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
158
+ if (isCodeInRange("200", response.httpStatusCode)) {
159
+ return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
160
+ }
161
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
162
+ const body = ObjectSerializer.deserialize(ObjectSerializer.parse(yield response.body.text(), contentType), "void", "");
163
+ return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
164
+ }
165
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
166
+ });
167
+ }
168
+ }
169
+ //# sourceMappingURL=RendersApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RendersApi.js","sourceRoot":"","sources":["../../apis/RendersApi.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAC,qBAAqB,EAAE,aAAa,EAAqB,MAAM,WAAW,CAAC;AAEnF,OAAO,EAAiB,UAAU,EAA6B,QAAQ,EAAC,MAAM,cAAc,CAAC;AAC7F,OAAO,EAAC,gBAAgB,EAAC,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AACzC,OAAO,EAAiB,aAAa,EAAC,MAAM,SAAS,CAAC;AAWtD,MAAM,OAAO,wBAAyB,SAAQ,qBAAqB;IAKlD,uBAAuB,CAAC,SAAoB,EAAE,QAAwB;;;YAC/E,IAAI,OAAO,GAAG,QAAQ,IAAI,IAAI,CAAC,aAAa,CAAC;YAG7C,IAAI,SAAS,KAAK,IAAI,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;gBAChD,MAAM,IAAI,aAAa,CAAC,YAAY,EAAE,yBAAyB,EAAE,WAAW,CAAC,CAAC;YAClF,CAAC;YAID,MAAM,YAAY,GAAG,UAAU,CAAC;YAGhC,MAAM,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC,YAAY,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;YAC5F,cAAc,CAAC,cAAc,CAAC,QAAQ,EAAE,6BAA6B,CAAC,CAAA;YAItE,MAAM,WAAW,GAAG,gBAAgB,CAAC,qBAAqB,CAAC;gBACvD,kBAAkB;aACrB,CAAC,CAAC;YACH,cAAc,CAAC,cAAc,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;YAC3D,MAAM,cAAc,G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MAAM,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW,CAAC,EAC/D,MAAM,EAAE,EAAE,CACL,CAAC;gBACV,OAAO,IAAI,QAAQ,CAAC,QAAQ,CAAC,cAAc,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACxF,CAAC;YAED,MAAM,IAAI,YAAY,CAA4B,QAAQ,CAAC,cAAc,EAAE,0BAA0B,EAAE,MAAM,QAAQ,CAAC,YAAY,EAAE,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC5J,CAAC;KAAA;CAEJ"}
@@ -0,0 +1,18 @@
1
+ import { Configuration } from '../configuration';
2
+ export declare const COLLECTION_FORMATS: {
3
+ csv: string;
4
+ ssv: string;
5
+ tsv: string;
6
+ pipes: string;
7
+ };
8
+ export declare class BaseAPIRequestFactory {
9
+ protected configuration: Configuration;
10
+ constructor(configuration: Configuration);
11
+ }
12
+ export declare class RequiredError extends Error {
13
+ api: string;
14
+ method: string;
15
+ field: string;
16
+ name: "RequiredError";
17
+ constructor(api: string, method: string, field: string);
18
+ }
@@ -0,0 +1,22 @@
1
+ export const COLLECTION_FORMATS = {
2
+ csv: ",",
3
+ ssv: " ",
4
+ tsv: "\t",
5
+ pipes: "|",
6
+ };
7
+ export class BaseAPIRequestFactory {
8
+ constructor(configuration) {
9
+ this.configuration = configuration;
10
+ }
11
+ }
12
+ ;
13
+ export class RequiredError extends Error {
14
+ constructor(api, method, field) {
15
+ super("Required parameter " + field + " was null or undefined when calling " + api + "." + method + ".");
16
+ this.api = api;
17
+ this.method = method;
18
+ this.field = field;
19
+ this.name = "RequiredError";
20
+ }
21
+ }
22
+ //# sourceMappingURL=baseapi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"baseapi.js","sourceRoot":"","sources":["../../apis/baseapi.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAC9B,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,IAAI;IACT,KAAK,EAAE,GAAG;CACb,CAAC;AAQF,MAAM,OAAO,qBAAqB;IAE9B,YAAsB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAClD,CAAC;CACJ;AAAA,CAAC;AAQF,MAAM,OAAO,aAAc,SAAQ,KAAK;IAEpC,YAAmB,GAAW,EAAS,MAAc,EAAS,KAAa;QACvE,KAAK,CAAC,qBAAqB,GAAG,KAAK,GAAG,sCAAsC,GAAG,GAAG,GAAG,GAAG,GAAG,MAAM,GAAG,GAAG,CAAC,CAAC;QAD1F,QAAG,GAAH,GAAG,CAAQ;QAAS,WAAM,GAAN,MAAM,CAAQ;QAAS,UAAK,GAAL,KAAK,CAAQ;QADlE,SAAI,GAAoB,eAAe,CAAC;IAGjD,CAAC;CACJ"}
@@ -0,0 +1,10 @@
1
+ export declare class ApiException<T> extends Error {
2
+ code: number;
3
+ body: T;
4
+ headers: {
5
+ [key: string]: string;
6
+ };
7
+ constructor(code: number, message: string, body: T, headers: {
8
+ [key: string]: string;
9
+ });
10
+ }
@@ -0,0 +1,10 @@
1
+ export class ApiException extends Error {
2
+ constructor(code, message, body, headers) {
3
+ super("HTTP-Code: " + code + "\nMessage: " + message + "\nBody: " + JSON.stringify(body) + "\nHeaders: " +
4
+ JSON.stringify(headers));
5
+ this.code = code;
6
+ this.body = body;
7
+ this.headers = headers;
8
+ }
9
+ }
10
+ //# sourceMappingURL=exception.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exception.js","sourceRoot":"","sources":["../../apis/exception.ts"],"names":[],"mappings":"AASA,MAAM,OAAO,YAAgB,SAAQ,KAAK;IACtC,YAA0B,IAAY,EAAE,OAAe,EAAS,IAAO,EAAS,OAAmC;QAC/G,KAAK,CAAC,aAAa,GAAG,IAAI,GAAG,aAAa,GAAG,OAAO,GAAG,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,aAAa;YACxG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;QAFH,SAAI,GAAJ,IAAI,CAAQ;QAA0B,SAAI,GAAJ,IAAI,CAAG;QAAS,YAAO,GAAP,OAAO,CAA4B;IAGnH,CAAC;CACJ"}
@@ -0,0 +1,35 @@
1
+ import { RequestContext } from "../http/http";
2
+ export interface SecurityAuthentication {
3
+ getName(): string;
4
+ applySecurityAuthentication(context: RequestContext): void | Promise<void>;
5
+ }
6
+ export interface TokenProvider {
7
+ getToken(): Promise<string> | string;
8
+ }
9
+ export declare class BearerAuthentication implements SecurityAuthentication {
10
+ private tokenProvider;
11
+ constructor(tokenProvider: TokenProvider);
12
+ getName(): string;
13
+ applySecurityAuthentication(context: RequestContext): Promise<void>;
14
+ }
15
+ export type AuthMethods = {
16
+ "default"?: SecurityAuthentication;
17
+ "bearer"?: SecurityAuthentication;
18
+ };
19
+ export type ApiKeyConfiguration = string;
20
+ export type HttpBasicConfiguration = {
21
+ "username": string;
22
+ "password": string;
23
+ };
24
+ export type HttpBearerConfiguration = {
25
+ tokenProvider: TokenProvider;
26
+ };
27
+ export type OAuth2Configuration = {
28
+ accessToken: string;
29
+ };
30
+ export type HttpSignatureConfiguration = unknown;
31
+ export type AuthMethodsConfiguration = {
32
+ "default"?: SecurityAuthentication;
33
+ "bearer"?: HttpBearerConfiguration;
34
+ };
35
+ export declare function configureAuthMethods(config: AuthMethodsConfiguration | undefined): AuthMethods;
@@ -0,0 +1,34 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ export class BearerAuthentication {
11
+ constructor(tokenProvider) {
12
+ this.tokenProvider = tokenProvider;
13
+ }
14
+ getName() {
15
+ return "bearer";
16
+ }
17
+ applySecurityAuthentication(context) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ context.setHeaderParam("Authorization", "Bearer " + (yield this.tokenProvider.getToken()));
20
+ });
21
+ }
22
+ }
23
+ export function configureAuthMethods(config) {
24
+ let authMethods = {};
25
+ if (!config) {
26
+ return authMethods;
27
+ }
28
+ authMethods["default"] = config["default"];
29
+ if (config["bearer"]) {
30
+ authMethods["bearer"] = new BearerAuthentication(config["bearer"]["tokenProvider"]);
31
+ }
32
+ return authMethods;
33
+ }
34
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../auth/auth.ts"],"names":[],"mappings":";;;;;;;;;AA0BA,MAAM,OAAO,oBAAoB;IAM7B,YAA2B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAEpD,OAAO;QACV,OAAO,QAAQ,CAAC;IACpB,CAAC;IAEY,2BAA2B,CAAC,OAAuB;;YAC5D,OAAO,CAAC,cAAc,CAAC,eAAe,EAAE,SAAS,IAAG,MAAM,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAA,CAAC,CAAC;QAC7F,CAAC;KAAA;CACJ;AAsBD,MAAM,UAAU,oBAAoB,CAAC,MAA4C;IAC7E,IAAI,WAAW,GAAgB,EAAE,CAAA;IAEjC,IAAI,CAAC,MAAM,EAAE,CAAC;QACV,OAAO,WAAW,CAAC;IACvB,CAAC;IACD,WAAW,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;IAE1C,IAAI,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;QACnB,WAAW,CAAC,QAAQ,CAAC,GAAG,IAAI,oBAAoB,CAC5C,MAAM,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC,CACpC,CAAC;IACN,CAAC;IAED,OAAO,WAAW,CAAC;AACvB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { HttpLibrary } from "./http/http";
2
+ import { Middleware, PromiseMiddleware } from "./middleware";
3
+ import { BaseServerConfiguration } from "./servers";
4
+ import { AuthMethods, AuthMethodsConfiguration } from "./auth/auth";
5
+ export interface Configuration<M = Middleware> {
6
+ readonly baseServer: BaseServerConfiguration;
7
+ readonly httpApi: HttpLibrary;
8
+ readonly middleware: M[];
9
+ readonly authMethods: AuthMethods;
10
+ }
11
+ export interface MiddlewareMergeOptions {
12
+ middlewareMergeStrategy?: "replace" | "append" | "prepend";
13
+ }
14
+ export type ConfigurationOptions<M = Middleware> = Partial<Configuration<M>> & MiddlewareMergeOptions;
15
+ export type StandardConfigurationOptions = ConfigurationOptions<Middleware>;
16
+ export type PromiseConfigurationOptions = ConfigurationOptions<PromiseMiddleware>;
17
+ export interface ConfigurationParameters {
18
+ baseServer?: BaseServerConfiguration;
19
+ httpApi?: HttpLibrary;
20
+ middleware?: Middleware[];
21
+ promiseMiddleware?: PromiseMiddleware[];
22
+ authMethods?: AuthMethodsConfiguration;
23
+ }
24
+ export declare function createConfiguration(conf?: ConfigurationParameters): Configuration;
25
+ export declare function mergeConfiguration(conf: Configuration, options?: ConfigurationOptions): Configuration;
26
+ export declare function wrapOptions(options?: PromiseConfigurationOptions): StandardConfigurationOptions | undefined;
@@ -0,0 +1,56 @@
1
+ import { PromiseMiddlewareWrapper } from "./middleware";
2
+ import { IsomorphicFetchHttpLibrary as DefaultHttpLibrary } from "./http/isomorphic-fetch";
3
+ import { server1 } from "./servers";
4
+ import { configureAuthMethods } from "./auth/auth";
5
+ export function createConfiguration(conf = {}) {
6
+ const configuration = {
7
+ baseServer: conf.baseServer !== undefined ? conf.baseServer : server1,
8
+ httpApi: conf.httpApi || new DefaultHttpLibrary(),
9
+ middleware: conf.middleware || [],
10
+ authMethods: configureAuthMethods(conf.authMethods)
11
+ };
12
+ if (conf.promiseMiddleware) {
13
+ conf.promiseMiddleware.forEach(m => configuration.middleware.push(new PromiseMiddlewareWrapper(m)));
14
+ }
15
+ return configuration;
16
+ }
17
+ export function mergeConfiguration(conf, options) {
18
+ if (!options) {
19
+ return conf;
20
+ }
21
+ return {
22
+ baseServer: options.baseServer || conf.baseServer,
23
+ httpApi: options.httpApi || conf.httpApi,
24
+ authMethods: options.authMethods || conf.authMethods,
25
+ middleware: mergeMiddleware(conf.middleware, options === null || options === void 0 ? void 0 : options.middleware, options === null || options === void 0 ? void 0 : options.middlewareMergeStrategy),
26
+ };
27
+ }
28
+ function mergeMiddleware(staticMiddleware, calltimeMiddleware, strategy = "replace") {
29
+ if (!calltimeMiddleware) {
30
+ return staticMiddleware;
31
+ }
32
+ switch (strategy) {
33
+ case "append":
34
+ return staticMiddleware.concat(calltimeMiddleware);
35
+ case "prepend":
36
+ return calltimeMiddleware.concat(staticMiddleware);
37
+ case "replace":
38
+ return calltimeMiddleware;
39
+ default:
40
+ throw new Error(`Unrecognized middleware merge strategy '${strategy}'`);
41
+ }
42
+ }
43
+ export function wrapOptions(options) {
44
+ var _a;
45
+ if (options) {
46
+ return {
47
+ baseServer: options.baseServer,
48
+ httpApi: options.httpApi,
49
+ middleware: (_a = options.middleware) === null || _a === void 0 ? void 0 : _a.map(m => new PromiseMiddlewareWrapper(m)),
50
+ middlewareMergeStrategy: options.middlewareMergeStrategy,
51
+ authMethods: options.authMethods,
52
+ };
53
+ }
54
+ return;
55
+ }
56
+ //# sourceMappingURL=configuration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../configuration.ts"],"names":[],"mappings":"AACA,OAAO,EAAiC,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACvF,OAAO,EAAE,0BAA0B,IAAI,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAA2B,OAAO,EAAE,MAAM,WAAW,CA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,CAAC,kBAAkB,EAAE,CAAC;QACtB,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IACD,QAAO,QAAQ,EAAE,CAAC;QACd,KAAK,QAAQ;YACT,OAAO,gBAAgB,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;QACvD,KAAK,SAAS;YACV,OAAO,kBAAkB,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAA;QACtD,KAAK,SAAS;YACV,OAAO,kBAAkB,CAAA;QAC7B;YACI,MAAM,IAAI,KAAK,CAAC,2CAA2C,QAAQ,GAAG,CAAC,CAAA;IAC/E,CAAC;AACL,CAAC;AAKD,MAAM,UAAU,WAAW,CAAC,OAAqC;;IAC7D,IAAI,OAAO,EAAE,CAAC;QACV,OAAO;YACH,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,UAAU,EAAE,MAAA,OAAO,CAAC,UAAU,0CAAE,GAAG,CACjC,CAAC,CAAC,EAAE,CAAC,IAAI,wBAAwB,CAAC,CAAC,CAAC,CACrC;YACD,uBAAuB,EAAE,OAAO,CAAC,uBAAuB;YACxD,WAAW,EAAE,OAAO,CAAC,WAAW;SACnC,CAAC;IACN,CAAC;IACD,OAAO;AACX,CAAC"}
@@ -0,0 +1,71 @@
1
+ import { Observable } from '../rxjsStub';
2
+ export * from './isomorphic-fetch';
3
+ export declare enum HttpMethod {
4
+ GET = "GET",
5
+ HEAD = "HEAD",
6
+ POST = "POST",
7
+ PUT = "PUT",
8
+ DELETE = "DELETE",
9
+ CONNECT = "CONNECT",
10
+ OPTIONS = "OPTIONS",
11
+ TRACE = "TRACE",
12
+ PATCH = "PATCH"
13
+ }
14
+ export type HttpFile = Blob & {
15
+ readonly name: string;
16
+ };
17
+ export declare class HttpException extends Error {
18
+ constructor(msg: string);
19
+ }
20
+ export type RequestBody = undefined | string | FormData | URLSearchParams;
21
+ type Headers = Record<string, string>;
22
+ export declare class RequestContext {
23
+ private httpMethod;
24
+ private headers;
25
+ private body;
26
+ private url;
27
+ private signal;
28
+ constructor(url: string, httpMethod: HttpMethod);
29
+ getUrl(): string;
30
+ setUrl(url: string): void;
31
+ setBody(body: RequestBody): void;
32
+ getHttpMethod(): HttpMethod;
33
+ getHeaders(): Headers;
34
+ getBody(): RequestBody;
35
+ setQueryParam(name: string, value: string): void;
36
+ appendQueryParam(name: string, value: string): void;
37
+ addCookie(name: string, value: string): void;
38
+ setHeaderParam(key: string, value: string): void;
39
+ setSignal(signal: AbortSignal): void;
40
+ getSignal(): AbortSignal | undefined;
41
+ }
42
+ export interface ResponseBody {
43
+ text(): Promise<string>;
44
+ binary(): Promise<Blob>;
45
+ }
46
+ export declare class SelfDecodingBody implements ResponseBody {
47
+ private dataSource;
48
+ constructor(dataSource: Promise<Blob>);
49
+ binary(): Promise<Blob>;
50
+ text(): Promise<string>;
51
+ }
52
+ export declare class ResponseContext {
53
+ httpStatusCode: number;
54
+ headers: Headers;
55
+ body: ResponseBody;
56
+ constructor(httpStatusCode: number, headers: Headers, body: ResponseBody);
57
+ getParsedHeader(headerName: string): Headers;
58
+ getBodyAsFile(): Promise<HttpFile>;
59
+ getBodyAsAny(): Promise<string | Blob | undefined>;
60
+ }
61
+ export interface HttpLibrary {
62
+ send(request: RequestContext): Observable<ResponseContext>;
63
+ }
64
+ export interface PromiseHttpLibrary {
65
+ send(request: RequestContext): Promise<ResponseContext>;
66
+ }
67
+ export declare function wrapHttpLibrary(promiseHttpLibrary: PromiseHttpLibrary): HttpLibrary;
68
+ export declare class HttpInfo<T> extends ResponseContext {
69
+ data: T;
70
+ constructor(httpStatusCode: number, headers: Headers, body: ResponseBody, data: T);
71
+ }