@m1212e/rumble 0.20.0 → 0.21.3
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/out/client.cjs +2 -3
- package/out/client.cjs.map +1 -1
- package/out/client.d.cts.map +1 -1
- package/out/client.d.mts.map +1 -1
- package/out/client.mjs +2 -3
- package/out/client.mjs.map +1 -1
- package/out/generate-B4w-hX0K.mjs.map +1 -1
- package/out/generate-Ch5LEiBr.cjs.map +1 -1
- package/out/index.cjs +130 -51
- package/out/index.cjs.map +1 -1
- package/out/index.d.cts +21 -9
- package/out/index.d.cts.map +1 -1
- package/out/index.d.mts +21 -9
- package/out/index.d.mts.map +1 -1
- package/out/index.mjs +132 -53
- package/out/index.mjs.map +1 -1
- package/package.json +7 -4
package/out/index.d.cts
CHANGED
|
@@ -4162,11 +4162,15 @@ type ExtractPathParamsWithPattern<TPath extends string> = Pipe<TPath, [Strings.S
|
|
|
4162
4162
|
//#endregion
|
|
4163
4163
|
//#region lib/types/rumbleInput.d.ts
|
|
4164
4164
|
type CustomRumblePothosConfig = Omit<ConstructorParameters<typeof SchemaBuilder>[0], "smartSubscriptions" | "drizzle">;
|
|
4165
|
-
type RumbleInput<UserContext extends Record<string, any>, DB extends DrizzleInstance, RequestEvent extends Record<string, any>, Action extends string, PothosConfig extends CustomRumblePothosConfig> = {
|
|
4165
|
+
type RumbleInput<UserContext extends Record<string, any>, DB extends DrizzleInstance, RequestEvent extends Record<string, any>, Action extends string, PothosConfig extends CustomRumblePothosConfig, Schema extends Record<string, any> = Record<string, any>> = {
|
|
4166
4166
|
/**
|
|
4167
4167
|
* Your drizzle database instance
|
|
4168
4168
|
*/
|
|
4169
4169
|
db: DB;
|
|
4170
|
+
/**
|
|
4171
|
+
* The drizzle schema object (the same one passed to `defineRelations`).
|
|
4172
|
+
*/
|
|
4173
|
+
schema: Schema;
|
|
4170
4174
|
/**
|
|
4171
4175
|
* A function for providing context for each request based on the incoming HTTP Request.
|
|
4172
4176
|
* The type of the parameter equals the HTTPRequest type of your chosen server.
|
|
@@ -4243,7 +4247,9 @@ type RumbleInput<UserContext extends Record<string, any>, DB extends DrizzleInst
|
|
|
4243
4247
|
};
|
|
4244
4248
|
//#endregion
|
|
4245
4249
|
//#region lib/rumble.d.ts
|
|
4246
|
-
declare const rumble: <UserContext extends Record<string, any>, DB extends DrizzleInstance, RequestEvent extends Record<string, any>, PothosConfig extends CustomRumblePothosConfig, Action extends string = "read" | "update" | "delete">(rumbleInput: RumbleInput<UserContext, DB, RequestEvent, Action, PothosConfig>
|
|
4250
|
+
declare const rumble: <UserContext extends Record<string, any>, DB extends DrizzleInstance, RequestEvent extends Record<string, any>, PothosConfig extends CustomRumblePothosConfig, Schema extends Record<string, any>, Action extends string = "read" | "update" | "delete">(rumbleInput: RumbleInput<UserContext, DB, RequestEvent, Action, PothosConfig> & {
|
|
4251
|
+
schema: Schema;
|
|
4252
|
+
}) => {
|
|
4247
4253
|
/**
|
|
4248
4254
|
* The ability builder. Use it to declare whats allowed for each entity in your DB.
|
|
4249
4255
|
*
|
|
@@ -4720,17 +4726,19 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
|
|
|
4720
4726
|
* The other helpers use this helper internally so in most cases you do not have to
|
|
4721
4727
|
* call this helper directly, unless you need the reference to an enum type
|
|
4722
4728
|
*/
|
|
4723
|
-
enum_: <
|
|
4724
|
-
enum: enumObject,
|
|
4725
|
-
enumColumn,
|
|
4726
|
-
refName
|
|
4727
|
-
}: {
|
|
4729
|
+
enum_: <TsName extends keyof { [K in keyof Schema as Schema[K] extends import("drizzle-orm/pg-core").PgEnum<any> | import("drizzle-orm/pg-core").PgEnumObject<any> ? K : never]: Schema[K] } = never, EnumArg extends import("drizzle-orm/pg-core").PgEnum<any> | import("drizzle-orm/pg-core").PgEnumObject<any> = never, EnumColumn extends import("drizzle-orm").Column = never, RefName_2 extends string = string>(args: {
|
|
4728
4730
|
refName?: RefName_2 | undefined;
|
|
4729
4731
|
} & ({
|
|
4730
|
-
|
|
4732
|
+
tsName: TsName;
|
|
4733
|
+
enum?: never;
|
|
4734
|
+
enumColumn?: never;
|
|
4735
|
+
} | {
|
|
4736
|
+
enum: EnumArg;
|
|
4737
|
+
tsName?: never;
|
|
4731
4738
|
enumColumn?: never;
|
|
4732
4739
|
} | {
|
|
4733
4740
|
enumColumn: EnumColumn;
|
|
4741
|
+
tsName?: never;
|
|
4734
4742
|
enum?: never;
|
|
4735
4743
|
})) => PothosSchemaTypes.EnumRef<PothosSchemaTypes.ExtendDefaultTypes<{
|
|
4736
4744
|
Context: Awaited<UserContext & {
|
|
@@ -4778,7 +4786,11 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
|
|
|
4778
4786
|
DateWhereInputArgument: DateWhereInputArgument;
|
|
4779
4787
|
};
|
|
4780
4788
|
DefaultFieldNullability: false;
|
|
4781
|
-
}>,
|
|
4789
|
+
}>, [EnumColumn] extends [never] ? [EnumArg] extends [never] ? [TsName] extends [never] ? string : TsName extends keyof Schema ? (Schema[TsName] extends infer T_3 ? T_3 extends Schema[TsName] ? T_3 extends import("drizzle-orm/pg-core").PgEnum<infer V extends [string, ...string[]]> ? V : T_3 extends import("drizzle-orm/pg-core").PgEnumObject<infer O extends object> ? readonly (O[keyof O] & string)[] : readonly [string, ...string[]] : never : never)[number] : string : (EnumArg extends import("drizzle-orm/pg-core").PgEnum<infer V extends [string, ...string[]]> ? V : EnumArg extends import("drizzle-orm/pg-core").PgEnumObject<infer O extends object> ? readonly (O[keyof O] & string)[] : readonly [string, ...string[]])[number] : EnumColumn extends {
|
|
4790
|
+
enumValues: infer CV extends readonly [string, ...string[]];
|
|
4791
|
+
} ? CV[number] : string, [EnumColumn] extends [never] ? [EnumArg] extends [never] ? [TsName] extends [never] ? string : TsName extends keyof Schema ? (Schema[TsName] extends infer T_4 ? T_4 extends Schema[TsName] ? T_4 extends import("drizzle-orm/pg-core").PgEnum<infer V extends [string, ...string[]]> ? V : T_4 extends import("drizzle-orm/pg-core").PgEnumObject<infer O extends object> ? readonly (O[keyof O] & string)[] : readonly [string, ...string[]] : never : never)[number] : string : (EnumArg extends import("drizzle-orm/pg-core").PgEnum<infer V extends [string, ...string[]]> ? V : EnumArg extends import("drizzle-orm/pg-core").PgEnumObject<infer O extends object> ? readonly (O[keyof O] & string)[] : readonly [string, ...string[]])[number] : EnumColumn extends {
|
|
4792
|
+
enumValues: infer CV extends readonly [string, ...string[]];
|
|
4793
|
+
} ? CV[number] : string>;
|
|
4782
4794
|
/**
|
|
4783
4795
|
* Create a client to consume a rumble graphql api at the specified location.
|
|
4784
4796
|
* Requires GraphQL, does not work with the SOFA REST API.
|