@m1212e/rumble 0.23.18 → 0.23.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/out/index.d.cts CHANGED
@@ -183,6 +183,36 @@ type FilterPrefetchCombo<Context, FilteredEntityType, PrefetchReturnType = never
183
183
  prefetch?: Prefetch<Context, PrefetchReturnType>;
184
184
  };
185
185
  //#endregion
186
+ //#region lib/scalars/address.d.ts
187
+ /**
188
+ * The shape of a postal address, modeled after the OIDC `address` claim
189
+ * (https://openid.net/specs/openid-connect-core-1_0.html#AddressClaim) and schema.org's
190
+ * `PostalAddress`.
191
+ */
192
+ type AddressShape = {
193
+ /** The street address, which may be multiple lines separated by newlines. */streetAddress?: string | null; /** City or town. */
194
+ locality?: string | null; /** State, province, prefecture or region. */
195
+ region?: string | null; /** Postal or zip code. */
196
+ postalCode?: string | null; /** ISO 3166-1 alpha-2 country code. */
197
+ countryCode?: string | null;
198
+ };
199
+ /**
200
+ * AddressInput's shape differs from AddressShape in that `countryCode` and `streetAddress` are
201
+ * required. `countryCode`: without a country there is nothing for the validator to check
202
+ * requiredness/format/region against, so a country-less "address" can't be verified as valid
203
+ * for anywhere. `streetAddress`: checked against every one of the 252 countries in
204
+ * libaddressinput's dataset — it is the one field required in literally all of them (unlike
205
+ * e.g. city, which 13 countries including Japan and Singapore don't require, or state/zip,
206
+ * required in barely a sixth to a third of countries) — so it's safe to require unconditionally
207
+ * rather than only per-country. The remaining fields stay optional since their requiredness
208
+ * genuinely varies by country; that's enforced dynamically by `addressValidationSchema` instead
209
+ * of statically here.
210
+ */
211
+ type AddressInputShape = Omit<AddressShape, "countryCode" | "streetAddress"> & {
212
+ countryCode: string;
213
+ streetAddress: string;
214
+ };
215
+ //#endregion
186
216
  //#region lib/args/whereArgsImplementer.d.ts
187
217
  type NumberWhereInputArgument = {
188
218
  eq?: number;
@@ -4355,7 +4385,7 @@ interface RumbleLogger {
4355
4385
  debug(obj: Record<string, unknown>, msg: string): void;
4356
4386
  child(bindings: Record<string, unknown>): RumbleLogger;
4357
4387
  }
4358
- type CustomRumblePothosConfig = Omit<ConstructorParameters<typeof SchemaBuilder>[0], "smartSubscriptions" | "drizzle">;
4388
+ type CustomRumblePothosConfig = Omit<ConstructorParameters<typeof SchemaBuilder>[0], "smartSubscriptions" | "drizzle" | "validation">;
4359
4389
  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>> = {
4360
4390
  /**
4361
4391
  * Your drizzle database instance
@@ -4502,6 +4532,11 @@ type RumbleInput<UserContext extends Record<string, any>, DB extends DrizzleInst
4502
4532
  */
4503
4533
  includeVariables?: boolean | ((variables: Record<string, unknown>) => Record<string, unknown> | undefined);
4504
4534
  };
4535
+ /**
4536
+ * Configures `@pothos/plugin-validation`, which rumble installs by default to power
4537
+ * `Address`/`AddressInput`'s country-aware validation (see `implementDefaultAddressTypes`).
4538
+ */
4539
+ validation?: NonNullable<ConstructorParameters<typeof SchemaBuilder>[0]>["validation"];
4505
4540
  };
4506
4541
  //#endregion
4507
4542
  //#region lib/rumble.d.ts
@@ -4597,6 +4632,9 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4597
4632
  } };
4598
4633
  }>;
4599
4634
  DrizzleRelations: DB["_"]["relations"];
