@lcdp/api-react-rest-client 3.5.3-LDS-5772-api-ajouter-pharmaidegeneratedc.27015201959 → 3.5.3-LDS-5772-api-ajouter-pharmaidegeneratedc.27015495861

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 (51) hide show
  1. package/magic-cart/src/models/ExpressOrderNeed.d.ts +2 -2
  2. package/magic-cart/src/models/ExpressOrderNeed.js +2 -2
  3. package/package.json +1 -1
  4. package/recommendation/src/models/ProductRecommendationType.d.ts +2 -0
  5. package/recommendation/src/models/ProductRecommendationType.js +3 -1
  6. package/shopping-cart/src/apis/SearchCartApi.d.ts +3 -0
  7. package/shopping-cart/src/apis/SearchCartApi.js +6 -1
  8. package/storage/index.d.ts +1 -0
  9. package/storage/index.js +17 -0
  10. package/storage/src/apis/SearchStorageApi.d.ts +32 -0
  11. package/storage/src/apis/SearchStorageApi.js +169 -0
  12. package/storage/src/apis/index.d.ts +1 -0
  13. package/storage/src/apis/index.js +19 -0
  14. package/storage/src/index.d.ts +3 -0
  15. package/storage/src/index.js +21 -0
  16. package/storage/src/models/HttpLink.d.ts +31 -0
  17. package/storage/src/models/HttpLink.js +47 -0
  18. package/storage/src/models/OwnerLink.d.ts +37 -0
  19. package/storage/src/models/OwnerLink.js +49 -0
  20. package/storage/src/models/PaginatedObject.d.ts +32 -0
  21. package/storage/src/models/PaginatedObject.js +48 -0
  22. package/storage/src/models/PaginatedStocks.d.ts +39 -0
  23. package/storage/src/models/PaginatedStocks.js +53 -0
  24. package/storage/src/models/PagingMetadata.d.ts +49 -0
  25. package/storage/src/models/PagingMetadata.js +55 -0
  26. package/storage/src/models/ProductLink.d.ts +37 -0
  27. package/storage/src/models/ProductLink.js +49 -0
  28. package/storage/src/models/Stock.d.ts +93 -0
  29. package/storage/src/models/Stock.js +67 -0
  30. package/storage/src/models/index.d.ts +7 -0
  31. package/storage/src/models/index.js +25 -0
  32. package/storage/src/runtime.d.ts +190 -0
  33. package/storage/src/runtime.js +594 -0
  34. package/supply/index.d.ts +1 -0
  35. package/supply/index.js +17 -0
  36. package/supply/src/apis/ManageSupplyApi.d.ts +29 -0
  37. package/supply/src/apis/ManageSupplyApi.js +161 -0
  38. package/supply/src/apis/index.d.ts +1 -0
  39. package/supply/src/apis/index.js +19 -0
  40. package/supply/src/index.d.ts +3 -0
  41. package/supply/src/index.js +21 -0
  42. package/supply/src/models/ExpressOrderNeed.d.ts +49 -0
  43. package/supply/src/models/ExpressOrderNeed.js +55 -0
  44. package/supply/src/models/SupplyNeedsCreationParameters.d.ts +31 -0
  45. package/supply/src/models/SupplyNeedsCreationParameters.js +47 -0
  46. package/supply/src/models/index.d.ts +2 -0
  47. package/supply/src/models/index.js +20 -0
  48. package/supply/src/runtime.d.ts +190 -0
  49. package/supply/src/runtime.js +594 -0
  50. package/user/src/models/UserJournal.d.ts +1 -1
  51. package/user/src/models/UserJournalUpdateParameters.d.ts +1 -1
