@grantjs/schema 1.7.0 → 1.9.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.
Files changed (70) hide show
  1. package/package.json +1 -1
  2. package/src/generated/graphql.ts +1080 -30
  3. package/src/generated/resolvers.ts +185 -0
  4. package/src/generated/schema-types.ts +385 -1
  5. package/src/index.ts +9 -6
  6. package/src/operations/me/my-user-authentication-methods.graphql +1 -0
  7. package/src/operations/project-apps/clear-project-app-picture.graphql +7 -0
  8. package/src/operations/project-apps/get-project-apps.graphql +7 -0
  9. package/src/operations/project-apps/update-project-app.graphql +7 -0
  10. package/src/operations/project-apps/upload-project-app-picture.graphql +6 -0
  11. package/src/operations/projects/clear-project-picture.graphql +7 -0
  12. package/src/operations/projects/getProjects.graphql +3 -0
  13. package/src/operations/projects/updateProject.graphql +3 -0
  14. package/src/operations/projects/upload-project-picture.graphql +6 -0
  15. package/src/operations/uploads/confirm-my-project-membership-picture-upload.graphql +8 -0
  16. package/src/operations/uploads/confirm-my-user-picture-upload.graphql +6 -0
  17. package/src/operations/uploads/confirm-organization-picture-upload.graphql +6 -0
  18. package/src/operations/uploads/confirm-project-app-picture-upload.graphql +6 -0
  19. package/src/operations/uploads/confirm-project-picture-upload.graphql +6 -0
  20. package/src/operations/uploads/confirm-user-picture-upload.graphql +6 -0
  21. package/src/operations/uploads/request-my-project-membership-picture-upload-url.graphql +13 -0
  22. package/src/operations/uploads/request-my-user-picture-upload-url.graphql +11 -0
  23. package/src/operations/uploads/request-organization-picture-upload-url.graphql +11 -0
  24. package/src/operations/uploads/request-project-app-picture-upload-url.graphql +11 -0
  25. package/src/operations/uploads/request-project-picture-upload-url.graphql +11 -0
  26. package/src/operations/uploads/request-user-picture-upload-url.graphql +11 -0
  27. package/src/project-oauth.types.test.ts +18 -0
  28. package/src/project-oauth.types.ts +22 -0
  29. package/src/schema/me/inputs/change-my-password.graphql +4 -1
  30. package/src/schema/me/inputs/confirm-my-project-membership-picture-upload.graphql +4 -0
  31. package/src/schema/me/inputs/confirm-my-user-picture-upload.graphql +8 -0
  32. package/src/schema/me/inputs/request-my-project-membership-picture-upload-url.graphql +11 -0
  33. package/src/schema/me/inputs/request-my-user-picture-upload-url.graphql +11 -0
  34. package/src/schema/me/mutations/confirm-my-project-membership-picture-upload.graphql +10 -0
  35. package/src/schema/me/mutations/confirm-my-user-picture-upload.graphql +9 -0
  36. package/src/schema/me/mutations/request-my-project-membership-picture-upload-url.graphql +13 -0
  37. package/src/schema/me/mutations/request-my-user-picture-upload-url.graphql +12 -0
  38. package/src/schema/organizations/inputs/confirm-organization-picture-upload.graphql +9 -0
  39. package/src/schema/organizations/inputs/request-organization-picture-upload-url.graphql +12 -0
  40. package/src/schema/organizations/mutations/confirm-organization-picture-upload.graphql +10 -0
  41. package/src/schema/organizations/mutations/request-organization-picture-upload-url.graphql +12 -0
  42. package/src/schema/project-apps/inputs/clear-project-app-picture.graphql +4 -0
  43. package/src/schema/project-apps/inputs/confirm-project-app-picture-upload.graphql +9 -0
  44. package/src/schema/project-apps/inputs/request-project-app-picture-upload-url.graphql +12 -0
  45. package/src/schema/project-apps/inputs/update-project-app.graphql +12 -0
  46. package/src/schema/project-apps/inputs/upload-project-app-picture.graphql +7 -0
  47. package/src/schema/project-apps/mutations/clear-project-app-picture.graphql +6 -0
  48. package/src/schema/project-apps/mutations/confirm-project-app-picture-upload.graphql +10 -0
  49. package/src/schema/project-apps/mutations/request-project-app-picture-upload-url.graphql +12 -0
  50. package/src/schema/project-apps/mutations/upload-project-app-picture.graphql +6 -0
  51. package/src/schema/project-apps/types/project-app.graphql +13 -0
  52. package/src/schema/project-apps/types/upload-project-app-picture-result.graphql +4 -0
  53. package/src/schema/projects/inputs/clear-project-picture.graphql +4 -0
  54. package/src/schema/projects/inputs/confirm-project-picture-upload.graphql +9 -0
  55. package/src/schema/projects/inputs/request-project-picture-upload-url.graphql +12 -0
  56. package/src/schema/projects/inputs/update-project.graphql +8 -0
  57. package/src/schema/projects/inputs/upload-project-picture.graphql +7 -0
  58. package/src/schema/projects/mutations/clear-project-picture.graphql +6 -0
  59. package/src/schema/projects/mutations/confirm-project-picture-upload.graphql +8 -0
  60. package/src/schema/projects/mutations/request-project-picture-upload-url.graphql +12 -0
  61. package/src/schema/projects/mutations/upload-project-picture.graphql +6 -0
  62. package/src/schema/projects/types/project.graphql +9 -0
  63. package/src/schema/projects/types/upload-project-picture-result.graphql +4 -0
  64. package/src/schema/uploads/types/upload-url.graphql +33 -0
  65. package/src/schema/user-authentication-method/types/user-authentication-method.graphql +4 -0
  66. package/src/schema/users/inputs/confirm-user-picture-upload.graphql +5 -0
  67. package/src/schema/users/inputs/request-user-picture-upload-url.graphql +12 -0
  68. package/src/schema/users/mutations/confirm-user-picture-upload.graphql +8 -0
  69. package/src/schema/users/mutations/request-user-picture-upload-url.graphql +12 -0
  70. package/src/sdl-contract.test.ts +11 -2
