@product-live/api-sdk 2.13.0 → 2.20.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 (192) hide show
  1. package/.openapi-generator/FILES +74 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/ItemApi.md +125 -0
  5. package/apis/ItemApi.ts +197 -0
  6. package/dist/apis/DataFactoryFileApi.d.ts +15 -15
  7. package/dist/apis/DataFactoryFileApi.js +358 -358
  8. package/dist/apis/DefaultApi.d.ts +11 -11
  9. package/dist/apis/DefaultApi.js +171 -171
  10. package/dist/apis/ItemApi.d.ts +13 -0
  11. package/dist/apis/ItemApi.js +249 -0
  12. package/dist/apis/ItemApi.js.map +1 -0
  13. package/dist/apis/JobApi.d.ts +21 -21
  14. package/dist/apis/JobApi.js +546 -546
  15. package/dist/apis/JobExecutionApi.d.ts +16 -16
  16. package/dist/apis/JobExecutionApi.js +338 -338
  17. package/dist/apis/TaskApi.d.ts +24 -24
  18. package/dist/apis/TaskApi.js +608 -608
  19. package/dist/apis/TaskExecutionApi.d.ts +13 -13
  20. package/dist/apis/TaskExecutionApi.js +258 -258
  21. package/dist/apis/VariableApi.d.ts +22 -22
  22. package/dist/apis/VariableApi.js +528 -528
  23. package/dist/apis/baseapi.d.ts +18 -18
  24. package/dist/apis/baseapi.js +45 -45
  25. package/dist/apis/exception.d.ts +10 -10
  26. package/dist/apis/exception.js +31 -31
  27. package/dist/auth/auth.d.ts +42 -42
  28. package/dist/auth/auth.js +44 -44
  29. package/dist/configuration.d.ts +18 -18
  30. package/dist/configuration.js +21 -21
  31. package/dist/http/http.d.ts +82 -82
  32. package/dist/http/http.js +228 -228
  33. package/dist/http/isomorphic-fetch.d.ts +5 -5
  34. package/dist/http/isomorphic-fetch.js +33 -33
  35. package/dist/index.d.ts +10 -10
  36. package/dist/index.js +35 -34
  37. package/dist/index.js.map +1 -1
  38. package/dist/middleware.d.ts +16 -16
  39. package/dist/middleware.js +17 -17
  40. package/dist/models/CreateJobDto.d.ts +30 -30
  41. package/dist/models/CreateJobDto.js +81 -81
  42. package/dist/models/CreateJobExecutionDto.d.ts +21 -21
  43. package/dist/models/CreateJobExecutionDto.js +33 -33
  44. package/dist/models/CreateTaskDto.d.ts +21 -21
  45. package/dist/models/CreateTaskDto.js +45 -45
  46. package/dist/models/CreateVariableDto.d.ts +22 -22
  47. package/dist/models/CreateVariableDto.js +45 -45
  48. package/dist/models/FileDto.d.ts +23 -23
  49. package/dist/models/FileDto.js +51 -51
  50. package/dist/models/FindVariablesRequest.d.ts +23 -24
  51. package/dist/models/FindVariablesRequest.js +45 -45
  52. package/dist/models/FindVariablesRequest.js.map +1 -1
  53. package/dist/models/GetFiles200Response.d.ts +21 -21
  54. package/dist/models/GetFiles200Response.js +33 -33
  55. package/dist/models/GetItems200Response.d.ts +21 -0
  56. package/dist/models/GetItems200Response.js +34 -0
  57. package/dist/models/GetItems200Response.js.map +1 -0
  58. package/dist/models/GetJobExecutionById400Response.d.ts +17 -17
  59. package/dist/models/GetJobExecutionById400Response.js +21 -21
  60. package/dist/models/GetJobExecutions200Response.d.ts +21 -21
  61. package/dist/models/GetJobExecutions200Response.js +33 -33
  62. package/dist/models/GetJobs200Response.d.ts +21 -21
  63. package/dist/models/GetJobs200Response.js +33 -33
  64. package/dist/models/GetTasks200Response.d.ts +21 -21
  65. package/dist/models/GetTasks200Response.js +33 -33
  66. package/dist/models/GetVariables200Response.d.ts +21 -21
  67. package/dist/models/GetVariables200Response.js +33 -33
  68. package/dist/models/HighOrderQuery.d.ts +19 -20
  69. package/dist/models/HighOrderQuery.js +27 -27
  70. package/dist/models/HighOrderQuery.js.map +1 -1
  71. package/dist/models/ItemDto.d.ts +28 -0
  72. package/dist/models/ItemDto.js +64 -0
  73. package/dist/models/ItemDto.js.map +1 -0
  74. package/dist/models/{Query.d.ts → ItemFieldDTO.d.ts} +19 -18
  75. package/dist/models/ItemFieldDTO.js +34 -0
  76. package/dist/models/ItemFieldDTO.js.map +1 -0
  77. package/dist/models/ItemFieldFile.d.ts +18 -0
  78. package/dist/models/ItemFieldFile.js +22 -0
  79. package/dist/models/ItemFieldFile.js.map +1 -0
  80. package/dist/models/ItemFieldFileData.d.ts +18 -0
  81. package/dist/models/ItemFieldFileData.js +28 -0
  82. package/dist/models/ItemFieldFileData.js.map +1 -0
  83. package/dist/models/ItemFieldMultipleSelectWithCommentAndQuantity.d.ts +18 -0
  84. package/dist/models/ItemFieldMultipleSelectWithCommentAndQuantity.js +22 -0
  85. package/dist/models/ItemFieldMultipleSelectWithCommentAndQuantity.js.map +1 -0
  86. package/dist/models/ItemFieldMultipleSelectWithCommentAndQuantityData.d.ts +19 -0
  87. package/dist/models/ItemFieldMultipleSelectWithCommentAndQuantityData.js +34 -0
  88. package/dist/models/ItemFieldMultipleSelectWithCommentAndQuantityData.js.map +1 -0
  89. package/dist/models/ItemFieldSimpleNumber.d.ts +18 -0
  90. package/dist/models/ItemFieldSimpleNumber.js +28 -0
  91. package/dist/models/ItemFieldSimpleNumber.js.map +1 -0
  92. package/dist/models/ItemFieldSimpleString.d.ts +17 -0
  93. package/dist/models/ItemFieldSimpleString.js +22 -0
  94. package/dist/models/ItemFieldSimpleString.js.map +1 -0
  95. package/dist/models/ItemFieldSimpleStringArray.d.ts +17 -0
  96. package/dist/models/ItemFieldSimpleStringArray.js +22 -0
  97. package/dist/models/ItemFieldSimpleStringArray.js.map +1 -0
  98. package/dist/models/ItemMetadataDTO.d.ts +23 -0
  99. package/dist/models/ItemMetadataDTO.js +58 -0
  100. package/dist/models/ItemMetadataDTO.js.map +1 -0
  101. package/dist/models/JobDto.d.ts +35 -35
  102. package/dist/models/JobDto.js +105 -105
  103. package/dist/models/JobExecutionDto.d.ts +33 -33
  104. package/dist/models/JobExecutionDto.js +87 -87
  105. package/dist/models/LowOrderQuery.d.ts +22 -22
  106. package/dist/models/LowOrderQuery.js +39 -39
  107. package/dist/models/LowOrderQueryValue.d.ts +16 -16
  108. package/dist/models/LowOrderQueryValue.js +14 -14
  109. package/dist/models/ObjectSerializer.d.ts +45 -34
  110. package/dist/models/ObjectSerializer.js +346 -312
  111. package/dist/models/ObjectSerializer.js.map +1 -1
  112. package/dist/models/PatchTaskExecutionDto.d.ts +22 -22
  113. package/dist/models/PatchTaskExecutionDto.js +33 -33
  114. package/dist/models/Query1.d.ts +23 -0
  115. package/dist/models/Query1.js +46 -0
  116. package/dist/models/Query1.js.map +1 -0
  117. package/dist/models/TaskDto.d.ts +26 -26
  118. package/dist/models/TaskDto.js +69 -69
  119. package/dist/models/TaskExecutionDto.d.ts +30 -30
  120. package/dist/models/TaskExecutionDto.js +63 -63
  121. package/dist/models/UpdateJobDto.d.ts +31 -31
  122. package/dist/models/UpdateJobDto.js +87 -87
  123. package/dist/models/UpdateTaskDto.d.ts +22 -22
  124. package/dist/models/UpdateTaskDto.js +51 -51
  125. package/dist/models/UpdateVariableDto.d.ts +23 -23
  126. package/dist/models/UpdateVariableDto.js +51 -51
  127. package/dist/models/VariableDto.d.ts +27 -27
  128. package/dist/models/VariableDto.js +69 -69
  129. package/dist/models/all.d.ts +36 -25
  130. package/dist/models/all.js +52 -41
  131. package/dist/models/all.js.map +1 -1
  132. package/dist/rxjsStub.d.ts +10 -10
  133. package/dist/rxjsStub.js +32 -32
  134. package/dist/servers.d.ts +17 -17
  135. package/dist/servers.js +31 -31
  136. package/dist/types/ObjectParamAPI.d.ts +187 -171
  137. package/dist/types/ObjectParamAPI.js +159 -144
  138. package/dist/types/ObjectParamAPI.js.map +1 -1
  139. package/dist/types/ObservableAPI.d.ts +109 -98
  140. package/dist/types/ObservableAPI.js +757 -699
  141. package/dist/types/ObservableAPI.js.map +1 -1
  142. package/dist/types/PromiseAPI.d.ts +92 -83
  143. package/dist/types/PromiseAPI.js +179 -163
  144. package/dist/types/PromiseAPI.js.map +1 -1
  145. package/dist/util.d.ts +2 -2
  146. package/dist/util.js +28 -28
  147. package/index.ts +1 -1
  148. package/models/CreateJobDto.ts +1 -1
  149. package/models/CreateJobExecutionDto.ts +1 -1
  150. package/models/CreateTaskDto.ts +1 -1
  151. package/models/CreateVariableDto.ts +1 -1
  152. package/models/FileDto.ts +1 -1
  153. package/models/FindVariablesRequest.ts +10 -12
  154. package/models/GetFiles200Response.ts +1 -1
  155. package/models/GetItems200Response.ts +53 -0
  156. package/models/GetJobExecutionById400Response.ts +1 -1
  157. package/models/GetJobExecutions200Response.ts +1 -1
  158. package/models/GetJobs200Response.ts +1 -1
  159. package/models/GetTasks200Response.ts +1 -1
  160. package/models/GetVariables200Response.ts +1 -1
  161. package/models/HighOrderQuery.ts +3 -4
  162. package/models/ItemDto.ts +86 -0
  163. package/models/ItemFieldDTO.ts +49 -0
  164. package/models/{Query.ts → ItemFieldFile.ts} +8 -10
  165. package/models/ItemFieldFileData.ts +42 -0
  166. package/models/ItemFieldMultipleSelectWithCommentAndQuantity.ts +36 -0
  167. package/models/ItemFieldMultipleSelectWithCommentAndQuantityData.ts +49 -0
  168. package/models/ItemFieldSimpleNumber.ts +42 -0
  169. package/models/ItemFieldSimpleString.ts +35 -0
  170. package/models/ItemFieldSimpleStringArray.ts +35 -0
  171. package/models/ItemMetadataDTO.ts +77 -0
  172. package/models/JobDto.ts +1 -1
  173. package/models/JobExecutionDto.ts +1 -1
  174. package/models/LowOrderQuery.ts +2 -2
  175. package/models/LowOrderQueryValue.ts +1 -1
  176. package/models/ObjectSerializer.ts +39 -5
  177. package/models/PatchTaskExecutionDto.ts +1 -1
  178. package/models/Query1.ts +69 -0
  179. package/models/TaskDto.ts +1 -1
  180. package/models/TaskExecutionDto.ts +1 -1
  181. package/models/UpdateJobDto.ts +1 -1
  182. package/models/UpdateTaskDto.ts +1 -1
  183. package/models/UpdateVariableDto.ts +1 -1
  184. package/models/VariableDto.ts +1 -1
  185. package/models/all.ts +12 -1
  186. package/package.json +2 -2
  187. package/tsconfig.json +28 -0
  188. package/types/ObjectParamAPI.ts +64 -1
  189. package/types/ObservableAPI.ts +77 -1
  190. package/types/PromiseAPI.ts +50 -1
  191. package/dist/models/Query.js +0 -22
  192. package/dist/models/Query.js.map +0 -1