@@ -0,0 +1,39 @@
1
+ /**
2
+ * lcdp-data-intelligence
3
+ * This is the REST API of LCDP stock storage
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 type { PagingMetadata } from './PagingMetadata';
13
+ import type { Stock } from './Stock';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface PaginatedStocks
18
+ */
19
+ export interface PaginatedStocks {
20
+ /**
21
+ *
22
+ * @type {PagingMetadata}
23
+ * @memberof PaginatedStocks
24
+ */
25
+ metadata: PagingMetadata;
26
+ /**
27
+ *
28
+ * @type {Array<Stock>}
29
+ * @memberof PaginatedStocks
30
+ */
31
+ records: Array<Stock>;
32
+ }
33
+ /**
34
+ * Check if a given object implements the PaginatedStocks interface.
35
+ */
36
+ export declare function instanceOfPaginatedStocks(value: object): value is PaginatedStocks;
37
+ export declare function PaginatedStocksFromJSON(json: any): PaginatedStocks;
38
+ export declare function PaginatedStocksFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedStocks;
39
+ export declare function PaginatedStocksToJSON(value?: PaginatedStocks | null): any;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * lcdp-data-intelligence
6
+ * This is the REST API of LCDP stock storage
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.PaginatedStocksToJSON = exports.PaginatedStocksFromJSONTyped = exports.PaginatedStocksFromJSON = exports.instanceOfPaginatedStocks = void 0;
17
+ var PagingMetadata_1 = require("./PagingMetadata");
18
+ var Stock_1 = require("./Stock");
19
+ /**
20
+ * Check if a given object implements the PaginatedStocks interface.
21
+ */
22
+ function instanceOfPaginatedStocks(value) {
23
+ if (!('metadata' in value) || value['metadata'] === undefined)
24
+ return false;
25
+ if (!('records' in value) || value['records'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ exports.instanceOfPaginatedStocks = instanceOfPaginatedStocks;
30
+ function PaginatedStocksFromJSON(json) {
31
+ return PaginatedStocksFromJSONTyped(json, false);
32
+ }
33
+ exports.PaginatedStocksFromJSON = PaginatedStocksFromJSON;
34
+ function PaginatedStocksFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'metadata': (json['metadata'] === null || json['metadata'] === undefined) ? json['metadata'] : (0, PagingMetadata_1.PagingMetadataFromJSON)(json['metadata']),
40
+ 'records': (json['records'] === null || json['records'] === undefined) ? json['records'] : json['records'].map(Stock_1.StockFromJSON),
41
+ };
42
+ }
43
+ exports.PaginatedStocksFromJSONTyped = PaginatedStocksFromJSONTyped;
44
+ function PaginatedStocksToJSON(value) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'metadata': (0, PagingMetadata_1.PagingMetadataToJSON)(value['metadata']),
50
+ 'records': (value['records'] === null || value['records'] === undefined) ? value['records'] : value['records'].map(Stock_1.StockToJSON),
51
+ };
52
+ }
53
+ exports.PaginatedStocksToJSON = PaginatedStocksToJSON;
@@ -0,0 +1,49 @@
1
+ /**
2
+ * lcdp-data-intelligence
3
+ * This is the REST API of LCDP stock storage
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
+ * All information about current and available pages
14
+ * @export
15
+ * @interface PagingMetadata
16
+ */
17
+ export interface PagingMetadata {
18
+ /**
19
+ * Current page requested. Start at 0. May not be present if user do not request specific page.
20
+ * @type {number}
21
+ * @memberof PagingMetadata
22
+ */
23
+ page?: number;
24
+ /**
25
+ * Number of item per page. 0 means that you only required metadata. May not be present if user do not request specific perPage.
26
+ * @type {number}
27
+ * @memberof PagingMetadata
28
+ */
29
+ perPage?: number;
30
+ /**
31
+ * Total number of item visible by the client in the request
32
+ * @type {number}
33
+ * @memberof PagingMetadata
34
+ */
35
+ totalVisible: number;
36
+ /**
37
+ * Total number of item found in database
38
+ * @type {number}
39
+ * @memberof PagingMetadata
40
+ */
41
+ totalFound: number;
42
+ }
43
+ /**
44
+ * Check if a given object implements the PagingMetadata interface.
45
+ */
46
+ export declare function instanceOfPagingMetadata(value: object): value is PagingMetadata;
47
+ export declare function PagingMetadataFromJSON(json: any): PagingMetadata;
48
+ export declare function PagingMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): PagingMetadata;
49
+ export declare function PagingMetadataToJSON(value?: PagingMetadata | null): any;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * lcdp-data-intelligence
6
+ * This is the REST API of LCDP stock storage
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.PagingMetadataToJSON = exports.PagingMetadataFromJSONTyped = exports.PagingMetadataFromJSON = exports.instanceOfPagingMetadata = void 0;
17
+ /**
18
+ * Check if a given object implements the PagingMetadata interface.
19
+ */
20
+ function instanceOfPagingMetadata(value) {
21
+ if (!('totalVisible' in value) || value['totalVisible'] === undefined)
22
+ return false;
23
+ if (!('totalFound' in value) || value['totalFound'] === undefined)
24
+ return false;
25
+ return true;
26
+ }
27
+ exports.instanceOfPagingMetadata = instanceOfPagingMetadata;
28
+ function PagingMetadataFromJSON(json) {
29
+ return PagingMetadataFromJSONTyped(json, false);
30
+ }
31
+ exports.PagingMetadataFromJSON = PagingMetadataFromJSON;
32
+ function PagingMetadataFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'page': json['page'],
38
+ 'perPage': json['perPage'],
39
+ 'totalVisible': json['totalVisible'],
40
+ 'totalFound': json['totalFound'],
41
+ };
42
+ }
43
+ exports.PagingMetadataFromJSONTyped = PagingMetadataFromJSONTyped;
44
+ function PagingMetadataToJSON(value) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'page': value['page'],
50
+ 'perPage': value['perPage'],
51
+ 'totalVisible': value['totalVisible'],
52
+ 'totalFound': value['totalFound'],
53
+ };
54
+ }
55
+ exports.PagingMetadataToJSON = PagingMetadataToJSON;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * lcdp-data-intelligence
3
+ * This is the REST API of LCDP stock storage
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 ProductLink
16
+ */
17
+ export interface ProductLink {
18
+ /**
19
+ * Any URL that is using http or https protocol
20
+ * @type {string}
21
+ * @memberof ProductLink
22
+ */
23
+ href: string;
24
+ /**
25
+ * Identifier of the product
26
+ * @type {number}
27
+ * @memberof ProductLink
28
+ */
29
+ id?: number;
30
+ }
31
+ /**
32
+ * Check if a given object implements the ProductLink interface.
33
+ */
34
+ export declare function instanceOfProductLink(value: object): value is ProductLink;
35
+ export declare function ProductLinkFromJSON(json: any): ProductLink;
36
+ export declare function ProductLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductLink;
37
+ export declare function ProductLinkToJSON(value?: ProductLink | null): any;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * lcdp-data-intelligence
6
+ * This is the REST API of LCDP stock storage
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.ProductLinkToJSON = exports.ProductLinkFromJSONTyped = exports.ProductLinkFromJSON = exports.instanceOfProductLink = void 0;
17
+ /**
18
+ * Check if a given object implements the ProductLink interface.
19
+ */
20
+ function instanceOfProductLink(value) {
21
+ if (!('href' in value) || value['href'] === undefined)
22
+ return false;
23
+ return true;
24
+ }
25
+ exports.instanceOfProductLink = instanceOfProductLink;
26
+ function ProductLinkFromJSON(json) {
27
+ return ProductLinkFromJSONTyped(json, false);
28
+ }
29
+ exports.ProductLinkFromJSON = ProductLinkFromJSON;
30
+ function ProductLinkFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'href': json['href'],
36
+ 'id': json['id'],
37
+ };
38
+ }
39
+ exports.ProductLinkFromJSONTyped = ProductLinkFromJSONTyped;
40
+ function ProductLinkToJSON(value) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'href': value['href'],
46
+ 'id': value['id'],
47
+ };
48
+ }
49
+ exports.ProductLinkToJSON = ProductLinkToJSON;
@@ -0,0 +1,93 @@
1
+ /**
2
+ * lcdp-data-intelligence
3
+ * This is the REST API of LCDP stock storage
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 type { ProductLink } from './ProductLink';
13
+ import type { OwnerLink } from './OwnerLink';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface Stock
18
+ */
19
+ export interface Stock {
20
+ /**
21
+ *
22
+ * @type {ProductLink}
23
+ * @memberof Stock
24
+ */
25
+ product?: ProductLink;
26
+ /**
27
+ * Total quantity in stock
28
+ * @type {number}
29
+ * @memberof Stock
30
+ */
31
+ totalQuantity?: number | null;
32
+ /**
33
+ * Overstock quantity
34
+ * @type {number}
35
+ * @memberof Stock
36
+ */
37
+ overstockQuantity?: number | null;
38
+ /**
39
+ * Quantity missing to reach 1 month of stock coverage
40
+ * @type {number}
41
+ * @memberof Stock
42
+ */
43
+ understockQuantity?: number | null;
44
+ /**
45
+ *
46
+ * @type {OwnerLink}
47
+ * @memberof Stock
48
+ */
49
+ owner?: OwnerLink;
50
+ /**
51
+ * Stock forecast
52
+ * @type {number}
53
+ * @memberof Stock
54
+ */
55
+ forecast?: number | null;
56
+ /**
57
+ * Sales forecast in days of stock coverage
58
+ * @type {number}
59
+ * @memberof Stock
60
+ */
61
+ salesForecast?: number | null;
62
+ /**
63
+ * Value of overstock
64
+ * @type {number}
65
+ * @memberof Stock
66
+ */
67
+ overstockValue?: number | null;
68
+ /**
69
+ * Profitable purchase price for the product
70
+ * @type {number}
71
+ * @memberof Stock
72
+ */
73
+ profitablePurchasePrice?: number | null;
74
+ /**
75
+ * Date of the last sale
76
+ * @type {Date}
77
+ * @memberof Stock
78
+ */
79
+ lastSaleDate?: Date | null;
80
+ /**
81
+ * Date of last update
82
+ * @type {Date}
83
+ * @memberof Stock
84
+ */
85
+ updatedAt?: Date | null;
86
+ }
87
+ /**
88
+ * Check if a given object implements the Stock interface.
89
+ */
90
+ export declare function instanceOfStock(value: object): value is Stock;
91
+ export declare function StockFromJSON(json: any): Stock;
92
+ export declare function StockFromJSONTyped(json: any, ignoreDiscriminator: boolean): Stock;
93
+ export declare function StockToJSON(value?: Stock | null): any;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * lcdp-data-intelligence
6
+ * This is the REST API of LCDP stock storage
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.StockToJSON = exports.StockFromJSONTyped = exports.StockFromJSON = exports.instanceOfStock = void 0;
17
+ var ProductLink_1 = require("./ProductLink");
18
+ var OwnerLink_1 = require("./OwnerLink");
19
+ /**
20
+ * Check if a given object implements the Stock interface.
21
+ */
22
+ function instanceOfStock(value) {
23
+ return true;
24
+ }
25
+ exports.instanceOfStock = instanceOfStock;
26
+ function StockFromJSON(json) {
27
+ return StockFromJSONTyped(json, false);
28
+ }
29
+ exports.StockFromJSON = StockFromJSON;
30
+ function StockFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'product': (json['product'] === null || json['product'] === undefined) ? json['product'] : (0, ProductLink_1.ProductLinkFromJSON)(json['product']),
36
+ 'totalQuantity': json['totalQuantity'],
37
+ 'overstockQuantity': json['overstockQuantity'],
38
+ 'understockQuantity': json['understockQuantity'],
39
+ 'owner': (json['owner'] === null || json['owner'] === undefined) ? json['owner'] : (0, OwnerLink_1.OwnerLinkFromJSON)(json['owner']),
40
+ 'forecast': json['forecast'],
41
+ 'salesForecast': json['salesForecast'],
42
+ 'overstockValue': json['overstockValue'],
43
+ 'profitablePurchasePrice': json['profitablePurchasePrice'],
44
+ 'lastSaleDate': (json['lastSaleDate'] === null || json['lastSaleDate'] === undefined) ? json['lastSaleDate'] : new Date(json['lastSaleDate']),
45
+ 'updatedAt': (json['updatedAt'] === null || json['updatedAt'] === undefined) ? json['updatedAt'] : new Date(json['updatedAt']),
46
+ };
47
+ }
48
+ exports.StockFromJSONTyped = StockFromJSONTyped;
49
+ function StockToJSON(value) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'product': (0, ProductLink_1.ProductLinkToJSON)(value['product']),
55
+ 'totalQuantity': value['totalQuantity'],
56
+ 'overstockQuantity': value['overstockQuantity'],
57
+ 'understockQuantity': value['understockQuantity'],
58
+ 'owner': (0, OwnerLink_1.OwnerLinkToJSON)(value['owner']),
59
+ 'forecast': value['forecast'],
60
+ 'salesForecast': value['salesForecast'],
61
+ 'overstockValue': value['overstockValue'],
62
+ 'profitablePurchasePrice': value['profitablePurchasePrice'],
63
+ 'lastSaleDate': (value['lastSaleDate'] === null || value['lastSaleDate'] === undefined) ? value['lastSaleDate'] : value['lastSaleDate'].toISOString(),
64
+ 'updatedAt': (value['updatedAt'] === null || value['updatedAt'] === undefined) ? value['updatedAt'] : value['updatedAt'].toISOString(),
65
+ };
66
+ }
67
+ exports.StockToJSON = StockToJSON;
@@ -0,0 +1,7 @@
1
+ export * from './HttpLink';
2
+ export * from './OwnerLink';
3
+ export * from './PaginatedObject';
4
+ export * from './PaginatedStocks';
5
+ export * from './PagingMetadata';
6
+ export * from './ProductLink';
7
+ export * from './Stock';
@@ -0,0 +1,25 @@
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("./HttpLink"), exports);
20
+ __exportStar(require("./OwnerLink"), exports);
21
+ __exportStar(require("./PaginatedObject"), exports);
22
+ __exportStar(require("./PaginatedStocks"), exports);
23
+ __exportStar(require("./PagingMetadata"), exports);
24
+ __exportStar(require("./ProductLink"), exports);
25
+ __exportStar(require("./Stock"), exports);
@@ -0,0 +1,190 @@
1
+ /**
2
+ * lcdp-data-intelligence
3
+ * This is the REST API of LCDP stock storage
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 = "/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<D extends Date | null | undefined>(date: D): D extends Date ? string : D;
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
+ }