@abtnode/schema 1.8.0 → 1.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,13 +5,44 @@ Defines data structure for ABT Node backend API, and maintains schema for GQL en
5
5
  ## Development
6
6
 
7
7
  You can choose one of the following two ways to build schema.
8
+ It is recommended to build with Docker.
8
9
 
9
- ### Option 1. Build schema with Go
10
+ ### Option 1. Build schema with Docker
10
11
 
11
- #### Install gnu-sed
12
+ Requirements:
12
13
 
13
- - Mac: brew install gnu-sed
14
- - Other platform: https://www.gnu.org/software/sed/
14
+ - Docker
15
+
16
+ ```bash
17
+ docker pull arcblock/blocklet-server-proto
18
+ docker run --rm -v {absolute path of core/schema}:/home/root/schema arcblock/blocklet-server-proto
19
+ ```
20
+
21
+ ### Option 2. Build schema with Go
22
+
23
+ Requirements:
24
+
25
+ - go 1.8+
26
+
27
+ #### Install go
28
+
29
+ - Mac: brew install go
30
+ - Other platform: https://go.dev/doc/install
31
+
32
+ ```shell
33
+ # you can use `go env` to check the go environment
34
+ go env
35
+
36
+ ```
37
+
38
+ #### Install gnu-sed(MacOS)
39
+
40
+ ```bash
41
+ # Install(Mac OS), other platform: https://www.gnu.org/software/sed/
42
+ brew install gnu-sed
43
+ # Make `sed` command work, only for homebrew:
44
+ PATH="$(brew --prefix)/opt/gnu-sed/libexec/gnubin:$PATH"
45
+ ```
15
46
 
16
47
  #### Install protobuf
17
48
 
@@ -21,18 +52,27 @@ You can choose one of the following two ways to build schema.
21
52
  #### Add to `~/.profile`
22
53
 
23
54
  ```shell
55
+
56
+ vim ~/.profile
57
+
58
+ # add the profile to the end of the file
59
+ # ----------------------------------------------------------
60
+
24
61
  export GO111MODULE=on
25
62
  export GOPROXY=https://goproxy.cn
26
63
 
27
- export GOROOT=/usr/local/Cellar/go/1.15.5/libexec // you local go path
64
+ # you can query the GOROOT/GOPATH/GOBIN by `go env`
65
+ export GOROOT=/usr/local/Cellar/go/1.15.5/libexec // replace to your local go path
28
66
  export GOPATH=$HOME/.golang
29
67
  export GOBIN=$GOPATH/bin
30
68
  export PATH=$PATH:$GOROOT:$GOPATH:$GOBIN
31
- PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"
32
- ```
69
+
70
+ # ----------------------------------------------------------
33
71
 
34
72
  source ~/.profile
35
73
 
74
+ ```
75
+
36
76
  #### Install other dependencies
37
77
 
38
78
  Run `make init`
@@ -43,15 +83,6 @@ Run `make init`
43
83
 
44
84
  Run `make build`
45
85
 
46
- ### Option 2. Build schema with Docker
47
-
48
- If you don't want to install Go-related dependencies, you can build them via the docker:
49
-
50
- ```bash
51
- docker pull arcblock/blocklet-server-proto
52
- docker run --rm -v {absolute path of core/schema}:/home/root/schema arcblock/blocklet-server-proto
53
- ```
54
-
55
86
  ## How To Update Schema
56
87
 
57
88
  ### 1. update core/schema proto
@@ -68,7 +99,7 @@ just run:
68
99
  node tools/start-upgrade-server.js
69
100
  ```
70
101
 
71
- > should make sure the DB Proxy is running
102
+ > should make sure the DB Proxy is running, if not, run `yarn start` in a new terminal
72
103
 
73
104
  ### 3. go to core/client do finally update
74
105
 
