@grantjs/schema 1.10.0 → 1.12.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grantjs/schema",
3
- "version": "1.10.0",
3
+ "version": "1.12.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,14 +23,14 @@
23
23
  },
24
24
  "devDependencies": {
25
25
  "@graphql-codegen/add": "^7.1.0",
26
- "@graphql-codegen/cli": "^7.4.1",
26
+ "@graphql-codegen/cli": "^7.4.3",
27
27
  "@graphql-codegen/typed-document-node": "^7.1.0",
28
28
  "@graphql-codegen/typescript": "^6.1.0",
29
- "@graphql-codegen/typescript-operations": "^6.1.6",
29
+ "@graphql-codegen/typescript-operations": "^6.1.7",
30
30
  "@graphql-codegen/typescript-resolvers": "^6.1.0",
31
31
  "@parcel/watcher": "^2.6.0",
32
- "@types/node": "^26.6.1",
33
- "eslint": "^10.10.0",
32
+ "@types/node": "^26.6.2",
33
+ "eslint": "^10.11.0",
34
34
  "graphql": "^16.14.2",
35
35
  "@typescript/native": "npm:typescript@^7.0.2",
36
36
  "typescript": "npm:@typescript/typescript6@^6.0.2",
@@ -122,6 +122,12 @@ export type RotateApiKeyMutation = {
122
122
  };
123
123
  };
124
124
 
125
+ export type AuthSignupPolicyQueryVariables = Exact<{ [key: string]: never }>;
126
+
127
+ export type AuthSignupPolicyQuery = {
128
+ authSignupPolicy: { publicSignupEnabled: boolean; bootstrapOpen: boolean };
129
+ };
130
+
125
131
  export type LoginMutationVariables = Exact<{
126
132
  input: Types.LoginInput;
127
133
  }>;
@@ -2690,6 +2696,32 @@ export const RotateApiKeyDocument = {
2690
2696
  },
2691
2697
  ],
2692
2698
  } as unknown as DocumentNode<RotateApiKeyMutation, RotateApiKeyMutationVariables>;
