@lcdp/api-react-rest-client 2.14.2-develop.18128998071 → 2.14.3-LDS-4938-monolith-repousser-la-fin-du-tr.18133250966

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.
@@ -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
+ }