@torrow/sdk-client 0.2.0 → 0.4.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/README.md CHANGED
@@ -7,6 +7,7 @@ TypeScript/Node client SDK for the Torrow REST API.
7
7
  - domain facades from `resources/*`
8
8
  - OpenAPI types (`paths`, `components`)
9
9
  - enum-like wire constants: `DeviceTypeValues`, `AccountTypeValues`, `VerificationMethodValues`, `TokenStatusValues`, `CaseStateValues`, …
10
+ - communication helpers: `communicationHref`, `resolveCommunicationBrand` (icons: optional `@torrow/sdk-brand-assets`)
10
11
 
11
12
  ## Install
12
13
 
@@ -17,11 +18,14 @@ npm install @torrow/sdk-client
17
18
  ## Usage
18
19
 
19
20
  ```ts
20
- import { TorrowClient } from "@torrow/sdk-client";
21
+ import { TorrowClient, communicationHref, resolveCommunicationBrand } from "@torrow/sdk-client";
21
22
 
22
23
  const client = new TorrowClient({
23
24
  getAccessToken: async () => process.env.TORROW_ACCESS_TOKEN?.trim() || undefined,
24
25
  });
26
+
27
+ const href = communicationHref(comm);
28
+ const brand = resolveCommunicationBrand(comm);
25
29
  ```
26
30
 
27
31
  ## Field docs package
