@kohost/api-client 3.8.3 → 3.9.1

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.
package/dist/esm/utils.js CHANGED
@@ -11352,6 +11352,12 @@ var require_ticket = __commonJS({
11352
11352
  userName: {
11353
11353
  type: "string"
11354
11354
  },
11355
+ vendorId: {
11356
+ type: "string"
11357
+ },
11358
+ vendorName: {
11359
+ type: "string"
11360
+ },
11355
11361
  systemId: {
11356
11362
  type: "string"
11357
11363
  },
@@ -11381,6 +11387,9 @@ var require_ticket = __commonJS({
11381
11387
  },
11382
11388
  {
11383
11389
  required: ["id", "systemId", "timestamp", "body"]
11390
+ },
11391
+ {
11392
+ required: ["id", "vendorId", "timestamp", "body"]
11384
11393
  }
11385
11394
  ]
11386
11395
  }
@@ -11457,6 +11466,19 @@ var require_ticket = __commonJS({
11457
11466
  { type: "null" },
11458
11467
  { type: "string" }
11459
11468
  ]
11469
+ },
11470
+ vendorId: {
11471
+ type: "string"
11472
+ },
11473
+ vendorName: {
11474
+ type: "string"
11475
+ },
11476
+ vendorPhoto: {
11477
+ anyOf: [
11478
+ { $ref: "mediaFile.json" },
11479
+ { type: "null" },
11480
+ { type: "string" }
11481
+ ]
11460
11482
  }
11461
11483
  }
11462
11484
  },
@@ -13075,6 +13097,9 @@ var require_issue = __commonJS({
13075
13097
  userId: {
13076
13098
  type: "string"
13077
13099
  },
13100
+ vendorId: {
13101
+ type: "string"
13102
+ },
13078
13103
  priority: {
13079
13104
  $ref: "ticket.json#/properties/priority"
13080
13105
  },
@@ -13085,6 +13110,9 @@ var require_issue = __commonJS({
13085
13110
  }
13086
13111
  }
13087
13112
  }
13113
+ },
13114
+ systemKey: {
13115
+ type: "string"
13088
13116
  }
13089
13117
  },
13090
13118
  required: ["id", "type", "name", "department"]
@@ -13129,6 +13157,89 @@ var require_Issue = __commonJS({
13129
13157
  }
13130
13158
  });
13131
13159
 
13160
+ // src/schemas/vendor.json
13161
+ var require_vendor = __commonJS({
13162
+ "src/schemas/vendor.json"(exports, module) {
13163
+ module.exports = {
13164
+ $schema: "http://json-schema.org/draft-07/schema",
13165
+ $id: "vendor.json",
13166
+ title: "Vendor",
13167
+ type: "object",
13168
+ required: ["name", "email"],
13169
+ properties: {
13170
+ id: {
13171
+ $ref: "definitions.json#/definitions/id"
13172
+ },
13173
+ type: {
13174
+ type: "string",
13175
+ default: "vendor",
13176
+ enum: ["vendor"]
13177
+ },
13178
+ name: {
13179
+ type: "string"
13180
+ },
13181
+ phone: {
13182
+ type: ["string", "null"],
13183
+ pattern: "^\\+[0-9]{1,14}$"
13184
+ },
13185
+ email: {
13186
+ type: ["string", "null"],
13187
+ format: "email"
13188
+ },
13189
+ address: {
13190
+ $ref: "definitions.json#/definitions/address"
13191
+ },
13192
+ photo: {
13193
+ $ref: "mediaFile.json#"
13194
+ },
13195
+ createdAt: {
13196
+ $ref: "definitions.json#/definitions/createdAt"
13197
+ },
13198
+ updatedAt: {
13199
+ $ref: "definitions.json#/definitions/updatedAt"
13200
+ }
13201
+ }
13202
+ };
13203
+ }
13204
+ });
13205
+
13206
+ // src/Models/Vendor.js
13207
+ var require_Vendor = __commonJS({
13208
+ "src/Models/Vendor.js"(exports, module) {
13209
+ var schemas = require_schema();
13210
+ var schema = require_vendor();
13211
+ var Entity = require_Entity();
13212
+ schemas.add(schema);
13213
+ var validator = schemas.compile(schema);
13214
+ var Vendor = class extends Entity {
13215
+ static {
13216
+ __name(this, "Vendor");
13217
+ }
13218
+ /**
13219
+ * @typedef {import("../schemas/VendorSchema").Vendor} VendorType
13220
+ * Create a Product instance.
13221
+ * @constructor
13222
+ * @param {Vendor} vendor - The vendor object of type Vendor.
13223
+ */
13224
+ constructor(vendor) {
13225
+ super(vendor);
13226
+ }
13227
+ };
13228
+ Object.defineProperty(Vendor.prototype, "schema", {
13229
+ value: schema
13230
+ });
13231
+ Object.defineProperty(Vendor.prototype, "validator", {
13232
+ get: /* @__PURE__ */ __name(function() {
13233
+ return validator;
13234
+ }, "get")
13235
+ });
13236
+ Object.defineProperty(Vendor, "validProperties", {
13237
+ value: Object.keys(schema.properties)
13238
+ });
13239
+ module.exports = Vendor;
13240
+ }
13241
+ });
13242
+
13132
13243
  // src/schemas/property.json
13133
13244
  var require_property = __commonJS({
13134
13245
  "src/schemas/property.json"(exports, module) {
@@ -13835,6 +13946,7 @@ var require_Models = __commonJS({
13835
13946
  var Announcement = require_Announcement();
13836
13947
  var TimeSheet = require_TimeSheet();
13837
13948
  var Issue = require_Issue();
13949
+ var Vendor = require_Vendor();
13838
13950
  var Property = require_Property();
13839
13951
  var Organization = require_Organization();
13840
13952
  var Entity = require_Entity();
@@ -13876,7 +13988,8 @@ var require_Models = __commonJS({
13876
13988
  Announcement,
13877
13989
  TimeSheet,
13878
13990
  Policy,
13879
- Issue
13991
+ Issue,
13992
+ Vendor
13880
13993
  };
13881
13994
  }
13882
13995
  });
@@ -13961,6 +14074,8 @@ var require_entityFactory = __commonJS({
13961
14074
  return Models.Organization;
13962
14075
  case "issue":
13963
14076
  return Models.Issue;
14077
+ case "vendor":
14078
+ return Models.Vendor;
13964
14079
  default:
13965
14080
  throw new Error("Unknown entity type: " + type);
13966
14081
  }