@up-im/medotvet_sdk 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursor/rules/apcheki_sdk.mdc +90 -0
- package/README.md +136 -0
- package/dist/api/abstract.d.ts +21 -0
- package/dist/api/abstract.js +125 -0
- package/dist/api/bookmarks.d.ts +28 -0
- package/dist/api/bookmarks.js +121 -0
- package/dist/api/chat.d.ts +30 -0
- package/dist/api/chat.js +118 -0
- package/dist/api/content.d.ts +154 -0
- package/dist/api/content.js +237 -0
- package/dist/api/geoIp.d.ts +8 -0
- package/dist/api/geoIp.js +14 -0
- package/dist/api/index.d.ts +27 -0
- package/dist/api/index.js +31 -0
- package/dist/api/payment.d.ts +54 -0
- package/dist/api/payment.js +90 -0
- package/dist/api/promocode.d.ts +9 -0
- package/dist/api/promocode.js +22 -0
- package/dist/api/push.d.ts +54 -0
- package/dist/api/push.js +99 -0
- package/dist/api/receipt.d.ts +34 -0
- package/dist/api/receipt.js +60 -0
- package/dist/api/stat.d.ts +21 -0
- package/dist/api/stat.js +75 -0
- package/dist/api/survey.d.ts +82 -0
- package/dist/api/survey.js +122 -0
- package/dist/api/user.d.ts +80 -0
- package/dist/api/user.js +167 -0
- package/dist/eventBus/abstract.d.ts +4 -0
- package/dist/eventBus/abstract.js +29 -0
- package/dist/eventBus/userLogin.d.ts +5 -0
- package/dist/eventBus/userLogin.js +11 -0
- package/dist/eventBus/userLogout.d.ts +4 -0
- package/dist/eventBus/userLogout.js +11 -0
- package/dist/http/apiError.d.ts +4 -0
- package/dist/http/apiError.js +10 -0
- package/dist/http/apiRoute.d.ts +98 -0
- package/dist/http/apiRoute.js +197 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +7 -0
- package/dist/interfaces/BannerType.d.ts +5 -0
- package/dist/interfaces/BannerType.js +7 -0
- package/dist/interfaces/apiStatEvents.d.ts +1 -0
- package/dist/interfaces/apiStatEvents.js +18 -0
- package/dist/interfaces/diplomaStatus.d.ts +8 -0
- package/dist/interfaces/diplomaStatus.js +9 -0
- package/dist/interfaces/iAppStore.d.ts +1 -0
- package/dist/interfaces/iAppStore.js +2 -0
- package/dist/interfaces/iAppVersionCheck.d.ts +5 -0
- package/dist/interfaces/iAppVersionCheck.js +2 -0
- package/dist/interfaces/iArticle.d.ts +15 -0
- package/dist/interfaces/iArticle.js +2 -0
- package/dist/interfaces/iBalance.d.ts +6 -0
- package/dist/interfaces/iBalance.js +2 -0
- package/dist/interfaces/iBank.d.ts +4 -0
- package/dist/interfaces/iBank.js +2 -0
- package/dist/interfaces/iBanner.d.ts +6 -0
- package/dist/interfaces/iBanner.js +2 -0
- package/dist/interfaces/iBookmark.d.ts +3 -0
- package/dist/interfaces/iBookmark.js +2 -0
- package/dist/interfaces/iBrand.d.ts +6 -0
- package/dist/interfaces/iBrand.js +2 -0
- package/dist/interfaces/iCatalog.d.ts +50 -0
- package/dist/interfaces/iCatalog.js +2 -0
- package/dist/interfaces/iCatalogNode.d.ts +3 -0
- package/dist/interfaces/iCatalogNode.js +2 -0
- package/dist/interfaces/iCatalogPreview.d.ts +17 -0
- package/dist/interfaces/iCatalogPreview.js +2 -0
- package/dist/interfaces/iCity.d.ts +4 -0
- package/dist/interfaces/iCity.js +2 -0
- package/dist/interfaces/iContentItem.d.ts +7 -0
- package/dist/interfaces/iContentItem.js +2 -0
- package/dist/interfaces/iEnv.d.ts +6 -0
- package/dist/interfaces/iEnv.js +2 -0
- package/dist/interfaces/iFilter.d.ts +11 -0
- package/dist/interfaces/iFilter.js +2 -0
- package/dist/interfaces/iGetNodeListProps.d.ts +8 -0
- package/dist/interfaces/iGetNodeListProps.js +2 -0
- package/dist/interfaces/iInstruction.d.ts +6 -0
- package/dist/interfaces/iInstruction.js +2 -0
- package/dist/interfaces/iIntro.d.ts +6 -0
- package/dist/interfaces/iIntro.js +2 -0
- package/dist/interfaces/iMessage.d.ts +25 -0
- package/dist/interfaces/iMessage.js +2 -0
- package/dist/interfaces/iNode.d.ts +26 -0
- package/dist/interfaces/iNode.js +2 -0
- package/dist/interfaces/iNodeTree.d.ts +14 -0
- package/dist/interfaces/iNodeTree.js +2 -0
- package/dist/interfaces/iPagingItems.d.ts +9 -0
- package/dist/interfaces/iPagingItems.js +2 -0
- package/dist/interfaces/iPayment.d.ts +20 -0
- package/dist/interfaces/iPayment.js +2 -0
- package/dist/interfaces/iPush.d.ts +14 -0
- package/dist/interfaces/iPush.js +2 -0
- package/dist/interfaces/iQuestion.d.ts +7 -0
- package/dist/interfaces/iQuestion.js +2 -0
- package/dist/interfaces/iReceipt.d.ts +20 -0
- package/dist/interfaces/iReceipt.js +2 -0
- package/dist/interfaces/iReceiptAddProps.d.ts +8 -0
- package/dist/interfaces/iReceiptAddProps.js +2 -0
- package/dist/interfaces/iReceiptProduct.d.ts +7 -0
- package/dist/interfaces/iReceiptProduct.js +2 -0
- package/dist/interfaces/iSearchParams.d.ts +11 -0
- package/dist/interfaces/iSearchParams.js +2 -0
- package/dist/interfaces/iShop.d.ts +6 -0
- package/dist/interfaces/iShop.js +2 -0
- package/dist/interfaces/iShopAddress.d.ts +5 -0
- package/dist/interfaces/iShopAddress.js +2 -0
- package/dist/interfaces/iSorter.d.ts +7 -0
- package/dist/interfaces/iSorter.js +2 -0
- package/dist/interfaces/iSpecialization.d.ts +4 -0
- package/dist/interfaces/iSpecialization.js +2 -0
- package/dist/interfaces/iStatView.d.ts +4 -0
- package/dist/interfaces/iStatView.js +2 -0
- package/dist/interfaces/iStorage.d.ts +5 -0
- package/dist/interfaces/iStorage.js +2 -0
- package/dist/interfaces/iStories.d.ts +13 -0
- package/dist/interfaces/iStories.js +2 -0
- package/dist/interfaces/iSubstance.d.ts +4 -0
- package/dist/interfaces/iSubstance.js +2 -0
- package/dist/interfaces/iSurvey.d.ts +36 -0
- package/dist/interfaces/iSurvey.js +2 -0
- package/dist/interfaces/iSurveyQuestion.d.ts +11 -0
- package/dist/interfaces/iSurveyQuestion.js +2 -0
- package/dist/interfaces/iSymptoms.d.ts +4 -0
- package/dist/interfaces/iSymptoms.js +2 -0
- package/dist/interfaces/iTestQuestion.d.ts +20 -0
- package/dist/interfaces/iTestQuestion.js +2 -0
- package/dist/interfaces/iTestResult.d.ts +17 -0
- package/dist/interfaces/iTestResult.js +2 -0
- package/dist/interfaces/iText.d.ts +3 -0
- package/dist/interfaces/iText.js +2 -0
- package/dist/interfaces/iUser.d.ts +35 -0
- package/dist/interfaces/iUser.js +2 -0
- package/dist/interfaces/iUserData.d.ts +10 -0
- package/dist/interfaces/iUserData.js +2 -0
- package/dist/interfaces/iUserEditProps.d.ts +20 -0
- package/dist/interfaces/iUserEditProps.js +2 -0
- package/dist/interfaces/iUserStat.d.ts +7 -0
- package/dist/interfaces/iUserStat.js +2 -0
- package/dist/interfaces/iUserSurvey.d.ts +21 -0
- package/dist/interfaces/iUserSurvey.js +11 -0
- package/dist/interfaces/iUserTokens.d.ts +4 -0
- package/dist/interfaces/iUserTokens.js +2 -0
- package/dist/interfaces/intRange.d.ts +3 -0
- package/dist/interfaces/intRange.js +2 -0
- package/dist/interfaces/itemType.d.ts +9 -0
- package/dist/interfaces/itemType.js +11 -0
- package/dist/interfaces/paymentStatus.d.ts +7 -0
- package/dist/interfaces/paymentStatus.js +9 -0
- package/dist/interfaces/paymentType.d.ts +5 -0
- package/dist/interfaces/paymentType.js +7 -0
- package/dist/interfaces/payoutType.d.ts +5 -0
- package/dist/interfaces/payoutType.js +7 -0
- package/dist/interfaces/pushStatus.d.ts +6 -0
- package/dist/interfaces/pushStatus.js +8 -0
- package/dist/interfaces/receiptStatus.d.ts +7 -0
- package/dist/interfaces/receiptStatus.js +9 -0
- package/dist/interfaces/testStatus.d.ts +6 -0
- package/dist/interfaces/testStatus.js +7 -0
- package/dist/interfaces/userRole.d.ts +6 -0
- package/dist/interfaces/userRole.js +14 -0
- package/dist/interfaces/userStatEvent.d.ts +5 -0
- package/dist/interfaces/userStatEvent.js +7 -0
- package/dist/interfaces/viewEventType.d.ts +13 -0
- package/dist/interfaces/viewEventType.js +19 -0
- package/dist/service/webSocketClient.d.ts +21 -0
- package/dist/service/webSocketClient.js +87 -0
- package/dist/storage/default.d.ts +2 -0
- package/dist/storage/default.js +8 -0
- package/dist/storage/user.d.ts +21 -0
- package/dist/storage/user.js +107 -0
- package/dist/utils/queryString.d.ts +3 -0
- package/dist/utils/queryString.js +21 -0
- package/package.json +31 -0
- package/src/api/abstract.ts +136 -0
- package/src/api/bookmarks.ts +109 -0
- package/src/api/chat.ts +127 -0
- package/src/api/content.ts +258 -0
- package/src/api/geoIp.ts +12 -0
- package/src/api/index.ts +38 -0
- package/src/api/payment.ts +105 -0
- package/src/api/promocode.ts +18 -0
- package/src/api/push.ts +102 -0
- package/src/api/stat.ts +74 -0
- package/src/api/survey.ts +164 -0
- package/src/api/user.ts +176 -0
- package/src/eventBus/abstract.ts +33 -0
- package/src/eventBus/userLogin.ts +13 -0
- package/src/eventBus/userLogout.ts +12 -0
- package/src/http/apiError.ts +9 -0
- package/src/http/apiRoute.ts +234 -0
- package/src/index.ts +2 -0
- package/src/interfaces/BannerType.ts +6 -0
- package/src/interfaces/apiStatEvents.ts +18 -0
- package/src/interfaces/diplomaStatus.ts +10 -0
- package/src/interfaces/iAppStore.ts +1 -0
- package/src/interfaces/iArticle.ts +12 -0
- package/src/interfaces/iBalance.ts +6 -0
- package/src/interfaces/iBank.ts +4 -0
- package/src/interfaces/iBanner.ts +6 -0
- package/src/interfaces/iBookmark.ts +3 -0
- package/src/interfaces/iCity.ts +4 -0
- package/src/interfaces/iContentItem.ts +6 -0
- package/src/interfaces/iEnv.ts +6 -0
- package/src/interfaces/iFilter.ts +16 -0
- package/src/interfaces/iGetNodeListProps.ts +9 -0
- package/src/interfaces/iInstruction.ts +6 -0
- package/src/interfaces/iIntro.ts +6 -0
- package/src/interfaces/iMessage.ts +25 -0
- package/src/interfaces/iNode.ts +24 -0
- package/src/interfaces/iNodeTree.ts +14 -0
- package/src/interfaces/iPagingItems.ts +8 -0
- package/src/interfaces/iPayment.ts +28 -0
- package/src/interfaces/iPush.ts +15 -0
- package/src/interfaces/iQuestion.ts +4 -0
- package/src/interfaces/iSearchParams.ts +12 -0
- package/src/interfaces/iSorter.ts +10 -0
- package/src/interfaces/iSpecialization.ts +4 -0
- package/src/interfaces/iStatView.ts +4 -0
- package/src/interfaces/iStorage.ts +5 -0
- package/src/interfaces/iStories.ts +10 -0
- package/src/interfaces/iSubstance.ts +4 -0
- package/src/interfaces/iSurvey.ts +38 -0
- package/src/interfaces/iSurveyQuestion.ts +15 -0
- package/src/interfaces/iSymptoms.ts +4 -0
- package/src/interfaces/iTestQuestion.ts +21 -0
- package/src/interfaces/iTestResult.ts +20 -0
- package/src/interfaces/iText.ts +3 -0
- package/src/interfaces/iUser.ts +37 -0
- package/src/interfaces/iUserData.ts +10 -0
- package/src/interfaces/iUserEditProps.ts +16 -0
- package/src/interfaces/iUserStat.ts +8 -0
- package/src/interfaces/iUserSurvey.ts +23 -0
- package/src/interfaces/iUserTokens.ts +4 -0
- package/src/interfaces/intRange.ts +5 -0
- package/src/interfaces/itemType.ts +10 -0
- package/src/interfaces/paymentStatus.ts +8 -0
- package/src/interfaces/paymentType.ts +6 -0
- package/src/interfaces/payoutType.ts +6 -0
- package/src/interfaces/pushStatus.ts +7 -0
- package/src/interfaces/testStatus.ts +8 -0
- package/src/interfaces/userRole.ts +13 -0
- package/src/interfaces/userStatEvent.ts +6 -0
- package/src/interfaces/viewEventType.ts +17 -0
- package/src/service/webSocketClient.ts +94 -0
- package/src/storage/default.ts +7 -0
- package/src/storage/user.ts +109 -0
- package/src/utils/queryString.ts +22 -0
- package/tsconfig.json +27 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface iArticle {
|
|
2
|
+
id: number;
|
|
3
|
+
title: string;
|
|
4
|
+
code: string;
|
|
5
|
+
date: string;
|
|
6
|
+
image_preview: string;
|
|
7
|
+
image_head: string;
|
|
8
|
+
video?: string;
|
|
9
|
+
sku: {
|
|
10
|
+
id: number;
|
|
11
|
+
title: string;
|
|
12
|
+
} | null;
|
|
13
|
+
announce: string;
|
|
14
|
+
text: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { iBrand } from "./iBrand";
|
|
2
|
+
import { iQuestion } from "./iQuestion";
|
|
3
|
+
import { iSubstance } from "./iSubstance";
|
|
4
|
+
import { iSymptoms } from "./iSymptoms";
|
|
5
|
+
export interface iCatalog {
|
|
6
|
+
pub_date: string;
|
|
7
|
+
pub_date_original: string;
|
|
8
|
+
node: number;
|
|
9
|
+
title: string;
|
|
10
|
+
disclaimer: {
|
|
11
|
+
title: string;
|
|
12
|
+
} | null;
|
|
13
|
+
code: string;
|
|
14
|
+
image: string;
|
|
15
|
+
video?: string;
|
|
16
|
+
brand?: iBrand;
|
|
17
|
+
symptoms?: iSymptoms[];
|
|
18
|
+
substance?: iSubstance[];
|
|
19
|
+
id: number;
|
|
20
|
+
shop_all: 1 | 0;
|
|
21
|
+
cashback_percent: boolean;
|
|
22
|
+
cashback_level_1: number;
|
|
23
|
+
cashback_level_2?: number;
|
|
24
|
+
cashback_level_3?: number;
|
|
25
|
+
presentation_title?: string;
|
|
26
|
+
presentation_text?: string;
|
|
27
|
+
presentation?: string[];
|
|
28
|
+
questions_title?: string;
|
|
29
|
+
questions_text?: string;
|
|
30
|
+
questions?: iQuestion[];
|
|
31
|
+
date_start: string;
|
|
32
|
+
date_end: string;
|
|
33
|
+
text: string;
|
|
34
|
+
text_full: string;
|
|
35
|
+
region: {
|
|
36
|
+
id: number;
|
|
37
|
+
title: string;
|
|
38
|
+
}[] | null;
|
|
39
|
+
promo_title: string;
|
|
40
|
+
promo_subtitle: string;
|
|
41
|
+
promo_image: string;
|
|
42
|
+
promo_disclaimer: string;
|
|
43
|
+
promo_text: string;
|
|
44
|
+
boost_type?: string | null;
|
|
45
|
+
boost_start_date?: string | null;
|
|
46
|
+
boost_end_date?: string | null;
|
|
47
|
+
cashback_level_1_boost?: number;
|
|
48
|
+
cashback_level_2_boost?: number;
|
|
49
|
+
cashback_level_3_boost?: number;
|
|
50
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface iCatalogPreview {
|
|
2
|
+
id: number;
|
|
3
|
+
title: string;
|
|
4
|
+
image: string;
|
|
5
|
+
disclaimer: string | null;
|
|
6
|
+
promo_title: string;
|
|
7
|
+
date_start: string;
|
|
8
|
+
date_end: string;
|
|
9
|
+
cashback_max: number;
|
|
10
|
+
cashback_percent: 1 | 0;
|
|
11
|
+
many_cashback: 1 | 0;
|
|
12
|
+
shop_all: 1 | 0;
|
|
13
|
+
max_cashback_level: 0 | 1 | 2 | 3;
|
|
14
|
+
boost_type?: string | null;
|
|
15
|
+
boost_start_date?: string | null;
|
|
16
|
+
boost_end_date?: string | null;
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type iFilterValue = (string | number)[];
|
|
2
|
+
type ExcludeMethods<T> = {
|
|
3
|
+
[K in keyof T as (T[K] extends Function ? never : K)]: T[K];
|
|
4
|
+
};
|
|
5
|
+
type iFilterKey<TKey> = TKey | (TKey extends string ? `!${TKey}` : never) | (TKey extends string ? `>${TKey}` : never) | (TKey extends string ? `<${TKey}` : never) | (TKey extends string ? `*${TKey}` : never);
|
|
6
|
+
export type iFilter<T> = {
|
|
7
|
+
[key in iFilterKey<keyof ExcludeMethods<T>>]?: iFilterValue | {
|
|
8
|
+
[key in iFilterKey<keyof ExcludeMethods<T>>]?: iFilterValue;
|
|
9
|
+
}[];
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface iMessageView {
|
|
2
|
+
route: "/view";
|
|
3
|
+
message_id: number;
|
|
4
|
+
}
|
|
5
|
+
export interface iMessageError {
|
|
6
|
+
route: "/error";
|
|
7
|
+
text: string;
|
|
8
|
+
}
|
|
9
|
+
export interface iMessageOutgoing {
|
|
10
|
+
route: "/message";
|
|
11
|
+
text: string;
|
|
12
|
+
file: string | undefined;
|
|
13
|
+
}
|
|
14
|
+
export interface iMessageIncome extends iMessageOutgoing {
|
|
15
|
+
id: number;
|
|
16
|
+
date: Date;
|
|
17
|
+
from_user_id: number;
|
|
18
|
+
from_user_name: string;
|
|
19
|
+
view: 0 | 1;
|
|
20
|
+
}
|
|
21
|
+
export interface iMessageUnread {
|
|
22
|
+
route: "/unread";
|
|
23
|
+
unread: number;
|
|
24
|
+
}
|
|
25
|
+
export type iMessage = iMessageIncome | iMessageUnread | iMessageView | iMessageError;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface iNode<ParamsT = {
|
|
2
|
+
[key: string]: unknown;
|
|
3
|
+
} | undefined> {
|
|
4
|
+
id: number;
|
|
5
|
+
pub_date: string;
|
|
6
|
+
type: string;
|
|
7
|
+
parent: number;
|
|
8
|
+
code: string;
|
|
9
|
+
title: string;
|
|
10
|
+
h1?: string;
|
|
11
|
+
menutitle: string;
|
|
12
|
+
sorter: number;
|
|
13
|
+
image: string;
|
|
14
|
+
icon: string;
|
|
15
|
+
redirect: string;
|
|
16
|
+
meta_title: string;
|
|
17
|
+
meta_keywords: string;
|
|
18
|
+
meta_description: string;
|
|
19
|
+
meta_title_element_tpl: string;
|
|
20
|
+
meta_keywords_element_tpl: string;
|
|
21
|
+
meta_description_element_tpl: string;
|
|
22
|
+
no_search: boolean;
|
|
23
|
+
no_menu: boolean;
|
|
24
|
+
public: boolean;
|
|
25
|
+
paramsDisplay: ParamsT;
|
|
26
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface iNodeTree {
|
|
2
|
+
id: number;
|
|
3
|
+
type: string;
|
|
4
|
+
parent: number;
|
|
5
|
+
code: string;
|
|
6
|
+
title: string;
|
|
7
|
+
menutitle: string;
|
|
8
|
+
image: string;
|
|
9
|
+
icon: string;
|
|
10
|
+
sorter: number;
|
|
11
|
+
redirect: string;
|
|
12
|
+
no_menu: boolean;
|
|
13
|
+
children?: iNodeTree[];
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PaymentStatus, PaymentStatusKeys } from "./paymentStatus";
|
|
2
|
+
import { PaymentType, PaymentTypeKeys } from "./paymentType";
|
|
3
|
+
import { PayoutType, PayoutTypeKeys } from "./payoutType";
|
|
4
|
+
export interface iPayment {
|
|
5
|
+
id: number;
|
|
6
|
+
reg_date: string;
|
|
7
|
+
status: typeof PaymentStatus[PaymentStatusKeys];
|
|
8
|
+
pay_type: typeof PaymentType[PaymentTypeKeys];
|
|
9
|
+
title: string;
|
|
10
|
+
receipt: number | null;
|
|
11
|
+
receipt_product: number | null;
|
|
12
|
+
catalog: number | null;
|
|
13
|
+
sku: number | null;
|
|
14
|
+
shop: number | null;
|
|
15
|
+
cashback_level: 0 | 1 | 2 | 3;
|
|
16
|
+
max_cashback_level: null | 0 | 1 | 2 | 3;
|
|
17
|
+
payout_type: typeof PayoutType[PayoutTypeKeys] | null;
|
|
18
|
+
last_error: string;
|
|
19
|
+
price: number;
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PushStatus, PushStatusKeys } from "./pushStatus";
|
|
2
|
+
export interface iPush {
|
|
3
|
+
id: number;
|
|
4
|
+
reg_date: string;
|
|
5
|
+
send_date: string | null;
|
|
6
|
+
user: number;
|
|
7
|
+
status: typeof PushStatus[PushStatusKeys];
|
|
8
|
+
mailing: number | null;
|
|
9
|
+
priority: number;
|
|
10
|
+
title: string;
|
|
11
|
+
text: string;
|
|
12
|
+
route: string;
|
|
13
|
+
view: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { iPayment } from "./iPayment";
|
|
2
|
+
import { iReceiptProduct } from "./iReceiptProduct";
|
|
3
|
+
import { ReceiptStatus, ReceiptStatusKeys } from "./receiptStatus";
|
|
4
|
+
export interface iReceipt {
|
|
5
|
+
id: number;
|
|
6
|
+
reg_date: string;
|
|
7
|
+
status: typeof ReceiptStatus[ReceiptStatusKeys];
|
|
8
|
+
fn: string;
|
|
9
|
+
fd: string;
|
|
10
|
+
fp: string;
|
|
11
|
+
date: string | null;
|
|
12
|
+
sum: number;
|
|
13
|
+
address?: string;
|
|
14
|
+
address_name?: string;
|
|
15
|
+
inn?: string;
|
|
16
|
+
last_error?: string;
|
|
17
|
+
products: iReceiptProduct[] | null;
|
|
18
|
+
payments: iPayment[] | null;
|
|
19
|
+
cashback_sum: number;
|
|
20
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { iFilter } from "./iFilter";
|
|
2
|
+
import { iSorter } from "./iSorter";
|
|
3
|
+
export type iSearchParams<Data extends object, Keys extends keyof Data> = {
|
|
4
|
+
nodeCode?: string | undefined;
|
|
5
|
+
select: Keys[];
|
|
6
|
+
page?: number;
|
|
7
|
+
filters?: iFilter<Data>;
|
|
8
|
+
sorters?: iSorter<Data>;
|
|
9
|
+
perPage?: number;
|
|
10
|
+
subNodes?: boolean;
|
|
11
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type iSorterValue = string;
|
|
2
|
+
type ExcludeMethods<T> = {
|
|
3
|
+
[K in keyof T as (T[K] extends Function ? never : K)]: T[K];
|
|
4
|
+
};
|
|
5
|
+
type iSorterKey<TKey> = (TKey extends string ? `${TKey} asc` : never) | (TKey extends string ? `${TKey} desc` : never);
|
|
6
|
+
export type iSorter<T> = (iSorterKey<keyof ExcludeMethods<T>>)[];
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { iSurveyQuestion } from "./iSurveyQuestion";
|
|
2
|
+
interface iRefItem {
|
|
3
|
+
id: number;
|
|
4
|
+
title: string;
|
|
5
|
+
}
|
|
6
|
+
export interface iSurvey {
|
|
7
|
+
id: number;
|
|
8
|
+
node: number;
|
|
9
|
+
title: string;
|
|
10
|
+
partner: number | null;
|
|
11
|
+
budget: number;
|
|
12
|
+
budget_min: number;
|
|
13
|
+
date_start: string | null;
|
|
14
|
+
date_end: string | null;
|
|
15
|
+
reward_base: number;
|
|
16
|
+
reward_max: number;
|
|
17
|
+
questions: iSurveyQuestion[] | null;
|
|
18
|
+
slots: number;
|
|
19
|
+
slots_taken?: number;
|
|
20
|
+
specialization: iRefItem[] | null;
|
|
21
|
+
city: iRefItem[] | null;
|
|
22
|
+
city_not: iRefItem[] | null;
|
|
23
|
+
region: iRefItem[] | null;
|
|
24
|
+
region_not: iRefItem[] | null;
|
|
25
|
+
promo_title: string;
|
|
26
|
+
promo_subtitle: string;
|
|
27
|
+
promo_image: string;
|
|
28
|
+
promo_text: string;
|
|
29
|
+
promo_disclaimer: string;
|
|
30
|
+
text: string;
|
|
31
|
+
text_full: string;
|
|
32
|
+
public: boolean;
|
|
33
|
+
priority?: number;
|
|
34
|
+
payment_total?: number;
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type tSurveyNextStep = number | "default" | "terminate";
|
|
2
|
+
export type tSurveyQuestionType = "single" | "multiple" | "text";
|
|
3
|
+
export interface iSurveyAnswer {
|
|
4
|
+
title: string;
|
|
5
|
+
next_step: tSurveyNextStep;
|
|
6
|
+
}
|
|
7
|
+
export interface iSurveyQuestion {
|
|
8
|
+
title: string;
|
|
9
|
+
type: tSurveyQuestionType;
|
|
10
|
+
answers: iSurveyAnswer[];
|
|
11
|
+
}
|