@vtex/api 6.45.11-beta.0 → 6.45.11-beta.1

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/CHANGELOG.md CHANGED
@@ -6,10 +6,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
7
 
8
8
  ## [Unreleased]
9
+ ## [6.45.12] - 2022-04-14
10
+ ### Fixed
11
+ - Update sensitive fields list.
12
+ - Remove "error" field.
13
+ - Add missing fields.
14
+
15
+ ## [6.45.11] - 2022-04-08
9
16
 
10
- ## [6.45.11-beta.0] - 2022-04-07
17
+ ### Fixed
11
18
 
12
- ## [6.45.11-beta] - 2022-03-30
19
+ - Add where parameter to the MasterData scroll method
13
20
 
14
21
  ## [6.45.10] - 2022-03-15
15
22
 
@@ -20,7 +20,7 @@ export declare class MasterData extends ExternalClient {
20
20
  pageSize: number;
21
21
  };
22
22
  }>;
23
- scrollDocuments<T>({ dataEntity, fields, mdToken, schema, size, sort }: ScrollInput, tracingConfig?: RequestTracingConfig): Promise<{
23
+ scrollDocuments<T>({ dataEntity, fields, where, mdToken, schema, size, sort }: ScrollInput, tracingConfig?: RequestTracingConfig): Promise<{
24
24
  mdToken: string;
25
25
  data: ScrollResponse<T>;
26
26
  }>;
@@ -77,6 +77,7 @@ interface SearchInput {
77
77
  interface ScrollInput {
78
78
  dataEntity: string;
79
79
  fields: string[];
80
+ where?: string;
80
81
  schema?: string;
81
82
  sort?: string;
82
83
  size?: number;
@@ -176,7 +176,7 @@ class MasterData extends ExternalClient_1.ExternalClient {
176
176
  const paginationInfo = { ...pagination, total };
177
177
  return { data: result.data, pagination: paginationInfo };
178
178
  }
179
- scrollDocuments({ dataEntity, fields, mdToken, schema, size, sort }, tracingConfig) {
179
+ scrollDocuments({ dataEntity, fields, where, mdToken, schema, size, sort }, tracingConfig) {
180
180
  const metric = 'masterdata-scrollDocuments';
181
181
  return this.http
182
182
  .getRaw(routes.scroll(dataEntity), {
@@ -188,6 +188,7 @@ class MasterData extends ExternalClient_1.ExternalClient {
188
188
  _size: size,
189
189
  _sort: sort,
190
190
  _token: mdToken,
191
+ _where: where,
191
192
  },
192
193
  tracing: {
193
194
  requestSpanNameSuffix: metric,
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const graphql_upload_1 = require("graphql-upload");
4
- const graphqlUpload = graphql_upload_1.graphqlUploadKoa({
3
+ const graphql_upload_minimal_1 = require("graphql-upload-minimal");
4
+ const graphqlUpload = graphql_upload_minimal_1.graphqlUploadKoa({
5
5
  maxFieldSize: 1e6,
6
6
  maxFileSize: 4 * 1e6,
7
7
  maxFiles: 10,
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const graphql_upload_1 = require("graphql-upload");
3
+ const graphql_upload_minimal_1 = require("graphql-upload-minimal");
4
4
  const ramda_1 = require("ramda");
5
5
  const ioUpload_1 = require("./ioUpload");
6
6
  const sanitizedString_1 = require("./sanitizedString");
7
7
  exports.nativeResolvers = {
8
8
  'IOSanitizedString': sanitizedString_1.resolvers,
9
9
  'IOUpload': ioUpload_1.resolvers,
10
- 'Upload': graphql_upload_1.GraphQLUpload,
10
+ 'Upload': graphql_upload_minimal_1.GraphQLUpload,
11
11
  };
12
12
  exports.nativeTypeDefs = (metaData) => ramda_1.reduce((acc, scalar) => !metaData[scalar] ? `${acc}\nscalar ${scalar}\n` : acc, '', ramda_1.keys(exports.nativeResolvers));
package/lib/utils/log.js CHANGED
@@ -1,7 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const json_1 = require("./json");
4
- const SENSITIVE_FIELDS = ['authorization', 'cookie', 'vtexidclientautcookie', 'rawheaders', 'x-vtex-credential', 'x-vtex-session', 'error'];
4
+ const SENSITIVE_FIELDS = [
5
+ 'auth',
6
+ 'authorization',
7
+ 'authtoken',
8
+ 'cookie',
9
+ 'proxy-authorization',
10
+ 'rawheaders',
11
+ 'token',
12
+ 'vtexidclientautcookie',
13
+ 'x-vtex-api-appkey',
14
+ 'x-vtex-api-apptoken',
15
+ 'x-vtex-credential',
16
+ 'x-vtex-session',
17
+ ];
5
18
  exports.cleanLog = (log) => {
6
19
  return json_1.cleanJson(log, SENSITIVE_FIELDS);
7
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtex/api",
3
- "version": "6.45.11-beta.0",
3
+ "version": "6.45.11-beta.1",
4
4
  "description": "VTEX I/O API client",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -65,7 +65,7 @@
65
65
  "fs-extra": "^7.0.0",
66
66
  "graphql": "^14.5.8",
67
67
  "graphql-tools": "^4.0.6",
68
- "graphql-upload": "^13.0.0",
68
+ "graphql-upload-minimal": "^1.4.0",
69
69
  "jaeger-client": "^3.19.0",
70
70
  "js-base64": "^2.5.1",
71
71
  "koa": "^2.11.0",
@@ -97,7 +97,6 @@
97
97
  "@types/fast-json-stable-stringify": "^2.0.0",
98
98
  "@types/fs-extra": "^5.0.0",
99
99
  "@types/graphql": "^14.5.0",
100
- "@types/graphql-upload": "^8.0.3",
101
100
  "@types/jaeger-client": "^3.18.3",
102
101
  "@types/jest": "^25.1.4",
103
102
  "@types/js-base64": "^2.3.1",