@juhuu/sdk-ts 1.2.2656 → 1.3.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/index.js CHANGED
@@ -137,7 +137,7 @@ var Service = class {
137
137
  }
138
138
  this.logger("accessToken:", token);
139
139
  if ((token === null || token === void 0) && authenticationNotOptional === true) {
140
- console.error(
140
+ this.logger(
141
141
  "endpoint",
142
142
  url,
143
143
  "should use authentication but no token was found"
@@ -156,7 +156,7 @@ var Service = class {
156
156
  apiKey = currentRequestOptions.apiKey;
157
157
  }
158
158
  if (apiKey === null) {
159
- console.error(
159
+ this.logger(
160
160
  "endpoint",
161
161
  url,
162
162
  "should use authentication but no apiKey was found"
@@ -209,7 +209,7 @@ var Service = class {
209
209
  status: response.status
210
210
  };
211
211
  } catch (error) {
212
- console.error("JUHUU SDK, error sending request: ", error);
212
+ this.logger("JUHUU SDK, error sending request: ", error);
213
213
  responseObject = {
214
214
  ok: false,
215
215
  data: await response?.json(),
@@ -376,12 +376,6 @@ var Service = class {
376
376
  const uri = this.wssBaseUrl + url;
377
377
  this.logger("connecting to websocket", uri);
378
378
  const socket = (0, import_socket.default)(uri, { transports: ["websocket"] });
379
- socket.on("connect", () => {
380
- this.logger("connected to websocket", uri);
381
- });
382
- socket.on("connect_error", (error) => {
383
- console.error("Connection error:", error);
384
- });
385
379
  return socket;
386
380
  }
387
381
  disconnectFromWebsocket(socket) {
@@ -536,7 +530,10 @@ var SessionService = class extends Service {
536
530
  autoRenew: SessionCreateParams.autoRenew,
537
531
  type: SessionCreateParams.sessionType,
538
532
  isOffSession: SessionCreateParams.isOffSession,
539
- userId: SessionCreateParams.userId
533
+ userId: SessionCreateParams.userId,
534
+ propertyId: SessionCreateParams.propertyId,
535
+ scheduledReadyAt: SessionCreateParams.scheduledReadyAt,
536
+ metadata: SessionCreateParams.metadata
540
537
  },
541
538
  authenticationNotOptional: true
542
539
  },
@@ -715,6 +712,21 @@ var SessionService = class extends Service {
715
712
  }
716
713
  };
717
714
  }
715
+ async checkAvailability(SessionCheckAvailabilityParams, SessionCheckAvailabilityOptions) {
716
+ return await super.sendRequest(
717
+ {
718
+ method: "POST",
719
+ url: "sessions/checkAvailability",
720
+ body: {
721
+ locationId: SessionCheckAvailabilityParams.locationId,
722
+ tariffId: SessionCheckAvailabilityParams.tariffId,
723
+ autoRenew: SessionCheckAvailabilityParams.autoRenew
724
+ },
725
+ authenticationNotOptional: false
726
+ },
727
+ SessionCheckAvailabilityOptions
728
+ );
729
+ }
718
730
  };
719
731
 
720
732
  // src/links/links.service.ts
@@ -745,7 +757,9 @@ var LinkService = class extends Service {
745
757
  body: {
746
758
  propertyId: LinkCreateParams.propertyId,
747
759
  name: LinkCreateParams.name,
748
- fiveLetterQr: LinkCreateParams.fiveLetterQr
760
+ fiveLetterQr: LinkCreateParams.fiveLetterQr,
761
+ referenceObject: LinkCreateParams.referenceObject,
762
+ referenceObjectId: LinkCreateParams.referenceObjectId
749
763
  },
750
764
  authenticationNotOptional: true
751
765
  },
@@ -791,7 +805,9 @@ var LinkService = class extends Service {
791
805
  method: "PATCH",
792
806
  url: "links/" + LinkUpdateParams.linkId,
793
807
  body: {
794
- name: LinkUpdateParams.name
808
+ name: LinkUpdateParams.name,
809
+ referenceObject: LinkUpdateParams.referenceObject,
810
+ referenceObjectId: LinkUpdateParams.referenceObjectId
795
811
  },
796
812
  authenticationNotOptional: true
797
813
  },
@@ -944,7 +960,8 @@ var UsersService = class extends Service {
944
960
  billingAddress: UserUpdateParams?.billingAddress,
945
961
  taxCodeArray: UserUpdateParams?.taxCodeArray,
946
962
  acceptedTermIdArray: UserUpdateParams?.acceptedTermIdArray,
947
- group: UserUpdateParams?.group
963
+ group: UserUpdateParams?.group,
964
+ expoPushTokenArray: UserUpdateParams?.expoPushTokenArray
948
965
  },
949
966
  authenticationNotOptional: true
950
967
  },
@@ -987,6 +1004,19 @@ var UsersService = class extends Service {
987
1004
  UserDeleteOptions
988
1005
  );
989
1006
  }
1007
+ async createIdentityVerificationUrl(UserCreateIdentityVerificationUrlParams, UserCreateIdentityVerificationUrlOptions) {
1008
+ return await super.sendRequest(
1009
+ {
1010
+ method: "POST",
1011
+ url: "users/" + UserCreateIdentityVerificationUrlParams.userId + "/createIdentityVerificationUrl",
1012
+ body: {
1013
+ propertyId: UserCreateIdentityVerificationUrlParams.propertyId
1014
+ },
1015
+ authenticationNotOptional: true
1016
+ },
1017
+ UserCreateIdentityVerificationUrlOptions
1018
+ );
1019
+ }
990
1020
  };
991
1021
 
992
1022
  // src/payments/payments.service.ts
@@ -994,6 +1024,26 @@ var PaymentsService = class extends Service {
994
1024
  constructor(config) {
995
1025
  super(config);
996
1026
  }
1027
+ async create(PaymentCreateParams, PaymentCreateOptions) {
1028
+ return await super.sendRequest(
1029
+ {
1030
+ method: "POST",
1031
+ url: "payments",
1032
+ body: {
1033
+ accountingAreaId: PaymentCreateParams.accountingAreaId,
1034
+ amountWithoutServiceFee: PaymentCreateParams.amountWithoutServiceFee,
1035
+ currencyCode: PaymentCreateParams.currencyCode,
1036
+ propertyId: PaymentCreateParams.propertyId,
1037
+ isOffSession: PaymentCreateParams.isOffSession,
1038
+ salesTaxPercentage: PaymentCreateParams.salesTaxPercentage,
1039
+ userId: PaymentCreateParams.userId,
1040
+ postingRowArray: PaymentCreateParams.postingRowArray
1041
+ },
1042
+ authenticationNotOptional: true
1043
+ },
1044
+ PaymentCreateOptions
1045
+ );
1046
+ }
997
1047
  async list(PaymentListParams, PaymentListOptions) {
998
1048
  const queryArray = [];
999
1049
  if (PaymentListParams.userId !== void 0) {
@@ -1119,8 +1169,7 @@ var PropertiesService = class extends Service {
1119
1169
  url: "properties",
1120
1170
  body: {
1121
1171
  userId: PropertyCreateParams.userId,
1122
- name: PropertyCreateParams.name,
1123
- type: PropertyCreateParams.type
1172
+ name: PropertyCreateParams.name
1124
1173
  },
1125
1174
  authenticationNotOptional: true
1126
1175
  },
@@ -1294,6 +1343,13 @@ var PointsService = class extends Service {
1294
1343
  if (PointListParams?.propertyId !== void 0) {
1295
1344
  queryArray.push("propertyId=" + PointListParams.propertyId);
1296
1345
  }
1346
+ if (PointListParams?.invalidAt !== void 0) {
1347
+ if (PointListParams.invalidAt === null) {
1348
+ queryArray.push("invalidAt=");
1349
+ } else {
1350
+ queryArray.push("invalidAt=" + PointListParams.invalidAt.toISOString());
1351
+ }
1352
+ }
1297
1353
  return await super.sendRequest(
1298
1354
  {
1299
1355
  method: "GET",
@@ -1349,7 +1405,8 @@ var DevicesService = class extends Service {
1349
1405
  propertyId: DeviceCreateParams.propertyId,
1350
1406
  deviceTemplateId: DeviceCreateParams.deviceTemplateId,
1351
1407
  name: DeviceCreateParams.name,
1352
- acceptTerms: DeviceCreateParams.acceptTerms
1408
+ acceptTerms: DeviceCreateParams.acceptTerms,
1409
+ panelId: DeviceCreateParams.panelId
1353
1410
  },
1354
1411
  authenticationNotOptional: true
1355
1412
  },
@@ -1417,7 +1474,9 @@ var DevicesService = class extends Service {
1417
1474
  parameterIdArray: DeviceUpdateParams.parameterIdArray,
1418
1475
  permissionArray: DeviceUpdateParams.permissionArray,
1419
1476
  proximityStrategyArray: DeviceUpdateParams.proximityStrategyArray,
1420
- simIdArray: DeviceUpdateParams.simIdArray
1477
+ simIdArray: DeviceUpdateParams.simIdArray,
1478
+ panelId: DeviceUpdateParams.panelId,
1479
+ adminQuickActionArray: DeviceUpdateParams.adminQuickActionArray
1421
1480
  },
1422
1481
  authenticationNotOptional: true
1423
1482
  },
@@ -1991,39 +2050,109 @@ var WebsocketsService = class extends Service {
1991
2050
  }
1992
2051
  connect(WebsocketConnectOptions) {
1993
2052
  const socket = super.connectToWebsocket({ url: "websocket" });
1994
- const pendingRpcResponses = /* @__PURE__ */ new Map();
1995
- socket.on("rpc.response", (message) => {
1996
- const resolver = pendingRpcResponses.get(message.id);
1997
- if (resolver !== void 0) {
1998
- resolver(message);
1999
- pendingRpcResponses.delete(message.id);
2053
+ socket.on("connect", () => {
2054
+ this.logger("connected to websocket");
2055
+ });
2056
+ socket.on(
2057
+ "subscription_success",
2058
+ (message) => {
2059
+ this.logger("Subscription success:", message);
2060
+ }
2061
+ );
2062
+ socket.on(
2063
+ "unsubscription_success",
2064
+ (message) => {
2065
+ this.logger("Unsubscription success:", message);
2000
2066
  }
2067
+ );
2068
+ socket.on("error", (error) => {
2069
+ this.logger("WebSocket error:", error);
2001
2070
  });
2002
- const onQueryUpdate = (callback) => {
2003
- socket.on("query.update", (message) => {
2071
+ const onLocationUpdate = (callback) => {
2072
+ socket.on(
2073
+ "location_update",
2074
+ (message) => {
2075
+ callback(message);
2076
+ }
2077
+ );
2078
+ };
2079
+ const onParameterUpdate = (callback) => {
2080
+ socket.on(
2081
+ "parameter_update",
2082
+ (message) => {
2083
+ callback(message);
2084
+ }
2085
+ );
2086
+ };
2087
+ const onSessionUpdate = (callback) => {
2088
+ socket.on("session_update", (message) => {
2004
2089
  callback(message);
2005
2090
  });
2006
2091
  };
2092
+ const onConnect = (callback) => {
2093
+ socket.on("connect", callback);
2094
+ };
2095
+ const onDisconnect = (callback) => {
2096
+ socket.on("disconnect", callback);
2097
+ };
2098
+ const onReconnect = (callback) => {
2099
+ socket.on("reconnect", callback);
2100
+ };
2101
+ const onConnectError = (callback) => {
2102
+ socket.on("connect_error", callback);
2103
+ };
2104
+ const onReconnectAttempt = (callback) => {
2105
+ socket.on("reconnect_attempt", callback);
2106
+ };
2107
+ const onReconnectError = (callback) => {
2108
+ socket.on("reconnect_error", callback);
2109
+ };
2110
+ const onReconnectFailed = (callback) => {
2111
+ socket.on("reconnect_failed", callback);
2112
+ };
2007
2113
  return {
2008
- subscribe: (rooms) => {
2009
- socket.emit("subscribe", { rooms });
2114
+ subscribe: (locationIdArray, parameterIdArray, sessionIdArray) => {
2115
+ socket.emit("subscribe", {
2116
+ locationIdArray: locationIdArray || [],
2117
+ parameterIdArray: parameterIdArray || [],
2118
+ sessionIdArray: sessionIdArray || []
2119
+ });
2010
2120
  },
2011
- unsubscribe: (rooms) => {
2012
- socket.emit("unsubscribe", { rooms });
2121
+ unsubscribeFromLocations: (locationIdArray) => {
2122
+ socket.emit("unsubscribe", { locationIdArray });
2013
2123
  },
2014
- subscribeQuery: (payload) => {
2015
- socket.emit("subscribeQuery", payload);
2124
+ unsubscribeFromParameters: (parameterIdArray) => {
2125
+ socket.emit("unsubscribe", { parameterIdArray });
2016
2126
  },
2017
- unsubscribeQuery: (payload) => {
2018
- socket.emit("unsubscribeQuery", payload);
2127
+ unsubscribeFromSessions: (sessionIdArray) => {
2128
+ socket.emit("unsubscribe", { sessionIdArray });
2019
2129
  },
2020
- rpc: async (payload) => {
2021
- return await new Promise((resolve) => {
2022
- pendingRpcResponses.set(payload.id, resolve);
2023
- socket.emit("rpc", payload);
2130
+ unsubscribe: (locationIdArray, parameterIdArray, sessionIdArray) => {
2131
+ socket.emit("unsubscribe", {
2132
+ locationIdArray: locationIdArray || [],
2133
+ parameterIdArray: parameterIdArray || [],
2134
+ sessionIdArray: sessionIdArray || []
2024
2135
  });
2025
2136
  },
2026
- onQueryUpdate,
2137
+ ping: (data) => {
2138
+ socket.emit("ping", data);
2139
+ },
2140
+ onLocationUpdate,
2141
+ onParameterUpdate,
2142
+ onSessionUpdate,
2143
+ onConnect,
2144
+ onDisconnect,
2145
+ onReconnect,
2146
+ onConnectError,
2147
+ onReconnectAttempt,
2148
+ onReconnectError,
2149
+ onReconnectFailed,
2150
+ onPong: (callback) => {
2151
+ socket.on("pong", callback);
2152
+ },
2153
+ isConnected: () => {
2154
+ return socket.connected;
2155
+ },
2027
2156
  close: () => {
2028
2157
  socket.close();
2029
2158
  }
@@ -2491,6 +2620,19 @@ var ArticlesService = class extends Service {
2491
2620
  ArticleTranslateOptions
2492
2621
  );
2493
2622
  }
2623
+ async pdf(ArticlePdfParams, ArticlePdfOptions) {
2624
+ return await super.sendRequest(
2625
+ {
2626
+ method: "POST",
2627
+ url: "articles/" + ArticlePdfParams.articleId + "/pdf",
2628
+ body: {
2629
+ languageCodeArray: ArticlePdfParams.languageCodeArray
2630
+ },
2631
+ authenticationNotOptional: false
2632
+ },
2633
+ ArticlePdfOptions
2634
+ );
2635
+ }
2494
2636
  };
2495
2637
 
2496
2638
  // src/chats/chats.service.ts
@@ -3272,6 +3414,8 @@ var IncidentsService = class extends Service {
3272
3414
  type: IncidentCreateParams.type,
3273
3415
  deviceId: IncidentCreateParams.deviceId,
3274
3416
  locationId: IncidentCreateParams.locationId,
3417
+ parameterAnomalyGroupId: IncidentCreateParams.parameterAnomalyGroupId,
3418
+ simId: IncidentCreateParams.simId,
3275
3419
  incidentTemplateId: IncidentCreateParams.incidentTemplateId,
3276
3420
  severity: IncidentCreateParams.severity
3277
3421
  },
@@ -3336,6 +3480,19 @@ var IncidentsService = class extends Service {
3336
3480
  IncidentUpdateOptions
3337
3481
  );
3338
3482
  }
3483
+ async notifyAffected(IncidentNotifyAffectedParams, IncidentNotifyAffectedOptions) {
3484
+ return await super.sendRequest(
3485
+ {
3486
+ method: "POST",
3487
+ url: "incidents/" + IncidentNotifyAffectedParams.incidentId + "/notifyAffected",
3488
+ body: {
3489
+ message: IncidentNotifyAffectedParams.message
3490
+ },
3491
+ authenticationNotOptional: true
3492
+ },
3493
+ IncidentNotifyAffectedOptions
3494
+ );
3495
+ }
3339
3496
  };
3340
3497
 
3341
3498
  // src/parameterAnomalyGroups/parameterAnomalyGroups.service.ts
@@ -3410,7 +3567,9 @@ var ParameterAnomalyGroupsService = class extends Service {
3410
3567
  method: "PATCH",
3411
3568
  url: "parameterAnomalyGroups/" + ParameterAnomalyGroupUpdateParams.parameterAnomalyGroupId,
3412
3569
  body: {
3413
- parameterAnomalyGroupId: ParameterAnomalyGroupUpdateParams.parameterAnomalyGroupId
3570
+ parameterAnomalyGroupTrackerId: ParameterAnomalyGroupUpdateParams.parameterAnomalyGroupTrackerId,
3571
+ name: ParameterAnomalyGroupUpdateParams.name,
3572
+ featureReferenceParameterIdArray: ParameterAnomalyGroupUpdateParams.featureReferenceParameterIdArray
3414
3573
  },
3415
3574
  authenticationNotOptional: true
3416
3575
  },
@@ -3441,7 +3600,8 @@ var ParameterAnomalyGroupTrackersService = class extends Service {
3441
3600
  method: "POST",
3442
3601
  url: "parameterAnomalyGroupTrackers",
3443
3602
  body: {
3444
- propertyId: ParameterAnomalyGroupTrackerCreateParams.propertyId
3603
+ propertyId: ParameterAnomalyGroupTrackerCreateParams.propertyId,
3604
+ name: ParameterAnomalyGroupTrackerCreateParams.name
3445
3605
  },
3446
3606
  authenticationNotOptional: true
3447
3607
  },
@@ -3494,7 +3654,9 @@ var ParameterAnomalyGroupTrackersService = class extends Service {
3494
3654
  method: "PATCH",
3495
3655
  url: "parameterAnomalyGroupTrackers/" + ParameterAnomalyGroupTrackerUpdateParams.parameterAnomalyGroupTrackerId,
3496
3656
  body: {
3497
- name: ParameterAnomalyGroupTrackerUpdateParams.name
3657
+ name: ParameterAnomalyGroupTrackerUpdateParams.name,
3658
+ description: ParameterAnomalyGroupTrackerUpdateParams.description,
3659
+ dataType: ParameterAnomalyGroupTrackerUpdateParams.dataType
3498
3660
  },
3499
3661
  authenticationNotOptional: true
3500
3662
  },
@@ -3525,6 +3687,59 @@ var ParameterAnomalyGroupTrackersService = class extends Service {
3525
3687
  }
3526
3688
  };
3527
3689
 
3690
+ // src/parameterAnomalyGroupTrackerTraces/parameterAnomalyGroupTrackerTraces.service.ts
3691
+ var ParameterAnomalyGroupTrackerTracesService = class extends Service {
3692
+ constructor(config) {
3693
+ super(config);
3694
+ }
3695
+ async list(ParameterAnomalyGroupTrackerTraceListParams, ParameterAnomalyGroupTrackerTraceListOptions) {
3696
+ const queryArray = [];
3697
+ if (ParameterAnomalyGroupTrackerTraceListParams?.propertyId !== void 0) {
3698
+ queryArray.push("propertyId=" + ParameterAnomalyGroupTrackerTraceListParams.propertyId);
3699
+ }
3700
+ if (ParameterAnomalyGroupTrackerTraceListParams?.parameterAnomalyGroupTrackerId !== void 0) {
3701
+ queryArray.push("parameterAnomalyGroupTrackerId=" + ParameterAnomalyGroupTrackerTraceListParams.parameterAnomalyGroupTrackerId);
3702
+ }
3703
+ if (ParameterAnomalyGroupTrackerTraceListOptions?.limit !== void 0) {
3704
+ queryArray.push("limit=" + ParameterAnomalyGroupTrackerTraceListOptions.limit);
3705
+ }
3706
+ if (ParameterAnomalyGroupTrackerTraceListOptions?.skip !== void 0) {
3707
+ queryArray.push("skip=" + ParameterAnomalyGroupTrackerTraceListOptions.skip);
3708
+ }
3709
+ return await super.sendRequest(
3710
+ {
3711
+ method: "GET",
3712
+ url: "parameterAnomalyGroupTrackerTraces?" + queryArray.join("&"),
3713
+ body: void 0,
3714
+ authenticationNotOptional: false
3715
+ },
3716
+ ParameterAnomalyGroupTrackerTraceListOptions
3717
+ );
3718
+ }
3719
+ async retrieve(ParameterAnomalyGroupTrackerTraceRetrieveParams, ParameterAnomalyGroupTrackerTraceRetrieveOptions) {
3720
+ return await super.sendRequest(
3721
+ {
3722
+ method: "GET",
3723
+ url: "parameterAnomalyGroupTrackerTraces/" + ParameterAnomalyGroupTrackerTraceRetrieveParams.parameterAnomalyGroupTrackerTraceId,
3724
+ body: void 0,
3725
+ authenticationNotOptional: false
3726
+ },
3727
+ ParameterAnomalyGroupTrackerTraceRetrieveOptions
3728
+ );
3729
+ }
3730
+ async delete(ParameterAnomalyGroupTrackerTraceDeleteParams, ParameterAnomalyGroupTrackerTraceDeleteOptions) {
3731
+ return await super.sendRequest(
3732
+ {
3733
+ method: "DELETE",
3734
+ url: "parameterAnomalyGroupTrackerTraces/" + ParameterAnomalyGroupTrackerTraceDeleteParams.parameterAnomalyGroupTrackerTraceId,
3735
+ body: void 0,
3736
+ authenticationNotOptional: false
3737
+ },
3738
+ ParameterAnomalyGroupTrackerTraceDeleteOptions
3739
+ );
3740
+ }
3741
+ };
3742
+
3528
3743
  // src/emz/emz.service.ts
3529
3744
  var EmzService = class extends Service {
3530
3745
  constructor(config) {
@@ -3656,22 +3871,6 @@ var FlowsService = class extends Service {
3656
3871
  FlowExecuteOptions
3657
3872
  );
3658
3873
  }
3659
- areInputsAvailable(block, outputStore, edgeArray) {
3660
- if (block.in === null || block.in === void 0) {
3661
- return true;
3662
- }
3663
- return Object.values(block.in).every((edgeId) => {
3664
- const edge = edgeArray.find((e) => e.id === edgeId);
3665
- if (edge === void 0) {
3666
- return false;
3667
- }
3668
- if (edge.type === "control") {
3669
- return true;
3670
- }
3671
- const srcOutputs = outputStore[edge.from.blockId];
3672
- return srcOutputs !== null && srcOutputs !== void 0 && edge.from.output in srcOutputs;
3673
- });
3674
- }
3675
3874
  resolveInputs(block, outputStore, edgeArray) {
3676
3875
  const inputs = {};
3677
3876
  if (block.in === void 0) {
@@ -3718,9 +3917,7 @@ var FlowsService = class extends Service {
3718
3917
  for (const param of defs) {
3719
3918
  const value = context[param.name];
3720
3919
  if (value === void 0 && param.required) {
3721
- throw new Error(
3722
- `Missing required input parameter '${param.name}'`
3723
- );
3920
+ throw new Error(`Missing required input parameter '${param.name}'`);
3724
3921
  }
3725
3922
  outputs[param.name] = value;
3726
3923
  }
@@ -3753,212 +3950,283 @@ var FlowsService = class extends Service {
3753
3950
  }
3754
3951
  execInput[key] = value;
3755
3952
  }
3756
- const { output } = await this.executeLocally(finalFlowId, execInput);
3757
- return { output };
3953
+ const response = await this.execute({
3954
+ flowId: finalFlowId,
3955
+ input: execInput
3956
+ });
3957
+ if (response.ok === false) {
3958
+ throw new Error(
3959
+ `Failed to execute flow: ${response.data?.message || "Unknown error"}`
3960
+ );
3961
+ }
3962
+ return { output: response.data.output };
3758
3963
  },
3759
3964
  "end.custom": async (inputs) => {
3760
3965
  return { output: { ...inputs } };
3761
3966
  },
3762
- // Placeholder implementations for other block types (they will throw errors if used)
3763
- "start.quickAction.location": async () => {
3764
- throw new Error("Block type not implemented in executeLocally");
3765
- },
3766
- "start.session.update": async () => {
3767
- throw new Error("Block type not implemented in executeLocally");
3768
- },
3769
- "start.location.update": async () => {
3770
- throw new Error("Block type not implemented in executeLocally");
3771
- },
3772
- "start.parameter.update": async () => {
3773
- throw new Error("Block type not implemented in executeLocally");
3774
- },
3775
- "const.number": async () => {
3776
- throw new Error("Block type not implemented in executeLocally");
3777
- },
3778
- "const.text": async () => {
3779
- throw new Error("Block type not implemented in executeLocally");
3780
- },
3781
- "const.boolean": async () => {
3782
- throw new Error("Block type not implemented in executeLocally");
3783
- },
3784
- "math.add": async () => {
3785
- throw new Error("Block type not implemented in executeLocally");
3786
- },
3787
- "math.subtract": async () => {
3788
- throw new Error("Block type not implemented in executeLocally");
3967
+ "const.number": async (_inputs, block) => {
3968
+ const { data } = block;
3969
+ return { output: { value: data?.value } };
3789
3970
  },
3790
- "math.multiply": async () => {
3791
- throw new Error("Block type not implemented in executeLocally");
3971
+ "const.text": async (_inputs, block) => {
3972
+ const { data } = block;
3973
+ return { output: { value: data?.value } };
3792
3974
  },
3793
- "math.divide": async () => {
3794
- throw new Error("Block type not implemented in executeLocally");
3975
+ "const.boolean": async (_inputs, block) => {
3976
+ const { data } = block;
3977
+ return { output: { value: data?.value } };
3795
3978
  },
3796
- "map.destructure": async () => {
3797
- throw new Error("Block type not implemented in executeLocally");
3979
+ "math.add": async (inputs, block) => {
3980
+ const mb = block;
3981
+ const inA = inputs.a;
3982
+ const inB = inputs.b;
3983
+ const defaultA = mb.data.a ?? 0;
3984
+ const defaultB = mb.data.b ?? 0;
3985
+ const a = inA !== void 0 ? inA : defaultA;
3986
+ const b = inB !== void 0 ? inB : defaultB;
3987
+ return { output: { result: a + b } };
3798
3988
  },
3799
- "parameter.retrieve": async () => {
3800
- throw new Error("Block type not implemented in executeLocally");
3989
+ "math.subtract": async (inputs, block) => {
3990
+ const mb = block;
3991
+ const inA = inputs.a;
3992
+ const inB = inputs.b;
3993
+ const defaultA = mb.data.a ?? 0;
3994
+ const defaultB = mb.data.b ?? 0;
3995
+ const a = inA !== void 0 ? inA : defaultA;
3996
+ const b = inB !== void 0 ? inB : defaultB;
3997
+ return { output: { result: a - b } };
3801
3998
  },
3802
- "property.retrieve": async () => {
3803
- throw new Error("Block type not implemented in executeLocally");
3999
+ "math.multiply": async (inputs, block) => {
4000
+ const mb = block;
4001
+ const inA = inputs.a;
4002
+ const inB = inputs.b;
4003
+ const defaultA = mb.data.a ?? 0;
4004
+ const defaultB = mb.data.b ?? 0;
4005
+ const a = inA !== void 0 ? inA : defaultA;
4006
+ const b = inB !== void 0 ? inB : defaultB;
4007
+ return { output: { result: a * b } };
3804
4008
  },
3805
- "location.retrieve": async () => {
3806
- throw new Error("Block type not implemented in executeLocally");
4009
+ "math.divide": async (inputs, block) => {
4010
+ const mb = block;
4011
+ const inA = inputs.a;
4012
+ const inB = inputs.b;
4013
+ const defaultA = mb.data.a ?? 0;
4014
+ const defaultB = mb.data.b ?? 1;
4015
+ const a = inA !== void 0 ? inA : defaultA;
4016
+ const b = inB !== void 0 ? inB : defaultB;
4017
+ return { output: { result: a / b } };
3807
4018
  },
3808
- "session.retrieve": async () => {
3809
- throw new Error("Block type not implemented in executeLocally");
3810
- },
3811
- "device.retrieve": async () => {
3812
- throw new Error("Block type not implemented in executeLocally");
3813
- },
3814
- "user.retrieve": async () => {
3815
- throw new Error("Block type not implemented in executeLocally");
3816
- },
3817
- "user.create": async () => {
3818
- throw new Error("Block type not implemented in executeLocally");
3819
- },
3820
- "incident.retrieve": async () => {
3821
- throw new Error("Block type not implemented in executeLocally");
3822
- },
3823
- "parameter.update": async () => {
3824
- throw new Error("Block type not implemented in executeLocally");
3825
- },
3826
- "device.update": async () => {
3827
- throw new Error("Block type not implemented in executeLocally");
3828
- },
3829
- "location.update": async () => {
3830
- throw new Error("Block type not implemented in executeLocally");
3831
- },
3832
- "property.update": async () => {
3833
- throw new Error("Block type not implemented in executeLocally");
3834
- },
3835
- "session.terminate": async () => {
3836
- throw new Error("Block type not implemented in executeLocally");
3837
- },
3838
- "system.log": async () => {
3839
- throw new Error("Block type not implemented in executeLocally");
3840
- },
3841
- "ui.navigate.screen": async () => {
3842
- throw new Error("Block type not implemented in executeLocally");
3843
- },
3844
- "incident.create": async () => {
3845
- throw new Error("Block type not implemented in executeLocally");
3846
- },
3847
- "control.switch": async () => {
3848
- throw new Error("Block type not implemented in executeLocally");
3849
- },
3850
- "http.patch": async () => {
3851
- throw new Error("Block type not implemented in executeLocally");
3852
- },
3853
- "http.get": async () => {
3854
- throw new Error("Block type not implemented in executeLocally");
3855
- },
3856
- "http.post": async () => {
3857
- throw new Error("Block type not implemented in executeLocally");
4019
+ "map.destructure": async (inputs, block) => {
4020
+ if (block.type !== "map.destructure") {
4021
+ throw new Error(
4022
+ `Expected block type 'map.destructure', got '${block.type}'`
4023
+ );
4024
+ }
4025
+ const source = inputs.map;
4026
+ const mb = block;
4027
+ const outputs = {};
4028
+ const keys = mb.data.keys ?? [];
4029
+ for (const key of keys) {
4030
+ outputs[key] = source[key];
4031
+ }
4032
+ return { output: outputs };
3858
4033
  },
3859
- "http.delete": async () => {
3860
- throw new Error("Block type not implemented in executeLocally");
4034
+ "map.construct": async (inputs, block) => {
4035
+ if (block.type !== "map.construct") {
4036
+ throw new Error(
4037
+ `Expected block type 'map.construct', got '${block.type}'`
4038
+ );
4039
+ }
4040
+ const mb = block;
4041
+ const constructedMap = {};
4042
+ const keys = mb.data.keys ?? [];
4043
+ const inputValues = inputs;
4044
+ for (const key of keys) {
4045
+ constructedMap[key] = inputValues[key];
4046
+ }
4047
+ return { output: { map: constructedMap } };
3861
4048
  },
3862
- "http.put": async () => {
3863
- throw new Error("Block type not implemented in executeLocally");
4049
+ "variable.set": async (inputs, block, context) => {
4050
+ const { key, value } = inputs;
4051
+ const typedBlock = block;
4052
+ const finalKey = this.isInputConnected(typedBlock, "key") ? key : typedBlock.data?.key;
4053
+ const finalValue = this.isInputConnected(typedBlock, "value") ? value : typedBlock.data?.value;
4054
+ if (finalKey === void 0 || finalKey === null) {
4055
+ throw new Error("Variable key is required");
4056
+ }
4057
+ if (!context.variables) {
4058
+ context.variables = /* @__PURE__ */ new Map();
4059
+ }
4060
+ if (finalKey.includes(".")) {
4061
+ const keys = finalKey.split(".");
4062
+ const rootKey = keys[0];
4063
+ let rootValue = context.variables.get(rootKey);
4064
+ if (rootValue === void 0 || rootValue === null) {
4065
+ rootValue = {};
4066
+ context.variables.set(rootKey, rootValue);
4067
+ }
4068
+ const finalPropertyKey = keys[keys.length - 1];
4069
+ const parentKeys = keys.slice(1, -1);
4070
+ let current = rootValue;
4071
+ for (const key2 of parentKeys) {
4072
+ if (current[key2] === void 0 || current[key2] === null) {
4073
+ current[key2] = {};
4074
+ }
4075
+ current = current[key2];
4076
+ }
4077
+ current[finalPropertyKey] = finalValue;
4078
+ } else {
4079
+ context.variables.set(finalKey, finalValue);
4080
+ }
4081
+ return { output: { success: true } };
3864
4082
  },
3865
- "mqtt.send": async () => {
3866
- throw new Error("Block type not implemented in executeLocally");
4083
+ "variable.get": async (inputs, block, context) => {
4084
+ const { key } = inputs;
4085
+ const typedBlock = block;
4086
+ const finalKey = this.isInputConnected(typedBlock, "key") ? key : typedBlock.data?.key;
4087
+ if (finalKey === void 0 || finalKey === null) {
4088
+ throw new Error("Variable key is required");
4089
+ }
4090
+ if (!context.variables) {
4091
+ context.variables = /* @__PURE__ */ new Map();
4092
+ }
4093
+ let retrievedValue;
4094
+ if (finalKey.includes(".")) {
4095
+ const keys = finalKey.split(".");
4096
+ const rootKey = keys[0];
4097
+ const rootValue = context.variables.get(rootKey);
4098
+ if (rootValue !== void 0 && rootValue !== null) {
4099
+ retrievedValue = keys.slice(1).reduce((obj, key2) => {
4100
+ return obj && obj[key2];
4101
+ }, rootValue);
4102
+ } else {
4103
+ retrievedValue = void 0;
4104
+ }
4105
+ } else {
4106
+ retrievedValue = context.variables.get(finalKey);
4107
+ }
4108
+ return { output: { value: retrievedValue } };
3867
4109
  }
3868
4110
  };
3869
- async executeLocally(flowId, context = {}) {
4111
+ async executeLocally(FlowExecuteLocallyParams, FlowExecuteLocallyOptions) {
3870
4112
  const logArray = [];
3871
4113
  logArray.push({
3872
4114
  createdAt: /* @__PURE__ */ new Date(),
3873
- message: `Starting local execution of flow '${flowId}'`,
4115
+ message: `Starting local execution of flow '${FlowExecuteLocallyParams.flowId}'`,
3874
4116
  severity: "info"
3875
4117
  });
3876
- const flowResponse = await this.retrieve({ flowId });
3877
- if (!flowResponse.ok) {
3878
- throw new Error(`Failed to retrieve flow: ${flowResponse.data?.message || "Unknown error"}`);
3879
- }
3880
- const flow = flowResponse.data.flow;
3881
- const blocksById = new Map(
3882
- flow.nodeArray.map((b) => [b.id, b])
3883
- );
3884
- blocksById.set(flow.startNode.id, flow.startNode);
3885
- const edgeArray = flow.edgeArray;
3886
- const outputStore = {};
3887
- const runBlock = async (block) => {
3888
- logArray.push({
3889
- createdAt: /* @__PURE__ */ new Date(),
3890
- message: `Running block ${block.type} (${block.id})`,
3891
- severity: "info"
3892
- });
3893
- const inputs = this.resolveInputs(block, outputStore, edgeArray);
3894
- const executor = this.blockExecutors[block.type];
3895
- if (executor === void 0 || executor === null) {
3896
- throw new Error(`No executor for ${block.type}`);
3897
- }
3898
- const raw = await executor(inputs, block, context);
3899
- const { flowBranch, output } = raw;
3900
- outputStore[block.id] = output;
3901
- if (raw.logArray !== void 0) {
3902
- logArray.push(...raw.logArray);
3903
- }
3904
- logArray.push({
3905
- createdAt: /* @__PURE__ */ new Date(),
3906
- message: `Block ${block.type} (${block.id}) executed successfully`,
3907
- severity: "info"
4118
+ try {
4119
+ const flowResponse = await this.retrieve({
4120
+ flowId: FlowExecuteLocallyParams.flowId
3908
4121
  });
3909
- return flowBranch ?? null;
3910
- };
3911
- const getNext = (fromId, branch) => {
3912
- let ce = edgeArray.find(
3913
- (e) => e.type === "control" && e.from.blockId === fromId && (e.from.output ?? null) === branch
3914
- );
3915
- if ((ce === null || ce === void 0) && branch === null) {
3916
- ce = edgeArray.find(
3917
- (e) => e.type === "control" && e.from.blockId === fromId
4122
+ if (!flowResponse.ok) {
4123
+ throw new Error(
4124
+ `Failed to retrieve flow: ${flowResponse.data?.message || "Unknown error"}`
3918
4125
  );
3919
4126
  }
3920
- if (ce === null || ce === void 0) {
3921
- return null;
3922
- }
3923
- return blocksById.get(ce.to.blockId) ?? null;
3924
- };
3925
- if (flow.startNode.type.startsWith("start.") === false) {
3926
- throw new Error(
3927
- `Flow ${flowId} has an invalid start block that is not of type 'start.'`
4127
+ const flow = flowResponse.data.flow;
4128
+ const blocksById = new Map(
4129
+ flow.nodeArray.map((b) => [b.id, b])
3928
4130
  );
3929
- }
3930
- let current = flow.startNode;
3931
- await runBlock(current);
3932
- const next = getNext(current.id, null);
3933
- if (next === null) {
3934
- return {
3935
- output: {},
3936
- logArray
4131
+ blocksById.set(flow.startNode.id, flow.startNode);
4132
+ const edgeArray = flow.edgeArray;
4133
+ const outputStore = {};
4134
+ const mergedBlockExecutors = {
4135
+ ...this.blockExecutors,
4136
+ ...FlowExecuteLocallyOptions?.blockExecutors || {}
3937
4137
  };
3938
- }
3939
- current = next;
3940
- while (current.type.startsWith("end.") === false) {
3941
- const branch = await runBlock(current);
3942
- const next2 = getNext(current.id, branch);
3943
- if (next2 === null) {
4138
+ const runBlock = async (block) => {
4139
+ logArray.push({
4140
+ createdAt: /* @__PURE__ */ new Date(),
4141
+ message: `Running block ${block.type} (${block.id})`,
4142
+ severity: "info"
4143
+ });
4144
+ const inputs = this.resolveInputs(block, outputStore, edgeArray);
4145
+ const executor = mergedBlockExecutors[block.type];
4146
+ if (executor === void 0 || executor === null) {
4147
+ throw new Error(
4148
+ `Block type '${block.type}' is not implemented in the local executor`
4149
+ );
4150
+ }
4151
+ const raw = await executor(
4152
+ inputs,
4153
+ block,
4154
+ FlowExecuteLocallyParams.input ?? {}
4155
+ );
4156
+ const { flowBranch, output } = raw;
4157
+ outputStore[block.id] = output;
4158
+ if (raw.logArray !== void 0) {
4159
+ logArray.push(...raw.logArray);
4160
+ }
4161
+ logArray.push({
4162
+ createdAt: /* @__PURE__ */ new Date(),
4163
+ message: `Block ${block.type} (${block.id}) executed successfully`,
4164
+ severity: "info"
4165
+ });
4166
+ return flowBranch ?? null;
4167
+ };
4168
+ const getNext = (fromId, branch) => {
4169
+ let ce = edgeArray.find(
4170
+ (e) => e.type === "control" && e.from.blockId === fromId && (e.from.output ?? null) === branch
4171
+ );
4172
+ if ((ce === null || ce === void 0) && branch === null) {
4173
+ ce = edgeArray.find(
4174
+ (e) => e.type === "control" && e.from.blockId === fromId
4175
+ );
4176
+ }
4177
+ if (ce === null || ce === void 0) {
4178
+ return null;
4179
+ }
4180
+ return blocksById.get(ce.to.blockId) ?? null;
4181
+ };
4182
+ if (flow.startNode.type.startsWith("start.") === false) {
4183
+ throw new Error(
4184
+ `Flow ${FlowExecuteLocallyParams.flowId} has an invalid start block that is not of type 'start.'`
4185
+ );
4186
+ }
4187
+ let current = flow.startNode;
4188
+ await runBlock(current);
4189
+ const next = getNext(current.id, null);
4190
+ if (next === null) {
3944
4191
  return {
3945
4192
  output: {},
3946
4193
  logArray
3947
4194
  };
3948
4195
  }
3949
- current = next2;
3950
- }
3951
- await runBlock(current);
3952
- const endBlock = current;
3953
- const result = {};
3954
- const definitions = endBlock.data.outputParamDefinitionArray ?? [];
3955
- for (const def of definitions) {
3956
- result[def.name] = outputStore[current.id]?.[def.name] ?? null;
4196
+ current = next;
4197
+ while (current.type.startsWith("end.") === false) {
4198
+ const branch = await runBlock(current);
4199
+ const next2 = getNext(current.id, branch);
4200
+ if (next2 === null) {
4201
+ return {
4202
+ output: {},
4203
+ logArray
4204
+ };
4205
+ }
4206
+ current = next2;
4207
+ }
4208
+ await runBlock(current);
4209
+ const endBlock = current;
4210
+ const result = {};
4211
+ const definitions = endBlock.data.outputParamDefinitionArray ?? [];
4212
+ for (const def of definitions) {
4213
+ result[def.name] = outputStore[current.id]?.[def.name] ?? null;
4214
+ }
4215
+ return {
4216
+ output: result,
4217
+ logArray
4218
+ };
4219
+ } catch (error) {
4220
+ logArray.push({
4221
+ createdAt: /* @__PURE__ */ new Date(),
4222
+ message: `Flow execution failed: ${error instanceof Error ? error.message : String(error)}`,
4223
+ severity: "error"
4224
+ });
4225
+ return {
4226
+ output: {},
4227
+ logArray
4228
+ };
3957
4229
  }
3958
- return {
3959
- output: result,
3960
- logArray
3961
- };
3962
4230
  }
3963
4231
  };
3964
4232
 
@@ -4516,26 +4784,14 @@ var BenefitCardsService = class extends Service {
4516
4784
  method: "POST",
4517
4785
  url: "benefitCards",
4518
4786
  body: {
4787
+ propertyId: params.propertyId,
4788
+ name: params.name,
4789
+ imageLight: params.imageLight,
4790
+ imageDark: params.imageDark,
4519
4791
  userId: params.userId,
4520
- cardNumber: params.cardNumber,
4521
- cardHolderName: params.cardHolderName,
4522
- type: params.type,
4523
- status: params.status,
4524
- benefits: params.benefits,
4525
- limits: params.limits,
4526
- metadata: params.metadata,
4527
- pointsBalance: params.pointsBalance,
4528
- cashbackBalance: params.cashbackBalance,
4529
- totalSavings: params.totalSavings,
4530
- totalSpent: params.totalSpent,
4531
- transactionCount: params.transactionCount,
4532
- expiresAt: params.expiresAt,
4533
- isDigital: params.isDigital,
4534
- isTransferable: params.isTransferable,
4535
- requiresPin: params.requiresPin,
4536
- pin: params.pin,
4537
- qrCode: params.qrCode,
4538
- barcode: params.barcode
4792
+ reference: params.reference,
4793
+ text: params.text,
4794
+ metadata: params.metadata
4539
4795
  },
4540
4796
  authenticationNotOptional: true
4541
4797
  },
@@ -4544,38 +4800,14 @@ var BenefitCardsService = class extends Service {
4544
4800
  }
4545
4801
  async list(params, options) {
4546
4802
  const queryArray = [];
4803
+ if (params?.propertyId !== void 0) {
4804
+ queryArray.push("propertyId=" + params.propertyId);
4805
+ }
4547
4806
  if (params?.userId !== void 0) {
4548
4807
  queryArray.push("userId=" + params.userId);
4549
4808
  }
4550
- if (params?.cardNumber !== void 0) {
4551
- queryArray.push("cardNumber=" + params.cardNumber);
4552
- }
4553
- if (params?.cardHolderName !== void 0) {
4554
- queryArray.push("cardHolderName=" + params.cardHolderName);
4555
- }
4556
- if (params?.type !== void 0) {
4557
- queryArray.push("type=" + params.type);
4558
- }
4559
- if (params?.status !== void 0) {
4560
- queryArray.push("status=" + params.status);
4561
- }
4562
- if (params?.issuer !== void 0) {
4563
- queryArray.push("issuer=" + params.issuer);
4564
- }
4565
- if (params?.brand !== void 0) {
4566
- queryArray.push("brand=" + params.brand);
4567
- }
4568
- if (params?.level !== void 0) {
4569
- queryArray.push("level=" + params.level);
4570
- }
4571
- if (params?.isDigital !== void 0) {
4572
- queryArray.push("isDigital=" + params.isDigital);
4573
- }
4574
- if (params?.isTransferable !== void 0) {
4575
- queryArray.push("isTransferable=" + params.isTransferable);
4576
- }
4577
- if (params?.requiresPin !== void 0) {
4578
- queryArray.push("requiresPin=" + params.requiresPin);
4809
+ if (params?.text !== void 0) {
4810
+ queryArray.push("text=" + params.text);
4579
4811
  }
4580
4812
  if (options?.limit !== void 0) {
4581
4813
  queryArray.push("limit=" + options.limit);
@@ -4588,19 +4820,18 @@ var BenefitCardsService = class extends Service {
4588
4820
  method: "GET",
4589
4821
  url: "benefitCards?" + queryArray.join("&"),
4590
4822
  body: void 0,
4591
- authenticationNotOptional: false
4823
+ authenticationNotOptional: true
4592
4824
  },
4593
4825
  options
4594
4826
  );
4595
4827
  }
4596
4828
  async retrieve(params, options) {
4597
- const queryArray = [];
4598
4829
  return await super.sendRequest(
4599
4830
  {
4600
4831
  method: "GET",
4601
- url: "benefitCards/" + params.benefitCardId + "?" + queryArray.join("&"),
4832
+ url: "benefitCards/" + params.benefitCardId,
4602
4833
  body: void 0,
4603
- authenticationNotOptional: false
4834
+ authenticationNotOptional: true
4604
4835
  },
4605
4836
  options
4606
4837
  );
@@ -4611,26 +4842,13 @@ var BenefitCardsService = class extends Service {
4611
4842
  method: "PATCH",
4612
4843
  url: "benefitCards/" + params.benefitCardId,
4613
4844
  body: {
4845
+ name: params.name,
4846
+ imageLight: params.imageLight,
4847
+ imageDark: params.imageDark,
4614
4848
  userId: params.userId,
4615
- cardNumber: params.cardNumber,
4616
- cardHolderName: params.cardHolderName,
4617
- type: params.type,
4618
- status: params.status,
4619
- benefits: params.benefits,
4620
- limits: params.limits,
4621
- metadata: params.metadata,
4622
- pointsBalance: params.pointsBalance,
4623
- cashbackBalance: params.cashbackBalance,
4624
- totalSavings: params.totalSavings,
4625
- totalSpent: params.totalSpent,
4626
- transactionCount: params.transactionCount,
4627
- expiresAt: params.expiresAt,
4628
- isDigital: params.isDigital,
4629
- isTransferable: params.isTransferable,
4630
- requiresPin: params.requiresPin,
4631
- pin: params.pin,
4632
- qrCode: params.qrCode,
4633
- barcode: params.barcode
4849
+ reference: params.reference,
4850
+ text: params.text,
4851
+ metadata: params.metadata
4634
4852
  },
4635
4853
  authenticationNotOptional: true
4636
4854
  },
@@ -4648,6 +4866,17 @@ var BenefitCardsService = class extends Service {
4648
4866
  options
4649
4867
  );
4650
4868
  }
4869
+ async copy(params, options) {
4870
+ return await super.sendRequest(
4871
+ {
4872
+ method: "POST",
4873
+ url: "benefitCards/" + params.benefitCardId + "/copy",
4874
+ authenticationNotOptional: true,
4875
+ body: void 0
4876
+ },
4877
+ options
4878
+ );
4879
+ }
4651
4880
  };
4652
4881
 
4653
4882
  // src/catalogs/catalogs.service.ts
@@ -4971,15 +5200,32 @@ var KitsService = class extends Service {
4971
5200
  super(config);
4972
5201
  }
4973
5202
  async create(params, options) {
5203
+ const body = {
5204
+ name: params.name,
5205
+ propertyId: params.propertyId,
5206
+ type: params.type
5207
+ };
5208
+ if (params.type === "controlKitV1") {
5209
+ body.simIdArray = params.simIdArray;
5210
+ body.signalStrengthPercentage = params.signalStrengthPercentage;
5211
+ body.teltonikaSerialNumber = params.teltonikaSerialNumber;
5212
+ } else if (params.type === "tapkeyV1") {
5213
+ body.physicalLockId = params.physicalLockId;
5214
+ body.boundLockId = params.boundLockId;
5215
+ body.ownerAccountId = params.ownerAccountId;
5216
+ body.ipId = params.ipId;
5217
+ } else if (params.type === "emzV1") {
5218
+ body.contractId = params.contractId;
5219
+ body.targetHardwareId = params.targetHardwareId;
5220
+ body.userId = params.userId;
5221
+ body.username = params.username;
5222
+ body.password = params.password;
5223
+ }
4974
5224
  return await super.sendRequest(
4975
5225
  {
4976
5226
  method: "POST",
4977
5227
  url: "kits",
4978
- body: {
4979
- name: params.name,
4980
- propertyId: params.propertyId,
4981
- template: params.template
4982
- },
5228
+ body,
4983
5229
  authenticationNotOptional: true
4984
5230
  },
4985
5231
  options
@@ -5027,7 +5273,8 @@ var KitsService = class extends Service {
5027
5273
  method: "PATCH",
5028
5274
  url: "kits/" + params.kitId,
5029
5275
  body: {
5030
- name: params.name
5276
+ name: params.name,
5277
+ flowIdArray: params.flowIdArray
5031
5278
  },
5032
5279
  authenticationNotOptional: true
5033
5280
  },
@@ -5045,6 +5292,30 @@ var KitsService = class extends Service {
5045
5292
  options
5046
5293
  );
5047
5294
  }
5295
+ async attachProperty(params, options) {
5296
+ return await super.sendRequest(
5297
+ {
5298
+ method: "PATCH",
5299
+ url: "kits/" + params.kitId + "/attachProperty",
5300
+ body: {
5301
+ propertyId: params.propertyId
5302
+ },
5303
+ authenticationNotOptional: true
5304
+ },
5305
+ options
5306
+ );
5307
+ }
5308
+ async detachProperty(params, options) {
5309
+ return await super.sendRequest(
5310
+ {
5311
+ method: "PATCH",
5312
+ url: "kits/" + params.kitId + "/detachProperty",
5313
+ body: void 0,
5314
+ authenticationNotOptional: true
5315
+ },
5316
+ options
5317
+ );
5318
+ }
5048
5319
  };
5049
5320
 
5050
5321
  // src/panels/panels.service.ts
@@ -5062,7 +5333,10 @@ var PanelsService = class extends Service {
5062
5333
  name: params.name,
5063
5334
  layoutBlockArray: params.layoutBlockArray,
5064
5335
  highlightLayoutBlockArray: params.highlightLayoutBlockArray,
5065
- localParameterArray: params.localParameterArray
5336
+ variables: params.variables,
5337
+ display: params.display,
5338
+ permissionArray: params.permissionArray,
5339
+ proximityStrategyArray: params.proximityStrategyArray
5066
5340
  },
5067
5341
  authenticationNotOptional: true
5068
5342
  },
@@ -5092,6 +5366,9 @@ var PanelsService = class extends Service {
5092
5366
  }
5093
5367
  async retrieve(params, options) {
5094
5368
  const queryArray = [];
5369
+ if (options?.expand !== void 0) {
5370
+ queryArray.push("expand=" + options.expand.join(","));
5371
+ }
5095
5372
  return await super.sendRequest(
5096
5373
  {
5097
5374
  method: "GET",
@@ -5111,8 +5388,10 @@ var PanelsService = class extends Service {
5111
5388
  name: params.name,
5112
5389
  layoutBlockArray: params.layoutBlockArray,
5113
5390
  highlightLayoutBlockArray: params.highlightLayoutBlockArray,
5114
- localParameterArray: params.localParameterArray,
5115
- display: params.display
5391
+ variables: params.variables,
5392
+ display: params.display,
5393
+ permissionArray: params.permissionArray,
5394
+ proximityStrategyArray: params.proximityStrategyArray
5116
5395
  },
5117
5396
  authenticationNotOptional: true
5118
5397
  },
@@ -5283,6 +5562,83 @@ var PricesService = class extends Service {
5283
5562
  }
5284
5563
  };
5285
5564
 
5565
+ // src/applications/applications.service.ts
5566
+ var ApplicationsService = class extends Service {
5567
+ constructor(config) {
5568
+ super(config);
5569
+ }
5570
+ async create(ApplicationCreateParams, ApplicationOptions) {
5571
+ return await super.sendRequest(
5572
+ {
5573
+ method: "POST",
5574
+ url: "applications",
5575
+ body: {
5576
+ propertyId: ApplicationCreateParams.propertyId,
5577
+ colorScheme: ApplicationCreateParams.colorScheme,
5578
+ appIconLight: ApplicationCreateParams.appIconLight,
5579
+ appIconDark: ApplicationCreateParams.appIconDark
5580
+ },
5581
+ authenticationNotOptional: true
5582
+ },
5583
+ ApplicationOptions
5584
+ );
5585
+ }
5586
+ async retrieve(ApplicationRetrieveParams, ApplicationRetrieveOptions) {
5587
+ const queryArray = [];
5588
+ return await super.sendRequest(
5589
+ {
5590
+ method: "GET",
5591
+ url: "applications/" + ApplicationRetrieveParams.applicationId + "?" + queryArray.join("&"),
5592
+ body: void 0,
5593
+ authenticationNotOptional: false
5594
+ },
5595
+ ApplicationRetrieveOptions
5596
+ );
5597
+ }
5598
+ async list(ApplicationListParams, ApplicationListOptions) {
5599
+ const queryArray = [];
5600
+ if (ApplicationListParams?.propertyId !== void 0) {
5601
+ queryArray.push("propertyId=" + ApplicationListParams.propertyId);
5602
+ }
5603
+ return await super.sendRequest(
5604
+ {
5605
+ method: "GET",
5606
+ url: "applications?" + queryArray.join("&"),
5607
+ body: void 0,
5608
+ authenticationNotOptional: false
5609
+ },
5610
+ ApplicationListOptions
5611
+ );
5612
+ }
5613
+ async update(ApplicationUpdateParams, ApplicationUpdateOptions) {
5614
+ return await super.sendRequest(
5615
+ {
5616
+ method: "PATCH",
5617
+ url: "applications/" + ApplicationUpdateParams.applicationId,
5618
+ body: {
5619
+ colorScheme: ApplicationUpdateParams.colorScheme,
5620
+ appIconLight: ApplicationUpdateParams.appIconLight,
5621
+ appIconDark: ApplicationUpdateParams.appIconDark,
5622
+ status: ApplicationUpdateParams.status
5623
+ },
5624
+ authenticationNotOptional: true
5625
+ },
5626
+ ApplicationUpdateOptions
5627
+ );
5628
+ }
5629
+ async delete(ApplicationDeleteParams, ApplicationDeleteOptions) {
5630
+ return await super.sendRequest(
5631
+ {
5632
+ method: "DELETE",
5633
+ url: "applications/" + ApplicationDeleteParams.applicationId,
5634
+ authenticationNotOptional: true,
5635
+ body: void 0
5636
+ },
5637
+ ApplicationDeleteOptions
5638
+ );
5639
+ }
5640
+ };
5641
+
5286
5642
  // src/types/types.ts
5287
5643
  var LanguageCodeArray = [
5288
5644
  "en",
@@ -5466,6 +5822,7 @@ var Juhuu = class {
5466
5822
  this.incidents = new IncidentsService(config);
5467
5823
  this.parameterAnomalyGroups = new ParameterAnomalyGroupsService(config);
5468
5824
  this.parameterAnomalyGroupTrackers = new ParameterAnomalyGroupTrackersService(config);
5825
+ this.parameterAnomalyGroupTrackerTraces = new ParameterAnomalyGroupTrackerTracesService(config);
5469
5826
  this.emz = new EmzService(config);
5470
5827
  this.flows = new FlowsService(config);
5471
5828
  this.flowTraces = new FlowTracesService(config);
@@ -5480,6 +5837,7 @@ var Juhuu = class {
5480
5837
  this.kits = new KitsService(config);
5481
5838
  this.panels = new PanelsService(config);
5482
5839
  this.prices = new PricesService(config);
5840
+ this.applications = new ApplicationsService(config);
5483
5841
  }
5484
5842
  /**
5485
5843
  * Top Level Resources
@@ -5517,6 +5875,7 @@ var Juhuu = class {
5517
5875
  incidents;
5518
5876
  parameterAnomalyGroups;
5519
5877
  parameterAnomalyGroupTrackers;
5878
+ parameterAnomalyGroupTrackerTraces;
5520
5879
  emz;
5521
5880
  flows;
5522
5881
  flowTraces;
@@ -5531,6 +5890,7 @@ var Juhuu = class {
5531
5890
  kits;
5532
5891
  panels;
5533
5892
  prices;
5893
+ applications;
5534
5894
  };
5535
5895
  var JUHUU;
5536
5896
  ((JUHUU2) => {