@torrow/sdk-client 0.2.0 → 0.3.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 +5 -1
- package/dist/index.d.ts +279 -50
- package/dist/index.js +1093 -341
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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`**
|
|
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;
|
|
@@ -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;
|
|
@@ -38292,6 +38316,8 @@ type ResourceBehaviorSettings = {
|
|
|
38292
38316
|
};
|
|
38293
38317
|
|
|
38294
38318
|
type ServiceItemApi = ServiceItemApiDto;
|
|
38319
|
+
type ResourceGroup = NonNullable<ServiceItemApi["resourceGroupList"]>[number];
|
|
38320
|
+
type BookingProperties = NonNullable<ResourceGroup["bookingProperties"]>;
|
|
38295
38321
|
type CreateOrderReq = CreateOrderReqDto;
|
|
38296
38322
|
type OrderResp = OrderRespDto;
|
|
38297
38323
|
type SearchServiceResourcesReq = SearchServiceResourcesReqDto;
|
|
@@ -38321,6 +38347,30 @@ type ServiceItem = TorrowItemFromDto<ServiceItemApi> & {
|
|
|
38321
38347
|
behaviorSettings?: ServiceBehaviorSettings;
|
|
38322
38348
|
};
|
|
38323
38349
|
type ServiceItemForCreateOrUpdate = TorrowItemForCreateOrUpdate<ServiceItem>;
|
|
38350
|
+
type ServiceResourceStepUsageType = Extract<NonNullable<ResourceGroup["usageType"]>, "Specification" | "Rent" | "Sale">;
|
|
38351
|
+
interface AddServiceResourceGroupInput {
|
|
38352
|
+
key: string;
|
|
38353
|
+
groupId?: string;
|
|
38354
|
+
groupName: string;
|
|
38355
|
+
minResources?: number | null;
|
|
38356
|
+
maxResources?: number | null;
|
|
38357
|
+
maxTotalAmount?: number | null;
|
|
38358
|
+
quickFilterTags?: string[] | null;
|
|
38359
|
+
bookingProperties?: BookingProperties | null;
|
|
38360
|
+
}
|
|
38361
|
+
interface AddServiceResourceStepInput extends AddServiceResourceGroupInput {
|
|
38362
|
+
usageType: ServiceResourceStepUsageType;
|
|
38363
|
+
stepOrder?: number;
|
|
38364
|
+
description?: string | null;
|
|
38365
|
+
autoChoiceResource?: boolean;
|
|
38366
|
+
hiddenStep?: boolean;
|
|
38367
|
+
hideResourceDetail?: boolean;
|
|
38368
|
+
}
|
|
38369
|
+
type AddServicePaymentGroupInput = AddServiceResourceGroupInput;
|
|
38370
|
+
interface ServiceBuildResult {
|
|
38371
|
+
body: ServiceItemForCreateOrUpdate;
|
|
38372
|
+
resourceGroupIds: Record<string, string>;
|
|
38373
|
+
}
|
|
38324
38374
|
type SessionDurationType = NonNullable<SessionDurationProperties["sessionDurationType"]>;
|
|
38325
38375
|
type TimeSelectionType = NonNullable<SessionDurationProperties["timeSelectionType"]>;
|
|
38326
38376
|
type StateManagementType = NonNullable<SessionDurationProperties["stateManagementType"]>;
|
|
@@ -38387,8 +38437,8 @@ declare class CalendarsFacade extends TorrowItemFacade<CalendarItem> {
|
|
|
38387
38437
|
profileId?: string | null;
|
|
38388
38438
|
signal?: AbortSignal;
|
|
38389
38439
|
}): Promise<CalendarItem>;
|
|
38390
|
-
/** `PUT /api/v1/calendars/{
|
|
38391
|
-
update(body: CalendarItemForCreateOrUpdate,
|
|
38440
|
+
/** `PUT /api/v1/calendars/{body.id}` */
|
|
38441
|
+
update(body: CalendarItemForCreateOrUpdate, options?: {
|
|
38392
38442
|
checkVersion?: boolean | null;
|
|
38393
38443
|
isNeedAnnouncement?: boolean | null;
|
|
38394
38444
|
securityToken?: string | null;
|
|
@@ -38492,6 +38542,32 @@ declare const CaseTypeValues: {
|
|
|
38492
38542
|
};
|
|
38493
38543
|
type CaseItemForCreateOrUpdate = TorrowItemForCreateOrUpdate<CaseItem>;
|
|
38494
38544
|
|
|
38545
|
+
/** Опции `GET /api/v1/cases/{torrowId}` — у `getCase` и `CasesFacade.getById`. */
|
|
38546
|
+
interface GetCaseOptions {
|
|
38547
|
+
profileId?: string | null;
|
|
38548
|
+
caseParticipantProfileId?: string | null;
|
|
38549
|
+
versionToCheck?: number | null;
|
|
38550
|
+
includeDeleted?: boolean | null;
|
|
38551
|
+
includeChildTypes?: boolean;
|
|
38552
|
+
/** Гостевой доступ: `OrderResp.consumerSecurityToken`. */
|
|
38553
|
+
securityToken?: string | null;
|
|
38554
|
+
/** Без него гость не получит свою часть: `personalInfo.caseParticipant`, `ticketResource`. */
|
|
38555
|
+
caseParticipantId?: string | null;
|
|
38556
|
+
signal?: AbortSignal;
|
|
38557
|
+
}
|
|
38558
|
+
/** `GET /api/v1/cases/{torrowId}` — событие-заказ; гостю — с `securityToken` и `caseParticipantId`. */
|
|
38559
|
+
declare function getCase(http: HttpClient, torrowId: string, options?: GetCaseOptions): Promise<CaseItem>;
|
|
38560
|
+
/**
|
|
38561
|
+
* Отмена участия — `PUT /api/v1/cases/{torrowId}/caseparticipation/cancelcaseparticipation`.
|
|
38562
|
+
* Гость отменяет свою запись с `{ consumerIdList: [caseParticipantId], securityToken }` — как
|
|
38563
|
+
* «Отменить запись» в приложении. Сроки отмены (`registrationClose`, тег услуги
|
|
38564
|
+
* `<минуты>:DisableCancelMyParticipation`) для гостя сервер сейчас не проверяет (отмена идёт от имени
|
|
38565
|
+
* организатора) — проверяй их в приложении, как `torrow-apps` `CaseItemHelper.canCancelMyCaseParticipation`.
|
|
38566
|
+
*/
|
|
38567
|
+
declare function cancelCaseParticipation(http: HttpClient, torrowId: string, body: CancelCaseParticipationReq, options?: {
|
|
38568
|
+
signal?: AbortSignal;
|
|
38569
|
+
}): Promise<CaseParticipant[]>;
|
|
38570
|
+
|
|
38495
38571
|
/**
|
|
38496
38572
|
* События в продуктовой терминологии (REST **`/api/v1/cases`**, DTO **`CaseItem`**). **Заказ** — событие после записи на услугу (`createOrder`); событие без услуги — **`createWithOptions`** (`PUT` + `CreateCaseReq`) или **`createCaseItem`** (`POST` + `CaseItem`). Для оплаты заказа чаще **`getById`** + токены гостя.
|
|
38497
38573
|
*/
|
|
@@ -38524,8 +38600,8 @@ declare class CasesFacade extends TorrowItemFacade<CaseItem> {
|
|
|
38524
38600
|
caseParticipantType?: CaseParticipantType | null;
|
|
38525
38601
|
signal?: AbortSignal;
|
|
38526
38602
|
}): Promise<CaseItem>;
|
|
38527
|
-
/** `PUT /api/v1/cases/{
|
|
38528
|
-
update(body: CaseItemForCreateOrUpdate,
|
|
38603
|
+
/** `PUT /api/v1/cases/{body.id}` */
|
|
38604
|
+
update(body: CaseItemForCreateOrUpdate, options?: {
|
|
38529
38605
|
profileId?: string | null;
|
|
38530
38606
|
checkVersion?: boolean | null;
|
|
38531
38607
|
isNeedAnnouncement?: boolean | null;
|
|
@@ -38539,16 +38615,7 @@ declare class CasesFacade extends TorrowItemFacade<CaseItem> {
|
|
|
38539
38615
|
withPinnedItems: boolean;
|
|
38540
38616
|
} & TorrowOptions): Promise<number>;
|
|
38541
38617
|
/** `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>;
|
|
38618
|
+
getById(torrowId: string, options?: GetCaseOptions): Promise<CaseItem>;
|
|
38552
38619
|
/** `GET /api/v1/cases/personallist` */
|
|
38553
38620
|
listPersonal(options?: PersonalListQuery & {
|
|
38554
38621
|
signal?: AbortSignal;
|
|
@@ -38707,8 +38774,8 @@ declare class ContactsFacade extends TorrowItemFacade<ContactItem> {
|
|
|
38707
38774
|
signal?: AbortSignal;
|
|
38708
38775
|
}): Promise<ContactItem>;
|
|
38709
38776
|
private withCreateDefaults;
|
|
38710
|
-
/** `PUT /api/v1/contacts/{
|
|
38711
|
-
update(body: ContactItemForCreateOrUpdate,
|
|
38777
|
+
/** `PUT /api/v1/contacts/{body.id}` */
|
|
38778
|
+
update(body: ContactItemForCreateOrUpdate, options?: {
|
|
38712
38779
|
checkVersion?: boolean | null;
|
|
38713
38780
|
isNeedAnnouncement?: boolean | null;
|
|
38714
38781
|
securityToken?: string | null;
|
|
@@ -38780,8 +38847,8 @@ declare class ContextsFacade extends TorrowItemFacade<ContextItem> {
|
|
|
38780
38847
|
profileId?: string | null;
|
|
38781
38848
|
signal?: AbortSignal;
|
|
38782
38849
|
}): Promise<ContextItem>;
|
|
38783
|
-
/** `PUT /api/v1/contexts/{
|
|
38784
|
-
update(body: ContextItemForCreateOrUpdate,
|
|
38850
|
+
/** `PUT /api/v1/contexts/{body.id}` */
|
|
38851
|
+
update(body: ContextItemForCreateOrUpdate, options?: {
|
|
38785
38852
|
checkVersion?: boolean | null;
|
|
38786
38853
|
isNeedAnnouncement?: boolean | null;
|
|
38787
38854
|
signal?: AbortSignal;
|
|
@@ -38817,8 +38884,8 @@ declare class NotesFacade extends TorrowItemFacade<NoteItem> {
|
|
|
38817
38884
|
profileId?: string | null;
|
|
38818
38885
|
signal?: AbortSignal;
|
|
38819
38886
|
}): Promise<NoteItem>;
|
|
38820
|
-
/** `PUT /api/v1/notes/{
|
|
38821
|
-
update(body: NoteItemForCreateOrUpdate,
|
|
38887
|
+
/** `PUT /api/v1/notes/{body.id}` */
|
|
38888
|
+
update(body: NoteItemForCreateOrUpdate, options?: {
|
|
38822
38889
|
checkVersion?: boolean | null;
|
|
38823
38890
|
isNeedAnnouncement?: boolean | null;
|
|
38824
38891
|
signal?: AbortSignal;
|
|
@@ -38917,6 +38984,10 @@ declare class RelationsFacade {
|
|
|
38917
38984
|
}
|
|
38918
38985
|
|
|
38919
38986
|
type ResourceItemApi = ResourceItemApiDto;
|
|
38987
|
+
type ServiceDescription = NonNullable<ResourceItemApi["serviceDescriptions"]>[number];
|
|
38988
|
+
type UsageCondition = NonNullable<ResourceItemApi["usageCondition"]>;
|
|
38989
|
+
type UsageConditionType = NonNullable<UsageCondition["usageConditionType"]>;
|
|
38990
|
+
type ResourceUsageConditionType = Exclude<UsageConditionType, "UnknownUsageConditionType" | "None">;
|
|
38920
38991
|
type WorkloadPeriod = WorkloadPeriodDto;
|
|
38921
38992
|
type PickOrderReq = PickOrderReqDto;
|
|
38922
38993
|
type PickOrderResp = PickOrderRespDto;
|
|
@@ -38934,7 +39005,19 @@ declare const UsageTypeValues: {
|
|
|
38934
39005
|
readonly Payment: "Payment";
|
|
38935
39006
|
readonly Ticket: "Ticket";
|
|
38936
39007
|
};
|
|
39008
|
+
declare const UsageConditionTypeValues: {
|
|
39009
|
+
readonly None: "None";
|
|
39010
|
+
readonly Exclusion: "Exclusion";
|
|
39011
|
+
readonly Additional: "Additional";
|
|
39012
|
+
};
|
|
38937
39013
|
type ResourceItemForCreateOrUpdate = TorrowItemForCreateOrUpdate<ResourceItem>;
|
|
39014
|
+
interface ResourceServiceBindingOptions {
|
|
39015
|
+
usageAmount?: number | null;
|
|
39016
|
+
sortIndex?: number | null;
|
|
39017
|
+
}
|
|
39018
|
+
interface ResourceBuildResult {
|
|
39019
|
+
body: ResourceItemForCreateOrUpdate;
|
|
39020
|
+
}
|
|
38938
39021
|
|
|
38939
39022
|
/**
|
|
38940
39023
|
* CRUD + personal list + социальный слой для **Resource** (`ResourceItem`, путь `/api/v1/resources`).
|
|
@@ -38953,8 +39036,8 @@ declare class ResourcesFacade extends TorrowItemFacade<ResourceItem> {
|
|
|
38953
39036
|
profileId?: string | null;
|
|
38954
39037
|
signal?: AbortSignal;
|
|
38955
39038
|
}): Promise<ResourceItem>;
|
|
38956
|
-
/** `PUT /api/v1/resources/{
|
|
38957
|
-
update(body: ResourceItemForCreateOrUpdate,
|
|
39039
|
+
/** `PUT /api/v1/resources/{body.id}`. Требует непустой `id` в теле ресурса. */
|
|
39040
|
+
update(body: ResourceItemForCreateOrUpdate, options?: {
|
|
38958
39041
|
profileId?: string | null;
|
|
38959
39042
|
checkVersion?: boolean | null;
|
|
38960
39043
|
isNeedAnnouncement?: boolean | null;
|
|
@@ -39032,13 +39115,42 @@ declare class ResourcesFacade extends TorrowItemFacade<ResourceItem> {
|
|
|
39032
39115
|
}): Promise<TimetableStatisticsResp[]>;
|
|
39033
39116
|
}
|
|
39034
39117
|
|
|
39118
|
+
/** Опции `GET /api/v1/services/{torrowId}` — у `getService` и `ServicesFacade.getById`. */
|
|
39119
|
+
interface GetServiceOptions {
|
|
39120
|
+
profileId?: string | null;
|
|
39121
|
+
versionToCheck?: number | null;
|
|
39122
|
+
includeDeleted?: boolean | null;
|
|
39123
|
+
includeChildTypes?: boolean;
|
|
39124
|
+
securityToken?: string | null;
|
|
39125
|
+
signal?: AbortSignal;
|
|
39126
|
+
}
|
|
39127
|
+
/** `GET /api/v1/services/{torrowId}` — услуга с `behaviorSettings`, как `ServicesFacade.getById`. */
|
|
39128
|
+
declare function getService(http: HttpClient, torrowId: string, options?: GetServiceOptions): Promise<ServiceItem>;
|
|
39129
|
+
/** Доступные ресурсы группы для шага «Ресурс» — `POST /api/v1/services/{serviceId}/resources`. */
|
|
39130
|
+
declare function getServiceResources(http: HttpClient, serviceId: string, body: SearchServiceResourcesReq, options?: {
|
|
39131
|
+
signal?: AbortSignal;
|
|
39132
|
+
}): Promise<ResourceView[]>;
|
|
39133
|
+
/**
|
|
39134
|
+
* Расчёт доступности записи — `POST /api/v1/services/{id}/checkinschedule`.
|
|
39135
|
+
* `type: "FreeTimeSlots"` возвращает выбираемые свободные слоты; `AsIs` — исходные периоды нагрузки.
|
|
39136
|
+
*/
|
|
39137
|
+
declare function getCheckInSchedule(http: HttpClient, serviceId: string, body: GetCheckInScheduleReq, options?: {
|
|
39138
|
+
signal?: AbortSignal;
|
|
39139
|
+
}): Promise<GetCheckInScheduleResp>;
|
|
39140
|
+
/**
|
|
39141
|
+
* Заказ услуги (запись) — `POST /api/v1/services/{serviceId}/order`. Тело и отказы —
|
|
39142
|
+
* как у `ServicesFacade.createOrder`; гостю в ответе приходит `consumerSecurityToken`.
|
|
39143
|
+
*/
|
|
39144
|
+
declare function createOrder(http: HttpClient, serviceId: string, body: CreateOrderReq, options?: {
|
|
39145
|
+
signal?: AbortSignal;
|
|
39146
|
+
}): Promise<OrderResp>;
|
|
39147
|
+
|
|
39035
39148
|
/** CRUD, personal list, booking, session/order, и социальный слой для `ServiceItem`. */
|
|
39036
39149
|
declare class ServicesFacade extends TorrowItemFacade<ServiceItem> {
|
|
39037
39150
|
protected readonly itemObjectTypeCode: 1005;
|
|
39038
39151
|
constructor(http: HttpClient);
|
|
39039
39152
|
/** Id услуги до `create` / presigned upload. */
|
|
39040
39153
|
generateServiceId(ownerTorrowId: string): string;
|
|
39041
|
-
private toSdkServiceItem;
|
|
39042
39154
|
private toApiServiceItem;
|
|
39043
39155
|
/** `POST /api/v1/services` */
|
|
39044
39156
|
create(body: ServiceItemForCreateOrUpdate, options?: {
|
|
@@ -39046,8 +39158,8 @@ declare class ServicesFacade extends TorrowItemFacade<ServiceItem> {
|
|
|
39046
39158
|
profileId?: string | null;
|
|
39047
39159
|
signal?: AbortSignal;
|
|
39048
39160
|
}): Promise<ServiceItem>;
|
|
39049
|
-
/** `PUT /api/v1/services/{
|
|
39050
|
-
update(body: ServiceItemForCreateOrUpdate,
|
|
39161
|
+
/** `PUT /api/v1/services/{body.id}` */
|
|
39162
|
+
update(body: ServiceItemForCreateOrUpdate, options?: {
|
|
39051
39163
|
profileId?: string | null;
|
|
39052
39164
|
checkVersion?: boolean | null;
|
|
39053
39165
|
isNeedAnnouncement?: boolean | null;
|
|
@@ -39059,14 +39171,7 @@ declare class ServicesFacade extends TorrowItemFacade<ServiceItem> {
|
|
|
39059
39171
|
withPinnedItems: boolean;
|
|
39060
39172
|
} & TorrowOptions): Promise<number>;
|
|
39061
39173
|
/** `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>;
|
|
39174
|
+
getById(torrowId: string, options?: GetServiceOptions): Promise<ServiceItem>;
|
|
39070
39175
|
/** Внутренний helper: получить типизированные настройки поведения услуги из `service.tags`. */
|
|
39071
39176
|
private getBehaviorSettingsFromService;
|
|
39072
39177
|
/** `GET + parse`: получить сервис и извлечь `ServiceBehaviorSettings`. */
|
|
@@ -39107,8 +39212,8 @@ declare class ServicesFacade extends TorrowItemFacade<ServiceItem> {
|
|
|
39107
39212
|
signal?: AbortSignal;
|
|
39108
39213
|
}): Promise<OrderResp>;
|
|
39109
39214
|
/**
|
|
39110
|
-
*
|
|
39111
|
-
*
|
|
39215
|
+
* События/заказы и занятость услуги — `PUT /api/v1/services/{serviceId}/timetable`.
|
|
39216
|
+
* Не вычисляет свободные слоты записи: для них используй `getCheckInSchedule` с `type: "FreeTimeSlots"`.
|
|
39112
39217
|
*/
|
|
39113
39218
|
getTimetable(serviceId: string, body: TimetableFilter, options?: TimetableQueryOptions & {
|
|
39114
39219
|
signal?: AbortSignal;
|
|
@@ -39124,7 +39229,10 @@ declare class ServicesFacade extends TorrowItemFacade<ServiceItem> {
|
|
|
39124
39229
|
getTimetableStatistics(body: GetTimetableStatisticsRequest, options?: {
|
|
39125
39230
|
signal?: AbortSignal;
|
|
39126
39231
|
}): Promise<TimetableStatisticsResp[]>;
|
|
39127
|
-
/**
|
|
39232
|
+
/**
|
|
39233
|
+
* Расчёт доступности записи — `POST /api/v1/services/{id}/checkinschedule`.
|
|
39234
|
+
* `type: "FreeTimeSlots"` возвращает выбираемые свободные слоты; `AsIs` — исходные периоды нагрузки.
|
|
39235
|
+
*/
|
|
39128
39236
|
getCheckInSchedule(serviceId: string, body: GetCheckInScheduleReq, options?: {
|
|
39129
39237
|
signal?: AbortSignal;
|
|
39130
39238
|
}): Promise<GetCheckInScheduleResp>;
|
|
@@ -39799,8 +39907,8 @@ declare class AccountingTransactionsFacade {
|
|
|
39799
39907
|
securityToken?: string | null;
|
|
39800
39908
|
signal?: AbortSignal;
|
|
39801
39909
|
}): Promise<AccountingTransaction>;
|
|
39802
|
-
/** `PUT /api/v1/accountingtransactions/{
|
|
39803
|
-
update(transaction: AccountingTransaction,
|
|
39910
|
+
/** `PUT /api/v1/accountingtransactions/{transaction.id}` */
|
|
39911
|
+
update(transaction: AccountingTransaction, options?: {
|
|
39804
39912
|
checkVersion?: boolean | null;
|
|
39805
39913
|
isNeedAnnouncement?: boolean | null;
|
|
39806
39914
|
securityToken?: string | null;
|
|
@@ -40126,8 +40234,8 @@ declare class LoyaltySystemsFacade extends TorrowItemCoreFacade<LoyaltySystemIte
|
|
|
40126
40234
|
profileId?: string | null;
|
|
40127
40235
|
signal?: AbortSignal;
|
|
40128
40236
|
}): Promise<LoyaltySystemItem>;
|
|
40129
|
-
/** `PUT /api/v1/loyaltysystems/{
|
|
40130
|
-
update(body: LoyaltySystemItemForCreateOrUpdate,
|
|
40237
|
+
/** `PUT /api/v1/loyaltysystems/{body.id}` */
|
|
40238
|
+
update(body: LoyaltySystemItemForCreateOrUpdate, options?: {
|
|
40131
40239
|
checkVersion?: boolean | null;
|
|
40132
40240
|
isNeedAnnouncement?: boolean | null;
|
|
40133
40241
|
signal?: AbortSignal;
|
|
@@ -40224,8 +40332,8 @@ declare class LoyaltyCardsFacade extends TorrowItemCoreFacade<LoyaltyCardItem, L
|
|
|
40224
40332
|
getSubscriptionTransactions(torrowId: string, subscriptionId: string, query?: LoyaltyTransactionsQuery, options?: {
|
|
40225
40333
|
signal?: AbortSignal;
|
|
40226
40334
|
}): Promise<AccountingTransaction[]>;
|
|
40227
|
-
/** `PUT /api/v1/loyaltycards/{
|
|
40228
|
-
update(body: LoyaltyCardItemForCreateOrUpdate,
|
|
40335
|
+
/** `PUT /api/v1/loyaltycards/{body.id}` */
|
|
40336
|
+
update(body: LoyaltyCardItemForCreateOrUpdate, options?: {
|
|
40229
40337
|
checkVersion?: boolean | null;
|
|
40230
40338
|
isNeedAnnouncement?: boolean | null;
|
|
40231
40339
|
signal?: AbortSignal;
|
|
@@ -40602,8 +40710,8 @@ declare class IntegrationsFacade {
|
|
|
40602
40710
|
create(body: Integration, options?: {
|
|
40603
40711
|
signal?: AbortSignal;
|
|
40604
40712
|
}): Promise<Integration>;
|
|
40605
|
-
/** `PUT /api/v1/integrations/{
|
|
40606
|
-
update(body: Integration,
|
|
40713
|
+
/** `PUT /api/v1/integrations/{body.id}` */
|
|
40714
|
+
update(body: Integration, options?: {
|
|
40607
40715
|
checkVersion?: boolean | null;
|
|
40608
40716
|
signal?: AbortSignal;
|
|
40609
40717
|
}): Promise<Integration>;
|
|
@@ -40718,7 +40826,7 @@ declare class ItemFacade {
|
|
|
40718
40826
|
isNeedAnnouncement?: boolean | null;
|
|
40719
40827
|
signal?: AbortSignal;
|
|
40720
40828
|
}): Promise<Feedback>;
|
|
40721
|
-
/** `GET /api/v1/item/{torrowId}/feedbacks/{messageId}/replies` */
|
|
40829
|
+
/** `GET /api/v1/item/{torrowId}/feedbacks/{messageId}/replies` — массив **`Feedback`** (не `ItemFeedback`). */
|
|
40722
40830
|
listFeedbackReplies(torrowId: string, messageId: string, options?: {
|
|
40723
40831
|
createDateFrom?: Date | null;
|
|
40724
40832
|
createDateTo?: Date | null;
|
|
@@ -40730,7 +40838,7 @@ declare class ItemFacade {
|
|
|
40730
40838
|
includeDeleted?: boolean | null;
|
|
40731
40839
|
sort?: ItemViewSortCondition | null;
|
|
40732
40840
|
signal?: AbortSignal;
|
|
40733
|
-
}): Promise<
|
|
40841
|
+
}): Promise<Feedback[]>;
|
|
40734
40842
|
}
|
|
40735
40843
|
|
|
40736
40844
|
/**
|
|
@@ -40858,6 +40966,7 @@ declare class TorrowHttpError extends Error {
|
|
|
40858
40966
|
readonly status: number;
|
|
40859
40967
|
readonly body: unknown;
|
|
40860
40968
|
readonly apiErrorName?: string;
|
|
40969
|
+
/** Код ошибки API строкой: числовой `TorrowErrorClient.code` приводится к строке (`"311293"`). */
|
|
40861
40970
|
readonly code?: string;
|
|
40862
40971
|
readonly requestId?: string;
|
|
40863
40972
|
/**
|
|
@@ -41010,9 +41119,86 @@ declare const UserAccessLevelValues: {
|
|
|
41010
41119
|
readonly Unauthenticated: "Unauthenticated";
|
|
41011
41120
|
};
|
|
41012
41121
|
|
|
41122
|
+
/**
|
|
41123
|
+
* Brand id for messenger / known-website icons.
|
|
41124
|
+
* SVG map: optional package `@torrow/sdk-brand-assets` (`brandIconUrl`).
|
|
41125
|
+
* Revisit only if a dedicated UI-kit package appears.
|
|
41126
|
+
*/
|
|
41127
|
+
type CommunicationBrandId = "telegram" | "whatsapp" | "viber" | "skype" | "max" | "youtube" | "vkontakte" | "facebook" | "odnoklassniki" | "twitter" | "linkedin" | "instagram" | "zoom";
|
|
41128
|
+
/** Canonical deep-link / mailto / tel URL for a communication channel. */
|
|
41129
|
+
declare function communicationHref(comm: Pick<Communication, "type" | "value" | "valueForSearch">): string | null;
|
|
41130
|
+
/** Brand for messenger / known-website icons; `null` → generic UI icon. */
|
|
41131
|
+
declare function resolveCommunicationBrand(comm: Pick<Communication, "type" | "value">): CommunicationBrandId | null;
|
|
41132
|
+
|
|
41013
41133
|
declare function getTorrowItemTypeFromTorrowId(torrowId: string): TorrowItemType;
|
|
41014
41134
|
declare function getTorrowItemTypeFromTorrowIds(torrowIds: readonly string[]): TorrowItemType;
|
|
41015
41135
|
|
|
41136
|
+
declare const ServiceType: {
|
|
41137
|
+
readonly Appeal: "Appeal";
|
|
41138
|
+
readonly RegisterOnTime: "RegisterOnTime";
|
|
41139
|
+
readonly OrderOnTime: "OrderOnTime";
|
|
41140
|
+
readonly Rent: "Rent";
|
|
41141
|
+
readonly AutoRent: "AutoRent";
|
|
41142
|
+
readonly Custom: "Custom";
|
|
41143
|
+
};
|
|
41144
|
+
type ServiceType = (typeof ServiceType)[keyof typeof ServiceType];
|
|
41145
|
+
type KnownServiceType = Exclude<ServiceType, typeof ServiceType.Custom>;
|
|
41146
|
+
/** @deprecated Используйте `ServiceType`; этот объект сохранён для совместимости. */
|
|
41147
|
+
declare const ServiceTypePresetValues: {
|
|
41148
|
+
readonly Appeal: "Appeal";
|
|
41149
|
+
readonly RegisterOnTime: "RegisterOnTime";
|
|
41150
|
+
readonly OrderOnTime: "OrderOnTime";
|
|
41151
|
+
readonly Rent: "Rent";
|
|
41152
|
+
readonly AutoRent: "AutoRent";
|
|
41153
|
+
};
|
|
41154
|
+
/** @deprecated Используйте `KnownServiceType`. */
|
|
41155
|
+
type ServiceTypePreset = KnownServiceType;
|
|
41156
|
+
type ServiceSessionDurationOptions = Omit<SessionDurationProperties, "sessionDurationType" | "timeSelectionType" | "stateManagementType">;
|
|
41157
|
+
/**
|
|
41158
|
+
* Собирает согласованные параметры длительности по подтверждённому бизнес-типу услуги.
|
|
41159
|
+
* Опции дополняют preset, но не могут переопределить три поля, определяющие тип.
|
|
41160
|
+
*/
|
|
41161
|
+
declare function createServiceSessionDurationProperties(type: KnownServiceType, options?: ServiceSessionDurationOptions): SessionDurationProperties;
|
|
41162
|
+
/** Определяет бизнес-тип по трём полям, которыми он представлен в REST-модели. */
|
|
41163
|
+
declare function getServiceTypeFromSessionDurationProperties(properties: SessionDurationProperties | null | undefined): ServiceType;
|
|
41164
|
+
/** Определяет бизнес-тип услуги без изменения исходных данных. */
|
|
41165
|
+
declare function getServiceType(service: {
|
|
41166
|
+
sessionDurationProperties?: SessionDurationProperties | null;
|
|
41167
|
+
}): ServiceType;
|
|
41168
|
+
|
|
41169
|
+
/** Генерирует 24-символьный hex id ресурсной группы без Node-only API. */
|
|
41170
|
+
declare function generateServiceResourceGroupId(): string;
|
|
41171
|
+
/**
|
|
41172
|
+
* Локально собирает тело услуги. Builder не выполняет HTTP и не сохраняет серверное состояние;
|
|
41173
|
+
* несколько изменений следует передать одним вызовом `services.create` или `services.update`.
|
|
41174
|
+
*/
|
|
41175
|
+
declare class ServiceBuilder {
|
|
41176
|
+
private draft;
|
|
41177
|
+
private readonly addedGroups;
|
|
41178
|
+
private constructor();
|
|
41179
|
+
static create(body: ServiceItemForCreateOrUpdate): ServiceBuilder;
|
|
41180
|
+
static from(service: ServiceItem): ServiceBuilder;
|
|
41181
|
+
withType(type: KnownServiceType, options?: ServiceSessionDurationOptions): this;
|
|
41182
|
+
withSessionDurationProperties(properties: SessionDurationProperties): this;
|
|
41183
|
+
addResourceStep(input: AddServiceResourceStepInput): this;
|
|
41184
|
+
/** Добавляет платёжную группу без ресурсного шага; шаг оплаты добавляется отдельно. */
|
|
41185
|
+
addPaymentGroup(input: AddServicePaymentGroupInput): this;
|
|
41186
|
+
/** Заменяет список ресурсов существующей группы, например после создания платёжного ресурса. */
|
|
41187
|
+
setResourceGroupResourceIds(resourceGroupId: string, resourceIds: readonly string[]): this;
|
|
41188
|
+
addTimeStep(options?: {
|
|
41189
|
+
stepOrder?: number;
|
|
41190
|
+
}): this;
|
|
41191
|
+
addPaymentStep(options?: {
|
|
41192
|
+
stepOrder?: number;
|
|
41193
|
+
}): this;
|
|
41194
|
+
build(): ServiceBuildResult;
|
|
41195
|
+
private addSingletonStep;
|
|
41196
|
+
private addResourceGroup;
|
|
41197
|
+
private insertStep;
|
|
41198
|
+
private normalizeAndSyncOrders;
|
|
41199
|
+
private validateConfiguration;
|
|
41200
|
+
}
|
|
41201
|
+
|
|
41016
41202
|
/**
|
|
41017
41203
|
* Совпадает с `ServiceCheckInWizardStepType` в **torrow-apps** (`libs/domain-models`).
|
|
41018
41204
|
* `stepType` в `StepDescription` приходит как **число** из API.
|
|
@@ -41033,8 +41219,14 @@ declare const ServiceCheckInWizardStepParameterName: {
|
|
|
41033
41219
|
readonly ResourceGroupId: "ResourceGroupId";
|
|
41034
41220
|
readonly AutoChoiceResource: "AutoChoiceResource";
|
|
41035
41221
|
};
|
|
41036
|
-
/**
|
|
41037
|
-
|
|
41222
|
+
/** Режимы UI выбора времени (как в `RegisterCheckInToTimeProcessHelper`, ветка Time). */
|
|
41223
|
+
declare const TimeStepUiModeValues: {
|
|
41224
|
+
readonly SelectDate: "selectDate";
|
|
41225
|
+
readonly SelectDateRange: "selectDateRange";
|
|
41226
|
+
readonly SelectTimeBegin: "selectTimeBegin";
|
|
41227
|
+
readonly SelectTime: "selectTime";
|
|
41228
|
+
};
|
|
41229
|
+
type TimeStepUiMode = (typeof TimeStepUiModeValues)[keyof typeof TimeStepUiModeValues];
|
|
41038
41230
|
declare function sortStepDescriptionsByOrder(list: ServiceItem["stepDescriptionList"]): StepDescription[];
|
|
41039
41231
|
declare function getStepParameter(step: StepDescription, parameterName: string): string | undefined;
|
|
41040
41232
|
declare function getResourceGroupIdFromStep(step: StepDescription): string | undefined;
|
|
@@ -41081,6 +41273,26 @@ type BookingWizardExpandedStep = {
|
|
|
41081
41273
|
*/
|
|
41082
41274
|
declare function expandBookingWizardSteps(service: ServiceItem): BookingWizardExpandedStep[];
|
|
41083
41275
|
|
|
41276
|
+
type FreeCheckInSlot = WorkloadPeriod & {
|
|
41277
|
+
from: Date;
|
|
41278
|
+
to: Date;
|
|
41279
|
+
};
|
|
41280
|
+
/** Проверяет, что период из ответа `FreeTimeSlots` пригоден для выбора пользователем. */
|
|
41281
|
+
declare function isFreeCheckInSlot(period: WorkloadPeriod): period is FreeCheckInSlot;
|
|
41282
|
+
/** Возвращает полные свободные интервалы без изменения ответа сервера. */
|
|
41283
|
+
declare function getFreeCheckInSlots(response: GetCheckInScheduleResp | null | undefined): FreeCheckInSlot[];
|
|
41284
|
+
|
|
41285
|
+
declare const ServiceOrderConflictErrorNameValues: {
|
|
41286
|
+
readonly ResourceUnavailable: "REQUESTED_RESOURCE_IS_NOT_AVAILABLE";
|
|
41287
|
+
readonly QuantityUnavailable: "REQUESTED_RESOURCE_QUANTITY_IS_NOT_AVAILABLE";
|
|
41288
|
+
readonly ServiceUnavailableAtTime: "SERVICE_IS_NOT_AVAILABLE_AT_TIME";
|
|
41289
|
+
};
|
|
41290
|
+
type ServiceOrderConflictReason = "resource-unavailable" | "quantity-unavailable" | "service-unavailable-at-time";
|
|
41291
|
+
/** Преобразует серверное имя business-конфликта заказа в стабильную причину для приложения. */
|
|
41292
|
+
declare function getServiceOrderConflictReason(error: unknown): ServiceOrderConflictReason | undefined;
|
|
41293
|
+
/** Отличает известный конфликт доступности заказа от остальных HTTP-ошибок. */
|
|
41294
|
+
declare function isServiceOrderConflictError(error: unknown): error is TorrowHttpError;
|
|
41295
|
+
|
|
41084
41296
|
/**
|
|
41085
41297
|
* Как в **torrow-apps** `PaymentProcessState.normalizePaymentUrl`: если в ответе нет схемы,
|
|
41086
41298
|
* подставить `https://` (частые относительные/безсхемные URL от провайдера).
|
|
@@ -41095,4 +41307,21 @@ declare function getTicketPaymentUrlRaw(caseItem: CaseItem | undefined | null):
|
|
|
41095
41307
|
*/
|
|
41096
41308
|
declare function getTicketPaymentUrl(caseItem: CaseItem | undefined | null): string | undefined;
|
|
41097
41309
|
|
|
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 };
|
|
41310
|
+
/**
|
|
41311
|
+
* Локально собирает тело ресурса и его связи с услугами.
|
|
41312
|
+
* Builder не выполняет HTTP; результат сохраняется обычным `resourceItems.create` или `update`.
|
|
41313
|
+
*/
|
|
41314
|
+
declare class ResourceBuilder {
|
|
41315
|
+
private draft;
|
|
41316
|
+
private constructor();
|
|
41317
|
+
static create(body: ResourceItemForCreateOrUpdate): ResourceBuilder;
|
|
41318
|
+
static from(resource: ResourceItem): ResourceBuilder;
|
|
41319
|
+
attachToService(service: ServiceItem, resourceGroupId: string, options?: ResourceServiceBindingOptions): this;
|
|
41320
|
+
detachFromService(serviceId: string, resourceGroupId: string): this;
|
|
41321
|
+
/** Задаёт зависимость или исключение ресурса по id ранее выбранных ресурсов. */
|
|
41322
|
+
setUsageCondition(type: ResourceUsageConditionType, conditionIds: readonly string[]): this;
|
|
41323
|
+
clearUsageCondition(): this;
|
|
41324
|
+
build(): ResourceBuildResult;
|
|
41325
|
+
}
|
|
41326
|
+
|
|
41327
|
+
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 };
|