@0xsequence/metadata 2.2.12 → 2.2.14

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.
@@ -13,12 +13,15 @@ function _extends() {
13
13
  }
14
14
 
15
15
  /* eslint-disable */
16
- // sequence-metadata v0.4.0 9d0976f6ff345b6a688b69cff647454e7fd0e3a6
16
+ // sequence-metadata v0.4.0 9594f86f8681f364dd514a1bd7cae1c1dc77e3de
17
17
  // --
18
- // Code generated by webrpc-gen@v0.18.6 with typescript generator. DO NOT EDIT.
18
+ // Code generated by webrpc-gen@v0.21.1 with typescript generator. DO NOT EDIT.
19
19
  //
20
20
  // webrpc-gen -schema=metadata.ridl -target=typescript -client -out=./clients/metadata.gen.ts
21
21
 
22
+ const WebrpcHeader = 'Webrpc';
23
+ const WebrpcHeaderValue = 'webrpc@v0.21.1;gen-typescript@v0.15.1;sequence-metadata@v0.4.0';
24
+
22
25
  // WebRPC description and code-gen version
23
26
  const WebRPCVersion = 'v1';
24
27
 
@@ -26,7 +29,42 @@ const WebRPCVersion = 'v1';
26
29
  const WebRPCSchemaVersion = 'v0.4.0';
27
30
 
28
31
  // Schema hash generated from your RIDL schema
29
- const WebRPCSchemaHash = '9d0976f6ff345b6a688b69cff647454e7fd0e3a6';
32
+ const WebRPCSchemaHash = '9594f86f8681f364dd514a1bd7cae1c1dc77e3de';
33
+ function VersionFromHeader(headers) {
34
+ const headerValue = headers.get(WebrpcHeader);
35
+ if (!headerValue) {
36
+ return {
37
+ webrpcGenVersion: '',
38
+ codeGenName: '',
39
+ codeGenVersion: '',
40
+ schemaName: '',
41
+ schemaVersion: ''
42
+ };
43
+ }
44
+ return parseWebrpcGenVersions(headerValue);
45
+ }
46
+ function parseWebrpcGenVersions(header) {
47
+ const versions = header.split(';');
48
+ if (versions.length < 3) {
49
+ return {
50
+ webrpcGenVersion: '',
51
+ codeGenName: '',
52
+ codeGenVersion: '',
53
+ schemaName: '',
54
+ schemaVersion: ''
55
+ };
56
+ }
57
+ const [_, webrpcGenVersion] = versions[0].split('@');
58
+ const [codeGenName, codeGenVersion] = versions[1].split('@');
59
+ const [schemaName, schemaVersion] = versions[2].split('@');
60
+ return {
61
+ webrpcGenVersion,
62
+ codeGenName,
63
+ codeGenVersion,
64
+ schemaName,
65
+ schemaVersion
66
+ };
67
+ }
30
68
 
31
69
  //
32
70
  // Types
@@ -39,6 +77,29 @@ let ContractType = /*#__PURE__*/function (ContractType) {
39
77
  ContractType["ERC1155"] = "ERC1155";
40
78
  return ContractType;
41
79
  }({});
