@kard-financial/sdk 4.8.0 → 4.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.
@@ -512,7 +512,7 @@ class TransactionsClient {
512
512
  const _authRequest = yield this._options.authProvider.getAuthRequest();
513
513
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
514
514
  const _response = yield core.fetcher({
515
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/transactions/upload`),
515
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/transactions/uploads`),
516
516
  method: "POST",
517
517
  headers: _headers,
518
518
  contentType: "application/json",
@@ -559,7 +559,7 @@ class TransactionsClient {
559
559
  rawResponse: _response.rawResponse,
560
560
  });
561
561
  case "timeout":
562
- throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/transactions/upload.");
562
+ throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/transactions/uploads.");
563
563
  case "unknown":
564
564
  throw new errors.KardApiError({
565
565
  message: _response.error.errorMessage,
@@ -84,7 +84,7 @@ class RewardsClient {
84
84
  __offers(organizationId_1, userId_1) {
85
85
  return __awaiter(this, arguments, void 0, function* (organizationId, userId, request = {}, requestOptions) {
86
86
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
87
- const { "page[size]": pageSize, "page[after]": pageAfter, "page[before]": pageBefore, "filter[purchaseChannel]": filterPurchaseChannel, "filter[category]": filterCategory, "filter[isTargeted]": filterIsTargeted, sort, include, supportedComponents, } = request;
87
+ const { "page[size]": pageSize, "page[after]": pageAfter, "page[before]": pageBefore, "filter[search]": filterSearch, "filter[purchaseChannel]": filterPurchaseChannel, "filter[category]": filterCategory, "filter[isTargeted]": filterIsTargeted, sort, include, supportedComponents, } = request;
88
88
  const _queryParams = {};
89
89
  if (pageSize != null) {
90
90
  _queryParams["page[size]"] = pageSize.toString();
@@ -95,6 +95,9 @@ class RewardsClient {
95
95
  if (pageBefore != null) {
96
96
  _queryParams["page[before]"] = pageBefore;
97
97
  }
98
+ if (filterSearch != null) {
99
+ _queryParams["filter[search]"] = filterSearch;
100
+ }
98
101
  if (filterPurchaseChannel != null) {
99
102
  _queryParams["filter[purchaseChannel]"] = (0, json_js_1.toJson)(filterPurchaseChannel);
100
103
  }
@@ -11,6 +11,8 @@ export interface GetOffersByUserRequest {
11
11
  "page[size]"?: number;
12
12
  "page[after]"?: string;
13
13
  "page[before]"?: string;
14
+ /** Case-insensitive search string to filter offers by merchant name */
15
+ "filter[search]"?: string;
14
16
  "filter[purchaseChannel]"?: KardApi.PurchaseChannel[];
15
17
  "filter[category]"?: KardApi.CategoryOption;
16
18
  "filter[isTargeted]"?: boolean;
@@ -476,7 +476,7 @@ export class TransactionsClient {
476
476
  const _authRequest = yield this._options.authProvider.getAuthRequest();
477
477
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
478
478
  const _response = yield core.fetcher({
479
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/transactions/upload`),
479
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `/v2/issuers/${core.url.encodePathParam(organizationId)}/transactions/uploads`),
480
480
  method: "POST",
481
481
  headers: _headers,
482
482
  contentType: "application/json",
@@ -523,7 +523,7 @@ export class TransactionsClient {
523
523
  rawResponse: _response.rawResponse,
524
524
  });
525
525
  case "timeout":
526
- throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/transactions/upload.");
526
+ throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/transactions/uploads.");
527
527
  case "unknown":
528
528
  throw new errors.KardApiError({
529
529
  message: _response.error.errorMessage,
@@ -48,7 +48,7 @@ export class RewardsClient {
48
48
  __offers(organizationId_1, userId_1) {
49
49
  return __awaiter(this, arguments, void 0, function* (organizationId, userId, request = {}, requestOptions) {
50
50
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
51
- const { "page[size]": pageSize, "page[after]": pageAfter, "page[before]": pageBefore, "filter[purchaseChannel]": filterPurchaseChannel, "filter[category]": filterCategory, "filter[isTargeted]": filterIsTargeted, sort, include, supportedComponents, } = request;
51
+ const { "page[size]": pageSize, "page[after]": pageAfter, "page[before]": pageBefore, "filter[search]": filterSearch, "filter[purchaseChannel]": filterPurchaseChannel, "filter[category]": filterCategory, "filter[isTargeted]": filterIsTargeted, sort, include, supportedComponents, } = request;
52
52
  const _queryParams = {};
53
53
  if (pageSize != null) {
54
54
  _queryParams["page[size]"] = pageSize.toString();
@@ -59,6 +59,9 @@ export class RewardsClient {
59
59
  if (pageBefore != null) {
60
60
  _queryParams["page[before]"] = pageBefore;
61
61
  }
62
+ if (filterSearch != null) {
63
+ _queryParams["filter[search]"] = filterSearch;
64
+ }
62
65
  if (filterPurchaseChannel != null) {
63
66
  _queryParams["filter[purchaseChannel]"] = toJson(filterPurchaseChannel);
64
67
  }
@@ -11,6 +11,8 @@ export interface GetOffersByUserRequest {
11
11
  "page[size]"?: number;
12
12
  "page[after]"?: string;
13
13
  "page[before]"?: string;
14
+ /** Case-insensitive search string to filter offers by merchant name */
15
+ "filter[search]"?: string;
14
16
  "filter[purchaseChannel]"?: KardApi.PurchaseChannel[];
15
17
  "filter[category]"?: KardApi.CategoryOption;
16
18
  "filter[isTargeted]"?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kard-financial/sdk",
3
- "version": "4.8.0",
3
+ "version": "4.9.0",
4
4
  "private": false,
5
5
  "repository": "github:KardFinancial/kard-node-sdk",
6
6
  "type": "commonjs",