@juhuu/sdk-ts 1.2.182 → 1.2.184

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.d.mts CHANGED
@@ -209,11 +209,16 @@ interface Person {
209
209
  phone: string;
210
210
  }
211
211
  interface Party extends Person {
212
- vat: string;
212
+ taxCodeArray: TaxCode[];
213
213
  address: Address;
214
214
  iban?: string;
215
215
  bic?: string;
216
216
  }
217
+ type TaxCode = {
218
+ code: string;
219
+ type: "VAT" | "GST" | "CNPJ" | "ABN" | "TIN";
220
+ countryCode: CountryCode;
221
+ };
217
222
  type VeloBrushDeviceDocumentUserManualStep = "prepareBike1" | "prepareBike2" | "chooseCycleType" | "openDoors1" | "extendBikeDrawer1" | "unfoldRamp1" | "placeBike1" | "fixBike1" | "fixBike2" | "retractBikeDrawer1" | "closeDoors1" | "selectWashProgram" | "waitForWashProgram" | "openDoors2" | "extendBikeDrawer2" | "dryBike1" | "dryBike2" | "releaseBike" | "unloadBike" | "retractBikeDrawer2" | "closeDoors2" | "lockDoors" | "error" | "emergencyStop" | "waitingForSession";
218
223
  type PaymentStatus = "waitingForConfirmation" | "waitingForAmountFinalization" | "waitingForCapture" | "waitingForTransitConfirmation" | "inTransitToProvider" | "captured" | "inTransitToProperty" | "payedOut" | "cancelled";
219
224
  type PaymentRefundStatus = "waitingForArrivalAtUser" | "waitingForPayout" | "inTransitToProperty" | "payedOut" | "failed";
