@wishknish/knishio-client-js 0.8.2 → 0.9.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/dist/client.cjs.js +29 -102
- package/dist/client.cjs.js.map +1 -1
- package/dist/client.es.mjs +786 -758
- package/dist/client.es.mjs.map +1 -1
- package/dist/client.iife.js +29 -102
- package/dist/client.iife.js.map +1 -1
- package/package.json +1 -1
- package/src/KnishIOClient.js +112 -46
- package/src/Molecule.js +36 -30
- package/src/Wallet.js +86 -3
- package/src/index.js +0 -4
- package/src/libraries/urql/UrqlClientWrapper.js +88 -0
- package/src/mutation/MutationTransferTokens.js +18 -0
- package/src/query/QueryUserActivity.js +0 -151
- package/src/response/ResponseQueryUserActivity.js +0 -79
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
(
|
|
3
|
-
(/(
|
|
4
|
-
(//(
|
|
5
|
-
(///(
|
|
6
|
-
(/////(
|
|
7
|
-
(//////( )
|
|
8
|
-
(////////( (/)
|
|
9
|
-
(////////( (///)
|
|
10
|
-
(//////////( (////)
|
|
11
|
-
(//////////( (//////)
|
|
12
|
-
(////////////( (///////)
|
|
13
|
-
(/////////////( (/////////)
|
|
14
|
-
(//////////////( (///////////)
|
|
15
|
-
(///////////////( (/////////////)
|
|
16
|
-
(////////////////( (//////////////)
|
|
17
|
-
((((((((((((((((((( (((((((((((((((
|
|
18
|
-
((((((((((((((((((( ((((((((((((((
|
|
19
|
-
((((((((((((((((((( ((((((((((((((
|
|
20
|
-
(((((((((((((((((((( (((((((((((((
|
|
21
|
-
(((((((((((((((((((( ((((((((((((
|
|
22
|
-
((((((((((((((((((( ((((((((((((
|
|
23
|
-
((((((((((((((((((( ((((((((((
|
|
24
|
-
((((((((((((((((((/ (((((((((
|
|
25
|
-
(((((((((((((((((( ((((((((
|
|
26
|
-
((((((((((((((((( (((((((
|
|
27
|
-
(((((((((((((((((( (((((
|
|
28
|
-
################# ##
|
|
29
|
-
################ #
|
|
30
|
-
################# ##
|
|
31
|
-
%################ ###
|
|
32
|
-
###############( ####
|
|
33
|
-
############### ####
|
|
34
|
-
############### ######
|
|
35
|
-
%#############( (#######
|
|
36
|
-
%############# #########
|
|
37
|
-
############( ##########
|
|
38
|
-
########### #############
|
|
39
|
-
######### ##############
|
|
40
|
-
%######
|
|
41
|
-
|
|
42
|
-
Powered by Knish.IO: Connecting a Decentralized World
|
|
43
|
-
|
|
44
|
-
Please visit https://github.com/WishKnish/KnishIO-Client-JS for information.
|
|
45
|
-
|
|
46
|
-
License: https://github.com/WishKnish/KnishIO-Client-JS/blob/master/LICENSE
|
|
47
|
-
*/
|
|
48
|
-
import Query from './Query.js'
|
|
49
|
-
import ResponseQueryUserActivity from '../response/ResponseQueryUserActivity.js'
|
|
50
|
-
import { gql } from '@urql/core'
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Query for retrieving information about user activity
|
|
54
|
-
*/
|
|
55
|
-
export default class QueryUserActivity extends Query {
|
|
56
|
-
/**
|
|
57
|
-
* @param {UrqlClientWrapper} graphQLClient
|
|
58
|
-
* @param {KnishIOClient} knishIOClient
|
|
59
|
-
*/
|
|
60
|
-
constructor (graphQLClient, knishIOClient) {
|
|
61
|
-
super(graphQLClient, knishIOClient)
|
|
62
|
-
|
|
63
|
-
this.$__query = gql`query UserActivity (
|
|
64
|
-
$bundleHash:String,
|
|
65
|
-
$metaType: String,
|
|
66
|
-
$metaId: String,
|
|
67
|
-
$ipAddress: String,
|
|
68
|
-
$browser: String,
|
|
69
|
-
$osCpu: String,
|
|
70
|
-
$resolution: String,
|
|
71
|
-
$timeZone: String,
|
|
72
|
-
$countBy: [CountByUserActivity],
|
|
73
|
-
$interval: span
|
|
74
|
-
) {
|
|
75
|
-
UserActivity (
|
|
76
|
-
bundleHash: $bundleHash,
|
|
77
|
-
metaType: $metaType,
|
|
78
|
-
metaId: $metaId,
|
|
79
|
-
ipAddress: $ipAddress,
|
|
80
|
-
browser: $browser,
|
|
81
|
-
osCpu: $osCpu,
|
|
82
|
-
resolution: $resolution,
|
|
83
|
-
timeZone: $timeZone,
|
|
84
|
-
countBy: $countBy,
|
|
85
|
-
interval: $interval
|
|
86
|
-
) {
|
|
87
|
-
createdAt,
|
|
88
|
-
bundleHash,
|
|
89
|
-
metaType,
|
|
90
|
-
metaId,
|
|
91
|
-
instances {
|
|
92
|
-
bundleHash,
|
|
93
|
-
metaType,
|
|
94
|
-
metaId,
|
|
95
|
-
jsonData,
|
|
96
|
-
createdAt,
|
|
97
|
-
updatedAt
|
|
98
|
-
},
|
|
99
|
-
instanceCount {
|
|
100
|
-
...SubFields,
|
|
101
|
-
...Recursive
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
fragment SubFields on InstanceCountType {
|
|
107
|
-
id,
|
|
108
|
-
count
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
fragment Recursive on InstanceCountType {
|
|
112
|
-
instances {
|
|
113
|
-
...SubFields
|
|
114
|
-
instances {
|
|
115
|
-
...SubFields,
|
|
116
|
-
instances {
|
|
117
|
-
...SubFields
|
|
118
|
-
instances {
|
|
119
|
-
...SubFields
|
|
120
|
-
instances {
|
|
121
|
-
...SubFields
|
|
122
|
-
instances {
|
|
123
|
-
...SubFields
|
|
124
|
-
instances {
|
|
125
|
-
...SubFields
|
|
126
|
-
instances {
|
|
127
|
-
...SubFields
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}`
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Returns a Response object
|
|
141
|
-
*
|
|
142
|
-
* @param {object} json
|
|
143
|
-
* @return {ResponseQueryUserActivity}
|
|
144
|
-
*/
|
|
145
|
-
createResponse (json) {
|
|
146
|
-
return new ResponseQueryUserActivity({
|
|
147
|
-
query: this,
|
|
148
|
-
json
|
|
149
|
-
})
|
|
150
|
-
}
|
|
151
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
(
|
|
3
|
-
(/(
|
|
4
|
-
(//(
|
|
5
|
-
(///(
|
|
6
|
-
(/////(
|
|
7
|
-
(//////( )
|
|
8
|
-
(////////( (/)
|
|
9
|
-
(////////( (///)
|
|
10
|
-
(//////////( (////)
|
|
11
|
-
(//////////( (//////)
|
|
12
|
-
(////////////( (///////)
|
|
13
|
-
(/////////////( (/////////)
|
|
14
|
-
(//////////////( (///////////)
|
|
15
|
-
(///////////////( (/////////////)
|
|
16
|
-
(////////////////( (//////////////)
|
|
17
|
-
((((((((((((((((((( (((((((((((((((
|
|
18
|
-
((((((((((((((((((( ((((((((((((((
|
|
19
|
-
((((((((((((((((((( ((((((((((((((
|
|
20
|
-
(((((((((((((((((((( (((((((((((((
|
|
21
|
-
(((((((((((((((((((( ((((((((((((
|
|
22
|
-
((((((((((((((((((( ((((((((((((
|
|
23
|
-
((((((((((((((((((( ((((((((((
|
|
24
|
-
((((((((((((((((((/ (((((((((
|
|
25
|
-
(((((((((((((((((( ((((((((
|
|
26
|
-
((((((((((((((((( (((((((
|
|
27
|
-
(((((((((((((((((( (((((
|
|
28
|
-
################# ##
|
|
29
|
-
################ #
|
|
30
|
-
################# ##
|
|
31
|
-
%################ ###
|
|
32
|
-
###############( ####
|
|
33
|
-
############### ####
|
|
34
|
-
############### ######
|
|
35
|
-
%#############( (#######
|
|
36
|
-
%############# #########
|
|
37
|
-
############( ##########
|
|
38
|
-
########### #############
|
|
39
|
-
######### ##############
|
|
40
|
-
%######
|
|
41
|
-
|
|
42
|
-
Powered by Knish.IO: Connecting a Decentralized World
|
|
43
|
-
|
|
44
|
-
Please visit https://github.com/WishKnish/KnishIO-Client-JS for information.
|
|
45
|
-
|
|
46
|
-
License: https://github.com/WishKnish/KnishIO-Client-JS/blob/master/LICENSE
|
|
47
|
-
*/
|
|
48
|
-
import Response from './Response.js'
|
|
49
|
-
|
|
50
|
-
export default class ResponseQueryUserActivity extends Response {
|
|
51
|
-
/**
|
|
52
|
-
* Class constructor
|
|
53
|
-
*
|
|
54
|
-
* @param {Query} query
|
|
55
|
-
* @param {object} json
|
|
56
|
-
*/
|
|
57
|
-
constructor ({
|
|
58
|
-
query,
|
|
59
|
-
json
|
|
60
|
-
}) {
|
|
61
|
-
super({
|
|
62
|
-
query,
|
|
63
|
-
json,
|
|
64
|
-
dataKey: 'data.UserActivity'
|
|
65
|
-
})
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
payload () {
|
|
69
|
-
const data = JSON.parse(JSON.stringify(this.data()))
|
|
70
|
-
|
|
71
|
-
if (data.instances) {
|
|
72
|
-
for (const datum of data.instances) {
|
|
73
|
-
datum.jsonData = JSON.parse(datum.jsonData)
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
return data
|
|
78
|
-
}
|
|
79
|
-
}
|