@0xsequence/metadata 1.8.7 → 1.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.
@@ -1,2 +1,2 @@
1
1
  export * from "./declarations/src/index";
2
- //# sourceMappingURL=0xsequence-metadata.cjs.d.ts.map
2
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMHhzZXF1ZW5jZS1tZXRhZGF0YS5janMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4vZGVjbGFyYXRpb25zL3NyYy9pbmRleC5kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIn0=
@@ -18,9 +18,9 @@ function _extends() {
18
18
  }
19
19
 
20
20
  /* eslint-disable */
21
- // sequence-metadata v0.4.0 ef61b3481a4dd4aa5b6a283701d4c15001552e0e
21
+ // sequence-metadata v0.4.0 4abf3a2d23aa0f4c036e7392ac23919dc611f1c3
22
22
  // --
23
- // Code generated by webrpc-gen@v0.12.x-dev with typescript@v0.10.0 generator. DO NOT EDIT.
23
+ // Code generated by webrpc-gen@v0.14.0-dev with typescript@v0.10.0 generator. DO NOT EDIT.
24
24
  //
25
25
  // webrpc-gen -schema=metadata.ridl -target=typescript@v0.10.0 -client -out=./clients/metadata.gen.ts
26
26
 
@@ -31,7 +31,7 @@ const WebRPCVersion = 'v1';
31
31
  const WebRPCSchemaVersion = 'v0.4.0';
32
32
 
33
33
  // Schema hash generated from your RIDL schema
34
- const WebRPCSchemaHash = 'ef61b3481a4dd4aa5b6a283701d4c15001552e0e';
34
+ const WebRPCSchemaHash = '4abf3a2d23aa0f4c036e7392ac23919dc611f1c3';
35
35
 
36
36
  //
37
37
  // Types
@@ -62,6 +62,14 @@ let SortOrder = /*#__PURE__*/function (SortOrder) {
62
62
  SortOrder["ASC"] = "ASC";
63
63
  return SortOrder;
64
64
  }({});
65
+ let TaskStatus = /*#__PURE__*/function (TaskStatus) {
66
+ TaskStatus["PENDING"] = "PENDING";
67
+ TaskStatus["PAUSED"] = "PAUSED";
68
+ TaskStatus["FAILED"] = "FAILED";
69
+ TaskStatus["COMPLETED"] = "COMPLETED";
70
+ TaskStatus["DISABLED"] = "DISABLED";
71
+ return TaskStatus;
72
+ }({});
65
73
  //
66
74
  // Client
67
75
  //
@@ -106,8 +114,17 @@ class Metadata {
106
114
  });
107
115
  });
108
116
  };