@@ -1,18 +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
- }
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
+ }
@@ -1,46 +1,46 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.RequiredError = exports.BaseAPIRequestFactory = exports.COLLECTION_FORMATS = void 0;
19
- exports.COLLECTION_FORMATS = {
20
- csv: ",",
21
- ssv: " ",
22
- tsv: "\t",
23
- pipes: "|",
24
- };
25
- var BaseAPIRequestFactory = (function () {
26
- function BaseAPIRequestFactory(configuration) {
27
- this.configuration = configuration;
28
- }
29
- return BaseAPIRequestFactory;
30
- }());
31
- exports.BaseAPIRequestFactory = BaseAPIRequestFactory;
32
- ;
33
- var RequiredError = (function (_super) {
34
- __extends(RequiredError, _super);
35
- function RequiredError(api, method, field) {
36
- var _this = _super.call(this, "Required parameter " + field + " was null or undefined when calling " + api + "." + method + ".") || this;
37
- _this.api = api;
38
- _this.method = method;
39
- _this.field = field;
40
- _this.name = "RequiredError";
41
- return _this;
42
- }
43
- return RequiredError;
44
- }(Error));
45
- exports.RequiredError = RequiredError;
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.RequiredError = exports.BaseAPIRequestFactory = exports.COLLECTION_FORMATS = void 0;
19
+ exports.COLLECTION_FORMATS = {
20
+ csv: ",",
21
+ ssv: " ",
22
+ tsv: "\t",
23
+ pipes: "|",
24
+ };
25
+ var BaseAPIRequestFactory = (function () {
26
+ function BaseAPIRequestFactory(configuration) {
27
+ this.configuration = configuration;
28
+ }
29
+ return BaseAPIRequestFactory;
30
+ }());
31
+ exports.BaseAPIRequestFactory = BaseAPIRequestFactory;
32
+ ;
33
+ var RequiredError = (function (_super) {
34
+ __extends(RequiredError, _super);
35
+ function RequiredError(api, method, field) {
36
+ var _this = _super.call(this, "Required parameter " + field + " was null or undefined when calling " + api + "." + method + ".") || this;
37
+ _this.api = api;
38
+ _this.method = method;
39
+ _this.field = field;
40
+ _this.name = "RequiredError";
41
+ return _this;
42
+ }
43
+ return RequiredError;
44
+ }(Error));
45
+ exports.RequiredError = RequiredError;
46
46
  //# sourceMappingURL=baseapi.js.map
