@kosdev-code/kos-ui-sdk 0.1.0-next.867 → 0.1.0-next.871

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/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const service$8 = require("./index-D8aw-T5w.cjs");
3
+ const service$8 = require("./index-DsRhHHtS.cjs");
4
4
  const mobx = require("mobx");
5
5
  const log$s = require("loglevel");
6
6
  const dateFns = require("date-fns");
@@ -3492,7 +3492,8 @@ let BrowserRouterModelImpl = class {
3492
3492
  id: requestId,
3493
3493
  method,
3494
3494
  path: url,
3495
- body: data
3495
+ body: data,
3496
+ headers: payload.headers
3496
3497
  };
3497
3498
  let status = 200;
3498
3499
  const res = {
@@ -10344,10 +10345,10 @@ let CanvasDispatcherModelImpl = class {
10344
10345
  }
10345
10346
  async handlePatternApplication(req, res) {
10346
10347
  const pattern = req.params.pattern;
10347
- const endpoint = req.params.endpoint;
10348
- const rendererModel = this._endpointRenderers.getModel(endpoint);
10348
+ const endpoint2 = req.params.endpoint;
10349
+ const rendererModel = this._endpointRenderers.getModel(endpoint2);
10349
10350
  if (!rendererModel) {
10350
- res.status?.(404).send({ error: `Endpoint "${endpoint}" not found` });
10351
+ res.status?.(404).send({ error: `Endpoint "${endpoint2}" not found` });
10351
10352
  return;
10352
10353
  }
10353
10354
  if (!this._patterns.has(pattern)) {
@@ -10377,10 +10378,10 @@ let CanvasDispatcherModelImpl = class {
10377
10378
  res.status?.(400).send({ error: "Invalid color format" });
10378
10379
  return;
10379
10380
  }
10380
- const endpoint = req.params.endpoint;
10381
- const rendererModel = this._endpointRenderers.getModel(endpoint);
10381
+ const endpoint2 = req.params.endpoint;
10382
+ const rendererModel = this._endpointRenderers.getModel(endpoint2);
10382
10383
  if (!rendererModel) {
10383
- res.status?.(404).send({ error: `Endpoint "${endpoint}" not found` });
10384
+ res.status?.(404).send({ error: `Endpoint "${endpoint2}" not found` });
10384
10385
  return;
10385
10386
  }
10386
10387
  const { r, b, g } = rgb;
@@ -12175,18 +12176,31 @@ const updateRegion = async (region) => {
12175
12176
  regionInfo.updateProperty(region);
12176
12177
  };
12177
12178
  async function getKosServiceApi() {
12178
- const { default: API } = await Promise.resolve().then(() => require("./index-D8aw-T5w.cjs")).then((n) => n.service);
12179
+ const { default: API } = await Promise.resolve().then(() => require("./index-DsRhHHtS.cjs")).then((n) => n.service);
12179
12180
  return API;
12180
12181
  }
12181
12182
  function kosServiceRequest$7(params2) {
12182
12183
  return service$8.kosServiceRequest(params2);
12183
12184
  }
12185
+ function endpoint$1(path, method) {
12186
+ return { path, method };
12187
+ }
12188
+ function serviceRequest$1(ep, opts) {
12189
+ return kosServiceRequest$7({
12190
+ path: ep.path,
12191
+ method: ep.method,
12192
+ errorHandler: { strategy: "log", defaultValue: null },
12193
+ ...opts
12194
+ });
12195
+ }
12184
12196
  const api$7 = service$8.createClient();
12185
12197
  const service$7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12186
12198
  __proto__: null,
12187
12199
  api: api$7,
12188
12200
  default: api$7,
12189
- kosServiceRequest: kosServiceRequest$7
12201
+ endpoint: endpoint$1,
12202
+ kosServiceRequest: kosServiceRequest$7,
12203
+ serviceRequest: serviceRequest$1
12190
12204
  }, Symbol.toStringTag, { value: "Module" }));
