@rankwrangler/http-client 0.1.3 → 0.2.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/dist/app-router.d.ts +58 -1
- package/package.json +1 -1
package/dist/app-router.d.ts
CHANGED
|
@@ -25,6 +25,25 @@ export type ProductInfo = {
|
|
|
25
25
|
cached: boolean;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
+
export type PointCountSummary = Record<string, number>;
|
|
29
|
+
export type KeepaImportSummary = {
|
|
30
|
+
importId: string;
|
|
31
|
+
marketplaceId: string;
|
|
32
|
+
asin: string;
|
|
33
|
+
days: number;
|
|
34
|
+
pointsStored: number;
|
|
35
|
+
pointCounts: PointCountSummary;
|
|
36
|
+
tokensConsumed: number | null;
|
|
37
|
+
tokensLeft: number | null;
|
|
38
|
+
refillInMs: number | null;
|
|
39
|
+
refillRate: number | null;
|
|
40
|
+
status: "success" | "error";
|
|
41
|
+
cached: boolean;
|
|
42
|
+
importedAt: string;
|
|
43
|
+
errorCode: string | null;
|
|
44
|
+
errorMessage: string | null;
|
|
45
|
+
responsePayload: Record<string, unknown> | null;
|
|
46
|
+
};
|
|
28
47
|
export declare const publicAppRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
29
48
|
ctx: {
|
|
30
49
|
user: ClerkUser;
|
|
@@ -115,6 +134,35 @@ export declare const publicAppRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
115
134
|
errorShape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
116
135
|
transformer: false;
|
|
117
136
|
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
137
|
+
getProductHistory: import("@trpc/server").TRPCQueryProcedure<{
|
|
138
|
+
input: {
|
|
139
|
+
marketplaceId: string;
|
|
140
|
+
asin: string;
|
|
141
|
+
metric: "bsrMain" | "bsrCategory" | "priceAmazon" | "priceNew" | "priceNewFba";
|
|
142
|
+
categoryId?: unknown;
|
|
143
|
+
startAt?: unknown;
|
|
144
|
+
endAt?: unknown;
|
|
145
|
+
limit?: unknown;
|
|
146
|
+
};
|
|
147
|
+
output: {
|
|
148
|
+
marketplaceId: string;
|
|
149
|
+
asin: string;
|
|
150
|
+
metric: "bsrMain" | "bsrCategory" | "priceAmazon" | "priceNew" | "priceNewFba";
|
|
151
|
+
latestImportAt: string | null;
|
|
152
|
+
categoryNames: {
|
|
153
|
+
[x: string]: string;
|
|
154
|
+
};
|
|
155
|
+
points: {
|
|
156
|
+
categoryId: number;
|
|
157
|
+
categoryName: string;
|
|
158
|
+
observedAt: string;
|
|
159
|
+
keepaMinutes: number;
|
|
160
|
+
value: number | null;
|
|
161
|
+
isMissing: boolean;
|
|
162
|
+
}[];
|
|
163
|
+
};
|
|
164
|
+
meta: object;
|
|
165
|
+
}>;
|
|
118
166
|
getProductInfoBatch: import("@trpc/server").TRPCMutationProcedure<{
|
|
119
167
|
input: {
|
|
120
168
|
marketplaceId: string;
|
|
@@ -148,7 +196,16 @@ export declare const publicAppRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
148
196
|
output: ProductInfo;
|
|
149
197
|
meta: object;
|
|
150
198
|
}>;
|
|
151
|
-
|
|
199
|
+
loadProductHistory: import("@trpc/server").TRPCMutationProcedure<{
|
|
200
|
+
input: {
|
|
201
|
+
marketplaceId: string;
|
|
202
|
+
asin: string;
|
|
203
|
+
days?: unknown;
|
|
204
|
+
};
|
|
205
|
+
output: KeepaImportSummary;
|
|
206
|
+
meta: object;
|
|
207
|
+
}>;
|
|
208
|
+
apiKey: import("@trpc/server").TRPCBuiltRouter<{
|
|
152
209
|
ctx: {
|
|
153
210
|
user: ClerkUser;
|
|
154
211
|
isAdmin: boolean;
|