@lcdp/api-react-rest-client 3.2.0 → 3.3.0-LDS-5710-move-codegen-in-frontend.25448746177

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 (135) hide show
  1. package/auth/src/runtime.d.ts +2 -2
  2. package/auth/src/runtime.js +8 -12
  3. package/banking-operation/src/runtime.d.ts +2 -2
  4. package/banking-operation/src/runtime.js +8 -12
  5. package/catalog/src/models/ProductInsight.d.ts +6 -6
  6. package/catalog/src/models/ProductInsight.js +6 -6
  7. package/catalog/src/models/ProductInsightCreateOrUpdateParameters.d.ts +8 -6
  8. package/catalog/src/models/ProductInsightCreateOrUpdateParameters.js +6 -4
  9. package/catalog/src/models/ProductSecondaryType.d.ts +25 -0
  10. package/catalog/src/models/ProductSecondaryType.js +48 -0
  11. package/catalog/src/models/ProductType.d.ts +28 -0
  12. package/catalog/src/models/ProductType.js +51 -0
  13. package/catalog/src/models/index.d.ts +2 -2
  14. package/catalog/src/models/index.js +2 -2
  15. package/catalog/src/runtime.d.ts +2 -2
  16. package/catalog/src/runtime.js +8 -12
  17. package/challenge/src/runtime.d.ts +2 -2
  18. package/challenge/src/runtime.js +8 -12
  19. package/chargebee-hook/src/runtime.d.ts +2 -2
  20. package/chargebee-hook/src/runtime.js +8 -12
  21. package/configuration/src/runtime.d.ts +2 -2
  22. package/configuration/src/runtime.js +8 -12
  23. package/content/src/runtime.d.ts +2 -2
  24. package/content/src/runtime.js +8 -12
  25. package/factory/src/models/Product.d.ts +4 -3
  26. package/factory/src/models/Product.js +3 -2
  27. package/factory/src/models/ProductType.d.ts +28 -0
  28. package/factory/src/models/ProductType.js +51 -0
  29. package/factory/src/models/index.d.ts +1 -0
  30. package/factory/src/models/index.js +1 -0
  31. package/factory/src/runtime.d.ts +2 -2
  32. package/factory/src/runtime.js +8 -12
  33. package/favorite/src/runtime.d.ts +2 -2
  34. package/favorite/src/runtime.js +8 -12
  35. package/geo/src/runtime.d.ts +2 -2
  36. package/geo/src/runtime.js +8 -12
  37. package/inventory/src/runtime.d.ts +2 -2
  38. package/inventory/src/runtime.js +8 -12
  39. package/invoice/src/runtime.d.ts +2 -2
  40. package/invoice/src/runtime.js +8 -12
  41. package/laboratory/src/runtime.d.ts +2 -2
  42. package/laboratory/src/runtime.js +8 -12
  43. package/laboratory-store/src/runtime.d.ts +2 -2
  44. package/laboratory-store/src/runtime.js +8 -12
  45. package/laboratory-store-log/src/runtime.d.ts +2 -2
  46. package/laboratory-store-log/src/runtime.js +8 -12
  47. package/lexicon/src/runtime.d.ts +2 -2
  48. package/lexicon/src/runtime.js +8 -12
  49. package/litigation/src/runtime.d.ts +2 -2
  50. package/litigation/src/runtime.js +8 -12
  51. package/magic-cart/src/runtime.d.ts +2 -2
  52. package/magic-cart/src/runtime.js +8 -12
  53. package/mandate/src/runtime.d.ts +2 -2
  54. package/mandate/src/runtime.js +8 -12
  55. package/mangopay-hook/src/runtime.d.ts +2 -2
  56. package/mangopay-hook/src/runtime.js +8 -12
  57. package/message/src/runtime.d.ts +2 -2
  58. package/message/src/runtime.js +8 -12
  59. package/notification/src/runtime.d.ts +2 -2
  60. package/notification/src/runtime.js +8 -12
  61. package/order/src/runtime.d.ts +2 -2
  62. package/order/src/runtime.js +8 -12
  63. package/order-log/src/runtime.d.ts +2 -2
  64. package/order-log/src/runtime.js +8 -12
  65. package/outrage-message/src/runtime.d.ts +2 -2
  66. package/outrage-message/src/runtime.js +8 -12
  67. package/package.json +1 -1
  68. package/product/src/apis/ManageProductApi.d.ts +2 -2
  69. package/product/src/apis/ManageProductApi.js +2 -2
  70. package/product/src/apis/index.d.ts +0 -1
  71. package/product/src/apis/index.js +0 -1
  72. package/product/src/models/ProductCreationOrUpdateParameters.d.ts +8 -6
  73. package/product/src/models/ProductCreationOrUpdateParameters.js +6 -4
  74. package/product/src/models/ProductSecondaryType.d.ts +7 -19
  75. package/product/src/models/ProductSecondaryType.js +18 -17
  76. package/product/src/models/ProductType.d.ts +10 -19
  77. package/product/src/models/ProductType.js +21 -17
  78. package/product/src/runtime.d.ts +2 -2
  79. package/product/src/runtime.js +8 -12
  80. package/pub/src/runtime.d.ts +2 -2
  81. package/pub/src/runtime.js +8 -12
  82. package/recommendation/src/runtime.d.ts +2 -2
  83. package/recommendation/src/runtime.js +8 -12
  84. package/rfx/src/runtime.d.ts +2 -2
  85. package/rfx/src/runtime.js +8 -12
  86. package/sale-offer/src/runtime.d.ts +2 -2
  87. package/sale-offer/src/runtime.js +8 -12
  88. package/sale-offer-log/src/runtime.d.ts +2 -2
  89. package/sale-offer-log/src/runtime.js +8 -12
  90. package/servant/src/runtime.d.ts +2 -2
  91. package/servant/src/runtime.js +8 -12
  92. package/shipment/src/runtime.d.ts +2 -2
  93. package/shipment/src/runtime.js +8 -12
  94. package/shopping-cart/src/runtime.d.ts +2 -2
  95. package/shopping-cart/src/runtime.js +8 -12
  96. package/smuggler/src/runtime.d.ts +2 -2
  97. package/smuggler/src/runtime.js +8 -12
  98. package/statistic/src/runtime.d.ts +2 -2
  99. package/statistic/src/runtime.js +8 -12
  100. package/subscription/src/runtime.d.ts +2 -2
  101. package/subscription/src/runtime.js +8 -12
  102. package/third-party/src/runtime.d.ts +2 -2
  103. package/third-party/src/runtime.js +8 -12
  104. package/thread/src/runtime.d.ts +2 -2
  105. package/thread/src/runtime.js +8 -12
  106. package/ubo/src/runtime.d.ts +2 -2
  107. package/ubo/src/runtime.js +8 -12
  108. package/user/src/apis/ManageUserRestrictionApi.d.ts +1 -25
  109. package/user/src/apis/ManageUserRestrictionApi.js +12 -152
  110. package/user/src/apis/SearchUserRestrictionApi.d.ts +1 -12
  111. package/user/src/apis/SearchUserRestrictionApi.js +0 -79
  112. package/user/src/models/ProductType.d.ts +28 -0
  113. package/user/src/models/ProductType.js +51 -0
  114. package/user/src/models/RestrictedProductType.d.ts +46 -0
  115. package/user/src/models/RestrictedProductType.js +55 -0
  116. package/user/src/models/User.d.ts +3 -2
  117. package/user/src/models/User.js +3 -2
  118. package/user/src/models/UserUpdateParameters.d.ts +7 -0
  119. package/user/src/models/UserUpdateParameters.js +3 -0
  120. package/user/src/models/index.d.ts +2 -2
  121. package/user/src/models/index.js +2 -2
  122. package/user/src/runtime.d.ts +2 -2
  123. package/user/src/runtime.js +8 -12
  124. package/wish/src/runtime.d.ts +2 -2
  125. package/wish/src/runtime.js +8 -12
  126. package/catalog/src/models/ProductSecondaryTypeLink.d.ts +0 -43
  127. package/catalog/src/models/ProductSecondaryTypeLink.js +0 -51
  128. package/catalog/src/models/ProductTypeLink.d.ts +0 -43
  129. package/catalog/src/models/ProductTypeLink.js +0 -51
  130. package/product/src/apis/SearchProductMetadataApi.d.ts +0 -56
  131. package/product/src/apis/SearchProductMetadataApi.js +0 -390
  132. package/user/src/models/ProductTypeLink.d.ts +0 -43
  133. package/user/src/models/ProductTypeLink.js +0 -51
  134. package/user/src/models/UserRestrictedProductTypeCreationParameter.d.ts +0 -31
  135. package/user/src/models/UserRestrictedProductTypeCreationParameter.js +0 -47