@@ -1,10 +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
- }
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
+ }
@@ -1,32 +1,32 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.ApiException = void 0;
19
- var ApiException = (function (_super) {
20
- __extends(ApiException, _super);
21
- function ApiException(code, message, body, headers) {
22
- var _this = _super.call(this, "HTTP-Code: " + code + "\nMessage: " + message + "\nBody: " + JSON.stringify(body) + "\nHeaders: " +
23
- JSON.stringify(headers)) || this;
24
- _this.code = code;
25
- _this.body = body;
26
- _this.headers = headers;
27
- return _this;
28
- }
29
- return ApiException;
30
- }(Error));
31
- exports.ApiException = ApiException;
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.ApiException = void 0;
19
+ var ApiException = (function (_super) {
20
+ __extends(ApiException, _super);
21
+ function ApiException(code, message, body, headers) {
22
+ var _this = _super.call(this, "HTTP-Code: " + code + "\nMessage: " + message + "\nBody: " + JSON.stringify(body) + "\nHeaders: " +
23
+ JSON.stringify(headers)) || this;
24
+ _this.code = code;
25
+ _this.body = body;
26
+ _this.headers = headers;
27
+ return _this;
28
+ }
29
+ return ApiException;
30
+ }(Error));
31
+ exports.ApiException = ApiException;
32
32
  //# sourceMappingURL=exception.js.map
