@krak-stack/registry 0.10.11 → 0.10.13

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.
@@ -178,14 +178,15 @@ var ColumnFilters = Schema2.declare(Schema2.is(ColumnFiltersArray), {
178
178
  toCodec: () => Schema2.link()(ColumnFiltersArray, SchemaTransformation.passthrough()),
179
179
  toCodecStringTree: () => Schema2.link()(Schema2.fromJsonString(ColumnFiltersArray), SchemaTransformation.passthrough())
180
180
  });
181
+ var DEFAULT_PAGE_SIZE = 100;
181
182
  var Query = Schema2.Struct({
182
183
  page: Schema2.optional(Schema2.Union([Schema2.Finite, Schema2.FiniteFromString]).check(Schema2.isInt(), Schema2.isGreaterThanOrEqualTo(0))).pipe(Schema2.decodeTo(Schema2.Int.check(Schema2.isGreaterThanOrEqualTo(0)), {
183
184
  decode: SchemaGetter.withDefault(Effect.succeed(0)),
184
185
  encode: SchemaGetter.transformOptional(Option.filter((page) => page !== 0))
185
186
  })),
186
187
  pageSize: Schema2.optional(Schema2.Union([Schema2.Finite, Schema2.FiniteFromString]).check(Schema2.isInt(), Schema2.isBetween({ minimum: 1, maximum: 100 }))).pipe(Schema2.decodeTo(Schema2.Int.check(Schema2.isBetween({ minimum: 1, maximum: 100 })), {
187
- decode: SchemaGetter.withDefault(Effect.succeed(20)),
188
- encode: SchemaGetter.transformOptional(Option.filter((pageSize) => pageSize !== 20))
188
+ decode: SchemaGetter.withDefault(Effect.succeed(DEFAULT_PAGE_SIZE)),
189
+ encode: SchemaGetter.transformOptional(Option.filter((pageSize) => pageSize !== DEFAULT_PAGE_SIZE))
189
190
  })),
190
191
  globalFilter: Schema2.optional(Schema2.String),
191
192
  sort: Schema2.optional(SortParams),
@@ -197,7 +198,7 @@ var Query = Schema2.Struct({
197
198
  examples: [
198
199
  {
199
200
  page: 0,
200
- pageSize: 20,
201
+ pageSize: DEFAULT_PAGE_SIZE,
201
202
  globalFilter: "housing",
202
203
  sort: [
203
204
  { id: "publicName", direction: "desc" },