@@ -12,26 +12,17 @@
12
12
  /**
13
13
  *
14
14
  * @export
15
- * @interface ProductType
16
15
  */
17
- export interface ProductType {
18
- /**
19
- * Id of the product type (machine name)
20
- * @type {string}
21
- * @memberof ProductType
22
- */
23
- id?: string;
24
- /**
25
- * Readable name for display
26
- * @type {string}
27
- * @memberof ProductType
28
- */
29
- name?: string;
30
- }
31
- /**
32
- * Check if a given object implements the ProductType interface.
33
- */
34
- export declare function instanceOfProductType(value: object): value is ProductType;
16
+ export declare const ProductType: {
17
+ readonly PARAPHARMACIE: "PARAPHARMACIE";
18
+ readonly DM: "DM";
19
+ readonly MEDICAMENT: "MEDICAMENT";
20
+ readonly HOMEOPATHIE: "HOMEOPATHIE";
21
+ readonly VETERINAIRE: "VETERINAIRE";
22
+ readonly COMPLEMENT: "COMPLEMENT";
23
+ };
24
+ export declare type ProductType = typeof ProductType[keyof typeof ProductType];
25
+ export declare function instanceOfProductType(value: any): boolean;
35
26
  export declare function ProductTypeFromJSON(json: any): ProductType;
