@lcdp/api-react-rest-client 2.14.1-LDS-4762-monolith-hook-changement-de-dro.17792889165 → 2.14.1-LDS-4762-monolith-hook-changement-de-dro.17799538628
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.
- package/chargebee-hook/src/apis/ChargebeeHookApi.d.ts +5 -8
- package/chargebee-hook/src/apis/ChargebeeHookApi.js +5 -20
- package/chargebee-hook/src/models/HookRequest.d.ts +85 -0
- package/chargebee-hook/src/models/HookRequest.js +67 -0
- package/chargebee-hook/src/models/index.d.ts +1 -0
- package/chargebee-hook/src/models/index.js +1 -0
- package/package.json +1 -1
|
@@ -10,12 +10,9 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
occurredAt?: number;
|
|
17
|
-
apiVersion?: string;
|
|
18
|
-
content?: string;
|
|
13
|
+
import type { HookRequest } from '../models/index';
|
|
14
|
+
export interface HookOperationRequest {
|
|
15
|
+
hookRequest: HookRequest;
|
|
19
16
|
}
|
|
20
17
|
/**
|
|
21
18
|
*
|
|
@@ -25,10 +22,10 @@ export declare class ChargebeeHookApi extends runtime.BaseAPI {
|
|
|
25
22
|
*
|
|
26
23
|
* Call chargebee hook
|
|
27
24
|
*/
|
|
28
|
-
hookRaw(requestParameters:
|
|
25
|
+
hookRaw(requestParameters: HookOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
29
26
|
/**
|
|
30
27
|
*
|
|
31
28
|
* Call chargebee hook
|
|
32
29
|
*/
|
|
33
|
-
hook(requestParameters:
|
|
30
|
+
hook(requestParameters: HookOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
34
31
|
}
|
|
@@ -66,6 +66,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
66
66
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
67
|
exports.ChargebeeHookApi = void 0;
|
|
68
68
|
var runtime = require("../runtime");
|
|
69
|
+
var index_1 = require("../models/index");
|
|
69
70
|
/**
|
|
70
71
|
*
|
|
71
72
|
*/
|
|
@@ -84,29 +85,12 @@ var ChargebeeHookApi = /** @class */ (function (_super) {
|
|
|
84
85
|
return __generator(this, function (_a) {
|
|
85
86
|
switch (_a.label) {
|
|
86
87
|
case 0:
|
|
87
|
-
if (requestParameters['
|
|
88
|
-
throw new runtime.RequiredError('
|
|
89
|
-
}
|
|
90
|
-
if (requestParameters['id'] == null) {
|
|
91
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling hook().');
|
|
88
|
+
if (requestParameters['hookRequest'] == null) {
|
|
89
|
+
throw new runtime.RequiredError('hookRequest', 'Required parameter "hookRequest" was null or undefined when calling hook().');
|
|
92
90
|
}
|
|
93
91
|
queryParameters = {};
|
|
94
|
-
if (requestParameters['eventType'] != null) {
|
|
95
|
-
queryParameters['eventType'] = requestParameters['eventType'];
|
|
96
|
-
}
|
|
97
|
-
if (requestParameters['id'] != null) {
|
|
98
|
-
queryParameters['id'] = requestParameters['id'];
|
|
99
|
-
}
|
|
100
|
-
if (requestParameters['occurredAt'] != null) {
|
|
101
|
-
queryParameters['occurredAt'] = requestParameters['occurredAt'];
|
|
102
|
-
}
|
|
103
|
-
if (requestParameters['apiVersion'] != null) {
|
|
104
|
-
queryParameters['apiVersion'] = requestParameters['apiVersion'];
|
|
105
|
-
}
|
|
106
|
-
if (requestParameters['content'] != null) {
|
|
107
|
-
queryParameters['content'] = requestParameters['content'];
|
|
108
|
-
}
|
|
109
92
|
headerParameters = {};
|
|
93
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
110
94
|
_a.label = 1;
|
|
111
95
|
case 1:
|
|
112
96
|
_a.trys.push([1, 3, , 4]);
|
|
@@ -115,6 +99,7 @@ var ChargebeeHookApi = /** @class */ (function (_super) {
|
|
|
115
99
|
method: 'POST',
|
|
116
100
|
headers: headerParameters,
|
|
117
101
|
query: queryParameters,
|
|
102
|
+
body: (0, index_1.HookRequestToJSON)(requestParameters['hookRequest']),
|
|
118
103
|
}, initOverrides)];
|
|
119
104
|
case 2:
|
|
120
105
|
response = _a.sent();
|
|
@@ -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;
|
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./HookRequest"), exports);
|
|
19
20
|
__exportStar(require("./RestError"), exports);
|