80
+ let Source = /*#__PURE__*/function (Source) {
81
+ Source["UNKNOWN"] = "UNKNOWN";
82
+ Source["FETCHER"] = "FETCHER";
83
+ Source["FETCHER_OPENSEA_API"] = "FETCHER_OPENSEA_API";
84
+ Source["FETCHER_ENS_API"] = "FETCHER_ENS_API";
85
+ Source["FETCHER_ON_CHAIN_ERC20_INTERFACE"] = "FETCHER_ON_CHAIN_ERC20_INTERFACE";
86
+ Source["FETCHER_ON_CHAIN_TOKEN_URI"] = "FETCHER_ON_CHAIN_TOKEN_URI";
87
+ Source["FETCHER_ON_CHAIN_CONTRACT_URI"] = "FETCHER_ON_CHAIN_CONTRACT_URI";
88
+ Source["TOKEN_DIRECTORY"] = "TOKEN_DIRECTORY";
89
+ Source["TOKEN_DIRECTORY_PUBLIC_TOKEN_LIST"] = "TOKEN_DIRECTORY_PUBLIC_TOKEN_LIST";
90
+ Source["TOKEN_DIRECTORY_3RD_PARTY"] = "TOKEN_DIRECTORY_3RD_PARTY";
91
+ Source["TOKEN_DIRECTORY_SEQUENCE_GITHUB"] = "TOKEN_DIRECTORY_SEQUENCE_GITHUB";
92
+ Source["TOKEN_DIRECTORY_SEQUENCE_BUILDER"] = "TOKEN_DIRECTORY_SEQUENCE_BUILDER";
93
+ Source["SEQUENCE_BUILDER"] = "SEQUENCE_BUILDER";
94
+ Source["SEQUENCE_BUILDER_COLLECTIONS"] = "SEQUENCE_BUILDER_COLLECTIONS";
95
+ return Source;
96
+ }({});
97
+ let ResourceStatus = /*#__PURE__*/function (ResourceStatus) {
98
+ ResourceStatus["NOT_AVAILABLE"] = "NOT_AVAILABLE";
99
+ ResourceStatus["STALE"] = "STALE";
100
+ ResourceStatus["AVAILABLE"] = "AVAILABLE";
101
+ return ResourceStatus;
102
+ }({});
42
103
  let PropertyType = /*#__PURE__*/function (PropertyType) {
43
104
  PropertyType["INT"] = "INT";
44
105
  PropertyType["STRING"] = "STRING";
@@ -53,11 +114,10 @@ let SwapType = /*#__PURE__*/function (SwapType) {
53
114
  return SwapType;
54
115
  }({});
55
116
  let TaskStatus = /*#__PURE__*/function (TaskStatus) {
56
- TaskStatus["PENDING"] = "PENDING";
117
+ TaskStatus["QUEUED"] = "QUEUED";
57
118
  TaskStatus["PAUSED"] = "PAUSED";
58
119
  TaskStatus["FAILED"] = "FAILED";
59
120
  TaskStatus["COMPLETED"] = "COMPLETED";
60
- TaskStatus["DISABLED"] = "DISABLED";
61
121
  return TaskStatus;
62
122
  }({});
63
123
  //
@@ -107,11 +167,24 @@ class Metadata {
107
167
  });
108
168
  });
109
169
  };