12191
12205
  function kosServiceRequest$6(params2) {
12192
12206
  return service$8.kosServiceRequest(params2);
@@ -12221,12 +12235,25 @@ const service$4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
12221
12235
  function kosServiceRequest$3(params2) {
12222
12236
  return service$8.kosServiceRequest(params2);
12223
12237
  }
12238
+ function endpoint(path, method) {
12239
+ return { path, method };
12240
+ }
12241
+ function serviceRequest(ep, opts) {
12242
+ return kosServiceRequest$3({
12243
+ path: ep.path,
12244
+ method: ep.method,
12245
+ errorHandler: { strategy: "log", defaultValue: null },
12246
+ ...opts
12247
+ });
12248
+ }
12224
12249
  const api$3 = service$8.createClient();
12225
12250
  const service$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12226
12251
  __proto__: null,
12227
12252
  api: api$3,
12228
12253
  default: api$3,
12229
- kosServiceRequest: kosServiceRequest$3
12254
+ endpoint,
12255
+ kosServiceRequest: kosServiceRequest$3,
12256
+ serviceRequest
12230
12257
  }, Symbol.toStringTag, { value: "Module" }));
12231
12258
  function kosServiceRequest$2(params2) {
12232
12259
  return service$8.kosServiceRequest(params2);
@@ -12901,8 +12928,8 @@ GpioChipModelImpl = __decorateClass$2([
12901
12928
  const GpioChip = GpioChipModelImpl.Registration;
12902
12929
  const GPIO_CHIP_PATH = "/api/kos/gpio/chips";
12903
12930
  const GPIO_PIN_PATH = "/api/kos/gpio/pins";
12904
- const gpioServiceRequest = kosServiceRequest$5;
12905
- const gpioApi = api$5;
12931
+ const gpioServiceRequest = kosServiceRequest$4;
12932
+ const gpioApi = api$4;
12906
12933
  const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12907
12934
  __proto__: null,
12908
12935
  GPIO_CHIP_PATH,
@@ -16034,10 +16061,10 @@ exports.GpioChipServices = index$1;
16034
16061
  exports.GpioPin = GpioPin;
16035
16062
  exports.GpioPinContainer = GpioPinContainer;
16036
16063
  exports.KOS_RECOVERING_SESSION_KEY = KOS_RECOVERING_SESSION_KEY;
16037
- exports.KOS_SERVICE = service$4;
16038
- exports.KOS_SERVICE_1_6_5 = service$7;
16039
- exports.KOS_SERVICE_1_8_1 = service$6;
16040
- exports.KOS_SERVICE_1_9_X = service$5;
16064
+ exports.KOS_SERVICE = service$7;
16065
+ exports.KOS_SERVICE_1_6_5 = service$6;
16066
+ exports.KOS_SERVICE_1_8_1 = service$5;
16067
+ exports.KOS_SERVICE_1_9_X = service$4;
16041
16068
  exports.KeyValue = KeyValue;
16042
16069
  exports.KeyValueServices = index$c;
16043
16070
  exports.KosConfigPropertySpec = Registration;
@@ -16116,10 +16143,10 @@ exports.Troubles = Troubles;
16116
16143
  exports.UsbUpdate = UsbUpdate;
16117
16144
  exports.UsbUpdateContainer = UsbUpdateContainer;
16118
16145
  exports.UsbUpdateServices = index$3;
16119
- exports.VFS_SERVICE = service;
16120
- exports.VFS_SERVICE_1_6_5 = service$3;
16121
- exports.VFS_SERVICE_1_8_1 = service$2;
16122
- exports.VFS_SERVICE_1_9_X = service$1;
16146
+ exports.VFS_SERVICE = service$3;
16147
+ exports.VFS_SERVICE_1_6_5 = service$2;
16148
+ exports.VFS_SERVICE_1_8_1 = service$1;
16149
+ exports.VFS_SERVICE_1_9_X = service;
16123
16150
  exports.WS_EVENT_TYPE = WS_EVENT_TYPE;
16124
16151
  exports.WsEventFactory = WsEventFactory;
16125
16152
  exports.acceptOrgInvitation = acceptOrgInvitation;