@redhat-cloud-services/notifications-client 2.3.2 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/dist/DrawerResourceV1GetDrawerEntries/index.d.ts +1 -1
  4. package/dist/DrawerResourceV1GetDrawerEntries/index.d.ts.map +1 -1
  5. package/dist/DrawerResourceV1GetDrawerEntries/index.js +1 -1
  6. package/dist/DrawerResourceV1GetDrawerEntries/index.js.map +1 -1
  7. package/dist/DrawerResourceV1UpdateNotificationReadStatus/index.d.ts +1 -1
  8. package/dist/DrawerResourceV1UpdateNotificationReadStatus/index.d.ts.map +1 -1
  9. package/dist/DrawerResourceV1UpdateNotificationReadStatus/index.js +1 -1
  10. package/dist/DrawerResourceV1UpdateNotificationReadStatus/index.js.map +1 -1
  11. package/dist/EventResourceV1GetEvents/index.d.ts +2 -2
  12. package/dist/EventResourceV1GetEvents/index.d.ts.map +1 -1
  13. package/dist/EventResourceV1GetEvents/index.js +2 -2
  14. package/dist/EventResourceV1GetEvents/index.js.map +1 -1
  15. package/dist/NotificationResourceV1AppendBehaviorGroupToEventType/index.d.ts +1 -1
  16. package/dist/NotificationResourceV1AppendBehaviorGroupToEventType/index.d.ts.map +1 -1
  17. package/dist/NotificationResourceV1AppendBehaviorGroupToEventType/index.js +1 -1
  18. package/dist/NotificationResourceV1AppendBehaviorGroupToEventType/index.js.map +1 -1
  19. package/dist/NotificationResourceV1CreateBehaviorGroup/index.d.ts +1 -1
  20. package/dist/NotificationResourceV1CreateBehaviorGroup/index.d.ts.map +1 -1
  21. package/dist/NotificationResourceV1CreateBehaviorGroup/index.js +1 -1
  22. package/dist/NotificationResourceV1CreateBehaviorGroup/index.js.map +1 -1
  23. package/dist/NotificationResourceV1DeleteBehaviorGroup/index.d.ts +1 -1
  24. package/dist/NotificationResourceV1DeleteBehaviorGroup/index.d.ts.map +1 -1
  25. package/dist/NotificationResourceV1DeleteBehaviorGroup/index.js +1 -1
  26. package/dist/NotificationResourceV1DeleteBehaviorGroup/index.js.map +1 -1
  27. package/dist/NotificationResourceV1DeleteBehaviorGroupFromEventType/index.d.ts +1 -1
  28. package/dist/NotificationResourceV1DeleteBehaviorGroupFromEventType/index.d.ts.map +1 -1
  29. package/dist/NotificationResourceV1DeleteBehaviorGroupFromEventType/index.js +1 -1
  30. package/dist/NotificationResourceV1DeleteBehaviorGroupFromEventType/index.js.map +1 -1
  31. package/dist/NotificationResourceV1FindBehaviorGroupsByBundleId/index.d.ts +1 -1
  32. package/dist/NotificationResourceV1FindBehaviorGroupsByBundleId/index.d.ts.map +1 -1
  33. package/dist/NotificationResourceV1FindBehaviorGroupsByBundleId/index.js +1 -1
  34. package/dist/NotificationResourceV1FindBehaviorGroupsByBundleId/index.js.map +1 -1
  35. package/dist/NotificationResourceV1GetApplicationByNameAndBundleName/index.d.ts +2 -2
  36. package/dist/NotificationResourceV1GetApplicationByNameAndBundleName/index.d.ts.map +1 -1
  37. package/dist/NotificationResourceV1GetApplicationByNameAndBundleName/index.js +2 -2
  38. package/dist/NotificationResourceV1GetApplicationByNameAndBundleName/index.js.map +1 -1
  39. package/dist/NotificationResourceV1GetApplicationsFacets/index.d.ts +2 -2
  40. package/dist/NotificationResourceV1GetApplicationsFacets/index.d.ts.map +1 -1
  41. package/dist/NotificationResourceV1GetApplicationsFacets/index.js +2 -2
  42. package/dist/NotificationResourceV1GetApplicationsFacets/index.js.map +1 -1
  43. package/dist/NotificationResourceV1GetBehaviorGroupsAffectedByRemovalOfEndpoint/index.d.ts +1 -1
  44. package/dist/NotificationResourceV1GetBehaviorGroupsAffectedByRemovalOfEndpoint/index.d.ts.map +1 -1
  45. package/dist/NotificationResourceV1GetBehaviorGroupsAffectedByRemovalOfEndpoint/index.js +1 -1
  46. package/dist/NotificationResourceV1GetBehaviorGroupsAffectedByRemovalOfEndpoint/index.js.map +1 -1
  47. package/dist/NotificationResourceV1GetBundleByName/index.d.ts +1 -1
  48. package/dist/NotificationResourceV1GetBundleByName/index.d.ts.map +1 -1
  49. package/dist/NotificationResourceV1GetBundleByName/index.js +1 -1
  50. package/dist/NotificationResourceV1GetBundleByName/index.js.map +1 -1
  51. package/dist/NotificationResourceV1GetBundleFacets/index.d.ts +2 -2
  52. package/dist/NotificationResourceV1GetBundleFacets/index.d.ts.map +1 -1
  53. package/dist/NotificationResourceV1GetBundleFacets/index.js +2 -2
  54. package/dist/NotificationResourceV1GetBundleFacets/index.js.map +1 -1
  55. package/dist/NotificationResourceV1GetEventTypes/index.d.ts +2 -2
  56. package/dist/NotificationResourceV1GetEventTypes/index.d.ts.map +1 -1
  57. package/dist/NotificationResourceV1GetEventTypes/index.js +2 -2
  58. package/dist/NotificationResourceV1GetEventTypes/index.js.map +1 -1
  59. package/dist/NotificationResourceV1GetEventTypesAffectedByRemovalOfBehaviorGroup/index.d.ts +1 -1
  60. package/dist/NotificationResourceV1GetEventTypesAffectedByRemovalOfBehaviorGroup/index.d.ts.map +1 -1
  61. package/dist/NotificationResourceV1GetEventTypesAffectedByRemovalOfBehaviorGroup/index.js +1 -1
  62. package/dist/NotificationResourceV1GetEventTypesAffectedByRemovalOfBehaviorGroup/index.js.map +1 -1
  63. package/dist/NotificationResourceV1GetEventTypesByNameAndBundleAndApplicationName/index.d.ts +2 -2
  64. package/dist/NotificationResourceV1GetEventTypesByNameAndBundleAndApplicationName/index.d.ts.map +1 -1
  65. package/dist/NotificationResourceV1GetEventTypesByNameAndBundleAndApplicationName/index.js +2 -2
  66. package/dist/NotificationResourceV1GetEventTypesByNameAndBundleAndApplicationName/index.js.map +1 -1
  67. package/dist/NotificationResourceV1GetLinkedBehaviorGroups/index.d.ts +1 -1
  68. package/dist/NotificationResourceV1GetLinkedBehaviorGroups/index.d.ts.map +1 -1
  69. package/dist/NotificationResourceV1GetLinkedBehaviorGroups/index.js +1 -1
  70. package/dist/NotificationResourceV1GetLinkedBehaviorGroups/index.js.map +1 -1
  71. package/dist/NotificationResourceV1UpdateBehaviorGroup/index.d.ts +2 -2
  72. package/dist/NotificationResourceV1UpdateBehaviorGroup/index.d.ts.map +1 -1
  73. package/dist/NotificationResourceV1UpdateBehaviorGroup/index.js +1 -1
  74. package/dist/NotificationResourceV1UpdateBehaviorGroup/index.js.map +1 -1
  75. package/dist/NotificationResourceV1UpdateBehaviorGroupActions/index.d.ts +2 -2
  76. package/dist/NotificationResourceV1UpdateBehaviorGroupActions/index.d.ts.map +1 -1
  77. package/dist/NotificationResourceV1UpdateBehaviorGroupActions/index.js +2 -2
  78. package/dist/NotificationResourceV1UpdateBehaviorGroupActions/index.js.map +1 -1
  79. package/dist/NotificationResourceV1UpdateEventTypeBehaviors/index.d.ts +1 -1
  80. package/dist/NotificationResourceV1UpdateEventTypeBehaviors/index.d.ts.map +1 -1
  81. package/dist/NotificationResourceV1UpdateEventTypeBehaviors/index.js +1 -1
  82. package/dist/NotificationResourceV1UpdateEventTypeBehaviors/index.js.map +1 -1
  83. package/dist/OrgConfigResourceV1GetDailyDigestTimePreference/index.d.ts +1 -1
  84. package/dist/OrgConfigResourceV1GetDailyDigestTimePreference/index.d.ts.map +1 -1
  85. package/dist/OrgConfigResourceV1GetDailyDigestTimePreference/index.js +1 -1
  86. package/dist/OrgConfigResourceV1GetDailyDigestTimePreference/index.js.map +1 -1
  87. package/dist/OrgConfigResourceV1SaveDailyDigestTimePreference/index.d.ts +1 -1
  88. package/dist/OrgConfigResourceV1SaveDailyDigestTimePreference/index.d.ts.map +1 -1
  89. package/dist/OrgConfigResourceV1SaveDailyDigestTimePreference/index.js +1 -1
  90. package/dist/OrgConfigResourceV1SaveDailyDigestTimePreference/index.js.map +1 -1
  91. package/dist/api.d.ts +76 -70
  92. package/dist/api.d.ts.map +1 -1
  93. package/dist/api.js +34 -34
  94. package/dist/api.js.map +1 -1
  95. package/dist/base.d.ts +2 -2
  96. package/dist/base.js +1 -1
  97. package/dist/common.d.ts +1 -1
  98. package/dist/common.js +1 -1
  99. package/dist/configuration.d.ts +1 -1
  100. package/dist/index.d.ts +0 -3
  101. package/dist/index.d.ts.map +1 -1
  102. package/dist/index.js +0 -3
  103. package/dist/index.js.map +1 -1
  104. package/dist/types/index.d.ts +43 -37
  105. package/dist/types/index.d.ts.map +1 -1
  106. package/dist/types/index.js.map +1 -1
  107. package/doc/README.md +28 -56
  108. package/doc/classes/index.BaseAPI.md +73 -0
  109. package/doc/classes/{RequiredError.md → index.RequiredError.md} +15 -13
  110. package/doc/enums/{EndpointStatus.md → types.EndpointStatus.md} +9 -7
  111. package/doc/enums/{EndpointType.md → types.EndpointType.md} +8 -6
  112. package/doc/enums/{Environment.md → types.Environment.md} +7 -5
  113. package/doc/enums/{EventLogEntryActionStatus.md → types.EventLogEntryActionStatus.md} +8 -6
  114. package/doc/enums/types.HttpType.md +45 -0
  115. package/doc/enums/types.NotificationStatus.md +67 -0
  116. package/doc/enums/types.Status.md +34 -0
  117. package/doc/enums/types.SubscriptionType.md +45 -0
  118. package/doc/interfaces/index.RequestArgs.md +36 -0
  119. package/doc/interfaces/{AddAccessRequest.md → types.AddAccessRequest.md} +5 -3
  120. package/doc/interfaces/{AddApplicationRequest.md → types.AddApplicationRequest.md} +7 -5
  121. package/doc/interfaces/{AggregationEmailTemplate.md → types.AggregationEmailTemplate.md} +17 -15
  122. package/doc/interfaces/{AggregationEmailTemplateSubjectTemplate.md → types.AggregationEmailTemplateSubjectTemplate.md} +9 -7
  123. package/doc/interfaces/{Application.md → types.Application.md} +9 -7
  124. package/doc/interfaces/{Application1.md → types.Application1.md} +5 -3
  125. package/doc/interfaces/{ApplicationDTO.md → types.ApplicationDTO.md} +9 -7
  126. package/doc/interfaces/{ApplicationSettingsValue.md → types.ApplicationSettingsValue.md} +5 -3
  127. package/doc/interfaces/{BasicAuthentication.md → types.BasicAuthentication.md} +5 -3
  128. package/doc/interfaces/{BehaviorGroup.md → types.BehaviorGroup.md} +15 -13
  129. package/doc/interfaces/{BehaviorGroupAction.md → types.BehaviorGroupAction.md} +8 -6
  130. package/doc/interfaces/{BehaviorGroupActionId.md → types.BehaviorGroupActionId.md} +5 -3
  131. package/doc/interfaces/{Bundle.md → types.Bundle.md} +8 -6
  132. package/doc/interfaces/{BundleSettingsValue.md → types.BundleSettingsValue.md} +5 -3
  133. package/doc/interfaces/{CamelProperties.md → types.CamelProperties.md} +19 -17
  134. package/doc/interfaces/{CreateBehaviorGroupRequest.md → types.CreateBehaviorGroupRequest.md} +9 -7
  135. package/doc/interfaces/{CreateBehaviorGroupResponse.md → types.CreateBehaviorGroupResponse.md} +9 -7
  136. package/doc/interfaces/{CurrentStatus.md → types.CurrentStatus.md} +11 -9
  137. package/doc/interfaces/{DrawerEntryPayload.md → types.DrawerEntryPayload.md} +10 -8
  138. package/doc/interfaces/{DuplicateNameMigrationReport.md → types.DuplicateNameMigrationReport.md} +5 -3
  139. package/doc/interfaces/{Endpoint.md → types.Endpoint.md} +16 -14
  140. package/doc/interfaces/{EndpointPage.md → types.EndpointPage.md} +8 -6
  141. package/doc/interfaces/{EndpointTestRequest.md → types.EndpointTestRequest.md} +4 -2
  142. package/doc/interfaces/{EventLogEntry.md → types.EventLogEntry.md} +11 -9
  143. package/doc/interfaces/{EventLogEntryAction.md → types.EventLogEntryAction.md} +12 -10
  144. package/doc/interfaces/{EventType.md → types.EventType.md} +32 -15
  145. package/doc/interfaces/{EventTypeBehavior.md → types.EventTypeBehavior.md} +11 -9
  146. package/doc/interfaces/{EventTypeBehaviorId.md → types.EventTypeBehaviorId.md} +7 -5
  147. package/doc/interfaces/{EventTypeSettingsValue.md → types.EventTypeSettingsValue.md} +9 -7
  148. package/doc/interfaces/{Facet.md → types.Facet.md} +12 -10
  149. package/doc/interfaces/{InstantEmailTemplate.md → types.InstantEmailTemplate.md} +24 -22
  150. package/doc/interfaces/{InternalApplicationUserPermission.md → types.InternalApplicationUserPermission.md} +9 -7
  151. package/doc/interfaces/{InternalRoleAccess.md → types.InternalRoleAccess.md} +13 -11
  152. package/doc/interfaces/{InternalUserPermissions.md → types.InternalUserPermissions.md} +14 -12
  153. package/doc/interfaces/{MessageValidationResponse.md → types.MessageValidationResponse.md} +5 -3
  154. package/doc/interfaces/types.Meta.md +29 -0
  155. package/doc/interfaces/{NotificationHistory.md → types.NotificationHistory.md} +23 -21
  156. package/doc/interfaces/{PageBehaviorGroup.md → types.PageBehaviorGroup.md} +11 -9
  157. package/doc/interfaces/{PageDrawerEntryPayload.md → types.PageDrawerEntryPayload.md} +11 -9
  158. package/doc/interfaces/{PageEventLogEntry.md → types.PageEventLogEntry.md} +11 -9
  159. package/doc/interfaces/{PageEventType.md → types.PageEventType.md} +11 -9
  160. package/doc/interfaces/{PageNotificationHistory.md → types.PageNotificationHistory.md} +11 -9
  161. package/doc/interfaces/{RenderEmailTemplateRequest.md → types.RenderEmailTemplateRequest.md} +7 -5
  162. package/doc/interfaces/{RequestDefaultBehaviorGroupPropertyList.md → types.RequestDefaultBehaviorGroupPropertyList.md} +7 -5
  163. package/doc/interfaces/types.RequestSystemSubscriptionProperties.md +44 -0
  164. package/doc/interfaces/types.ServerInfo.md +29 -0
  165. package/doc/interfaces/types.SettingsValuesByEventType.md +33 -0
  166. package/doc/interfaces/{SystemSubscriptionProperties.md → types.SystemSubscriptionProperties.md} +13 -11
  167. package/doc/interfaces/{Template.md → types.Template.md} +15 -13
  168. package/doc/interfaces/{TriggerDailyDigestRequest.md → types.TriggerDailyDigestRequest.md} +13 -11
  169. package/doc/interfaces/{UpdateApplicationRequest.md → types.UpdateApplicationRequest.md} +9 -7
  170. package/doc/interfaces/{UpdateBehaviorGroupRequest.md → types.UpdateBehaviorGroupRequest.md} +11 -9
  171. package/doc/interfaces/types.UpdateNotificationDrawerStatus.md +44 -0
  172. package/doc/interfaces/{WebhookProperties.md → types.WebhookProperties.md} +24 -22
  173. package/doc/interfaces/{X509Certificate.md → types.X509Certificate.md} +13 -11
  174. package/doc/modules/DrawerResourceV1GetDrawerEntries.md +78 -0
  175. package/doc/modules/DrawerResourceV1UpdateNotificationReadStatus.md +68 -0
  176. package/doc/modules/EventResourceV1GetEvents.md +83 -0
  177. package/doc/modules/NotificationResourceV1AppendBehaviorGroupToEventType.md +67 -0
  178. package/doc/modules/NotificationResourceV1CreateBehaviorGroup.md +68 -0
  179. package/doc/modules/NotificationResourceV1DeleteBehaviorGroup.md +68 -0
  180. package/doc/modules/NotificationResourceV1DeleteBehaviorGroupFromEventType.md +69 -0
  181. package/doc/modules/NotificationResourceV1FindBehaviorGroupsByBundleId.md +68 -0
  182. package/doc/modules/NotificationResourceV1GetApplicationByNameAndBundleName.md +69 -0
  183. package/doc/modules/NotificationResourceV1GetApplicationsFacets.md +68 -0
  184. package/doc/modules/NotificationResourceV1GetBehaviorGroupsAffectedByRemovalOfEndpoint.md +68 -0
  185. package/doc/modules/NotificationResourceV1GetBundleByName.md +68 -0
  186. package/doc/modules/NotificationResourceV1GetBundleFacets.md +68 -0
  187. package/doc/modules/NotificationResourceV1GetEventTypes.md +75 -0
  188. package/doc/modules/NotificationResourceV1GetEventTypesAffectedByRemovalOfBehaviorGroup.md +68 -0
  189. package/doc/modules/NotificationResourceV1GetEventTypesByNameAndBundleAndApplicationName.md +70 -0
  190. package/doc/modules/NotificationResourceV1GetLinkedBehaviorGroups.md +73 -0
  191. package/doc/modules/NotificationResourceV1UpdateBehaviorGroup.md +69 -0
  192. package/doc/modules/NotificationResourceV1UpdateBehaviorGroupActions.md +69 -0
  193. package/doc/modules/NotificationResourceV1UpdateEventTypeBehaviors.md +69 -0
  194. package/doc/modules/OrgConfigResourceV1GetDailyDigestTimePreference.md +67 -0
  195. package/doc/modules/OrgConfigResourceV1SaveDailyDigestTimePreference.md +68 -0
  196. package/doc/modules/index.md +648 -0
  197. package/doc/modules/types.md +74 -0
  198. package/doc/modules.md +28 -1108
  199. package/package.json +3 -2
  200. package/dist/utils/base.d.ts +0 -85
  201. package/dist/utils/base.d.ts.map +0 -1
  202. package/dist/utils/base.js +0 -191
  203. package/dist/utils/base.js.map +0 -1
  204. package/dist/utils/common.d.ts +0 -55
  205. package/dist/utils/common.d.ts.map +0 -1
  206. package/dist/utils/common.js +0 -196
  207. package/dist/utils/common.js.map +0 -1
  208. package/dist/utils/configuration.d.ts +0 -73
  209. package/dist/utils/configuration.d.ts.map +0 -1
  210. package/dist/utils/configuration.js +0 -34
  211. package/dist/utils/configuration.js.map +0 -1
  212. package/doc/classes/BaseAPI.md +0 -133
  213. package/doc/classes/Configuration.md +0 -202
  214. package/doc/enums/HttpType.md +0 -43
  215. package/doc/enums/NotificationStatus.md +0 -65
  216. package/doc/enums/Status.md +0 -32
  217. package/doc/enums/SubscriptionType.md +0 -43
  218. package/doc/interfaces/ApiConfig.md +0 -30
  219. package/doc/interfaces/ConfigurationParameters.md +0 -93
  220. package/doc/interfaces/Meta.md +0 -27
  221. package/doc/interfaces/RequestArgs.md +0 -56
  222. package/doc/interfaces/RequestSystemSubscriptionProperties.md +0 -42
  223. package/doc/interfaces/ServerInfo.md +0 -27
  224. package/doc/interfaces/SettingsValuesByEventType.md +0 -31
  225. package/doc/interfaces/UpdateNotificationDrawerStatus.md +0 -42
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redhat-cloud-services/notifications-client",
3
- "version": "2.3.2",
3
+ "version": "2.4.1",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "typings": "./dist/index.d.ts",
@@ -24,6 +24,7 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "axios": "^0.27.2",
27
- "tslib": "^2.6.2"
27
+ "tslib": "^2.6.2",
28
+ "@redhat-cloud-services/javascript-clients-shared": "^1.2.2"
28
29
  }
