graphile-settings 6.5.2 → 6.5.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.
Files changed (67) hide show
  1. package/esm/plugins/index.d.ts +1 -1
  2. package/esm/plugins/meta-schema.d.ts +3 -18
  3. package/esm/plugins/meta-schema.js +3 -19
  4. package/package.json +3 -2
  5. package/plugins/index.d.ts +1 -1
  6. package/plugins/meta-schema.d.ts +3 -18
  7. package/plugins/meta-schema.js +11 -16
  8. package/esm/plugins/meta-schema/cache.d.ts +0 -4
  9. package/esm/plugins/meta-schema/cache.js +0 -7
  10. package/esm/plugins/meta-schema/constraint-meta-builders.d.ts +0 -13
  11. package/esm/plugins/meta-schema/constraint-meta-builders.js +0 -51
  12. package/esm/plugins/meta-schema/encoding-meta-builders.d.ts +0 -2
  13. package/esm/plugins/meta-schema/encoding-meta-builders.js +0 -84
  14. package/esm/plugins/meta-schema/graphql-meta-field.d.ts +0 -4
  15. package/esm/plugins/meta-schema/graphql-meta-field.js +0 -314
  16. package/esm/plugins/meta-schema/inflection-utils.d.ts +0 -4
  17. package/esm/plugins/meta-schema/inflection-utils.js +0 -20
  18. package/esm/plugins/meta-schema/name-meta-builders.d.ts +0 -4
  19. package/esm/plugins/meta-schema/name-meta-builders.js +0 -38
  20. package/esm/plugins/meta-schema/plugin.d.ts +0 -2
  21. package/esm/plugins/meta-schema/plugin.js +0 -23
  22. package/esm/plugins/meta-schema/relation-meta-builders.d.ts +0 -8
  23. package/esm/plugins/meta-schema/relation-meta-builders.js +0 -119
  24. package/esm/plugins/meta-schema/scope-meta-builders.d.ts +0 -15
  25. package/esm/plugins/meta-schema/scope-meta-builders.js +0 -40
  26. package/esm/plugins/meta-schema/storage-search-meta-builders.d.ts +0 -29
  27. package/esm/plugins/meta-schema/storage-search-meta-builders.js +0 -180
  28. package/esm/plugins/meta-schema/table-meta-builder.d.ts +0 -2
  29. package/esm/plugins/meta-schema/table-meta-builder.js +0 -99
  30. package/esm/plugins/meta-schema/table-meta-context.d.ts +0 -13
  31. package/esm/plugins/meta-schema/table-meta-context.js +0 -11
  32. package/esm/plugins/meta-schema/table-resource-utils.d.ts +0 -12
  33. package/esm/plugins/meta-schema/table-resource-utils.js +0 -50
  34. package/esm/plugins/meta-schema/type-mappings.d.ts +0 -7
  35. package/esm/plugins/meta-schema/type-mappings.js +0 -100
  36. package/esm/plugins/meta-schema/types.d.ts +0 -325
  37. package/esm/plugins/meta-schema/types.js +0 -1
  38. package/plugins/meta-schema/cache.d.ts +0 -4
  39. package/plugins/meta-schema/cache.js +0 -12
  40. package/plugins/meta-schema/constraint-meta-builders.d.ts +0 -13
  41. package/plugins/meta-schema/constraint-meta-builders.js +0 -58
  42. package/plugins/meta-schema/encoding-meta-builders.d.ts +0 -2
  43. package/plugins/meta-schema/encoding-meta-builders.js +0 -87
  44. package/plugins/meta-schema/graphql-meta-field.d.ts +0 -4
  45. package/plugins/meta-schema/graphql-meta-field.js +0 -317
  46. package/plugins/meta-schema/inflection-utils.d.ts +0 -4
  47. package/plugins/meta-schema/inflection-utils.js +0 -25
  48. package/plugins/meta-schema/name-meta-builders.d.ts +0 -4
  49. package/plugins/meta-schema/name-meta-builders.js +0 -43
  50. package/plugins/meta-schema/plugin.d.ts +0 -2
  51. package/plugins/meta-schema/plugin.js +0 -26
  52. package/plugins/meta-schema/relation-meta-builders.d.ts +0 -8
  53. package/plugins/meta-schema/relation-meta-builders.js +0 -124
  54. package/plugins/meta-schema/scope-meta-builders.d.ts +0 -15
  55. package/plugins/meta-schema/scope-meta-builders.js +0 -43
  56. package/plugins/meta-schema/storage-search-meta-builders.d.ts +0 -29
  57. package/plugins/meta-schema/storage-search-meta-builders.js +0 -186
  58. package/plugins/meta-schema/table-meta-builder.d.ts +0 -2
  59. package/plugins/meta-schema/table-meta-builder.js +0 -102
  60. package/plugins/meta-schema/table-meta-context.d.ts +0 -13
  61. package/plugins/meta-schema/table-meta-context.js +0 -15
  62. package/plugins/meta-schema/table-resource-utils.d.ts +0 -12
  63. package/plugins/meta-schema/table-resource-utils.js +0 -60
  64. package/plugins/meta-schema/type-mappings.d.ts +0 -7
  65. package/plugins/meta-schema/type-mappings.js +0 -104
  66. package/plugins/meta-schema/types.d.ts +0 -325
  67. package/plugins/meta-schema/types.js +0 -2
