lancer-shared 1.0.100 → 1.0.102

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.
@@ -0,0 +1,30 @@
1
+ import { z } from 'zod';
2
+ export declare const bidSuccessSchema: z.ZodObject<{
3
+ status: z.ZodLiteral<"success">;
4
+ biddingAmount: z.ZodNumber;
5
+ boosted: z.ZodBoolean;
6
+ boostingAmount: z.ZodNumber;
7
+ cookies: z.ZodArray<z.ZodAny, "many">;
8
+ }, "strip", z.ZodTypeAny, {
9
+ status: "success";
10
+ cookies: any[];
11
+ biddingAmount: number;
12
+ boosted: boolean;
13
+ boostingAmount: number;
14
+ }, {
15
+ status: "success";
16
+ cookies: any[];
17
+ biddingAmount: number;
18
+ boosted: boolean;
19
+ boostingAmount: number;
20
+ }>;
21
+ export declare const bidFailedSchema: z.ZodObject<{
22
+ status: z.ZodLiteral<"failed">;
23
+ errorMessage: z.ZodString;
24
+ }, "strip", z.ZodTypeAny, {
25
+ status: "failed";
26
+ errorMessage: string;
27
+ }, {
28
+ status: "failed";
29
+ errorMessage: string;
30
+ }>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.bidFailedSchema = exports.bidSuccessSchema = void 0;
4
+ const zod_1 = require("zod");
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
+ });
@@ -39,6 +39,8 @@ export declare const bidSchema: z.ZodObject<{
39
39
  cookies: z.ZodArray<z.ZodAny, "many">;
40
40
  jobId: z.ZodString;
41
41
  campaignId: z.ZodString;
42
+ username: z.ZodString;
43
+ password: z.ZodString;
42
44
  formData: z.ZodObject<{
43
45
  coverLetter: z.ZodString;
44
46
  questionAnswerPairs: z.ZodNullable<z.ZodArray<z.ZodObject<{
@@ -84,8 +86,10 @@ export declare const bidSchema: z.ZodObject<{
84
86
  maximumBoost: number | null;
85
87
  minimumBoost: number | null;
86
88
  };
89
+ username: string;
87
90
  jobId: string;
88
91
  cookies: any[];
92
+ password: string;
89
93
  jobUrl: string;
90
94
  userId: string;
91
95
  campaignId: string;
@@ -100,8 +104,10 @@ export declare const bidSchema: z.ZodObject<{
100
104
  maximumBoost: number | null;
101
105
  minimumBoost: number | null;
102
106
  };
107
+ username: string;
103
108
  jobId: string;
104
109
  cookies: any[];
110
+ password: string;
105
111
  jobUrl: string;
106
112
  userId: string;
107
113
  campaignId: string;
@@ -112,6 +118,8 @@ export declare const agencyBidSchema: z.ZodObject<z.objectUtil.extendShape<{
112
118
  cookies: z.ZodArray<z.ZodAny, "many">;
113
119
  jobId: z.ZodString;
114
120
  campaignId: z.ZodString;
121
+ username: z.ZodString;
122
+ password: z.ZodString;
115
123
  formData: z.ZodObject<{
116
124
  coverLetter: z.ZodString;
117
125
  questionAnswerPairs: z.ZodNullable<z.ZodArray<z.ZodObject<{
@@ -161,8 +169,10 @@ export declare const agencyBidSchema: z.ZodObject<z.objectUtil.extendShape<{
161
169
  maximumBoost: number | null;
162
170
  minimumBoost: number | null;
163
171
  };
172
+ username: string;
164
173
  jobId: string;
165
174
  cookies: any[];
175
+ password: string;
166
176
  jobUrl: string;
167
177
  userId: string;
168
178
  campaignId: string;
@@ -180,8 +190,10 @@ export declare const agencyBidSchema: z.ZodObject<z.objectUtil.extendShape<{
180
190
  maximumBoost: number | null;
181
191
  minimumBoost: number | null;
182
192
  };
193
+ username: string;
183
194
  jobId: string;
184
195
  cookies: any[];
196
+ password: string;
185
197
  jobUrl: string;
186
198
  userId: string;
187
199
  campaignId: string;
@@ -195,6 +207,8 @@ export declare const freelancerBidSchema: z.ZodObject<{
195
207
  cookies: z.ZodArray<z.ZodAny, "many">;
196
208
  jobId: z.ZodString;
197
209
  campaignId: z.ZodString;
210
+ username: z.ZodString;
211
+ password: z.ZodString;
198
212
  formData: z.ZodObject<{
199
213
  coverLetter: z.ZodString;
200
214
  questionAnswerPairs: z.ZodNullable<z.ZodArray<z.ZodObject<{
@@ -240,8 +254,10 @@ export declare const freelancerBidSchema: z.ZodObject<{
240
254
  maximumBoost: number | null;
241
255
  minimumBoost: number | null;
242
256
  };
257
+ username: string;
243
258
  jobId: string;
244
259
  cookies: any[];
260
+ password: string;
245
261
  jobUrl: string;
246
262
  userId: string;
247
263
  campaignId: string;
@@ -256,8 +272,10 @@ export declare const freelancerBidSchema: z.ZodObject<{
256
272
  maximumBoost: number | null;
257
273
  minimumBoost: number | null;
258
274
  };
275
+ username: string;
259
276
  jobId: string;
260
277
  cookies: any[];
278
+ password: string;
261
279
  jobUrl: string;
262
280
  userId: string;
263
281
  campaignId: string;
@@ -16,6 +16,8 @@ exports.bidSchema = zod_1.z.object({
16
16
  cookies: zod_1.z.array(zod_1.z.any()),
17
17
  jobId: zod_1.z.string(),
18
18
  campaignId: zod_1.z.string(),
19
+ username: zod_1.z.string(),
20
+ password: zod_1.z.string(),
19
21
  formData: exports.bidFormDataSchema,
20
22
  });
21
23
  exports.agencyBidSchema = exports.bidSchema.extend({
@@ -1,2 +1,2 @@
1
1
  export * from './bid';
2
- export * from './bid-status';
2
+ export * from './bid-result';
@@ -15,4 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./bid"), exports);
18
- __exportStar(require("./bid-status"), exports);
18
+ __exportStar(require("./bid-result"), exports);
@@ -0,0 +1,5 @@
1
+ import { z } from 'zod';
2
+ import { bidSuccessSchema, bidFailedSchema } from '../../schemas/bid/bid-result';
3
+ export type BidSuccess = z.infer<typeof bidSuccessSchema>;
4
+ export type BidFailed = z.infer<typeof bidFailedSchema>;
5
+ export type BidResult = BidSuccess | BidFailed;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,2 @@
1
1
  export * from './bid';
2
- export * from './bid-status';
2
+ export * from './bid-result';
@@ -15,4 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./bid"), exports);
18
- __exportStar(require("./bid-status"), exports);
18
+ __exportStar(require("./bid-result"), exports);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "lancer-shared",
4
- "version": "1.0.100",
4
+ "version": "1.0.102",
5
5
  "description": "This package contains shared stuff.",
6
6
  "types": "./dist/index.d.ts",
7
7
  "main": "./dist/index.js",