import { GraphQLClient } from 'graphql-request'; import * as Dom from 'graphql-request/dist/types.dom'; import gql from 'graphql-tag'; export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID: string; String: string; Boolean: boolean; Int: number; Float: number; ISO8601DateTime: any; JSON: any; }; export type ApiToken = { __typename?: 'ApiToken'; createdAt: Scalars['ISO8601DateTime']; expiresAt?: Maybe; id: Scalars['ID']; lastUsedAt?: Maybe; metadata?: Maybe; name?: Maybe; token?: Maybe; transient?: Maybe; updatedAt: Scalars['ISO8601DateTime']; userId: Scalars['Int']; }; export type Association = { __typename?: 'Association'; ams?: Maybe; createdAt: Scalars['ISO8601DateTime']; id: Scalars['ID']; name?: Maybe; ramcoApiKey?: Maybe; rapattoniClientId?: Maybe; rapattoniCustomer?: Maybe; thinkificApiKey?: Maybe; thinkificSubdomain?: Maybe; updatedAt: Scalars['ISO8601DateTime']; users: Array; }; /** The connection type for Association. */ export type AssociationConnection = { __typename?: 'AssociationConnection'; /** A list of edges. */ edges?: Maybe>>; /** A list of nodes. */ nodes?: Maybe>>; /** Information to aid in pagination. */ pageInfo: PageInfo; }; /** An edge in a connection. */ export type AssociationEdge = { __typename?: 'AssociationEdge'; /** A cursor for use in pagination. */ cursor: Scalars['String']; /** The item at the end of the edge. */ node?: Maybe; }; export type CalendarItem = { __typename?: 'CalendarItem'; allowGroupRegistrations?: Maybe; ams?: Maybe; amsPrimaryKey?: Maybe; amsType?: Maybe; associationId: Scalars['Int']; availableToMemberTypes?: Maybe; beginDate?: Maybe; checkinCount: Scalars['Int']; checkins?: Maybe>; checkoutCount: Scalars['Int']; checkouts?: Maybe>; classType?: Maybe; createdAt: Scalars['ISO8601DateTime']; deliveryMethod?: Maybe; description?: Maybe; descriptionText?: Maybe; endDate?: Maybe; externalRegistrationLink?: Maybe; fees?: Maybe; id: Scalars['ID']; instructor?: Maybe; location?: Maybe; maxRegistrations?: Maybe; name?: Maybe; outsideProvider?: Maybe; outsideProviderLink?: Maybe; outsideProviderMessage?: Maybe; published?: Maybe; ramcoCreatedAt?: Maybe; ramcoEntityId?: Maybe; ramcoEntityType?: Maybe; ramcoUpdatedAt?: Maybe; registrations?: Maybe>; rialtoCourseType?: Maybe; rialtoMaterialsLink?: Maybe; rialtoSponsorArtLink?: Maybe; rialtoSurveyLink?: Maybe; rialtoTemplate?: Maybe; sponsors?: Maybe; summary?: Maybe; tags?: Maybe; thinkificCourse?: Maybe; thinkificCourseId?: Maybe; thinkificPrototypeId?: Maybe; totalRegistrations?: Maybe; updatedAt: Scalars['ISO8601DateTime']; url?: Maybe; }; /** The connection type for CalendarItem. */ export type CalendarItemConnection = { __typename?: 'CalendarItemConnection'; /** A list of edges. */ edges?: Maybe>>; /** A list of nodes. */ nodes?: Maybe>>; /** Information to aid in pagination. */ pageInfo: PageInfo; }; /** An edge in a connection. */ export type CalendarItemEdge = { __typename?: 'CalendarItemEdge'; /** A cursor for use in pagination. */ cursor: Scalars['String']; /** The item at the end of the edge. */ node?: Maybe; }; /** Autogenerated input type of Checkin */ export type CheckinInput = { /** A unique identifier for the client performing the mutation. */ clientMutationId?: InputMaybe; ids: Array; }; /** Autogenerated return type of Checkin */ export type CheckinPayload = { __typename?: 'CheckinPayload'; /** A unique identifier for the client performing the mutation. */ clientMutationId?: Maybe; registrations: Array; }; /** Autogenerated input type of Checkout */ export type CheckoutInput = { /** A unique identifier for the client performing the mutation. */ clientMutationId?: InputMaybe; ids: Array; }; /** Autogenerated return type of Checkout */ export type CheckoutPayload = { __typename?: 'CheckoutPayload'; /** A unique identifier for the client performing the mutation. */ clientMutationId?: Maybe; registrations: Array; }; /** Autogenerated input type of ClearCheckin */ export type ClearCheckinInput = { /** A unique identifier for the client performing the mutation. */ clientMutationId?: InputMaybe; ids: Array; }; /** Autogenerated return type of ClearCheckin */ export type ClearCheckinPayload = { __typename?: 'ClearCheckinPayload'; /** A unique identifier for the client performing the mutation. */ clientMutationId?: Maybe; registrations: Array; }; /** Autogenerated input type of ClearCheckout */ export type ClearCheckoutInput = { /** A unique identifier for the client performing the mutation. */ clientMutationId?: InputMaybe; ids: Array; }; /** Autogenerated return type of ClearCheckout */ export type ClearCheckoutPayload = { __typename?: 'ClearCheckoutPayload'; /** A unique identifier for the client performing the mutation. */ clientMutationId?: Maybe; registrations: Array; }; /** Autogenerated input type of InviteUser */ export type InviteUserInput = { associationId: Scalars['String']; /** A unique identifier for the client performing the mutation. */ clientMutationId?: InputMaybe; email: Scalars['String']; firstName: Scalars['String']; lastName: Scalars['String']; }; /** Autogenerated return type of InviteUser */ export type InviteUserPayload = { __typename?: 'InviteUserPayload'; /** A unique identifier for the client performing the mutation. */ clientMutationId?: Maybe; success: Scalars['Boolean']; }; /** Autogenerated input type of LinkEventToThinkific */ export type LinkEventToThinkificInput = { /** A unique identifier for the client performing the mutation. */ clientMutationId?: InputMaybe; id: Scalars['String']; thinkificId: Scalars['String']; }; /** Autogenerated return type of LinkEventToThinkific */ export type LinkEventToThinkificPayload = { __typename?: 'LinkEventToThinkificPayload'; calendarItem: CalendarItem; /** A unique identifier for the client performing the mutation. */ clientMutationId?: Maybe; }; /** Autogenerated input type of Login */ export type LoginInput = { /** A unique identifier for the client performing the mutation. */ clientMutationId?: InputMaybe; email: Scalars['String']; password: Scalars['String']; }; /** Autogenerated return type of Login */ export type LoginPayload = { __typename?: 'LoginPayload'; /** A unique identifier for the client performing the mutation. */ clientMutationId?: Maybe; token: ApiToken; }; export type Member = { __typename?: 'Member'; email: Scalars['String']; firstName: Scalars['String']; id: Scalars['ID']; lastName: Scalars['String']; }; export type Mutation = { __typename?: 'Mutation'; checkin?: Maybe; checkout?: Maybe; clearCheckin?: Maybe; clearCheckout?: Maybe; inviteUser?: Maybe; linkEventToThinkific?: Maybe; login?: Maybe; refreshCalendarFromAms?: Maybe; sendLoginCode?: Maybe; ssoLogin?: Maybe; verifyLoginCode?: Maybe; }; export type MutationCheckinArgs = { input: CheckinInput; }; export type MutationCheckoutArgs = { input: CheckoutInput; }; export type MutationClearCheckinArgs = { input: ClearCheckinInput; }; export type MutationClearCheckoutArgs = { input: ClearCheckoutInput; }; export type MutationInviteUserArgs = { input: InviteUserInput; }; export type MutationLinkEventToThinkificArgs = { input: LinkEventToThinkificInput; }; export type MutationLoginArgs = { input: LoginInput; }; export type MutationRefreshCalendarFromAmsArgs = { input: RefreshCalendarFromAmsInput; }; export type MutationSendLoginCodeArgs = { input: SendLoginCodeInput; }; export type MutationSsoLoginArgs = { input: SsoLoginInput; }; export type MutationVerifyLoginCodeArgs = { input: VerifyLoginCodeInput; }; /** Information about pagination in a connection. */ export type PageInfo = { __typename?: 'PageInfo'; /** When paginating forwards, the cursor to continue. */ endCursor?: Maybe; /** When paginating forwards, are there more items? */ hasNextPage: Scalars['Boolean']; /** When paginating backwards, are there more items? */ hasPreviousPage: Scalars['Boolean']; /** When paginating backwards, the cursor to continue. */ startCursor?: Maybe; }; export type Query = { __typename?: 'Query'; association?: Maybe; associations: AssociationConnection; calendarItem?: Maybe; calendarItems: CalendarItemConnection; currentUser?: Maybe; ramcoSetupReport?: Maybe; searchMembers?: Maybe>; thinkificCourses?: Maybe; }; export type QueryAssociationArgs = { id: Scalars['ID']; }; export type QueryAssociationsArgs = { after?: InputMaybe; before?: InputMaybe; first?: InputMaybe; last?: InputMaybe; }; export type QueryCalendarItemArgs = { id: Scalars['ID']; }; export type QueryCalendarItemsArgs = { after?: InputMaybe; associationId: Scalars['ID']; before?: InputMaybe; beginDateGt?: InputMaybe; beginDateLt?: InputMaybe; first?: InputMaybe; last?: InputMaybe; query?: InputMaybe; }; export type QueryRamcoSetupReportArgs = { associationId: Scalars['ID']; }; export type QuerySearchMembersArgs = { associationId: Scalars['ID']; query: Scalars['String']; }; export type QueryThinkificCoursesArgs = { after?: InputMaybe; associationId: Scalars['ID']; before?: InputMaybe; first?: InputMaybe; last?: InputMaybe; }; export type RamcoSetupReport = { __typename?: 'RamcoSetupReport'; errors?: Maybe>; }; /** Autogenerated input type of RefreshCalendarFromAms */ export type RefreshCalendarFromAmsInput = { /** A unique identifier for the client performing the mutation. */ clientMutationId?: InputMaybe; id: Scalars['String']; }; /** Autogenerated return type of RefreshCalendarFromAms */ export type RefreshCalendarFromAmsPayload = { __typename?: 'RefreshCalendarFromAmsPayload'; calendarItem: CalendarItem; /** A unique identifier for the client performing the mutation. */ clientMutationId?: Maybe; }; export type Registration = { __typename?: 'Registration'; amsContactId?: Maybe; amsRegistrationId?: Maybe; cancelledAt?: Maybe; checkedInAt?: Maybe; checkedOutAt?: Maybe; companionFirstName?: Maybe; companionLastName?: Maybe; contactName?: Maybe; couponId?: Maybe; createdAt: Scalars['ISO8601DateTime']; id: Scalars['ID']; parentId?: Maybe; paymentErrorAt?: Maybe; paymentErrorMessage?: Maybe; paymentId?: Maybe; ramcoContactId?: Maybe; ramcoCreatedAt?: Maybe; ramcoEntityId?: Maybe; ramcoEntityType?: Maybe; ramcoRegistrationFeeId?: Maybe; ramcoRegistrationId?: Maybe; ramcoUpdatedAt?: Maybe; refundAmount?: Maybe; refundId?: Maybe; statusCode?: Maybe; statusCodeName?: Maybe; stripeAccountId?: Maybe; stripePaymentId?: Maybe; stripeSessionId?: Maybe; thinkificCourseId?: Maybe; thinkificEnrollmentId?: Maybe; updatedAt: Scalars['ISO8601DateTime']; userId?: Maybe; }; /** Autogenerated input type of SendLoginCode */ export type SendLoginCodeInput = { /** A unique identifier for the client performing the mutation. */ clientMutationId?: InputMaybe; email: Scalars['String']; }; /** Autogenerated return type of SendLoginCode */ export type SendLoginCodePayload = { __typename?: 'SendLoginCodePayload'; /** A unique identifier for the client performing the mutation. */ clientMutationId?: Maybe; success: Scalars['Boolean']; }; /** Autogenerated input type of SsoLogin */ export type SsoLoginInput = { associationId: Scalars['ID']; /** A unique identifier for the client performing the mutation. */ clientMutationId?: InputMaybe; }; /** Autogenerated return type of SsoLogin */ export type SsoLoginPayload = { __typename?: 'SsoLoginPayload'; /** A unique identifier for the client performing the mutation. */ clientMutationId?: Maybe; redirectUrl: Scalars['String']; }; export type ThinkificCourse = { __typename?: 'ThinkificCourse'; associationId?: Maybe; createdAt: Scalars['ISO8601DateTime']; id: Scalars['ID']; name?: Maybe; slug?: Maybe; subdomain?: Maybe; thinkificId?: Maybe; updatedAt: Scalars['ISO8601DateTime']; }; /** The connection type for ThinkificCourse. */ export type ThinkificCourseConnection = { __typename?: 'ThinkificCourseConnection'; /** A list of edges. */ edges?: Maybe>>; /** A list of nodes. */ nodes?: Maybe>>; /** Information to aid in pagination. */ pageInfo: PageInfo; }; /** An edge in a connection. */ export type ThinkificCourseEdge = { __typename?: 'ThinkificCourseEdge'; /** A cursor for use in pagination. */ cursor: Scalars['String']; /** The item at the end of the edge. */ node?: Maybe; }; export type User = { __typename?: 'User'; associations: Array; createdAt: Scalars['ISO8601DateTime']; currentSignInAt?: Maybe; currentSignInIp?: Maybe; email: Scalars['String']; encryptedPassword: Scalars['String']; firstName: Scalars['String']; id: Scalars['ID']; lastName: Scalars['String']; lastSignInAt?: Maybe; lastSignInIp?: Maybe; rememberCreatedAt?: Maybe; resetPasswordSentAt?: Maybe; resetPasswordToken?: Maybe; signInCount: Scalars['Int']; updatedAt: Scalars['ISO8601DateTime']; }; /** Autogenerated input type of VerifyLoginCode */ export type VerifyLoginCodeInput = { /** A unique identifier for the client performing the mutation. */ clientMutationId?: InputMaybe; code: Scalars['String']; email: Scalars['String']; }; /** Autogenerated return type of VerifyLoginCode */ export type VerifyLoginCodePayload = { __typename?: 'VerifyLoginCodePayload'; /** A unique identifier for the client performing the mutation. */ clientMutationId?: Maybe; token?: Maybe; }; export type LoginMutationVariables = Exact<{ input: SsoLoginInput; }>; export type LoginMutation = { __typename?: 'Mutation', ssoLogin?: { __typename?: 'SsoLoginPayload', redirectUrl: string } | null }; export type CalendarItemsQueryVariables = Exact<{ associationId: Scalars['ID']; }>; export type CalendarItemsQuery = { __typename?: 'Query', calendarItems: { __typename?: 'CalendarItemConnection', nodes?: Array<{ __typename?: 'CalendarItem', id: string, amsPrimaryKey?: string | null, name?: string | null, summary?: string | null, description?: string | null, descriptionText?: string | null, beginDate?: any | null, endDate?: any | null, totalRegistrations?: number | null, checkinCount: number, checkoutCount: number, ams?: { __typename?: 'Association', id: string, name?: string | null, ams?: string | null } | null } | null> | null } }; export const LoginDocument = gql` mutation Login($input: SsoLoginInput!) { ssoLogin(input: $input) { redirectUrl } } `; export const CalendarItemsDocument = gql` query CalendarItems($associationId: ID!) { calendarItems(associationId: $associationId) { nodes { id amsPrimaryKey name summary description descriptionText beginDate endDate totalRegistrations checkinCount checkoutCount ams { id name ams } } } } `; export type SdkFunctionWrapper = (action: (requestHeaders?:Record) => Promise, operationName: string, operationType?: string) => Promise; const defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType) => action(); export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) { return { Login(variables: LoginMutationVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise { return withWrapper((wrappedRequestHeaders) => client.request(LoginDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'Login', 'mutation'); }, CalendarItems(variables: CalendarItemsQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise { return withWrapper((wrappedRequestHeaders) => client.request(CalendarItemsDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'CalendarItems', 'query'); } }; } export type Sdk = ReturnType;