@@ -366,12 +371,6 @@ type GraphNode = {
366
371
  type: "flow.start";
367
372
  trigger: "session.terminate";
368
373
  nodeIdArray: string[];
369
- } | {
370
- id: string;
371
- type: "flow.start";
372
- trigger: "command.executed";
373
- commandName: string;
374
- nodeIdArray: string[];
375
374
  } | {
376
375
  id: string;
377
376
  type: "flow.start";
@@ -403,11 +402,6 @@ type GraphNode = {
403
402
  type: "open.phone";
404
403
  nodeIdArray: string[];
405
404
  phone: string;
406
- } | {
407
- id: string;
408
- type: "device.message";
409
- nodeIdArray: string[];
410
- message: string;
411
405
  } | {
412
406
  id: string;
413
407
  /**
@@ -466,11 +460,6 @@ type GraphNode = {
466
460
  nodeIdArray: string[];
467
461
  parameterName: string;
468
462
  value: number | string | boolean;
469
- } | {
470
- id: string;
471
- type: "command.execute";
472
- nodeIdArray: string[];
473
- commandName: string;
474
463
  } | {
475
464
  id: string;
476
465
  type: "flow.exception";
@@ -601,6 +590,7 @@ declare class SessionService extends Service {
601
590
  attachUser(SessionAttachUserParams: JUHUU.Session.AttachUser.Params, SessionAttachUserOptions?: JUHUU.Session.AttachUser.Options): Promise<JUHUU.HttpResponse<JUHUU.Session.AttachUser.Response>>;
602
591
  detachUser(SessionDetachUserParams: JUHUU.Session.DetachUser.Params, SessionDetachUserOptions?: JUHUU.Session.DetachUser.Options): Promise<JUHUU.HttpResponse<JUHUU.Session.DetachUser.Response>>;
603
592
  delete(SessionDeleteUserParams: JUHUU.Session.Delete.Params, SessionDeleteUserOptions?: JUHUU.Session.Delete.Options): Promise<JUHUU.HttpResponse<JUHUU.Session.Delete.Response>>;
593
+ listen(SessionRealtimeParams: JUHUU.Session.Realtime.Params, SessionRealtimeOptions?: JUHUU.Session.Realtime.Options): JUHUU.Session.Realtime.Response;
604
594
  }
605
595
 
606
596
  declare class LinkService extends Service {
@@ -668,7 +658,6 @@ declare class DevicesService extends Service {
668
658
  list(DeviceListParams: JUHUU.Device.List.Params, DeviceListOptions?: JUHUU.Device.List.Options): Promise<JUHUU.HttpResponse<JUHUU.Device.List.Response>>;
669
659
  update(DeviceUpdateParams: JUHUU.Device.Update.Params, DeviceUpdateOptions?: JUHUU.Device.Update.Options): Promise<JUHUU.HttpResponse<JUHUU.Device.Update.Response>>;
670
660
  listen(DeviceRealtimeParams: JUHUU.Device.Realtime.Params, DeviceRealtimeOptions?: JUHUU.Device.Realtime.Options): JUHUU.Device.Realtime.Response;
671
- message(DeviceMessageParams: JUHUU.Device.Message.Params, DeviceMessageOptions?: JUHUU.Device.Message.Options): Promise<JUHUU.HttpResponse<JUHUU.Device.Message.Response>>;
672
661
  nodeExecute(DeviceNodeExecuteParams: JUHUU.Device.NodeExecute.Params, DeviceNodeExecuteOptions?: JUHUU.Device.NodeExecute.Options): Promise<JUHUU.HttpResponse<JUHUU.Device.NodeExecute.Response>>;
673
662
  delete(DeviceDeleteParams: JUHUU.Device.Delete.Params, DeviceDeleteOptions?: JUHUU.Device.Delete.Options): Promise<JUHUU.HttpResponse<JUHUU.Device.Delete.Response>>;
674
663
  }
@@ -1195,6 +1184,22 @@ declare namespace JUHUU {
1195
1184
  type Options = JUHUU.RequestOptions;
1196
1185
  type Response = JUHUU.Session.Object;
1197
1186
  }
1187
+ export namespace Realtime {
1188
+ type Params = {
1189
+ sessionId: string;
1190
+ };
1191
+ type Options = JUHUU.RequestOptions;
1192
+ type Response = {
1193
+ onUpdated: (callback: (message: {
1194
+ payload: {
1195
+ after: JUHUU.Session.Object;
1196
+ before: JUHUU.Session.Object;
1197
+ changedFields: string[];
1198
+ };
1199
+ }) => void) => void;
1200
+ close: () => void;
1201
+ };
1202
+ }
1198
1203
  export { };
1199
1204
  }
1200
1205
  namespace User {
@@ -1214,7 +1219,7 @@ declare namespace JUHUU {
1214
1219
  billingAddress: DeepNullable<Address>;
1215
1220
  billingEmail: string | null;
1216
1221
  billingEmailVerified: boolean;
1217
- vat: string | null;
1222
+ taxCodeArray: TaxCode[];
1218
1223
  notifications: {
1219
1224
  email: {
1220
1225
  enabled: boolean;
@@ -1298,7 +1303,7 @@ declare namespace JUHUU {
1298
1303
  languageCode?: LanguageCode;
1299
1304
  appVersion?: string;
1300
1305
  billingAddress?: DeepNullable<Address>;
1301
- vat?: string | null;
1306
+ taxCodeArray?: TaxCode[];
1302
1307
  acceptedTermIdArray?: string[];
1303
1308
  group?: UserGroup;
1304
1309
  };
@@ -2189,7 +2194,7 @@ declare namespace JUHUU {
2189
2194
  legalName: string | null;
2190
2195
  emailSignature: string | null;
2191
2196
  billingAddress: Address | null;
2192
- vat: string;
2197
+ taxCodeArray: TaxCode[];
2193
2198
  invoiceImage: string;
2194
2199
  invoiceNumberPrefix: string;
2195
2200
  stripeConnectedAccountId: string | null;
@@ -2327,7 +2332,7 @@ declare namespace JUHUU {
2327
2332
  timeZone?: TimeZone;
2328
2333
  languageCode?: LanguageCode;
2329
2334
  emailSignature?: string;
2330
- vat?: string;
2335
+ taxCodeArray?: TaxCode[];
2331
2336
  };
2332
2337
  type Options = JUHUU.RequestOptions;
2333
2338
  type Response = {
@@ -2470,7 +2475,7 @@ declare namespace JUHUU {
2470
2475
  estimatedReadyForPayoutAt: Date | null;
2471
2476
  propertyId: string;
2472
2477
  payoutId: string | null;
2473
- vat: string | null;
2478
+ taxCodeArray: TaxCode[];
2474
2479
  accountingAreaId: string;
2475
2480
  currencyCode: CurrencyCode;
2476
2481
  serviceFee: number | null;
@@ -2586,7 +2591,7 @@ declare namespace JUHUU {
2586
2591
  transactionFee: number;
2587
2592
  serviceFee: number;
2588
2593
  billingAddress: DeepNullable<Address>;
2589
- vat: string | null;
2594
+ taxCodeArray: TaxCode[];
2590
2595
  accountingAreaId: string;
2591
2596
  estimatedArrivalAt: Date;
2592
2597
  postingRowArray: PostingRow[];
@@ -3758,4 +3763,4 @@ declare namespace JUHUU {
3758
3763
  }
3759
3764
  }
3760
3765
 
3761
- export { type AccessControlListElement, type Address, type ApiKeyScope, type ApiKeyStatus, type AutoRenewMode, type BusinessType, type Capability, type Category, type Circumstance, type Color, type ColorScheme, type Command, type Condition, ConditionType, type CountryCode, CountryCodeArray, type CurrencyCode, CurrencyCodeArray, type CustomClaims, type DeepNullable, type DevicePermission, type DeviceStatus, type DeviceType, type Environment, type EnvironmentSettings, type ExtractType, type Frontend, type GeneralSettings, type GeoPoint, type GraphNode, JUHUU, Juhuu, type LanguageCode, LanguageCodeArray, Layout, type LayoutBlock, type License, type LicenseTariffIdMap, type LinkType, type LocaleString, type MapFilter, type Modality, type Offer, type OfferTime, type Party, type PaymentMethod, type PaymentReason, type PaymentRefundReason, type PaymentRefundStatus, type PaymentServiceProvider, type PaymentStatus, type PayoutSettings, type PayoutStatus, type PermissionTypes, type Person, type Platform, type PlatformString, type PostingRow, type Purpose, type PushToken, ReadonlyCategoryArray, ReadonlyModalityArray, ReadonlySectorArray, type RefundStatus, type Sector, type SessionCannotTerminateReason, type SessionSettings, type SessionStatus, type SessionTerminatedByType, type SessionType, Settings, type SimStatus, type StarRating, type TarifType, type TimeZone, type Unit, type UserGroup, type UserType, type Utilization, type VeloBrushDeviceDocumentUserManualStep, type Viewport, type ViewportPolygon, type VisualPriority, type hexColor };
3766
+ export { type AccessControlListElement, type Address, type ApiKeyScope, type ApiKeyStatus, type AutoRenewMode, type BusinessType, type Capability, type Category, type Circumstance, type Color, type ColorScheme, type Command, type Condition, ConditionType, type CountryCode, CountryCodeArray, type CurrencyCode, CurrencyCodeArray, type CustomClaims, type DeepNullable, type DevicePermission, type DeviceStatus, type DeviceType, type Environment, type EnvironmentSettings, type ExtractType, type Frontend, type GeneralSettings, type GeoPoint, type GraphNode, JUHUU, Juhuu, type LanguageCode, LanguageCodeArray, Layout, type LayoutBlock, type License, type LicenseTariffIdMap, type LinkType, type LocaleString, type MapFilter, type Modality, type Offer, type OfferTime, type Party, type PaymentMethod, type PaymentReason, type PaymentRefundReason, type PaymentRefundStatus, type PaymentServiceProvider, type PaymentStatus, type PayoutSettings, type PayoutStatus, type PermissionTypes, type Person, type Platform, type PlatformString, type PostingRow, type Purpose, type PushToken, ReadonlyCategoryArray, ReadonlyModalityArray, ReadonlySectorArray, type RefundStatus, type Sector, type SessionCannotTerminateReason, type SessionSettings, type SessionStatus, type SessionTerminatedByType, type SessionType, Settings, type SimStatus, type StarRating, type TarifType, type TaxCode, type TimeZone, type Unit, type UserGroup, type UserType, type Utilization, type VeloBrushDeviceDocumentUserManualStep, type Viewport, type ViewportPolygon, type VisualPriority, type hexColor };
package/dist/index.d.ts CHANGED
@@ -209,11 +209,16 @@ interface Person {
209
209
  phone: string;
210
210
  }
211
211
  interface Party extends Person {
212
- vat: string;
212
+ taxCodeArray: TaxCode[];
213
213
  address: Address;
214
214
  iban?: string;
215
215
  bic?: string;
216
216
  }
217
+ type TaxCode = {
218
+ code: string;
219
+ type: "VAT" | "GST" | "CNPJ" | "ABN" | "TIN";
220
+ countryCode: CountryCode;
221
+ };
217
222
  type VeloBrushDeviceDocumentUserManualStep = "prepareBike1" | "prepareBike2" | "chooseCycleType" | "openDoors1" | "extendBikeDrawer1" | "unfoldRamp1" | "placeBike1" | "fixBike1" | "fixBike2" | "retractBikeDrawer1" | "closeDoors1" | "selectWashProgram" | "waitForWashProgram" | "openDoors2" | "extendBikeDrawer2" | "dryBike1" | "dryBike2" | "releaseBike" | "unloadBike" | "retractBikeDrawer2" | "closeDoors2" | "lockDoors" | "error" | "emergencyStop" | "waitingForSession";
218
223
  type PaymentStatus = "waitingForConfirmation" | "waitingForAmountFinalization" | "waitingForCapture" | "waitingForTransitConfirmation" | "inTransitToProvider" | "captured" | "inTransitToProperty" | "payedOut" | "cancelled";
219
224
  type PaymentRefundStatus = "waitingForArrivalAtUser" | "waitingForPayout" | "inTransitToProperty" | "payedOut" | "failed";
@@ -366,12 +371,6 @@ type GraphNode = {
366
371
  type: "flow.start";
367
372
  trigger: "session.terminate";
368
373
  nodeIdArray: string[];
369
- } | {
370
- id: string;
371
- type: "flow.start";
372
- trigger: "command.executed";
373
- commandName: string;
374
- nodeIdArray: string[];
375
374
  } | {
376
375
  id: string;
377
376
  type: "flow.start";
@@ -403,11 +402,6 @@ type GraphNode = {
403
402
  type: "open.phone";
404
403
  nodeIdArray: string[];
405
404
  phone: string;
406
- } | {
407
- id: string;
408
- type: "device.message";
409
- nodeIdArray: string[];
410
- message: string;
411
405
  } | {
412
406
  id: string;
413
407
  /**
@@ -466,11 +460,6 @@ type GraphNode = {
466
460
  nodeIdArray: string[];
467
461
  parameterName: string;
468
462
  value: number | string | boolean;
469
- } | {
470
- id: string;
471
- type: "command.execute";
472
- nodeIdArray: string[];
473
- commandName: string;
474
463
  } | {
475
464
  id: string;
476
465
  type: "flow.exception";
@@ -601,6 +590,7 @@ declare class SessionService extends Service {
601
590
  attachUser(SessionAttachUserParams: JUHUU.Session.AttachUser.Params, SessionAttachUserOptions?: JUHUU.Session.AttachUser.Options): Promise<JUHUU.HttpResponse<JUHUU.Session.AttachUser.Response>>;
602
591
  detachUser(SessionDetachUserParams: JUHUU.Session.DetachUser.Params, SessionDetachUserOptions?: JUHUU.Session.DetachUser.Options): Promise<JUHUU.HttpResponse<JUHUU.Session.DetachUser.Response>>;
603
592
  delete(SessionDeleteUserParams: JUHUU.Session.Delete.Params, SessionDeleteUserOptions?: JUHUU.Session.Delete.Options): Promise<JUHUU.HttpResponse<JUHUU.Session.Delete.Response>>;
593
+ listen(SessionRealtimeParams: JUHUU.Session.Realtime.Params, SessionRealtimeOptions?: JUHUU.Session.Realtime.Options): JUHUU.Session.Realtime.Response;
604
594
  }
605
595
 
606
596
  declare class LinkService extends Service {
@@ -668,7 +658,6 @@ declare class DevicesService extends Service {
668
658
  list(DeviceListParams: JUHUU.Device.List.Params, DeviceListOptions?: JUHUU.Device.List.Options): Promise<JUHUU.HttpResponse<JUHUU.Device.List.Response>>;
669
659
  update(DeviceUpdateParams: JUHUU.Device.Update.Params, DeviceUpdateOptions?: JUHUU.Device.Update.Options): Promise<JUHUU.HttpResponse<JUHUU.Device.Update.Response>>;
670
660
  listen(DeviceRealtimeParams: JUHUU.Device.Realtime.Params, DeviceRealtimeOptions?: JUHUU.Device.Realtime.Options): JUHUU.Device.Realtime.Response;
671
- message(DeviceMessageParams: JUHUU.Device.Message.Params, DeviceMessageOptions?: JUHUU.Device.Message.Options): Promise<JUHUU.HttpResponse<JUHUU.Device.Message.Response>>;
672
661
  nodeExecute(DeviceNodeExecuteParams: JUHUU.Device.NodeExecute.Params, DeviceNodeExecuteOptions?: JUHUU.Device.NodeExecute.Options): Promise<JUHUU.HttpResponse<JUHUU.Device.NodeExecute.Response>>;
673
662
  delete(DeviceDeleteParams: JUHUU.Device.Delete.Params, DeviceDeleteOptions?: JUHUU.Device.Delete.Options): Promise<JUHUU.HttpResponse<JUHUU.Device.Delete.Response>>;
674
663
  }
@@ -1195,6 +1184,22 @@ declare namespace JUHUU {
1195
1184
  type Options = JUHUU.RequestOptions;
1196
1185
  type Response = JUHUU.Session.Object;
1197
1186
  }
1187
+ export namespace Realtime {
1188
+ type Params = {
1189
+ sessionId: string;
1190
+ };
1191
+ type Options = JUHUU.RequestOptions;
1192
+ type Response = {
1193
+ onUpdated: (callback: (message: {
1194
+ payload: {
1195
+ after: JUHUU.Session.Object;
1196
+ before: JUHUU.Session.Object;
1197
+ changedFields: string[];
1198
+ };
1199
+ }) => void) => void;
1200
+ close: () => void;
1201
+ };
1202
+ }
1198
1203
  export { };
1199
1204
  }
1200
1205
  namespace User {
@@ -1214,7 +1219,7 @@ declare namespace JUHUU {
1214
1219
  billingAddress: DeepNullable<Address>;
1215
1220
  billingEmail: string | null;
1216
1221
  billingEmailVerified: boolean;
1217
- vat: string | null;
1222
+ taxCodeArray: TaxCode[];
1218
1223
  notifications: {
1219
1224
  email: {
1220
1225
  enabled: boolean;
@@ -1298,7 +1303,7 @@ declare namespace JUHUU {
1298
1303
  languageCode?: LanguageCode;
1299
1304
  appVersion?: string;
1300
1305
  billingAddress?: DeepNullable<Address>;
1301
- vat?: string | null;
1306
+ taxCodeArray?: TaxCode[];
1302
1307
  acceptedTermIdArray?: string[];
1303
1308
  group?: UserGroup;
1304
1309
  };
@@ -2189,7 +2194,7 @@ declare namespace JUHUU {
2189
2194
  legalName: string | null;
2190
2195
  emailSignature: string | null;
2191
2196
  billingAddress: Address | null;
2192
- vat: string;
2197
+ taxCodeArray: TaxCode[];
2193
2198
  invoiceImage: string;
2194
2199
  invoiceNumberPrefix: string;
2195
2200
  stripeConnectedAccountId: string | null;
@@ -2327,7 +2332,7 @@ declare namespace JUHUU {
2327
2332
  timeZone?: TimeZone;
2328
2333
  languageCode?: LanguageCode;
2329
2334
  emailSignature?: string;
2330
- vat?: string;
2335
+ taxCodeArray?: TaxCode[];
2331
2336
  };
2332
2337
  type Options = JUHUU.RequestOptions;
2333
2338
  type Response = {
@@ -2470,7 +2475,7 @@ declare namespace JUHUU {
2470
2475
  estimatedReadyForPayoutAt: Date | null;
2471
2476
  propertyId: string;
2472
2477
  payoutId: string | null;
2473
- vat: string | null;
2478
+ taxCodeArray: TaxCode[];
2474
2479
  accountingAreaId: string;
2475
2480
  currencyCode: CurrencyCode;
2476
2481
  serviceFee: number | null;
@@ -2586,7 +2591,7 @@ declare namespace JUHUU {
2586
2591
  transactionFee: number;
2587
2592
  serviceFee: number;
2588
2593
  billingAddress: DeepNullable<Address>;
2589
- vat: string | null;
2594
+ taxCodeArray: TaxCode[];
2590
2595
  accountingAreaId: string;
2591
2596
  estimatedArrivalAt: Date;
2592
2597
  postingRowArray: PostingRow[];
@@ -3758,4 +3763,4 @@ declare namespace JUHUU {
3758
3763
  }
3759
3764
  }
3760
3765
 
3761
- export { type AccessControlListElement, type Address, type ApiKeyScope, type ApiKeyStatus, type AutoRenewMode, type BusinessType, type Capability, type Category, type Circumstance, type Color, type ColorScheme, type Command, type Condition, ConditionType, type CountryCode, CountryCodeArray, type CurrencyCode, CurrencyCodeArray, type CustomClaims, type DeepNullable, type DevicePermission, type DeviceStatus, type DeviceType, type Environment, type EnvironmentSettings, type ExtractType, type Frontend, type GeneralSettings, type GeoPoint, type GraphNode, JUHUU, Juhuu, type LanguageCode, LanguageCodeArray, Layout, type LayoutBlock, type License, type LicenseTariffIdMap, type LinkType, type LocaleString, type MapFilter, type Modality, type Offer, type OfferTime, type Party, type PaymentMethod, type PaymentReason, type PaymentRefundReason, type PaymentRefundStatus, type PaymentServiceProvider, type PaymentStatus, type PayoutSettings, type PayoutStatus, type PermissionTypes, type Person, type Platform, type PlatformString, type PostingRow, type Purpose, type PushToken, ReadonlyCategoryArray, ReadonlyModalityArray, ReadonlySectorArray, type RefundStatus, type Sector, type SessionCannotTerminateReason, type SessionSettings, type SessionStatus, type SessionTerminatedByType, type SessionType, Settings, type SimStatus, type StarRating, type TarifType, type TimeZone, type Unit, type UserGroup, type UserType, type Utilization, type VeloBrushDeviceDocumentUserManualStep, type Viewport, type ViewportPolygon, type VisualPriority, type hexColor };
3766
+ export { type AccessControlListElement, type Address, type ApiKeyScope, type ApiKeyStatus, type AutoRenewMode, type BusinessType, type Capability, type Category, type Circumstance, type Color, type ColorScheme, type Command, type Condition, ConditionType, type CountryCode, CountryCodeArray, type CurrencyCode, CurrencyCodeArray, type CustomClaims, type DeepNullable, type DevicePermission, type DeviceStatus, type DeviceType, type Environment, type EnvironmentSettings, type ExtractType, type Frontend, type GeneralSettings, type GeoPoint, type GraphNode, JUHUU, Juhuu, type LanguageCode, LanguageCodeArray, Layout, type LayoutBlock, type License, type LicenseTariffIdMap, type LinkType, type LocaleString, type MapFilter, type Modality, type Offer, type OfferTime, type Party, type PaymentMethod, type PaymentReason, type PaymentRefundReason, type PaymentRefundStatus, type PaymentServiceProvider, type PaymentStatus, type PayoutSettings, type PayoutStatus, type PermissionTypes, type Person, type Platform, type PlatformString, type PostingRow, type Purpose, type PushToken, ReadonlyCategoryArray, ReadonlyModalityArray, ReadonlySectorArray, type RefundStatus, type Sector, type SessionCannotTerminateReason, type SessionSettings, type SessionStatus, type SessionTerminatedByType, type SessionType, Settings, type SimStatus, type StarRating, type TarifType, type TaxCode, type TimeZone, type Unit, type UserGroup, type UserType, type Utilization, type VeloBrushDeviceDocumentUserManualStep, type Viewport, type ViewportPolygon, type VisualPriority, type hexColor };
package/dist/index.js CHANGED
@@ -553,6 +553,23 @@ var SessionService = class extends Service {
553
553
  SessionDeleteUserOptions
554
554
  );
555
555
  }
556
+ listen(SessionRealtimeParams, SessionRealtimeOptions) {
557
+ const socket = super.connectToWebsocket({
558
+ url: "sessions/" + SessionRealtimeParams.sessionId + "/websocket"
559
+ });
560
+ const onUpdated = (onUpdatedCallback) => {
561
+ socket.on("updated", (message) => {
562
+ onUpdatedCallback(message);
563
+ });
564
+ };
565
+ return {
566
+ onUpdated,
567
+ close: () => {
568
+ console.log("closing websocket connection");
569
+ socket.close();
570
+ }
571
+ };
572
+ }
556
573
  };
557
574
 
558
575
  // src/links/links.service.ts
@@ -764,7 +781,7 @@ var UsersService = class extends Service {
764
781
  languageCode: UserUpdateParams?.languageCode,
765
782
  appVersion: UserUpdateParams?.appVersion,
766
783
  billingAddress: UserUpdateParams?.billingAddress,
767
- vat: UserUpdateParams?.vat,
784
+ taxCodeArray: UserUpdateParams?.taxCodeArray,
768
785
  acceptedTermIdArray: UserUpdateParams?.acceptedTermIdArray,
769
786
  group: UserUpdateParams?.group
770
787
  },
@@ -1246,19 +1263,6 @@ var DevicesService = class extends Service {
1246
1263
  }
1247
1264
  };
1248
1265
  }
1249
- async message(DeviceMessageParams, DeviceMessageOptions) {
1250
- return await super.sendRequest(
1251
- {
1252
- method: "POST",
1253
- url: "devices/" + DeviceMessageParams.deviceId + "/message",
1254
- body: {
1255
- message: DeviceMessageParams.message
1256
- },
1257
- authenticationNotOptional: true
1258
- },
1259
- DeviceMessageOptions
1260
- );
1261
- }
1262
1266
  async nodeExecute(DeviceNodeExecuteParams, DeviceNodeExecuteOptions) {
1263
1267
  return await super.sendRequest(
1264
1268
  {
package/dist/index.mjs CHANGED
@@ -509,6 +509,23 @@ var SessionService = class extends Service {
509
509
  SessionDeleteUserOptions
510
510
  );
511
511
  }
512
+ listen(SessionRealtimeParams, SessionRealtimeOptions) {
513
+ const socket = super.connectToWebsocket({
514
+ url: "sessions/" + SessionRealtimeParams.sessionId + "/websocket"
515
+ });
516
+ const onUpdated = (onUpdatedCallback) => {
517
+ socket.on("updated", (message) => {
518
+ onUpdatedCallback(message);
519
+ });
520
+ };
521
+ return {
522
+ onUpdated,
523
+ close: () => {
524
+ console.log("closing websocket connection");
525
+ socket.close();
526
+ }
527
+ };
528
+ }
512
529
  };
513
530
 
514
531
  // src/links/links.service.ts
@@ -720,7 +737,7 @@ var UsersService = class extends Service {
720
737
  languageCode: UserUpdateParams?.languageCode,
721
738
  appVersion: UserUpdateParams?.appVersion,
722
739
  billingAddress: UserUpdateParams?.billingAddress,
723
- vat: UserUpdateParams?.vat,
740
+ taxCodeArray: UserUpdateParams?.taxCodeArray,
724
741
  acceptedTermIdArray: UserUpdateParams?.acceptedTermIdArray,
725
742
  group: UserUpdateParams?.group
726
743
  },
@@ -1202,19 +1219,6 @@ var DevicesService = class extends Service {
1202
1219
  }
1203
1220
  };
1204
1221
  }
1205
- async message(DeviceMessageParams, DeviceMessageOptions) {
1206
- return await super.sendRequest(
1207
- {
1208
- method: "POST",
1209
- url: "devices/" + DeviceMessageParams.deviceId + "/message",
1210
- body: {
1211
- message: DeviceMessageParams.message
1212
- },
1213
- authenticationNotOptional: true
1214
- },
1215
- DeviceMessageOptions
1216
- );
1217
- }
1218
1222
  async nodeExecute(DeviceNodeExecuteParams, DeviceNodeExecuteOptions) {
1219
1223
  return await super.sendRequest(
1220
1224
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juhuu/sdk-ts",
3
- "version": "1.2.182",
3
+ "version": "1.2.184",
4
4
  "description": "Typescript wrapper for JUHUU services",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",