@deepintel-ltd/farmpro-contracts 1.5.10 → 1.5.11

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.
@@ -2213,38 +2213,362 @@ export declare const teamRouter: {
2213
2213
  }>;
2214
2214
  };
2215
2215
  };
2216
+ checkInvitationStatus: {
2217
+ query: z.ZodObject<{
2218
+ token: z.ZodString;
2219
+ }, "strip", z.ZodTypeAny, {
2220
+ token: string;
2221
+ }, {
2222
+ token: string;
2223
+ }>;
2224
+ summary: "Check invitation status";
2225
+ description: "Check if invitation is valid and if user exists";
2226
+ method: "GET";
2227
+ path: "/team/invitations/check";
2228
+ responses: {
2229
+ 200: z.ZodObject<{} & {
2230
+ meta: z.ZodObject<{
2231
+ email: z.ZodString;
2232
+ name: z.ZodString;
2233
+ userExists: z.ZodBoolean;
2234
+ farmName: z.ZodOptional<z.ZodString>;
2235
+ }, "strip", z.ZodTypeAny, {
2236
+ email: string;
2237
+ name: string;
2238
+ userExists: boolean;
2239
+ farmName?: string | undefined;
2240
+ }, {
2241
+ email: string;
2242
+ name: string;
2243
+ userExists: boolean;
2244
+ farmName?: string | undefined;
2245
+ }>;
2246
+ }, "strip", z.ZodTypeAny, {
2247
+ meta: {
2248
+ email: string;
2249
+ name: string;
2250
+ userExists: boolean;
2251
+ farmName?: string | undefined;
2252
+ };
2253
+ }, {
2254
+ meta: {
2255
+ email: string;
2256
+ name: string;
2257
+ userExists: boolean;
2258
+ farmName?: string | undefined;
2259
+ };
2260
+ }>;
2261
+ 400: z.ZodObject<{
2262
+ errors: z.ZodArray<z.ZodObject<{
2263
+ id: z.ZodOptional<z.ZodString>;
2264
+ links: z.ZodOptional<z.ZodObject<{
2265
+ about: z.ZodOptional<z.ZodString>;
2266
+ }, "strip", z.ZodTypeAny, {
2267
+ about?: string | undefined;
2268
+ }, {
2269
+ about?: string | undefined;
2270
+ }>>;
2271
+ status: z.ZodOptional<z.ZodString>;
2272
+ code: z.ZodOptional<z.ZodString>;
2273
+ title: z.ZodOptional<z.ZodString>;
2274
+ detail: z.ZodOptional<z.ZodString>;
2275
+ source: z.ZodOptional<z.ZodObject<{
2276
+ pointer: z.ZodOptional<z.ZodString>;
2277
+ parameter: z.ZodOptional<z.ZodString>;
2278
+ }, "strip", z.ZodTypeAny, {
2279
+ pointer?: string | undefined;
2280
+ parameter?: string | undefined;
2281
+ }, {
2282
+ pointer?: string | undefined;
2283
+ parameter?: string | undefined;
2284
+ }>>;
2285
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2286
+ }, "strip", z.ZodTypeAny, {
2287
+ status?: string | undefined;
2288
+ code?: string | undefined;
2289
+ id?: string | undefined;
2290
+ links?: {
2291
+ about?: string | undefined;
2292
+ } | undefined;
2293
+ meta?: Record<string, unknown> | undefined;
2294
+ title?: string | undefined;
2295
+ detail?: string | undefined;
2296
+ source?: {
2297
+ pointer?: string | undefined;
2298
+ parameter?: string | undefined;
2299
+ } | undefined;
2300
+ }, {
2301
+ status?: string | undefined;
2302
+ code?: string | undefined;
2303
+ id?: string | undefined;
2304
+ links?: {
2305
+ about?: string | undefined;
2306
+ } | undefined;
2307
+ meta?: Record<string, unknown> | undefined;
2308
+ title?: string | undefined;
2309
+ detail?: string | undefined;
2310
+ source?: {
2311
+ pointer?: string | undefined;
2312
+ parameter?: string | undefined;
2313
+ } | undefined;
2314
+ }>, "many">;
2315
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2316
+ }, "strip", z.ZodTypeAny, {
2317
+ errors: {
2318
+ status?: string | undefined;
2319
+ code?: string | undefined;
2320
+ id?: string | undefined;
2321
+ links?: {
2322
+ about?: string | undefined;
2323
+ } | undefined;
2324
+ meta?: Record<string, unknown> | undefined;
2325
+ title?: string | undefined;
2326
+ detail?: string | undefined;
2327
+ source?: {
2328
+ pointer?: string | undefined;
2329
+ parameter?: string | undefined;
2330
+ } | undefined;
2331
+ }[];
2332
+ meta?: Record<string, unknown> | undefined;
2333
+ }, {
2334
+ errors: {
2335
+ status?: string | undefined;
2336
+ code?: string | undefined;
2337
+ id?: string | undefined;
2338
+ links?: {
2339
+ about?: string | undefined;
2340
+ } | undefined;
2341
+ meta?: Record<string, unknown> | undefined;
2342
+ title?: string | undefined;
2343
+ detail?: string | undefined;
2344
+ source?: {
2345
+ pointer?: string | undefined;
2346
+ parameter?: string | undefined;
2347
+ } | undefined;
2348
+ }[];
2349
+ meta?: Record<string, unknown> | undefined;
2350
+ }>;
2351
+ 401: z.ZodObject<{
2352
+ errors: z.ZodArray<z.ZodObject<{
2353
+ id: z.ZodOptional<z.ZodString>;
2354
+ links: z.ZodOptional<z.ZodObject<{
2355
+ about: z.ZodOptional<z.ZodString>;
2356
+ }, "strip", z.ZodTypeAny, {
2357
+ about?: string | undefined;
2358
+ }, {
2359
+ about?: string | undefined;
2360
+ }>>;
2361
+ status: z.ZodOptional<z.ZodString>;
2362
+ code: z.ZodOptional<z.ZodString>;
2363
+ title: z.ZodOptional<z.ZodString>;
2364
+ detail: z.ZodOptional<z.ZodString>;
2365
+ source: z.ZodOptional<z.ZodObject<{
2366
+ pointer: z.ZodOptional<z.ZodString>;
2367
+ parameter: z.ZodOptional<z.ZodString>;
2368
+ }, "strip", z.ZodTypeAny, {
2369
+ pointer?: string | undefined;
2370
+ parameter?: string | undefined;
2371
+ }, {
2372
+ pointer?: string | undefined;
2373
+ parameter?: string | undefined;
2374
+ }>>;
2375
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2376
+ }, "strip", z.ZodTypeAny, {
2377
+ status?: string | undefined;
2378
+ code?: string | undefined;
2379
+ id?: string | undefined;
2380
+ links?: {
2381
+ about?: string | undefined;
2382
+ } | undefined;
2383
+ meta?: Record<string, unknown> | undefined;
2384
+ title?: string | undefined;
2385
+ detail?: string | undefined;
2386
+ source?: {
2387
+ pointer?: string | undefined;
2388
+ parameter?: string | undefined;
2389
+ } | undefined;
2390
+ }, {
2391
+ status?: string | undefined;
2392
+ code?: string | undefined;
2393
+ id?: string | undefined;
2394
+ links?: {
2395
+ about?: string | undefined;
2396
+ } | undefined;
2397
+ meta?: Record<string, unknown> | undefined;
2398
+ title?: string | undefined;
2399
+ detail?: string | undefined;
2400
+ source?: {
2401
+ pointer?: string | undefined;
2402
+ parameter?: string | undefined;
2403
+ } | undefined;
2404
+ }>, "many">;
2405
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2406
+ }, "strip", z.ZodTypeAny, {
2407
+ errors: {
2408
+ status?: string | undefined;
2409
+ code?: string | undefined;
2410
+ id?: string | undefined;
2411
+ links?: {
2412
+ about?: string | undefined;
2413
+ } | undefined;
2414
+ meta?: Record<string, unknown> | undefined;
2415
+ title?: string | undefined;
2416
+ detail?: string | undefined;
2417
+ source?: {
2418
+ pointer?: string | undefined;
2419
+ parameter?: string | undefined;
2420
+ } | undefined;
2421
+ }[];
2422
+ meta?: Record<string, unknown> | undefined;
2423
+ }, {
2424
+ errors: {
2425
+ status?: string | undefined;
2426
+ code?: string | undefined;
2427
+ id?: string | undefined;
2428
+ links?: {
2429
+ about?: string | undefined;
2430
+ } | undefined;
2431
+ meta?: Record<string, unknown> | undefined;
2432
+ title?: string | undefined;
2433
+ detail?: string | undefined;
2434
+ source?: {
2435
+ pointer?: string | undefined;
2436
+ parameter?: string | undefined;
2437
+ } | undefined;
2438
+ }[];
2439
+ meta?: Record<string, unknown> | undefined;
2440
+ }>;
2441
+ 404: z.ZodObject<{
2442
+ errors: z.ZodArray<z.ZodObject<{
2443
+ id: z.ZodOptional<z.ZodString>;
2444
+ links: z.ZodOptional<z.ZodObject<{
2445
+ about: z.ZodOptional<z.ZodString>;
2446
+ }, "strip", z.ZodTypeAny, {
2447
+ about?: string | undefined;
2448
+ }, {
2449
+ about?: string | undefined;
2450
+ }>>;
2451
+ status: z.ZodOptional<z.ZodString>;
2452
+ code: z.ZodOptional<z.ZodString>;
2453
+ title: z.ZodOptional<z.ZodString>;
2454
+ detail: z.ZodOptional<z.ZodString>;
2455
+ source: z.ZodOptional<z.ZodObject<{
2456
+ pointer: z.ZodOptional<z.ZodString>;
2457
+ parameter: z.ZodOptional<z.ZodString>;
2458
+ }, "strip", z.ZodTypeAny, {
2459
+ pointer?: string | undefined;
2460
+ parameter?: string | undefined;
2461
+ }, {
2462
+ pointer?: string | undefined;
2463
+ parameter?: string | undefined;
2464
+ }>>;
2465
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2466
+ }, "strip", z.ZodTypeAny, {
2467
+ status?: string | undefined;
2468
+ code?: string | undefined;
2469
+ id?: string | undefined;
2470
+ links?: {
2471
+ about?: string | undefined;
2472
+ } | undefined;
2473
+ meta?: Record<string, unknown> | undefined;
2474
+ title?: string | undefined;
2475
+ detail?: string | undefined;
2476
+ source?: {
2477
+ pointer?: string | undefined;
2478
+ parameter?: string | undefined;
2479
+ } | undefined;
2480
+ }, {
2481
+ status?: string | undefined;
2482
+ code?: string | undefined;
2483
+ id?: string | undefined;
2484
+ links?: {
2485
+ about?: string | undefined;
2486
+ } | undefined;
2487
+ meta?: Record<string, unknown> | undefined;
2488
+ title?: string | undefined;
2489
+ detail?: string | undefined;
2490
+ source?: {
2491
+ pointer?: string | undefined;
2492
+ parameter?: string | undefined;
2493
+ } | undefined;
2494
+ }>, "many">;
2495
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2496
+ }, "strip", z.ZodTypeAny, {
2497
+ errors: {
2498
+ status?: string | undefined;
2499
+ code?: string | undefined;
2500
+ id?: string | undefined;
2501
+ links?: {
2502
+ about?: string | undefined;
2503
+ } | undefined;
2504
+ meta?: Record<string, unknown> | undefined;
2505
+ title?: string | undefined;
2506
+ detail?: string | undefined;
2507
+ source?: {
2508
+ pointer?: string | undefined;
2509
+ parameter?: string | undefined;
2510
+ } | undefined;
2511
+ }[];
2512
+ meta?: Record<string, unknown> | undefined;
2513
+ }, {
2514
+ errors: {
2515
+ status?: string | undefined;
2516
+ code?: string | undefined;
2517
+ id?: string | undefined;
2518
+ links?: {
2519
+ about?: string | undefined;
2520
+ } | undefined;
2521
+ meta?: Record<string, unknown> | undefined;
2522
+ title?: string | undefined;
2523
+ detail?: string | undefined;
2524
+ source?: {
2525
+ pointer?: string | undefined;
2526
+ parameter?: string | undefined;
2527
+ } | undefined;
2528
+ }[];
2529
+ meta?: Record<string, unknown> | undefined;
2530
+ }>;
2531
+ };
2532
+ };
2216
2533
  acceptInvitation: {
2217
2534
  summary: "Accept team invitation";
2218
- description: "Accept a team invitation by token and link to user account";
2535
+ description: "Accept a team invitation by token. If user exists, password is required. If user does not exist, password will be used to create account.";
2219
2536
  method: "POST";
2220
2537
  body: z.ZodObject<{
2221
2538
  data: z.ZodObject<{
2222
2539
  attributes: z.ZodObject<{
2223
2540
  token: z.ZodString;
2541
+ password: z.ZodOptional<z.ZodString>;
2224
2542
  }, "strip", z.ZodTypeAny, {
2225
2543
  token: string;
2544
+ password?: string | undefined;
2226
2545
  }, {
2227
2546
  token: string;
2547
+ password?: string | undefined;
2228
2548
  }>;
2229
2549
  }, "strip", z.ZodTypeAny, {
2230
2550
  attributes: {
2231
2551
  token: string;
2552
+ password?: string | undefined;
2232
2553
  };
2233
2554
  }, {
2234
2555
  attributes: {
2235
2556
  token: string;
2557
+ password?: string | undefined;
2236
2558
  };
2237
2559
  }>;
2238
2560
  }, "strip", z.ZodTypeAny, {
2239
2561
  data: {
2240
2562
  attributes: {
2241
2563
  token: string;
2564
+ password?: string | undefined;
2242
2565
  };
2243
2566
  };
2244
2567
  }, {
2245
2568
  data: {
2246
2569
  attributes: {
2247
2570
  token: string;
2571
+ password?: string | undefined;
2248
2572
  };
2249
2573
  };
2250
2574
  }>;
@@ -2264,18 +2588,21 @@ export declare const teamRouter: {
2264
2588
  farmId: string;
2265
2589
  memberId: string;
2266
2590
  }>;
2591
+ data: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
2267
2592
  }, "strip", z.ZodTypeAny, {
2268
2593
  meta: {
2269
2594
  message: string;
2270
2595
  farmId: string;
2271
2596
  memberId: string;
2272
2597
  };
2598
+ data?: any[] | undefined;
2273
2599
  }, {
2274
2600
  meta: {
2275
2601
  message: string;
2276
2602
  farmId: string;
2277
2603
  memberId: string;
2278
2604
  };
2605
+ data?: any[] | undefined;
2279
2606
  }>;