@@ -1,325 +0,0 @@
1
- export interface TableMeta {
2
- name: string;
3
- schemaName: string;
4
- fields: FieldMeta[];
5
- indexes: IndexMeta[];
6
- constraints: ConstraintsMeta;
7
- foreignKeyConstraints: ForeignKeyConstraintMeta[];
8
- primaryKeyConstraints: PrimaryKeyConstraintMeta[];
9
- uniqueConstraints: UniqueConstraintMeta[];
10
- relations: RelationsMeta;
11
- inflection: InflectionMeta;
12
- query: QueryMeta;
13
- storage: StorageMeta | null;
14
- search: SearchMeta | null;
15
- i18n: I18nMeta | null;
16
- realtime: RealtimeMeta | null;
17
- scope: ScopeMeta | null;
18
- }
19
- /** Coarse provisioning tier a table's scope belongs to. */
20
- export type ScopeTier = 'global' | 'database' | 'entity';
21
- export interface ScopeMeta {
22
- /** The provisioning scope, e.g. 'platform', 'app', 'database', 'org', 'user' */
23
- scope: string;
24
- /** Coarse bucket: global (platform/app), database, or entity */
25
- tier: ScopeTier;
26
- /** Inflected scope key column (e.g. 'databaseId', 'orgId'), or null for global tiers */
27
- keyColumn: string | null;
28
- /** SQL name of the entity table for entity scopes, else null */
29
- entityTable: string | null;
30
- /** Provenance of the scope metadata. Always the @scope smart tag. */
31
- source: 'smartTag';
32
- }
33
- export interface StorageMeta {
34
- /** Whether this table is tagged as a storage files table */
35
- isFilesTable: boolean;
36
- /** Whether this table is tagged as a storage buckets table */
37
- isBucketsTable: boolean;
38
- }
39
- export interface SearchColumnMeta {
40
- /** Column name (camelCase inflected) */
41
- name: string;
42
- /** Search algorithm: 'tsvector', 'bm25', 'trgm', 'vector' */
43
- algorithm: string;
44
- }
45
- export interface SearchMeta {
46
- /** Which search algorithms are active on this table */
47
- algorithms: string[];
48
- /** Searchable columns with their algorithm */
49
- columns: SearchColumnMeta[];
50
- /** Whether unifiedSearch composite filter is available */
51
- hasUnifiedSearch: boolean;
52
- /** Per-table search config from @searchConfig smart tag */
53
- config: SearchConfigMeta | null;
54
- }
55
- export interface SearchConfigMeta {
56
- /** Per-adapter score weights */
57
- weights: Record<string, number> | null;
58
- /** Whether recency boosting is enabled */
59
- boostRecent: boolean;
60
- /** Field used for recency decay */
61
- boostRecencyField: string | null;
62
- /** Exponential decay factor per day */
63
- boostRecencyDecay: number | null;
64
- }
65
- export interface I18nFieldMeta {
66
- /** Inflected GraphQL field name */
67
- name: string;
68
- /** PostgreSQL column type (text, citext) */
69
- type: string;
70
- }
71
- export interface I18nMeta {
72
- /** Name of the translation table */
73
- translationTable: string;
74
- /** Fields that are translatable */
75
- translatableFields: I18nFieldMeta[];
76
- }
77
- export interface RealtimeMeta {
78
- /** The generated subscription field name (e.g. onPostChanged) */
79
- subscriptionFieldName: string;
80
- }
81
- export interface EnumMeta {
82
- /** The PostgreSQL enum type name */
83
- name: string;
84
- /** Allowed values for this enum */
85
- values: string[];
86
- }
87
- export interface FieldMeta {
88
- name: string;
89
- type: TypeMeta;
90
- isNotNull: boolean;
91
- hasDefault: boolean;
92
- isPrimaryKey: boolean;
93
- isForeignKey: boolean;
94
- description: string | null;
95
- enumValues: EnumMeta | null;
96
- }
97
- export interface TypeMeta {
98
- pgType: string;
99
- gqlType: string;
100
- isArray: boolean;
101
- isNotNull?: boolean;
102
- hasDefault?: boolean;
103
- subtype?: string | null;
104
- /**
105
- * How the client must serialize/parse this scalar. `null` for plain scalars
106
- * (String/Int/Float/Boolean/JSON/enum) whose wire format is obvious from
107
- * `gqlType` — populated only for scalars introspection can't fully describe.
108
- */
109
- encoding?: ScalarEncodingMeta | null;
110
- }
111
- /** The machine kind a scalar marshals as on the client. */
112
- export type ScalarEncodingKind = 'bigint' | 'datetime' | 'date' | 'time' | 'interval' | 'uuid' | 'geojson' | 'point' | 'inet' | 'ltree' | 'vector' | 'bytea' | 'composite';
113
- export interface ScalarEncodingMeta {
114
- /** Deterministic kind derived from the underlying (unwrapped) codec. */
115
- kind: ScalarEncodingKind;
116
- /** For 'vector': element scalar (e.g. 'float'), else null. */
117
- elementType?: string | null;
118
- /** For 'vector': declared length from typmod, else null. */
119
- dimensions?: number | null;
120
- /** For 'geojson': geometry subtype (Point/LineString/Polygon/…), else null. */
121
- geometrySubtype?: string | null;
122
- /** For 'geojson': spatial reference id, else null. */
123
- srid?: number | null;
124
- /** For 'ltree': values are dot-separated path strings ('a.b.c'). */
125
- dotPath?: boolean;
126
- /** For 'composite': nested attribute encodings. */
127
- fields?: {
128
- name: string;
129
- type: TypeMeta;
130
- }[] | null;
131
- }
132
- export interface IndexMeta {
133
- name: string;
134
- isUnique: boolean;
135
- isPrimary: boolean;
136
- columns: string[];
137
- fields: FieldMeta[];
138
- }
139
- export interface ConstraintsMeta {
140
- primaryKey: PrimaryKeyConstraintMeta | null;
141
- unique: UniqueConstraintMeta[];
142
- foreignKey: ForeignKeyConstraintMeta[];
143
- }
144
- export interface PrimaryKeyConstraintMeta {
145
- name: string;
146
- fields: FieldMeta[];
147
- }
148
- export interface UniqueConstraintMeta {
149
- name: string;
150
- fields: FieldMeta[];
151
- }
152
- export interface ForeignKeyConstraintMeta {
153
- name: string;
154
- fields: FieldMeta[];
155
- referencedTable: string;
156
- referencedFields: string[];
157
- refFields: FieldMeta[];
158
- refTable: {
159
- name: string;
160
- };
161
- }
162
- export interface RelationsMeta {
163
- belongsTo: BelongsToRelation[];
164
- has: HasRelation[];
165
- hasOne: HasRelation[];
166
- hasMany: HasRelation[];
167
- manyToMany: ManyToManyRelation[];
168
- }
169
- export interface BelongsToRelation {
170
- fieldName: string | null;
171
- isUnique: boolean;
172
- type: string | null;
173
- keys: FieldMeta[];
174
- references: {
175
- name: string;
176
- };
177
- }
178
- export interface HasRelation {
179
- fieldName: string | null;
180
- isUnique: boolean;
181
- type: string | null;
182
- keys: FieldMeta[];
183
- referencedBy: {
184
- name: string;
185
- };
186
- }
187
- export interface ManyToManyRelation {
188
- fieldName: string | null;
189
- type: string | null;
190
- junctionTable: {
191
- name: string;
192
- };
193
- junctionLeftConstraint: ForeignKeyConstraintMeta;
194
- junctionLeftKeyAttributes: FieldMeta[];
195
- junctionRightConstraint: ForeignKeyConstraintMeta;
196
- junctionRightKeyAttributes: FieldMeta[];
197
- leftKeyAttributes: FieldMeta[];
198
- rightKeyAttributes: FieldMeta[];
199
- rightTable: {
200
- name: string;
201
- };
202
- }
203
- export interface InflectionMeta {
204
- tableType: string;
205
- allRows: string;
206
- connection: string;
207
- edge: string;
208
- filterType: string | null;
209
- orderByType: string;
210
- conditionType: string;
211
- patchType: string | null;
212
- createInputType: string;
213
- createPayloadType: string;
214
- updatePayloadType: string | null;
215
- deletePayloadType: string;
216
- }
217
- export interface QueryMeta {
218
- all: string;
219
- one: string | null;
220
- create: string | null;
221
- update: string | null;
222
- delete: string | null;
223
- }
224
- export interface PgCodec {
225
- name: string;
226
- attributes?: Record<string, PgAttribute>;
227
- arrayOfCodec?: PgCodec | null;
228
- domainOfCodec?: PgCodec | null;
229
- isAnonymous?: boolean;
230
- extensions?: {
231
- pg?: {
232
- schemaName?: string;
233
- };
234
- };
235
- }
236
- export interface PgAttributeExtensions extends Record<string, unknown> {
237
- geometrySubtype?: string | null;
238
- geometrySrid?: number | null;
239
- vectorDimensions?: number | null;
240
- }
241
- export interface PgAttribute {
242
- codec?: PgCodec | null;
243
- notNull?: boolean;
244
- hasDefault?: boolean;
245
- description?: string | null;
246
- extensions?: PgAttributeExtensions | null;
247
- }
248
- export interface PgUnique {
249
- attributes: string[];
250
- isPrimary?: boolean;
251
- tags?: {
252
- name?: string;
253
- };
254
- }
255
- export interface PgRelation {
256
- isReferencee?: boolean;
257
- localAttributes?: string[];
258
- remoteAttributes?: string[];
259
- remoteResource?: PgTableResource | null;
260
- }
261
- export interface PgTableResource {
262
- codec?: PgCodec;
263
- uniques?: PgUnique[];
264
- relations?: Record<string, PgRelation>;
265
- parameters?: unknown;
266
- isVirtual?: boolean;
267
- isUnique?: boolean;
268
- getRelation?: (relationName: string) => PgRelation | undefined;
269
- getRelations?: () => Record<string, PgRelation>;
270
- }
271
- export interface PgManyToManyRelationDetails {
272
- leftTable: PgTableResource;
273
- leftRelationName: string;
274
- junctionTable: PgTableResource;
275
- rightRelationName: string;
276
- rightTable: PgTableResource;
277
- allowsMultipleEdgesToNode?: boolean;
278
- }
279
- export interface MetaInflection {
280
- tableType: (codec: PgCodec) => string;
281
- _attributeName?: (input: {
282
- attributeName: string;
283
- codec: PgCodec;
284
- }) => string;
285
- camelCase?: (value: string) => string;
286
- _manyToManyRelation?: (details: PgManyToManyRelationDetails) => string | null | undefined;
287
- allRows?: (resource: PgTableResource) => string | null | undefined;
288
- connectionType?: (tableType: string) => string | null | undefined;
289
- edgeType?: (tableType: string) => string | null | undefined;
290
- filterType?: (tableType: string) => string | null | undefined;
291
- orderByType?: (tableType: string) => string | null | undefined;
292
- conditionType?: (tableType: string) => string | null | undefined;
293
- patchType?: (tableType: string) => string | null | undefined;
294
- createInputType?: (resource: PgTableResource) => string | null | undefined;
295
- createPayloadType?: (resource: PgTableResource) => string | null | undefined;
296
- updatePayloadType?: (resource: PgTableResource) => string | null | undefined;
297
- deletePayloadType?: (resource: PgTableResource) => string | null | undefined;
298
- tableFieldName?: (resource: PgTableResource) => string | null | undefined;
299
- createField?: (resource: PgTableResource) => string | null | undefined;
300
- updateByKeys?: (resource: PgTableResource) => string | null | undefined;
301
- deleteByKeys?: (resource: PgTableResource) => string | null | undefined;
302
- }
303
- export interface GqlTypeResolverBuild {
304
- hasGraphQLTypeForPgCodec?: (codec: PgCodec, mode?: 'output' | 'input' | string) => boolean;
305
- getGraphQLTypeNameByPgCodec?: (codec: PgCodec, mode?: 'output' | 'input' | string) => string | null | undefined;
306
- }
307
- export interface MetaBuild extends GqlTypeResolverBuild {
308
- input: {
309
- pgRegistry: {
310
- pgResources: Record<string, PgTableResource>;
311
- };
312
- };
313
- inflection: MetaInflection;
314
- options?: {
315
- pgSchemas?: string[];
316
- [key: string]: unknown;
317
- };
318
- pgManyToManyRealtionshipsByResource?: Map<unknown, unknown>;
319
- }
320
- export interface PgCodecExtensions {
321
- pg?: {
322
- schemaName?: string;
323
- };
324
- tags?: Record<string, unknown>;
325
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });