@m1212e/rumble 0.22.1 → 0.23.0

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/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { GraphQLError } from "graphql";
1
+ import { GraphQLError, GraphQLSchema } from "graphql";
2
2
  import { EnvelopArmorPlugin } from "@escape.tech/graphql-armor";
3
3
  import { Tracer } from "@opentelemetry/api";
4
4
  import { TracingWrapperOptions } from "@pothos/tracing-opentelemetry";
@@ -293,6 +293,39 @@ type JSONWhereInputArgument = {
293
293
  OR?: JSONWhereInputArgument[];
294
294
  NOT?: JSONWhereInputArgument;
295
295
  };
296
+ type BigIntWhereInputArgument = {
297
+ eq?: bigint | number;
298
+ ne?: bigint | number;
299
+ gt?: bigint | number;
300
+ gte?: bigint | number;
301
+ lt?: bigint | number;
302
+ lte?: bigint | number;
303
+ in?: (bigint | number)[];
304
+ notIn?: (bigint | number)[];
305
+ isNull?: boolean;
306
+ isNotNull?: boolean;
307
+ AND?: BigIntWhereInputArgument[];
308
+ OR?: BigIntWhereInputArgument[];
309
+ NOT?: BigIntWhereInputArgument;
310
+ };
311
+ type DateTimeWhereInputArgument = {
312
+ eq?: Date;
313
+ ne?: Date;
314
+ gt?: Date;
315
+ gte?: Date;
316
+ lt?: Date;
317
+ lte?: Date;
318
+ in?: Date[];
319
+ notIn?: Date[];
320
+ isNull?: boolean;
321
+ isNotNull?: boolean;
322
+ arrayOverlaps?: Date[];
323
+ arrayContained?: Date[];
324
+ arrayContains?: Date[];
325
+ AND?: DateTimeWhereInputArgument[];
326
+ OR?: DateTimeWhereInputArgument[];
327
+ NOT?: DateTimeWhereInputArgument;
328
+ };
296
329
  //#endregion
297
330
  //#region node_modules/hotscript/dist/internals/helpers.d.ts
298
331
  type Equal$1<a, b> = (<T>() => T extends a ? 1 : 2) extends (<T>() => T extends b ? 1 : 2) ? true : false;
@@ -4211,6 +4244,13 @@ type RouteWithTypesOpts<TServerContext, TMethod extends HTTPMethod, TPath extend
4211
4244
  type ExtractPathParamsWithPattern<TPath extends string> = Pipe<TPath, [Strings.Split<'/'>, Tuples.Filter<Strings.StartsWith<':'>>, Tuples.Map<Strings.Trim<':'>>, Tuples.ToUnion]>;
4212
4245
  //#endregion
4213
4246
  //#region lib/types/rumbleInput.d.ts
4247
+ interface RumbleLogger {
4248
+ info(obj: Record<string, unknown>, msg: string): void;
4249
+ warn(obj: Record<string, unknown>, msg: string): void;
4250
+ error(obj: Record<string, unknown>, msg: string): void;
4251
+ debug(obj: Record<string, unknown>, msg: string): void;
4252
+ child(bindings: Record<string, unknown>): RumbleLogger;
4253
+ }
4214
4254
  type CustomRumblePothosConfig = Omit<ConstructorParameters<typeof SchemaBuilder>[0], "smartSubscriptions" | "drizzle">;
4215
4255
  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>> = {
4216
4256
  /**
@@ -4226,14 +4266,6 @@ type RumbleInput<UserContext extends Record<string, any>, DB extends DrizzleInst
4226
4266
  * The type of the parameter equals the HTTPRequest type of your chosen server.
4227
4267
  */
4228
4268
  context?: ((event: RequestEvent) => Promise<UserContext> | UserContext) | undefined;
4229
- /**
4230
- * If you only want to disable query, mutation or subscription default objects, you can do so here
4231
- */
4232
- disableDefaultObjects?: {
4233
- mutation?: boolean;
4234
- subscription?: boolean;
4235
- query?: boolean;
4236
- };
4237
4269
  /**
4238
4270
  * The actions that are available
4239
4271
  */
@@ -4294,6 +4326,21 @@ type RumbleInput<UserContext extends Record<string, any>, DB extends DrizzleInst
4294
4326
  */
4295
4327
  options?: TracingWrapperOptions<unknown>;
4296
4328
  };
4329
+ /**
4330
+ * Structured logging for rumble internals. Pass a pino (or compatible) logger instance.
4331
+ * When enabled, rumble emits structured log entries for GraphQL operations, ability checks,
4332
+ * and runtime filter applications — queryable by level and field in Loki or similar.
4333
+ */
4334
+ logger?: {
4335
+ /**
4336
+ * Whether structured logging should be enabled.
4337
+ */
4338
+ enabled?: boolean;
4339
+ /**
4340
+ * The logger instance to use. Must satisfy the RumbleLogger interface (pino satisfies this).
4341
+ */
4342
+ logger: RumbleLogger;
4343
+ };
4297
4344
  };
4298
4345
  //#endregion
4299
4346
  //#region lib/rumble.d.ts
@@ -4400,7 +4447,15 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4400
4447
  };
4401
4448
  DateTime: {
4402
4449
  Input: Date;
4403
- Output: Date;
4450
+ Output: Date | string;
4451
+ };
4452
+ BigInt: {
4453
+ Input: bigint | number;
4454
+ Output: bigint | number | string;
4455
+ };
4456
+ Bytes: {
4457
+ Input: string;
4458
+ Output: string;
4404
4459
  };
4405
4460
  };