109
- this.refreshTokenMetadata = (args, headers) => {
110
- return this.fetch(this.url('RefreshTokenMetadata'), createHTTPRequest(args, headers)).then(res => {
117
+ this.enqueueTokensForRefresh = (args, headers) => {
118
+ return this.fetch(this.url('EnqueueTokensForRefresh'), createHTTPRequest(args, headers)).then(res => {
119
+ return buildResponse(res).then(_data => {
120
+ return {
121
+ taskId: _data.taskId
122
+ };
123
+ });
124
+ });
125
+ };
126
+ this.getTokenRefreshStatus = (args, headers) => {
127
+ return this.fetch(this.url('GetTokenRefreshStatus'), createHTTPRequest(args, headers)).then(res => {
111
128
  return buildResponse(res).then(_data => {
112
129
  return {
113
130
  status: _data.status
@@ -115,6 +132,26 @@ class Metadata {
115
132
  });
116
133
  });
117
134
  };
135
+ this.getTokenRefreshResult = (args, headers) => {
136
+ return this.fetch(this.url('GetTokenRefreshResult'), createHTTPRequest(args, headers)).then(res => {
137
+ return buildResponse(res).then(_data => {
138
+ return {
139
+ status: _data.status,
140
+ tokens: _data.tokens,
141
+ failureReasons: _data.failureReasons
142
+ };
143
+ });
144
+ });
145
+ };
146
+ this.cancelRefreshJob = (args, headers) => {
147
+ return this.fetch(this.url('CancelRefreshJob'), createHTTPRequest(args, headers)).then(res => {
148
+ return buildResponse(res).then(_data => {
149
+ return {
150
+ ok: _data.ok
151
+ };
152
+ });
153
+ });
154
+ };
118
155
  this.getTokenMetadataBatch = (args, headers) => {
119
156
  return this.fetch(this.url('GetTokenMetadataBatch'), createHTTPRequest(args, headers)).then(res => {
120
157
  return buildResponse(res).then(_data => {
@@ -235,6 +272,42 @@ class Metadata {
235
272
  });
236
273
  });
237
274
  };
275
+ this.addContractToMintMonitor = (args, headers) => {
276
+ return this.fetch(this.url('AddContractToMintMonitor'), createHTTPRequest(args, headers)).then(res => {
277
+ return buildResponse(res).then(_data => {
278
+ return {
279
+ ok: _data.ok
280
+ };
281
+ });
282
+ });
283
+ };
284
+ this.removeContractFromMintMonitor = (args, headers) => {
285
+ return this.fetch(this.url('RemoveContractFromMintMonitor'), createHTTPRequest(args, headers)).then(res => {
286
+ return buildResponse(res).then(_data => {
287
+ return {
288
+ ok: _data.ok
289
+ };
290
+ });
291
+ });
292
+ };
293
+ this.mintMonitorJobStatus = (args, headers) => {
294
+ return this.fetch(this.url('MintMonitorJobStatus'), createHTTPRequest(args, headers)).then(res => {
295
+ return buildResponse(res).then(_data => {
296
+ return {
297
+ task: _data.task
298
+ };
299
+ });
300
+ });
301
+ };
302
+ this.mintMonitorTriggerJob = (args, headers) => {
303
+ return this.fetch(this.url('MintMonitorTriggerJob'), createHTTPRequest(args, headers)).then(res => {
304
+ return buildResponse(res).then(_data => {
305
+ return {
306
+ ok: _data.ok
307
+ };
308
+ });
309
+ });
310
+ };
238
311
  this.hostname = hostname;
239
312
  this.fetch = (input, init) => fetch(input, init);
240
313
  }
@@ -303,6 +376,7 @@ exports.PropertyType = PropertyType;
303
376
  exports.SequenceMetadata = SequenceMetadata;
304
377
  exports.SortOrder = SortOrder;
305
378
  exports.SwapType = SwapType;
379
+ exports.TaskStatus = TaskStatus;
306
380
  exports.WebRPCSchemaHash = WebRPCSchemaHash;
307
381
  exports.WebRPCSchemaVersion = WebRPCSchemaVersion;
308
382
  exports.WebRPCVersion = WebRPCVersion;
@@ -18,9 +18,9 @@ function _extends() {
18
18
  }
19
19
 
20
20
  /* eslint-disable */
21
- // sequence-metadata v0.4.0 ef61b3481a4dd4aa5b6a283701d4c15001552e0e
21
+ // sequence-metadata v0.4.0 4abf3a2d23aa0f4c036e7392ac23919dc611f1c3
22
22
  // --
23
- // Code generated by webrpc-gen@v0.12.x-dev with typescript@v0.10.0 generator. DO NOT EDIT.
23
+ // Code generated by webrpc-gen@v0.14.0-dev with typescript@v0.10.0 generator. DO NOT EDIT.
24
24
  //
25
25
  // webrpc-gen -schema=metadata.ridl -target=typescript@v0.10.0 -client -out=./clients/metadata.gen.ts
26
26
 
@@ -31,7 +31,7 @@ const WebRPCVersion = 'v1';
31
31
  const WebRPCSchemaVersion = 'v0.4.0';
32
32
 
33
33
  // Schema hash generated from your RIDL schema
34
- const WebRPCSchemaHash = 'ef61b3481a4dd4aa5b6a283701d4c15001552e0e';
34
+ const WebRPCSchemaHash = '4abf3a2d23aa0f4c036e7392ac23919dc611f1c3';
35
35
 
36
36
  //
37
37
  // Types
@@ -62,6 +62,14 @@ let SortOrder = /*#__PURE__*/function (SortOrder) {
62
62
  SortOrder["ASC"] = "ASC";
63
63
  return SortOrder;
64
64
  }({});
65
+ let TaskStatus = /*#__PURE__*/function (TaskStatus) {
66
+ TaskStatus["PENDING"] = "PENDING";
67
+ TaskStatus["PAUSED"] = "PAUSED";
68
+ TaskStatus["FAILED"] = "FAILED";
69
+ TaskStatus["COMPLETED"] = "COMPLETED";
70
+ TaskStatus["DISABLED"] = "DISABLED";
71
+ return TaskStatus;
72
+ }({});
65
73
  //
66
74
  // Client
67
75
  //
@@ -106,8 +114,17 @@ class Metadata {
106
114
  });
107
115
  });
108
116
  };
109
- this.refreshTokenMetadata = (args, headers) => {
110
- return this.fetch(this.url('RefreshTokenMetadata'), createHTTPRequest(args, headers)).then(res => {
117
+ this.enqueueTokensForRefresh = (args, headers) => {
118
+ return this.fetch(this.url('EnqueueTokensForRefresh'), createHTTPRequest(args, headers)).then(res => {
119
+ return buildResponse(res).then(_data => {
120
+ return {
121
+ taskId: _data.taskId
122
+ };
123
+ });
124
+ });
125
+ };
126
+ this.getTokenRefreshStatus = (args, headers) => {
127
+ return this.fetch(this.url('GetTokenRefreshStatus'), createHTTPRequest(args, headers)).then(res => {
111
128
  return buildResponse(res).then(_data => {
112
129
  return {
113
130
  status: _data.status
@@ -115,6 +132,26 @@ class Metadata {
115
132
  });
116
133
  });
117
134
  };
135
+ this.getTokenRefreshResult = (args, headers) => {
136
+ return this.fetch(this.url('GetTokenRefreshResult'), createHTTPRequest(args, headers)).then(res => {
137
+ return buildResponse(res).then(_data => {
138
+ return {
139
+ status: _data.status,
140
+ tokens: _data.tokens,
141
+ failureReasons: _data.failureReasons
142
+ };
143
+ });
144
+ });
145
+ };
146
+ this.cancelRefreshJob = (args, headers) => {
147
+ return this.fetch(this.url('CancelRefreshJob'), createHTTPRequest(args, headers)).then(res => {
148
+ return buildResponse(res).then(_data => {
149
+ return {
150
+ ok: _data.ok
151
+ };
152
+ });
153
+ });
154
+ };
118
155
  this.getTokenMetadataBatch = (args, headers) => {
119
156
  return this.fetch(this.url('GetTokenMetadataBatch'), createHTTPRequest(args, headers)).then(res => {
120
157
  return buildResponse(res).then(_data => {
@@ -235,6 +272,42 @@ class Metadata {
235
272
  });
236
273
  });
237
274
  };
275
+ this.addContractToMintMonitor = (args, headers) => {
276
+ return this.fetch(this.url('AddContractToMintMonitor'), createHTTPRequest(args, headers)).then(res => {
277
+ return buildResponse(res).then(_data => {
278
+ return {
279
+ ok: _data.ok
280
+ };
281
+ });
282
+ });
283
+ };
284
+ this.removeContractFromMintMonitor = (args, headers) => {
285
+ return this.fetch(this.url('RemoveContractFromMintMonitor'), createHTTPRequest(args, headers)).then(res => {
286
+ return buildResponse(res).then(_data => {
287
+ return {
288
+ ok: _data.ok
289
+ };
290
+ });
291
+ });
292
+ };
293
+ this.mintMonitorJobStatus = (args, headers) => {
294
+ return this.fetch(this.url('MintMonitorJobStatus'), createHTTPRequest(args, headers)).then(res => {
295
+ return buildResponse(res).then(_data => {
296
+ return {
297
+ task: _data.task
298
+ };
299
+ });
300
+ });
301
+ };
302
+ this.mintMonitorTriggerJob = (args, headers) => {
303
+ return this.fetch(this.url('MintMonitorTriggerJob'), createHTTPRequest(args, headers)).then(res => {
304
+ return buildResponse(res).then(_data => {
305
+ return {
306
+ ok: _data.ok
307
+ };
308
+ });
309
+ });
310
+ };
238
311
  this.hostname = hostname;
239
312
  this.fetch = (input, init) => fetch(input, init);
240
313
  }
@@ -303,6 +376,7 @@ exports.PropertyType = PropertyType;
303
376
  exports.SequenceMetadata = SequenceMetadata;
304
377
  exports.SortOrder = SortOrder;
305
378
  exports.SwapType = SwapType;
379
+ exports.TaskStatus = TaskStatus;
306
380
  exports.WebRPCSchemaHash = WebRPCSchemaHash;
307
381
  exports.WebRPCSchemaVersion = WebRPCSchemaVersion;
308
382
  exports.WebRPCVersion = WebRPCVersion;
@@ -14,9 +14,9 @@ function _extends() {
14
14
  }
15
15
 
16
16
  /* eslint-disable */
17
- // sequence-metadata v0.4.0 ef61b3481a4dd4aa5b6a283701d4c15001552e0e
17
+ // sequence-metadata v0.4.0 4abf3a2d23aa0f4c036e7392ac23919dc611f1c3
18
18
  // --
19
- // Code generated by webrpc-gen@v0.12.x-dev with typescript@v0.10.0 generator. DO NOT EDIT.
19
+ // Code generated by webrpc-gen@v0.14.0-dev with typescript@v0.10.0 generator. DO NOT EDIT.
20
20
  //
21
21
  // webrpc-gen -schema=metadata.ridl -target=typescript@v0.10.0 -client -out=./clients/metadata.gen.ts
22
22
 
@@ -27,7 +27,7 @@ const WebRPCVersion = 'v1';
27
27
  const WebRPCSchemaVersion = 'v0.4.0';
28
28
 
29
29
  // Schema hash generated from your RIDL schema
30
- const WebRPCSchemaHash = 'ef61b3481a4dd4aa5b6a283701d4c15001552e0e';
30
+ const WebRPCSchemaHash = '4abf3a2d23aa0f4c036e7392ac23919dc611f1c3';
31
31
 
32
32
  //
33
33
  // Types
@@ -58,6 +58,14 @@ let SortOrder = /*#__PURE__*/function (SortOrder) {
58
58
  SortOrder["ASC"] = "ASC";
59
59
  return SortOrder;
60
60
  }({});
61
+ let TaskStatus = /*#__PURE__*/function (TaskStatus) {
62
+ TaskStatus["PENDING"] = "PENDING";
63
+ TaskStatus["PAUSED"] = "PAUSED";
64
+ TaskStatus["FAILED"] = "FAILED";
65
+ TaskStatus["COMPLETED"] = "COMPLETED";
66
+ TaskStatus["DISABLED"] = "DISABLED";
67
+ return TaskStatus;
68
+ }({});
61
69
  //
62
70
  // Client
63
71
  //
@@ -102,8 +110,17 @@ class Metadata {
102
110
  });
103
111
  });
104
112
  };
105
- this.refreshTokenMetadata = (args, headers) => {
106
- return this.fetch(this.url('RefreshTokenMetadata'), createHTTPRequest(args, headers)).then(res => {
113
+ this.enqueueTokensForRefresh = (args, headers) => {
114
+ return this.fetch(this.url('EnqueueTokensForRefresh'), createHTTPRequest(args, headers)).then(res => {
115
+ return buildResponse(res).then(_data => {
116
+ return {
117
+ taskId: _data.taskId
118
+ };
119
+ });
120
+ });
121
+ };
122
+ this.getTokenRefreshStatus = (args, headers) => {
123
+ return this.fetch(this.url('GetTokenRefreshStatus'), createHTTPRequest(args, headers)).then(res => {
107
124
  return buildResponse(res).then(_data => {
108
125
  return {
109
126
  status: _data.status
@@ -111,6 +128,26 @@ class Metadata {
111
128
  });
112
129
  });
113
130
  };
131
+ this.getTokenRefreshResult = (args, headers) => {
132
+ return this.fetch(this.url('GetTokenRefreshResult'), createHTTPRequest(args, headers)).then(res => {
133
+ return buildResponse(res).then(_data => {
134
+ return {
135
+ status: _data.status,
136
+ tokens: _data.tokens,
137
+ failureReasons: _data.failureReasons
138
+ };
139
+ });
140
+ });
141
+ };
142
+ this.cancelRefreshJob = (args, headers) => {
143
+ return this.fetch(this.url('CancelRefreshJob'), createHTTPRequest(args, headers)).then(res => {
144
+ return buildResponse(res).then(_data => {
145
+ return {
146
+ ok: _data.ok
147
+ };
148
+ });
149
+ });
150
+ };
114
151
  this.getTokenMetadataBatch = (args, headers) => {
115
152
  return this.fetch(this.url('GetTokenMetadataBatch'), createHTTPRequest(args, headers)).then(res => {
116
153
  return buildResponse(res).then(_data => {
@@ -231,6 +268,42 @@ class Metadata {
231
268
  });
232
269
  });
233
270
  };
271
+ this.addContractToMintMonitor = (args, headers) => {
272
+ return this.fetch(this.url('AddContractToMintMonitor'), createHTTPRequest(args, headers)).then(res => {
273
+ return buildResponse(res).then(_data => {
274
+ return {
275
+ ok: _data.ok
276
+ };
277
+ });
278
+ });
279
+ };
280
+ this.removeContractFromMintMonitor = (args, headers) => {
281
+ return this.fetch(this.url('RemoveContractFromMintMonitor'), createHTTPRequest(args, headers)).then(res => {
282
+ return buildResponse(res).then(_data => {
283
+ return {
284
+ ok: _data.ok
285
+ };
286
+ });
287
+ });
288
+ };
289
+ this.mintMonitorJobStatus = (args, headers) => {
290
+ return this.fetch(this.url('MintMonitorJobStatus'), createHTTPRequest(args, headers)).then(res => {
291
+ return buildResponse(res).then(_data => {
292
+ return {
293
+ task: _data.task
294
+ };
295
+ });
296
+ });
297
+ };
298
+ this.mintMonitorTriggerJob = (args, headers) => {
299
+ return this.fetch(this.url('MintMonitorTriggerJob'), createHTTPRequest(args, headers)).then(res => {
300
+ return buildResponse(res).then(_data => {
301
+ return {
302
+ ok: _data.ok
303
+ };
304
+ });
305
+ });
306
+ };
234
307
  this.hostname = hostname;
235
308
  this.fetch = (input, init) => fetch(input, init);
236
309
  }
@@ -293,4 +366,4 @@ class SequenceMetadata extends Metadata {
293
366
  }
294
367
  }
295
368
 
296
- export { ContractType, Metadata, PropertyType, SequenceMetadata, SortOrder, SwapType, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion };
369
+ export { ContractType, Metadata, PropertyType, SequenceMetadata, SortOrder, SwapType, TaskStatus, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion };
@@ -1,6 +1,6 @@
1
1
  export declare const WebRPCVersion = "v1";
2
2
  export declare const WebRPCSchemaVersion = "v0.4.0";
3
- export declare const WebRPCSchemaHash = "ef61b3481a4dd4aa5b6a283701d4c15001552e0e";
3
+ export declare const WebRPCSchemaHash = "4abf3a2d23aa0f4c036e7392ac23919dc611f1c3";
4
4
  export declare enum ContractType {
5
5
  UNKNOWN = "UNKNOWN",
6
6
  ERC20 = "ERC20",
@@ -22,6 +22,13 @@ export declare enum SortOrder {
22
22
  DESC = "DESC",
23
23
  ASC = "ASC"
24
24
  }
25
+ export declare enum TaskStatus {
26
+ PENDING = "PENDING",
27
+ PAUSED = "PAUSED",
28
+ FAILED = "FAILED",
29
+ COMPLETED = "COMPLETED",
30
+ DISABLED = "DISABLED"
31
+ }
25
32
  export interface Version {
26
33
  webrpcVersion: string;
27
34
  schemaVersion: string;
@@ -138,12 +145,31 @@ export interface SortBy {
138
145
  column: string;
139
146
  order: SortOrder;
140
147
  }
148
+ export interface TaskRunner {
149
+ id: number;
150
+ workGroup: string;
151
+ runAt: string;
152
+ }
153
+ export interface Task {
154
+ id: number;
155
+ queue: string;
156
+ status: TaskStatus;
157
+ try: number;
158
+ runAt?: string;
159
+ lastRanAt?: string;
160
+ createdAt?: string;
161
+ payload: Array<string>;
162
+ hash?: string;
163
+ }
141
164
  export interface Metadata {
142
165
  ping(headers?: object): Promise<PingReturn>;
143
166
  version(headers?: object): Promise<VersionReturn>;
144
167
  runtimeStatus(headers?: object): Promise<RuntimeStatusReturn>;
145
168
  getTokenMetadata(args: GetTokenMetadataArgs, headers?: object): Promise<GetTokenMetadataReturn>;
146
- refreshTokenMetadata(args: RefreshTokenMetadataArgs, headers?: object): Promise<RefreshTokenMetadataReturn>;
169
+ enqueueTokensForRefresh(args: EnqueueTokensForRefreshArgs, headers?: object): Promise<EnqueueTokensForRefreshReturn>;
170
+ getTokenRefreshStatus(args: GetTokenRefreshStatusArgs, headers?: object): Promise<GetTokenRefreshStatusReturn>;
171
+ getTokenRefreshResult(args: GetTokenRefreshResultArgs, headers?: object): Promise<GetTokenRefreshResultReturn>;
172
+ cancelRefreshJob(args: CancelRefreshJobArgs, headers?: object): Promise<CancelRefreshJobReturn>;
147
173
  getTokenMetadataBatch(args: GetTokenMetadataBatchArgs, headers?: object): Promise<GetTokenMetadataBatchReturn>;
148
174
  searchTokenMetadata(args: SearchTokenMetadataArgs, headers?: object): Promise<SearchTokenMetadataReturn>;
149
175
  searchTokenIDs(args: SearchTokenIDsArgs, headers?: object): Promise<SearchTokenIDsReturn>;
@@ -157,6 +183,10 @@ export interface Metadata {
157
183
  getNiftyswapTokenQuantity(args: GetNiftyswapTokenQuantityArgs, headers?: object): Promise<GetNiftyswapTokenQuantityReturn>;
158
184
  getNiftyswapUnitPrices(args: GetNiftyswapUnitPricesArgs, headers?: object): Promise<GetNiftyswapUnitPricesReturn>;
159
185
  getNiftyswapUnitPricesWithQuantities(args: GetNiftyswapUnitPricesWithQuantitiesArgs, headers?: object): Promise<GetNiftyswapUnitPricesWithQuantitiesReturn>;
186
+ addContractToMintMonitor(args: AddContractToMintMonitorArgs, headers?: object): Promise<AddContractToMintMonitorReturn>;
187
+ removeContractFromMintMonitor(args: RemoveContractFromMintMonitorArgs, headers?: object): Promise<RemoveContractFromMintMonitorReturn>;
188
+ mintMonitorJobStatus(args: MintMonitorJobStatusArgs, headers?: object): Promise<MintMonitorJobStatusReturn>;
189
+ mintMonitorTriggerJob(args: MintMonitorTriggerJobArgs, headers?: object): Promise<MintMonitorTriggerJobReturn>;
160
190
  }
161
191
  export interface PingArgs {
162
192
  }
@@ -181,16 +211,38 @@ export interface GetTokenMetadataArgs {
181
211
  export interface GetTokenMetadataReturn {
182
212
  tokenMetadata: Array<TokenMetadata>;
183
213
  }
184
- export interface RefreshTokenMetadataArgs {
214
+ export interface EnqueueTokensForRefreshArgs {
185
215
  chainID: string;
186
216
  contractAddress: string;
187
217
  tokenIDs?: Array<string>;
188
218
  refreshAll?: boolean;
189
219
  }
190
- export interface RefreshTokenMetadataReturn {
191
- status: {
220
+ export interface EnqueueTokensForRefreshReturn {
221
+ taskId: number;
222
+ }
223
+ export interface GetTokenRefreshStatusArgs {
224
+ taskId: number;
225
+ }
226
+ export interface GetTokenRefreshStatusReturn {
227
+ status: TaskStatus;
228
+ }
229
+ export interface GetTokenRefreshResultArgs {
230
+ taskId: number;
231
+ }
232
+ export interface GetTokenRefreshResultReturn {
233
+ status: TaskStatus;
234
+ tokens: {
192
235
  [key: string]: boolean;
193
236
  };
237
+ failureReasons: {
238
+ [key: string]: string;
239
+ };
240
+ }
241
+ export interface CancelRefreshJobArgs {
242
+ taskId: number;
243
+ }
244
+ export interface CancelRefreshJobReturn {
245
+ ok: boolean;
194
246
  }
195
247
  export interface GetTokenMetadataBatchArgs {
196
248
  chainID: string;
@@ -310,6 +362,34 @@ export interface GetNiftyswapUnitPricesWithQuantitiesReturn {
310
362
  [key: string]: GetNiftyswapUnitPricesResponse;
311
363
  };
312
364
  }
365
+ export interface AddContractToMintMonitorArgs {
366
+ chainID: string;
367
+ contractAddress: string;
368
+ }
369
+ export interface AddContractToMintMonitorReturn {
370
+ ok: boolean;
371
+ }
372
+ export interface RemoveContractFromMintMonitorArgs {
373
+ chainID: string;
374
+ contractAddress: string;
375
+ }
376
+ export interface RemoveContractFromMintMonitorReturn {
377
+ ok: boolean;
378
+ }
379
+ export interface MintMonitorJobStatusArgs {
380
+ chainID: string;
381
+ contractAddress: string;
382
+ }
383
+ export interface MintMonitorJobStatusReturn {
384
+ task: Task;
385
+ }
386
+ export interface MintMonitorTriggerJobArgs {
387
+ chainID: string;
388
+ contractAddress: string;
389
+ }
390
+ export interface MintMonitorTriggerJobReturn {
391
+ ok: boolean;
392
+ }
313
393
  export declare class Metadata implements Metadata {
314
394
  protected hostname: string;
315
395
  protected fetch: Fetch;
@@ -320,7 +400,10 @@ export declare class Metadata implements Metadata {
320
400
  version: (headers?: object | undefined) => Promise<VersionReturn>;
321
401
  runtimeStatus: (headers?: object | undefined) => Promise<RuntimeStatusReturn>;
322
402
  getTokenMetadata: (args: GetTokenMetadataArgs, headers?: object | undefined) => Promise<GetTokenMetadataReturn>;
323
- refreshTokenMetadata: (args: RefreshTokenMetadataArgs, headers?: object | undefined) => Promise<RefreshTokenMetadataReturn>;
403
+ enqueueTokensForRefresh: (args: EnqueueTokensForRefreshArgs, headers?: object | undefined) => Promise<EnqueueTokensForRefreshReturn>;
404
+ getTokenRefreshStatus: (args: GetTokenRefreshStatusArgs, headers?: object | undefined) => Promise<GetTokenRefreshStatusReturn>;
405
+ getTokenRefreshResult: (args: GetTokenRefreshResultArgs, headers?: object | undefined) => Promise<GetTokenRefreshResultReturn>;
406
+ cancelRefreshJob: (args: CancelRefreshJobArgs, headers?: object | undefined) => Promise<CancelRefreshJobReturn>;
324
407
  getTokenMetadataBatch: (args: GetTokenMetadataBatchArgs, headers?: object | undefined) => Promise<GetTokenMetadataBatchReturn>;
325
408
  searchTokenMetadata: (args: SearchTokenMetadataArgs, headers?: object | undefined) => Promise<SearchTokenMetadataReturn>;
326
409
  searchTokenIDs: (args: SearchTokenIDsArgs, headers?: object | undefined) => Promise<SearchTokenIDsReturn>;
@@ -334,6 +417,10 @@ export declare class Metadata implements Metadata {
334
417
  getNiftyswapTokenQuantity: (args: GetNiftyswapTokenQuantityArgs, headers?: object | undefined) => Promise<GetNiftyswapTokenQuantityReturn>;
335
418
  getNiftyswapUnitPrices: (args: GetNiftyswapUnitPricesArgs, headers?: object | undefined) => Promise<GetNiftyswapUnitPricesReturn>;
336
419
  getNiftyswapUnitPricesWithQuantities: (args: GetNiftyswapUnitPricesWithQuantitiesArgs, headers?: object | undefined) => Promise<GetNiftyswapUnitPricesWithQuantitiesReturn>;
420
+ addContractToMintMonitor: (args: AddContractToMintMonitorArgs, headers?: object | undefined) => Promise<AddContractToMintMonitorReturn>;
421
+ removeContractFromMintMonitor: (args: RemoveContractFromMintMonitorArgs, headers?: object | undefined) => Promise<RemoveContractFromMintMonitorReturn>;
422
+ mintMonitorJobStatus: (args: MintMonitorJobStatusArgs, headers?: object | undefined) => Promise<MintMonitorJobStatusReturn>;
423
+ mintMonitorTriggerJob: (args: MintMonitorTriggerJobArgs, headers?: object | undefined) => Promise<MintMonitorTriggerJobReturn>;
337
424
  }
338
425
  export interface WebRPCError extends Error {
339
426
  code: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/metadata",
3
- "version": "1.8.7",
3
+ "version": "1.9.0",
4
4
  "description": "metadata sub-package for Sequence",
5
5
  "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/metadata",
6
6
  "source": "src/index.ts",
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable */
2
- // sequence-metadata v0.4.0 ef61b3481a4dd4aa5b6a283701d4c15001552e0e
2
+ // sequence-metadata v0.4.0 4abf3a2d23aa0f4c036e7392ac23919dc611f1c3
3
3
  // --
4
- // Code generated by webrpc-gen@v0.12.x-dev with typescript@v0.10.0 generator. DO NOT EDIT.
4
+ // Code generated by webrpc-gen@v0.14.0-dev with typescript@v0.10.0 generator. DO NOT EDIT.
5
5
  //
6
6
  // webrpc-gen -schema=metadata.ridl -target=typescript@v0.10.0 -client -out=./clients/metadata.gen.ts
7
7
 
@@ -12,7 +12,7 @@ export const WebRPCVersion = 'v1'
12
12
  export const WebRPCSchemaVersion = 'v0.4.0'
13
13
 
14
14
  // Schema hash generated from your RIDL schema
15
- export const WebRPCSchemaHash = 'ef61b3481a4dd4aa5b6a283701d4c15001552e0e'
15
+ export const WebRPCSchemaHash = '4abf3a2d23aa0f4c036e7392ac23919dc611f1c3'
16
16
 
17
17
  //
18
18
  // Types
@@ -39,6 +39,13 @@ export enum SortOrder {
39
39
  DESC = 'DESC',
40
40
  ASC = 'ASC'
41
41
  }
42
+ export enum TaskStatus {
43
+ PENDING = 'PENDING',
44
+ PAUSED = 'PAUSED',
45
+ FAILED = 'FAILED',
46
+ COMPLETED = 'COMPLETED',
47
+ DISABLED = 'DISABLED'
48
+ }
42
49
 
43
50
  export interface Version {
44
51
  webrpcVersion: string
@@ -164,12 +171,33 @@ export interface SortBy {
164
171
  order: SortOrder
165
172
  }
166
173
 
174
+ export interface TaskRunner {
175
+ id: number
176
+ workGroup: string
177
+ runAt: string
178
+ }
179
+
180
+ export interface Task {
181
+ id: number
182
+ queue: string
183
+ status: TaskStatus
184
+ try: number
185
+ runAt?: string
186
+ lastRanAt?: string
187
+ createdAt?: string
188
+ payload: Array<string>
189
+ hash?: string
190
+ }
191
+
167
192
  export interface Metadata {
168
193
  ping(headers?: object): Promise<PingReturn>
169
194
  version(headers?: object): Promise<VersionReturn>
170
195
  runtimeStatus(headers?: object): Promise<RuntimeStatusReturn>
171
196
  getTokenMetadata(args: GetTokenMetadataArgs, headers?: object): Promise<GetTokenMetadataReturn>
172
- refreshTokenMetadata(args: RefreshTokenMetadataArgs, headers?: object): Promise<RefreshTokenMetadataReturn>
197
+ enqueueTokensForRefresh(args: EnqueueTokensForRefreshArgs, headers?: object): Promise<EnqueueTokensForRefreshReturn>
198
+ getTokenRefreshStatus(args: GetTokenRefreshStatusArgs, headers?: object): Promise<GetTokenRefreshStatusReturn>
199
+ getTokenRefreshResult(args: GetTokenRefreshResultArgs, headers?: object): Promise<GetTokenRefreshResultReturn>
200
+ cancelRefreshJob(args: CancelRefreshJobArgs, headers?: object): Promise<CancelRefreshJobReturn>
173
201
  getTokenMetadataBatch(args: GetTokenMetadataBatchArgs, headers?: object): Promise<GetTokenMetadataBatchReturn>
174
202
  searchTokenMetadata(args: SearchTokenMetadataArgs, headers?: object): Promise<SearchTokenMetadataReturn>
175
203
  searchTokenIDs(args: SearchTokenIDsArgs, headers?: object): Promise<SearchTokenIDsReturn>
@@ -186,6 +214,13 @@ export interface Metadata {
186
214
  args: GetNiftyswapUnitPricesWithQuantitiesArgs,
187
215
  headers?: object
188
216
  ): Promise<GetNiftyswapUnitPricesWithQuantitiesReturn>
217
+ addContractToMintMonitor(args: AddContractToMintMonitorArgs, headers?: object): Promise<AddContractToMintMonitorReturn>
218
+ removeContractFromMintMonitor(
219
+ args: RemoveContractFromMintMonitorArgs,
220
+ headers?: object
221
+ ): Promise<RemoveContractFromMintMonitorReturn>
222
+ mintMonitorJobStatus(args: MintMonitorJobStatusArgs, headers?: object): Promise<MintMonitorJobStatusReturn>
223
+ mintMonitorTriggerJob(args: MintMonitorTriggerJobArgs, headers?: object): Promise<MintMonitorTriggerJobReturn>
189
224
  }
190
225
 
191
226
  export interface PingArgs {}
@@ -212,15 +247,38 @@ export interface GetTokenMetadataArgs {
212
247
  export interface GetTokenMetadataReturn {
213
248
  tokenMetadata: Array<TokenMetadata>
214
249
  }
215
- export interface RefreshTokenMetadataArgs {
250
+ export interface EnqueueTokensForRefreshArgs {
216
251
  chainID: string
217
252
  contractAddress: string
218
253
  tokenIDs?: Array<string>
219
254
  refreshAll?: boolean
220
255
  }
221
256
 
222
- export interface RefreshTokenMetadataReturn {
223
- status: { [key: string]: boolean }
257
+ export interface EnqueueTokensForRefreshReturn {
258
+ taskId: number
259
+ }
260
+ export interface GetTokenRefreshStatusArgs {
261
+ taskId: number
262
+ }
263
+
264
+ export interface GetTokenRefreshStatusReturn {
265
+ status: TaskStatus
266
+ }
267
+ export interface GetTokenRefreshResultArgs {
268
+ taskId: number
269
+ }
270
+
271
+ export interface GetTokenRefreshResultReturn {
272
+ status: TaskStatus
273
+ tokens: { [key: string]: boolean }
274
+ failureReasons: { [key: string]: string }
275
+ }
276
+ export interface CancelRefreshJobArgs {
277
+ taskId: number
278
+ }
279
+
280
+ export interface CancelRefreshJobReturn {
281
+ ok: boolean
224
282
  }
225
283
  export interface GetTokenMetadataBatchArgs {
226
284
  chainID: string
@@ -339,6 +397,38 @@ export interface GetNiftyswapUnitPricesWithQuantitiesArgs {
339
397
  export interface GetNiftyswapUnitPricesWithQuantitiesReturn {
340
398
  prices: { [key: string]: GetNiftyswapUnitPricesResponse }
341
399
  }
400
+ export interface AddContractToMintMonitorArgs {
401
+ chainID: string
402
+ contractAddress: string
403
+ }
404
+
405
+ export interface AddContractToMintMonitorReturn {
406
+ ok: boolean
407
+ }
408
+ export interface RemoveContractFromMintMonitorArgs {
409
+ chainID: string
410
+ contractAddress: string
411
+ }
412
+
413
+ export interface RemoveContractFromMintMonitorReturn {
414
+ ok: boolean
415
+ }
416
+ export interface MintMonitorJobStatusArgs {
417
+ chainID: string
418
+ contractAddress: string
419
+ }
420
+
421
+ export interface MintMonitorJobStatusReturn {
422
+ task: Task
423
+ }
424
+ export interface MintMonitorTriggerJobArgs {
425
+ chainID: string
426
+ contractAddress: string
427
+ }
428
+
429
+ export interface MintMonitorTriggerJobReturn {
430
+ ok: boolean
431
+ }
342
432
 
343
433
  //
344
434
  // Client
@@ -397,11 +487,43 @@ export class Metadata implements Metadata {
397
487
  })
398
488
  }
399
489
 
400
- refreshTokenMetadata = (args: RefreshTokenMetadataArgs, headers?: object): Promise<RefreshTokenMetadataReturn> => {
401
- return this.fetch(this.url('RefreshTokenMetadata'), createHTTPRequest(args, headers)).then(res => {
490
+ enqueueTokensForRefresh = (args: EnqueueTokensForRefreshArgs, headers?: object): Promise<EnqueueTokensForRefreshReturn> => {
491
+ return this.fetch(this.url('EnqueueTokensForRefresh'), createHTTPRequest(args, headers)).then(res => {
402
492
  return buildResponse(res).then(_data => {
403
493
  return {
404
- status: <{ [key: string]: boolean }>_data.status
494
+ taskId: <number>_data.taskId
495
+ }
496
+ })
497
+ })
498
+ }
499
+
500
+ getTokenRefreshStatus = (args: GetTokenRefreshStatusArgs, headers?: object): Promise<GetTokenRefreshStatusReturn> => {
501
+ return this.fetch(this.url('GetTokenRefreshStatus'), createHTTPRequest(args, headers)).then(res => {
502
+ return buildResponse(res).then(_data => {
503
+ return {
504
+ status: <TaskStatus>_data.status
505
+ }
506
+ })
507
+ })
508
+ }
509
+
510
+ getTokenRefreshResult = (args: GetTokenRefreshResultArgs, headers?: object): Promise<GetTokenRefreshResultReturn> => {
511
+ return this.fetch(this.url('GetTokenRefreshResult'), createHTTPRequest(args, headers)).then(res => {
512
+ return buildResponse(res).then(_data => {
513
+ return {
514
+ status: <TaskStatus>_data.status,
515
+ tokens: <{ [key: string]: boolean }>_data.tokens,
516
+ failureReasons: <{ [key: string]: string }>_data.failureReasons
517
+ }
518
+ })
519
+ })
520
+ }
521
+
522
+ cancelRefreshJob = (args: CancelRefreshJobArgs, headers?: object): Promise<CancelRefreshJobReturn> => {
523
+ return this.fetch(this.url('CancelRefreshJob'), createHTTPRequest(args, headers)).then(res => {
524
+ return buildResponse(res).then(_data => {
525
+ return {
526
+ ok: <boolean>_data.ok
405
527
  }
406
528
  })
407
529
  })
@@ -545,6 +667,49 @@ export class Metadata implements Metadata {
545
667
  })
546
668
  })
547
669
  }
670
+
671
+ addContractToMintMonitor = (args: AddContractToMintMonitorArgs, headers?: object): Promise<AddContractToMintMonitorReturn> => {
672
+ return this.fetch(this.url('AddContractToMintMonitor'), createHTTPRequest(args, headers)).then(res => {
673
+ return buildResponse(res).then(_data => {
674
+ return {
675
+ ok: <boolean>_data.ok
676
+ }
677
+ })
678
+ })
679
+ }
680
+
681
+ removeContractFromMintMonitor = (
682
+ args: RemoveContractFromMintMonitorArgs,
683
+ headers?: object
684
+ ): Promise<RemoveContractFromMintMonitorReturn> => {
685
+ return this.fetch(this.url('RemoveContractFromMintMonitor'), createHTTPRequest(args, headers)).then(res => {
686
+ return buildResponse(res).then(_data => {
687
+ return {
688
+ ok: <boolean>_data.ok
689
+ }
690
+ })
691
+ })
692
+ }
693
+
694
+ mintMonitorJobStatus = (args: MintMonitorJobStatusArgs, headers?: object): Promise<MintMonitorJobStatusReturn> => {
695
+ return this.fetch(this.url('MintMonitorJobStatus'), createHTTPRequest(args, headers)).then(res => {
696
+ return buildResponse(res).then(_data => {
697
+ return {
698
+ task: <Task>_data.task
699
+ }
700
+ })
701
+ })
702
+ }
703
+
704
+ mintMonitorTriggerJob = (args: MintMonitorTriggerJobArgs, headers?: object): Promise<MintMonitorTriggerJobReturn> => {
705
+ return this.fetch(this.url('MintMonitorTriggerJob'), createHTTPRequest(args, headers)).then(res => {
706
+ return buildResponse(res).then(_data => {
707
+ return {
708
+ ok: <boolean>_data.ok
709
+ }
710
+ })
711
+ })
712
+ }
548
713
  }
549
714
 
550
715
  export interface WebRPCError extends Error {
@@ -1 +0,0 @@
1
- {"version":3,"file":"0xsequence-metadata.cjs.d.ts","sourceRoot":"","sources":["./declarations/src/index.d.ts"],"names":[],"mappings":"AAAA"}