@gigapay-dev/contracts 1.8.5 → 1.8.6
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.
|
@@ -35,9 +35,9 @@ export declare const ProductEndpoints: {
|
|
|
35
35
|
category?: string | undefined;
|
|
36
36
|
minPrice?: number | undefined;
|
|
37
37
|
hasDiscount?: boolean | undefined;
|
|
38
|
+
region?: string | undefined;
|
|
38
39
|
genre?: string | undefined;
|
|
39
40
|
tag?: string | undefined;
|
|
40
|
-
region?: string | undefined;
|
|
41
41
|
maxPrice?: number | undefined;
|
|
42
42
|
minRating?: number | undefined;
|
|
43
43
|
search?: string | undefined;
|
|
@@ -54,9 +54,9 @@ export declare const ProductEndpoints: {
|
|
|
54
54
|
category?: string | undefined;
|
|
55
55
|
minPrice?: number | undefined;
|
|
56
56
|
hasDiscount?: "true" | "false" | undefined;
|
|
57
|
+
region?: string | undefined;
|
|
57
58
|
genre?: string | undefined;
|
|
58
59
|
tag?: string | undefined;
|
|
59
|
-
region?: string | undefined;
|
|
60
60
|
maxPrice?: number | undefined;
|
|
61
61
|
minRating?: number | undefined;
|
|
62
62
|
search?: string | undefined;
|
|
@@ -50,9 +50,9 @@ export declare const ProductFilterSchema: z.ZodObject<{
|
|
|
50
50
|
category?: string | undefined;
|
|
51
51
|
minPrice?: number | undefined;
|
|
52
52
|
hasDiscount?: boolean | undefined;
|
|
53
|
+
region?: string | undefined;
|
|
53
54
|
genre?: string | undefined;
|
|
54
55
|
tag?: string | undefined;
|
|
55
|
-
region?: string | undefined;
|
|
56
56
|
maxPrice?: number | undefined;
|
|
57
57
|
minRating?: number | undefined;
|
|
58
58
|
search?: string | undefined;
|
|
@@ -69,9 +69,9 @@ export declare const ProductFilterSchema: z.ZodObject<{
|
|
|
69
69
|
category?: string | undefined;
|
|
70
70
|
minPrice?: number | undefined;
|
|
71
71
|
hasDiscount?: "true" | "false" | undefined;
|
|
72
|
+
region?: string | undefined;
|
|
72
73
|
genre?: string | undefined;
|
|
73
74
|
tag?: string | undefined;
|
|
74
|
-
region?: string | undefined;
|
|
75
75
|
maxPrice?: number | undefined;
|
|
76
76
|
minRating?: number | undefined;
|
|
77
77
|
search?: string | undefined;
|
|
@@ -817,6 +817,350 @@ export declare const KeysCountResponseSchema: z.ZodObject<{
|
|
|
817
817
|
sold: number;
|
|
818
818
|
reserved: number;
|
|
819
819
|
}>;
|
|
820
|
+
/** Ответ парсинга игры по Steam App ID */
|
|
821
|
+
export declare const SteamParseResponseSchema: z.ZodObject<{
|
|
822
|
+
steam: z.ZodNullable<z.ZodObject<{
|
|
823
|
+
title: z.ZodString;
|
|
824
|
+
originalTitle: z.ZodOptional<z.ZodString>;
|
|
825
|
+
description: z.ZodString;
|
|
826
|
+
shortDescription: z.ZodString;
|
|
827
|
+
coverImageUrl: z.ZodString;
|
|
828
|
+
developer: z.ZodOptional<z.ZodString>;
|
|
829
|
+
publisher: z.ZodOptional<z.ZodString>;
|
|
830
|
+
releaseDate: z.ZodOptional<z.ZodString>;
|
|
831
|
+
steamAppId: z.ZodNumber;
|
|
832
|
+
steamRating: z.ZodOptional<z.ZodNumber>;
|
|
833
|
+
hasMultiplayer: z.ZodBoolean;
|
|
834
|
+
hasCoop: z.ZodBoolean;
|
|
835
|
+
hasSinglePlayer: z.ZodBoolean;
|
|
836
|
+
genres: z.ZodArray<z.ZodString, "many">;
|
|
837
|
+
screenshots: z.ZodArray<z.ZodString, "many">;
|
|
838
|
+
systemRequirements: z.ZodObject<{
|
|
839
|
+
minimum: z.ZodOptional<z.ZodObject<{
|
|
840
|
+
os: z.ZodOptional<z.ZodString>;
|
|
841
|
+
processor: z.ZodOptional<z.ZodString>;
|
|
842
|
+
memory: z.ZodOptional<z.ZodString>;
|
|
843
|
+
graphics: z.ZodOptional<z.ZodString>;
|
|
844
|
+
storage: z.ZodOptional<z.ZodString>;
|
|
845
|
+
directx: z.ZodOptional<z.ZodString>;
|
|
846
|
+
network: z.ZodOptional<z.ZodString>;
|
|
847
|
+
}, "strip", z.ZodTypeAny, {
|
|
848
|
+
os?: string | undefined;
|
|
849
|
+
processor?: string | undefined;
|
|
850
|
+
memory?: string | undefined;
|
|
851
|
+
graphics?: string | undefined;
|
|
852
|
+
storage?: string | undefined;
|
|
853
|
+
directx?: string | undefined;
|
|
854
|
+
network?: string | undefined;
|
|
855
|
+
}, {
|
|
856
|
+
os?: string | undefined;
|
|
857
|
+
processor?: string | undefined;
|
|
858
|
+
memory?: string | undefined;
|
|
859
|
+
graphics?: string | undefined;
|
|
860
|
+
storage?: string | undefined;
|
|
861
|
+
directx?: string | undefined;
|
|
862
|
+
network?: string | undefined;
|
|
863
|
+
}>>;
|
|
864
|
+
recommended: z.ZodOptional<z.ZodObject<{
|
|
865
|
+
os: z.ZodOptional<z.ZodString>;
|
|
866
|
+
processor: z.ZodOptional<z.ZodString>;
|
|
867
|
+
memory: z.ZodOptional<z.ZodString>;
|
|
868
|
+
graphics: z.ZodOptional<z.ZodString>;
|
|
869
|
+
storage: z.ZodOptional<z.ZodString>;
|
|
870
|
+
directx: z.ZodOptional<z.ZodString>;
|
|
871
|
+
network: z.ZodOptional<z.ZodString>;
|
|
872
|
+
}, "strip", z.ZodTypeAny, {
|
|
873
|
+
os?: string | undefined;
|
|
874
|
+
processor?: string | undefined;
|
|
875
|
+
memory?: string | undefined;
|
|
876
|
+
graphics?: string | undefined;
|
|
877
|
+
storage?: string | undefined;
|
|
878
|
+
directx?: string | undefined;
|
|
879
|
+
network?: string | undefined;
|
|
880
|
+
}, {
|
|
881
|
+
os?: string | undefined;
|
|
882
|
+
processor?: string | undefined;
|
|
883
|
+
memory?: string | undefined;
|
|
884
|
+
graphics?: string | undefined;
|
|
885
|
+
storage?: string | undefined;
|
|
886
|
+
directx?: string | undefined;
|
|
887
|
+
network?: string | undefined;
|
|
888
|
+
}>>;
|
|
889
|
+
}, "strip", z.ZodTypeAny, {
|
|
890
|
+
minimum?: {
|
|
891
|
+
os?: string | undefined;
|
|
892
|
+
processor?: string | undefined;
|
|
893
|
+
memory?: string | undefined;
|
|
894
|
+
graphics?: string | undefined;
|
|
895
|
+
storage?: string | undefined;
|
|
896
|
+
directx?: string | undefined;
|
|
897
|
+
network?: string | undefined;
|
|
898
|
+
} | undefined;
|
|
899
|
+
recommended?: {
|
|
900
|
+
os?: string | undefined;
|
|
901
|
+
processor?: string | undefined;
|
|
902
|
+
memory?: string | undefined;
|
|
903
|
+
graphics?: string | undefined;
|
|
904
|
+
storage?: string | undefined;
|
|
905
|
+
directx?: string | undefined;
|
|
906
|
+
network?: string | undefined;
|
|
907
|
+
} | undefined;
|
|
908
|
+
}, {
|
|
909
|
+
minimum?: {
|
|
910
|
+
os?: string | undefined;
|
|
911
|
+
processor?: string | undefined;
|
|
912
|
+
memory?: string | undefined;
|
|
913
|
+
graphics?: string | undefined;
|
|
914
|
+
storage?: string | undefined;
|
|
915
|
+
directx?: string | undefined;
|
|
916
|
+
network?: string | undefined;
|
|
917
|
+
} | undefined;
|
|
918
|
+
recommended?: {
|
|
919
|
+
os?: string | undefined;
|
|
920
|
+
processor?: string | undefined;
|
|
921
|
+
memory?: string | undefined;
|
|
922
|
+
graphics?: string | undefined;
|
|
923
|
+
storage?: string | undefined;
|
|
924
|
+
directx?: string | undefined;
|
|
925
|
+
network?: string | undefined;
|
|
926
|
+
} | undefined;
|
|
927
|
+
}>;
|
|
928
|
+
}, "strip", z.ZodTypeAny, {
|
|
929
|
+
title: string;
|
|
930
|
+
description: string;
|
|
931
|
+
shortDescription: string;
|
|
932
|
+
coverImageUrl: string;
|
|
933
|
+
steamAppId: number;
|
|
934
|
+
hasMultiplayer: boolean;
|
|
935
|
+
hasCoop: boolean;
|
|
936
|
+
hasSinglePlayer: boolean;
|
|
937
|
+
genres: string[];
|
|
938
|
+
systemRequirements: {
|
|
939
|
+
minimum?: {
|
|
940
|
+
os?: string | undefined;
|
|
941
|
+
processor?: string | undefined;
|
|
942
|
+
memory?: string | undefined;
|
|
943
|
+
graphics?: string | undefined;
|
|
944
|
+
storage?: string | undefined;
|
|
945
|
+
directx?: string | undefined;
|
|
946
|
+
network?: string | undefined;
|
|
947
|
+
} | undefined;
|
|
948
|
+
recommended?: {
|
|
949
|
+
os?: string | undefined;
|
|
950
|
+
processor?: string | undefined;
|
|
951
|
+
memory?: string | undefined;
|
|
952
|
+
graphics?: string | undefined;
|
|
953
|
+
storage?: string | undefined;
|
|
954
|
+
directx?: string | undefined;
|
|
955
|
+
network?: string | undefined;
|
|
956
|
+
} | undefined;
|
|
957
|
+
};
|
|
958
|
+
screenshots: string[];
|
|
959
|
+
originalTitle?: string | undefined;
|
|
960
|
+
developer?: string | undefined;
|
|
961
|
+
publisher?: string | undefined;
|
|
962
|
+
releaseDate?: string | undefined;
|
|
963
|
+
steamRating?: number | undefined;
|
|
964
|
+
}, {
|
|
965
|
+
title: string;
|
|
966
|
+
description: string;
|
|
967
|
+
shortDescription: string;
|
|
968
|
+
coverImageUrl: string;
|
|
969
|
+
steamAppId: number;
|
|
970
|
+
hasMultiplayer: boolean;
|
|
971
|
+
hasCoop: boolean;
|
|
972
|
+
hasSinglePlayer: boolean;
|
|
973
|
+
genres: string[];
|
|
974
|
+
systemRequirements: {
|
|
975
|
+
minimum?: {
|
|
976
|
+
os?: string | undefined;
|
|
977
|
+
processor?: string | undefined;
|
|
978
|
+
memory?: string | undefined;
|
|
979
|
+
graphics?: string | undefined;
|
|
980
|
+
storage?: string | undefined;
|
|
981
|
+
directx?: string | undefined;
|
|
982
|
+
network?: string | undefined;
|
|
983
|
+
} | undefined;
|
|
984
|
+
recommended?: {
|
|
985
|
+
os?: string | undefined;
|
|
986
|
+
processor?: string | undefined;
|
|
987
|
+
memory?: string | undefined;
|
|
988
|
+
graphics?: string | undefined;
|
|
989
|
+
storage?: string | undefined;
|
|
990
|
+
directx?: string | undefined;
|
|
991
|
+
network?: string | undefined;
|
|
992
|
+
} | undefined;
|
|
993
|
+
};
|
|
994
|
+
screenshots: string[];
|
|
995
|
+
originalTitle?: string | undefined;
|
|
996
|
+
developer?: string | undefined;
|
|
997
|
+
publisher?: string | undefined;
|
|
998
|
+
releaseDate?: string | undefined;
|
|
999
|
+
steamRating?: number | undefined;
|
|
1000
|
+
}>>;
|
|
1001
|
+
dessly: z.ZodNullable<z.ZodObject<{
|
|
1002
|
+
editions: z.ZodArray<z.ZodObject<{
|
|
1003
|
+
edition: z.ZodString;
|
|
1004
|
+
packageId: z.ZodNumber;
|
|
1005
|
+
regions: z.ZodArray<z.ZodObject<{
|
|
1006
|
+
region: z.ZodString;
|
|
1007
|
+
price: z.ZodString;
|
|
1008
|
+
priceOriginal: z.ZodString;
|
|
1009
|
+
discount: z.ZodString;
|
|
1010
|
+
}, "strip", z.ZodTypeAny, {
|
|
1011
|
+
price: string;
|
|
1012
|
+
discount: string;
|
|
1013
|
+
region: string;
|
|
1014
|
+
priceOriginal: string;
|
|
1015
|
+
}, {
|
|
1016
|
+
price: string;
|
|
1017
|
+
discount: string;
|
|
1018
|
+
region: string;
|
|
1019
|
+
priceOriginal: string;
|
|
1020
|
+
}>, "many">;
|
|
1021
|
+
}, "strip", z.ZodTypeAny, {
|
|
1022
|
+
regions: {
|
|
1023
|
+
price: string;
|
|
1024
|
+
discount: string;
|
|
1025
|
+
region: string;
|
|
1026
|
+
priceOriginal: string;
|
|
1027
|
+
}[];
|
|
1028
|
+
edition: string;
|
|
1029
|
+
packageId: number;
|
|
1030
|
+
}, {
|
|
1031
|
+
regions: {
|
|
1032
|
+
price: string;
|
|
1033
|
+
discount: string;
|
|
1034
|
+
region: string;
|
|
1035
|
+
priceOriginal: string;
|
|
1036
|
+
}[];
|
|
1037
|
+
edition: string;
|
|
1038
|
+
packageId: number;
|
|
1039
|
+
}>, "many">;
|
|
1040
|
+
}, "strip", z.ZodTypeAny, {
|
|
1041
|
+
editions: {
|
|
1042
|
+
regions: {
|
|
1043
|
+
price: string;
|
|
1044
|
+
discount: string;
|
|
1045
|
+
region: string;
|
|
1046
|
+
priceOriginal: string;
|
|
1047
|
+
}[];
|
|
1048
|
+
edition: string;
|
|
1049
|
+
packageId: number;
|
|
1050
|
+
}[];
|
|
1051
|
+
}, {
|
|
1052
|
+
editions: {
|
|
1053
|
+
regions: {
|
|
1054
|
+
price: string;
|
|
1055
|
+
discount: string;
|
|
1056
|
+
region: string;
|
|
1057
|
+
priceOriginal: string;
|
|
1058
|
+
}[];
|
|
1059
|
+
edition: string;
|
|
1060
|
+
packageId: number;
|
|
1061
|
+
}[];
|
|
1062
|
+
}>>;
|
|
1063
|
+
}, "strip", z.ZodTypeAny, {
|
|
1064
|
+
steam: {
|
|
1065
|
+
title: string;
|
|
1066
|
+
description: string;
|
|
1067
|
+
shortDescription: string;
|
|
1068
|
+
coverImageUrl: string;
|
|
1069
|
+
steamAppId: number;
|
|
1070
|
+
hasMultiplayer: boolean;
|
|
1071
|
+
hasCoop: boolean;
|
|
1072
|
+
hasSinglePlayer: boolean;
|
|
1073
|
+
genres: string[];
|
|
1074
|
+
systemRequirements: {
|
|
1075
|
+
minimum?: {
|
|
1076
|
+
os?: string | undefined;
|
|
1077
|
+
processor?: string | undefined;
|
|
1078
|
+
memory?: string | undefined;
|
|
1079
|
+
graphics?: string | undefined;
|
|
1080
|
+
storage?: string | undefined;
|
|
1081
|
+
directx?: string | undefined;
|
|
1082
|
+
network?: string | undefined;
|
|
1083
|
+
} | undefined;
|
|
1084
|
+
recommended?: {
|
|
1085
|
+
os?: string | undefined;
|
|
1086
|
+
processor?: string | undefined;
|
|
1087
|
+
memory?: string | undefined;
|
|
1088
|
+
graphics?: string | undefined;
|
|
1089
|
+
storage?: string | undefined;
|
|
1090
|
+
directx?: string | undefined;
|
|
1091
|
+
network?: string | undefined;
|
|
1092
|
+
} | undefined;
|
|
1093
|
+
};
|
|
1094
|
+
screenshots: string[];
|
|
1095
|
+
originalTitle?: string | undefined;
|
|
1096
|
+
developer?: string | undefined;
|
|
1097
|
+
publisher?: string | undefined;
|
|
1098
|
+
releaseDate?: string | undefined;
|
|
1099
|
+
steamRating?: number | undefined;
|
|
1100
|
+
} | null;
|
|
1101
|
+
dessly: {
|
|
1102
|
+
editions: {
|
|
1103
|
+
regions: {
|
|
1104
|
+
price: string;
|
|
1105
|
+
discount: string;
|
|
1106
|
+
region: string;
|
|
1107
|
+
priceOriginal: string;
|
|
1108
|
+
}[];
|
|
1109
|
+
edition: string;
|
|
1110
|
+
packageId: number;
|
|
1111
|
+
}[];
|
|
1112
|
+
} | null;
|
|
1113
|
+
}, {
|
|
1114
|
+
steam: {
|
|
1115
|
+
title: string;
|
|
1116
|
+
description: string;
|
|
1117
|
+
shortDescription: string;
|
|
1118
|
+
coverImageUrl: string;
|
|
1119
|
+
steamAppId: number;
|
|
1120
|
+
hasMultiplayer: boolean;
|
|
1121
|
+
hasCoop: boolean;
|
|
1122
|
+
hasSinglePlayer: boolean;
|
|
1123
|
+
genres: string[];
|
|
1124
|
+
systemRequirements: {
|
|
1125
|
+
minimum?: {
|
|
1126
|
+
os?: string | undefined;
|
|
1127
|
+
processor?: string | undefined;
|
|
1128
|
+
memory?: string | undefined;
|
|
1129
|
+
graphics?: string | undefined;
|
|
1130
|
+
storage?: string | undefined;
|
|
1131
|
+
directx?: string | undefined;
|
|
1132
|
+
network?: string | undefined;
|
|
1133
|
+
} | undefined;
|
|
1134
|
+
recommended?: {
|
|
1135
|
+
os?: string | undefined;
|
|
1136
|
+
processor?: string | undefined;
|
|
1137
|
+
memory?: string | undefined;
|
|
1138
|
+
graphics?: string | undefined;
|
|
1139
|
+
storage?: string | undefined;
|
|
1140
|
+
directx?: string | undefined;
|
|
1141
|
+
network?: string | undefined;
|
|
1142
|
+
} | undefined;
|
|
1143
|
+
};
|
|
1144
|
+
screenshots: string[];
|
|
1145
|
+
originalTitle?: string | undefined;
|
|
1146
|
+
developer?: string | undefined;
|
|
1147
|
+
publisher?: string | undefined;
|
|
1148
|
+
releaseDate?: string | undefined;
|
|
1149
|
+
steamRating?: number | undefined;
|
|
1150
|
+
} | null;
|
|
1151
|
+
dessly: {
|
|
1152
|
+
editions: {
|
|
1153
|
+
regions: {
|
|
1154
|
+
price: string;
|
|
1155
|
+
discount: string;
|
|
1156
|
+
region: string;
|
|
1157
|
+
priceOriginal: string;
|
|
1158
|
+
}[];
|
|
1159
|
+
edition: string;
|
|
1160
|
+
packageId: number;
|
|
1161
|
+
}[];
|
|
1162
|
+
} | null;
|
|
1163
|
+
}>;
|
|
820
1164
|
export type CategoryBrief = z.infer<typeof CategoryBriefSchema>;
|
|
821
1165
|
export type CategoryResponse = z.infer<typeof CategoryResponseSchema>;
|
|
822
1166
|
export type GenreBrief = z.infer<typeof GenreBriefSchema>;
|
|
@@ -831,3 +1175,4 @@ export type SystemRequirementsResponse = z.infer<typeof SystemRequirementsRespon
|
|
|
831
1175
|
export type ProductCatalogResponse = z.infer<typeof ProductCatalogResponseSchema>;
|
|
832
1176
|
export type ProductDetailResponse = z.infer<typeof ProductDetailResponseSchema>;
|
|
833
1177
|
export type KeysCountResponse = z.infer<typeof KeysCountResponseSchema>;
|
|
1178
|
+
export type SteamParseResponse = z.infer<typeof SteamParseResponseSchema>;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.KeysCountResponseSchema = exports.ProductDetailResponseSchema = exports.ProductCatalogResponseSchema = exports.DlcBriefSchema = exports.SystemRequirementsResponseSchema = exports.MediaResponseSchema = exports.VariantDetailSchema = exports.VariantCatalogSchema = exports.RegionResponseSchema = exports.RegionBriefSchema = exports.TagBriefSchema = exports.GenreResponseSchema = exports.GenreBriefSchema = exports.CategoryResponseSchema = exports.CategoryBriefSchema = void 0;
|
|
6
|
+
exports.SteamParseResponseSchema = exports.KeysCountResponseSchema = exports.ProductDetailResponseSchema = exports.ProductCatalogResponseSchema = exports.DlcBriefSchema = exports.SystemRequirementsResponseSchema = exports.MediaResponseSchema = exports.VariantDetailSchema = exports.VariantCatalogSchema = exports.RegionResponseSchema = exports.RegionBriefSchema = exports.TagBriefSchema = exports.GenreResponseSchema = exports.GenreBriefSchema = exports.CategoryResponseSchema = exports.CategoryBriefSchema = void 0;
|
|
7
7
|
const zod_1 = __importDefault(require("zod"));
|
|
8
8
|
// === Вложенные схемы ===
|
|
9
9
|
/** Категория (краткая) */
|
|
@@ -174,3 +174,58 @@ exports.KeysCountResponseSchema = zod_1.default.object({
|
|
|
174
174
|
reserved: zod_1.default.number(),
|
|
175
175
|
total: zod_1.default.number(),
|
|
176
176
|
});
|
|
177
|
+
// === Парсинг Steam ===
|
|
178
|
+
/** Спарсенные системные требования */
|
|
179
|
+
const ParsedSystemRequirementsSchema = zod_1.default.object({
|
|
180
|
+
os: zod_1.default.string().optional(),
|
|
181
|
+
processor: zod_1.default.string().optional(),
|
|
182
|
+
memory: zod_1.default.string().optional(),
|
|
183
|
+
graphics: zod_1.default.string().optional(),
|
|
184
|
+
storage: zod_1.default.string().optional(),
|
|
185
|
+
directx: zod_1.default.string().optional(),
|
|
186
|
+
network: zod_1.default.string().optional(),
|
|
187
|
+
});
|
|
188
|
+
/** Данные игры из Steam Store API */
|
|
189
|
+
const SteamParsedDataSchema = zod_1.default.object({
|
|
190
|
+
title: zod_1.default.string(),
|
|
191
|
+
originalTitle: zod_1.default.string().optional(),
|
|
192
|
+
description: zod_1.default.string(),
|
|
193
|
+
shortDescription: zod_1.default.string(),
|
|
194
|
+
coverImageUrl: zod_1.default.string(),
|
|
195
|
+
developer: zod_1.default.string().optional(),
|
|
196
|
+
publisher: zod_1.default.string().optional(),
|
|
197
|
+
releaseDate: zod_1.default.string().optional(),
|
|
198
|
+
steamAppId: zod_1.default.number(),
|
|
199
|
+
steamRating: zod_1.default.number().optional(),
|
|
200
|
+
hasMultiplayer: zod_1.default.boolean(),
|
|
201
|
+
hasCoop: zod_1.default.boolean(),
|
|
202
|
+
hasSinglePlayer: zod_1.default.boolean(),
|
|
203
|
+
genres: zod_1.default.array(zod_1.default.string()),
|
|
204
|
+
screenshots: zod_1.default.array(zod_1.default.string()),
|
|
205
|
+
systemRequirements: zod_1.default.object({
|
|
206
|
+
minimum: ParsedSystemRequirementsSchema.optional(),
|
|
207
|
+
recommended: ParsedSystemRequirementsSchema.optional(),
|
|
208
|
+
}),
|
|
209
|
+
});
|
|
210
|
+
/** Региональная цена из Dessly */
|
|
211
|
+
const DesslyRegionPriceSchema = zod_1.default.object({
|
|
212
|
+
region: zod_1.default.string(),
|
|
213
|
+
price: zod_1.default.string(),
|
|
214
|
+
priceOriginal: zod_1.default.string(),
|
|
215
|
+
discount: zod_1.default.string(),
|
|
216
|
+
});
|
|
217
|
+
/** Издание игры из Dessly */
|
|
218
|
+
const DesslyEditionSchema = zod_1.default.object({
|
|
219
|
+
edition: zod_1.default.string(),
|
|
220
|
+
packageId: zod_1.default.number(),
|
|
221
|
+
regions: zod_1.default.array(DesslyRegionPriceSchema),
|
|
222
|
+
});
|
|
223
|
+
/** Данные из Dessly API */
|
|
224
|
+
const DesslyParsedDataSchema = zod_1.default.object({
|
|
225
|
+
editions: zod_1.default.array(DesslyEditionSchema),
|
|
226
|
+
});
|
|
227
|
+
/** Ответ парсинга игры по Steam App ID */
|
|
228
|
+
exports.SteamParseResponseSchema = zod_1.default.object({
|
|
229
|
+
steam: SteamParsedDataSchema.nullable(),
|
|
230
|
+
dessly: DesslyParsedDataSchema.nullable(),
|
|
231
|
+
});
|
|
@@ -187,6 +187,68 @@ export const KeysCountResponseSchema = z.object({
|
|
|
187
187
|
total: z.number(),
|
|
188
188
|
});
|
|
189
189
|
|
|
190
|
+
// === Парсинг Steam ===
|
|
191
|
+
|
|
192
|
+
/** Спарсенные системные требования */
|
|
193
|
+
const ParsedSystemRequirementsSchema = z.object({
|
|
194
|
+
os: z.string().optional(),
|
|
195
|
+
processor: z.string().optional(),
|
|
196
|
+
memory: z.string().optional(),
|
|
197
|
+
graphics: z.string().optional(),
|
|
198
|
+
storage: z.string().optional(),
|
|
199
|
+
directx: z.string().optional(),
|
|
200
|
+
network: z.string().optional(),
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
/** Данные игры из Steam Store API */
|
|
204
|
+
const SteamParsedDataSchema = z.object({
|
|
205
|
+
title: z.string(),
|
|
206
|
+
originalTitle: z.string().optional(),
|
|
207
|
+
description: z.string(),
|
|
208
|
+
shortDescription: z.string(),
|
|
209
|
+
coverImageUrl: z.string(),
|
|
210
|
+
developer: z.string().optional(),
|
|
211
|
+
publisher: z.string().optional(),
|
|
212
|
+
releaseDate: z.string().optional(),
|
|
213
|
+
steamAppId: z.number(),
|
|
214
|
+
steamRating: z.number().optional(),
|
|
215
|
+
hasMultiplayer: z.boolean(),
|
|
216
|
+
hasCoop: z.boolean(),
|
|
217
|
+
hasSinglePlayer: z.boolean(),
|
|
218
|
+
genres: z.array(z.string()),
|
|
219
|
+
screenshots: z.array(z.string()),
|
|
220
|
+
systemRequirements: z.object({
|
|
221
|
+
minimum: ParsedSystemRequirementsSchema.optional(),
|
|
222
|
+
recommended: ParsedSystemRequirementsSchema.optional(),
|
|
223
|
+
}),
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
/** Региональная цена из Dessly */
|
|
227
|
+
const DesslyRegionPriceSchema = z.object({
|
|
228
|
+
region: z.string(),
|
|
229
|
+
price: z.string(),
|
|
230
|
+
priceOriginal: z.string(),
|
|
231
|
+
discount: z.string(),
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
/** Издание игры из Dessly */
|
|
235
|
+
const DesslyEditionSchema = z.object({
|
|
236
|
+
edition: z.string(),
|
|
237
|
+
packageId: z.number(),
|
|
238
|
+
regions: z.array(DesslyRegionPriceSchema),
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
/** Данные из Dessly API */
|
|
242
|
+
const DesslyParsedDataSchema = z.object({
|
|
243
|
+
editions: z.array(DesslyEditionSchema),
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
/** Ответ парсинга игры по Steam App ID */
|
|
247
|
+
export const SteamParseResponseSchema = z.object({
|
|
248
|
+
steam: SteamParsedDataSchema.nullable(),
|
|
249
|
+
dessly: DesslyParsedDataSchema.nullable(),
|
|
250
|
+
});
|
|
251
|
+
|
|
190
252
|
// === Type exports ===
|
|
191
253
|
|
|
192
254
|
export type CategoryBrief = z.infer<typeof CategoryBriefSchema>;
|
|
@@ -203,3 +265,4 @@ export type SystemRequirementsResponse = z.infer<typeof SystemRequirementsRespon
|
|
|
203
265
|
export type ProductCatalogResponse = z.infer<typeof ProductCatalogResponseSchema>;
|
|
204
266
|
export type ProductDetailResponse = z.infer<typeof ProductDetailResponseSchema>;
|
|
205
267
|
export type KeysCountResponse = z.infer<typeof KeysCountResponseSchema>;
|
|
268
|
+
export type SteamParseResponse = z.infer<typeof SteamParseResponseSchema>;
|