4635
+ Objects: {
4636
+ Address: AddressShape;
4637
+ };
4600
4638
  Scalars: {
4601
4639
  JSON: {
4602
4640
  Input: unknown;
@@ -4618,6 +4656,22 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4618
4656
  Input: string;
4619
4657
  Output: string;
4620
4658
  };
4659
+ EmailAddress: {
4660
+ Input: string;
4661
+ Output: string;
4662
+ };
4663
+ PhoneNumber: {
4664
+ Input: import("libphonenumber-js").PhoneNumber;
4665
+ Output: import("libphonenumber-js").PhoneNumber | string;
4666
+ };
4667
+ Locale: {
4668
+ Input: string;
4669
+ Output: string;
4670
+ };
4671
+ PersonName: {
4672
+ Input: string;
4673
+ Output: string;
4674
+ };
4621
4675
  };
4622
4676
  Inputs: {
4623
4677
  IntWhereInputArgument: NumberWhereInputArgument;
@@ -4629,6 +4683,7 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4629
4683
  BooleanWhereInputArgument: BooleanWhereInputArgument;
4630
4684
  IDWhereInputArgument: IDWhereInputArgument;
4631
4685
  JSONWhereInputArgument: JSONWhereInputArgument;
4686
+ AddressInput: AddressInputShape;
4632
4687
  };
4633
4688
  DefaultFieldNullability: false;
4634
4689
  }>>;
@@ -4739,6 +4794,9 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4739
4794
  } };
4740
4795
  }>;
4741
4796
  DrizzleRelations: DB["_"]["relations"];
4797
+ Objects: {
4798
+ Address: AddressShape;
4799
+ };
4742
4800
  Scalars: {
4743
4801
  JSON: {
4744
4802
  Input: unknown;
@@ -4760,6 +4818,22 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4760
4818
  Input: string;
4761
4819
  Output: string;
4762
4820
  };
4821
+ EmailAddress: {
4822
+ Input: string;
4823
+ Output: string;
4824
+ };
4825
+ PhoneNumber: {
4826
+ Input: import("libphonenumber-js").PhoneNumber;
4827
+ Output: import("libphonenumber-js").PhoneNumber | string;
4828
+ };
4829
+ Locale: {
4830
+ Input: string;
4831
+ Output: string;
4832
+ };
4833
+ PersonName: {
4834
+ Input: string;
4835
+ Output: string;
4836
+ };
4763
4837
  };
4764
4838
  Inputs: {
4765
4839
  IntWhereInputArgument: NumberWhereInputArgument;
@@ -4771,6 +4845,7 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4771
4845
  BooleanWhereInputArgument: BooleanWhereInputArgument;
4772
4846
  IDWhereInputArgument: IDWhereInputArgument;
4773
4847
  JSONWhereInputArgument: JSONWhereInputArgument;
4848
+ AddressInput: AddressInputShape;
4774
4849
  };
4775
4850
  DefaultFieldNullability: false;
4776
4851
  }>, (DB["_"]["relations"] & {})[TableName], DrizzleTableValueType<DB, TableName>, { [Key in keyof Extract<(DB["_"]["relations"] & {})[TableName]["table"], {
@@ -4815,6 +4890,9 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4815
4890
  } };
4816
4891
  }>;
4817
4892
  DrizzleRelations: DB["_"]["relations"];
4893
+ Objects: {
4894
+ Address: AddressShape;
4895
+ };
4818
4896
  Scalars: {
4819
4897
  JSON: {
4820
4898
  Input: unknown;
@@ -4836,6 +4914,22 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4836
4914
  Input: string;
4837
4915
  Output: string;
4838
4916
  };
4917
+ EmailAddress: {
4918
+ Input: string;
4919
+ Output: string;
4920
+ };
4921
+ PhoneNumber: {
4922
+ Input: import("libphonenumber-js").PhoneNumber;
4923
+ Output: import("libphonenumber-js").PhoneNumber | string;
4924
+ };
4925
+ Locale: {
4926
+ Input: string;
4927
+ Output: string;
4928
+ };
4929
+ PersonName: {
4930
+ Input: string;
4931
+ Output: string;
4932
+ };
4839
4933
  };
4840
4934
  Inputs: {
4841
4935
  IntWhereInputArgument: NumberWhereInputArgument;
@@ -4847,6 +4941,7 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4847
4941
  BooleanWhereInputArgument: BooleanWhereInputArgument;
4848
4942
  IDWhereInputArgument: IDWhereInputArgument;
4849
4943
  JSONWhereInputArgument: JSONWhereInputArgument;
4944
+ AddressInput: AddressInputShape;
4850
4945
  };
