@moneypot/hub 0.0.1
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/README.md +108 -0
- package/dist/cli/add-casino.d.ts +2 -0
- package/dist/cli/add-casino.js +116 -0
- package/dist/dashboard/assets/index-BtrbrisP.js +360 -0
- package/dist/dashboard/assets/index-tK7EUtyc.css +5 -0
- package/dist/dashboard/index.html +13 -0
- package/dist/src/GraphQLError.d.ts +8 -0
- package/dist/src/GraphQLError.js +79 -0
- package/dist/src/__generated__/fragment-masking.d.ts +19 -0
- package/dist/src/__generated__/fragment-masking.js +16 -0
- package/dist/src/__generated__/gql.d.ts +26 -0
- package/dist/src/__generated__/gql.js +15 -0
- package/dist/src/__generated__/graphql.d.ts +3129 -0
- package/dist/src/__generated__/graphql.js +454 -0
- package/dist/src/__generated__/index.d.ts +2 -0
- package/dist/src/__generated__/index.js +2 -0
- package/dist/src/config.d.ts +14 -0
- package/dist/src/config.js +57 -0
- package/dist/src/db/index.d.ts +89 -0
- package/dist/src/db/index.js +339 -0
- package/dist/src/db/internal.d.ts +7 -0
- package/dist/src/db/internal.js +33 -0
- package/dist/src/db/public.d.ts +7 -0
- package/dist/src/db/public.js +20 -0
- package/dist/src/db/types.d.ts +80 -0
- package/dist/src/db/types.js +1 -0
- package/dist/src/db/util.d.ts +6 -0
- package/dist/src/db/util.js +9 -0
- package/dist/src/express.d.ts +13 -0
- package/dist/src/express.js +1 -0
- package/dist/src/grafast.d.ts +1 -0
- package/dist/src/grafast.js +1 -0
- package/dist/src/graphile.d.ts +1 -0
- package/dist/src/graphile.js +1 -0
- package/dist/src/graphql-client.d.ts +6 -0
- package/dist/src/graphql-client.js +8 -0
- package/dist/src/graphql-queries.d.ts +18 -0
- package/dist/src/graphql-queries.js +123 -0
- package/dist/src/graphql.d.ts +1 -0
- package/dist/src/graphql.js +1 -0
- package/dist/src/index.d.ts +15 -0
- package/dist/src/index.js +65 -0
- package/dist/src/logger.d.ts +9 -0
- package/dist/src/logger.js +21 -0
- package/dist/src/pg-versions/001-schema.sql +456 -0
- package/dist/src/plugins/caas-add-casino.d.ts +1 -0
- package/dist/src/plugins/caas-add-casino.js +150 -0
- package/dist/src/plugins/caas-authenticate.d.ts +1 -0
- package/dist/src/plugins/caas-authenticate.js +175 -0
- package/dist/src/plugins/caas-balance-alert.d.ts +1 -0
- package/dist/src/plugins/caas-balance-alert.js +43 -0
- package/dist/src/plugins/caas-claim-faucet.d.ts +1 -0
- package/dist/src/plugins/caas-claim-faucet.js +85 -0
- package/dist/src/plugins/caas-current-x.d.ts +1 -0
- package/dist/src/plugins/caas-current-x.js +62 -0
- package/dist/src/plugins/caas-schema-prefix.d.ts +1 -0
- package/dist/src/plugins/caas-schema-prefix.js +25 -0
- package/dist/src/plugins/caas-user-balance-by-currency.d.ts +1 -0
- package/dist/src/plugins/caas-user-balance-by-currency.js +55 -0
- package/dist/src/plugins/caas-withdraw.d.ts +1 -0
- package/dist/src/plugins/caas-withdraw.js +133 -0
- package/dist/src/plugins/debug.d.ts +1 -0
- package/dist/src/plugins/debug.js +14 -0
- package/dist/src/plugins/hub-add-casino.d.ts +1 -0
- package/dist/src/plugins/hub-add-casino.js +150 -0
- package/dist/src/plugins/hub-authenticate.d.ts +1 -0
- package/dist/src/plugins/hub-authenticate.js +175 -0
- package/dist/src/plugins/hub-balance-alert.d.ts +1 -0
- package/dist/src/plugins/hub-balance-alert.js +43 -0
- package/dist/src/plugins/hub-claim-faucet.d.ts +1 -0
- package/dist/src/plugins/hub-claim-faucet.js +85 -0
- package/dist/src/plugins/hub-current-x.d.ts +1 -0
- package/dist/src/plugins/hub-current-x.js +62 -0
- package/dist/src/plugins/hub-schema-prefix.d.ts +1 -0
- package/dist/src/plugins/hub-schema-prefix.js +25 -0
- package/dist/src/plugins/hub-user-balance-by-currency.d.ts +1 -0
- package/dist/src/plugins/hub-user-balance-by-currency.js +55 -0
- package/dist/src/plugins/hub-withdraw.d.ts +1 -0
- package/dist/src/plugins/hub-withdraw.js +133 -0
- package/dist/src/plugins/id-to-node-id.d.ts +1 -0
- package/dist/src/plugins/id-to-node-id.js +31 -0
- package/dist/src/plugins/validate-fields.d.ts +1 -0
- package/dist/src/plugins/validate-fields.js +61 -0
- package/dist/src/process-transfers.d.ts +7 -0
- package/dist/src/process-transfers.js +413 -0
- package/dist/src/process-withdrawal-request.d.ts +5 -0
- package/dist/src/process-withdrawal-request.js +129 -0
- package/dist/src/server/graphile.config.d.ts +33 -0
- package/dist/src/server/graphile.config.js +166 -0
- package/dist/src/server/handle-errors.d.ts +10 -0
- package/dist/src/server/handle-errors.js +88 -0
- package/dist/src/server/index.d.ts +2 -0
- package/dist/src/server/index.js +69 -0
- package/dist/src/server/middleware/authentication.d.ts +4 -0
- package/dist/src/server/middleware/authentication.js +55 -0
- package/dist/src/server/middleware/cors.d.ts +3 -0
- package/dist/src/server/middleware/cors.js +14 -0
- package/dist/src/services/jwt-service.d.ts +13 -0
- package/dist/src/services/jwt-service.js +131 -0
- package/dist/src/smart-tags.d.ts +1 -0
- package/dist/src/smart-tags.js +55 -0
- package/dist/src/util.d.ts +12 -0
- package/dist/src/util.js +4 -0
- package/dist/src/validate.d.ts +9 -0
- package/dist/src/validate.js +91 -0
- package/package.json +69 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { GraphQLError } from "graphql";
|
|
2
|
+
export function isGraphQLError(error) {
|
|
3
|
+
if (error instanceof GraphQLError) {
|
|
4
|
+
return true;
|
|
5
|
+
}
|
|
6
|
+
if (error && typeof error === "object") {
|
|
7
|
+
const clientError = error;
|
|
8
|
+
if (clientError.response?.errors?.length > 0 &&
|
|
9
|
+
clientError.request?.query &&
|
|
10
|
+
clientError.request?.variables) {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
if (clientError.response?.errors?.length > 0) {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
if (Array.isArray(clientError.graphQLErrors) &&
|
|
17
|
+
clientError.graphQLErrors.length > 0) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
if ("message" in clientError &&
|
|
21
|
+
"locations" in clientError &&
|
|
22
|
+
"path" in clientError &&
|
|
23
|
+
"extensions" in clientError) {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
export function extractGraphQLErrorInfo(error) {
|
|
30
|
+
if (error instanceof GraphQLError) {
|
|
31
|
+
return {
|
|
32
|
+
message: error.message,
|
|
33
|
+
code: error.extensions?.code,
|
|
34
|
+
extensions: error.extensions,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
const anyError = error;
|
|
38
|
+
if (anyError.response?.errors?.[0] &&
|
|
39
|
+
anyError.request?.query &&
|
|
40
|
+
anyError.request?.variables) {
|
|
41
|
+
const gqlError = anyError.response.errors[0];
|
|
42
|
+
return {
|
|
43
|
+
message: gqlError.message,
|
|
44
|
+
code: gqlError.extensions?.code,
|
|
45
|
+
extensions: gqlError.extensions,
|
|
46
|
+
originalError: error,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
if (anyError.response?.errors?.[0]) {
|
|
50
|
+
const gqlError = anyError.response.errors[0];
|
|
51
|
+
return {
|
|
52
|
+
message: gqlError.message,
|
|
53
|
+
code: gqlError.extensions?.code,
|
|
54
|
+
extensions: gqlError.extensions,
|
|
55
|
+
originalError: error,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
if (Array.isArray(anyError.graphQLErrors) && anyError.graphQLErrors[0]) {
|
|
59
|
+
const gqlError = anyError.graphQLErrors[0];
|
|
60
|
+
return {
|
|
61
|
+
message: gqlError.message,
|
|
62
|
+
code: gqlError.extensions?.code,
|
|
63
|
+
extensions: gqlError.extensions,
|
|
64
|
+
originalError: error,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
if (anyError.message) {
|
|
68
|
+
return {
|
|
69
|
+
message: anyError.message,
|
|
70
|
+
code: anyError.extensions?.code,
|
|
71
|
+
extensions: anyError.extensions,
|
|
72
|
+
originalError: error,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
message: String(error),
|
|
77
|
+
originalError: error,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
2
|
+
import { Incremental } from './graphql.js';
|
|
3
|
+
export type FragmentType<TDocumentType extends DocumentTypeDecoration<any, any>> = TDocumentType extends DocumentTypeDecoration<infer TType, any> ? [TType] extends [{
|
|
4
|
+
' $fragmentName'?: infer TKey;
|
|
5
|
+
}] ? TKey extends string ? {
|
|
6
|
+
' $fragmentRefs'?: {
|
|
7
|
+
[key in TKey]: TType;
|
|
8
|
+
};
|
|
9
|
+
} : never : never : never;
|
|
10
|
+
export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>): TType;
|
|
11
|
+
export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | undefined): TType | undefined;
|
|
12
|
+
export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null): TType | null;
|
|
13
|
+
export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null | undefined): TType | null | undefined;
|
|
14
|
+
export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>>): Array<TType>;
|
|
15
|
+
export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined): Array<TType> | null | undefined;
|
|
16
|
+
export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>): ReadonlyArray<TType>;
|
|
17
|
+
export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined): ReadonlyArray<TType> | null | undefined;
|
|
18
|
+
export declare function makeFragmentData<F extends DocumentTypeDecoration<any, any>, FT extends ResultOf<F>>(data: FT, _fragment: F): FragmentType<F>;
|
|
19
|
+
export declare function isFragmentReady<TQuery, TFrag>(queryNode: DocumentTypeDecoration<TQuery, any>, fragmentNode: TypedDocumentNode<TFrag>, data: FragmentType<TypedDocumentNode<Incremental<TFrag>, any>> | null | undefined): data is FragmentType<typeof fragmentNode>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function useFragment(_documentNode, fragmentType) {
|
|
2
|
+
return fragmentType;
|
|
3
|
+
}
|
|
4
|
+
export function makeFragmentData(data, _fragment) {
|
|
5
|
+
return data;
|
|
6
|
+
}
|
|
7
|
+
export function isFragmentReady(queryNode, fragmentNode, data) {
|
|
8
|
+
const deferredFields = queryNode.__meta__
|
|
9
|
+
?.deferredFields;
|
|
10
|
+
if (!deferredFields)
|
|
11
|
+
return true;
|
|
12
|
+
const fragDef = fragmentNode.definitions[0];
|
|
13
|
+
const fragName = fragDef?.name?.value;
|
|
14
|
+
const fields = (fragName && deferredFields[fragName]) || [];
|
|
15
|
+
return fields.length > 0 && fields.every(field => data && field in data);
|
|
16
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as types from './graphql.js';
|
|
2
|
+
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
|
|
3
|
+
type Documents = {
|
|
4
|
+
"\n query AddCasino_GetCurrentController {\n currentController {\n id\n }\n }\n": typeof types.AddCasino_GetCurrentControllerDocument;
|
|
5
|
+
"\n mutation GetUserFromUserToken($token: UUID!) {\n userFromUserToken(input: { token: $token }) {\n user {\n id\n uname\n }\n experience {\n id\n name\n }\n }\n }\n": typeof types.GetUserFromUserTokenDocument;
|
|
6
|
+
"\n mutation StartPendingExperienceTransfer(\n $mpUserId: UUID!\n $mpExperienceId: UUID!\n $amount: Int!\n $currency: String!\n $metadata: JSON!\n ) {\n transferCurrencyExperienceToUser(\n input: {\n userId: $mpUserId\n experienceId: $mpExperienceId\n amount: $amount\n currency: $currency\n metadata: $metadata\n }\n ) {\n result {\n ... on TransferCurrencyExperienceToUserSuccess {\n __typename\n transfer {\n id\n status\n }\n }\n ... on TransferMetadataIdExists {\n __typename\n transfer {\n id\n status\n }\n }\n }\n }\n }\n": typeof types.StartPendingExperienceTransferDocument;
|
|
7
|
+
"\n query PaginateTransfers(\n $controllerId: UUID!\n $after: Cursor\n $limit: Int = 10\n ) {\n transfersByHolder(\n input: {\n holderId: $controllerId\n after: $after\n first: $limit\n orderBy: ID_ASC\n type: EXPERIENCE\n }\n ) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n __typename\n id\n amount\n status\n statusAt\n currencyByCurrency {\n id\n displayUnitName\n displayUnitScale\n }\n fromHolderId\n holderByFromHolderId {\n __typename\n id\n ... on User {\n uname\n }\n }\n toHolderId\n holderByToHolderId {\n __typename\n id\n ... on User {\n uname\n }\n }\n ... on ExperienceTransfer {\n id\n experienceId\n experienceByExperienceId {\n id\n name\n }\n }\n }\n }\n }\n }\n": typeof types.PaginateTransfersDocument;
|
|
8
|
+
"\n query GetCurrencies {\n allCurrencies {\n nodes {\n id\n displayUnitName\n displayUnitScale\n }\n }\n }\n": typeof types.GetCurrenciesDocument;
|
|
9
|
+
"\n query GetCurrentController {\n currentController {\n id\n }\n allCurrencies {\n nodes {\n id\n displayUnitName\n displayUnitScale\n }\n }\n }\n": typeof types.GetCurrentControllerDocument;
|
|
10
|
+
"\n mutation CompleteTransfer($mpTransferId: UUID!) {\n completeTransfer(input: { id: $mpTransferId }) {\n result {\n ... on CompleteTransferSuccess {\n __typename\n transfer {\n id\n ... on ExperienceTransfer {\n id\n status\n }\n }\n }\n ... on InvalidTransferStatus {\n __typename\n currentStatus\n message\n }\n }\n }\n }\n": typeof types.CompleteTransferDocument;
|
|
11
|
+
"\n mutation ClaimTransfer($mpTransferId: UUID!) {\n claimTransfer(input: { id: $mpTransferId }) {\n result {\n ... on ClaimTransferSuccess {\n __typename\n transfer {\n id\n ... on ExperienceTransfer {\n id\n status\n }\n }\n }\n ... on InvalidTransferStatus {\n __typename\n currentStatus\n message\n }\n }\n }\n }\n": typeof types.ClaimTransferDocument;
|
|
12
|
+
"\n query GetCasinoJWKS {\n jwks\n }\n": typeof types.GetCasinoJwksDocument;
|
|
13
|
+
};
|
|
14
|
+
declare const documents: Documents;
|
|
15
|
+
export declare function gql(source: string): unknown;
|
|
16
|
+
export declare function gql(source: "\n query AddCasino_GetCurrentController {\n currentController {\n id\n }\n }\n"): (typeof documents)["\n query AddCasino_GetCurrentController {\n currentController {\n id\n }\n }\n"];
|
|
17
|
+
export declare function gql(source: "\n mutation GetUserFromUserToken($token: UUID!) {\n userFromUserToken(input: { token: $token }) {\n user {\n id\n uname\n }\n experience {\n id\n name\n }\n }\n }\n"): (typeof documents)["\n mutation GetUserFromUserToken($token: UUID!) {\n userFromUserToken(input: { token: $token }) {\n user {\n id\n uname\n }\n experience {\n id\n name\n }\n }\n }\n"];
|
|
18
|
+
export declare function gql(source: "\n mutation StartPendingExperienceTransfer(\n $mpUserId: UUID!\n $mpExperienceId: UUID!\n $amount: Int!\n $currency: String!\n $metadata: JSON!\n ) {\n transferCurrencyExperienceToUser(\n input: {\n userId: $mpUserId\n experienceId: $mpExperienceId\n amount: $amount\n currency: $currency\n metadata: $metadata\n }\n ) {\n result {\n ... on TransferCurrencyExperienceToUserSuccess {\n __typename\n transfer {\n id\n status\n }\n }\n ... on TransferMetadataIdExists {\n __typename\n transfer {\n id\n status\n }\n }\n }\n }\n }\n"): (typeof documents)["\n mutation StartPendingExperienceTransfer(\n $mpUserId: UUID!\n $mpExperienceId: UUID!\n $amount: Int!\n $currency: String!\n $metadata: JSON!\n ) {\n transferCurrencyExperienceToUser(\n input: {\n userId: $mpUserId\n experienceId: $mpExperienceId\n amount: $amount\n currency: $currency\n metadata: $metadata\n }\n ) {\n result {\n ... on TransferCurrencyExperienceToUserSuccess {\n __typename\n transfer {\n id\n status\n }\n }\n ... on TransferMetadataIdExists {\n __typename\n transfer {\n id\n status\n }\n }\n }\n }\n }\n"];
|
|
19
|
+
export declare function gql(source: "\n query PaginateTransfers(\n $controllerId: UUID!\n $after: Cursor\n $limit: Int = 10\n ) {\n transfersByHolder(\n input: {\n holderId: $controllerId\n after: $after\n first: $limit\n orderBy: ID_ASC\n type: EXPERIENCE\n }\n ) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n __typename\n id\n amount\n status\n statusAt\n currencyByCurrency {\n id\n displayUnitName\n displayUnitScale\n }\n fromHolderId\n holderByFromHolderId {\n __typename\n id\n ... on User {\n uname\n }\n }\n toHolderId\n holderByToHolderId {\n __typename\n id\n ... on User {\n uname\n }\n }\n ... on ExperienceTransfer {\n id\n experienceId\n experienceByExperienceId {\n id\n name\n }\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query PaginateTransfers(\n $controllerId: UUID!\n $after: Cursor\n $limit: Int = 10\n ) {\n transfersByHolder(\n input: {\n holderId: $controllerId\n after: $after\n first: $limit\n orderBy: ID_ASC\n type: EXPERIENCE\n }\n ) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n __typename\n id\n amount\n status\n statusAt\n currencyByCurrency {\n id\n displayUnitName\n displayUnitScale\n }\n fromHolderId\n holderByFromHolderId {\n __typename\n id\n ... on User {\n uname\n }\n }\n toHolderId\n holderByToHolderId {\n __typename\n id\n ... on User {\n uname\n }\n }\n ... on ExperienceTransfer {\n id\n experienceId\n experienceByExperienceId {\n id\n name\n }\n }\n }\n }\n }\n }\n"];
|
|
20
|
+
export declare function gql(source: "\n query GetCurrencies {\n allCurrencies {\n nodes {\n id\n displayUnitName\n displayUnitScale\n }\n }\n }\n"): (typeof documents)["\n query GetCurrencies {\n allCurrencies {\n nodes {\n id\n displayUnitName\n displayUnitScale\n }\n }\n }\n"];
|
|
21
|
+
export declare function gql(source: "\n query GetCurrentController {\n currentController {\n id\n }\n allCurrencies {\n nodes {\n id\n displayUnitName\n displayUnitScale\n }\n }\n }\n"): (typeof documents)["\n query GetCurrentController {\n currentController {\n id\n }\n allCurrencies {\n nodes {\n id\n displayUnitName\n displayUnitScale\n }\n }\n }\n"];
|
|
22
|
+
export declare function gql(source: "\n mutation CompleteTransfer($mpTransferId: UUID!) {\n completeTransfer(input: { id: $mpTransferId }) {\n result {\n ... on CompleteTransferSuccess {\n __typename\n transfer {\n id\n ... on ExperienceTransfer {\n id\n status\n }\n }\n }\n ... on InvalidTransferStatus {\n __typename\n currentStatus\n message\n }\n }\n }\n }\n"): (typeof documents)["\n mutation CompleteTransfer($mpTransferId: UUID!) {\n completeTransfer(input: { id: $mpTransferId }) {\n result {\n ... on CompleteTransferSuccess {\n __typename\n transfer {\n id\n ... on ExperienceTransfer {\n id\n status\n }\n }\n }\n ... on InvalidTransferStatus {\n __typename\n currentStatus\n message\n }\n }\n }\n }\n"];
|
|
23
|
+
export declare function gql(source: "\n mutation ClaimTransfer($mpTransferId: UUID!) {\n claimTransfer(input: { id: $mpTransferId }) {\n result {\n ... on ClaimTransferSuccess {\n __typename\n transfer {\n id\n ... on ExperienceTransfer {\n id\n status\n }\n }\n }\n ... on InvalidTransferStatus {\n __typename\n currentStatus\n message\n }\n }\n }\n }\n"): (typeof documents)["\n mutation ClaimTransfer($mpTransferId: UUID!) {\n claimTransfer(input: { id: $mpTransferId }) {\n result {\n ... on ClaimTransferSuccess {\n __typename\n transfer {\n id\n ... on ExperienceTransfer {\n id\n status\n }\n }\n }\n ... on InvalidTransferStatus {\n __typename\n currentStatus\n message\n }\n }\n }\n }\n"];
|
|
24
|
+
export declare function gql(source: "\n query GetCasinoJWKS {\n jwks\n }\n"): (typeof documents)["\n query GetCasinoJWKS {\n jwks\n }\n"];
|
|
25
|
+
export type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode<infer TType, any> ? TType : never;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as types from './graphql.js';
|
|
2
|
+
const documents = {
|
|
3
|
+
"\n query AddCasino_GetCurrentController {\n currentController {\n id\n }\n }\n": types.AddCasino_GetCurrentControllerDocument,
|
|
4
|
+
"\n mutation GetUserFromUserToken($token: UUID!) {\n userFromUserToken(input: { token: $token }) {\n user {\n id\n uname\n }\n experience {\n id\n name\n }\n }\n }\n": types.GetUserFromUserTokenDocument,
|
|
5
|
+
"\n mutation StartPendingExperienceTransfer(\n $mpUserId: UUID!\n $mpExperienceId: UUID!\n $amount: Int!\n $currency: String!\n $metadata: JSON!\n ) {\n transferCurrencyExperienceToUser(\n input: {\n userId: $mpUserId\n experienceId: $mpExperienceId\n amount: $amount\n currency: $currency\n metadata: $metadata\n }\n ) {\n result {\n ... on TransferCurrencyExperienceToUserSuccess {\n __typename\n transfer {\n id\n status\n }\n }\n ... on TransferMetadataIdExists {\n __typename\n transfer {\n id\n status\n }\n }\n }\n }\n }\n": types.StartPendingExperienceTransferDocument,
|
|
6
|
+
"\n query PaginateTransfers(\n $controllerId: UUID!\n $after: Cursor\n $limit: Int = 10\n ) {\n transfersByHolder(\n input: {\n holderId: $controllerId\n after: $after\n first: $limit\n orderBy: ID_ASC\n type: EXPERIENCE\n }\n ) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n __typename\n id\n amount\n status\n statusAt\n currencyByCurrency {\n id\n displayUnitName\n displayUnitScale\n }\n fromHolderId\n holderByFromHolderId {\n __typename\n id\n ... on User {\n uname\n }\n }\n toHolderId\n holderByToHolderId {\n __typename\n id\n ... on User {\n uname\n }\n }\n ... on ExperienceTransfer {\n id\n experienceId\n experienceByExperienceId {\n id\n name\n }\n }\n }\n }\n }\n }\n": types.PaginateTransfersDocument,
|
|
7
|
+
"\n query GetCurrencies {\n allCurrencies {\n nodes {\n id\n displayUnitName\n displayUnitScale\n }\n }\n }\n": types.GetCurrenciesDocument,
|
|
8
|
+
"\n query GetCurrentController {\n currentController {\n id\n }\n allCurrencies {\n nodes {\n id\n displayUnitName\n displayUnitScale\n }\n }\n }\n": types.GetCurrentControllerDocument,
|
|
9
|
+
"\n mutation CompleteTransfer($mpTransferId: UUID!) {\n completeTransfer(input: { id: $mpTransferId }) {\n result {\n ... on CompleteTransferSuccess {\n __typename\n transfer {\n id\n ... on ExperienceTransfer {\n id\n status\n }\n }\n }\n ... on InvalidTransferStatus {\n __typename\n currentStatus\n message\n }\n }\n }\n }\n": types.CompleteTransferDocument,
|
|
10
|
+
"\n mutation ClaimTransfer($mpTransferId: UUID!) {\n claimTransfer(input: { id: $mpTransferId }) {\n result {\n ... on ClaimTransferSuccess {\n __typename\n transfer {\n id\n ... on ExperienceTransfer {\n id\n status\n }\n }\n }\n ... on InvalidTransferStatus {\n __typename\n currentStatus\n message\n }\n }\n }\n }\n": types.ClaimTransferDocument,
|
|
11
|
+
"\n query GetCasinoJWKS {\n jwks\n }\n": types.GetCasinoJwksDocument,
|
|
12
|
+
};
|
|
13
|
+
export function gql(source) {
|
|
14
|
+
return documents[source] ?? {};
|
|
15
|
+
}
|