@lcdp/api-react-rest-client 2.14.3-develop.18164509826 → 2.14.3-develop.18496590089

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 (81) hide show
  1. package/chargebee-hook/index.d.ts +1 -0
  2. package/chargebee-hook/index.js +17 -0
  3. package/chargebee-hook/src/apis/ChargebeeHookApi.d.ts +31 -0
  4. package/chargebee-hook/src/apis/ChargebeeHookApi.js +134 -0
  5. package/chargebee-hook/src/apis/index.d.ts +1 -0
  6. package/chargebee-hook/src/apis/index.js +19 -0
  7. package/chargebee-hook/src/index.d.ts +3 -0
  8. package/chargebee-hook/src/index.js +21 -0
  9. package/chargebee-hook/src/models/HookRequest.d.ts +85 -0
  10. package/chargebee-hook/src/models/HookRequest.js +67 -0
  11. package/{subscription → chargebee-hook}/src/models/RestError.d.ts +1 -1
  12. package/{subscription → chargebee-hook}/src/models/RestError.js +1 -1
  13. package/chargebee-hook/src/models/index.d.ts +2 -0
  14. package/chargebee-hook/src/models/index.js +20 -0
  15. package/chargebee-hook/src/runtime.d.ts +190 -0
  16. package/chargebee-hook/src/runtime.js +598 -0
  17. package/invoice/src/apis/SearchInvoiceApi.d.ts +2 -2
  18. package/invoice/src/apis/SearchInvoiceApi.js +2 -2
  19. package/invoice/src/models/InvoiceType.d.ts +0 -1
  20. package/invoice/src/models/InvoiceType.js +0 -1
  21. package/notification/src/models/NotificationTypeId.d.ts +1 -2
  22. package/notification/src/models/NotificationTypeId.js +1 -2
  23. package/package.json +1 -1
  24. package/rfx/src/apis/ManageRffApi.d.ts +29 -0
  25. package/{subscription/src/apis/ManageSubscriptionPlanApi.js → rfx/src/apis/ManageRffApi.js} +21 -39
  26. package/rfx/src/apis/index.d.ts +1 -0
  27. package/rfx/src/apis/index.js +1 -0
  28. package/rfx/src/models/RffCreationParameters.d.ts +37 -0
  29. package/rfx/src/models/RffCreationParameters.js +51 -0
  30. package/rfx/src/models/index.d.ts +1 -0
  31. package/rfx/src/models/index.js +1 -0
  32. package/subscription/src/apis/SearchSubscriptionsApi.d.ts +29 -0
  33. package/subscription/src/apis/{SearchSubscriptionPlanFeatureApi.js → SearchSubscriptionsApi.js} +19 -13
  34. package/subscription/src/apis/index.d.ts +1 -5
  35. package/subscription/src/apis/index.js +1 -5
  36. package/subscription/src/models/Subscription.d.ts +6 -38
  37. package/subscription/src/models/Subscription.js +6 -19
  38. package/subscription/src/models/index.d.ts +0 -14
  39. package/subscription/src/models/index.js +0 -14
  40. package/third-party/src/models/ThirdPartyLinkCreationParameters.d.ts +5 -2
  41. package/third-party/src/models/ThirdPartyLinkCreationParameters.js +5 -2
  42. package/user/src/models/NotificationTypeId.d.ts +1 -2
  43. package/user/src/models/NotificationTypeId.js +1 -2
  44. package/user/src/models/OffisanteStatus.d.ts +3 -1
  45. package/user/src/models/OffisanteStatus.js +4 -2
  46. package/user/src/models/User.d.ts +8 -0
  47. package/user/src/models/User.js +2 -0
  48. package/subscription/src/apis/ManageSubscriptionApi.d.ts +0 -56
  49. package/subscription/src/apis/ManageSubscriptionApi.js +0 -315
  50. package/subscription/src/apis/ManageSubscriptionPlanApi.d.ts +0 -30
  51. package/subscription/src/apis/SearchSubscriptionApi.d.ts +0 -53
  52. package/subscription/src/apis/SearchSubscriptionApi.js +0 -208
  53. package/subscription/src/apis/SearchSubscriptionPlanApi.d.ts +0 -49
  54. package/subscription/src/apis/SearchSubscriptionPlanApi.js +0 -249
  55. package/subscription/src/apis/SearchSubscriptionPlanFeatureApi.d.ts +0 -26
  56. package/subscription/src/models/HttpLink.d.ts +0 -31
  57. package/subscription/src/models/HttpLink.js +0 -47
  58. package/subscription/src/models/PaginatedObject.d.ts +0 -32
  59. package/subscription/src/models/PaginatedObject.js +0 -48
  60. package/subscription/src/models/PaginatedSubscriptions.d.ts +0 -39
  61. package/subscription/src/models/PaginatedSubscriptions.js +0 -51
  62. package/subscription/src/models/PagingMetadata.d.ts +0 -49
  63. package/subscription/src/models/PagingMetadata.js +0 -55
  64. package/subscription/src/models/SubscriberLink.d.ts +0 -37
  65. package/subscription/src/models/SubscriberLink.js +0 -49
  66. package/subscription/src/models/SubscriptionCreationParameters.d.ts +0 -44
  67. package/subscription/src/models/SubscriptionCreationParameters.js +0 -56
  68. package/subscription/src/models/SubscriptionPlan.d.ts +0 -69
  69. package/subscription/src/models/SubscriptionPlan.js +0 -59
  70. package/subscription/src/models/SubscriptionPlanFeature.d.ts +0 -44
  71. package/subscription/src/models/SubscriptionPlanFeature.js +0 -50
  72. package/subscription/src/models/SubscriptionPlanFeatureId.d.ts +0 -26
  73. package/subscription/src/models/SubscriptionPlanFeatureId.js +0 -49
  74. package/subscription/src/models/SubscriptionPlanId.d.ts +0 -25
  75. package/subscription/src/models/SubscriptionPlanId.js +0 -48
  76. package/subscription/src/models/SubscriptionPlanLink.d.ts +0 -38
  77. package/subscription/src/models/SubscriptionPlanLink.js +0 -50
  78. package/subscription/src/models/SubscriptionPlanUpdateParameters.d.ts +0 -62
  79. package/subscription/src/models/SubscriptionPlanUpdateParameters.js +0 -56
  80. package/subscription/src/models/SubscriptionUpdateParameters.d.ts +0 -62
  81. package/subscription/src/models/SubscriptionUpdateParameters.js +0 -57