@@ -472,7 +472,8 @@ export enum CdmOnConflict {
472
472
 
473
473
  export type ChangeMyPasswordInput = {
474
474
  confirmPassword: Scalars['String']['input'];
475
- currentPassword: Scalars['String']['input'];
475
+ /** Required when a password already exists; omit when setting the first password. */
476
+ currentPassword?: InputMaybe<Scalars['String']['input']>;
476
477
  newPassword: Scalars['String']['input'];
477
478
  };
478
479
 
@@ -482,6 +483,66 @@ export type ChangeMyPasswordResult = {
482
483
  success: Scalars['Boolean']['output'];
483
484
  };
484
485
 
486
+ export type ClearProjectAppPictureInput = {
487
+ projectAppId: Scalars['ID']['input'];
488
+ scope: Scope;
489
+ };
490
+
491
+ export type ClearProjectPictureInput = {
492
+ projectId: Scalars['ID']['input'];
493
+ scope: Scope;
494
+ };
495
+
496
+ export type ConfirmMyProjectMembershipPictureUploadInput = {
497
+ filename: Scalars['String']['input'];
498
+ projectId: Scalars['ID']['input'];
499
+ };
500
+
501
+ /**
502
+ * `filename` is repeated from the request step rather than carried in a token: the
503
+ * storage path is re-derived server-side from the caller's identity both times, so
504
+ * nothing the client sends can point the confirmation at another user's object.
505
+ */
506
+ export type ConfirmMyUserPictureUploadInput = {
507
+ filename: Scalars['String']['input'];
508
+ };
509
+
510
+ /**
511
+ * `filename` is repeated from the request step rather than carried in a token: the
512
+ * storage path is re-derived server-side from the organization id both times.
513
+ */
514
+ export type ConfirmOrganizationPictureUploadInput = {
515
+ filename: Scalars['String']['input'];
516
+ organizationId: Scalars['ID']['input'];
517
+ scope: Scope;
518
+ };
519
+
520
+ /**
521
+ * `filename` is repeated from the request step rather than carried in a token: the
522
+ * storage path is re-derived server-side from the project-app id both times.
523
+ */
524
+ export type ConfirmProjectAppPictureUploadInput = {
525
+ filename: Scalars['String']['input'];
526
+ projectAppId: Scalars['ID']['input'];
527
+ scope: Scope;
528
+ };
529
+
530
+ /**
531
+ * `filename` is repeated from the request step rather than carried in a token: the
532
+ * storage path is re-derived server-side from the project id both times.
533
+ */
534
+ export type ConfirmProjectPictureUploadInput = {
535
+ filename: Scalars['String']['input'];
536
+ projectId: Scalars['ID']['input'];
537
+ scope: Scope;
538
+ };
539
+
540
+ export type ConfirmUserPictureUploadInput = {
541
+ filename: Scalars['String']['input'];
542
+ scope: Scope;
543
+ userId: Scalars['ID']['input'];
544
+ };
545
+
485
546
  export type CreateAccountInput = {
486
547
  ownerId: Scalars['String']['input'];
487
548
  provider: UserAuthenticationMethodProvider;
@@ -975,6 +1036,47 @@ export type Mutation = {
975
1036
  */
976
1037
  cancelProjectSync: ProjectSyncJob;
977
1038
  changeMyPassword: ChangeMyPasswordResult;
1039
+ /** Clear the project-app logo. Does not delete the stored object. */
1040
+ clearProjectAppPicture: ProjectApp;
1041
+ /** Clear the project logo. Does not delete the stored object. */
1042
+ clearProjectPicture: Project;
1043
+ /**
1044
+ * Record a direct upload of a project-membership picture that has completed.
1045
+ * Re-checks membership and reads the object back from storage before anything is
1046
+ * written to the membership.
1047
+ */
1048
+ confirmMyProjectMembershipPictureUpload: UploadUserPictureResult;
1049
+ /**
1050
+ * Record a direct upload that has completed. Reads the object back from storage
1051
+ * to confirm it exists and is within the size policy — what the client claimed
1052
+ * when it asked for the URL is not evidence — then points the user's picture at
1053
+ * it.
1054
+ */
1055
+ confirmMyUserPictureUpload: UploadUserPictureResult;
1056
+ /**
1057
+ * Record a direct organization-logo upload that has completed. Reads the object
1058
+ * back from storage to confirm it exists and is within the size policy, then
1059
+ * stores the object key on the organization (`picture_path`).
1060
+ */
1061
+ confirmOrganizationPictureUpload: UploadOrganizationPictureResult;
1062
+ /**
1063
+ * Record a direct project-app-logo upload that has completed. Reads the object
1064
+ * back from storage to confirm it exists and is within the size policy, then
1065
+ * stores the object key on the app (`picture_path`).
1066
+ */
1067
+ confirmProjectAppPictureUpload: UploadProjectAppPictureResult;
1068
+ /**
1069
+ * Record a direct project-logo upload that has completed. Reads the object
1070
+ * back from storage to confirm it exists and is within the size policy, then
1071
+ * stores the object key on the project (`picture_path`).
1072
+ */
1073
+ confirmProjectPictureUpload: UploadProjectPictureResult;
1074
+ /**
1075
+ * Record a completed direct upload of another user's picture. Re-runs the scope
1076
+ * and permission checks, then reads the object back from storage before writing
1077
+ * the picture to the user or to their project membership, as scope dictates.
1078
+ */
1079
+ confirmUserPictureUpload: UploadUserPictureResult;
978
1080
  createApiKey: CreateApiKeyResult;
979
1081
  createGroup: Group;
980
1082
  createMyMfaEnrollment: MfaEnrollment;
@@ -1019,7 +1121,66 @@ export type Mutation = {
1019
1121
  renewInvitation: OrganizationInvitation;
1020
1122
  /** Re-queue a delivery attempt for another POST. */
1021
1123
  replayWebhookDelivery: WebhookDeliveryAttempt;
1124
+ /**
1125
+ * Ask for a URL to upload the signed-in user's picture for one project
1126
+ * membership, directly to storage.
1127
+ *
1128
+ * Membership is checked before a URL exists, not only when the upload is
1129
+ * recorded: a URL is a write capability, so issuing one for a project you do not
1130
+ * belong to is the thing to prevent, not to detect afterwards.
1131
+ */
1132
+ requestMyProjectMembershipPictureUploadUrl: UploadUrl;
1133
+ /**
1134
+ * Ask for a URL to upload the signed-in user's picture directly to storage,
1135
+ * without the bytes passing through this API.
1136
+ *
1137
+ * Validates content type, extension and size **before** issuing the URL, and
1138
+ * binds the URL to a path derived from the caller's own identity. Call
1139
+ * `confirmMyUserPictureUpload` once the PUT succeeds; until then nothing is
1140
+ * recorded against the user.
1141
+ */
1142
+ requestMyUserPictureUploadUrl: UploadUrl;
1143
+ /**
1144
+ * Ask for a URL to upload an organization logo directly to storage, without the
1145
+ * bytes passing through this API.
1146
+ *
1147
+ * Validates content type, extension and size **before** issuing the URL, and
1148
+ * binds the URL to a path derived from the organization id. Call
1149
+ * `confirmOrganizationPictureUpload` once the PUT succeeds; until then nothing
1150
+ * is recorded against the organization.
1151
+ */
1152
+ requestOrganizationPictureUploadUrl: UploadUrl;
1022
1153
  requestPasswordReset: RequestPasswordResetResponse;
1154
+ /**
1155
+ * Ask for a URL to upload a project-app logo directly to storage, without the
1156
+ * bytes passing through this API.
1157
+ *
1158
+ * Validates content type, extension and size **before** issuing the URL, and
1159
+ * binds the URL to a path derived from the project-app id. Call
1160
+ * `confirmProjectAppPictureUpload` once the PUT succeeds; until then nothing
1161
+ * is recorded against the app.
1162
+ */
1163
+ requestProjectAppPictureUploadUrl: UploadUrl;
1164
+ /**
1165
+ * Ask for a URL to upload a project logo directly to storage, without the
1166
+ * bytes passing through this API.
1167
+ *
1168
+ * Validates content type, extension and size **before** issuing the URL, and
1169
+ * binds the URL to a path derived from the project id. Call
1170
+ * `confirmProjectPictureUpload` once the PUT succeeds; until then nothing
1171
+ * is recorded against the project.
1172
+ */
1173
+ requestProjectPictureUploadUrl: UploadUrl;
1174
+ /**
1175
+ * Ask for a URL to upload another user's picture directly to storage.
1176
+ *
1177
+ * Unlike the `me` variants, the storage path here is derived from the **target**
1178
+ * user rather than the caller, so the permission check is the only thing standing
1179
+ * between a caller and another user's picture. It therefore runs before a URL is
1180
+ * issued — the same scope and self-managed-identity rules `uploadUserPicture`
1181
+ * applies — and again when the upload is confirmed.
1182
+ */
1183
+ requestUserPictureUploadUrl: UploadUrl;
1023
1184
  resendInvitationEmail: OrganizationInvitation;
1024
1185
  resendVerification: ResendVerificationResponse;
1025
1186
  resetPassword: ResetPasswordResponse;
@@ -1088,6 +1249,10 @@ export type Mutation = {
1088
1249
  uploadMyUserPicture: UploadUserPictureResult;
1089
1250
  /** Upload an organization logo and persist its public URL. */
1090
1251
  uploadOrganizationPicture: UploadOrganizationPictureResult;
1252
+ /** Upload a project-app logo and persist its public URL. */
1253
+ uploadProjectAppPicture: UploadProjectAppPictureResult;
1254
+ /** Upload a project logo and persist its public URL. */
1255
+ uploadProjectPicture: UploadProjectPictureResult;
1091
1256
  uploadUserPicture: UploadUserPictureResult;
1092
1257
  verifyEmail: VerifyEmailResponse;
1093
1258
  verifyMfa: MfaVerifyResponse;
@@ -1117,6 +1282,38 @@ export type MutationChangeMyPasswordArgs = {
1117
1282
  input: ChangeMyPasswordInput;
1118
1283
  };
1119
1284
 
1285
+ export type MutationClearProjectAppPictureArgs = {
1286
+ input: ClearProjectAppPictureInput;
1287
+ };
1288
+
1289
+ export type MutationClearProjectPictureArgs = {
1290
+ input: ClearProjectPictureInput;
1291
+ };
1292
+
1293
+ export type MutationConfirmMyProjectMembershipPictureUploadArgs = {
1294
+ input: ConfirmMyProjectMembershipPictureUploadInput;
1295
+ };
1296
+
1297
+ export type MutationConfirmMyUserPictureUploadArgs = {
1298
+ input: ConfirmMyUserPictureUploadInput;
1299
+ };
1300
+
1301
+ export type MutationConfirmOrganizationPictureUploadArgs = {
1302
+ input: ConfirmOrganizationPictureUploadInput;
1303
+ };
1304
+
1305
+ export type MutationConfirmProjectAppPictureUploadArgs = {
1306
+ input: ConfirmProjectAppPictureUploadInput;
1307
+ };
1308
+
1309
+ export type MutationConfirmProjectPictureUploadArgs = {
1310
+ input: ConfirmProjectPictureUploadInput;
1311
+ };
1312
+
1313
+ export type MutationConfirmUserPictureUploadArgs = {
1314
+ input: ConfirmUserPictureUploadInput;
1315
+ };
1316
+
1120
1317
  export type MutationCreateApiKeyArgs = {
1121
1318
  input: CreateApiKeyInput;
1122
1319
  };
@@ -1268,10 +1465,34 @@ export type MutationReplayWebhookDeliveryArgs = {
1268
1465
  input: ReplayWebhookDeliveryInput;
1269
1466
  };
1270
1467
 
1468
+ export type MutationRequestMyProjectMembershipPictureUploadUrlArgs = {
1469
+ input: RequestMyProjectMembershipPictureUploadUrlInput;
1470
+ };
1471
+
1472
+ export type MutationRequestMyUserPictureUploadUrlArgs = {
1473
+ input: RequestMyUserPictureUploadUrlInput;
1474
+ };
1475
+
1476
+ export type MutationRequestOrganizationPictureUploadUrlArgs = {
1477
+ input: RequestOrganizationPictureUploadUrlInput;
1478
+ };
1479
+
1271
1480
  export type MutationRequestPasswordResetArgs = {
1272
1481
  input: RequestPasswordResetInput;
1273
1482
  };
1274
1483
 
1484
+ export type MutationRequestProjectAppPictureUploadUrlArgs = {
1485
+ input: RequestProjectAppPictureUploadUrlInput;
1486
+ };
1487
+
1488
+ export type MutationRequestProjectPictureUploadUrlArgs = {
1489
+ input: RequestProjectPictureUploadUrlInput;
1490
+ };
1491
+
1492
+ export type MutationRequestUserPictureUploadUrlArgs = {
1493
+ input: RequestUserPictureUploadUrlInput;
1494
+ };
1495
+
1275
1496
  export type MutationResendInvitationEmailArgs = {
1276
1497
  id: Scalars['ID']['input'];
1277
1498
  scope: Scope;
@@ -1417,6 +1638,14 @@ export type MutationUploadOrganizationPictureArgs = {
1417
1638
  input: UploadOrganizationPictureInput;
1418
1639
  };
1419
1640
 
1641
+ export type MutationUploadProjectAppPictureArgs = {
1642
+ input: UploadProjectAppPictureInput;
1643
+ };
1644
+
1645
+ export type MutationUploadProjectPictureArgs = {
1646
+ input: UploadProjectPictureInput;
1647
+ };
1648
+
1420
1649
  export type MutationUploadUserPictureArgs = {
1421
1650
  input: UploadUserPictureInput;
1422
1651
  };
@@ -1852,8 +2081,13 @@ export type Project = Auditable & {
1852
2081
  name: Scalars['String']['output'];
1853
2082
  organizationTags?: Maybe<Array<Tag>>;
1854
2083
  permissions?: Maybe<Array<Permission>>;
2084
+ pictureUrl?: Maybe<Scalars['String']['output']>;
2085
+ /** Brand hex (`#RRGGBB`). Null uses Grant's default OAuth theme. */
2086
+ primaryColor?: Maybe<Scalars['String']['output']>;
1855
2087
  resources?: Maybe<Array<Resource>>;
1856
2088
  roles?: Maybe<Array<Role>>;
2089
+ /** Whether the OAuth help panel is shown. Null uses Grant's default (shown). */
2090
+ showHelpPanel?: Maybe<Scalars['Boolean']['output']>;
1857
2091
  slug: Scalars['String']['output'];
1858
2092
  tags?: Maybe<Array<Tag>>;
1859
2093
  updatedAt: Scalars['Date']['output'];
@@ -1871,15 +2105,22 @@ export type ProjectApp = Auditable & {
1871
2105
  enabledProviders?: Maybe<Array<Scalars['String']['output']>>;
1872
2106
  id: Scalars['ID']['output'];
1873
2107
  name?: Maybe<Scalars['String']['output']>;
2108
+ pictureUrl?: Maybe<Scalars['String']['output']>;
2109
+ /** Brand hex (`#RRGGBB`). Null inherits the project color. */
2110
+ primaryColor?: Maybe<Scalars['String']['output']>;
1874
2111
  project?: Maybe<Project>;
1875
2112
  projectId: Scalars['ID']['output'];
1876
2113
  redirectUris: Array<Scalars['String']['output']>;
1877
2114
  scopes?: Maybe<Array<Scalars['String']['output']>>;
2115
+ /** Whether the OAuth help panel is shown. Null inherits the project setting. */
2116
+ showHelpPanel?: Maybe<Scalars['Boolean']['output']>;
1878
2117
  /** Resolved role for signUpRoleId (for display). */
1879
2118
  signUpRole?: Maybe<Role>;
1880
2119
  /** Role assigned to users who sign up via this app. Required when allowSignUp is true. */
1881
2120
  signUpRoleId?: Maybe<Scalars['ID']['output']>;
1882
2121
  tags?: Maybe<Array<Tag>>;
2122
+ /** Forced OAuth appearance (`light`, `dark`, `system`). Null keeps the visitor's Grant theme. */
2123
+ themeMode?: Maybe<Scalars['String']['output']>;
1883
2124
  updatedAt: Scalars['Date']['output'];
1884
2125
  };
1885
2126
 
@@ -2761,6 +3002,40 @@ export type ReplayWebhookDeliveryInput = {
2761
3002
  scope: Scope;
2762
3003
  };
2763
3004
 
3005
+ export type RequestMyProjectMembershipPictureUploadUrlInput = {
3006
+ /**
3007
+ * Exact byte length the client will send. Validated against the upload policy
3008
+ * before a URL is issued, and committed to by the URL itself.
3009
+ */
3010
+ contentLength: Scalars['Int']['input'];
3011
+ contentType: Scalars['String']['input'];
3012
+ filename: Scalars['String']['input'];
3013
+ projectId: Scalars['ID']['input'];
3014
+ };
3015
+
3016
+ export type RequestMyUserPictureUploadUrlInput = {
3017
+ /**
3018
+ * Exact byte length the client will send. Validated against the upload policy
3019
+ * before a URL is issued, and committed to by the URL itself — a body of any
3020
+ * other length is refused by the store.
3021
+ */
3022
+ contentLength: Scalars['Int']['input'];
3023
+ contentType: Scalars['String']['input'];
3024
+ filename: Scalars['String']['input'];
3025
+ };
3026
+
3027
+ export type RequestOrganizationPictureUploadUrlInput = {
3028
+ /**
3029
+ * Exact byte length the client will send. Validated against the upload policy
3030
+ * before a URL is issued, and committed to by the URL itself.
3031
+ */
3032
+ contentLength: Scalars['Int']['input'];
3033
+ contentType: Scalars['String']['input'];
3034
+ filename: Scalars['String']['input'];
3035
+ organizationId: Scalars['ID']['input'];
3036
+ scope: Scope;
3037
+ };
3038
+
2764
3039
  export type RequestPasswordResetInput = {
2765
3040
  email: Scalars['String']['input'];
2766
3041
  };
@@ -2772,6 +3047,42 @@ export type RequestPasswordResetResponse = {
2772
3047
  success: Scalars['Boolean']['output'];
2773
3048
  };
2774
3049
 
3050
+ export type RequestProjectAppPictureUploadUrlInput = {
3051
+ /**
3052
+ * Exact byte length the client will send. Validated against the upload policy
3053
+ * before a URL is issued, and committed to by the URL itself.
3054
+ */
3055
+ contentLength: Scalars['Int']['input'];
3056
+ contentType: Scalars['String']['input'];
3057
+ filename: Scalars['String']['input'];
3058
+ projectAppId: Scalars['ID']['input'];
3059
+ scope: Scope;
3060
+ };
3061
+
3062
+ export type RequestProjectPictureUploadUrlInput = {
3063
+ /**
3064
+ * Exact byte length the client will send. Validated against the upload policy
3065
+ * before a URL is issued, and committed to by the URL itself.
3066
+ */
3067
+ contentLength: Scalars['Int']['input'];
3068
+ contentType: Scalars['String']['input'];
3069
+ filename: Scalars['String']['input'];
3070
+ projectId: Scalars['ID']['input'];
3071
+ scope: Scope;
3072
+ };
3073
+
3074
+ export type RequestUserPictureUploadUrlInput = {
3075
+ /**
3076
+ * Exact byte length the client will send. Validated against the upload policy
3077
+ * before a URL is issued, and committed to by the URL itself.
3078
+ */
3079
+ contentLength: Scalars['Int']['input'];
3080
+ contentType: Scalars['String']['input'];
3081
+ filename: Scalars['String']['input'];
3082
+ scope: Scope;
3083
+ userId: Scalars['ID']['input'];
3084
+ };
3085
+
2775
3086
  export type ResendVerificationInput = {
2776
3087
  email: Scalars['String']['input'];
2777
3088
  };
@@ -3318,15 +3629,21 @@ export type UpdateProjectAppInput = {
3318
3629
  enabledProviders?: InputMaybe<Array<Scalars['String']['input']>>;
3319
3630
  /** Display name for the app. */
3320
3631
  name?: InputMaybe<Scalars['String']['input']>;
3632
+ /** Brand hex (`#RRGGBB`). Null inherits the project color. */
3633
+ primaryColor?: InputMaybe<Scalars['String']['input']>;
3321
3634
  primaryTagId?: InputMaybe<Scalars['ID']['input']>;
3322
3635
  /** Allowed redirect URIs for OAuth callback. If provided, at least one required. */
3323
3636
  redirectUris?: InputMaybe<Array<Scalars['String']['input']>>;
3324
3637
  scope: Scope;
3325
3638
  /** Optional OAuth scopes the app may request. */
3326
3639
  scopes?: InputMaybe<Array<Scalars['String']['input']>>;
3640
+ /** Whether the OAuth help panel is shown. Null inherits the project setting. */
3641
+ showHelpPanel?: InputMaybe<Scalars['Boolean']['input']>;
3327
3642
  /** Role to assign to users who sign up via this app. Required when allowSignUp is true; must be a role in the project. */
3328
3643
  signUpRoleId?: InputMaybe<Scalars['ID']['input']>;
3329
3644
  tagIds?: InputMaybe<Array<Scalars['ID']['input']>>;
3645
+ /** Forced OAuth appearance (`light`, `dark`, `system`). Null keeps the visitor's Grant theme. */
3646
+ themeMode?: InputMaybe<Scalars['String']['input']>;
3330
3647
  };
3331
3648
 
3332
3649
  export type UpdateProjectAppTagInput = {
@@ -3338,8 +3655,12 @@ export type UpdateProjectAppTagInput = {
3338
3655
  export type UpdateProjectInput = {
3339
3656
  description?: InputMaybe<Scalars['String']['input']>;
3340
3657
  name?: InputMaybe<Scalars['String']['input']>;
3658
+ /** Brand hex (`#RRGGBB`). Null resets to Grant's default. */
3659
+ primaryColor?: InputMaybe<Scalars['String']['input']>;
3341
3660
  primaryTagId?: InputMaybe<Scalars['ID']['input']>;
3342
3661
  scope: Scope;
3662
+ /** Whether the OAuth help panel is shown. Null resets to Grant's default (shown). */
3663
+ showHelpPanel?: InputMaybe<Scalars['Boolean']['input']>;
3343
3664
  tagIds?: InputMaybe<Array<Scalars['ID']['input']>>;
3344
3665
  };
3345
3666
 
@@ -3457,6 +3778,67 @@ export type UploadOrganizationPictureResult = {
3457
3778
  url: Scalars['String']['output'];
3458
3779
  };
3459
3780
 
3781
+ export type UploadProjectAppPictureInput = {
3782
+ contentType: Scalars['String']['input'];
3783
+ file: Scalars['String']['input'];
3784
+ filename: Scalars['String']['input'];
3785
+ projectAppId: Scalars['ID']['input'];
3786
+ scope: Scope;
3787
+ };
3788
+
3789
+ export type UploadProjectAppPictureResult = {
3790
+ __typename?: 'UploadProjectAppPictureResult';
3791
+ path: Scalars['String']['output'];
3792
+ url: Scalars['String']['output'];
3793
+ };
3794
+
3795
+ export type UploadProjectPictureInput = {
3796
+ contentType: Scalars['String']['input'];
3797
+ file: Scalars['String']['input'];
3798
+ filename: Scalars['String']['input'];
3799
+ projectId: Scalars['ID']['input'];
3800
+ scope: Scope;
3801
+ };
3802
+
3803
+ export type UploadProjectPictureResult = {
3804
+ __typename?: 'UploadProjectPictureResult';
3805
+ path: Scalars['String']['output'];
3806
+ url: Scalars['String']['output'];
3807
+ };
3808
+
3809
+ /**
3810
+ * A bounded, time-limited URL the client writes bytes to directly.
3811
+ *
3812
+ * The URL is a bearer capability: it permits exactly `contentLength` bytes of
3813
+ * exactly `contentType` at exactly one server-derived path, until `expiresAt`.
3814
+ * It is not single-use and cannot be revoked, so it is short-lived by design.
3815
+ */
3816
+ export type UploadUrl = {
3817
+ __typename?: 'UploadUrl';
3818
+ /** Instant after which the store refuses the URL. */
3819
+ expiresAt: Scalars['Date']['output'];
3820
+ /**
3821
+ * Headers the client must set verbatim. `Content-Length` is deliberately absent:
3822
+ * browsers set it from the body and forbid setting it by hand, even though the
3823
+ * URL commits to the value.
3824
+ */
3825
+ headers: Array<UploadUrlHeader>;
3826
+ /** HTTP method the client must use. Always PUT today. */
3827
+ method: Scalars['String']['output'];
3828
+ /**
3829
+ * Absolute for object stores; application-relative for targets this API serves
3830
+ * itself. Resolve it against the API origin before using it.
3831
+ */
3832
+ url: Scalars['String']['output'];
3833
+ };
3834
+
3835
+ /** A header the client must send with the direct upload. */
3836
+ export type UploadUrlHeader = {
3837
+ __typename?: 'UploadUrlHeader';
3838
+ name: Scalars['String']['output'];
3839
+ value: Scalars['String']['output'];
3840
+ };
3841
+
3460
3842
  export type UploadUserPictureInput = {
3461
3843
  contentType: Scalars['String']['input'];
3462
3844
  file: Scalars['String']['input'];
@@ -3513,6 +3895,8 @@ export type UserAuthenticationMethod = Auditable & {
3513
3895
  __typename?: 'UserAuthenticationMethod';
3514
3896
  createdAt: Scalars['Date']['output'];
3515
3897
  deletedAt?: Maybe<Scalars['Date']['output']>;
3898
+ /** True when this Email method has a password. Always false for social providers. */
3899
+ hasPassword: Scalars['Boolean']['output'];
3516
3900
  id: Scalars['ID']['output'];
3517
3901
  isPrimary: Scalars['Boolean']['output'];
3518
3902
  isVerified: Scalars['Boolean']['output'];
package/src/index.ts CHANGED
@@ -4,11 +4,14 @@ export * from './generated/graphql';
4
4
  export * from './generated/resolvers';
5
5
  export * from './generated/schema-types';
6
6
  export * from './notifications/notification.types';
7
- export type {
8
- ProjectAppPublicInfo,
9
- ProjectAppScopeInfo,
10
- ProjectConsentInfo,
11
- ProjectConsentInfoUser,
12
- ProjectConsentRedirectResult,
7
+ export {
8
+ isProjectOAuthThemeMode,
9
+ PROJECT_OAUTH_THEME_MODES,
10
+ type ProjectAppPublicInfo,
11
+ type ProjectAppScopeInfo,
12
+ type ProjectConsentInfo,
13
+ type ProjectConsentInfoUser,
14
+ type ProjectConsentRedirectResult,
15
+ type ProjectOAuthThemeMode,
13
16
  } from './project-oauth.types';
14
17
  export * from './webhooks/webhook.types';
@@ -6,6 +6,7 @@ query MyUserAuthenticationMethods {
6
6
  providerId
7
7
  isVerified
8
8
  isPrimary
9
+ hasPassword
9
10
  lastUsedAt
10
11
  createdAt
11
12
  updatedAt
@@ -0,0 +1,7 @@
1
+ mutation ClearProjectAppPicture($input: ClearProjectAppPictureInput!) {
2
+ clearProjectAppPicture(input: $input) {
3
+ id
4
+ pictureUrl
5
+ updatedAt
6
+ }
7
+ }
@@ -21,6 +21,10 @@ query GetProjectApps(
21
21
  projectId
22
22
  clientId
23
23
  name
24
+ pictureUrl
25
+ primaryColor
26
+ showHelpPanel
27
+ themeMode
24
28
  redirectUris
25
29
  scopes
26
30
  enabledProviders
@@ -36,6 +40,9 @@ query GetProjectApps(
36
40
  project {
37
41
  id
38
42
  name
43
+ pictureUrl
44
+ primaryColor
45
+ showHelpPanel
39
46
  }
40
47
  tags {
41
48
  id
@@ -4,6 +4,10 @@ mutation UpdateProjectApp($id: ID!, $input: UpdateProjectAppInput!) {
4
4
  projectId
5
5
  clientId
6
6
  name
7
+ pictureUrl
8
+ primaryColor
9
+ showHelpPanel
10
+ themeMode
7
11
  redirectUris
8
12
  scopes
9
13
  enabledProviders
@@ -15,6 +19,9 @@ mutation UpdateProjectApp($id: ID!, $input: UpdateProjectAppInput!) {
15
19
  project {
16
20
  id
17
21
  name
22
+ pictureUrl
23
+ primaryColor
24
+ showHelpPanel
18
25
  }
19
26
  }
20
27
  }
@@ -0,0 +1,6 @@
1
+ mutation UploadProjectAppPicture($input: UploadProjectAppPictureInput!) {
2
+ uploadProjectAppPicture(input: $input) {
3
+ url
4
+ path
5
+ }
6
+ }
@@ -0,0 +1,7 @@
1
+ mutation ClearProjectPicture($input: ClearProjectPictureInput!) {
2
+ clearProjectPicture(input: $input) {
3
+ id
4
+ pictureUrl
5
+ updatedAt
6
+ }
7
+ }
@@ -21,6 +21,9 @@ query GetProjects(
21
21
  name
22
22
  slug
23
23
  description
24
+ pictureUrl
25
+ primaryColor
26
+ showHelpPanel
24
27
  createdAt
25
28
  updatedAt
26
29
  organizationTags {
@@ -4,6 +4,9 @@ mutation UpdateProject($id: ID!, $input: UpdateProjectInput!) {
4
4
  name
5
5
  slug
6
6
  description
7
+ pictureUrl
8
+ primaryColor
9
+ showHelpPanel
7
10
  createdAt
8
11
  updatedAt
9
12
  }
@@ -0,0 +1,6 @@
1
+ mutation UploadProjectPicture($input: UploadProjectPictureInput!) {
2
+ uploadProjectPicture(input: $input) {
3
+ url
4
+ path
5
+ }
6
+ }
@@ -0,0 +1,8 @@
1
+ mutation ConfirmMyProjectMembershipPictureUpload(
2
+ $input: ConfirmMyProjectMembershipPictureUploadInput!
3
+ ) {
4
+ confirmMyProjectMembershipPictureUpload(input: $input) {
5
+ url
6
+ path
7
+ }
8
+ }
@@ -0,0 +1,6 @@
1
+ mutation ConfirmMyUserPictureUpload($input: ConfirmMyUserPictureUploadInput!) {
2
+ confirmMyUserPictureUpload(input: $input) {
3
+ url
4
+ path
5
+ }
6
+ }
@@ -0,0 +1,6 @@
1
+ mutation ConfirmOrganizationPictureUpload($input: ConfirmOrganizationPictureUploadInput!) {
2
+ confirmOrganizationPictureUpload(input: $input) {
3
+ url
4
+ path
5
+ }
6
+ }
@@ -0,0 +1,6 @@
1
+ mutation ConfirmProjectAppPictureUpload($input: ConfirmProjectAppPictureUploadInput!) {
2
+ confirmProjectAppPictureUpload(input: $input) {
3
+ url
4
+ path
5
+ }
6
+ }