@teemill/gfn-catalog 1.4.0 → 2.0.0

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 (164) hide show
  1. package/.openapi-generator/FILES +7 -28
  2. package/README.md +3 -3
  3. package/api.ts +1646 -0
  4. package/base.ts +86 -0
  5. package/common.ts +150 -0
  6. package/configuration.ts +110 -0
  7. package/dist/api.d.ts +1074 -0
  8. package/dist/api.js +1014 -0
  9. package/dist/base.d.ts +66 -0
  10. package/dist/base.js +65 -0
  11. package/dist/common.d.ts +65 -0
  12. package/dist/common.js +161 -0
  13. package/dist/configuration.d.ts +91 -0
  14. package/dist/configuration.js +43 -0
  15. package/dist/esm/api.d.ts +1074 -0
  16. package/dist/esm/api.js +995 -0
  17. package/dist/esm/base.d.ts +66 -0
  18. package/dist/esm/{models/AttributeThumbnail.js → base.js} +38 -26
  19. package/dist/esm/common.d.ts +65 -0
  20. package/dist/esm/common.js +149 -0
  21. package/dist/esm/configuration.d.ts +91 -0
  22. package/dist/esm/configuration.js +39 -0
  23. package/dist/esm/index.d.ts +13 -3
  24. package/dist/esm/index.js +13 -3
  25. package/dist/index.d.ts +13 -3
  26. package/dist/index.js +15 -5
  27. package/git_push.sh +57 -0
  28. package/{dist/models/Stock.d.ts → index.ts} +8 -21
  29. package/package.json +14 -2
  30. package/tsconfig.json +4 -6
  31. package/dist/apis/ProductsApi.d.ts +0 -35
  32. package/dist/apis/ProductsApi.js +0 -85
  33. package/dist/apis/StatementsApi.d.ts +0 -48
  34. package/dist/apis/StatementsApi.js +0 -127
  35. package/dist/apis/TransactionsApi.d.ts +0 -48
  36. package/dist/apis/TransactionsApi.js +0 -129
  37. package/dist/apis/VariantsApi.d.ts +0 -82
  38. package/dist/apis/VariantsApi.js +0 -229
  39. package/dist/apis/index.d.ts +0 -4
  40. package/dist/apis/index.js +0 -22
  41. package/dist/esm/apis/ProductsApi.d.ts +0 -35
  42. package/dist/esm/apis/ProductsApi.js +0 -81
  43. package/dist/esm/apis/StatementsApi.d.ts +0 -48
  44. package/dist/esm/apis/StatementsApi.js +0 -123
  45. package/dist/esm/apis/TransactionsApi.d.ts +0 -48
  46. package/dist/esm/apis/TransactionsApi.js +0 -125
  47. package/dist/esm/apis/VariantsApi.d.ts +0 -82
  48. package/dist/esm/apis/VariantsApi.js +0 -225
  49. package/dist/esm/apis/index.d.ts +0 -4
  50. package/dist/esm/apis/index.js +0 -6
  51. package/dist/esm/models/ApiError.d.ts +0 -37
  52. package/dist/esm/models/ApiError.js +0 -42
  53. package/dist/esm/models/ApiValidationError.d.ts +0 -39
  54. package/dist/esm/models/ApiValidationError.js +0 -44
  55. package/dist/esm/models/Attribute.d.ts +0 -50
  56. package/dist/esm/models/Attribute.js +0 -49
  57. package/dist/esm/models/AttributeThumbnail.d.ts +0 -46
  58. package/dist/esm/models/ExportTransactionsRequest.d.ts +0 -43
  59. package/dist/esm/models/ExportTransactionsRequest.js +0 -42
  60. package/dist/esm/models/Image.d.ts +0 -67
  61. package/dist/esm/models/Image.js +0 -50
  62. package/dist/esm/models/ListStatements200Response.d.ts +0 -38
  63. package/dist/esm/models/ListStatements200Response.js +0 -41
  64. package/dist/esm/models/ListTransactions200Response.d.ts +0 -38
  65. package/dist/esm/models/ListTransactions200Response.js +0 -41
  66. package/dist/esm/models/Product.d.ts +0 -67
  67. package/dist/esm/models/Product.js +0 -52
  68. package/dist/esm/models/ProductsResponse.d.ts +0 -38
  69. package/dist/esm/models/ProductsResponse.js +0 -41
  70. package/dist/esm/models/Statement.d.ts +0 -61
  71. package/dist/esm/models/Statement.js +0 -60
  72. package/dist/esm/models/Stock.d.ts +0 -31
  73. package/dist/esm/models/Stock.js +0 -38
  74. package/dist/esm/models/StockResponse.d.ts +0 -38
  75. package/dist/esm/models/StockResponse.js +0 -41
  76. package/dist/esm/models/Transaction.d.ts +0 -68
  77. package/dist/esm/models/Transaction.js +0 -61
  78. package/dist/esm/models/TransactionOrder.d.ts +0 -37
  79. package/dist/esm/models/TransactionOrder.js +0 -44
  80. package/dist/esm/models/Variant.d.ts +0 -78
  81. package/dist/esm/models/Variant.js +0 -61
  82. package/dist/esm/models/VariantManufacturerOrigin.d.ts +0 -37
  83. package/dist/esm/models/VariantManufacturerOrigin.js +0 -40
  84. package/dist/esm/models/VariantProduct.d.ts +0 -37
  85. package/dist/esm/models/VariantProduct.js +0 -40
  86. package/dist/esm/models/VariantStock.d.ts +0 -50
  87. package/dist/esm/models/VariantStock.js +0 -45
  88. package/dist/esm/models/VariantsResponse.d.ts +0 -38
  89. package/dist/esm/models/VariantsResponse.js +0 -41
  90. package/dist/esm/models/index.d.ts +0 -20
  91. package/dist/esm/models/index.js +0 -22
  92. package/dist/esm/runtime.d.ts +0 -187
  93. package/dist/esm/runtime.js +0 -333
  94. package/dist/models/ApiError.d.ts +0 -37
  95. package/dist/models/ApiError.js +0 -49
  96. package/dist/models/ApiValidationError.d.ts +0 -39
  97. package/dist/models/ApiValidationError.js +0 -51
  98. package/dist/models/Attribute.d.ts +0 -50
  99. package/dist/models/Attribute.js +0 -56
  100. package/dist/models/AttributeThumbnail.d.ts +0 -46
  101. package/dist/models/AttributeThumbnail.js +0 -55
  102. package/dist/models/ExportTransactionsRequest.d.ts +0 -43
  103. package/dist/models/ExportTransactionsRequest.js +0 -49
  104. package/dist/models/Image.d.ts +0 -67
  105. package/dist/models/Image.js +0 -57
  106. package/dist/models/ListStatements200Response.d.ts +0 -38
  107. package/dist/models/ListStatements200Response.js +0 -48
  108. package/dist/models/ListTransactions200Response.d.ts +0 -38
  109. package/dist/models/ListTransactions200Response.js +0 -48
  110. package/dist/models/Product.d.ts +0 -67
  111. package/dist/models/Product.js +0 -59
  112. package/dist/models/ProductsResponse.d.ts +0 -38
  113. package/dist/models/ProductsResponse.js +0 -48
  114. package/dist/models/Statement.d.ts +0 -61
  115. package/dist/models/Statement.js +0 -67
  116. package/dist/models/Stock.js +0 -45
  117. package/dist/models/StockResponse.d.ts +0 -38
  118. package/dist/models/StockResponse.js +0 -48
  119. package/dist/models/Transaction.d.ts +0 -68
  120. package/dist/models/Transaction.js +0 -68
  121. package/dist/models/TransactionOrder.d.ts +0 -37
  122. package/dist/models/TransactionOrder.js +0 -51
  123. package/dist/models/Variant.d.ts +0 -78
  124. package/dist/models/Variant.js +0 -68
  125. package/dist/models/VariantManufacturerOrigin.d.ts +0 -37
  126. package/dist/models/VariantManufacturerOrigin.js +0 -47
  127. package/dist/models/VariantProduct.d.ts +0 -37
  128. package/dist/models/VariantProduct.js +0 -47
  129. package/dist/models/VariantStock.d.ts +0 -50
  130. package/dist/models/VariantStock.js +0 -52
  131. package/dist/models/VariantsResponse.d.ts +0 -38
  132. package/dist/models/VariantsResponse.js +0 -48
  133. package/dist/models/index.d.ts +0 -20
  134. package/dist/models/index.js +0 -38
  135. package/dist/runtime.d.ts +0 -187
  136. package/dist/runtime.js +0 -349
  137. package/src/apis/ProductsApi.ts +0 -116
  138. package/src/apis/StatementsApi.ts +0 -177
  139. package/src/apis/TransactionsApi.ts +0 -180
  140. package/src/apis/VariantsApi.ts +0 -345
  141. package/src/apis/index.ts +0 -6
  142. package/src/index.ts +0 -5
  143. package/src/models/ApiError.ts +0 -69
  144. package/src/models/ApiValidationError.ts +0 -70
  145. package/src/models/Attribute.ts +0 -93
  146. package/src/models/AttributeThumbnail.ts +0 -80
  147. package/src/models/ExportTransactionsRequest.ts +0 -76
  148. package/src/models/Image.ts +0 -108
  149. package/src/models/ListStatements200Response.ts +0 -75
  150. package/src/models/ListTransactions200Response.ts +0 -75
  151. package/src/models/Product.ts +0 -109
  152. package/src/models/ProductsResponse.ts +0 -75
  153. package/src/models/Statement.ts +0 -106
  154. package/src/models/Stock.ts +0 -60
  155. package/src/models/StockResponse.ts +0 -75
  156. package/src/models/Transaction.ts +0 -120
  157. package/src/models/TransactionOrder.ts +0 -70
  158. package/src/models/Variant.ts +0 -149
  159. package/src/models/VariantManufacturerOrigin.ts +0 -68
  160. package/src/models/VariantProduct.ts +0 -68
  161. package/src/models/VariantStock.ts +0 -91
  162. package/src/models/VariantsResponse.ts +0 -75
  163. package/src/models/index.ts +0 -22
  164. package/src/runtime.ts +0 -441
