@caronashow/api
v0.8.1
Published
CaronaShow API definitions
Readme
@caronashow/api
TypeScript/JavaScript client library for the CaronaShow API. This package provides type-safe access to the CaronaShow service APIs.
Installation
npm install @caronashow/api
# or
yarn add @caronashow/api
# or
pnpm add @caronashow/api
# or
bun install @caronashow/apiUsage
Basic Setup Example
import { createClient } from "@connectrpc/connect";
import { createGrpcWebTransport } from "@connectrpc/connect-web";
import { OnboardingService } from "@caronashow/api";
// Create a transport
const transport = createGrpcWebTransport({
baseUrl: "https://dev.carona.show",
useBinaryFormat: true,
});
// Create the client
const client = createClient(OnboardingService, transport);
// Check if the current user has completed onboarding
const status = await client.getOnboardingStatus({});API Documentation
Types
The package includes the following type definitions:
User- User information including ID, name, email, participation mode, tier, avatar, and orgTimeOfDay- A time without a date component (hours, minutes)DayOfWeek- Enum for days of the weekChatPreference- Passenger's conversation preference (open, quiet, indifferent)ParticipationMode- User's role in the system (offer, search, explore)DriverOfferSetup- Driver's vehicle and route preferencesPassengerSearchSetup- Passenger's pickup and schedule preferences
Services
This is not a full list of services. These are just some examples.
OnboardingService- One-shot onboarding flowgetOnboardingStatus({}): Promise<GetOnboardingStatusResponse>- Check if the current user has completed onboardingcompleteOnboarding(request: CompleteOnboardingRequest): Promise<CompleteOnboardingResponse>- Submit all onboarding data
Development
This package is automatically generated from Protocol Buffer definitions. Do not modify the generated code directly. Instead, make changes to the proto files in the parent repository.
Building
The package is built using the following tools:
buf- Protocol Buffer compilerprotoc-gen-es- TypeScript code generatorprotoc-gen-connect-es- Connect-ES code generator
To rebuild the package:
make generateLicense
MIT License - see LICENSE file for details.
