@kohost/api-client 3.8.3 → 3.9.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.
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
  },
@@ -13129,6 +13154,89 @@ var require_Issue = __commonJS({
13129
13154
  }
13130
13155
  });
13131
13156
 
13157
+ // src/schemas/vendor.json
13158
+ var require_vendor = __commonJS({
13159
+ "src/schemas/vendor.json"(exports, module) {
13160
+ module.exports = {
13161
+ $schema: "http://json-schema.org/draft-07/schema",
13162
+ $id: "vendor.json",
13163
+ title: "Vendor",
13164
+ type: "object",
13165
+ required: ["name", "email"],
13166
+ properties: {
13167
+ id: {
13168
+ $ref: "definitions.json#/definitions/id"
13169
+ },
13170
+ type: {
13171
+ type: "string",
13172
+ default: "vendor",
13173
+ enum: ["vendor"]
13174
+ },
13175
+ name: {
13176
+ type: "string"
13177
+ },
13178
+ phone: {
13179
+ type: ["string", "null"],
13180
+ pattern: "^\\+[0-9]{1,14}$"
13181
+ },
13182
+ email: {
13183
+ type: ["string", "null"],
13184
+ format: "email"
13185
+ },
13186
+ address: {
13187
+ $ref: "definitions.json#/definitions/address"
13188
+ },
13189
+ photo: {
13190
+ $ref: "mediaFile.json#"
13191
+ },
13192
+ createdAt: {
13193
+ $ref: "definitions.json#/definitions/createdAt"
13194
+ },
13195
+ updatedAt: {
13196
+ $ref: "definitions.json#/definitions/updatedAt"
13197
+ }
13198
+ }
13199
+ };
13200
+ }
13201
+ });
13202
+
13203
+ // src/Models/Vendor.js
13204
+ var require_Vendor = __commonJS({
13205
+ "src/Models/Vendor.js"(exports, module) {
13206
+ var schemas = require_schema();
13207
+ var schema = require_vendor();
13208
+ var Entity = require_Entity();
13209
+ schemas.add(schema);
13210
+ var validator = schemas.compile(schema);
13211
+ var Vendor = class extends Entity {
13212
+ static {
13213
+ __name(this, "Vendor");
13214
+ }
13215
+ /**
13216
+ * @typedef {import("../schemas/VendorSchema").Vendor} VendorType
13217
+ * Create a Product instance.
13218
+ * @constructor
13219
+ * @param {Vendor} vendor - The vendor object of type Vendor.
13220
+ */
13221
+ constructor(vendor) {
13222
+ super(vendor);
13223
+ }
13224
+ };
13225
+ Object.defineProperty(Vendor.prototype, "schema", {
13226
+ value: schema
13227
+ });
13228
+ Object.defineProperty(Vendor.prototype, "validator", {
13229
+ get: /* @__PURE__ */ __name(function() {
13230
+ return validator;
13231
+ }, "get")
13232
+ });
13233
+ Object.defineProperty(Vendor, "validProperties", {
13234
+ value: Object.keys(schema.properties)
13235
+ });
13236
+ module.exports = Vendor;
13237
+ }
13238
+ });
13239
+
13132
13240
  // src/schemas/property.json
13133
13241
  var require_property = __commonJS({
13134
13242
  "src/schemas/property.json"(exports, module) {
@@ -13835,6 +13943,7 @@ var require_Models = __commonJS({
13835
13943
  var Announcement = require_Announcement();
13836
13944
  var TimeSheet = require_TimeSheet();
13837
13945
  var Issue = require_Issue();
13946
+ var Vendor = require_Vendor();
13838
13947
  var Property = require_Property();
13839
13948
  var Organization = require_Organization();
13840
13949
  var Entity = require_Entity();
@@ -13876,7 +13985,8 @@ var require_Models = __commonJS({
13876
13985
  Announcement,
13877
13986
  TimeSheet,
13878
13987
  Policy,
13879
- Issue
13988
+ Issue,
13989
+ Vendor
13880
13990
  };
13881
13991
  }
13882
13992
  });
@@ -13961,6 +14071,8 @@ var require_entityFactory = __commonJS({
13961
14071
  return Models.Organization;
13962
14072
  case "issue":
13963
14073
  return Models.Issue;
14074
+ case "vendor":
14075
+ return Models.Vendor;
13964
14076
  default:
13965
14077
  throw new Error("Unknown entity type: " + type);
13966
14078
  }