@coopenomics/sdk 2.2.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/LICENSE.md +21 -0
- package/README.md +131 -0
- package/dist/index.cjs +3202 -0
- package/dist/index.d.cts +14244 -0
- package/dist/index.d.mts +14244 -0
- package/dist/index.d.ts +14244 -0
- package/dist/index.mjs +3191 -0
- package/package.json +78 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,3191 @@
|
|
|
1
|
+
import WebSocket from 'isomorphic-ws';
|
|
2
|
+
import { createClient as createClient$1 } from 'graphql-ws';
|
|
3
|
+
import { APIClient, PrivateKey, Action } from '@wharfkit/antelope';
|
|
4
|
+
import { ContractKit, Table } from '@wharfkit/contract';
|
|
5
|
+
import { Session } from '@wharfkit/session';
|
|
6
|
+
import { WalletPluginPrivateKey } from '@wharfkit/wallet-plugin-privatekey';
|
|
7
|
+
|
|
8
|
+
const AllTypesProps = {
|
|
9
|
+
AccountType: "enum",
|
|
10
|
+
AddParticipantInput: {
|
|
11
|
+
entrepreneur_data: "CreateEntrepreneurDataInput",
|
|
12
|
+
individual_data: "CreateIndividualDataInput",
|
|
13
|
+
organization_data: "CreateOrganizationDataInput",
|
|
14
|
+
type: "AccountType"
|
|
15
|
+
},
|
|
16
|
+
AddTrustedAccountInput: {},
|
|
17
|
+
AgreementInput: {},
|
|
18
|
+
BankAccountDetailsInput: {},
|
|
19
|
+
BankAccountInput: {
|
|
20
|
+
details: "BankAccountDetailsInput"
|
|
21
|
+
},
|
|
22
|
+
Country: "enum",
|
|
23
|
+
CreateBankAccountInput: {
|
|
24
|
+
data: "BankAccountInput"
|
|
25
|
+
},
|
|
26
|
+
CreateBranchInput: {},
|
|
27
|
+
CreateDepositPaymentInput: {},
|
|
28
|
+
CreateEntrepreneurDataInput: {
|
|
29
|
+
bank_account: "BankAccountInput",
|
|
30
|
+
country: "Country",
|
|
31
|
+
details: "EntrepreneurDetailsInput"
|
|
32
|
+
},
|
|
33
|
+
CreateIndividualDataInput: {
|
|
34
|
+
passport: "PassportInput"
|
|
35
|
+
},
|
|
36
|
+
CreateInitialPaymentInput: {},
|
|
37
|
+
CreateOrganizationDataInput: {
|
|
38
|
+
bank_account: "BankAccountInput",
|
|
39
|
+
details: "OrganizationDetailsInput",
|
|
40
|
+
represented_by: "RepresentedByInput",
|
|
41
|
+
type: "OrganizationType"
|
|
42
|
+
},
|
|
43
|
+
CreateProjectFreeDecisionInput: {},
|
|
44
|
+
DateTime: `scalar.DateTime`,
|
|
45
|
+
DeleteAccountInput: {},
|
|
46
|
+
DeleteBranchInput: {},
|
|
47
|
+
DeletePaymentMethodInput: {},
|
|
48
|
+
DeleteTrustedAccountInput: {},
|
|
49
|
+
EditBranchInput: {},
|
|
50
|
+
EntrepreneurDetailsInput: {},
|
|
51
|
+
ExtensionInput: {
|
|
52
|
+
config: "JSON",
|
|
53
|
+
created_at: "DateTime",
|
|
54
|
+
updated_at: "DateTime"
|
|
55
|
+
},
|
|
56
|
+
FreeDecisionGenerateDocumentInput: {},
|
|
57
|
+
GenerateDocumentInput: {},
|
|
58
|
+
GenerateDocumentOptionsInput: {},
|
|
59
|
+
GetAccountInput: {},
|
|
60
|
+
GetAccountsInput: {},
|
|
61
|
+
GetBranchesInput: {},
|
|
62
|
+
GetDocumentsFilterInput: {
|
|
63
|
+
additionalFilters: "JSON"
|
|
64
|
+
},
|
|
65
|
+
GetDocumentsInput: {
|
|
66
|
+
filter: "GetDocumentsFilterInput"
|
|
67
|
+
},
|
|
68
|
+
GetExtensionsInput: {},
|
|
69
|
+
GetPaymentMethodsInput: {},
|
|
70
|
+
GetPaymentsInput: {
|
|
71
|
+
status: "PaymentStatus"
|
|
72
|
+
},
|
|
73
|
+
Init: {
|
|
74
|
+
organization_data: "CreateOrganizationDataInput",
|
|
75
|
+
vars: "VarsInput"
|
|
76
|
+
},
|
|
77
|
+
Install: {
|
|
78
|
+
soviet: "SovietMemberInput"
|
|
79
|
+
},
|
|
80
|
+
JSON: `scalar.JSON`,
|
|
81
|
+
LangType: "enum",
|
|
82
|
+
LoginInput: {},
|
|
83
|
+
LogoutInput: {},
|
|
84
|
+
MetaDocumentInput: {},
|
|
85
|
+
Mutation: {
|
|
86
|
+
addParticipant: {
|
|
87
|
+
data: "AddParticipantInput"
|
|
88
|
+
},
|
|
89
|
+
addTrustedAccount: {
|
|
90
|
+
data: "AddTrustedAccountInput"
|
|
91
|
+
},
|
|
92
|
+
createBankAccount: {
|
|
93
|
+
data: "CreateBankAccountInput"
|
|
94
|
+
},
|
|
95
|
+
createBranch: {
|
|
96
|
+
data: "CreateBranchInput"
|
|
97
|
+
},
|
|
98
|
+
createDepositPayment: {
|
|
99
|
+
data: "CreateDepositPaymentInput"
|
|
100
|
+
},
|
|
101
|
+
createInitialPayment: {
|
|
102
|
+
data: "CreateInitialPaymentInput"
|
|
103
|
+
},
|
|
104
|
+
createProjectOfFreeDecision: {
|
|
105
|
+
data: "CreateProjectFreeDecisionInput"
|
|
106
|
+
},
|
|
107
|
+
deleteAccount: {
|
|
108
|
+
data: "DeleteAccountInput"
|
|
109
|
+
},
|
|
110
|
+
deleteBranch: {
|
|
111
|
+
data: "DeleteBranchInput"
|
|
112
|
+
},
|
|
113
|
+
deletePaymentMethod: {
|
|
114
|
+
data: "DeletePaymentMethodInput"
|
|
115
|
+
},
|
|
116
|
+
deleteTrustedAccount: {
|
|
117
|
+
data: "DeleteTrustedAccountInput"
|
|
118
|
+
},
|
|
119
|
+
editBranch: {
|
|
120
|
+
data: "EditBranchInput"
|
|
121
|
+
},
|
|
122
|
+
generateFreeDecision: {
|
|
123
|
+
data: "FreeDecisionGenerateDocumentInput",
|
|
124
|
+
options: "GenerateDocumentOptionsInput"
|
|
125
|
+
},
|
|
126
|
+
generateParticipantApplication: {
|
|
127
|
+
data: "ParticipantApplicationGenerateDocumentInput",
|
|
128
|
+
options: "GenerateDocumentOptionsInput"
|
|
129
|
+
},
|
|
130
|
+
generateParticipantApplicationDecision: {
|
|
131
|
+
data: "ParticipantApplicationDecisionGenerateDocumentInput",
|
|
132
|
+
options: "GenerateDocumentOptionsInput"
|
|
133
|
+
},
|
|
134
|
+
generatePrivacyAgreement: {
|
|
135
|
+
data: "GenerateDocumentInput",
|
|
136
|
+
options: "GenerateDocumentOptionsInput"
|
|
137
|
+
},
|
|
138
|
+
generateProjectOfFreeDecision: {
|
|
139
|
+
data: "ProjectFreeDecisionGenerateDocumentInput",
|
|
140
|
+
options: "GenerateDocumentOptionsInput"
|
|
141
|
+
},
|
|
142
|
+
generateSelectBranchDocument: {
|
|
143
|
+
data: "SelectBranchGenerateDocumentInput",
|
|
144
|
+
options: "GenerateDocumentOptionsInput"
|
|
145
|
+
},
|
|
146
|
+
generateSignatureAgreement: {
|
|
147
|
+
data: "GenerateDocumentInput",
|
|
148
|
+
options: "GenerateDocumentOptionsInput"
|
|
149
|
+
},
|
|
150
|
+
generateUserAgreement: {
|
|
151
|
+
data: "GenerateDocumentInput",
|
|
152
|
+
options: "GenerateDocumentOptionsInput"
|
|
153
|
+
},
|
|
154
|
+
generateWalletAgreement: {
|
|
155
|
+
data: "GenerateDocumentInput",
|
|
156
|
+
options: "GenerateDocumentOptionsInput"
|
|
157
|
+
},
|
|
158
|
+
initSystem: {
|
|
159
|
+
data: "Init"
|
|
160
|
+
},
|
|
161
|
+
installExtension: {
|
|
162
|
+
data: "ExtensionInput"
|
|
163
|
+
},
|
|
164
|
+
installSystem: {
|
|
165
|
+
data: "Install"
|
|
166
|
+
},
|
|
167
|
+
login: {
|
|
168
|
+
data: "LoginInput"
|
|
169
|
+
},
|
|
170
|
+
logout: {
|
|
171
|
+
data: "LogoutInput"
|
|
172
|
+
},
|
|
173
|
+
publishProjectOfFreeDecision: {
|
|
174
|
+
data: "PublishProjectFreeDecisionInput"
|
|
175
|
+
},
|
|
176
|
+
refresh: {
|
|
177
|
+
data: "RefreshInput"
|
|
178
|
+
},
|
|
179
|
+
registerAccount: {
|
|
180
|
+
data: "RegisterAccountInput"
|
|
181
|
+
},
|
|
182
|
+
registerParticipant: {
|
|
183
|
+
data: "RegisterParticipantInput"
|
|
184
|
+
},
|
|
185
|
+
resetKey: {
|
|
186
|
+
data: "ResetKeyInput"
|
|
187
|
+
},
|
|
188
|
+
selectBranch: {
|
|
189
|
+
data: "SelectBranchInput"
|
|
190
|
+
},
|
|
191
|
+
setPaymentStatus: {
|
|
192
|
+
data: "SetPaymentStatusInput"
|
|
193
|
+
},
|
|
194
|
+
setWif: {
|
|
195
|
+
data: "SetWifInput"
|
|
196
|
+
},
|
|
197
|
+
startResetKey: {
|
|
198
|
+
data: "StartResetKeyInput"
|
|
199
|
+
},
|
|
200
|
+
uninstallExtension: {
|
|
201
|
+
data: "UninstallExtensionInput"
|
|
202
|
+
},
|
|
203
|
+
updateAccount: {
|
|
204
|
+
data: "UpdateAccountInput"
|
|
205
|
+
},
|
|
206
|
+
updateBankAccount: {
|
|
207
|
+
data: "UpdateBankAccountInput"
|
|
208
|
+
},
|
|
209
|
+
updateExtension: {
|
|
210
|
+
data: "ExtensionInput"
|
|
211
|
+
},
|
|
212
|
+
updateSystem: {
|
|
213
|
+
data: "Update"
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
OrganizationDetailsInput: {},
|
|
217
|
+
OrganizationType: "enum",
|
|
218
|
+
PaginationInput: {},
|
|
219
|
+
ParticipantApplicationDecisionGenerateDocumentInput: {},
|
|
220
|
+
ParticipantApplicationGenerateDocumentInput: {},
|
|
221
|
+
ParticipantApplicationSignedDocumentInput: {
|
|
222
|
+
meta: "ParticipantApplicationSignedMetaDocumentInput"
|
|
223
|
+
},
|
|
224
|
+
ParticipantApplicationSignedMetaDocumentInput: {},
|
|
225
|
+
PassportInput: {},
|
|
226
|
+
PaymentStatus: "enum",
|
|
227
|
+
ProjectFreeDecisionGenerateDocumentInput: {},
|
|
228
|
+
ProjectFreeDecisionSignedDocumentInput: {
|
|
229
|
+
meta: "ProjectFreeDecisionSignedMetaDocumentInput"
|
|
230
|
+
},
|
|
231
|
+
ProjectFreeDecisionSignedMetaDocumentInput: {},
|
|
232
|
+
PublishProjectFreeDecisionInput: {
|
|
233
|
+
document: "ProjectFreeDecisionSignedDocumentInput"
|
|
234
|
+
},
|
|
235
|
+
Query: {
|
|
236
|
+
getAccount: {
|
|
237
|
+
data: "GetAccountInput"
|
|
238
|
+
},
|
|
239
|
+
getAccounts: {
|
|
240
|
+
data: "GetAccountsInput",
|
|
241
|
+
options: "PaginationInput"
|
|
242
|
+
},
|
|
243
|
+
getBranches: {
|
|
244
|
+
data: "GetBranchesInput"
|
|
245
|
+
},
|
|
246
|
+
getDocuments: {
|
|
247
|
+
data: "GetDocumentsInput"
|
|
248
|
+
},
|
|
249
|
+
getExtensions: {
|
|
250
|
+
data: "GetExtensionsInput"
|
|
251
|
+
},
|
|
252
|
+
getPaymentMethods: {
|
|
253
|
+
data: "GetPaymentMethodsInput"
|
|
254
|
+
},
|
|
255
|
+
getPayments: {
|
|
256
|
+
data: "GetPaymentsInput",
|
|
257
|
+
options: "PaginationInput"
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
RefreshInput: {},
|
|
261
|
+
RegisterAccountInput: {
|
|
262
|
+
entrepreneur_data: "CreateEntrepreneurDataInput",
|
|
263
|
+
individual_data: "CreateIndividualDataInput",
|
|
264
|
+
organization_data: "CreateOrganizationDataInput",
|
|
265
|
+
role: "RegisterRole",
|
|
266
|
+
type: "AccountType"
|
|
267
|
+
},
|
|
268
|
+
RegisterParticipantInput: {
|
|
269
|
+
privacy_agreement: "SignedDigitalDocumentInput",
|
|
270
|
+
signature_agreement: "SignedDigitalDocumentInput",
|
|
271
|
+
statement: "ParticipantApplicationSignedDocumentInput",
|
|
272
|
+
user_agreement: "SignedDigitalDocumentInput",
|
|
273
|
+
wallet_agreement: "SignedDigitalDocumentInput"
|
|
274
|
+
},
|
|
275
|
+
RegisterRole: "enum",
|
|
276
|
+
RepresentedByInput: {},
|
|
277
|
+
ResetKeyInput: {},
|
|
278
|
+
SelectBranchGenerateDocumentInput: {},
|
|
279
|
+
SelectBranchInput: {
|
|
280
|
+
document: "SelectBranchSignedDocumentInput"
|
|
281
|
+
},
|
|
282
|
+
SelectBranchSignedDocumentInput: {
|
|
283
|
+
meta: "SelectBranchSignedMetaDocumentInput"
|
|
284
|
+
},
|
|
285
|
+
SelectBranchSignedMetaDocumentInput: {},
|
|
286
|
+
SetPaymentStatusInput: {
|
|
287
|
+
status: "PaymentStatus"
|
|
288
|
+
},
|
|
289
|
+
SetWifInput: {},
|
|
290
|
+
SignedDigitalDocumentInput: {
|
|
291
|
+
meta: "MetaDocumentInput"
|
|
292
|
+
},
|
|
293
|
+
SovietMemberInput: {
|
|
294
|
+
individual_data: "CreateIndividualDataInput"
|
|
295
|
+
},
|
|
296
|
+
StartResetKeyInput: {},
|
|
297
|
+
SystemStatus: "enum",
|
|
298
|
+
UninstallExtensionInput: {},
|
|
299
|
+
Update: {
|
|
300
|
+
organization_data: "UpdateOrganizationDataInput",
|
|
301
|
+
vars: "VarsInput"
|
|
302
|
+
},
|
|
303
|
+
UpdateAccountInput: {
|
|
304
|
+
entrepreneur_data: "UpdateEntrepreneurDataInput",
|
|
305
|
+
individual_data: "UpdateIndividualDataInput",
|
|
306
|
+
organization_data: "UpdateOrganizationDataInput",
|
|
307
|
+
role: "RegisterRole",
|
|
308
|
+
type: "AccountType"
|
|
309
|
+
},
|
|
310
|
+
UpdateBankAccountInput: {
|
|
311
|
+
data: "BankAccountInput"
|
|
312
|
+
},
|
|
313
|
+
UpdateEntrepreneurDataInput: {
|
|
314
|
+
country: "Country",
|
|
315
|
+
details: "EntrepreneurDetailsInput"
|
|
316
|
+
},
|
|
317
|
+
UpdateIndividualDataInput: {
|
|
318
|
+
passport: "PassportInput"
|
|
319
|
+
},
|
|
320
|
+
UpdateOrganizationDataInput: {
|
|
321
|
+
details: "OrganizationDetailsInput",
|
|
322
|
+
represented_by: "RepresentedByInput",
|
|
323
|
+
type: "OrganizationType"
|
|
324
|
+
},
|
|
325
|
+
UserStatus: "enum",
|
|
326
|
+
VarsInput: {
|
|
327
|
+
coopenomics_agreement: "AgreementInput",
|
|
328
|
+
participant_application: "AgreementInput",
|
|
329
|
+
privacy_agreement: "AgreementInput",
|
|
330
|
+
signature_agreement: "AgreementInput",
|
|
331
|
+
user_agreement: "AgreementInput",
|
|
332
|
+
wallet_agreement: "AgreementInput"
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
const ReturnTypes = {
|
|
336
|
+
Account: {
|
|
337
|
+
blockchain_account: "BlockchainAccount",
|
|
338
|
+
participant_account: "ParticipantAccount",
|
|
339
|
+
provider_account: "MonoAccount",
|
|
340
|
+
user_account: "UserAccount",
|
|
341
|
+
username: "String"
|
|
342
|
+
},
|
|
343
|
+
AccountRamDelta: {
|
|
344
|
+
account: "String",
|
|
345
|
+
delta: "Int"
|
|
346
|
+
},
|
|
347
|
+
AccountResourceInfo: {
|
|
348
|
+
available: "String",
|
|
349
|
+
current_used: "String",
|
|
350
|
+
last_usage_update_time: "String",
|
|
351
|
+
max: "String",
|
|
352
|
+
used: "String"
|
|
353
|
+
},
|
|
354
|
+
AccountsPaginationResult: {
|
|
355
|
+
currentPage: "Int",
|
|
356
|
+
items: "Account",
|
|
357
|
+
totalCount: "Int",
|
|
358
|
+
totalPages: "Int"
|
|
359
|
+
},
|
|
360
|
+
ActDetail: {
|
|
361
|
+
action: "ExtendedBlockchainAction",
|
|
362
|
+
document: "GeneratedDocument"
|
|
363
|
+
},
|
|
364
|
+
ActionAuthorization: {
|
|
365
|
+
actor: "String",
|
|
366
|
+
permission: "String"
|
|
367
|
+
},
|
|
368
|
+
ActionReceipt: {
|
|
369
|
+
abi_sequence: "Int",
|
|
370
|
+
act_digest: "String",
|
|
371
|
+
auth_sequence: "AuthSequence",
|
|
372
|
+
code_sequence: "Int",
|
|
373
|
+
global_sequence: "String",
|
|
374
|
+
receiver: "String",
|
|
375
|
+
recv_sequence: "String"
|
|
376
|
+
},
|
|
377
|
+
AgendaWithDocuments: {
|
|
378
|
+
action: "BlockchainAction",
|
|
379
|
+
documents: "DocumentPackage",
|
|
380
|
+
table: "BlockchainDecision"
|
|
381
|
+
},
|
|
382
|
+
AgreementVar: {
|
|
383
|
+
protocol_day_month_year: "String",
|
|
384
|
+
protocol_number: "String"
|
|
385
|
+
},
|
|
386
|
+
AuthSequence: {
|
|
387
|
+
account: "String",
|
|
388
|
+
sequence: "String"
|
|
389
|
+
},
|
|
390
|
+
Authority: {
|
|
391
|
+
accounts: "PermissionLevelWeight",
|
|
392
|
+
keys: "KeyWeight",
|
|
393
|
+
threshold: "Int",
|
|
394
|
+
waits: "WaitWeight"
|
|
395
|
+
},
|
|
396
|
+
BankAccount: {
|
|
397
|
+
account_number: "String",
|
|
398
|
+
bank_name: "String",
|
|
399
|
+
card_number: "String",
|
|
400
|
+
currency: "String",
|
|
401
|
+
details: "BankAccountDetails"
|
|
402
|
+
},
|
|
403
|
+
BankAccountDetails: {
|
|
404
|
+
bik: "String",
|
|
405
|
+
corr: "String",
|
|
406
|
+
kpp: "String"
|
|
407
|
+
},
|
|
408
|
+
BankPaymentMethod: {
|
|
409
|
+
created_at: "DateTime",
|
|
410
|
+
data: "BankAccount",
|
|
411
|
+
is_default: "Boolean",
|
|
412
|
+
method_id: "String",
|
|
413
|
+
method_type: "String",
|
|
414
|
+
updated_at: "DateTime",
|
|
415
|
+
username: "String"
|
|
416
|
+
},
|
|
417
|
+
BlockchainAccount: {
|
|
418
|
+
account_name: "String",
|
|
419
|
+
core_liquid_balance: "String",
|
|
420
|
+
cpu_limit: "AccountResourceInfo",
|
|
421
|
+
cpu_weight: "String",
|
|
422
|
+
created: "String",
|
|
423
|
+
head_block_num: "Int",
|
|
424
|
+
head_block_time: "String",
|
|
425
|
+
last_code_update: "String",
|
|
426
|
+
net_limit: "AccountResourceInfo",
|
|
427
|
+
net_weight: "String",
|
|
428
|
+
permissions: "Permission",
|
|
429
|
+
privileged: "Boolean",
|
|
430
|
+
ram_quota: "Int",
|
|
431
|
+
ram_usage: "Int",
|
|
432
|
+
refund_request: "RefundRequest",
|
|
433
|
+
rex_info: "String",
|
|
434
|
+
self_delegated_bandwidth: "ResourceDelegationDTO",
|
|
435
|
+
total_resources: "ResourceOverview",
|
|
436
|
+
voter_info: "String"
|
|
437
|
+
},
|
|
438
|
+
BlockchainAction: {
|
|
439
|
+
account: "String",
|
|
440
|
+
account_ram_deltas: "AccountRamDelta",
|
|
441
|
+
action_ordinal: "Int",
|
|
442
|
+
authorization: "ActionAuthorization",
|
|
443
|
+
block_id: "String",
|
|
444
|
+
block_num: "Int",
|
|
445
|
+
chain_id: "String",
|
|
446
|
+
console: "String",
|
|
447
|
+
context_free: "Boolean",
|
|
448
|
+
creator_action_ordinal: "Int",
|
|
449
|
+
data: "JSON",
|
|
450
|
+
elapsed: "Int",
|
|
451
|
+
global_sequence: "String",
|
|
452
|
+
name: "String",
|
|
453
|
+
receipt: "ActionReceipt",
|
|
454
|
+
receiver: "String",
|
|
455
|
+
transaction_id: "String"
|
|
456
|
+
},
|
|
457
|
+
BlockchainDecision: {
|
|
458
|
+
approved: "Boolean",
|
|
459
|
+
authorization: "SignedBlockchainDocument",
|
|
460
|
+
authorized: "Boolean",
|
|
461
|
+
authorized_by: "String",
|
|
462
|
+
batch_id: "Float",
|
|
463
|
+
coopname: "String",
|
|
464
|
+
created_at: "String",
|
|
465
|
+
expired_at: "String",
|
|
466
|
+
id: "Float",
|
|
467
|
+
meta: "String",
|
|
468
|
+
statement: "SignedBlockchainDocument",
|
|
469
|
+
type: "String",
|
|
470
|
+
username: "String",
|
|
471
|
+
validated: "Boolean",
|
|
472
|
+
votes_against: "String",
|
|
473
|
+
votes_for: "String"
|
|
474
|
+
},
|
|
475
|
+
BlockchainInfoDTO: {
|
|
476
|
+
block_cpu_limit: "Int",
|
|
477
|
+
block_net_limit: "Int",
|
|
478
|
+
chain_id: "String",
|
|
479
|
+
fork_db_head_block_id: "String",
|
|
480
|
+
fork_db_head_block_num: "Int",
|
|
481
|
+
head_block_id: "String",
|
|
482
|
+
head_block_num: "Int",
|
|
483
|
+
head_block_producer: "String",
|
|
484
|
+
head_block_time: "String",
|
|
485
|
+
last_irreversible_block_id: "String",
|
|
486
|
+
last_irreversible_block_num: "Int",
|
|
487
|
+
last_irreversible_block_time: "String",
|
|
488
|
+
server_version: "String",
|
|
489
|
+
server_version_string: "String",
|
|
490
|
+
virtual_block_cpu_limit: "Int",
|
|
491
|
+
virtual_block_net_limit: "Int"
|
|
492
|
+
},
|
|
493
|
+
Branch: {
|
|
494
|
+
bank_account: "BankPaymentMethod",
|
|
495
|
+
braname: "String",
|
|
496
|
+
city: "String",
|
|
497
|
+
coopname: "String",
|
|
498
|
+
country: "String",
|
|
499
|
+
details: "OrganizationDetails",
|
|
500
|
+
email: "String",
|
|
501
|
+
fact_address: "String",
|
|
502
|
+
full_address: "String",
|
|
503
|
+
full_name: "String",
|
|
504
|
+
phone: "String",
|
|
505
|
+
represented_by: "RepresentedBy",
|
|
506
|
+
short_name: "String",
|
|
507
|
+
trusted: "Individual",
|
|
508
|
+
trustee: "Individual",
|
|
509
|
+
type: "String"
|
|
510
|
+
},
|
|
511
|
+
ContactsDTO: {
|
|
512
|
+
chairman: "PublicChairman",
|
|
513
|
+
details: "OrganizationDetails",
|
|
514
|
+
email: "String",
|
|
515
|
+
full_address: "String",
|
|
516
|
+
full_name: "String",
|
|
517
|
+
phone: "String"
|
|
518
|
+
},
|
|
519
|
+
CooperativeOperatorAccount: {
|
|
520
|
+
announce: "String",
|
|
521
|
+
coop_type: "String",
|
|
522
|
+
created_at: "String",
|
|
523
|
+
description: "String",
|
|
524
|
+
document: "SignedBlockchainDocument",
|
|
525
|
+
initial: "String",
|
|
526
|
+
is_branched: "Boolean",
|
|
527
|
+
is_cooperative: "Boolean",
|
|
528
|
+
is_enrolled: "Boolean",
|
|
529
|
+
meta: "String",
|
|
530
|
+
minimum: "String",
|
|
531
|
+
org_initial: "String",
|
|
532
|
+
org_minimum: "String",
|
|
533
|
+
org_registration: "String",
|
|
534
|
+
parent_username: "String",
|
|
535
|
+
referer: "String",
|
|
536
|
+
registered_at: "String",
|
|
537
|
+
registration: "String",
|
|
538
|
+
registrator: "String",
|
|
539
|
+
status: "String",
|
|
540
|
+
storages: "String",
|
|
541
|
+
type: "String",
|
|
542
|
+
username: "String",
|
|
543
|
+
verifications: "Verification"
|
|
544
|
+
},
|
|
545
|
+
CreatedProjectFreeDecision: {
|
|
546
|
+
decision: "String",
|
|
547
|
+
id: "String",
|
|
548
|
+
question: "String"
|
|
549
|
+
},
|
|
550
|
+
DateTime: `scalar.DateTime`,
|
|
551
|
+
DecisionDetail: {
|
|
552
|
+
action: "ExtendedBlockchainAction",
|
|
553
|
+
document: "DecisionDocumentUnion",
|
|
554
|
+
votes_against: "ExtendedBlockchainAction",
|
|
555
|
+
votes_for: "ExtendedBlockchainAction"
|
|
556
|
+
},
|
|
557
|
+
DecisionDocumentUnion: {
|
|
558
|
+
"...on FreeDecisionDocument": "FreeDecisionDocument",
|
|
559
|
+
"...on ParticipantApplicationDecisionDocument": "ParticipantApplicationDecisionDocument"
|
|
560
|
+
},
|
|
561
|
+
DocumentPackage: {
|
|
562
|
+
acts: "ActDetail",
|
|
563
|
+
decision: "DecisionDetail",
|
|
564
|
+
links: "GeneratedDocument",
|
|
565
|
+
statement: "StatementDetail"
|
|
566
|
+
},
|
|
567
|
+
DocumentsPaginationResult: {
|
|
568
|
+
currentPage: "Int",
|
|
569
|
+
items: "DocumentPackage",
|
|
570
|
+
totalCount: "Int",
|
|
571
|
+
totalPages: "Int"
|
|
572
|
+
},
|
|
573
|
+
Entrepreneur: {
|
|
574
|
+
birthdate: "String",
|
|
575
|
+
city: "String",
|
|
576
|
+
country: "String",
|
|
577
|
+
details: "EntrepreneurDetails",
|
|
578
|
+
email: "String",
|
|
579
|
+
first_name: "String",
|
|
580
|
+
full_address: "String",
|
|
581
|
+
last_name: "String",
|
|
582
|
+
middle_name: "String",
|
|
583
|
+
phone: "String",
|
|
584
|
+
username: "String"
|
|
585
|
+
},
|
|
586
|
+
EntrepreneurDetails: {
|
|
587
|
+
inn: "String",
|
|
588
|
+
ogrn: "String"
|
|
589
|
+
},
|
|
590
|
+
ExtendedBlockchainAction: {
|
|
591
|
+
account: "String",
|
|
592
|
+
account_ram_deltas: "AccountRamDelta",
|
|
593
|
+
action_ordinal: "Int",
|
|
594
|
+
authorization: "ActionAuthorization",
|
|
595
|
+
block_id: "String",
|
|
596
|
+
block_num: "Int",
|
|
597
|
+
chain_id: "String",
|
|
598
|
+
console: "String",
|
|
599
|
+
context_free: "Boolean",
|
|
600
|
+
creator_action_ordinal: "Int",
|
|
601
|
+
data: "JSON",
|
|
602
|
+
elapsed: "Int",
|
|
603
|
+
global_sequence: "String",
|
|
604
|
+
name: "String",
|
|
605
|
+
receipt: "ActionReceipt",
|
|
606
|
+
receiver: "String",
|
|
607
|
+
transaction_id: "String",
|
|
608
|
+
user: "UserDataUnion"
|
|
609
|
+
},
|
|
610
|
+
Extension: {
|
|
611
|
+
available: "Boolean",
|
|
612
|
+
config: "JSON",
|
|
613
|
+
created_at: "DateTime",
|
|
614
|
+
description: "String",
|
|
615
|
+
enabled: "Boolean",
|
|
616
|
+
image: "String",
|
|
617
|
+
installed: "Boolean",
|
|
618
|
+
instructions: "String",
|
|
619
|
+
name: "String",
|
|
620
|
+
readme: "String",
|
|
621
|
+
schema: "JSON",
|
|
622
|
+
tags: "String",
|
|
623
|
+
title: "String",
|
|
624
|
+
updated_at: "DateTime"
|
|
625
|
+
},
|
|
626
|
+
FreeDecisionDocument: {
|
|
627
|
+
binary: "String",
|
|
628
|
+
full_title: "String",
|
|
629
|
+
hash: "String",
|
|
630
|
+
html: "String",
|
|
631
|
+
meta: "FreeDecisionMetaDocumentOutput"
|
|
632
|
+
},
|
|
633
|
+
FreeDecisionMetaDocumentOutput: {
|
|
634
|
+
block_num: "Int",
|
|
635
|
+
coopname: "String",
|
|
636
|
+
created_at: "String",
|
|
637
|
+
decision_id: "Float",
|
|
638
|
+
generator: "String",
|
|
639
|
+
lang: "LangType",
|
|
640
|
+
links: "String",
|
|
641
|
+
project_id: "String",
|
|
642
|
+
registry_id: "Int",
|
|
643
|
+
timezone: "String",
|
|
644
|
+
title: "String",
|
|
645
|
+
username: "String",
|
|
646
|
+
version: "String"
|
|
647
|
+
},
|
|
648
|
+
GeneratedDocument: {
|
|
649
|
+
binary: "String",
|
|
650
|
+
full_title: "String",
|
|
651
|
+
hash: "String",
|
|
652
|
+
html: "String",
|
|
653
|
+
meta: "MetaDocument"
|
|
654
|
+
},
|
|
655
|
+
Individual: {
|
|
656
|
+
birthdate: "String",
|
|
657
|
+
email: "String",
|
|
658
|
+
first_name: "String",
|
|
659
|
+
full_address: "String",
|
|
660
|
+
last_name: "String",
|
|
661
|
+
middle_name: "String",
|
|
662
|
+
passport: "Passport",
|
|
663
|
+
phone: "String",
|
|
664
|
+
username: "String"
|
|
665
|
+
},
|
|
666
|
+
JSON: `scalar.JSON`,
|
|
667
|
+
KeyWeight: {
|
|
668
|
+
key: "String",
|
|
669
|
+
weight: "Int"
|
|
670
|
+
},
|
|
671
|
+
MetaDocument: {
|
|
672
|
+
block_num: "Int",
|
|
673
|
+
coopname: "String",
|
|
674
|
+
created_at: "String",
|
|
675
|
+
generator: "String",
|
|
676
|
+
lang: "LangType",
|
|
677
|
+
links: "String",
|
|
678
|
+
registry_id: "Int",
|
|
679
|
+
timezone: "String",
|
|
680
|
+
title: "String",
|
|
681
|
+
username: "String",
|
|
682
|
+
version: "String"
|
|
683
|
+
},
|
|
684
|
+
MonoAccount: {
|
|
685
|
+
email: "String",
|
|
686
|
+
has_account: "Boolean",
|
|
687
|
+
initial_order: "String",
|
|
688
|
+
is_email_verified: "Boolean",
|
|
689
|
+
is_registered: "Boolean",
|
|
690
|
+
message: "String",
|
|
691
|
+
public_key: "String",
|
|
692
|
+
referer: "String",
|
|
693
|
+
role: "String",
|
|
694
|
+
status: "UserStatus",
|
|
695
|
+
type: "String",
|
|
696
|
+
username: "String"
|
|
697
|
+
},
|
|
698
|
+
Mutation: {
|
|
699
|
+
addParticipant: "Account",
|
|
700
|
+
addTrustedAccount: "Branch",
|
|
701
|
+
createBankAccount: "PaymentMethod",
|
|
702
|
+
createBranch: "Branch",
|
|
703
|
+
createDepositPayment: "Payment",
|
|
704
|
+
createInitialPayment: "Payment",
|
|
705
|
+
createProjectOfFreeDecision: "CreatedProjectFreeDecision",
|
|
706
|
+
deleteAccount: "Boolean",
|
|
707
|
+
deleteBranch: "Boolean",
|
|
708
|
+
deletePaymentMethod: "Boolean",
|
|
709
|
+
deleteTrustedAccount: "Branch",
|
|
710
|
+
editBranch: "Branch",
|
|
711
|
+
generateFreeDecision: "ProjectFreeDecisionDocument",
|
|
712
|
+
generateParticipantApplication: "ParticipantApplicationDocument",
|
|
713
|
+
generateParticipantApplicationDecision: "ParticipantApplicationDecisionDocument",
|
|
714
|
+
generatePrivacyAgreement: "GeneratedDocument",
|
|
715
|
+
generateProjectOfFreeDecision: "ProjectFreeDecisionDocument",
|
|
716
|
+
generateSelectBranchDocument: "SelectBranchDocument",
|
|
717
|
+
generateSignatureAgreement: "GeneratedDocument",
|
|
718
|
+
generateUserAgreement: "GeneratedDocument",
|
|
719
|
+
generateWalletAgreement: "GeneratedDocument",
|
|
720
|
+
initSystem: "SystemInfo",
|
|
721
|
+
installExtension: "Extension",
|
|
722
|
+
installSystem: "SystemInfo",
|
|
723
|
+
login: "RegisteredAccount",
|
|
724
|
+
logout: "Boolean",
|
|
725
|
+
publishProjectOfFreeDecision: "Boolean",
|
|
726
|
+
refresh: "RegisteredAccount",
|
|
727
|
+
registerAccount: "RegisteredAccount",
|
|
728
|
+
registerParticipant: "Account",
|
|
729
|
+
resetKey: "Boolean",
|
|
730
|
+
selectBranch: "Boolean",
|
|
731
|
+
setPaymentStatus: "Payment",
|
|
732
|
+
setWif: "Boolean",
|
|
733
|
+
startResetKey: "Boolean",
|
|
734
|
+
uninstallExtension: "Boolean",
|
|
735
|
+
updateAccount: "Account",
|
|
736
|
+
updateBankAccount: "PaymentMethod",
|
|
737
|
+
updateExtension: "Extension",
|
|
738
|
+
updateSystem: "SystemInfo"
|
|
739
|
+
},
|
|
740
|
+
Organization: {
|
|
741
|
+
city: "String",
|
|
742
|
+
country: "String",
|
|
743
|
+
details: "OrganizationDetails",
|
|
744
|
+
email: "String",
|
|
745
|
+
fact_address: "String",
|
|
746
|
+
full_address: "String",
|
|
747
|
+
full_name: "String",
|
|
748
|
+
phone: "String",
|
|
749
|
+
represented_by: "RepresentedBy",
|
|
750
|
+
short_name: "String",
|
|
751
|
+
type: "String",
|
|
752
|
+
username: "String"
|
|
753
|
+
},
|
|
754
|
+
OrganizationDetails: {
|
|
755
|
+
inn: "String",
|
|
756
|
+
kpp: "String",
|
|
757
|
+
ogrn: "String"
|
|
758
|
+
},
|
|
759
|
+
ParticipantAccount: {
|
|
760
|
+
braname: "String",
|
|
761
|
+
created_at: "DateTime",
|
|
762
|
+
has_vote: "Boolean",
|
|
763
|
+
is_initial: "Boolean",
|
|
764
|
+
is_minimum: "Boolean",
|
|
765
|
+
last_min_pay: "DateTime",
|
|
766
|
+
last_update: "DateTime",
|
|
767
|
+
status: "String",
|
|
768
|
+
type: "String",
|
|
769
|
+
username: "String"
|
|
770
|
+
},
|
|
771
|
+
ParticipantApplicationDecisionDocument: {
|
|
772
|
+
binary: "String",
|
|
773
|
+
full_title: "String",
|
|
774
|
+
hash: "String",
|
|
775
|
+
html: "String",
|
|
776
|
+
meta: "ParticipantApplicationDecisionMetaDocumentOutput"
|
|
777
|
+
},
|
|
778
|
+
ParticipantApplicationDecisionMetaDocumentOutput: {
|
|
779
|
+
block_num: "Int",
|
|
780
|
+
coopname: "String",
|
|
781
|
+
created_at: "String",
|
|
782
|
+
decision_id: "Float",
|
|
783
|
+
generator: "String",
|
|
784
|
+
lang: "LangType",
|
|
785
|
+
links: "String",
|
|
786
|
+
registry_id: "Int",
|
|
787
|
+
timezone: "String",
|
|
788
|
+
title: "String",
|
|
789
|
+
username: "String",
|
|
790
|
+
version: "String"
|
|
791
|
+
},
|
|
792
|
+
ParticipantApplicationDocument: {
|
|
793
|
+
binary: "String",
|
|
794
|
+
full_title: "String",
|
|
795
|
+
hash: "String",
|
|
796
|
+
html: "String",
|
|
797
|
+
meta: "ParticipantApplicationMetaDocumentOutput"
|
|
798
|
+
},
|
|
799
|
+
ParticipantApplicationMetaDocumentOutput: {
|
|
800
|
+
block_num: "Int",
|
|
801
|
+
coopname: "String",
|
|
802
|
+
created_at: "String",
|
|
803
|
+
generator: "String",
|
|
804
|
+
lang: "LangType",
|
|
805
|
+
links: "String",
|
|
806
|
+
registry_id: "Int",
|
|
807
|
+
timezone: "String",
|
|
808
|
+
title: "String",
|
|
809
|
+
username: "String",
|
|
810
|
+
version: "String"
|
|
811
|
+
},
|
|
812
|
+
Passport: {
|
|
813
|
+
code: "String",
|
|
814
|
+
issued_at: "String",
|
|
815
|
+
issued_by: "String",
|
|
816
|
+
number: "Int",
|
|
817
|
+
series: "Int"
|
|
818
|
+
},
|
|
819
|
+
Payment: {
|
|
820
|
+
amount: "Float",
|
|
821
|
+
blockchain_id: "Float",
|
|
822
|
+
created_at: "DateTime",
|
|
823
|
+
details: "PaymentDetails",
|
|
824
|
+
expired_at: "DateTime",
|
|
825
|
+
id: "String",
|
|
826
|
+
message: "String",
|
|
827
|
+
provider: "String",
|
|
828
|
+
status: "PaymentStatus",
|
|
829
|
+
symbol: "String",
|
|
830
|
+
updated_at: "DateTime",
|
|
831
|
+
username: "String"
|
|
832
|
+
},
|
|
833
|
+
PaymentDetails: {
|
|
834
|
+
amount_plus_fee: "String",
|
|
835
|
+
amount_without_fee: "String",
|
|
836
|
+
data: "String",
|
|
837
|
+
fact_fee_percent: "Float",
|
|
838
|
+
fee_amount: "String",
|
|
839
|
+
fee_percent: "Float",
|
|
840
|
+
tolerance_percent: "Float"
|
|
841
|
+
},
|
|
842
|
+
PaymentMethod: {
|
|
843
|
+
created_at: "DateTime",
|
|
844
|
+
data: "PaymentMethodData",
|
|
845
|
+
is_default: "Boolean",
|
|
846
|
+
method_id: "String",
|
|
847
|
+
method_type: "String",
|
|
848
|
+
updated_at: "DateTime",
|
|
849
|
+
username: "String"
|
|
850
|
+
},
|
|
851
|
+
PaymentMethodData: {
|
|
852
|
+
"...on BankAccount": "BankAccount",
|
|
853
|
+
"...on SbpAccount": "SbpAccount"
|
|
854
|
+
},
|
|
855
|
+
PaymentMethodPaginationResult: {
|
|
856
|
+
currentPage: "Int",
|
|
857
|
+
items: "PaymentMethod",
|
|
858
|
+
totalCount: "Int",
|
|
859
|
+
totalPages: "Int"
|
|
860
|
+
},
|
|
861
|
+
PaymentPaginationResult: {
|
|
862
|
+
currentPage: "Int",
|
|
863
|
+
items: "Payment",
|
|
864
|
+
totalCount: "Int",
|
|
865
|
+
totalPages: "Int"
|
|
866
|
+
},
|
|
867
|
+
Permission: {
|
|
868
|
+
parent: "String",
|
|
869
|
+
perm_name: "String",
|
|
870
|
+
required_auth: "Authority"
|
|
871
|
+
},
|
|
872
|
+
PermissionLevel: {
|
|
873
|
+
actor: "String",
|
|
874
|
+
permission: "String"
|
|
875
|
+
},
|
|
876
|
+
PermissionLevelWeight: {
|
|
877
|
+
permission: "PermissionLevel",
|
|
878
|
+
weight: "Int"
|
|
879
|
+
},
|
|
880
|
+
ProjectFreeDecisionDocument: {
|
|
881
|
+
binary: "String",
|
|
882
|
+
full_title: "String",
|
|
883
|
+
hash: "String",
|
|
884
|
+
html: "String",
|
|
885
|
+
meta: "ProjectFreeDecisionMetaDocumentOutput"
|
|
886
|
+
},
|
|
887
|
+
ProjectFreeDecisionMetaDocumentOutput: {
|
|
888
|
+
block_num: "Int",
|
|
889
|
+
coopname: "String",
|
|
890
|
+
created_at: "String",
|
|
891
|
+
generator: "String",
|
|
892
|
+
lang: "LangType",
|
|
893
|
+
links: "String",
|
|
894
|
+
project_id: "String",
|
|
895
|
+
registry_id: "Int",
|
|
896
|
+
timezone: "String",
|
|
897
|
+
title: "String",
|
|
898
|
+
username: "String",
|
|
899
|
+
version: "String"
|
|
900
|
+
},
|
|
901
|
+
PublicChairman: {
|
|
902
|
+
first_name: "String",
|
|
903
|
+
last_name: "String",
|
|
904
|
+
middle_name: "String"
|
|
905
|
+
},
|
|
906
|
+
Query: {
|
|
907
|
+
getAccount: "Account",
|
|
908
|
+
getAccounts: "AccountsPaginationResult",
|
|
909
|
+
getAgenda: "AgendaWithDocuments",
|
|
910
|
+
getBranches: "Branch",
|
|
911
|
+
getDocuments: "DocumentsPaginationResult",
|
|
912
|
+
getExtensions: "Extension",
|
|
913
|
+
getPaymentMethods: "PaymentMethodPaginationResult",
|
|
914
|
+
getPayments: "PaymentPaginationResult",
|
|
915
|
+
getSystemInfo: "SystemInfo"
|
|
916
|
+
},
|
|
917
|
+
RefundRequest: {
|
|
918
|
+
cpu_amount: "String",
|
|
919
|
+
net_amount: "String",
|
|
920
|
+
owner: "String",
|
|
921
|
+
request_time: "String"
|
|
922
|
+
},
|
|
923
|
+
RegisteredAccount: {
|
|
924
|
+
account: "Account",
|
|
925
|
+
tokens: "Tokens"
|
|
926
|
+
},
|
|
927
|
+
RepresentedBy: {
|
|
928
|
+
based_on: "String",
|
|
929
|
+
first_name: "String",
|
|
930
|
+
last_name: "String",
|
|
931
|
+
middle_name: "String",
|
|
932
|
+
position: "String"
|
|
933
|
+
},
|
|
934
|
+
ResourceDelegationDTO: {
|
|
935
|
+
cpu_weight: "String",
|
|
936
|
+
from: "String",
|
|
937
|
+
net_weight: "String",
|
|
938
|
+
to: "String"
|
|
939
|
+
},
|
|
940
|
+
ResourceOverview: {
|
|
941
|
+
cpu_weight: "String",
|
|
942
|
+
net_weight: "String",
|
|
943
|
+
owner: "String",
|
|
944
|
+
ram_bytes: "Int"
|
|
945
|
+
},
|
|
946
|
+
SbpAccount: {
|
|
947
|
+
phone: "String"
|
|
948
|
+
},
|
|
949
|
+
SelectBranchDocument: {
|
|
950
|
+
binary: "String",
|
|
951
|
+
full_title: "String",
|
|
952
|
+
hash: "String",
|
|
953
|
+
html: "String",
|
|
954
|
+
meta: "SelectBranchMetaDocumentOutput"
|
|
955
|
+
},
|
|
956
|
+
SelectBranchMetaDocumentOutput: {
|
|
957
|
+
block_num: "Int",
|
|
958
|
+
braname: "String",
|
|
959
|
+
coopname: "String",
|
|
960
|
+
created_at: "String",
|
|
961
|
+
generator: "String",
|
|
962
|
+
lang: "LangType",
|
|
963
|
+
links: "String",
|
|
964
|
+
registry_id: "Int",
|
|
965
|
+
timezone: "String",
|
|
966
|
+
title: "String",
|
|
967
|
+
username: "String",
|
|
968
|
+
version: "String"
|
|
969
|
+
},
|
|
970
|
+
SignedBlockchainDocument: {
|
|
971
|
+
hash: "String",
|
|
972
|
+
meta: "String",
|
|
973
|
+
public_key: "String",
|
|
974
|
+
signature: "String"
|
|
975
|
+
},
|
|
976
|
+
StatementDetail: {
|
|
977
|
+
action: "ExtendedBlockchainAction",
|
|
978
|
+
document: "StatementDocumentUnion"
|
|
979
|
+
},
|
|
980
|
+
StatementDocumentUnion: {
|
|
981
|
+
"...on ParticipantApplicationDocument": "ParticipantApplicationDocument",
|
|
982
|
+
"...on ProjectFreeDecisionDocument": "ProjectFreeDecisionDocument"
|
|
983
|
+
},
|
|
984
|
+
SystemInfo: {
|
|
985
|
+
blockchain_account: "BlockchainAccount",
|
|
986
|
+
blockchain_info: "BlockchainInfoDTO",
|
|
987
|
+
contacts: "ContactsDTO",
|
|
988
|
+
cooperator_account: "CooperativeOperatorAccount",
|
|
989
|
+
coopname: "String",
|
|
990
|
+
system_status: "SystemStatus",
|
|
991
|
+
vars: "Vars"
|
|
992
|
+
},
|
|
993
|
+
Token: {
|
|
994
|
+
expires: "DateTime",
|
|
995
|
+
token: "String"
|
|
996
|
+
},
|
|
997
|
+
Tokens: {
|
|
998
|
+
access: "Token",
|
|
999
|
+
refresh: "Token"
|
|
1000
|
+
},
|
|
1001
|
+
UserAccount: {
|
|
1002
|
+
meta: "String",
|
|
1003
|
+
referer: "String",
|
|
1004
|
+
registered_at: "String",
|
|
1005
|
+
registrator: "String",
|
|
1006
|
+
status: "String",
|
|
1007
|
+
storages: "String",
|
|
1008
|
+
type: "String",
|
|
1009
|
+
username: "String",
|
|
1010
|
+
verifications: "Verification"
|
|
1011
|
+
},
|
|
1012
|
+
UserDataUnion: {
|
|
1013
|
+
"...on Entrepreneur": "Entrepreneur",
|
|
1014
|
+
"...on Individual": "Individual",
|
|
1015
|
+
"...on Organization": "Organization"
|
|
1016
|
+
},
|
|
1017
|
+
Vars: {
|
|
1018
|
+
confidential_email: "String",
|
|
1019
|
+
confidential_link: "String",
|
|
1020
|
+
contact_email: "String",
|
|
1021
|
+
coopenomics_agreement: "AgreementVar",
|
|
1022
|
+
coopname: "String",
|
|
1023
|
+
full_abbr: "String",
|
|
1024
|
+
full_abbr_dative: "String",
|
|
1025
|
+
full_abbr_genitive: "String",
|
|
1026
|
+
name: "String",
|
|
1027
|
+
participant_application: "AgreementVar",
|
|
1028
|
+
passport_request: "String",
|
|
1029
|
+
privacy_agreement: "AgreementVar",
|
|
1030
|
+
short_abbr: "String",
|
|
1031
|
+
signature_agreement: "AgreementVar",
|
|
1032
|
+
user_agreement: "AgreementVar",
|
|
1033
|
+
wallet_agreement: "AgreementVar",
|
|
1034
|
+
website: "String"
|
|
1035
|
+
},
|
|
1036
|
+
Verification: {
|
|
1037
|
+
created_at: "String",
|
|
1038
|
+
is_verified: "Boolean",
|
|
1039
|
+
last_update: "String",
|
|
1040
|
+
notice: "String",
|
|
1041
|
+
procedure: "String",
|
|
1042
|
+
verificator: "String"
|
|
1043
|
+
},
|
|
1044
|
+
WaitWeight: {
|
|
1045
|
+
wait_sec: "Int",
|
|
1046
|
+
weight: "Int"
|
|
1047
|
+
}
|
|
1048
|
+
};
|
|
1049
|
+
const Ops = {
|
|
1050
|
+
query: "Query",
|
|
1051
|
+
mutation: "Mutation"
|
|
1052
|
+
};
|
|
1053
|
+
|
|
1054
|
+
const HOST = "Specify host";
|
|
1055
|
+
const HEADERS = {};
|
|
1056
|
+
const apiSubscription = (options) => {
|
|
1057
|
+
const client = createClient$1({
|
|
1058
|
+
url: String(options[0]),
|
|
1059
|
+
connectionParams: Object.fromEntries(new Headers(options[1]?.headers).entries())
|
|
1060
|
+
});
|
|
1061
|
+
const ws = new Proxy(
|
|
1062
|
+
{
|
|
1063
|
+
close: () => client.dispose()
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
get(target, key) {
|
|
1067
|
+
if (key === "close")
|
|
1068
|
+
return target.close;
|
|
1069
|
+
throw new Error(`Unimplemented property '${String(key)}', only 'close()' is available.`);
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
);
|
|
1073
|
+
return (query) => {
|
|
1074
|
+
let onMessage;
|
|
1075
|
+
let onError;
|
|
1076
|
+
let onClose;
|
|
1077
|
+
client.subscribe(
|
|
1078
|
+
{ query },
|
|
1079
|
+
{
|
|
1080
|
+
next({ data }) {
|
|
1081
|
+
onMessage && onMessage(data);
|
|
1082
|
+
},
|
|
1083
|
+
error(error) {
|
|
1084
|
+
onError && onError(error);
|
|
1085
|
+
},
|
|
1086
|
+
complete() {
|
|
1087
|
+
onClose && onClose();
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
);
|
|
1091
|
+
return {
|
|
1092
|
+
ws,
|
|
1093
|
+
on(listener) {
|
|
1094
|
+
onMessage = listener;
|
|
1095
|
+
},
|
|
1096
|
+
error(listener) {
|
|
1097
|
+
onError = listener;
|
|
1098
|
+
},
|
|
1099
|
+
open(listener) {
|
|
1100
|
+
client.on("opened", listener);
|
|
1101
|
+
},
|
|
1102
|
+
off(listener) {
|
|
1103
|
+
onClose = listener;
|
|
1104
|
+
}
|
|
1105
|
+
};
|
|
1106
|
+
};
|
|
1107
|
+
};
|
|
1108
|
+
const handleFetchResponse = (response) => {
|
|
1109
|
+
if (!response.ok) {
|
|
1110
|
+
return new Promise((_, reject) => {
|
|
1111
|
+
response.text().then((text) => {
|
|
1112
|
+
try {
|
|
1113
|
+
reject(JSON.parse(text));
|
|
1114
|
+
} catch (err) {
|
|
1115
|
+
reject(text);
|
|
1116
|
+
}
|
|
1117
|
+
}).catch(reject);
|
|
1118
|
+
});
|
|
1119
|
+
}
|
|
1120
|
+
return response.json();
|
|
1121
|
+
};
|
|
1122
|
+
const apiFetch = (options) => (query, variables = {}) => {
|
|
1123
|
+
const fetchOptions = options[1] || {};
|
|
1124
|
+
if (fetchOptions.method && fetchOptions.method === "GET") {
|
|
1125
|
+
return fetch(`${options[0]}?query=${encodeURIComponent(query)}`, fetchOptions).then(handleFetchResponse).then((response) => {
|
|
1126
|
+
if (response.errors) {
|
|
1127
|
+
throw new GraphQLError(response);
|
|
1128
|
+
}
|
|
1129
|
+
return response.data;
|
|
1130
|
+
});
|
|
1131
|
+
}
|
|
1132
|
+
return fetch(`${options[0]}`, {
|
|
1133
|
+
body: JSON.stringify({ query, variables }),
|
|
1134
|
+
method: "POST",
|
|
1135
|
+
headers: {
|
|
1136
|
+
"Content-Type": "application/json"
|
|
1137
|
+
},
|
|
1138
|
+
...fetchOptions
|
|
1139
|
+
}).then(handleFetchResponse).then((response) => {
|
|
1140
|
+
if (response.errors) {
|
|
1141
|
+
throw new GraphQLError(response);
|
|
1142
|
+
}
|
|
1143
|
+
return response.data;
|
|
1144
|
+
});
|
|
1145
|
+
};
|
|
1146
|
+
const InternalsBuildQuery = ({
|
|
1147
|
+
ops,
|
|
1148
|
+
props,
|
|
1149
|
+
returns,
|
|
1150
|
+
options,
|
|
1151
|
+
scalars
|
|
1152
|
+
}) => {
|
|
1153
|
+
const ibb = (k, o, p = "", root = true, vars = []) => {
|
|
1154
|
+
const keyForPath = purifyGraphQLKey(k);
|
|
1155
|
+
const newPath = [p, keyForPath].join(SEPARATOR);
|
|
1156
|
+
if (!o) {
|
|
1157
|
+
return "";
|
|
1158
|
+
}
|
|
1159
|
+
if (typeof o === "boolean" || typeof o === "number") {
|
|
1160
|
+
return k;
|
|
1161
|
+
}
|
|
1162
|
+
if (typeof o === "string") {
|
|
1163
|
+
return `${k} ${o}`;
|
|
1164
|
+
}
|
|
1165
|
+
if (Array.isArray(o)) {
|
|
1166
|
+
const args = InternalArgsBuilt({
|
|
1167
|
+
props,
|
|
1168
|
+
returns,
|
|
1169
|
+
ops,
|
|
1170
|
+
scalars,
|
|
1171
|
+
vars
|
|
1172
|
+
})(o[0], newPath);
|
|
1173
|
+
return `${ibb(args ? `${k}(${args})` : k, o[1], p, false, vars)}`;
|
|
1174
|
+
}
|
|
1175
|
+
if (k === "__alias") {
|
|
1176
|
+
return Object.entries(o).map(([alias, objectUnderAlias]) => {
|
|
1177
|
+
if (typeof objectUnderAlias !== "object" || Array.isArray(objectUnderAlias)) {
|
|
1178
|
+
throw new Error(
|
|
1179
|
+
"Invalid alias it should be __alias:{ YOUR_ALIAS_NAME: { OPERATION_NAME: { ...selectors }}}"
|
|
1180
|
+
);
|
|
1181
|
+
}
|
|
1182
|
+
const operationName = Object.keys(objectUnderAlias)[0];
|
|
1183
|
+
const operation = objectUnderAlias[operationName];
|
|
1184
|
+
return ibb(`${alias}:${operationName}`, operation, p, false, vars);
|
|
1185
|
+
}).join("\n");
|
|
1186
|
+
}
|
|
1187
|
+
const hasOperationName = root && options?.operationName ? " " + options.operationName : "";
|
|
1188
|
+
const keyForDirectives = o.__directives ?? "";
|
|
1189
|
+
const query = `{${Object.entries(o).filter(([k2]) => k2 !== "__directives").map((e) => ibb(...e, [p, `field<>${keyForPath}`].join(SEPARATOR), false, vars)).join("\n")}}`;
|
|
1190
|
+
if (!root) {
|
|
1191
|
+
return `${k} ${keyForDirectives}${hasOperationName} ${query}`;
|
|
1192
|
+
}
|
|
1193
|
+
const varsString = vars.map((v) => `${v.name}: ${v.graphQLType}`).join(", ");
|
|
1194
|
+
return `${k} ${keyForDirectives}${hasOperationName}${varsString ? `(${varsString})` : ""} ${query}`;
|
|
1195
|
+
};
|
|
1196
|
+
return ibb;
|
|
1197
|
+
};
|
|
1198
|
+
const Thunder = (fn, thunderGraphQLOptions) => (operation, graphqlOptions) => (o, ops) => {
|
|
1199
|
+
const options = {
|
|
1200
|
+
...thunderGraphQLOptions,
|
|
1201
|
+
...graphqlOptions
|
|
1202
|
+
};
|
|
1203
|
+
return fn(
|
|
1204
|
+
Zeus(operation, o, {
|
|
1205
|
+
operationOptions: ops,
|
|
1206
|
+
scalars: options?.scalars
|
|
1207
|
+
}),
|
|
1208
|
+
ops?.variables
|
|
1209
|
+
).then((data) => {
|
|
1210
|
+
if (options?.scalars) {
|
|
1211
|
+
return decodeScalarsInResponse({
|
|
1212
|
+
response: data,
|
|
1213
|
+
initialOp: operation,
|
|
1214
|
+
initialZeusQuery: o,
|
|
1215
|
+
returns: ReturnTypes,
|
|
1216
|
+
scalars: options.scalars,
|
|
1217
|
+
ops: Ops
|
|
1218
|
+
});
|
|
1219
|
+
}
|
|
1220
|
+
return data;
|
|
1221
|
+
});
|
|
1222
|
+
};
|
|
1223
|
+
const Chain = (...options) => Thunder(apiFetch(options));
|
|
1224
|
+
const SubscriptionThunder = (fn, thunderGraphQLOptions) => (operation, graphqlOptions) => (o, ops) => {
|
|
1225
|
+
const options = {
|
|
1226
|
+
...thunderGraphQLOptions,
|
|
1227
|
+
...graphqlOptions
|
|
1228
|
+
};
|
|
1229
|
+
const returnedFunction = fn(
|
|
1230
|
+
Zeus(operation, o, {
|
|
1231
|
+
operationOptions: ops,
|
|
1232
|
+
scalars: options?.scalars
|
|
1233
|
+
})
|
|
1234
|
+
);
|
|
1235
|
+
if (returnedFunction?.on && options?.scalars) {
|
|
1236
|
+
const wrapped = returnedFunction.on;
|
|
1237
|
+
returnedFunction.on = (fnToCall) => wrapped((data) => {
|
|
1238
|
+
if (options?.scalars) {
|
|
1239
|
+
return fnToCall(
|
|
1240
|
+
decodeScalarsInResponse({
|
|
1241
|
+
response: data,
|
|
1242
|
+
initialOp: operation,
|
|
1243
|
+
initialZeusQuery: o,
|
|
1244
|
+
returns: ReturnTypes,
|
|
1245
|
+
scalars: options.scalars,
|
|
1246
|
+
ops: Ops
|
|
1247
|
+
})
|
|
1248
|
+
);
|
|
1249
|
+
}
|
|
1250
|
+
return fnToCall(data);
|
|
1251
|
+
});
|
|
1252
|
+
}
|
|
1253
|
+
return returnedFunction;
|
|
1254
|
+
};
|
|
1255
|
+
const Subscription = (...options) => SubscriptionThunder(apiSubscription(options));
|
|
1256
|
+
const Zeus = (operation, o, ops) => InternalsBuildQuery({
|
|
1257
|
+
props: AllTypesProps,
|
|
1258
|
+
returns: ReturnTypes,
|
|
1259
|
+
ops: Ops,
|
|
1260
|
+
options: ops?.operationOptions,
|
|
1261
|
+
scalars: ops?.scalars
|
|
1262
|
+
})(operation, o);
|
|
1263
|
+
const ZeusSelect = () => (t) => t;
|
|
1264
|
+
const Selector = (key) => key && ZeusSelect();
|
|
1265
|
+
const TypeFromSelector = (key) => key && ZeusSelect();
|
|
1266
|
+
const Gql = Chain(HOST, {
|
|
1267
|
+
headers: {
|
|
1268
|
+
"Content-Type": "application/json",
|
|
1269
|
+
...HEADERS
|
|
1270
|
+
}
|
|
1271
|
+
});
|
|
1272
|
+
const ZeusScalars = ZeusSelect();
|
|
1273
|
+
const fields = (k) => {
|
|
1274
|
+
const t = ReturnTypes[k];
|
|
1275
|
+
const o = Object.fromEntries(
|
|
1276
|
+
Object.entries(t).filter(([, value]) => {
|
|
1277
|
+
const isReturnType = ReturnTypes[value];
|
|
1278
|
+
if (!isReturnType || typeof isReturnType === "string" && isReturnType.startsWith("scalar.")) {
|
|
1279
|
+
return true;
|
|
1280
|
+
}
|
|
1281
|
+
}).map(([key]) => [key, true])
|
|
1282
|
+
);
|
|
1283
|
+
return o;
|
|
1284
|
+
};
|
|
1285
|
+
const decodeScalarsInResponse = ({
|
|
1286
|
+
response,
|
|
1287
|
+
scalars,
|
|
1288
|
+
returns,
|
|
1289
|
+
ops,
|
|
1290
|
+
initialZeusQuery,
|
|
1291
|
+
initialOp
|
|
1292
|
+
}) => {
|
|
1293
|
+
if (!scalars) {
|
|
1294
|
+
return response;
|
|
1295
|
+
}
|
|
1296
|
+
const builder = PrepareScalarPaths({
|
|
1297
|
+
ops,
|
|
1298
|
+
returns
|
|
1299
|
+
});
|
|
1300
|
+
const scalarPaths = builder(initialOp, ops[initialOp], initialZeusQuery);
|
|
1301
|
+
if (scalarPaths) {
|
|
1302
|
+
const r = traverseResponse({ scalarPaths, resolvers: scalars })(initialOp, response, [ops[initialOp]]);
|
|
1303
|
+
return r;
|
|
1304
|
+
}
|
|
1305
|
+
return response;
|
|
1306
|
+
};
|
|
1307
|
+
const traverseResponse = ({
|
|
1308
|
+
resolvers,
|
|
1309
|
+
scalarPaths
|
|
1310
|
+
}) => {
|
|
1311
|
+
const ibb = (k, o, p = []) => {
|
|
1312
|
+
if (Array.isArray(o)) {
|
|
1313
|
+
return o.map((eachO) => ibb(k, eachO, p));
|
|
1314
|
+
}
|
|
1315
|
+
if (o == null) {
|
|
1316
|
+
return o;
|
|
1317
|
+
}
|
|
1318
|
+
const scalarPathString = p.join(SEPARATOR);
|
|
1319
|
+
const currentScalarString = scalarPaths[scalarPathString];
|
|
1320
|
+
if (currentScalarString) {
|
|
1321
|
+
const currentDecoder = resolvers[currentScalarString.split(".")[1]]?.decode;
|
|
1322
|
+
if (currentDecoder) {
|
|
1323
|
+
return currentDecoder(o);
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
if (typeof o === "boolean" || typeof o === "number" || typeof o === "string" || !o) {
|
|
1327
|
+
return o;
|
|
1328
|
+
}
|
|
1329
|
+
const entries = Object.entries(o).map(([k2, v]) => [k2, ibb(k2, v, [...p, purifyGraphQLKey(k2)])]);
|
|
1330
|
+
const objectFromEntries = entries.reduce((a, [k2, v]) => {
|
|
1331
|
+
a[k2] = v;
|
|
1332
|
+
return a;
|
|
1333
|
+
}, {});
|
|
1334
|
+
return objectFromEntries;
|
|
1335
|
+
};
|
|
1336
|
+
return ibb;
|
|
1337
|
+
};
|
|
1338
|
+
const SEPARATOR = "|";
|
|
1339
|
+
class GraphQLError extends Error {
|
|
1340
|
+
constructor(response) {
|
|
1341
|
+
super("");
|
|
1342
|
+
this.response = response;
|
|
1343
|
+
console.error(response);
|
|
1344
|
+
}
|
|
1345
|
+
toString() {
|
|
1346
|
+
return "GraphQL Response Error";
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
const ExtractScalar = (mappedParts, returns) => {
|
|
1350
|
+
if (mappedParts.length === 0) {
|
|
1351
|
+
return;
|
|
1352
|
+
}
|
|
1353
|
+
const oKey = mappedParts[0];
|
|
1354
|
+
const returnP1 = returns[oKey];
|
|
1355
|
+
if (typeof returnP1 === "object") {
|
|
1356
|
+
const returnP2 = returnP1[mappedParts[1]];
|
|
1357
|
+
if (returnP2) {
|
|
1358
|
+
return ExtractScalar([returnP2, ...mappedParts.slice(2)], returns);
|
|
1359
|
+
}
|
|
1360
|
+
return void 0;
|
|
1361
|
+
}
|
|
1362
|
+
return returnP1;
|
|
1363
|
+
};
|
|
1364
|
+
const PrepareScalarPaths = ({ ops, returns }) => {
|
|
1365
|
+
const ibb = (k, originalKey, o, p = [], pOriginals = [], root = true) => {
|
|
1366
|
+
if (!o) {
|
|
1367
|
+
return;
|
|
1368
|
+
}
|
|
1369
|
+
if (typeof o === "boolean" || typeof o === "number" || typeof o === "string") {
|
|
1370
|
+
const extractionArray = [...pOriginals, originalKey];
|
|
1371
|
+
const isScalar = ExtractScalar(extractionArray, returns);
|
|
1372
|
+
if (isScalar?.startsWith("scalar")) {
|
|
1373
|
+
const partOfTree = {
|
|
1374
|
+
[[...p, k].join(SEPARATOR)]: isScalar
|
|
1375
|
+
};
|
|
1376
|
+
return partOfTree;
|
|
1377
|
+
}
|
|
1378
|
+
return {};
|
|
1379
|
+
}
|
|
1380
|
+
if (Array.isArray(o)) {
|
|
1381
|
+
return ibb(k, k, o[1], p, pOriginals, false);
|
|
1382
|
+
}
|
|
1383
|
+
if (k === "__alias") {
|
|
1384
|
+
return Object.entries(o).map(([alias, objectUnderAlias]) => {
|
|
1385
|
+
if (typeof objectUnderAlias !== "object" || Array.isArray(objectUnderAlias)) {
|
|
1386
|
+
throw new Error(
|
|
1387
|
+
"Invalid alias it should be __alias:{ YOUR_ALIAS_NAME: { OPERATION_NAME: { ...selectors }}}"
|
|
1388
|
+
);
|
|
1389
|
+
}
|
|
1390
|
+
const operationName = Object.keys(objectUnderAlias)[0];
|
|
1391
|
+
const operation = objectUnderAlias[operationName];
|
|
1392
|
+
return ibb(alias, operationName, operation, p, pOriginals, false);
|
|
1393
|
+
}).reduce((a, b) => ({
|
|
1394
|
+
...a,
|
|
1395
|
+
...b
|
|
1396
|
+
}));
|
|
1397
|
+
}
|
|
1398
|
+
const keyName = root ? ops[k] : k;
|
|
1399
|
+
return Object.entries(o).filter(([k2]) => k2 !== "__directives").map(([k2, v]) => {
|
|
1400
|
+
const isInlineFragment = originalKey.match(/^...\s*on/) != null;
|
|
1401
|
+
return ibb(
|
|
1402
|
+
k2,
|
|
1403
|
+
k2,
|
|
1404
|
+
v,
|
|
1405
|
+
isInlineFragment ? p : [...p, purifyGraphQLKey(keyName || k2)],
|
|
1406
|
+
isInlineFragment ? pOriginals : [...pOriginals, purifyGraphQLKey(originalKey)],
|
|
1407
|
+
false
|
|
1408
|
+
);
|
|
1409
|
+
}).reduce((a, b) => ({
|
|
1410
|
+
...a,
|
|
1411
|
+
...b
|
|
1412
|
+
}));
|
|
1413
|
+
};
|
|
1414
|
+
return ibb;
|
|
1415
|
+
};
|
|
1416
|
+
const purifyGraphQLKey = (k) => k.replace(/\([^)]*\)/g, "").replace(/^[^:]*\:/g, "");
|
|
1417
|
+
const mapPart = (p) => {
|
|
1418
|
+
const [isArg, isField] = p.split("<>");
|
|
1419
|
+
if (isField) {
|
|
1420
|
+
return {
|
|
1421
|
+
v: isField,
|
|
1422
|
+
__type: "field"
|
|
1423
|
+
};
|
|
1424
|
+
}
|
|
1425
|
+
return {
|
|
1426
|
+
v: isArg,
|
|
1427
|
+
__type: "arg"
|
|
1428
|
+
};
|
|
1429
|
+
};
|
|
1430
|
+
const ResolveFromPath = (props, returns, ops) => {
|
|
1431
|
+
const ResolvePropsType = (mappedParts) => {
|
|
1432
|
+
const oKey = ops[mappedParts[0].v];
|
|
1433
|
+
const propsP1 = oKey ? props[oKey] : props[mappedParts[0].v];
|
|
1434
|
+
if (propsP1 === "enum" && mappedParts.length === 1) {
|
|
1435
|
+
return "enum";
|
|
1436
|
+
}
|
|
1437
|
+
if (typeof propsP1 === "string" && propsP1.startsWith("scalar.") && mappedParts.length === 1) {
|
|
1438
|
+
return propsP1;
|
|
1439
|
+
}
|
|
1440
|
+
if (typeof propsP1 === "object") {
|
|
1441
|
+
if (mappedParts.length < 2) {
|
|
1442
|
+
return "not";
|
|
1443
|
+
}
|
|
1444
|
+
const propsP2 = propsP1[mappedParts[1].v];
|
|
1445
|
+
if (typeof propsP2 === "string") {
|
|
1446
|
+
return rpp(
|
|
1447
|
+
`${propsP2}${SEPARATOR}${mappedParts.slice(2).map((mp) => mp.v).join(SEPARATOR)}`
|
|
1448
|
+
);
|
|
1449
|
+
}
|
|
1450
|
+
if (typeof propsP2 === "object") {
|
|
1451
|
+
if (mappedParts.length < 3) {
|
|
1452
|
+
return "not";
|
|
1453
|
+
}
|
|
1454
|
+
const propsP3 = propsP2[mappedParts[2].v];
|
|
1455
|
+
if (propsP3 && mappedParts[2].__type === "arg") {
|
|
1456
|
+
return rpp(
|
|
1457
|
+
`${propsP3}${SEPARATOR}${mappedParts.slice(3).map((mp) => mp.v).join(SEPARATOR)}`
|
|
1458
|
+
);
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
};
|
|
1463
|
+
const ResolveReturnType = (mappedParts) => {
|
|
1464
|
+
if (mappedParts.length === 0) {
|
|
1465
|
+
return "not";
|
|
1466
|
+
}
|
|
1467
|
+
const oKey = ops[mappedParts[0].v];
|
|
1468
|
+
const returnP1 = oKey ? returns[oKey] : returns[mappedParts[0].v];
|
|
1469
|
+
if (typeof returnP1 === "object") {
|
|
1470
|
+
if (mappedParts.length < 2)
|
|
1471
|
+
return "not";
|
|
1472
|
+
const returnP2 = returnP1[mappedParts[1].v];
|
|
1473
|
+
if (returnP2) {
|
|
1474
|
+
return rpp(
|
|
1475
|
+
`${returnP2}${SEPARATOR}${mappedParts.slice(2).map((mp) => mp.v).join(SEPARATOR)}`
|
|
1476
|
+
);
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
};
|
|
1480
|
+
const rpp = (path) => {
|
|
1481
|
+
const parts = path.split(SEPARATOR).filter((l) => l.length > 0);
|
|
1482
|
+
const mappedParts = parts.map(mapPart);
|
|
1483
|
+
const propsP1 = ResolvePropsType(mappedParts);
|
|
1484
|
+
if (propsP1) {
|
|
1485
|
+
return propsP1;
|
|
1486
|
+
}
|
|
1487
|
+
const returnP1 = ResolveReturnType(mappedParts);
|
|
1488
|
+
if (returnP1) {
|
|
1489
|
+
return returnP1;
|
|
1490
|
+
}
|
|
1491
|
+
return "not";
|
|
1492
|
+
};
|
|
1493
|
+
return rpp;
|
|
1494
|
+
};
|
|
1495
|
+
const InternalArgsBuilt = ({
|
|
1496
|
+
props,
|
|
1497
|
+
ops,
|
|
1498
|
+
returns,
|
|
1499
|
+
scalars,
|
|
1500
|
+
vars
|
|
1501
|
+
}) => {
|
|
1502
|
+
const arb = (a, p = "", root = true) => {
|
|
1503
|
+
if (typeof a === "string") {
|
|
1504
|
+
if (a.startsWith(START_VAR_NAME)) {
|
|
1505
|
+
const [varName, graphQLType] = a.replace(START_VAR_NAME, "$").split(GRAPHQL_TYPE_SEPARATOR);
|
|
1506
|
+
const v = vars.find((v2) => v2.name === varName);
|
|
1507
|
+
if (!v) {
|
|
1508
|
+
vars.push({
|
|
1509
|
+
name: varName,
|
|
1510
|
+
graphQLType
|
|
1511
|
+
});
|
|
1512
|
+
} else {
|
|
1513
|
+
if (v.graphQLType !== graphQLType) {
|
|
1514
|
+
throw new Error(
|
|
1515
|
+
`Invalid variable exists with two different GraphQL Types, "${v.graphQLType}" and ${graphQLType}`
|
|
1516
|
+
);
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
return varName;
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
const checkType = ResolveFromPath(props, returns, ops)(p);
|
|
1523
|
+
if (checkType.startsWith("scalar.")) {
|
|
1524
|
+
const [_, ...splittedScalar] = checkType.split(".");
|
|
1525
|
+
const scalarKey = splittedScalar.join(".");
|
|
1526
|
+
return scalars?.[scalarKey]?.encode?.(a) || JSON.stringify(a);
|
|
1527
|
+
}
|
|
1528
|
+
if (Array.isArray(a)) {
|
|
1529
|
+
return `[${a.map((arr) => arb(arr, p, false)).join(", ")}]`;
|
|
1530
|
+
}
|
|
1531
|
+
if (typeof a === "string") {
|
|
1532
|
+
if (checkType === "enum") {
|
|
1533
|
+
return a;
|
|
1534
|
+
}
|
|
1535
|
+
return `${JSON.stringify(a)}`;
|
|
1536
|
+
}
|
|
1537
|
+
if (typeof a === "object") {
|
|
1538
|
+
if (a === null) {
|
|
1539
|
+
return `null`;
|
|
1540
|
+
}
|
|
1541
|
+
const returnedObjectString = Object.entries(a).filter(([, v]) => typeof v !== "undefined").map(([k, v]) => `${k}: ${arb(v, [p, k].join(SEPARATOR), false)}`).join(",\n");
|
|
1542
|
+
if (!root) {
|
|
1543
|
+
return `{${returnedObjectString}}`;
|
|
1544
|
+
}
|
|
1545
|
+
return returnedObjectString;
|
|
1546
|
+
}
|
|
1547
|
+
return `${a}`;
|
|
1548
|
+
};
|
|
1549
|
+
return arb;
|
|
1550
|
+
};
|
|
1551
|
+
const resolverFor = (type, field, fn) => fn;
|
|
1552
|
+
const START_VAR_NAME = `$ZEUS_VAR`;
|
|
1553
|
+
const GRAPHQL_TYPE_SEPARATOR = `__$GRAPHQL__`;
|
|
1554
|
+
const $ = (name, graphqlType) => {
|
|
1555
|
+
return START_VAR_NAME + name + GRAPHQL_TYPE_SEPARATOR + graphqlType;
|
|
1556
|
+
};
|
|
1557
|
+
var AccountType = /* @__PURE__ */ ((AccountType2) => {
|
|
1558
|
+
AccountType2["Entrepreneur"] = "Entrepreneur";
|
|
1559
|
+
AccountType2["Individual"] = "Individual";
|
|
1560
|
+
AccountType2["Organization"] = "Organization";
|
|
1561
|
+
return AccountType2;
|
|
1562
|
+
})(AccountType || {});
|
|
1563
|
+
var Country = /* @__PURE__ */ ((Country2) => {
|
|
1564
|
+
Country2["Russia"] = "Russia";
|
|
1565
|
+
return Country2;
|
|
1566
|
+
})(Country || {});
|
|
1567
|
+
var LangType = /* @__PURE__ */ ((LangType2) => {
|
|
1568
|
+
LangType2["ru"] = "ru";
|
|
1569
|
+
return LangType2;
|
|
1570
|
+
})(LangType || {});
|
|
1571
|
+
var OrganizationType = /* @__PURE__ */ ((OrganizationType2) => {
|
|
1572
|
+
OrganizationType2["AO"] = "AO";
|
|
1573
|
+
OrganizationType2["COOP"] = "COOP";
|
|
1574
|
+
OrganizationType2["OAO"] = "OAO";
|
|
1575
|
+
OrganizationType2["OOO"] = "OOO";
|
|
1576
|
+
OrganizationType2["PAO"] = "PAO";
|
|
1577
|
+
OrganizationType2["ZAO"] = "ZAO";
|
|
1578
|
+
return OrganizationType2;
|
|
1579
|
+
})(OrganizationType || {});
|
|
1580
|
+
var PaymentStatus = /* @__PURE__ */ ((PaymentStatus2) => {
|
|
1581
|
+
PaymentStatus2["COMPLETED"] = "COMPLETED";
|
|
1582
|
+
PaymentStatus2["EXPIRED"] = "EXPIRED";
|
|
1583
|
+
PaymentStatus2["FAILED"] = "FAILED";
|
|
1584
|
+
PaymentStatus2["PAID"] = "PAID";
|
|
1585
|
+
PaymentStatus2["PENDING"] = "PENDING";
|
|
1586
|
+
PaymentStatus2["REFUNDED"] = "REFUNDED";
|
|
1587
|
+
return PaymentStatus2;
|
|
1588
|
+
})(PaymentStatus || {});
|
|
1589
|
+
var RegisterRole = /* @__PURE__ */ ((RegisterRole2) => {
|
|
1590
|
+
RegisterRole2["User"] = "User";
|
|
1591
|
+
return RegisterRole2;
|
|
1592
|
+
})(RegisterRole || {});
|
|
1593
|
+
var SystemStatus = /* @__PURE__ */ ((SystemStatus2) => {
|
|
1594
|
+
SystemStatus2["active"] = "active";
|
|
1595
|
+
SystemStatus2["install"] = "install";
|
|
1596
|
+
SystemStatus2["maintenance"] = "maintenance";
|
|
1597
|
+
return SystemStatus2;
|
|
1598
|
+
})(SystemStatus || {});
|
|
1599
|
+
var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
|
|
1600
|
+
UserStatus2["Active"] = "Active";
|
|
1601
|
+
UserStatus2["Blocked"] = "Blocked";
|
|
1602
|
+
UserStatus2["Created"] = "Created";
|
|
1603
|
+
UserStatus2["Failed"] = "Failed";
|
|
1604
|
+
UserStatus2["Joined"] = "Joined";
|
|
1605
|
+
UserStatus2["Payed"] = "Payed";
|
|
1606
|
+
UserStatus2["Refunded"] = "Refunded";
|
|
1607
|
+
UserStatus2["Registered"] = "Registered";
|
|
1608
|
+
return UserStatus2;
|
|
1609
|
+
})(UserStatus || {});
|
|
1610
|
+
|
|
1611
|
+
const index$l = {
|
|
1612
|
+
__proto__: null,
|
|
1613
|
+
$: $,
|
|
1614
|
+
AccountType: AccountType,
|
|
1615
|
+
Chain: Chain,
|
|
1616
|
+
Country: Country,
|
|
1617
|
+
GRAPHQL_TYPE_SEPARATOR: GRAPHQL_TYPE_SEPARATOR,
|
|
1618
|
+
Gql: Gql,
|
|
1619
|
+
GraphQLError: GraphQLError,
|
|
1620
|
+
HEADERS: HEADERS,
|
|
1621
|
+
HOST: HOST,
|
|
1622
|
+
InternalArgsBuilt: InternalArgsBuilt,
|
|
1623
|
+
InternalsBuildQuery: InternalsBuildQuery,
|
|
1624
|
+
LangType: LangType,
|
|
1625
|
+
OrganizationType: OrganizationType,
|
|
1626
|
+
PaymentStatus: PaymentStatus,
|
|
1627
|
+
PrepareScalarPaths: PrepareScalarPaths,
|
|
1628
|
+
RegisterRole: RegisterRole,
|
|
1629
|
+
ResolveFromPath: ResolveFromPath,
|
|
1630
|
+
SEPARATOR: SEPARATOR,
|
|
1631
|
+
START_VAR_NAME: START_VAR_NAME,
|
|
1632
|
+
Selector: Selector,
|
|
1633
|
+
Subscription: Subscription,
|
|
1634
|
+
SubscriptionThunder: SubscriptionThunder,
|
|
1635
|
+
SystemStatus: SystemStatus,
|
|
1636
|
+
Thunder: Thunder,
|
|
1637
|
+
TypeFromSelector: TypeFromSelector,
|
|
1638
|
+
UserStatus: UserStatus,
|
|
1639
|
+
Zeus: Zeus,
|
|
1640
|
+
ZeusScalars: ZeusScalars,
|
|
1641
|
+
ZeusSelect: ZeusSelect,
|
|
1642
|
+
apiFetch: apiFetch,
|
|
1643
|
+
apiSubscription: apiSubscription,
|
|
1644
|
+
decodeScalarsInResponse: decodeScalarsInResponse,
|
|
1645
|
+
fields: fields,
|
|
1646
|
+
purifyGraphQLKey: purifyGraphQLKey,
|
|
1647
|
+
resolverFor: resolverFor,
|
|
1648
|
+
traverseResponse: traverseResponse
|
|
1649
|
+
};
|
|
1650
|
+
|
|
1651
|
+
var __defProp = Object.defineProperty;
|
|
1652
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1653
|
+
var __publicField = (obj, key, value) => {
|
|
1654
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1655
|
+
return value;
|
|
1656
|
+
};
|
|
1657
|
+
class Wallet {
|
|
1658
|
+
constructor(config) {
|
|
1659
|
+
this.config = config;
|
|
1660
|
+
__publicField(this, "apiClient");
|
|
1661
|
+
__publicField(this, "contractKit");
|
|
1662
|
+
__publicField(this, "session");
|
|
1663
|
+
this.apiClient = new APIClient({ url: config.chain_url });
|
|
1664
|
+
this.contractKit = new ContractKit({ client: this.apiClient });
|
|
1665
|
+
}
|
|
1666
|
+
/**
|
|
1667
|
+
* Метод установки приватного ключа в кошелёк
|
|
1668
|
+
* @param username - имя пользователя
|
|
1669
|
+
* @param wif - приватный ключ
|
|
1670
|
+
* @returns
|
|
1671
|
+
*/
|
|
1672
|
+
setWif(username, wif) {
|
|
1673
|
+
this.session = new Session({
|
|
1674
|
+
actor: username,
|
|
1675
|
+
permission: "active",
|
|
1676
|
+
chain: {
|
|
1677
|
+
id: this.config.chain_id,
|
|
1678
|
+
url: this.config.chain_url
|
|
1679
|
+
},
|
|
1680
|
+
walletPlugin: new WalletPluginPrivateKey(PrivateKey.fromString(wif))
|
|
1681
|
+
});
|
|
1682
|
+
return this;
|
|
1683
|
+
}
|
|
1684
|
+
async transact(actionOrActions, broadcast = true) {
|
|
1685
|
+
if (!this.session)
|
|
1686
|
+
throw new Error("Session is not initialized.");
|
|
1687
|
+
const actions = Array.isArray(actionOrActions) ? await Promise.all(actionOrActions.map((action) => this.formActionFromAbi(action))) : [await this.formActionFromAbi(actionOrActions)];
|
|
1688
|
+
return this.session.transact({ actions }, { broadcast });
|
|
1689
|
+
}
|
|
1690
|
+
async getAllRows(code, scope, tableName) {
|
|
1691
|
+
const abi = await this.getAbi(code);
|
|
1692
|
+
const table = this.createTable(code, tableName, abi);
|
|
1693
|
+
const rows = await table.all({ scope });
|
|
1694
|
+
return JSON.parse(JSON.stringify(rows));
|
|
1695
|
+
}
|
|
1696
|
+
async query(code, scope, tableName, options = { indexPosition: "primary" }) {
|
|
1697
|
+
const { indexPosition = "primary", from, to, maxRows } = options;
|
|
1698
|
+
const abi = await this.getAbi(code);
|
|
1699
|
+
const table = this.createTable(code, tableName, abi);
|
|
1700
|
+
const rows = await table.query({
|
|
1701
|
+
scope,
|
|
1702
|
+
index_position: indexPosition,
|
|
1703
|
+
from,
|
|
1704
|
+
to,
|
|
1705
|
+
maxRows
|
|
1706
|
+
});
|
|
1707
|
+
return JSON.parse(JSON.stringify(rows));
|
|
1708
|
+
}
|
|
1709
|
+
async getRow(code, scope, tableName, primaryKey, indexPosition = "primary") {
|
|
1710
|
+
const abi = await this.getAbi(code);
|
|
1711
|
+
const table = this.createTable(code, tableName, abi);
|
|
1712
|
+
const row = await table.get(String(primaryKey), {
|
|
1713
|
+
scope,
|
|
1714
|
+
index_position: indexPosition
|
|
1715
|
+
});
|
|
1716
|
+
return row ? JSON.parse(JSON.stringify(row)) : null;
|
|
1717
|
+
}
|
|
1718
|
+
async formActionFromAbi(action) {
|
|
1719
|
+
const abi = await this.getAbi(action.account);
|
|
1720
|
+
return Action.from(action, abi);
|
|
1721
|
+
}
|
|
1722
|
+
async getAbi(account) {
|
|
1723
|
+
const { abi } = await this.apiClient.v1.chain.get_abi(account);
|
|
1724
|
+
if (!abi)
|
|
1725
|
+
throw new Error(`ABI for account "${account}" not found.`);
|
|
1726
|
+
return abi;
|
|
1727
|
+
}
|
|
1728
|
+
createTable(code, tableName, abi) {
|
|
1729
|
+
return new Table({
|
|
1730
|
+
abi,
|
|
1731
|
+
account: code,
|
|
1732
|
+
name: tableName,
|
|
1733
|
+
client: this.apiClient
|
|
1734
|
+
});
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
const Classes = {
|
|
1739
|
+
__proto__: null,
|
|
1740
|
+
Wallet: Wallet
|
|
1741
|
+
};
|
|
1742
|
+
|
|
1743
|
+
const rawExtensionSelector = {
|
|
1744
|
+
name: true,
|
|
1745
|
+
available: true,
|
|
1746
|
+
enabled: true,
|
|
1747
|
+
updated_at: true,
|
|
1748
|
+
created_at: true,
|
|
1749
|
+
config: true,
|
|
1750
|
+
schema: true,
|
|
1751
|
+
title: true,
|
|
1752
|
+
description: true,
|
|
1753
|
+
image: true,
|
|
1754
|
+
tags: true,
|
|
1755
|
+
readme: true,
|
|
1756
|
+
instructions: true,
|
|
1757
|
+
installed: true
|
|
1758
|
+
};
|
|
1759
|
+
const extensionSelector = Selector("Extension")(rawExtensionSelector);
|
|
1760
|
+
|
|
1761
|
+
const name$M = "installExtension";
|
|
1762
|
+
const mutation$C = Selector("Mutation")({
|
|
1763
|
+
[name$M]: [{ data: $("data", "ExtensionInput!") }, extensionSelector]
|
|
1764
|
+
});
|
|
1765
|
+
|
|
1766
|
+
const installExtension = {
|
|
1767
|
+
__proto__: null,
|
|
1768
|
+
mutation: mutation$C,
|
|
1769
|
+
name: name$M
|
|
1770
|
+
};
|
|
1771
|
+
|
|
1772
|
+
const name$L = "uninstallExtension";
|
|
1773
|
+
const mutation$B = Selector("Mutation")({
|
|
1774
|
+
[name$L]: [{ data: $("data", "UninstallExtensionInput!") }, true]
|
|
1775
|
+
});
|
|
1776
|
+
|
|
1777
|
+
const uninstallExtension = {
|
|
1778
|
+
__proto__: null,
|
|
1779
|
+
mutation: mutation$B,
|
|
1780
|
+
name: name$L
|
|
1781
|
+
};
|
|
1782
|
+
|
|
1783
|
+
const name$K = "updateExtension";
|
|
1784
|
+
const mutation$A = Selector("Mutation")({
|
|
1785
|
+
[name$K]: [{ data: $("data", "ExtensionInput!") }, extensionSelector]
|
|
1786
|
+
});
|
|
1787
|
+
|
|
1788
|
+
const updateExtension = {
|
|
1789
|
+
__proto__: null,
|
|
1790
|
+
mutation: mutation$A,
|
|
1791
|
+
name: name$K
|
|
1792
|
+
};
|
|
1793
|
+
|
|
1794
|
+
const index$k = {
|
|
1795
|
+
__proto__: null,
|
|
1796
|
+
InstallExtension: installExtension,
|
|
1797
|
+
UninstallExtension: uninstallExtension,
|
|
1798
|
+
UpdateExtension: updateExtension
|
|
1799
|
+
};
|
|
1800
|
+
|
|
1801
|
+
const rawBankAccountSelector = {
|
|
1802
|
+
details: {
|
|
1803
|
+
bik: true,
|
|
1804
|
+
corr: true,
|
|
1805
|
+
kpp: true
|
|
1806
|
+
},
|
|
1807
|
+
account_number: true,
|
|
1808
|
+
bank_name: true,
|
|
1809
|
+
card_number: true,
|
|
1810
|
+
currency: true
|
|
1811
|
+
};
|
|
1812
|
+
Selector("BankAccount")(rawBankAccountSelector);
|
|
1813
|
+
|
|
1814
|
+
const rawPaymentMethodSelector = {
|
|
1815
|
+
data: {
|
|
1816
|
+
__typename: true,
|
|
1817
|
+
["...on BankAccount"]: rawBankAccountSelector,
|
|
1818
|
+
["...on SbpAccount"]: {
|
|
1819
|
+
phone: true
|
|
1820
|
+
}
|
|
1821
|
+
},
|
|
1822
|
+
is_default: true,
|
|
1823
|
+
created_at: true,
|
|
1824
|
+
updated_at: true,
|
|
1825
|
+
method_id: true,
|
|
1826
|
+
method_type: true,
|
|
1827
|
+
username: true
|
|
1828
|
+
};
|
|
1829
|
+
const paymentMethodSelector = Selector("PaymentMethod")(rawPaymentMethodSelector);
|
|
1830
|
+
|
|
1831
|
+
const name$J = "createBankAccount";
|
|
1832
|
+
const mutation$z = Selector("Mutation")({
|
|
1833
|
+
[name$J]: [{ data: $("data", "CreateBankAccountInput!") }, paymentMethodSelector]
|
|
1834
|
+
});
|
|
1835
|
+
|
|
1836
|
+
const createBankAccount = {
|
|
1837
|
+
__proto__: null,
|
|
1838
|
+
mutation: mutation$z,
|
|
1839
|
+
name: name$J
|
|
1840
|
+
};
|
|
1841
|
+
|
|
1842
|
+
const name$I = "deletePaymentMethod";
|
|
1843
|
+
const mutation$y = Selector("Mutation")({
|
|
1844
|
+
[name$I]: [{ data: $("data", "DeletePaymentMethodInput!") }, true]
|
|
1845
|
+
});
|
|
1846
|
+
|
|
1847
|
+
const deletePaymentMethod = {
|
|
1848
|
+
__proto__: null,
|
|
1849
|
+
mutation: mutation$y,
|
|
1850
|
+
name: name$I
|
|
1851
|
+
};
|
|
1852
|
+
|
|
1853
|
+
const name$H = "updateBankAccount";
|
|
1854
|
+
const mutation$x = Selector("Mutation")({
|
|
1855
|
+
[name$H]: [{ data: $("data", "UpdateBankAccountInput!") }, paymentMethodSelector]
|
|
1856
|
+
});
|
|
1857
|
+
|
|
1858
|
+
const updateBankAccount = {
|
|
1859
|
+
__proto__: null,
|
|
1860
|
+
mutation: mutation$x,
|
|
1861
|
+
name: name$H
|
|
1862
|
+
};
|
|
1863
|
+
|
|
1864
|
+
const index$j = {
|
|
1865
|
+
__proto__: null,
|
|
1866
|
+
CreateBankAccount: createBankAccount,
|
|
1867
|
+
DeletePaymentMethod: deletePaymentMethod,
|
|
1868
|
+
UpdateBankAccount: updateBankAccount
|
|
1869
|
+
};
|
|
1870
|
+
|
|
1871
|
+
const rawBlockchainAccountSelector = {
|
|
1872
|
+
account_name: true,
|
|
1873
|
+
core_liquid_balance: true,
|
|
1874
|
+
cpu_limit: {
|
|
1875
|
+
available: true,
|
|
1876
|
+
current_used: true,
|
|
1877
|
+
last_usage_update_time: true,
|
|
1878
|
+
max: true,
|
|
1879
|
+
used: true
|
|
1880
|
+
},
|
|
1881
|
+
cpu_weight: true,
|
|
1882
|
+
created: true,
|
|
1883
|
+
head_block_num: true,
|
|
1884
|
+
head_block_time: true,
|
|
1885
|
+
last_code_update: true,
|
|
1886
|
+
net_limit: {
|
|
1887
|
+
available: true,
|
|
1888
|
+
current_used: true,
|
|
1889
|
+
last_usage_update_time: true,
|
|
1890
|
+
max: true,
|
|
1891
|
+
used: true
|
|
1892
|
+
},
|
|
1893
|
+
net_weight: true,
|
|
1894
|
+
permissions: {
|
|
1895
|
+
parent: true,
|
|
1896
|
+
perm_name: true,
|
|
1897
|
+
required_auth: {
|
|
1898
|
+
accounts: {
|
|
1899
|
+
permission: {
|
|
1900
|
+
actor: true,
|
|
1901
|
+
permission: true
|
|
1902
|
+
},
|
|
1903
|
+
weight: true
|
|
1904
|
+
},
|
|
1905
|
+
keys: {
|
|
1906
|
+
key: true,
|
|
1907
|
+
weight: true
|
|
1908
|
+
},
|
|
1909
|
+
threshold: true,
|
|
1910
|
+
waits: {
|
|
1911
|
+
wait_sec: true,
|
|
1912
|
+
weight: true
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
},
|
|
1916
|
+
privileged: true,
|
|
1917
|
+
ram_quota: true,
|
|
1918
|
+
ram_usage: true,
|
|
1919
|
+
refund_request: {
|
|
1920
|
+
cpu_amount: true,
|
|
1921
|
+
net_amount: true,
|
|
1922
|
+
owner: true,
|
|
1923
|
+
request_time: true
|
|
1924
|
+
},
|
|
1925
|
+
rex_info: true,
|
|
1926
|
+
self_delegated_bandwidth: {
|
|
1927
|
+
cpu_weight: true,
|
|
1928
|
+
from: true,
|
|
1929
|
+
net_weight: true,
|
|
1930
|
+
to: true
|
|
1931
|
+
},
|
|
1932
|
+
total_resources: {
|
|
1933
|
+
cpu_weight: true,
|
|
1934
|
+
net_weight: true,
|
|
1935
|
+
owner: true,
|
|
1936
|
+
ram_bytes: true
|
|
1937
|
+
},
|
|
1938
|
+
voter_info: true
|
|
1939
|
+
};
|
|
1940
|
+
Selector("BlockchainAccount")(
|
|
1941
|
+
rawBlockchainAccountSelector
|
|
1942
|
+
);
|
|
1943
|
+
|
|
1944
|
+
const rawMonoAccountSelector = {
|
|
1945
|
+
email: true,
|
|
1946
|
+
has_account: true,
|
|
1947
|
+
initial_order: true,
|
|
1948
|
+
is_email_verified: true,
|
|
1949
|
+
is_registered: true,
|
|
1950
|
+
message: true,
|
|
1951
|
+
public_key: true,
|
|
1952
|
+
referer: true,
|
|
1953
|
+
role: true,
|
|
1954
|
+
status: true,
|
|
1955
|
+
type: true,
|
|
1956
|
+
username: true
|
|
1957
|
+
};
|
|
1958
|
+
Selector("MonoAccount")(
|
|
1959
|
+
rawMonoAccountSelector
|
|
1960
|
+
);
|
|
1961
|
+
|
|
1962
|
+
const rawParticipantAccountSelector = {
|
|
1963
|
+
braname: true,
|
|
1964
|
+
created_at: true,
|
|
1965
|
+
has_vote: true,
|
|
1966
|
+
is_initial: true,
|
|
1967
|
+
is_minimum: true,
|
|
1968
|
+
last_min_pay: true,
|
|
1969
|
+
last_update: true,
|
|
1970
|
+
status: true,
|
|
1971
|
+
type: true,
|
|
1972
|
+
username: true
|
|
1973
|
+
};
|
|
1974
|
+
Selector("ParticipantAccount")(
|
|
1975
|
+
rawParticipantAccountSelector
|
|
1976
|
+
);
|
|
1977
|
+
|
|
1978
|
+
const rawUserAccountSelector = {
|
|
1979
|
+
meta: true,
|
|
1980
|
+
referer: true,
|
|
1981
|
+
registered_at: true,
|
|
1982
|
+
registrator: true,
|
|
1983
|
+
status: true,
|
|
1984
|
+
storages: true,
|
|
1985
|
+
type: true,
|
|
1986
|
+
username: true,
|
|
1987
|
+
verifications: {
|
|
1988
|
+
created_at: true,
|
|
1989
|
+
is_verified: true,
|
|
1990
|
+
last_update: true,
|
|
1991
|
+
notice: true,
|
|
1992
|
+
procedure: true,
|
|
1993
|
+
verificator: true
|
|
1994
|
+
}
|
|
1995
|
+
};
|
|
1996
|
+
Selector("UserAccount")(
|
|
1997
|
+
rawUserAccountSelector
|
|
1998
|
+
);
|
|
1999
|
+
|
|
2000
|
+
const rawAccountSelector = {
|
|
2001
|
+
username: true,
|
|
2002
|
+
blockchain_account: rawBlockchainAccountSelector,
|
|
2003
|
+
provider_account: rawMonoAccountSelector,
|
|
2004
|
+
participant_account: rawParticipantAccountSelector,
|
|
2005
|
+
user_account: rawUserAccountSelector
|
|
2006
|
+
};
|
|
2007
|
+
const accountSelector = Selector("Account")(rawAccountSelector);
|
|
2008
|
+
|
|
2009
|
+
const rawDocumentMetaSelector = {
|
|
2010
|
+
block_num: true,
|
|
2011
|
+
coopname: true,
|
|
2012
|
+
created_at: true,
|
|
2013
|
+
generator: true,
|
|
2014
|
+
lang: true,
|
|
2015
|
+
links: true,
|
|
2016
|
+
registry_id: true,
|
|
2017
|
+
timezone: true,
|
|
2018
|
+
title: true,
|
|
2019
|
+
username: true,
|
|
2020
|
+
version: true
|
|
2021
|
+
};
|
|
2022
|
+
const rawDocumentSelector = {
|
|
2023
|
+
binary: true,
|
|
2024
|
+
full_title: true,
|
|
2025
|
+
hash: true,
|
|
2026
|
+
html: true,
|
|
2027
|
+
meta: rawDocumentMetaSelector
|
|
2028
|
+
// Общая часть meta
|
|
2029
|
+
};
|
|
2030
|
+
const documentSelector = Selector("GeneratedDocument")(rawDocumentSelector);
|
|
2031
|
+
|
|
2032
|
+
const rawParticipantApplicationDecisionDocumentSelector = {
|
|
2033
|
+
...rawDocumentSelector,
|
|
2034
|
+
meta: {
|
|
2035
|
+
...rawDocumentMetaSelector,
|
|
2036
|
+
// Общая часть meta
|
|
2037
|
+
decision_id: true
|
|
2038
|
+
}
|
|
2039
|
+
};
|
|
2040
|
+
const participantApplicationDecisionDocumentSelector = Selector("ParticipantApplicationDecisionDocument")(rawParticipantApplicationDecisionDocumentSelector);
|
|
2041
|
+
|
|
2042
|
+
const rawParticipantApplicationDocumentSelector$1 = {
|
|
2043
|
+
...rawDocumentSelector,
|
|
2044
|
+
meta: {
|
|
2045
|
+
...rawDocumentMetaSelector
|
|
2046
|
+
// Общая часть meta
|
|
2047
|
+
}
|
|
2048
|
+
};
|
|
2049
|
+
const participantApplicationDocumentSelector = Selector("ParticipantApplicationDocument")(rawParticipantApplicationDocumentSelector$1);
|
|
2050
|
+
|
|
2051
|
+
const rawBankPaymentMethodSelector = {
|
|
2052
|
+
data: rawBankAccountSelector,
|
|
2053
|
+
is_default: true,
|
|
2054
|
+
created_at: true,
|
|
2055
|
+
updated_at: true,
|
|
2056
|
+
method_id: true,
|
|
2057
|
+
method_type: true,
|
|
2058
|
+
username: true
|
|
2059
|
+
};
|
|
2060
|
+
|
|
2061
|
+
const rawIndividualSelector = {
|
|
2062
|
+
email: true,
|
|
2063
|
+
full_address: true,
|
|
2064
|
+
phone: true,
|
|
2065
|
+
first_name: true,
|
|
2066
|
+
last_name: true,
|
|
2067
|
+
middle_name: true,
|
|
2068
|
+
birthdate: true,
|
|
2069
|
+
passport: {
|
|
2070
|
+
number: true,
|
|
2071
|
+
code: true,
|
|
2072
|
+
issued_at: true,
|
|
2073
|
+
issued_by: true,
|
|
2074
|
+
series: true
|
|
2075
|
+
},
|
|
2076
|
+
username: true
|
|
2077
|
+
};
|
|
2078
|
+
|
|
2079
|
+
const rawBranchSelector = {
|
|
2080
|
+
coopname: true,
|
|
2081
|
+
braname: true,
|
|
2082
|
+
city: true,
|
|
2083
|
+
country: true,
|
|
2084
|
+
details: {
|
|
2085
|
+
kpp: true,
|
|
2086
|
+
inn: true,
|
|
2087
|
+
ogrn: true
|
|
2088
|
+
},
|
|
2089
|
+
email: true,
|
|
2090
|
+
fact_address: true,
|
|
2091
|
+
full_address: true,
|
|
2092
|
+
full_name: true,
|
|
2093
|
+
phone: true,
|
|
2094
|
+
represented_by: {
|
|
2095
|
+
based_on: true,
|
|
2096
|
+
first_name: true,
|
|
2097
|
+
last_name: true,
|
|
2098
|
+
middle_name: true,
|
|
2099
|
+
position: true
|
|
2100
|
+
},
|
|
2101
|
+
short_name: true,
|
|
2102
|
+
trusted: rawIndividualSelector,
|
|
2103
|
+
// Передаём "сырой" объект
|
|
2104
|
+
trustee: rawIndividualSelector,
|
|
2105
|
+
// Передаём "сырой" объект
|
|
2106
|
+
bank_account: rawBankPaymentMethodSelector,
|
|
2107
|
+
type: true
|
|
2108
|
+
};
|
|
2109
|
+
const branchSelector = Selector("Branch")(rawBranchSelector);
|
|
2110
|
+
|
|
2111
|
+
const rawBranchSelectorForUsers = {
|
|
2112
|
+
coopname: true,
|
|
2113
|
+
braname: true,
|
|
2114
|
+
city: true,
|
|
2115
|
+
country: true,
|
|
2116
|
+
details: {
|
|
2117
|
+
kpp: true,
|
|
2118
|
+
inn: true,
|
|
2119
|
+
ogrn: true
|
|
2120
|
+
},
|
|
2121
|
+
email: true,
|
|
2122
|
+
fact_address: true,
|
|
2123
|
+
full_address: true,
|
|
2124
|
+
full_name: true,
|
|
2125
|
+
phone: true,
|
|
2126
|
+
represented_by: {
|
|
2127
|
+
based_on: true,
|
|
2128
|
+
first_name: true,
|
|
2129
|
+
last_name: true,
|
|
2130
|
+
middle_name: true,
|
|
2131
|
+
position: true
|
|
2132
|
+
},
|
|
2133
|
+
short_name: true,
|
|
2134
|
+
bank_account: rawBankPaymentMethodSelector,
|
|
2135
|
+
type: true
|
|
2136
|
+
};
|
|
2137
|
+
const branchSelectorForUsers = Selector("Branch")(
|
|
2138
|
+
rawBranchSelectorForUsers
|
|
2139
|
+
);
|
|
2140
|
+
|
|
2141
|
+
const rawSelectBranchDocumentSelector = {
|
|
2142
|
+
...rawDocumentSelector,
|
|
2143
|
+
meta: {
|
|
2144
|
+
...rawDocumentMetaSelector,
|
|
2145
|
+
// Общая часть meta
|
|
2146
|
+
braname: true
|
|
2147
|
+
// Уникальное дополнение
|
|
2148
|
+
}
|
|
2149
|
+
};
|
|
2150
|
+
const generateSelectBranchDocumentSelector = Selector("SelectBranchDocument")(rawSelectBranchDocumentSelector);
|
|
2151
|
+
|
|
2152
|
+
const rawBlockchainInfoSelector = {
|
|
2153
|
+
block_cpu_limit: true,
|
|
2154
|
+
block_net_limit: true,
|
|
2155
|
+
chain_id: true,
|
|
2156
|
+
fork_db_head_block_id: true,
|
|
2157
|
+
fork_db_head_block_num: true,
|
|
2158
|
+
head_block_id: true,
|
|
2159
|
+
head_block_num: true,
|
|
2160
|
+
head_block_producer: true,
|
|
2161
|
+
head_block_time: true,
|
|
2162
|
+
last_irreversible_block_id: true,
|
|
2163
|
+
last_irreversible_block_num: true,
|
|
2164
|
+
last_irreversible_block_time: true,
|
|
2165
|
+
server_version: true,
|
|
2166
|
+
server_version_string: true,
|
|
2167
|
+
virtual_block_cpu_limit: true,
|
|
2168
|
+
virtual_block_net_limit: true
|
|
2169
|
+
};
|
|
2170
|
+
Selector("BlockchainInfoDTO")(
|
|
2171
|
+
rawBlockchainInfoSelector
|
|
2172
|
+
);
|
|
2173
|
+
|
|
2174
|
+
const rawCooperatorAccountSelector = {
|
|
2175
|
+
announce: true,
|
|
2176
|
+
coop_type: true,
|
|
2177
|
+
created_at: true,
|
|
2178
|
+
description: true,
|
|
2179
|
+
document: {
|
|
2180
|
+
hash: true,
|
|
2181
|
+
public_key: true,
|
|
2182
|
+
meta: true,
|
|
2183
|
+
signature: true
|
|
2184
|
+
},
|
|
2185
|
+
initial: true,
|
|
2186
|
+
is_branched: true,
|
|
2187
|
+
is_cooperative: true,
|
|
2188
|
+
is_enrolled: true,
|
|
2189
|
+
meta: true,
|
|
2190
|
+
minimum: true,
|
|
2191
|
+
org_initial: true,
|
|
2192
|
+
org_minimum: true,
|
|
2193
|
+
org_registration: true,
|
|
2194
|
+
parent_username: true,
|
|
2195
|
+
referer: true,
|
|
2196
|
+
registered_at: true,
|
|
2197
|
+
registration: true,
|
|
2198
|
+
registrator: true,
|
|
2199
|
+
status: true,
|
|
2200
|
+
storages: true,
|
|
2201
|
+
type: true,
|
|
2202
|
+
username: true,
|
|
2203
|
+
verifications: {
|
|
2204
|
+
created_at: true,
|
|
2205
|
+
is_verified: true,
|
|
2206
|
+
last_update: true,
|
|
2207
|
+
notice: true,
|
|
2208
|
+
procedure: true,
|
|
2209
|
+
verificator: true
|
|
2210
|
+
}
|
|
2211
|
+
};
|
|
2212
|
+
Selector("CooperativeOperatorAccount")(
|
|
2213
|
+
rawCooperatorAccountSelector
|
|
2214
|
+
);
|
|
2215
|
+
|
|
2216
|
+
const rawContactsSelector = {
|
|
2217
|
+
chairman: {
|
|
2218
|
+
first_name: true,
|
|
2219
|
+
last_name: true,
|
|
2220
|
+
middle_name: true
|
|
2221
|
+
},
|
|
2222
|
+
details: {
|
|
2223
|
+
inn: true,
|
|
2224
|
+
kpp: true,
|
|
2225
|
+
ogrn: true
|
|
2226
|
+
},
|
|
2227
|
+
email: true,
|
|
2228
|
+
full_address: true,
|
|
2229
|
+
full_name: true,
|
|
2230
|
+
phone: true
|
|
2231
|
+
};
|
|
2232
|
+
const rawVarsSelector = {
|
|
2233
|
+
confidential_email: true,
|
|
2234
|
+
confidential_link: true,
|
|
2235
|
+
contact_email: true,
|
|
2236
|
+
coopenomics_agreement: {
|
|
2237
|
+
protocol_day_month_year: true,
|
|
2238
|
+
protocol_number: true
|
|
2239
|
+
},
|
|
2240
|
+
coopname: true,
|
|
2241
|
+
full_abbr: true,
|
|
2242
|
+
full_abbr_dative: true,
|
|
2243
|
+
full_abbr_genitive: true,
|
|
2244
|
+
name: true,
|
|
2245
|
+
participant_application: {
|
|
2246
|
+
protocol_day_month_year: true,
|
|
2247
|
+
protocol_number: true
|
|
2248
|
+
},
|
|
2249
|
+
passport_request: true,
|
|
2250
|
+
privacy_agreement: {
|
|
2251
|
+
protocol_day_month_year: true,
|
|
2252
|
+
protocol_number: true
|
|
2253
|
+
},
|
|
2254
|
+
short_abbr: true,
|
|
2255
|
+
signature_agreement: {
|
|
2256
|
+
protocol_day_month_year: true,
|
|
2257
|
+
protocol_number: true
|
|
2258
|
+
},
|
|
2259
|
+
user_agreement: {
|
|
2260
|
+
protocol_day_month_year: true,
|
|
2261
|
+
protocol_number: true
|
|
2262
|
+
},
|
|
2263
|
+
wallet_agreement: {
|
|
2264
|
+
protocol_day_month_year: true,
|
|
2265
|
+
protocol_number: true
|
|
2266
|
+
},
|
|
2267
|
+
website: true
|
|
2268
|
+
};
|
|
2269
|
+
const rawSystemInfoSelector = {
|
|
2270
|
+
blockchain_info: rawBlockchainInfoSelector,
|
|
2271
|
+
cooperator_account: rawCooperatorAccountSelector,
|
|
2272
|
+
coopname: true,
|
|
2273
|
+
blockchain_account: rawBlockchainAccountSelector,
|
|
2274
|
+
system_status: true,
|
|
2275
|
+
contacts: rawContactsSelector,
|
|
2276
|
+
vars: rawVarsSelector
|
|
2277
|
+
};
|
|
2278
|
+
const systemInfoSelector = Selector("SystemInfo")(rawSystemInfoSelector);
|
|
2279
|
+
|
|
2280
|
+
const rawBlockchainActionSelector = {
|
|
2281
|
+
account: true,
|
|
2282
|
+
account_ram_deltas: {
|
|
2283
|
+
account: true,
|
|
2284
|
+
delta: true
|
|
2285
|
+
},
|
|
2286
|
+
action_ordinal: true,
|
|
2287
|
+
authorization: {
|
|
2288
|
+
actor: true,
|
|
2289
|
+
permission: true
|
|
2290
|
+
},
|
|
2291
|
+
block_id: true,
|
|
2292
|
+
block_num: true,
|
|
2293
|
+
chain_id: true,
|
|
2294
|
+
console: true,
|
|
2295
|
+
context_free: true,
|
|
2296
|
+
creator_action_ordinal: true,
|
|
2297
|
+
data: true,
|
|
2298
|
+
elapsed: true,
|
|
2299
|
+
global_sequence: true,
|
|
2300
|
+
name: true,
|
|
2301
|
+
receipt: {
|
|
2302
|
+
abi_sequence: true,
|
|
2303
|
+
act_digest: true,
|
|
2304
|
+
auth_sequence: {
|
|
2305
|
+
account: true,
|
|
2306
|
+
sequence: true
|
|
2307
|
+
},
|
|
2308
|
+
code_sequence: true,
|
|
2309
|
+
global_sequence: true,
|
|
2310
|
+
receiver: true,
|
|
2311
|
+
recv_sequence: true
|
|
2312
|
+
},
|
|
2313
|
+
receiver: true,
|
|
2314
|
+
transaction_id: true
|
|
2315
|
+
};
|
|
2316
|
+
Selector("BlockchainAction")(
|
|
2317
|
+
rawBlockchainActionSelector
|
|
2318
|
+
);
|
|
2319
|
+
|
|
2320
|
+
const rawOrganizationSelector = {
|
|
2321
|
+
city: true,
|
|
2322
|
+
country: true,
|
|
2323
|
+
details: {
|
|
2324
|
+
inn: true,
|
|
2325
|
+
kpp: true,
|
|
2326
|
+
ogrn: true
|
|
2327
|
+
},
|
|
2328
|
+
email: true,
|
|
2329
|
+
fact_address: true,
|
|
2330
|
+
full_address: true,
|
|
2331
|
+
full_name: true,
|
|
2332
|
+
phone: true,
|
|
2333
|
+
represented_by: {
|
|
2334
|
+
based_on: true,
|
|
2335
|
+
first_name: true,
|
|
2336
|
+
last_name: true,
|
|
2337
|
+
middle_name: true,
|
|
2338
|
+
position: true
|
|
2339
|
+
},
|
|
2340
|
+
short_name: true,
|
|
2341
|
+
type: true,
|
|
2342
|
+
username: true
|
|
2343
|
+
};
|
|
2344
|
+
|
|
2345
|
+
const rawEntrepreneurSelector = {
|
|
2346
|
+
birthdate: true,
|
|
2347
|
+
city: true,
|
|
2348
|
+
country: true,
|
|
2349
|
+
details: {
|
|
2350
|
+
inn: true,
|
|
2351
|
+
ogrn: true
|
|
2352
|
+
},
|
|
2353
|
+
email: true,
|
|
2354
|
+
first_name: true,
|
|
2355
|
+
full_address: true,
|
|
2356
|
+
last_name: true,
|
|
2357
|
+
middle_name: true,
|
|
2358
|
+
phone: true,
|
|
2359
|
+
username: true
|
|
2360
|
+
};
|
|
2361
|
+
|
|
2362
|
+
const name$G = "addTrustedAccount";
|
|
2363
|
+
const mutation$w = Selector("Mutation")({
|
|
2364
|
+
[name$G]: [{ data: $("data", "AddTrustedAccountInput!") }, branchSelector]
|
|
2365
|
+
});
|
|
2366
|
+
|
|
2367
|
+
const addTrustedAccount = {
|
|
2368
|
+
__proto__: null,
|
|
2369
|
+
mutation: mutation$w,
|
|
2370
|
+
name: name$G
|
|
2371
|
+
};
|
|
2372
|
+
|
|
2373
|
+
const name$F = "createBranch";
|
|
2374
|
+
const mutation$v = Selector("Mutation")({
|
|
2375
|
+
[name$F]: [{ data: $("data", "CreateBranchInput!") }, branchSelector]
|
|
2376
|
+
});
|
|
2377
|
+
|
|
2378
|
+
const createBranch = {
|
|
2379
|
+
__proto__: null,
|
|
2380
|
+
mutation: mutation$v,
|
|
2381
|
+
name: name$F
|
|
2382
|
+
};
|
|
2383
|
+
|
|
2384
|
+
const name$E = "deleteBranch";
|
|
2385
|
+
const mutation$u = Selector("Mutation")({
|
|
2386
|
+
[name$E]: [{ data: $("data", "DeleteBranchInput!") }, true]
|
|
2387
|
+
});
|
|
2388
|
+
|
|
2389
|
+
const deleteBranch = {
|
|
2390
|
+
__proto__: null,
|
|
2391
|
+
mutation: mutation$u,
|
|
2392
|
+
name: name$E
|
|
2393
|
+
};
|
|
2394
|
+
|
|
2395
|
+
const name$D = "deleteTrustedAccount";
|
|
2396
|
+
const mutation$t = Selector("Mutation")({
|
|
2397
|
+
[name$D]: [{ data: $("data", "DeleteTrustedAccountInput!") }, branchSelector]
|
|
2398
|
+
});
|
|
2399
|
+
|
|
2400
|
+
const deleteTrustedAccount = {
|
|
2401
|
+
__proto__: null,
|
|
2402
|
+
mutation: mutation$t,
|
|
2403
|
+
name: name$D
|
|
2404
|
+
};
|
|
2405
|
+
|
|
2406
|
+
const name$C = "editBranch";
|
|
2407
|
+
const mutation$s = Selector("Mutation")({
|
|
2408
|
+
[name$C]: [{ data: $("data", "EditBranchInput!") }, branchSelector]
|
|
2409
|
+
});
|
|
2410
|
+
|
|
2411
|
+
const editBranch = {
|
|
2412
|
+
__proto__: null,
|
|
2413
|
+
mutation: mutation$s,
|
|
2414
|
+
name: name$C
|
|
2415
|
+
};
|
|
2416
|
+
|
|
2417
|
+
const name$B = "selectBranch";
|
|
2418
|
+
const mutation$r = Selector("Mutation")({
|
|
2419
|
+
[name$B]: [{ data: $("data", "SelectBranchInput!") }, true]
|
|
2420
|
+
});
|
|
2421
|
+
|
|
2422
|
+
const selectBranch = {
|
|
2423
|
+
__proto__: null,
|
|
2424
|
+
mutation: mutation$r,
|
|
2425
|
+
name: name$B
|
|
2426
|
+
};
|
|
2427
|
+
|
|
2428
|
+
const name$A = "generateSelectBranchDocument";
|
|
2429
|
+
const mutation$q = Selector("Mutation")({
|
|
2430
|
+
[name$A]: [{ data: $("data", "SelectBranchGenerateDocumentInput!"), options: $("options", "GenerateDocumentOptionsInput!") }, generateSelectBranchDocumentSelector]
|
|
2431
|
+
});
|
|
2432
|
+
|
|
2433
|
+
const generateSelectBranchDocument = {
|
|
2434
|
+
__proto__: null,
|
|
2435
|
+
mutation: mutation$q,
|
|
2436
|
+
name: name$A
|
|
2437
|
+
};
|
|
2438
|
+
|
|
2439
|
+
const index$i = {
|
|
2440
|
+
__proto__: null,
|
|
2441
|
+
AddTrustedAccount: addTrustedAccount,
|
|
2442
|
+
CreateBranch: createBranch,
|
|
2443
|
+
DeleteBranch: deleteBranch,
|
|
2444
|
+
DeleteTrustedAccount: deleteTrustedAccount,
|
|
2445
|
+
EditBranch: editBranch,
|
|
2446
|
+
GenerateSelectBranchDocument: generateSelectBranchDocument,
|
|
2447
|
+
SelectBranch: selectBranch
|
|
2448
|
+
};
|
|
2449
|
+
|
|
2450
|
+
const rawProjectFreeDecisionDocumentSelector = {
|
|
2451
|
+
...rawDocumentSelector,
|
|
2452
|
+
meta: {
|
|
2453
|
+
...rawDocumentMetaSelector,
|
|
2454
|
+
// Общая часть meta
|
|
2455
|
+
project_id: true
|
|
2456
|
+
}
|
|
2457
|
+
};
|
|
2458
|
+
const projectFreeDecisionDocumentSelector = Selector("ProjectFreeDecisionDocument")(rawProjectFreeDecisionDocumentSelector);
|
|
2459
|
+
|
|
2460
|
+
const name$z = "generateProjectOfFreeDecision";
|
|
2461
|
+
const mutation$p = Selector("Mutation")({
|
|
2462
|
+
[name$z]: [{ data: $("data", "ProjectFreeDecisionGenerateDocumentInput!"), options: $("options", "GenerateDocumentOptionsInput!") }, projectFreeDecisionDocumentSelector]
|
|
2463
|
+
});
|
|
2464
|
+
|
|
2465
|
+
const generateProjectOfFreeDecisionDocument = {
|
|
2466
|
+
__proto__: null,
|
|
2467
|
+
mutation: mutation$p,
|
|
2468
|
+
name: name$z
|
|
2469
|
+
};
|
|
2470
|
+
|
|
2471
|
+
const rawFreeDecisionDocumentSelector = {
|
|
2472
|
+
...rawDocumentSelector,
|
|
2473
|
+
meta: {
|
|
2474
|
+
...rawDocumentMetaSelector,
|
|
2475
|
+
// Общая часть meta
|
|
2476
|
+
project_id: true,
|
|
2477
|
+
// Уникальное дополнение
|
|
2478
|
+
decision_id: true
|
|
2479
|
+
}
|
|
2480
|
+
};
|
|
2481
|
+
const freeDecisionDocumentSelector = Selector("FreeDecisionDocument")(rawFreeDecisionDocumentSelector);
|
|
2482
|
+
|
|
2483
|
+
const rawFreeProjectSelector = {
|
|
2484
|
+
decision: true,
|
|
2485
|
+
id: true,
|
|
2486
|
+
question: true
|
|
2487
|
+
};
|
|
2488
|
+
const createdProjectFreeDecisionSelector = Selector("CreatedProjectFreeDecision")(rawFreeProjectSelector);
|
|
2489
|
+
|
|
2490
|
+
const name$y = "generateFreeDecision";
|
|
2491
|
+
const mutation$o = Selector("Mutation")({
|
|
2492
|
+
[name$y]: [{ data: $("data", "FreeDecisionGenerateDocumentInput!"), options: $("options", "GenerateDocumentOptionsInput!") }, freeDecisionDocumentSelector]
|
|
2493
|
+
});
|
|
2494
|
+
|
|
2495
|
+
const generateFreeDecision = {
|
|
2496
|
+
__proto__: null,
|
|
2497
|
+
mutation: mutation$o,
|
|
2498
|
+
name: name$y
|
|
2499
|
+
};
|
|
2500
|
+
|
|
2501
|
+
const name$x = "publishProjectOfFreeDecision";
|
|
2502
|
+
const mutation$n = Selector("Mutation")({
|
|
2503
|
+
[name$x]: [{ data: $("data", "PublishProjectFreeDecisionInput!") }, true]
|
|
2504
|
+
});
|
|
2505
|
+
|
|
2506
|
+
const publishProjectOfFreeDecision = {
|
|
2507
|
+
__proto__: null,
|
|
2508
|
+
mutation: mutation$n,
|
|
2509
|
+
name: name$x
|
|
2510
|
+
};
|
|
2511
|
+
|
|
2512
|
+
const name$w = "createProjectOfFreeDecision";
|
|
2513
|
+
const mutation$m = Selector("Mutation")({
|
|
2514
|
+
[name$w]: [{ data: $("data", "CreateProjectFreeDecisionInput!") }, createdProjectFreeDecisionSelector]
|
|
2515
|
+
});
|
|
2516
|
+
|
|
2517
|
+
const createProjectOfFreeDecision = {
|
|
2518
|
+
__proto__: null,
|
|
2519
|
+
mutation: mutation$m,
|
|
2520
|
+
name: name$w
|
|
2521
|
+
};
|
|
2522
|
+
|
|
2523
|
+
const index$h = {
|
|
2524
|
+
__proto__: null,
|
|
2525
|
+
CreateProjectOfFreeDecision: createProjectOfFreeDecision,
|
|
2526
|
+
GenerateFreeDecision: generateFreeDecision,
|
|
2527
|
+
GenerateProjectOfFreeDecision: generateProjectOfFreeDecisionDocument,
|
|
2528
|
+
PublishProjectOfFreeDecision: publishProjectOfFreeDecision
|
|
2529
|
+
};
|
|
2530
|
+
|
|
2531
|
+
const name$v = "updateAccount";
|
|
2532
|
+
const mutation$l = Selector("Mutation")({
|
|
2533
|
+
[name$v]: [{ data: $("data", "UpdateAccountInput!") }, accountSelector]
|
|
2534
|
+
});
|
|
2535
|
+
|
|
2536
|
+
const updateAccount = {
|
|
2537
|
+
__proto__: null,
|
|
2538
|
+
mutation: mutation$l,
|
|
2539
|
+
name: name$v
|
|
2540
|
+
};
|
|
2541
|
+
|
|
2542
|
+
const rawTokenSelector = {
|
|
2543
|
+
expires: true,
|
|
2544
|
+
token: true
|
|
2545
|
+
};
|
|
2546
|
+
const rawTokensSelector = {
|
|
2547
|
+
access: rawTokenSelector,
|
|
2548
|
+
refresh: rawTokenSelector
|
|
2549
|
+
};
|
|
2550
|
+
const rawRegisteredAccountSelector = {
|
|
2551
|
+
account: rawAccountSelector,
|
|
2552
|
+
tokens: rawTokensSelector
|
|
2553
|
+
};
|
|
2554
|
+
const registeredAccountSelector = Selector("RegisteredAccount")(
|
|
2555
|
+
rawRegisteredAccountSelector
|
|
2556
|
+
);
|
|
2557
|
+
|
|
2558
|
+
const name$u = "registerAccount";
|
|
2559
|
+
const mutation$k = Selector("Mutation")({
|
|
2560
|
+
[name$u]: [{ data: $("data", "RegisterAccountInput!") }, registeredAccountSelector]
|
|
2561
|
+
});
|
|
2562
|
+
|
|
2563
|
+
const registerAccount = {
|
|
2564
|
+
__proto__: null,
|
|
2565
|
+
mutation: mutation$k,
|
|
2566
|
+
name: name$u
|
|
2567
|
+
};
|
|
2568
|
+
|
|
2569
|
+
const name$t = "startResetKey";
|
|
2570
|
+
const mutation$j = Selector("Mutation")({
|
|
2571
|
+
[name$t]: [{ data: $("data", "StartResetKeyInput!") }, true]
|
|
2572
|
+
});
|
|
2573
|
+
|
|
2574
|
+
const startResetKey = {
|
|
2575
|
+
__proto__: null,
|
|
2576
|
+
mutation: mutation$j,
|
|
2577
|
+
name: name$t
|
|
2578
|
+
};
|
|
2579
|
+
|
|
2580
|
+
const name$s = "resetKey";
|
|
2581
|
+
const mutation$i = Selector("Mutation")({
|
|
2582
|
+
[name$s]: [{ data: $("data", "ResetKeyInput!") }, true]
|
|
2583
|
+
});
|
|
2584
|
+
|
|
2585
|
+
const resetKey = {
|
|
2586
|
+
__proto__: null,
|
|
2587
|
+
mutation: mutation$i,
|
|
2588
|
+
name: name$s
|
|
2589
|
+
};
|
|
2590
|
+
|
|
2591
|
+
const index$g = {
|
|
2592
|
+
__proto__: null,
|
|
2593
|
+
RegisterAccount: registerAccount,
|
|
2594
|
+
ResetKey: resetKey,
|
|
2595
|
+
StartResetKey: startResetKey,
|
|
2596
|
+
UpdateAccount: updateAccount
|
|
2597
|
+
};
|
|
2598
|
+
|
|
2599
|
+
const name$r = "refresh";
|
|
2600
|
+
const mutation$h = Selector("Mutation")({
|
|
2601
|
+
[name$r]: [{ data: $("data", "RefreshInput!") }, registeredAccountSelector]
|
|
2602
|
+
});
|
|
2603
|
+
|
|
2604
|
+
const refresh = {
|
|
2605
|
+
__proto__: null,
|
|
2606
|
+
mutation: mutation$h,
|
|
2607
|
+
name: name$r
|
|
2608
|
+
};
|
|
2609
|
+
|
|
2610
|
+
const name$q = "logout";
|
|
2611
|
+
const mutation$g = Selector("Mutation")({
|
|
2612
|
+
[name$q]: [{ data: $("data", "LogoutInput!") }, true]
|
|
2613
|
+
});
|
|
2614
|
+
|
|
2615
|
+
const logout = {
|
|
2616
|
+
__proto__: null,
|
|
2617
|
+
mutation: mutation$g,
|
|
2618
|
+
name: name$q
|
|
2619
|
+
};
|
|
2620
|
+
|
|
2621
|
+
const name$p = "login";
|
|
2622
|
+
const mutation$f = Selector("Mutation")({
|
|
2623
|
+
[name$p]: [{ data: $("data", "LoginInput!") }, registeredAccountSelector]
|
|
2624
|
+
});
|
|
2625
|
+
|
|
2626
|
+
const login = {
|
|
2627
|
+
__proto__: null,
|
|
2628
|
+
mutation: mutation$f,
|
|
2629
|
+
name: name$p
|
|
2630
|
+
};
|
|
2631
|
+
|
|
2632
|
+
const index$f = {
|
|
2633
|
+
__proto__: null,
|
|
2634
|
+
Login: login,
|
|
2635
|
+
Logout: logout,
|
|
2636
|
+
Refresh: refresh
|
|
2637
|
+
};
|
|
2638
|
+
|
|
2639
|
+
const name$o = "initSystem";
|
|
2640
|
+
const mutation$e = Selector("Mutation")({
|
|
2641
|
+
[name$o]: [{ data: $("data", "Init!") }, systemInfoSelector]
|
|
2642
|
+
});
|
|
2643
|
+
|
|
2644
|
+
const initSystem = {
|
|
2645
|
+
__proto__: null,
|
|
2646
|
+
mutation: mutation$e,
|
|
2647
|
+
name: name$o
|
|
2648
|
+
};
|
|
2649
|
+
|
|
2650
|
+
const name$n = "installSystem";
|
|
2651
|
+
const mutation$d = Selector("Mutation")({
|
|
2652
|
+
[name$n]: [{ data: $("data", "Install!") }, systemInfoSelector]
|
|
2653
|
+
});
|
|
2654
|
+
|
|
2655
|
+
const installSystem = {
|
|
2656
|
+
__proto__: null,
|
|
2657
|
+
mutation: mutation$d,
|
|
2658
|
+
name: name$n
|
|
2659
|
+
};
|
|
2660
|
+
|
|
2661
|
+
const name$m = "setWif";
|
|
2662
|
+
const mutation$c = Selector("Mutation")({
|
|
2663
|
+
[name$m]: [{ data: $("data", "Update!") }, true]
|
|
2664
|
+
});
|
|
2665
|
+
|
|
2666
|
+
const setWif = {
|
|
2667
|
+
__proto__: null,
|
|
2668
|
+
mutation: mutation$c,
|
|
2669
|
+
name: name$m
|
|
2670
|
+
};
|
|
2671
|
+
|
|
2672
|
+
const name$l = "updateSystem";
|
|
2673
|
+
const mutation$b = Selector("Mutation")({
|
|
2674
|
+
[name$l]: [{ data: $("data", "Update!") }, systemInfoSelector]
|
|
2675
|
+
});
|
|
2676
|
+
|
|
2677
|
+
const updateSystem = {
|
|
2678
|
+
__proto__: null,
|
|
2679
|
+
mutation: mutation$b,
|
|
2680
|
+
name: name$l
|
|
2681
|
+
};
|
|
2682
|
+
|
|
2683
|
+
const index$e = {
|
|
2684
|
+
__proto__: null,
|
|
2685
|
+
InitSystem: initSystem,
|
|
2686
|
+
InstallSystem: installSystem,
|
|
2687
|
+
SetWif: setWif,
|
|
2688
|
+
UpdateSystem: updateSystem
|
|
2689
|
+
};
|
|
2690
|
+
|
|
2691
|
+
const name$k = "generateParticipantApplication";
|
|
2692
|
+
const mutation$a = Selector("Mutation")({
|
|
2693
|
+
[name$k]: [{ data: $("data", "ParticipantApplicationGenerateDocumentInput!"), options: $("options", "GenerateDocumentOptionsInput!") }, participantApplicationDocumentSelector]
|
|
2694
|
+
});
|
|
2695
|
+
|
|
2696
|
+
const generateParticipantApplication = {
|
|
2697
|
+
__proto__: null,
|
|
2698
|
+
mutation: mutation$a,
|
|
2699
|
+
name: name$k
|
|
2700
|
+
};
|
|
2701
|
+
|
|
2702
|
+
const name$j = "generateParticipantApplicationDecision";
|
|
2703
|
+
const mutation$9 = Selector("Mutation")({
|
|
2704
|
+
[name$j]: [{ data: $("data", "ParticipantApplicationDecisionGenerateDocumentInput!"), options: $("options", "GenerateDocumentOptionsInput!") }, participantApplicationDecisionDocumentSelector]
|
|
2705
|
+
});
|
|
2706
|
+
|
|
2707
|
+
const generateParticipantApplicationDecision = {
|
|
2708
|
+
__proto__: null,
|
|
2709
|
+
mutation: mutation$9,
|
|
2710
|
+
name: name$j
|
|
2711
|
+
};
|
|
2712
|
+
|
|
2713
|
+
const name$i = "registerParticipant";
|
|
2714
|
+
const mutation$8 = Selector("Mutation")({
|
|
2715
|
+
[name$i]: [{ data: $("data", "RegisterParticipantInput!") }, accountSelector]
|
|
2716
|
+
});
|
|
2717
|
+
|
|
2718
|
+
const registerParticipant = {
|
|
2719
|
+
__proto__: null,
|
|
2720
|
+
mutation: mutation$8,
|
|
2721
|
+
name: name$i
|
|
2722
|
+
};
|
|
2723
|
+
|
|
2724
|
+
const name$h = "addParticipant";
|
|
2725
|
+
const mutation$7 = Selector("Mutation")({
|
|
2726
|
+
[name$h]: [{ data: $("data", "AddParticipantInput!") }, accountSelector]
|
|
2727
|
+
});
|
|
2728
|
+
|
|
2729
|
+
const addParticipant = {
|
|
2730
|
+
__proto__: null,
|
|
2731
|
+
mutation: mutation$7,
|
|
2732
|
+
name: name$h
|
|
2733
|
+
};
|
|
2734
|
+
|
|
2735
|
+
const index$d = {
|
|
2736
|
+
__proto__: null,
|
|
2737
|
+
AddParticipant: addParticipant,
|
|
2738
|
+
GenerateParticipantApplication: generateParticipantApplication,
|
|
2739
|
+
GenerateParticipantApplicationDecision: generateParticipantApplicationDecision,
|
|
2740
|
+
RegisterParticipant: registerParticipant
|
|
2741
|
+
};
|
|
2742
|
+
|
|
2743
|
+
const rawPaymentDetailsSelector = {
|
|
2744
|
+
amount_plus_fee: true,
|
|
2745
|
+
amount_without_fee: true,
|
|
2746
|
+
data: true,
|
|
2747
|
+
fact_fee_percent: true,
|
|
2748
|
+
fee_amount: true,
|
|
2749
|
+
fee_percent: true,
|
|
2750
|
+
tolerance_percent: true
|
|
2751
|
+
};
|
|
2752
|
+
const rawPaymentSelector = {
|
|
2753
|
+
amount: true,
|
|
2754
|
+
blockchain_id: true,
|
|
2755
|
+
created_at: true,
|
|
2756
|
+
details: rawPaymentDetailsSelector,
|
|
2757
|
+
expired_at: true,
|
|
2758
|
+
id: true,
|
|
2759
|
+
message: true,
|
|
2760
|
+
provider: true,
|
|
2761
|
+
status: true,
|
|
2762
|
+
symbol: true,
|
|
2763
|
+
updated_at: true,
|
|
2764
|
+
username: true
|
|
2765
|
+
};
|
|
2766
|
+
const paymentSelector = Selector("Payment")(rawPaymentSelector);
|
|
2767
|
+
|
|
2768
|
+
const name$g = "createInitialPayment";
|
|
2769
|
+
const mutation$6 = Selector("Mutation")({
|
|
2770
|
+
[name$g]: [{ data: $("data", "CreateInitialPaymentInput!") }, paymentSelector]
|
|
2771
|
+
});
|
|
2772
|
+
|
|
2773
|
+
const createInitial = {
|
|
2774
|
+
__proto__: null,
|
|
2775
|
+
mutation: mutation$6,
|
|
2776
|
+
name: name$g
|
|
2777
|
+
};
|
|
2778
|
+
|
|
2779
|
+
const name$f = "createDepositPayment";
|
|
2780
|
+
const mutation$5 = Selector("Mutation")({
|
|
2781
|
+
[name$f]: [{ data: $("data", "CreateDepositPaymentInput!") }, paymentSelector]
|
|
2782
|
+
});
|
|
2783
|
+
|
|
2784
|
+
const createDeposit = {
|
|
2785
|
+
__proto__: null,
|
|
2786
|
+
mutation: mutation$5,
|
|
2787
|
+
name: name$f
|
|
2788
|
+
};
|
|
2789
|
+
|
|
2790
|
+
const name$e = "setPaymentStatus";
|
|
2791
|
+
const mutation$4 = Selector("Mutation")({
|
|
2792
|
+
[name$e]: [{ data: $("data", "SetPaymentStatusInput!") }, paymentSelector]
|
|
2793
|
+
});
|
|
2794
|
+
|
|
2795
|
+
const setPaymentStatus = {
|
|
2796
|
+
__proto__: null,
|
|
2797
|
+
mutation: mutation$4,
|
|
2798
|
+
name: name$e
|
|
2799
|
+
};
|
|
2800
|
+
|
|
2801
|
+
const index$c = {
|
|
2802
|
+
__proto__: null,
|
|
2803
|
+
CreateDepositPayment: createDeposit,
|
|
2804
|
+
CreateInitialPayment: createInitial,
|
|
2805
|
+
SetPaymentStatus: setPaymentStatus
|
|
2806
|
+
};
|
|
2807
|
+
|
|
2808
|
+
const name$d = "generatePrivacyAgreement";
|
|
2809
|
+
const mutation$3 = Selector("Mutation")({
|
|
2810
|
+
[name$d]: [{ data: $("data", "GenerateDocumentInput!"), options: $("options", "GenerateDocumentOptionsInput!") }, documentSelector]
|
|
2811
|
+
});
|
|
2812
|
+
|
|
2813
|
+
const generatePrivacyAgreement = {
|
|
2814
|
+
__proto__: null,
|
|
2815
|
+
mutation: mutation$3,
|
|
2816
|
+
name: name$d
|
|
2817
|
+
};
|
|
2818
|
+
|
|
2819
|
+
const name$c = "generateSignatureAgreement";
|
|
2820
|
+
const mutation$2 = Selector("Mutation")({
|
|
2821
|
+
[name$c]: [{ data: $("data", "GenerateDocumentInput!"), options: $("options", "GenerateDocumentOptionsInput!") }, documentSelector]
|
|
2822
|
+
});
|
|
2823
|
+
|
|
2824
|
+
const generateSignatureAgreement = {
|
|
2825
|
+
__proto__: null,
|
|
2826
|
+
mutation: mutation$2,
|
|
2827
|
+
name: name$c
|
|
2828
|
+
};
|
|
2829
|
+
|
|
2830
|
+
const name$b = "generateWalletAgreement";
|
|
2831
|
+
const mutation$1 = Selector("Mutation")({
|
|
2832
|
+
[name$b]: [{ data: $("data", "GenerateDocumentInput!"), options: $("options", "GenerateDocumentOptionsInput!") }, documentSelector]
|
|
2833
|
+
});
|
|
2834
|
+
|
|
2835
|
+
const generateWalletAgreement = {
|
|
2836
|
+
__proto__: null,
|
|
2837
|
+
mutation: mutation$1,
|
|
2838
|
+
name: name$b
|
|
2839
|
+
};
|
|
2840
|
+
|
|
2841
|
+
const name$a = "generateUserAgreement";
|
|
2842
|
+
const mutation = Selector("Mutation")({
|
|
2843
|
+
[name$a]: [{ data: $("data", "GenerateDocumentInput!"), options: $("options", "GenerateDocumentOptionsInput!") }, documentSelector]
|
|
2844
|
+
});
|
|
2845
|
+
|
|
2846
|
+
const generateUserAgreement = {
|
|
2847
|
+
__proto__: null,
|
|
2848
|
+
mutation: mutation,
|
|
2849
|
+
name: name$a
|
|
2850
|
+
};
|
|
2851
|
+
|
|
2852
|
+
const index$b = {
|
|
2853
|
+
__proto__: null,
|
|
2854
|
+
GeneratePrivacyAgreement: generatePrivacyAgreement,
|
|
2855
|
+
GenerateSignatureAgreement: generateSignatureAgreement,
|
|
2856
|
+
GenerateUserAgreement: generateUserAgreement,
|
|
2857
|
+
GenerateWalletAgreement: generateWalletAgreement
|
|
2858
|
+
};
|
|
2859
|
+
|
|
2860
|
+
const index$a = {
|
|
2861
|
+
__proto__: null,
|
|
2862
|
+
Accounts: index$g,
|
|
2863
|
+
Agreements: index$b,
|
|
2864
|
+
Auth: index$f,
|
|
2865
|
+
Branches: index$i,
|
|
2866
|
+
Extensions: index$k,
|
|
2867
|
+
FreeDecisions: index$h,
|
|
2868
|
+
Participants: index$d,
|
|
2869
|
+
PaymentMethods: index$j,
|
|
2870
|
+
Payments: index$c,
|
|
2871
|
+
System: index$e
|
|
2872
|
+
};
|
|
2873
|
+
|
|
2874
|
+
const name$9 = "getExtensions";
|
|
2875
|
+
const query$9 = Selector("Query")({
|
|
2876
|
+
[name$9]: [{ data: $("data", "GetExtensionsInput") }, extensionSelector]
|
|
2877
|
+
});
|
|
2878
|
+
|
|
2879
|
+
const getExtensions = {
|
|
2880
|
+
__proto__: null,
|
|
2881
|
+
name: name$9,
|
|
2882
|
+
query: query$9
|
|
2883
|
+
};
|
|
2884
|
+
|
|
2885
|
+
const index$9 = {
|
|
2886
|
+
__proto__: null,
|
|
2887
|
+
GetExtensions: getExtensions
|
|
2888
|
+
};
|
|
2889
|
+
|
|
2890
|
+
const paginationSelector = {
|
|
2891
|
+
items: {},
|
|
2892
|
+
totalCount: true,
|
|
2893
|
+
totalPages: true,
|
|
2894
|
+
currentPage: true
|
|
2895
|
+
};
|
|
2896
|
+
|
|
2897
|
+
const rawPaymentMethodPaginationSelector = { ...paginationSelector, items: rawPaymentMethodSelector };
|
|
2898
|
+
Selector("PaymentMethodPaginationResult")(rawPaymentMethodPaginationSelector);
|
|
2899
|
+
|
|
2900
|
+
const name$8 = "getPaymentMethods";
|
|
2901
|
+
const query$8 = Selector("Query")({
|
|
2902
|
+
[name$8]: [{ data: $("data", "GetPaymentMethodsInput") }, rawPaymentMethodPaginationSelector]
|
|
2903
|
+
});
|
|
2904
|
+
|
|
2905
|
+
const getPaymentMethods = {
|
|
2906
|
+
__proto__: null,
|
|
2907
|
+
query: query$8
|
|
2908
|
+
};
|
|
2909
|
+
|
|
2910
|
+
const index$8 = {
|
|
2911
|
+
__proto__: null,
|
|
2912
|
+
GetPaymentMethods: getPaymentMethods
|
|
2913
|
+
};
|
|
2914
|
+
|
|
2915
|
+
const name$7 = "getSystemInfo";
|
|
2916
|
+
const query$7 = Selector("Query")({
|
|
2917
|
+
[name$7]: systemInfoSelector
|
|
2918
|
+
});
|
|
2919
|
+
|
|
2920
|
+
const getSystemInfo = {
|
|
2921
|
+
__proto__: null,
|
|
2922
|
+
name: name$7,
|
|
2923
|
+
query: query$7
|
|
2924
|
+
};
|
|
2925
|
+
|
|
2926
|
+
const index$7 = {
|
|
2927
|
+
__proto__: null,
|
|
2928
|
+
GetSystemInfo: getSystemInfo
|
|
2929
|
+
};
|
|
2930
|
+
|
|
2931
|
+
const name$6 = "getAccount";
|
|
2932
|
+
const query$6 = Selector("Query")({
|
|
2933
|
+
[name$6]: [{ data: $("data", "GetAccountInput!") }, accountSelector]
|
|
2934
|
+
});
|
|
2935
|
+
|
|
2936
|
+
const getAccount = {
|
|
2937
|
+
__proto__: null,
|
|
2938
|
+
name: name$6,
|
|
2939
|
+
query: query$6
|
|
2940
|
+
};
|
|
2941
|
+
|
|
2942
|
+
const rawAccountsPaginationSelector = { ...paginationSelector, items: rawAccountSelector };
|
|
2943
|
+
const accountsPaginationSelector = Selector("AccountsPaginationResult")(rawAccountsPaginationSelector);
|
|
2944
|
+
|
|
2945
|
+
const name$5 = "getAccounts";
|
|
2946
|
+
const query$5 = Selector("Query")({
|
|
2947
|
+
[name$5]: [{ data: $("data", "GetAccountsInput!"), options: $("options", "PaginationInput!") }, accountsPaginationSelector]
|
|
2948
|
+
});
|
|
2949
|
+
|
|
2950
|
+
const getAccounts = {
|
|
2951
|
+
__proto__: null,
|
|
2952
|
+
name: name$5,
|
|
2953
|
+
query: query$5
|
|
2954
|
+
};
|
|
2955
|
+
|
|
2956
|
+
const index$6 = {
|
|
2957
|
+
__proto__: null,
|
|
2958
|
+
GetAccount: getAccount,
|
|
2959
|
+
GetAccounts: getAccounts
|
|
2960
|
+
};
|
|
2961
|
+
|
|
2962
|
+
const name$4 = "getBranches";
|
|
2963
|
+
const query$4 = Selector("Query")({
|
|
2964
|
+
[name$4]: [{ data: $("data", "GetBranchesInput!") }, branchSelector]
|
|
2965
|
+
});
|
|
2966
|
+
|
|
2967
|
+
const getBranches = {
|
|
2968
|
+
__proto__: null,
|
|
2969
|
+
name: name$4,
|
|
2970
|
+
query: query$4
|
|
2971
|
+
};
|
|
2972
|
+
|
|
2973
|
+
const name$3 = "getBranches";
|
|
2974
|
+
const query$3 = Selector("Query")({
|
|
2975
|
+
[name$3]: [{ data: $("data", "GetBranchesInput!") }, branchSelectorForUsers]
|
|
2976
|
+
});
|
|
2977
|
+
|
|
2978
|
+
const getPublicBranches = {
|
|
2979
|
+
__proto__: null,
|
|
2980
|
+
name: name$3,
|
|
2981
|
+
query: query$3
|
|
2982
|
+
};
|
|
2983
|
+
|
|
2984
|
+
const index$5 = {
|
|
2985
|
+
__proto__: null,
|
|
2986
|
+
GetBranches: getBranches,
|
|
2987
|
+
GetPublicBranches: getPublicBranches
|
|
2988
|
+
};
|
|
2989
|
+
|
|
2990
|
+
const paymentPaginationSelector = { ...paginationSelector, items: rawPaymentSelector };
|
|
2991
|
+
const name$2 = "getPayments";
|
|
2992
|
+
const query$2 = Selector("Query")({
|
|
2993
|
+
[name$2]: [{ data: $("data", "GetPaymentsInput") }, paymentPaginationSelector]
|
|
2994
|
+
});
|
|
2995
|
+
|
|
2996
|
+
const getPayments = {
|
|
2997
|
+
__proto__: null,
|
|
2998
|
+
query: query$2
|
|
2999
|
+
};
|
|
3000
|
+
|
|
3001
|
+
const index$4 = {
|
|
3002
|
+
__proto__: null,
|
|
3003
|
+
GetPayments: getPayments
|
|
3004
|
+
};
|
|
3005
|
+
|
|
3006
|
+
const rawParticipantApplicationDocumentSelector = {
|
|
3007
|
+
...rawDocumentSelector,
|
|
3008
|
+
meta: {
|
|
3009
|
+
...rawDocumentMetaSelector
|
|
3010
|
+
// Общая часть meta
|
|
3011
|
+
// ничего уникального
|
|
3012
|
+
}
|
|
3013
|
+
};
|
|
3014
|
+
Selector("ParticipantApplicationDocument")(rawParticipantApplicationDocumentSelector);
|
|
3015
|
+
|
|
3016
|
+
const rawDecisionDocumentSelector = {
|
|
3017
|
+
["...on FreeDecisionDocument"]: rawFreeDecisionDocumentSelector,
|
|
3018
|
+
["...on ParticipantApplicationDecisionDocument"]: rawParticipantApplicationDecisionDocumentSelector
|
|
3019
|
+
};
|
|
3020
|
+
const rawStatementDocumentSelector = {
|
|
3021
|
+
["...on ParticipantApplicationDocument"]: rawParticipantApplicationDocumentSelector,
|
|
3022
|
+
["...on ProjectFreeDecisionDocument"]: projectFreeDecisionDocumentSelector
|
|
3023
|
+
};
|
|
3024
|
+
const rawExtendedBlockchainActionSelector = {
|
|
3025
|
+
...rawBlockchainActionSelector,
|
|
3026
|
+
user: {
|
|
3027
|
+
["...on Entrepreneur"]: rawEntrepreneurSelector,
|
|
3028
|
+
["...on Individual"]: rawIndividualSelector,
|
|
3029
|
+
["...on Organization"]: rawOrganizationSelector
|
|
3030
|
+
}
|
|
3031
|
+
};
|
|
3032
|
+
const rawActDetailSelector = {
|
|
3033
|
+
action: rawExtendedBlockchainActionSelector,
|
|
3034
|
+
document: rawDocumentSelector
|
|
3035
|
+
};
|
|
3036
|
+
const rawDecisionDetailSelector = {
|
|
3037
|
+
action: rawExtendedBlockchainActionSelector,
|
|
3038
|
+
document: rawDecisionDocumentSelector,
|
|
3039
|
+
votes_against: rawExtendedBlockchainActionSelector,
|
|
3040
|
+
votes_for: rawExtendedBlockchainActionSelector
|
|
3041
|
+
};
|
|
3042
|
+
const rawStatementDetailSelector = {
|
|
3043
|
+
action: rawExtendedBlockchainActionSelector,
|
|
3044
|
+
document: rawStatementDocumentSelector
|
|
3045
|
+
};
|
|
3046
|
+
const rawDocumentPackageSelector = {
|
|
3047
|
+
acts: rawActDetailSelector,
|
|
3048
|
+
decision: rawDecisionDetailSelector,
|
|
3049
|
+
links: rawDocumentSelector,
|
|
3050
|
+
statement: rawStatementDetailSelector
|
|
3051
|
+
};
|
|
3052
|
+
Selector("DocumentPackage")(rawDocumentPackageSelector);
|
|
3053
|
+
|
|
3054
|
+
const documentPaginationSelector = { ...paginationSelector, items: rawDocumentPackageSelector };
|
|
3055
|
+
const name$1 = "getDocuments";
|
|
3056
|
+
const query$1 = Selector("Query")({
|
|
3057
|
+
[name$1]: [{ data: $("data", "GetDocumentsInput") }, documentPaginationSelector]
|
|
3058
|
+
});
|
|
3059
|
+
|
|
3060
|
+
const getDocuments = {
|
|
3061
|
+
__proto__: null,
|
|
3062
|
+
query: query$1
|
|
3063
|
+
};
|
|
3064
|
+
|
|
3065
|
+
const index$3 = {
|
|
3066
|
+
__proto__: null,
|
|
3067
|
+
GetDocuments: getDocuments
|
|
3068
|
+
};
|
|
3069
|
+
|
|
3070
|
+
const rawSignedBlockchainDocumentSelector = {
|
|
3071
|
+
hash: true,
|
|
3072
|
+
meta: true,
|
|
3073
|
+
public_key: true,
|
|
3074
|
+
signature: true
|
|
3075
|
+
};
|
|
3076
|
+
Selector("SignedBlockchainDocument")(rawSignedBlockchainDocumentSelector);
|
|
3077
|
+
|
|
3078
|
+
const rawBlockchainDecisionSelector = {
|
|
3079
|
+
approved: true,
|
|
3080
|
+
authorization: rawSignedBlockchainDocumentSelector,
|
|
3081
|
+
authorized: true,
|
|
3082
|
+
authorized_by: true,
|
|
3083
|
+
batch_id: true,
|
|
3084
|
+
coopname: true,
|
|
3085
|
+
created_at: true,
|
|
3086
|
+
expired_at: true,
|
|
3087
|
+
id: true,
|
|
3088
|
+
meta: true,
|
|
3089
|
+
statement: rawSignedBlockchainDocumentSelector,
|
|
3090
|
+
type: true,
|
|
3091
|
+
username: true,
|
|
3092
|
+
validated: true,
|
|
3093
|
+
votes_against: true,
|
|
3094
|
+
votes_for: true
|
|
3095
|
+
};
|
|
3096
|
+
Selector("SignedBlockchainDocument")(rawSignedBlockchainDocumentSelector);
|
|
3097
|
+
|
|
3098
|
+
const rawAgendaSelector = {
|
|
3099
|
+
action: rawBlockchainActionSelector,
|
|
3100
|
+
documents: rawDocumentPackageSelector,
|
|
3101
|
+
table: rawBlockchainDecisionSelector
|
|
3102
|
+
};
|
|
3103
|
+
const agendaSelector = Selector("AgendaWithDocuments")(rawAgendaSelector);
|
|
3104
|
+
|
|
3105
|
+
const name = "getAgenda";
|
|
3106
|
+
const query = Selector("Query")({
|
|
3107
|
+
[name]: agendaSelector
|
|
3108
|
+
});
|
|
3109
|
+
|
|
3110
|
+
const getAgenda = {
|
|
3111
|
+
__proto__: null,
|
|
3112
|
+
name: name,
|
|
3113
|
+
query: query
|
|
3114
|
+
};
|
|
3115
|
+
|
|
3116
|
+
const index$2 = {
|
|
3117
|
+
__proto__: null,
|
|
3118
|
+
GetAgenda: getAgenda
|
|
3119
|
+
};
|
|
3120
|
+
|
|
3121
|
+
const index$1 = {
|
|
3122
|
+
__proto__: null,
|
|
3123
|
+
Accounts: index$6,
|
|
3124
|
+
Agenda: index$2,
|
|
3125
|
+
Branches: index$5,
|
|
3126
|
+
Documents: index$3,
|
|
3127
|
+
Extensions: index$9,
|
|
3128
|
+
PaymentMethods: index$8,
|
|
3129
|
+
Payments: index$4,
|
|
3130
|
+
System: index$7
|
|
3131
|
+
};
|
|
3132
|
+
|
|
3133
|
+
const index = {
|
|
3134
|
+
__proto__: null
|
|
3135
|
+
};
|
|
3136
|
+
|
|
3137
|
+
if (typeof globalThis.WebSocket === "undefined") {
|
|
3138
|
+
globalThis.WebSocket = WebSocket;
|
|
3139
|
+
}
|
|
3140
|
+
let currentHeaders = {};
|
|
3141
|
+
function createThunder(baseUrl) {
|
|
3142
|
+
return Thunder(async (query, variables) => {
|
|
3143
|
+
const response = await fetch(baseUrl, {
|
|
3144
|
+
body: JSON.stringify({ query, variables }),
|
|
3145
|
+
method: "POST",
|
|
3146
|
+
headers: {
|
|
3147
|
+
"Content-Type": "application/json",
|
|
3148
|
+
...currentHeaders
|
|
3149
|
+
// Используем текущие заголовки, включая Authorization
|
|
3150
|
+
}
|
|
3151
|
+
});
|
|
3152
|
+
if (!response.ok) {
|
|
3153
|
+
return new Promise((resolve, reject) => {
|
|
3154
|
+
response.text().then((text) => {
|
|
3155
|
+
try {
|
|
3156
|
+
reject(JSON.parse(text));
|
|
3157
|
+
} catch (err) {
|
|
3158
|
+
reject(text);
|
|
3159
|
+
}
|
|
3160
|
+
}).catch(reject);
|
|
3161
|
+
});
|
|
3162
|
+
}
|
|
3163
|
+
const json = await response.json();
|
|
3164
|
+
if (json.errors) {
|
|
3165
|
+
console.log("json.errors", json.errors);
|
|
3166
|
+
throw json.errors;
|
|
3167
|
+
}
|
|
3168
|
+
return json.data;
|
|
3169
|
+
});
|
|
3170
|
+
}
|
|
3171
|
+
function createClient(options) {
|
|
3172
|
+
currentHeaders = options.headers || {};
|
|
3173
|
+
const thunder = createThunder(options.api_url);
|
|
3174
|
+
const wallet = new Wallet(options);
|
|
3175
|
+
if (options.wif && options.username)
|
|
3176
|
+
wallet.setWif(options.username, options.wif);
|
|
3177
|
+
else if (options.wif && !options.username || !options.wif && options.username) {
|
|
3178
|
+
throw new Error("wif \u0438 username \u0434\u043E\u043B\u0436\u043D\u044B \u0431\u044B\u0442\u044C \u0443\u043A\u0430\u0437\u0430\u043D\u044B \u043E\u0434\u043D\u043E\u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E");
|
|
3179
|
+
}
|
|
3180
|
+
return {
|
|
3181
|
+
setToken: (token) => {
|
|
3182
|
+
currentHeaders.Authorization = `Bearer ${token}`;
|
|
3183
|
+
},
|
|
3184
|
+
Query: thunder("query"),
|
|
3185
|
+
Mutation: thunder("mutation"),
|
|
3186
|
+
Subscription: Subscription(options.api_url.replace(/^http/, "ws")),
|
|
3187
|
+
Wallet: wallet
|
|
3188
|
+
};
|
|
3189
|
+
}
|
|
3190
|
+
|
|
3191
|
+
export { Classes, index$a as Mutations, index$1 as Queries, index as Types, index$l as Zeus, createClient };
|