diff --git a/backend/functions/db/migrations/20211026145209_add_legacy_record_type.ts b/backend/functions/db/migrations/20211026145209_add_legacy_record_type.ts new file mode 100644 index 0000000..614d118 --- /dev/null +++ b/backend/functions/db/migrations/20211026145209_add_legacy_record_type.ts @@ -0,0 +1,23 @@ +import * as Knex from "knex"; + +export async function up(knex: Knex): Promise { + return knex.schema.createTable("legacyRecord", function (table) { + table.increments(); + table.string("wca_event_id").nullable(); + table.integer("record_type").notNullable(); + table.integer("number_of_solves").notNullable(); + table.integer("result").notNullable(); + table.string("other_event_name").nullable(); + table.string("main_cube").nullable(); + table.integer("event_type").notNullable(); + table.dateTime("date").nullable(); + table.string("email").notNullable(); + table.dateTime("created_at").notNullable().defaultTo(knex.fn.now()); + table.dateTime("updated_at").nullable(); + table.integer("created_by").notNullable(); + }); +} + +export async function down(knex: Knex): Promise { + return knex.schema.dropTable("legacyRecord"); +} diff --git a/backend/functions/migration.ts b/backend/functions/migration.ts index 643298b..42614e6 100644 --- a/backend/functions/migration.ts +++ b/backend/functions/migration.ts @@ -77,6 +77,21 @@ export async function up(knex: Knex): Promise { table.dateTime("updated_at").nullable(); table.integer("created_by").notNullable(); }), + knex.schema.createTable("legacyRecord", function (table) { + table.increments(); + table.string("wca_event_id").nullable(); + table.integer("record_type").notNullable(); + table.integer("number_of_solves").notNullable(); + table.integer("result").notNullable(); + table.string("other_event_name").nullable(); + table.string("main_cube").nullable(); + table.integer("event_type").notNullable(); + table.dateTime("date").nullable(); + table.string("email").notNullable(); + table.dateTime("created_at").notNullable().defaultTo(knex.fn.now()); + table.dateTime("updated_at").nullable(); + table.integer("created_by").notNullable(); + }), knex.schema.createTable("apiKey", function (table) { table.increments(); table.string("name").notNullable(); @@ -98,6 +113,7 @@ export async function down(knex: Knex): Promise { knex.schema.dropTable("product"), knex.schema.dropTable("personalBestClass"), knex.schema.dropTable("personalBest"), + knex.schema.dropTable("legacyRecord"), knex.schema.dropTable("apiKey"), ]); } diff --git a/backend/functions/schema.ts b/backend/functions/schema.ts index 25c5cba..57d14d3 100644 --- a/backend/functions/schema.ts +++ b/backend/functions/schema.ts @@ -123,6 +123,8 @@ export type FilterByField = { | "happenedOn" | "isCurrent"; personalBestGroupByKey: undefined; + legacyRecordSortByKey: "id"; + legacyRecordGroupByKey: undefined; apiKeySortByKey: "id" | "createdAt"; apiKeyGroupByKey: undefined; userUserFollowLinkSortByKey: "createdAt"; @@ -356,6 +358,49 @@ export type FilterByField = { fields: InputTypes["updatePersonalBestFields"]; }; flagPersonalBest: { item: InputTypes["personalBest"] }; + legacyRecord: { id?: Scalars["id"] }; + "legacyRecordFilterByField/id": FilterByField; + "legacyRecordFilterByField/email": FilterByField; + legacyRecordFilterByObject: { + id?: InputTypes["legacyRecordFilterByField/id"]; + email?: InputTypes["legacyRecordFilterByField/email"]; + }; + legacyRecordPaginator: { + first?: Scalars["number"]; + last?: Scalars["number"]; + after?: Scalars["string"]; + before?: Scalars["string"]; + sortBy?: Scalars["legacyRecordSortByKey"][]; + sortDesc?: Scalars["boolean"][]; + filterBy?: InputTypes["legacyRecordFilterByObject"][]; + groupBy?: Scalars["legacyRecordGroupByKey"][]; + }; + createLegacyRecord: { + wcaEventId?: Scalars["string"] | null; + recordType: Scalars["number"]; + numberOfSolves: Scalars["number"]; + result: Scalars["number"]; + otherEventName?: Scalars["string"] | null; + mainCube?: Scalars["string"] | null; + eventType: Scalars["number"]; + date?: Scalars["unixTimestamp"] | null; + email: Scalars["string"]; + }; + updateLegacyRecordFields: { + wcaEventId?: Scalars["string"] | null; + recordType?: Scalars["number"]; + numberOfSolves?: Scalars["number"]; + result?: Scalars["number"]; + otherEventName?: Scalars["string"] | null; + mainCube?: Scalars["string"] | null; + eventType?: Scalars["number"]; + date?: Scalars["unixTimestamp"] | null; + email?: Scalars["string"]; + }; + updateLegacyRecord: { + item: InputTypes["legacyRecord"]; + fields: InputTypes["updateLegacyRecordFields"]; + }; apiKey: { id?: Scalars["id"] }; "apiKeyFilterByField/id": FilterByField; "apiKeyFilterByField/user.id": FilterByField; @@ -439,6 +484,14 @@ export type FilterByField = { Typename: "personalBestPaginator"; Type: GetType; }; + legacyRecordEdge: { + Typename: "legacyRecordEdge"; + Type: GetType; + }; + legacyRecordPaginator: { + Typename: "legacyRecordPaginator"; + Type: GetType; + }; apiKeyEdge: { Typename: "apiKeyEdge"; Type: GetType }; apiKeyPaginator: { Typename: "apiKeyPaginator"; @@ -473,6 +526,7 @@ export type FilterByField = { Type: GetType; }; personalBest: { Typename: "personalBest"; Type: GetType }; + legacyRecord: { Typename: "legacyRecord"; Type: GetType }; apiKey: { Typename: "apiKey"; Type: GetType }; }; /**PaginatorInfo Type*/ export type PaginatorInfo = { @@ -530,6 +584,15 @@ export type PersonalBestEdge = Edge; paginatorInfo: { Type: PaginatorInfo; Args: undefined }; edges: { Type: PersonalBestEdge[]; Args: undefined }; }; +export type LegacyRecordEdge = Edge; +/**Paginator*/ export type LegacyRecordPaginator = { + /**The typename of the record*/ __typename: { + Type: Scalars["string"]; + Args: [Scalars["number"]]; + }; + paginatorInfo: { Type: PaginatorInfo; Args: undefined }; + edges: { Type: LegacyRecordEdge[]; Args: undefined }; +}; export type ApiKeyEdge = Edge; /**Paginator*/ export type ApiKeyPaginator = { /**The typename of the record*/ __typename: { @@ -724,6 +787,31 @@ export type UserUserFollowLinkEdge = Edge; }; createdBy: { Type: User; Args: undefined }; }; +/**Legacy Record*/ export type LegacyRecord = { + /**The unique ID of the field*/ id: { Type: Scalars["id"]; Args: undefined }; + /**The typename of the record*/ __typename: { + Type: Scalars["string"]; + Args: [Scalars["number"]]; + }; + wcaEventId: { Type: Scalars["string"] | null; Args: undefined }; + recordType: { Type: Scalars["number"]; Args: undefined }; + numberOfSolves: { Type: Scalars["number"]; Args: undefined }; + result: { Type: Scalars["number"]; Args: undefined }; + otherEventName: { Type: Scalars["string"] | null; Args: undefined }; + mainCube: { Type: Scalars["string"] | null; Args: undefined }; + eventType: { Type: Scalars["number"]; Args: undefined }; + date: { Type: Scalars["unixTimestamp"] | null; Args: undefined }; + email: { Type: Scalars["string"]; Args: undefined }; + /**When the record was created*/ createdAt: { + Type: Scalars["unixTimestamp"]; + Args: undefined; + }; + /**When the record was last updated*/ updatedAt: { + Type: Scalars["unixTimestamp"] | null; + Args: undefined; + }; + createdBy: { Type: User; Args: undefined }; +}; /**API Key Type*/ export type ApiKey = { /**The unique ID of the field*/ id: { Type: Scalars["id"]; Args: undefined }; /**The typename of the record*/ __typename: { @@ -811,6 +899,20 @@ export type UserUserFollowLinkEdge = Edge; Type: PersonalBest; Args: InputTypes["flagPersonalBest"]; }; + getLegacyRecord: { Type: LegacyRecord; Args: InputTypes["legacyRecord"] }; + getLegacyRecordPaginator: { + Type: LegacyRecordPaginator; + Args: InputTypes["legacyRecordPaginator"]; + }; + deleteLegacyRecord: { Type: LegacyRecord; Args: InputTypes["legacyRecord"] }; + createLegacyRecord: { + Type: LegacyRecord; + Args: InputTypes["createLegacyRecord"]; + }; + updateLegacyRecord: { + Type: LegacyRecord; + Args: InputTypes["updateLegacyRecord"]; + }; getApiKey: { Type: ApiKey; Args: InputTypes["apiKey"] }; getApiKeyPaginator: { Type: ApiKeyPaginator; diff --git a/backend/functions/src/schema/index.ts b/backend/functions/src/schema/index.ts index de92bd6..962af4b 100644 --- a/backend/functions/src/schema/index.ts +++ b/backend/functions/src/schema/index.ts @@ -8,6 +8,7 @@ import event from "./models/event/typeDef"; import product from "./models/product/typeDef"; import personalBestClass from "./models/personalBestClass/typeDef"; import personalBest from "./models/personalBest/typeDef"; +import legacyRecord from "./models/legacyRecord/typeDef"; import apiKey from "./models/apiKey/typeDef"; // add the typeDefs for the services with typeDefs @@ -17,6 +18,7 @@ allServices.Event.setTypeDef(event); allServices.Product.setTypeDef(product); allServices.PersonalBestClass.setTypeDef(personalBestClass); allServices.PersonalBest.setTypeDef(personalBest); +allServices.LegacyRecord.setTypeDef(legacyRecord); allServices.ApiKey.setTypeDef(apiKey); import User from "./models/user/rootResolver"; @@ -25,6 +27,7 @@ import Event from "./models/event/rootResolver"; import Product from "./models/product/rootResolver"; import PersonalBestClass from "./models/personalBestClass/rootResolver"; import PersonalBest from "./models/personalBest/rootResolver"; +import LegacyRecord from "./models/legacyRecord/rootResolver"; import ApiKey from "./models/apiKey/rootResolver"; import Github from "./models/github/rootResolver"; import UserUserFollowLink from "./links/userUserFollowLink/rootResolver"; @@ -35,6 +38,7 @@ allServices.Event.setRootResolvers(Event); allServices.Product.setRootResolvers(Product); allServices.PersonalBestClass.setRootResolvers(PersonalBestClass); allServices.PersonalBest.setRootResolvers(PersonalBest); +allServices.LegacyRecord.setRootResolvers(LegacyRecord); allServices.ApiKey.setRootResolvers(ApiKey); allServices.Github.setRootResolvers(Github); diff --git a/backend/functions/src/schema/models/legacyRecord/rootResolver.ts b/backend/functions/src/schema/models/legacyRecord/rootResolver.ts new file mode 100644 index 0000000..27a05a5 --- /dev/null +++ b/backend/functions/src/schema/models/legacyRecord/rootResolver.ts @@ -0,0 +1,12 @@ +import { LegacyRecord } from "../../services"; +import { generateBaseRootResolvers } from "../../core/helpers/rootResolver"; + +export default { + ...generateBaseRootResolvers(LegacyRecord, [ + "get", + "getMultiple", + "delete", + "create", + "update", + ]), +}; diff --git a/backend/functions/src/schema/models/legacyRecord/service.ts b/backend/functions/src/schema/models/legacyRecord/service.ts new file mode 100644 index 0000000..b2958d0 --- /dev/null +++ b/backend/functions/src/schema/models/legacyRecord/service.ts @@ -0,0 +1,45 @@ +import { PaginatedService } from "../../core/services"; +import { AccessControlMap, ServiceFunctionInputs } from "../../../types"; + +export class LegacyRecordService extends PaginatedService { + defaultTypename = "legacyRecord"; + + filterFieldsMap = { + id: {}, + email: {}, + }; + + uniqueKeyMap = { + primary: ["id"], + }; + + sortFieldsMap = { + id: {}, + }; + + searchFieldsMap = {}; + + groupByFieldsMap = {}; + + accessControl: AccessControlMap = { + /* + Allow if: + - Email is not a requested field + */ + get: async ({ query }) => { + if (query.email) return false; + + return true; + }, + + /* + Allow if: + - Email is not a requested field + */ + getMultiple: ({ query }) => { + if (query.email) return false; + + return true; + }, + }; +} diff --git a/backend/functions/src/schema/models/legacyRecord/typeDef.ts b/backend/functions/src/schema/models/legacyRecord/typeDef.ts new file mode 100644 index 0000000..b77bced --- /dev/null +++ b/backend/functions/src/schema/models/legacyRecord/typeDef.ts @@ -0,0 +1,57 @@ +import { LegacyRecord, User } from "../../services"; +import { GiraffeqlObjectType, ObjectTypeDefinition } from "giraffeql"; +import { + generateIdField, + generateCreatedAtField, + generateUpdatedAtField, + generateTypenameField, + generateIntegerField, + generateUnixTimestampField, + generateCreatedByField, + generateStringField, +} from "../../core/helpers/typeDef"; + +export default new GiraffeqlObjectType({ + name: LegacyRecord.typename, + description: "Legacy Record", + fields: { + ...generateIdField(), + ...generateTypenameField(LegacyRecord), + wcaEventId: generateStringField({ + allowNull: true, + sqlOptions: { field: "wca_event_id" }, + }), + recordType: generateIntegerField({ + allowNull: false, + sqlOptions: { field: "record_type" }, + }), + numberOfSolves: generateIntegerField({ + allowNull: false, + sqlOptions: { field: "number_of_solves" }, + }), + result: generateIntegerField({ + allowNull: false, + }), + otherEventName: generateStringField({ + allowNull: true, + sqlOptions: { field: "other_event_name" }, + }), + mainCube: generateStringField({ + allowNull: true, + sqlOptions: { field: "main_cube" }, + }), + eventType: generateIntegerField({ + allowNull: false, + sqlOptions: { field: "event_type" }, + }), + date: generateUnixTimestampField({ + allowNull: true, + }), + email: generateStringField({ + allowNull: false, + }), + ...generateCreatedAtField(), + ...generateUpdatedAtField(), + ...generateCreatedByField(User), + }, +}); diff --git a/backend/functions/src/schema/services.ts b/backend/functions/src/schema/services.ts index 4e75cb0..a97210d 100644 --- a/backend/functions/src/schema/services.ts +++ b/backend/functions/src/schema/services.ts @@ -7,6 +7,7 @@ import { EventService } from "./models/event/service"; import { ProductService } from "./models/product/service"; import { PersonalBestClassService } from "./models/personalBestClass/service"; import { PersonalBestService } from "./models/personalBest/service"; +import { LegacyRecordService } from "./models/legacyRecord/service"; import { GithubService } from "./models/github/service"; import { ApiKeyService } from "./models/apiKey/service"; @@ -18,6 +19,7 @@ export const Product = new ProductService(); export const Auth = new AuthService(); export const PersonalBestClass = new PersonalBestClassService(); export const PersonalBest = new PersonalBestService(); +export const LegacyRecord = new LegacyRecordService(); export const ApiKey = new ApiKeyService(); export const Github = new GithubService(); diff --git a/backend/functions/src/types/index.ts b/backend/functions/src/types/index.ts index 34d25cd..3e65532 100644 --- a/backend/functions/src/types/index.ts +++ b/backend/functions/src/types/index.ts @@ -62,7 +62,7 @@ export type ServiceFunctionInputs = { req: Request; fieldPath: string[]; args: any; - query?: unknown; + query?: any; data?: any; isAdmin?: boolean; }; diff --git a/frontend/components/menu/recordActionMenu.vue b/frontend/components/menu/recordActionMenu.vue index 6167e44..2f5372a 100644 --- a/frontend/components/menu/recordActionMenu.vue +++ b/frontend/components/menu/recordActionMenu.vue @@ -23,7 +23,7 @@ diff --git a/frontend/components/page/preset/legacyRecordPagePreset.vue b/frontend/components/page/preset/legacyRecordPagePreset.vue new file mode 100644 index 0000000..5b93e81 --- /dev/null +++ b/frontend/components/page/preset/legacyRecordPagePreset.vue @@ -0,0 +1,81 @@ + + + diff --git a/frontend/models/index.ts b/frontend/models/index.ts index 313d038..8b87016 100644 --- a/frontend/models/index.ts +++ b/frontend/models/index.ts @@ -4,5 +4,6 @@ export { PersonalBestClass } from './personalBestClass' export { Product } from './product' export { User } from './user' export { ApiKey } from './apiKey' +export { LegacyRecord } from './legacyRecord' export { UserUserFollowLink } from './userUserFollowLink' diff --git a/frontend/models/legacyRecord.ts b/frontend/models/legacyRecord.ts new file mode 100644 index 0000000..5b80c65 --- /dev/null +++ b/frontend/models/legacyRecord.ts @@ -0,0 +1,166 @@ +import type { RecordInfo } from '~/types' +import { generateDateLocaleString } from '~/services/base' + +export const LegacyRecord = >{ + typename: 'legacyRecord', + pluralTypename: 'legacyRecord', + name: 'Legacy Record', + pluralName: 'Legacy Records', + icon: 'mdi-view-list', + routeName: 'a-view', + // renderItem: (item) => item.name, + fields: { + id: { + text: 'ID', + }, + wcaEventId: { + text: 'WCA Event ID', + }, + recordType: { + text: 'Record Type', + }, + numberOfSolves: { + text: 'Number of Solves', + }, + result: { + text: 'Result', + }, + otherEventName: { + text: 'Other Event Name', + }, + mainCube: { + text: 'Main Cube', + }, + eventType: { + text: 'Event Type', + }, + date: { + text: 'Date', + inputType: 'datepicker', + serialize: generateDateLocaleString, + parseValue: (val: string) => { + if (!val) return null + + const msTimestamp = new Date(val).getTime() + + return msTimestamp / 1000 + }, + parseImportValue: (val: string) => { + if (!val) return null + + const msTimestamp = new Date(val).getTime() + + return msTimestamp / 1000 + }, + }, + email: { + text: 'Email', + }, + }, + paginationOptions: { + hasSearch: false, + filters: [ + { + field: 'email', + operator: 'eq', + }, + ], + headers: [ + { + field: 'wcaEventId', + sortable: false, + width: '150px', + }, + { + field: 'recordType', + sortable: false, + width: '100px', + }, + { + field: 'numberOfSolves', + sortable: false, + width: '150px', + }, + { + field: 'result', + sortable: false, + width: '200px', + }, + { + field: 'otherEventName', + sortable: false, + width: '250px', + }, + { + field: 'mainCube', + sortable: false, + }, + { + field: 'eventType', + sortable: false, + width: '100px', + }, + { + field: 'date', + sortable: false, + }, + ], + downloadOptions: {}, + }, + addOptions: { + fields: [ + 'wcaEventId', + 'recordType', + 'numberOfSolves', + 'result', + 'otherEventName', + 'mainCube', + 'eventType', + 'date', + 'email', + ], + }, + editOptions: { + fields: [ + 'wcaEventId', + 'recordType', + 'numberOfSolves', + 'result', + 'otherEventName', + 'mainCube', + 'eventType', + 'date', + 'email', + ], + }, + viewOptions: { + fields: [ + 'wcaEventId', + 'recordType', + 'numberOfSolves', + 'result', + 'otherEventName', + 'mainCube', + 'eventType', + 'date', + 'email', + ], + }, + deleteOptions: {}, + shareOptions: undefined, + importOptions: { + fields: [ + 'wcaEventId', + 'recordType', + 'numberOfSolves', + 'result', + 'otherEventName', + 'mainCube', + 'eventType', + 'date', + 'email', + ], + }, + + expandTypes: [], +} diff --git a/frontend/models/special/index.ts b/frontend/models/special/index.ts index c6d161b..66e3eaa 100644 --- a/frontend/models/special/index.ts +++ b/frontend/models/special/index.ts @@ -5,4 +5,6 @@ export { PublicEvents } from './publicEvents' export { MyProfile } from './myProfile' export { PublicFollows } from './publicFollows' +export { PublicLegacyRecords } from './publicLegacyRecords' + export { MyApiKeys } from './myApiKeys' diff --git a/frontend/models/special/publicLegacyRecords.ts b/frontend/models/special/publicLegacyRecords.ts new file mode 100644 index 0000000..3bcd3eb --- /dev/null +++ b/frontend/models/special/publicLegacyRecords.ts @@ -0,0 +1,25 @@ +import { LegacyRecord } from '..' + +export const PublicLegacyRecords = { + ...LegacyRecord, + paginationOptions: { + ...LegacyRecord.paginationOptions, + downloadOptions: undefined, + }, + editOptions: undefined, + addOptions: undefined, + deleteOptions: undefined, + importOptions: undefined, + viewOptions: { + fields: [ + 'wcaEventId', + 'recordType', + 'numberOfSolves', + 'result', + 'otherEventName', + 'mainCube', + 'eventType', + 'date', + ], + }, +} diff --git a/frontend/pages/index.vue b/frontend/pages/index.vue index f626755..67f93ef 100644 --- a/frontend/pages/index.vue +++ b/frontend/pages/index.vue @@ -35,9 +35,12 @@

If you saved your PBs on the previous version of CubePB and need - to get access to your PB data, please email hello@cubepb.com with - the email address associated with your old CubePB.com account, and - we'll try to recover the data for you in a spreadsheet format. + to get access to your PB data, please go to the + Legacy Record Lookup + page, where you can lookup your old CubePB records using your + email address.

CubePB.com is made possible with support from diff --git a/frontend/pages/legacy-record-lookup.vue b/frontend/pages/legacy-record-lookup.vue new file mode 100644 index 0000000..09c8e37 --- /dev/null +++ b/frontend/pages/legacy-record-lookup.vue @@ -0,0 +1,59 @@ + + + diff --git a/frontend/types/schema.ts b/frontend/types/schema.ts index be85009..0863ee2 100644 --- a/frontend/types/schema.ts +++ b/frontend/types/schema.ts @@ -123,6 +123,8 @@ export type FilterByField = { | 'happenedOn' | 'isCurrent' personalBestGroupByKey: undefined + legacyRecordSortByKey: 'id' + legacyRecordGroupByKey: undefined apiKeySortByKey: 'id' | 'createdAt' apiKeyGroupByKey: undefined userUserFollowLinkSortByKey: 'createdAt' @@ -354,6 +356,49 @@ export type FilterByField = { fields: InputTypes['updatePersonalBestFields'] } flagPersonalBest: { item: InputTypes['personalBest'] } + legacyRecord: { id?: Scalars['id'] } + 'legacyRecordFilterByField/id': FilterByField + 'legacyRecordFilterByField/email': FilterByField + legacyRecordFilterByObject: { + id?: InputTypes['legacyRecordFilterByField/id'] + email?: InputTypes['legacyRecordFilterByField/email'] + } + legacyRecordPaginator: { + first?: Scalars['number'] + last?: Scalars['number'] + after?: Scalars['string'] + before?: Scalars['string'] + sortBy?: Scalars['legacyRecordSortByKey'][] + sortDesc?: Scalars['boolean'][] + filterBy?: InputTypes['legacyRecordFilterByObject'][] + groupBy?: Scalars['legacyRecordGroupByKey'][] + } + createLegacyRecord: { + wcaEventId?: Scalars['string'] | null + recordType: Scalars['number'] + numberOfSolves: Scalars['number'] + result: Scalars['number'] + otherEventName?: Scalars['string'] | null + mainCube?: Scalars['string'] | null + eventType: Scalars['number'] + date?: Scalars['unixTimestamp'] | null + email: Scalars['string'] + } + updateLegacyRecordFields: { + wcaEventId?: Scalars['string'] | null + recordType?: Scalars['number'] + numberOfSolves?: Scalars['number'] + result?: Scalars['number'] + otherEventName?: Scalars['string'] | null + mainCube?: Scalars['string'] | null + eventType?: Scalars['number'] + date?: Scalars['unixTimestamp'] | null + email?: Scalars['string'] + } + updateLegacyRecord: { + item: InputTypes['legacyRecord'] + fields: InputTypes['updateLegacyRecordFields'] + } apiKey: { id?: Scalars['id'] } 'apiKeyFilterByField/id': FilterByField 'apiKeyFilterByField/user.id': FilterByField @@ -437,6 +482,14 @@ export type FilterByField = { Typename: 'personalBestPaginator' Type: GetType } + legacyRecordEdge: { + Typename: 'legacyRecordEdge' + Type: GetType + } + legacyRecordPaginator: { + Typename: 'legacyRecordPaginator' + Type: GetType + } apiKeyEdge: { Typename: 'apiKeyEdge'; Type: GetType } apiKeyPaginator: { Typename: 'apiKeyPaginator' @@ -471,6 +524,7 @@ export type FilterByField = { Type: GetType } personalBest: { Typename: 'personalBest'; Type: GetType } + legacyRecord: { Typename: 'legacyRecord'; Type: GetType } apiKey: { Typename: 'apiKey'; Type: GetType } } /**PaginatorInfo Type*/ export type PaginatorInfo = { @@ -528,6 +582,15 @@ export type PersonalBestEdge = Edge paginatorInfo: { Type: PaginatorInfo; Args: undefined } edges: { Type: PersonalBestEdge[]; Args: undefined } } +export type LegacyRecordEdge = Edge +/**Paginator*/ export type LegacyRecordPaginator = { + /**The typename of the record*/ __typename: { + Type: Scalars['string'] + Args: [Scalars['number']] + } + paginatorInfo: { Type: PaginatorInfo; Args: undefined } + edges: { Type: LegacyRecordEdge[]; Args: undefined } +} export type ApiKeyEdge = Edge /**Paginator*/ export type ApiKeyPaginator = { /**The typename of the record*/ __typename: { @@ -722,6 +785,31 @@ export type UserUserFollowLinkEdge = Edge } createdBy: { Type: User; Args: undefined } } +/**Legacy Record*/ export type LegacyRecord = { + /**The unique ID of the field*/ id: { Type: Scalars['id']; Args: undefined } + /**The typename of the record*/ __typename: { + Type: Scalars['string'] + Args: [Scalars['number']] + } + wcaEventId: { Type: Scalars['string'] | null; Args: undefined } + recordType: { Type: Scalars['number']; Args: undefined } + numberOfSolves: { Type: Scalars['number']; Args: undefined } + result: { Type: Scalars['number']; Args: undefined } + otherEventName: { Type: Scalars['string'] | null; Args: undefined } + mainCube: { Type: Scalars['string'] | null; Args: undefined } + eventType: { Type: Scalars['number']; Args: undefined } + date: { Type: Scalars['unixTimestamp'] | null; Args: undefined } + email: { Type: Scalars['string']; Args: undefined } + /**When the record was created*/ createdAt: { + Type: Scalars['unixTimestamp'] + Args: undefined + } + /**When the record was last updated*/ updatedAt: { + Type: Scalars['unixTimestamp'] | null + Args: undefined + } + createdBy: { Type: User; Args: undefined } +} /**API Key Type*/ export type ApiKey = { /**The unique ID of the field*/ id: { Type: Scalars['id']; Args: undefined } /**The typename of the record*/ __typename: { @@ -809,6 +897,20 @@ export type UserUserFollowLinkEdge = Edge Type: PersonalBest Args: InputTypes['flagPersonalBest'] } + getLegacyRecord: { Type: LegacyRecord; Args: InputTypes['legacyRecord'] } + getLegacyRecordPaginator: { + Type: LegacyRecordPaginator + Args: InputTypes['legacyRecordPaginator'] + } + deleteLegacyRecord: { Type: LegacyRecord; Args: InputTypes['legacyRecord'] } + createLegacyRecord: { + Type: LegacyRecord + Args: InputTypes['createLegacyRecord'] + } + updateLegacyRecord: { + Type: LegacyRecord + Args: InputTypes['updateLegacyRecord'] + } getApiKey: { Type: ApiKey; Args: InputTypes['apiKey'] } getApiKeyPaginator: { Type: ApiKeyPaginator