36
27
  export declare function ProductTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductType;
37
28
  export declare function ProductTypeToJSON(value?: ProductType | null): any;
@@ -13,12 +13,28 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.ProductTypeToJSON = exports.ProductTypeFromJSONTyped = exports.ProductTypeFromJSON = exports.instanceOfProductType = void 0;
16
+ exports.ProductTypeToJSON = exports.ProductTypeFromJSONTyped = exports.ProductTypeFromJSON = exports.instanceOfProductType = exports.ProductType = void 0;
17
17
  /**
18
- * Check if a given object implements the ProductType interface.
18
+ *
19
+ * @export
19
20
  */
21
+ exports.ProductType = {
22
+ PARAPHARMACIE: 'PARAPHARMACIE',
23
+ DM: 'DM',
24
+ MEDICAMENT: 'MEDICAMENT',
25
+ HOMEOPATHIE: 'HOMEOPATHIE',
26
+ VETERINAIRE: 'VETERINAIRE',
27
+ COMPLEMENT: 'COMPLEMENT'
28
+ };
20
29
  function instanceOfProductType(value) {
21
- return true;
30
+ for (var key in exports.ProductType) {
31
+ if (Object.prototype.hasOwnProperty.call(exports.ProductType, key)) {
32
+ if (exports.ProductType[key] === value) {
33
+ return true;
34
+ }
35
+ }
36
+ }
37
+ return false;
22
38
  }
23
39
  exports.instanceOfProductType = instanceOfProductType;
