@kleros/kleros-sdk 2.0.1-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 +12 -0
- package/lib/src/consts.d.ts +1 -0
- package/lib/src/consts.js +5 -0
- package/lib/src/consts.js.map +1 -0
- package/lib/src/dataMappings/actions/callAction.d.ts +2 -0
- package/lib/src/dataMappings/actions/callAction.js +20 -0
- package/lib/src/dataMappings/actions/callAction.js.map +1 -0
- package/lib/src/dataMappings/actions/eventAction.d.ts +2 -0
- package/lib/src/dataMappings/actions/eventAction.js +24 -0
- package/lib/src/dataMappings/actions/eventAction.js.map +1 -0
- package/lib/src/dataMappings/actions/fetchIpfsJsonAction.d.ts +2 -0
- package/lib/src/dataMappings/actions/fetchIpfsJsonAction.js +34 -0
- package/lib/src/dataMappings/actions/fetchIpfsJsonAction.js.map +1 -0
- package/lib/src/dataMappings/actions/jsonAction.d.ts +2 -0
- package/lib/src/dataMappings/actions/jsonAction.js +10 -0
- package/lib/src/dataMappings/actions/jsonAction.js.map +1 -0
- package/lib/src/dataMappings/actions/subgraphAction.d.ts +2 -0
- package/lib/src/dataMappings/actions/subgraphAction.js +23 -0
- package/lib/src/dataMappings/actions/subgraphAction.js.map +1 -0
- package/lib/src/dataMappings/decoder.d.ts +7 -0
- package/lib/src/dataMappings/decoder.js +41 -0
- package/lib/src/dataMappings/decoder.js.map +1 -0
- package/lib/src/dataMappings/disputeDetails.d.ts +35 -0
- package/lib/src/dataMappings/disputeDetails.js +12 -0
- package/lib/src/dataMappings/disputeDetails.js.map +1 -0
- package/lib/src/dataMappings/executeActions.d.ts +4 -0
- package/lib/src/dataMappings/executeActions.js +49 -0
- package/lib/src/dataMappings/executeActions.js.map +1 -0
- package/lib/src/dataMappings/retrieveRealityData.d.ts +1 -0
- package/lib/src/dataMappings/retrieveRealityData.js +95 -0
- package/lib/src/dataMappings/retrieveRealityData.js.map +1 -0
- package/lib/src/dataMappings/utils/createResultObject.d.ts +1 -0
- package/lib/src/dataMappings/utils/createResultObject.js +24 -0
- package/lib/src/dataMappings/utils/createResultObject.js.map +1 -0
- package/lib/src/dataMappings/utils/dataMappingTypes.d.ts +43 -0
- package/lib/src/dataMappings/utils/dataMappingTypes.js +51 -0
- package/lib/src/dataMappings/utils/dataMappingTypes.js.map +1 -0
- package/lib/src/dataMappings/utils/dataMappingValidators.d.ts +7 -0
- package/lib/src/dataMappings/utils/dataMappingValidators.js +46 -0
- package/lib/src/dataMappings/utils/dataMappingValidators.js.map +1 -0
- package/lib/src/dataMappings/utils/disputeDetailsSchema.d.ts +167 -0
- package/lib/src/dataMappings/utils/disputeDetailsSchema.js +62 -0
- package/lib/src/dataMappings/utils/disputeDetailsSchema.js.map +1 -0
- package/lib/src/dataMappings/utils/disputeDetailsTypes.d.ts +7 -0
- package/lib/src/dataMappings/utils/disputeDetailsTypes.js +6 -0
- package/lib/src/dataMappings/utils/disputeDetailsTypes.js.map +1 -0
- package/lib/src/dataMappings/utils/disputeDetailsValidator.d.ts +32 -0
- package/lib/src/dataMappings/utils/disputeDetailsValidator.js +29 -0
- package/lib/src/dataMappings/utils/disputeDetailsValidator.js.map +1 -0
- package/lib/src/dataMappings/utils/disputeRequest.d.ts +8 -0
- package/lib/src/dataMappings/utils/disputeRequest.js +3 -0
- package/lib/src/dataMappings/utils/disputeRequest.js.map +1 -0
- package/lib/src/dataMappings/utils/populateTemplate.d.ts +2 -0
- package/lib/src/dataMappings/utils/populateTemplate.js +18 -0
- package/lib/src/dataMappings/utils/populateTemplate.js.map +1 -0
- package/lib/src/dataMappings/utils/replacePlaceholdersWithValues.d.ts +1 -0
- package/lib/src/dataMappings/utils/replacePlaceholdersWithValues.js +17 -0
- package/lib/src/dataMappings/utils/replacePlaceholdersWithValues.js.map +1 -0
- package/lib/src/graphql/fragment-masking.d.ts +15 -0
- package/lib/src/graphql/fragment-masking.js +23 -0
- package/lib/src/graphql/fragment-masking.js.map +1 -0
- package/lib/src/graphql/gql.d.ts +108 -0
- package/lib/src/graphql/gql.js +56 -0
- package/lib/src/graphql/gql.js.map +1 -0
- package/lib/src/graphql/graphql.d.ts +4869 -0
- package/lib/src/graphql/graphql.js +719 -0
- package/lib/src/graphql/graphql.js.map +1 -0
- package/lib/src/graphql/index.d.ts +2 -0
- package/lib/src/graphql/index.js +19 -0
- package/lib/src/graphql/index.js.map +1 -0
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.js +18 -0
- package/lib/src/index.js.map +1 -0
- package/lib/src/sdk.d.ts +4 -0
- package/lib/src/sdk.js +32 -0
- package/lib/src/sdk.js.map +1 -0
- package/lib/test/dataMappings.test.d.ts +1 -0
- package/lib/test/dataMappings.test.js +183 -0
- package/lib/test/dataMappings.test.js.map +1 -0
- package/lib/test/disputeDetailsSchema.test.d.ts +1 -0
- package/lib/test/disputeDetailsSchema.test.js +79 -0
- package/lib/test/disputeDetailsSchema.test.js.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateRealityMapping = exports.validateFetchIpfsJsonMapping = exports.validateJsonMapping = exports.validateAbiCallMapping = exports.validateAbiEventMapping = exports.validateSubgraphMapping = void 0;
|
|
4
|
+
const validateSubgraphMapping = (mapping) => {
|
|
5
|
+
if (mapping.endpoint !== undefined) {
|
|
6
|
+
throw new Error("Invalid mapping for graphql action.");
|
|
7
|
+
}
|
|
8
|
+
return mapping;
|
|
9
|
+
};
|
|
10
|
+
exports.validateSubgraphMapping = validateSubgraphMapping;
|
|
11
|
+
const validateAbiEventMapping = (mapping) => {
|
|
12
|
+
if (mapping.abi === undefined || mapping.eventFilter === undefined) {
|
|
13
|
+
throw new Error("Invalid mapping for abi/event action.");
|
|
14
|
+
}
|
|
15
|
+
return mapping;
|
|
16
|
+
};
|
|
17
|
+
exports.validateAbiEventMapping = validateAbiEventMapping;
|
|
18
|
+
const validateAbiCallMapping = (mapping) => {
|
|
19
|
+
if (mapping.abi === undefined || mapping.args === undefined) {
|
|
20
|
+
throw new Error("Invalid mapping for abi/call action.");
|
|
21
|
+
}
|
|
22
|
+
return mapping;
|
|
23
|
+
};
|
|
24
|
+
exports.validateAbiCallMapping = validateAbiCallMapping;
|
|
25
|
+
const validateJsonMapping = (mapping) => {
|
|
26
|
+
if (mapping.value === undefined) {
|
|
27
|
+
throw new Error("Invalid mapping for json action.");
|
|
28
|
+
}
|
|
29
|
+
return mapping;
|
|
30
|
+
};
|
|
31
|
+
exports.validateJsonMapping = validateJsonMapping;
|
|
32
|
+
const validateFetchIpfsJsonMapping = (mapping) => {
|
|
33
|
+
if (mapping.ipfsUri === undefined) {
|
|
34
|
+
throw new Error("Invalid mapping for fetch/ipfs/json action.");
|
|
35
|
+
}
|
|
36
|
+
return mapping;
|
|
37
|
+
};
|
|
38
|
+
exports.validateFetchIpfsJsonMapping = validateFetchIpfsJsonMapping;
|
|
39
|
+
const validateRealityMapping = (mapping) => {
|
|
40
|
+
if (mapping.type !== "reality" || typeof mapping.realityQuestionID !== "string") {
|
|
41
|
+
throw new Error("Invalid mapping for reality action.");
|
|
42
|
+
}
|
|
43
|
+
return mapping;
|
|
44
|
+
};
|
|
45
|
+
exports.validateRealityMapping = validateRealityMapping;
|
|
46
|
+
//# sourceMappingURL=dataMappingValidators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC3D,CAAC;IACD,OAAO,OAA0B,CAAC;AACpC,CAAC,CAAC;AALW,QAAA,uBAAuB,2BAKlC;AAEK,MAAM,sBAAsB,GAAG,CAAC,OAAoC,EAAE,EAAE;IAC7E,IAAK,OAA0B,CAAC,GAAG,KAAK,SAAS,IAAK,OAA0B,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QACpG,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,OAAyB,CAAC;AACnC,CAAC,CAAC;AALW,QAAA,sBAAsB,0BAKjC;AAEK,MAAM,mBAAmB,GAAG,CAAC,OAAiC,EAAE,EAAE;IACvE,IAAK,OAAuB,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;QACjD,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,OAAsB,CAAC;AAChC,CAAC,CAAC;AALW,QAAA,mBAAmB,uBAK9B;AAEK,MAAM,4BAA4B,GAAG,CAAC,OAA0C,EAAE,EAAE;IACzF,IAAK,OAAgC,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QAC5D,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,OAA+B,CAAC;AACzC,CAAC,CAAC;AALW,QAAA,4BAA4B,gCAKvC;AAEK,MAAM,sBAAsB,GAAG,CAAC,OAAoC,EAAE,EAAE;IAC7E,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,IAAI,OAAQ,OAA0B,CAAC,iBAAiB,KAAK,QAAQ,EAAE,CAAC;QACpG,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACzD,CAAC;IACD,OAAO,OAAyB,CAAC;AACnC,CAAC,CAAC;AALW,QAAA,sBAAsB,0BAKjC"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ethAddressSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
3
|
+
export declare const ensNameSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
4
|
+
export declare const ethAddressOrEnsNameSchema: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
5
|
+
export declare enum QuestionType {
|
|
6
|
+
Bool = "bool",
|
|
7
|
+
Datetime = "datetime",
|
|
8
|
+
MultipleSelect = "multiple-select",
|
|
9
|
+
SingleSelect = "single-select",
|
|
10
|
+
Uint = "uint"
|
|
11
|
+
}
|
|
12
|
+
export declare const QuestionTypeSchema: z.ZodNativeEnum<typeof QuestionType>;
|
|
13
|
+
export declare const AnswerSchema: z.ZodObject<{
|
|
14
|
+
id: z.ZodString;
|
|
15
|
+
title: z.ZodString;
|
|
16
|
+
description: z.ZodString;
|
|
17
|
+
reserved: z.ZodBoolean;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
id: string;
|
|
20
|
+
title: string;
|
|
21
|
+
description: string;
|
|
22
|
+
reserved: boolean;
|
|
23
|
+
}, {
|
|
24
|
+
id: string;
|
|
25
|
+
title: string;
|
|
26
|
+
description: string;
|
|
27
|
+
reserved: boolean;
|
|
28
|
+
}>;
|
|
29
|
+
export declare const AttachmentSchema: z.ZodObject<{
|
|
30
|
+
label: z.ZodString;
|
|
31
|
+
uri: z.ZodString;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
label: string;
|
|
34
|
+
uri: string;
|
|
35
|
+
}, {
|
|
36
|
+
label: string;
|
|
37
|
+
uri: string;
|
|
38
|
+
}>;
|
|
39
|
+
export declare const AliasSchema: z.ZodObject<{
|
|
40
|
+
id: z.ZodOptional<z.ZodString>;
|
|
41
|
+
name: z.ZodString;
|
|
42
|
+
address: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
name: string;
|
|
45
|
+
address: string;
|
|
46
|
+
id?: string | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
name: string;
|
|
49
|
+
address: string;
|
|
50
|
+
id?: string | undefined;
|
|
51
|
+
}>;
|
|
52
|
+
declare const DisputeDetailsSchema: z.ZodObject<{
|
|
53
|
+
title: z.ZodString;
|
|
54
|
+
description: z.ZodString;
|
|
55
|
+
question: z.ZodString;
|
|
56
|
+
type: z.ZodNativeEnum<typeof QuestionType>;
|
|
57
|
+
answers: z.ZodArray<z.ZodObject<{
|
|
58
|
+
id: z.ZodString;
|
|
59
|
+
title: z.ZodString;
|
|
60
|
+
description: z.ZodString;
|
|
61
|
+
reserved: z.ZodBoolean;
|
|
62
|
+
}, "strip", z.ZodTypeAny, {
|
|
63
|
+
id: string;
|
|
64
|
+
title: string;
|
|
65
|
+
description: string;
|
|
66
|
+
reserved: boolean;
|
|
67
|
+
}, {
|
|
68
|
+
id: string;
|
|
69
|
+
title: string;
|
|
70
|
+
description: string;
|
|
71
|
+
reserved: boolean;
|
|
72
|
+
}>, "many">;
|
|
73
|
+
policyURI: z.ZodString;
|
|
74
|
+
attachment: z.ZodObject<{
|
|
75
|
+
label: z.ZodString;
|
|
76
|
+
uri: z.ZodString;
|
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
|
78
|
+
label: string;
|
|
79
|
+
uri: string;
|
|
80
|
+
}, {
|
|
81
|
+
label: string;
|
|
82
|
+
uri: string;
|
|
83
|
+
}>;
|
|
84
|
+
frontendUrl: z.ZodString;
|
|
85
|
+
arbitrableChainID: z.ZodString;
|
|
86
|
+
arbitrableAddress: z.ZodEffects<z.ZodString, string, string>;
|
|
87
|
+
arbitratorChainID: z.ZodString;
|
|
88
|
+
arbitratorAddress: z.ZodEffects<z.ZodString, string, string>;
|
|
89
|
+
category: z.ZodString;
|
|
90
|
+
lang: z.ZodString;
|
|
91
|
+
specification: z.ZodString;
|
|
92
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
93
|
+
id: z.ZodOptional<z.ZodString>;
|
|
94
|
+
name: z.ZodString;
|
|
95
|
+
address: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
96
|
+
}, "strip", z.ZodTypeAny, {
|
|
97
|
+
name: string;
|
|
98
|
+
address: string;
|
|
99
|
+
id?: string | undefined;
|
|
100
|
+
}, {
|
|
101
|
+
name: string;
|
|
102
|
+
address: string;
|
|
103
|
+
id?: string | undefined;
|
|
104
|
+
}>, "many">>;
|
|
105
|
+
version: z.ZodString;
|
|
106
|
+
}, "strip", z.ZodTypeAny, {
|
|
107
|
+
type: QuestionType;
|
|
108
|
+
title: string;
|
|
109
|
+
description: string;
|
|
110
|
+
question: string;
|
|
111
|
+
answers: {
|
|
112
|
+
id: string;
|
|
113
|
+
title: string;
|
|
114
|
+
description: string;
|
|
115
|
+
reserved: boolean;
|
|
116
|
+
}[];
|
|
117
|
+
policyURI: string;
|
|
118
|
+
attachment: {
|
|
119
|
+
label: string;
|
|
120
|
+
uri: string;
|
|
121
|
+
};
|
|
122
|
+
frontendUrl: string;
|
|
123
|
+
arbitrableChainID: string;
|
|
124
|
+
arbitrableAddress: string;
|
|
125
|
+
arbitratorChainID: string;
|
|
126
|
+
arbitratorAddress: string;
|
|
127
|
+
category: string;
|
|
128
|
+
lang: string;
|
|
129
|
+
specification: string;
|
|
130
|
+
version: string;
|
|
131
|
+
aliases?: {
|
|
132
|
+
name: string;
|
|
133
|
+
address: string;
|
|
134
|
+
id?: string | undefined;
|
|
135
|
+
}[] | undefined;
|
|
136
|
+
}, {
|
|
137
|
+
type: QuestionType;
|
|
138
|
+
title: string;
|
|
139
|
+
description: string;
|
|
140
|
+
question: string;
|
|
141
|
+
answers: {
|
|
142
|
+
id: string;
|
|
143
|
+
title: string;
|
|
144
|
+
description: string;
|
|
145
|
+
reserved: boolean;
|
|
146
|
+
}[];
|
|
147
|
+
policyURI: string;
|
|
148
|
+
attachment: {
|
|
149
|
+
label: string;
|
|
150
|
+
uri: string;
|
|
151
|
+
};
|
|
152
|
+
frontendUrl: string;
|
|
153
|
+
arbitrableChainID: string;
|
|
154
|
+
arbitrableAddress: string;
|
|
155
|
+
arbitratorChainID: string;
|
|
156
|
+
arbitratorAddress: string;
|
|
157
|
+
category: string;
|
|
158
|
+
lang: string;
|
|
159
|
+
specification: string;
|
|
160
|
+
version: string;
|
|
161
|
+
aliases?: {
|
|
162
|
+
name: string;
|
|
163
|
+
address: string;
|
|
164
|
+
id?: string | undefined;
|
|
165
|
+
}[] | undefined;
|
|
166
|
+
}>;
|
|
167
|
+
export default DisputeDetailsSchema;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AliasSchema = exports.AttachmentSchema = exports.AnswerSchema = exports.QuestionTypeSchema = exports.QuestionType = exports.ethAddressOrEnsNameSchema = exports.ensNameSchema = exports.ethAddressSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const viem_1 = require("viem");
|
|
6
|
+
const ens_1 = require("viem/ens");
|
|
7
|
+
exports.ethAddressSchema = zod_1.z.string().refine((value) => (0, viem_1.isAddress)(value), {
|
|
8
|
+
message: "Provided address is invalid.",
|
|
9
|
+
});
|
|
10
|
+
exports.ensNameSchema = zod_1.z
|
|
11
|
+
.string()
|
|
12
|
+
.refine((value) => typeof (0, ens_1.normalize)(value) === "string" && value.endsWith(".eth"), {
|
|
13
|
+
message: "Provided ENS name is invalid.",
|
|
14
|
+
});
|
|
15
|
+
exports.ethAddressOrEnsNameSchema = zod_1.z.union([exports.ethAddressSchema, exports.ensNameSchema], {
|
|
16
|
+
errorMap: () => ({ message: "Provided address or ENS name is invalid." }),
|
|
17
|
+
});
|
|
18
|
+
var QuestionType;
|
|
19
|
+
(function (QuestionType) {
|
|
20
|
+
QuestionType["Bool"] = "bool";
|
|
21
|
+
QuestionType["Datetime"] = "datetime";
|
|
22
|
+
QuestionType["MultipleSelect"] = "multiple-select";
|
|
23
|
+
QuestionType["SingleSelect"] = "single-select";
|
|
24
|
+
QuestionType["Uint"] = "uint";
|
|
25
|
+
})(QuestionType || (exports.QuestionType = QuestionType = {}));
|
|
26
|
+
exports.QuestionTypeSchema = zod_1.z.nativeEnum(QuestionType);
|
|
27
|
+
exports.AnswerSchema = zod_1.z.object({
|
|
28
|
+
id: zod_1.z.string().regex(/^0x[0-9a-fA-F]+$/),
|
|
29
|
+
title: zod_1.z.string(),
|
|
30
|
+
description: zod_1.z.string(),
|
|
31
|
+
reserved: zod_1.z.boolean(),
|
|
32
|
+
});
|
|
33
|
+
exports.AttachmentSchema = zod_1.z.object({
|
|
34
|
+
label: zod_1.z.string(),
|
|
35
|
+
uri: zod_1.z.string(),
|
|
36
|
+
});
|
|
37
|
+
exports.AliasSchema = zod_1.z.object({
|
|
38
|
+
id: zod_1.z.string().optional(),
|
|
39
|
+
name: zod_1.z.string(),
|
|
40
|
+
address: exports.ethAddressOrEnsNameSchema,
|
|
41
|
+
});
|
|
42
|
+
const DisputeDetailsSchema = zod_1.z.object({
|
|
43
|
+
title: zod_1.z.string(),
|
|
44
|
+
description: zod_1.z.string(),
|
|
45
|
+
question: zod_1.z.string(),
|
|
46
|
+
type: exports.QuestionTypeSchema,
|
|
47
|
+
answers: zod_1.z.array(exports.AnswerSchema),
|
|
48
|
+
policyURI: zod_1.z.string(),
|
|
49
|
+
attachment: exports.AttachmentSchema,
|
|
50
|
+
frontendUrl: zod_1.z.string(),
|
|
51
|
+
arbitrableChainID: zod_1.z.string(),
|
|
52
|
+
arbitrableAddress: exports.ethAddressSchema,
|
|
53
|
+
arbitratorChainID: zod_1.z.string(),
|
|
54
|
+
arbitratorAddress: exports.ethAddressSchema,
|
|
55
|
+
category: zod_1.z.string(),
|
|
56
|
+
lang: zod_1.z.string(),
|
|
57
|
+
specification: zod_1.z.string(),
|
|
58
|
+
aliases: zod_1.z.array(exports.AliasSchema).optional(),
|
|
59
|
+
version: zod_1.z.string(),
|
|
60
|
+
});
|
|
61
|
+
exports.default = DisputeDetailsSchema;
|
|
62
|
+
//# sourceMappingURL=disputeDetailsSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disputeDetailsSchema.js","sourceRoot":"","sources":["../../../../src/dataMappings/utils/disputeDetailsSchema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,+BAAiC;AACjC,kCAAqC;AAExB,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,gBAAS,EAAC,KAAK,CAAC,EAAE;IAC7E,OAAO,EAAE,8BAA8B;CACxC,CAAC,CAAC;AAEU,QAAA,aAAa,GAAG,OAAC;KAC3B,MAAM,EAAE;KACR,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,IAAA,eAAS,EAAC,KAAK,CAAC,KAAK,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;IACjF,OAAO,EAAE,+BAA+B;CACzC,CAAC,CAAC;AAEQ,QAAA,yBAAyB,GAAG,OAAC,CAAC,KAAK,CAAC,CAAC,wBAAgB,EAAE,qBAAa,CAAC,EAAE;IAClF,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,0CAA0C,EAAE,CAAC;CAC1E,CAAC,CAAC;AAEH,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,qCAAqB,CAAA;IACrB,kDAAkC,CAAA;IAClC,8CAA8B,CAAA;IAC9B,6BAAa,CAAA;AACf,CAAC,EANW,YAAY,4BAAZ,YAAY,QAMvB;AACY,QAAA,kBAAkB,GAAG,OAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;AAEhD,QAAA,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,kBAAkB,CAAC;IACxC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE;CACtB,CAAC,CAAC;AAEU,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC;AAEU,QAAA,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAClC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,iCAAyB;CACnC,CAAC,CAAC;AAEH,MAAM,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,IAAI,EAAE,0BAAkB;IACxB,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,oBAAY,CAAC;IAC9B,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,UAAU,EAAE,wBAAgB;IAC5B,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE;IAC7B,iBAAiB,EAAE,wBAAgB;IACnC,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE;IAC7B,iBAAiB,EAAE,wBAAgB;IACnC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;IACzB,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,mBAAW,CAAC,CAAC,QAAQ,EAAE;IACxC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC;AAEH,kBAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import DisputeDetailsSchema, { AliasSchema, AnswerSchema, AttachmentSchema } from "./disputeDetailsSchema";
|
|
3
|
+
export { QuestionType } from "./disputeDetailsSchema";
|
|
4
|
+
export type DisputeDetails = z.infer<typeof DisputeDetailsSchema>;
|
|
5
|
+
export type Answer = z.infer<typeof AnswerSchema>;
|
|
6
|
+
export type Alias = z.infer<typeof AliasSchema>;
|
|
7
|
+
export type Attachment = z.infer<typeof AttachmentSchema>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QuestionType = void 0;
|
|
4
|
+
var disputeDetailsSchema_1 = require("./disputeDetailsSchema");
|
|
5
|
+
Object.defineProperty(exports, "QuestionType", { enumerable: true, get: function () { return disputeDetailsSchema_1.QuestionType; } });
|
|
6
|
+
//# sourceMappingURL=disputeDetailsTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disputeDetailsTypes.js","sourceRoot":"","sources":["../../../../src/dataMappings/utils/disputeDetailsTypes.ts"],"names":[],"mappings":";;;AAGA,+DAAsD;AAA7C,oHAAA,YAAY,OAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disputeRequest.js","sourceRoot":"","sources":["../../../../src/dataMappings/utils/disputeRequest.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.populateTemplate = void 0;
|
|
7
|
+
const mustache_1 = __importDefault(require("mustache"));
|
|
8
|
+
const disputeDetailsValidator_1 = require("./disputeDetailsValidator");
|
|
9
|
+
const populateTemplate = (mustacheTemplate, data) => {
|
|
10
|
+
const render = mustache_1.default.render(mustacheTemplate, data);
|
|
11
|
+
console.log("MUSTACHE RENDER: ", render);
|
|
12
|
+
const dispute = JSON.parse(render);
|
|
13
|
+
if (!(0, disputeDetailsValidator_1.validate)(dispute)) {
|
|
14
|
+
}
|
|
15
|
+
return dispute;
|
|
16
|
+
};
|
|
17
|
+
exports.populateTemplate = populateTemplate;
|
|
18
|
+
//# sourceMappingURL=populateTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const replacePlaceholdersWithValues: (mapping: any, context: any) => any;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.replacePlaceholdersWithValues = void 0;
|
|
4
|
+
const replacePlaceholdersWithValues = (mapping, context) => {
|
|
5
|
+
let mappingAsString = JSON.stringify(mapping);
|
|
6
|
+
const replacedMapping = mappingAsString.replace(/context\.([A-Za-z0-9_]+)/g, (_, variableName) => {
|
|
7
|
+
if (context.hasOwnProperty(variableName)) {
|
|
8
|
+
return context[variableName];
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
throw new Error(`Variable '${variableName}' not found in context.`);
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
return JSON.parse(replacedMapping);
|
|
15
|
+
};
|
|
16
|
+
exports.replacePlaceholdersWithValues = replacePlaceholdersWithValues;
|
|
17
|
+
//# sourceMappingURL=replacePlaceholdersWithValues.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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>;
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,108 @@
|
|
|
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 {};
|