@human-protocol/sdk 1.1.17 → 1.1.19

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/src/statistics.ts CHANGED
@@ -58,15 +58,15 @@ import { throwError } from './utils';
58
58
  * ```
59
59
  */
60
60
  export class StatisticsClient {
61
- public network: NetworkData;
61
+ public networkData: NetworkData;
62
62
 
63
63
  /**
64
64
  * **StatisticsClient constructor**
65
65
  *
66
- * @param {NetworkData} network - The network information required to connect to the Statistics contract
66
+ * @param {NetworkData} networkData - The network information required to connect to the Statistics contract
67
67
  */
68
- constructor(network: NetworkData) {
69
- this.network = network;
68
+ constructor(networkData: NetworkData) {
69
+ this.networkData = networkData;
70
70
  }
71
71
 
72
72
  /**
@@ -124,11 +124,11 @@ export class StatisticsClient {
124
124
  try {
125
125
  const { escrowStatistics } = await gqlFetch<{
126
126
  escrowStatistics: EscrowStatisticsData;
127
- }>(this.network.subgraphUrl, GET_ESCROW_STATISTICS_QUERY);
127
+ }>(this.networkData.subgraphUrl, GET_ESCROW_STATISTICS_QUERY);
128
128
 
129
129
  const { eventDayDatas } = await gqlFetch<{
130
130
  eventDayDatas: EventDayData[];
131
- }>(this.network.subgraphUrl, GET_EVENT_DAY_DATA_QUERY(params), {
131
+ }>(this.networkData.subgraphUrl, GET_EVENT_DAY_DATA_QUERY(params), {
132
132
  from: params.from ? params.from.getTime() / 1000 : undefined,
133
133
  to: params.to ? params.to.getTime() / 1000 : undefined,
134
134
  });
@@ -199,7 +199,7 @@ export class StatisticsClient {
199
199
  try {
200
200
  const { eventDayDatas } = await gqlFetch<{
201
201
  eventDayDatas: EventDayData[];
202
- }>(this.network.subgraphUrl, GET_EVENT_DAY_DATA_QUERY(params), {
202
+ }>(this.networkData.subgraphUrl, GET_EVENT_DAY_DATA_QUERY(params), {
203
203
  from: params.from ? params.from.getTime() / 1000 : undefined,
204
204
  to: params.to ? params.to.getTime() / 1000 : undefined,
205
205
  });
@@ -288,7 +288,7 @@ export class StatisticsClient {
288
288
  try {
289
289
  const { eventDayDatas } = await gqlFetch<{
290
290
  eventDayDatas: EventDayData[];
291
- }>(this.network.subgraphUrl, GET_EVENT_DAY_DATA_QUERY(params), {
291
+ }>(this.networkData.subgraphUrl, GET_EVENT_DAY_DATA_QUERY(params), {
292
292
  from: params.from ? params.from.getTime() / 1000 : undefined,
293
293
  to: params.to ? params.to.getTime() / 1000 : undefined,
294
294
  });
@@ -398,15 +398,15 @@ export class StatisticsClient {
398
398
  try {
399
399
  const { hmtokenStatistics } = await gqlFetch<{
400
400
  hmtokenStatistics: HMTStatisticsData;
401
- }>(this.network.subgraphUrl, GET_HMTOKEN_STATISTICS_QUERY);
401
+ }>(this.networkData.subgraphUrl, GET_HMTOKEN_STATISTICS_QUERY);
402
402
 
403
403
  const { holders } = await gqlFetch<{
404
404
  holders: HMTHolderData[];
405
- }>(this.network.subgraphUrl, GET_HOLDERS_QUERY);
405
+ }>(this.networkData.subgraphUrl, GET_HOLDERS_QUERY);
406
406
 
407
407
  const { eventDayDatas } = await gqlFetch<{
408
408
  eventDayDatas: EventDayData[];
409
- }>(this.network.subgraphUrl, GET_EVENT_DAY_DATA_QUERY(params), {
409
+ }>(this.networkData.subgraphUrl, GET_EVENT_DAY_DATA_QUERY(params), {
410
410
  from: params.from ? params.from.getTime() / 1000 : undefined,
411
411
  to: params.to ? params.to.getTime() / 1000 : undefined,
412
412
  });
package/src/storage.ts CHANGED
@@ -217,6 +217,7 @@ export class StorageClient {
217
217
  try {
218
218
  await this.client.putObject(bucket, key, content, {
219
219
  'Content-Type': 'application/json',
220
+ 'Cache-Control': 'no-store',
220
221
  });
221
222
 
222
223
  return {