@redhat-cloud-services/notifications-client 0.0.40 → 1.0.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 (194) hide show
  1. package/README.md +8 -8
  2. package/dist/EventResourceV1GetEvents/index.d.ts +111 -0
  3. package/dist/EventResourceV1GetEvents/index.js +143 -0
  4. package/dist/NotificationResourceV1AppendBehaviorGroupToEventType/index.d.ts +26 -0
  5. package/dist/NotificationResourceV1AppendBehaviorGroupToEventType/index.js +93 -0
  6. package/dist/NotificationResourceV1CreateBehaviorGroup/index.d.ts +21 -0
  7. package/dist/NotificationResourceV1CreateBehaviorGroup/index.js +93 -0
  8. package/dist/NotificationResourceV1DeleteBehaviorGroup/index.d.ts +20 -0
  9. package/dist/NotificationResourceV1DeleteBehaviorGroup/index.js +92 -0
  10. package/dist/NotificationResourceV1DeleteBehaviorGroupFromEventType/index.d.ts +26 -0
  11. package/dist/NotificationResourceV1DeleteBehaviorGroupFromEventType/index.js +93 -0
  12. package/dist/NotificationResourceV1FindBehaviorGroupsByBundleId/index.d.ts +20 -0
  13. package/dist/NotificationResourceV1FindBehaviorGroupsByBundleId/index.js +92 -0
  14. package/dist/NotificationResourceV1GetApplicationByNameAndBundleName/index.d.ts +26 -0
  15. package/dist/NotificationResourceV1GetApplicationByNameAndBundleName/index.js +93 -0
  16. package/dist/NotificationResourceV1GetApplicationsFacets/index.d.ts +20 -0
  17. package/dist/NotificationResourceV1GetApplicationsFacets/index.js +94 -0
  18. package/dist/NotificationResourceV1GetBehaviorGroupsAffectedByRemovalOfEndpoint/index.d.ts +20 -0
  19. package/dist/NotificationResourceV1GetBehaviorGroupsAffectedByRemovalOfEndpoint/index.js +92 -0
  20. package/dist/NotificationResourceV1GetBundleByName/index.d.ts +20 -0
  21. package/dist/NotificationResourceV1GetBundleByName/index.js +92 -0
  22. package/dist/NotificationResourceV1GetBundleFacets/index.d.ts +20 -0
  23. package/dist/NotificationResourceV1GetBundleFacets/index.js +94 -0
  24. package/dist/NotificationResourceV1GetEventTypes/index.d.ts +62 -0
  25. package/dist/NotificationResourceV1GetEventTypes/index.js +115 -0
  26. package/dist/NotificationResourceV1GetEventTypesAffectedByRemovalOfBehaviorGroup/index.d.ts +20 -0
  27. package/dist/NotificationResourceV1GetEventTypesAffectedByRemovalOfBehaviorGroup/index.js +92 -0
  28. package/dist/NotificationResourceV1GetEventTypesByNameAndBundleAndApplicationName/index.d.ts +32 -0
  29. package/dist/NotificationResourceV1GetEventTypesByNameAndBundleAndApplicationName/index.js +94 -0
  30. package/dist/NotificationResourceV1GetLinkedBehaviorGroups/index.d.ts +50 -0
  31. package/dist/NotificationResourceV1GetLinkedBehaviorGroups/index.js +116 -0
  32. package/dist/NotificationResourceV1UpdateBehaviorGroup/index.d.ts +27 -0
  33. package/dist/NotificationResourceV1UpdateBehaviorGroup/index.js +94 -0
  34. package/dist/NotificationResourceV1UpdateBehaviorGroupActions/index.d.ts +26 -0
  35. package/dist/NotificationResourceV1UpdateBehaviorGroupActions/index.js +94 -0
  36. package/dist/NotificationResourceV1UpdateEventTypeBehaviors/index.d.ts +26 -0
  37. package/dist/NotificationResourceV1UpdateEventTypeBehaviors/index.js +94 -0
  38. package/dist/OrgConfigResourceV1GetDailyDigestTimePreference/index.d.ts +13 -0
  39. package/dist/OrgConfigResourceV1GetDailyDigestTimePreference/index.js +90 -0
  40. package/dist/OrgConfigResourceV1SaveDailyDigestTimePreference/index.d.ts +20 -0
  41. package/dist/OrgConfigResourceV1SaveDailyDigestTimePreference/index.js +93 -0
  42. package/dist/UserConfigResourceV1GetPreferences/index.d.ts +25 -0
  43. package/dist/UserConfigResourceV1GetPreferences/index.js +92 -0
  44. package/dist/UserConfigResourceV1GetSettingsSchema/index.d.ts +19 -0
  45. package/dist/UserConfigResourceV1GetSettingsSchema/index.js +93 -0
  46. package/dist/UserConfigResourceV1SaveSettings/index.d.ts +20 -0
  47. package/dist/UserConfigResourceV1SaveSettings/index.js +92 -0
  48. package/dist/api.d.ts +2536 -759
  49. package/dist/api.js +2833 -778
  50. package/dist/base.d.ts +54 -0
  51. package/dist/base.js +80 -0
  52. package/dist/common.d.ts +65 -0
  53. package/dist/common.js +252 -0
  54. package/dist/configuration.d.ts +24 -15
  55. package/dist/configuration.js +19 -12
  56. package/dist/index.d.ts +27 -13
  57. package/dist/index.js +89 -17
  58. package/dist/types/index.d.ts +1657 -0
  59. package/dist/types/index.js +90 -0
  60. package/dist/utils/base.d.ts +84 -0
  61. package/dist/utils/base.js +251 -0
  62. package/dist/utils/common.d.ts +54 -0
  63. package/dist/utils/common.js +241 -0
  64. package/dist/utils/configuration.d.ts +72 -0
  65. package/dist/utils/configuration.js +33 -0
  66. package/dist/utils/index.d.ts +3 -0
  67. package/dist/utils/index.js +19 -0
  68. package/doc/.nojekyll +1 -0
  69. package/doc/README.md +11 -420
  70. package/doc/classes/BaseAPI.md +125 -0
  71. package/doc/classes/Configuration.md +194 -0
  72. package/doc/classes/RequiredError.md +179 -0
  73. package/doc/enums/EmailSubscriptionType.md +21 -0
  74. package/doc/enums/EndpointStatus.md +76 -0
  75. package/doc/enums/EndpointType.md +65 -0
  76. package/doc/enums/Environment.md +54 -0
  77. package/doc/enums/EventLogEntryActionStatus.md +65 -0
  78. package/doc/enums/HttpType.md +43 -0
  79. package/doc/enums/NotificationStatus.md +65 -0
  80. package/doc/enums/Status.md +32 -0
  81. package/doc/interfaces/AddAccessRequest.md +44 -0
  82. package/doc/interfaces/AddApplicationRequest.md +74 -0
  83. package/doc/interfaces/AggregationEmailTemplate.md +164 -0
  84. package/doc/interfaces/ApiConfig.md +30 -0
  85. package/doc/interfaces/Application.md +104 -0
  86. package/doc/interfaces/Application1.md +44 -0
  87. package/doc/interfaces/ApplicationSettingsValue.md +33 -0
  88. package/doc/interfaces/ApplicationSettingsValue1.md +48 -0
  89. package/doc/interfaces/BasicAuthentication.md +44 -0
  90. package/doc/interfaces/BehaviorGroup.md +149 -0
  91. package/doc/interfaces/BehaviorGroupAction.md +59 -0
  92. package/doc/interfaces/BehaviorGroupActionId.md +44 -0
  93. package/doc/interfaces/Bundle.md +89 -0
  94. package/doc/interfaces/BundleSettingsValue.md +33 -0
  95. package/doc/interfaces/BundleSettingsValue1.md +33 -0
  96. package/doc/interfaces/CamelProperties.md +93 -0
  97. package/doc/interfaces/ConfigurationParameters.md +89 -0
  98. package/doc/interfaces/CreateBehaviorGroupRequest.md +104 -0
  99. package/doc/interfaces/CreateBehaviorGroupResponse.md +104 -0
  100. package/doc/interfaces/CurrentStatus.md +59 -0
  101. package/doc/interfaces/DuplicateNameMigrationReport.md +44 -0
  102. package/doc/interfaces/Endpoint.md +179 -0
  103. package/doc/interfaces/EndpointPage.md +63 -0
  104. package/doc/interfaces/EndpointTestRequest.md +29 -0
  105. package/doc/interfaces/EventLogEntry.md +119 -0
  106. package/doc/interfaces/EventLogEntryAction.md +125 -0
  107. package/doc/interfaces/EventType.md +119 -0
  108. package/doc/interfaces/EventTypeBehavior.md +59 -0
  109. package/doc/interfaces/EventTypeBehaviorId.md +44 -0
  110. package/doc/interfaces/EventTypeSettingsValue.md +48 -0
  111. package/doc/interfaces/Facet.md +74 -0
  112. package/doc/interfaces/InstantEmailTemplate.md +149 -0
  113. package/doc/interfaces/InternalApplicationUserPermission.md +59 -0
  114. package/doc/interfaces/InternalRoleAccess.md +59 -0
  115. package/doc/interfaces/InternalUserPermissions.md +59 -0
  116. package/doc/interfaces/MessageValidationResponse.md +33 -0
  117. package/doc/interfaces/Meta.md +29 -0
  118. package/doc/interfaces/NotificationHistory.md +155 -0
  119. package/doc/interfaces/PageBehaviorGroup.md +63 -0
  120. package/doc/interfaces/PageEventLogEntry.md +63 -0
  121. package/doc/interfaces/PageEventType.md +63 -0
  122. package/doc/interfaces/PageNotificationHistory.md +63 -0
  123. package/doc/interfaces/RenderEmailTemplateRequest.md +44 -0
  124. package/doc/interfaces/RequestArgs.md +58 -0
  125. package/doc/interfaces/RequestDefaultBehaviorGroupPropertyList.md +44 -0
  126. package/doc/interfaces/RequestSystemSubscriptionProperties.md +44 -0
  127. package/doc/interfaces/ServerInfo.md +29 -0
  128. package/doc/interfaces/SettingsValues.md +33 -0
  129. package/doc/interfaces/SettingsValuesByEventType.md +33 -0
  130. package/doc/interfaces/SystemSubscriptionProperties.md +59 -0
  131. package/doc/interfaces/Template.md +104 -0
  132. package/doc/interfaces/TriggerDailyDigestRequest.md +89 -0
  133. package/doc/interfaces/UpdateBehaviorGroupRequest.md +74 -0
  134. package/doc/interfaces/UserConfigPreferences.md +44 -0
  135. package/doc/interfaces/WebhookProperties.md +89 -0
  136. package/doc/modules.md +1080 -0
  137. package/git_push.sh +57 -0
  138. package/openapitools.json +7 -0
  139. package/package.json +26 -31
  140. package/postProcess.sh +3 -11
  141. package/tsconfig-cjs.json +19 -0
  142. package/tsconfig-esm.json +21 -0
  143. package/tsconfig.json +18 -0
  144. package/doc/classes/appregistrationapi.md +0 -123
  145. package/doc/classes/appsapi.md +0 -149
  146. package/doc/classes/baseapi.md +0 -86
  147. package/doc/classes/configuration.md +0 -140
  148. package/doc/classes/endpointsapi.md +0 -255
  149. package/doc/classes/filtersapi.md +0 -124
  150. package/doc/classes/requirederror.md +0 -109
  151. package/doc/enums/app.typeenum.md +0 -28
  152. package/doc/enums/endpoint.typeenum.md +0 -28
  153. package/doc/enums/endpointattributes.lastdeliverystatusenum.md +0 -38
  154. package/doc/enums/eventtype.typeenum.md +0 -28
  155. package/doc/enums/inlineresponse2004data.typeenum.md +0 -28
  156. package/doc/enums/level.typeenum.md +0 -28
  157. package/doc/interfaces/appattributes.md +0 -54
  158. package/doc/interfaces/apprelationships.md +0 -36
  159. package/doc/interfaces/appsregisterapplication.md +0 -50
  160. package/doc/interfaces/appsregistereventtypes.md +0 -64
  161. package/doc/interfaces/appsregistereventtypeslevels.md +0 -50
  162. package/doc/interfaces/configurationparameters.md +0 -84
  163. package/doc/interfaces/endpointsendpoint.md +0 -78
  164. package/doc/interfaces/endpointsendpointfilter.md +0 -64
  165. package/doc/interfaces/endpointsidendpoint.md +0 -78
  166. package/doc/interfaces/endpointsidendpointfilter.md +0 -78
  167. package/doc/interfaces/errors.md +0 -36
  168. package/doc/interfaces/errorserrors.md +0 -120
  169. package/doc/interfaces/errorssource.md +0 -50
  170. package/doc/interfaces/eventtypeattributes.md +0 -54
  171. package/doc/interfaces/eventtyperelationships.md +0 -36
  172. package/doc/interfaces/inlineobject.md +0 -50
  173. package/doc/interfaces/inlineobject1.md +0 -36
  174. package/doc/interfaces/inlineobject2.md +0 -36
  175. package/doc/interfaces/inlineresponse200.md +0 -50
  176. package/doc/interfaces/inlineresponse2001.md +0 -36
  177. package/doc/interfaces/inlineresponse2002.md +0 -50
  178. package/doc/interfaces/inlineresponse2003.md +0 -64
  179. package/doc/interfaces/inlineresponse2004.md +0 -36
  180. package/doc/interfaces/inlineresponse2004dataattributes.md +0 -36
  181. package/doc/interfaces/inlineresponse2004datarelationships.md +0 -78
  182. package/doc/interfaces/inlineresponse201.md +0 -36
  183. package/doc/interfaces/levelattributes.md +0 -38
  184. package/doc/interfaces/links.md +0 -86
  185. package/doc/interfaces/metadata.md +0 -70
  186. package/doc/interfaces/relationship.md +0 -50
  187. package/doc/interfaces/relationships.md +0 -36
  188. package/doc/interfaces/requestargs.md +0 -42
  189. package/doc/modules/app.md +0 -82
  190. package/doc/modules/endpoint.md +0 -68
  191. package/doc/modules/endpointattributes.md +0 -118
  192. package/doc/modules/eventtype.md +0 -82
  193. package/doc/modules/inlineresponse2004data.md +0 -78
  194. package/doc/modules/level.md +0 -68