@@ -1,40 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * GFN Catalog API
5
- * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
6
- *
7
- * The version of the OpenAPI document: 1.4.0
8
- * Contact: hello@teemill.com
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- /**
15
- * Check if a given object implements the VariantManufacturerOrigin interface.
16
- */
17
- export function instanceOfVariantManufacturerOrigin(value) {
18
- return true;
19
- }
20
- export function VariantManufacturerOriginFromJSON(json) {
21
- return VariantManufacturerOriginFromJSONTyped(json, false);
22
- }
23
- export function VariantManufacturerOriginFromJSONTyped(json, ignoreDiscriminator) {
24
- if (json == null) {
25
- return json;
26
- }
27
- return {
28
- 'country': json['country'] == null ? undefined : json['country'],
29
- 'name': json['name'] == null ? undefined : json['name'],
30
- };
31
- }
32
- export function VariantManufacturerOriginToJSON(value) {
33
- if (value == null) {
34
- return value;
35
- }
36
- return {
37
- 'country': value['country'],
38
- 'name': value['name'],
39
- };
40
- }
@@ -1,37 +0,0 @@
1
- /**
2
- * GFN Catalog API
3
- * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
4
- *
5
- * The version of the OpenAPI document: 1.4.0
6
- * Contact: hello@teemill.com
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 VariantProduct
16
- */
17
- export interface VariantProduct {
18
- /**
19
- * Unique object identifier
20
- * @type {string}
21
- * @memberof VariantProduct
22
- */
23
- id?: string;
24
- /**
25
- * A reference to the resource location
26
- * @type {string}
27
- * @memberof VariantProduct
28
- */
29
- ref?: string;
30
- }
31
- /**
32
- * Check if a given object implements the VariantProduct interface.
33
- */
34
- export declare function instanceOfVariantProduct(value: object): value is VariantProduct;
35
- export declare function VariantProductFromJSON(json: any): VariantProduct;
36
- export declare function VariantProductFromJSONTyped(json: any, ignoreDiscriminator: boolean): VariantProduct;
37
- export declare function VariantProductToJSON(value?: VariantProduct | null): any;
@@ -1,40 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * GFN Catalog API
5
- * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
6
- *
7
- * The version of the OpenAPI document: 1.4.0
8
- * Contact: hello@teemill.com
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- /**
15
- * Check if a given object implements the VariantProduct interface.
16
- */
17
- export function instanceOfVariantProduct(value) {
18
- return true;
19
- }
20
- export function VariantProductFromJSON(json) {
21
- return VariantProductFromJSONTyped(json, false);
22
- }
23
- export function VariantProductFromJSONTyped(json, ignoreDiscriminator) {
24
- if (json == null) {
25
- return json;
26
- }
27
- return {
28
- 'id': json['id'] == null ? undefined : json['id'],
29
- 'ref': json['ref'] == null ? undefined : json['ref'],
30
- };
31
- }
32
- export function VariantProductToJSON(value) {
33
- if (value == null) {
34
- return value;
35
- }
36
- return {
37
- 'id': value['id'],
38
- 'ref': value['ref'],
39
- };
40
- }
@@ -1,50 +0,0 @@
1
- /**
2
- * GFN Catalog API
3
- * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
4
- *
5
- * The version of the OpenAPI document: 1.4.0
6
- * Contact: hello@teemill.com
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 { Stock } from './Stock';
13
- /**
14
- *
15
- * @export
16
- * @interface VariantStock
17
- */
18
- export interface VariantStock {
19
- /**
20
- * Unique object identifier
21
- * @type {string}
22
- * @memberof VariantStock
23
- */
24
- id?: string;
25
- /**
26
- * A reference to the resource location
27
- * @type {string}
28
- * @memberof VariantStock
29
- */
30
- ref?: string;
31
- /**
32
- * A reference to the resource location
33
- * @type {string}
34
- * @memberof VariantStock
35
- */
36
- productRef?: string;
37
- /**
38
- *
39
- * @type {Stock}
40
- * @memberof VariantStock
41
- */
42
- stock?: Stock;
43
- }
44
- /**
45
- * Check if a given object implements the VariantStock interface.
46
- */
47
- export declare function instanceOfVariantStock(value: object): value is VariantStock;
48
- export declare function VariantStockFromJSON(json: any): VariantStock;
49
- export declare function VariantStockFromJSONTyped(json: any, ignoreDiscriminator: boolean): VariantStock;
50
- export declare function VariantStockToJSON(value?: VariantStock | null): any;
@@ -1,45 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * GFN Catalog API
5
- * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
6
- *
7
- * The version of the OpenAPI document: 1.4.0
8
- * Contact: hello@teemill.com
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- import { StockFromJSON, StockToJSON, } from './Stock';
15
- /**
16
- * Check if a given object implements the VariantStock interface.
17
- */
18
- export function instanceOfVariantStock(value) {
19
- return true;
20
- }
21
- export function VariantStockFromJSON(json) {
22
- return VariantStockFromJSONTyped(json, false);
23
- }
24
- export function VariantStockFromJSONTyped(json, ignoreDiscriminator) {
25
- if (json == null) {
26
- return json;
27
- }
28
- return {
29
- 'id': json['id'] == null ? undefined : json['id'],
30
- 'ref': json['ref'] == null ? undefined : json['ref'],
31
- 'productRef': json['productRef'] == null ? undefined : json['productRef'],
32
- 'stock': json['stock'] == null ? undefined : StockFromJSON(json['stock']),
33
- };
34
- }
35
- export function VariantStockToJSON(value) {
36
- if (value == null) {
37
- return value;
38
- }
39
- return {
40
- 'id': value['id'],
41
- 'ref': value['ref'],
42
- 'productRef': value['productRef'],
43
- 'stock': StockToJSON(value['stock']),
44
- };
45
- }
@@ -1,38 +0,0 @@
1
- /**
2
- * GFN Catalog API
3
- * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
4
- *
5
- * The version of the OpenAPI document: 1.4.0
6
- * Contact: hello@teemill.com
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 { Variant } from './Variant';
13
- /**
14
- *
15
- * @export
16
- * @interface VariantsResponse
17
- */
18
- export interface VariantsResponse {
19
- /**
20
- *
21
- * @type {Array<Variant>}
22
- * @memberof VariantsResponse
23
- */
24
- variants?: Array<Variant>;
25
- /**
26
- *
27
- * @type {number}
28
- * @memberof VariantsResponse
29
- */
30
- nextPageToken?: number;
31
- }
32
- /**
33
- * Check if a given object implements the VariantsResponse interface.
34
- */
35
- export declare function instanceOfVariantsResponse(value: object): value is VariantsResponse;
36
- export declare function VariantsResponseFromJSON(json: any): VariantsResponse;
37
- export declare function VariantsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): VariantsResponse;
38
- export declare function VariantsResponseToJSON(value?: VariantsResponse | null): any;
@@ -1,41 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * GFN Catalog API
5
- * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
6
- *
7
- * The version of the OpenAPI document: 1.4.0
8
- * Contact: hello@teemill.com
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- import { VariantFromJSON, VariantToJSON, } from './Variant';
15
- /**
16
- * Check if a given object implements the VariantsResponse interface.
17
- */
18
- export function instanceOfVariantsResponse(value) {
19
- return true;
20
- }
21
- export function VariantsResponseFromJSON(json) {
22
- return VariantsResponseFromJSONTyped(json, false);
23
- }
24
- export function VariantsResponseFromJSONTyped(json, ignoreDiscriminator) {
25
- if (json == null) {
26
- return json;
27
- }
28
- return {
29
- 'variants': json['variants'] == null ? undefined : (json['variants'].map(VariantFromJSON)),
30
- 'nextPageToken': json['nextPageToken'] == null ? undefined : json['nextPageToken'],
31
- };
32
- }
33
- export function VariantsResponseToJSON(value) {
34
- if (value == null) {
35
- return value;
36
- }
37
- return {
38
- 'variants': value['variants'] == null ? undefined : (value['variants'].map(VariantToJSON)),
39
- 'nextPageToken': value['nextPageToken'],
40
- };
41
- }
@@ -1,20 +0,0 @@
1
- export * from './ApiError';
2
- export * from './ApiValidationError';
3
- export * from './Attribute';
4
- export * from './AttributeThumbnail';
5
- export * from './ExportTransactionsRequest';
6
- export * from './Image';
7
- export * from './ListStatements200Response';
8
- export * from './ListTransactions200Response';
9
- export * from './Product';
10
- export * from './ProductsResponse';
11
- export * from './Statement';
12
- export * from './Stock';
13
- export * from './StockResponse';
14
- export * from './Transaction';
15
- export * from './TransactionOrder';
16
- export * from './Variant';
17
- export * from './VariantManufacturerOrigin';
18
- export * from './VariantProduct';
19
- export * from './VariantStock';
20
- export * from './VariantsResponse';
@@ -1,22 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- export * from './ApiError';
4
- export * from './ApiValidationError';
5
- export * from './Attribute';
6
- export * from './AttributeThumbnail';
7
- export * from './ExportTransactionsRequest';
8
- export * from './Image';
9
- export * from './ListStatements200Response';
10
- export * from './ListTransactions200Response';
11
- export * from './Product';
12
- export * from './ProductsResponse';
13
- export * from './Statement';
14
- export * from './Stock';
15
- export * from './StockResponse';
16
- export * from './Transaction';
17
- export * from './TransactionOrder';
18
- export * from './Variant';
19
- export * from './VariantManufacturerOrigin';
20
- export * from './VariantProduct';
21
- export * from './VariantStock';
22
- export * from './VariantsResponse';
@@ -1,187 +0,0 @@
1
- /**
2
- * GFN Catalog API
3
- * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
4
- *
5
- * The version of the OpenAPI document: 1.4.0
6
- * Contact: hello@teemill.com
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 type OptionalProperties<T> = {
13
- [K in keyof T]-?: undefined extends T[K] ? K : never;
14
- }[keyof T];
15
- export type OptionalOnly<T> = Partial<Pick<T, OptionalProperties<T>>>;
16
- export declare const BASE_PATH: string;
17
- export interface ConfigurationParameters {
18
- basePath?: string;
19
- fetchApi?: FetchAPI;
20
- middleware?: Middleware[];
21
- queryParamsStringify?: (params: HTTPQuery) => string;
22
- username?: string;
23
- password?: string;
24
- apiKey?: string | ((name: string) => string);
25
- accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>);
26
- headers?: HTTPHeaders;
27
- credentials?: RequestCredentials;
28
- }
29
- export declare class Configuration {
30
- private configuration;
31
- constructor(configuration?: ConfigurationParameters);
32
- set config(configuration: Configuration);
33
- get basePath(): string;
34
- get fetchApi(): FetchAPI | undefined;
35
- get middleware(): Middleware[];
36
- get queryParamsStringify(): (params: HTTPQuery) => string;
37
- get username(): string | undefined;
38
- get password(): string | undefined;
39
- get apiKey(): ((name: string) => string) | undefined;
40
- get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | undefined;
41
- get headers(): HTTPHeaders | undefined;
42
- get credentials(): RequestCredentials | undefined;
43
- }
44
- export declare const DefaultConfig: Configuration;
45
- /**
46
- * This is the base class for all generated API classes.
47
- */
48
- export declare class BaseAPI {
49
- protected configuration: Configuration;
50
- private static readonly jsonRegex;
51
- private middleware;
52
- constructor(configuration?: Configuration);
53
- isResponseError(error: any): error is ResponseError;
54
- withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T;
55
- withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>): T;
56
- withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T;
57
- /**
58
- * Check if the given MIME is a JSON MIME.
59
- * JSON MIME examples:
60
- * application/json
61
- * application/json; charset=UTF8
62
- * APPLICATION/JSON
63
- * application/vnd.company+json
64
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
65
- * @return True if the given MIME is JSON, false otherwise.
66
- */
67
- protected isJsonMime(mime: string | null | undefined): boolean;
68
- protected request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise<Response>;
69
- private createFetchParams;
70
- private fetchApi;
71
- /**
72
- * Create a shallow clone of `this` by constructing a new instance
73
- * and then shallow cloning data members.
74
- */
75
- private clone;
76
- }
77
- export declare class ResponseError extends Error {
78
- response: Response;
79
- name: "ResponseError";
80
- constructor(response: Response, msg?: string);
81
- }
82
- export declare class FetchError extends Error {
83
- cause: Error;
84
- name: "FetchError";
85
- constructor(cause: Error, msg?: string);
86
- }
87
- export declare class RequiredError extends Error {
88
- field: string;
89
- name: "RequiredError";
90
- constructor(field: string, msg?: string);
91
- }
92
- export declare const COLLECTION_FORMATS: {
93
- csv: string;
94
- ssv: string;
95
- tsv: string;
96
- pipes: string;
97
- };
98
- export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
99
- export type Json = any;
100
- export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
101
- export type HTTPHeaders = {
102
- [key: string]: string;
103
- };
104
- export type HTTPQuery = {
105
- [key: string]: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery;
106
- };
107
- export type HTTPBody = Json | FormData | URLSearchParams;
108
- export type HTTPRequestInit = {
109
- headers?: HTTPHeaders;
110
- method: HTTPMethod;
111
- credentials?: RequestCredentials;
112
- body?: HTTPBody;
113
- };
114
- export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
115
- export type InitOverrideFunction = (requestContext: {
116
- init: HTTPRequestInit;
117
- context: RequestOpts;
118
- }) => Promise<RequestInit>;
119
- export interface FetchParams {
120
- url: string;
121
- init: RequestInit;
122
- }
123
- export interface RequestOpts {
124
- path: string;
125
- method: HTTPMethod;
126
- headers: HTTPHeaders;
127
- query?: HTTPQuery;
128
- body?: HTTPBody;
129
- }
130
- export declare function exists(json: any, key: string): boolean;
131
- export declare function querystring(params: HTTPQuery, prefix?: string): string;
132
- export declare function mapValues(data: any, fn: (item: any) => any): {};
133
- export declare function canConsumeForm(consumes: Consume[]): boolean;
134
- export interface Consume {
135
- contentType: string;
136
- }
137
- export interface RequestContext {
138
- fetch: FetchAPI;
139
- url: string;
140
- init: RequestInit;
141
- }
142
- export interface ResponseContext {
143
- fetch: FetchAPI;
144
- url: string;
145
- init: RequestInit;
146
- response: Response;
147
- }
148
- export interface ErrorContext {
149
- fetch: FetchAPI;
150
- url: string;
151
- init: RequestInit;
152
- error: unknown;
153
- response?: Response;
154
- }
155
- export interface Middleware {
156
- pre?(context: RequestContext): Promise<FetchParams | void>;
157
- post?(context: ResponseContext): Promise<Response | void>;
158
- onError?(context: ErrorContext): Promise<Response | void>;
159
- }
160
- export interface ApiResponse<T> {
161
- raw: Response;
162
- value(): Promise<T>;
163
- }
164
- export interface ResponseTransformer<T> {
165
- (json: any): T;
166
- }
167
- export declare class JSONApiResponse<T> {
168
- raw: Response;
169
- private transformer;
170
- constructor(raw: Response, transformer?: ResponseTransformer<T>);
171
- value(): Promise<T>;
172
- }
173
- export declare class VoidApiResponse {
174
- raw: Response;
175
- constructor(raw: Response);
176
- value(): Promise<void>;
177
- }
178
- export declare class BlobApiResponse {
179
- raw: Response;
180
- constructor(raw: Response);
181
- value(): Promise<Blob>;
182
- }
183
- export declare class TextApiResponse {
184
- raw: Response;
185
- constructor(raw: Response);
186
- value(): Promise<string>;
187
- }