@@ -1,42 +1,42 @@
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 ApiKeyAuthHeaderAuthentication implements SecurityAuthentication {
10
- private apiKey;
11
- constructor(apiKey: string);
12
- getName(): string;
13
- applySecurityAuthentication(context: RequestContext): void;
14
- }
15
- export declare class ApiKeyAuthQueryAuthentication implements SecurityAuthentication {
16
- private apiKey;
17
- constructor(apiKey: string);
18
- getName(): string;
19
- applySecurityAuthentication(context: RequestContext): void;
20
- }
21
- export type AuthMethods = {
22
- "default"?: SecurityAuthentication;
23
- "ApiKeyAuthHeader"?: SecurityAuthentication;
24
- "ApiKeyAuthQuery"?: SecurityAuthentication;
25
- };
26
- export type ApiKeyConfiguration = string;
27
- export type HttpBasicConfiguration = {
28
- "username": string;
29
- "password": string;
30
- };
31
- export type HttpBearerConfiguration = {
32
- tokenProvider: TokenProvider;
33
- };
34
- export type OAuth2Configuration = {
35
- accessToken: string;
36
- };
37
- export type AuthMethodsConfiguration = {
38
- "default"?: SecurityAuthentication;
39
- "ApiKeyAuthHeader"?: ApiKeyConfiguration;
40
- "ApiKeyAuthQuery"?: ApiKeyConfiguration;
41
- };
42
- export declare function configureAuthMethods(config: AuthMethodsConfiguration | undefined): AuthMethods;
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 ApiKeyAuthHeaderAuthentication implements SecurityAuthentication {
10
+ private apiKey;
11
+ constructor(apiKey: string);
12
+ getName(): string;
13
+ applySecurityAuthentication(context: RequestContext): void;
14
+ }
15
+ export declare class ApiKeyAuthQueryAuthentication implements SecurityAuthentication {
16
+ private apiKey;
17
+ constructor(apiKey: string);
18
+ getName(): string;
19
+ applySecurityAuthentication(context: RequestContext): void;
20
+ }
21
+ export type AuthMethods = {
22
+ "default"?: SecurityAuthentication;
23
+ "ApiKeyAuthHeader"?: SecurityAuthentication;
24
+ "ApiKeyAuthQuery"?: SecurityAuthentication;
25
+ };
26
+ export type ApiKeyConfiguration = string;
27
+ export type HttpBasicConfiguration = {
28
+ "username": string;
29
+ "password": string;
30
+ };
31
+ export type HttpBearerConfiguration = {
32
+ tokenProvider: TokenProvider;
33
+ };
34
+ export type OAuth2Configuration = {
35
+ accessToken: string;
36
+ };
37
+ export type AuthMethodsConfiguration = {
38
+ "default"?: SecurityAuthentication;
39
+ "ApiKeyAuthHeader"?: ApiKeyConfiguration;
40
+ "ApiKeyAuthQuery"?: ApiKeyConfiguration;
41
+ };
42
+ export declare function configureAuthMethods(config: AuthMethodsConfiguration | undefined): AuthMethods;
package/dist/auth/auth.js CHANGED
@@ -1,45 +1,45 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.configureAuthMethods = exports.ApiKeyAuthQueryAuthentication = exports.ApiKeyAuthHeaderAuthentication = void 0;
4
- var ApiKeyAuthHeaderAuthentication = (function () {
5
- function ApiKeyAuthHeaderAuthentication(apiKey) {
6
- this.apiKey = apiKey;
7
- }
8
- ApiKeyAuthHeaderAuthentication.prototype.getName = function () {
9
- return "ApiKeyAuthHeader";
10
- };
11
- ApiKeyAuthHeaderAuthentication.prototype.applySecurityAuthentication = function (context) {
12
- context.setHeaderParam("X-Api-Key", this.apiKey);
13
- };
14
- return ApiKeyAuthHeaderAuthentication;
15
- }());
16
- exports.ApiKeyAuthHeaderAuthentication = ApiKeyAuthHeaderAuthentication;
17
- var ApiKeyAuthQueryAuthentication = (function () {
18
- function ApiKeyAuthQueryAuthentication(apiKey) {
19
- this.apiKey = apiKey;
20
- }
21
- ApiKeyAuthQueryAuthentication.prototype.getName = function () {
22
- return "ApiKeyAuthQuery";
23
- };
24
- ApiKeyAuthQueryAuthentication.prototype.applySecurityAuthentication = function (context) {
25
- context.setQueryParam("api_key", this.apiKey);
26
- };
27
- return ApiKeyAuthQueryAuthentication;
28
- }());
29
- exports.ApiKeyAuthQueryAuthentication = ApiKeyAuthQueryAuthentication;
30
- function configureAuthMethods(config) {
31
- var authMethods = {};
32
- if (!config) {
33
- return authMethods;
34
- }
35
- authMethods["default"] = config["default"];
36
- if (config["ApiKeyAuthHeader"]) {
37
- authMethods["ApiKeyAuthHeader"] = new ApiKeyAuthHeaderAuthentication(config["ApiKeyAuthHeader"]);
38
- }
39
- if (config["ApiKeyAuthQuery"]) {
40
- authMethods["ApiKeyAuthQuery"] = new ApiKeyAuthQueryAuthentication(config["ApiKeyAuthQuery"]);
41
- }
42
- return authMethods;
43
- }
44
- exports.configureAuthMethods = configureAuthMethods;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.configureAuthMethods = exports.ApiKeyAuthQueryAuthentication = exports.ApiKeyAuthHeaderAuthentication = void 0;
4
+ var ApiKeyAuthHeaderAuthentication = (function () {
5
+ function ApiKeyAuthHeaderAuthentication(apiKey) {
6
+ this.apiKey = apiKey;
7
+ }
8
+ ApiKeyAuthHeaderAuthentication.prototype.getName = function () {
9
+ return "ApiKeyAuthHeader";
10
+ };
11
+ ApiKeyAuthHeaderAuthentication.prototype.applySecurityAuthentication = function (context) {
12
+ context.setHeaderParam("X-Api-Key", this.apiKey);
13
+ };
14
+ return ApiKeyAuthHeaderAuthentication;
15
+ }());
16
+ exports.ApiKeyAuthHeaderAuthentication = ApiKeyAuthHeaderAuthentication;
17
+ var ApiKeyAuthQueryAuthentication = (function () {
18
+ function ApiKeyAuthQueryAuthentication(apiKey) {
19
+ this.apiKey = apiKey;
20
+ }
21
+ ApiKeyAuthQueryAuthentication.prototype.getName = function () {
22
+ return "ApiKeyAuthQuery";
23
+ };
24
+ ApiKeyAuthQueryAuthentication.prototype.applySecurityAuthentication = function (context) {
25
+ context.setQueryParam("api_key", this.apiKey);
26
+ };
27
+ return ApiKeyAuthQueryAuthentication;
28
+ }());
29
+ exports.ApiKeyAuthQueryAuthentication = ApiKeyAuthQueryAuthentication;
30
+ function configureAuthMethods(config) {
31
+ var authMethods = {};
32
+ if (!config) {
33
+ return authMethods;
34
+ }
35
+ authMethods["default"] = config["default"];
36
+ if (config["ApiKeyAuthHeader"]) {
37
+ authMethods["ApiKeyAuthHeader"] = new ApiKeyAuthHeaderAuthentication(config["ApiKeyAuthHeader"]);
38
+ }
39
+ if (config["ApiKeyAuthQuery"]) {
40
+ authMethods["ApiKeyAuthQuery"] = new ApiKeyAuthQueryAuthentication(config["ApiKeyAuthQuery"]);
41
+ }
42
+ return authMethods;
43
+ }
44
+ exports.configureAuthMethods = configureAuthMethods;
45
45
  //# sourceMappingURL=auth.js.map