package/lib/index.js CHANGED
@@ -99,6 +99,7 @@ input RequestAddDomainAliasInput {
99
99
  id: String
100
100
  domainAlias: String
101
101
  force: Boolean
102
+ teamDid: String
102
103
  }
103
104
 
104
105
  input RequestAddLetsEcryptCertInput {
@@ -114,6 +115,7 @@ input RequestAddNginxHttpsCertInput {
114
115
  input RequestAddRoutingRuleInput {
115
116
  id: String
116
117
  rule: RoutingRuleInput
118
+ teamDid: String
117
119
  }
118
120
 
119
121
  input RequestAddRoutingSiteInput {
@@ -157,6 +159,11 @@ input RequestConfigPassportIssuanceInput {
157
159
  enable: Boolean
158
160
  }
159
161
 
162
+ input RequestConfigPublicToStoreInput {
163
+ did: String
164
+ publicToStore: Boolean
165
+ }
166
+
160
167
  input RequestConfigTrustedPassportsInput {
161
168
  teamDid: String
162
169
  trustedPassports: [TrustedPassportInput!]
@@ -213,6 +220,7 @@ input RequestDeleteComponentInput {
213
220
  input RequestDeleteDomainAliasInput {
214
221
  id: String
215
222
  domainAlias: String
223
+ teamDid: String
216
224
  }
217
225
 
218
226
  input RequestDeleteNginxHttpsCertInput {
@@ -232,6 +240,7 @@ input RequestDeleteRoleInput {
232
240
  input RequestDeleteRoutingRuleInput {
233
241
  id: String
234
242
  ruleId: String
243
+ teamDid: String
235
244
  }
236
245
 
237
246
  input RequestDeleteRoutingSiteInput {
@@ -414,6 +423,7 @@ input RequestUpdateAccessKeyInput {
414
423
 
415
424
  input RequestUpdateChildBlockletsInput {
416
425
  updateId: String
426
+ rootDid: String
417
427
  }
418
428
 
419
429
  input RequestUpdateNginxHttpsCertInput {
@@ -430,12 +440,14 @@ input RequestUpdatePermissionsForRoleInput {
430
440
  input RequestUpdateRoutingRuleInput {
431
441
  id: String
432
442
  rule: RoutingRuleInput
443
+ teamDid: String
433
444
  }
434
445
 
435
446
  input RequestUpdateRoutingSiteInput {
436
447
  id: String
437
448
  corsAllowedOrigins: [String!]
438
449
  domain: String
450
+ teamDid: String
439
451
  }
440
452
 
441
453
  input RequestUpdateSessionInput {
@@ -443,6 +455,11 @@ input RequestUpdateSessionInput {
443
455
  data: String
444
456
  }
445
457
 
458
+ input RequestUpdateWhoCanAccessInput {
459
+ did: String
460
+ whoCanAccess: String
461
+ }
462
+
446
463
  input RequestUpgradeBlockletInput {
447
464
  did: String
448
465
  registryUrl: String
@@ -464,6 +481,7 @@ input RequestVersionedBlockletInput {
464
481
  title: String
465
482
  description: String
466
483
  startImmediately: Boolean
484
+ downloadToken: String
467
485
  }
468
486
 
469
487
  input RequsetCreateInvitationInput {
@@ -756,6 +774,7 @@ type BlockletSettings {
756
774
  whoCanAccess: String
757
775
  owner: WalletInfo
758
776
  children: [DeletedBlockletState!]
777
+ publicToStore: Boolean
759
778
  }
760
779
 
761
780
  type BlockletState {
@@ -1115,6 +1134,8 @@ type ResponseBlockletMetaFromUrl {
1115
1134
  isFree: Boolean
1116
1135
  isInstalled: Boolean
1117
1136
  isRunning: Boolean
1137
+ inStore: Boolean
1138
+ registryUrl: String
1118
1139
  }
1119
1140
 
1120
1141
  type ResponseCheckChildBlockletsForUpdates {
@@ -1131,11 +1152,6 @@ type ResponseCheckNodeVersion {
1131
1152
  version: String
1132
1153
  }
1133
1154
 
1134
- type ResponseConfigBlocklet {
1135
- code: StatusCode
1136
- blocklet: BlockletState
1137
- }
1138
-
1139
1155
  type ResponseCreateAccessKey {
1140
1156
  code: StatusCode
1141
1157
  data: CreateAccessKey
@@ -1568,9 +1584,11 @@ type Mutation {
1568
1584
  deleteComponent(input: RequestDeleteComponentInput): ResponseBlocklet
1569
1585
  cancelDownloadBlocklet(input: RequestBlockletInput): ResponseBlocklet
1570
1586
  upgradeBlocklet(input: RequestUpgradeBlockletInput): ResponseBlocklet
1571
- configBlocklet(input: RequestConfigBlockletInput): ResponseConfigBlocklet
1587
+ configBlocklet(input: RequestConfigBlockletInput): ResponseBlocklet
1572
1588
  checkChildBlockletsForUpdates(input: RequestBlockletInput): ResponseCheckChildBlockletsForUpdates
1573
1589
  updateChildBlocklets(input: RequestUpdateChildBlockletsInput): ResponseBlocklet
1590
+ configPublicToStore(input: RequestConfigPublicToStoreInput): ResponseBlocklet
1591
+ updateWhoCanAccess(input: RequestUpdateWhoCanAccessInput): ResponseBlocklet
1574
1592
  updateNodeInfo(input: NodeInfoInput): ResponseGetNodeInfo
1575
1593
  updateNodeRouting(input: RequestNodeRoutingInput): ResponseGetNodeInfo
1576
1594
  upgradeNodeVersion: ResponseUpgradeNodeVersion
@@ -99,6 +99,7 @@ input RequestAddDomainAliasInput {
99
99
  id: String
100
100
  domainAlias: String
101
101
  force: Boolean
102
+ teamDid: String
102
103
  }
103
104
 
104
105
  input RequestAddLetsEcryptCertInput {
@@ -114,6 +115,7 @@ input RequestAddNginxHttpsCertInput {
114
115
  input RequestAddRoutingRuleInput {
115
116
  id: String
116
117
  rule: RoutingRuleInput
118
+ teamDid: String
117
119
  }
118
120
 
119
121
  input RequestAddRoutingSiteInput {
@@ -157,6 +159,11 @@ input RequestConfigPassportIssuanceInput {
157
159
  enable: Boolean
158
160
  }
159
161
 
162
+ input RequestConfigPublicToStoreInput {
163
+ did: String
164
+ publicToStore: Boolean
165
+ }
166
+
160
167
  input RequestConfigTrustedPassportsInput {
161
168
  teamDid: String
162
169
  trustedPassports: [TrustedPassportInput!]
@@ -213,6 +220,7 @@ input RequestDeleteComponentInput {
213
220
  input RequestDeleteDomainAliasInput {
214
221
  id: String
215
222
  domainAlias: String
223
+ teamDid: String
216
224
  }
217
225
 
218
226
  input RequestDeleteNginxHttpsCertInput {
@@ -232,6 +240,7 @@ input RequestDeleteRoleInput {
232
240
  input RequestDeleteRoutingRuleInput {
233
241
  id: String
234
242
  ruleId: String
243
+ teamDid: String
235
244
  }
236
245
 
237
246
  input RequestDeleteRoutingSiteInput {
@@ -414,6 +423,7 @@ input RequestUpdateAccessKeyInput {
414
423
 
415
424
  input RequestUpdateChildBlockletsInput {
416
425
  updateId: String
426
+ rootDid: String
417
427
  }
418
428
 
419
429
  input RequestUpdateNginxHttpsCertInput {
@@ -430,12 +440,14 @@ input RequestUpdatePermissionsForRoleInput {
430
440
  input RequestUpdateRoutingRuleInput {
431
441
  id: String
432
442
  rule: RoutingRuleInput
443
+ teamDid: String
433
444
  }
434
445
 
435
446
  input RequestUpdateRoutingSiteInput {
436
447
  id: String
437
448
  corsAllowedOrigins: [String!]
438
449
  domain: String
450
+ teamDid: String
439
451
  }
440
452
 
441
453
  input RequestUpdateSessionInput {
@@ -443,6 +455,11 @@ input RequestUpdateSessionInput {
443
455
  data: String
444
456
  }
445
457
 
458
+ input RequestUpdateWhoCanAccessInput {
459
+ did: String
460
+ whoCanAccess: String
461
+ }
462
+
446
463
  input RequestUpgradeBlockletInput {
447
464
  did: String
448
465
  registryUrl: String
@@ -464,6 +481,7 @@ input RequestVersionedBlockletInput {
464
481
  title: String
465
482
  description: String
466
483
  startImmediately: Boolean
484
+ downloadToken: String
467
485
  }
468
486
 
469
487
  input RequsetCreateInvitationInput {
@@ -756,6 +774,7 @@ type BlockletSettings {
756
774
  whoCanAccess: String
757
775
  owner: WalletInfo
758
776
  children: [DeletedBlockletState!]
777
+ publicToStore: Boolean
759
778
  }
760
779
 
761
780
  type BlockletState {
@@ -1115,6 +1134,8 @@ type ResponseBlockletMetaFromUrl {
1115
1134
  isFree: Boolean
1116
1135
  isInstalled: Boolean
1117
1136
  isRunning: Boolean
1137
+ inStore: Boolean
1138
+ registryUrl: String
1118
1139
  }
1119
1140
 
1120
1141
  type ResponseCheckChildBlockletsForUpdates {
@@ -1131,11 +1152,6 @@ type ResponseCheckNodeVersion {
1131
1152
  version: String
1132
1153
  }
1133
1154
 
1134
- type ResponseConfigBlocklet {
1135
- code: StatusCode
1136
- blocklet: BlockletState
1137
- }
1138
-
1139
1155
  type ResponseCreateAccessKey {
1140
1156
  code: StatusCode
1141
1157
  data: CreateAccessKey
@@ -1570,9 +1586,11 @@ type Mutation {
1570
1586
  deleteComponent(input: RequestDeleteComponentInput): ResponseBlocklet
1571
1587
  cancelDownloadBlocklet(input: RequestBlockletInput): ResponseBlocklet
1572
1588
  upgradeBlocklet(input: RequestUpgradeBlockletInput): ResponseBlocklet
1573
- configBlocklet(input: RequestConfigBlockletInput): ResponseConfigBlocklet
1589
+ configBlocklet(input: RequestConfigBlockletInput): ResponseBlocklet
1574
1590
  checkChildBlockletsForUpdates(input: RequestBlockletInput): ResponseCheckChildBlockletsForUpdates
1575
1591
  updateChildBlocklets(input: RequestUpdateChildBlockletsInput): ResponseBlocklet
1592
+ configPublicToStore(input: RequestConfigPublicToStoreInput): ResponseBlocklet
1593
+ updateWhoCanAccess(input: RequestUpdateWhoCanAccessInput): ResponseBlocklet
1576
1594
  updateNodeInfo(input: NodeInfoInput): ResponseGetNodeInfo
1577
1595
  updateNodeRouting(input: RequestNodeRoutingInput): ResponseGetNodeInfo
1578
1596
  upgradeNodeVersion: ResponseUpgradeNodeVersion
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.8.0",
6
+ "version": "1.8.3",
7
7
  "description": "",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -13,5 +13,5 @@
13
13
  "keywords": [],
14
14
  "author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
15
15
  "license": "MIT",
16
- "gitHead": "6446a85fb33721abc24bb1045d59158e6b96c241"
16
+ "gitHead": "c734aca7bf1fc03378c3b082d0622b6a540a8bd3"
17
17
  }