lancer-shared 1.0.99 → 1.0.100

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.
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- export declare const bidResultSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
2
+ export declare const bidSuccessSchema: z.ZodObject<{
3
3
  status: z.ZodLiteral<"success">;
4
4
  biddingAmount: z.ZodNumber;
5
5
  boosted: z.ZodBoolean;
@@ -17,7 +17,8 @@ export declare const bidResultSchema: z.ZodDiscriminatedUnion<"status", [z.ZodOb
17
17
  biddingAmount: number;
18
18
  boosted: boolean;
19
19
  boostingAmount: number;
20
- }>, z.ZodObject<{
20
+ }>;
21
+ export declare const bidFailedSchema: z.ZodObject<{
21
22
  status: z.ZodLiteral<"failed">;
22
23
  errorMessage: z.ZodString;
23
24
  }, "strip", z.ZodTypeAny, {
@@ -26,4 +27,4 @@ export declare const bidResultSchema: z.ZodDiscriminatedUnion<"status", [z.ZodOb
26
27
  }, {
27
28
  status: "failed";
28
29
  errorMessage: string;
29
- }>]>;
30
+ }>;
@@ -1,19 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.bidResultSchema = void 0;
3
+ exports.bidFailedSchema = exports.bidSuccessSchema = void 0;
4
4
  const zod_1 = require("zod");
5
- exports.bidResultSchema = zod_1.z.discriminatedUnion('status', [
6
- // Success case
7
- zod_1.z.object({
8
- status: zod_1.z.literal('success'),
9
- biddingAmount: zod_1.z.number(),
10
- boosted: zod_1.z.boolean(),
11
- boostingAmount: zod_1.z.number(),
12
- cookies: zod_1.z.array(zod_1.z.any()),
13
- }),
14
- // Failed case
15
- zod_1.z.object({
16
- status: zod_1.z.literal('failed'),
17
- errorMessage: zod_1.z.string(),
18
- }),
19
- ]);
5
+ exports.bidSuccessSchema = zod_1.z.object({
6
+ status: zod_1.z.literal('success'),
7
+ biddingAmount: zod_1.z.number(),
8
+ boosted: zod_1.z.boolean(),
9
+ boostingAmount: zod_1.z.number(),
10
+ cookies: zod_1.z.array(zod_1.z.any()),
11
+ });
12
+ exports.bidFailedSchema = zod_1.z.object({
13
+ status: zod_1.z.literal('failed'),
14
+ errorMessage: zod_1.z.string(),
15
+ });
@@ -1,3 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { bidResultSchema } from '../../schemas/bid';
3
- export type BidResult = z.infer<typeof bidResultSchema>;
2
+ import { bidSuccessSchema, bidFailedSchema } from '../../schemas/bid/bid-status';
3
+ export type BidSuccess = z.infer<typeof bidSuccessSchema>;
4
+ export type BidFailed = z.infer<typeof bidFailedSchema>;
5
+ export type BidStatus = BidSuccess | BidFailed;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "lancer-shared",
4
- "version": "1.0.99",
4
+ "version": "1.0.100",
5
5
  "description": "This package contains shared stuff.",
6
6
  "types": "./dist/index.d.ts",
7
7
  "main": "./dist/index.js",