@kohost/api-client 3.0.0-beta.57 → 3.0.0-beta.58

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.
@@ -5705,6 +5705,44 @@ var require_ListOrders = __commonJS({
5705
5705
  }
5706
5706
  });
5707
5707
 
5708
+ // dist/useCases/ListMyOrders.js
5709
+ var require_ListMyOrders = __commonJS({
5710
+ "dist/useCases/ListMyOrders.js"(exports2, module2) {
5711
+ module2.exports = /* @__PURE__ */ __name(function ListMyOrders2(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
5712
+ if (!requestData)
5713
+ requestData = {};
5714
+ const pathParams = null;
5715
+ const { data, query, headers } = requestData;
5716
+ let url = "/orders/mine";
5717
+ if (pathParams && data) {
5718
+ for (const param of pathParams) {
5719
+ const paramName = param.replace(":", "");
5720
+ url = url.replace(param, data[paramName]);
5721
+ }
5722
+ }
5723
+ if (url.match(/:[a-zA-Z0-9]+/g)) {
5724
+ const missingParams = url.match(/:[a-zA-Z0-9]+/g);
5725
+ const missing = missingParams.map((param) => param.replace(":", ""));
5726
+ return Promise.reject(
5727
+ new Error("Missing parameters: " + missing.join(", "))
5728
+ );
5729
+ }
5730
+ const config = {
5731
+ method: "get",
5732
+ url,
5733
+ ...httpConfigOptions
5734
+ };
5735
+ if (data)
5736
+ config.data = data;
5737
+ if (query)
5738
+ config.params = query;
5739
+ if (headers)
5740
+ config.headers = headers;
5741
+ return this._http.request(config);
5742
+ }, "ListMyOrders");
5743
+ }
5744
+ });
5745
+
5708
5746
  // src/Client/index.js
5709
5747
  var LoginUser = require_LoginUser();
5710
5748
  var RefreshToken = require_RefreshToken();
@@ -5856,6 +5894,7 @@ var DeleteMediaFile = require_DeleteMediaFile();
5856
5894
  var UploadImage = require_UploadImage();
5857
5895
  var DescribeProduct = require_DescribeProduct();
5858
5896
  var ListOrders = require_ListOrders();
5897
+ var ListMyOrders = require_ListMyOrders();
5859
5898
  var { EventEmitter } = require("events");
5860
5899
  var axios = require("axios");
5861
5900
  var KohostApiClient = class _KohostApiClient extends EventEmitter {
@@ -6118,4 +6157,5 @@ KohostApiClient.prototype.DeleteMediaFile = DeleteMediaFile;
6118
6157
  KohostApiClient.prototype.UploadImage = UploadImage;
6119
6158
  KohostApiClient.prototype.DescribeProduct = DescribeProduct;
6120
6159
  KohostApiClient.prototype.ListOrders = ListOrders;
6160
+ KohostApiClient.prototype.ListMyOrders = ListMyOrders;
6121
6161
  module.exports = KohostApiClient;
@@ -28,7 +28,7 @@ export interface Ticket {
28
28
  timestamp: CreatedAt;
29
29
  body: string;
30
30
  readBy?: string[];
31
- media?: MediaFile;
31
+ media?: MediaFile | null;
32
32
  }[];
33
33
  requester: string;
34
34
  assignedTo?: string | null;
@@ -38,7 +38,7 @@
38
38
  }
39
39
  },
40
40
  "media": {
41
- "$ref": "mediaFile.json"
41
+ "anyOf": [{ "$ref": "mediaFile.json" }, { "type": "null" }]
42
42
  }
43
43
  },
44
44
  "required": ["userId", "id", "timestamp", "body"]
@@ -5705,6 +5705,44 @@ var require_ListOrders = __commonJS({
5705
5705
  }
5706
5706
  });
5707
5707
 
5708
+ // dist/useCases/ListMyOrders.js
5709
+ var require_ListMyOrders = __commonJS({
5710
+ "dist/useCases/ListMyOrders.js"(exports, module) {
5711
+ module.exports = /* @__PURE__ */ __name(function ListMyOrders(requestData = { data: null, query: null, headers: null }, httpConfigOptions = {}) {
5712
+ if (!requestData)
5713
+ requestData = {};
5714
+ const pathParams = null;
5715
+ const { data, query, headers } = requestData;
5716
+ let url = "/orders/mine";
5717
+ if (pathParams && data) {
5718
+ for (const param of pathParams) {
5719
+ const paramName = param.replace(":", "");
5720
+ url = url.replace(param, data[paramName]);
5721
+ }
5722
+ }
5723
+ if (url.match(/:[a-zA-Z0-9]+/g)) {
5724
+ const missingParams = url.match(/:[a-zA-Z0-9]+/g);
5725
+ const missing = missingParams.map((param) => param.replace(":", ""));
5726
+ return Promise.reject(
5727
+ new Error("Missing parameters: " + missing.join(", "))
5728
+ );
5729
+ }
5730
+ const config = {
5731
+ method: "get",
5732
+ url,
5733
+ ...httpConfigOptions
5734
+ };
5735
+ if (data)
5736
+ config.data = data;
5737
+ if (query)
5738
+ config.params = query;
5739
+ if (headers)
5740
+ config.headers = headers;
5741
+ return this._http.request(config);
5742
+ }, "ListMyOrders");
5743
+ }
5744
+ });
5745
+
5708
5746
  // node_modules/events/events.js
5709
5747
  var require_events = __commonJS({
5710
5748
  "node_modules/events/events.js"(exports, module) {
@@ -8327,6 +8365,7 @@ var require_Client = __commonJS({
8327
8365
  var UploadImage = require_UploadImage();
8328
8366
  var DescribeProduct = require_DescribeProduct();
8329
8367
  var ListOrders = require_ListOrders();
8368
+ var ListMyOrders = require_ListMyOrders();
8330
8369
  var { EventEmitter } = require_events();
8331
8370
  var axios = require_axios();
8332
8371
  var KohostApiClient = class _KohostApiClient extends EventEmitter {
@@ -8589,6 +8628,7 @@ var require_Client = __commonJS({
8589
8628
  KohostApiClient.prototype.UploadImage = UploadImage;
8590
8629
  KohostApiClient.prototype.DescribeProduct = DescribeProduct;
8591
8630
  KohostApiClient.prototype.ListOrders = ListOrders;
8631
+ KohostApiClient.prototype.ListMyOrders = ListMyOrders;
8592
8632
  module.exports = KohostApiClient;
8593
8633
  }
8594
8634
  });