@rankwrangler/http-client 0.2.0 → 0.2.2

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.
@@ -16,6 +16,9 @@ export type ProductInfo = {
16
16
  dateFirstAvailable: string | null;
17
17
  title: string | null;
18
18
  brand: string | null;
19
+ isMerchListing: boolean;
20
+ bullet1: string | null;
21
+ bullet2: string | null;
19
22
  rootCategoryId: number | null;
20
23
  rootCategoryBsr: number | null;
21
24
  rootCategoryDisplayName: string | null;
@@ -25,25 +28,6 @@ export type ProductInfo = {
25
28
  cached: boolean;
26
29
  };
27
30
  };
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
- };
47
31
  export declare const publicAppRouter: import("@trpc/server").TRPCBuiltRouter<{
48
32
  ctx: {
49
33
  user: ClerkUser;
@@ -134,17 +118,18 @@ export declare const publicAppRouter: import("@trpc/server").TRPCBuiltRouter<{
134
118
  errorShape: import("@trpc/server").TRPCDefaultErrorShape;
135
119
  transformer: false;
136
120
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
137
- getProductHistory: import("@trpc/server").TRPCQueryProcedure<{
121
+ getProductHistory: import("@trpc/server").TRPCMutationProcedure<{
138
122
  input: {
139
123
  marketplaceId: string;
140
124
  asin: string;
141
- metric: "bsrMain" | "bsrCategory" | "priceAmazon" | "priceNew" | "priceNewFba";
142
- categoryId?: unknown;
143
125
  startAt?: unknown;
144
126
  endAt?: unknown;
145
127
  limit?: unknown;
128
+ days?: unknown;
146
129
  };
147
130
  output: {
131
+ collecting: boolean;
132
+ syncTriggered: boolean;
148
133
  marketplaceId: string;
149
134
  asin: string;
150
135
  metric: "bsrMain" | "bsrCategory" | "priceAmazon" | "priceNew" | "priceNewFba";
@@ -196,16 +181,46 @@ export declare const publicAppRouter: import("@trpc/server").TRPCBuiltRouter<{
196
181
  output: ProductInfo;
197
182
  meta: object;
198
183
  }>;
199
- loadProductHistory: import("@trpc/server").TRPCMutationProcedure<{
200
- input: {
201
- marketplaceId: string;
202
- asin: string;
203
- days?: unknown;
184
+ dev: import("@trpc/server").TRPCBuiltRouter<{
185
+ ctx: {
186
+ user: ClerkUser;
187
+ isAdmin: boolean;
188
+ authType: "license" | "clerk" | "none";
189
+ license: {
190
+ key: string;
191
+ data: LicenseUsageData | undefined;
192
+ };
193
+ licenseError: undefined;
194
+ request: import("fastify").FastifyRequest<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown, import("fastify").FastifyBaseLogger, import("fastify/types/type-provider.js").ResolveFastifyRequestType<import("fastify").FastifyTypeProviderDefault, import("fastify").FastifySchema, import("fastify").RouteGenericInterface>>;
195
+ } | {
196
+ user: null;
197
+ isAdmin: boolean;
198
+ authType: "license" | "clerk" | "none";
199
+ license: null;
200
+ licenseError: string | undefined;
201
+ request: import("fastify").FastifyRequest<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown, import("fastify").FastifyBaseLogger, import("fastify/types/type-provider.js").ResolveFastifyRequestType<import("fastify").FastifyTypeProviderDefault, import("fastify").FastifySchema, import("fastify").RouteGenericInterface>>;
202
+ } | {
203
+ user: ClerkUser;
204
+ isAdmin: boolean;
205
+ authType: "license" | "clerk" | "none";
206
+ license: null;
207
+ licenseError: undefined;
208
+ request: import("fastify").FastifyRequest<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown, import("fastify").FastifyBaseLogger, import("fastify/types/type-provider.js").ResolveFastifyRequestType<import("fastify").FastifyTypeProviderDefault, import("fastify").FastifySchema, import("fastify").RouteGenericInterface>>;
204
209
  };
205
- output: KeepaImportSummary;
206
210
  meta: object;
207
- }>;
208
- apiKey: import("@trpc/server").TRPCBuiltRouter<{
211
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
212
+ transformer: false;
213
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
214
+ createClerkSignInToken: import("@trpc/server").TRPCMutationProcedure<{
215
+ input: void;
216
+ output: {
217
+ ticket: string;
218
+ expiresInSeconds: number;
219
+ };
220
+ meta: object;
221
+ }>;
222
+ }>>;
223
+ license: import("@trpc/server").TRPCBuiltRouter<{
209
224
  ctx: {
210
225
  user: ClerkUser;
211
226
  isAdmin: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rankwrangler/http-client",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Typed tRPC client for RankWrangler",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",