@@ -1,18 +1,18 @@
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 {
6
- readonly baseServer: BaseServerConfiguration;
7
- readonly httpApi: HttpLibrary;
8
- readonly middleware: Middleware[];
9
- readonly authMethods: AuthMethods;
10
- }
11
- export interface ConfigurationParameters {
12
- baseServer?: BaseServerConfiguration;
13
- httpApi?: HttpLibrary;
14
- middleware?: Middleware[];
15
- promiseMiddleware?: PromiseMiddleware[];
16
- authMethods?: AuthMethodsConfiguration;
17
- }
18
- export declare function createConfiguration(conf?: ConfigurationParameters): Configuration;
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 {
6
+ readonly baseServer: BaseServerConfiguration;
7
+ readonly httpApi: HttpLibrary;
8
+ readonly middleware: Middleware[];
9
+ readonly authMethods: AuthMethods;
10
+ }
11
+ export interface ConfigurationParameters {
12
+ baseServer?: BaseServerConfiguration;
13
+ httpApi?: HttpLibrary;
14
+ middleware?: Middleware[];
15
+ promiseMiddleware?: PromiseMiddleware[];
16
+ authMethods?: AuthMethodsConfiguration;
17
+ }
18
+ export declare function createConfiguration(conf?: ConfigurationParameters): Configuration;
@@ -1,22 +1,22 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createConfiguration = void 0;
4
- var middleware_1 = require("./middleware");
5
- var isomorphic_fetch_1 = require("./http/isomorphic-fetch");
6
- var servers_1 = require("./servers");
7
- var auth_1 = require("./auth/auth");
8
- function createConfiguration(conf) {
9
- if (conf === void 0) { conf = {}; }
10
- var configuration = {
11
- baseServer: conf.baseServer !== undefined ? conf.baseServer : servers_1.server1,
12
- httpApi: conf.httpApi || new isomorphic_fetch_1.IsomorphicFetchHttpLibrary(),
13
- middleware: conf.middleware || [],
14
- authMethods: (0, auth_1.configureAuthMethods)(conf.authMethods)
15
- };
16
- if (conf.promiseMiddleware) {
17
- conf.promiseMiddleware.forEach(function (m) { return configuration.middleware.push(new middleware_1.PromiseMiddlewareWrapper(m)); });
18
- }
19
- return configuration;
20
- }
21
- exports.createConfiguration = createConfiguration;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createConfiguration = void 0;
4
+ var middleware_1 = require("./middleware");
5
+ var isomorphic_fetch_1 = require("./http/isomorphic-fetch");
6
+ var servers_1 = require("./servers");
7
+ var auth_1 = require("./auth/auth");
8
+ function createConfiguration(conf) {
9
+ if (conf === void 0) { conf = {}; }
10
+ var configuration = {
11
+ baseServer: conf.baseServer !== undefined ? conf.baseServer : servers_1.server1,
12
+ httpApi: conf.httpApi || new isomorphic_fetch_1.IsomorphicFetchHttpLibrary(),
13
+ middleware: conf.middleware || [],
14
+ authMethods: (0, auth_1.configureAuthMethods)(conf.authMethods)
15
+ };
16
+ if (conf.promiseMiddleware) {
17
+ conf.promiseMiddleware.forEach(function (m) { return configuration.middleware.push(new middleware_1.PromiseMiddlewareWrapper(m)); });
18
+ }
19
+ return configuration;
20
+ }
21
+ exports.createConfiguration = createConfiguration;
22
22
  //# sourceMappingURL=configuration.js.map