@@ -0,0 +1 @@
1
+ export * from './src';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./src"), exports);
@@ -0,0 +1,31 @@
1
+ /**
2
+ * lcdp-monolith-service
3
+ * This is the REST API of LCDP Chargebee hook
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: contact@lecomptoirdespharmacies.fr
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 * as runtime from '../runtime';
13
+ import type { HookRequest } from '../models/index';
14
+ export interface HookOperationRequest {
15
+ hookRequest: HookRequest;
16
+ }
17
+ /**
18
+ *
19
+ */
20
+ export declare class ChargebeeHookApi extends runtime.BaseAPI {
21
+ /**
22
+ *
23
+ * Call chargebee hook
24
+ */
25
+ hookRaw(requestParameters: HookOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
26
+ /**
27
+ *
28
+ * Call chargebee hook
29
+ */
30
+ hook(requestParameters: HookOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
31
+ }
@@ -0,0 +1,134 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * lcdp-monolith-service
6
+ * This is the REST API of LCDP Chargebee hook
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: contact@lecomptoirdespharmacies.fr
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
31
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
32
+ return new (P || (P = Promise))(function (resolve, reject) {
33
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
34
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
35
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
36
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
37
+ });
38
+ };
39
+ var __generator = (this && this.__generator) || function (thisArg, body) {
40
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
41
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
42
+ function verb(n) { return function (v) { return step([n, v]); }; }
43
+ function step(op) {
44
+ if (f) throw new TypeError("Generator is already executing.");
45
+ while (_) try {
46
+ 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;
47
+ if (y = 0, t) op = [op[0] & 2, t.value];
48
+ switch (op[0]) {
49
+ case 0: case 1: t = op; break;
50
+ case 4: _.label++; return { value: op[1], done: false };
51
+ case 5: _.label++; y = op[1]; op = [0]; continue;
52
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
53
+ default:
54
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
55
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
56
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
57
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
58
+ if (t[2]) _.ops.pop();
59
+ _.trys.pop(); continue;
60
+ }
61
+ op = body.call(thisArg, _);
62
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
63
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
64
+ }
65
+ };
66
+ Object.defineProperty(exports, "__esModule", { value: true });
67
+ exports.ChargebeeHookApi = void 0;
68
+ var runtime = require("../runtime");
69
+ var index_1 = require("../models/index");
70
+ /**
71
+ *
72
+ */
73
+ var ChargebeeHookApi = /** @class */ (function (_super) {
74
+ __extends(ChargebeeHookApi, _super);
75
+ function ChargebeeHookApi() {
76
+ return _super !== null && _super.apply(this, arguments) || this;
77
+ }
78
+ /**
79
+ *
80
+ * Call chargebee hook
81
+ */
82
+ ChargebeeHookApi.prototype.hookRaw = function (requestParameters, initOverrides) {
83
+ return __awaiter(this, void 0, void 0, function () {
84
+ var queryParameters, headerParameters, response, response_1;
85
+ return __generator(this, function (_a) {
86
+ switch (_a.label) {
87
+ case 0:
88
+ if (requestParameters['hookRequest'] == null) {
89
+ throw new runtime.RequiredError('hookRequest', 'Required parameter "hookRequest" was null or undefined when calling hook().');
90
+ }
91
+ queryParameters = {};
92
+ headerParameters = {};
93
+ headerParameters['Content-Type'] = 'application/json';
94
+ _a.label = 1;
95
+ case 1:
96
+ _a.trys.push([1, 3, , 4]);
97
+ return [4 /*yield*/, this.request({
98
+ path: "/chargebee-hooks",
99
+ method: 'POST',
100
+ headers: headerParameters,
101
+ query: queryParameters,
102
+ body: (0, index_1.HookRequestToJSON)(requestParameters['hookRequest']),
103
+ }, initOverrides)];
104
+ case 2:
105
+ response = _a.sent();
106
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
107
+ case 3:
108
+ response_1 = _a.sent();
109
+ console.debug(response_1);
110
+ throw response_1;
111
+ case 4: return [2 /*return*/];
112
+ }
113
+ });
114
+ });
115
+ };
116
+ /**
117
+ *
118
+ * Call chargebee hook
119
+ */
120
+ ChargebeeHookApi.prototype.hook = function (requestParameters, initOverrides) {
121
+ return __awaiter(this, void 0, void 0, function () {
122
+ return __generator(this, function (_a) {
123
+ switch (_a.label) {
124
+ case 0: return [4 /*yield*/, this.hookRaw(requestParameters, initOverrides)];
125
+ case 1:
126
+ _a.sent();
127
+ return [2 /*return*/];
128
+ }
129
+ });
130
+ });
131
+ };
132
+ return ChargebeeHookApi;
133
+ }(runtime.BaseAPI));
134
+ exports.ChargebeeHookApi = ChargebeeHookApi;
@@ -0,0 +1 @@
1
+ export * from './ChargebeeHookApi';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ /* tslint:disable */
18
+ /* eslint-disable */
19
+ __exportStar(require("./ChargebeeHookApi"), exports);
@@ -0,0 +1,3 @@
1
+ export * from './runtime';
2
+ export * from './apis/index';
3
+ export * from './models/index';
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ /* tslint:disable */
18
+ /* eslint-disable */
19
+ __exportStar(require("./runtime"), exports);
20
+ __exportStar(require("./apis/index"), exports);
21
+ __exportStar(require("./models/index"), exports);
@@ -0,0 +1,85 @@
1
+ /**
2
+ * lcdp-monolith-service
3
+ * This is the REST API of LCDP Chargebee hook
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: contact@lecomptoirdespharmacies.fr
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface HookRequest
16
+ */
17
+ export interface HookRequest {
18
+ /**
19
+ * API version (e.g., v2)
20
+ * @type {string}
21
+ * @memberof HookRequest
22
+ */
23
+ api_version?: string;
24
+ /**
25
+ * Event type (e.g., subscription_created, customer_updated)
26
+ * @type {string}
27
+ * @memberof HookRequest
28
+ */
29
+ event_type: string;
30
+ /**
31
+ * Unique event identifier
32
+ * @type {string}
33
+ * @memberof HookRequest
34
+ */
35
+ id: string;
36
+ /**
37
+ * Object type (e.g., event)
38
+ * @type {string}
39
+ * @memberof HookRequest
40
+ */
41
+ object?: string;
42
+ /**
43
+ * Event timestamp (epoch seconds)
44
+ * @type {number}
45
+ * @memberof HookRequest
46
+ */
47
+ occurred_at?: number;
48
+ /**
49
+ * Event source (e.g., admin_console, api)
50
+ * @type {string}
51
+ * @memberof HookRequest
52
+ */
53
+ source?: string;
54
+ /**
55
+ * User who triggered the event
56
+ * @type {string}
57
+ * @memberof HookRequest
58
+ */
59
+ user?: string;
60
+ /**
61
+ * Webhook status (e.g., scheduled)
62
+ * @type {string}
63
+ * @memberof HookRequest
64
+ */
65
+ webhook_status?: string;
66
+ /**
67
+ * Event-specific content containing customer, subscription, etc.
68
+ * @type {object}
69
+ * @memberof HookRequest
70
+ */
71
+ content?: object;
72
+ /**
73
+ * List of webhooks
74
+ * @type {Array<object>}
75
+ * @memberof HookRequest
76
+ */
77
+ webhooks?: Array<object>;
78
+ }
79
+ /**
80
+ * Check if a given object implements the HookRequest interface.
81
+ */
82
+ export declare function instanceOfHookRequest(value: object): value is HookRequest;
83
+ export declare function HookRequestFromJSON(json: any): HookRequest;
84
+ export declare function HookRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): HookRequest;
85
+ export declare function HookRequestToJSON(value?: HookRequest | null): any;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * lcdp-monolith-service
6
+ * This is the REST API of LCDP Chargebee hook
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: contact@lecomptoirdespharmacies.fr
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
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.HookRequestToJSON = exports.HookRequestFromJSONTyped = exports.HookRequestFromJSON = exports.instanceOfHookRequest = void 0;
17
+ /**
18
+ * Check if a given object implements the HookRequest interface.
19
+ */
20
+ function instanceOfHookRequest(value) {
21
+ if (!('event_type' in value) || value['event_type'] === undefined)
22
+ return false;
23
+ if (!('id' in value) || value['id'] === undefined)
24
+ return false;
25
+ return true;
26
+ }
27
+ exports.instanceOfHookRequest = instanceOfHookRequest;
28
+ function HookRequestFromJSON(json) {
29
+ return HookRequestFromJSONTyped(json, false);
30
+ }
31
+ exports.HookRequestFromJSON = HookRequestFromJSON;
32
+ function HookRequestFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'api_version': json['api_version'],
38
+ 'event_type': json['event_type'],
39
+ 'id': json['id'],
40
+ 'object': json['object'],
41
+ 'occurred_at': json['occurred_at'],
42
+ 'source': json['source'],
43
+ 'user': json['user'],
44
+ 'webhook_status': json['webhook_status'],
45
+ 'content': json['content'],
46
+ 'webhooks': json['webhooks'],
47
+ };
48
+ }
49
+ exports.HookRequestFromJSONTyped = HookRequestFromJSONTyped;
50
+ function HookRequestToJSON(value) {
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ 'api_version': value['api_version'],
56
+ 'event_type': value['event_type'],
57
+ 'id': value['id'],
58
+ 'object': value['object'],
59
+ 'occurred_at': value['occurred_at'],
60
+ 'source': value['source'],
61
+ 'user': value['user'],
62
+ 'webhook_status': value['webhook_status'],
63
+ 'content': value['content'],
64
+ 'webhooks': value['webhooks'],
65
+ };
66
+ }
67
+ exports.HookRequestToJSON = HookRequestToJSON;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * lcdp-monolith-service
3
- * This is the REST API of LCDP products
3
+ * This is the REST API of LCDP Chargebee hook
4
4
  *
