@deepintel-ltd/farmpro-contracts 1.5.14 → 1.5.15
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/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/routes/agents.routes.d.ts +3 -3
- package/dist/routes/agents.routes.js +1 -1
- package/dist/routes/auth.routes.d.ts +509 -0
- package/dist/routes/auth.routes.d.ts.map +1 -1
- package/dist/routes/auth.routes.js +26 -2
- package/dist/routes/index.d.ts +6 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +4 -0
- package/dist/routes/payments.routes.d.ts +1851 -0
- package/dist/routes/payments.routes.d.ts.map +1 -0
- package/dist/routes/payments.routes.js +91 -0
- package/dist/routes/subscriptions.routes.d.ts +3151 -0
- package/dist/routes/subscriptions.routes.d.ts.map +1 -0
- package/dist/routes/subscriptions.routes.js +155 -0
- package/dist/schemas/auth.schemas.d.ts +306 -0
- package/dist/schemas/auth.schemas.d.ts.map +1 -1
- package/dist/schemas/auth.schemas.js +26 -0
- package/dist/schemas/payments.schemas.d.ts +822 -0
- package/dist/schemas/payments.schemas.d.ts.map +1 -0
- package/dist/schemas/payments.schemas.js +105 -0
- package/dist/schemas/subscriptions.schemas.d.ts +1344 -0
- package/dist/schemas/subscriptions.schemas.d.ts.map +1 -0
- package/dist/schemas/subscriptions.schemas.js +150 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { initContract } from '@ts-rest/core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { loginSchema, signupSchema, googleAuthInitiateSchema, googleAuthCallbackSchema, refreshTokenSchema, requestPasswordResetSchema, resetPasswordSchema, changePasswordSchema, verifyEmailSchema, resendVerificationSchema, logoutSchema, authResponseSchema, googleAuthInitiateResponseSchema, refreshTokenResponseSchema, passwordResetResponseSchema, logoutResponseSchema, emailVerificationResponseSchema, } from '../schemas/auth.schemas';
|
|
4
|
-
import { jsonApiErrorResponseSchema } from '../schemas/common.schemas';
|
|
3
|
+
import { loginSchema, signupSchema, googleAuthInitiateSchema, googleAuthCallbackSchema, refreshTokenSchema, requestPasswordResetSchema, resetPasswordSchema, changePasswordSchema, verifyEmailSchema, resendVerificationSchema, logoutSchema, completeOnboardingSchema, authResponseSchema, googleAuthInitiateResponseSchema, refreshTokenResponseSchema, passwordResetResponseSchema, logoutResponseSchema, emailVerificationResponseSchema, onboardingStatusResponseSchema, } from '../schemas/auth.schemas';
|
|
4
|
+
import { jsonApiErrorResponseSchema, jsonApiSuccessResponseSchema } from '../schemas/common.schemas';
|
|
5
5
|
const c = initContract();
|
|
6
6
|
export const authRouter = c.router({
|
|
7
7
|
// Login with email/password
|
|
@@ -152,4 +152,28 @@ export const authRouter = c.router({
|
|
|
152
152
|
summary: 'Resend verification email',
|
|
153
153
|
description: 'Resend email verification link',
|
|
154
154
|
},
|
|
155
|
+
// Complete onboarding
|
|
156
|
+
completeOnboarding: {
|
|
157
|
+
method: 'POST',
|
|
158
|
+
path: '/auth/onboarding/complete',
|
|
159
|
+
body: z.object({ data: completeOnboardingSchema }),
|
|
160
|
+
responses: {
|
|
161
|
+
200: jsonApiSuccessResponseSchema,
|
|
162
|
+
400: jsonApiErrorResponseSchema,
|
|
163
|
+
422: jsonApiErrorResponseSchema,
|
|
164
|
+
},
|
|
165
|
+
summary: 'Complete user onboarding',
|
|
166
|
+
description: 'Mark onboarding as complete and optionally add phone number',
|
|
167
|
+
},
|
|
168
|
+
// Get onboarding status
|
|
169
|
+
getOnboardingStatus: {
|
|
170
|
+
method: 'GET',
|
|
171
|
+
path: '/auth/onboarding/status',
|
|
172
|
+
responses: {
|
|
173
|
+
200: onboardingStatusResponseSchema,
|
|
174
|
+
401: jsonApiErrorResponseSchema,
|
|
175
|
+
},
|
|
176
|
+
summary: 'Get user onboarding status',
|
|
177
|
+
description: 'Returns current onboarding completion status',
|
|
178
|
+
},
|
|
155
179
|
});
|
package/dist/routes/index.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ import { adminRouter } from './admin.routes';
|
|
|
22
22
|
import { healthRouter } from './health.routes';
|
|
23
23
|
import { seasonalPlansRouter } from './seasonal-plans.routes';
|
|
24
24
|
import { inputUsageRouter } from './input-usage.routes';
|
|
25
|
+
import { paymentsRouter } from './payments.routes';
|
|
26
|
+
import { subscriptionsRouter } from './subscriptions.routes';
|
|
25
27
|
/**
|
|
26
28
|
* Explicit interface definition for the API contract.
|
|
27
29
|
* This avoids TypeScript's type serialization limit when combining many routers
|
|
@@ -52,6 +54,8 @@ export interface ApiContractDefinition {
|
|
|
52
54
|
health: typeof healthRouter;
|
|
53
55
|
seasonalPlans: typeof seasonalPlansRouter;
|
|
54
56
|
inputUsage: typeof inputUsageRouter;
|
|
57
|
+
payments: typeof paymentsRouter;
|
|
58
|
+
subscriptions: typeof subscriptionsRouter;
|
|
55
59
|
}
|
|
56
60
|
/**
|
|
57
61
|
* Main API contract combining all routers
|
|
@@ -92,4 +96,6 @@ export type AdminEndpoints = ApiContractType['admin'];
|
|
|
92
96
|
export type HealthEndpoints = ApiContractType['health'];
|
|
93
97
|
export type SeasonalPlansEndpoints = ApiContractType['seasonalPlans'];
|
|
94
98
|
export type InputUsageEndpoints = ApiContractType['inputUsage'];
|
|
99
|
+
export type PaymentsEndpoints = ApiContractType['payments'];
|
|
100
|
+
export type SubscriptionsEndpoints = ApiContractType['subscriptions'];
|
|
95
101
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAi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C;AACtD,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;AACxD,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAAC,eAAe,CAAC,CAAC;AACtE,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC,YAAY,CAAC,CAAC;AAChE,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;AAC5D,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAAC,eAAe,CAAC,CAAC"}
|
package/dist/routes/index.js
CHANGED
|
@@ -23,6 +23,8 @@ import { adminRouter } from './admin.routes';
|
|
|
23
23
|
import { healthRouter } from './health.routes';
|
|
24
24
|
import { seasonalPlansRouter } from './seasonal-plans.routes';
|
|
25
25
|
import { inputUsageRouter } from './input-usage.routes';
|
|
26
|
+
import { paymentsRouter } from './payments.routes';
|
|
27
|
+
import { subscriptionsRouter } from './subscriptions.routes';
|
|
26
28
|
const c = initContract();
|
|
27
29
|
/**
|
|
28
30
|
* Main API contract combining all routers
|
|
@@ -55,4 +57,6 @@ export const apiContract = c.router({
|
|
|
55
57
|
health: healthRouter,
|
|
56
58
|
seasonalPlans: seasonalPlansRouter,
|
|
57
59
|
inputUsage: inputUsageRouter,
|
|
60
|
+
payments: paymentsRouter,
|
|
61
|
+
subscriptions: subscriptionsRouter,
|
|
58
62
|
});
|