4851
4946
  DefaultFieldNullability: false;
4852
4947
  }>, TableName, import("drizzle-orm").BuildQueryResult<DB["_"]["relations"] & {}, (DB["_"]["relations"] & {})[TableName], true extends true | import("drizzle-orm").DBQueryConfig<"one", DB["_"]["relations"] & {}, (DB["_"]["relations"] & {})[TableName]> ? true : (true | import("drizzle-orm").DBQueryConfig<"one", DB["_"]["relations"] & {}, (DB["_"]["relations"] & {})[TableName]>) & {
@@ -4910,6 +5005,9 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4910
5005
  } };
4911
5006
  }>;
4912
5007
  DrizzleRelations: DB["_"]["relations"];
5008
+ Objects: {
5009
+ Address: AddressShape;
5010
+ };
4913
5011
  Scalars: {
4914
5012
  JSON: {
4915
5013
  Input: unknown;
@@ -4931,6 +5029,22 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4931
5029
  Input: string;
4932
5030
  Output: string;
4933
5031
  };
5032
+ EmailAddress: {
5033
+ Input: string;
5034
+ Output: string;
5035
+ };
5036
+ PhoneNumber: {
5037
+ Input: import("libphonenumber-js").PhoneNumber;
5038
+ Output: import("libphonenumber-js").PhoneNumber | string;
5039
+ };
5040
+ Locale: {
5041
+ Input: string;
5042
+ Output: string;
5043
+ };
5044
+ PersonName: {
5045
+ Input: string;
5046
+ Output: string;
5047
+ };
4934
5048
  };
4935
5049
  Inputs: {
4936
5050
  IntWhereInputArgument: NumberWhereInputArgument;
@@ -4942,6 +5056,7 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4942
5056
  BooleanWhereInputArgument: BooleanWhereInputArgument;
4943
5057
  IDWhereInputArgument: IDWhereInputArgument;
4944
5058
  JSONWhereInputArgument: JSONWhereInputArgument;
5059
+ AddressInput: AddressInputShape;
4945
5060
  };
4946
5061
  DefaultFieldNullability: false;
4947
5062
  }>, {
@@ -5039,6 +5154,9 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
5039
5154
  } };
5040
5155
  }>;
5041
5156
  DrizzleRelations: DB["_"]["relations"];
5157
+ Objects: {
5158
+ Address: AddressShape;
5159
+ };
5042
5160
  Scalars: {
5043
5161
  JSON: {
5044
5162
  Input: unknown;
@@ -5060,6 +5178,22 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
5060
5178
  Input: string;
5061
5179
  Output: string;
5062
5180
  };
5181
+ EmailAddress: {
5182
+ Input: string;
5183
+ Output: string;
5184
+ };
5185
+ PhoneNumber: {
5186
+ Input: import("libphonenumber-js").PhoneNumber;
5187
+ Output: import("libphonenumber-js").PhoneNumber | string;
5188
+ };
5189
+ Locale: {
5190
+ Input: string;
5191
+ Output: string;
5192
+ };
5193
+ PersonName: {
5194
+ Input: string;
5195
+ Output: string;
5196
+ };
5063
5197
  };
5064
5198
  Inputs: {
5065
5199
  IntWhereInputArgument: NumberWhereInputArgument;
@@ -5071,6 +5205,7 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
5071
5205
  BooleanWhereInputArgument: BooleanWhereInputArgument;
5072
5206
  IDWhereInputArgument: IDWhereInputArgument;
5073
5207
  JSONWhereInputArgument: JSONWhereInputArgument;
5208
+ AddressInput: AddressInputShape;
5074
5209
  };
5075
5210
  DefaultFieldNullability: false;
5076
5211
  }>, [EnumColumn] extends [never] ? [EnumArg] extends [never] ? [TsName] extends [never] ? string : TsName extends keyof Schema ? (Schema[TsName] extends infer T ? T extends Schema[TsName] ? T extends import("drizzle-orm/pg-core").PgEnum<infer V extends [string, ...string[]]> ? V : T 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 {