package/dist/index.d.ts CHANGED
@@ -58,7 +58,8 @@ interface TorrowClientConfig {
58
58
  * Без этого шлюз может вернуть **`AUTH_HEADER_MISSING`** / **`REQUEST_IS_INVALID`** на части эндпоинтов.
59
59
  * Не путай с пользовательским Bearer из **`getAccessToken`** — он на **`AuthFacade`** не передаётся.
60
60
  *
61
- * App/widget с сессией: обычно **`TorrowAuth`** + **`appCredentials`** (маппинг внутри auth-пакета).
61
+ * App/widget с сессией: обычно **`TorrowAuth`** + опциональный **`appCredentials`**
62
+ * (дефолт SDK — `DEFAULT_APP_CREDENTIALS` в `@torrow/sdk-auth`; здесь Basic **не** дефолтится).
62
63
  * Low-level / одноразовый `sendCode`: задай {@link AuthIdentityBasic} явно.
63
64
  */
64
65
  authIdentityBasic?: AuthIdentityBasic;
@@ -36069,7 +36070,7 @@ interface components {
36069
36070
  meta?: components["schemas"]["ObjectInfo"];
36070
36071
  };
36071
36072
  /** @enum {string} */
36072
- NoteType: "Unknown" | "Text" | "Html" | "Hlink" | "File" | "Photo" | "Voice" | "Geolocation" | "Qr" | "ServiceSpecification";
36073
+ NoteType: "Unknown" | "Text" | "Html" | "Hlink" | "File" | "Photo" | "Voice" | "Geolocation" | "Qr" | "ServiceSpecification" | "Markdown";
36073
36074
  NoteView: {
36074
36075
  data?: unknown;
36075
36076
  noteType?: components["schemas"]["NoteType"];
@@ -37685,10 +37686,26 @@ type UnsetGroupItemReq = UnsetGroupItemReqDto;
37685
37686
  type UpdateFileIdResp = UpdateFileIdRespDto;
37686
37687
 
37687
37688
  type ContactItem = TorrowItemFromDto<ContactItemDto>;
37689
+ /** Элемент `ContactItem.addresses` (ответ GET). */
37690
+ type Address = NonNullable<ContactItem["addresses"]>[number];
37688
37691
  /** Элемент `ContactItem.communications` (ответ GET, полная модель). */
37689
37692
  type Communication = NonNullable<ContactItem["communications"]>[number];
37690
37693
  /** `communications[]` в теле `POST`/`PUT` контакта: без read-only `checkDate`; `checkState` опционален (SDK подставляет `Unchecked`). */
37691
37694
  type CommunicationForCreateOrUpdate = Omit<Communication, "checkDate">;
37695
+ /** Элемент `ContactItem.dates`. */
37696
+ type MemorableDate = NonNullable<ContactItem["dates"]>[number];
37697
+ /** `ContactItem.rating`. */
37698
+ type Rating = NonNullable<ContactItem["rating"]>;
37699
+ /** `ContactItem.visitCard` (3 слота отображения). */
37700
+ type ContactVisitCard = NonNullable<ContactItem["visitCard"]>;
37701
+ /** Элемент `ContactVisitCard.fields`. */
37702
+ type ContactVisitCardField = NonNullable<NonNullable<ContactVisitCard["fields"]>[number]>;
37703
+ /** `ContactItem.personalInfo`. */
37704
+ type ContactPersonalInfo = NonNullable<ContactItem["personalInfo"]>;
37705
+ /** `ContactItem.profileType`. */
37706
+ type ProfileType = NonNullable<ContactItem["profileType"]>;
37707
+ /** `ContactItem.registerInfo`. */
37708
+ type RegisterInfo = NonNullable<ContactItem["registerInfo"]>;
37692
37709
  type Gender = NonNullable<ContactItem["gender"]>;
37693
37710
  type CommunicationType = NonNullable<Communication["type"]>;
37694
37711
  declare const GenderValues: {
@@ -37717,6 +37734,13 @@ declare const CommunicationTypeValues: {
37717
37734
  readonly Max: "Max";
37718
37735
  readonly Other: "Other";
37719
37736
  };
37737
+ declare const ProfileTypeValues: {
37738
+ readonly Unknown: "UnknownProfile";
37739
+ readonly None: "None";
37740
+ readonly MyProfile: "MyProfile";
37741
+ readonly AnyProfile: "AnyProfile";
37742
+ readonly CopyProfile: "CopyProfile";
37743
+ };
37720
37744
  type SendCommunicationCodeReq = SendCommunicationCodeReqDto;
37721
37745
  type SendCommunicationCodeResp = SendCommunicationCodeRespDto;
37722
37746
  type VerifyCommunicationCodeReq = VerifyCommunicationCodeReqDto;
@@ -37815,12 +37839,14 @@ type LoyaltyGroupListQuery = {
37815
37839
  };
37816
37840
 
37817
37841
  type NoteItem = TorrowItemFromDto<NoteItemDto>;
37842
+ /** Supported authoring scenarios: Html and Markdown. Other server values remain for compatibility. */
37818
37843
  type NoteType = NoteTypeDto;
37819
37844
  type ImagePreviewSize = NonNullable<NoteItem["imagePreviewSize"]>;
37820
37845
  declare const NoteTypeValues: {
37821
37846
  readonly Unknown: "Unknown";
37822
37847
  readonly Text: "Text";
37823
37848
  readonly Html: "Html";
37849
+ readonly Markdown: "Markdown";
37824
37850
  readonly Hlink: "Hlink";
37825
37851
  readonly File: "File";
37826
37852
  readonly Photo: "Photo";
@@ -38292,6 +38318,8 @@ type ResourceBehaviorSettings = {
38292
38318
  };
38293
38319
 
38294
38320
  type ServiceItemApi = ServiceItemApiDto;
38321
+ type ResourceGroup = NonNullable<ServiceItemApi["resourceGroupList"]>[number];
38322
+ type BookingProperties = NonNullable<ResourceGroup["bookingProperties"]>;
38295
38323
  type CreateOrderReq = CreateOrderReqDto;
38296
38324
  type OrderResp = OrderRespDto;
38297
38325
  type SearchServiceResourcesReq = SearchServiceResourcesReqDto;
@@ -38321,6 +38349,30 @@ type ServiceItem = TorrowItemFromDto<ServiceItemApi> & {
38321
38349
  behaviorSettings?: ServiceBehaviorSettings;
38322
38350
  };
38323
38351
  type ServiceItemForCreateOrUpdate = TorrowItemForCreateOrUpdate<ServiceItem>;
38352
+ type ServiceResourceStepUsageType = Extract<NonNullable<ResourceGroup["usageType"]>, "Specification" | "Rent" | "Sale">;
38353
+ interface AddServiceResourceGroupInput {
38354
+ key: string;
38355
+ groupId?: string;
38356
+ groupName: string;
38357
+ minResources?: number | null;
38358
+ maxResources?: number | null;
38359
+ maxTotalAmount?: number | null;
38360
+ quickFilterTags?: string[] | null;
38361
+ bookingProperties?: BookingProperties | null;
38362
+ }
38363
+ interface AddServiceResourceStepInput extends AddServiceResourceGroupInput {
38364
+ usageType: ServiceResourceStepUsageType;
38365
+ stepOrder?: number;
38366
+ description?: string | null;
38367
+ autoChoiceResource?: boolean;
38368
+ hiddenStep?: boolean;
38369
+ hideResourceDetail?: boolean;
38370
+ }
38371
+ type AddServicePaymentGroupInput = AddServiceResourceGroupInput;
38372
+ interface ServiceBuildResult {
38373
+ body: ServiceItemForCreateOrUpdate;
38374
+ resourceGroupIds: Record<string, string>;
38375
+ }
38324
38376
  type SessionDurationType = NonNullable<SessionDurationProperties["sessionDurationType"]>;
38325
38377
  type TimeSelectionType = NonNullable<SessionDurationProperties["timeSelectionType"]>;
38326
38378
  type StateManagementType = NonNullable<SessionDurationProperties["stateManagementType"]>;
@@ -38387,8 +38439,8 @@ declare class CalendarsFacade extends TorrowItemFacade<CalendarItem> {
38387
38439
  profileId?: string | null;
38388
38440
  signal?: AbortSignal;
38389
38441
  }): Promise<CalendarItem>;
38390
- /** `PUT /api/v1/calendars/{torrowId}` */
38391
- update(body: CalendarItemForCreateOrUpdate, torrowId: string, options?: {
38442
+ /** `PUT /api/v1/calendars/{body.id}` */
38443
+ update(body: CalendarItemForCreateOrUpdate, options?: {
38392
38444
  checkVersion?: boolean | null;
38393
38445
  isNeedAnnouncement?: boolean | null;
38394
38446
  securityToken?: string | null;
@@ -38492,6 +38544,32 @@ declare const CaseTypeValues: {
38492
38544
  };
38493
38545
  type CaseItemForCreateOrUpdate = TorrowItemForCreateOrUpdate<CaseItem>;
38494
38546
 
38547
+ /** Опции `GET /api/v1/cases/{torrowId}` — у `getCase` и `CasesFacade.getById`. */
38548
+ interface GetCaseOptions {
38549
+ profileId?: string | null;
38550
+ caseParticipantProfileId?: string | null;
38551
+ versionToCheck?: number | null;
38552
+ includeDeleted?: boolean | null;
38553
+ includeChildTypes?: boolean;
38554
+ /** Гостевой доступ: `OrderResp.consumerSecurityToken`. */
38555
+ securityToken?: string | null;
38556
+ /** Без него гость не получит свою часть: `personalInfo.caseParticipant`, `ticketResource`. */
38557
+ caseParticipantId?: string | null;
38558
+ signal?: AbortSignal;
38559
+ }
38560
+ /** `GET /api/v1/cases/{torrowId}` — событие-заказ; гостю — с `securityToken` и `caseParticipantId`. */
38561
+ declare function getCase(http: HttpClient, torrowId: string, options?: GetCaseOptions): Promise<CaseItem>;
38562
+ /**
38563
+ * Отмена участия — `PUT /api/v1/cases/{torrowId}/caseparticipation/cancelcaseparticipation`.
38564
+ * Гость отменяет свою запись с `{ consumerIdList: [caseParticipantId], securityToken }` — как
38565
+ * «Отменить запись» в приложении. Сроки отмены (`registrationClose`, тег услуги
38566
+ * `<минуты>:DisableCancelMyParticipation`) для гостя сервер сейчас не проверяет (отмена идёт от имени
38567
+ * организатора) — проверяй их в приложении, как `torrow-apps` `CaseItemHelper.canCancelMyCaseParticipation`.
38568
+ */
38569
+ declare function cancelCaseParticipation(http: HttpClient, torrowId: string, body: CancelCaseParticipationReq, options?: {
38570
+ signal?: AbortSignal;
38571
+ }): Promise<CaseParticipant[]>;
38572
+
38495
38573
  /**
38496
38574
  * События в продуктовой терминологии (REST **`/api/v1/cases`**, DTO **`CaseItem`**). **Заказ** — событие после записи на услугу (`createOrder`); событие без услуги — **`createWithOptions`** (`PUT` + `CreateCaseReq`) или **`createCaseItem`** (`POST` + `CaseItem`). Для оплаты заказа чаще **`getById`** + токены гостя.
38497
38575
  */
@@ -38524,8 +38602,8 @@ declare class CasesFacade extends TorrowItemFacade<CaseItem> {
38524
38602
  caseParticipantType?: CaseParticipantType | null;
38525
38603
  signal?: AbortSignal;
38526
38604
  }): Promise<CaseItem>;
38527
- /** `PUT /api/v1/cases/{torrowId}` */
38528
- update(body: CaseItemForCreateOrUpdate, torrowId: string, options?: {
38605
+ /** `PUT /api/v1/cases/{body.id}` */
38606
+ update(body: CaseItemForCreateOrUpdate, options?: {
38529
38607
  profileId?: string | null;
38530
38608
  checkVersion?: boolean | null;
38531
38609
  isNeedAnnouncement?: boolean | null;
@@ -38539,16 +38617,7 @@ declare class CasesFacade extends TorrowItemFacade<CaseItem> {
38539
38617
  withPinnedItems: boolean;
38540
38618
  } & TorrowOptions): Promise<number>;
38541
38619
  /** `GET /api/v1/cases/{torrowId}` */
38542
- getById(torrowId: string, options?: {
38543
- profileId?: string | null;
38544
- caseParticipantProfileId?: string | null;
38545
- versionToCheck?: number | null;
38546
- includeDeleted?: boolean | null;
38547
- includeChildTypes?: boolean;
38548
- securityToken?: string | null;
38549
- caseParticipantId?: string | null;
38550
- signal?: AbortSignal;
38551
- }): Promise<CaseItem>;
38620
+ getById(torrowId: string, options?: GetCaseOptions): Promise<CaseItem>;
38552
38621
  /** `GET /api/v1/cases/personallist` */
38553
38622
  listPersonal(options?: PersonalListQuery & {
38554
38623
  signal?: AbortSignal;
@@ -38707,8 +38776,8 @@ declare class ContactsFacade extends TorrowItemFacade<ContactItem> {
38707
38776
  signal?: AbortSignal;
38708
38777
  }): Promise<ContactItem>;
38709
38778
  private withCreateDefaults;
38710
- /** `PUT /api/v1/contacts/{torrowId}` */
38711
- update(body: ContactItemForCreateOrUpdate, torrowId: string, options?: {
38779
+ /** `PUT /api/v1/contacts/{body.id}` */
38780
+ update(body: ContactItemForCreateOrUpdate, options?: {
38712
38781
  checkVersion?: boolean | null;
38713
38782
  isNeedAnnouncement?: boolean | null;
38714
38783
  securityToken?: string | null;
@@ -38780,8 +38849,8 @@ declare class ContextsFacade extends TorrowItemFacade<ContextItem> {
38780
38849
  profileId?: string | null;
38781
38850
  signal?: AbortSignal;
38782
38851
  }): Promise<ContextItem>;
38783
- /** `PUT /api/v1/contexts/{torrowId}` */
38784
- update(body: ContextItemForCreateOrUpdate, torrowId: string, options?: {
38852
+ /** `PUT /api/v1/contexts/{body.id}` */
38853
+ update(body: ContextItemForCreateOrUpdate, options?: {
38785
38854
  checkVersion?: boolean | null;
38786
38855
  isNeedAnnouncement?: boolean | null;
38787
38856
  signal?: AbortSignal;
@@ -38817,8 +38886,8 @@ declare class NotesFacade extends TorrowItemFacade<NoteItem> {
38817
38886
  profileId?: string | null;
38818
38887
  signal?: AbortSignal;
38819
38888
  }): Promise<NoteItem>;
38820
- /** `PUT /api/v1/notes/{torrowId}` */
38821
- update(body: NoteItemForCreateOrUpdate, torrowId: string, options?: {
38889
+ /** `PUT /api/v1/notes/{body.id}` */
38890
+ update(body: NoteItemForCreateOrUpdate, options?: {
38822
38891
  checkVersion?: boolean | null;
38823
38892
  isNeedAnnouncement?: boolean | null;
38824
38893
  signal?: AbortSignal;
@@ -38917,6 +38986,10 @@ declare class RelationsFacade {
38917
38986
  }
38918
38987
 
38919
38988
  type ResourceItemApi = ResourceItemApiDto;
38989
+ type ServiceDescription = NonNullable<ResourceItemApi["serviceDescriptions"]>[number];
38990
+ type UsageCondition = NonNullable<ResourceItemApi["usageCondition"]>;
38991
+ type UsageConditionType = NonNullable<UsageCondition["usageConditionType"]>;
38992
+ type ResourceUsageConditionType = Exclude<UsageConditionType, "UnknownUsageConditionType" | "None">;
38920
38993
  type WorkloadPeriod = WorkloadPeriodDto;
38921
38994
  type PickOrderReq = PickOrderReqDto;
38922
38995
  type PickOrderResp = PickOrderRespDto;
@@ -38934,7 +39007,19 @@ declare const UsageTypeValues: {
38934
39007
  readonly Payment: "Payment";
38935
39008
  readonly Ticket: "Ticket";
38936
39009
  };
39010
+ declare const UsageConditionTypeValues: {
39011
+ readonly None: "None";
39012
+ readonly Exclusion: "Exclusion";
39013
+ readonly Additional: "Additional";
39014
+ };
38937
39015
  type ResourceItemForCreateOrUpdate = TorrowItemForCreateOrUpdate<ResourceItem>;
39016
+ interface ResourceServiceBindingOptions {
39017
+ usageAmount?: number | null;
39018
+ sortIndex?: number | null;
39019
+ }
39020
+ interface ResourceBuildResult {
39021
+ body: ResourceItemForCreateOrUpdate;
39022
+ }
38938
39023
 
38939
39024
  /**
38940
39025
  * CRUD + personal list + социальный слой для **Resource** (`ResourceItem`, путь `/api/v1/resources`).
@@ -38953,8 +39038,8 @@ declare class ResourcesFacade extends TorrowItemFacade<ResourceItem> {
38953
39038
  profileId?: string | null;
38954
39039
  signal?: AbortSignal;
38955
39040
  }): Promise<ResourceItem>;
38956
- /** `PUT /api/v1/resources/{torrowId}` */
38957
- update(body: ResourceItemForCreateOrUpdate, torrowId: string, options?: {
39041
+ /** `PUT /api/v1/resources/{body.id}`. Требует непустой `id` в теле ресурса. */
39042
+ update(body: ResourceItemForCreateOrUpdate, options?: {
38958
39043
  profileId?: string | null;
38959
39044
  checkVersion?: boolean | null;
38960
39045
  isNeedAnnouncement?: boolean | null;
@@ -39032,13 +39117,42 @@ declare class ResourcesFacade extends TorrowItemFacade<ResourceItem> {
39032
39117
  }): Promise<TimetableStatisticsResp[]>;
39033
39118
  }
39034
39119
 
39120
+ /** Опции `GET /api/v1/services/{torrowId}` — у `getService` и `ServicesFacade.getById`. */
39121
+ interface GetServiceOptions {
39122
+ profileId?: string | null;
39123
+ versionToCheck?: number | null;
39124
+ includeDeleted?: boolean | null;
39125
+ includeChildTypes?: boolean;
39126
+ securityToken?: string | null;
39127
+ signal?: AbortSignal;
39128
+ }
39129
+ /** `GET /api/v1/services/{torrowId}` — услуга с `behaviorSettings`, как `ServicesFacade.getById`. */
39130
+ declare function getService(http: HttpClient, torrowId: string, options?: GetServiceOptions): Promise<ServiceItem>;
39131
+ /** Доступные ресурсы группы для шага «Ресурс» — `POST /api/v1/services/{serviceId}/resources`. */
39132
+ declare function getServiceResources(http: HttpClient, serviceId: string, body: SearchServiceResourcesReq, options?: {
39133
+ signal?: AbortSignal;
39134
+ }): Promise<ResourceView[]>;
39135
+ /**
39136
+ * Расчёт доступности записи — `POST /api/v1/services/{id}/checkinschedule`.
39137
+ * `type: "FreeTimeSlots"` возвращает выбираемые свободные слоты; `AsIs` — исходные периоды нагрузки.
39138
+ */
39139
+ declare function getCheckInSchedule(http: HttpClient, serviceId: string, body: GetCheckInScheduleReq, options?: {
39140
+ signal?: AbortSignal;
39141
+ }): Promise<GetCheckInScheduleResp>;
39142
+ /**
39143
+ * Заказ услуги (запись) — `POST /api/v1/services/{serviceId}/order`. Тело и отказы —
39144
+ * как у `ServicesFacade.createOrder`; гостю в ответе приходит `consumerSecurityToken`.
39145
+ */
39146
+ declare function createOrder(http: HttpClient, serviceId: string, body: CreateOrderReq, options?: {
39147
+ signal?: AbortSignal;
39148
+ }): Promise<OrderResp>;
39149
+
39035
39150
  /** CRUD, personal list, booking, session/order, и социальный слой для `ServiceItem`. */
39036
39151
  declare class ServicesFacade extends TorrowItemFacade<ServiceItem> {
39037
39152
  protected readonly itemObjectTypeCode: 1005;
39038
39153
  constructor(http: HttpClient);
39039
39154
  /** Id услуги до `create` / presigned upload. */
39040
39155
  generateServiceId(ownerTorrowId: string): string;
39041
- private toSdkServiceItem;
39042
39156
  private toApiServiceItem;
39043
39157
  /** `POST /api/v1/services` */
39044
39158
  create(body: ServiceItemForCreateOrUpdate, options?: {
@@ -39046,8 +39160,8 @@ declare class ServicesFacade extends TorrowItemFacade<ServiceItem> {
39046
39160
  profileId?: string | null;
39047
39161
  signal?: AbortSignal;
39048
39162
  }): Promise<ServiceItem>;
39049
- /** `PUT /api/v1/services/{torrowId}` */
39050
- update(body: ServiceItemForCreateOrUpdate, torrowId: string, options?: {
39163
+ /** `PUT /api/v1/services/{body.id}` */
39164
+ update(body: ServiceItemForCreateOrUpdate, options?: {
39051
39165
  profileId?: string | null;
39052
39166
  checkVersion?: boolean | null;
39053
39167
  isNeedAnnouncement?: boolean | null;
@@ -39059,14 +39173,7 @@ declare class ServicesFacade extends TorrowItemFacade<ServiceItem> {
39059
39173
  withPinnedItems: boolean;
39060
39174
  } & TorrowOptions): Promise<number>;
39061
39175
  /** `GET /api/v1/services/{torrowId}` */
39062
- getById(torrowId: string, options?: {
39063
- profileId?: string | null;
39064
- versionToCheck?: number | null;
39065
- includeDeleted?: boolean | null;
39066
- includeChildTypes?: boolean;
39067
- securityToken?: string | null;
39068
- signal?: AbortSignal;
39069
- }): Promise<ServiceItem>;
39176
+ getById(torrowId: string, options?: GetServiceOptions): Promise<ServiceItem>;
39070
39177
  /** Внутренний helper: получить типизированные настройки поведения услуги из `service.tags`. */
39071
39178
  private getBehaviorSettingsFromService;
39072
39179
  /** `GET + parse`: получить сервис и извлечь `ServiceBehaviorSettings`. */
@@ -39107,8 +39214,8 @@ declare class ServicesFacade extends TorrowItemFacade<ServiceItem> {
39107
39214
  signal?: AbortSignal;
39108
39215
  }): Promise<OrderResp>;
39109
39216
  /**
39110
- * Слоты расписания услуги — `PUT /api/v1/services/{serviceId}/timetable` с телом `TimetableFilter`.
39111
- * Используется для выбора времени в мастере записи (после выбора ресурсов передай `bookingResourceFilter` в фильтре).
39217
+ * События/заказы и занятость услуги — `PUT /api/v1/services/{serviceId}/timetable`.
39218
+ * Не вычисляет свободные слоты записи: для них используй `getCheckInSchedule` с `type: "FreeTimeSlots"`.
39112
39219
  */
39113
39220
  getTimetable(serviceId: string, body: TimetableFilter, options?: TimetableQueryOptions & {
39114
39221
  signal?: AbortSignal;
@@ -39124,7 +39231,10 @@ declare class ServicesFacade extends TorrowItemFacade<ServiceItem> {
39124
39231
  getTimetableStatistics(body: GetTimetableStatisticsRequest, options?: {
39125
39232
  signal?: AbortSignal;
39126
39233
  }): Promise<TimetableStatisticsResp[]>;
39127
- /** Доступные окна чекина — `POST /api/v1/services/{id}/checkinschedule`. */
39234
+ /**
39235
+ * Расчёт доступности записи — `POST /api/v1/services/{id}/checkinschedule`.
39236
+ * `type: "FreeTimeSlots"` возвращает выбираемые свободные слоты; `AsIs` — исходные периоды нагрузки.
39237
+ */
39128
39238
  getCheckInSchedule(serviceId: string, body: GetCheckInScheduleReq, options?: {
39129
39239
  signal?: AbortSignal;
39130
39240
  }): Promise<GetCheckInScheduleResp>;
@@ -39799,8 +39909,8 @@ declare class AccountingTransactionsFacade {
39799
39909
  securityToken?: string | null;
39800
39910
  signal?: AbortSignal;
39801
39911
  }): Promise<AccountingTransaction>;
39802
- /** `PUT /api/v1/accountingtransactions/{torrowId}` */
39803
- update(transaction: AccountingTransaction, torrowId: string, options?: {
39912
+ /** `PUT /api/v1/accountingtransactions/{transaction.id}` */
39913
+ update(transaction: AccountingTransaction, options?: {
39804
39914
  checkVersion?: boolean | null;
39805
39915
  isNeedAnnouncement?: boolean | null;
39806
39916
  securityToken?: string | null;
@@ -40126,8 +40236,8 @@ declare class LoyaltySystemsFacade extends TorrowItemCoreFacade<LoyaltySystemIte
40126
40236
  profileId?: string | null;
40127
40237
  signal?: AbortSignal;
40128
40238
  }): Promise<LoyaltySystemItem>;
40129
- /** `PUT /api/v1/loyaltysystems/{torrowId}` */
40130
- update(body: LoyaltySystemItemForCreateOrUpdate, torrowId: string, options?: {
40239
+ /** `PUT /api/v1/loyaltysystems/{body.id}` */
40240
+ update(body: LoyaltySystemItemForCreateOrUpdate, options?: {
40131
40241
  checkVersion?: boolean | null;
40132
40242
  isNeedAnnouncement?: boolean | null;
40133
40243
  signal?: AbortSignal;
@@ -40224,8 +40334,8 @@ declare class LoyaltyCardsFacade extends TorrowItemCoreFacade<LoyaltyCardItem, L
40224
40334
  getSubscriptionTransactions(torrowId: string, subscriptionId: string, query?: LoyaltyTransactionsQuery, options?: {
40225
40335
  signal?: AbortSignal;
40226
40336
  }): Promise<AccountingTransaction[]>;
40227
- /** `PUT /api/v1/loyaltycards/{torrowId}` */
40228
- update(body: LoyaltyCardItemForCreateOrUpdate, torrowId: string, options?: {
40337
+ /** `PUT /api/v1/loyaltycards/{body.id}` */
40338
+ update(body: LoyaltyCardItemForCreateOrUpdate, options?: {
40229
40339
  checkVersion?: boolean | null;
40230
40340
  isNeedAnnouncement?: boolean | null;
40231
40341
  signal?: AbortSignal;
@@ -40602,8 +40712,8 @@ declare class IntegrationsFacade {
40602
40712
  create(body: Integration, options?: {
40603
40713
  signal?: AbortSignal;
40604
40714
  }): Promise<Integration>;
40605
- /** `PUT /api/v1/integrations/{torrowId}` */
40606
- update(body: Integration, torrowId: string, options?: {
40715
+ /** `PUT /api/v1/integrations/{body.id}` */
40716
+ update(body: Integration, options?: {
40607
40717
  checkVersion?: boolean | null;
40608
40718
  signal?: AbortSignal;
40609
40719
  }): Promise<Integration>;
@@ -40718,7 +40828,7 @@ declare class ItemFacade {
40718
40828
  isNeedAnnouncement?: boolean | null;
40719
40829
  signal?: AbortSignal;
40720
40830
  }): Promise<Feedback>;
40721
- /** `GET /api/v1/item/{torrowId}/feedbacks/{messageId}/replies` */
40831
+ /** `GET /api/v1/item/{torrowId}/feedbacks/{messageId}/replies` — массив **`Feedback`** (не `ItemFeedback`). */
40722
40832
  listFeedbackReplies(torrowId: string, messageId: string, options?: {
40723
40833
  createDateFrom?: Date | null;
40724
40834
  createDateTo?: Date | null;
@@ -40730,7 +40840,7 @@ declare class ItemFacade {
40730
40840
  includeDeleted?: boolean | null;
40731
40841
  sort?: ItemViewSortCondition | null;
40732
40842
  signal?: AbortSignal;
40733
- }): Promise<ItemFeedback[]>;
40843
+ }): Promise<Feedback[]>;
40734
40844
  }
40735
40845
 
40736
40846
  /**
@@ -40858,6 +40968,7 @@ declare class TorrowHttpError extends Error {
40858
40968
  readonly status: number;
40859
40969
  readonly body: unknown;
40860
40970
  readonly apiErrorName?: string;
40971
+ /** Код ошибки API строкой: числовой `TorrowErrorClient.code` приводится к строке (`"311293"`). */
40861
40972
  readonly code?: string;
40862
40973
  readonly requestId?: string;
40863
40974
  /**
@@ -41010,9 +41121,86 @@ declare const UserAccessLevelValues: {
41010
41121
  readonly Unauthenticated: "Unauthenticated";
41011
41122
  };
41012
41123
 
41124
+ /**
41125
+ * Brand id for messenger / known-website icons.
41126
+ * SVG map: optional package `@torrow/sdk-brand-assets` (`brandIconUrl`).
41127
+ * Revisit only if a dedicated UI-kit package appears.
41128
+ */
41129
+ type CommunicationBrandId = "telegram" | "whatsapp" | "viber" | "skype" | "max" | "youtube" | "vkontakte" | "facebook" | "odnoklassniki" | "twitter" | "linkedin" | "instagram" | "zoom";
41130
+ /** Canonical deep-link / mailto / tel URL for a communication channel. */
41131
+ declare function communicationHref(comm: Pick<Communication, "type" | "value" | "valueForSearch">): string | null;
41132
+ /** Brand for messenger / known-website icons; `null` → generic UI icon. */
41133
+ declare function resolveCommunicationBrand(comm: Pick<Communication, "type" | "value">): CommunicationBrandId | null;
41134
+
41013
41135
  declare function getTorrowItemTypeFromTorrowId(torrowId: string): TorrowItemType;
41014
41136
  declare function getTorrowItemTypeFromTorrowIds(torrowIds: readonly string[]): TorrowItemType;
41015
41137
 
41138
+ declare const ServiceType: {
41139
+ readonly Appeal: "Appeal";
41140
+ readonly RegisterOnTime: "RegisterOnTime";
41141
+ readonly OrderOnTime: "OrderOnTime";
41142
+ readonly Rent: "Rent";
41143
+ readonly AutoRent: "AutoRent";
41144
+ readonly Custom: "Custom";
41145
+ };
41146
+ type ServiceType = (typeof ServiceType)[keyof typeof ServiceType];
41147
+ type KnownServiceType = Exclude<ServiceType, typeof ServiceType.Custom>;
41148
+ /** @deprecated Используйте `ServiceType`; этот объект сохранён для совместимости. */
41149
+ declare const ServiceTypePresetValues: {
41150
+ readonly Appeal: "Appeal";
41151
+ readonly RegisterOnTime: "RegisterOnTime";
41152
+ readonly OrderOnTime: "OrderOnTime";
41153
+ readonly Rent: "Rent";
41154
+ readonly AutoRent: "AutoRent";
41155
+ };
41156
+ /** @deprecated Используйте `KnownServiceType`. */
41157
+ type ServiceTypePreset = KnownServiceType;
41158
+ type ServiceSessionDurationOptions = Omit<SessionDurationProperties, "sessionDurationType" | "timeSelectionType" | "stateManagementType">;
41159
+ /**
41160
+ * Собирает согласованные параметры длительности по подтверждённому бизнес-типу услуги.
41161
+ * Опции дополняют preset, но не могут переопределить три поля, определяющие тип.
41162
+ */
41163
+ declare function createServiceSessionDurationProperties(type: KnownServiceType, options?: ServiceSessionDurationOptions): SessionDurationProperties;
41164
+ /** Определяет бизнес-тип по трём полям, которыми он представлен в REST-модели. */
41165
+ declare function getServiceTypeFromSessionDurationProperties(properties: SessionDurationProperties | null | undefined): ServiceType;
41166
+ /** Определяет бизнес-тип услуги без изменения исходных данных. */
41167
+ declare function getServiceType(service: {
41168
+ sessionDurationProperties?: SessionDurationProperties | null;
41169
+ }): ServiceType;
41170
+
41171
+ /** Генерирует 24-символьный hex id ресурсной группы без Node-only API. */
41172
+ declare function generateServiceResourceGroupId(): string;
41173
+ /**
41174
+ * Локально собирает тело услуги. Builder не выполняет HTTP и не сохраняет серверное состояние;
41175
+ * несколько изменений следует передать одним вызовом `services.create` или `services.update`.
41176
+ */
41177
+ declare class ServiceBuilder {
41178
+ private draft;
41179
+ private readonly addedGroups;
41180
+ private constructor();
41181
+ static create(body: ServiceItemForCreateOrUpdate): ServiceBuilder;
41182
+ static from(service: ServiceItem): ServiceBuilder;
41183
+ withType(type: KnownServiceType, options?: ServiceSessionDurationOptions): this;
41184
+ withSessionDurationProperties(properties: SessionDurationProperties): this;
41185
+ addResourceStep(input: AddServiceResourceStepInput): this;
41186
+ /** Добавляет платёжную группу без ресурсного шага; шаг оплаты добавляется отдельно. */
41187
+ addPaymentGroup(input: AddServicePaymentGroupInput): this;
41188
+ /** Заменяет список ресурсов существующей группы, например после создания платёжного ресурса. */
41189
+ setResourceGroupResourceIds(resourceGroupId: string, resourceIds: readonly string[]): this;
41190
+ addTimeStep(options?: {
41191
+ stepOrder?: number;
41192
+ }): this;
41193
+ addPaymentStep(options?: {
41194
+ stepOrder?: number;
41195
+ }): this;
41196
+ build(): ServiceBuildResult;
41197
+ private addSingletonStep;
41198
+ private addResourceGroup;
41199
+ private insertStep;
41200
+ private normalizeAndSyncOrders;
41201
+ private validateConfiguration;
41202
+ }
41203
+
41016
41204
  /**
41017
41205
  * Совпадает с `ServiceCheckInWizardStepType` в **torrow-apps** (`libs/domain-models`).
41018
41206
  * `stepType` в `StepDescription` приходит как **число** из API.
@@ -41033,8 +41221,14 @@ declare const ServiceCheckInWizardStepParameterName: {
41033
41221
  readonly ResourceGroupId: "ResourceGroupId";
41034
41222
  readonly AutoChoiceResource: "AutoChoiceResource";
41035
41223
  };
41036
- /** Режим UI выбора времени (как в `RegisterCheckInToTimeProcessHelper.getStepListByStepDescription`, ветка Time). */
41037
- type TimeStepUiMode = "selectDate" | "selectDateRange" | "selectTimeBegin" | "selectTime";
41224
+ /** Режимы UI выбора времени (как в `RegisterCheckInToTimeProcessHelper`, ветка Time). */
41225
+ declare const TimeStepUiModeValues: {
41226
+ readonly SelectDate: "selectDate";
41227
+ readonly SelectDateRange: "selectDateRange";
41228
+ readonly SelectTimeBegin: "selectTimeBegin";
41229
+ readonly SelectTime: "selectTime";
41230
+ };
41231
+ type TimeStepUiMode = (typeof TimeStepUiModeValues)[keyof typeof TimeStepUiModeValues];
41038
41232
  declare function sortStepDescriptionsByOrder(list: ServiceItem["stepDescriptionList"]): StepDescription[];
41039
41233
  declare function getStepParameter(step: StepDescription, parameterName: string): string | undefined;
41040
41234
  declare function getResourceGroupIdFromStep(step: StepDescription): string | undefined;
@@ -41081,6 +41275,26 @@ type BookingWizardExpandedStep = {
41081
41275
  */
41082
41276
  declare function expandBookingWizardSteps(service: ServiceItem): BookingWizardExpandedStep[];
41083
41277
 
41278
+ type FreeCheckInSlot = WorkloadPeriod & {
41279
+ from: Date;
41280
+ to: Date;
41281
+ };
41282
+ /** Проверяет, что период из ответа `FreeTimeSlots` пригоден для выбора пользователем. */
41283
+ declare function isFreeCheckInSlot(period: WorkloadPeriod): period is FreeCheckInSlot;
41284
+ /** Возвращает полные свободные интервалы без изменения ответа сервера. */
41285
+ declare function getFreeCheckInSlots(response: GetCheckInScheduleResp | null | undefined): FreeCheckInSlot[];
41286
+
41287
+ declare const ServiceOrderConflictErrorNameValues: {
41288
+ readonly ResourceUnavailable: "REQUESTED_RESOURCE_IS_NOT_AVAILABLE";
41289
+ readonly QuantityUnavailable: "REQUESTED_RESOURCE_QUANTITY_IS_NOT_AVAILABLE";
41290
+ readonly ServiceUnavailableAtTime: "SERVICE_IS_NOT_AVAILABLE_AT_TIME";
41291
+ };
41292
+ type ServiceOrderConflictReason = "resource-unavailable" | "quantity-unavailable" | "service-unavailable-at-time";
41293
+ /** Преобразует серверное имя business-конфликта заказа в стабильную причину для приложения. */
41294
+ declare function getServiceOrderConflictReason(error: unknown): ServiceOrderConflictReason | undefined;
41295
+ /** Отличает известный конфликт доступности заказа от остальных HTTP-ошибок. */
41296
+ declare function isServiceOrderConflictError(error: unknown): error is TorrowHttpError;
41297
+
41084
41298
  /**
41085
41299
  * Как в **torrow-apps** `PaymentProcessState.normalizePaymentUrl`: если в ответе нет схемы,
41086
41300
  * подставить `https://` (частые относительные/безсхемные URL от провайдера).
@@ -41095,4 +41309,21 @@ declare function getTicketPaymentUrlRaw(caseItem: CaseItem | undefined | null):
41095
41309
  */
41096
41310
  declare function getTicketPaymentUrl(caseItem: CaseItem | undefined | null): string | undefined;
41097
41311
 
41098
- export { type Account, type AccountType, AccountTypeValueList, AccountTypeValues, type AccountingTransaction, type AccountingTransactionState, AccountingTransactionsFacade, type AccountingTransactionsListQuery, ActionHistoryFacade, type ActionHistoryInfo, type ActionHistoryListQuery, type ActionHistoryState, type ActionHistoryType, type ActivityStatus, type AddExternalAuthReq, type AddExternalAuthResp, type AddProfileResp, type AdvisedItemsSearchQuery, type AnnouncementInfo, type AnnouncementState, AnnouncementsFacade, type AnnouncementsListQuery, type AnyoneAccess, AnyoneAccessValues, type ApiKeyInfo, ApiKeysFacade, type ApproveCaseParticipationReq, type AuthCaptchaType, AuthCaptchaTypeValueList, AuthCaptchaTypeValues, AuthFacade, type AuthIdentityBasic, type AuthScope, AuthScopeValueList, AuthScopeValues, type AvailabilityTime, type BalanceValue, type BaseItemProperties, type BlockReason, type BlockReasonListQuery, BlockReasonsFacade, type BlockSettings, type BookResourcesForMeReq, type BookResourcesForOthersReq, type BookingWizardExpandedStep, type BuildContextIconSvgOptions, type CalendarItem, type CalendarItemForCreateOrUpdate, type CalendarView, CalendarsFacade, type CancelCaseParticipationReq, type CaseItem, type CaseItemForCreateOrUpdate, type CaseParticipant, type CaseParticipantFields, type CaseParticipantType, type CaseParticipantView, type CaseParticipantsCountQuery, type CaseParticipantsListQuery, type CaseReportProperties, type CaseState, CaseStateValues, type CaseType, CaseTypeValues, type CaseView, CasesFacade, type CellValueType, CellValueTypeValues, type ChangeMoneyReceiveReq, type ChangeOrderServiceReq, type CheckInProps, type CheckInReq, type ColumnType, ColumnTypeValues, type Communication, type CommunicationForCreateOrUpdate, type CommunicationType, CommunicationTypeValues, type CompleteAddingAccountReq, type CompleteDeletingUserReq, type CompleteDeletingUserResp, type ContactCaseParticipantsListQuery, type ContactItem, type ContactItemForCreateOrUpdate, type ContactProperties, type ContactSearchQuery, type ContactView, ContactsFacade, type ContextIconPresetValue, ContextIconPresetValues, type ContextItem, type ContextItemForCreateOrUpdate, type ContextView, ContextsFacade, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateAuthSessionReq, type CreateAuthSessionResp, type CreateCaseReq, type CreateLoyaltyCardReq, type CreateLoyaltyCardSubscriptionReq, type CreateOrderReq, DEFAULT_TORROW_API_BASE_URL, DefaultAuthScopes, type DeleteResponse, type DeleteUserAccountReq, type DeleteUserAccountResp, type DeviceInfo, type DeviceSettingsInfo, type DeviceType, DeviceTypeValueList, DeviceTypeValues, type DictionarySortCondition, Discriminator, type DiscriminatorType, type ExcludeFromGroupsReq, type ExcludeResp, type ExportGraph, ExportImportFacade, type ExportRequest, type ExternalAuth, ExternalAuthsFacade, type Feedback, type FeedbackOptions, type FileInfo, type Gender, GenderValues, type GenerateReportReq, type GenerateReportResp, type GenerateSecurityTokenReq, type GenerateSecurityTokenResp, type GetCaseParticipationCountResp, type GetCheckInScheduleReq, type GetCheckInScheduleResp, type GetLoyaltySystemsStatisticsReq, type GetLoyaltySystemsStatisticsResp, type GetReCheckInScheduleReq, type GetServiceWorkloadInfoRequest, type GetServiceWorkloadInfoResp, type GetShareItemSessionReq, type GetTimetableStatisticsRequest, type GetTorrowIdResp, type GroupStatus, type Hobby, HttpClient, type HttpMethod, type HttpRequestInit, IdGeneratorFacade, type ImagePreviewSize, ImagePreviewSizeValues, type ImportByFileRequest, type ImportByUniqueNameRequest, type IncludeExcludeResp, type IncludeForUserReq, type IncludeToGroupsReq, type IncludeToParentReq, type InitAddingAccountReq, type InitAddingAccountResp, type InitDeletingUserResp, type Integration, IntegrationsFacade, ItemFacade, type ItemFeedback, type ItemProperties, type ItemTagsListQuery, type ItemTextSearchQuery, type ItemViewSortConditionDto as ItemViewSortCondition, ItemViewSortConditionValueList, ItemViewSortConditionValues, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type LayoutTypeValue, LayoutTypeValues, type LoyaltyCardFilterCondition, type LoyaltyCardIssueType, LoyaltyCardIssueTypeValues, type LoyaltyCardItem, type LoyaltyCardItemForCreateOrUpdate, type LoyaltyParticipantsQuery as LoyaltyCardParticipantsQuery, type Participation as LoyaltyCardParticipation, type ParticipationResp as LoyaltyCardParticipationResp, type SendLinkOfItemReq as LoyaltyCardSendLinkReq, type SendLinkOfItemResp as LoyaltyCardSendLinkResp, type ShareItemReq as LoyaltyCardShareReq, type LoyaltyCardSortCondition, LoyaltyCardSortConditionValues, type LoyaltyCardSubscription, type LoyaltyCardUpdateKeyInformation, LoyaltyCardUpdateKeyInformationValues, type LoyaltyCardUpdateNonKeyInformation, LoyaltyCardUpdateNonKeyInformationValues, type LoyaltyCardView, LoyaltyCardsFacade, type LoyaltyGroupListQuery, type LoyaltyPersonalListQuery, type LoyaltySystemItem, type LoyaltySystemItemForCreateOrUpdate, type LoyaltyParticipantsQuery as LoyaltySystemParticipantsQuery, type Participation as LoyaltySystemParticipation, type ParticipationResp as LoyaltySystemParticipationResp, type LoyaltySystemPersonalListQuery, type SendLinkOfItemReq as LoyaltySystemSendLinkReq, type SendLinkOfItemResp as LoyaltySystemSendLinkResp, type ShareItemReq as LoyaltySystemShareReq, type LoyaltySystemView, LoyaltySystemsFacade, type LoyaltySystemsStatisticsResp, type LoyaltyTransactionsQuery, type ManagedSolutionData, type Metrics, type NoteItem, type NoteItemForCreateOrUpdate, type NoteType, NoteTypeValues, type NoteView, NotesFacade, type NotificationWay, type OrderFilter, type OrderResp, type OrderSearchQuery, type ParticipantStateDto as ParticipantState, type ParticipantTypeDto as ParticipantType, type ParticipantView, type Participation, type ParticipationFieldRequirementType, ParticipationFieldRequirementTypeValues, type ParticipationFieldType, ParticipationFieldTypeValues, type ParticipationResp, type PatchCaseReq, type PersonalListQuery, type PersonalReminder, type PersonalSolutionData, type PickOrderReq, type PickOrderResp, PinnedViewsFacade, type Place, type ProfileListResp, type ProfileProperties, ProfilesFacade, type PublicityType, type PutUrlResp, RawClient, type RawRequestOptions, type RefreshReq, type RegisterUserForAccountResp, type RegistrationUserInfo, RelationsFacade, type RemoveProfileResp, type ReportOptions, type ReportProperties, type ReportPropertiesBase, ReportsFacade, type ResolvedTorrowClientConfig, type ResourceItem, type ResourceBehaviorSettings as ResourceItemBehaviorSettings, type ResourceItemForCreateOrUpdate, type ResourceMindMapView, type ResourceReportProperties, type ResourceView, ResourcesFacade, type ResourcesFilterOptions, type ResourcesRentReportProperties, type ReturnOrderReq, type ReturnOrderResp, type RevokeReq, type SaveItemToMindMapReq, SearchFacade, type SearchLoyaltyCardsReq, type SearchServiceResourcesReq, type SearchServiceResourcesResp, type SendCodeAccountType, SendCodeAccountTypeValueList, SendCodeAccountTypeValues, type SendCodeReq, type SendCodeReqForOtp, type SendCodeResp, type SendCommunicationCodeReq, type SendCommunicationCodeResp, type ServiceBehaviorSettings, ServiceCheckInWizardStepParameterName, ServiceCheckInWizardStepType, type ServiceItem, type ServiceItemForCreateOrUpdate, type ServiceReportProperties, type ServiceView, ServicesFacade, type ServicesResourcesReportProperties, type SessionDurationProperties, type SessionDurationType, SessionDurationTypeValues, type SessionPrecisionType, SessionPrecisionTypeValues, type ShareItemReq, ShortUrlFacade, type SolutionData, type Filter as SolutionDataFilter, type StateManagementType, StateManagementTypeValues, type StepDescription, type DictionarySortCondition as ThesaurusDictionarySortCondition, ThesaurusFacade, type TimePeriod, type TimeSelectionType, TimeSelectionTypeValues, type TimeSplitType, TimeSplitTypeValues, type TimeStepUiMode, type TimetableCase, type TimetableDetailsVisibility, type TimetableFilter, type TimetableQueryOptions, type TimetableStatisticsResp, type TimetableViewTypeValue, TimetableViewTypeValues, type TokenReq, type TokenResp, type TokenStatus, TokenStatusValueList, TokenStatusValues, TorrowClient, type TorrowClientConfig, TorrowHttpError, TorrowIdError, type TorrowIdErrorReason, type TorrowItem, type TorrowItemForCreateOrUpdate, type TorrowItemFromDto, type TorrowItemType, TorrowItemTypeValueList, TorrowItemTypeValues, type TorrowItemView, type TorrowItemViewByTypeMap, type TorrowObject, type TorrowObjectType, TorrowObjectTypeCode, type TorrowObjectTypeCodeValue, type TorrowOptions, type UnpackedTorrowId, type UpdateAnnouncementStateReq, type UpdateContactPropertiesResp, type UpdateFileIdResp, type UpdateMasterInfoReq, type UpdateOrderInfoReq, type UpdateOrderReq, type UpdatePersonalListOrderReq, type UpdatePersonalListOrderResp, type UpdateProfilePropertiesResp, type UsageType, UsageTypeValues, type UserAccessLevel, UserAccessLevelValues, type UserAccountsQuery, type UserCalendar, type UserDeliveryWay, UserFacade, type UserFeedback, type UserProfileItemForAdd, UserSettingsFacade, type UserSettingsInfo, type UserTimetableQuery, UserViewsFacade, type VerificationMethod, VerificationMethodValueList, VerificationMethodValues, type VerifyCommunicationCodeReq, type VerifyCommunicationCodeResp, type ViewBlockSettings, type ViewInfo, type ViewListQuery, type ViewListRootQuery, type ViewOrderInput, ViewsFacade, type WorkloadPeriod, buildContextIconSvg, buildContextIconSvgBytes, type components, expandBookingWizardSteps, generateTorrowId, generateTorrowIdForOwner, getContextIconPresetFileName, getResourceGroupIdFromStep, getShardFromTorrowId, getStepParameter, getTicketPaymentUrl, getTicketPaymentUrlRaw, getTimeStepUiMode, getTorrowItemTypeFromTorrowId, getTorrowItemTypeFromTorrowIds, getTorrowObjectTypeFromTorrowId, isAccountType, isAuthCaptchaType, isAuthScope, isContextIconPreset, isDeviceType, isItemViewSortCondition, isSendCodeAccountType, isStepFlag, isTokenRespReadyStatus, isTokenStatus, isTorrowItemType, isVerificationMethod, normalizePaymentUrl, packTorrowId, parseAccountType, parseAuthCaptchaType, parseAuthScope, parseContextIconPresetFromImage, parseDeviceType, parseSendCodeAccountType, parseTokenStatus, parseVerificationMethod, type paths, shouldSkipResourceStep, sortStepDescriptionsByOrder, torrowObjectTypeToCode, unpackTorrowId };
41312
+ /**
41313
+ * Локально собирает тело ресурса и его связи с услугами.
41314
+ * Builder не выполняет HTTP; результат сохраняется обычным `resourceItems.create` или `update`.
41315
+ */
41316
+ declare class ResourceBuilder {
41317
+ private draft;
41318
+ private constructor();
41319
+ static create(body: ResourceItemForCreateOrUpdate): ResourceBuilder;
41320
+ static from(resource: ResourceItem): ResourceBuilder;
41321
+ attachToService(service: ServiceItem, resourceGroupId: string, options?: ResourceServiceBindingOptions): this;
41322
+ detachFromService(serviceId: string, resourceGroupId: string): this;
41323
+ /** Задаёт зависимость или исключение ресурса по id ранее выбранных ресурсов. */
41324
+ setUsageCondition(type: ResourceUsageConditionType, conditionIds: readonly string[]): this;
41325
+ clearUsageCondition(): this;
41326
+ build(): ResourceBuildResult;
41327
+ }
41328
+
41329
+ export { type Account, type AccountType, AccountTypeValueList, AccountTypeValues, type AccountingTransaction, type AccountingTransactionState, AccountingTransactionsFacade, type AccountingTransactionsListQuery, ActionHistoryFacade, type ActionHistoryInfo, type ActionHistoryListQuery, type ActionHistoryState, type ActionHistoryType, type ActivityStatus, type AddExternalAuthReq, type AddExternalAuthResp, type AddProfileResp, type AddServicePaymentGroupInput, type AddServiceResourceGroupInput, type AddServiceResourceStepInput, type Address, type AdvisedItemsSearchQuery, type AnnouncementInfo, type AnnouncementState, AnnouncementsFacade, type AnnouncementsListQuery, type AnyoneAccess, AnyoneAccessValues, type ApiKeyInfo, ApiKeysFacade, type ApproveCaseParticipationReq, type AuthCaptchaType, AuthCaptchaTypeValueList, AuthCaptchaTypeValues, AuthFacade, type AuthIdentityBasic, type AuthScope, AuthScopeValueList, AuthScopeValues, type AvailabilityTime, type BalanceValue, type BaseItemProperties, type BlockReason, type BlockReasonListQuery, BlockReasonsFacade, type BlockSettings, type BookResourcesForMeReq, type BookResourcesForOthersReq, type BookingProperties, type BookingWizardExpandedStep, type BuildContextIconSvgOptions, type CalendarItem, type CalendarItemForCreateOrUpdate, type CalendarView, CalendarsFacade, type CancelCaseParticipationReq, type CaseItem, type CaseItemForCreateOrUpdate, type CaseParticipant, type CaseParticipantFields, type CaseParticipantType, type CaseParticipantView, type CaseParticipantsCountQuery, type CaseParticipantsListQuery, type CaseReportProperties, type CaseState, CaseStateValues, type CaseType, CaseTypeValues, type CaseView, CasesFacade, type CellValueType, CellValueTypeValues, type ChangeMoneyReceiveReq, type ChangeOrderServiceReq, type CheckInProps, type CheckInReq, type ColumnType, ColumnTypeValues, type Communication, type CommunicationBrandId, type CommunicationForCreateOrUpdate, type CommunicationType, CommunicationTypeValues, type CompleteAddingAccountReq, type CompleteDeletingUserReq, type CompleteDeletingUserResp, type ContactCaseParticipantsListQuery, type ContactItem, type ContactItemForCreateOrUpdate, type ContactPersonalInfo, type ContactProperties, type ContactSearchQuery, type ContactView, type ContactVisitCard, type ContactVisitCardField, ContactsFacade, type ContextIconPresetValue, ContextIconPresetValues, type ContextItem, type ContextItemForCreateOrUpdate, type ContextView, ContextsFacade, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateAuthSessionReq, type CreateAuthSessionResp, type CreateCaseReq, type CreateLoyaltyCardReq, type CreateLoyaltyCardSubscriptionReq, type CreateOrderReq, DEFAULT_TORROW_API_BASE_URL, DefaultAuthScopes, type DeleteResponse, type DeleteUserAccountReq, type DeleteUserAccountResp, type DeviceInfo, type DeviceSettingsInfo, type DeviceType, DeviceTypeValueList, DeviceTypeValues, type DictionarySortCondition, Discriminator, type DiscriminatorType, type ExcludeFromGroupsReq, type ExcludeResp, type ExportGraph, ExportImportFacade, type ExportRequest, type ExternalAuth, ExternalAuthsFacade, type Feedback, type FeedbackOptions, type FileInfo, type FreeCheckInSlot, type Gender, GenderValues, type GenerateReportReq, type GenerateReportResp, type GenerateSecurityTokenReq, type GenerateSecurityTokenResp, type GetCaseOptions, type GetCaseParticipationCountResp, type GetCheckInScheduleReq, type GetCheckInScheduleResp, type GetLoyaltySystemsStatisticsReq, type GetLoyaltySystemsStatisticsResp, type GetReCheckInScheduleReq, type GetServiceOptions, type GetServiceWorkloadInfoRequest, type GetServiceWorkloadInfoResp, type GetShareItemSessionReq, type GetTimetableStatisticsRequest, type GetTorrowIdResp, type GroupStatus, type Hobby, HttpClient, type HttpMethod, type HttpRequestInit, IdGeneratorFacade, type ImagePreviewSize, ImagePreviewSizeValues, type ImportByFileRequest, type ImportByUniqueNameRequest, type IncludeExcludeResp, type IncludeForUserReq, type IncludeToGroupsReq, type IncludeToParentReq, type InitAddingAccountReq, type InitAddingAccountResp, type InitDeletingUserResp, type Integration, IntegrationsFacade, ItemFacade, type ItemFeedback, type ItemProperties, type ItemTagsListQuery, type ItemTextSearchQuery, type ItemViewSortConditionDto as ItemViewSortCondition, ItemViewSortConditionValueList, ItemViewSortConditionValues, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type KnownServiceType, type LayoutTypeValue, LayoutTypeValues, type LoyaltyCardFilterCondition, type LoyaltyCardIssueType, LoyaltyCardIssueTypeValues, type LoyaltyCardItem, type LoyaltyCardItemForCreateOrUpdate, type LoyaltyParticipantsQuery as LoyaltyCardParticipantsQuery, type Participation as LoyaltyCardParticipation, type ParticipationResp as LoyaltyCardParticipationResp, type SendLinkOfItemReq as LoyaltyCardSendLinkReq, type SendLinkOfItemResp as LoyaltyCardSendLinkResp, type ShareItemReq as LoyaltyCardShareReq, type LoyaltyCardSortCondition, LoyaltyCardSortConditionValues, type LoyaltyCardSubscription, type LoyaltyCardUpdateKeyInformation, LoyaltyCardUpdateKeyInformationValues, type LoyaltyCardUpdateNonKeyInformation, LoyaltyCardUpdateNonKeyInformationValues, type LoyaltyCardView, LoyaltyCardsFacade, type LoyaltyGroupListQuery, type LoyaltyPersonalListQuery, type LoyaltySystemItem, type LoyaltySystemItemForCreateOrUpdate, type LoyaltyParticipantsQuery as LoyaltySystemParticipantsQuery, type Participation as LoyaltySystemParticipation, type ParticipationResp as LoyaltySystemParticipationResp, type LoyaltySystemPersonalListQuery, type SendLinkOfItemReq as LoyaltySystemSendLinkReq, type SendLinkOfItemResp as LoyaltySystemSendLinkResp, type ShareItemReq as LoyaltySystemShareReq, type LoyaltySystemView, LoyaltySystemsFacade, type LoyaltySystemsStatisticsResp, type LoyaltyTransactionsQuery, type ManagedSolutionData, type MemorableDate, type Metrics, type NoteItem, type NoteItemForCreateOrUpdate, type NoteType, NoteTypeValues, type NoteView, NotesFacade, type NotificationWay, type OrderFilter, type OrderResp, type OrderSearchQuery, type ParticipantStateDto as ParticipantState, type ParticipantTypeDto as ParticipantType, type ParticipantView, type Participation, type ParticipationFieldRequirementType, ParticipationFieldRequirementTypeValues, type ParticipationFieldType, ParticipationFieldTypeValues, type ParticipationResp, type PatchCaseReq, type PersonalListQuery, type PersonalReminder, type PersonalSolutionData, type PickOrderReq, type PickOrderResp, PinnedViewsFacade, type Place, type ProfileListResp, type ProfileProperties, type ProfileType, ProfileTypeValues, ProfilesFacade, type PublicityType, type PutUrlResp, type Rating, RawClient, type RawRequestOptions, type RefreshReq, type RegisterInfo, type RegisterUserForAccountResp, type RegistrationUserInfo, RelationsFacade, type RemoveProfileResp, type ReportOptions, type ReportProperties, type ReportPropertiesBase, ReportsFacade, type ResolvedTorrowClientConfig, type ResourceBuildResult, ResourceBuilder, type ResourceGroup, type ResourceItem, type ResourceBehaviorSettings as ResourceItemBehaviorSettings, type ResourceItemForCreateOrUpdate, type ResourceMindMapView, type ResourceReportProperties, type ResourceServiceBindingOptions, type ResourceUsageConditionType, type ResourceView, ResourcesFacade, type ResourcesFilterOptions, type ResourcesRentReportProperties, type ReturnOrderReq, type ReturnOrderResp, type RevokeReq, type SaveItemToMindMapReq, SearchFacade, type SearchLoyaltyCardsReq, type SearchServiceResourcesReq, type SearchServiceResourcesResp, type SendCodeAccountType, SendCodeAccountTypeValueList, SendCodeAccountTypeValues, type SendCodeReq, type SendCodeReqForOtp, type SendCodeResp, type SendCommunicationCodeReq, type SendCommunicationCodeResp, type ServiceBehaviorSettings, type ServiceBuildResult, ServiceBuilder, ServiceCheckInWizardStepParameterName, ServiceCheckInWizardStepType, type ServiceDescription, type ServiceItem, type ServiceItemForCreateOrUpdate, ServiceOrderConflictErrorNameValues, type ServiceOrderConflictReason, type ServiceReportProperties, type ServiceResourceStepUsageType, type ServiceSessionDurationOptions, ServiceType, type ServiceTypePreset, ServiceTypePresetValues, type ServiceView, ServicesFacade, type ServicesResourcesReportProperties, type SessionDurationProperties, type SessionDurationType, SessionDurationTypeValues, type SessionPrecisionType, SessionPrecisionTypeValues, type ShareItemReq, ShortUrlFacade, type SolutionData, type Filter as SolutionDataFilter, type StateManagementType, StateManagementTypeValues, type StepDescription, type DictionarySortCondition as ThesaurusDictionarySortCondition, ThesaurusFacade, type TimePeriod, type TimeSelectionType, TimeSelectionTypeValues, type TimeSplitType, TimeSplitTypeValues, type TimeStepUiMode, TimeStepUiModeValues, type TimetableCase, type TimetableDetailsVisibility, type TimetableFilter, type TimetableQueryOptions, type TimetableStatisticsResp, type TimetableViewTypeValue, TimetableViewTypeValues, type TokenReq, type TokenResp, type TokenStatus, TokenStatusValueList, TokenStatusValues, TorrowClient, type TorrowClientConfig, TorrowHttpError, TorrowIdError, type TorrowIdErrorReason, type TorrowItem, type TorrowItemForCreateOrUpdate, type TorrowItemFromDto, type TorrowItemType, TorrowItemTypeValueList, TorrowItemTypeValues, type TorrowItemView, type TorrowItemViewByTypeMap, type TorrowObject, type TorrowObjectType, TorrowObjectTypeCode, type TorrowObjectTypeCodeValue, type TorrowOptions, type UnpackedTorrowId, type UpdateAnnouncementStateReq, type UpdateContactPropertiesResp, type UpdateFileIdResp, type UpdateMasterInfoReq, type UpdateOrderInfoReq, type UpdateOrderReq, type UpdatePersonalListOrderReq, type UpdatePersonalListOrderResp, type UpdateProfilePropertiesResp, type UsageCondition, type UsageConditionType, UsageConditionTypeValues, type UsageType, UsageTypeValues, type UserAccessLevel, UserAccessLevelValues, type UserAccountsQuery, type UserCalendar, type UserDeliveryWay, UserFacade, type UserFeedback, type UserProfileItemForAdd, UserSettingsFacade, type UserSettingsInfo, type UserTimetableQuery, UserViewsFacade, type VerificationMethod, VerificationMethodValueList, VerificationMethodValues, type VerifyCommunicationCodeReq, type VerifyCommunicationCodeResp, type ViewBlockSettings, type ViewInfo, type ViewListQuery, type ViewListRootQuery, type ViewOrderInput, ViewsFacade, type WorkloadPeriod, buildContextIconSvg, buildContextIconSvgBytes, cancelCaseParticipation, communicationHref, type components, createOrder, createServiceSessionDurationProperties, expandBookingWizardSteps, generateServiceResourceGroupId, generateTorrowId, generateTorrowIdForOwner, getCase, getCheckInSchedule, getContextIconPresetFileName, getFreeCheckInSlots, getResourceGroupIdFromStep, getService, getServiceOrderConflictReason, getServiceResources, getServiceType, getServiceTypeFromSessionDurationProperties, getShardFromTorrowId, getStepParameter, getTicketPaymentUrl, getTicketPaymentUrlRaw, getTimeStepUiMode, getTorrowItemTypeFromTorrowId, getTorrowItemTypeFromTorrowIds, getTorrowObjectTypeFromTorrowId, isAccountType, isAuthCaptchaType, isAuthScope, isContextIconPreset, isDeviceType, isFreeCheckInSlot, isItemViewSortCondition, isSendCodeAccountType, isServiceOrderConflictError, isStepFlag, isTokenRespReadyStatus, isTokenStatus, isTorrowItemType, isVerificationMethod, normalizePaymentUrl, packTorrowId, parseAccountType, parseAuthCaptchaType, parseAuthScope, parseContextIconPresetFromImage, parseDeviceType, parseSendCodeAccountType, parseTokenStatus, parseVerificationMethod, type paths, resolveCommunicationBrand, shouldSkipResourceStep, sortStepDescriptionsByOrder, torrowObjectTypeToCode, unpackTorrowId };