Skip to content

Commit e0959ad

Browse files
committed
generate types
1 parent 434c7ca commit e0959ad

5 files changed

Lines changed: 43 additions & 7 deletions

File tree

src/generated/schema.gql

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,11 @@ type Mutation {
363363
"""
364364
rejectTeamInvitation(input: RejectTeamInvitationInput!): TeamRef!
365365

366+
"""
367+
Update a user role
368+
"""
369+
retoolToken(input: retoolToken!): TokenRef! @deprecated(reason: "Not enabled")
370+
366371
"""
367372
Kickoff the email validation flow. This flow will links an email to a user, create a company if it does not exist, and allows filling data for that email's position
368373
"""
@@ -962,6 +967,13 @@ enum TicketTemplateVisibility {
962967
unlisted
963968
}
964969

970+
"""
971+
Representation of a token
972+
"""
973+
type TokenRef {
974+
token: String!
975+
}
976+
965977
enum TypeOfEmployment {
966978
freelance
967979
fullTime
@@ -1111,6 +1123,11 @@ type WorkSeniority {
11111123
name: String!
11121124
}
11131125

1126+
input retoolToken {
1127+
authToken: String!
1128+
userEmail: String!
1129+
}
1130+
11141131
input updateUserRoleInCommunityInput {
11151132
communityId: String!
11161133
role: String!

src/generated/types.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,11 @@ export type Mutation = {
321321
redeemUserTicket: UserTicket;
322322
/** Reject the user's invitation to a team */
323323
rejectTeamInvitation: TeamRef;
324+
/**
325+
* Update a user role
326+
* @deprecated Not enabled
327+
*/
328+
retoolToken: TokenRef;
324329
/** Kickoff the email validation flow. This flow will links an email to a user, create a company if it does not exist, and allows filling data for that email's position */
325330
startWorkEmailValidation: WorkEmail;
326331
/** Update a company */
@@ -421,6 +426,10 @@ export type MutationRejectTeamInvitationArgs = {
421426
input: RejectTeamInvitationInput;
422427
};
423428

429+
export type MutationRetoolTokenArgs = {
430+
input: RetoolToken;
431+
};
432+
424433
export type MutationStartWorkEmailValidationArgs = {
425434
email: Scalars["String"]["input"];
426435
};
@@ -977,6 +986,12 @@ export enum TicketTemplateVisibility {
977986
Unlisted = "unlisted",
978987
}
979988

989+
/** Representation of a token */
990+
export type TokenRef = {
991+
__typename?: "TokenRef";
992+
token: Scalars["String"]["output"];
993+
};
994+
980995
export enum TypeOfEmployment {
981996
Freelance = "freelance",
982997
FullTime = "fullTime",
@@ -1119,6 +1134,11 @@ export type WorkSeniority = {
11191134
name: Scalars["String"]["output"];
11201135
};
11211136

1137+
export type RetoolToken = {
1138+
authToken: Scalars["String"]["input"];
1139+
userEmail: Scalars["String"]["input"];
1140+
};
1141+
11221142
export type UpdateUserRoleInCommunityInput = {
11231143
communityId: Scalars["String"]["input"];
11241144
role: Scalars["String"]["input"];

src/schema/shared/refs.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,7 @@ export const ConsolidatedPaymentLogEntryRef = builder.objectRef<{
9696
platform: string;
9797
currencyId: string;
9898
}>("ConsolidatedPaymentLogEntry");
99+
100+
export const TokenRef = builder.objectRef<{
101+
token: string;
102+
}>("TokenRef");

src/schema/user/mutations.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
usersToCommunitiesSchema,
1212
} from "~/datasources/db/schema";
1313
import { applicationError, ServiceErrors } from "~/errors";
14-
import { UserRef } from "~/schema/shared/refs";
14+
import { TokenRef, UserRef } from "~/schema/shared/refs";
1515
import { pronounsEnum } from "~/schema/user/types";
1616
import {
1717
UserRoleCommunity,
@@ -166,10 +166,6 @@ const retoolToken = builder.inputType("retoolToken", {
166166
}),
167167
});
168168

169-
export const TokenRef = builder.objectRef<{
170-
token: string;
171-
}>("TokenRef");
172-
173169
builder.mutationField("retoolToken", (t) =>
174170
t.field({
175171
description: "Update a user role",

src/schema/user/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ import {
66
selectCommunitySchema,
77
selectTeamsSchema,
88
} from "~/datasources/db/schema";
9-
import { CommunityRef, UserRef } from "~/schema/shared/refs";
9+
import { CommunityRef, TokenRef, UserRef } from "~/schema/shared/refs";
1010
import { TeamRef } from "~/schema/teams/types";
11-
import { TokenRef } from "~/schema/user/mutations";
1211

1312
export const pronounsEnum = builder.enumType(PronounsEnum, {
1413
name: "PronounsEnum",

0 commit comments

Comments
 (0)