@quantcdn/quant-client 2.0.6 → 2.0.8

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.
@@ -116,6 +116,13 @@ class QuantClient {
116
116
  if ((filters === null || filters === void 0 ? void 0 : filters.sort_field) != null) {
117
117
  qs.sort_field = filters.sort_field;
118
118
  }
119
+ if ((filters === null || filters === void 0 ? void 0 : filters.quant_type) != null) {
120
+ qs.quant_type = filters.quant_type;
121
+ }
122
+ if ((filters === null || filters === void 0 ? void 0 : filters.page_size) != null) {
123
+ // Ensure page_size is between 1 and 100
124
+ qs.page_size = Math.min(Math.max(1, filters.page_size), 100);
125
+ }
119
126
  return yield this._project.get('global-meta', qs);
120
127
  }),
121
128
  /**
@@ -159,6 +166,9 @@ class QuantClient {
159
166
  if (typeof payload.skipPurge !== 'undefined') {
160
167
  headers['Quant-Skip-Purge'] = 'true';
161
168
  }
169
+ if (typeof payload.headers !== 'undefined') {
170
+ headers['Quant-File-Headers'] = payload.headers;
171
+ }
162
172
  const formData = {
163
173
  file: {
164
174
  value: payload.data,
@@ -25,13 +25,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
25
25
  exports.PaginatedResponse = void 0;
26
26
  class PaginatedResponse {
27
27
  constructor(client, options) {
28
- this.per_page = 10;
28
+ var _a, _b;
29
29
  this.page = 0;
30
30
  this.total = 0;
31
31
  this.hasNext = true;
32
32
  this.client = client;
33
33
  this.request = options;
34
- this.per_page = 10;
34
+ // Use page_size from query parameters or default to 10
35
+ this.per_page = (_b = (_a = this.request.qs) === null || _a === void 0 ? void 0 : _a.page_size) !== null && _b !== void 0 ? _b : 10;
35
36
  this.page = 1;
36
37
  if (typeof this.request.qs !== 'object') {
37
38
  this.request.qs = {};
@@ -22,6 +22,7 @@ export interface FilePayload {
22
22
  data: Buffer;
23
23
  url: string;
24
24
  skipPurge?: boolean;
25
+ headers?: string;
25
26
  }
26
27
  export interface PublishPayload {
27
28
  location: string;
@@ -61,4 +62,6 @@ export interface WafLog {
61
62
  export interface MetaFilters {
62
63
  sort_field: string;
63
64
  sort_direction: string;
65
+ quant_type?: 'edge_function' | 'redirect' | 'content' | 'file';
66
+ page_size?: number;
64
67
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quantcdn/quant-client",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "description": "Client library for API connectivity",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",