2280
2607
  400: z.ZodObject<{
2281
2608
  errors: z.ZodArray<z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"team.routes.d.ts","sourceRoot":"","sources":["../../src/routes/team.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+KrB,CAAC"}
@@ -92,6 +92,29 @@ export const teamRouter = c.router({
92
92
  summary: 'Delete team member',
93
93
  description: 'Remove a team member from the farm',
94
94
  },
95
+ // Check invitation status
96
+ checkInvitationStatus: {
97
+ method: 'GET',
98
+ path: '/team/invitations/check',
99
+ query: z.object({
100
+ token: z.string().min(1),
101
+ }),
102
+ responses: {
103
+ 200: jsonApiSuccessResponseSchema.merge(z.object({
104
+ meta: z.object({
105
+ email: z.string().email(),
106
+ name: z.string(),
107
+ userExists: z.boolean(),
108
+ farmName: z.string().optional(),
109
+ }),
110
+ })),
111
+ 400: jsonApiErrorResponseSchema,
112
+ 401: jsonApiErrorResponseSchema,
113
+ 404: jsonApiErrorResponseSchema,
114
+ },
115
+ summary: 'Check invitation status',
116
+ description: 'Check if invitation is valid and if user exists',
117
+ },
95
118
  // Accept team invitation
96
119
  acceptInvitation: {
97
120
  method: 'POST',
@@ -100,6 +123,7 @@ export const teamRouter = c.router({
100
123
  data: z.object({
101
124
  attributes: z.object({
102
125
  token: z.string().min(1),
126
+ password: z.string().min(1).optional(),
103
127
  }),
104
128
  }),
105
129
  }),
@@ -110,13 +134,14 @@ export const teamRouter = c.router({
110
134
  farmId: z.string().uuid(),
111
135
  memberId: z.string().uuid(),
112
136
  }),
137
+ data: z.array(z.any()).optional(),
113
138
  })),
114
139
  400: jsonApiErrorResponseSchema,
115
140
  401: jsonApiErrorResponseSchema,
116
141
  404: jsonApiErrorResponseSchema,
117
142
  },
118
143
  summary: 'Accept team invitation',
119
- description: 'Accept a team invitation by token and link to user account',
144
+ description: 'Accept a team invitation by token. If user exists, password is required. If user does not exist, password will be used to create account.',
120
145
  },
121
146
  // Resend team invitation
122
147
  resendInvitation: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepintel-ltd/farmpro-contracts",
3
- "version": "1.5.10",
3
+ "version": "1.5.11",
4
4
  "description": "Type-safe API contracts for FarmPro API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",