5
5
  * The version of the OpenAPI document: 1.0.0
6
6
  * Contact: contact@lecomptoirdespharmacies.fr
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  /**
5
5
  * lcdp-monolith-service
6
- * This is the REST API of LCDP products
6
+ * This is the REST API of LCDP Chargebee hook
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0.0
9
9
  * Contact: contact@lecomptoirdespharmacies.fr
@@ -0,0 +1,2 @@
1
+ export * from './HookRequest';
2
+ export * from './RestError';
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ /* tslint:disable */
18
+ /* eslint-disable */
19
+ __exportStar(require("./HookRequest"), exports);
20
+ __exportStar(require("./RestError"), exports);
@@ -0,0 +1,190 @@
1
+ /**
2
+ * lcdp-monolith-service
3
+ * This is the REST API of LCDP Chargebee hook
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: contact@lecomptoirdespharmacies.fr
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 declare const BASE_PATH = "/api/v1";
13
+ export interface ConfigurationParameters {
14
+ basePath?: string;
15
+ fetchApi?: FetchAPI;
16
+ middleware?: Middleware[];
17
+ queryParamsStringify?: (params: HTTPQuery) => string;
18
+ username?: string;
19
+ password?: string;
20
+ apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>);
21
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>);
22
+ headers?: HTTPHeaders;
23
+ credentials?: RequestCredentials;
24
+ referrerPolicy?: ReferrerPolicy;
25
+ }
26
+ export declare class Configuration {
27
+ private configuration;
28
+ constructor(configuration?: ConfigurationParameters);
29
+ set config(configuration: Configuration);
30
+ get basePath(): string;
31
+ get fetchApi(): FetchAPI | undefined;
32
+ get middleware(): Middleware[];
33
+ get queryParamsStringify(): (params: HTTPQuery) => string;
34
+ get username(): string | undefined;
35
+ get password(): string | undefined;
36
+ get apiKey(): ((name: string) => string | Promise<string>) | undefined;
37
+ get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | undefined;
38
+ get headers(): HTTPHeaders | undefined;
39
+ get credentials(): RequestCredentials | undefined;
40
+ get referrerPolicy(): ReferrerPolicy | undefined;
41
+ }
42
+ export declare const DefaultConfig: Configuration;
43
+ /**
44
+ * This is the base class for all generated API classes.
45
+ */
46
+ export declare class BaseAPI {
47
+ protected configuration: Configuration;
48
+ private static readonly jsonRegex;
49
+ private middleware;
50
+ constructor(configuration?: Configuration);
51
+ withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T;
52
+ withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>): T;
53
+ withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T;
54
+ /**
55
+ * Check if the given MIME is a JSON MIME.
56
+ * JSON MIME examples:
57
+ * application/json
58
+ * application/json; charset=UTF8
59
+ * APPLICATION/JSON
60
+ * application/vnd.company+json
61
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
62
+ * @return True if the given MIME is JSON, false otherwise.
63
+ */
64
+ protected isJsonMime(mime: string | null | undefined): boolean;
65
+ protected request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise<Response>;
66
+ private createFetchParams;
67
+ private fetchApi;
68
+ /**
69
+ * Create a shallow clone of `this` by constructing a new instance
70
+ * and then shallow cloning data members.
71
+ */
72
+ private clone;
73
+ }
74
+ export declare class ResponseError extends Error {
75
+ response: Response;
76
+ name: "ResponseError";
77
+ constructor(response: Response, msg?: string);
78
+ }
79
+ export declare class FetchError extends Error {
80
+ cause: Error;
81
+ name: "FetchError";
82
+ constructor(cause: Error, msg?: string);
83
+ }
84
+ export declare class RequiredError extends Error {
85
+ field: string;
86
+ name: "RequiredError";
87
+ constructor(field: string, msg?: string);
88
+ }
89
+ export declare const COLLECTION_FORMATS: {
90
+ csv: string;
91
+ ssv: string;
92
+ tsv: string;
93
+ pipes: string;
94
+ };
95
+ export declare type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
96
+ export declare type Json = any;
97
+ export declare type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
98
+ export declare type HTTPHeaders = {
99
+ [key: string]: string;
100
+ };
101
+ export declare type HTTPQuery = {
102
+ [key: string]: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery;
103
+ };
104
+ export declare type HTTPBody = Json | FormData | URLSearchParams;
105
+ export declare type HTTPRequestInit = {
106
+ headers?: HTTPHeaders;
107
+ method: HTTPMethod;
108
+ credentials?: RequestCredentials;
109
+ body?: HTTPBody;
110
+ };
111
+ export declare type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
112
+ export declare type InitOverrideFunction = (requestContext: {
113
+ init: HTTPRequestInit;
114
+ context: RequestOpts;
115
+ }) => Promise<RequestInit>;
116
+ export interface FetchParams {
117
+ url: string;
118
+ init: RequestInit;
119
+ }
120
+ export interface RequestOpts {
121
+ path: string;
122
+ method: HTTPMethod;
123
+ headers: HTTPHeaders;
124
+ query?: HTTPQuery;
125
+ body?: HTTPBody;
126
+ }
127
+ export declare function querystring(params: HTTPQuery, prefix?: string): string;
128
+ export declare function mapValues(data: any, fn: (item: any) => any): {};
129
+ export declare function canConsumeForm(consumes: Consume[]): boolean;
130
+ export declare function toDateISOString(date: Date): string;
131
+ export interface Consume {
132
+ contentType: string;
133
+ }
134
+ export interface RequestContext {
135
+ fetch: FetchAPI;
136
+ url: string;
137
+ init: RequestInit;
138
+ }
139
+ export interface ResponseContext {
140
+ fetch: FetchAPI;
141
+ url: string;
142
+ init: RequestInit;
143
+ response: Response;
144
+ }
145
+ export interface ErrorContext {
146
+ fetch: FetchAPI;
147
+ url: string;
148
+ init: RequestInit;
149
+ error: unknown;
150
+ response?: Response;
151
+ }
152
+ export interface Middleware {
153
+ pre?(context: RequestContext): Promise<FetchParams | void>;
154
+ post?(context: ResponseContext): Promise<Response | void>;
155
+ onError?(context: ErrorContext): Promise<Response | void>;
156
+ }
157
+ export interface ApiResponse<T> {
158
+ raw: Response;
159
+ value(): Promise<T>;
160
+ }
161
+ export interface ResponseTransformer<T> {
162
+ (json: any): T;
163
+ }
164
+ export declare class JSONApiResponse<T> {
165
+ raw: Response;
166
+ private transformer;
167
+ constructor(raw: Response, transformer?: ResponseTransformer<T>);
168
+ value(): Promise<T>;
169
+ }
170
+ export declare class VoidApiResponse {
171
+ raw: Response;
172
+ constructor(raw: Response);
173
+ value(): Promise<void>;
174
+ }
175
+ export interface BlobWithMeta {
176
+ blob: Blob;
177
+ filename: string;
178
+ }
179
+ export declare function instanceOfBlobWithMeta(object: any): object is BlobWithMeta;
180
+ export declare class BlobWithMetaApiResponse {
181
+ raw: Response;
182
+ constructor(raw: Response);
183
+ value(): Promise<BlobWithMeta>;
184
+ private extractFilename;
185
+ }
186
+ export declare class TextApiResponse {
187
+ raw: Response;
188
+ constructor(raw: Response);
189
+ value(): Promise<string>;
190
+ }