110
- this.getTokenMetadata = (args, headers, signal) => {
111
- return this.fetch(this.url('GetTokenMetadata'), createHTTPRequest(args, headers, signal)).then(res => {
170
+ this.getTask = (args, headers, signal) => {
171
+ return this.fetch(this.url('GetTask'), createHTTPRequest(args, headers, signal)).then(res => {
112
172
  return buildResponse(res).then(_data => {
113
173
  return {
114
- tokenMetadata: _data.tokenMetadata
174
+ task: _data.task
175
+ };
176
+ });
177
+ }, error => {
178
+ throw WebrpcRequestFailedError.new({
179
+ cause: `fetch(): ${error.message || ''}`
180
+ });
181
+ });
182
+ };
183
+ this.getTaskStatus = (args, headers, signal) => {
184
+ return this.fetch(this.url('GetTaskStatus'), createHTTPRequest(args, headers, signal)).then(res => {
185
+ return buildResponse(res).then(_data => {
186
+ return {
187
+ status: _data.status
115
188
  };
116
189
  });
117
190
  }, error => {
@@ -187,11 +260,64 @@ class Metadata {
187
260
  });
188
261
  });
189
262
  };
263
+ this.refreshContractInfo = (args, headers, signal) => {
264
+ return this.fetch(this.url('RefreshContractInfo'), createHTTPRequest(args, headers, signal)).then(res => {
265
+ return buildResponse(res).then(_data => {
266
+ return {};
267
+ });
268
+ }, error => {
269
+ throw WebrpcRequestFailedError.new({
270
+ cause: `fetch(): ${error.message || ''}`
271
+ });
272
+ });
273
+ };
274
+ this.refreshContractTokens = (args, headers, signal) => {
275
+ return this.fetch(this.url('RefreshContractTokens'), createHTTPRequest(args, headers, signal)).then(res => {
276
+ return buildResponse(res).then(_data => {
277
+ return {
278
+ taskID: _data.taskID
279
+ };
280
+ });
281
+ }, error => {
282
+ throw WebrpcRequestFailedError.new({
283
+ cause: `fetch(): ${error.message || ''}`
284
+ });
285
+ });
286
+ };
287
+ this.refreshAllContractTokens = (args, headers, signal) => {
288
+ return this.fetch(this.url('RefreshAllContractTokens'), createHTTPRequest(args, headers, signal)).then(res => {
289
+ return buildResponse(res).then(_data => {
290
+ return {
291
+ taskID: _data.taskID,
292
+ retryAfter: _data.retryAfter
293
+ };
294
+ });
295
+ }, error => {
296
+ throw WebrpcRequestFailedError.new({
297
+ cause: `fetch(): ${error.message || ''}`
298
+ });
299
+ });
300
+ };
301
+ this.getTokenMetadata = (args, headers, signal) => {
302
+ return this.fetch(this.url('GetTokenMetadata'), createHTTPRequest(args, headers, signal)).then(res => {
303
+ return buildResponse(res).then(_data => {
304
+ return {
305
+ tokenMetadata: _data.tokenMetadata,
306
+ taskID: _data.taskID
307
+ };
308
+ });
309
+ }, error => {
310
+ throw WebrpcRequestFailedError.new({
311
+ cause: `fetch(): ${error.message || ''}`
312
+ });
313
+ });
314
+ };
190
315
  this.getTokenMetadataBatch = (args, headers, signal) => {
191
316
  return this.fetch(this.url('GetTokenMetadataBatch'), createHTTPRequest(args, headers, signal)).then(res => {
192
317
  return buildResponse(res).then(_data => {
193
318
  return {
194
- contractTokenMetadata: _data.contractTokenMetadata
319
+ contractTokenMetadata: _data.contractTokenMetadata,
320
+ taskID: _data.taskID
195
321
  };
196
322
  });
197
323
  }, error => {
@@ -245,7 +371,8 @@ class Metadata {
245
371
  return this.fetch(this.url('GetContractInfo'), createHTTPRequest(args, headers, signal)).then(res => {
246
372
  return buildResponse(res).then(_data => {
247
373
  return {
248
- contractInfo: _data.contractInfo
374
+ contractInfo: _data.contractInfo,
375
+ taskID: _data.taskID
249
376
  };
250
377
  });
251
378
  }, error => {
@@ -258,7 +385,8 @@ class Metadata {
258
385
  return this.fetch(this.url('GetContractInfoBatch'), createHTTPRequest(args, headers, signal)).then(res => {
259
386
  return buildResponse(res).then(_data => {
260
387
  return {
261
- contractInfoMap: _data.contractInfoMap
388
+ contractInfoMap: _data.contractInfoMap,
389
+ taskID: _data.taskID
262
390
  };
263
391
  });
264
392
  }, error => {
@@ -507,7 +635,7 @@ class Metadata {
507
635
  });
508
636
  });
509
637
  };
510
- this.hostname = hostname;
638
+ this.hostname = hostname.replace(/\/*$/, '');
511
639
  this.fetch = (input, init) => fetch(input, init);
512
640
  }
513
641
  url(name) {
@@ -798,7 +926,7 @@ class Collections {
798
926
  });
799
927
  });
800
928
  };
801
- this.hostname = hostname;
929
+ this.hostname = hostname.replace(/\/*$/, '');
802
930
  this.fetch = (input, init) => fetch(input, init);
803
931
  }
804
932
  url(name) {
@@ -876,7 +1004,7 @@ class Admin {
876
1004
  });
877
1005
  });
878
1006
  };
879
- this.hostname = hostname;
1007
+ this.hostname = hostname.replace(/\/*$/, '');
880
1008
  this.fetch = (input, init) => fetch(input, init);
881
1009
  }
882
1010
  url(name) {
@@ -884,11 +1012,13 @@ class Admin {
884
1012
  }
885
1013
  }
886
1014
  const createHTTPRequest = (body = {}, headers = {}, signal = null) => {
1015
+ const reqHeaders = _extends({}, headers, {
1016
+ 'Content-Type': 'application/json'
1017
+ });
1018
+ reqHeaders[WebrpcHeader] = WebrpcHeaderValue;
887
1019
  return {
888
1020
  method: 'POST',
889
- headers: _extends({}, headers, {
890
- 'Content-Type': 'application/json'
891
- }),
1021
+ headers: reqHeaders,
892
1022
  body: JSON.stringify(body || {}),
893
1023
  signal
894
1024
  };
@@ -1244,15 +1374,18 @@ exports.QueryFailedError = QueryFailedError;
1244
1374
  exports.RateLimitedError = RateLimitedError;
1245
1375
  exports.RequestConflictError = RequestConflictError;
1246
1376
  exports.RequiredArgumentError = RequiredArgumentError;
1377
+ exports.ResourceStatus = ResourceStatus;
1247
1378
  exports.SequenceCollections = SequenceCollections;
1248
1379
  exports.SequenceMetadata = SequenceMetadata;
1249
1380
  exports.SessionExpiredError = SessionExpiredError;
1381
+ exports.Source = Source;
1250
1382
  exports.SwapType = SwapType;
1251
1383
  exports.TaskStatus = TaskStatus;
1252
1384
  exports.TimeoutError = TimeoutError;
1253
1385
  exports.TokenDirectoryDisabledError = TokenDirectoryDisabledError;
1254
1386
  exports.UnauthorizedError = UnauthorizedError;
1255
1387
  exports.ValidationFailedError = ValidationFailedError;
1388
+ exports.VersionFromHeader = VersionFromHeader;
1256
1389
  exports.WebRPCSchemaHash = WebRPCSchemaHash;
1257
1390
  exports.WebRPCSchemaVersion = WebRPCSchemaVersion;
1258
1391
  exports.WebRPCVersion = WebRPCVersion;
@@ -1263,6 +1396,8 @@ exports.WebrpcBadRouteError = WebrpcBadRouteError;
1263
1396
  exports.WebrpcClientDisconnectedError = WebrpcClientDisconnectedError;
1264
1397
  exports.WebrpcEndpointError = WebrpcEndpointError;
1265
1398
  exports.WebrpcError = WebrpcError;
1399
+ exports.WebrpcHeader = WebrpcHeader;
1400
+ exports.WebrpcHeaderValue = WebrpcHeaderValue;
1266
1401
  exports.WebrpcInternalErrorError = WebrpcInternalErrorError;
1267
1402
  exports.WebrpcRequestFailedError = WebrpcRequestFailedError;
1268
1403
  exports.WebrpcServerPanicError = WebrpcServerPanicError;
@@ -13,12 +13,15 @@ function _extends() {
13
13
  }
14
14
 
15
15
  /* eslint-disable */
16
- // sequence-metadata v0.4.0 9d0976f6ff345b6a688b69cff647454e7fd0e3a6
16
+ // sequence-metadata v0.4.0 9594f86f8681f364dd514a1bd7cae1c1dc77e3de
17
17
  // --
18
- // Code generated by webrpc-gen@v0.18.6 with typescript generator. DO NOT EDIT.
18
+ // Code generated by webrpc-gen@v0.21.1 with typescript generator. DO NOT EDIT.
19
19
  //
20
20
  // webrpc-gen -schema=metadata.ridl -target=typescript -client -out=./clients/metadata.gen.ts
21
21
 
22
+ const WebrpcHeader = 'Webrpc';
23
+ const WebrpcHeaderValue = 'webrpc@v0.21.1;gen-typescript@v0.15.1;sequence-metadata@v0.4.0';
24
+
22
25
  // WebRPC description and code-gen version
23
26
  const WebRPCVersion = 'v1';
24
27
 
@@ -26,7 +29,42 @@ const WebRPCVersion = 'v1';
26
29
  const WebRPCSchemaVersion = 'v0.4.0';
27
30
 
28
31
  // Schema hash generated from your RIDL schema
29
- const WebRPCSchemaHash = '9d0976f6ff345b6a688b69cff647454e7fd0e3a6';
32
+ const WebRPCSchemaHash = '9594f86f8681f364dd514a1bd7cae1c1dc77e3de';
33
+ function VersionFromHeader(headers) {
34
+ const headerValue = headers.get(WebrpcHeader);
35
+ if (!headerValue) {
36
+ return {
37
+ webrpcGenVersion: '',
38
+ codeGenName: '',
39
+ codeGenVersion: '',
40
+ schemaName: '',
41
+ schemaVersion: ''
42
+ };
43
+ }
44
+ return parseWebrpcGenVersions(headerValue);
45
+ }
46
+ function parseWebrpcGenVersions(header) {
47
+ const versions = header.split(';');
48
+ if (versions.length < 3) {
49
+ return {
50
+ webrpcGenVersion: '',
51
+ codeGenName: '',
52
+ codeGenVersion: '',
53
+ schemaName: '',
54
+ schemaVersion: ''
55
+ };
56
+ }
57
+ const [_, webrpcGenVersion] = versions[0].split('@');
58
+ const [codeGenName, codeGenVersion] = versions[1].split('@');
59
+ const [schemaName, schemaVersion] = versions[2].split('@');
60
+ return {
61
+ webrpcGenVersion,
62
+ codeGenName,
63
+ codeGenVersion,
64
+ schemaName,
65
+ schemaVersion
66
+ };
67
+ }
30
68
 
31
69
  //
32
70
  // Types
@@ -39,6 +77,29 @@ let ContractType = /*#__PURE__*/function (ContractType) {
39
77
  ContractType["ERC1155"] = "ERC1155";
40
78
  return ContractType;
41
79
  }({});
80
+ let Source = /*#__PURE__*/function (Source) {
81
+ Source["UNKNOWN"] = "UNKNOWN";
82
+ Source["FETCHER"] = "FETCHER";
83
+ Source["FETCHER_OPENSEA_API"] = "FETCHER_OPENSEA_API";
84
+ Source["FETCHER_ENS_API"] = "FETCHER_ENS_API";
85
+ Source["FETCHER_ON_CHAIN_ERC20_INTERFACE"] = "FETCHER_ON_CHAIN_ERC20_INTERFACE";
86
+ Source["FETCHER_ON_CHAIN_TOKEN_URI"] = "FETCHER_ON_CHAIN_TOKEN_URI";
87
+ Source["FETCHER_ON_CHAIN_CONTRACT_URI"] = "FETCHER_ON_CHAIN_CONTRACT_URI";
88
+ Source["TOKEN_DIRECTORY"] = "TOKEN_DIRECTORY";
89
+ Source["TOKEN_DIRECTORY_PUBLIC_TOKEN_LIST"] = "TOKEN_DIRECTORY_PUBLIC_TOKEN_LIST";
90
+ Source["TOKEN_DIRECTORY_3RD_PARTY"] = "TOKEN_DIRECTORY_3RD_PARTY";
91
+ Source["TOKEN_DIRECTORY_SEQUENCE_GITHUB"] = "TOKEN_DIRECTORY_SEQUENCE_GITHUB";
92
+ Source["TOKEN_DIRECTORY_SEQUENCE_BUILDER"] = "TOKEN_DIRECTORY_SEQUENCE_BUILDER";
93
+ Source["SEQUENCE_BUILDER"] = "SEQUENCE_BUILDER";
94
+ Source["SEQUENCE_BUILDER_COLLECTIONS"] = "SEQUENCE_BUILDER_COLLECTIONS";
95
+ return Source;
96
+ }({});
97
+ let ResourceStatus = /*#__PURE__*/function (ResourceStatus) {
98
+ ResourceStatus["NOT_AVAILABLE"] = "NOT_AVAILABLE";
99
+ ResourceStatus["STALE"] = "STALE";
100
+ ResourceStatus["AVAILABLE"] = "AVAILABLE";
101
+ return ResourceStatus;
102
+ }({});
42
103
  let PropertyType = /*#__PURE__*/function (PropertyType) {
43
104
  PropertyType["INT"] = "INT";
44
105
  PropertyType["STRING"] = "STRING";
@@ -53,11 +114,10 @@ let SwapType = /*#__PURE__*/function (SwapType) {
53
114
  return SwapType;
54
115
  }({});
55
116
  let TaskStatus = /*#__PURE__*/function (TaskStatus) {
56
- TaskStatus["PENDING"] = "PENDING";
117
+ TaskStatus["QUEUED"] = "QUEUED";
57
118
  TaskStatus["PAUSED"] = "PAUSED";
58
119
  TaskStatus["FAILED"] = "FAILED";
59
120
  TaskStatus["COMPLETED"] = "COMPLETED";
60
- TaskStatus["DISABLED"] = "DISABLED";
61
121
  return TaskStatus;
62
122
  }({});
63
123
  //
@@ -107,11 +167,24 @@ class Metadata {
107
167
  });
108
168
  });
109
169
  };
110
- this.getTokenMetadata = (args, headers, signal) => {
111
- return this.fetch(this.url('GetTokenMetadata'), createHTTPRequest(args, headers, signal)).then(res => {
170
+ this.getTask = (args, headers, signal) => {
171
+ return this.fetch(this.url('GetTask'), createHTTPRequest(args, headers, signal)).then(res => {
112
172
  return buildResponse(res).then(_data => {
113
173
  return {
114
- tokenMetadata: _data.tokenMetadata
174
+ task: _data.task
175
+ };
176
+ });
177
+ }, error => {
178
+ throw WebrpcRequestFailedError.new({
179
+ cause: `fetch(): ${error.message || ''}`
180
+ });
181
+ });
182
+ };
183
+ this.getTaskStatus = (args, headers, signal) => {
184
+ return this.fetch(this.url('GetTaskStatus'), createHTTPRequest(args, headers, signal)).then(res => {
185
+ return buildResponse(res).then(_data => {
186
+ return {
187
+ status: _data.status
115
188
  };
116
189
  });
117
190
  }, error => {
@@ -187,11 +260,64 @@ class Metadata {
187
260
  });
188
261
  });
189
262
  };
263
+ this.refreshContractInfo = (args, headers, signal) => {
264
+ return this.fetch(this.url('RefreshContractInfo'), createHTTPRequest(args, headers, signal)).then(res => {
265
+ return buildResponse(res).then(_data => {
266
+ return {};
267
+ });
268
+ }, error => {
269
+ throw WebrpcRequestFailedError.new({
270
+ cause: `fetch(): ${error.message || ''}`
271
+ });
272
+ });
273
+ };
274
+ this.refreshContractTokens = (args, headers, signal) => {
275
+ return this.fetch(this.url('RefreshContractTokens'), createHTTPRequest(args, headers, signal)).then(res => {
276
+ return buildResponse(res).then(_data => {
277
+ return {
278
+ taskID: _data.taskID
279
+ };
280
+ });
281
+ }, error => {
282
+ throw WebrpcRequestFailedError.new({
283
+ cause: `fetch(): ${error.message || ''}`
284
+ });
285
+ });
286
+ };
287
+ this.refreshAllContractTokens = (args, headers, signal) => {
288
+ return this.fetch(this.url('RefreshAllContractTokens'), createHTTPRequest(args, headers, signal)).then(res => {
289
+ return buildResponse(res).then(_data => {
290
+ return {
291
+ taskID: _data.taskID,
292
+ retryAfter: _data.retryAfter
293
+ };
294
+ });
295
+ }, error => {
296
+ throw WebrpcRequestFailedError.new({
297
+ cause: `fetch(): ${error.message || ''}`
298
+ });
299
+ });
300
+ };
301
+ this.getTokenMetadata = (args, headers, signal) => {
302
+ return this.fetch(this.url('GetTokenMetadata'), createHTTPRequest(args, headers, signal)).then(res => {
303
+ return buildResponse(res).then(_data => {
304
+ return {
305
+ tokenMetadata: _data.tokenMetadata,
306
+ taskID: _data.taskID
307
+ };
308
+ });
309
+ }, error => {
310
+ throw WebrpcRequestFailedError.new({
311
+ cause: `fetch(): ${error.message || ''}`
312
+ });
313
+ });
314
+ };
190
315
  this.getTokenMetadataBatch = (args, headers, signal) => {
191
316
  return this.fetch(this.url('GetTokenMetadataBatch'), createHTTPRequest(args, headers, signal)).then(res => {
192
317
  return buildResponse(res).then(_data => {
193
318
  return {
194
- contractTokenMetadata: _data.contractTokenMetadata
319
+ contractTokenMetadata: _data.contractTokenMetadata,
320
+ taskID: _data.taskID
195
321
  };
196
322
  });
197
323
  }, error => {
@@ -245,7 +371,8 @@ class Metadata {
245
371
  return this.fetch(this.url('GetContractInfo'), createHTTPRequest(args, headers, signal)).then(res => {
246
372
  return buildResponse(res).then(_data => {
247
373
  return {
248
- contractInfo: _data.contractInfo
374
+ contractInfo: _data.contractInfo,
375
+ taskID: _data.taskID
249
376
  };
250
377
  });
251
378
  }, error => {
@@ -258,7 +385,8 @@ class Metadata {
258
385
  return this.fetch(this.url('GetContractInfoBatch'), createHTTPRequest(args, headers, signal)).then(res => {
259
386
  return buildResponse(res).then(_data => {
260
387
  return {
261
- contractInfoMap: _data.contractInfoMap
388
+ contractInfoMap: _data.contractInfoMap,
389
+ taskID: _data.taskID
262
390
  };
263
391
  });
264
392
  }, error => {
@@ -507,7 +635,7 @@ class Metadata {
507
635
  });
508
636
  });
509
637
  };
510
- this.hostname = hostname;
638
+ this.hostname = hostname.replace(/\/*$/, '');
511
639
  this.fetch = (input, init) => fetch(input, init);
512
640
  }
513
641
  url(name) {
@@ -798,7 +926,7 @@ class Collections {
798
926
  });
799
927
  });
800
928
  };
801
- this.hostname = hostname;
929
+ this.hostname = hostname.replace(/\/*$/, '');
802
930
  this.fetch = (input, init) => fetch(input, init);
803
931
  }
804
932
  url(name) {
@@ -876,7 +1004,7 @@ class Admin {
876
1004
  });
877
1005
  });
878
1006
  };
879
- this.hostname = hostname;
1007
+ this.hostname = hostname.replace(/\/*$/, '');
880
1008
  this.fetch = (input, init) => fetch(input, init);
881
1009
  }
882
1010
  url(name) {
@@ -884,11 +1012,13 @@ class Admin {
884
1012
  }
885
1013
  }
886
1014
  const createHTTPRequest = (body = {}, headers = {}, signal = null) => {
1015
+ const reqHeaders = _extends({}, headers, {
1016
+ 'Content-Type': 'application/json'
1017
+ });
1018
+ reqHeaders[WebrpcHeader] = WebrpcHeaderValue;
887
1019
  return {
888
1020
  method: 'POST',
889
- headers: _extends({}, headers, {
890
- 'Content-Type': 'application/json'
891
- }),
1021
+ headers: reqHeaders,
892
1022
  body: JSON.stringify(body || {}),
893
1023
  signal
894
1024
  };
@@ -1244,15 +1374,18 @@ exports.QueryFailedError = QueryFailedError;
1244
1374
  exports.RateLimitedError = RateLimitedError;
1245
1375
  exports.RequestConflictError = RequestConflictError;
1246
1376
  exports.RequiredArgumentError = RequiredArgumentError;
1377
+ exports.ResourceStatus = ResourceStatus;
1247
1378
  exports.SequenceCollections = SequenceCollections;
1248
1379
  exports.SequenceMetadata = SequenceMetadata;
1249
1380
  exports.SessionExpiredError = SessionExpiredError;
1381
+ exports.Source = Source;
1250
1382
  exports.SwapType = SwapType;
1251
1383
  exports.TaskStatus = TaskStatus;
1252
1384
  exports.TimeoutError = TimeoutError;
1253
1385
  exports.TokenDirectoryDisabledError = TokenDirectoryDisabledError;
1254
1386
  exports.UnauthorizedError = UnauthorizedError;
1255
1387
  exports.ValidationFailedError = ValidationFailedError;
1388
+ exports.VersionFromHeader = VersionFromHeader;
1256
1389
  exports.WebRPCSchemaHash = WebRPCSchemaHash;
1257
1390
  exports.WebRPCSchemaVersion = WebRPCSchemaVersion;
1258
1391
  exports.WebRPCVersion = WebRPCVersion;
@@ -1263,6 +1396,8 @@ exports.WebrpcBadRouteError = WebrpcBadRouteError;
1263
1396
  exports.WebrpcClientDisconnectedError = WebrpcClientDisconnectedError;
1264
1397
  exports.WebrpcEndpointError = WebrpcEndpointError;
1265
1398
  exports.WebrpcError = WebrpcError;
1399
+ exports.WebrpcHeader = WebrpcHeader;
1400
+ exports.WebrpcHeaderValue = WebrpcHeaderValue;
1266
1401
  exports.WebrpcInternalErrorError = WebrpcInternalErrorError;
1267
1402
  exports.WebrpcRequestFailedError = WebrpcRequestFailedError;
1268
1403
  exports.WebrpcServerPanicError = WebrpcServerPanicError;