2699
+ export const AuthSignupPolicyDocument = {
2700
+ kind: 'Document',
2701
+ definitions: [
2702
+ {
2703
+ kind: 'OperationDefinition',
2704
+ operation: 'query',
2705
+ name: { kind: 'Name', value: 'AuthSignupPolicy' },
2706
+ selectionSet: {
2707
+ kind: 'SelectionSet',
2708
+ selections: [
2709
+ {
2710
+ kind: 'Field',
2711
+ name: { kind: 'Name', value: 'authSignupPolicy' },
2712
+ selectionSet: {
2713
+ kind: 'SelectionSet',
2714
+ selections: [
2715
+ { kind: 'Field', name: { kind: 'Name', value: 'publicSignupEnabled' } },
2716
+ { kind: 'Field', name: { kind: 'Name', value: 'bootstrapOpen' } },
2717
+ ],
2718
+ },
2719
+ },
2720
+ ],
2721
+ },
2722
+ },
2723
+ ],
2724
+ } as unknown as DocumentNode<AuthSignupPolicyQuery, AuthSignupPolicyQueryVariables>;
2693
2725
  export const LoginDocument = {
2694
2726
  kind: 'Document',
2695
2727
  definitions: [
@@ -226,6 +226,7 @@ export type ResolversTypes = ResolversObject<{
226
226
  AssignRolePermissionInput: Types.AssignRolePermissionInput;
227
227
  AssignUserPermissionInput: Types.AssignUserPermissionInput;
228
228
  Auditable: ResolverTypeWrapper<ResolversInterfaceTypes<ResolversTypes>['Auditable']>;
229
+ AuthSignupPolicy: ResolverTypeWrapper<Types.AuthSignupPolicy>;
229
230
  AuthenticationMethodExportData: ResolverTypeWrapper<Types.AuthenticationMethodExportData>;
230
231
  AuthorizationReason: Types.AuthorizationReason;
231
232
  AuthorizationResult: ResolverTypeWrapper<Types.AuthorizationResult>;
@@ -636,6 +637,7 @@ export type ResolversParentTypes = ResolversObject<{
636
637
  AssignRolePermissionInput: Types.AssignRolePermissionInput;
637
638
  AssignUserPermissionInput: Types.AssignUserPermissionInput;
638
639
  Auditable: ResolversInterfaceTypes<ResolversParentTypes>['Auditable'];
640
+ AuthSignupPolicy: Types.AuthSignupPolicy;
639
641
  AuthenticationMethodExportData: Types.AuthenticationMethodExportData;
640
642
  AuthorizationResult: Types.AuthorizationResult;
641
643
  Boolean: Types.Scalars['Boolean']['output'];
@@ -1181,6 +1183,15 @@ export type AuditableResolvers<
1181
1183
  >;
1182
1184
  }>;
1183
1185
 
1186
+ export type AuthSignupPolicyResolvers<
1187
+ ContextType = any,
1188
+ ParentType extends ResolversParentTypes['AuthSignupPolicy'] =
1189
+ ResolversParentTypes['AuthSignupPolicy'],
1190
+ > = ResolversObject<{
1191
+ bootstrapOpen?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>;
1192
+ publicSignupEnabled?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>;
1193
+ }>;
1194
+
1184
1195
  export type AuthenticationMethodExportDataResolvers<
1185
1196
  ContextType = any,
1186
1197
  ParentType extends ResolversParentTypes['AuthenticationMethodExportData'] =
@@ -2825,6 +2836,7 @@ export type QueryResolvers<
2825
2836
  ContextType,
2826
2837
  RequireFields<Types.QueryApiKeysArgs, 'scope'>
2827
2838
  >;
2839
+ authSignupPolicy?: Resolver<ResolversTypes['AuthSignupPolicy'], ParentType, ContextType>;
2828
2840
  groups?: Resolver<
2829
2841
  ResolversTypes['GroupPage'],
2830
2842
  ParentType,
@@ -3684,6 +3696,7 @@ export type Resolvers<ContextType = any> = ResolversObject<{
3684
3696
  ApiKey?: ApiKeyResolvers<ContextType>;
3685
3697
  ApiKeyPage?: ApiKeyPageResolvers<ContextType>;
3686
3698
  Auditable?: AuditableResolvers<ContextType>;
3699
+ AuthSignupPolicy?: AuthSignupPolicyResolvers<ContextType>;
3687
3700
  AuthenticationMethodExportData?: AuthenticationMethodExportDataResolvers<ContextType>;
3688
3701
  AuthorizationResult?: AuthorizationResultResolvers<ContextType>;
3689
3702
  ChangeMyPasswordResult?: ChangeMyPasswordResultResolvers<ContextType>;
@@ -392,6 +392,15 @@ export type Auditable = {
392
392
  updatedAt: Scalars['Date']['output'];
393
393
  };
394
394
 
395
+ /** Public flags the unauthenticated UI uses to hide or show platform registration. */
396
+ export type AuthSignupPolicy = {
397
+ __typename?: 'AuthSignupPolicy';
398
+ /** True when no human user exists yet (first-operator bootstrap). */
399
+ bootstrapOpen: Scalars['Boolean']['output'];
400
+ /** True when AUTH_PUBLIC_SIGNUP_ENABLED is on (open SaaS). */
401
+ publicSignupEnabled: Scalars['Boolean']['output'];
402
+ };
403
+
395
404
  export type AuthenticationMethodExportData = {
396
405
  __typename?: 'AuthenticationMethodExportData';
397
406
  createdAt: Scalars['Date']['output'];
@@ -2449,6 +2458,8 @@ export type Query = {
2449
2458
  __typename?: 'Query';
2450
2459
  _empty?: Maybe<Scalars['String']['output']>;
2451
2460
  apiKeys: ApiKeyPage;
2461
+ /** Public signup policy. No authentication required. */
2462
+ authSignupPolicy: AuthSignupPolicy;
2452
2463
  groups: GroupPage;
2453
2464
  invitation?: Maybe<OrganizationInvitation>;
2454
2465
  /** Evaluate authorization for the current session or API key token. */
@@ -0,0 +1,6 @@
1
+ query AuthSignupPolicy {
2
+ authSignupPolicy {
3
+ publicSignupEnabled
4
+ bootstrapOpen
5
+ }
6
+ }
@@ -0,0 +1,6 @@
1
+ extend type Query {
2
+ """
3
+ Public signup policy. No authentication required.
4
+ """
5
+ authSignupPolicy: AuthSignupPolicy!
6
+ }
@@ -0,0 +1,13 @@
1
+ """
2
+ Public flags the unauthenticated UI uses to hide or show platform registration.
3
+ """
4
+ type AuthSignupPolicy {
5
+ """
6
+ True when AUTH_PUBLIC_SIGNUP_ENABLED is on (open SaaS).
7
+ """
8
+ publicSignupEnabled: Boolean!
9
+ """
10
+ True when no human user exists yet (first-operator bootstrap).
11
+ """
12
+ bootstrapOpen: Boolean!
13
+ }
@@ -49,10 +49,11 @@ describe('operation documents', () => {
49
49
  // 132 after project branding: request/confirm/upload/clear for project and
50
50
  // project-app pictures (eight operation documents).
51
51
  // 135 after project OAuth connections: get/upsert/clear (three operation documents).
52
+ // 136 after closed-install: AuthSignupPolicyDocument (publicSignupEnabled, bootstrapOpen).
52
53
  // Updating this number is the point of the pin, not a nuisance: every change
53
54
  // to it should be a line in a commit message.
54
55
  it('finds every document under src/operations', () => {
55
- expect(files).toHaveLength(135);
56
+ expect(files).toHaveLength(136);
56
57
  });
57
58
 
58
59
  it.each(files.map((f) => [relative(process.cwd(), f), f]))('%s validates', (_label, file) => {