package/dist/base.d.ts ADDED
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Notifications
3
+ * The API for Notifications
4
+ *
5
+ * The version of the OpenAPI document: v1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { Configuration } from './configuration';
13
+ import type { AxiosInstance, AxiosRequestConfig } from 'axios';
14
+ export declare const BASE_PATH: string;
15
+ /**
16
+ *
17
+ * @export
18
+ */
19
+ export declare const COLLECTION_FORMATS: {
20
+ csv: string;
21
+ ssv: string;
22
+ tsv: string;
23
+ pipes: string;
24
+ };
25
+ /**
26
+ *
27
+ * @export
28
+ * @interface RequestArgs
29
+ */
30
+ export interface RequestArgs {
31
+ url: string;
32
+ options: AxiosRequestConfig;
33
+ }
34
+ /**
35
+ *
36
+ * @export
37
+ * @class BaseAPI
38
+ */
39
+ export declare class BaseAPI {
40
+ protected basePath: string;
41
+ protected axios: AxiosInstance;
42
+ protected configuration: Configuration | undefined;
43
+ constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
44
+ }
45
+ /**
46
+ *
47
+ * @export
48
+ * @class RequiredError
49
+ * @extends {Error}
50
+ */
51
+ export declare class RequiredError extends Error {
52
+ field: string;
53
+ constructor(field: string, msg?: string);
54
+ }
package/dist/base.js ADDED
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Notifications
6
+ * The API for Notifications
7
+ *
8
+ * The version of the OpenAPI document: v1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ Object.defineProperty(exports, "__esModule", { value: true });
31
+ exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
32
+ var axios_1 = require("axios");
33
+ exports.BASE_PATH = "https://console.redhat.com//api/notifications/v1.0".replace(/\/+$/, "");
34
+ /**
35
+ *
36
+ * @export
37
+ */
38
+ exports.COLLECTION_FORMATS = {
39
+ csv: ",",
40
+ ssv: " ",
41
+ tsv: "\t",
42
+ pipes: "|",
43
+ };
44
+ /**
45
+ *
46
+ * @export
47
+ * @class BaseAPI
48
+ */
49
+ var BaseAPI = /** @class */ (function () {
50
+ function BaseAPI(configuration, basePath, axios) {
51
+ if (basePath === void 0) { basePath = exports.BASE_PATH; }
52
+ if (axios === void 0) { axios = axios_1.default; }
53
+ this.basePath = basePath;
54
+ this.axios = axios;
55
+ if (configuration) {
56
+ this.configuration = configuration;
57
+ this.basePath = configuration.basePath || this.basePath;
58
+ }
59
+ }
60
+ return BaseAPI;
61
+ }());
62
+ exports.BaseAPI = BaseAPI;
63
+ ;
64
+ /**
65
+ *
66
+ * @export
67
+ * @class RequiredError
68
+ * @extends {Error}
69
+ */
70
+ var RequiredError = /** @class */ (function (_super) {
71
+ __extends(RequiredError, _super);
72
+ function RequiredError(field, msg) {
73
+ var _this = _super.call(this, msg) || this;
74
+ _this.field = field;
75
+ _this.name = "RequiredError";
76
+ return _this;
77
+ }
78
+ return RequiredError;
79
+ }(Error));
80
+ exports.RequiredError = RequiredError;
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Notifications
3
+ * The API for Notifications
4
+ *
5
+ * The version of the OpenAPI document: v1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { Configuration } from "./configuration";
13
+ import type { RequestArgs } from "./base";
14
+ import type { AxiosInstance, AxiosResponse } from 'axios';
15
+ /**
16
+ *
17
+ * @export
18
+ */
19
+ export declare const DUMMY_BASE_URL = "https://example.com";
20
+ /**
21
+ *
22
+ * @throws {RequiredError}
23
+ * @export
24
+ */
25
+ export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
26
+ /**
27
+ *
28
+ * @export
29
+ */
30
+ export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
31
+ /**
32
+ *
33
+ * @export
34
+ */
35
+ export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
36
+ /**
37
+ *
38
+ * @export
39
+ */
40
+ export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
41
+ /**
42
+ *
43
+ * @export
44
+ */
45
+ export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
46
+ /**
47
+ *
48
+ * @export
49
+ */
50
+ export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
51
+ /**
52
+ *
53
+ * @export
54
+ */
55
+ export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
56
+ /**
57
+ *
58
+ * @export
59
+ */
60
+ export declare const toPathString: (url: URL) => string;
61
+ /**
62
+ *
63
+ * @export
64
+ */
65
+ export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
package/dist/common.js ADDED
@@ -0,0 +1,252 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Notifications
6
+ * The API for Notifications
7
+ *
8
+ * The version of the OpenAPI document: v1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __assign = (this && this.__assign) || function () {
16
+ __assign = Object.assign || function(t) {
17
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
18
+ s = arguments[i];
19
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
20
+ t[p] = s[p];
21
+ }
22
+ return t;
23
+ };
24
+ return __assign.apply(this, arguments);
25
+ };
26
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
27
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
28
+ return new (P || (P = Promise))(function (resolve, reject) {
29
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
30
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
31
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
32
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
33
+ });
34
+ };
35
+ var __generator = (this && this.__generator) || function (thisArg, body) {
36
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
37
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
38
+ function verb(n) { return function (v) { return step([n, v]); }; }
39
+ function step(op) {
40
+ if (f) throw new TypeError("Generator is already executing.");
41
+ while (_) try {
42
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
43
+ if (y = 0, t) op = [op[0] & 2, t.value];
44
+ switch (op[0]) {
45
+ case 0: case 1: t = op; break;
46
+ case 4: _.label++; return { value: op[1], done: false };
47
+ case 5: _.label++; y = op[1]; op = [0]; continue;
48
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
49
+ default:
50
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
51
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
52
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
53
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
54
+ if (t[2]) _.ops.pop();
55
+ _.trys.pop(); continue;
56
+ }
57
+ op = body.call(thisArg, _);
58
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
59
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
60
+ }
61
+ };
62
+ Object.defineProperty(exports, "__esModule", { value: true });
63
+ exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
64
+ var base_1 = require("./base");
65
+ /**
66
+ *
67
+ * @export
68
+ */
69
+ exports.DUMMY_BASE_URL = 'https://example.com';
70
+ /**
71
+ *
72
+ * @throws {RequiredError}
73
+ * @export
74
+ */
75
+ var assertParamExists = function (functionName, paramName, paramValue) {
76
+ if (paramValue === null || paramValue === undefined) {
77
+ throw new base_1.RequiredError(paramName, "Required parameter ".concat(paramName, " was null or undefined when calling ").concat(functionName, "."));
78
+ }
79
+ };
80
+ exports.assertParamExists = assertParamExists;
81
+ /**
82
+ *
83
+ * @export
84
+ */
85
+ var setApiKeyToObject = function (object, keyParamName, configuration) {
86
+ return __awaiter(this, void 0, void 0, function () {
87
+ var localVarApiKeyValue, _a;
88
+ return __generator(this, function (_b) {
89
+ switch (_b.label) {
90
+ case 0:
91
+ if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
92
+ if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
93
+ return [4 /*yield*/, configuration.apiKey(keyParamName)];
94
+ case 1:
95
+ _a = _b.sent();
96
+ return [3 /*break*/, 4];
97
+ case 2: return [4 /*yield*/, configuration.apiKey];
98
+ case 3:
99
+ _a = _b.sent();
100
+ _b.label = 4;
101
+ case 4:
102
+ localVarApiKeyValue = _a;
103
+ object[keyParamName] = localVarApiKeyValue;
104
+ _b.label = 5;
105
+ case 5: return [2 /*return*/];
106
+ }
107
+ });
108
+ });
109
+ };
110
+ exports.setApiKeyToObject = setApiKeyToObject;
111
+ /**
112
+ *
113
+ * @export
114
+ */
115
+ var setBasicAuthToObject = function (object, configuration) {
116
+ if (configuration && (configuration.username || configuration.password)) {
117
+ object["auth"] = { username: configuration.username, password: configuration.password };
118
+ }
119
+ };
120
+ exports.setBasicAuthToObject = setBasicAuthToObject;
121
+ /**
122
+ *
123
+ * @export
124
+ */
125
+ var setBearerAuthToObject = function (object, configuration) {
126
+ return __awaiter(this, void 0, void 0, function () {
127
+ var accessToken, _a;
128
+ return __generator(this, function (_b) {
129
+ switch (_b.label) {
130
+ case 0:
131
+ if (!(configuration && configuration.accessToken)) return [3 /*break*/, 5];
132
+ if (!(typeof configuration.accessToken === 'function')) return [3 /*break*/, 2];
133
+ return [4 /*yield*/, configuration.accessToken()];
134
+ case 1:
135
+ _a = _b.sent();
136
+ return [3 /*break*/, 4];
137
+ case 2: return [4 /*yield*/, configuration.accessToken];
138
+ case 3:
139
+ _a = _b.sent();
140
+ _b.label = 4;
141
+ case 4:
142
+ accessToken = _a;
143
+ object["Authorization"] = "Bearer " + accessToken;
144
+ _b.label = 5;
145
+ case 5: return [2 /*return*/];
146
+ }
147
+ });
148
+ });
149
+ };
150
+ exports.setBearerAuthToObject = setBearerAuthToObject;
151
+ /**
152
+ *
153
+ * @export
154
+ */
155
+ var setOAuthToObject = function (object, name, scopes, configuration) {
156
+ return __awaiter(this, void 0, void 0, function () {
157
+ var localVarAccessTokenValue, _a;
158
+ return __generator(this, function (_b) {
159
+ switch (_b.label) {
160
+ case 0:
161
+ if (!(configuration && configuration.accessToken)) return [3 /*break*/, 5];
162
+ if (!(typeof configuration.accessToken === 'function')) return [3 /*break*/, 2];
163
+ return [4 /*yield*/, configuration.accessToken(name, scopes)];
164
+ case 1:
165
+ _a = _b.sent();
166
+ return [3 /*break*/, 4];
167
+ case 2: return [4 /*yield*/, configuration.accessToken];
168
+ case 3:
169
+ _a = _b.sent();
170
+ _b.label = 4;
171
+ case 4:
172
+ localVarAccessTokenValue = _a;
173
+ object["Authorization"] = "Bearer " + localVarAccessTokenValue;
174
+ _b.label = 5;
175
+ case 5: return [2 /*return*/];
176
+ }
177
+ });
178
+ });
179
+ };
180
+ exports.setOAuthToObject = setOAuthToObject;
181
+ function setFlattenedQueryParams(urlSearchParams, parameter, key) {
182
+ if (key === void 0) { key = ""; }
183
+ if (parameter == null)
184
+ return;
185
+ if (typeof parameter === "object") {
186
+ if (Array.isArray(parameter)) {
187
+ parameter.forEach(function (item) { return setFlattenedQueryParams(urlSearchParams, item, key); });
188
+ }
189
+ else {
190
+ Object.keys(parameter).forEach(function (currentKey) {
191
+ return setFlattenedQueryParams(urlSearchParams, parameter[currentKey], "".concat(key).concat(key !== '' ? '.' : '').concat(currentKey));
192
+ });
193
+ }
194
+ }
195
+ else {
196
+ if (urlSearchParams.has(key)) {
197
+ urlSearchParams.append(key, parameter);
198
+ }
199
+ else {
200
+ urlSearchParams.set(key, parameter);
201
+ }
202
+ }
203
+ }
204
+ /**
205
+ *
206
+ * @export
207
+ */
208
+ var setSearchParams = function (url) {
209
+ var objects = [];
210
+ for (var _i = 1; _i < arguments.length; _i++) {
211
+ objects[_i - 1] = arguments[_i];
212
+ }
213
+ var searchParams = new URLSearchParams(url.search);
214
+ setFlattenedQueryParams(searchParams, objects);
215
+ url.search = searchParams.toString();
216
+ };
217
+ exports.setSearchParams = setSearchParams;
218
+ /**
219
+ *
220
+ * @export
221
+ */
222
+ var serializeDataIfNeeded = function (value, requestOptions, configuration) {
223
+ var nonString = typeof value !== 'string';
224
+ var needsSerialization = nonString && configuration && configuration.isJsonMime
225
+ ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
226
+ : nonString;
227
+ return needsSerialization
228
+ ? JSON.stringify(value !== undefined ? value : {})
229
+ : (value || "");
230
+ };
231
+ exports.serializeDataIfNeeded = serializeDataIfNeeded;
232
+ /**
233
+ *
234
+ * @export
235
+ */
236
+ var toPathString = function (url) {
237
+ return url.pathname + url.search + url.hash;
238
+ };
239
+ exports.toPathString = toPathString;
240
+ /**
241
+ *
242
+ * @export
243
+ */
244
+ var createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
245
+ return function (axios, basePath) {
246
+ if (axios === void 0) { axios = globalAxios; }
247
+ if (basePath === void 0) { basePath = BASE_PATH; }
248
+ var axiosRequestArgs = __assign(__assign({}, axiosArgs.options), { url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || axios.defaults.baseURL || basePath) + axiosArgs.url });
249
+ return axios.request(axiosRequestArgs);
250
+ };
251
+ };
252
+ exports.createRequestFunction = createRequestFunction;
@@ -1,21 +1,11 @@
1
- /**
2
- * API V1
3
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
- *
5
- * OpenAPI spec version: 1.0.0
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
1
  export interface ConfigurationParameters {
13
- apiKey?: string | ((name: string) => string);
2
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
14
3
  username?: string;
15
4
  password?: string;
16
- accessToken?: string | ((name: string, scopes?: string[]) => string);
5
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
17
6
  basePath?: string;
18
7
  baseOptions?: any;
8
+ formDataCtor?: new () => any;
19
9
  }
20
10
  export declare class Configuration {
21
11
  /**
@@ -23,7 +13,7 @@ export declare class Configuration {
23
13
  * @param name security name
24
14
  * @memberof Configuration
25
15
  */
26
- apiKey?: string | ((name: string) => string);
16
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
27
17
  /**
28
18
  * parameter for basic security
29
19
  *
@@ -44,7 +34,7 @@ export declare class Configuration {
44
34
  * @param scopes oauth2 scope
45
35
  * @memberof Configuration
46
36
  */
47
- accessToken?: string | ((name: string, scopes?: string[]) => string);
37
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
48
38
  /**
49
39
  * override base path
50
40
  *
@@ -59,5 +49,24 @@ export declare class Configuration {
59
49
  * @memberof Configuration
60
50
  */
61
51
  baseOptions?: any;
52
+ /**
53
+ * The FormData constructor that will be used to create multipart form data
54
+ * requests. You can inject this here so that execution environments that
55
+ * do not support the FormData class can still run the generated client.
56
+ *
57
+ * @type {new () => FormData}
58
+ */
59
+ formDataCtor?: new () => any;
62
60
  constructor(param?: ConfigurationParameters);
61
+ /**
62
+ * Check if the given MIME is a JSON MIME.
63
+ * JSON MIME examples:
64
+ * application/json
65
+ * application/json; charset=UTF8
66
+ * APPLICATION/JSON
67
+ * application/vnd.company+json
68
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
69
+ * @return True if the given MIME is JSON, false otherwise.
70
+ */
71
+ isJsonMime(mime: string): boolean;
63
72
  }
