Download lib/api-zod/src/generated/api.ts from sare26/fb: direct link, hf CLI and curl.
- Browser
- Download file 2.74 kB
-
https://huggingface.co/spaces/sare26/fb/resolve/main/lib/api-zod/src/generated/api.ts
- Command line
-
hf download hf://spaces/sare26/fb/lib/api-zod/src/generated/api.ts
-
curl -L -o api.ts https://huggingface.co/spaces/sare26/fb/resolve/main/lib/api-zod/src/generated/api.ts
2.74 kB
| /** | |
| * Generated by orval v8.5.3 🍺 | |
| * Do not edit manually. | |
| * Api | |
| * API specification for FB Group Publisher PRO | |
| * OpenAPI spec version: 0.1.0 | |
| */ | |
| import * as zod from "zod"; | |
| /** | |
| * @summary Health check | |
| */ | |
| export const HealthCheckResponse = zod.object({ | |
| status: zod.string(), | |
| }); | |
| /** | |
| * @summary Get current user with subscription state | |
| */ | |
| export const GetMeResponse = zod.object({ | |
| userId: zod.string(), | |
| email: zod.string().nullish(), | |
| subscription: zod.object({ | |
| status: zod.enum([ | |
| "none", | |
| "trialing", | |
| "active", | |
| "cancelled", | |
| "suspended", | |
| "expired", | |
| ]), | |
| trialEnd: zod.coerce.date().nullish(), | |
| currentPeriodEnd: zod.coerce.date().nullish(), | |
| paypalSubscriptionId: zod.string().nullish(), | |
| hasAccess: zod.boolean(), | |
| }), | |
| }); | |
| /** | |
| * @summary Create PayPal subscription, returns approval URL | |
| */ | |
| export const CreateSubscriptionResponse = zod.object({ | |
| subscriptionId: zod.string(), | |
| approvalUrl: zod.string(), | |
| }); | |
| /** | |
| * @summary Activate subscription after PayPal approval | |
| */ | |
| export const ActivateSubscriptionBody = zod.object({ | |
| subscriptionId: zod.string(), | |
| }); | |
| export const ActivateSubscriptionResponse = zod.object({ | |
| status: zod.enum([ | |
| "none", | |
| "trialing", | |
| "active", | |
| "cancelled", | |
| "suspended", | |
| "expired", | |
| ]), | |
| trialEnd: zod.coerce.date().nullish(), | |
| currentPeriodEnd: zod.coerce.date().nullish(), | |
| paypalSubscriptionId: zod.string().nullish(), | |
| hasAccess: zod.boolean(), | |
| }); | |
| /** | |
| * @summary Cancel current subscription | |
| */ | |
| export const CancelSubscriptionResponse = zod.object({ | |
| status: zod.enum([ | |
| "none", | |
| "trialing", | |
| "active", | |
| "cancelled", | |
| "suspended", | |
| "expired", | |
| ]), | |
| trialEnd: zod.coerce.date().nullish(), | |
| currentPeriodEnd: zod.coerce.date().nullish(), | |
| paypalSubscriptionId: zod.string().nullish(), | |
| hasAccess: zod.boolean(), | |
| }); | |
| /** | |
| * @summary PayPal webhook receiver | |
| */ | |
| export const PaypalWebhookBody = zod.record(zod.string(), zod.unknown()); | |
| export const PaypalWebhookResponse = zod.object({ | |
| status: zod.string(), | |
| }); | |
| /** | |
| * @summary List saved group lists | |
| */ | |
| export const ListSavedListsResponseItem = zod.object({ | |
| id: zod.number(), | |
| name: zod.string(), | |
| groupIds: zod.array(zod.string()), | |
| createdAt: zod.coerce.date(), | |
| }); | |
| export const ListSavedListsResponse = zod.array(ListSavedListsResponseItem); | |
| /** | |
| * @summary Save a group list | |
| */ | |
| export const createSavedListBodyNameMax = 80; | |
| export const CreateSavedListBody = zod.object({ | |
| name: zod.string().min(1).max(createSavedListBodyNameMax), | |
| groupIds: zod.array(zod.string()).min(1), | |
| }); | |
| /** | |
| * @summary Delete a saved list | |
| */ | |
| export const DeleteSavedListParams = zod.object({ | |
| id: zod.coerce.number(), | |
| }); | |