@framebreak/types 0.1.18 → 0.1.20
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 +151 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as _orpc_server from '@orpc/server';
|
|
2
|
+
import { InferRouterOutputs, InferRouterInputs } from '@orpc/server';
|
|
2
3
|
import * as better_auth from 'better-auth';
|
|
3
4
|
import * as zod from 'zod';
|
|
4
5
|
import * as _orpc_contract from '@orpc/contract';
|
|
@@ -4117,6 +4118,121 @@ declare const v1Router: {
|
|
|
4117
4118
|
readonly message: "An internal server error occurred";
|
|
4118
4119
|
};
|
|
4119
4120
|
}>, Record<never, never>>;
|
|
4121
|
+
get: _orpc_server.DecoratedProcedure<_orpc_server.MergedInitialContext<BaseContext & Record<never, never>, BaseContext & Record<never, never>, BaseContext>, _orpc_server.MergedCurrentContext<BaseContext, {
|
|
4122
|
+
session: {
|
|
4123
|
+
id: string;
|
|
4124
|
+
createdAt: Date;
|
|
4125
|
+
updatedAt: Date;
|
|
4126
|
+
userId: string;
|
|
4127
|
+
expiresAt: Date;
|
|
4128
|
+
token: string;
|
|
4129
|
+
ipAddress?: string | null | undefined | undefined;
|
|
4130
|
+
userAgent?: string | null | undefined | undefined;
|
|
4131
|
+
impersonatedBy?: string | null | undefined;
|
|
4132
|
+
};
|
|
4133
|
+
user: {
|
|
4134
|
+
id: string;
|
|
4135
|
+
createdAt: Date;
|
|
4136
|
+
updatedAt: Date;
|
|
4137
|
+
email: string;
|
|
4138
|
+
emailVerified: boolean;
|
|
4139
|
+
name: string;
|
|
4140
|
+
image?: string | null | undefined | undefined;
|
|
4141
|
+
onboardingCompleted: boolean | null | undefined;
|
|
4142
|
+
linkedinVerified: boolean | null | undefined;
|
|
4143
|
+
linkedinVerifiedAt?: Date | null | undefined;
|
|
4144
|
+
linkedinId?: string | null | undefined;
|
|
4145
|
+
linkedinName?: string | null | undefined;
|
|
4146
|
+
banned: boolean | null | undefined;
|
|
4147
|
+
role?: string | null | undefined;
|
|
4148
|
+
banReason?: string | null | undefined;
|
|
4149
|
+
banExpires?: Date | null | undefined;
|
|
4150
|
+
username?: string | null | undefined;
|
|
4151
|
+
displayUsername?: string | null | undefined;
|
|
4152
|
+
};
|
|
4153
|
+
}>, zod.ZodObject<{
|
|
4154
|
+
id: zod.ZodString;
|
|
4155
|
+
}, better_auth.$strip>, _orpc_contract.Schema<{
|
|
4156
|
+
data: {
|
|
4157
|
+
id: string;
|
|
4158
|
+
content: string;
|
|
4159
|
+
link: {
|
|
4160
|
+
url: string;
|
|
4161
|
+
title: string | null;
|
|
4162
|
+
description: string | null;
|
|
4163
|
+
image: string | null;
|
|
4164
|
+
} | null;
|
|
4165
|
+
createdAt: Date;
|
|
4166
|
+
updatedAt: Date;
|
|
4167
|
+
author: {
|
|
4168
|
+
id: string;
|
|
4169
|
+
name: string;
|
|
4170
|
+
username: string | null;
|
|
4171
|
+
displayUsername: string | null;
|
|
4172
|
+
image: string | null;
|
|
4173
|
+
linkedinVerified: boolean | null;
|
|
4174
|
+
};
|
|
4175
|
+
isOwner: boolean;
|
|
4176
|
+
engagement: {
|
|
4177
|
+
likesCount: number;
|
|
4178
|
+
commentsCount: number;
|
|
4179
|
+
isLiked: boolean;
|
|
4180
|
+
};
|
|
4181
|
+
};
|
|
4182
|
+
}, {
|
|
4183
|
+
data: {
|
|
4184
|
+
id: string;
|
|
4185
|
+
content: string;
|
|
4186
|
+
link: {
|
|
4187
|
+
url: string;
|
|
4188
|
+
title: string | null;
|
|
4189
|
+
description: string | null;
|
|
4190
|
+
image: string | null;
|
|
4191
|
+
} | null;
|
|
4192
|
+
createdAt: Date;
|
|
4193
|
+
updatedAt: Date;
|
|
4194
|
+
author: {
|
|
4195
|
+
id: string;
|
|
4196
|
+
name: string;
|
|
4197
|
+
username: string | null;
|
|
4198
|
+
displayUsername: string | null;
|
|
4199
|
+
image: string | null;
|
|
4200
|
+
linkedinVerified: boolean | null;
|
|
4201
|
+
};
|
|
4202
|
+
isOwner: boolean;
|
|
4203
|
+
engagement: {
|
|
4204
|
+
likesCount: number;
|
|
4205
|
+
commentsCount: number;
|
|
4206
|
+
isLiked: boolean;
|
|
4207
|
+
};
|
|
4208
|
+
};
|
|
4209
|
+
}>, _orpc_contract.MergedErrorMap<Record<never, never>, {
|
|
4210
|
+
readonly UNAUTHORIZED: {
|
|
4211
|
+
readonly message: "You must be logged in to access this resource";
|
|
4212
|
+
};
|
|
4213
|
+
readonly FORBIDDEN: {
|
|
4214
|
+
readonly message: "You do not have permission to access this resource";
|
|
4215
|
+
};
|
|
4216
|
+
readonly NOT_FOUND: {
|
|
4217
|
+
readonly message: "The requested resource was not found";
|
|
4218
|
+
};
|
|
4219
|
+
readonly BAD_REQUEST: {
|
|
4220
|
+
readonly message: "Invalid request";
|
|
4221
|
+
readonly data: zod.ZodOptional<zod.ZodObject<{
|
|
4222
|
+
issues: zod.ZodArray<zod.ZodObject<{
|
|
4223
|
+
code: zod.ZodString;
|
|
4224
|
+
path: zod.ZodArray<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
|
|
4225
|
+
message: zod.ZodString;
|
|
4226
|
+
}, better_auth.$loose>>;
|
|
4227
|
+
}, better_auth.$strip>>;
|
|
4228
|
+
};
|
|
4229
|
+
readonly CONFLICT: {
|
|
4230
|
+
readonly message: "The request conflicts with existing data";
|
|
4231
|
+
};
|
|
4232
|
+
readonly INTERNAL_SERVER_ERROR: {
|
|
4233
|
+
readonly message: "An internal server error occurred";
|
|
4234
|
+
};
|
|
4235
|
+
}>, Record<never, never>>;
|
|
4120
4236
|
create: _orpc_server.DecoratedProcedure<_orpc_server.MergedInitialContext<BaseContext & Record<never, never>, BaseContext & Record<never, never>, BaseContext>, _orpc_server.MergedCurrentContext<BaseContext, {
|
|
4121
4237
|
session: {
|
|
4122
4238
|
id: string;
|
|
@@ -5382,4 +5498,38 @@ declare const v1Router: {
|
|
|
5382
5498
|
};
|
|
5383
5499
|
type V1Router = typeof v1Router;
|
|
5384
5500
|
|
|
5385
|
-
|
|
5501
|
+
/**
|
|
5502
|
+
* @framebreak/api-types
|
|
5503
|
+
*
|
|
5504
|
+
* Type definitions for the Framebreak API.
|
|
5505
|
+
* Use with @orpc/client to create a fully-typed API client.
|
|
5506
|
+
*
|
|
5507
|
+
* @example
|
|
5508
|
+
* ```ts
|
|
5509
|
+
* import type { V1Router, RouterOutputs, RouterInputs } from '@framebreak/api-types';
|
|
5510
|
+
* import { createORPCClient } from '@orpc/client';
|
|
5511
|
+
*
|
|
5512
|
+
* const client = createORPCClient<V1Router>(link);
|
|
5513
|
+
*
|
|
5514
|
+
* // Use inferred types
|
|
5515
|
+
* type Note = RouterOutputs['notes']['get']['data'];
|
|
5516
|
+
* type ListNotesInput = RouterInputs['notes']['list'];
|
|
5517
|
+
* ```
|
|
5518
|
+
*/
|
|
5519
|
+
|
|
5520
|
+
/**
|
|
5521
|
+
* Inferred output types for all routes.
|
|
5522
|
+
* @example
|
|
5523
|
+
* type Note = RouterOutputs['notes']['get']['data'];
|
|
5524
|
+
* type CommunityPost = RouterOutputs['community']['posts']['get']['data'];
|
|
5525
|
+
*/
|
|
5526
|
+
type RouterOutputs = InferRouterOutputs<V1Router>;
|
|
5527
|
+
/**
|
|
5528
|
+
* Inferred input types for all routes.
|
|
5529
|
+
* @example
|
|
5530
|
+
* type ListNotesInput = RouterInputs['notes']['list'];
|
|
5531
|
+
* type CreateNoteInput = RouterInputs['notes']['create'];
|
|
5532
|
+
*/
|
|
5533
|
+
type RouterInputs = InferRouterInputs<V1Router>;
|
|
5534
|
+
|
|
5535
|
+
export type { RouterInputs, RouterOutputs, V1Router };
|