@@ -1,82 +1,82 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- /// <reference types="node" />
4
- /// <reference types="node" />
5
- import * as FormData from "form-data";
6
- import { URLSearchParams } from 'url';
7
- import * as http from 'http';
8
- import * as https from 'https';
9
- import { Observable } from '../rxjsStub';
10
- export * from './isomorphic-fetch';
11
- export declare enum HttpMethod {
12
- GET = "GET",
13
- HEAD = "HEAD",
14
- POST = "POST",
15
- PUT = "PUT",
16
- DELETE = "DELETE",
17
- CONNECT = "CONNECT",
18
- OPTIONS = "OPTIONS",
19
- TRACE = "TRACE",
20
- PATCH = "PATCH"
21
- }
22
- export type HttpFile = {
23
- data: Buffer;
24
- name: string;
25
- };
26
- export declare class HttpException extends Error {
27
- constructor(msg: string);
28
- }
29
- export type RequestBody = undefined | string | FormData | URLSearchParams;
30
- export declare class RequestContext {
31
- private httpMethod;
32
- private headers;
33
- private body;
34
- private url;
35
- private agent;
36
- constructor(url: string, httpMethod: HttpMethod);
37
- getUrl(): string;
38
- setUrl(url: string): void;
39
- setBody(body: RequestBody): void;
40
- getHttpMethod(): HttpMethod;
41
- getHeaders(): {
42
- [key: string]: string;
43
- };
44
- getBody(): RequestBody;
45
- setQueryParam(name: string, value: string): void;
46
- addCookie(name: string, value: string): void;
47
- setHeaderParam(key: string, value: string): void;
48
- setAgent(agent: http.Agent | https.Agent): void;
49
- getAgent(): http.Agent | https.Agent | undefined;
50
- }
51
- export interface ResponseBody {
52
- text(): Promise<string>;
53
- binary(): Promise<Buffer>;
54
- }
55
- export declare class SelfDecodingBody implements ResponseBody {
56
- private dataSource;
57
- constructor(dataSource: Promise<Buffer>);
58
- binary(): Promise<Buffer>;
59
- text(): Promise<string>;
60
- }
61
- export declare class ResponseContext {
62
- httpStatusCode: number;
63
- headers: {
64
- [key: string]: string;
65
- };
66
- body: ResponseBody;
67
- constructor(httpStatusCode: number, headers: {
68
- [key: string]: string;
69
- }, body: ResponseBody);
70
- getParsedHeader(headerName: string): {
71
- [parameter: string]: string;
72
- };
73
- getBodyAsFile(): Promise<HttpFile>;
74
- getBodyAsAny(): Promise<string | Buffer | undefined>;
75
- }
76
- export interface HttpLibrary {
77
- send(request: RequestContext): Observable<ResponseContext>;
78
- }
79
- export interface PromiseHttpLibrary {
80
- send(request: RequestContext): Promise<ResponseContext>;
81
- }
82
- export declare function wrapHttpLibrary(promiseHttpLibrary: PromiseHttpLibrary): HttpLibrary;
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ /// <reference types="node" />
4
+ /// <reference types="node" />
5
+ import * as FormData from "form-data";
6
+ import { URLSearchParams } from 'url';
7
+ import * as http from 'http';
8
+ import * as https from 'https';
9
+ import { Observable } from '../rxjsStub';
10
+ export * from './isomorphic-fetch';
11
+ export declare enum HttpMethod {
12
+ GET = "GET",
13
+ HEAD = "HEAD",
14
+ POST = "POST",
15
+ PUT = "PUT",
16
+ DELETE = "DELETE",
17
+ CONNECT = "CONNECT",
18
+ OPTIONS = "OPTIONS",
19
+ TRACE = "TRACE",
20
+ PATCH = "PATCH"
21
+ }
22
+ export type HttpFile = {
23
+ data: Buffer;
24
+ name: string;
25
+ };
26
+ export declare class HttpException extends Error {
27
+ constructor(msg: string);
28
+ }
29
+ export type RequestBody = undefined | string | FormData | URLSearchParams;
30
+ export declare class RequestContext {
31
+ private httpMethod;
32
+ private headers;
33
+ private body;
34
+ private url;
35
+ private agent;
36
+ constructor(url: string, httpMethod: HttpMethod);
37
+ getUrl(): string;
38
+ setUrl(url: string): void;
39
+ setBody(body: RequestBody): void;
40
+ getHttpMethod(): HttpMethod;
41
+ getHeaders(): {
42
+ [key: string]: string;
43
+ };
44
+ getBody(): RequestBody;
45
+ setQueryParam(name: string, value: string): void;
46
+ addCookie(name: string, value: string): void;
47
+ setHeaderParam(key: string, value: string): void;
48
+ setAgent(agent: http.Agent | https.Agent): void;
49
+ getAgent(): http.Agent | https.Agent | undefined;
50
+ }
51
+ export interface ResponseBody {
52
+ text(): Promise<string>;
53
+ binary(): Promise<Buffer>;
54
+ }
55
+ export declare class SelfDecodingBody implements ResponseBody {
56
+ private dataSource;
57
+ constructor(dataSource: Promise<Buffer>);
58
+ binary(): Promise<Buffer>;
59
+ text(): Promise<string>;
60
+ }
61
+ export declare class ResponseContext {
62
+ httpStatusCode: number;
63
+ headers: {
64
+ [key: string]: string;
65
+ };
66
+ body: ResponseBody;
67
+ constructor(httpStatusCode: number, headers: {
68
+ [key: string]: string;
69
+ }, body: ResponseBody);
70
+ getParsedHeader(headerName: string): {
71
+ [parameter: string]: string;
72
+ };
73
+ getBodyAsFile(): Promise<HttpFile>;
74
+ getBodyAsAny(): Promise<string | Buffer | undefined>;
75
+ }
76
+ export interface HttpLibrary {
77
+ send(request: RequestContext): Observable<ResponseContext>;
78
+ }
79
+ export interface PromiseHttpLibrary {
80
+ send(request: RequestContext): Promise<ResponseContext>;
81
+ }
82
+ export declare function wrapHttpLibrary(promiseHttpLibrary: PromiseHttpLibrary): HttpLibrary;