4406
4461
  Inputs: {
@@ -4408,6 +4463,8 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4408
4463
  FloatWhereInputArgument: NumberWhereInputArgument;
4409
4464
  StringWhereInputArgument: StringWhereInputArgument;
4410
4465
  DateWhereInputArgument: DateWhereInputArgument;
4466
+ DateTimeWhereInputArgument: DateTimeWhereInputArgument;
4467
+ BigIntWhereInputArgument: BigIntWhereInputArgument;
4411
4468
  BooleanWhereInputArgument: BooleanWhereInputArgument;
4412
4469
  IDWhereInputArgument: IDWhereInputArgument;
4413
4470
  JSONWhereInputArgument: JSONWhereInputArgument;
@@ -4532,7 +4589,15 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4532
4589
  };
4533
4590
  DateTime: {
4534
4591
  Input: Date;
4535
- Output: Date;
4592
+ Output: Date | string;
4593
+ };
4594
+ BigInt: {
4595
+ Input: bigint | number;
4596
+ Output: bigint | number | string;
4597
+ };
4598
+ Bytes: {
4599
+ Input: string;
4600
+ Output: string;
4536
4601
  };
4537
4602
  };
4538
4603
  Inputs: {
@@ -4540,6 +4605,8 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4540
4605
  FloatWhereInputArgument: NumberWhereInputArgument;
4541
4606
  StringWhereInputArgument: StringWhereInputArgument;
4542
4607
  DateWhereInputArgument: DateWhereInputArgument;
4608
+ DateTimeWhereInputArgument: DateTimeWhereInputArgument;
4609
+ BigIntWhereInputArgument: BigIntWhereInputArgument;
4543
4610
  BooleanWhereInputArgument: BooleanWhereInputArgument;
4544
4611
  IDWhereInputArgument: IDWhereInputArgument;
4545
4612
  JSONWhereInputArgument: JSONWhereInputArgument;
@@ -4598,7 +4665,15 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4598
4665
  };
4599
4666
  DateTime: {
4600
4667
  Input: Date;
4601
- Output: Date;
4668
+ Output: Date | string;
4669
+ };
4670
+ BigInt: {
4671
+ Input: bigint | number;
4672
+ Output: bigint | number | string;
4673
+ };
4674
+ Bytes: {
4675
+ Input: string;
4676
+ Output: string;
4602
4677
  };
4603
4678
  };
4604
4679
  Inputs: {
@@ -4606,6 +4681,8 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4606
4681
  FloatWhereInputArgument: NumberWhereInputArgument;
4607
4682
  StringWhereInputArgument: StringWhereInputArgument;
4608
4683
  DateWhereInputArgument: DateWhereInputArgument;
4684
+ DateTimeWhereInputArgument: DateTimeWhereInputArgument;
4685
+ BigIntWhereInputArgument: BigIntWhereInputArgument;
4609
4686
  BooleanWhereInputArgument: BooleanWhereInputArgument;
4610
4687
  IDWhereInputArgument: IDWhereInputArgument;
4611
4688
  JSONWhereInputArgument: JSONWhereInputArgument;
@@ -4683,7 +4760,15 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4683
4760
  };
4684
4761
  DateTime: {
4685
4762
  Input: Date;
4686
- Output: Date;
4763
+ Output: Date | string;
4764
+ };
4765
+ BigInt: {
4766
+ Input: bigint | number;
4767
+ Output: bigint | number | string;
4768
+ };
4769
+ Bytes: {
4770
+ Input: string;
4771
+ Output: string;
4687
4772
  };
4688
4773
  };
4689
4774
  Inputs: {
@@ -4691,6 +4776,8 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4691
4776
  FloatWhereInputArgument: NumberWhereInputArgument;
4692
4777
  StringWhereInputArgument: StringWhereInputArgument;
4693
4778
  DateWhereInputArgument: DateWhereInputArgument;
4779
+ DateTimeWhereInputArgument: DateTimeWhereInputArgument;
4780
+ BigIntWhereInputArgument: BigIntWhereInputArgument;
4694
4781
  BooleanWhereInputArgument: BooleanWhereInputArgument;
4695
4782
  IDWhereInputArgument: IDWhereInputArgument;
4696
4783
  JSONWhereInputArgument: JSONWhereInputArgument;
@@ -4790,7 +4877,15 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4790
4877
  };
4791
4878
  DateTime: {
4792
4879
  Input: Date;
4793
- Output: Date;
4880
+ Output: Date | string;
4881
+ };
4882
+ BigInt: {
4883
+ Input: bigint | number;
4884
+ Output: bigint | number | string;
4885
+ };
4886
+ Bytes: {
4887
+ Input: string;
4888
+ Output: string;
4794
4889
  };
4795
4890
  };
4796
4891
  Inputs: {
@@ -4798,6 +4893,8 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4798
4893
  FloatWhereInputArgument: NumberWhereInputArgument;
4799
4894
  StringWhereInputArgument: StringWhereInputArgument;
4800
4895
  DateWhereInputArgument: DateWhereInputArgument;
4896
+ DateTimeWhereInputArgument: DateTimeWhereInputArgument;
4897
+ BigIntWhereInputArgument: BigIntWhereInputArgument;
4801
4898
  BooleanWhereInputArgument: BooleanWhereInputArgument;
4802
4899
  IDWhereInputArgument: IDWhereInputArgument;
4803
4900
  JSONWhereInputArgument: JSONWhereInputArgument;
@@ -4846,7 +4943,7 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4846
4943
  * When calling this function, the schema will be built for the first time and cached for later usage. So you can call this function multiple times without performance issues.
4847
4944
  * After calling, you cannot adjust the schema via the schema builder
4848
4945
  */
4849
- buildSchema: () => import("graphql").GraphQLSchema;
4946
+ buildSchema: () => GraphQLSchema;
4850
4947
  };
4851
4948
  //#endregion
4852
4949
  //#region lib/types/rumbleError.d.ts