@torrow/sdk-client 0.9.1 → 0.11.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 +32 -0
- package/dist/index.d.ts +553 -35
- package/dist/index.js +2041 -467
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -47,6 +47,7 @@ var TorrowSdkEffectState = /* @__PURE__ */ ((TorrowSdkEffectState2) => {
|
|
|
47
47
|
return TorrowSdkEffectState2;
|
|
48
48
|
})(TorrowSdkEffectState || {});
|
|
49
49
|
var TorrowSdkErrorDomain = /* @__PURE__ */ ((TorrowSdkErrorDomain2) => {
|
|
50
|
+
TorrowSdkErrorDomain2["ItemPatch"] = "ItemPatch";
|
|
50
51
|
TorrowSdkErrorDomain2["BehaviorSettings"] = "BehaviorSettings";
|
|
51
52
|
TorrowSdkErrorDomain2["Otp"] = "Otp";
|
|
52
53
|
TorrowSdkErrorDomain2["AuthSession"] = "AuthSession";
|
|
@@ -68,6 +69,10 @@ var BehaviorSettingsEffectStep = /* @__PURE__ */ ((BehaviorSettingsEffectStep2)
|
|
|
68
69
|
BehaviorSettingsEffectStep2["Write"] = "Write";
|
|
69
70
|
return BehaviorSettingsEffectStep2;
|
|
70
71
|
})(BehaviorSettingsEffectStep || {});
|
|
72
|
+
var ItemPatchEffectStep = /* @__PURE__ */ ((ItemPatchEffectStep2) => {
|
|
73
|
+
ItemPatchEffectStep2["Write"] = "Write";
|
|
74
|
+
return ItemPatchEffectStep2;
|
|
75
|
+
})(ItemPatchEffectStep || {});
|
|
71
76
|
var AuthSessionEffectStep = /* @__PURE__ */ ((AuthSessionEffectStep2) => {
|
|
72
77
|
AuthSessionEffectStep2["CreateAuthSession"] = "CreateAuthSession";
|
|
73
78
|
AuthSessionEffectStep2["CloseSession"] = "CloseSession";
|
|
@@ -84,6 +89,8 @@ var AuthSessionEffectStep = /* @__PURE__ */ ((AuthSessionEffectStep2) => {
|
|
|
84
89
|
var TorrowSdkError = class _TorrowSdkError extends Error {
|
|
85
90
|
/** Общая причина отказа. */
|
|
86
91
|
category;
|
|
92
|
+
/** Пояснение без изменения исходной строки: до 512 UTF-16 единиц, не пустое после trim; иначе undefined. */
|
|
93
|
+
publicMessage;
|
|
87
94
|
/** Безопасные метаданные ответа. */
|
|
88
95
|
http;
|
|
89
96
|
/** Неизменяемое предметное уточнение. */
|
|
@@ -101,19 +108,24 @@ var TorrowSdkError = class _TorrowSdkError extends Error {
|
|
|
101
108
|
super(`Torrow SDK: ${init.category}`);
|
|
102
109
|
this.name = "TorrowSdkError";
|
|
103
110
|
this.category = init.category;
|
|
111
|
+
this.publicMessage = typeof init.publicMessage === "string" && init.publicMessage.length <= 512 && init.publicMessage.trim().length > 0 ? init.publicMessage : void 0;
|
|
104
112
|
this.http = init.http && Object.freeze({ ...init.http });
|
|
105
113
|
this.detail = init.detail && Object.freeze({ ...init.detail });
|
|
106
114
|
this.request = init.request;
|
|
107
115
|
this.operation = init.operation;
|
|
108
116
|
this.failureAt = init.failureAt;
|
|
109
117
|
this.effects = init.effects && Object.freeze(init.effects.map((effect) => Object.freeze({ ...effect })));
|
|
110
|
-
this.#sensitive = Object.freeze({
|
|
118
|
+
this.#sensitive = Object.freeze({
|
|
119
|
+
...init.sensitive,
|
|
120
|
+
cleanup: init.sensitive?.cleanup && Object.freeze({ ...init.sensitive.cleanup })
|
|
121
|
+
});
|
|
111
122
|
Object.freeze(this);
|
|
112
123
|
}
|
|
113
124
|
/** Безопасный снимок для обычной сериализации и диагностики. */
|
|
114
125
|
toJSON() {
|
|
115
126
|
return {
|
|
116
127
|
category: this.category,
|
|
128
|
+
publicMessage: this.publicMessage,
|
|
117
129
|
http: this.http,
|
|
118
130
|
detail: this.detail,
|
|
119
131
|
request: this.request,
|
|
@@ -132,25 +144,29 @@ var TorrowSdkError = class _TorrowSdkError extends Error {
|
|
|
132
144
|
}
|
|
133
145
|
};
|
|
134
146
|
|
|
147
|
+
// ../../src/http/api-error-names.ts
|
|
148
|
+
var ApiErrorNameValues = /* @__PURE__ */ ((ApiErrorNameValues2) => {
|
|
149
|
+
ApiErrorNameValues2["ResourceUnavailable"] = "REQUESTED_RESOURCE_IS_NOT_AVAILABLE";
|
|
150
|
+
ApiErrorNameValues2["QuantityUnavailable"] = "REQUESTED_RESOURCE_QUANTITY_IS_NOT_AVAILABLE";
|
|
151
|
+
ApiErrorNameValues2["ServiceUnavailableAtTime"] = "SERVICE_IS_NOT_AVAILABLE_AT_TIME";
|
|
152
|
+
ApiErrorNameValues2["WrongVersion"] = "OBJECT_HAS_WRONG_VERSION";
|
|
153
|
+
ApiErrorNameValues2["CodeRequestLimit"] = "CODE_REQUEST_LIMIT_EXCEEDED";
|
|
154
|
+
ApiErrorNameValues2["AccessDenied"] = "ACCESS_DENIED";
|
|
155
|
+
ApiErrorNameValues2["UserNoRights"] = "USER_HAVE_NO_RIGHTS_TO_ELEMENTS";
|
|
156
|
+
ApiErrorNameValues2["AuthHeaderMissing"] = "AUTH_HEADER_MISSING";
|
|
157
|
+
ApiErrorNameValues2["WrongSessionCode"] = "WRONG_SESSION_ACCESS_CODE";
|
|
158
|
+
ApiErrorNameValues2["AttemptsExceeded"] = "EXCEEDED_ATTEMPTS_COUNT";
|
|
159
|
+
ApiErrorNameValues2["ItemVersionConflict"] = "ITEM_HAS_DIFFERENT_VERSION";
|
|
160
|
+
return ApiErrorNameValues2;
|
|
161
|
+
})(ApiErrorNameValues || {});
|
|
162
|
+
|
|
135
163
|
// ../../src/http/transport-errors.ts
|
|
136
|
-
var
|
|
137
|
-
KnownApiErrorName2["ResourceUnavailable"] = "REQUESTED_RESOURCE_IS_NOT_AVAILABLE";
|
|
138
|
-
KnownApiErrorName2["QuantityUnavailable"] = "REQUESTED_RESOURCE_QUANTITY_IS_NOT_AVAILABLE";
|
|
139
|
-
KnownApiErrorName2["ServiceUnavailableAtTime"] = "SERVICE_IS_NOT_AVAILABLE_AT_TIME";
|
|
140
|
-
KnownApiErrorName2["WrongVersion"] = "OBJECT_HAS_WRONG_VERSION";
|
|
141
|
-
KnownApiErrorName2["CodeRequestLimit"] = "CODE_REQUEST_LIMIT_EXCEEDED";
|
|
142
|
-
KnownApiErrorName2["AccessDenied"] = "ACCESS_DENIED";
|
|
143
|
-
KnownApiErrorName2["UserNoRights"] = "USER_HAVE_NO_RIGHTS_TO_ELEMENTS";
|
|
144
|
-
KnownApiErrorName2["AuthHeaderMissing"] = "AUTH_HEADER_MISSING";
|
|
145
|
-
KnownApiErrorName2["WrongSessionCode"] = "WRONG_SESSION_ACCESS_CODE";
|
|
146
|
-
KnownApiErrorName2["AttemptsExceeded"] = "EXCEEDED_ATTEMPTS_COUNT";
|
|
147
|
-
return KnownApiErrorName2;
|
|
148
|
-
})(KnownApiErrorName || {});
|
|
164
|
+
var apiErrorNames = new Set(Object.values(ApiErrorNameValues));
|
|
149
165
|
function createHttpError(init) {
|
|
150
166
|
const body = record(init.body);
|
|
151
167
|
const code = body?.code;
|
|
152
168
|
const apiCode = typeof code === "string" ? code : typeof code === "number" && Number.isFinite(code) ? String(code) : void 0;
|
|
153
|
-
const apiName = [body?.error, body?.name].find((value) => typeof value === "string" &&
|
|
169
|
+
const apiName = [body?.error, body?.name].find((value) => typeof value === "string" && apiErrorNames.has(value));
|
|
154
170
|
const nested = record(body?.torrowError) ?? record(body?.torrowErrorClient) ?? record(body?.innerError);
|
|
155
171
|
const trace = body?.traceIdentifier ?? nested?.traceIdentifier;
|
|
156
172
|
const http = {
|
|
@@ -167,7 +183,9 @@ function record(value) {
|
|
|
167
183
|
return value !== null && typeof value === "object" ? value : void 0;
|
|
168
184
|
}
|
|
169
185
|
function normalizeTransportError(cause, request, signal, url, parsing = false) {
|
|
170
|
-
if (cause instanceof TorrowSdkError)
|
|
186
|
+
if (cause instanceof TorrowSdkError) {
|
|
187
|
+
return cause;
|
|
188
|
+
}
|
|
171
189
|
const cancelled = signal?.aborted || record(cause)?.name === "AbortError";
|
|
172
190
|
const category = cancelled ? "Cancelled" /* Cancelled */ : parsing ? "InvalidResponse" /* InvalidResponse */ : request === "Started" /* Started */ && cause instanceof TypeError ? "TransportFailure" /* TransportFailure */ : "Unknown" /* Unknown */;
|
|
173
191
|
return new TorrowSdkError({ category, request, sensitive: { cause, url } });
|
|
@@ -1575,6 +1593,27 @@ var responseDateNodes = [
|
|
|
1575
1593
|
},
|
|
1576
1594
|
{
|
|
1577
1595
|
"ref": 366
|
|
1596
|
+
},
|
|
1597
|
+
{
|
|
1598
|
+
"ref": 355
|
|
1599
|
+
},
|
|
1600
|
+
{
|
|
1601
|
+
"ref": 309
|
|
1602
|
+
},
|
|
1603
|
+
{
|
|
1604
|
+
"ref": 245
|
|
1605
|
+
},
|
|
1606
|
+
{
|
|
1607
|
+
"ref": 94
|
|
1608
|
+
},
|
|
1609
|
+
{
|
|
1610
|
+
"ref": 145
|
|
1611
|
+
},
|
|
1612
|
+
{
|
|
1613
|
+
"ref": 187
|
|
1614
|
+
},
|
|
1615
|
+
{
|
|
1616
|
+
"ref": 81
|
|
1578
1617
|
}
|
|
1579
1618
|
];
|
|
1580
1619
|
var responseDateRoutes = [
|
|
@@ -1697,6 +1736,12 @@ var responseDateRoutes = [
|
|
|
1697
1736
|
"200": 361
|
|
1698
1737
|
}
|
|
1699
1738
|
},
|
|
1739
|
+
{
|
|
1740
|
+
"method": "PUT",
|
|
1741
|
+
"path": "/api/v1/services/workloadinfo",
|
|
1742
|
+
"responses": {},
|
|
1743
|
+
"legacy": true
|
|
1744
|
+
},
|
|
1700
1745
|
{
|
|
1701
1746
|
"method": "POST",
|
|
1702
1747
|
"path": "/api/v1/loyaltysystems/{torrowId}/loyaltycards",
|
|
@@ -1941,6 +1986,55 @@ var responseDateRoutes = [
|
|
|
1941
1986
|
"responses": {
|
|
1942
1987
|
"200": 371
|
|
1943
1988
|
}
|
|
1989
|
+
},
|
|
1990
|
+
{
|
|
1991
|
+
"method": "PUT",
|
|
1992
|
+
"path": "/api/v1/contexts/{torrowId}",
|
|
1993
|
+
"responses": {
|
|
1994
|
+
"200": 373
|
|
1995
|
+
}
|
|
1996
|
+
},
|
|
1997
|
+
{
|
|
1998
|
+
"method": "PUT",
|
|
1999
|
+
"path": "/api/v1/contacts/{torrowId}",
|
|
2000
|
+
"responses": {
|
|
2001
|
+
"200": 374
|
|
2002
|
+
}
|
|
2003
|
+
},
|
|
2004
|
+
{
|
|
2005
|
+
"method": "PUT",
|
|
2006
|
+
"path": "/api/v1/calendars/{torrowId}",
|
|
2007
|
+
"responses": {
|
|
2008
|
+
"200": 375
|
|
2009
|
+
}
|
|
2010
|
+
},
|
|
2011
|
+
{
|
|
2012
|
+
"method": "PUT",
|
|
2013
|
+
"path": "/api/v1/services/{torrowId}",
|
|
2014
|
+
"responses": {
|
|
2015
|
+
"200": 376
|
|
2016
|
+
}
|
|
2017
|
+
},
|
|
2018
|
+
{
|
|
2019
|
+
"method": "PUT",
|
|
2020
|
+
"path": "/api/v1/resources/{torrowId}",
|
|
2021
|
+
"responses": {
|
|
2022
|
+
"200": 377
|
|
2023
|
+
}
|
|
2024
|
+
},
|
|
2025
|
+
{
|
|
2026
|
+
"method": "PUT",
|
|
2027
|
+
"path": "/api/v1/cases/{torrowId}",
|
|
2028
|
+
"responses": {
|
|
2029
|
+
"200": 378
|
|
2030
|
+
}
|
|
2031
|
+
},
|
|
2032
|
+
{
|
|
2033
|
+
"method": "PUT",
|
|
2034
|
+
"path": "/api/v1/loyaltysystems/{torrowId}",
|
|
2035
|
+
"responses": {
|
|
2036
|
+
"200": 379
|
|
2037
|
+
}
|
|
1944
2038
|
}
|
|
1945
2039
|
];
|
|
1946
2040
|
|
|
@@ -1951,10 +2045,22 @@ var routes = responseDateRoutes.map((route) => ({
|
|
|
1951
2045
|
}));
|
|
1952
2046
|
function parseOperationResponse(json, method, path, status) {
|
|
1953
2047
|
const segments = path.split("?")[0].split("/");
|
|
1954
|
-
const route = routes.find(
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
2048
|
+
const route = routes.find(
|
|
2049
|
+
(candidate) => candidate.method === method && candidate.segments.length === segments.length && candidate.segments.every(
|
|
2050
|
+
(segment, i) => segment.startsWith("{") ? segments[i] !== "" : segment === segments[i]
|
|
2051
|
+
)
|
|
2052
|
+
);
|
|
2053
|
+
if (!route || route.legacy) {
|
|
2054
|
+
return parseJsonWithIsoDates(json);
|
|
2055
|
+
}
|
|
2056
|
+
if (json === "") {
|
|
2057
|
+
return void 0;
|
|
2058
|
+
}
|
|
2059
|
+
return reviveDeclaredDates(
|
|
2060
|
+
JSON.parse(json),
|
|
2061
|
+
responseDateNodes,
|
|
2062
|
+
route.responses[String(status)] ?? route.responses["2XX"] ?? 0
|
|
2063
|
+
);
|
|
1958
2064
|
}
|
|
1959
2065
|
function reviveDeclaredDates(value, nodes, root) {
|
|
1960
2066
|
const holder = { value };
|
|
@@ -1962,37 +2068,57 @@ function reviveDeclaredDates(value, nodes, root) {
|
|
|
1962
2068
|
const result = /* @__PURE__ */ new Map();
|
|
1963
2069
|
const current = parent[key];
|
|
1964
2070
|
const node = nodes[id];
|
|
1965
|
-
if (!node || active.has(id) || current == null)
|
|
2071
|
+
if (!node || active.has(id) || current == null) {
|
|
2072
|
+
return result;
|
|
2073
|
+
}
|
|
1966
2074
|
const next = new Set(active).add(id);
|
|
1967
2075
|
const merge = (entries) => entries.forEach((entry, name) => result.set(name, entry));
|
|
1968
2076
|
if (node.date && typeof current === "string") {
|
|
1969
|
-
const
|
|
1970
|
-
if (!Number.isNaN(
|
|
2077
|
+
const date2 = new Date(current);
|
|
2078
|
+
if (!Number.isNaN(date2.getTime())) {
|
|
2079
|
+
result.set(path, { parent, key, date: date2 });
|
|
2080
|
+
}
|
|
2081
|
+
}
|
|
2082
|
+
if (node.ref !== void 0) {
|
|
2083
|
+
merge(collect(parent, key, node.ref, path, next));
|
|
2084
|
+
}
|
|
2085
|
+
for (const child of node.all ?? []) {
|
|
2086
|
+
merge(collect(parent, key, child, path, next));
|
|
1971
2087
|
}
|
|
1972
|
-
if (node.ref !== void 0) merge(collect(parent, key, node.ref, path, next));
|
|
1973
|
-
for (const child of node.all ?? []) merge(collect(parent, key, child, path, next));
|
|
1974
2088
|
for (const union of node.unions ?? []) {
|
|
1975
2089
|
const branches = union.map((child) => collect(parent, key, child, path, next));
|
|
1976
2090
|
for (const [name, candidate] of branches[0] ?? []) {
|
|
1977
|
-
if (branches.every((branch) => branch.has(name)))
|
|
2091
|
+
if (branches.every((branch) => branch.has(name))) {
|
|
2092
|
+
result.set(name, candidate);
|
|
2093
|
+
}
|
|
1978
2094
|
}
|
|
1979
2095
|
}
|
|
1980
2096
|
if (Array.isArray(current) && node.items !== void 0) {
|
|
1981
|
-
current.forEach(
|
|
2097
|
+
current.forEach(
|
|
2098
|
+
(_entry, i) => merge(
|
|
2099
|
+
collect(current, String(i), node.items, `${path}/${i}`, /* @__PURE__ */ new Set())
|
|
2100
|
+
)
|
|
2101
|
+
);
|
|
1982
2102
|
} else if (typeof current === "object" && !Array.isArray(current)) {
|
|
1983
2103
|
for (const [property, child] of Object.entries(node.properties ?? {})) {
|
|
1984
|
-
if (Object.hasOwn(current, property))
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
2104
|
+
if (Object.hasOwn(current, property)) {
|
|
2105
|
+
merge(
|
|
2106
|
+
collect(
|
|
2107
|
+
current,
|
|
2108
|
+
property,
|
|
2109
|
+
child,
|
|
2110
|
+
`${path}/${property.replace(/~/g, "~0").replace(/\//g, "~1")}`,
|
|
2111
|
+
/* @__PURE__ */ new Set()
|
|
2112
|
+
)
|
|
2113
|
+
);
|
|
2114
|
+
}
|
|
1991
2115
|
}
|
|
1992
2116
|
}
|
|
1993
2117
|
return result;
|
|
1994
2118
|
}
|
|
1995
|
-
for (const { parent, key, date } of collect(holder, "value", root, "", /* @__PURE__ */ new Set()).values())
|
|
2119
|
+
for (const { parent, key, date: date2 } of collect(holder, "value", root, "", /* @__PURE__ */ new Set()).values()) {
|
|
2120
|
+
parent[key] = date2;
|
|
2121
|
+
}
|
|
1996
2122
|
return holder.value;
|
|
1997
2123
|
}
|
|
1998
2124
|
|
|
@@ -2068,9 +2194,9 @@ var HttpClient = class {
|
|
|
2068
2194
|
const res = await fetchFn(url, requestInit);
|
|
2069
2195
|
const requestId = res.headers.get("x-request-id") ?? void 0;
|
|
2070
2196
|
const traceIdentifier = res.headers.get("trace-identifier") ?? void 0;
|
|
2071
|
-
const
|
|
2197
|
+
const text2 = await res.text();
|
|
2072
2198
|
if (!res.ok) {
|
|
2073
|
-
const errBody = tryParseErrorBody(
|
|
2199
|
+
const errBody = tryParseErrorBody(text2, res.headers.get("content-type"));
|
|
2074
2200
|
throw createHttpError({
|
|
2075
2201
|
status: res.status,
|
|
2076
2202
|
body: errBody,
|
|
@@ -2079,11 +2205,11 @@ var HttpClient = class {
|
|
|
2079
2205
|
traceIdentifier
|
|
2080
2206
|
});
|
|
2081
2207
|
}
|
|
2082
|
-
if (
|
|
2208
|
+
if (text2 === "") {
|
|
2083
2209
|
return void 0;
|
|
2084
2210
|
}
|
|
2085
2211
|
parsing = true;
|
|
2086
|
-
return parseOperationResponse(
|
|
2212
|
+
return parseOperationResponse(text2, init.method, init.path, res.status);
|
|
2087
2213
|
} catch (cause) {
|
|
2088
2214
|
throw normalizeTransportError(cause, request, init.signal, url, parsing);
|
|
2089
2215
|
}
|
|
@@ -2100,16 +2226,16 @@ var HttpClient = class {
|
|
|
2100
2226
|
return `${basePath}${joiner}${qs}`;
|
|
2101
2227
|
}
|
|
2102
2228
|
};
|
|
2103
|
-
function tryParseErrorBody(
|
|
2229
|
+
function tryParseErrorBody(text2, contentType) {
|
|
2104
2230
|
const ct = contentType ?? "";
|
|
2105
|
-
if (ct.includes(JSON_MIME) ||
|
|
2231
|
+
if (ct.includes(JSON_MIME) || text2.startsWith("{") && text2.endsWith("}")) {
|
|
2106
2232
|
try {
|
|
2107
|
-
return JSON.parse(
|
|
2233
|
+
return JSON.parse(text2);
|
|
2108
2234
|
} catch {
|
|
2109
|
-
return
|
|
2235
|
+
return text2;
|
|
2110
2236
|
}
|
|
2111
2237
|
}
|
|
2112
|
-
return
|
|
2238
|
+
return text2;
|
|
2113
2239
|
}
|
|
2114
2240
|
|
|
2115
2241
|
// ../../src/raw/RawClient.ts
|
|
@@ -2140,12 +2266,16 @@ var RawClient = class {
|
|
|
2140
2266
|
|
|
2141
2267
|
// ../../src/resources/common/facade-response-unwrap.ts
|
|
2142
2268
|
function unwrapDeleteCount(resp) {
|
|
2143
|
-
if (resp == null || typeof resp !== "object")
|
|
2269
|
+
if (resp == null || typeof resp !== "object") {
|
|
2270
|
+
return 0;
|
|
2271
|
+
}
|
|
2144
2272
|
const n = resp.deleteCount;
|
|
2145
2273
|
return typeof n === "number" && Number.isFinite(n) ? n : 0;
|
|
2146
2274
|
}
|
|
2147
2275
|
function unwrapDeletedUserAccountCount(resp) {
|
|
2148
|
-
if (resp == null || typeof resp !== "object")
|
|
2276
|
+
if (resp == null || typeof resp !== "object") {
|
|
2277
|
+
return 0;
|
|
2278
|
+
}
|
|
2149
2279
|
const n = resp.deletedCount;
|
|
2150
2280
|
return typeof n === "number" && Number.isFinite(n) ? n : 0;
|
|
2151
2281
|
}
|
|
@@ -2160,20 +2290,28 @@ function unwrapAddProfileContact(resp) {
|
|
|
2160
2290
|
return p;
|
|
2161
2291
|
}
|
|
2162
2292
|
function unwrapRemoveProfileList(resp) {
|
|
2163
|
-
if (resp == null || typeof resp !== "object")
|
|
2293
|
+
if (resp == null || typeof resp !== "object") {
|
|
2294
|
+
return [];
|
|
2295
|
+
}
|
|
2164
2296
|
const pl = resp.personalContactList;
|
|
2165
|
-
if (pl === void 0 || pl === null)
|
|
2297
|
+
if (pl === void 0 || pl === null) {
|
|
2298
|
+
return [];
|
|
2299
|
+
}
|
|
2166
2300
|
if (!Array.isArray(pl)) {
|
|
2167
2301
|
throw new Error("Remove profile: personalContactList must be an array when present");
|
|
2168
2302
|
}
|
|
2169
2303
|
return pl;
|
|
2170
2304
|
}
|
|
2171
2305
|
function unwrapTorrowObjectFromProfilePropertiesUpdate(resp) {
|
|
2172
|
-
if (resp == null || typeof resp !== "object")
|
|
2306
|
+
if (resp == null || typeof resp !== "object") {
|
|
2307
|
+
return void 0;
|
|
2308
|
+
}
|
|
2173
2309
|
return resp.torrowObject ?? void 0;
|
|
2174
2310
|
}
|
|
2175
2311
|
function unwrapTorrowObjectFromContactPropertiesUpdate(resp) {
|
|
2176
|
-
if (resp == null || typeof resp !== "object")
|
|
2312
|
+
if (resp == null || typeof resp !== "object") {
|
|
2313
|
+
return void 0;
|
|
2314
|
+
}
|
|
2177
2315
|
return resp.torrowObject ?? void 0;
|
|
2178
2316
|
}
|
|
2179
2317
|
function unwrapTorrowId(resp) {
|
|
@@ -2187,36 +2325,52 @@ function unwrapTorrowId(resp) {
|
|
|
2187
2325
|
return id;
|
|
2188
2326
|
}
|
|
2189
2327
|
function unwrapTimetableStatisticsList(resp) {
|
|
2190
|
-
if (resp == null || typeof resp !== "object")
|
|
2328
|
+
if (resp == null || typeof resp !== "object") {
|
|
2329
|
+
return [];
|
|
2330
|
+
}
|
|
2191
2331
|
const list = resp.timetableStatisticsRespList;
|
|
2192
|
-
if (list === void 0 || list === null)
|
|
2332
|
+
if (list === void 0 || list === null) {
|
|
2333
|
+
return [];
|
|
2334
|
+
}
|
|
2193
2335
|
if (!Array.isArray(list)) {
|
|
2194
2336
|
throw new Error("getTimetableStatistics: timetableStatisticsRespList must be an array when present");
|
|
2195
2337
|
}
|
|
2196
2338
|
return list;
|
|
2197
2339
|
}
|
|
2198
2340
|
function unwrapCreatedViewInfoList(resp) {
|
|
2199
|
-
if (resp == null || typeof resp !== "object")
|
|
2341
|
+
if (resp == null || typeof resp !== "object") {
|
|
2342
|
+
return [];
|
|
2343
|
+
}
|
|
2200
2344
|
const list = resp.createdViewInfoList;
|
|
2201
|
-
if (list === void 0 || list === null)
|
|
2345
|
+
if (list === void 0 || list === null) {
|
|
2346
|
+
return [];
|
|
2347
|
+
}
|
|
2202
2348
|
if (!Array.isArray(list)) {
|
|
2203
2349
|
throw new Error("create views: createdViewInfoList must be an array when present");
|
|
2204
2350
|
}
|
|
2205
2351
|
return list;
|
|
2206
2352
|
}
|
|
2207
2353
|
function unwrapUpdatedViewInfoList(resp) {
|
|
2208
|
-
if (resp == null || typeof resp !== "object")
|
|
2354
|
+
if (resp == null || typeof resp !== "object") {
|
|
2355
|
+
return [];
|
|
2356
|
+
}
|
|
2209
2357
|
const list = resp.updatedViewInfoList;
|
|
2210
|
-
if (list === void 0 || list === null)
|
|
2358
|
+
if (list === void 0 || list === null) {
|
|
2359
|
+
return [];
|
|
2360
|
+
}
|
|
2211
2361
|
if (!Array.isArray(list)) {
|
|
2212
2362
|
throw new Error("update view order: updatedViewInfoList must be an array when present");
|
|
2213
2363
|
}
|
|
2214
2364
|
return list;
|
|
2215
2365
|
}
|
|
2216
2366
|
function unwrapLoyaltySystemsStatisticsList(resp) {
|
|
2217
|
-
if (resp == null || typeof resp !== "object")
|
|
2367
|
+
if (resp == null || typeof resp !== "object") {
|
|
2368
|
+
return [];
|
|
2369
|
+
}
|
|
2218
2370
|
const list = resp.loyaltySystemsStatisticsRespList;
|
|
2219
|
-
if (list === void 0 || list === null)
|
|
2371
|
+
if (list === void 0 || list === null) {
|
|
2372
|
+
return [];
|
|
2373
|
+
}
|
|
2220
2374
|
if (!Array.isArray(list)) {
|
|
2221
2375
|
throw new Error("loyaltysystems statistics: loyaltySystemsStatisticsRespList must be an array when present");
|
|
2222
2376
|
}
|
|
@@ -2425,11 +2579,7 @@ function getTorrowObjectTypeFromTorrowId(torrowId) {
|
|
|
2425
2579
|
const { objectType } = unpackCanonicalTorrowId(torrowId);
|
|
2426
2580
|
const result = CODE_TO_STRING_TYPE.get(objectType);
|
|
2427
2581
|
if (result === void 0) {
|
|
2428
|
-
throw new TorrowIdError(
|
|
2429
|
-
"unknown-object-type-code",
|
|
2430
|
-
`Unknown Torrow object type code: ${objectType}`,
|
|
2431
|
-
objectType
|
|
2432
|
-
);
|
|
2582
|
+
throw new TorrowIdError("unknown-object-type-code", `Unknown Torrow object type code: ${objectType}`, objectType);
|
|
2433
2583
|
}
|
|
2434
2584
|
return result;
|
|
2435
2585
|
}
|
|
@@ -2654,9 +2804,7 @@ var TorrowItemCoreFacade = class {
|
|
|
2654
2804
|
*/
|
|
2655
2805
|
listGroups(parentId, query, options) {
|
|
2656
2806
|
if (this.socialOpts.withGroupListEndpoint === false) {
|
|
2657
|
-
throw new Error(
|
|
2658
|
-
"listGroups is not supported for this API domain (withGroupListEndpoint: false)"
|
|
2659
|
-
);
|
|
2807
|
+
throw new Error("listGroups is not supported for this API domain (withGroupListEndpoint: false)");
|
|
2660
2808
|
}
|
|
2661
2809
|
return this.http.requestJson({
|
|
2662
2810
|
method: "GET",
|
|
@@ -3196,6 +3344,371 @@ function buildTimetableQuery(options) {
|
|
|
3196
3344
|
};
|
|
3197
3345
|
}
|
|
3198
3346
|
|
|
3347
|
+
// ../../src/resources/common/item-patch.ts
|
|
3348
|
+
var commonItemPatchFields = {
|
|
3349
|
+
name: { kind: "String" /* String */, nonEmpty: true },
|
|
3350
|
+
image: { kind: "Image" /* Image */, nullable: true }
|
|
3351
|
+
};
|
|
3352
|
+
function itemPatchError(category) {
|
|
3353
|
+
return new TorrowSdkError({ category, detail: { domain: "ItemPatch" /* ItemPatch */ } });
|
|
3354
|
+
}
|
|
3355
|
+
function isItemPatchCasRefusal(error) {
|
|
3356
|
+
const body = error.getSensitiveDetails().body;
|
|
3357
|
+
return error.request === "Started" /* Started */ && isRecord(body) && body.name === "ITEM_HAS_DIFFERENT_VERSION" /* ItemVersionConflict */ && (body.code === 211261 /* VersionConflict */ || body.code === String(211261 /* VersionConflict */));
|
|
3358
|
+
}
|
|
3359
|
+
function isRecord(value) {
|
|
3360
|
+
return value !== null && typeof value === "object" && (Object.getPrototypeOf(value) === Object.prototype || Object.getPrototypeOf(value) === null);
|
|
3361
|
+
}
|
|
3362
|
+
function isVersion(value) {
|
|
3363
|
+
return typeof value === "number" && Number.isInteger(value) && value > 0 && value <= 2147483647;
|
|
3364
|
+
}
|
|
3365
|
+
function isAbortSignal(value) {
|
|
3366
|
+
return value !== null && typeof value === "object" && "aborted" in value && typeof value.aborted === "boolean" && "throwIfAborted" in value && typeof value.throwIfAborted === "function";
|
|
3367
|
+
}
|
|
3368
|
+
function projectItem(dto, project) {
|
|
3369
|
+
try {
|
|
3370
|
+
return project(dto);
|
|
3371
|
+
} catch (cause) {
|
|
3372
|
+
throw new TorrowSdkError({
|
|
3373
|
+
category: "InvalidResponse" /* InvalidResponse */,
|
|
3374
|
+
detail: { domain: "ItemPatch" /* ItemPatch */ },
|
|
3375
|
+
sensitive: { cause }
|
|
3376
|
+
});
|
|
3377
|
+
}
|
|
3378
|
+
}
|
|
3379
|
+
function copyValue(value, active = /* @__PURE__ */ new Set()) {
|
|
3380
|
+
if (value === null || typeof value === "string" || typeof value === "boolean") {
|
|
3381
|
+
return value;
|
|
3382
|
+
}
|
|
3383
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
3384
|
+
return value;
|
|
3385
|
+
}
|
|
3386
|
+
if (value instanceof Date && Number.isFinite(value.getTime())) {
|
|
3387
|
+
return new Date(value.getTime());
|
|
3388
|
+
}
|
|
3389
|
+
if (!isRecord(value) && !Array.isArray(value) || active.has(value)) {
|
|
3390
|
+
throw itemPatchError("InvalidInput" /* InvalidInput */);
|
|
3391
|
+
}
|
|
3392
|
+
active.add(value);
|
|
3393
|
+
let result;
|
|
3394
|
+
if (Array.isArray(value)) {
|
|
3395
|
+
result = Array.from(value, (child) => copyValue(child, active));
|
|
3396
|
+
} else {
|
|
3397
|
+
const record5 = {};
|
|
3398
|
+
for (const key of Reflect.ownKeys(value)) {
|
|
3399
|
+
if (typeof key !== "string") {
|
|
3400
|
+
throw itemPatchError("InvalidInput" /* InvalidInput */);
|
|
3401
|
+
}
|
|
3402
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
3403
|
+
if (!descriptor || !Object.hasOwn(descriptor, "value")) {
|
|
3404
|
+
throw itemPatchError("InvalidInput" /* InvalidInput */);
|
|
3405
|
+
}
|
|
3406
|
+
Object.defineProperty(record5, key, {
|
|
3407
|
+
value: copyValue(descriptor.value, active),
|
|
3408
|
+
enumerable: true,
|
|
3409
|
+
writable: true,
|
|
3410
|
+
configurable: true
|
|
3411
|
+
});
|
|
3412
|
+
}
|
|
3413
|
+
result = record5;
|
|
3414
|
+
}
|
|
3415
|
+
active.delete(value);
|
|
3416
|
+
return result;
|
|
3417
|
+
}
|
|
3418
|
+
function equalItemPatchValue(before, after) {
|
|
3419
|
+
if (Object.is(before, after)) {
|
|
3420
|
+
return true;
|
|
3421
|
+
}
|
|
3422
|
+
if (before instanceof Date && after instanceof Date) {
|
|
3423
|
+
return before.getTime() === after.getTime();
|
|
3424
|
+
}
|
|
3425
|
+
if (Array.isArray(before) && Array.isArray(after)) {
|
|
3426
|
+
return before.length === after.length && before.every((value, i) => equalItemPatchValue(value, after[i]));
|
|
3427
|
+
}
|
|
3428
|
+
if (!isRecord(before) || !isRecord(after)) {
|
|
3429
|
+
return false;
|
|
3430
|
+
}
|
|
3431
|
+
const keys = Object.keys(before);
|
|
3432
|
+
return keys.length === Object.keys(after).length && keys.every((key) => Object.hasOwn(after, key) && equalItemPatchValue(before[key], after[key]));
|
|
3433
|
+
}
|
|
3434
|
+
function validField(value, rule) {
|
|
3435
|
+
if (value === null) {
|
|
3436
|
+
return rule.nullable === true;
|
|
3437
|
+
}
|
|
3438
|
+
let valid;
|
|
3439
|
+
switch (rule.kind) {
|
|
3440
|
+
case "String" /* String */:
|
|
3441
|
+
valid = typeof value === "string" && (!rule.nonEmpty || value.length > 0);
|
|
3442
|
+
break;
|
|
3443
|
+
case "Number" /* Number */:
|
|
3444
|
+
valid = typeof value === "number" && Number.isFinite(value);
|
|
3445
|
+
break;
|
|
3446
|
+
case "Integer" /* Integer */:
|
|
3447
|
+
valid = typeof value === "number" && Number.isSafeInteger(value);
|
|
3448
|
+
break;
|
|
3449
|
+
case "Boolean" /* Boolean */:
|
|
3450
|
+
valid = typeof value === "boolean";
|
|
3451
|
+
break;
|
|
3452
|
+
case "Date" /* Date */:
|
|
3453
|
+
valid = value instanceof Date && Number.isFinite(value.getTime());
|
|
3454
|
+
break;
|
|
3455
|
+
case "Array" /* Array */:
|
|
3456
|
+
valid = Array.isArray(value);
|
|
3457
|
+
break;
|
|
3458
|
+
case "Object" /* Object */:
|
|
3459
|
+
valid = isRecord(value);
|
|
3460
|
+
break;
|
|
3461
|
+
case "Image" /* Image */:
|
|
3462
|
+
valid = isRecord(value) && Object.keys(value).length === 1 && typeof value.id === "string" && value.id.length > 0;
|
|
3463
|
+
break;
|
|
3464
|
+
}
|
|
3465
|
+
return valid && (rule.validate?.(value) ?? true);
|
|
3466
|
+
}
|
|
3467
|
+
function patchPublicMessage(category, failureAt) {
|
|
3468
|
+
switch (category) {
|
|
3469
|
+
case "InvalidInput" /* InvalidInput */:
|
|
3470
|
+
return "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0447\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u0433\u043E \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 \u043D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B.";
|
|
3471
|
+
case "InsufficientData" /* InsufficientData */:
|
|
3472
|
+
return "\u0412 \u0441\u043D\u0438\u043C\u043A\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0430\u0442\u043E\u0447\u043D\u043E \u0434\u0430\u043D\u043D\u044B\u0445 \u0434\u043B\u044F \u0431\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E\u0433\u043E \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F.";
|
|
3473
|
+
case "AccessDenied" /* AccessDenied */:
|
|
3474
|
+
return "\u041D\u0435\u0434\u043E\u0441\u0442\u0430\u0442\u043E\u0447\u043D\u043E \u043F\u0440\u0430\u0432 \u0434\u043B\u044F \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F \u0447\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u0433\u043E \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430.";
|
|
3475
|
+
case "InvalidResponse" /* InvalidResponse */:
|
|
3476
|
+
return failureAt === "ProjectResult" /* ProjectResult */ ? "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u0442\u044C \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043D\u044B\u0439 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u0432 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 SDK." : "\u041E\u0442\u0432\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043D\u0435\u043F\u0440\u0438\u0433\u043E\u0434\u0435\u043D \u0434\u043B\u044F \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F \u0447\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u0433\u043E \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430.";
|
|
3477
|
+
case "AuthenticationRequired" /* AuthenticationRequired */:
|
|
3478
|
+
return "\u0414\u043B\u044F \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F \u0447\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u0433\u043E \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0430\u0443\u0442\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F.";
|
|
3479
|
+
case "Cancelled" /* Cancelled */:
|
|
3480
|
+
return "\u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u0447\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u0433\u043E \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u043E.";
|
|
3481
|
+
case "RateLimited" /* RateLimited */:
|
|
3482
|
+
return "\u0421\u0435\u0440\u0432\u0435\u0440 \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0438\u043B \u0447\u0430\u0441\u0442\u043E\u0442\u0443 \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432 \u043F\u0440\u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u043C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0438 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430.";
|
|
3483
|
+
case "TransportFailure" /* TransportFailure */:
|
|
3484
|
+
return "\u0421\u0431\u043E\u0439 \u0441\u0432\u044F\u0437\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043E\u043C \u043F\u0440\u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u043C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0438 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430.";
|
|
3485
|
+
case "HttpFailure" /* HttpFailure */:
|
|
3486
|
+
return "\u0421\u0435\u0440\u0432\u0435\u0440 \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u043B \u0437\u0430\u043F\u0440\u043E\u0441 \u043F\u0440\u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u043C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0438 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430.";
|
|
3487
|
+
default:
|
|
3488
|
+
return "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u0447\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430.";
|
|
3489
|
+
}
|
|
3490
|
+
}
|
|
3491
|
+
async function patchItem(http, itemId, fields, options, adapter) {
|
|
3492
|
+
let failureAt = "ValidateInput" /* ValidateInput */;
|
|
3493
|
+
let effect = "NotApplied" /* NotApplied */;
|
|
3494
|
+
const trustedErrors = /* @__PURE__ */ new Set();
|
|
3495
|
+
function localError(category, publicMessage) {
|
|
3496
|
+
const error = new TorrowSdkError({
|
|
3497
|
+
category,
|
|
3498
|
+
publicMessage: publicMessage ?? patchPublicMessage(category, failureAt),
|
|
3499
|
+
detail: { domain: "ItemPatch" /* ItemPatch */ }
|
|
3500
|
+
});
|
|
3501
|
+
trustedErrors.add(error);
|
|
3502
|
+
return error;
|
|
3503
|
+
}
|
|
3504
|
+
try {
|
|
3505
|
+
try {
|
|
3506
|
+
if (torrowObjectTypeToCode(getTorrowObjectTypeFromTorrowId(itemId)) !== adapter.objectType) {
|
|
3507
|
+
throw localError("InvalidInput" /* InvalidInput */);
|
|
3508
|
+
}
|
|
3509
|
+
} catch {
|
|
3510
|
+
throw localError("InvalidInput" /* InvalidInput */);
|
|
3511
|
+
}
|
|
3512
|
+
const opts = options ?? {};
|
|
3513
|
+
if (!isRecord(opts) || Object.keys(opts).some((key) => key !== "versionToCheck" && key !== "signal")) {
|
|
3514
|
+
throw localError("InvalidInput" /* InvalidInput */);
|
|
3515
|
+
}
|
|
3516
|
+
if (options === null) {
|
|
3517
|
+
throw localError("InvalidInput" /* InvalidInput */);
|
|
3518
|
+
}
|
|
3519
|
+
const expectedVersion = opts.versionToCheck;
|
|
3520
|
+
const signal = opts.signal;
|
|
3521
|
+
if (expectedVersion !== void 0 && !isVersion(expectedVersion) || Object.hasOwn(opts, "versionToCheck") && expectedVersion === void 0 || signal !== void 0 && !isAbortSignal(signal)) {
|
|
3522
|
+
throw localError("InvalidInput" /* InvalidInput */);
|
|
3523
|
+
}
|
|
3524
|
+
const selected = copyValue(fields);
|
|
3525
|
+
if (!isRecord(selected) || Object.keys(selected).length === 0) {
|
|
3526
|
+
throw localError("InvalidInput" /* InvalidInput */);
|
|
3527
|
+
}
|
|
3528
|
+
for (const [key, value] of Object.entries(selected)) {
|
|
3529
|
+
if (!Object.hasOwn(adapter.fields, key) || !validField(value, adapter.fields[key])) {
|
|
3530
|
+
throw localError("InvalidInput" /* InvalidInput */);
|
|
3531
|
+
}
|
|
3532
|
+
}
|
|
3533
|
+
adapter.validateFields?.(selected);
|
|
3534
|
+
const readQuery = adapter.readQuery ? { ...adapter.readQuery } : void 0;
|
|
3535
|
+
const writeQuery = adapter.writeQuery ? { ...adapter.writeQuery } : void 0;
|
|
3536
|
+
if (signal?.aborted) {
|
|
3537
|
+
throw localError("Cancelled" /* Cancelled */);
|
|
3538
|
+
}
|
|
3539
|
+
const path = `${adapter.basePath}/${encodePathSegment(itemId)}`;
|
|
3540
|
+
failureAt = "ReadCurrent" /* ReadCurrent */;
|
|
3541
|
+
const dto = await http.requestJson({ method: "GET", path, query: readQuery, signal });
|
|
3542
|
+
failureAt = "PrepareWrite" /* PrepareWrite */;
|
|
3543
|
+
if (!isRecord(dto) || dto.id !== itemId) {
|
|
3544
|
+
throw localError("InvalidResponse" /* InvalidResponse */);
|
|
3545
|
+
}
|
|
3546
|
+
if (dto.meta == null || dto.personalInfo == null) {
|
|
3547
|
+
throw localError("InsufficientData" /* InsufficientData */);
|
|
3548
|
+
}
|
|
3549
|
+
if (!isRecord(dto.meta) || !isRecord(dto.personalInfo)) {
|
|
3550
|
+
throw localError("InvalidResponse" /* InvalidResponse */);
|
|
3551
|
+
}
|
|
3552
|
+
const contentType = dto.personalInfo.itemContentType;
|
|
3553
|
+
if (contentType === "NoRights" /* NoRights */) {
|
|
3554
|
+
throw localError("AccessDenied" /* AccessDenied */, "\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043A \u043F\u043E\u043B\u043D\u043E\u043C\u0443 \u0441\u043D\u0438\u043C\u043A\u0443 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430.");
|
|
3555
|
+
}
|
|
3556
|
+
if (contentType !== void 0 && contentType !== null && typeof contentType !== "string") {
|
|
3557
|
+
throw localError("InvalidResponse" /* InvalidResponse */);
|
|
3558
|
+
}
|
|
3559
|
+
if (!isVersion(dto.meta.version) || contentType !== "Full" /* Full */) {
|
|
3560
|
+
throw localError(
|
|
3561
|
+
"InsufficientData" /* InsufficientData */,
|
|
3562
|
+
"\u0421\u043D\u0438\u043C\u043E\u043A \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 \u043D\u0435 \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043F\u043E\u043B\u043D\u044B\u043C \u0438\u043B\u0438 \u043D\u0435 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u0442 \u043F\u0440\u0438\u0433\u043E\u0434\u043D\u043E\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0434\u043B\u044F \u0431\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E\u0433\u043E \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F."
|
|
3563
|
+
);
|
|
3564
|
+
}
|
|
3565
|
+
const operations = dto.personalInfo.operationList;
|
|
3566
|
+
if (operations == null) {
|
|
3567
|
+
throw localError("InsufficientData" /* InsufficientData */);
|
|
3568
|
+
}
|
|
3569
|
+
if (!Array.isArray(operations) || operations.some((value) => typeof value !== "string")) {
|
|
3570
|
+
throw localError("InvalidResponse" /* InvalidResponse */);
|
|
3571
|
+
}
|
|
3572
|
+
if (!operations.includes("UpdateItem" /* UpdateItem */)) {
|
|
3573
|
+
throw localError("AccessDenied" /* AccessDenied */, "\u0412 \u0441\u043D\u0438\u043C\u043A\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043F\u0440\u0430\u0432\u043E UpdateItem.");
|
|
3574
|
+
}
|
|
3575
|
+
if (Object.hasOwn(adapter.fields, "name")) {
|
|
3576
|
+
if (dto.name == null) {
|
|
3577
|
+
throw localError("InsufficientData" /* InsufficientData */);
|
|
3578
|
+
}
|
|
3579
|
+
if (typeof dto.name !== "string" || dto.name.length === 0) {
|
|
3580
|
+
throw localError("InvalidResponse" /* InvalidResponse */);
|
|
3581
|
+
}
|
|
3582
|
+
}
|
|
3583
|
+
adapter.assertSnapshot?.(dto);
|
|
3584
|
+
if (expectedVersion !== void 0 && expectedVersion !== dto.meta.version) {
|
|
3585
|
+
throw localError(
|
|
3586
|
+
"VersionConflict" /* VersionConflict */,
|
|
3587
|
+
"\u041E\u0436\u0438\u0434\u0430\u0435\u043C\u0430\u044F \u0432\u0435\u0440\u0441\u0438\u044F \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 \u043D\u0435 \u0441\u043E\u0432\u043F\u0430\u0434\u0430\u0435\u0442 \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u043D\u043D\u043E\u0433\u043E \u0441\u043D\u0438\u043C\u043A\u0430."
|
|
3588
|
+
);
|
|
3589
|
+
}
|
|
3590
|
+
if (signal?.aborted) {
|
|
3591
|
+
throw localError("Cancelled" /* Cancelled */);
|
|
3592
|
+
}
|
|
3593
|
+
const unchanged = Object.entries(selected).every(([key, value]) => {
|
|
3594
|
+
const equal = adapter.equalField?.(key, dto[key], value, dto);
|
|
3595
|
+
if (equal !== void 0) {
|
|
3596
|
+
return equal;
|
|
3597
|
+
}
|
|
3598
|
+
if (adapter.fields[key].kind === "Image" /* Image */ && isRecord(dto[key]) && isRecord(value)) {
|
|
3599
|
+
return dto[key].id === value.id;
|
|
3600
|
+
}
|
|
3601
|
+
return equalItemPatchValue(dto[key], value);
|
|
3602
|
+
});
|
|
3603
|
+
if (unchanged) {
|
|
3604
|
+
failureAt = "ProjectResult" /* ProjectResult */;
|
|
3605
|
+
return { itemId, item: projectItem(dto, adapter.project), changed: false };
|
|
3606
|
+
}
|
|
3607
|
+
const body = copyValue(dto);
|
|
3608
|
+
const writeBody = body;
|
|
3609
|
+
Object.assign(writeBody, selected);
|
|
3610
|
+
delete writeBody.behaviorSettings;
|
|
3611
|
+
writeBody.discriminator = adapter.discriminator;
|
|
3612
|
+
writeBody.meta = { ...dto.meta, version: expectedVersion ?? dto.meta.version };
|
|
3613
|
+
const prepared = adapter.prepare?.(body, selected) ?? body;
|
|
3614
|
+
failureAt = "WriteItem" /* WriteItem */;
|
|
3615
|
+
let dispatched = false;
|
|
3616
|
+
let ack;
|
|
3617
|
+
try {
|
|
3618
|
+
ack = await http.requestJson(
|
|
3619
|
+
{
|
|
3620
|
+
method: "PUT",
|
|
3621
|
+
path,
|
|
3622
|
+
query: { ...writeQuery, checkVersion: true, isNeedAnnouncement: false },
|
|
3623
|
+
body: prepared,
|
|
3624
|
+
signal
|
|
3625
|
+
},
|
|
3626
|
+
() => {
|
|
3627
|
+
dispatched = true;
|
|
3628
|
+
effect = "Unknown" /* Unknown */;
|
|
3629
|
+
}
|
|
3630
|
+
);
|
|
3631
|
+
} catch (cause) {
|
|
3632
|
+
if (dispatched && cause instanceof TorrowSdkError && adapter.casRefusal?.(cause)) {
|
|
3633
|
+
effect = "NotApplied" /* NotApplied */;
|
|
3634
|
+
const error = cause.withContext({
|
|
3635
|
+
category: "VersionConflict" /* VersionConflict */,
|
|
3636
|
+
publicMessage: "\u0421\u0435\u0440\u0432\u0435\u0440 \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u043B \u0437\u0430\u043F\u0438\u0441\u044C \u0438\u0437-\u0437\u0430 \u043A\u043E\u043D\u043A\u0443\u0440\u0435\u043D\u0442\u043D\u043E\u0433\u043E \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0432\u0435\u0440\u0441\u0438\u0438 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430."
|
|
3637
|
+
});
|
|
3638
|
+
trustedErrors.add(error);
|
|
3639
|
+
throw error;
|
|
3640
|
+
}
|
|
3641
|
+
throw cause;
|
|
3642
|
+
}
|
|
3643
|
+
failureAt = "ValidateWriteResponse" /* ValidateWriteResponse */;
|
|
3644
|
+
if (!isRecord(ack) || ack.id !== itemId) {
|
|
3645
|
+
throw localError("InvalidResponse" /* InvalidResponse */);
|
|
3646
|
+
}
|
|
3647
|
+
effect = "Applied" /* Applied */;
|
|
3648
|
+
failureAt = "ProjectResult" /* ProjectResult */;
|
|
3649
|
+
return { itemId, item: projectItem(ack, adapter.project), changed: true };
|
|
3650
|
+
} catch (cause) {
|
|
3651
|
+
const error = cause instanceof TorrowSdkError ? cause : new TorrowSdkError({ category: "Unknown" /* Unknown */, sensitive: { cause } });
|
|
3652
|
+
throw error.withContext({
|
|
3653
|
+
publicMessage: trustedErrors.has(error) ? error.publicMessage : patchPublicMessage(error.category, failureAt),
|
|
3654
|
+
operation: adapter.operation,
|
|
3655
|
+
failureAt,
|
|
3656
|
+
detail: { domain: "ItemPatch" /* ItemPatch */ },
|
|
3657
|
+
effects: [{ area: "Remote" /* Remote */, step: "Write" /* Write */, state: effect }]
|
|
3658
|
+
});
|
|
3659
|
+
}
|
|
3660
|
+
}
|
|
3661
|
+
|
|
3662
|
+
// ../../src/resources/calendars/calendar-patch.ts
|
|
3663
|
+
function isRecord2(value) {
|
|
3664
|
+
return value !== null && typeof value === "object" && (Object.getPrototypeOf(value) === Object.prototype || Object.getPrototypeOf(value) === null);
|
|
3665
|
+
}
|
|
3666
|
+
function isCalendarPatchViewIndex(value) {
|
|
3667
|
+
return typeof value === "number" && Number.isInteger(value) && value >= -2147483648 && value <= 2147483647;
|
|
3668
|
+
}
|
|
3669
|
+
function isTimeRange(value) {
|
|
3670
|
+
return isRecord2(value) && Object.keys(value).every((key) => ["rid", "begin", "end", "name"].includes(key)) && isValidRid(value.rid) && value.begin instanceof Date && Number.isFinite(value.begin.getTime()) && value.end instanceof Date && Number.isFinite(value.end.getTime()) && (value.name == null || typeof value.name === "string");
|
|
3671
|
+
}
|
|
3672
|
+
function isCalendarPatchExceptions(value) {
|
|
3673
|
+
return isRecord2(value) && Object.keys(value).every((key) => ["replacedTimeRanges", "excludedTimeRanges"].includes(key)) && Object.values(value).every((ranges) => ranges == null || Array.isArray(ranges) && ranges.every(isTimeRange));
|
|
3674
|
+
}
|
|
3675
|
+
function projectCalendarPatchItem(item) {
|
|
3676
|
+
if (item.description != null && typeof item.description !== "string" || item.name != null && typeof item.name !== "string" || item.calendarViewIndex != null && !isCalendarPatchViewIndex(item.calendarViewIndex) || item.scheduleRangeExceptions != null && !isCalendarPatchExceptions(item.scheduleRangeExceptions)) {
|
|
3677
|
+
throw itemPatchError("InvalidResponse" /* InvalidResponse */);
|
|
3678
|
+
}
|
|
3679
|
+
return item;
|
|
3680
|
+
}
|
|
3681
|
+
function assertCalendarPatchSnapshot(item) {
|
|
3682
|
+
projectCalendarPatchItem(item);
|
|
3683
|
+
if (item.name == null) {
|
|
3684
|
+
throw itemPatchError("InsufficientData" /* InsufficientData */);
|
|
3685
|
+
}
|
|
3686
|
+
if (item.name.length === 0) {
|
|
3687
|
+
throw itemPatchError("InvalidResponse" /* InvalidResponse */);
|
|
3688
|
+
}
|
|
3689
|
+
}
|
|
3690
|
+
function createCalendarPatchAdapter() {
|
|
3691
|
+
return {
|
|
3692
|
+
operation: "CalendarsFacade.patch",
|
|
3693
|
+
basePath: "/api/v1/calendars",
|
|
3694
|
+
objectType: TorrowObjectTypeCode.Calendar,
|
|
3695
|
+
discriminator: "CalendarItem" /* CalendarItem */,
|
|
3696
|
+
fields: {
|
|
3697
|
+
...commonItemPatchFields,
|
|
3698
|
+
description: { kind: "String" /* String */, nullable: true },
|
|
3699
|
+
calendarViewIndex: { kind: "Integer" /* Integer */, nullable: true, validate: isCalendarPatchViewIndex },
|
|
3700
|
+
scheduleRangeExceptions: {
|
|
3701
|
+
kind: "Object" /* Object */,
|
|
3702
|
+
nullable: true,
|
|
3703
|
+
validate: isCalendarPatchExceptions
|
|
3704
|
+
}
|
|
3705
|
+
},
|
|
3706
|
+
assertSnapshot: assertCalendarPatchSnapshot,
|
|
3707
|
+
project: projectCalendarPatchItem,
|
|
3708
|
+
casRefusal: isItemPatchCasRefusal
|
|
3709
|
+
};
|
|
3710
|
+
}
|
|
3711
|
+
|
|
3199
3712
|
// ../../src/resources/calendars/CalendarsFacade.ts
|
|
3200
3713
|
var BASE = "/api/v1/calendars";
|
|
3201
3714
|
var CalendarsFacade = class extends TorrowItemFacade {
|
|
@@ -3207,6 +3720,10 @@ var CalendarsFacade = class extends TorrowItemFacade {
|
|
|
3207
3720
|
generateCalendarId(ownerTorrowId) {
|
|
3208
3721
|
return this.generateItemId(ownerTorrowId);
|
|
3209
3722
|
}
|
|
3723
|
+
/** Частично изменяет календарь: полный GET и максимум один CAS PUT, без deep merge/readback/retry. */
|
|
3724
|
+
patch(itemId, fields, options) {
|
|
3725
|
+
return patchItem(this.http, itemId, fields, options, createCalendarPatchAdapter());
|
|
3726
|
+
}
|
|
3210
3727
|
/** `POST /api/v1/calendars` */
|
|
3211
3728
|
create(body, options) {
|
|
3212
3729
|
const payload = applyItemCreateDefaults(body, "CalendarItem" /* CalendarItem */);
|
|
@@ -3338,6 +3855,88 @@ var CalendarsFacade = class extends TorrowItemFacade {
|
|
|
3338
3855
|
}
|
|
3339
3856
|
};
|
|
3340
3857
|
|
|
3858
|
+
// ../../src/resources/common/available-resources.ts
|
|
3859
|
+
var AvailableResourcesValues = /* @__PURE__ */ ((AvailableResourcesValues2) => {
|
|
3860
|
+
AvailableResourcesValues2["Unknown"] = "Unknown";
|
|
3861
|
+
AvailableResourcesValues2["Free"] = "Free";
|
|
3862
|
+
AvailableResourcesValues2["Booked"] = "Booked";
|
|
3863
|
+
AvailableResourcesValues2["Busy"] = "Busy";
|
|
3864
|
+
return AvailableResourcesValues2;
|
|
3865
|
+
})(AvailableResourcesValues || {});
|
|
3866
|
+
|
|
3867
|
+
// ../../src/resources/common/user-access-level.ts
|
|
3868
|
+
var UserAccessLevelValues = {
|
|
3869
|
+
Unknown: "UnknownUserAccessLevel",
|
|
3870
|
+
Authenticated: "Authenticated",
|
|
3871
|
+
Unauthenticated: "Unauthenticated"
|
|
3872
|
+
};
|
|
3873
|
+
|
|
3874
|
+
// ../../src/resources/common/item-price-patch.ts
|
|
3875
|
+
var priceNumbers = [
|
|
3876
|
+
"priceWithoutDiscount",
|
|
3877
|
+
"discount",
|
|
3878
|
+
"salePrice",
|
|
3879
|
+
"prepayment",
|
|
3880
|
+
"expences",
|
|
3881
|
+
"takePrice",
|
|
3882
|
+
"taxRate",
|
|
3883
|
+
"taxAmount"
|
|
3884
|
+
];
|
|
3885
|
+
function objectValue(value) {
|
|
3886
|
+
return value !== null && typeof value === "object" && !Array.isArray(value) && !(value instanceof Date);
|
|
3887
|
+
}
|
|
3888
|
+
function validPrice(value) {
|
|
3889
|
+
if (!objectValue(value)) {
|
|
3890
|
+
return false;
|
|
3891
|
+
}
|
|
3892
|
+
return Object.entries(value).every(
|
|
3893
|
+
([key, member]) => key === "currencyCode" ? member === null || typeof member === "string" : priceNumbers.includes(key) && (member === null || typeof member === "number" && Number.isFinite(member))
|
|
3894
|
+
);
|
|
3895
|
+
}
|
|
3896
|
+
function optionalDate(value, nullable2 = false) {
|
|
3897
|
+
return value === void 0 || nullable2 && value === null || value instanceof Date && Number.isFinite(value.getTime());
|
|
3898
|
+
}
|
|
3899
|
+
function validRecurring(value) {
|
|
3900
|
+
if (value == null) {
|
|
3901
|
+
return true;
|
|
3902
|
+
}
|
|
3903
|
+
if (!objectValue(value)) {
|
|
3904
|
+
return false;
|
|
3905
|
+
}
|
|
3906
|
+
return ["endDate", "beginDate", "firstWeekDate"].every((key) => optionalDate(value[key], true)) && ["remainingCount", "repeatInterval"].every(
|
|
3907
|
+
(key) => value[key] == null || typeof value[key] === "number" && Number.isInteger(value[key])
|
|
3908
|
+
) && ["cron", "weeklyCron"].every((key) => value[key] == null || typeof value[key] === "string");
|
|
3909
|
+
}
|
|
3910
|
+
function validRange(value, begin, end) {
|
|
3911
|
+
return objectValue(value) && optionalDate(value[begin]) && optionalDate(value[end]) && (value.rid == null || typeof value.rid === "string") && (value.name == null || typeof value.name === "string") && validRecurring(value.recurringConditions);
|
|
3912
|
+
}
|
|
3913
|
+
function isItemPatchSchedule(value) {
|
|
3914
|
+
if (!objectValue(value)) {
|
|
3915
|
+
return false;
|
|
3916
|
+
}
|
|
3917
|
+
if (value.calendarId != null && typeof value.calendarId !== "string") {
|
|
3918
|
+
return false;
|
|
3919
|
+
}
|
|
3920
|
+
if (value.scheduleRanges != null && (!Array.isArray(value.scheduleRanges) || !value.scheduleRanges.every((range) => validRange(range, "beginning", "ending")))) {
|
|
3921
|
+
return false;
|
|
3922
|
+
}
|
|
3923
|
+
const exceptions = value.scheduleRangeExceptions;
|
|
3924
|
+
return exceptions == null || objectValue(exceptions) && ["replacedTimeRanges", "excludedTimeRanges"].every(
|
|
3925
|
+
(key) => exceptions[key] == null || Array.isArray(exceptions[key]) && exceptions[key].every((range) => validRange(range, "begin", "end"))
|
|
3926
|
+
);
|
|
3927
|
+
}
|
|
3928
|
+
function validateItemPricePatch(fields) {
|
|
3929
|
+
if (!Object.hasOwn(fields, "priceInfo") || fields.priceInfo === null) {
|
|
3930
|
+
return;
|
|
3931
|
+
}
|
|
3932
|
+
const info = fields.priceInfo;
|
|
3933
|
+
if (!objectValue(info) || Object.keys(info).some((key) => key !== "settings") || !Array.isArray(info.settings) || !info.settings.every(
|
|
3934
|
+
(setting) => objectValue(setting) && Object.keys(setting).every((key) => key === "priceProperties" || key === "schedule") && validPrice(setting.priceProperties) && (setting.schedule == null || isItemPatchSchedule(setting.schedule))
|
|
3935
|
+
)) {
|
|
3936
|
+
throw itemPatchError("InvalidInput" /* InvalidInput */);
|
|
3937
|
+
}
|
|
3938
|
+
}
|
|
3939
|
+
|
|
3341
3940
|
// ../../src/resources/cases/types.ts
|
|
3342
3941
|
var CaseStateValues = {
|
|
3343
3942
|
Unknown: "UnknownCaseState",
|
|
@@ -3364,14 +3963,101 @@ var CaseTypeValues = {
|
|
|
3364
3963
|
State: "State"
|
|
3365
3964
|
};
|
|
3366
3965
|
|
|
3367
|
-
// ../../src/resources/
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3966
|
+
// ../../src/resources/common/item-patch-predicates.ts
|
|
3967
|
+
function isItemPatchDtoObject(value) {
|
|
3968
|
+
return value !== null && typeof value === "object" && !Array.isArray(value) && !(value instanceof Date);
|
|
3969
|
+
}
|
|
3970
|
+
function isItemPatchInt32(value) {
|
|
3971
|
+
return typeof value === "number" && Number.isInteger(value) && value >= -2147483648 && value <= 2147483647;
|
|
3972
|
+
}
|
|
3973
|
+
function isItemPatchReferenceId(value) {
|
|
3974
|
+
return typeof value === "string" && value.length > 0 && value.trim() === value;
|
|
3975
|
+
}
|
|
3976
|
+
function isItemPatchObjectArray(value) {
|
|
3977
|
+
return Array.isArray(value) && value.every(isItemPatchDtoObject);
|
|
3978
|
+
}
|
|
3979
|
+
|
|
3980
|
+
// ../../src/resources/cases/case-patch.ts
|
|
3981
|
+
function optionalDate2(value) {
|
|
3982
|
+
return value == null || value instanceof Date && Number.isFinite(value.getTime());
|
|
3983
|
+
}
|
|
3984
|
+
function appendices(value) {
|
|
3985
|
+
return isItemPatchObjectArray(value) && value.every((item) => optionalDate2(item.openDate) && optionalDate2(item.closeDate));
|
|
3986
|
+
}
|
|
3987
|
+
function visitCard(value) {
|
|
3988
|
+
if (!isItemPatchDtoObject(value) || Object.keys(value).some((key) => key !== "fields")) {
|
|
3989
|
+
return false;
|
|
3990
|
+
}
|
|
3991
|
+
if (value.fields == null) {
|
|
3992
|
+
return true;
|
|
3993
|
+
}
|
|
3994
|
+
return Array.isArray(value.fields) && value.fields.every(
|
|
3995
|
+
(field) => isItemPatchDtoObject(field) && Object.entries(field).every(
|
|
3996
|
+
([key, member]) => key === "number" ? isItemPatchInt32(member) : (key === "value" || key === "expression") && (member === null || typeof member === "string")
|
|
3997
|
+
)
|
|
3998
|
+
);
|
|
3999
|
+
}
|
|
4000
|
+
function checkinPermission(value) {
|
|
4001
|
+
return isItemPatchDtoObject(value) && Object.entries(value).every(
|
|
4002
|
+
([key, member]) => key === "userAccessLevel" ? Object.values(UserAccessLevelValues).some((level) => level === member) : key === "consumerMinTimeSecBetweenCasesInService" && (member === null || isItemPatchInt32(member))
|
|
4003
|
+
);
|
|
4004
|
+
}
|
|
4005
|
+
function createCasePatchAdapter() {
|
|
4006
|
+
return {
|
|
4007
|
+
operation: "CasesFacade.patch",
|
|
4008
|
+
basePath: "/api/v1/cases",
|
|
4009
|
+
objectType: TorrowObjectTypeCode.Case,
|
|
4010
|
+
discriminator: "CaseItem" /* CaseItem */,
|
|
4011
|
+
fields: {
|
|
4012
|
+
...commonItemPatchFields,
|
|
4013
|
+
beginDate: { kind: "Date" /* Date */, nullable: true },
|
|
4014
|
+
endDate: { kind: "Date" /* Date */, nullable: true },
|
|
4015
|
+
description: { kind: "String" /* String */, nullable: true },
|
|
4016
|
+
place: { kind: "String" /* String */, nullable: true },
|
|
4017
|
+
placeId: { kind: "String" /* String */, nullable: true, validate: isItemPatchReferenceId },
|
|
4018
|
+
clientGroupId: { kind: "String" /* String */, nullable: true, validate: isItemPatchReferenceId },
|
|
4019
|
+
caseType: {
|
|
4020
|
+
kind: "String" /* String */,
|
|
4021
|
+
validate: (value) => value !== CaseTypeValues.Unknown && Object.values(CaseTypeValues).some((type) => type === value)
|
|
4022
|
+
},
|
|
4023
|
+
schedule: { kind: "Object" /* Object */, nullable: true, validate: isItemPatchSchedule },
|
|
4024
|
+
registrationOpen: { kind: "Integer" /* Integer */, nullable: true, validate: isItemPatchInt32 },
|
|
4025
|
+
registrationClose: { kind: "Integer" /* Integer */, nullable: true, validate: isItemPatchInt32 },
|
|
4026
|
+
bookingDuration: { kind: "Integer" /* Integer */, nullable: true, validate: isItemPatchInt32 },
|
|
4027
|
+
maxConsumerQuantity: { kind: "Integer" /* Integer */, nullable: true, validate: isItemPatchInt32 },
|
|
4028
|
+
bookingConsumerQuantity: { kind: "Integer" /* Integer */, nullable: true, validate: isItemPatchInt32 },
|
|
4029
|
+
executorUsagePercent: { kind: "Number" /* Number */, nullable: true },
|
|
4030
|
+
priority: { kind: "Number" /* Number */, nullable: true },
|
|
4031
|
+
availableResources: {
|
|
4032
|
+
kind: "String" /* String */,
|
|
4033
|
+
validate: (value) => Object.values(AvailableResourcesValues).some((state) => state === value)
|
|
4034
|
+
},
|
|
4035
|
+
needApproval: { kind: "Boolean" /* Boolean */, nullable: true },
|
|
4036
|
+
hidden: { kind: "Boolean" /* Boolean */, nullable: true },
|
|
4037
|
+
createSingleCases: { kind: "Boolean" /* Boolean */, nullable: true },
|
|
4038
|
+
checkinPermission: { kind: "Object" /* Object */, nullable: true, validate: checkinPermission },
|
|
4039
|
+
participateFieldRequirements: { kind: "Object" /* Object */, nullable: true },
|
|
4040
|
+
visitCard: { kind: "Object" /* Object */, validate: visitCard },
|
|
4041
|
+
appendixList: { kind: "Array" /* Array */, nullable: true, validate: appendices },
|
|
4042
|
+
resourceGroupList: { kind: "Array" /* Array */, nullable: true, validate: isItemPatchObjectArray },
|
|
4043
|
+
caseActionList: { kind: "Array" /* Array */, nullable: true, validate: isItemPatchObjectArray },
|
|
4044
|
+
loyaltyTransactionPropertiesList: { kind: "Array" /* Array */, nullable: true, validate: isItemPatchObjectArray },
|
|
4045
|
+
priceInfo: { kind: "Object" /* Object */, nullable: true }
|
|
4046
|
+
},
|
|
4047
|
+
validateFields: validateItemPricePatch,
|
|
4048
|
+
project: (item) => item,
|
|
4049
|
+
casRefusal: isItemPatchCasRefusal
|
|
4050
|
+
};
|
|
4051
|
+
}
|
|
4052
|
+
|
|
4053
|
+
// ../../src/resources/cases/case-requests.ts
|
|
4054
|
+
var BASE2 = "/api/v1/cases";
|
|
4055
|
+
function getCase(http, torrowId, options) {
|
|
4056
|
+
return http.requestJson({
|
|
4057
|
+
method: "GET",
|
|
4058
|
+
path: `${BASE2}/${encodePathSegment(torrowId)}`,
|
|
4059
|
+
query: {
|
|
4060
|
+
profileId: options?.profileId,
|
|
3375
4061
|
caseParticipantProfileId: options?.caseParticipantProfileId,
|
|
3376
4062
|
versionToCheck: options?.versionToCheck,
|
|
3377
4063
|
includeDeleted: options?.includeDeleted,
|
|
@@ -3402,6 +4088,10 @@ var CasesFacade = class extends TorrowItemFacade {
|
|
|
3402
4088
|
generateCaseId(ownerTorrowId) {
|
|
3403
4089
|
return this.generateItemId(ownerTorrowId);
|
|
3404
4090
|
}
|
|
4091
|
+
/** Частично изменяет конфигурацию события через полный GET и максимум один CAS PUT, без retry/readback; существующий patchCase остаётся отдельным POST /{id}/patch. */
|
|
4092
|
+
patch(itemId, fields, options) {
|
|
4093
|
+
return patchItem(this.http, itemId, fields, options, createCasePatchAdapter());
|
|
4094
|
+
}
|
|
3405
4095
|
/**
|
|
3406
4096
|
* Основной create события — `PUT /api/v1/cases` + **`CreateCaseReq`**
|
|
3407
4097
|
* (`caseItem`, опционально `reminders`, `calendarId`, check-in / road time / participant type, …).
|
|
@@ -3753,30 +4443,13 @@ var CasesFacade = class extends TorrowItemFacade {
|
|
|
3753
4443
|
}
|
|
3754
4444
|
};
|
|
3755
4445
|
|
|
3756
|
-
// ../../src/resources/contacts/contact-communications-write-defaults.ts
|
|
3757
|
-
var CONTACT_COMMUNICATION_DEFAULT_CHECK_STATE = "Unchecked";
|
|
3758
|
-
function normalizeContactCommunicationsForWrite(body) {
|
|
3759
|
-
const items = body.communications;
|
|
3760
|
-
if (!Array.isArray(items)) {
|
|
3761
|
-
return;
|
|
3762
|
-
}
|
|
3763
|
-
for (const item of items) {
|
|
3764
|
-
if (item === null || item === void 0 || typeof item !== "object") {
|
|
3765
|
-
continue;
|
|
3766
|
-
}
|
|
3767
|
-
if (item.checkState === void 0 || item.checkState === null) {
|
|
3768
|
-
item.checkState = CONTACT_COMMUNICATION_DEFAULT_CHECK_STATE;
|
|
3769
|
-
}
|
|
3770
|
-
}
|
|
3771
|
-
}
|
|
3772
|
-
|
|
3773
4446
|
// ../../src/resources/contacts/contact-structured-array-rids.ts
|
|
3774
4447
|
var CONTACT_STRUCTURED_ARRAY_KEYS = ["addresses", "communications", "dates"];
|
|
3775
|
-
function isMissingRid(
|
|
3776
|
-
if (
|
|
4448
|
+
function isMissingRid(rid2) {
|
|
4449
|
+
if (rid2 === null || rid2 === void 0) {
|
|
3777
4450
|
return true;
|
|
3778
4451
|
}
|
|
3779
|
-
return typeof
|
|
4452
|
+
return typeof rid2 === "string" && rid2.trim() === "";
|
|
3780
4453
|
}
|
|
3781
4454
|
function ensureRidsOnArray(items, arrayKey) {
|
|
3782
4455
|
if (!Array.isArray(items)) {
|
|
@@ -3787,12 +4460,12 @@ function ensureRidsOnArray(items, arrayKey) {
|
|
|
3787
4460
|
if (item === null || item === void 0 || typeof item !== "object") {
|
|
3788
4461
|
continue;
|
|
3789
4462
|
}
|
|
3790
|
-
const
|
|
3791
|
-
if (isMissingRid(
|
|
4463
|
+
const rid2 = item.rid;
|
|
4464
|
+
if (isMissingRid(rid2)) {
|
|
3792
4465
|
item.rid = generateRid();
|
|
3793
4466
|
continue;
|
|
3794
4467
|
}
|
|
3795
|
-
if (!isValidRid(
|
|
4468
|
+
if (!isValidRid(rid2)) {
|
|
3796
4469
|
throw new Error(
|
|
3797
4470
|
`Invalid rid for contact.${arrayKey}[${i}]: expected ${TORROW_OBJECT_ID_HEX_LENGTH} hexadecimal characters`
|
|
3798
4471
|
);
|
|
@@ -3805,11 +4478,30 @@ function normalizeContactStructuredArrayRidsForWrite(body) {
|
|
|
3805
4478
|
}
|
|
3806
4479
|
}
|
|
3807
4480
|
|
|
4481
|
+
// ../../src/resources/contacts/contact-communications-write-defaults.ts
|
|
4482
|
+
var CONTACT_COMMUNICATION_DEFAULT_CHECK_STATE = "Unchecked";
|
|
4483
|
+
function normalizeContactCommunicationsForWrite(body) {
|
|
4484
|
+
const items = body.communications;
|
|
4485
|
+
if (!Array.isArray(items)) {
|
|
4486
|
+
return;
|
|
4487
|
+
}
|
|
4488
|
+
for (const item of items) {
|
|
4489
|
+
if (item === null || item === void 0 || typeof item !== "object") {
|
|
4490
|
+
continue;
|
|
4491
|
+
}
|
|
4492
|
+
if (item.checkState === void 0 || item.checkState === null) {
|
|
4493
|
+
item.checkState = CONTACT_COMMUNICATION_DEFAULT_CHECK_STATE;
|
|
4494
|
+
}
|
|
4495
|
+
}
|
|
4496
|
+
}
|
|
4497
|
+
|
|
3808
4498
|
// ../../src/resources/contacts/contact-visit-card-fields.ts
|
|
3809
4499
|
var CONTACT_VISIT_CARD_SLOT_COUNT = 3;
|
|
3810
4500
|
var CONTACT_VISIT_CARD_DEFAULT_SLOT_0_EXPRESSION = JSON.stringify({ type: "LastNameFirstName" });
|
|
3811
4501
|
function trimNonEmptyString(value) {
|
|
3812
|
-
if (typeof value !== "string")
|
|
4502
|
+
if (typeof value !== "string") {
|
|
4503
|
+
return void 0;
|
|
4504
|
+
}
|
|
3813
4505
|
const trimmed = value.trim();
|
|
3814
4506
|
return trimmed === "" ? void 0 : trimmed;
|
|
3815
4507
|
}
|
|
@@ -3827,11 +4519,11 @@ function contactVisitCardDefaultSlot0Value(body) {
|
|
|
3827
4519
|
return trimNonEmptyString(body.company) ?? "";
|
|
3828
4520
|
}
|
|
3829
4521
|
function normalizeContactVisitCardFieldsForWrite(body) {
|
|
3830
|
-
let
|
|
3831
|
-
if (
|
|
3832
|
-
|
|
4522
|
+
let visitCard3 = body.visitCard;
|
|
4523
|
+
if (visitCard3 === void 0 || visitCard3 === null || typeof visitCard3 !== "object" || Array.isArray(visitCard3)) {
|
|
4524
|
+
visitCard3 = {};
|
|
3833
4525
|
}
|
|
3834
|
-
let incoming = Array.isArray(
|
|
4526
|
+
let incoming = Array.isArray(visitCard3.fields) ? visitCard3.fields : [];
|
|
3835
4527
|
if (incoming.length === 0) {
|
|
3836
4528
|
incoming = [
|
|
3837
4529
|
{
|
|
@@ -3846,16 +4538,216 @@ function normalizeContactVisitCardFieldsForWrite(body) {
|
|
|
3846
4538
|
picked.push(void 0);
|
|
3847
4539
|
}
|
|
3848
4540
|
for (const field of incoming) {
|
|
3849
|
-
if (field === void 0 || field === null || typeof field !== "object")
|
|
4541
|
+
if (field === void 0 || field === null || typeof field !== "object") {
|
|
4542
|
+
continue;
|
|
4543
|
+
}
|
|
3850
4544
|
const n = field.number;
|
|
3851
|
-
if (typeof n !== "number" || !Number.isInteger(n) || n < 0 || n >= CONTACT_VISIT_CARD_SLOT_COUNT)
|
|
4545
|
+
if (typeof n !== "number" || !Number.isInteger(n) || n < 0 || n >= CONTACT_VISIT_CARD_SLOT_COUNT) {
|
|
4546
|
+
continue;
|
|
4547
|
+
}
|
|
3852
4548
|
picked[n] = { ...field, number: n };
|
|
3853
4549
|
}
|
|
3854
4550
|
const fields = [];
|
|
3855
4551
|
for (let i = 0; i < CONTACT_VISIT_CARD_SLOT_COUNT; i++) {
|
|
3856
4552
|
fields.push(picked[i] ?? { number: i, value: "" });
|
|
3857
4553
|
}
|
|
3858
|
-
body.visitCard = { ...
|
|
4554
|
+
body.visitCard = { ...visitCard3, fields };
|
|
4555
|
+
}
|
|
4556
|
+
|
|
4557
|
+
// ../../src/resources/contacts/types.ts
|
|
4558
|
+
var GenderValues = {
|
|
4559
|
+
Unknown: "UnknownGender",
|
|
4560
|
+
Male: "Male",
|
|
4561
|
+
Female: "Female",
|
|
4562
|
+
Other: "OtherGender"
|
|
4563
|
+
};
|
|
4564
|
+
var CommunicationTypeValues = {
|
|
4565
|
+
Unknown: "UnknownCommunicationType",
|
|
4566
|
+
Phone: "Phone",
|
|
4567
|
+
Sms: "Sms",
|
|
4568
|
+
Email: "Email",
|
|
4569
|
+
WebSite: "WebSite",
|
|
4570
|
+
Telegram: "Telegram",
|
|
4571
|
+
WhatsApp: "WhatsApp",
|
|
4572
|
+
Viber: "Viber",
|
|
4573
|
+
Facebook: "Facebook",
|
|
4574
|
+
Instagram: "Instagram",
|
|
4575
|
+
Vkontakte: "Vkontakte",
|
|
4576
|
+
Odnoklassniki: "Odnoklassniki",
|
|
4577
|
+
Skype: "Skype",
|
|
4578
|
+
Youtube: "Youtube",
|
|
4579
|
+
Twitter: "Twitter",
|
|
4580
|
+
LinkedIn: "LinkedIn",
|
|
4581
|
+
Max: "Max",
|
|
4582
|
+
Other: "Other"
|
|
4583
|
+
};
|
|
4584
|
+
var ProfileTypeValues = {
|
|
4585
|
+
Unknown: "UnknownProfile",
|
|
4586
|
+
None: "None",
|
|
4587
|
+
MyProfile: "MyProfile",
|
|
4588
|
+
AnyProfile: "AnyProfile",
|
|
4589
|
+
CopyProfile: "CopyProfile"
|
|
4590
|
+
};
|
|
4591
|
+
|
|
4592
|
+
// ../../src/resources/contacts/contact-patch.ts
|
|
4593
|
+
var ContactPatchCommunicationState = /* @__PURE__ */ ((ContactPatchCommunicationState2) => {
|
|
4594
|
+
ContactPatchCommunicationState2["Undefined"] = "UndefinedCommunicationCheckState";
|
|
4595
|
+
ContactPatchCommunicationState2["Unchecked"] = "Unchecked";
|
|
4596
|
+
ContactPatchCommunicationState2["Checked"] = "Checked";
|
|
4597
|
+
return ContactPatchCommunicationState2;
|
|
4598
|
+
})(ContactPatchCommunicationState || {});
|
|
4599
|
+
function record2(value) {
|
|
4600
|
+
return value !== null && typeof value === "object" && (Object.getPrototypeOf(value) === Object.prototype || Object.getPrototypeOf(value) === null);
|
|
4601
|
+
}
|
|
4602
|
+
var text = (value) => typeof value === "string";
|
|
4603
|
+
var integer = (value) => typeof value === "number" && Number.isInteger(value) && value >= -2147483648 && value <= 2147483647;
|
|
4604
|
+
var date = (value) => value instanceof Date && Number.isFinite(value.getTime());
|
|
4605
|
+
var nullable = (validate) => (value) => value === null || validate(value);
|
|
4606
|
+
var rid = (value) => value === null || typeof value === "string" && (value.trim() === "" || isValidRid(value));
|
|
4607
|
+
function shape(value, fields) {
|
|
4608
|
+
return record2(value) && Object.entries(value).every(([key, child]) => Object.hasOwn(fields, key) && fields[key](child));
|
|
4609
|
+
}
|
|
4610
|
+
var addressShape = {
|
|
4611
|
+
rid,
|
|
4612
|
+
addressName: nullable(text),
|
|
4613
|
+
block: nullable(text),
|
|
4614
|
+
cityId: nullable(integer),
|
|
4615
|
+
countryId: nullable(integer),
|
|
4616
|
+
door: nullable(text),
|
|
4617
|
+
index: nullable(text),
|
|
4618
|
+
room: nullable(text),
|
|
4619
|
+
street: nullable(text),
|
|
4620
|
+
addressString: nullable(text),
|
|
4621
|
+
order: integer,
|
|
4622
|
+
location: nullable(
|
|
4623
|
+
(value) => Array.isArray(value) && value.every((child) => typeof child === "number" && Number.isFinite(child))
|
|
4624
|
+
)
|
|
4625
|
+
};
|
|
4626
|
+
var communicationShape = {
|
|
4627
|
+
rid,
|
|
4628
|
+
name: nullable(text),
|
|
4629
|
+
type: (value) => Object.values(CommunicationTypeValues).some((type) => type === value),
|
|
4630
|
+
value: nullable(text),
|
|
4631
|
+
order: integer,
|
|
4632
|
+
checkState: (value) => Object.values(ContactPatchCommunicationState).some((state) => state === value)
|
|
4633
|
+
};
|
|
4634
|
+
var memorableDateShape = {
|
|
4635
|
+
rid,
|
|
4636
|
+
date,
|
|
4637
|
+
name: nullable(text),
|
|
4638
|
+
needsReminder: (value) => typeof value === "boolean",
|
|
4639
|
+
order: integer
|
|
4640
|
+
};
|
|
4641
|
+
var file = (value) => shape(value, { id: (value2) => typeof value2 === "string" && value2.length > 0 }) && record2(value) && Object.hasOwn(value, "id");
|
|
4642
|
+
var visitCard2 = (value) => shape(value, {
|
|
4643
|
+
fields: nullable(
|
|
4644
|
+
(value2) => Array.isArray(value2) && value2.every((child) => shape(child, { number: integer, value: nullable(text), expression: nullable(text) }))
|
|
4645
|
+
)
|
|
4646
|
+
});
|
|
4647
|
+
var arrayOf = (validate) => (value) => Array.isArray(value) && value.every(validate);
|
|
4648
|
+
function comparable(value) {
|
|
4649
|
+
if (value instanceof Date) {
|
|
4650
|
+
return JSON.stringify(value.toISOString());
|
|
4651
|
+
}
|
|
4652
|
+
if (Array.isArray(value)) {
|
|
4653
|
+
return `[${value.map(comparable).join(",")}]`;
|
|
4654
|
+
}
|
|
4655
|
+
if (record2(value)) {
|
|
4656
|
+
return `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${comparable(value[key])}`).join(",")}}`;
|
|
4657
|
+
}
|
|
4658
|
+
return JSON.stringify(value) ?? "undefined";
|
|
4659
|
+
}
|
|
4660
|
+
function createContactPatchAdapter() {
|
|
4661
|
+
let selected = {};
|
|
4662
|
+
let original;
|
|
4663
|
+
let normalized;
|
|
4664
|
+
function normalizedFields(snapshot) {
|
|
4665
|
+
if (normalized) {
|
|
4666
|
+
return normalized;
|
|
4667
|
+
}
|
|
4668
|
+
normalized = { ...selected };
|
|
4669
|
+
if (selected.communications) {
|
|
4670
|
+
normalized.communications = selected.communications.map((channel) => {
|
|
4671
|
+
const previous = snapshot.communications?.find(
|
|
4672
|
+
(old) => old.rid === channel.rid && old.type === channel.type && old.value === channel.value && old.checkState === channel.checkState
|
|
4673
|
+
);
|
|
4674
|
+
return previous ? { ...previous, ...channel } : channel;
|
|
4675
|
+
});
|
|
4676
|
+
}
|
|
4677
|
+
if (Object.hasOwn(selected, "visitCard")) {
|
|
4678
|
+
const context = { ...snapshot, ...selected };
|
|
4679
|
+
normalizeContactVisitCardFieldsForWrite(context);
|
|
4680
|
+
normalized.visitCard = context.visitCard;
|
|
4681
|
+
}
|
|
4682
|
+
return normalized;
|
|
4683
|
+
}
|
|
4684
|
+
return {
|
|
4685
|
+
operation: "ContactsFacade.patch",
|
|
4686
|
+
basePath: "/api/v1/contacts",
|
|
4687
|
+
objectType: TorrowObjectTypeCode.Contact,
|
|
4688
|
+
discriminator: "ContactItem" /* ContactItem */,
|
|
4689
|
+
fields: {
|
|
4690
|
+
...commonItemPatchFields,
|
|
4691
|
+
firstName: { kind: "String" /* String */, nullable: true },
|
|
4692
|
+
lastName: { kind: "String" /* String */, nullable: true },
|
|
4693
|
+
middleName: { kind: "String" /* String */, nullable: true },
|
|
4694
|
+
company: { kind: "String" /* String */, nullable: true },
|
|
4695
|
+
position: { kind: "String" /* String */, nullable: true },
|
|
4696
|
+
description: { kind: "String" /* String */, nullable: true },
|
|
4697
|
+
birthday: { kind: "Date" /* Date */, nullable: true },
|
|
4698
|
+
gender: {
|
|
4699
|
+
kind: "String" /* String */,
|
|
4700
|
+
validate: (value) => Object.values(GenderValues).some((gender) => gender === value)
|
|
4701
|
+
},
|
|
4702
|
+
addresses: {
|
|
4703
|
+
kind: "Array" /* Array */,
|
|
4704
|
+
nullable: true,
|
|
4705
|
+
validate: arrayOf((value) => shape(value, addressShape))
|
|
4706
|
+
},
|
|
4707
|
+
communications: {
|
|
4708
|
+
kind: "Array" /* Array */,
|
|
4709
|
+
nullable: true,
|
|
4710
|
+
validate: arrayOf((value) => shape(value, communicationShape))
|
|
4711
|
+
},
|
|
4712
|
+
dates: {
|
|
4713
|
+
kind: "Array" /* Array */,
|
|
4714
|
+
nullable: true,
|
|
4715
|
+
validate: arrayOf((value) => shape(value, memorableDateShape))
|
|
4716
|
+
},
|
|
4717
|
+
photos: { kind: "Array" /* Array */, nullable: true, validate: arrayOf(file) },
|
|
4718
|
+
visitCard: { kind: "Object" /* Object */, validate: visitCard2 }
|
|
4719
|
+
},
|
|
4720
|
+
validateFields(fields) {
|
|
4721
|
+
selected = structuredClone(fields);
|
|
4722
|
+
try {
|
|
4723
|
+
normalizeContactStructuredArrayRidsForWrite(selected);
|
|
4724
|
+
normalizeContactCommunicationsForWrite(selected);
|
|
4725
|
+
} catch {
|
|
4726
|
+
throw itemPatchError("InvalidInput" /* InvalidInput */);
|
|
4727
|
+
}
|
|
4728
|
+
},
|
|
4729
|
+
assertSnapshot(snapshot) {
|
|
4730
|
+
original = snapshot;
|
|
4731
|
+
},
|
|
4732
|
+
equalField(key, before, _after, snapshot) {
|
|
4733
|
+
if (!Object.hasOwn(selected, key)) {
|
|
4734
|
+
return void 0;
|
|
4735
|
+
}
|
|
4736
|
+
if (key === "photos") {
|
|
4737
|
+
const previousIds = Array.isArray(before) ? before.map((photo) => record2(photo) ? { id: photo.id } : photo) : before;
|
|
4738
|
+
return comparable(previousIds) === comparable(selected.photos);
|
|
4739
|
+
}
|
|
4740
|
+
if (key !== "addresses" && key !== "communications" && key !== "dates" && key !== "visitCard") {
|
|
4741
|
+
return void 0;
|
|
4742
|
+
}
|
|
4743
|
+
return comparable(before) === comparable(normalizedFields(snapshot)[key]);
|
|
4744
|
+
},
|
|
4745
|
+
prepare(body) {
|
|
4746
|
+
return Object.assign(body, normalizedFields(original ?? body));
|
|
4747
|
+
},
|
|
4748
|
+
project: (value) => value,
|
|
4749
|
+
casRefusal: isItemPatchCasRefusal
|
|
4750
|
+
};
|
|
3859
4751
|
}
|
|
3860
4752
|
|
|
3861
4753
|
// ../../src/resources/contacts/ContactsFacade.ts
|
|
@@ -3873,6 +4765,10 @@ var ContactsFacade = class extends TorrowItemFacade {
|
|
|
3873
4765
|
generateContactId(ownerTorrowId) {
|
|
3874
4766
|
return this.generateItemId(ownerTorrowId);
|
|
3875
4767
|
}
|
|
4768
|
+
/** Частично изменяет разрешённые поля обычного/профильного контакта: полный GET и максимум один CAS PUT, без retry/readback. */
|
|
4769
|
+
patch(itemId, fields, options) {
|
|
4770
|
+
return patchItem(this.http, itemId, fields, options, createContactPatchAdapter());
|
|
4771
|
+
}
|
|
3876
4772
|
/** `POST /api/v1/contacts` */
|
|
3877
4773
|
create(body, options) {
|
|
3878
4774
|
const payload = this.withCreateDefaults(body);
|
|
@@ -3888,7 +4784,10 @@ var ContactsFacade = class extends TorrowItemFacade {
|
|
|
3888
4784
|
});
|
|
3889
4785
|
}
|
|
3890
4786
|
withCreateDefaults(body) {
|
|
3891
|
-
const payload = applyItemCreateDefaults(
|
|
4787
|
+
const payload = applyItemCreateDefaults(
|
|
4788
|
+
body,
|
|
4789
|
+
"ContactItem" /* ContactItem */
|
|
4790
|
+
);
|
|
3892
4791
|
normalizeContactStructuredArrayRidsForWrite(payload);
|
|
3893
4792
|
normalizeContactCommunicationsForWrite(payload);
|
|
3894
4793
|
normalizeContactVisitCardFieldsForWrite(payload);
|
|
@@ -4026,6 +4925,26 @@ var ContactsFacade = class extends TorrowItemFacade {
|
|
|
4026
4925
|
}
|
|
4027
4926
|
};
|
|
4028
4927
|
|
|
4928
|
+
// ../../src/resources/contexts/context-patch.ts
|
|
4929
|
+
function createContextPatchAdapter() {
|
|
4930
|
+
return {
|
|
4931
|
+
operation: "ContextsFacade.patch",
|
|
4932
|
+
basePath: "/api/v1/contexts",
|
|
4933
|
+
objectType: TorrowObjectTypeCode.Context,
|
|
4934
|
+
discriminator: "ContextItem" /* ContextItem */,
|
|
4935
|
+
fields: {
|
|
4936
|
+
...commonItemPatchFields,
|
|
4937
|
+
color: {
|
|
4938
|
+
kind: "String" /* String */,
|
|
4939
|
+
validate: (value) => typeof value === "string" && /^#[0-9a-fA-F]{6}$/.test(value)
|
|
4940
|
+
},
|
|
4941
|
+
description: { kind: "String" /* String */, nullable: true }
|
|
4942
|
+
},
|
|
4943
|
+
project: (value) => value,
|
|
4944
|
+
casRefusal: isItemPatchCasRefusal
|
|
4945
|
+
};
|
|
4946
|
+
}
|
|
4947
|
+
|
|
4029
4948
|
// ../../src/resources/contexts/ContextsFacade.ts
|
|
4030
4949
|
var BASE5 = "/api/v1/contexts";
|
|
4031
4950
|
var ContextsFacade = class extends TorrowItemFacade {
|
|
@@ -4037,6 +4956,10 @@ var ContextsFacade = class extends TorrowItemFacade {
|
|
|
4037
4956
|
generateContextId(ownerTorrowId) {
|
|
4038
4957
|
return this.generateItemId(ownerTorrowId);
|
|
4039
4958
|
}
|
|
4959
|
+
/** Частично изменяет name/image/color/description: полный GET и максимум один CAS PUT; пропущенные поля сохраняются, retry/readback отсутствуют. */
|
|
4960
|
+
patch(itemId, fields, options) {
|
|
4961
|
+
return patchItem(this.http, itemId, fields, options, createContextPatchAdapter());
|
|
4962
|
+
}
|
|
4040
4963
|
/** `POST /api/v1/contexts` */
|
|
4041
4964
|
create(body, options) {
|
|
4042
4965
|
const payload = applyItemCreateDefaults(body, "ContextItem" /* ContextItem */);
|
|
@@ -4128,6 +5051,57 @@ var ImagePreviewSizeValues = {
|
|
|
4128
5051
|
LargeSlider: "LargeSlider"
|
|
4129
5052
|
};
|
|
4130
5053
|
|
|
5054
|
+
// ../../src/resources/notes/note-patch.ts
|
|
5055
|
+
function isFileReference(value) {
|
|
5056
|
+
return value !== null && typeof value === "object" && !Array.isArray(value) && "id" in value && typeof value.id === "string" && value.id.length > 0;
|
|
5057
|
+
}
|
|
5058
|
+
function projectNotePatchItem(item) {
|
|
5059
|
+
if (item.data != null && typeof item.data !== "string" || item.files != null && (!Array.isArray(item.files) || !item.files.every(isFileReference)) || item.image != null && !isFileReference(item.image)) {
|
|
5060
|
+
throw itemPatchError("InvalidResponse" /* InvalidResponse */);
|
|
5061
|
+
}
|
|
5062
|
+
return item;
|
|
5063
|
+
}
|
|
5064
|
+
function assertNotePatchSnapshot(item) {
|
|
5065
|
+
projectNotePatchItem(item);
|
|
5066
|
+
if (item.name == null || item.noteType == null || item.noteType === NoteTypeValues.Unknown || item.noteType === NoteTypeValues.ServiceSpecification) {
|
|
5067
|
+
throw itemPatchError("InsufficientData" /* InsufficientData */);
|
|
5068
|
+
}
|
|
5069
|
+
if (typeof item.name !== "string" || item.name.length === 0 || !Object.values(NoteTypeValues).some((type) => type === item.noteType)) {
|
|
5070
|
+
throw itemPatchError("InvalidResponse" /* InvalidResponse */);
|
|
5071
|
+
}
|
|
5072
|
+
}
|
|
5073
|
+
function createNotePatchAdapter() {
|
|
5074
|
+
return {
|
|
5075
|
+
operation: "NotesFacade.patch",
|
|
5076
|
+
basePath: "/api/v1/notes",
|
|
5077
|
+
objectType: TorrowObjectTypeCode.Note,
|
|
5078
|
+
discriminator: "NoteItem" /* NoteItem */,
|
|
5079
|
+
fields: {
|
|
5080
|
+
...commonItemPatchFields,
|
|
5081
|
+
noteType: {
|
|
5082
|
+
kind: "String" /* String */,
|
|
5083
|
+
validate: (value) => Object.values(NoteTypeValues).some((type) => type === value) && value !== NoteTypeValues.Unknown && value !== NoteTypeValues.ServiceSpecification
|
|
5084
|
+
},
|
|
5085
|
+
data: { kind: "String" /* String */, nullable: true },
|
|
5086
|
+
files: {
|
|
5087
|
+
kind: "Array" /* Array */,
|
|
5088
|
+
validate: (value) => Array.isArray(value) && value.every(
|
|
5089
|
+
(file2) => file2 !== null && typeof file2 === "object" && Object.keys(file2).length === 1 && "id" in file2 && typeof file2.id === "string" && file2.id.length > 0
|
|
5090
|
+
)
|
|
5091
|
+
},
|
|
5092
|
+
imagePreviewSize: {
|
|
5093
|
+
kind: "String" /* String */,
|
|
5094
|
+
validate: (value) => Object.values(ImagePreviewSizeValues).some((size) => size === value)
|
|
5095
|
+
}
|
|
5096
|
+
},
|
|
5097
|
+
// URL/имя файла принадлежат серверу: отсутствие изменения определяется ссылками id.
|
|
5098
|
+
equalField: (key, before, after) => key === "files" && Array.isArray(before) && Array.isArray(after) ? before.length === after.length && before.every((file2, index) => file2.id === after[index]?.id) : void 0,
|
|
5099
|
+
assertSnapshot: assertNotePatchSnapshot,
|
|
5100
|
+
project: projectNotePatchItem,
|
|
5101
|
+
casRefusal: isItemPatchCasRefusal
|
|
5102
|
+
};
|
|
5103
|
+
}
|
|
5104
|
+
|
|
4131
5105
|
// ../../src/resources/notes/NotesFacade.ts
|
|
4132
5106
|
var BASE6 = "/api/v1/notes";
|
|
4133
5107
|
var DEFAULT_NOTE_NAME = "Untitled note";
|
|
@@ -4140,6 +5114,10 @@ var NotesFacade = class extends TorrowItemFacade {
|
|
|
4140
5114
|
generateNoteId(ownerTorrowId) {
|
|
4141
5115
|
return this.generateItemId(ownerTorrowId);
|
|
4142
5116
|
}
|
|
5117
|
+
/** Частично изменяет заметку через GET и максимум один CAS PUT; исходный текст не преобразуется. */
|
|
5118
|
+
patch(itemId, fields, options) {
|
|
5119
|
+
return patchItem(this.http, itemId, fields, options, createNotePatchAdapter());
|
|
5120
|
+
}
|
|
4143
5121
|
/** `POST /api/v1/notes` */
|
|
4144
5122
|
create(body, options) {
|
|
4145
5123
|
const payload = this.withCreateDefaults(body);
|
|
@@ -4283,9 +5261,7 @@ var TorrowItemTypeValues = {
|
|
|
4283
5261
|
LoyaltyCard: "LoyaltyCard",
|
|
4284
5262
|
LoyaltySystem: "LoyaltySystem"
|
|
4285
5263
|
};
|
|
4286
|
-
var TorrowItemTypeValueList = Object.values(
|
|
4287
|
-
TorrowItemTypeValues
|
|
4288
|
-
);
|
|
5264
|
+
var TorrowItemTypeValueList = Object.values(TorrowItemTypeValues);
|
|
4289
5265
|
function isTorrowItemType(value) {
|
|
4290
5266
|
return TorrowItemTypeValueList.includes(value);
|
|
4291
5267
|
}
|
|
@@ -4297,10 +5273,7 @@ function getTorrowItemDomain(itemType) {
|
|
|
4297
5273
|
function getTorrowItemTypeFromTorrowId(torrowId) {
|
|
4298
5274
|
const objectType = getTorrowObjectTypeFromTorrowId(torrowId);
|
|
4299
5275
|
if (!isTorrowItemType(objectType)) {
|
|
4300
|
-
throw new TorrowIdError(
|
|
4301
|
-
"unsupported-item-type",
|
|
4302
|
-
`Torrow object type ${objectType} is not an item type`
|
|
4303
|
-
);
|
|
5276
|
+
throw new TorrowIdError("unsupported-item-type", `Torrow object type ${objectType} is not an item type`);
|
|
4304
5277
|
}
|
|
4305
5278
|
return objectType;
|
|
4306
5279
|
}
|
|
@@ -4312,10 +5285,7 @@ function getTorrowItemTypeFromTorrowIds(torrowIds) {
|
|
|
4312
5285
|
const itemType = getTorrowItemTypeFromTorrowId(firstId);
|
|
4313
5286
|
for (const torrowId of torrowIds.slice(1)) {
|
|
4314
5287
|
if (getTorrowItemTypeFromTorrowId(torrowId) !== itemType) {
|
|
4315
|
-
throw new TorrowIdError(
|
|
4316
|
-
"mixed-item-types",
|
|
4317
|
-
"All Torrow IDs must have the same item type"
|
|
4318
|
-
);
|
|
5288
|
+
throw new TorrowIdError("mixed-item-types", "All Torrow IDs must have the same item type");
|
|
4319
5289
|
}
|
|
4320
5290
|
}
|
|
4321
5291
|
return itemType;
|
|
@@ -4461,9 +5431,11 @@ function contextualizeBehaviorError(cause, operation, failureAt, state) {
|
|
|
4461
5431
|
});
|
|
4462
5432
|
}
|
|
4463
5433
|
function isBehaviorCasRefusal(cause) {
|
|
4464
|
-
if (!(cause instanceof TorrowSdkError) || cause.request !== "Started" /* Started */ || cause.http?.status !== 500)
|
|
5434
|
+
if (!(cause instanceof TorrowSdkError) || cause.request !== "Started" /* Started */ || cause.http?.status !== 500) {
|
|
5435
|
+
return false;
|
|
5436
|
+
}
|
|
4465
5437
|
const body = cause.getSensitiveDetails().body;
|
|
4466
|
-
return body !== null && typeof body === "object" && "name" in body && body.name === "OBJECT_HAS_WRONG_VERSION" /*
|
|
5438
|
+
return body !== null && typeof body === "object" && "name" in body && body.name === "OBJECT_HAS_WRONG_VERSION" /* WrongVersion */ && "code" in body && (body.code === 208213 /* VersionConflict */ || body.code === String(208213 /* VersionConflict */));
|
|
4467
5439
|
}
|
|
4468
5440
|
|
|
4469
5441
|
// ../../src/resources/common/implicit-tag-params.ts
|
|
@@ -4562,21 +5534,29 @@ function splitBySuffix(tag, suffix, caseInsensitive = false) {
|
|
|
4562
5534
|
if (caseInsensitive) {
|
|
4563
5535
|
const lowerTag = tag.toLowerCase();
|
|
4564
5536
|
const lowerSuffix = suffix.toLowerCase();
|
|
4565
|
-
if (!lowerTag.endsWith(lowerSuffix))
|
|
5537
|
+
if (!lowerTag.endsWith(lowerSuffix)) {
|
|
5538
|
+
return void 0;
|
|
5539
|
+
}
|
|
4566
5540
|
return tag.slice(0, tag.length - suffix.length);
|
|
4567
5541
|
}
|
|
4568
|
-
if (!tag.endsWith(suffix))
|
|
5542
|
+
if (!tag.endsWith(suffix)) {
|
|
5543
|
+
return void 0;
|
|
5544
|
+
}
|
|
4569
5545
|
return tag.slice(0, tag.length - suffix.length);
|
|
4570
5546
|
}
|
|
4571
5547
|
function firstPrefixBySuffix(tags, suffix, options) {
|
|
4572
5548
|
for (const tag of tags) {
|
|
4573
5549
|
const prefix2 = splitBySuffix(tag, suffix, options?.caseInsensitive ?? false);
|
|
4574
|
-
if (prefix2 !== void 0)
|
|
5550
|
+
if (prefix2 !== void 0) {
|
|
5551
|
+
return prefix2;
|
|
5552
|
+
}
|
|
4575
5553
|
}
|
|
4576
5554
|
return void 0;
|
|
4577
5555
|
}
|
|
4578
5556
|
function toPositiveInt(raw) {
|
|
4579
|
-
if (!raw)
|
|
5557
|
+
if (!raw) {
|
|
5558
|
+
return void 0;
|
|
5559
|
+
}
|
|
4580
5560
|
const value = Number.parseInt(raw.trim(), 10);
|
|
4581
5561
|
return Number.isFinite(value) && value > 0 ? value : void 0;
|
|
4582
5562
|
}
|
|
@@ -4586,7 +5566,9 @@ function parseAutoStartDelay(tag) {
|
|
|
4586
5566
|
const match = tag.match(new RegExp(`^(\\d+):${suffix}$`));
|
|
4587
5567
|
if (match?.[1]) {
|
|
4588
5568
|
const sec = Number.parseInt(match[1], 10);
|
|
4589
|
-
if (Number.isFinite(sec) && sec > 0)
|
|
5569
|
+
if (Number.isFinite(sec) && sec > 0) {
|
|
5570
|
+
return sec;
|
|
5571
|
+
}
|
|
4590
5572
|
}
|
|
4591
5573
|
}
|
|
4592
5574
|
return void 0;
|
|
@@ -4594,21 +5576,33 @@ function parseAutoStartDelay(tag) {
|
|
|
4594
5576
|
function parseAgreementIndexedTag(tag, baseSuffix) {
|
|
4595
5577
|
const escaped = baseSuffix.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
4596
5578
|
const match = tag.match(new RegExp(`^(.*)${escaped}(\\d+)$`));
|
|
4597
|
-
if (!match?.[1] || !match[2])
|
|
5579
|
+
if (!match?.[1] || !match[2]) {
|
|
5580
|
+
return void 0;
|
|
5581
|
+
}
|
|
4598
5582
|
const index = Number.parseInt(match[2], 10);
|
|
4599
|
-
if (!Number.isFinite(index) || index <= 0)
|
|
5583
|
+
if (!Number.isFinite(index) || index <= 0) {
|
|
5584
|
+
return void 0;
|
|
5585
|
+
}
|
|
4600
5586
|
return { index, value: match[1] };
|
|
4601
5587
|
}
|
|
4602
5588
|
function decodeAgreementLink(linkRaw) {
|
|
4603
5589
|
const trimmed = linkRaw.trim();
|
|
4604
|
-
if (trimmed.startsWith("https//"))
|
|
4605
|
-
|
|
5590
|
+
if (trimmed.startsWith("https//")) {
|
|
5591
|
+
return `https://${trimmed.slice("https//".length)}`;
|
|
5592
|
+
}
|
|
5593
|
+
if (trimmed.startsWith("http//")) {
|
|
5594
|
+
return `http://${trimmed.slice("http//".length)}`;
|
|
5595
|
+
}
|
|
4606
5596
|
return trimmed;
|
|
4607
5597
|
}
|
|
4608
5598
|
function encodeAgreementLink(linkRaw) {
|
|
4609
5599
|
const trimmed = linkRaw.trim();
|
|
4610
|
-
if (trimmed.startsWith("https://"))
|
|
4611
|
-
|
|
5600
|
+
if (trimmed.startsWith("https://")) {
|
|
5601
|
+
return `https//${trimmed.slice("https://".length)}`;
|
|
5602
|
+
}
|
|
5603
|
+
if (trimmed.startsWith("http://")) {
|
|
5604
|
+
return `http//${trimmed.slice("http://".length)}`;
|
|
5605
|
+
}
|
|
4612
5606
|
return trimmed;
|
|
4613
5607
|
}
|
|
4614
5608
|
function parseServiceImplicitTagParams(tags) {
|
|
@@ -4616,25 +5610,33 @@ function parseServiceImplicitTagParams(tags) {
|
|
|
4616
5610
|
const result = {};
|
|
4617
5611
|
const mutable = result;
|
|
4618
5612
|
for (const config of Object.values(SERVICE_IMPLICIT_TAG_REGISTRY)) {
|
|
4619
|
-
if (config.kind === "string" || config.kind === "positiveInt") {
|
|
5613
|
+
if (config.kind === "string" /* String */ || config.kind === "positiveInt" /* PositiveInt */) {
|
|
4620
5614
|
const raw = config.suffixes.map((suffix) => firstPrefixBySuffix(safeTags, suffix, { caseInsensitive: config.caseInsensitive ?? false })).find((x) => x !== void 0);
|
|
4621
|
-
if (config.kind === "string") {
|
|
4622
|
-
if (raw?.trim())
|
|
5615
|
+
if (config.kind === "string" /* String */) {
|
|
5616
|
+
if (raw?.trim()) {
|
|
5617
|
+
mutable[config.field] = raw.trim();
|
|
5618
|
+
}
|
|
4623
5619
|
} else {
|
|
4624
5620
|
const value = toPositiveInt(raw);
|
|
4625
|
-
if (value !== void 0)
|
|
5621
|
+
if (value !== void 0) {
|
|
5622
|
+
mutable[config.field] = value;
|
|
5623
|
+
}
|
|
4626
5624
|
}
|
|
4627
5625
|
}
|
|
4628
|
-
if (config.kind === "exactFlag") {
|
|
5626
|
+
if (config.kind === "exactFlag" /* ExactFlag */) {
|
|
4629
5627
|
const hasAny = safeTags.some((tag) => config.tokens.some((token) => tag === token));
|
|
4630
|
-
if (hasAny)
|
|
5628
|
+
if (hasAny) {
|
|
5629
|
+
mutable[config.field] = true;
|
|
5630
|
+
}
|
|
4631
5631
|
}
|
|
4632
5632
|
}
|
|
4633
5633
|
let autoStartNotificationDelaySeconds = result.autoStartNotificationDelaySeconds;
|
|
4634
5634
|
if (autoStartNotificationDelaySeconds === void 0) {
|
|
4635
5635
|
for (const tag of safeTags) {
|
|
4636
5636
|
autoStartNotificationDelaySeconds = parseAutoStartDelay(tag);
|
|
4637
|
-
if (autoStartNotificationDelaySeconds !== void 0)
|
|
5637
|
+
if (autoStartNotificationDelaySeconds !== void 0) {
|
|
5638
|
+
break;
|
|
5639
|
+
}
|
|
4638
5640
|
}
|
|
4639
5641
|
}
|
|
4640
5642
|
if (autoStartNotificationDelaySeconds !== void 0) {
|
|
@@ -4661,18 +5663,20 @@ function parseServiceImplicitTagParams(tags) {
|
|
|
4661
5663
|
}
|
|
4662
5664
|
}
|
|
4663
5665
|
const agreementItems = [...agreementsMap.values()].sort((a, b) => a.index - b.index).filter((x) => x.text || x.link);
|
|
4664
|
-
if (agreementItems.length)
|
|
5666
|
+
if (agreementItems.length) {
|
|
5667
|
+
mutable.agreementItems = agreementItems;
|
|
5668
|
+
}
|
|
4665
5669
|
return result;
|
|
4666
5670
|
}
|
|
4667
5671
|
function buildServiceImplicitTags(params, options) {
|
|
4668
5672
|
const tags = [];
|
|
4669
5673
|
const singleValueConfigs = Object.values(SERVICE_IMPLICIT_TAG_REGISTRY).filter(
|
|
4670
|
-
(x) => x.kind === "string" || x.kind === "positiveInt"
|
|
5674
|
+
(x) => x.kind === "string" /* String */ || x.kind === "positiveInt" /* PositiveInt */
|
|
4671
5675
|
);
|
|
4672
5676
|
for (const config of singleValueConfigs) {
|
|
4673
5677
|
const value = params[config.field];
|
|
4674
5678
|
const writeSuffix = config.suffixes[0];
|
|
4675
|
-
if (config.kind === "string") {
|
|
5679
|
+
if (config.kind === "string" /* String */) {
|
|
4676
5680
|
if (typeof value === "string" && value.trim()) {
|
|
4677
5681
|
tags.push(`${value.trim()}${writeSuffix}`);
|
|
4678
5682
|
}
|
|
@@ -4681,11 +5685,11 @@ function buildServiceImplicitTags(params, options) {
|
|
|
4681
5685
|
}
|
|
4682
5686
|
}
|
|
4683
5687
|
for (const agreement of params.agreementItems ?? []) {
|
|
4684
|
-
if (!isPositiveInt(agreement.index))
|
|
5688
|
+
if (!isPositiveInt(agreement.index)) {
|
|
5689
|
+
continue;
|
|
5690
|
+
}
|
|
4685
5691
|
if (agreement.text?.trim()) {
|
|
4686
|
-
tags.push(
|
|
4687
|
-
`${agreement.text.trim()}${SERVICE_IMPLICIT_TAG_REGISTRY.agreementItems.textSuffix}${agreement.index}`
|
|
4688
|
-
);
|
|
5692
|
+
tags.push(`${agreement.text.trim()}${SERVICE_IMPLICIT_TAG_REGISTRY.agreementItems.textSuffix}${agreement.index}`);
|
|
4689
5693
|
}
|
|
4690
5694
|
if (agreement.link?.trim()) {
|
|
4691
5695
|
tags.push(
|
|
@@ -4705,20 +5709,26 @@ function buildServiceImplicitTags(params, options) {
|
|
|
4705
5709
|
}
|
|
4706
5710
|
function isImplicitServiceTag(tag) {
|
|
4707
5711
|
for (const config of Object.values(SERVICE_IMPLICIT_TAG_REGISTRY)) {
|
|
4708
|
-
if (config.kind === "string" || config.kind === "positiveInt") {
|
|
5712
|
+
if (config.kind === "string" /* String */ || config.kind === "positiveInt" /* PositiveInt */) {
|
|
4709
5713
|
const matched = config.suffixes.some(
|
|
4710
5714
|
(suffix) => splitBySuffix(tag, suffix, config.caseInsensitive ?? false) !== void 0
|
|
4711
5715
|
);
|
|
4712
|
-
if (matched)
|
|
5716
|
+
if (matched) {
|
|
5717
|
+
return true;
|
|
5718
|
+
}
|
|
4713
5719
|
}
|
|
4714
|
-
if (config.kind === "exactFlag") {
|
|
4715
|
-
if (config.tokens.some((token) => tag === token))
|
|
5720
|
+
if (config.kind === "exactFlag" /* ExactFlag */) {
|
|
5721
|
+
if (config.tokens.some((token) => tag === token)) {
|
|
5722
|
+
return true;
|
|
5723
|
+
}
|
|
4716
5724
|
}
|
|
4717
|
-
if (config.kind === "autoStart") {
|
|
5725
|
+
if (config.kind === "autoStart" /* AutoStart */) {
|
|
4718
5726
|
const isAutoStart = config.suffixes.some((suffix) => tag.match(new RegExp(`^\\d+:${suffix}$`)) !== null);
|
|
4719
|
-
if (isAutoStart)
|
|
5727
|
+
if (isAutoStart) {
|
|
5728
|
+
return true;
|
|
5729
|
+
}
|
|
4720
5730
|
}
|
|
4721
|
-
if (config.kind === "agreement") {
|
|
5731
|
+
if (config.kind === "agreement" /* Agreement */) {
|
|
4722
5732
|
if (parseAgreementIndexedTag(tag, config.textSuffix) !== void 0 || parseAgreementIndexedTag(tag, config.linkSuffix) !== void 0) {
|
|
4723
5733
|
return true;
|
|
4724
5734
|
}
|
|
@@ -4738,8 +5748,12 @@ function parseResourceBehaviorSettings(tags) {
|
|
|
4738
5748
|
const marginTimeSec = toPositiveInt(firstPrefixBySuffix(tags ?? [], SERVICE_IMPLICIT_TAG_SUFFIX.marginTime));
|
|
4739
5749
|
const lockId = toPositiveInt(firstPrefixBySuffix(tags ?? [], SERVICE_IMPLICIT_TAG_SUFFIX.lockId));
|
|
4740
5750
|
const result = {};
|
|
4741
|
-
if (marginTimeSec !== void 0)
|
|
4742
|
-
|
|
5751
|
+
if (marginTimeSec !== void 0) {
|
|
5752
|
+
result.marginTimeSec = marginTimeSec;
|
|
5753
|
+
}
|
|
5754
|
+
if (lockId !== void 0) {
|
|
5755
|
+
result.lockId = lockId;
|
|
5756
|
+
}
|
|
4743
5757
|
return result;
|
|
4744
5758
|
}
|
|
4745
5759
|
function mergeResourceBehaviorTags(baseTags, settings) {
|
|
@@ -4757,6 +5771,44 @@ function mergeResourceBehaviorTags(baseTags, settings) {
|
|
|
4757
5771
|
return [...nonManaged, ...managed];
|
|
4758
5772
|
}
|
|
4759
5773
|
|
|
5774
|
+
// ../../src/resources/common/payment-provider-type.ts
|
|
5775
|
+
var PaymentProviderTypeValues = /* @__PURE__ */ ((PaymentProviderTypeValues2) => {
|
|
5776
|
+
PaymentProviderTypeValues2["Unknown"] = "UnknownPaymentProviderType";
|
|
5777
|
+
PaymentProviderTypeValues2["Cash"] = "Cash";
|
|
5778
|
+
PaymentProviderTypeValues2["CustomLink"] = "CustomLink";
|
|
5779
|
+
PaymentProviderTypeValues2["YooMoney"] = "YooMoney";
|
|
5780
|
+
PaymentProviderTypeValues2["QiwiP2P"] = "QiwiP2P";
|
|
5781
|
+
PaymentProviderTypeValues2["QiwiB2B"] = "QiwiB2B";
|
|
5782
|
+
PaymentProviderTypeValues2["YooKassa"] = "YooKassa";
|
|
5783
|
+
PaymentProviderTypeValues2["Sberbank"] = "Sberbank";
|
|
5784
|
+
PaymentProviderTypeValues2["Uralsib"] = "Uralsib";
|
|
5785
|
+
PaymentProviderTypeValues2["Alfabank"] = "Alfabank";
|
|
5786
|
+
PaymentProviderTypeValues2["RoboKassa"] = "RoboKassa";
|
|
5787
|
+
PaymentProviderTypeValues2["PayKeeper"] = "PayKeeper";
|
|
5788
|
+
PaymentProviderTypeValues2["GateLine"] = "GateLine";
|
|
5789
|
+
PaymentProviderTypeValues2["Tinkoff"] = "Tinkoff";
|
|
5790
|
+
PaymentProviderTypeValues2["Prodamus"] = "Prodamus";
|
|
5791
|
+
PaymentProviderTypeValues2["Mock"] = "MockPaymentProvider";
|
|
5792
|
+
return PaymentProviderTypeValues2;
|
|
5793
|
+
})(PaymentProviderTypeValues || {});
|
|
5794
|
+
|
|
5795
|
+
// ../../src/resources/common/usage-condition-type.ts
|
|
5796
|
+
var UsageConditionTypeWireValues = /* @__PURE__ */ ((UsageConditionTypeWireValues2) => {
|
|
5797
|
+
UsageConditionTypeWireValues2["Unknown"] = "UnknownUsageConditionType";
|
|
5798
|
+
UsageConditionTypeWireValues2["None"] = "None";
|
|
5799
|
+
UsageConditionTypeWireValues2["Exclusion"] = "Exclusion";
|
|
5800
|
+
UsageConditionTypeWireValues2["Additional"] = "Additional";
|
|
5801
|
+
return UsageConditionTypeWireValues2;
|
|
5802
|
+
})(UsageConditionTypeWireValues || {});
|
|
5803
|
+
var UsageConditionTypeValues = {
|
|
5804
|
+
/** Условие использования отсутствует. */
|
|
5805
|
+
None: `${"None" /* None */}`,
|
|
5806
|
+
/** Исключающее условие использования. */
|
|
5807
|
+
Exclusion: `${"Exclusion" /* Exclusion */}`,
|
|
5808
|
+
/** Дополнительное условие использования. */
|
|
5809
|
+
Additional: `${"Additional" /* Additional */}`
|
|
5810
|
+
};
|
|
5811
|
+
|
|
4760
5812
|
// ../../src/resources/resources/types.ts
|
|
4761
5813
|
var UsageTypeValues = {
|
|
4762
5814
|
Unknown: "UnknownUsageType",
|
|
@@ -4766,11 +5818,207 @@ var UsageTypeValues = {
|
|
|
4766
5818
|
Payment: "Payment",
|
|
4767
5819
|
Ticket: "Ticket"
|
|
4768
5820
|
};
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
5821
|
+
|
|
5822
|
+
// ../../src/resources/resources/resource-payment-patch.ts
|
|
5823
|
+
var providers = {
|
|
5824
|
+
["Cash" /* Cash */]: { discriminator: "CashPaymentParameters" /* CashPaymentParameters */, strings: [] },
|
|
5825
|
+
["CustomLink" /* CustomLink */]: {
|
|
5826
|
+
discriminator: "CustomLinkPaymentParameters" /* CustomLinkPaymentParameters */,
|
|
5827
|
+
strings: ["url"]
|
|
5828
|
+
},
|
|
5829
|
+
["YooMoney" /* YooMoney */]: {
|
|
5830
|
+
discriminator: "YooMoneyPaymentParameters" /* YooMoneyPaymentParameters */,
|
|
5831
|
+
strings: ["accountId", "notificationSecret"]
|
|
5832
|
+
},
|
|
5833
|
+
["QiwiP2P" /* QiwiP2P */]: {
|
|
5834
|
+
discriminator: "QiwiP2PPaymentParameters" /* QiwiP2PPaymentParameters */,
|
|
5835
|
+
strings: ["publicKey", "privateKey"]
|
|
5836
|
+
},
|
|
5837
|
+
["YooKassa" /* YooKassa */]: {
|
|
5838
|
+
discriminator: "YooKassaPaymentParameters" /* YooKassaPaymentParameters */,
|
|
5839
|
+
strings: ["shopId", "secretKey", "taxation"]
|
|
5840
|
+
},
|
|
5841
|
+
["Sberbank" /* Sberbank */]: {
|
|
5842
|
+
discriminator: "SberbankPaymentParameters" /* SberbankPaymentParameters */,
|
|
5843
|
+
strings: ["username", "password"],
|
|
5844
|
+
booleans: ["isTest"]
|
|
5845
|
+
},
|
|
5846
|
+
["Alfabank" /* Alfabank */]: {
|
|
5847
|
+
discriminator: "AlfabankPaymentParameters" /* AlfabankPaymentParameters */,
|
|
5848
|
+
strings: ["username", "password"],
|
|
5849
|
+
booleans: ["isTest"]
|
|
5850
|
+
},
|
|
5851
|
+
["Uralsib" /* Uralsib */]: {
|
|
5852
|
+
discriminator: "UralsibPaymentParameters" /* UralsibPaymentParameters */,
|
|
5853
|
+
strings: ["username", "password"],
|
|
5854
|
+
booleans: ["isTest"]
|
|
5855
|
+
},
|
|
5856
|
+
["RoboKassa" /* RoboKassa */]: {
|
|
5857
|
+
discriminator: "RoboKassaPaymentParameters" /* RoboKassaPaymentParameters */,
|
|
5858
|
+
strings: ["shopName", "password1", "password2"],
|
|
5859
|
+
booleans: ["isTest"]
|
|
5860
|
+
},
|
|
5861
|
+
["PayKeeper" /* PayKeeper */]: {
|
|
5862
|
+
discriminator: "PaykeeperPaymentParameters" /* PaykeeperPaymentParameters */,
|
|
5863
|
+
strings: ["username", "password", "url"],
|
|
5864
|
+
booleans: ["isTest"]
|
|
5865
|
+
},
|
|
5866
|
+
["Prodamus" /* Prodamus */]: {
|
|
5867
|
+
discriminator: "ProdamusPaymentParameters" /* ProdamusPaymentParameters */,
|
|
5868
|
+
strings: ["secretKey", "url"],
|
|
5869
|
+
booleans: ["isTest"]
|
|
5870
|
+
},
|
|
5871
|
+
["Tinkoff" /* Tinkoff */]: {
|
|
5872
|
+
discriminator: "TinkoffPaymentParameters" /* TinkoffPaymentParameters */,
|
|
5873
|
+
strings: ["terminal", "password", "taxation", "split"]
|
|
5874
|
+
},
|
|
5875
|
+
["MockPaymentProvider" /* Mock */]: {
|
|
5876
|
+
discriminator: "MockPaymentProviderParameters" /* MockPaymentProviderParameters */,
|
|
5877
|
+
strings: ["redirectBaseUrl"]
|
|
5878
|
+
}
|
|
5879
|
+
};
|
|
5880
|
+
function record3(value) {
|
|
5881
|
+
return value !== null && typeof value === "object" && !Array.isArray(value) && !(value instanceof Date);
|
|
5882
|
+
}
|
|
5883
|
+
function isResourcePaymentPatch(value) {
|
|
5884
|
+
if (!record3(value) || Object.keys(value).some(
|
|
5885
|
+
(key) => !["paymentProviderType", "parameters", "numeratorId", "waitForConfirmation"].includes(key)
|
|
5886
|
+
)) {
|
|
5887
|
+
return false;
|
|
5888
|
+
}
|
|
5889
|
+
if (!Object.values(PaymentProviderTypeValues).some((provider2) => provider2 === value.paymentProviderType)) {
|
|
5890
|
+
return false;
|
|
5891
|
+
}
|
|
5892
|
+
if (value.numeratorId != null && (typeof value.numeratorId !== "string" || value.numeratorId.length === 0)) {
|
|
5893
|
+
return false;
|
|
5894
|
+
}
|
|
5895
|
+
if (value.waitForConfirmation != null && typeof value.waitForConfirmation !== "boolean") {
|
|
5896
|
+
return false;
|
|
5897
|
+
}
|
|
5898
|
+
const provider = value.paymentProviderType;
|
|
5899
|
+
const shape2 = providers[provider];
|
|
5900
|
+
const guarded = provider === "Cash" /* Cash */ || provider === "MockPaymentProvider" /* Mock */ || provider === "YooKassa" /* YooKassa */ || shape2 === void 0;
|
|
5901
|
+
if (value.parameters == null) {
|
|
5902
|
+
return guarded;
|
|
5903
|
+
}
|
|
5904
|
+
if (!record3(value.parameters)) {
|
|
5905
|
+
return false;
|
|
5906
|
+
}
|
|
5907
|
+
const parameters = value.parameters;
|
|
5908
|
+
if (shape2 && provider !== "MockPaymentProvider" /* Mock */ && shape2.strings.some(
|
|
5909
|
+
(key) => !(provider === "Tinkoff" /* Tinkoff */ && key === "split") && typeof parameters[key] !== "string"
|
|
5910
|
+
)) {
|
|
5911
|
+
return false;
|
|
5912
|
+
}
|
|
5913
|
+
return Object.entries(parameters).every(([key, member]) => {
|
|
5914
|
+
if (["text", "beforePayMessage", "afterPayMessage"].includes(key)) {
|
|
5915
|
+
return member === null || typeof member === "string";
|
|
5916
|
+
}
|
|
5917
|
+
if (shape2?.strings.includes(key)) {
|
|
5918
|
+
return typeof member === "string";
|
|
5919
|
+
}
|
|
5920
|
+
if (shape2?.booleans?.includes(key)) {
|
|
5921
|
+
return typeof member === "boolean";
|
|
5922
|
+
}
|
|
5923
|
+
if (provider === "MockPaymentProvider" /* Mock */ && key === "errorResponceCode") {
|
|
5924
|
+
return member === null || typeof member === "number" && Number.isInteger(member) && member >= -2147483648 && member <= 2147483647;
|
|
5925
|
+
}
|
|
5926
|
+
if (provider === "MockPaymentProvider" /* Mock */ && key === "createAfter") {
|
|
5927
|
+
return member === null || member instanceof Date && Number.isFinite(member.getTime());
|
|
5928
|
+
}
|
|
5929
|
+
return false;
|
|
5930
|
+
});
|
|
5931
|
+
}
|
|
5932
|
+
function paymentPatchToWire(value) {
|
|
5933
|
+
if (!record3(value) || !record3(value.parameters)) {
|
|
5934
|
+
return value;
|
|
5935
|
+
}
|
|
5936
|
+
const shape2 = providers[value.paymentProviderType];
|
|
5937
|
+
return shape2 ? { ...value, parameters: { ...value.parameters, discriminator: shape2.discriminator } } : value;
|
|
5938
|
+
}
|
|
5939
|
+
function prepareResourcePaymentPatch(body, fields) {
|
|
5940
|
+
if (Object.hasOwn(fields, "paymentProperties")) {
|
|
5941
|
+
Object.assign(body, { paymentProperties: paymentPatchToWire(fields.paymentProperties) });
|
|
5942
|
+
}
|
|
5943
|
+
return body;
|
|
5944
|
+
}
|
|
5945
|
+
function equalResourcePaymentPatchField(key, before, after) {
|
|
5946
|
+
if (key !== "paymentProperties") {
|
|
5947
|
+
return void 0;
|
|
5948
|
+
}
|
|
5949
|
+
const expected = paymentPatchToWire(after);
|
|
5950
|
+
if (record3(before) && record3(expected) && before.paymentProviderType === "MockPaymentProvider" /* Mock */ && expected.paymentProviderType === "MockPaymentProvider" /* Mock */ && record3(before.parameters) && record3(expected.parameters) && expected.parameters.createAfter instanceof Date && typeof before.parameters.createAfter === "string") {
|
|
5951
|
+
const date2 = new Date(before.parameters.createAfter);
|
|
5952
|
+
if (!Number.isFinite(date2.getTime())) {
|
|
5953
|
+
return false;
|
|
5954
|
+
}
|
|
5955
|
+
return equalItemPatchValue({ ...before, parameters: { ...before.parameters, createAfter: date2 } }, expected);
|
|
5956
|
+
}
|
|
5957
|
+
return equalItemPatchValue(before, expected);
|
|
5958
|
+
}
|
|
5959
|
+
|
|
5960
|
+
// ../../src/resources/resources/resource-patch.ts
|
|
5961
|
+
function amount(value) {
|
|
5962
|
+
return isItemPatchDtoObject(value) && Object.entries(value).every(([key, member]) => {
|
|
5963
|
+
if (key === "inventoryDate") {
|
|
5964
|
+
return member === null || member instanceof Date && Number.isFinite(member.getTime());
|
|
5965
|
+
}
|
|
5966
|
+
if (key === "measure" || key === "digitsInMeasure") {
|
|
5967
|
+
return member === null || isItemPatchInt32(member);
|
|
5968
|
+
}
|
|
5969
|
+
return ["totalAmount", "maxAmount", "minAmount", "firstValue", "plusStep", "minusStep"].includes(key) && (member === null || typeof member === "number" && Number.isFinite(member));
|
|
5970
|
+
});
|
|
5971
|
+
}
|
|
5972
|
+
function condition(value) {
|
|
5973
|
+
return isItemPatchDtoObject(value) && Object.keys(value).every((key) => key === "usageConditionType" || key === "conditionIdList") && (value.usageConditionType === void 0 || Object.values(UsageConditionTypeWireValues).some((type) => type === value.usageConditionType)) && (value.conditionIdList == null || Array.isArray(value.conditionIdList) && value.conditionIdList.every(isItemPatchReferenceId));
|
|
5974
|
+
}
|
|
5975
|
+
function assertResourcePatchSnapshot(item) {
|
|
5976
|
+
if (item.name == null) {
|
|
5977
|
+
throw itemPatchError("InsufficientData" /* InsufficientData */);
|
|
5978
|
+
}
|
|
5979
|
+
if (typeof item.name !== "string" || item.name.length === 0 || item.tags != null && (!Array.isArray(item.tags) || item.tags.some((tag) => typeof tag !== "string"))) {
|
|
5980
|
+
throw itemPatchError("InvalidResponse" /* InvalidResponse */);
|
|
5981
|
+
}
|
|
5982
|
+
}
|
|
5983
|
+
var resourceItemPatchFields = {
|
|
5984
|
+
description: { kind: "String" /* String */, nullable: true },
|
|
5985
|
+
itemId: { kind: "String" /* String */, nullable: true, validate: isItemPatchReferenceId },
|
|
5986
|
+
parentResourceId: { kind: "String" /* String */, nullable: true, validate: isItemPatchReferenceId },
|
|
5987
|
+
timetableId: { kind: "String" /* String */, nullable: true, validate: isItemPatchReferenceId },
|
|
5988
|
+
schedule: { kind: "Object" /* Object */, nullable: true, validate: isItemPatchSchedule },
|
|
5989
|
+
usageType: {
|
|
5990
|
+
kind: "String" /* String */,
|
|
5991
|
+
validate: (value) => Object.values(UsageTypeValues).some((type) => type === value)
|
|
5992
|
+
},
|
|
5993
|
+
serviceDescriptions: { kind: "Array" /* Array */, validate: isItemPatchObjectArray },
|
|
5994
|
+
code: { kind: "String" /* String */, nullable: true },
|
|
5995
|
+
duration: { kind: "Integer" /* Integer */, nullable: true, validate: isItemPatchInt32 },
|
|
5996
|
+
amountProperties: { kind: "Object" /* Object */, nullable: true, validate: amount },
|
|
5997
|
+
usageCondition: { kind: "Object" /* Object */, nullable: true, validate: condition },
|
|
5998
|
+
appendixList: { kind: "Array" /* Array */, validate: isItemPatchObjectArray },
|
|
5999
|
+
paymentProperties: { kind: "Object" /* Object */, nullable: true, validate: isResourcePaymentPatch },
|
|
6000
|
+
loyaltyTransactionPropertiesList: { kind: "Array" /* Array */, validate: isItemPatchObjectArray }
|
|
4773
6001
|
};
|
|
6002
|
+
function createResourcePatchAdapter(project) {
|
|
6003
|
+
return {
|
|
6004
|
+
operation: "ResourcesFacade.patch",
|
|
6005
|
+
basePath: "/api/v1/resources",
|
|
6006
|
+
objectType: TorrowObjectTypeCode.Resource,
|
|
6007
|
+
discriminator: "ResourceItem" /* ResourceItem */,
|
|
6008
|
+
fields: {
|
|
6009
|
+
...commonItemPatchFields,
|
|
6010
|
+
...resourceItemPatchFields,
|
|
6011
|
+
priceInfo: { kind: "Object" /* Object */, nullable: true }
|
|
6012
|
+
},
|
|
6013
|
+
validateFields: validateItemPricePatch,
|
|
6014
|
+
prepare: prepareResourcePaymentPatch,
|
|
6015
|
+
equalField: equalResourcePaymentPatchField,
|
|
6016
|
+
assertSnapshot: assertResourcePatchSnapshot,
|
|
6017
|
+
// Проекция настроек выполняется только после raw matching-ID ACK; tags не пересобираются.
|
|
6018
|
+
project,
|
|
6019
|
+
casRefusal: isItemPatchCasRefusal
|
|
6020
|
+
};
|
|
6021
|
+
}
|
|
4774
6022
|
|
|
4775
6023
|
// ../../src/resources/resources/ResourcesFacade.ts
|
|
4776
6024
|
var BASE7 = "/api/v1/resources";
|
|
@@ -4783,6 +6031,20 @@ var ResourcesFacade = class extends TorrowItemFacade {
|
|
|
4783
6031
|
generateResourceId(ownerTorrowId) {
|
|
4784
6032
|
return this.generateItemId(ownerTorrowId);
|
|
4785
6033
|
}
|
|
6034
|
+
/** Частично изменяет ресурс: полный GET и максимум один CAS PUT, без автоматического readback/retry. */
|
|
6035
|
+
patch(itemId, fields, options) {
|
|
6036
|
+
return patchItem(
|
|
6037
|
+
this.http,
|
|
6038
|
+
itemId,
|
|
6039
|
+
fields,
|
|
6040
|
+
options,
|
|
6041
|
+
createResourcePatchAdapter((item) => this.toSdkResourceItem(item))
|
|
6042
|
+
);
|
|
6043
|
+
}
|
|
6044
|
+
/** Поиск по уникальному имени возвращает ту же модель ресурса, что и getById. */
|
|
6045
|
+
getByUniqueName(uniqueName, options) {
|
|
6046
|
+
return super.getByUniqueName(uniqueName, options).then((item) => this.toSdkResourceItem(item));
|
|
6047
|
+
}
|
|
4786
6048
|
toSdkResourceItem(item) {
|
|
4787
6049
|
return {
|
|
4788
6050
|
...item,
|
|
@@ -4899,18 +6161,21 @@ var ResourcesFacade = class extends TorrowItemFacade {
|
|
|
4899
6161
|
let dispatched = false;
|
|
4900
6162
|
let acknowledgement;
|
|
4901
6163
|
try {
|
|
4902
|
-
acknowledgement = await this.http.requestJson(
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
6164
|
+
acknowledgement = await this.http.requestJson(
|
|
6165
|
+
{
|
|
6166
|
+
method: "PUT",
|
|
6167
|
+
path: `${BASE7}/${encodePathSegment(resourceId)}/tags`,
|
|
6168
|
+
body: nextTags,
|
|
6169
|
+
query: {
|
|
6170
|
+
versionToCheck: options?.checkVersion ? resource.meta?.version ?? void 0 : void 0,
|
|
6171
|
+
isNeedAnnouncement: options?.isNeedAnnouncement
|
|
6172
|
+
},
|
|
6173
|
+
signal: options?.signal
|
|
4909
6174
|
},
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
6175
|
+
() => {
|
|
6176
|
+
dispatched = true;
|
|
6177
|
+
}
|
|
6178
|
+
);
|
|
4914
6179
|
} catch (cause) {
|
|
4915
6180
|
effect = dispatched ? "Unknown" /* Unknown */ : "NotApplied" /* NotApplied */;
|
|
4916
6181
|
const error = contextualizeBehaviorError(cause, operation, failureAt, effect).withContext({
|
|
@@ -4940,10 +6205,15 @@ var ResourcesFacade = class extends TorrowItemFacade {
|
|
|
4940
6205
|
}
|
|
4941
6206
|
}
|
|
4942
6207
|
setBehaviorSettings(resourceId, settings, options) {
|
|
4943
|
-
return this.writeBehaviorSettings(
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
6208
|
+
return this.writeBehaviorSettings(
|
|
6209
|
+
resourceId,
|
|
6210
|
+
settings,
|
|
6211
|
+
{
|
|
6212
|
+
...options,
|
|
6213
|
+
mergeParameters: false
|
|
6214
|
+
},
|
|
6215
|
+
"ResourcesFacade.setBehaviorSettings" /* ResourceSet */
|
|
6216
|
+
);
|
|
4947
6217
|
}
|
|
4948
6218
|
/** `GET /api/v1/resources/personallist` */
|
|
4949
6219
|
listPersonal(options) {
|
|
@@ -5014,6 +6284,132 @@ var ResourcesFacade = class extends TorrowItemFacade {
|
|
|
5014
6284
|
}
|
|
5015
6285
|
};
|
|
5016
6286
|
|
|
6287
|
+
// ../../src/resources/services/service-projection.ts
|
|
6288
|
+
function omitUnusedServiceFields(service) {
|
|
6289
|
+
const result = { ...service };
|
|
6290
|
+
Reflect.deleteProperty(result, "packingStrategyProperties");
|
|
6291
|
+
return result;
|
|
6292
|
+
}
|
|
6293
|
+
function projectServiceView(view) {
|
|
6294
|
+
if (!view || typeof view !== "object") {
|
|
6295
|
+
return view;
|
|
6296
|
+
}
|
|
6297
|
+
const result = omitUnusedServiceFields(view);
|
|
6298
|
+
if (view.itemObject && typeof view.itemObject === "object") {
|
|
6299
|
+
result.itemObject = omitUnusedServiceFields(view.itemObject);
|
|
6300
|
+
}
|
|
6301
|
+
return result;
|
|
6302
|
+
}
|
|
6303
|
+
function projectItemView(domain, view) {
|
|
6304
|
+
return domain === "services" ? projectServiceView(view) : view;
|
|
6305
|
+
}
|
|
6306
|
+
function projectItemViews(domain, views) {
|
|
6307
|
+
return Array.isArray(views) ? views.map((view) => projectItemView(domain, view)) : views;
|
|
6308
|
+
}
|
|
6309
|
+
|
|
6310
|
+
// ../../src/resources/services/service-requests.ts
|
|
6311
|
+
var BASE8 = "/api/v1/services";
|
|
6312
|
+
function toSdkServiceItem(service) {
|
|
6313
|
+
return {
|
|
6314
|
+
...omitUnusedServiceFields(service),
|
|
6315
|
+
behaviorSettings: parseServiceImplicitTagParams(service.tags)
|
|
6316
|
+
};
|
|
6317
|
+
}
|
|
6318
|
+
async function getService(http, torrowId, options) {
|
|
6319
|
+
const item = await http.requestJson({
|
|
6320
|
+
method: "GET",
|
|
6321
|
+
path: `${BASE8}/${encodePathSegment(torrowId)}`,
|
|
6322
|
+
query: {
|
|
6323
|
+
profileId: options?.profileId,
|
|
6324
|
+
versionToCheck: options?.versionToCheck,
|
|
6325
|
+
includeDeleted: options?.includeDeleted,
|
|
6326
|
+
includeChildTypes: options?.includeChildTypes,
|
|
6327
|
+
securityToken: options?.securityToken
|
|
6328
|
+
},
|
|
6329
|
+
signal: options?.signal
|
|
6330
|
+
});
|
|
6331
|
+
return toSdkServiceItem(item);
|
|
6332
|
+
}
|
|
6333
|
+
function getServiceResources(http, serviceId, body, options) {
|
|
6334
|
+
return http.requestJson({
|
|
6335
|
+
method: "POST",
|
|
6336
|
+
path: `${BASE8}/${encodePathSegment(serviceId)}/resources`,
|
|
6337
|
+
body,
|
|
6338
|
+
signal: options?.signal
|
|
6339
|
+
});
|
|
6340
|
+
}
|
|
6341
|
+
function getCheckInSchedule(http, serviceId, body, options) {
|
|
6342
|
+
return http.requestJson({
|
|
6343
|
+
method: "POST",
|
|
6344
|
+
path: `${BASE8}/${encodePathSegment(serviceId)}/checkinschedule`,
|
|
6345
|
+
body,
|
|
6346
|
+
signal: options?.signal
|
|
6347
|
+
});
|
|
6348
|
+
}
|
|
6349
|
+
function createOrder(http, serviceId, body, options) {
|
|
6350
|
+
return http.requestJson({
|
|
6351
|
+
method: "POST",
|
|
6352
|
+
path: `${BASE8}/${encodePathSegment(serviceId)}/order`,
|
|
6353
|
+
body,
|
|
6354
|
+
signal: options?.signal
|
|
6355
|
+
});
|
|
6356
|
+
}
|
|
6357
|
+
|
|
6358
|
+
// ../../src/resources/services/service-patch.ts
|
|
6359
|
+
function checkinPermission2(value) {
|
|
6360
|
+
return isItemPatchDtoObject(value) && (value.userAccessLevel === void 0 || Object.values(UserAccessLevelValues).some((level) => level === value.userAccessLevel)) && (value.consumerMinTimeSecBetweenCasesInService == null || isItemPatchInt32(value.consumerMinTimeSecBetweenCasesInService));
|
|
6361
|
+
}
|
|
6362
|
+
function createServicePatchAdapter() {
|
|
6363
|
+
return {
|
|
6364
|
+
operation: "ServicesFacade.patch",
|
|
6365
|
+
basePath: "/api/v1/services",
|
|
6366
|
+
objectType: TorrowObjectTypeCode.Service,
|
|
6367
|
+
discriminator: "ServiceItem" /* ServiceItem */,
|
|
6368
|
+
fields: {
|
|
6369
|
+
...commonItemPatchFields,
|
|
6370
|
+
description: { kind: "String" /* String */, nullable: true },
|
|
6371
|
+
placeId: { kind: "String" /* String */, nullable: true, validate: isItemPatchReferenceId },
|
|
6372
|
+
place: { kind: "String" /* String */, nullable: true },
|
|
6373
|
+
schedule: { kind: "Object" /* Object */, nullable: true, validate: isItemPatchSchedule },
|
|
6374
|
+
bookingDuration: { kind: "Integer" /* Integer */, nullable: true },
|
|
6375
|
+
timetableView: { kind: "Integer" /* Integer */, nullable: true, validate: isItemPatchInt32 },
|
|
6376
|
+
registrationClose: { kind: "Integer" /* Integer */, nullable: true },
|
|
6377
|
+
registrationOpen: { kind: "Integer" /* Integer */, nullable: true },
|
|
6378
|
+
maxConsumerQuantity: { kind: "Integer" /* Integer */, nullable: true, validate: isItemPatchInt32 },
|
|
6379
|
+
executorIdList: {
|
|
6380
|
+
kind: "Array" /* Array */,
|
|
6381
|
+
validate: (value) => Array.isArray(value) && value.every(isItemPatchReferenceId)
|
|
6382
|
+
},
|
|
6383
|
+
needApproval: { kind: "Boolean" /* Boolean */, nullable: true },
|
|
6384
|
+
timeAlignment: { kind: "Integer" /* Integer */, nullable: true, validate: isItemPatchInt32 },
|
|
6385
|
+
orderQuote: { kind: "Integer" /* Integer */, nullable: true, validate: isItemPatchInt32 },
|
|
6386
|
+
marginTime: { kind: "Integer" /* Integer */, nullable: true, validate: isItemPatchInt32 },
|
|
6387
|
+
executorUsagePercent: { kind: "Number" /* Number */, nullable: true },
|
|
6388
|
+
firstWeekDate: { kind: "Date" /* Date */, nullable: true },
|
|
6389
|
+
clientGroupId: { kind: "String" /* String */, nullable: true, validate: isItemPatchReferenceId },
|
|
6390
|
+
resourceGroupList: { kind: "Array" /* Array */, validate: isItemPatchObjectArray },
|
|
6391
|
+
participateFieldRequirements: { kind: "Object" /* Object */, nullable: true },
|
|
6392
|
+
appendixList: { kind: "Array" /* Array */, validate: isItemPatchObjectArray },
|
|
6393
|
+
sessionDurationProperties: { kind: "Object" /* Object */, nullable: true },
|
|
6394
|
+
checkInAllCases: { kind: "Boolean" /* Boolean */ },
|
|
6395
|
+
stepDescriptionList: { kind: "Array" /* Array */, validate: isItemPatchObjectArray },
|
|
6396
|
+
buttonName: { kind: "String" /* String */, nullable: true },
|
|
6397
|
+
checkinPermission: { kind: "Object" /* Object */, nullable: true, validate: checkinPermission2 },
|
|
6398
|
+
caseActionList: { kind: "Array" /* Array */, validate: isItemPatchObjectArray },
|
|
6399
|
+
loyaltyTransactionPropertiesList: { kind: "Array" /* Array */, validate: isItemPatchObjectArray },
|
|
6400
|
+
priceInfo: { kind: "Object" /* Object */, nullable: true }
|
|
6401
|
+
},
|
|
6402
|
+
validateFields: validateItemPricePatch,
|
|
6403
|
+
project: toSdkServiceItem,
|
|
6404
|
+
prepare: (body) => {
|
|
6405
|
+
const clean = omitUnusedServiceFields(body);
|
|
6406
|
+
Reflect.deleteProperty(clean, "numeratorInfo");
|
|
6407
|
+
return clean;
|
|
6408
|
+
},
|
|
6409
|
+
casRefusal: isItemPatchCasRefusal
|
|
6410
|
+
};
|
|
6411
|
+
}
|
|
6412
|
+
|
|
5017
6413
|
// ../../src/resources/services/behavior-settings.ts
|
|
5018
6414
|
var ServiceBehaviorSettingsIssueReason = /* @__PURE__ */ ((ServiceBehaviorSettingsIssueReason2) => {
|
|
5019
6415
|
ServiceBehaviorSettingsIssueReason2["InvalidValue"] = "InvalidValue";
|
|
@@ -5024,30 +6420,38 @@ var configs = Object.values(SERVICE_IMPLICIT_TAG_REGISTRY);
|
|
|
5024
6420
|
function isBehaviorVersion(value) {
|
|
5025
6421
|
return typeof value === "number" && Number.isInteger(value) && value >= 1 && value <= 2147483647;
|
|
5026
6422
|
}
|
|
5027
|
-
function
|
|
6423
|
+
function record4(value) {
|
|
5028
6424
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
5029
6425
|
}
|
|
5030
6426
|
function validateBehaviorResponse(value, serviceId) {
|
|
5031
|
-
if (!
|
|
6427
|
+
if (!record4(value) || value.id !== serviceId) {
|
|
6428
|
+
throw behaviorSettingsError("InvalidResponse" /* InvalidResponse */);
|
|
6429
|
+
}
|
|
5032
6430
|
const personal = value.personalInfo;
|
|
5033
|
-
if (
|
|
6431
|
+
if (record4(personal) && (personal.itemContentType === "NoRights" /* NoRights */ || personal.itemContentType === "SubscriptionIsNotValid" /* SubscriptionIsNotValid */)) {
|
|
5034
6432
|
throw behaviorSettingsError("AccessDenied" /* AccessDenied */);
|
|
5035
6433
|
}
|
|
5036
|
-
if (!
|
|
6434
|
+
if (!record4(personal) || personal.itemContentType !== "Full" /* Full */ || value.tags == null || !record4(value.meta) || !isBehaviorVersion(value.meta.version)) {
|
|
5037
6435
|
throw behaviorSettingsError("InsufficientData" /* InsufficientData */);
|
|
5038
6436
|
}
|
|
5039
6437
|
if (!Array.isArray(value.tags) || !value.tags.every((tag) => typeof tag === "string")) {
|
|
5040
6438
|
throw behaviorSettingsError("InvalidResponse" /* InvalidResponse */);
|
|
5041
6439
|
}
|
|
5042
6440
|
const operations = personal.operationList;
|
|
5043
|
-
if (operations != null && (!Array.isArray(operations) || !operations.every(
|
|
6441
|
+
if (operations != null && (!Array.isArray(operations) || !operations.every(
|
|
6442
|
+
(operation) => typeof operation === "string" || typeof operation === "number" && Number.isSafeInteger(operation)
|
|
6443
|
+
))) {
|
|
5044
6444
|
throw behaviorSettingsError("InvalidResponse" /* InvalidResponse */);
|
|
5045
6445
|
}
|
|
5046
6446
|
return { tags: [...new Set(value.tags)], version: value.meta.version, operations };
|
|
5047
6447
|
}
|
|
5048
6448
|
function assertBehaviorPermission(operations) {
|
|
5049
|
-
if (!Array.isArray(operations))
|
|
5050
|
-
|
|
6449
|
+
if (!Array.isArray(operations)) {
|
|
6450
|
+
throw behaviorSettingsError("InsufficientData" /* InsufficientData */);
|
|
6451
|
+
}
|
|
6452
|
+
if (!operations.includes("SetItemTags" /* SetItemTags */)) {
|
|
6453
|
+
throw behaviorSettingsError("AccessDenied" /* AccessDenied */);
|
|
6454
|
+
}
|
|
5051
6455
|
}
|
|
5052
6456
|
function suffixPrefix(tag, suffix, ignoreCase = false) {
|
|
5053
6457
|
const matches = ignoreCase ? tag.toLowerCase().endsWith(suffix.toLowerCase()) : tag.endsWith(suffix);
|
|
@@ -5061,19 +6465,27 @@ function prefix(tag, config) {
|
|
|
5061
6465
|
if (config.kind === "string" /* String */ || config.kind === "positiveInt" /* PositiveInt */) {
|
|
5062
6466
|
for (const suffix of config.suffixes) {
|
|
5063
6467
|
const value = suffixPrefix(tag, suffix, config.caseInsensitive);
|
|
5064
|
-
if (value !== void 0)
|
|
6468
|
+
if (value !== void 0) {
|
|
6469
|
+
return value;
|
|
6470
|
+
}
|
|
5065
6471
|
}
|
|
5066
6472
|
} else if (config.kind === "exactFlag" /* ExactFlag */) {
|
|
5067
|
-
if (config.tokens.includes(tag) || tag === "HideTelegramNotificationBot" /* LegacyHide */)
|
|
6473
|
+
if (config.tokens.includes(tag) || tag === "HideTelegramNotificationBot" /* LegacyHide */) {
|
|
6474
|
+
return "true";
|
|
6475
|
+
}
|
|
5068
6476
|
} else if (config.kind === "autoStart" /* AutoStart */) {
|
|
5069
6477
|
for (const suffix of config.suffixes) {
|
|
5070
6478
|
const value = suffixPrefix(tag, `:${suffix}`);
|
|
5071
|
-
if (value !== void 0)
|
|
6479
|
+
if (value !== void 0) {
|
|
6480
|
+
return value;
|
|
6481
|
+
}
|
|
5072
6482
|
}
|
|
5073
6483
|
} else if (config.kind === "agreement" /* Agreement */) {
|
|
5074
6484
|
for (const suffix of [config.textSuffix, config.linkSuffix]) {
|
|
5075
6485
|
const position = tag.lastIndexOf(suffix);
|
|
5076
|
-
if (position >= 0 && /^\d+$/.test(tag.slice(position + suffix.length)))
|
|
6486
|
+
if (position >= 0 && /^\d+$/.test(tag.slice(position + suffix.length))) {
|
|
6487
|
+
return tag;
|
|
6488
|
+
}
|
|
5077
6489
|
}
|
|
5078
6490
|
}
|
|
5079
6491
|
return void 0;
|
|
@@ -5084,25 +6496,36 @@ function readBehaviorSettings(tags) {
|
|
|
5084
6496
|
const target = settings;
|
|
5085
6497
|
for (const config of configs) {
|
|
5086
6498
|
const matching = [...new Set(tags)].filter((tag) => prefix(tag, config) !== void 0);
|
|
5087
|
-
if (!matching.length)
|
|
6499
|
+
if (!matching.length) {
|
|
6500
|
+
continue;
|
|
6501
|
+
}
|
|
5088
6502
|
let invalid = false;
|
|
5089
6503
|
let ambiguous = false;
|
|
5090
6504
|
let result;
|
|
5091
6505
|
if (config.kind === "agreement" /* Agreement */) {
|
|
5092
6506
|
const entries = /* @__PURE__ */ new Map();
|
|
5093
6507
|
for (const tag of matching) {
|
|
5094
|
-
for (const [attribute, suffix] of [
|
|
6508
|
+
for (const [attribute, suffix] of [
|
|
6509
|
+
["text", config.textSuffix],
|
|
6510
|
+
["link", config.linkSuffix]
|
|
6511
|
+
]) {
|
|
5095
6512
|
const position = tag.lastIndexOf(suffix);
|
|
5096
|
-
if (position < 0 || !/^\d+$/.test(tag.slice(position + suffix.length)))
|
|
6513
|
+
if (position < 0 || !/^\d+$/.test(tag.slice(position + suffix.length))) {
|
|
6514
|
+
continue;
|
|
6515
|
+
}
|
|
5097
6516
|
const index = positive(tag.slice(position + suffix.length));
|
|
5098
6517
|
let value = tag.slice(0, position).trim();
|
|
5099
|
-
if (attribute === "link")
|
|
6518
|
+
if (attribute === "link") {
|
|
6519
|
+
value = value.replace(/^(https?)\/\//, "$1://");
|
|
6520
|
+
}
|
|
5100
6521
|
if (!index || !value) {
|
|
5101
6522
|
invalid = true;
|
|
5102
6523
|
continue;
|
|
5103
6524
|
}
|
|
5104
6525
|
const entry = entries.get(index) ?? { index };
|
|
5105
|
-
if (entry[attribute] !== void 0 && entry[attribute] !== value)
|
|
6526
|
+
if (entry[attribute] !== void 0 && entry[attribute] !== value) {
|
|
6527
|
+
ambiguous = true;
|
|
6528
|
+
}
|
|
5106
6529
|
entry[attribute] = value;
|
|
5107
6530
|
entries.set(index, entry);
|
|
5108
6531
|
}
|
|
@@ -5113,15 +6536,23 @@ function readBehaviorSettings(tags) {
|
|
|
5113
6536
|
for (const tag of matching) {
|
|
5114
6537
|
const raw = prefix(tag, config);
|
|
5115
6538
|
const value = config.kind === "exactFlag" /* ExactFlag */ ? true : config.kind === "string" /* String */ ? raw.trim() || void 0 : positive(raw);
|
|
5116
|
-
if (value === void 0)
|
|
5117
|
-
|
|
6539
|
+
if (value === void 0) {
|
|
6540
|
+
invalid = true;
|
|
6541
|
+
} else {
|
|
6542
|
+
values.add(value);
|
|
6543
|
+
}
|
|
5118
6544
|
}
|
|
5119
6545
|
ambiguous = values.size > 1;
|
|
5120
6546
|
result = [...values][0];
|
|
5121
6547
|
}
|
|
5122
6548
|
if (invalid || ambiguous) {
|
|
5123
|
-
issues.push({
|
|
5124
|
-
|
|
6549
|
+
issues.push({
|
|
6550
|
+
field: config.field,
|
|
6551
|
+
reason: invalid ? "InvalidValue" /* InvalidValue */ : "AmbiguousValue" /* AmbiguousValue */
|
|
6552
|
+
});
|
|
6553
|
+
} else {
|
|
6554
|
+
target[config.field] = result;
|
|
6555
|
+
}
|
|
5125
6556
|
}
|
|
5126
6557
|
return { settings, issues };
|
|
5127
6558
|
}
|
|
@@ -5129,104 +6560,86 @@ function normalizeBehaviorInput(input) {
|
|
|
5129
6560
|
function fail() {
|
|
5130
6561
|
throw behaviorSettingsError("InvalidInput" /* InvalidInput */);
|
|
5131
6562
|
}
|
|
5132
|
-
if (!
|
|
6563
|
+
if (!record4(input) || Object.keys(input).some((key) => !Object.hasOwn(SERVICE_IMPLICIT_TAG_REGISTRY, key))) {
|
|
6564
|
+
fail();
|
|
6565
|
+
}
|
|
5133
6566
|
const output = {};
|
|
5134
6567
|
for (const config of configs) {
|
|
5135
|
-
if (!Object.hasOwn(input, config.field))
|
|
6568
|
+
if (!Object.hasOwn(input, config.field)) {
|
|
6569
|
+
continue;
|
|
6570
|
+
}
|
|
5136
6571
|
const value = input[config.field];
|
|
5137
6572
|
if (config.kind === "string" /* String */) {
|
|
5138
|
-
if (typeof value !== "string" || !value.trim())
|
|
6573
|
+
if (typeof value !== "string" || !value.trim()) {
|
|
6574
|
+
fail();
|
|
6575
|
+
}
|
|
5139
6576
|
output[config.field] = value.trim();
|
|
5140
6577
|
} else if (config.kind === "positiveInt" /* PositiveInt */ || config.kind === "autoStart" /* AutoStart */) {
|
|
5141
|
-
if (typeof value !== "number" || !Number.isSafeInteger(value) || value <= 0)
|
|
6578
|
+
if (typeof value !== "number" || !Number.isSafeInteger(value) || value <= 0) {
|
|
6579
|
+
fail();
|
|
6580
|
+
}
|
|
5142
6581
|
output[config.field] = value;
|
|
5143
6582
|
} else if (config.kind === "exactFlag" /* ExactFlag */) {
|
|
5144
|
-
if (typeof value !== "boolean")
|
|
6583
|
+
if (typeof value !== "boolean") {
|
|
6584
|
+
fail();
|
|
6585
|
+
}
|
|
5145
6586
|
output[config.field] = value;
|
|
5146
6587
|
} else {
|
|
5147
|
-
if (!Array.isArray(value))
|
|
6588
|
+
if (!Array.isArray(value)) {
|
|
6589
|
+
fail();
|
|
6590
|
+
}
|
|
5148
6591
|
const seen = /* @__PURE__ */ new Set();
|
|
5149
6592
|
output[config.field] = value.map((entry) => {
|
|
5150
|
-
if (!
|
|
6593
|
+
if (!record4(entry) || Object.keys(entry).some((key) => !["index", "text", "link"].includes(key)) || typeof entry.index !== "number" || !Number.isSafeInteger(entry.index) || entry.index <= 0 || seen.has(entry.index)) {
|
|
6594
|
+
fail();
|
|
6595
|
+
}
|
|
5151
6596
|
seen.add(entry.index);
|
|
5152
6597
|
const normalized = { index: entry.index };
|
|
5153
6598
|
for (const attribute of ["text", "link"]) {
|
|
5154
6599
|
if (Object.hasOwn(entry, attribute)) {
|
|
5155
|
-
if (typeof entry[attribute] !== "string" || !entry[attribute].trim())
|
|
6600
|
+
if (typeof entry[attribute] !== "string" || !entry[attribute].trim()) {
|
|
6601
|
+
fail();
|
|
6602
|
+
}
|
|
5156
6603
|
normalized[attribute] = entry[attribute].trim();
|
|
5157
6604
|
}
|
|
5158
6605
|
}
|
|
5159
|
-
if (!normalized.text && !normalized.link)
|
|
6606
|
+
if (!normalized.text && !normalized.link) {
|
|
6607
|
+
fail();
|
|
6608
|
+
}
|
|
5160
6609
|
return normalized;
|
|
5161
|
-
}).sort((a, b) => a.index - b.index);
|
|
5162
|
-
}
|
|
5163
|
-
}
|
|
5164
|
-
return output;
|
|
5165
|
-
}
|
|
5166
|
-
function mergeBehaviorSettings(tags, settings, mergeParameters) {
|
|
5167
|
-
const selected = configs.filter((config) => !mergeParameters || Object.hasOwn(settings, config.field));
|
|
5168
|
-
const output = tags.filter((tag) => !selected.some((config) => prefix(tag, config) !== void 0));
|
|
5169
|
-
for (const config of selected) {
|
|
5170
|
-
const value = settings[config.field];
|
|
5171
|
-
if (value === void 0) continue;
|
|
5172
|
-
if (config.kind === "string" /* String */ || config.kind === "positiveInt" /* PositiveInt */) output.push(`${value}${config.suffixes[0]}`);
|
|
5173
|
-
else if (config.kind === "exactFlag" /* ExactFlag */) {
|
|
5174
|
-
if (value) output.push(config.tokens[0]);
|
|
5175
|
-
} else if (config.kind === "autoStart" /* AutoStart */) output.push(`${value}:${config.suffixes[0]}`);
|
|
5176
|
-
else if (config.kind === "agreement" /* Agreement */) for (const entry of settings.agreementItems ?? []) {
|
|
5177
|
-
if (entry.text) output.push(`${entry.text}${config.textSuffix}${entry.index}`);
|
|
5178
|
-
if (entry.link) output.push(`${entry.link.replace(/^(https?):\/\//, "$1//")}${config.linkSuffix}${entry.index}`);
|
|
5179
|
-
}
|
|
5180
|
-
}
|
|
5181
|
-
return [...new Set(output)];
|
|
5182
|
-
}
|
|
5183
|
-
|
|
5184
|
-
// ../../src/resources/services/service-requests.ts
|
|
5185
|
-
var BASE8 = "/api/v1/services";
|
|
5186
|
-
function toSdkServiceItem(service) {
|
|
5187
|
-
return {
|
|
5188
|
-
...service,
|
|
5189
|
-
behaviorSettings: parseServiceImplicitTagParams(service.tags)
|
|
5190
|
-
};
|
|
5191
|
-
}
|
|
5192
|
-
async function getService(http, torrowId, options) {
|
|
5193
|
-
const item = await http.requestJson({
|
|
5194
|
-
method: "GET",
|
|
5195
|
-
path: `${BASE8}/${encodePathSegment(torrowId)}`,
|
|
5196
|
-
query: {
|
|
5197
|
-
profileId: options?.profileId,
|
|
5198
|
-
versionToCheck: options?.versionToCheck,
|
|
5199
|
-
includeDeleted: options?.includeDeleted,
|
|
5200
|
-
includeChildTypes: options?.includeChildTypes,
|
|
5201
|
-
securityToken: options?.securityToken
|
|
5202
|
-
},
|
|
5203
|
-
signal: options?.signal
|
|
5204
|
-
});
|
|
5205
|
-
return toSdkServiceItem(item);
|
|
5206
|
-
}
|
|
5207
|
-
function getServiceResources(http, serviceId, body, options) {
|
|
5208
|
-
return http.requestJson({
|
|
5209
|
-
method: "POST",
|
|
5210
|
-
path: `${BASE8}/${encodePathSegment(serviceId)}/resources`,
|
|
5211
|
-
body,
|
|
5212
|
-
signal: options?.signal
|
|
5213
|
-
});
|
|
5214
|
-
}
|
|
5215
|
-
function getCheckInSchedule(http, serviceId, body, options) {
|
|
5216
|
-
return http.requestJson({
|
|
5217
|
-
method: "POST",
|
|
5218
|
-
path: `${BASE8}/${encodePathSegment(serviceId)}/checkinschedule`,
|
|
5219
|
-
body,
|
|
5220
|
-
signal: options?.signal
|
|
5221
|
-
});
|
|
6610
|
+
}).sort((a, b) => a.index - b.index);
|
|
6611
|
+
}
|
|
6612
|
+
}
|
|
6613
|
+
return output;
|
|
5222
6614
|
}
|
|
5223
|
-
function
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
6615
|
+
function mergeBehaviorSettings(tags, settings, mergeParameters) {
|
|
6616
|
+
const selected = configs.filter((config) => !mergeParameters || Object.hasOwn(settings, config.field));
|
|
6617
|
+
const output = tags.filter((tag) => !selected.some((config) => prefix(tag, config) !== void 0));
|
|
6618
|
+
for (const config of selected) {
|
|
6619
|
+
const value = settings[config.field];
|
|
6620
|
+
if (value === void 0) {
|
|
6621
|
+
continue;
|
|
6622
|
+
}
|
|
6623
|
+
if (config.kind === "string" /* String */ || config.kind === "positiveInt" /* PositiveInt */) {
|
|
6624
|
+
output.push(`${value}${config.suffixes[0]}`);
|
|
6625
|
+
} else if (config.kind === "exactFlag" /* ExactFlag */) {
|
|
6626
|
+
if (value) {
|
|
6627
|
+
output.push(config.tokens[0]);
|
|
6628
|
+
}
|
|
6629
|
+
} else if (config.kind === "autoStart" /* AutoStart */) {
|
|
6630
|
+
output.push(`${value}:${config.suffixes[0]}`);
|
|
6631
|
+
} else if (config.kind === "agreement" /* Agreement */) {
|
|
6632
|
+
for (const entry of settings.agreementItems ?? []) {
|
|
6633
|
+
if (entry.text) {
|
|
6634
|
+
output.push(`${entry.text}${config.textSuffix}${entry.index}`);
|
|
6635
|
+
}
|
|
6636
|
+
if (entry.link) {
|
|
6637
|
+
output.push(`${entry.link.replace(/^(https?):\/\//, "$1//")}${config.linkSuffix}${entry.index}`);
|
|
6638
|
+
}
|
|
6639
|
+
}
|
|
6640
|
+
}
|
|
6641
|
+
}
|
|
6642
|
+
return [...new Set(output)];
|
|
5230
6643
|
}
|
|
5231
6644
|
|
|
5232
6645
|
// ../../src/resources/services/ServicesFacade.ts
|
|
@@ -5241,7 +6654,7 @@ var ServicesFacade = class extends TorrowItemFacade {
|
|
|
5241
6654
|
return this.generateItemId(ownerTorrowId);
|
|
5242
6655
|
}
|
|
5243
6656
|
toApiServiceItem(service) {
|
|
5244
|
-
const { behaviorSettings, ...rest } = service;
|
|
6657
|
+
const { behaviorSettings, ...rest } = omitUnusedServiceFields(service);
|
|
5245
6658
|
const apiBase = rest;
|
|
5246
6659
|
const nextTags = behaviorSettings ? mergeServiceImplicitTags(apiBase.tags, behaviorSettings) : apiBase.tags;
|
|
5247
6660
|
return {
|
|
@@ -5263,9 +6676,18 @@ var ServicesFacade = class extends TorrowItemFacade {
|
|
|
5263
6676
|
signal: options?.signal
|
|
5264
6677
|
}).then((item) => toSdkServiceItem(item));
|
|
5265
6678
|
}
|
|
5266
|
-
/**
|
|
6679
|
+
/**
|
|
6680
|
+
* `PUT /api/v1/services/{body.id}` — полное обновление услуги.
|
|
6681
|
+
* Сервер может обновить `personalInfo.meta` даже при изменении только имени:
|
|
6682
|
+
* это метаданные персональной связи, независимые от `meta` самой услуги.
|
|
6683
|
+
* Для CAS используется версия услуги, а не `personalInfo.meta.version`.
|
|
6684
|
+
* Не восстанавливайте прежние метаданные персональной связи ради устранения diff.
|
|
6685
|
+
* @see https://github.com/torrowtechnologies/torrow-sdk-ts/blob/main/src/resources/services/README.md#обновление-услуги-и-personalinfometa
|
|
6686
|
+
*/
|
|
5267
6687
|
update(body, options) {
|
|
5268
6688
|
const itemId = requireItemUpdateId(body, "Service");
|
|
6689
|
+
const payload = this.toApiServiceItem(body);
|
|
6690
|
+
Reflect.deleteProperty(payload, "numeratorInfo");
|
|
5269
6691
|
return this.http.requestJson({
|
|
5270
6692
|
method: "PUT",
|
|
5271
6693
|
path: `${BASE9}/${encodePathSegment(itemId)}`,
|
|
@@ -5274,10 +6696,14 @@ var ServicesFacade = class extends TorrowItemFacade {
|
|
|
5274
6696
|
checkVersion: options?.checkVersion,
|
|
5275
6697
|
isNeedAnnouncement: options?.isNeedAnnouncement
|
|
5276
6698
|
},
|
|
5277
|
-
body:
|
|
6699
|
+
body: payload,
|
|
5278
6700
|
signal: options?.signal
|
|
5279
6701
|
}).then((item) => toSdkServiceItem(item));
|
|
5280
6702
|
}
|
|
6703
|
+
/** GET → максимум один полный CAS PUT; пропущенные поля сохраняются, версии персональной связи не подменяют meta.version. Retry/readback не выполняются. */
|
|
6704
|
+
patch(itemId, fields, options) {
|
|
6705
|
+
return patchItem(this.http, itemId, fields, options, createServicePatchAdapter());
|
|
6706
|
+
}
|
|
5281
6707
|
/** `DELETE /api/v1/services/{torrowId}` */
|
|
5282
6708
|
async delete(torrowId, options) {
|
|
5283
6709
|
const resp = await this.http.requestJson({
|
|
@@ -5297,6 +6723,10 @@ var ServicesFacade = class extends TorrowItemFacade {
|
|
|
5297
6723
|
getById(torrowId, options) {
|
|
5298
6724
|
return getService(this.http, torrowId, options);
|
|
5299
6725
|
}
|
|
6726
|
+
/** Чтение по uniqueName использует ту же доменную проекцию, что чтение по ID. */
|
|
6727
|
+
getByUniqueName(uniqueName, options) {
|
|
6728
|
+
return super.getByUniqueName(uniqueName, options).then(toSdkServiceItem);
|
|
6729
|
+
}
|
|
5300
6730
|
/** Читает сырой OpenAPI DTO до проекции, чтобы malformed tags не маскировались парсером. */
|
|
5301
6731
|
async readBehaviorState(serviceId, options) {
|
|
5302
6732
|
if (typeof serviceId !== "string" || !serviceId.trim()) {
|
|
@@ -5322,7 +6752,11 @@ var ServicesFacade = class extends TorrowItemFacade {
|
|
|
5322
6752
|
const state = await this.readBehaviorState(serviceId, options);
|
|
5323
6753
|
return { serviceId, version: state.version, ...readBehaviorSettings(state.tags) };
|
|
5324
6754
|
} catch (cause) {
|
|
5325
|
-
throw contextualizeBehaviorError(
|
|
6755
|
+
throw contextualizeBehaviorError(
|
|
6756
|
+
cause,
|
|
6757
|
+
"ServicesFacade.getBehaviorSettings" /* ServiceGet */,
|
|
6758
|
+
"ReadCurrent" /* ReadCurrent */
|
|
6759
|
+
);
|
|
5326
6760
|
}
|
|
5327
6761
|
}
|
|
5328
6762
|
/**
|
|
@@ -5338,7 +6772,17 @@ var ServicesFacade = class extends TorrowItemFacade {
|
|
|
5338
6772
|
let failureAt = "ValidateInput" /* ValidateInput */;
|
|
5339
6773
|
let effect = "NotApplied" /* NotApplied */;
|
|
5340
6774
|
try {
|
|
5341
|
-
if (!options || options.versionToCheck !== void 0 && !isBehaviorVersion(options.versionToCheck) || Object.hasOwn(options, "checkVersion") && options.checkVersion !== true || Object.hasOwn(options, "mergeParameters") && typeof options.mergeParameters !== "boolean" || options.isNeedAnnouncement != null && typeof options.isNeedAnnouncement !== "boolean" || Object.keys(options).some(
|
|
6775
|
+
if (!options || options.versionToCheck !== void 0 && !isBehaviorVersion(options.versionToCheck) || Object.hasOwn(options, "checkVersion") && options.checkVersion !== true || Object.hasOwn(options, "mergeParameters") && typeof options.mergeParameters !== "boolean" || options.isNeedAnnouncement != null && typeof options.isNeedAnnouncement !== "boolean" || Object.keys(options).some(
|
|
6776
|
+
(key) => ![
|
|
6777
|
+
"versionToCheck",
|
|
6778
|
+
"checkVersion",
|
|
6779
|
+
"mergeParameters",
|
|
6780
|
+
"profileId",
|
|
6781
|
+
"securityToken",
|
|
6782
|
+
"isNeedAnnouncement",
|
|
6783
|
+
"signal"
|
|
6784
|
+
].includes(key)
|
|
6785
|
+
)) {
|
|
5342
6786
|
throw behaviorSettingsError("InvalidInput" /* InvalidInput */);
|
|
5343
6787
|
}
|
|
5344
6788
|
const normalized = normalizeBehaviorInput(settingsPatch);
|
|
@@ -5357,20 +6801,28 @@ var ServicesFacade = class extends TorrowItemFacade {
|
|
|
5357
6801
|
const tags = mergeBehaviorSettings(state.tags, normalized, options.mergeParameters ?? true);
|
|
5358
6802
|
const projected = readBehaviorSettings(tags);
|
|
5359
6803
|
const unchanged = tags.length === state.tags.length && tags.every((tag) => state.tags.includes(tag));
|
|
5360
|
-
if (unchanged)
|
|
6804
|
+
if (unchanged) {
|
|
6805
|
+
return { serviceId, version: state.version, ...projected, changed: false };
|
|
6806
|
+
}
|
|
5361
6807
|
failureAt = "WriteSettings" /* WriteSettings */;
|
|
5362
6808
|
let result;
|
|
5363
6809
|
let dispatched = false;
|
|
5364
6810
|
try {
|
|
5365
|
-
result = await this.http.requestJson(
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
6811
|
+
result = await this.http.requestJson(
|
|
6812
|
+
{
|
|
6813
|
+
method: "PUT",
|
|
6814
|
+
path: `${BASE9}/${encodePathSegment(serviceId)}/tags`,
|
|
6815
|
+
query: {
|
|
6816
|
+
versionToCheck: options.versionToCheck ?? (options.checkVersion ? state.version : void 0),
|
|
6817
|
+
isNeedAnnouncement: options.isNeedAnnouncement ?? false
|
|
6818
|
+
},
|
|
6819
|
+
body: tags,
|
|
6820
|
+
signal: options.signal
|
|
6821
|
+
},
|
|
6822
|
+
() => {
|
|
6823
|
+
dispatched = true;
|
|
6824
|
+
}
|
|
6825
|
+
);
|
|
5374
6826
|
} catch (cause) {
|
|
5375
6827
|
effect = dispatched ? "Unknown" /* Unknown */ : "NotApplied" /* NotApplied */;
|
|
5376
6828
|
const error = contextualizeBehaviorError(cause, operation, failureAt, effect).withContext({
|
|
@@ -5402,7 +6854,12 @@ var ServicesFacade = class extends TorrowItemFacade {
|
|
|
5402
6854
|
}
|
|
5403
6855
|
/** Полная замена: пропущенные поля очищаются, посторонние данные сохраняются. */
|
|
5404
6856
|
setBehaviorSettings(serviceId, settings, options = {}) {
|
|
5405
|
-
return this.writeBehaviorSettings(
|
|
6857
|
+
return this.writeBehaviorSettings(
|
|
6858
|
+
serviceId,
|
|
6859
|
+
settings,
|
|
6860
|
+
{ ...options, mergeParameters: false },
|
|
6861
|
+
"ServicesFacade.setBehaviorSettings" /* ServiceSet */
|
|
6862
|
+
);
|
|
5406
6863
|
}
|
|
5407
6864
|
/**
|
|
5408
6865
|
* Запись на услугу — `POST /api/v1/services/{serviceId}/order`.
|
|
@@ -5633,7 +7090,9 @@ var AuthFacade = class {
|
|
|
5633
7090
|
|
|
5634
7091
|
// ../../src/resources/user-profiles/user-profile-write-defaults.ts
|
|
5635
7092
|
function trimNonEmptyString2(value) {
|
|
5636
|
-
if (typeof value !== "string")
|
|
7093
|
+
if (typeof value !== "string") {
|
|
7094
|
+
return void 0;
|
|
7095
|
+
}
|
|
5637
7096
|
const trimmed = value.trim();
|
|
5638
7097
|
return trimmed === "" ? void 0 : trimmed;
|
|
5639
7098
|
}
|
|
@@ -5674,7 +7133,9 @@ var ProfilesFacade = class {
|
|
|
5674
7133
|
throw new Error("GET /api/v1/user/profiles: expected a JSON object body");
|
|
5675
7134
|
}
|
|
5676
7135
|
const pl = resp.profileList;
|
|
5677
|
-
if (pl === void 0 || pl === null)
|
|
7136
|
+
if (pl === void 0 || pl === null) {
|
|
7137
|
+
return [];
|
|
7138
|
+
}
|
|
5678
7139
|
if (!Array.isArray(pl)) {
|
|
5679
7140
|
throw new Error("GET /api/v1/user/profiles: profileList must be an array when present");
|
|
5680
7141
|
}
|
|
@@ -5777,7 +7238,7 @@ var PinnedViewsFacade = class {
|
|
|
5777
7238
|
path: `${viewParentPath(domain, parentId)}/views/pinned`,
|
|
5778
7239
|
query: { ...query },
|
|
5779
7240
|
signal
|
|
5780
|
-
});
|
|
7241
|
+
}).then((items) => projectItemViews(domain, items));
|
|
5781
7242
|
}
|
|
5782
7243
|
/**
|
|
5783
7244
|
* Создаёт закреплённые представления дочерних элементов под родителем.
|
|
@@ -5804,7 +7265,7 @@ var PinnedViewsFacade = class {
|
|
|
5804
7265
|
method: "GET",
|
|
5805
7266
|
path: viewChildPath(domain, parentId, "pinned", childId),
|
|
5806
7267
|
signal: options?.signal
|
|
5807
|
-
});
|
|
7268
|
+
}).then((item) => projectItemView(domain, item));
|
|
5808
7269
|
}
|
|
5809
7270
|
/**
|
|
5810
7271
|
* Удаляет закреплённое представление дочернего элемента.
|
|
@@ -5860,7 +7321,7 @@ var UserViewsFacade = class {
|
|
|
5860
7321
|
path: `${viewParentPath(domain, parentId)}/views/user`,
|
|
5861
7322
|
query: { ...query },
|
|
5862
7323
|
signal
|
|
5863
|
-
});
|
|
7324
|
+
}).then((items) => projectItemViews(domain, items));
|
|
5864
7325
|
}
|
|
5865
7326
|
/**
|
|
5866
7327
|
* Создаёт персональные представления дочерних элементов под родителем.
|
|
@@ -5889,7 +7350,7 @@ var UserViewsFacade = class {
|
|
|
5889
7350
|
path: `${viewDomainPath(domain)}/views/user`,
|
|
5890
7351
|
query: { ...query },
|
|
5891
7352
|
signal
|
|
5892
|
-
});
|
|
7353
|
+
}).then((items) => projectItemViews(domain, items));
|
|
5893
7354
|
}
|
|
5894
7355
|
/**
|
|
5895
7356
|
* Возвращает персональное представление дочернего элемента.
|
|
@@ -5901,7 +7362,7 @@ var UserViewsFacade = class {
|
|
|
5901
7362
|
method: "GET",
|
|
5902
7363
|
path: viewChildPath(domain, parentId, "user", childId),
|
|
5903
7364
|
signal: options?.signal
|
|
5904
|
-
});
|
|
7365
|
+
}).then((item) => projectItemView(domain, item));
|
|
5905
7366
|
}
|
|
5906
7367
|
/**
|
|
5907
7368
|
* Удаляет персональное представление дочернего элемента.
|
|
@@ -6093,7 +7554,7 @@ var SearchFacade = class {
|
|
|
6093
7554
|
path: `${BASE12}/services`,
|
|
6094
7555
|
query: { ...query ?? {} },
|
|
6095
7556
|
signal: options?.signal
|
|
6096
|
-
});
|
|
7557
|
+
}).then((items) => projectItemViews("services", items));
|
|
6097
7558
|
}
|
|
6098
7559
|
};
|
|
6099
7560
|
|
|
@@ -6301,6 +7762,115 @@ var ReportsFacade = class {
|
|
|
6301
7762
|
}
|
|
6302
7763
|
};
|
|
6303
7764
|
|
|
7765
|
+
// ../../src/resources/common/anyone-access.ts
|
|
7766
|
+
var AnyoneAccessValues = {
|
|
7767
|
+
Unknown: "UnknownAnyoneAccess",
|
|
7768
|
+
None: "NoneAnyoneAccess",
|
|
7769
|
+
Read: "Read",
|
|
7770
|
+
ReadWrite: "ReadWrite",
|
|
7771
|
+
Denied: "Denied"
|
|
7772
|
+
};
|
|
7773
|
+
|
|
7774
|
+
// ../../src/resources/loyalty-systems/types.ts
|
|
7775
|
+
var LoyaltyCardIssueTypeValues = {
|
|
7776
|
+
Unknown: "UnknownLoyaltyCardIssueType",
|
|
7777
|
+
Manual: "Manual",
|
|
7778
|
+
AutoActive: "AutoActive",
|
|
7779
|
+
AutoIssued: "AutoIssued"
|
|
7780
|
+
};
|
|
7781
|
+
var LoyaltyCardUpdateKeyInformationValues = {
|
|
7782
|
+
Unknown: "UnknownLoyaltyCardUpdateKeyInformation",
|
|
7783
|
+
NonKeyDisallowed: "NonKeyDisallowed",
|
|
7784
|
+
NonKeyAllowed: "NonKeyAllowed"
|
|
7785
|
+
};
|
|
7786
|
+
var LoyaltyCardUpdateNonKeyInformationValues = {
|
|
7787
|
+
Unknown: "UnknownLoyaltyCardUpdateNonKeyInformation",
|
|
7788
|
+
KeyDisallowed: "KeyDisallowed",
|
|
7789
|
+
KeyAllowed: "KeyAllowed"
|
|
7790
|
+
};
|
|
7791
|
+
var LoyaltyCardSortConditionValues = {
|
|
7792
|
+
SequenceCardNumberAsc: "SequenceCardNumberAsc",
|
|
7793
|
+
SequenceCardNumberDesc: "SequenceCardNumberDesc",
|
|
7794
|
+
LoyaltyCardStateAsc: "LoyaltyCardStateAsc",
|
|
7795
|
+
LoyaltyCardStateDesc: "LoyaltyCardStateDesc",
|
|
7796
|
+
SequenceCardNumberAscLoyaltyCardStateAsc: "SequenceCardNumberAscLoyaltyCardStateAsc",
|
|
7797
|
+
SequenceCardNumberDescLoyaltyCardStateAsc: "SequenceCardNumberDescLoyaltyCardStateAsc",
|
|
7798
|
+
SequenceCardNumberAscLoyaltyCardStateDesc: "SequenceCardNumberAscLoyaltyCardStateDesc",
|
|
7799
|
+
SequenceCardNumberDescLoyaltyCardStateDesc: "SequenceCardNumberDescLoyaltyCardStateDesc",
|
|
7800
|
+
LoyaltyCardStateAscSequenceCardNumberAsc: "LoyaltyCardStateAscSequenceCardNumberAsc",
|
|
7801
|
+
LoyaltyCardStateAscSequenceCardNumberDesc: "LoyaltyCardStateAscSequenceCardNumberDesc",
|
|
7802
|
+
LoyaltyCardStateDescSequenceCardNumberAsc: "LoyaltyCardStateDescSequenceCardNumberAsc",
|
|
7803
|
+
LoyaltyCardStateDescSequenceCardNumberDesc: "LoyaltyCardStateDescSequenceCardNumberDesc"
|
|
7804
|
+
};
|
|
7805
|
+
|
|
7806
|
+
// ../../src/resources/loyalty-systems/loyalty-system-patch.ts
|
|
7807
|
+
var loyaltySystemPatchFields = {
|
|
7808
|
+
...commonItemPatchFields,
|
|
7809
|
+
description: { kind: "String" /* String */, nullable: true },
|
|
7810
|
+
businessCardId: { kind: "String" /* String */, nonEmpty: true, nullable: true },
|
|
7811
|
+
loyaltyCardIssueType: {
|
|
7812
|
+
kind: "String" /* String */,
|
|
7813
|
+
validate: (value) => knownValue(value, LoyaltyCardIssueTypeValues)
|
|
7814
|
+
},
|
|
7815
|
+
loyaltyCardAnyoneAccess: {
|
|
7816
|
+
kind: "String" /* String */,
|
|
7817
|
+
validate: (value) => knownValue(value, AnyoneAccessValues)
|
|
7818
|
+
},
|
|
7819
|
+
loyaltyCardUpdateKeyInformation: {
|
|
7820
|
+
kind: "String" /* String */,
|
|
7821
|
+
validate: (value) => knownValue(value, LoyaltyCardUpdateKeyInformationValues)
|
|
7822
|
+
},
|
|
7823
|
+
loyaltyCardUpdateNonKeyInformation: {
|
|
7824
|
+
kind: "String" /* String */,
|
|
7825
|
+
validate: (value) => knownValue(value, LoyaltyCardUpdateNonKeyInformationValues)
|
|
7826
|
+
},
|
|
7827
|
+
loyaltyCardUsagePeriod: {
|
|
7828
|
+
kind: "Integer" /* Integer */,
|
|
7829
|
+
nullable: true,
|
|
7830
|
+
validate: (value) => typeof value === "number" && value >= -2147483648 && value <= 2147483647
|
|
7831
|
+
},
|
|
7832
|
+
startDate: { kind: "Date" /* Date */, nullable: true },
|
|
7833
|
+
expiredDate: { kind: "Date" /* Date */, nullable: true },
|
|
7834
|
+
contactInformationFieldsRequirements: { kind: "Object" /* Object */, nullable: true },
|
|
7835
|
+
referralProgramIds: {
|
|
7836
|
+
kind: "Array" /* Array */,
|
|
7837
|
+
validate: (value) => Array.isArray(value) && value.every((id) => typeof id === "string" && id.length > 0)
|
|
7838
|
+
},
|
|
7839
|
+
beginTransactionValues: { kind: "Array" /* Array */ },
|
|
7840
|
+
initialSubscription: { kind: "Object" /* Object */, nullable: true, validate: validInitialSubscription },
|
|
7841
|
+
accountingProductNames: { kind: "Array" /* Array */ }
|
|
7842
|
+
};
|
|
7843
|
+
function knownValue(value, catalog) {
|
|
7844
|
+
return typeof value === "string" && Object.entries(catalog).some(([key, item]) => key !== "Unknown" && item === value);
|
|
7845
|
+
}
|
|
7846
|
+
function validInitialSubscription(value) {
|
|
7847
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
7848
|
+
return false;
|
|
7849
|
+
}
|
|
7850
|
+
if (!("image" in value) || value.image === null) {
|
|
7851
|
+
return true;
|
|
7852
|
+
}
|
|
7853
|
+
const image = value.image;
|
|
7854
|
+
return !!image && typeof image === "object" && Object.keys(image).length === 1 && "id" in image && typeof image.id === "string" && image.id.length > 0;
|
|
7855
|
+
}
|
|
7856
|
+
function omitLoyaltySystemNumerator(body) {
|
|
7857
|
+
const payload = { ...body };
|
|
7858
|
+
Reflect.deleteProperty(payload, "numeratorInfo");
|
|
7859
|
+
return payload;
|
|
7860
|
+
}
|
|
7861
|
+
function createLoyaltySystemPatchAdapter() {
|
|
7862
|
+
return {
|
|
7863
|
+
operation: "LoyaltySystemsFacade.patch",
|
|
7864
|
+
basePath: "/api/v1/loyaltysystems",
|
|
7865
|
+
objectType: TorrowObjectTypeCode.LoyaltySystem,
|
|
7866
|
+
discriminator: "LoyaltySystemItem" /* LoyaltySystemItem */,
|
|
7867
|
+
fields: loyaltySystemPatchFields,
|
|
7868
|
+
project: (value) => value,
|
|
7869
|
+
casRefusal: isItemPatchCasRefusal,
|
|
7870
|
+
prepare: (body) => omitLoyaltySystemNumerator(body)
|
|
7871
|
+
};
|
|
7872
|
+
}
|
|
7873
|
+
|
|
6304
7874
|
// ../../src/resources/loyalty-systems/LoyaltySystemsFacade.ts
|
|
6305
7875
|
var BASE17 = "/api/v1/loyaltysystems";
|
|
6306
7876
|
var LoyaltySystemsFacade = class extends TorrowItemCoreFacade {
|
|
@@ -6308,6 +7878,16 @@ var LoyaltySystemsFacade = class extends TorrowItemCoreFacade {
|
|
|
6308
7878
|
constructor(http) {
|
|
6309
7879
|
super(http, BASE17);
|
|
6310
7880
|
}
|
|
7881
|
+
/** Изменяет выбранные настройки через полный GET и один CAS PUT; пропуск сохраняет поля. */
|
|
7882
|
+
patch(itemId, fields, options) {
|
|
7883
|
+
return patchItem(
|
|
7884
|
+
this.http,
|
|
7885
|
+
itemId,
|
|
7886
|
+
fields,
|
|
7887
|
+
options,
|
|
7888
|
+
createLoyaltySystemPatchAdapter()
|
|
7889
|
+
);
|
|
7890
|
+
}
|
|
6311
7891
|
/** Id программы лояльности до `create` / presigned upload. */
|
|
6312
7892
|
generateLoyaltySystemId(ownerTorrowId) {
|
|
6313
7893
|
return this.generateItemId(ownerTorrowId);
|
|
@@ -6323,7 +7903,7 @@ var LoyaltySystemsFacade = class extends TorrowItemCoreFacade {
|
|
|
6323
7903
|
signal: options?.signal
|
|
6324
7904
|
});
|
|
6325
7905
|
}
|
|
6326
|
-
/** `PUT /api/v1/loyaltysystems/{body.id}
|
|
7906
|
+
/** `PUT /api/v1/loyaltysystems/{body.id}`; numeratorInfo не обновляется и исключается из тела. */
|
|
6327
7907
|
update(body, options) {
|
|
6328
7908
|
const itemId = requireItemUpdateId(body, "Loyalty system");
|
|
6329
7909
|
return this.http.requestJson({
|
|
@@ -6333,7 +7913,7 @@ var LoyaltySystemsFacade = class extends TorrowItemCoreFacade {
|
|
|
6333
7913
|
checkVersion: options?.checkVersion,
|
|
6334
7914
|
isNeedAnnouncement: options?.isNeedAnnouncement
|
|
6335
7915
|
},
|
|
6336
|
-
body,
|
|
7916
|
+
body: omitLoyaltySystemNumerator(body),
|
|
6337
7917
|
signal: options?.signal
|
|
6338
7918
|
});
|
|
6339
7919
|
}
|
|
@@ -6610,9 +8190,13 @@ var LoyaltyCardsFacade = class extends TorrowItemCoreFacade {
|
|
|
6610
8190
|
|
|
6611
8191
|
// ../../src/util/opaque-json-settings.ts
|
|
6612
8192
|
function parseOpaqueJsonSettings(raw) {
|
|
6613
|
-
if (raw == null)
|
|
8193
|
+
if (raw == null) {
|
|
8194
|
+
return null;
|
|
8195
|
+
}
|
|
6614
8196
|
const trimmed = String(raw).trim();
|
|
6615
|
-
if (trimmed === "")
|
|
8197
|
+
if (trimmed === "") {
|
|
8198
|
+
return null;
|
|
8199
|
+
}
|
|
6616
8200
|
try {
|
|
6617
8201
|
return JSON.parse(trimmed);
|
|
6618
8202
|
} catch {
|
|
@@ -6620,7 +8204,9 @@ function parseOpaqueJsonSettings(raw) {
|
|
|
6620
8204
|
}
|
|
6621
8205
|
}
|
|
6622
8206
|
function stringifyOpaqueJsonSettings(value) {
|
|
6623
|
-
if (value === void 0 || value === null)
|
|
8207
|
+
if (value === void 0 || value === null) {
|
|
8208
|
+
return "";
|
|
8209
|
+
}
|
|
6624
8210
|
return JSON.stringify(value);
|
|
6625
8211
|
}
|
|
6626
8212
|
|
|
@@ -6750,7 +8336,11 @@ var UserFacade = class {
|
|
|
6750
8336
|
}
|
|
6751
8337
|
/** `GET /api/v1/user/defaultprofile` */
|
|
6752
8338
|
getDefaultProfile(options) {
|
|
6753
|
-
return this.http.requestJson({
|
|
8339
|
+
return this.http.requestJson({
|
|
8340
|
+
method: "GET",
|
|
8341
|
+
path: `${BASE20}/defaultprofile`,
|
|
8342
|
+
signal: options?.signal
|
|
8343
|
+
});
|
|
6754
8344
|
}
|
|
6755
8345
|
/** `PUT /api/v1/user/defaultprofile` */
|
|
6756
8346
|
async setDefaultProfileByContactId(contactId, options) {
|
|
@@ -7409,7 +8999,9 @@ function isAccountType(value) {
|
|
|
7409
8999
|
}
|
|
7410
9000
|
function parseAccountType(raw) {
|
|
7411
9001
|
const t = raw?.trim();
|
|
7412
|
-
if (!t)
|
|
9002
|
+
if (!t) {
|
|
9003
|
+
return void 0;
|
|
9004
|
+
}
|
|
7413
9005
|
return AccountTypeValueList.find((x) => x.toLowerCase() === t.toLowerCase());
|
|
7414
9006
|
}
|
|
7415
9007
|
var SendCodeAccountTypeValues = {
|
|
@@ -7425,7 +9017,9 @@ function isSendCodeAccountType(value) {
|
|
|
7425
9017
|
}
|
|
7426
9018
|
function parseSendCodeAccountType(raw) {
|
|
7427
9019
|
const t = raw?.trim();
|
|
7428
|
-
if (!t)
|
|
9020
|
+
if (!t) {
|
|
9021
|
+
return void 0;
|
|
9022
|
+
}
|
|
7429
9023
|
return SendCodeAccountTypeValueList.find((x) => x.toLowerCase() === t.toLowerCase());
|
|
7430
9024
|
}
|
|
7431
9025
|
var VerificationMethodValues = /* @__PURE__ */ ((VerificationMethodValues2) => {
|
|
@@ -7442,7 +9036,9 @@ function isVerificationMethod(value) {
|
|
|
7442
9036
|
}
|
|
7443
9037
|
function parseVerificationMethod(raw) {
|
|
7444
9038
|
const t = raw?.trim();
|
|
7445
|
-
if (!t)
|
|
9039
|
+
if (!t) {
|
|
9040
|
+
return void 0;
|
|
9041
|
+
}
|
|
7446
9042
|
return VerificationMethodValueList.find((x) => x.toLowerCase() === t.toLowerCase());
|
|
7447
9043
|
}
|
|
7448
9044
|
var TokenStatusValues = /* @__PURE__ */ ((TokenStatusValues2) => {
|
|
@@ -7463,7 +9059,9 @@ function isTokenStatus(value) {
|
|
|
7463
9059
|
}
|
|
7464
9060
|
function parseTokenStatus(raw) {
|
|
7465
9061
|
const t = raw?.trim();
|
|
7466
|
-
if (!t)
|
|
9062
|
+
if (!t) {
|
|
9063
|
+
return void 0;
|
|
9064
|
+
}
|
|
7467
9065
|
return TokenStatusValueList.find((x) => x.toLowerCase() === t.toLowerCase());
|
|
7468
9066
|
}
|
|
7469
9067
|
function isTokenRespReadyStatus(status) {
|
|
@@ -7482,7 +9080,9 @@ function isAuthCaptchaType(value) {
|
|
|
7482
9080
|
}
|
|
7483
9081
|
function parseAuthCaptchaType(raw) {
|
|
7484
9082
|
const t = raw?.trim();
|
|
7485
|
-
if (!t)
|
|
9083
|
+
if (!t) {
|
|
9084
|
+
return void 0;
|
|
9085
|
+
}
|
|
7486
9086
|
return AuthCaptchaTypeValueList.find((x) => x.toLowerCase() === t.toLowerCase());
|
|
7487
9087
|
}
|
|
7488
9088
|
var AuthScopeValues = {
|
|
@@ -7495,16 +9095,15 @@ var AuthScopeValueList = [
|
|
|
7495
9095
|
AuthScopeValues.AdminApi,
|
|
7496
9096
|
AuthScopeValues.OfflineAccess
|
|
7497
9097
|
];
|
|
7498
|
-
var DefaultAuthScopes = [
|
|
7499
|
-
AuthScopeValues.UserApi,
|
|
7500
|
-
AuthScopeValues.OfflineAccess
|
|
7501
|
-
];
|
|
9098
|
+
var DefaultAuthScopes = [AuthScopeValues.UserApi, AuthScopeValues.OfflineAccess];
|
|
7502
9099
|
function isAuthScope(value) {
|
|
7503
9100
|
return AuthScopeValueList.includes(value);
|
|
7504
9101
|
}
|
|
7505
9102
|
function parseAuthScope(raw) {
|
|
7506
9103
|
const t = raw?.trim();
|
|
7507
|
-
if (!t)
|
|
9104
|
+
if (!t) {
|
|
9105
|
+
return void 0;
|
|
9106
|
+
}
|
|
7508
9107
|
return AuthScopeValueList.find((x) => x.toLowerCase() === t.toLowerCase());
|
|
7509
9108
|
}
|
|
7510
9109
|
|
|
@@ -7532,36 +9131,36 @@ var TimetableViewTypeValues = {
|
|
|
7532
9131
|
|
|
7533
9132
|
// ../../src/resources/contexts/context-icon-preset-paths.ts
|
|
7534
9133
|
var CONTEXT_ICON_PRESET_PATHS = {
|
|
7535
|
-
|
|
7536
|
-
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
|
|
7563
|
-
|
|
7564
|
-
|
|
9134
|
+
anchor: "M35.4783 29.6467C30.6084 24.7768 26.629 15.4085 26.586 15.307C26.585 15.3045 26.5825 15.3015 26.5825 15.3015C26.5594 15.2485 26.527 15.2036 26.4889 15.1626C26.4775 15.1501 26.4645 15.1401 26.4515 15.129C26.4195 15.1006 26.3845 15.0771 26.3465 15.058C26.331 15.0505 26.317 15.042 26.301 15.0361C26.2465 15.0155 26.19 15.0011 26.13 15.0005H26.1265H26.125L26.1215 15.001C25.9914 14.9915 25.8714 15.0495 25.78 15.141C25.776 15.145 25.772 15.148 25.768 15.152C25.7279 15.195 25.6924 15.2425 25.668 15.2975L25.6644 15.3055C25.561 15.536 21.6095 24.3088 16.7716 29.1467C16.6441 29.2742 16.5951 29.4602 16.6431 29.6337C16.6911 29.8072 16.8291 29.9417 17.0037 29.9852C20.5716 30.8772 20.6245 37.3121 20.6251 37.5006C20.6256 37.7765 20.8495 37.9995 21.125 37.9995C21.401 37.999 21.6251 37.7761 21.6251 37.5C21.6251 37.4495 21.5811 30.7692 18.0356 29.2767C21.4051 25.6693 24.22 20.5154 25.6249 17.707V27.0508C24.4854 27.2833 23.625 28.2928 23.625 29.5002C23.625 30.8787 24.7465 32.0002 26.125 32.0002C27.5035 32.0002 28.6249 30.8787 28.6249 29.5002C28.6249 28.2928 27.7644 27.2833 26.625 27.0508V17.8115C28.0315 20.7629 30.8454 26.1428 34.2113 29.7717C30.6684 31.2087 30.6249 37.4546 30.6249 37.5C30.6249 37.776 30.8483 37.999 31.1238 37.9995C31.3998 37.9995 31.6239 37.7765 31.6249 37.501C31.6253 37.3331 31.6814 31.3761 35.2463 30.4852C35.4208 30.4417 35.5588 30.3072 35.6068 30.1337C35.6547 29.9602 35.6058 29.7742 35.4783 29.6467ZM27.6249 29.5002C27.6249 30.3272 26.9519 31.0002 26.125 31.0002C25.298 31.0002 24.625 30.3272 24.625 29.5002C24.625 28.6733 25.298 28.0003 26.125 28.0003C26.9519 28.0003 27.6249 28.6733 27.6249 29.5002ZM32.1248 37.0001H20.1251C19.8491 37.0001 19.6251 37.2241 19.6251 37.5V38.5C19.6251 38.776 19.8491 39 20.1251 39C20.4011 39 20.6251 38.776 20.6251 38.5V38.0001H31.6248V38.5C31.6248 38.776 31.8488 39 32.1248 39C32.4007 39 32.6247 38.776 32.6247 38.5V37.5C32.6248 37.2241 32.4008 37.0001 32.1248 37.0001Z",
|
|
9135
|
+
animals: "M38.1434 21.1127L38.2291 21.1445C38.3104 21.1763 38.4006 21.2127 38.4999 21.2582L38.5044 21.2627C38.6398 21.3309 38.7662 21.4263 38.87 21.5445C38.9693 21.6581 39.0551 21.7945 39.1137 21.9399L39.1182 21.9581C39.1769 22.1263 39.1995 22.2899 39.1905 22.4627C39.1814 22.6308 39.1363 22.799 39.0551 22.9763L39.046 22.9945C38.685 23.6717 38.2021 24.2262 37.6334 24.6353C37.0557 25.0535 36.3877 25.3216 35.6837 25.4126C35.5528 25.4262 35.4174 25.4398 35.2775 25.4444H35.2053C34.93 26.7125 34.6727 27.9897 34.3793 29.2488C34.2484 29.8351 34.1266 30.4033 33.6753 30.8805V35.4076C33.6753 35.7576 33.5308 36.0758 33.3052 36.3031C33.075 36.5349 32.7591 36.6758 32.4116 36.6758H31.9377C31.6308 36.6758 31.3419 36.5622 31.1208 36.3712C30.8996 36.1849 30.7417 35.9167 30.692 35.6076L30.024 31.3669L27.4605 30.9351L24.721 30.4624C24.1974 31.1396 23.3805 31.7169 22.6765 32.2169C22.4869 32.3487 22.3109 32.4714 22.1213 32.6123L20.6365 33.7259L20.9028 35.1804C20.9389 35.3667 20.9298 35.5531 20.8847 35.7304C20.8351 35.9122 20.7493 36.0804 20.6275 36.2258L20.6094 36.2485C20.483 36.3758 20.3567 36.4758 20.2032 36.5531C20.0407 36.6349 19.8692 36.6758 19.6616 36.6758H19.0884C18.7861 36.6758 18.5017 36.5667 18.2806 36.3849C18.0594 36.2031 17.9015 35.9394 17.8473 35.6395L17.2831 32.5941C17.1568 31.9032 17.8699 31.026 18.3663 30.4215L18.4972 30.2578C18.2264 29.6215 18.082 29.0261 18.0233 28.4943C17.933 27.7261 18.0233 27.0761 18.1632 26.5716C18.2219 26.3489 18.2986 26.1489 18.3753 25.9625L18.4115 25.8898C17.8247 25.6353 17.2786 25.2944 16.7957 24.8762C16.209 24.3717 15.7125 23.7535 15.3379 23.0445L15.3334 23.0399C15.1754 22.7263 15.1529 22.3808 15.2522 22.0763C15.347 21.7672 15.5591 21.4991 15.866 21.3354L15.8705 21.3309C16.1142 21.2036 16.385 21.1627 16.6377 21.1991C16.8995 21.24 17.1432 21.3582 17.3373 21.5491C17.4953 21.7036 17.6036 21.8036 17.7299 21.9172L18.0007 22.1581C18.6732 22.7808 19.9234 23.9399 21.1329 23.8672C23.7687 23.8672 26.6707 23.6081 29.3471 23.4853C29.5502 22.9399 29.7848 22.3263 30.024 21.7081C30.5656 20.2991 31.1253 18.8355 31.5179 17.5174L31.527 17.4901C31.6262 17.2401 31.7978 17.031 32.0099 16.8856C32.2265 16.7447 32.4838 16.6674 32.75 16.6765C33.4316 16.6992 33.7023 17.0401 33.8739 17.4765L33.9822 17.4401C34.2169 17.3765 34.4741 17.381 34.7133 17.4628C34.9525 17.5401 35.1556 17.6901 35.3046 17.881C35.4535 18.0674 35.5528 18.3037 35.5708 18.5537L35.6385 19.29C35.8732 19.4219 36.0944 19.5991 36.2839 19.8037C36.5322 20.0764 36.7353 20.3991 36.8526 20.7354C36.8932 20.8582 37.4799 20.8627 37.8591 21.0036L38.1434 21.1127ZM37.9493 21.8809L37.5883 21.7445C37.0828 21.5536 36.1891 21.2172 36.1124 20.9991C36.0312 20.7627 35.8913 20.5355 35.7107 20.3446C35.5392 20.1582 35.3316 20.0037 35.115 19.9128L34.8938 19.8218L34.79 18.6219C34.781 18.5264 34.7449 18.4401 34.6907 18.3674C34.6366 18.2946 34.5554 18.2401 34.4651 18.2083C34.3748 18.181 34.2755 18.1764 34.1853 18.2037C34.095 18.2264 34.0138 18.2764 33.9551 18.3446L33.4812 18.8946L33.2736 18.1719C33.1743 17.8219 33.075 17.4765 32.7275 17.4628C32.6237 17.4628 32.5244 17.4901 32.4431 17.5447C32.3664 17.5947 32.3032 17.6719 32.2626 17.7628C31.87 19.0901 31.3013 20.5673 30.7552 21.9899C30.4979 22.6581 30.2452 23.3126 29.9925 24.0035L29.9067 24.249L21.1826 24.6535C19.6391 24.7444 18.2264 23.4444 17.4727 22.7445L17.2064 22.499C17.062 22.3672 16.9356 22.249 16.7912 22.1127C16.719 22.0399 16.6242 21.9945 16.5249 21.9809C16.4301 21.9672 16.3263 21.9854 16.2361 22.0309L16.227 22.0354C16.1142 22.0945 16.033 22.199 15.9969 22.3127C15.9608 22.4263 15.9698 22.5581 16.0285 22.6717L16.033 22.6763C16.3579 23.299 16.7912 23.8353 17.3057 24.2808C17.8292 24.7308 18.434 25.0807 19.0839 25.308L19.5353 25.4671L19.296 25.8807C19.2283 25.9943 19.1607 26.1262 19.093 26.2807C19.0298 26.4262 18.9666 26.5943 18.9169 26.7852C18.7996 27.2034 18.7274 27.7534 18.7996 28.4034C18.8583 28.9215 19.0117 29.5033 19.3096 30.1487L19.4089 30.3624L19.269 30.5487L18.9711 30.9214C18.5694 31.4123 17.9917 32.1214 18.0504 32.4532L18.6145 35.494C18.6371 35.6076 18.6958 35.7031 18.7815 35.7758C18.8628 35.844 18.9711 35.8849 19.0884 35.8849H19.6616C19.7429 35.8849 19.806 35.8713 19.8557 35.8485C19.9144 35.8167 19.973 35.7667 20.0407 35.6985C20.0814 35.6485 20.1084 35.5895 20.1265 35.5304C20.1445 35.4622 20.1491 35.3895 20.1355 35.3213L19.779 33.385L21.6565 31.9805C21.8099 31.8669 22.013 31.7214 22.2251 31.5714C22.9473 31.0623 23.7958 30.4624 24.22 29.8169L24.3644 29.5988L27.5869 30.1578C28.643 30.3396 29.654 30.5078 30.4257 30.6351L30.7055 30.6805L31.4638 35.4804C31.4818 35.5985 31.5405 35.6985 31.6263 35.7713C31.712 35.844 31.8203 35.8849 31.9377 35.8849H32.4116C32.5424 35.8849 32.6643 35.8304 32.7546 35.744C32.8358 35.6622 32.89 35.5395 32.89 35.4076V30.5442L33.0208 30.426C33.3954 30.0851 33.5038 29.5897 33.6166 29.0761C33.8784 27.617 34.2665 26.0898 34.5824 24.6308L34.9164 24.6489C35.0338 24.658 35.1466 24.658 35.2504 24.658C35.3542 24.6535 35.467 24.6444 35.5844 24.6308C36.1576 24.558 36.7037 24.3353 37.1776 23.9944C37.6469 23.6581 38.0486 23.199 38.3465 22.6445C38.3826 22.5581 38.4052 22.4808 38.4097 22.4127C38.4142 22.3536 38.4052 22.2945 38.3871 22.2354C38.36 22.1718 38.3284 22.1127 38.2878 22.0718C38.2472 22.0263 38.2021 21.9899 38.1524 21.9672L37.9493 21.8809Z",
|
|
9136
|
+
auto: "M42.598 27.613v2.053c0 1.427-1.174 2.567-2.612 2.567h-.889l-.037.14a3.335 3.335 0 0 1-2.38 2.38 3.347 3.347 0 0 1-4.08-2.38l-.037-.14H21.679l-.037.14a3.335 3.335 0 0 1-2.38 2.38 3.346 3.346 0 0 1-4.08-2.38l-.037-.14h-.533c-1.438 0-2.612-1.14-2.612-2.567v-1.801c0-1.171.785-2.194 1.916-2.502l4.791-1.306 2.857-3.751A3.308 3.308 0 0 1 24.195 19h9.31c1.142 0 2.198.585 2.803 1.551l2.22 3.547 2.54 1.15a2.598 2.598 0 0 1 1.53 2.365zm-24.183 6.355a2.416 2.416 0 1 0 0-4.832 2.416 2.416 0 0 0 0 4.832zm17.41 0a2.416 2.416 0 1 0 .002-4.832 2.416 2.416 0 0 0-.001 4.832zm4.161-2.657c.929 0 1.69-.733 1.69-1.645l.002-2.045a1.697 1.697 0 0 0-.992-1.528l-2.668-1.21a.414.414 0 0 1-.193-.168l-2.301-3.67a2.36 2.36 0 0 0-2.017-1.124h-9.312a2.39 2.39 0 0 0-1.898.943l-2.95 3.875a.48.48 0 0 1-.254.167l-4.933 1.347a1.686 1.686 0 0 0-1.24 1.609v1.805c0 .914.76 1.645 1.692 1.645h.465l.019-.167a3.33 3.33 0 0 1 2.939-2.938 3.34 3.34 0 0 1 3.693 2.94l.02.165h10.746l.019-.167a3.332 3.332 0 0 1 2.939-2.938 3.34 3.34 0 0 1 3.693 2.939l.02.166h.821z",
|
|
9137
|
+
beauty: "M38.29 26.814c0 3.618-1.12 7.088-3.231 9.727-2.074 2.59-4.863 4.086-7.914 4.086-3.052 0-5.841-1.497-7.915-4.086-2.112-2.639-3.23-6.11-3.23-9.727 0-3.618 1.118-7.089 3.23-9.727C21.304 14.497 24.093 13 27.145 13c3.051 0 5.84 1.497 7.914 4.087 2.112 2.638 3.23 6.109 3.23 9.727zM27.144 39.699c.815 0 1.62-.12 2.395-.357 2.253-.687 4.204-2.302 5.599-4.514 1.458-2.311 2.222-5.123 2.222-8.014 0-2.895-.765-5.712-2.222-8.015-1.395-2.212-3.346-3.827-5.6-4.514a8.248 8.248 0 0 0-4.797 0c-2.247.687-4.198 2.304-5.592 4.514-1.457 2.303-2.222 5.12-2.222 8.015 0 2.891.764 5.703 2.222 8.014 1.394 2.21 3.345 3.827 5.592 4.514a8.249 8.249 0 0 0 2.403.357zm8.482-12.885c0 3.02-.91 5.897-2.649 8.062-1.556 1.945-3.604 3.09-5.833 3.09-2.23 0-4.278-1.145-5.834-3.09-1.739-2.165-2.649-5.042-2.649-8.062 0-3.02.91-5.897 2.649-8.07 1.553-1.941 3.602-3.082 5.834-3.082 2.231 0 4.28 1.14 5.833 3.082 1.74 2.173 2.649 5.05 2.649 8.07zM32.253 34.3c1.607-2.004 2.446-4.67 2.446-7.487 0-2.821-.84-5.491-2.446-7.487-1.377-1.727-3.176-2.744-5.108-2.744-1.933 0-3.732 1.017-5.11 2.745-1.605 1.995-2.445 4.665-2.445 7.486 0 2.818.839 5.483 2.446 7.487 1.374 1.723 3.173 2.736 5.109 2.736 1.935 0 3.734-1.013 5.108-2.736zm-1.037-13.304c1.074 1.618 1.663 3.742 1.663 5.817 0 .255-.213.46-.468.46a.46.46 0 0 1-.46-.46c0-1.841-.508-3.718-1.433-5.18-.89-1.4-2.093-2.296-3.373-2.296a.466.466 0 0 1-.461-.467.46.46 0 0 1 .46-.46c1.572 0 3.028 1.016 4.072 2.586z",
|
|
9138
|
+
beauty2: "M19.9856 39.8118L16.3104 36.1366C14.9636 34.7897 14.9635 32.5999 16.3104 31.253L31.253 16.3104C32.5999 14.9635 34.7897 14.9635 36.1366 16.3104L39.8118 19.9856C40.5188 20.6926 40.5188 21.8388 39.8118 22.5457C39.224 23.1335 38.3326 23.2326 37.6425 22.843C38.0321 23.5331 37.933 24.4245 37.3452 25.0123C36.7575 25.6001 35.866 25.6991 35.1758 25.3095C35.5655 25.9996 35.4664 26.8911 34.8786 27.4789C34.2909 28.0667 33.3995 28.1657 32.7093 27.7761C33.0989 28.4663 32.9998 29.3577 32.4121 29.9455C31.8243 30.5332 30.9328 30.6323 30.2427 30.2427C30.6323 30.9328 30.5333 31.8243 29.9455 32.4121C29.3577 32.9998 28.4663 33.0989 27.7762 32.7093C28.1658 33.3995 28.0667 34.2909 27.4789 34.8786C26.8911 35.4664 25.9997 35.5655 25.3095 35.1758C25.6992 35.866 25.6001 36.7574 25.0123 37.3452C24.4245 37.933 23.5331 38.0321 22.843 37.6425C23.2326 38.3326 23.1335 39.224 22.5457 39.8118C21.8388 40.5187 20.6926 40.5187 19.9856 39.8118ZM20.5513 39.2461L16.8761 35.5709C15.8416 34.5364 15.8416 32.8532 16.8761 31.8187L31.8187 16.8761C32.8532 15.8416 34.5364 15.8416 35.5709 16.8761L39.2461 20.5513C39.6407 20.9458 39.6407 21.5855 39.2461 21.98C38.8516 22.3746 38.2119 22.3746 37.8174 21.98L34.1422 18.3048C33.8955 18.0581 33.4941 18.0581 33.2474 18.3048L32.657 18.8953L36.7796 23.0179C37.1741 23.4124 37.1741 24.0521 36.7796 24.4466C36.385 24.8411 35.7454 24.8411 35.3509 24.4466L31.2282 20.324L30.1903 21.3619L34.313 25.4845C34.7075 25.879 34.7075 26.5187 34.313 26.9132C33.9184 27.3077 33.2788 27.3077 32.8842 26.9132L28.7616 22.7906L27.7238 23.8284L31.8464 27.9511C32.2409 28.3456 32.2409 28.9852 31.8464 29.3798C31.4519 29.7743 30.8122 29.7743 30.4177 29.3798L26.2951 25.2572L25.2572 26.2951L29.3798 30.4177C29.7743 30.8122 29.7743 31.4518 29.3798 31.8464C28.9853 32.2409 28.3456 32.2409 27.9511 31.8464L23.8285 27.7238L22.7906 28.7616L26.9132 32.8842C27.3077 33.2788 27.3077 33.9184 26.9132 34.3129C26.5187 34.7075 25.879 34.7075 25.4845 34.3129L21.3619 30.1903L20.324 31.2282L24.4466 35.3508C24.8411 35.7454 24.8411 36.385 24.4466 36.7795C24.0521 37.1741 23.4124 37.1741 23.0179 36.7795L18.8953 32.6569L18.3048 33.2474C18.0581 33.4941 18.0581 33.8955 18.3048 34.1422L21.98 37.8174C22.3746 38.2119 22.3746 38.8516 21.98 39.2461C21.5855 39.6406 20.9459 39.6406 20.5513 39.2461Z",
|
|
9139
|
+
botanical: "M40.8394 28.2455C40.6261 28.044 40.2816 28.045 40.0705 28.248C37.7819 30.4427 34.9907 30.998 32.1098 30.5256C31.558 29.0642 28.0498 21 17.9432 21C16.5136 21 14.9949 21.1628 13.4292 21.484C13.2701 21.5167 13.135 21.6152 13.0604 21.7527C12.9861 21.89 12.98 22.052 13.044 22.1943C16.6947 30.2986 22.8312 32 27.3356 32C27.3359 32 27.3356 32 27.3359 32C29.3661 32 30.923 31.6467 31.5476 31.4793C32.3494 31.6267 33.1352 31.7048 33.8979 31.7048C36.5478 31.7048 38.932 30.8093 40.8422 28.9776C41.0536 28.7748 41.0526 28.4469 40.8394 28.2455ZM27.3355 30.9647C23.2672 30.9647 17.7582 29.4552 14.3166 22.3702C15.5733 22.1478 16.7906 22.0353 17.9432 22.0353C26.4744 22.0353 29.877 28.0418 30.8414 30.255C27.1474 29.2852 23.405 26.7869 20.467 24.0093C20.2541 23.8076 19.9096 23.8091 19.6982 24.0118C19.4867 24.2148 19.4877 24.5426 19.7009 24.7441C22.8746 27.7443 26.1261 29.7934 29.2066 30.8552C28.6529 30.919 28.0245 30.9647 27.3355 30.9647Z",
|
|
9140
|
+
children: "M32.871 34.797a3.051 3.051 0 0 1 1.956 2.84 3.056 3.056 0 0 1-3.052 3.052 3.056 3.056 0 0 1-3.052-3.052c0-.568.163-1.12.471-1.61l.423-.677-.79.1c-.485.062-.921.093-1.34.093-.415 0-.845-.032-1.34-.093l-.79-.098.423.674c.308.493.471 1.044.471 1.61a3.055 3.055 0 0 1-3.053 3.052 3.056 3.056 0 0 1-3.052-3.052 3.05 3.05 0 0 1 1.955-2.84l.739-.286-.688-.394a10.775 10.775 0 0 1-5.437-9.345V21.82H15.48a.479.479 0 1 1 0-.96l1.715.002c.266 0 .48.214.48.48v2.95h9.333V14.48c0-.266.214-.48.48-.48 5.939 0 10.77 4.833 10.77 10.772 0 3.863-2.075 7.418-5.437 9.345l-.687.394.738.286zM23.2 39.73a2.094 2.094 0 1 0-.004-4.188 2.094 2.094 0 0 0 .004 4.188zm10.67-2.093c0-1.155-.94-2.094-2.094-2.094a2.095 2.095 0 0 0-2.093 2.094c0 1.154.939 2.093 2.094 2.093a2.095 2.095 0 0 0 2.093-2.093zm-5.903-14.69l.013 2.304H17.677l.037.412c.456 5.04 4.708 8.921 9.773 8.921 5.065 0 9.317-3.88 9.772-8.92l.055-.602.001-.565-.056-.617a9.753 9.753 0 0 0-1.38-4.189c-.562-.927-1.516-1.996-2.375-2.665a9.775 9.775 0 0 0-5.126-2.027l-.412-.037v7.984z",
|
|
9141
|
+
devices: "M35.309 17.1091C35.2563 16.5905 34.8183 16.1857 34.2857 16.1857H19.7143C19.1462 16.1857 18.6857 16.6462 18.6857 17.2143V20.8143H35.3143V17.2143C35.3143 17.1788 35.3125 17.1437 35.309 17.1091ZM35.3143 21.5H18.6857V37.1H35.3143V21.5ZM18 21.5V17.2143C18 16.2675 18.7675 15.5 19.7143 15.5H34.2857C35.1733 15.5 35.9034 16.1746 35.9911 17.039C35.997 17.0966 36 17.1551 36 17.2143V21.5V37.7857H18V21.5ZM27.1528 33.5031C29.3777 33.5031 31.1813 31.6995 31.1813 29.4745C31.1813 27.2496 29.3777 25.446 27.1528 25.446C24.9278 25.446 23.1242 27.2496 23.1242 29.4745C23.1242 31.6995 24.9278 33.5031 27.1528 33.5031ZM27.1528 34.1888C29.7564 34.1888 31.867 32.0782 31.867 29.4745C31.867 26.8709 29.7564 24.7603 27.1528 24.7603C24.5491 24.7603 22.4385 26.8709 22.4385 29.4745C22.4385 32.0782 24.5491 34.1888 27.1528 34.1888ZM32.5714 19.2714L27.4286 19.2714V18.5857L32.5714 18.5857V19.2714ZM21.4286 19.3572C21.6653 19.3572 21.8571 19.1653 21.8571 18.9286C21.8571 18.6919 21.6653 18.5 21.4286 18.5C21.1919 18.5 21 18.6919 21 18.9286C21 19.1653 21.1919 19.3572 21.4286 19.3572Z",
|
|
9142
|
+
entertainment: "M16.013 20.395a1.896 1.896 0 0 1 1.266-.704l22.428-2.677a1.91 1.91 0 0 1 2.126 1.672l.385 3.219a.455.455 0 0 1-.39.504 2.554 2.554 0 0 0-2.177 2.816 2.558 2.558 0 0 0 2.778 2.225.456.456 0 0 1 .498.398l.384 3.218a1.906 1.906 0 0 1-.397 1.409 1.899 1.899 0 0 1-1.275.716l-4.226.505v1.149a1.915 1.915 0 0 1-1.913 1.913H12.913A1.915 1.915 0 0 1 11 34.845v-3.241c0-.248.198-.45.446-.454a2.55 2.55 0 0 0 2.496-2.539 2.55 2.55 0 0 0-2.496-2.538.455.455 0 0 1-.446-.455v-3.242c0-1.054.858-1.912 1.913-1.912h3.045l.055-.069zm-4.105 14.45c0 .553.451 1.003 1.005 1.003h22.585c.554 0 1.005-.45 1.005-1.003v-2.819l-.149-.028a3.42 3.42 0 0 1-1.803-.967 3.428 3.428 0 0 1-.99-2.419c0-.91.351-1.77.99-2.419a3.43 3.43 0 0 1 1.802-.967l.15-.029v-2.82c0-.553-.45-1.003-1.003-1.003h-3.96l-1.277-.001h-17.35c-.554 0-1.005.45-1.005 1.003v2.82l.15.028c.685.13 1.309.466 1.803.967.639.65.99 1.508.99 2.419s-.351 1.77-.99 2.419a3.43 3.43 0 0 1-1.803.968l-.15.028v2.82zm30.5-3.67l-.334-2.801-.152-.01a3.416 3.416 0 0 1-1.904-.747 3.427 3.427 0 0 1-1.27-2.284c-.108-.9.142-1.804.697-2.52a3.426 3.426 0 0 1 1.675-1.174l.145-.046-.334-2.8a1 1 0 0 0-1.115-.877l-18.641 2.225-3.958.362 3.983-.04h14.3c1.054 0 1.913.858 1.913 1.913v3.24c0 .25-.2.451-.448.455a2.55 2.55 0 0 0-2.495 2.539 2.55 2.55 0 0 0 2.495 2.54.455.455 0 0 1 .448.454v1.177l4.119-.491a1 1 0 0 0 .876-1.116zM28.782 27.14a.454.454 0 0 1 .253.777l-2.099 2.046.495 2.888a.455.455 0 0 1-.658.48l-2.595-1.365-2.595 1.365a.454.454 0 0 1-.659-.48l.496-2.89-2.1-2.044a.457.457 0 0 1 .252-.776l2.9-.422 1.299-2.63a.456.456 0 0 1 .814.002l1.297 2.628 2.9.421zM26 29.881a.454.454 0 0 1 .13-.402l1.612-1.57-2.227-.323a.453.453 0 0 1-.342-.248l-.995-2.017-.995 2.016a.457.457 0 0 1-.306.242c-.01.003-.01.003-.036.007l-2.225.324 1.608 1.568a.46.46 0 0 1 .132.403l-.38 2.217 1.991-1.047c.132-.07.29-.07.423 0l1.99 1.047-.38-2.217z",
|
|
9143
|
+
evolution: "M33.962 25.089a2.694 2.694 0 1 1 .382 5.31l-4.056 6.744h1.731a.55.55 0 0 1 .535.552v.956h6.288a.542.542 0 0 1 0 1.085H14.389a.542.542 0 0 1 0-1.085H24.87v-.956c0-.3.24-.544.542-.552h3.61l4.253-7.07a2.69 2.69 0 0 1-1.391-2.36c0-.859.404-1.648 1.073-2.153l-6.246-8.125c.501 1.284.47 2.67-.1 4.058a7.312 7.312 0 0 1-1.348 2.137.544.544 0 0 1-.601.124 15.362 15.362 0 0 1-8.017-7.744l-.062-.13a.534.534 0 0 1 .105-.606 7.401 7.401 0 0 1 2.091-1.415c1.519-.678 3.06-.69 4.478-.036a2.31 2.31 0 0 1 1.88-.973c.598 0 1.175.235 1.607.653.443.437.694 1.034.694 1.655 0 .38-.094.756-.274 1.09l6.798 8.84zm.613 1.034a1.592 1.592 0 1 0 .001 3.183 1.592 1.592 0 0 0-.001-3.183zM31.473 38.65v-.426h-5.518v.426h5.518zm-6.151-21.57a.538.538 0 0 1 .265-.784 1.23 1.23 0 0 0-.45-2.365 1.22 1.22 0 0 0-1.147.805.541.541 0 0 1-.78.28c-1.257-.734-2.592-.791-3.986-.17a6.55 6.55 0 0 0-1.49.939 14.31 14.31 0 0 0 6.987 6.811c.367-.47.671-.99.899-1.537.57-1.41.47-2.743-.298-3.98z",
|
|
9144
|
+
family: "M30.365 32.267a.407.407 0 0 1-.346-.203.453.453 0 0 1-.018-.418l2.098-4.405V25.27c0-1.38 1.068-2.502 2.382-2.502 1.311 0 2.38 1.122 2.38 2.502v1.972l2.097 4.405a.46.46 0 0 1-.018.418.406.406 0 0 1-.348.203h-2.366v6.167c0 .246-.295.556-.525.556L16.452 39a.398.398 0 0 1-.386-.406c0-.134-.005-.272-.005-.408v-7.454A2.553 2.553 0 0 1 15 28.64v-4.7c0-1.39 1.075-2.52 2.398-2.52h2.089c1.32 0 2.398 1.13 2.398 2.52v4.7a2.56 2.56 0 0 1-1.062 2.092v7.45h3.68v-3.855a2.551 2.551 0 0 1-1.06-2.091v-2.454c0-1.39 1.076-2.52 2.399-2.52l.802.003c1.32 0 2.398 1.13 2.398 2.519v2.454c0 .843-.4 1.622-1.062 2.09v3.853h4.769v-5.914h-2.384zm-13.49 5.914h3.132v-7.669l.002-.012a.43.43 0 0 1 .214-.389c.523-.291.846-.855.846-1.47v-4.702c0-.917-.71-1.664-1.582-1.664h-2.09c-.872 0-1.583.745-1.583 1.664v4.701c0 .616.325 1.18.845 1.471a.431.431 0 0 1 .216.38v7.69zm16.688 0h1.85v-6.344c0-.028.002-.057.007-.086l.01-.04a.412.412 0 0 1 .39-.301h2.116l-1.846-3.878a.426.426 0 0 1-.043-.19v-2.073c0-.907-.703-1.647-1.566-1.647-.866 0-1.568.74-1.568 1.647v2.072a.426.426 0 0 1-.044.191l-1.845 3.878h2.132c.182 0 .336.126.388.3l.012.041a.548.548 0 0 1 .007.086v6.344zm.916-16.653c-1.36 0-2.464-1.163-2.464-2.59 0-1.429 1.104-2.589 2.464-2.589 1.359 0 2.466 1.16 2.466 2.588 0 1.428-1.107 2.59-2.466 2.59zm0-4.324c-.91 0-1.65.778-1.65 1.736 0 .955.74 1.73 1.65 1.73.911 0 1.65-.775 1.65-1.73 0-.958-.739-1.736-1.65-1.736zm-9.16 20.977h1.848v-4.073-.01a.435.435 0 0 1 .216-.389c.52-.294.845-.857.845-1.473v-2.454c0-.917-.711-1.665-1.584-1.665h-.802c-.873 0-1.585.748-1.585 1.665v2.454c0 .616.323 1.18.844 1.47a.427.427 0 0 1 .216.38l.002.02v4.075zm.916-12.158c-1.36 0-2.464-1.162-2.464-2.59s1.105-2.588 2.464-2.588c1.357 0 2.464 1.16 2.464 2.588 0 1.428-1.107 2.59-2.464 2.59zm0-4.323c-.91 0-1.65.778-1.65 1.733 0 .957.74 1.733 1.65 1.733.909 0 1.65-.776 1.65-1.733 0-.955-.741-1.733-1.65-1.733zm-7.8-1.521c-1.36 0-2.467-1.163-2.467-2.588 0-1.428 1.107-2.591 2.466-2.591 1.357 0 2.464 1.163 2.464 2.59 0 1.426-1.107 2.589-2.464 2.589zm0-4.324c-.912 0-1.65.778-1.65 1.733 0 .958.738 1.734 1.65 1.734.908 0 1.65-.776 1.65-1.734 0-.955-.742-1.733-1.65-1.733z",
|
|
9145
|
+
friends: "M26.125 29.568v6.248a.993.993 0 0 1-.992.993H14.55a1.55 1.55 0 0 1-1.55-1.55v-5.57a3.777 3.777 0 0 1 3.777-3.777H36.83a3.777 3.777 0 0 1 3.777 3.777v5.57a1.55 1.55 0 0 1-1.55 1.55H29.032a1.55 1.55 0 0 1-1.55-1.55v-5.691h-1.356zm-.992 0a.435.435 0 1 1 0-.871h9.746a.957.957 0 1 0 0-1.914H16.777a2.906 2.906 0 0 0-2.906 2.906v5.57c0 .375.304.679.679.679h1.235V31.36a.435.435 0 1 1 .872 0v4.578h8.596v-6.37h-.12zm3.22 5.691c0 .375.304.679.678.679h1.235V31.36a.435.435 0 1 1 .872 0v4.578h5.812V31.36a.435.435 0 1 1 .871 0v4.578h1.236a.678.678 0 0 0 .678-.679v-5.57a2.906 2.906 0 0 0-2.906-2.906h-.39l.086.174c.12.245.183.513.183.783a1.827 1.827 0 0 1-1.829 1.828h-6.526v5.691zm8.912-14.481a3.778 3.778 0 1 1-7.556 0 3.778 3.778 0 0 1 7.556 0zm-6.684 0a2.906 2.906 0 1 0 5.812 0 2.906 2.906 0 0 0-5.812 0zm-6.015 0a3.778 3.778 0 1 1-7.556 0 3.778 3.778 0 0 1 7.556 0zm-6.683 0a2.906 2.906 0 1 0 5.812 0 2.906 2.906 0 0 0-5.812 0z",
|
|
9146
|
+
gamepad: "M23.72 24.983h-2.3v-2.278a.457.457 0 0 0-.456-.456.457.457 0 0 0-.456.456v2.278h-2.255a.457.457 0 0 0-.456.455c0 .251.205.456.456.456h2.255v2.278a.457.457 0 0 0 .911 0v-2.278h2.301c.25 0 .456-.205.456-.456a.457.457 0 0 0-.456-.455zm5.445-.456l-.16.16a.908.908 0 0 0 0 1.298c.183.16.41.25.639.25a.9.9 0 0 0 .637-.273l.16-.16a.908.908 0 0 0 0-1.298.88.88 0 0 0-1.276.023zm2.324-2.437l-.137.182a.908.908 0 0 0 0 1.298c.182.16.41.25.638.25a.9.9 0 0 0 .638-.273l.16-.159a.908.908 0 0 0 0-1.299.908.908 0 0 0-1.3 0zm.023 4.852l-.16.16a.908.908 0 0 0 0 1.298.9.9 0 0 0 .638.273.9.9 0 0 0 .638-.273l.16-.16a.908.908 0 0 0 0-1.298.88.88 0 0 0-1.276 0zm2.483-2.415l-.16.16a.908.908 0 0 0 0 1.298.9.9 0 0 0 .638.274.9.9 0 0 0 .638-.274l.16-.16a.908.908 0 0 0 0-1.298.88.88 0 0 0-1.276 0zM38.073 23.229l-.274-1.14v-.045c-.683-2.073-2.597-3.463-4.761-3.44h-.364c-.456 0-.912.068-1.413.205l-2.46.729a5.17 5.17 0 0 1-1.481.205h-1.663a5.169 5.169 0 0 1-1.481-.205l-2.46-.73a6.163 6.163 0 0 0-1.413-.181h-.342a5.022 5.022 0 0 0-4.761 3.44v.045l-.273 1.14a34.909 34.909 0 0 0-.912 8.998l.046 1.731c.023.684.341 1.345.866 1.8a2.45 2.45 0 0 0 1.64.615c.09 0 .16 0 .25-.022l.524-.046c1.299-.137 2.46-.911 3.053-2.073l.843-1.595a4.064 4.064 0 0 1 3.622-2.21h3.645c1.572 0 3.008.912 3.691 2.324l.66 1.39a3.837 3.837 0 0 0 3.099 2.164l.228.023a2.509 2.509 0 0 0 1.89-.615 2.527 2.527 0 0 0 .866-1.823l.046-1.708a34.255 34.255 0 0 0-.911-8.976zm0 8.976l-.046 1.708a1.609 1.609 0 0 1-.547 1.162 1.556 1.556 0 0 1-1.207.387l-.228-.022c-1.025-.092-1.913-.73-2.37-1.663l-.66-1.39c-.82-1.709-2.597-2.825-4.51-2.825h-3.646a5.013 5.013 0 0 0-4.442 2.71l-.843 1.596c-.456.865-1.344 1.48-2.324 1.572l-.524.045a1.583 1.583 0 0 1-1.207-.387 1.608 1.608 0 0 1-.547-1.162l-.045-1.731a34.245 34.245 0 0 1 .865-8.771l.274-1.117a4.1 4.1 0 0 1 3.895-2.78h.342c.364 0 .752.047 1.14.16l2.46.73a6.29 6.29 0 0 0 1.754.25h1.663c.615 0 1.207-.091 1.754-.25l2.46-.73c.388-.113.775-.16 1.162-.16h.41c1.709 0 3.28 1.14 3.85 2.803l.274 1.116c.638 2.848.934 5.81.843 8.749z",
|
|
9147
|
+
health: "M41.47 26.874h-2.623c1.093-2.474.973-4.478.56-5.836C38.7 18.623 36.312 16 32.778 16c-.945 0-1.889.176-2.862.53-1.68.62-2.8 1.298-3.3 1.653-.5-.355-1.59-1.034-3.298-1.653a8.418 8.418 0 0 0-2.862-.53c-3.535 0-5.923 2.623-6.628 5.038-.414 1.444-.56 3.627.824 6.366H11.47a.467.467 0 0 0-.47.474c0 .265.205.47.47.47h3.743c.146.265.325.53.53.795 3.064 4.422 9.725 9.225 10.934 9.52v.03s.03 0 .06-.03h.086v-.03c1.033-.5 7.426-4.627 10.788-9.52.325-.44.59-.88.825-1.324h3.094c.265 0 .47-.206.47-.47 0-.27-.265-.445-.53-.445zm-4.713 1.74c-3.124 4.567-8.87 8.25-10.11 9.049-1.268-.799-6.985-4.512-10.139-9.05-.06-.086-.116-.175-.175-.265h4.332c.176 0 .355-.09.44-.265l1.978-3.888 3.094 7.926c.056.176.265.295.44.295h.03c.206 0 .385-.15.44-.355l2.714-9.284 1.444 4.687c.06.175.205.295.384.325.176.03.351-.06.47-.206l1.15-1.68.974 1.65a.469.469 0 0 0 .41.236h2.654c-.18.294-.355.56-.53.824zm1.06-1.74h-2.889l-1.209-2.063a.469.469 0 0 0-.41-.235c-.18 0-.325.06-.415.205l-1 1.474-1.623-5.273c-.06-.206-.265-.325-.47-.355-.206 0-.411.15-.47.355l-2.743 9.46-2.978-7.605a.438.438 0 0 0-.41-.295.463.463 0 0 0-.445.265l-2.325 4.57h-4.687c-1.179-2.152-1.504-4.216-.974-6.07.62-2.094 2.654-4.333 5.717-4.333.825 0 1.683.175 2.538.47 2.15.795 3.299 1.71 3.329 1.71a.452.452 0 0 0 .59 0s1.149-.915 3.328-1.71a7.116 7.116 0 0 1 2.537-.47c3.034 0 5.098 2.239 5.714 4.332.504 1.71.239 3.594-.705 5.568z",
|
|
9148
|
+
hobbies: "M37.164 19.512A2.844 2.844 0 0 1 40 22.357v11.718a3 3 0 0 1-2.996 3.006H16.996A3 3 0 0 1 14 34.075V22.357a2.852 2.852 0 0 1 2.836-2.845h4.488l.146-.634A3.691 3.691 0 0 1 25.084 16h3.832a3.69 3.69 0 0 1 3.615 2.88l.14.632h4.493zm-15.5.853h-4.828a1.99 1.99 0 0 0-1.986 1.992v11.718c0 1.192.958 2.154 2.146 2.154h20.008c1.183 0 2.14-.963 2.14-2.154V22.357c0-1.1-.89-1.992-1.986-1.992l-4.821-.006a.413.413 0 0 1-.411-.324l-.223-.964a2.858 2.858 0 0 0-2.792-2.224l-3.827.006a2.842 2.842 0 0 0-2.787 2.218l-.223.964a.424.424 0 0 1-.41.33zm-2.776 3.071a.647.647 0 0 1-.645.653.647.647 0 0 1-.645-.653.646.646 0 1 1 1.29 0zM27 33.666c-2.932 0-5.318-2.391-5.318-5.335 0-2.94 2.388-5.336 5.318-5.336 2.93 0 5.318 2.396 5.318 5.336 0 2.94-2.388 5.336-5.318 5.336zm0-9.824c-2.463 0-4.474 2.017-4.474 4.489 0 2.475 2.009 4.489 4.474 4.489 2.465 0 4.474-2.014 4.474-4.489 0-2.472-2.01-4.489-4.474-4.489z",
|
|
9149
|
+
home: "M36.863 40.113H18.167a.462.462 0 0 1-.46-.464V27.983h-3.243a.465.465 0 0 1-.43-.287.465.465 0 0 1 .103-.503L27.17 14.137a.456.456 0 0 1 .653 0l13.014 13.03a.462.462 0 0 1-.3.817l-3.21-.001v11.666a.462.462 0 0 1-.464.464zm-10.086-.924H36.4V27.52c0-.253.21-.46.463-.46h2.557L27.5 15.118 15.577 27.06h2.59c.257 0 .464.206.464.46v11.67h2.003v-9.974c0-.253.206-.463.463-.463h5.22c.253 0 .46.21.46.463v9.973zm-5.22 0h4.297v-9.51h-4.297v9.51zm12.346-5.066H29.46a.464.464 0 0 1-.463-.463v-4.444c0-.253.207-.463.463-.463h4.443c.254 0 .46.21.46.463v4.444a.464.464 0 0 1-.46.463zm-3.98-.927h3.517V29.68h-3.516v3.516z",
|
|
9150
|
+
idea: "M30.86 31.2513L31.304 31.0307C34.1245 29.629 36.06 26.7198 36.06 23.36C36.06 18.6324 32.2276 14.8 27.5 14.8C22.7725 14.8 18.94 18.6324 18.94 23.36C18.94 26.7198 20.8755 29.629 23.696 31.0306L24.14 31.2513V33.84C24.14 34.5027 24.6773 35.04 25.34 35.04H29.66C30.3227 35.04 30.86 34.5027 30.86 33.84V31.2513ZM31.66 31.7471V33.84C31.66 34.9446 30.7646 35.84 29.66 35.84H25.34C24.2354 35.84 23.34 34.9446 23.34 33.84V31.7471C20.258 30.2154 18.14 27.0351 18.14 23.36C18.14 18.1906 22.3306 14 27.5 14C32.6694 14 36.86 18.1906 36.86 23.36C36.86 27.0351 34.742 30.2155 31.66 31.7471ZM29.82 35.8H25.18V38.2C25.18 38.8627 25.7173 39.4 26.38 39.4H28.62C29.2827 39.4 29.82 38.8627 29.82 38.2V35.8ZM24.38 35V38.2C24.38 39.3046 25.2754 40.2 26.38 40.2H28.62C29.7246 40.2 30.62 39.3046 30.62 38.2V35H24.38ZM27.9 25.44L27.9 35.8L27.1 35.8L27.1 25.44L27.9 25.44ZM26.98,22.84a0.52,0.52 0 1,0 1.04,0a0.52,0.52 0 1,0 -1.04,0z",
|
|
9151
|
+
money: "M38.49 25.364h-.61v-4.132c0-.972-.764-1.736-1.687-1.736l-.46.003v-2.766c0-.969-.714-1.733-1.58-1.733h-.104l-17.466 4.49c-.006 0-.016.006-.021.006-.863.07-1.562.808-1.562 1.736v16.035c0 .972.764 1.736 1.684 1.736h19.51a1.72 1.72 0 0 0 1.735-1.736v-4.242h.562c.309 0 .509-.205.509-.509v-6.637a.511.511 0 0 0-.51-.515zm-4.24-9.395c.254.05.509.359.509.764v2.758H20.668l13.581-3.522zm2.66 21.298c0 .408-.309.764-.717.764H16.684c-.405 0-.715-.356-.715-.764V21.232c0-.408.31-.764.715-.764h19.457c.406 0 .715.356.715.764v4.132h-5.055a3.793 3.793 0 0 0-3.83 3.83 3.823 3.823 0 0 0 3.83 3.831h5.11v4.242zm1.066-5.211h-6.175c-1.533 0-2.806-1.279-2.806-2.807s1.278-2.806 2.806-2.806h6.175v5.613z",
|
|
9152
|
+
music: "M16.0946 41C15.6758 40.9998 15.2613 40.9141 14.8763 40.7478C14.4913 40.5816 14.1438 40.3384 13.8549 40.033C13.5659 39.7275 13.3414 39.3662 13.1951 38.9708C13.0487 38.5754 12.9836 38.1542 13.0035 37.7327C13.0234 37.3112 13.1281 36.8982 13.3111 36.5186C13.494 36.1391 13.7516 35.8008 14.0681 35.5245C14.3846 35.2481 14.7535 35.0393 15.1524 34.9107C15.5513 34.7821 15.972 34.7364 16.389 34.7764L14.6146 26.5102C14.5938 26.4131 14.6087 26.3118 14.6566 26.225C14.7045 26.1383 14.782 26.072 14.8748 26.0386L25.8085 22.105C25.8629 22.0854 25.9208 22.0777 25.9784 22.0824C26.0359 22.0872 26.0918 22.1043 26.1423 22.1326C26.1928 22.1608 26.2368 22.1996 26.2712 22.2464C26.3056 22.2931 26.3297 22.3467 26.3419 22.4036L28.849 34.0823C28.8553 34.1122 28.8583 34.1427 28.8581 34.1732C28.953 34.8152 28.8469 35.4711 28.5543 36.0494C28.2617 36.6277 27.7974 37.0997 27.2259 37.3995C26.6545 37.6993 26.0044 37.812 25.3664 37.722C24.7283 37.6319 24.134 37.3436 23.6664 36.8971C23.1987 36.4506 22.8809 35.8683 22.7574 35.2313C22.6338 34.5942 22.7106 33.9342 22.977 33.3432C23.2435 32.7522 23.6863 32.2597 24.2438 31.9343C24.8012 31.6089 25.4456 31.4668 26.087 31.5278L24.7909 25.4897L17.1952 28.2221L19.1273 37.2215C19.2243 37.677 19.2189 38.1486 19.1115 38.6018C19.0041 39.055 18.7975 39.4782 18.5067 39.8404C18.2159 40.2027 17.8484 40.4949 17.4311 40.6955C17.0137 40.8961 16.5571 41.0002 16.0946 41V41ZM16.096 35.5802C15.9355 35.5801 15.7754 35.5974 15.6184 35.6316C15.1769 35.7276 14.7735 35.9533 14.4593 36.2803C14.1451 36.6072 13.9342 37.0207 13.8533 37.4684C13.7723 37.9162 13.825 38.378 14.0047 38.7956C14.1843 39.2131 14.4828 39.5676 14.8625 39.8142C15.2421 40.0609 15.6858 40.1885 16.1375 40.181C16.5892 40.1736 17.0285 40.0313 17.3999 39.7723C17.7713 39.5133 18.0581 39.1491 18.2241 38.7258C18.39 38.3026 18.4277 37.8392 18.3322 37.3944L16.3263 28.044C16.3056 27.947 16.3205 27.8457 16.3684 27.759C16.4163 27.6723 16.4938 27.6061 16.5866 27.5727L24.9535 24.563C25.0079 24.5433 25.0658 24.5356 25.1234 24.5404C25.181 24.5451 25.2369 24.5622 25.2874 24.5905C25.338 24.6187 25.3819 24.6575 25.4163 24.7043C25.4507 24.7511 25.4748 24.8047 25.487 24.8616L27.012 31.9653C27.0269 32.0353 27.0233 32.108 27.0016 32.1762C26.9799 32.2444 26.9408 32.3057 26.8882 32.3539C26.8356 32.402 26.7713 32.4355 26.7019 32.4508C26.6325 32.4662 26.5602 32.4629 26.4925 32.4413C26.0177 32.2882 25.5062 32.2958 25.0362 32.463C24.5661 32.6302 24.1632 32.9477 23.8891 33.3672C23.615 33.7867 23.4846 34.285 23.518 34.7861C23.5513 35.2872 23.7465 35.7635 24.0737 36.1424C24.4009 36.5212 24.8422 36.7818 25.3302 36.8843C25.8182 36.9869 26.3261 36.9257 26.7764 36.7101C27.2266 36.4946 27.5945 36.1365 27.8238 35.6906C28.0532 35.2447 28.1314 34.7354 28.0465 34.2405C28.0435 34.2233 28.0416 34.2059 28.0409 34.1884L25.6461 23.032L15.4835 26.6871L17.3135 35.2131C17.3285 35.2832 17.325 35.3561 17.3032 35.4244C17.2814 35.4927 17.2422 35.554 17.1895 35.6022C17.1367 35.6504 17.0723 35.6838 17.0028 35.699C16.9332 35.7142 16.8608 35.7107 16.793 35.6889C16.5676 35.6166 16.3325 35.5799 16.096 35.5802V35.5802ZM32.7424 25.1081C32.3884 25.1073 32.0356 25.0655 31.6912 24.9834C29.8486 24.5494 28.6167 23.0683 28.9448 21.6848C29.273 20.3014 31.0409 19.5302 32.8832 19.9647C33.2999 20.0622 33.7004 20.2187 34.0726 20.4294L35.7608 13.3246C35.787 13.2158 35.8552 13.1218 35.9506 13.0631C36.0461 13.0043 36.1609 12.9857 36.2701 13.0111L37.5591 13.3154C37.5742 13.3189 37.5891 13.3234 37.6036 13.3287C39.1526 13.7107 40.4602 14.865 40.8653 16.2137C41.2218 17.3992 40.8653 18.6375 39.86 19.7002C39.7944 19.7695 39.7073 19.8147 39.6127 19.8284C39.5181 19.842 39.4217 19.8234 39.3391 19.7754C39.2565 19.7275 39.1927 19.6531 39.1579 19.5643C39.1231 19.4756 39.1194 19.3777 39.1475 19.2866C39.2703 18.8908 39.3135 18.4747 39.2748 18.0622C39.236 17.6497 39.116 17.2489 38.9217 16.8827C38.5874 16.3177 38.0554 15.896 37.4281 15.6987L35.6302 23.2658C35.6143 23.3294 35.5946 23.392 35.5712 23.4534C35.2164 24.4809 34.0837 25.1081 32.7424 25.1081ZM31.8563 20.6882C30.8189 20.6882 29.9417 21.1531 29.7693 21.8792C29.5516 22.7941 30.5216 23.8397 31.8868 24.1621C33.2065 24.4732 34.4745 24.0415 34.771 23.1768C34.785 23.1422 34.7968 23.1067 34.8065 23.0707L36.7067 15.0719C36.7326 14.963 36.8008 14.8688 36.8963 14.81C36.9919 14.7512 37.107 14.7327 37.2162 14.7584C37.7197 14.8569 38.197 15.0593 38.6173 15.3529C39.0376 15.6464 39.3915 16.0244 39.6564 16.4626C39.871 16.8418 40.0159 17.2563 40.0839 17.6864C40.1869 17.2811 40.1768 16.8554 40.0547 16.4554C39.7345 15.3897 38.6278 14.4367 37.3635 14.1385C37.3487 14.1348 37.3347 14.1307 37.3209 14.1259L36.4871 13.9289L34.7548 21.2213C34.7383 21.291 34.7042 21.3553 34.6559 21.4083C34.6076 21.4612 34.5465 21.501 34.4785 21.524C34.4105 21.5469 34.3377 21.5522 34.2671 21.5394C34.1965 21.5266 34.1303 21.496 34.0747 21.4507C33.6687 21.128 33.1948 20.9008 32.6885 20.7861C32.4159 20.7214 32.1366 20.6886 31.8563 20.6882Z",
|
|
9153
|
+
palm: "M17.6524 19.9464C19.3386 18.3308 21.0374 17.8884 22.5216 18.0699C24.0877 18.2615 25.3542 19.1402 26.0674 19.9216L26.6525 20.5627L25.785 20.591C23.9571 20.6506 22.6183 21.0316 21.6518 21.6025C20.6903 22.1703 20.0769 22.9376 19.7126 23.811C19.0201 25.4707 19.216 27.5461 19.752 29.3671C20.0706 27.5716 21.1593 26.164 22.409 25.1297C23.7269 24.0391 25.2551 23.3359 26.3578 23.0023L26.8417 22.8559L26.8729 23.3605C27.3722 31.4395 23.3709 36.4639 20.4761 38.6H27.3175C31.2763 32.8381 30.0426 26.5141 28.9068 23.5273L28.7006 22.9851H29.2807C31.1411 22.9851 32.4738 24.3418 33.3841 25.9639C34.2018 27.4208 34.7338 29.1822 35.0389 30.6669C36.5193 26.0858 35.7542 23.5235 34.336 22.1367C32.8301 20.6641 30.4456 20.3654 28.6276 20.5882L27.1558 20.7687L28.3372 19.8725C31.4012 17.5483 34.6599 18.9084 36.4431 20.2465C36.1571 18.7984 35.658 17.8412 35.062 17.23C34.4236 16.5754 33.6414 16.2841 32.7926 16.2385C31.0616 16.1454 29.0887 17.0798 27.7593 18.0322L27.5044 18.2148L27.2662 18.0109C23.932 15.1575 21.7129 15.0232 20.278 15.8259C18.9213 16.5848 18.0765 18.2689 17.6524 19.9464ZM27.5497 17.2035C24.2402 14.4533 21.7219 14.1016 19.8875 15.1277C18.0725 16.1429 17.1343 18.4114 16.7496 20.3095C16.6824 20.6407 16.8722 20.9073 17.1124 21.0153C17.3456 21.1201 17.6546 21.092 17.8696 20.8636C19.5218 19.1086 21.1158 18.7039 22.4245 18.864C23.3615 18.9786 24.1838 19.3869 24.8039 19.8537C23.3374 20.0005 22.1654 20.37 21.245 20.9136C20.1278 21.5735 19.4019 22.4779 18.9742 23.503C18.1278 25.5319 18.4618 27.9958 19.1 29.9665C19.1626 30.1598 19.3033 30.2893 19.4628 30.3527C19.6117 30.412 19.7665 30.4113 19.8956 30.3837C20.1306 30.3335 20.4528 30.1432 20.5002 29.7677C20.711 28.0964 21.6965 26.7578 22.9191 25.746C23.957 24.8871 25.1431 24.2835 26.1004 23.9322C26.4233 32.5112 21.4389 37.3163 18.9186 38.6462L19.1053 39.4H27.7335L27.853 39.2307C31.9135 33.4813 30.9859 27.1858 29.8698 23.8466C31.0131 24.0894 31.9448 25.0338 32.6865 26.3554C33.5441 27.8835 34.0808 29.8065 34.3534 31.3401C34.4121 31.6703 34.6819 31.8546 34.9397 31.8804C35.2 31.9065 35.5063 31.7752 35.6197 31.4499C37.3777 26.4068 36.687 23.3167 34.8954 21.5647C33.6086 20.3065 31.8257 19.8148 30.2067 19.7346C32.5514 18.8515 34.8696 19.9816 36.2156 21.0844C36.4471 21.274 36.7412 21.2695 36.9547 21.1577C37.1721 21.0439 37.3494 20.7933 37.2979 20.4791C37.0099 18.7229 36.4289 17.4858 35.6347 16.6715C34.8345 15.8509 33.8517 15.4942 32.8356 15.4396C30.9561 15.3386 28.9372 16.2662 27.5497 17.2035Z",
|
|
9154
|
+
party: "M27.46 39.01h3.006c.472 0 .9.247 1.139.642l.169.28h-9.551l.17-.28a1.327 1.327 0 0 1 1.138-.642h3.006v-7.19L17.09 18.937a.461.461 0 0 1 .372-.735H30.25l4.197-5.037a.463.463 0 0 1 .71.592l-3.704 4.445h5.082a.463.463 0 0 1 .373.735 4729.84 4729.84 0 0 1-5.855 7.987l-.106.145c-1.661 2.263-2.457 3.347-3.408 4.645l-.079.107v7.189zm-9.087-19.885l8.625 11.763 8.626-11.763h-17.25z",
|
|
9155
|
+
reparingService: "M17.6264 35.9866L14.9033 31.3082L17.2692 29.9535C17.0676 29.1684 16.9592 28.3465 16.9592 27.4998C16.9592 26.6532 17.0676 25.8313 17.2692 25.0463L14.9033 23.6915L17.6264 19.0133L19.9935 20.3688C21.1773 19.2228 22.6451 18.3639 24.2819 17.9066V15.2H29.7182V17.9068C31.3549 18.3641 32.8227 19.223 34.0065 20.3689L36.3736 19.0134L39.0967 23.6916L36.7309 25.0464C36.9326 25.8314 37.0409 26.6533 37.0409 27.5001C37.0409 28.3468 36.9326 29.1687 36.7309 29.9537L39.0967 31.3085L36.3736 35.9866L34.0066 34.6311C32.8228 35.777 31.355 36.636 29.7182 37.0933V39.8H24.2819V37.0933C22.6452 36.6359 21.1774 35.777 19.9935 34.6311L17.6264 35.9866ZM20.1352 33.6281C21.4188 35.0414 23.1385 36.0571 25.0819 36.4658V39H28.9182V36.4658C30.8617 36.0571 32.5813 35.0414 33.8649 33.6281L36.0818 34.8976L38 31.6024L35.7864 30.3347C36.08 29.4414 36.2409 28.4893 36.2409 27.5001C36.2409 26.5109 36.08 25.5587 35.7864 24.6654L38 23.3978L36.0819 20.1025L33.8649 21.3719C32.5812 19.9586 30.8616 18.9429 28.9182 18.5343V16H25.0819V18.5341C23.1384 18.9427 21.4188 19.9585 20.1352 21.3718L17.9182 20.1023L16 23.3976L18.2137 24.6653C17.9201 25.5584 17.7592 26.5107 17.7592 27.4998C17.7592 28.489 17.9201 29.4412 18.2137 30.3345L16 31.6021L17.9182 34.8976L20.1352 33.6281ZM27.0001 22.9394C24.4556 22.9394 22.3956 24.9921 22.3956 27.4999C22.3956 30.0078 24.4556 32.0605 27.0001 32.0605C29.5445 32.0605 31.6046 30.0078 31.6046 27.4999C31.6046 24.9921 29.5445 22.9394 27.0001 22.9394ZM27.0001 22.1394C24.02 22.1394 21.5956 24.5441 21.5956 27.4999C21.5956 30.4557 24.02 32.8605 27.0001 32.8605C29.9801 32.8605 32.4046 30.4557 32.4046 27.4999C32.4046 24.5441 29.9801 22.1394 27.0001 22.1394Z",
|
|
9156
|
+
security: "M35.7582 19.8593L26.5878 15.0529C26.4517 14.9815 26.2887 14.9825 26.1536 15.0554L17.2369 19.8618C17.0907 19.9408 17 20.0916 17 20.2558V26.5343C17.0054 31.6953 20.1141 36.3644 24.9216 38.4321L26.1592 38.9626C26.2749 39.0122 26.4066 39.0125 26.5225 38.9631L27.9172 38.3707C32.8138 36.3479 35.9995 31.6337 36 26.4097V20.2558C36 20.0899 35.907 19.9373 35.7582 19.8593ZM35.0869 26.4097C35.0859 31.2736 32.1191 35.6623 27.5597 37.5445L27.5567 37.546L26.3422 38.0617L25.2869 37.6089C20.8119 35.6843 17.9179 31.3385 17.9128 26.5343V20.5217L26.3761 15.9593L35.0869 20.5249V26.4097ZM22.8092 26.0853C22.6443 25.8753 22.3543 25.8505 22.1612 26.0298C21.9681 26.2088 21.9453 26.5244 22.1102 26.7341L24.5376 29.8247C24.6997 30.031 24.9836 30.0592 25.1769 29.888L30.8304 24.8872C31.0274 24.7132 31.0571 24.3984 30.8968 24.1843C30.7368 23.9704 30.4473 23.9378 30.2503 24.1121L24.9451 28.8045L22.8092 26.0853Z",
|
|
9157
|
+
smile: "M32.0437 29.7417C31.8288 29.5492 31.4985 29.568 31.307 29.7824C30.2187 30.9986 28.6493 31.6957 27.0001 31.6957C25.3514 31.6957 23.7815 30.9986 22.6931 29.7824C22.5006 29.568 22.1714 29.5492 21.9564 29.7417C21.7415 29.9337 21.7237 30.2635 21.9157 30.4784C23.2018 31.9153 25.055 32.7391 27.0001 32.7391C28.9456 32.7391 30.7989 31.9148 32.0844 30.4784C32.2764 30.2635 32.2582 29.9337 32.0437 29.7417ZM27 15C20.3833 15 15 20.3833 15 27C15 33.6167 20.3833 39 27 39C33.6167 39 39 33.6167 39 27C39 20.3833 33.6167 15 27 15ZM27 37.9565C20.9583 37.9565 16.0435 33.0417 16.0435 27C16.0435 20.9583 20.9583 16.0435 27 16.0435C33.0417 16.0435 37.9565 20.9583 37.9565 27C37.9565 33.0417 33.0417 37.9565 27 37.9565ZM31.1739 23.3478C29.7355 23.3478 28.5652 24.5181 28.5652 25.9565C28.5652 26.2445 28.799 26.4783 29.087 26.4783C29.375 26.4783 29.6087 26.2445 29.6087 25.9565C29.6087 25.0936 30.311 24.3913 31.1739 24.3913C32.0369 24.3913 32.7391 25.0936 32.7391 25.9565C32.7391 26.2445 32.9729 26.4783 33.2609 26.4783C33.5489 26.4783 33.7826 26.2445 33.7826 25.9565C33.7826 24.5181 32.6123 23.3478 31.1739 23.3478ZM24.3912 25.9565C24.3912 26.2445 24.625 26.4783 24.913 26.4783C25.201 26.4783 25.4347 26.2445 25.4347 25.9565C25.4347 24.5181 24.2644 23.3478 22.826 23.3478C21.3876 23.3478 20.2173 24.5181 20.2173 25.9565C20.2173 26.2445 20.4511 26.4783 20.7391 26.4783C21.0271 26.4783 21.2608 26.2445 21.2608 25.9565C21.2608 25.0936 21.9631 24.3913 22.826 24.3913C23.689 24.3913 24.3912 25.0936 24.3912 25.9565Z",
|
|
9158
|
+
sport: "M19.565 26.508v1.901h15.597v-1.9H19.565zm0-.948v-4.943c0-.892-.715-1.617-1.595-1.617h-.75c-.879 0-1.594.725-1.594 1.617v2.567h-1.031c-.88 0-1.595.723-1.595 1.614v5.323c0 .892.715 1.615 1.595 1.615h1.031v2.567c0 .892.715 1.617 1.595 1.617h.75c.879 0 1.594-.725 1.594-1.617V29.36h15.597v4.943c0 .892.715 1.617 1.595 1.617h.75c.881 0 1.594-.725 1.594-1.617v-2.567h1.031c.882 0 1.595-.723 1.595-1.615v-5.323c0-.891-.713-1.614-1.595-1.614h-1.031v-2.567c0-.892-.713-1.617-1.595-1.617h-.75c-.879 0-1.594.725-1.594 1.617v4.943H19.565zm-3.939 5.225h-1.031a.66.66 0 0 1-.657-.664v-5.323a.66.66 0 0 1 .657-.664h1.031v6.651zm.938.95V20.618c0-.368.294-.667.657-.667h.75c.362 0 .656.3.656.667v13.686a.66.66 0 0 1-.657.664h-.75a.66.66 0 0 1-.656-.664v-2.567zm22.537-.95h1.031a.66.66 0 0 0 .657-.664v-5.323a.66.66 0 0 0-.657-.664h-1.031v6.651zm-.938.95V20.618a.662.662 0 0 0-.657-.667h-.75a.662.662 0 0 0-.656.667v13.686a.66.66 0 0 0 .657.664h.75a.66.66 0 0 0 .656-.664v-2.567z",
|
|
9159
|
+
theater: "M28.7364 18.87C30.2876 18.87 31.5096 19.6791 31.5096 20.7169C31.5096 21.7492 30.2932 22.5639 28.7364 22.5639C27.1852 22.5639 25.9632 21.7548 25.9632 20.7169C25.9632 19.6791 27.1796 18.87 28.7364 18.87ZM28.7364 21.6432C29.791 21.6432 30.5833 21.1578 30.5833 20.7169C30.5833 20.2761 29.7966 19.7907 28.7364 19.7907C27.6818 19.7907 26.8895 20.2761 26.8895 20.7169C26.8895 21.1522 27.6818 21.6432 28.7364 21.6432ZM19.8701 26.9608C21.2985 26.3414 22.7381 26.6037 23.1454 27.5523C23.5584 28.5008 22.7604 29.734 21.3376 30.3478C19.9147 30.9616 18.4695 30.7049 18.0622 29.7563C17.6493 28.8077 18.4416 27.5802 19.8701 26.9608ZM18.9048 29.388C19.0777 29.7898 19.9984 29.9237 20.9693 29.4996C21.9402 29.0811 22.4703 28.3167 22.2973 27.915C22.1243 27.5132 21.2037 27.3793 20.2328 27.8034C19.2674 28.2274 18.7318 28.9919 18.9048 29.388ZM28.5634 25.5435C29.4227 26.8604 30.8679 27.6416 32.4358 27.6416C34.0038 27.6416 35.449 26.8548 36.3083 25.5435L37.0839 26.0457C36.0572 27.6248 34.3163 28.5678 32.4358 28.5678C30.5498 28.5678 28.8145 27.6248 27.7878 26.0457L28.5634 25.5435ZM36.1298 18.8644C37.681 18.8644 38.903 19.6735 38.903 20.7114C38.903 21.7492 37.6865 22.5583 36.1298 22.5583C34.573 22.5639 33.3566 21.7492 33.3566 20.7114C33.3566 19.6735 34.573 18.8644 36.1298 18.8644ZM36.1298 21.6376C37.1844 21.6376 37.9767 21.1522 37.9767 20.7114C37.9767 20.2761 37.1844 19.7851 36.1298 19.7851C35.0752 19.7851 34.2828 20.2706 34.2828 20.7114C34.2828 21.1466 35.0752 21.6376 36.1298 21.6376ZM23.6587 21.4814V13C23.6587 13 27.7878 15.4775 32.4359 15.4775C37.0783 15.4775 41.2074 13 41.2074 13V24.5949C41.2074 27.781 39.4776 30.7216 36.6933 32.2673C35.8396 32.7415 34.9077 33.0652 33.9536 33.2326C33.6467 34.2593 33.1668 35.2134 32.5196 36.0616C30.84 38.26 28.2677 39.7889 24.7078 39.4708C21.5384 39.1863 18.7764 37.1664 17.5042 34.2425L12.8617 23.6185C12.8617 23.6185 18.648 24.5894 23.6587 21.4814ZM36.2469 31.4582C38.7355 30.0744 40.2867 27.4463 40.2867 24.5949V14.5512C37.8539 15.762 35.1588 16.4037 32.4359 16.4037C29.7129 16.4037 27.0178 15.7676 24.585 14.5512V24.5949C24.585 27.4463 26.1306 30.0744 28.6248 31.4582C30.946 32.7527 33.9201 32.7527 36.2469 31.4582ZM18.3467 33.8798C19.485 36.4912 21.9569 38.2823 24.7915 38.5557C27.5144 38.8124 30.1258 37.6741 31.783 35.5091C32.2852 34.8563 32.6646 34.1309 32.938 33.3609C32.7707 33.3721 30.2095 33.5283 27.5702 31.9046C25.2044 31.9269 23.7536 34.1867 23.4969 35.7379L22.5874 35.5873C22.8999 33.7292 24.5292 31.447 26.5993 31.1569C24.7524 29.5108 23.6587 27.1394 23.6587 24.6061V22.5416C20.8186 24.0872 17.56 24.8405 14.3292 24.6786L18.3467 33.8798Z",
|
|
9160
|
+
travel: "M42.158 34.859v-.04H26.766a5.54 5.54 0 0 1-.429-2.144 5.488 5.488 0 0 1 5.495-5.495 5.522 5.522 0 0 1 4.831 2.844c2.185-.35 4.365.899 5.185 3.042.232.585.31 1.208.31 1.793zm-14.732-.966h13.705a3.167 3.167 0 0 0-.15-.494c-.65-1.687-2.372-2.749-4.171-2.46l-.64.103-.316-.565a4.594 4.594 0 0 0-4.022-2.371 4.564 4.564 0 0 0-4.57 4.569c0 .418.055.823.164 1.218zm-6.22-15.035a.484.484 0 0 1 .276-.63.485.485 0 0 1 .63.276l.626 1.6a.491.491 0 0 1-.28.632.489.489 0 0 1-.629-.279l-.622-1.599zm-6.708 6.669a.489.489 0 0 1 .374-.902l1.868.78a.487.487 0 0 1 .265.635.493.493 0 0 1-.64.266l-1.867-.78zm22.676-.745a.487.487 0 0 1 .384.898l-1.636.7a.489.489 0 0 1-.64-.255.483.483 0 0 1 .255-.64l1.637-.703zm-6.887-6.516a.486.486 0 0 1 .633-.269c.252.1.371.381.273.633l-.701 1.752a.488.488 0 0 1-.905-.36l.7-1.756zm-14.633 1.531a.488.488 0 0 1 .708-.67l2.729 2.885a.485.485 0 0 1-.02.687.485.485 0 0 1-.688-.017l-2.729-2.885zM11.48 30.082a.487.487 0 1 1 .017-.973l4.014.078a.486.486 0 1 1-.02.974l-4.011-.079zm24.336-10.656c.19-.187.5-.187.687.007.191.19.188.5-.003.687l-2.844 2.807a.489.489 0 0 1-.688-.694l2.848-2.807zm-10.397-3.94a.487.487 0 0 1 .976 0v4.015a.487.487 0 1 1-.976 0v-4.014zm11.503 22.445a.49.49 0 0 1 .218.654.491.491 0 0 1-.654.217c-.017-.01-.04-.017-.102-.044-.085-.034-.122-.048-.187-.082-1.065-.581-2.718-.581-3.78 0-1.354.742-3.361.742-4.715 0-1.065-.581-2.719-.581-3.78 0-1.354.742-3.365.742-4.72 0-1.06-.581-2.714-.581-3.776 0a.487.487 0 1 1-.47-.854c1.355-.745 3.362-.745 4.716 0 1.062.582 2.719.582 3.78 0 1.354-.745 3.362-.745 4.716 0 1.061.582 2.718.582 3.78 0 1.354-.745 3.361-.745 4.698-.01.017.01.041.02.102.044.085.034.123.048.174.075zM18.645 33.86a8.206 8.206 0 0 1-1.017-3.95c0-4.57 3.698-8.285 8.28-8.285 2.447 0 4.747 1.096 6.332 2.94.174.2.154.51-.054.684a.482.482 0 0 1-.684-.051c-1.405-1.63-3.436-2.596-5.593-2.596a7.305 7.305 0 0 0-7.308 7.308c0 1.333.37 2.613 1.061 3.763a.63.63 0 0 1 .058.143 5.135 5.135 0 0 0 1.419-.371c.803-.381 1.81-.558 2.84-.514a.487.487 0 1 1-.04.973c-.881-.037-1.732.112-2.395.425-1.528.68-3.777.68-5.304 0-1.276-.568-3.24-.568-4.515 0a.487.487 0 1 1-.395-.891c1.528-.68 3.777-.68 5.304 0 .575.255 1.286.398 2.01.422z",
|
|
9161
|
+
work: "M23.893 27.36v1.009c0 .146.105.258.248.258h.216v1.467c0 .552.43 1.027 1.003 1.027h2.538c.573 0 1.003-.475 1.003-1.027v-1.467h.216c.143 0 .248-.112.248-.258v-1.01h8.07v9.67c0 .042-.014.056-.052.056H15.84c-.038 0-.052-.014-.052-.056v-9.67h8.105zm-8.999-.004v9.673c0 .548.416.974.946.974h21.543c.53 0 .946-.426.946-.974v-9.673c.506-.028.894-.44.894-.97v-7.048c0-.544-.412-.97-.946-.97h-7.802v-.57c0-1.03-.904-1.798-2.004-1.798h-3.684c-1.1 0-2.005.768-2.005 1.798v.57h-7.836c-.53 0-.946.426-.946.97v7.047c0 .52.412.943.894.971zm8.964-8.988v-.57c0-.37.384-.698.929-.698h3.684c.545 0 .932.328.932.698v.57h-5.545zm-8.912 8.073c-.02 0-.052-.031-.052-.056v-7.047c0-.038.014-.055.052-.055h23.33c.04 0 .053.017.053.055v7.047c0 .042-.014.056-.052.056h-23.33zm13.193 1.233h-3.055v2.287c0 .21.153.395.37.395h2.315c.217 0 .37-.185.37-.395v-2.287z",
|
|
9162
|
+
world: "M38.745 22.8998C36.9315 18.1411 32.3667 14.9974 27.2741 15C26.1415 14.9979 25.0141 15.154 23.9246 15.4637L23.9082 15.4686C20.8844 16.3235 18.3068 18.3118 16.7122 21.0195C16.684 21.0672 16.6657 21.1201 16.6585 21.175C16.4625 21.4365 16.2999 21.7215 16.1743 22.0231L16.1435 22.0896C14.3781 25.8923 14.6735 30.3327 16.9271 33.868C19.1808 37.4032 23.0816 39.5453 27.2741 39.5499C30.0925 39.5523 32.8251 38.5801 35.0088 36.7982C35.1857 36.8134 35.3519 36.7118 35.4191 36.5475C35.432 36.5096 35.4393 36.4701 35.4408 36.4301C39.2436 33.043 40.5585 27.6586 38.745 22.8998ZM23.8651 16.3381C24.4076 17.0035 25.207 17.4073 26.0645 17.4493C26.2989 17.4553 26.5335 17.4451 26.7666 17.4185C27.1435 17.333 27.5383 17.38 27.8847 17.5514C28.0786 17.6551 28.1856 17.8702 28.1514 18.0874C28.0624 18.2509 27.9402 18.3941 27.7928 18.508C27.4261 18.7567 27.2052 19.1699 27.2019 19.613C27.2297 19.8888 27.3774 20.1385 27.6057 20.2957C27.9433 20.5212 28.3594 20.5966 28.7546 20.5037C28.9736 20.4464 29.1869 20.3692 29.3918 20.2731C29.5782 20.1815 29.7753 20.1138 29.9786 20.0716C30.4981 19.9986 31.0315 20.342 31.576 20.7327C31.8489 20.9301 32.2933 21.303 32.2014 21.5861C32.1308 21.8032 31.8657 21.96 31.5859 22.1265C31.4726 22.1934 31.3619 22.259 31.2338 22.3481C30.7805 22.6913 30.2838 22.9729 29.7566 23.1856C29.5574 23.2519 29.3545 23.3067 29.1489 23.3497C28.7209 23.4246 28.3095 23.5748 27.9339 23.7933C27.1802 24.28 27.2721 25.0588 27.3299 25.5269C27.3164 25.5224 27.3016 25.5171 27.2856 25.5101C27.2154 25.4814 27.1465 25.4485 27.078 25.4165C26.6537 25.1303 26.104 25.1083 25.6582 25.3597C25.2124 25.6111 24.9468 26.0928 24.9722 26.604C24.9722 27.5778 25.6952 28.1457 26.2762 28.6015L26.4781 28.7615C26.6063 28.8793 26.7217 29.0104 26.8223 29.1526C25.9975 28.9449 25.1722 28.7407 24.3464 28.54C23.6521 28.3721 22.9513 28.1653 22.664 27.6516C22.5542 27.4188 22.4802 27.1708 22.4445 26.9159C22.3925 26.5114 22.2503 26.1239 22.0284 25.7817C21.6073 25.3117 21.0398 24.9977 20.4179 24.8905L20.3428 24.8692C19.7273 24.6862 19.39 24.4658 19.2801 24.1774C19.2115 23.803 19.2726 23.4164 19.4532 23.0814C19.6852 22.5988 19.7625 22.0564 19.6748 21.5282C19.5827 21.1232 19.312 20.7817 18.9386 20.5997C18.7168 20.4964 18.4747 20.4444 18.23 20.4474C18.1779 20.4474 18.1249 20.4499 18.0716 20.454C19.5129 18.4978 21.5434 17.0552 23.8651 16.3381ZM25.5499 38.596L25.5536 38.5997C25.3926 38.5104 25.2364 38.4126 25.0858 38.3067C24.7541 38.1 24.5274 37.7607 24.4634 37.3752C24.4863 37.1277 24.5663 36.8889 24.6973 36.6776C24.789 36.4823 24.8568 36.2766 24.8991 36.065C24.9252 35.8729 24.9954 35.6895 25.1043 35.5291C25.2256 35.4185 25.3662 35.3312 25.5191 35.2714C25.6904 35.1956 25.8532 35.1021 26.0049 34.9924C26.3324 34.7316 26.6039 34.4076 26.8035 34.0396C26.8999 33.8706 26.9832 33.6863 27.0636 33.5062C27.1727 33.2206 27.3249 32.9534 27.515 32.7139C27.9253 32.2818 28.7336 32.6026 29.0611 32.7594C29.6859 33.04 30.2604 33.4213 30.7615 33.8882L30.8087 33.9366C31.3396 34.4978 31.9046 35.0259 32.5005 35.5176C32.9934 35.8984 33.5335 36.2139 34.1073 36.4561C31.6555 38.2845 28.5737 39.0551 25.5499 38.596ZM34.8324 35.8722C34.1816 35.6314 33.5696 35.2967 33.0158 34.8788C32.4463 34.4074 31.906 33.9018 31.3979 33.3647L31.3507 33.3167C30.785 32.7806 30.133 32.3437 29.4222 32.0241C28.3841 31.526 27.474 31.5727 26.9237 32.1529C26.6672 32.4567 26.4629 32.801 26.3193 33.1718C26.2459 33.3334 26.1744 33.4931 26.0952 33.6326C25.9493 33.9054 25.7505 34.1464 25.5105 34.3416C25.4027 34.4168 25.2877 34.481 25.1671 34.5333C24.9171 34.6359 24.6901 34.7874 24.4995 34.9789C24.2917 35.2384 24.1549 35.5475 24.1027 35.8759C24.0741 36.0226 24.0294 36.1657 23.9693 36.3026C23.7738 36.629 23.6619 36.9985 23.6436 37.3785C23.6496 37.6766 23.7367 37.9673 23.8955 38.2196C20.735 37.2398 18.1516 34.9429 16.8088 31.9188C15.4661 28.8946 15.4947 25.4379 16.8874 22.4364L16.9186 22.3687C17.03 22.0745 17.1963 21.8043 17.4086 21.5722C17.484 21.497 17.573 21.4365 17.6708 21.3942C17.8477 21.315 18.0391 21.2731 18.2329 21.2711C18.3528 21.2683 18.4718 21.2921 18.5813 21.3409C18.7363 21.419 18.8462 21.5645 18.8792 21.7348C18.9152 22.1019 18.8468 22.4717 18.6819 22.8016C18.4199 23.318 18.3596 23.9133 18.5124 24.4717C18.7878 25.191 19.5551 25.493 20.1127 25.6588L20.1948 25.6818C20.6382 25.7528 21.0489 25.9587 21.3712 26.2714C21.5168 26.5186 21.6092 26.7935 21.6424 27.0785C21.6929 27.4178 21.7967 27.747 21.9502 28.0539C22.3982 28.8569 23.3244 29.1388 24.1565 29.3398C25.0494 29.5567 25.9431 29.7781 26.8376 30.0037C27.0175 30.0624 27.2116 30.0599 27.3899 29.9968C27.5979 29.916 27.7468 29.7302 27.7806 29.5097C27.8742 28.888 27.0153 28.1404 27.001 28.1297L26.7851 27.9582C26.2759 27.5586 25.795 27.1811 25.795 26.6041C25.7901 26.3618 25.9298 26.1397 26.1504 26.0391C26.3034 25.9755 26.4314 26.0219 26.7297 26.1622C26.8118 26.2008 26.8939 26.2394 26.969 26.2698C27.2878 26.4407 27.6799 26.3914 27.9463 26.1467C28.1197 25.9532 28.1928 25.6899 28.1441 25.4347C28.0768 24.8878 28.1031 24.6617 28.3788 24.4832C28.6766 24.3196 28.9998 24.2073 29.3349 24.1512C29.571 24.1007 29.8039 24.0364 30.0325 23.9588C30.6378 23.7172 31.208 23.3957 31.728 23.0027C31.8101 22.9448 31.9048 22.8898 32 22.8336C32.4392 22.6368 32.7887 22.2825 32.9795 21.8406C33.1728 21.2473 32.8613 20.6506 32.053 20.0676C31.5339 19.6954 30.7469 19.1328 29.8581 19.2604C29.5824 19.3111 29.3147 19.3989 29.0625 19.5214C28.9018 19.5972 28.7348 19.659 28.5635 19.7061C28.399 19.744 28.2263 19.7168 28.0814 19.6301C28.0211 19.5866 28.0178 19.5526 28.0165 19.5399C28.0075 19.4332 28.1396 19.3015 28.3448 19.1123C28.5976 18.9137 28.7966 18.655 28.9238 18.3598C29.0926 17.7794 28.8435 17.1588 28.3202 16.8563C27.8233 16.583 27.2462 16.4928 26.6896 16.6015C26.4943 16.6245 26.2977 16.6338 26.1012 16.6294C25.6106 16.6028 25.1425 16.4153 24.7692 16.096C29.8767 14.9455 35.1138 17.4063 37.4882 22.0723C39.8623 26.7384 38.7689 32.4206 34.8324 35.8722Z",
|
|
9163
|
+
register_order: "M33.7842 18.4074C33.7842 16.0611 32.9999 11 28.4999 11C26 11 23 13 23.3607 18.4074M22.3757 18.3749H18.2507C17.3963 18.3749 17.3571 17.4289 18.2507 17.4289C18.2507 17.4289 19.9064 17.4398 22.3413 17.453M22.3757 18.3749C22.3502 18.0945 22.3376 17.7842 22.3413 17.453M22.3757 18.3749C22.3757 18.3749 29.9051 18.3638 34.7251 18.3562M22.3757 18.3749H23.8756M22.3413 17.453C22.3733 14.5363 23.6647 10 28.5 10C33.0233 10 34.5595 14.5881 34.7187 17.499M22.3413 17.453C25.7428 17.4716 30.6651 17.4947 34.7187 17.499M34.7251 18.3562C35.5107 18.3757 37.8004 18.0621 39.2507 19.8749C40.7507 21.7499 40.5 22.9997 40.5 25.9997V36.9997C40.5 37.9997 39.5823 39.9997 37.5 39.9997H19.5C18.5 39.9997 17.5 39.5 17 39C16.5 38.5 16 37.4997 16 36.4997C16 35.4997 15 35.5 15 36.4997C15.5 40 17.5 41 19 41C20.5 41 29.9834 40.9997 37.5 40.9997C40.3355 40.9997 41.5 38.4997 41.5 36.9997C41.5 32.9997 41.3863 29.4997 41.3863 22.9997C41.3863 19.874 39.0063 17.4997 36 17.4997C35.5851 17.4997 35.157 17.4995 34.7187 17.499M34.7251 18.3562C34.737 18.094 34.7355 17.8058 34.7187 17.499M36.0015 25.0068H34.6554C34.3189 25.0068 33.9824 25.309 33.9824 25.6818V27.0318C33.9824 27.4046 34.2837 27.7068 34.6554 27.7068H36.0015C36.3732 27.7068 36.6745 27.4046 36.6745 27.0318V25.6818C36.6745 25.2599 36.338 25.0068 36.0015 25.0068ZM36.0117 24H34.5117C34.0117 24 33.0832 24.3318 33.0117 25.5C32.9854 25.9315 33.0116 26.482 33.0116 26.9318C33.0116 27.3046 32.9778 28.6238 34.4778 28.6238C35.3867 28.6238 35.4727 28.6212 36.5117 28.5867C37.5508 28.5522 37.6754 27.4818 37.6754 27.0068V25.4818C37.6754 24.659 36.9302 24 36.0117 24ZM29.0015 25.0068H27.6554C27.3189 25.0068 26.9824 25.309 26.9824 25.6818V27.0318C26.9824 27.4046 27.2837 27.7068 27.6554 27.7068H29.0015C29.3732 27.7068 29.6745 27.4046 29.6745 27.0318V25.6818C29.6745 25.2599 29.338 25.0068 29.0015 25.0068ZM29.0117 24H27.5117C27.0117 24 26.0832 24.3318 26.0117 25.5C25.9854 25.9315 26.0116 26.482 26.0116 26.9318C26.0116 27.3046 25.9778 28.6238 27.4778 28.6238C28.3867 28.6238 28.4727 28.6212 29.5117 28.5867C30.5508 28.5522 30.6754 27.4818 30.6754 27.0068V25.4818C30.6754 24.659 29.9302 24 29.0117 24ZM16.7508 29.9998C14.8758 28.4998 14.5006 28.4998 12.6258 26.2498C10.751 23.9998 9.69068 20.4322 10.7507 17.2499C11.1255 16.1249 11.5004 16.4999 11.5006 17.9999C11.5008 19.1249 12 20.5 12.5 21.5C13 22.5 13.7815 23.5899 14.7501 24.3749C15.7187 25.1598 16.8744 26 18.5001 26.9998C18.5464 27.0284 20.1256 24.7499 20.8756 23.9999C21.2278 23.6477 21.7127 23.9727 21.907 24.7499L23.6882 31.8748C23.7837 32.2568 23.5179 32.6779 23.1256 32.7114C19.7506 32.9998 18.25 33.2548 16 33.5C15.1192 33.596 14.5545 33.1365 15 32.5C16.0499 31 16.768 30.0136 16.7508 29.9998ZM12.5 24.5C11.948 23.3953 11.5 21.5 11.5 21.5L12.7269 23.5899C13.3006 24.3749 14.7226 25.6589 16 26.5C17.8985 27.7502 16.7507 26.9998 18.5 28C18.934 28.2482 19.5 27.5 20.5 26C21.0914 25.1129 21.1167 24.966 21.5001 26.5C22 28.5 22.0001 28.5 22.5001 30.5C22.8425 31.8697 22.7897 31.8748 21.5145 31.9986L21.5001 32C21.2354 32.0257 18.5179 32.3266 17 32.5C16.2698 32.5834 15.7821 32.7724 16 32.5C18 30 17.8898 29.7541 17.6709 29.5899C15.5341 27.9873 13.3119 26.1249 12.5 24.5ZM23.8894 18.4008C24.226 18.4008 24.6747 18.4005 24.6747 18.4005V19.1941C24.6747 19.5669 24.3716 20.0001 23.9999 20.0001H22.6538C22.2821 20.0001 21.9413 19.5979 21.9413 19.2251V18.3955C22.4413 18.3955 23.5529 18.4008 23.8894 18.4008ZM22 18.3955C21.5002 18.3955 22.0752 18.3956 21.0752 18.3956C21.0752 18.8279 21.0752 18.9458 21.0752 19.3956C21.0752 19.8454 21.5312 20.8169 22.4779 20.8478C23.3864 20.8775 23.5185 20.8437 24.324 20.8169C25.1296 20.7901 25.4999 19.9134 25.4999 19.2967C25.4999 18.68 25.4999 19.5116 25.4999 18.4008C24.3247 18.4188 24.5002 18.3954 22 18.3955ZM34.8142 18.4008C35.1508 18.4008 35.5995 18.4005 35.5995 18.4005V19.1941C35.5995 19.5669 35.2964 20.0001 34.9247 20.0001H33.5786C33.2069 20.0001 32.8661 19.5979 32.8661 19.2251V18.3955C33.3661 18.3955 34.4777 18.4008 34.8142 18.4008ZM32.9248 18.3955C32.425 18.3955 33 18.3956 32 18.3956C32 18.8279 32 18.9458 32 19.3956C32 19.8454 32.456 20.8169 33.4027 20.8478C34.3112 20.8775 34.4433 20.8437 35.2488 20.8169C36.0544 20.7901 36.4247 19.9134 36.4247 19.2967C36.4247 18.68 36.4247 18.3796 36.4247 18.4008C36.4247 18.4219 35.5995 18.4005 32.9248 18.3955ZM29.0015 32.0068H27.6554C27.3189 32.0068 26.9824 32.309 26.9824 32.6818V34.0318C26.9824 34.4046 27.2837 34.7068 27.6554 34.7068H29.0015C29.3732 34.7068 29.6745 34.4046 29.6745 34.0318V32.6818C29.6745 32.2599 29.338 32.0068 29.0015 32.0068ZM29.0117 31H27.5117C27.0117 31 26.0832 31.3318 26.0117 32.5C25.9854 32.9315 26.0116 33.482 26.0116 33.9318C26.0116 34.3046 25.9778 35.6238 27.4778 35.6238C28.3867 35.6238 28.4727 35.6212 29.5117 35.5867C30.5508 35.5522 30.6754 34.4818 30.6754 34.0068V32.4818C30.6754 31.659 29.9302 31 29.0117 31ZM36.0015 32.0068H34.6554C34.3189 32.0068 33.9824 32.309 33.9824 32.6818V34.0318C33.9824 34.4046 34.2837 34.7068 34.6554 34.7068H36.0015C36.3732 34.7068 36.6745 34.4046 36.6745 34.0318V32.6818C36.6745 32.2599 36.338 32.0068 36.0015 32.0068ZM36.0117 31H34.5117C34.0117 31 33.0832 31.3318 33.0117 32.5C32.9854 32.9315 33.0116 33.482 33.0116 33.9318C33.0116 34.3046 32.9778 35.6238 34.4778 35.6238C35.3867 35.6238 35.4727 35.6212 36.5117 35.5867C37.5508 35.5522 37.6754 34.4818 37.6754 34.0068V32.4818C37.6754 31.659 36.9302 31 36.0117 31Z"
|
|
7565
9164
|
};
|
|
7566
9165
|
|
|
7567
9166
|
// ../../src/resources/contexts/context-icon-preset.ts
|
|
@@ -7629,15 +9228,6 @@ function escapeXmlAttr(value) {
|
|
|
7629
9228
|
return value.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
7630
9229
|
}
|
|
7631
9230
|
|
|
7632
|
-
// ../../src/resources/common/anyone-access.ts
|
|
7633
|
-
var AnyoneAccessValues = {
|
|
7634
|
-
Unknown: "UnknownAnyoneAccess",
|
|
7635
|
-
None: "NoneAnyoneAccess",
|
|
7636
|
-
Read: "Read",
|
|
7637
|
-
ReadWrite: "ReadWrite",
|
|
7638
|
-
Denied: "Denied"
|
|
7639
|
-
};
|
|
7640
|
-
|
|
7641
9231
|
// ../../src/resources/common/participation-field.ts
|
|
7642
9232
|
var ParticipationFieldTypeValues = {
|
|
7643
9233
|
Unknown: "UnknownParticipationField",
|
|
@@ -7672,48 +9262,6 @@ var ParticipationFieldRequirementTypeValues = {
|
|
|
7672
9262
|
Required: "RequiredField"
|
|
7673
9263
|
};
|
|
7674
9264
|
|
|
7675
|
-
// ../../src/resources/common/user-access-level.ts
|
|
7676
|
-
var UserAccessLevelValues = {
|
|
7677
|
-
Unknown: "UnknownUserAccessLevel",
|
|
7678
|
-
Authenticated: "Authenticated",
|
|
7679
|
-
Unauthenticated: "Unauthenticated"
|
|
7680
|
-
};
|
|
7681
|
-
|
|
7682
|
-
// ../../src/resources/contacts/types.ts
|
|
7683
|
-
var GenderValues = {
|
|
7684
|
-
Unknown: "UnknownGender",
|
|
7685
|
-
Male: "Male",
|
|
7686
|
-
Female: "Female",
|
|
7687
|
-
Other: "OtherGender"
|
|
7688
|
-
};
|
|
7689
|
-
var CommunicationTypeValues = {
|
|
7690
|
-
Unknown: "UnknownCommunicationType",
|
|
7691
|
-
Phone: "Phone",
|
|
7692
|
-
Sms: "Sms",
|
|
7693
|
-
Email: "Email",
|
|
7694
|
-
WebSite: "WebSite",
|
|
7695
|
-
Telegram: "Telegram",
|
|
7696
|
-
WhatsApp: "WhatsApp",
|
|
7697
|
-
Viber: "Viber",
|
|
7698
|
-
Facebook: "Facebook",
|
|
7699
|
-
Instagram: "Instagram",
|
|
7700
|
-
Vkontakte: "Vkontakte",
|
|
7701
|
-
Odnoklassniki: "Odnoklassniki",
|
|
7702
|
-
Skype: "Skype",
|
|
7703
|
-
Youtube: "Youtube",
|
|
7704
|
-
Twitter: "Twitter",
|
|
7705
|
-
LinkedIn: "LinkedIn",
|
|
7706
|
-
Max: "Max",
|
|
7707
|
-
Other: "Other"
|
|
7708
|
-
};
|
|
7709
|
-
var ProfileTypeValues = {
|
|
7710
|
-
Unknown: "UnknownProfile",
|
|
7711
|
-
None: "None",
|
|
7712
|
-
MyProfile: "MyProfile",
|
|
7713
|
-
AnyProfile: "AnyProfile",
|
|
7714
|
-
CopyProfile: "CopyProfile"
|
|
7715
|
-
};
|
|
7716
|
-
|
|
7717
9265
|
// ../../src/resources/contacts/communication-links.ts
|
|
7718
9266
|
function digitsOnly(value) {
|
|
7719
9267
|
return value.replace(/\D+/g, "");
|
|
@@ -7898,38 +9446,6 @@ var ColumnTypeValues = {
|
|
|
7898
9446
|
Total: "Total"
|
|
7899
9447
|
};
|
|
7900
9448
|
|
|
7901
|
-
// ../../src/resources/loyalty-systems/types.ts
|
|
7902
|
-
var LoyaltyCardIssueTypeValues = {
|
|
7903
|
-
Unknown: "UnknownLoyaltyCardIssueType",
|
|
7904
|
-
Manual: "Manual",
|
|
7905
|
-
AutoActive: "AutoActive",
|
|
7906
|
-
AutoIssued: "AutoIssued"
|
|
7907
|
-
};
|
|
7908
|
-
var LoyaltyCardUpdateKeyInformationValues = {
|
|
7909
|
-
Unknown: "UnknownLoyaltyCardUpdateKeyInformation",
|
|
7910
|
-
NonKeyDisallowed: "NonKeyDisallowed",
|
|
7911
|
-
NonKeyAllowed: "NonKeyAllowed"
|
|
7912
|
-
};
|
|
7913
|
-
var LoyaltyCardUpdateNonKeyInformationValues = {
|
|
7914
|
-
Unknown: "UnknownLoyaltyCardUpdateNonKeyInformation",
|
|
7915
|
-
KeyDisallowed: "KeyDisallowed",
|
|
7916
|
-
KeyAllowed: "KeyAllowed"
|
|
7917
|
-
};
|
|
7918
|
-
var LoyaltyCardSortConditionValues = {
|
|
7919
|
-
SequenceCardNumberAsc: "SequenceCardNumberAsc",
|
|
7920
|
-
SequenceCardNumberDesc: "SequenceCardNumberDesc",
|
|
7921
|
-
LoyaltyCardStateAsc: "LoyaltyCardStateAsc",
|
|
7922
|
-
LoyaltyCardStateDesc: "LoyaltyCardStateDesc",
|
|
7923
|
-
SequenceCardNumberAscLoyaltyCardStateAsc: "SequenceCardNumberAscLoyaltyCardStateAsc",
|
|
7924
|
-
SequenceCardNumberDescLoyaltyCardStateAsc: "SequenceCardNumberDescLoyaltyCardStateAsc",
|
|
7925
|
-
SequenceCardNumberAscLoyaltyCardStateDesc: "SequenceCardNumberAscLoyaltyCardStateDesc",
|
|
7926
|
-
SequenceCardNumberDescLoyaltyCardStateDesc: "SequenceCardNumberDescLoyaltyCardStateDesc",
|
|
7927
|
-
LoyaltyCardStateAscSequenceCardNumberAsc: "LoyaltyCardStateAscSequenceCardNumberAsc",
|
|
7928
|
-
LoyaltyCardStateAscSequenceCardNumberDesc: "LoyaltyCardStateAscSequenceCardNumberDesc",
|
|
7929
|
-
LoyaltyCardStateDescSequenceCardNumberAsc: "LoyaltyCardStateDescSequenceCardNumberAsc",
|
|
7930
|
-
LoyaltyCardStateDescSequenceCardNumberDesc: "LoyaltyCardStateDescSequenceCardNumberDesc"
|
|
7931
|
-
};
|
|
7932
|
-
|
|
7933
9449
|
// ../../src/resources/services/types.ts
|
|
7934
9450
|
var SessionDurationTypeValues = {
|
|
7935
9451
|
Unknown: "UnknownSessionDurationType",
|
|
@@ -8117,14 +9633,22 @@ function normalizeSteps(steps) {
|
|
|
8117
9633
|
return steps.map((step, index) => ({ step, index })).sort((a, b) => {
|
|
8118
9634
|
const aOrder = a.step.stepOrder;
|
|
8119
9635
|
const bOrder = b.step.stepOrder;
|
|
8120
|
-
if (aOrder == null && bOrder == null)
|
|
8121
|
-
|
|
8122
|
-
|
|
9636
|
+
if (aOrder == null && bOrder == null) {
|
|
9637
|
+
return a.index - b.index;
|
|
9638
|
+
}
|
|
9639
|
+
if (aOrder == null) {
|
|
9640
|
+
return 1;
|
|
9641
|
+
}
|
|
9642
|
+
if (bOrder == null) {
|
|
9643
|
+
return -1;
|
|
9644
|
+
}
|
|
8123
9645
|
return aOrder - bOrder || a.index - b.index;
|
|
8124
9646
|
}).map(({ step }, index) => ({ ...step, stepOrder: index + 1 }));
|
|
8125
9647
|
}
|
|
8126
9648
|
function assertStepPosition(position, length) {
|
|
8127
|
-
if (position === void 0)
|
|
9649
|
+
if (position === void 0) {
|
|
9650
|
+
return length + 1;
|
|
9651
|
+
}
|
|
8128
9652
|
if (!Number.isInteger(position) || position < 1 || position > length + 1) {
|
|
8129
9653
|
throw new RangeError(`stepOrder must be an integer from 1 to ${length + 1}`);
|
|
8130
9654
|
}
|
|
@@ -8203,7 +9727,9 @@ var ServiceBuilder = class _ServiceBuilder {
|
|
|
8203
9727
|
/** Заменяет список ресурсов существующей группы, например после создания платёжного ресурса. */
|
|
8204
9728
|
setResourceGroupResourceIds(resourceGroupId, resourceIds) {
|
|
8205
9729
|
const normalizedGroupId = resourceGroupId.trim();
|
|
8206
|
-
if (!normalizedGroupId)
|
|
9730
|
+
if (!normalizedGroupId) {
|
|
9731
|
+
throw new TypeError("resourceGroupId must not be empty");
|
|
9732
|
+
}
|
|
8207
9733
|
const normalizedResourceIds = resourceIds.map((resourceId) => resourceId.trim());
|
|
8208
9734
|
if (normalizedResourceIds.some((resourceId) => !resourceId)) {
|
|
8209
9735
|
throw new TypeError("resourceIds must not contain empty ids");
|
|
@@ -8250,9 +9776,15 @@ var ServiceBuilder = class _ServiceBuilder {
|
|
|
8250
9776
|
addResourceGroup(input, usageType) {
|
|
8251
9777
|
const key = input.key.trim();
|
|
8252
9778
|
const groupName = input.groupName.trim();
|
|
8253
|
-
if (!key)
|
|
8254
|
-
|
|
8255
|
-
|
|
9779
|
+
if (!key) {
|
|
9780
|
+
throw new TypeError("Resource group key must not be empty");
|
|
9781
|
+
}
|
|
9782
|
+
if (!groupName) {
|
|
9783
|
+
throw new TypeError("Resource group name must not be empty");
|
|
9784
|
+
}
|
|
9785
|
+
if (this.addedGroups.has(key)) {
|
|
9786
|
+
throw new TypeError(`Duplicate resource group key: ${key}`);
|
|
9787
|
+
}
|
|
8256
9788
|
const groupId = input.groupId ?? generateServiceResourceGroupId();
|
|
8257
9789
|
if (!GROUP_ID_PATTERN.test(groupId)) {
|
|
8258
9790
|
throw new TypeError("Resource group id must be a 24-character hexadecimal string");
|
|
@@ -8302,12 +9834,16 @@ var ServiceBuilder = class _ServiceBuilder {
|
|
|
8302
9834
|
normalizeAndSyncOrders() {
|
|
8303
9835
|
const hasSteps = this.draft.stepDescriptionList != null;
|
|
8304
9836
|
const steps = normalizeSteps([...this.draft.stepDescriptionList ?? []]);
|
|
8305
|
-
if (hasSteps)
|
|
9837
|
+
if (hasSteps) {
|
|
9838
|
+
this.draft.stepDescriptionList = steps;
|
|
9839
|
+
}
|
|
8306
9840
|
const orders = /* @__PURE__ */ new Map();
|
|
8307
9841
|
for (const step of steps) {
|
|
8308
9842
|
if (step.stepType === ServiceCheckInWizardStepType.Resource) {
|
|
8309
9843
|
const groupId = getResourceGroupIdFromStep(step);
|
|
8310
|
-
if (groupId && step.stepOrder != null)
|
|
9844
|
+
if (groupId && step.stepOrder != null) {
|
|
9845
|
+
orders.set(groupId, step.stepOrder);
|
|
9846
|
+
}
|
|
8311
9847
|
}
|
|
8312
9848
|
}
|
|
8313
9849
|
if (this.draft.resourceGroupList != null) {
|
|
@@ -8324,12 +9860,16 @@ var ServiceBuilder = class _ServiceBuilder {
|
|
|
8324
9860
|
if (!group.groupId || !GROUP_ID_PATTERN.test(group.groupId)) {
|
|
8325
9861
|
throw new TypeError("Every resource group must have a valid 24-character hexadecimal id");
|
|
8326
9862
|
}
|
|
8327
|
-
if (ids.has(group.groupId))
|
|
9863
|
+
if (ids.has(group.groupId)) {
|
|
9864
|
+
throw new TypeError(`Duplicate resource group id: ${group.groupId}`);
|
|
9865
|
+
}
|
|
8328
9866
|
ids.add(group.groupId);
|
|
8329
9867
|
}
|
|
8330
9868
|
const usedIds = /* @__PURE__ */ new Set();
|
|
8331
9869
|
for (const step of this.draft.stepDescriptionList ?? []) {
|
|
8332
|
-
if (step.stepType !== ServiceCheckInWizardStepType.Resource)
|
|
9870
|
+
if (step.stepType !== ServiceCheckInWizardStepType.Resource) {
|
|
9871
|
+
continue;
|
|
9872
|
+
}
|
|
8333
9873
|
const groupId = getResourceGroupIdFromStep(step);
|
|
8334
9874
|
if (!groupId || !ids.has(groupId)) {
|
|
8335
9875
|
throw new TypeError(`Resource step references an unknown resource group: ${groupId ?? ""}`);
|
|
@@ -8372,10 +9912,16 @@ function expandBookingWizardSteps(service) {
|
|
|
8372
9912
|
}
|
|
8373
9913
|
if (st === ServiceCheckInWizardStepType.Resource) {
|
|
8374
9914
|
const resourceGroupId = getResourceGroupIdFromStep(step);
|
|
8375
|
-
if (!resourceGroupId)
|
|
9915
|
+
if (!resourceGroupId) {
|
|
9916
|
+
continue;
|
|
9917
|
+
}
|
|
8376
9918
|
const rg = service.resourceGroupList?.find((g) => g.groupId === resourceGroupId);
|
|
8377
|
-
if (!rg)
|
|
8378
|
-
|
|
9919
|
+
if (!rg) {
|
|
9920
|
+
continue;
|
|
9921
|
+
}
|
|
9922
|
+
if (shouldSkipResourceStep(rg.minResources ?? void 0, rg.maxResources ?? void 0)) {
|
|
9923
|
+
continue;
|
|
9924
|
+
}
|
|
8379
9925
|
out.push({
|
|
8380
9926
|
kind: "resource",
|
|
8381
9927
|
sequence: ++seq,
|
|
@@ -8405,12 +9951,17 @@ function getFreeCheckInSlots(response) {
|
|
|
8405
9951
|
|
|
8406
9952
|
// ../../src/resources/services/service-order-errors.ts
|
|
8407
9953
|
var ServiceOrderConflictErrorNameValues = {
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
|
|
9954
|
+
/** Запрошенный ресурс недоступен. */
|
|
9955
|
+
ResourceUnavailable: "REQUESTED_RESOURCE_IS_NOT_AVAILABLE" /* ResourceUnavailable */,
|
|
9956
|
+
/** Недоступно запрошенное количество. */
|
|
9957
|
+
QuantityUnavailable: "REQUESTED_RESOURCE_QUANTITY_IS_NOT_AVAILABLE" /* QuantityUnavailable */,
|
|
9958
|
+
/** Услуга недоступна в выбранное время. */
|
|
9959
|
+
ServiceUnavailableAtTime: "SERVICE_IS_NOT_AVAILABLE_AT_TIME" /* ServiceUnavailableAtTime */
|
|
8411
9960
|
};
|
|
8412
9961
|
function getServiceOrderConflictReason(error) {
|
|
8413
|
-
if (!(error instanceof TorrowSdkError))
|
|
9962
|
+
if (!(error instanceof TorrowSdkError)) {
|
|
9963
|
+
return void 0;
|
|
9964
|
+
}
|
|
8414
9965
|
switch (error.http?.apiErrorName) {
|
|
8415
9966
|
case ServiceOrderConflictErrorNameValues.ResourceUnavailable:
|
|
8416
9967
|
return "resource-unavailable";
|
|
@@ -8428,9 +9979,13 @@ function isServiceOrderConflictError(error) {
|
|
|
8428
9979
|
|
|
8429
9980
|
// ../../src/resources/cases/payment-hints.ts
|
|
8430
9981
|
function normalizePaymentUrl(url) {
|
|
8431
|
-
if (url == null || url.trim() === "")
|
|
9982
|
+
if (url == null || url.trim() === "") {
|
|
9983
|
+
return void 0;
|
|
9984
|
+
}
|
|
8432
9985
|
const u = url.trim();
|
|
8433
|
-
if (u.startsWith("http://") || u.startsWith("https://"))
|
|
9986
|
+
if (u.startsWith("http://") || u.startsWith("https://")) {
|
|
9987
|
+
return u;
|
|
9988
|
+
}
|
|
8434
9989
|
return `https://${u}`;
|
|
8435
9990
|
}
|
|
8436
9991
|
function getTicketPaymentUrlRaw(caseItem) {
|
|
@@ -8443,11 +9998,17 @@ function getTicketPaymentUrl(caseItem) {
|
|
|
8443
9998
|
|
|
8444
9999
|
// ../../src/resources/resources/resource-builder.ts
|
|
8445
10000
|
function cloneValue2(value) {
|
|
8446
|
-
if (value instanceof Date)
|
|
8447
|
-
|
|
10001
|
+
if (value instanceof Date) {
|
|
10002
|
+
return new Date(value.getTime());
|
|
10003
|
+
}
|
|
10004
|
+
if (Array.isArray(value)) {
|
|
10005
|
+
return value.map((item) => cloneValue2(item));
|
|
10006
|
+
}
|
|
8448
10007
|
if (value && typeof value === "object") {
|
|
8449
10008
|
const result = {};
|
|
8450
|
-
for (const [key, item] of Object.entries(value))
|
|
10009
|
+
for (const [key, item] of Object.entries(value)) {
|
|
10010
|
+
result[key] = cloneValue2(item);
|
|
10011
|
+
}
|
|
8451
10012
|
return result;
|
|
8452
10013
|
}
|
|
8453
10014
|
return value;
|
|
@@ -8468,19 +10029,25 @@ var ResourceBuilder = class _ResourceBuilder {
|
|
|
8468
10029
|
}
|
|
8469
10030
|
attachToService(service, resourceGroupId, options) {
|
|
8470
10031
|
const serviceId = service.id?.trim();
|
|
8471
|
-
if (!serviceId)
|
|
10032
|
+
if (!serviceId) {
|
|
10033
|
+
throw new TypeError("Service must have a non-empty id");
|
|
10034
|
+
}
|
|
8472
10035
|
const normalizedGroupId = resourceGroupId.trim();
|
|
8473
|
-
if (!normalizedGroupId)
|
|
10036
|
+
if (!normalizedGroupId) {
|
|
10037
|
+
throw new TypeError("resourceGroupId must not be empty");
|
|
10038
|
+
}
|
|
8474
10039
|
const group = service.resourceGroupList?.find((item) => item.groupId === normalizedGroupId);
|
|
8475
|
-
if (!group)
|
|
8476
|
-
|
|
10040
|
+
if (!group) {
|
|
10041
|
+
throw new TypeError(`Service resource group not found: ${normalizedGroupId}`);
|
|
10042
|
+
}
|
|
10043
|
+
if (!group.usageType) {
|
|
10044
|
+
throw new TypeError("Service resource group has no usageType");
|
|
10045
|
+
}
|
|
8477
10046
|
if (this.draft.usageType != null && this.draft.usageType !== group.usageType) {
|
|
8478
10047
|
throw new TypeError("Resource usageType does not match the service resource group");
|
|
8479
10048
|
}
|
|
8480
10049
|
const descriptions = [...this.draft.serviceDescriptions ?? []];
|
|
8481
|
-
const matching = descriptions.filter(
|
|
8482
|
-
(item) => isSameBinding(item, serviceId, normalizedGroupId)
|
|
8483
|
-
);
|
|
10050
|
+
const matching = descriptions.filter((item) => isSameBinding(item, serviceId, normalizedGroupId));
|
|
8484
10051
|
const current = matching[0];
|
|
8485
10052
|
const next = {
|
|
8486
10053
|
...current,
|
|
@@ -8492,14 +10059,13 @@ var ResourceBuilder = class _ResourceBuilder {
|
|
|
8492
10059
|
sortIndex: options?.sortIndex === void 0 ? current?.sortIndex : options.sortIndex,
|
|
8493
10060
|
laterBinding: group.bookingProperties != null
|
|
8494
10061
|
};
|
|
8495
|
-
const firstIndex = descriptions.findIndex(
|
|
8496
|
-
|
|
8497
|
-
)
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
8501
|
-
|
|
8502
|
-
else withoutBinding.splice(firstIndex, 0, next);
|
|
10062
|
+
const firstIndex = descriptions.findIndex((item) => isSameBinding(item, serviceId, normalizedGroupId));
|
|
10063
|
+
const withoutBinding = descriptions.filter((item) => !isSameBinding(item, serviceId, normalizedGroupId));
|
|
10064
|
+
if (firstIndex < 0) {
|
|
10065
|
+
withoutBinding.push(next);
|
|
10066
|
+
} else {
|
|
10067
|
+
withoutBinding.splice(firstIndex, 0, next);
|
|
10068
|
+
}
|
|
8503
10069
|
this.draft = {
|
|
8504
10070
|
...this.draft,
|
|
8505
10071
|
usageType: this.draft.usageType ?? group.usageType,
|
|
@@ -8510,8 +10076,12 @@ var ResourceBuilder = class _ResourceBuilder {
|
|
|
8510
10076
|
detachFromService(serviceId, resourceGroupId) {
|
|
8511
10077
|
const normalizedServiceId = serviceId.trim();
|
|
8512
10078
|
const normalizedGroupId = resourceGroupId.trim();
|
|
8513
|
-
if (!normalizedServiceId)
|
|
8514
|
-
|
|
10079
|
+
if (!normalizedServiceId) {
|
|
10080
|
+
throw new TypeError("serviceId must not be empty");
|
|
10081
|
+
}
|
|
10082
|
+
if (!normalizedGroupId) {
|
|
10083
|
+
throw new TypeError("resourceGroupId must not be empty");
|
|
10084
|
+
}
|
|
8515
10085
|
this.draft = {
|
|
8516
10086
|
...this.draft,
|
|
8517
10087
|
serviceDescriptions: (this.draft.serviceDescriptions ?? []).filter(
|
|
@@ -8577,7 +10147,9 @@ function isDeviceType(value) {
|
|
|
8577
10147
|
}
|
|
8578
10148
|
function parseDeviceType(raw) {
|
|
8579
10149
|
const t = raw?.trim();
|
|
8580
|
-
if (!t)
|
|
10150
|
+
if (!t) {
|
|
10151
|
+
return void 0;
|
|
10152
|
+
}
|
|
8581
10153
|
return DeviceTypeValueList.find((x) => x.toLowerCase() === t.toLowerCase());
|
|
8582
10154
|
}
|
|
8583
10155
|
|
|
@@ -8596,9 +10168,7 @@ var ItemViewSortConditionValues = {
|
|
|
8596
10168
|
LastModifiedDescOrderAsc: "LastModifiedDescOrderAsc",
|
|
8597
10169
|
LastModifiedDescOrderDesc: "LastModifiedDescOrderDesc"
|
|
8598
10170
|
};
|
|
8599
|
-
var ItemViewSortConditionValueList = Object.values(
|
|
8600
|
-
ItemViewSortConditionValues
|
|
8601
|
-
);
|
|
10171
|
+
var ItemViewSortConditionValueList = Object.values(ItemViewSortConditionValues);
|
|
8602
10172
|
function isItemViewSortCondition(value) {
|
|
8603
10173
|
return ItemViewSortConditionValueList.includes(value);
|
|
8604
10174
|
}
|
|
@@ -8609,6 +10179,7 @@ export {
|
|
|
8609
10179
|
ActionHistoryFacade,
|
|
8610
10180
|
AnnouncementsFacade,
|
|
8611
10181
|
AnyoneAccessValues,
|
|
10182
|
+
ApiErrorNameValues,
|
|
8612
10183
|
ApiKeysFacade,
|
|
8613
10184
|
AuthCaptchaTypeValueList,
|
|
8614
10185
|
AuthCaptchaTypeValues,
|
|
@@ -8617,6 +10188,7 @@ export {
|
|
|
8617
10188
|
AuthScopeValues,
|
|
8618
10189
|
AuthSessionEffectStep,
|
|
8619
10190
|
AuthSessionErrorReason,
|
|
10191
|
+
AvailableResourcesValues,
|
|
8620
10192
|
BehaviorSettingsEffectStep,
|
|
8621
10193
|
BlockReasonsFacade,
|
|
8622
10194
|
CalendarsFacade,
|
|
@@ -8642,6 +10214,7 @@ export {
|
|
|
8642
10214
|
ImagePreviewSizeValues,
|
|
8643
10215
|
IntegrationsFacade,
|
|
8644
10216
|
ItemFacade,
|
|
10217
|
+
ItemPatchEffectStep,
|
|
8645
10218
|
ItemViewSortConditionValueList,
|
|
8646
10219
|
ItemViewSortConditionValues,
|
|
8647
10220
|
LayoutTypeValues,
|
|
@@ -8656,6 +10229,7 @@ export {
|
|
|
8656
10229
|
OtpErrorReason,
|
|
8657
10230
|
ParticipationFieldRequirementTypeValues,
|
|
8658
10231
|
ParticipationFieldTypeValues,
|
|
10232
|
+
PaymentProviderTypeValues,
|
|
8659
10233
|
PinnedViewsFacade,
|
|
8660
10234
|
ProfileTypeValues,
|
|
8661
10235
|
ProfilesFacade,
|