24
40
  function ProductTypeFromJSON(json) {
@@ -26,22 +42,10 @@ function ProductTypeFromJSON(json) {
26
42
  }
27
43
  exports.ProductTypeFromJSON = ProductTypeFromJSON;
28
44
  function ProductTypeFromJSONTyped(json, ignoreDiscriminator) {
29
- if (json == null) {
30
- return json;
31
- }
32
- return {
33
- 'id': json['id'],
34
- 'name': json['name'],
35
- };
45
+ return json;
36
46
  }
37
47
  exports.ProductTypeFromJSONTyped = ProductTypeFromJSONTyped;
38
48
  function ProductTypeToJSON(value) {
39
- if (value == null) {
40
- return value;
41
- }
42
- return {
43
- 'id': value['id'],
44
- 'name': value['name'],
45
- };
49
+ return value;
46
50
  }
47
51
  exports.ProductTypeToJSON = ProductTypeToJSON;
@@ -127,7 +127,7 @@ export interface RequestOpts {
127
127
  export declare function querystring(params: HTTPQuery, prefix?: string): string;
128
128
  export declare function mapValues(data: any, fn: (item: any) => any): {};
129
129
  export declare function canConsumeForm(consumes: Consume[]): boolean;
130
- export declare function toDateISOString(date: Date): string;
130
+ export declare function toDateISOString<D extends Date | null | undefined>(date: D): D extends Date ? string : D;
131
131
  export interface Consume {
132
132
  contentType: string;
133
133
  }
@@ -174,7 +174,7 @@ export declare class VoidApiResponse {
174
174
  }
175
175
  export interface BlobWithMeta {
176
176
  blob: Blob;
177
- filename: string;
177
+ filename?: string;
178
178
  }
179
179
  export declare function instanceOfBlobWithMeta(object: any): object is BlobWithMeta;
180
180
  export declare class BlobWithMetaApiResponse {
@@ -560,20 +560,16 @@ var BlobWithMetaApiResponse = /** @class */ (function () {
560
560
  ;
561
561
  BlobWithMetaApiResponse.prototype.extractFilename = function (headers) {
562
562
  var headerName = 'Content-Disposition';
563
- if (headers.has(headerName)) {
564
- var headerValue = headers.get(headerName);
565
- var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
566
- var matches = filenameRegex.exec(headerValue);
567
- if (matches != null && matches[1]) {
568
- return matches[1];
569
- }
570
- else {
571
- return undefined;
572
- }
573
- }
574
- else {
563
+ var headerValue = headers.get(headerName);
564
+ if (headerValue == null) {
575
565
  return undefined;
576
566
  }
567
+ var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
568
+ var matches = filenameRegex.exec(headerValue);
569
+ if (matches != null && matches[1]) {
570
+ return matches[1];
571
+ }
572
+ return undefined;
577
573
  };
578
574
  return BlobWithMetaApiResponse;
579
575
  }());
@@ -127,7 +127,7 @@ export interface RequestOpts {
127
127
  export declare function querystring(params: HTTPQuery, prefix?: string): string;
128
128
  export declare function mapValues(data: any, fn: (item: any) => any): {};
129
129
  export declare function canConsumeForm(consumes: Consume[]): boolean;
130
- export declare function toDateISOString(date: Date): string;
130
+ export declare function toDateISOString<D extends Date | null | undefined>(date: D): D extends Date ? string : D;
131
131
  export interface Consume {
132
132
  contentType: string;
133
133
  }
@@ -174,7 +174,7 @@ export declare class VoidApiResponse {
174
174
  }
175
175
  export interface BlobWithMeta {
176
176
  blob: Blob;
177
- filename: string;
177
+ filename?: string;
178
178
  }
179
179
  export declare function instanceOfBlobWithMeta(object: any): object is BlobWithMeta;
180
180
  export declare class BlobWithMetaApiResponse {
@@ -560,20 +560,16 @@ var BlobWithMetaApiResponse = /** @class */ (function () {
560
560
  ;
561
561
  BlobWithMetaApiResponse.prototype.extractFilename = function (headers) {
562
562
  var headerName = 'Content-Disposition';
563
- if (headers.has(headerName)) {
564
- var headerValue = headers.get(headerName);
565
- var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
566
- var matches = filenameRegex.exec(headerValue);
567
- if (matches != null && matches[1]) {
568
- return matches[1];
569
- }
570
- else {
571
- return undefined;
572
- }
573
- }
574
- else {
563
+ var headerValue = headers.get(headerName);
564
+ if (headerValue == null) {
575
565
  return undefined;
576
566
  }
567
+ var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
568
+ var matches = filenameRegex.exec(headerValue);
569
+ if (matches != null && matches[1]) {
570
+ return matches[1];
571
+ }
572
+ return undefined;
577
573
  };
578
574
  return BlobWithMetaApiResponse;
579
575
  }());
@@ -127,7 +127,7 @@ export interface RequestOpts {
127
127
  export declare function querystring(params: HTTPQuery, prefix?: string): string;
128
128
  export declare function mapValues(data: any, fn: (item: any) => any): {};
129
129
  export declare function canConsumeForm(consumes: Consume[]): boolean;
130
- export declare function toDateISOString(date: Date): string;
130
+ export declare function toDateISOString<D extends Date | null | undefined>(date: D): D extends Date ? string : D;
131
131
  export interface Consume {
132
132
  contentType: string;
133
133
  }
@@ -174,7 +174,7 @@ export declare class VoidApiResponse {
174
174
  }
175
175
  export interface BlobWithMeta {
176
176
  blob: Blob;
177
- filename: string;
177
+ filename?: string;
178
178
  }
179
179
  export declare function instanceOfBlobWithMeta(object: any): object is BlobWithMeta;
180
180
  export declare class BlobWithMetaApiResponse {
@@ -560,20 +560,16 @@ var BlobWithMetaApiResponse = /** @class */ (function () {
560
560
  ;
561
561
  BlobWithMetaApiResponse.prototype.extractFilename = function (headers) {
562
562
  var headerName = 'Content-Disposition';
563
- if (headers.has(headerName)) {
564
- var headerValue = headers.get(headerName);
565
- var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
566
- var matches = filenameRegex.exec(headerValue);
567
- if (matches != null && matches[1]) {
568
- return matches[1];
569
- }
570
- else {
571
- return undefined;
572
- }
573
- }
574
- else {
563
+ var headerValue = headers.get(headerName);
564
+ if (headerValue == null) {
575
565
  return undefined;
576
566
  }
567
+ var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
568
+ var matches = filenameRegex.exec(headerValue);
569
+ if (matches != null && matches[1]) {
570
+ return matches[1];
571
+ }
572
+ return undefined;
577
573
  };
578
574
  return BlobWithMetaApiResponse;
579
575
  }());
@@ -127,7 +127,7 @@ export interface RequestOpts {
127
127
  export declare function querystring(params: HTTPQuery, prefix?: string): string;
128
128
  export declare function mapValues(data: any, fn: (item: any) => any): {};
129
129
  export declare function canConsumeForm(consumes: Consume[]): boolean;
130
- export declare function toDateISOString(date: Date): string;
130
+ export declare function toDateISOString<D extends Date | null | undefined>(date: D): D extends Date ? string : D;
131
131
  export interface Consume {
132
132
  contentType: string;
133
133
  }
@@ -174,7 +174,7 @@ export declare class VoidApiResponse {
174
174
  }
175
175
  export interface BlobWithMeta {
176
176
  blob: Blob;
177
- filename: string;
177
+ filename?: string;
178
178
  }
179
179
  export declare function instanceOfBlobWithMeta(object: any): object is BlobWithMeta;
180
180
  export declare class BlobWithMetaApiResponse {
@@ -560,20 +560,16 @@ var BlobWithMetaApiResponse = /** @class */ (function () {
560
560
  ;
561
561
  BlobWithMetaApiResponse.prototype.extractFilename = function (headers) {
562
562
  var headerName = 'Content-Disposition';
563
- if (headers.has(headerName)) {
564
- var headerValue = headers.get(headerName);
565
- var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
566
- var matches = filenameRegex.exec(headerValue);
567
- if (matches != null && matches[1]) {
568
- return matches[1];
569
- }
570
- else {
571
- return undefined;
572
- }
573
- }
574
- else {
563
+ var headerValue = headers.get(headerName);
564
+ if (headerValue == null) {
575
565
  return undefined;
576
566
  }
567
+ var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
568
+ var matches = filenameRegex.exec(headerValue);
569
+ if (matches != null && matches[1]) {
570
+ return matches[1];
571
+ }
572
+ return undefined;
577
573
  };
578
574
  return BlobWithMetaApiResponse;
579
575
  }());
@@ -127,7 +127,7 @@ export interface RequestOpts {
127
127
  export declare function querystring(params: HTTPQuery, prefix?: string): string;
128
128
  export declare function mapValues(data: any, fn: (item: any) => any): {};
129
129
  export declare function canConsumeForm(consumes: Consume[]): boolean;
130
- export declare function toDateISOString(date: Date): string;
130
+ export declare function toDateISOString<D extends Date | null | undefined>(date: D): D extends Date ? string : D;
131
131
  export interface Consume {
132
132
  contentType: string;
133
133
  }
@@ -174,7 +174,7 @@ export declare class VoidApiResponse {
174
174
  }
175
175
  export interface BlobWithMeta {
176
176
  blob: Blob;
177
- filename: string;
177
+ filename?: string;
178
178
  }
179
179
  export declare function instanceOfBlobWithMeta(object: any): object is BlobWithMeta;
180
180
  export declare class BlobWithMetaApiResponse {
@@ -560,20 +560,16 @@ var BlobWithMetaApiResponse = /** @class */ (function () {
560
560
  ;
561
561
  BlobWithMetaApiResponse.prototype.extractFilename = function (headers) {
562
562
  var headerName = 'Content-Disposition';
563
- if (headers.has(headerName)) {
564
- var headerValue = headers.get(headerName);
565
- var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
566
- var matches = filenameRegex.exec(headerValue);
567
- if (matches != null && matches[1]) {
568
- return matches[1];
569
- }
570
- else {
571
- return undefined;
572
- }
573
- }
574
- else {
563
+ var headerValue = headers.get(headerName);
564
+ if (headerValue == null) {
575
565
  return undefined;
576
566
  }
567
+ var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
568
+ var matches = filenameRegex.exec(headerValue);
569
+ if (matches != null && matches[1]) {
570
+ return matches[1];
571
+ }
572
+ return undefined;
577
573
  };
578
574
  return BlobWithMetaApiResponse;
579
575
  }());
@@ -127,7 +127,7 @@ export interface RequestOpts {
127
127
  export declare function querystring(params: HTTPQuery, prefix?: string): string;
128
128
  export declare function mapValues(data: any, fn: (item: any) => any): {};
129
129
  export declare function canConsumeForm(consumes: Consume[]): boolean;
130
- export declare function toDateISOString(date: Date): string;
130
+ export declare function toDateISOString<D extends Date | null | undefined>(date: D): D extends Date ? string : D;
131
131
  export interface Consume {
132
132
  contentType: string;
133
133
  }
@@ -174,7 +174,7 @@ export declare class VoidApiResponse {
174
174
  }
175
175
  export interface BlobWithMeta {
176
176
  blob: Blob;
177
- filename: string;
177
+ filename?: string;
178
178
  }
179
179
  export declare function instanceOfBlobWithMeta(object: any): object is BlobWithMeta;
180
180
  export declare class BlobWithMetaApiResponse {
@@ -560,20 +560,16 @@ var BlobWithMetaApiResponse = /** @class */ (function () {
560
560
  ;
561
561
  BlobWithMetaApiResponse.prototype.extractFilename = function (headers) {
562
562
  var headerName = 'Content-Disposition';
563
- if (headers.has(headerName)) {
564
- var headerValue = headers.get(headerName);
565
- var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
566
- var matches = filenameRegex.exec(headerValue);
567
- if (matches != null && matches[1]) {
568
- return matches[1];
569
- }
570
- else {
571
- return undefined;
572
- }
573
- }
574
- else {
563
+ var headerValue = headers.get(headerName);
564
+ if (headerValue == null) {
575
565
  return undefined;
576
566
  }
567
+ var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
568
+ var matches = filenameRegex.exec(headerValue);
569
+ if (matches != null && matches[1]) {
570
+ return matches[1];
571
+ }
572
+ return undefined;
577
573
  };
578
574
  return BlobWithMetaApiResponse;
579
575
  }());
@@ -127,7 +127,7 @@ export interface RequestOpts {
127
127
  export declare function querystring(params: HTTPQuery, prefix?: string): string;
128
128
  export declare function mapValues(data: any, fn: (item: any) => any): {};
129
129
  export declare function canConsumeForm(consumes: Consume[]): boolean;
130
- export declare function toDateISOString(date: Date): string;
130
+ export declare function toDateISOString<D extends Date | null | undefined>(date: D): D extends Date ? string : D;
131
131
  export interface Consume {
132
132
  contentType: string;
133
133
  }
@@ -174,7 +174,7 @@ export declare class VoidApiResponse {
174
174
  }
175
175
  export interface BlobWithMeta {
176
176
  blob: Blob;
177
- filename: string;
177
+ filename?: string;
178
178
  }
179
179
  export declare function instanceOfBlobWithMeta(object: any): object is BlobWithMeta;
180
180
  export declare class BlobWithMetaApiResponse {
@@ -560,20 +560,16 @@ var BlobWithMetaApiResponse = /** @class */ (function () {
560
560
  ;
561
561
  BlobWithMetaApiResponse.prototype.extractFilename = function (headers) {
562
562
  var headerName = 'Content-Disposition';
563
- if (headers.has(headerName)) {
564
- var headerValue = headers.get(headerName);
565
- var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
566
- var matches = filenameRegex.exec(headerValue);
567
- if (matches != null && matches[1]) {
568
- return matches[1];
569
- }
570
- else {
571
- return undefined;
572
- }
573
- }
574
- else {
563
+ var headerValue = headers.get(headerName);
564
+ if (headerValue == null) {
575
565
  return undefined;
576
566
  }
567
+ var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
568
+ var matches = filenameRegex.exec(headerValue);
569
+ if (matches != null && matches[1]) {
570
+ return matches[1];
571
+ }
572
+ return undefined;
577
573
  };
578
574
  return BlobWithMetaApiResponse;
579
575
  }());
@@ -127,7 +127,7 @@ export interface RequestOpts {
127
127
  export declare function querystring(params: HTTPQuery, prefix?: string): string;
128
128
  export declare function mapValues(data: any, fn: (item: any) => any): {};
129
129
  export declare function canConsumeForm(consumes: Consume[]): boolean;
130
- export declare function toDateISOString(date: Date): string;
130
+ export declare function toDateISOString<D extends Date | null | undefined>(date: D): D extends Date ? string : D;
131
131
  export interface Consume {
132
132
  contentType: string;
133
133
  }
@@ -174,7 +174,7 @@ export declare class VoidApiResponse {
174
174
  }
175
175
  export interface BlobWithMeta {
176
176
  blob: Blob;
177
- filename: string;
177
+ filename?: string;
178
178
  }
179
179
  export declare function instanceOfBlobWithMeta(object: any): object is BlobWithMeta;
180
180
  export declare class BlobWithMetaApiResponse {
@@ -560,20 +560,16 @@ var BlobWithMetaApiResponse = /** @class */ (function () {
560
560
  ;
561
561
  BlobWithMetaApiResponse.prototype.extractFilename = function (headers) {
562
562
  var headerName = 'Content-Disposition';
563
- if (headers.has(headerName)) {
564
- var headerValue = headers.get(headerName);
565
- var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
566
- var matches = filenameRegex.exec(headerValue);
567
- if (matches != null && matches[1]) {
568
- return matches[1];
569
- }
570
- else {
571
- return undefined;
572
- }
573
- }
574
- else {
563
+ var headerValue = headers.get(headerName);
564
+ if (headerValue == null) {
575
565
  return undefined;
576
566
  }
567
+ var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
568
+ var matches = filenameRegex.exec(headerValue);
569
+ if (matches != null && matches[1]) {
570
+ return matches[1];
571
+ }
572
+ return undefined;
577
573
  };
578
574
  return BlobWithMetaApiResponse;
579
575
  }());
@@ -127,7 +127,7 @@ export interface RequestOpts {
127
127
  export declare function querystring(params: HTTPQuery, prefix?: string): string;
128
128
  export declare function mapValues(data: any, fn: (item: any) => any): {};
129
129
  export declare function canConsumeForm(consumes: Consume[]): boolean;
130
- export declare function toDateISOString(date: Date): string;
130
+ export declare function toDateISOString<D extends Date | null | undefined>(date: D): D extends Date ? string : D;
131
131
  export interface Consume {
132
132
  contentType: string;
133
133
  }
@@ -174,7 +174,7 @@ export declare class VoidApiResponse {
174
174
  }
175
175
  export interface BlobWithMeta {
176
176
  blob: Blob;
177
- filename: string;
177
+ filename?: string;
178
178
  }
179
179
  export declare function instanceOfBlobWithMeta(object: any): object is BlobWithMeta;
180
180
  export declare class BlobWithMetaApiResponse {
@@ -560,20 +560,16 @@ var BlobWithMetaApiResponse = /** @class */ (function () {
560
560
  ;
561
561
  BlobWithMetaApiResponse.prototype.extractFilename = function (headers) {
562
562
  var headerName = 'Content-Disposition';
563
- if (headers.has(headerName)) {
564
- var headerValue = headers.get(headerName);
565
- var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
566
- var matches = filenameRegex.exec(headerValue);
567
- if (matches != null && matches[1]) {
568
- return matches[1];
569
- }
570
- else {
571
- return undefined;
572
- }
573
- }
574
- else {
563
+ var headerValue = headers.get(headerName);
564
+ if (headerValue == null) {
575
565
  return undefined;
576
566
  }
567
+ var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
568
+ var matches = filenameRegex.exec(headerValue);
569
+ if (matches != null && matches[1]) {
570
+ return matches[1];
571
+ }
572
+ return undefined;
577
573
  };
578
574
  return BlobWithMetaApiResponse;
579
575
  }());
@@ -127,7 +127,7 @@ export interface RequestOpts {
127
127
  export declare function querystring(params: HTTPQuery, prefix?: string): string;
128
128
  export declare function mapValues(data: any, fn: (item: any) => any): {};
129
129
  export declare function canConsumeForm(consumes: Consume[]): boolean;
130
- export declare function toDateISOString(date: Date): string;
130
+ export declare function toDateISOString<D extends Date | null | undefined>(date: D): D extends Date ? string : D;
131
131
  export interface Consume {
132
132
  contentType: string;
133
133
  }
@@ -174,7 +174,7 @@ export declare class VoidApiResponse {
174
174
  }
175
175
  export interface BlobWithMeta {
176
176
  blob: Blob;
177
- filename: string;
177
+ filename?: string;
178
178
  }
179
179
  export declare function instanceOfBlobWithMeta(object: any): object is BlobWithMeta;
180
180
  export declare class BlobWithMetaApiResponse {
@@ -560,20 +560,16 @@ var BlobWithMetaApiResponse = /** @class */ (function () {
560
560
  ;
561
561
  BlobWithMetaApiResponse.prototype.extractFilename = function (headers) {
562
562
  var headerName = 'Content-Disposition';
563
- if (headers.has(headerName)) {
564
- var headerValue = headers.get(headerName);
565
- var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
566
- var matches = filenameRegex.exec(headerValue);
567
- if (matches != null && matches[1]) {
568
- return matches[1];
569
- }
570
- else {
571
- return undefined;
572
- }
573
- }
574
- else {
563
+ var headerValue = headers.get(headerName);
564
+ if (headerValue == null) {
575
565
  return undefined;
576
566
  }
567
+ var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
568
+ var matches = filenameRegex.exec(headerValue);
569
+ if (matches != null && matches[1]) {
570
+ return matches[1];
571
+ }
572
+ return undefined;
577
573
  };
578
574
  return BlobWithMetaApiResponse;
579
575
  }());
@@ -127,7 +127,7 @@ export interface RequestOpts {
127
127
  export declare function querystring(params: HTTPQuery, prefix?: string): string;
128
128
  export declare function mapValues(data: any, fn: (item: any) => any): {};
129
129
  export declare function canConsumeForm(consumes: Consume[]): boolean;
130
- export declare function toDateISOString(date: Date): string;
130
+ export declare function toDateISOString<D extends Date | null | undefined>(date: D): D extends Date ? string : D;
131
131
  export interface Consume {
132
132
  contentType: string;
133
133
  }
@@ -174,7 +174,7 @@ export declare class VoidApiResponse {
174
174
  }
175
175
  export interface BlobWithMeta {
176
176
  blob: Blob;
177
- filename: string;
177
+ filename?: string;
178
178
  }
179
179
  export declare function instanceOfBlobWithMeta(object: any): object is BlobWithMeta;
180
180
  export declare class BlobWithMetaApiResponse {
@@ -560,20 +560,16 @@ var BlobWithMetaApiResponse = /** @class */ (function () {
560
560
  ;
561
561
  BlobWithMetaApiResponse.prototype.extractFilename = function (headers) {
562
562
  var headerName = 'Content-Disposition';
563
- if (headers.has(headerName)) {
564
- var headerValue = headers.get(headerName);
565
- var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
566
- var matches = filenameRegex.exec(headerValue);
567
- if (matches != null && matches[1]) {
568
- return matches[1];
569
- }
570
- else {
571
- return undefined;
572
- }
573
- }
574
- else {
563
+ var headerValue = headers.get(headerName);
564
+ if (headerValue == null) {
575
565
  return undefined;
576
566
  }
567
+ var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
568
+ var matches = filenameRegex.exec(headerValue);
569
+ if (matches != null && matches[1]) {
570
+ return matches[1];
571
+ }
572
+ return undefined;
577
573
  };
578
574
  return BlobWithMetaApiResponse;
579
575
  }());
@@ -127,7 +127,7 @@ export interface RequestOpts {
127
127
  export declare function querystring(params: HTTPQuery, prefix?: string): string;
128
128
  export declare function mapValues(data: any, fn: (item: any) => any): {};
129
129
  export declare function canConsumeForm(consumes: Consume[]): boolean;
130
- export declare function toDateISOString(date: Date): string;
130
+ export declare function toDateISOString<D extends Date | null | undefined>(date: D): D extends Date ? string : D;
131
131
  export interface Consume {
132
132
  contentType: string;
133
133
  }
@@ -174,7 +174,7 @@ export declare class VoidApiResponse {
174
174
  }
175
175
  export interface BlobWithMeta {
176
176
  blob: Blob;
177
- filename: string;
177
+ filename?: string;
178
178
  }
179
179
  export declare function instanceOfBlobWithMeta(object: any): object is BlobWithMeta;
180
180
  export declare class BlobWithMetaApiResponse {