29
30
  }
@@ -1,85 +0,0 @@
1
- import type { Configuration } from './configuration';
2
- import type { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
3
- export declare const BASE_PATH: string;
4
- /**
5
- *
6
- * @export
7
- */
8
- export declare const COLLECTION_FORMATS: {
9
- csv: string;
10
- ssv: string;
11
- tsv: string;
12
- pipes: string;
13
- };
14
- /**
15
- *
16
- * @export
17
- * @interface RequestArgs
18
- */
19
- export interface RequestArgs {
20
- urlObj: URL;
21
- options: AxiosRequestConfig;
22
- auth?: {
23
- authType: AuthTypeEnum;
24
- authKey?: string | [string, string[]];
25
- }[];
26
- serializeData?: unknown;
27
- }
28
- export interface ApiConfig {
29
- axios: AxiosInstance;
30
- configuration?: Configuration;
31
- }
32
- export declare const AuthTypeEnum: {
33
- readonly Basic: "basic";
34
- readonly Bearer: "bearer";
35
- readonly Oauth: "oath";
36
- readonly InHeader: "inHeader";
37
- readonly InQuery: "inQuery";
38
- };
39
- export type AuthTypeEnum = typeof AuthTypeEnum[keyof typeof AuthTypeEnum];
40
- export type ActionType = (...config: any) => Promise<RequestArgs>;
41
- /**
42
- * Base API to store config, basepath and axios instance.
43
- * @export
44
- * @class BaseAPI
45
- */
46
- export declare class BaseAPI {
47
- protected basePath: string;
48
- protected configuration: Configuration | undefined;
49
- protected axios: AxiosInstance;
50
- /**
51
- * Constructor to create baseAPI.
52
- * @param { string } basePath basePath of api requests.
53
- * @param { { axios: AxiosInstance, configuration: Configuration } } config to be passed down to axios.
54
- */
55
- constructor(basePath?: string, config?: ApiConfig);
56
- private authConfig;
57
- /**
58
- * Send axios request
59
- * @param {Promise<RequestArgs>} request to be send trough axios.
60
- * @param {AxiosInstance} axios optional axios instance.
61
- * @returns {Promise<AxiosResponse<T>>} promisable axios response.
62
- */
63
- sendRequest<T>(request: Promise<RequestArgs>, axios?: AxiosInstance, basePath?: string): Promise<AxiosResponse<T>>;
64
- }
65
- /**
66
- *
67
- * Factory for creating API with option to add enpoints to the API.
68
- * @param basePath basePath of api requests.
69
- * @param { { axios: AxiosInstance, configuration: Configuration } } config to be passed down to axios.
70
- * @param actions object with actions to send with axios.
71
- * @returns created base API.
72
- */
73
- export declare const APIFactory: <T extends Record<string, ActionType>>(basePath: string | undefined, config: ApiConfig | undefined, actions: T) => BaseAPI & T;
74
- export default APIFactory;
75
- /**
76
- *
77
- * @export
78
- * @class RequiredError
79
- * @extends {Error}
80
- */
81
- export declare class RequiredError extends Error {
82
- field: string;
83
- constructor(field: string, msg?: string);
84
- }
85
- //# sourceMappingURL=base.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../utils/base.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGrD,OAAO,KAAK,EAAgB,aAAa,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAK5F,eAAO,MAAM,SAAS,QAA2E,CAAC;AAElG;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;CAK9B,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,WAAW;IACxB,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,EAAE,kBAAkB,CAAC;IAC5B,IAAI,CAAC,EAAE;QACL,QAAQ,EAAE,YAAY,CAAC;QACvB,OAAO,CAAC,EAAE,MAAM,GAAG,CAAE,MAAM,EAAE,MAAM,EAAE,CAAE,CAAC;KACzC,EAAE,CAAC;IACJ,aAAa,CAAC,EAAE,OAAO,CAAA;CAC1B;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,aAAa,CAAC;IACrB,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED,eAAO,MAAM,YAAY;;;;;;CAMf,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE1E,MAAM,MAAM,UAAU,GAAG,CAAC,GAAG,MAAM,EAAE,GAAG,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;AAElE;;;;GAIG;AACH,qBAAa,OAAO;IAQJ,SAAS,CAAC,QAAQ,EAAE,MAAM;IAPtC,SAAS,CAAC,aAAa,EAAE,aAAa,GAAG,SAAS,CAAC;IACnD,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC;IACjC;;;;OAIG;gBACqB,QAAQ,GAAE,MAAkB,EAAE,MAAM,GAAE,SAAkC;YAahF,UAAU;IAsBzB;;;;;MAKE;IACY,WAAW,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,EAAE,aAAa,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;CAwBlI;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,gIAWtB,CAAA;AAED,eAAe,UAAU,CAAC;AAE1B;;;;;GAKG;AACH,qBAAa,aAAc,SAAQ,KAAK;IACjB,KAAK,EAAE,MAAM;gBAAb,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;CAIjD"}
@@ -1,191 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.RequiredError = exports.APIFactory = exports.BaseAPI = exports.AuthTypeEnum = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
6
- var tslib_1 = require("tslib");
7
- // @ts-ignore
8
- var common_1 = require("./common");
9
- var axios_1 = require("axios");
10
- exports.BASE_PATH = "https://console.redhat.com//api/notifications/v1.0".replace(/\/+$/, "");
11
- /**
12
- *
13
- * @export
14
- */
15
- exports.COLLECTION_FORMATS = {
16
- csv: ",",
17
- ssv: " ",
18
- tsv: "\t",
19
- pipes: "|",
20
- };
21
- exports.AuthTypeEnum = {
22
- Basic: 'basic',
23
- Bearer: 'bearer',
24
- Oauth: 'oath',
25
- InHeader: 'inHeader',
26
- InQuery: 'inQuery'
27
- };
28
- /**
29
- * Base API to store config, basepath and axios instance.
30
- * @export
31
- * @class BaseAPI
32
- */
33
- var BaseAPI = /** @class */ (function () {
34
- /**
35
- * Constructor to create baseAPI.
36
- * @param { string } basePath basePath of api requests.
37
- * @param { { axios: AxiosInstance, configuration: Configuration } } config to be passed down to axios.
38
- */
39
- function BaseAPI(basePath, config) {
40
- if (basePath === void 0) { basePath = exports.BASE_PATH; }
41
- if (config === void 0) { config = { axios: axios_1.default }; }
42
- this.basePath = basePath;
43
- this.axios = config.axios;
44
- if (config.configuration) {
45
- this.configuration = config.configuration;
46
- this.basePath = config.configuration.basePath || this.basePath;
47
- }
48
- // Object.entries(actions).forEach((entry: [string, ActionType]) => {
49
- // Object.assign(this, {
50
- // [entry[0]]: entry[1]
51
- // })
52
- // })
53
- }
54
- BaseAPI.prototype.authConfig = function (_a) {
55
- var authType = _a.authType, urlObj = _a.urlObj, options = _a.options, authKey = _a.authKey;
56
- return tslib_1.__awaiter(this, void 0, void 0, function () {
57
- var localVarQueryParameter, localVarHeaderParameter, localVarHeaderParameter, localVarHeaderParameter;
58
- return tslib_1.__generator(this, function (_b) {
59
- switch (_b.label) {
60
- case 0:
61
- if (!(authType === exports.AuthTypeEnum.InQuery && typeof authKey === 'string')) return [3 /*break*/, 2];
62
- localVarQueryParameter = {};
63
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, authKey, this.configuration)];
64
- case 1:
65
- _b.sent();
66
- (0, common_1.setSearchParams)(urlObj, localVarQueryParameter);
67
- return [3 /*break*/, 9];
68
- case 2:
69
- if (!(authType === exports.AuthTypeEnum.InHeader && typeof authKey === 'string')) return [3 /*break*/, 4];
70
- localVarHeaderParameter = {};
71
- return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, authKey, this.configuration)];
72
- case 3:
73
- _b.sent();
74
- options.headers = tslib_1.__assign(tslib_1.__assign({}, options.headers), localVarHeaderParameter);
75
- return [3 /*break*/, 9];
76
- case 4:
77
- if (!(authType === exports.AuthTypeEnum.Basic)) return [3 /*break*/, 5];
78
- (0, common_1.setBasicAuthToObject)(options, this.configuration);
79
- return [3 /*break*/, 9];
80
- case 5:
81
- if (!(authType === exports.AuthTypeEnum.Bearer)) return [3 /*break*/, 7];
82
- localVarHeaderParameter = {};
83
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, this.configuration)];
84
- case 6:
85
- _b.sent();
86
- options.headers = tslib_1.__assign(tslib_1.__assign({}, options.headers), localVarHeaderParameter);
87
- return [3 /*break*/, 9];
88
- case 7:
89
- if (!(authType === exports.AuthTypeEnum.Oauth)) return [3 /*break*/, 9];
90
- localVarHeaderParameter = {};
91
- return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, authKey[0], authKey[1], this.configuration)];
92
- case 8:
93
- _b.sent();
94
- options.headers = tslib_1.__assign(tslib_1.__assign({}, options.headers), localVarHeaderParameter);
95
- _b.label = 9;
96
- case 9: return [2 /*return*/];
97
- }
98
- });
99
- });
100
- };
101
- /**
102
- * Send axios request
103
- * @param {Promise<RequestArgs>} request to be send trough axios.
104
- * @param {AxiosInstance} axios optional axios instance.
105
- * @returns {Promise<AxiosResponse<T>>} promisable axios response.
106
- */
107
- BaseAPI.prototype.sendRequest = function (request, axios, basePath) {
108
- return tslib_1.__awaiter(this, void 0, void 0, function () {
109
- var _a, auth, urlObj, options, serializeData, axiosRequestArgs;
110
- var _this = this;
111
- return tslib_1.__generator(this, function (_b) {
112
- switch (_b.label) {
113
- case 0: return [4 /*yield*/, request];
114
- case 1:
115
- _a = _b.sent(), auth = _a.auth, urlObj = _a.urlObj, options = _a.options, serializeData = _a.serializeData;
116
- auth === null || auth === void 0 ? void 0 : auth.forEach(function (_a) {
117
- var authType = _a.authType, authKey = _a.authKey;
118
- return tslib_1.__awaiter(_this, void 0, void 0, function () {
119
- return tslib_1.__generator(this, function (_b) {
120
- switch (_b.label) {
121
- case 0: return [4 /*yield*/, this.authConfig({ authType: authType, urlObj: urlObj, options: options, authKey: authKey })];
122
- case 1:
123
- _b.sent();
124
- return [2 /*return*/];
125
- }
126
- });
127
- });
128
- });
129
- if (serializeData) {
130
- options.data = (0, common_1.serializeDataIfNeeded)(serializeData, options, this.configuration);
131
- }
132
- axiosRequestArgs = tslib_1.__assign(tslib_1.__assign({}, options), { url: (this.basePath || basePath) + (0, common_1.toPathString)(urlObj) });
133
- return [2 /*return*/, (axios || this.axios).request(axiosRequestArgs)];
134
- }
135
- });
136
- });
137
- };
138
- return BaseAPI;
139
- }());
140
- exports.BaseAPI = BaseAPI;
141
- ;
142
- /**
143
- *
144
- * Factory for creating API with option to add enpoints to the API.
145
- * @param basePath basePath of api requests.
146
- * @param { { axios: AxiosInstance, configuration: Configuration } } config to be passed down to axios.
147
- * @param actions object with actions to send with axios.
148
- * @returns created base API.
149
- */
150
- var APIFactory = function (basePath, config, actions) {
151
- if (basePath === void 0) { basePath = exports.BASE_PATH; }
152
- if (config === void 0) { config = { axios: axios_1.default }; }
153
- var api = new BaseAPI(basePath, config);
154
- var _loop_1 = function (key) {
155
- var _b;
156
- var method = actions[key];
157
- Object.assign(api, (_b = {}, _b[key] = function () {
158
- var args = [];
159
- for (var _i = 0; _i < arguments.length; _i++) {
160
- args[_i] = arguments[_i];
161
- }
162
- var request = method.apply(void 0, args);
163
- return api.sendRequest(request);
164
- }, _b));
165
- };
166
- for (var _i = 0, _a = Object.keys(actions); _i < _a.length; _i++) {
167
- var key = _a[_i];
168
- _loop_1(key);
169
- }
170
- return api;
171
- };
172
- exports.APIFactory = APIFactory;
173
- exports.default = exports.APIFactory;
174
- /**
175
- *
176
- * @export
177
- * @class RequiredError
178
- * @extends {Error}
179
- */
180
- var RequiredError = /** @class */ (function (_super) {
181
- tslib_1.__extends(RequiredError, _super);
182
- function RequiredError(field, msg) {
183
- var _this = _super.call(this, msg) || this;
184
- _this.field = field;
185
- _this.name = "RequiredError";
186
- return _this;
187
- }
188
- return RequiredError;
189
- }(Error));
190
- exports.RequiredError = RequiredError;
191
- //# sourceMappingURL=base.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../utils/base.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;;;;AAMpB,aAAa;AACb,mCAA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AAC,GAAG,CAAC,CAAC;QAC5B,MAAM,CAAC,MAAM,CAAC,GAAG,YAAI,GAAC,GAAG,IAAG;YAAC,cAAkB;iBAAlB,UAAkB,EAAlB,qBAAkB,EAAlB,IAAkB;gBAAlB,yBAAkB;;YAC7C,IAAM,OAAO,GAAyB,MAAM,eAAI,IAAW,CAAC,CAAC;YAC7D,OAAO,GAAG,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAClC,CAAC,MAAG,CAAC;;IALP,KAAkB,UAAoB,EAApB,KAAA,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAApB,cAAoB,EAApB,IAAoB;QAAjC,IAAM,GAAG,SAAA;gBAAH,GAAG;KAMb;IAED,OAAO,GAAkB,CAAC;AAC5B,CAAC,CAAA;AAXY,QAAA,UAAU,cAWtB;AAED,kBAAe,kBAAU,CAAC;AAE1B;;;;;GAKG;AACH;IAAmC,yCAAK;IACpC,uBAAmB,KAAa,EAAE,GAAY;QAA9C,YACI,kBAAM,GAAG,CAAC,SAEb;QAHkB,WAAK,GAAL,KAAK,CAAQ;QAE5B,KAAI,CAAC,IAAI,GAAG,eAAe,CAAA;;IAC/B,CAAC;IACL,oBAAC;AAAD,CAAC,AALD,CAAmC,KAAK,GAKvC;AALY,sCAAa"}
@@ -1,55 +0,0 @@
1
- import type { Configuration } from "./configuration";
2
- import type { RequestArgs } from "./base";
3
- import type { AxiosInstance, AxiosResponse } from 'axios';
4
- /**
5
- *
6
- * @export
7
- */
8
- export declare const DUMMY_BASE_URL = "https://example.com";
9
- /**
10
- *
11
- * @throws {RequiredError}
12
- * @export
13
- */
14
- export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
15
- /**
16
- *
17
- * @export
18
- */
19
- export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
20
- /**
21
- *
22
- * @export
23
- */
24
- export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
25
- /**
26
- *
27
- * @export
28
- */
29
- export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
30
- /**
31
- *
32
- * @export
33
- */
34
- export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
35
- /**
36
- *
37
- * @export
38
- */
39
- export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
40
- /**
41
- *
42
- * @export
43
- */
44
- export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
45
- /**
46
- *
47
- * @export
48
- */
49
- export declare const toPathString: (url: URL) => string;
50
- /**
51
- *
52
- * @export
53
- */
54
- export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
55
- //# sourceMappingURL=common.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../utils/common.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG1D;;;GAGG;AACH,eAAO,MAAM,cAAc,wBAAwB,CAAA;AAEnD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,iBAA2B,MAAM,aAAa,MAAM,cAAc,OAAO,SAItG,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,WAA2B,GAAG,gBAAgB,MAAM,kBAAkB,aAAa,kBAOhH,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,WAAqB,GAAG,kBAAkB,aAAa,SAIvF,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,WAA2B,GAAG,kBAAkB,aAAa,kBAO9F,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,WAA2B,GAAG,QAAQ,MAAM,UAAU,MAAM,EAAE,kBAAkB,aAAa,kBAOzH,CAAA;AAwBD;;;GAGG;AACH,eAAO,MAAM,eAAe,QAAkB,GAAG,cAAc,GAAG,EAAE,SAInE,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,UAAoB,GAAG,kBAAkB,GAAG,kBAAkB,aAAa,QAQ5G,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,QAAkB,GAAG,WAE7C,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,cAAwB,WAAW,eAAe,aAAa,aAAa,MAAM,kBAAkB,aAAa,sDAC7F,aAAa,aAA0B,MAAM,eAIlG,CAAA"}
@@ -1,196 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
6
- var tslib_1 = require("tslib");
7
- var base_1 = require("./base");
8
- /**
9
- *
10
- * @export
11
- */
12
- exports.DUMMY_BASE_URL = 'https://example.com';
13
- /**
14
- *
15
- * @throws {RequiredError}
16
- * @export
17
- */
18
- var assertParamExists = function (functionName, paramName, paramValue) {
19
- if (paramValue === null || paramValue === undefined) {
20
- throw new base_1.RequiredError(paramName, "Required parameter ".concat(paramName, " was null or undefined when calling ").concat(functionName, "."));
21
- }
22
- };
23
- exports.assertParamExists = assertParamExists;
24
- /**
25
- *
26
- * @export
27
- */
28
- var setApiKeyToObject = function (object, keyParamName, configuration) {
29
- return tslib_1.__awaiter(this, void 0, void 0, function () {
30
- var localVarApiKeyValue, _a;
31
- return tslib_1.__generator(this, function (_b) {
32
- switch (_b.label) {
33
- case 0:
34
- if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
35
- if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
36
- return [4 /*yield*/, configuration.apiKey(keyParamName)];
37
- case 1:
38
- _a = _b.sent();
39
- return [3 /*break*/, 4];
40
- case 2: return [4 /*yield*/, configuration.apiKey];
41
- case 3:
42
- _a = _b.sent();
43
- _b.label = 4;
44
- case 4:
45
- localVarApiKeyValue = _a;
46
- object[keyParamName] = localVarApiKeyValue;
47
- _b.label = 5;
48
- case 5: return [2 /*return*/];
49
- }
50
- });
51
- });
52
- };
53
- exports.setApiKeyToObject = setApiKeyToObject;
54
- /**
55
- *
56
- * @export
57
- */
58
- var setBasicAuthToObject = function (object, configuration) {
59
- if (configuration && (configuration.username || configuration.password)) {
60
- object["auth"] = { username: configuration.username, password: configuration.password };
61
- }
62
- };
63
- exports.setBasicAuthToObject = setBasicAuthToObject;
64
- /**
65
- *
66
- * @export
67
- */
68
- var setBearerAuthToObject = function (object, configuration) {
69
- return tslib_1.__awaiter(this, void 0, void 0, function () {
70
- var accessToken, _a;
71
- return tslib_1.__generator(this, function (_b) {
72
- switch (_b.label) {
73
- case 0:
74
- if (!(configuration && configuration.accessToken)) return [3 /*break*/, 5];
75
- if (!(typeof configuration.accessToken === 'function')) return [3 /*break*/, 2];
76
- return [4 /*yield*/, configuration.accessToken()];
77
- case 1:
78
- _a = _b.sent();
79
- return [3 /*break*/, 4];
80
- case 2: return [4 /*yield*/, configuration.accessToken];
81
- case 3:
82
- _a = _b.sent();
83
- _b.label = 4;
84
- case 4:
85
- accessToken = _a;
86
- object["Authorization"] = "Bearer " + accessToken;
87
- _b.label = 5;
88
- case 5: return [2 /*return*/];
89
- }
90
- });
91
- });
92
- };
93
- exports.setBearerAuthToObject = setBearerAuthToObject;
94
- /**
95
- *
96
- * @export
97
- */
98
- var setOAuthToObject = function (object, name, scopes, configuration) {
99
- return tslib_1.__awaiter(this, void 0, void 0, function () {
100
- var localVarAccessTokenValue, _a;
101
- return tslib_1.__generator(this, function (_b) {
102
- switch (_b.label) {
103
- case 0:
104
- if (!(configuration && configuration.accessToken)) return [3 /*break*/, 5];
105
- if (!(typeof configuration.accessToken === 'function')) return [3 /*break*/, 2];
106
- return [4 /*yield*/, configuration.accessToken(name, scopes)];
107
- case 1:
108
- _a = _b.sent();
109
- return [3 /*break*/, 4];
110
- case 2: return [4 /*yield*/, configuration.accessToken];
111
- case 3:
112
- _a = _b.sent();
113
- _b.label = 4;
114
- case 4:
115
- localVarAccessTokenValue = _a;
116
- object["Authorization"] = "Bearer " + localVarAccessTokenValue;
117
- _b.label = 5;
118
- case 5: return [2 /*return*/];
119
- }
120
- });
121
- });
122
- };
123
- exports.setOAuthToObject = setOAuthToObject;
124
- function setFlattenedQueryParams(urlSearchParams, parameter, key) {
125
- if (key === void 0) { key = ""; }
126
- if (parameter == null)
127
- return;
128
- if (typeof parameter === "object") {
129
- if (Array.isArray(parameter)) {
130
- parameter.forEach(function (item) { return setFlattenedQueryParams(urlSearchParams, item, key); });
131
- }
132
- else {
133
- Object.keys(parameter).forEach(function (currentKey) {
134
- return setFlattenedQueryParams(urlSearchParams, parameter[currentKey], "".concat(key).concat(key !== '' ? '.' : '').concat(currentKey));
135
- });
136
- }
137
- }
138
- else {
139
- if (urlSearchParams.has(key)) {
140
- urlSearchParams.append(key, parameter);
141
- }
142
- else {
143
- urlSearchParams.set(key, parameter);
144
- }
145
- }
146
- }
147
- /**
148
- *
149
- * @export
150
- */
151
- var setSearchParams = function (url) {
152
- var objects = [];
153
- for (var _i = 1; _i < arguments.length; _i++) {
154
- objects[_i - 1] = arguments[_i];
155
- }
156
- var searchParams = new URLSearchParams(url.search);
157
- setFlattenedQueryParams(searchParams, objects);
158
- url.search = searchParams.toString();
159
- };
160
- exports.setSearchParams = setSearchParams;
161
- /**
162
- *
163
- * @export
164
- */
165
- var serializeDataIfNeeded = function (value, requestOptions, configuration) {
166
- var nonString = typeof value !== 'string';
167
- var needsSerialization = nonString && configuration && configuration.isJsonMime
168
- ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
169
- : nonString;
170
- return needsSerialization
171
- ? JSON.stringify(value !== undefined ? value : {})
172
- : (value || "");
173
- };
174
- exports.serializeDataIfNeeded = serializeDataIfNeeded;
175
- /**
176
- *
177
- * @export
178
- */
179
- var toPathString = function (url) {
180
- return url.pathname + url.search + url.hash;
181
- };
182
- exports.toPathString = toPathString;
183
- /**
184
- *
185
- * @export
186
- */
187
- var createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
188
- return function (axios, basePath) {
189
- if (axios === void 0) { axios = globalAxios; }
190
- if (basePath === void 0) { basePath = BASE_PATH; }
191
- var axiosRequestArgs = tslib_1.__assign(tslib_1.__assign({}, axiosArgs.options), { url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || basePath) + (0, exports.toPathString)(axiosArgs.urlObj) });
192
- return axios.request(axiosRequestArgs);
193
- };
194
- };
195
- exports.createRequestFunction = createRequestFunction;
196
- //# sourceMappingURL=common.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../utils/common.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;;;;AAKpB,+BAAuC;AAEvC;;;GAGG;AACU,QAAA,cAAc,GAAG,qBAAqB,CAAA;AAEnD;;;;GAIG;AACI,IAAM,iBAAiB,GAAG,UAAU,YAAoB,EAAE,SAAiB,EAAE,UAAmB;IACnG,IAAI,UAAU,KAAK,IAAI,IAAI,UAAU,KAAK,SAAS,EAAE;QACjD,MAAM,IAAI,oBAAa,CAAC,SAAS,EAAE,6BAAsB,SAAS,iDAAuC,YAAY,MAAG,CAAC,CAAC;KAC7H;AACL,CAAC,CAAA;AAJY,QAAA,iBAAiB,qBAI7B;AAED;;;GAGG;AACI,IAAM,iBAAiB,GAAG,UAAgB,MAAW,EAAE,YAAoB,EAAE,aAA6B;;;;;;yBACzG,CAAA,aAAa,IAAI,aAAa,CAAC,MAAM,CAAA,EAArC,wBAAqC;yBACT,CAA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B,EAAE,WAA0B,EAAE,SAAiB,EAAE,aAA6B;IAC/I,OAAO,UAAoC,KAAkC,EAAE,QAA4B;QAAhE,sBAAA,EAAA,mBAAkC;QAAE,yBAAA,EAAA,oBAA4B;QACvG,IAAM,gBAAgB,yCAAO,SAAS,CAAC,OAAO,KAAE,GAAG,EAAE,CAAC,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,QAAQ,KAAI,QAAQ,CAAC,GAAG,IAAA,oBAAY,EAAC,SAAS,CAAC,MAAM,CAAC,GAAC,CAAC;QAC7H,OAAO,KAAK,CAAC,OAAO,CAAO,gBAAgB,CAAC,CAAC;IACjD,CAAC,CAAC;AACN,CAAC,CAAA;AALY,QAAA,qBAAqB,yBAKjC"}
@@ -1,73 +0,0 @@
1
- export interface ConfigurationParameters {
2
- apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
3
- username?: string;
4
- password?: string;
5
- accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
6
- basePath?: string;
7
- baseOptions?: any;
8
- formDataCtor?: new () => any;
9
- }
10
- export declare class Configuration {
11
- /**
12
- * parameter for apiKey security
13
- * @param name security name
14
- * @memberof Configuration
15
- */
16
- apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
17
- /**
18
- * parameter for basic security
19
- *
20
- * @type {string}
21
- * @memberof Configuration
22
- */
23
- username?: string;
24
- /**
25
- * parameter for basic security
26
- *
27
- * @type {string}
28
- * @memberof Configuration
29
- */
30
- password?: string;
31
- /**
32
- * parameter for oauth2 security
33
- * @param name security name
34
- * @param scopes oauth2 scope
35
- * @memberof Configuration
36
- */
37
- accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
38
- /**
39
- * override base path
40
- *
41
- * @type {string}
42
- * @memberof Configuration
43
- */
44
- basePath?: string;
45
- /**
46
- * base options for axios calls
47
- *
48
- * @type {any}
49
- * @memberof Configuration
50
- */
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;
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;
72
- }
73
- //# sourceMappingURL=configuration.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../utils/configuration.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,uBAAuB;IACpC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IACrG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IAClJ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,YAAY,CAAC,EAAE,UAAU,GAAG,CAAC;C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