@@ -1,17 +1,8 @@
1
1
  "use strict";
2
- // tslint:disable
3
- /**
4
- * API V1
5
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
- *
7
- * OpenAPI spec version: 1.0.0
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
14
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.Configuration = void 0;
15
6
  var Configuration = /** @class */ (function () {
16
7
  function Configuration(param) {
17
8
  if (param === void 0) { param = {}; }
@@ -20,7 +11,23 @@ var Configuration = /** @class */ (function () {
20
11
  this.password = param.password;
21
12
  this.accessToken = param.accessToken;
22
13
  this.basePath = param.basePath;
14
+ this.baseOptions = param.baseOptions;
15
+ this.formDataCtor = param.formDataCtor;
23
16
  }
17
+ /**
18
+ * Check if the given MIME is a JSON MIME.
19
+ * JSON MIME examples:
20
+ * application/json
21
+ * application/json; charset=UTF8
22
+ * APPLICATION/JSON
23
+ * application/vnd.company+json
24
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
25
+ * @return True if the given MIME is JSON, false otherwise.
26
+ */
27
+ Configuration.prototype.isJsonMime = function (mime) {
28
+ var jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
29
+ return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
30
+ };
24
31
  return Configuration;
25
32
  }());
26
33
  exports.Configuration = Configuration;
package/dist/index.d.ts CHANGED
@@ -1,13 +1,27 @@
1
- /**
2
- * API V1
3
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
- *
5
- * OpenAPI spec version: 1.0.0
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- export * from "./api";
13
- export * from "./configuration";
1
+ export * from './utils/base';
2
+ export * from './utils/common';
3
+ export * from './utils/configuration';
4
+ export * from './types';
5
+ export { default as eventResourceV1GetEventsParamCreator } from './EventResourceV1GetEvents';
6
+ export { default as notificationResourceV1AppendBehaviorGroupToEventTypeParamCreator } from './NotificationResourceV1AppendBehaviorGroupToEventType';
7
+ export { default as notificationResourceV1CreateBehaviorGroupParamCreator } from './NotificationResourceV1CreateBehaviorGroup';
8
+ export { default as notificationResourceV1DeleteBehaviorGroupParamCreator } from './NotificationResourceV1DeleteBehaviorGroup';
9
+ export { default as notificationResourceV1DeleteBehaviorGroupFromEventTypeParamCreator } from './NotificationResourceV1DeleteBehaviorGroupFromEventType';
10
+ export { default as notificationResourceV1FindBehaviorGroupsByBundleIdParamCreator } from './NotificationResourceV1FindBehaviorGroupsByBundleId';
11
+ export { default as notificationResourceV1GetApplicationByNameAndBundleNameParamCreator } from './NotificationResourceV1GetApplicationByNameAndBundleName';
12
+ export { default as notificationResourceV1GetApplicationsFacetsParamCreator } from './NotificationResourceV1GetApplicationsFacets';
13
+ export { default as notificationResourceV1GetBehaviorGroupsAffectedByRemovalOfEndpointParamCreator } from './NotificationResourceV1GetBehaviorGroupsAffectedByRemovalOfEndpoint';
14
+ export { default as notificationResourceV1GetBundleByNameParamCreator } from './NotificationResourceV1GetBundleByName';
15
+ export { default as notificationResourceV1GetBundleFacetsParamCreator } from './NotificationResourceV1GetBundleFacets';
16
+ export { default as notificationResourceV1GetEventTypesParamCreator } from './NotificationResourceV1GetEventTypes';
17
+ export { default as notificationResourceV1GetEventTypesAffectedByRemovalOfBehaviorGroupParamCreator } from './NotificationResourceV1GetEventTypesAffectedByRemovalOfBehaviorGroup';
18
+ export { default as notificationResourceV1GetEventTypesByNameAndBundleAndApplicationNameParamCreator } from './NotificationResourceV1GetEventTypesByNameAndBundleAndApplicationName';
19
+ export { default as notificationResourceV1GetLinkedBehaviorGroupsParamCreator } from './NotificationResourceV1GetLinkedBehaviorGroups';
20
+ export { default as notificationResourceV1UpdateBehaviorGroupParamCreator } from './NotificationResourceV1UpdateBehaviorGroup';
21
+ export { default as notificationResourceV1UpdateBehaviorGroupActionsParamCreator } from './NotificationResourceV1UpdateBehaviorGroupActions';
22
+ export { default as notificationResourceV1UpdateEventTypeBehaviorsParamCreator } from './NotificationResourceV1UpdateEventTypeBehaviors';
23
+ export { default as orgConfigResourceV1GetDailyDigestTimePreferenceParamCreator } from './OrgConfigResourceV1GetDailyDigestTimePreference';
24
+ export { default as orgConfigResourceV1SaveDailyDigestTimePreferenceParamCreator } from './OrgConfigResourceV1SaveDailyDigestTimePreference';
25
+ export { default as userConfigResourceV1GetPreferencesParamCreator } from './UserConfigResourceV1GetPreferences';
26
+ export { default as userConfigResourceV1GetSettingsSchemaParamCreator } from './UserConfigResourceV1GetSettingsSchema';
27
+ export { default as userConfigResourceV1SaveSettingsParamCreator } from './UserConfigResourceV1SaveSettings';