@kleros/kleros-sdk 2.0.1-2 → 2.1.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.
- package/README.md +2 -3
- package/lib/src/consts.js +0 -1
- package/lib/src/dataMappings/actions/callAction.d.ts +2 -2
- package/lib/src/dataMappings/actions/callAction.js +5 -3
- package/lib/src/dataMappings/actions/eventAction.d.ts +2 -2
- package/lib/src/dataMappings/actions/eventAction.js +5 -4
- package/lib/src/dataMappings/actions/fetchIpfsJsonAction.d.ts +2 -2
- package/lib/src/dataMappings/actions/fetchIpfsJsonAction.js +9 -7
- package/lib/src/dataMappings/actions/jsonAction.d.ts +2 -2
- package/lib/src/dataMappings/actions/jsonAction.js +3 -3
- package/lib/src/dataMappings/actions/subgraphAction.d.ts +2 -2
- package/lib/src/dataMappings/actions/subgraphAction.js +1 -6
- package/lib/src/dataMappings/disputeDetails.js +0 -1
- package/lib/src/dataMappings/executeActions.d.ts +5 -4
- package/lib/src/dataMappings/executeActions.js +13 -17
- package/lib/src/dataMappings/retrieveRealityData.d.ts +15 -1
- package/lib/src/dataMappings/retrieveRealityData.js +8 -3
- package/lib/src/dataMappings/utils/actionTypeValidators.d.ts +7 -0
- package/lib/src/dataMappings/utils/{dataMappingValidators.js → actionTypeValidators.js} +2 -3
- package/lib/src/dataMappings/utils/actionTypes.d.ts +40 -0
- package/lib/src/dataMappings/utils/{disputeRequest.js → actionTypes.js} +0 -1
- package/lib/src/dataMappings/utils/createResultObject.d.ts +1 -1
- package/lib/src/dataMappings/utils/createResultObject.js +10 -11
- package/lib/src/dataMappings/utils/disputeDetailsSchema.d.ts +57 -92
- package/lib/src/dataMappings/utils/disputeDetailsSchema.js +24 -19
- package/lib/src/dataMappings/utils/disputeDetailsTypes.js +0 -1
- package/lib/src/dataMappings/utils/populateTemplate.js +6 -4
- package/lib/src/dataMappings/utils/replacePlaceholdersWithValues.d.ts +2 -1
- package/lib/src/dataMappings/utils/replacePlaceholdersWithValues.js +27 -9
- package/lib/src/dataMappings/utils/retrieveVariables.d.ts +2 -0
- package/lib/src/dataMappings/utils/retrieveVariables.js +15 -0
- package/lib/src/index.d.ts +2 -0
- package/lib/src/index.js +2 -1
- package/lib/src/requests/fetchDisputeDetails.d.ts +12 -0
- package/lib/src/requests/fetchDisputeDetails.js +24 -0
- package/lib/src/requests/fetchDisputeTemplateFromId.d.ts +8 -0
- package/lib/src/requests/fetchDisputeTemplateFromId.js +20 -0
- package/lib/src/sdk.d.ts +4 -4
- package/lib/src/sdk.js +2 -16
- package/lib/src/types/index.d.ts +15 -0
- package/lib/src/types/index.js +2 -0
- package/lib/src/utils/getDispute.d.ts +3 -0
- package/lib/src/utils/getDispute.js +44 -0
- package/package.json +10 -12
- package/lib/src/consts.js.map +0 -1
- package/lib/src/dataMappings/actions/callAction.js.map +0 -1
- package/lib/src/dataMappings/actions/eventAction.js.map +0 -1
- package/lib/src/dataMappings/actions/fetchIpfsJsonAction.js.map +0 -1
- package/lib/src/dataMappings/actions/jsonAction.js.map +0 -1
- package/lib/src/dataMappings/actions/subgraphAction.js.map +0 -1
- package/lib/src/dataMappings/decoder.d.ts +0 -7
- package/lib/src/dataMappings/decoder.js +0 -41
- package/lib/src/dataMappings/decoder.js.map +0 -1
- package/lib/src/dataMappings/disputeDetails.js.map +0 -1
- package/lib/src/dataMappings/executeActions.js.map +0 -1
- package/lib/src/dataMappings/retrieveRealityData.js.map +0 -1
- package/lib/src/dataMappings/utils/createResultObject.js.map +0 -1
- package/lib/src/dataMappings/utils/dataMappingTypes.d.ts +0 -43
- package/lib/src/dataMappings/utils/dataMappingTypes.js +0 -51
- package/lib/src/dataMappings/utils/dataMappingTypes.js.map +0 -1
- package/lib/src/dataMappings/utils/dataMappingValidators.d.ts +0 -7
- package/lib/src/dataMappings/utils/dataMappingValidators.js.map +0 -1
- package/lib/src/dataMappings/utils/disputeDetailsSchema.js.map +0 -1
- package/lib/src/dataMappings/utils/disputeDetailsTypes.js.map +0 -1
- package/lib/src/dataMappings/utils/disputeDetailsValidator.d.ts +0 -32
- package/lib/src/dataMappings/utils/disputeDetailsValidator.js +0 -29
- package/lib/src/dataMappings/utils/disputeDetailsValidator.js.map +0 -1
- package/lib/src/dataMappings/utils/disputeRequest.d.ts +0 -8
- package/lib/src/dataMappings/utils/disputeRequest.js.map +0 -1
- package/lib/src/dataMappings/utils/populateTemplate.js.map +0 -1
- package/lib/src/dataMappings/utils/replacePlaceholdersWithValues.js.map +0 -1
- package/lib/src/graphql/fragment-masking.d.ts +0 -15
- package/lib/src/graphql/fragment-masking.js +0 -23
- package/lib/src/graphql/fragment-masking.js.map +0 -1
- package/lib/src/graphql/gql.d.ts +0 -108
- package/lib/src/graphql/gql.js +0 -56
- package/lib/src/graphql/gql.js.map +0 -1
- package/lib/src/graphql/graphql.d.ts +0 -4869
- package/lib/src/graphql/graphql.js +0 -719
- package/lib/src/graphql/graphql.js.map +0 -1
- package/lib/src/graphql/index.d.ts +0 -2
- package/lib/src/graphql/index.js +0 -19
- package/lib/src/graphql/index.js.map +0 -1
- package/lib/src/index.js.map +0 -1
- package/lib/src/sdk.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dataMappingValidators.js","sourceRoot":"","sources":["../../../../src/dataMappings/utils/dataMappingValidators.ts"],"names":[],"mappings":";;;AAUO,MAAM,uBAAuB,GAAG,CAAC,OAAqC,EAAE,EAAE;IAC/E,IAAK,OAA2B,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;QACxD,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACzD,CAAC;IACD,OAAO,OAA0B,CAAC;AACpC,CAAC,CAAC;AALW,QAAA,uBAAuB,2BAKlC;AAEK,MAAM,uBAAuB,GAAG,CAAC,OAAqC,EAAE,EAAE;IAC/E,IAAK,OAA2B,CAAC,GAAG,KAAK,SAAS,IAAK,OAA2B,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QAC7G,MAAM,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es.js","sourceRoot":"","sources":["../../../../src/dataMappings/utils/disputeDetailsTypes.ts"],"names":[],"mappings":";;;AAGA,+DAAsD;AAA7C,oHAAA,YAAY,OAAA"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { QuestionType } from "./disputeDetailsTypes";
|
|
2
|
-
export declare const validate: (data: any) => data is {
|
|
3
|
-
type: QuestionType;
|
|
4
|
-
title: string;
|
|
5
|
-
description: string;
|
|
6
|
-
question: string;
|
|
7
|
-
answers: {
|
|
8
|
-
id: string;
|
|
9
|
-
title: string;
|
|
10
|
-
description: string;
|
|
11
|
-
reserved: boolean;
|
|
12
|
-
}[];
|
|
13
|
-
policyURI: string;
|
|
14
|
-
attachment: {
|
|
15
|
-
label: string;
|
|
16
|
-
uri: string;
|
|
17
|
-
};
|
|
18
|
-
frontendUrl: string;
|
|
19
|
-
arbitrableChainID: string;
|
|
20
|
-
arbitrableAddress: string;
|
|
21
|
-
arbitratorChainID: string;
|
|
22
|
-
arbitratorAddress: string;
|
|
23
|
-
category: string;
|
|
24
|
-
lang: string;
|
|
25
|
-
specification: string;
|
|
26
|
-
version: string;
|
|
27
|
-
aliases?: {
|
|
28
|
-
name: string;
|
|
29
|
-
address: string;
|
|
30
|
-
id?: string | undefined;
|
|
31
|
-
}[] | undefined;
|
|
32
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validate = void 0;
|
|
4
|
-
const disputeDetailsTypes_1 = require("./disputeDetailsTypes");
|
|
5
|
-
const isHexAddress = (str) => /^0x[a-fA-F0-9]{40}$/.test(str);
|
|
6
|
-
const isHexId = (str) => /^0x[a-fA-F0-9]{1,64}$/.test(str);
|
|
7
|
-
const validate = (data) => {
|
|
8
|
-
return (typeof data.title === "string" &&
|
|
9
|
-
typeof data.description === "string" &&
|
|
10
|
-
typeof data.question === "string" &&
|
|
11
|
-
Object.values(disputeDetailsTypes_1.QuestionType).includes(data.type) &&
|
|
12
|
-
Array.isArray(data.answers) &&
|
|
13
|
-
data.answers.every((answer) => typeof answer.title === "string" &&
|
|
14
|
-
typeof answer.description === "string" &&
|
|
15
|
-
isHexId(answer.id) &&
|
|
16
|
-
typeof answer.reserved === "boolean") &&
|
|
17
|
-
typeof data.policyURI === "string" &&
|
|
18
|
-
typeof data.frontendUrl === "string" &&
|
|
19
|
-
typeof data.arbitrableChainID === "string" &&
|
|
20
|
-
isHexAddress(data.arbitrableAddress) &&
|
|
21
|
-
typeof data.arbitratorChainID === "string" &&
|
|
22
|
-
isHexAddress(data.arbitratorAddress) &&
|
|
23
|
-
typeof data.category === "string" &&
|
|
24
|
-
typeof data.lang === "string" &&
|
|
25
|
-
typeof data.specification === "string" &&
|
|
26
|
-
typeof data.version === "string");
|
|
27
|
-
};
|
|
28
|
-
exports.validate = validate;
|
|
29
|
-
//# sourceMappingURL=disputeDetailsValidator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"disputeDetailsValidator.js","sourceRoot":"","sources":["../../../../src/dataMappings/utils/disputeDetailsValidator.ts"],"names":[],"mappings":";;;AAAA,+DAAqE;AAErE,MAAM,YAAY,GAAG,CAAC,GAAW,EAAW,EAAE,CAAC,qBAAqB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/E,MAAM,OAAO,GAAG,CAAC,GAAW,EAAW,EAAE,CAAC,uBAAuB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAErE,MAAM,QAAQ,GAAG,CAAC,IAAS,EAA0B,EAAE;IAC5D,OAAO,CACL,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ;QAC9B,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ;QACpC,OAAO,IAAI,CAAC,QAAQ,KAAK,QAAQ;QACjC,MAAM,CAAC,MAAM,CAAC,kCAAY,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;QAC/C,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;QAC3B,IAAI,CAAC,OAAO,CAAC,KAAK,CAChB,CAAC,MAAM,EAAE,EAAE,CACT,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ;YAChC,OAAO,MAAM,CAAC,WAAW,KAAK,QAAQ;YACtC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YAClB,OAAO,MAAM,CAAC,QAAQ,KAAK,SAAS,CACvC;QACD,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ;QAClC,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ;QACpC,OAAO,IAAI,CAAC,iBAAiB,KAAK,QAAQ;QAC1C,YAAY,CAAC,IAAI,CAAC,iBAAiB,CAAC;QACpC,OAAO,IAAI,CAAC,iBAAiB,KAAK,QAAQ;QAC1C,YAAY,CAAC,IAAI,CAAC,iBAAiB,CAAC;QACpC,OAAO,IAAI,CAAC,QAAQ,KAAK,QAAQ;QACjC,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ;QAC7B,OAAO,IAAI,CAAC,aAAa,KAAK,QAAQ;QACtC,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,CACjC,CAAC;AACJ,CAAC,CAAC;AAzBW,QAAA,QAAQ,YAyBnB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"disputeRequest.js","sourceRoot":"","sources":["../../../../src/dataMappings/utils/disputeRequest.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"populateTemplate.js","sourceRoot":"","sources":["../../../../src/dataMappings/utils/populateTemplate.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAgC;AAEhC,uEAAqD;AAE9C,MAAM,gBAAgB,GAAG,CAAC,gBAAwB,EAAE,IAAS,EAAkB,EAAE;IACtF,MAAM,MAAM,GAAG,kBAAQ,CAAC,MAAM,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;IACvD,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAGnC,IAAI,CAAC,IAAA,kCAAQ,EAAC,OAAO,CAAC,EAAE,CAAC;IAEzB,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAXW,QAAA,gBAAgB,oBAW3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replacePlaceholdersWithValues.js","sourceRoot":"","sources":["../../../../src/dataMappings/utils/replacePlaceholdersWithValues.ts"],"names":[],"mappings":";;;AACO,MAAM,6BAA6B,GAAG,CAAC,OAAY,EAAE,OAAY,EAAE,EAAE;IAC1E,IAAI,eAAe,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAE9C,MAAM,eAAe,GAAG,eAAe,CAAC,OAAO,CAAC,2BAA2B,EAAE,CAAC,CAAC,EAAE,YAAY,EAAE,EAAE;QAC/F,IAAI,OAAO,CAAC,cAAc,CAAC,YAAY,CAAC,EAAE,CAAC;YACzC,OAAO,OAAO,CAAC,YAAY,CAAC,CAAC;QAC/B,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,aAAa,YAAY,yBAAyB,CAAC,CAAC;QACtE,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;AACrC,CAAC,CAAC;AAZW,QAAA,6BAA6B,iCAYxC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
2
|
-
import { Incremental } from './graphql';
|
|
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>> | null | undefined): TType | null | undefined;
|
|
12
|
-
export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>): ReadonlyArray<TType>;
|
|
13
|
-
export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined): ReadonlyArray<TType> | null | undefined;
|
|
14
|
-
export declare function makeFragmentData<F extends DocumentTypeDecoration<any, any>, FT extends ResultOf<F>>(data: FT, _fragment: F): FragmentType<F>;
|
|
15
|
-
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>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isFragmentReady = exports.makeFragmentData = exports.useFragment = void 0;
|
|
4
|
-
function useFragment(_documentNode, fragmentType) {
|
|
5
|
-
return fragmentType;
|
|
6
|
-
}
|
|
7
|
-
exports.useFragment = useFragment;
|
|
8
|
-
function makeFragmentData(data, _fragment) {
|
|
9
|
-
return data;
|
|
10
|
-
}
|
|
11
|
-
exports.makeFragmentData = makeFragmentData;
|
|
12
|
-
function isFragmentReady(queryNode, fragmentNode, data) {
|
|
13
|
-
const deferredFields = queryNode.__meta__
|
|
14
|
-
?.deferredFields;
|
|
15
|
-
if (!deferredFields)
|
|
16
|
-
return true;
|
|
17
|
-
const fragDef = fragmentNode.definitions[0];
|
|
18
|
-
const fragName = fragDef?.name?.value;
|
|
19
|
-
const fields = (fragName && deferredFields[fragName]) || [];
|
|
20
|
-
return fields.length > 0 && fields.every(field => data && field in data);
|
|
21
|
-
}
|
|
22
|
-
exports.isFragmentReady = isFragmentReady;
|
|
23
|
-
//# sourceMappingURL=fragment-masking.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fragment-masking.js","sourceRoot":"","sources":["../../../src/graphql/fragment-masking.ts"],"names":[],"mappings":";;;AAoCA,SAAgB,WAAW,CACzB,aAAiD,EACjD,YAAmJ;IAEnJ,OAAO,YAAmB,CAAC;AAC7B,CAAC;AALD,kCAKC;AAGD,SAAgB,gBAAgB,CAG9B,IAAQ,EAAE,SAAY;IACtB,OAAO,IAAuB,CAAC;AACjC,CAAC;AALD,4CAKC;AACD,SAAgB,eAAe,CAC7B,SAA8C,EAC9C,YAAsC,EACtC,IAAiF;IAEjF,MAAM,cAAc,GAAI,SAAgF,CAAC,QAAQ;QAC/G,EAAE,cAAc,CAAC;IAEnB,IAAI,CAAC,cAAc;QAAE,OAAO,IAAI,CAAC;IAEjC,MAAM,OAAO,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC,CAAuC,CAAC;IAClF,MAAM,QAAQ,GAAG,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC;IAEtC,MAAM,MAAM,GAAG,CAAC,QAAQ,IAAI,cAAc,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;IAC5D,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC;AAC3E,CAAC;AAfD,0CAeC"}
|
package/lib/src/graphql/gql.d.ts
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import * as types from './graphql';
|
|
2
|
-
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
|
|
3
|
-
declare const documents: {
|
|
4
|
-
"\n query AllCases {\n counter(id: 0) {\n cases\n casesRuled\n }\n }\n": DocumentNode<types.AllCasesQuery, types.Exact<{
|
|
5
|
-
[key: string]: never;
|
|
6
|
-
}>>;
|
|
7
|
-
"\n fragment DisputeDetails on Dispute {\n id\n arbitrated {\n id\n }\n court {\n id\n policy\n feeForJuror\n timesPerPeriod\n }\n period\n lastPeriodChange\n }\n": DocumentNode<types.DisputeDetailsFragment, unknown>;
|
|
8
|
-
"\n query CasesPageWhere($skip: Int, $where: Dispute_filter, $orderDirection: OrderDirection, $first: Int) {\n disputes(first: $first, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection, where: $where) {\n ...DisputeDetails\n }\n }\n": DocumentNode<types.CasesPageWhereQuery, types.Exact<{
|
|
9
|
-
skip?: types.InputMaybe<number> | undefined;
|
|
10
|
-
where?: types.InputMaybe<types.Dispute_Filter> | undefined;
|
|
11
|
-
orderDirection?: types.InputMaybe<types.OrderDirection> | undefined;
|
|
12
|
-
first?: types.InputMaybe<number> | undefined;
|
|
13
|
-
}>>;
|
|
14
|
-
"\n query CasesPage($skip: Int, $orderDirection: OrderDirection, $first: Int) {\n disputes(first: $first, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection) {\n ...DisputeDetails\n }\n }\n": DocumentNode<types.CasesPageQuery, types.Exact<{
|
|
15
|
-
skip?: types.InputMaybe<number> | undefined;
|
|
16
|
-
orderDirection?: types.InputMaybe<types.OrderDirection> | undefined;
|
|
17
|
-
first?: types.InputMaybe<number> | undefined;
|
|
18
|
-
}>>;
|
|
19
|
-
"\n query MyCases($id: ID!, $skip: Int, $orderDirection: OrderDirection) {\n user(id: $id) {\n disputes(first: 3, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection) {\n ...DisputeDetails\n }\n }\n }\n": DocumentNode<types.MyCasesQuery, types.Exact<{
|
|
20
|
-
id: string;
|
|
21
|
-
skip?: types.InputMaybe<number> | undefined;
|
|
22
|
-
orderDirection?: types.InputMaybe<types.OrderDirection> | undefined;
|
|
23
|
-
}>>;
|
|
24
|
-
"\n query myCasesPageWhere($id: ID!, $skip: Int, $where: Dispute_filter, $orderDirection: OrderDirection) {\n user(id: $id) {\n disputes(first: 3, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection, where: $where) {\n ...DisputeDetails\n }\n }\n }\n": DocumentNode<types.MyCasesPageWhereQuery, types.Exact<{
|
|
25
|
-
id: string;
|
|
26
|
-
skip?: types.InputMaybe<number> | undefined;
|
|
27
|
-
where?: types.InputMaybe<types.Dispute_Filter> | undefined;
|
|
28
|
-
orderDirection?: types.InputMaybe<types.OrderDirection> | undefined;
|
|
29
|
-
}>>;
|
|
30
|
-
"\n query ClassicAppeal($disputeID: ID!, $orderBy: DisputeKitDispute_orderBy, $orderDirection: OrderDirection) {\n dispute(id: $disputeID) {\n period\n court {\n id\n timesPerPeriod\n }\n arbitrated {\n id\n }\n lastPeriodChange\n disputeKitDispute(orderBy: $orderBy, orderDirection: $orderDirection) {\n id\n currentLocalRoundIndex\n localRounds {\n ... on ClassicRound {\n winningChoice\n paidFees\n fundedChoices\n }\n }\n }\n }\n }\n": DocumentNode<types.ClassicAppealQuery, types.Exact<{
|
|
31
|
-
disputeID: string;
|
|
32
|
-
orderBy?: types.InputMaybe<types.DisputeKitDispute_OrderBy> | undefined;
|
|
33
|
-
orderDirection?: types.InputMaybe<types.OrderDirection> | undefined;
|
|
34
|
-
}>>;
|
|
35
|
-
"\n query Counter {\n counter(id: \"0\") {\n id\n cases\n casesRuled\n casesVoting\n casesAppealing\n stakedPNK\n redistributedPNK\n paidETH\n activeJurors\n }\n }\n": DocumentNode<types.CounterQuery, types.Exact<{
|
|
36
|
-
[key: string]: never;
|
|
37
|
-
}>>;
|
|
38
|
-
"\n query CourtDetails($id: ID!) {\n court(id: $id) {\n policy\n minStake\n alpha\n numberDisputes\n numberClosedDisputes\n numberAppealingDisputes\n numberStakedJurors\n stake\n paidETH\n paidPNK\n timesPerPeriod\n }\n }\n": DocumentNode<types.CourtDetailsQuery, types.Exact<{
|
|
39
|
-
id: string;
|
|
40
|
-
}>>;
|
|
41
|
-
"\n query CourtPolicyURI($courtID: ID!) {\n court(id: $courtID) {\n policy\n }\n }\n": DocumentNode<types.CourtPolicyUriQuery, types.Exact<{
|
|
42
|
-
courtID: string;
|
|
43
|
-
}>>;
|
|
44
|
-
"\n query CourtTree {\n court(id: \"1\") {\n name\n id\n children(orderBy: name) {\n name\n id\n children {\n name\n id\n children {\n name\n id\n children {\n name\n id\n children {\n name\n id\n }\n }\n }\n }\n }\n }\n }\n": DocumentNode<types.CourtTreeQuery, types.Exact<{
|
|
45
|
-
[key: string]: never;
|
|
46
|
-
}>>;
|
|
47
|
-
"\n query DisputeDetails($disputeID: ID!) {\n dispute(id: $disputeID) {\n court {\n id\n timesPerPeriod\n hiddenVotes\n feeForJuror\n }\n arbitrated {\n id\n }\n period\n ruled\n lastPeriodChange\n currentRuling\n overridden\n tied\n currentRound {\n id\n }\n currentRoundIndex\n }\n }\n": DocumentNode<types.DisputeDetailsQuery, types.Exact<{
|
|
48
|
-
disputeID: string;
|
|
49
|
-
}>>;
|
|
50
|
-
"\n query DisputeTemplate($id: ID!) {\n disputeTemplate(id: $id) {\n id\n templateTag\n templateData\n templateDataMappings\n }\n }\n": DocumentNode<types.DisputeTemplateQuery, types.Exact<{
|
|
51
|
-
id: string;
|
|
52
|
-
}>>;
|
|
53
|
-
"\n query Draw($address: String, $disputeID: String, $roundID: String) {\n draws(first: 1000, where: { dispute: $disputeID, juror: $address, round: $roundID }) {\n voteIDNum\n vote {\n ... on ClassicVote {\n commit\n commited\n }\n }\n }\n }\n": DocumentNode<types.DrawQuery, types.Exact<{
|
|
54
|
-
address?: types.InputMaybe<string> | undefined;
|
|
55
|
-
disputeID?: types.InputMaybe<string> | undefined;
|
|
56
|
-
roundID?: types.InputMaybe<string> | undefined;
|
|
57
|
-
}>>;
|
|
58
|
-
"\n query Evidences($evidenceGroupID: String) {\n evidences(where: { evidenceGroup: $evidenceGroupID }, orderBy: id, orderDirection: asc) {\n id\n evidence\n sender {\n id\n }\n }\n }\n": DocumentNode<types.EvidencesQuery, types.Exact<{
|
|
59
|
-
evidenceGroupID?: types.InputMaybe<string> | undefined;
|
|
60
|
-
}>>;
|
|
61
|
-
"\n query HomePage($timeframe: ID) {\n disputes(first: 3) {\n id\n }\n counters(where: { id_gt: $timeframe }) {\n id\n stakedPNK\n paidETH\n redistributedPNK\n activeJurors\n cases\n }\n }\n": DocumentNode<types.HomePageQuery, types.Exact<{
|
|
62
|
-
timeframe?: types.InputMaybe<string> | undefined;
|
|
63
|
-
}>>;
|
|
64
|
-
"\n query JurorStakeDetails($userId: String) {\n jurorTokensPerCourts(where: { juror: $userId }) {\n court {\n id\n name\n }\n staked\n locked\n }\n }\n": DocumentNode<types.JurorStakeDetailsQuery, types.Exact<{
|
|
65
|
-
userId?: types.InputMaybe<string> | undefined;
|
|
66
|
-
}>>;
|
|
67
|
-
"\n query TopUsersByCoherenceScore($first: Int!, $orderBy: User_orderBy, $orderDirection: OrderDirection) {\n users(first: $first, orderBy: $orderBy, orderDirection: $orderDirection) {\n id\n coherenceScore\n totalCoherent\n totalResolvedDisputes\n }\n }\n": DocumentNode<types.TopUsersByCoherenceScoreQuery, types.Exact<{
|
|
68
|
-
first: number;
|
|
69
|
-
orderBy?: types.InputMaybe<types.User_OrderBy> | undefined;
|
|
70
|
-
orderDirection?: types.InputMaybe<types.OrderDirection> | undefined;
|
|
71
|
-
}>>;
|
|
72
|
-
"\n fragment UserDetails on User {\n totalDisputes\n totalResolvedDisputes\n totalAppealingDisputes\n totalCoherent\n coherenceScore\n tokens {\n court {\n id\n name\n }\n }\n shifts {\n pnkAmount\n ethAmount\n }\n }\n": DocumentNode<types.UserDetailsFragment, unknown>;
|
|
73
|
-
"\n query User($address: ID!) {\n user(id: $address) {\n disputes(orderBy: lastPeriodChange) {\n id\n }\n ...UserDetails\n }\n }\n": DocumentNode<types.UserQuery, types.Exact<{
|
|
74
|
-
address: string;
|
|
75
|
-
}>>;
|
|
76
|
-
"\n query UserDisputeFilter($address: ID!, $where: Dispute_filter) {\n user(id: $address) {\n disputes(orderBy: lastPeriodChange, where: $where) {\n id\n }\n ...UserDetails\n }\n }\n": DocumentNode<types.UserDisputeFilterQuery, types.Exact<{
|
|
77
|
-
address: string;
|
|
78
|
-
where?: types.InputMaybe<types.Dispute_Filter> | undefined;
|
|
79
|
-
}>>;
|
|
80
|
-
"\n query VotingHistory($disputeID: ID!) {\n dispute(id: $disputeID) {\n id\n createdAt\n rounds {\n nbVotes\n court {\n id\n name\n }\n timeline\n }\n disputeKitDispute {\n localRounds {\n ... on ClassicRound {\n winningChoice\n totalVoted\n justifications {\n id\n juror {\n id\n }\n choice\n reference\n }\n }\n }\n }\n }\n }\n": DocumentNode<types.VotingHistoryQuery, types.Exact<{
|
|
81
|
-
disputeID: string;
|
|
82
|
-
}>>;
|
|
83
|
-
};
|
|
84
|
-
export declare function graphql(source: string): unknown;
|
|
85
|
-
export declare function graphql(source: "\n query AllCases {\n counter(id: 0) {\n cases\n casesRuled\n }\n }\n"): (typeof documents)["\n query AllCases {\n counter(id: 0) {\n cases\n casesRuled\n }\n }\n"];
|
|
86
|
-
export declare function graphql(source: "\n fragment DisputeDetails on Dispute {\n id\n arbitrated {\n id\n }\n court {\n id\n policy\n feeForJuror\n timesPerPeriod\n }\n period\n lastPeriodChange\n }\n"): (typeof documents)["\n fragment DisputeDetails on Dispute {\n id\n arbitrated {\n id\n }\n court {\n id\n policy\n feeForJuror\n timesPerPeriod\n }\n period\n lastPeriodChange\n }\n"];
|
|
87
|
-
export declare function graphql(source: "\n query CasesPageWhere($skip: Int, $where: Dispute_filter, $orderDirection: OrderDirection, $first: Int) {\n disputes(first: $first, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection, where: $where) {\n ...DisputeDetails\n }\n }\n"): (typeof documents)["\n query CasesPageWhere($skip: Int, $where: Dispute_filter, $orderDirection: OrderDirection, $first: Int) {\n disputes(first: $first, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection, where: $where) {\n ...DisputeDetails\n }\n }\n"];
|
|
88
|
-
export declare function graphql(source: "\n query CasesPage($skip: Int, $orderDirection: OrderDirection, $first: Int) {\n disputes(first: $first, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection) {\n ...DisputeDetails\n }\n }\n"): (typeof documents)["\n query CasesPage($skip: Int, $orderDirection: OrderDirection, $first: Int) {\n disputes(first: $first, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection) {\n ...DisputeDetails\n }\n }\n"];
|
|
89
|
-
export declare function graphql(source: "\n query MyCases($id: ID!, $skip: Int, $orderDirection: OrderDirection) {\n user(id: $id) {\n disputes(first: 3, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection) {\n ...DisputeDetails\n }\n }\n }\n"): (typeof documents)["\n query MyCases($id: ID!, $skip: Int, $orderDirection: OrderDirection) {\n user(id: $id) {\n disputes(first: 3, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection) {\n ...DisputeDetails\n }\n }\n }\n"];
|
|
90
|
-
export declare function graphql(source: "\n query myCasesPageWhere($id: ID!, $skip: Int, $where: Dispute_filter, $orderDirection: OrderDirection) {\n user(id: $id) {\n disputes(first: 3, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection, where: $where) {\n ...DisputeDetails\n }\n }\n }\n"): (typeof documents)["\n query myCasesPageWhere($id: ID!, $skip: Int, $where: Dispute_filter, $orderDirection: OrderDirection) {\n user(id: $id) {\n disputes(first: 3, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection, where: $where) {\n ...DisputeDetails\n }\n }\n }\n"];
|
|
91
|
-
export declare function graphql(source: "\n query ClassicAppeal($disputeID: ID!, $orderBy: DisputeKitDispute_orderBy, $orderDirection: OrderDirection) {\n dispute(id: $disputeID) {\n period\n court {\n id\n timesPerPeriod\n }\n arbitrated {\n id\n }\n lastPeriodChange\n disputeKitDispute(orderBy: $orderBy, orderDirection: $orderDirection) {\n id\n currentLocalRoundIndex\n localRounds {\n ... on ClassicRound {\n winningChoice\n paidFees\n fundedChoices\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query ClassicAppeal($disputeID: ID!, $orderBy: DisputeKitDispute_orderBy, $orderDirection: OrderDirection) {\n dispute(id: $disputeID) {\n period\n court {\n id\n timesPerPeriod\n }\n arbitrated {\n id\n }\n lastPeriodChange\n disputeKitDispute(orderBy: $orderBy, orderDirection: $orderDirection) {\n id\n currentLocalRoundIndex\n localRounds {\n ... on ClassicRound {\n winningChoice\n paidFees\n fundedChoices\n }\n }\n }\n }\n }\n"];
|
|
92
|
-
export declare function graphql(source: "\n query Counter {\n counter(id: \"0\") {\n id\n cases\n casesRuled\n casesVoting\n casesAppealing\n stakedPNK\n redistributedPNK\n paidETH\n activeJurors\n }\n }\n"): (typeof documents)["\n query Counter {\n counter(id: \"0\") {\n id\n cases\n casesRuled\n casesVoting\n casesAppealing\n stakedPNK\n redistributedPNK\n paidETH\n activeJurors\n }\n }\n"];
|
|
93
|
-
export declare function graphql(source: "\n query CourtDetails($id: ID!) {\n court(id: $id) {\n policy\n minStake\n alpha\n numberDisputes\n numberClosedDisputes\n numberAppealingDisputes\n numberStakedJurors\n stake\n paidETH\n paidPNK\n timesPerPeriod\n }\n }\n"): (typeof documents)["\n query CourtDetails($id: ID!) {\n court(id: $id) {\n policy\n minStake\n alpha\n numberDisputes\n numberClosedDisputes\n numberAppealingDisputes\n numberStakedJurors\n stake\n paidETH\n paidPNK\n timesPerPeriod\n }\n }\n"];
|
|
94
|
-
export declare function graphql(source: "\n query CourtPolicyURI($courtID: ID!) {\n court(id: $courtID) {\n policy\n }\n }\n"): (typeof documents)["\n query CourtPolicyURI($courtID: ID!) {\n court(id: $courtID) {\n policy\n }\n }\n"];
|
|
95
|
-
export declare function graphql(source: "\n query CourtTree {\n court(id: \"1\") {\n name\n id\n children(orderBy: name) {\n name\n id\n children {\n name\n id\n children {\n name\n id\n children {\n name\n id\n children {\n name\n id\n }\n }\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query CourtTree {\n court(id: \"1\") {\n name\n id\n children(orderBy: name) {\n name\n id\n children {\n name\n id\n children {\n name\n id\n children {\n name\n id\n children {\n name\n id\n }\n }\n }\n }\n }\n }\n }\n"];
|
|
96
|
-
export declare function graphql(source: "\n query DisputeDetails($disputeID: ID!) {\n dispute(id: $disputeID) {\n court {\n id\n timesPerPeriod\n hiddenVotes\n feeForJuror\n }\n arbitrated {\n id\n }\n period\n ruled\n lastPeriodChange\n currentRuling\n overridden\n tied\n currentRound {\n id\n }\n currentRoundIndex\n }\n }\n"): (typeof documents)["\n query DisputeDetails($disputeID: ID!) {\n dispute(id: $disputeID) {\n court {\n id\n timesPerPeriod\n hiddenVotes\n feeForJuror\n }\n arbitrated {\n id\n }\n period\n ruled\n lastPeriodChange\n currentRuling\n overridden\n tied\n currentRound {\n id\n }\n currentRoundIndex\n }\n }\n"];
|
|
97
|
-
export declare function graphql(source: "\n query DisputeTemplate($id: ID!) {\n disputeTemplate(id: $id) {\n id\n templateTag\n templateData\n templateDataMappings\n }\n }\n"): (typeof documents)["\n query DisputeTemplate($id: ID!) {\n disputeTemplate(id: $id) {\n id\n templateTag\n templateData\n templateDataMappings\n }\n }\n"];
|
|
98
|
-
export declare function graphql(source: "\n query Draw($address: String, $disputeID: String, $roundID: String) {\n draws(first: 1000, where: { dispute: $disputeID, juror: $address, round: $roundID }) {\n voteIDNum\n vote {\n ... on ClassicVote {\n commit\n commited\n }\n }\n }\n }\n"): (typeof documents)["\n query Draw($address: String, $disputeID: String, $roundID: String) {\n draws(first: 1000, where: { dispute: $disputeID, juror: $address, round: $roundID }) {\n voteIDNum\n vote {\n ... on ClassicVote {\n commit\n commited\n }\n }\n }\n }\n"];
|
|
99
|
-
export declare function graphql(source: "\n query Evidences($evidenceGroupID: String) {\n evidences(where: { evidenceGroup: $evidenceGroupID }, orderBy: id, orderDirection: asc) {\n id\n evidence\n sender {\n id\n }\n }\n }\n"): (typeof documents)["\n query Evidences($evidenceGroupID: String) {\n evidences(where: { evidenceGroup: $evidenceGroupID }, orderBy: id, orderDirection: asc) {\n id\n evidence\n sender {\n id\n }\n }\n }\n"];
|
|
100
|
-
export declare function graphql(source: "\n query HomePage($timeframe: ID) {\n disputes(first: 3) {\n id\n }\n counters(where: { id_gt: $timeframe }) {\n id\n stakedPNK\n paidETH\n redistributedPNK\n activeJurors\n cases\n }\n }\n"): (typeof documents)["\n query HomePage($timeframe: ID) {\n disputes(first: 3) {\n id\n }\n counters(where: { id_gt: $timeframe }) {\n id\n stakedPNK\n paidETH\n redistributedPNK\n activeJurors\n cases\n }\n }\n"];
|
|
101
|
-
export declare function graphql(source: "\n query JurorStakeDetails($userId: String) {\n jurorTokensPerCourts(where: { juror: $userId }) {\n court {\n id\n name\n }\n staked\n locked\n }\n }\n"): (typeof documents)["\n query JurorStakeDetails($userId: String) {\n jurorTokensPerCourts(where: { juror: $userId }) {\n court {\n id\n name\n }\n staked\n locked\n }\n }\n"];
|
|
102
|
-
export declare function graphql(source: "\n query TopUsersByCoherenceScore($first: Int!, $orderBy: User_orderBy, $orderDirection: OrderDirection) {\n users(first: $first, orderBy: $orderBy, orderDirection: $orderDirection) {\n id\n coherenceScore\n totalCoherent\n totalResolvedDisputes\n }\n }\n"): (typeof documents)["\n query TopUsersByCoherenceScore($first: Int!, $orderBy: User_orderBy, $orderDirection: OrderDirection) {\n users(first: $first, orderBy: $orderBy, orderDirection: $orderDirection) {\n id\n coherenceScore\n totalCoherent\n totalResolvedDisputes\n }\n }\n"];
|
|
103
|
-
export declare function graphql(source: "\n fragment UserDetails on User {\n totalDisputes\n totalResolvedDisputes\n totalAppealingDisputes\n totalCoherent\n coherenceScore\n tokens {\n court {\n id\n name\n }\n }\n shifts {\n pnkAmount\n ethAmount\n }\n }\n"): (typeof documents)["\n fragment UserDetails on User {\n totalDisputes\n totalResolvedDisputes\n totalAppealingDisputes\n totalCoherent\n coherenceScore\n tokens {\n court {\n id\n name\n }\n }\n shifts {\n pnkAmount\n ethAmount\n }\n }\n"];
|
|
104
|
-
export declare function graphql(source: "\n query User($address: ID!) {\n user(id: $address) {\n disputes(orderBy: lastPeriodChange) {\n id\n }\n ...UserDetails\n }\n }\n"): (typeof documents)["\n query User($address: ID!) {\n user(id: $address) {\n disputes(orderBy: lastPeriodChange) {\n id\n }\n ...UserDetails\n }\n }\n"];
|
|
105
|
-
export declare function graphql(source: "\n query UserDisputeFilter($address: ID!, $where: Dispute_filter) {\n user(id: $address) {\n disputes(orderBy: lastPeriodChange, where: $where) {\n id\n }\n ...UserDetails\n }\n }\n"): (typeof documents)["\n query UserDisputeFilter($address: ID!, $where: Dispute_filter) {\n user(id: $address) {\n disputes(orderBy: lastPeriodChange, where: $where) {\n id\n }\n ...UserDetails\n }\n }\n"];
|
|
106
|
-
export declare function graphql(source: "\n query VotingHistory($disputeID: ID!) {\n dispute(id: $disputeID) {\n id\n createdAt\n rounds {\n nbVotes\n court {\n id\n name\n }\n timeline\n }\n disputeKitDispute {\n localRounds {\n ... on ClassicRound {\n winningChoice\n totalVoted\n justifications {\n id\n juror {\n id\n }\n choice\n reference\n }\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query VotingHistory($disputeID: ID!) {\n dispute(id: $disputeID) {\n id\n createdAt\n rounds {\n nbVotes\n court {\n id\n name\n }\n timeline\n }\n disputeKitDispute {\n localRounds {\n ... on ClassicRound {\n winningChoice\n totalVoted\n justifications {\n id\n juror {\n id\n }\n choice\n reference\n }\n }\n }\n }\n }\n }\n"];
|
|
107
|
-
export type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode<infer TType, any> ? TType : never;
|
|
108
|
-
export {};
|
package/lib/src/graphql/gql.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.graphql = void 0;
|
|
27
|
-
const types = __importStar(require("./graphql"));
|
|
28
|
-
const documents = {
|
|
29
|
-
"\n query AllCases {\n counter(id: 0) {\n cases\n casesRuled\n }\n }\n": types.AllCasesDocument,
|
|
30
|
-
"\n fragment DisputeDetails on Dispute {\n id\n arbitrated {\n id\n }\n court {\n id\n policy\n feeForJuror\n timesPerPeriod\n }\n period\n lastPeriodChange\n }\n": types.DisputeDetailsFragmentDoc,
|
|
31
|
-
"\n query CasesPageWhere($skip: Int, $where: Dispute_filter, $orderDirection: OrderDirection, $first: Int) {\n disputes(first: $first, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection, where: $where) {\n ...DisputeDetails\n }\n }\n": types.CasesPageWhereDocument,
|
|
32
|
-
"\n query CasesPage($skip: Int, $orderDirection: OrderDirection, $first: Int) {\n disputes(first: $first, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection) {\n ...DisputeDetails\n }\n }\n": types.CasesPageDocument,
|
|
33
|
-
"\n query MyCases($id: ID!, $skip: Int, $orderDirection: OrderDirection) {\n user(id: $id) {\n disputes(first: 3, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection) {\n ...DisputeDetails\n }\n }\n }\n": types.MyCasesDocument,
|
|
34
|
-
"\n query myCasesPageWhere($id: ID!, $skip: Int, $where: Dispute_filter, $orderDirection: OrderDirection) {\n user(id: $id) {\n disputes(first: 3, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection, where: $where) {\n ...DisputeDetails\n }\n }\n }\n": types.MyCasesPageWhereDocument,
|
|
35
|
-
"\n query ClassicAppeal($disputeID: ID!, $orderBy: DisputeKitDispute_orderBy, $orderDirection: OrderDirection) {\n dispute(id: $disputeID) {\n period\n court {\n id\n timesPerPeriod\n }\n arbitrated {\n id\n }\n lastPeriodChange\n disputeKitDispute(orderBy: $orderBy, orderDirection: $orderDirection) {\n id\n currentLocalRoundIndex\n localRounds {\n ... on ClassicRound {\n winningChoice\n paidFees\n fundedChoices\n }\n }\n }\n }\n }\n": types.ClassicAppealDocument,
|
|
36
|
-
"\n query Counter {\n counter(id: \"0\") {\n id\n cases\n casesRuled\n casesVoting\n casesAppealing\n stakedPNK\n redistributedPNK\n paidETH\n activeJurors\n }\n }\n": types.CounterDocument,
|
|
37
|
-
"\n query CourtDetails($id: ID!) {\n court(id: $id) {\n policy\n minStake\n alpha\n numberDisputes\n numberClosedDisputes\n numberAppealingDisputes\n numberStakedJurors\n stake\n paidETH\n paidPNK\n timesPerPeriod\n }\n }\n": types.CourtDetailsDocument,
|
|
38
|
-
"\n query CourtPolicyURI($courtID: ID!) {\n court(id: $courtID) {\n policy\n }\n }\n": types.CourtPolicyUriDocument,
|
|
39
|
-
"\n query CourtTree {\n court(id: \"1\") {\n name\n id\n children(orderBy: name) {\n name\n id\n children {\n name\n id\n children {\n name\n id\n children {\n name\n id\n children {\n name\n id\n }\n }\n }\n }\n }\n }\n }\n": types.CourtTreeDocument,
|
|
40
|
-
"\n query DisputeDetails($disputeID: ID!) {\n dispute(id: $disputeID) {\n court {\n id\n timesPerPeriod\n hiddenVotes\n feeForJuror\n }\n arbitrated {\n id\n }\n period\n ruled\n lastPeriodChange\n currentRuling\n overridden\n tied\n currentRound {\n id\n }\n currentRoundIndex\n }\n }\n": types.DisputeDetailsDocument,
|
|
41
|
-
"\n query DisputeTemplate($id: ID!) {\n disputeTemplate(id: $id) {\n id\n templateTag\n templateData\n templateDataMappings\n }\n }\n": types.DisputeTemplateDocument,
|
|
42
|
-
"\n query Draw($address: String, $disputeID: String, $roundID: String) {\n draws(first: 1000, where: { dispute: $disputeID, juror: $address, round: $roundID }) {\n voteIDNum\n vote {\n ... on ClassicVote {\n commit\n commited\n }\n }\n }\n }\n": types.DrawDocument,
|
|
43
|
-
"\n query Evidences($evidenceGroupID: String) {\n evidences(where: { evidenceGroup: $evidenceGroupID }, orderBy: id, orderDirection: asc) {\n id\n evidence\n sender {\n id\n }\n }\n }\n": types.EvidencesDocument,
|
|
44
|
-
"\n query HomePage($timeframe: ID) {\n disputes(first: 3) {\n id\n }\n counters(where: { id_gt: $timeframe }) {\n id\n stakedPNK\n paidETH\n redistributedPNK\n activeJurors\n cases\n }\n }\n": types.HomePageDocument,
|
|
45
|
-
"\n query JurorStakeDetails($userId: String) {\n jurorTokensPerCourts(where: { juror: $userId }) {\n court {\n id\n name\n }\n staked\n locked\n }\n }\n": types.JurorStakeDetailsDocument,
|
|
46
|
-
"\n query TopUsersByCoherenceScore($first: Int!, $orderBy: User_orderBy, $orderDirection: OrderDirection) {\n users(first: $first, orderBy: $orderBy, orderDirection: $orderDirection) {\n id\n coherenceScore\n totalCoherent\n totalResolvedDisputes\n }\n }\n": types.TopUsersByCoherenceScoreDocument,
|
|
47
|
-
"\n fragment UserDetails on User {\n totalDisputes\n totalResolvedDisputes\n totalAppealingDisputes\n totalCoherent\n coherenceScore\n tokens {\n court {\n id\n name\n }\n }\n shifts {\n pnkAmount\n ethAmount\n }\n }\n": types.UserDetailsFragmentDoc,
|
|
48
|
-
"\n query User($address: ID!) {\n user(id: $address) {\n disputes(orderBy: lastPeriodChange) {\n id\n }\n ...UserDetails\n }\n }\n": types.UserDocument,
|
|
49
|
-
"\n query UserDisputeFilter($address: ID!, $where: Dispute_filter) {\n user(id: $address) {\n disputes(orderBy: lastPeriodChange, where: $where) {\n id\n }\n ...UserDetails\n }\n }\n": types.UserDisputeFilterDocument,
|
|
50
|
-
"\n query VotingHistory($disputeID: ID!) {\n dispute(id: $disputeID) {\n id\n createdAt\n rounds {\n nbVotes\n court {\n id\n name\n }\n timeline\n }\n disputeKitDispute {\n localRounds {\n ... on ClassicRound {\n winningChoice\n totalVoted\n justifications {\n id\n juror {\n id\n }\n choice\n reference\n }\n }\n }\n }\n }\n }\n": types.VotingHistoryDocument,
|
|
51
|
-
};
|
|
52
|
-
function graphql(source) {
|
|
53
|
-
return documents[source] ?? {};
|
|
54
|
-
}
|
|
55
|
-
exports.graphql = graphql;
|
|
56
|
-
//# sourceMappingURL=gql.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gql.js","sourceRoot":"","sources":["../../../src/graphql/gql.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,iDAAmC;AAanC,MAAM,SAAS,GAAG;IACd,yFAAyF,EAAE,KAAK,CAAC,gBAAgB;IACjH,mNAAmN,EAAE,KAAK,CAAC,yBAAyB;IACpP,4QAA4Q,EAAE,KAAK,CAAC,sBAAsB;I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