@kard-financial/sdk 14.1.0 → 14.2.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.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/users/resources/rewards/client/Client.d.ts +21 -0
- package/dist/cjs/api/resources/users/resources/rewards/client/Client.js +75 -0
- package/dist/cjs/api/resources/users/resources/rewards/client/requests/GetOffersByPlacementRequest.d.ts +16 -0
- package/dist/cjs/api/resources/users/resources/rewards/client/requests/GetOffersByPlacementRequest.js +3 -0
- package/dist/cjs/api/resources/users/resources/rewards/client/requests/index.d.ts +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/users/resources/rewards/client/Client.d.mts +21 -0
- package/dist/esm/api/resources/users/resources/rewards/client/Client.mjs +75 -0
- package/dist/esm/api/resources/users/resources/rewards/client/requests/GetOffersByPlacementRequest.d.mts +16 -0
- package/dist/esm/api/resources/users/resources/rewards/client/requests/GetOffersByPlacementRequest.mjs +2 -0
- package/dist/esm/api/resources/users/resources/rewards/client/requests/index.d.mts +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +89 -0
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@kard-financial/sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "14.
|
|
47
|
-
"User-Agent": "@kard-financial/sdk/14.
|
|
46
|
+
"X-Fern-SDK-Version": "14.2.0",
|
|
47
|
+
"User-Agent": "@kard-financial/sdk/14.2.0",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -35,6 +35,27 @@ export declare class RewardsClient {
|
|
|
35
35
|
*/
|
|
36
36
|
offers(organizationId: KardApi.OrganizationId, userId: KardApi.UserId, request?: KardApi.users.GetOffersByUserRequest, requestOptions?: RewardsClient.RequestOptions): core.HttpResponsePromise<KardApi.users.OffersResponseObject>;
|
|
37
37
|
private __offers;
|
|
38
|
+
/**
|
|
39
|
+
* Retrieve offers for a placement slot. Returns offers sorted by highest cash back,
|
|
40
|
+
* limited by the placement's available slots.<br/>
|
|
41
|
+
* <b>Required scopes:</b> `rewards:read`
|
|
42
|
+
*
|
|
43
|
+
* @param {KardApi.OrganizationId} organizationId
|
|
44
|
+
* @param {KardApi.UserId} userId
|
|
45
|
+
* @param {string} placementId
|
|
46
|
+
* @param {KardApi.users.GetOffersByPlacementRequest} request
|
|
47
|
+
* @param {RewardsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
48
|
+
*
|
|
49
|
+
* @throws {@link KardApi.InternalServerError}
|
|
50
|
+
* @throws {@link KardApi.InvalidRequest}
|
|
51
|
+
* @throws {@link KardApi.DoesNotExistError}
|
|
52
|
+
* @throws {@link KardApi.UnauthorizedError}
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* await client.users.rewards.placementOffers("organizationId", "userId", "placementId")
|
|
56
|
+
*/
|
|
57
|
+
placementOffers(organizationId: KardApi.OrganizationId, userId: KardApi.UserId, placementId: string, request?: KardApi.users.GetOffersByPlacementRequest, requestOptions?: RewardsClient.RequestOptions): core.HttpResponsePromise<KardApi.users.OffersResponseObject>;
|
|
58
|
+
private __placementOffers;
|
|
38
59
|
/**
|
|
39
60
|
* Retrieve national and local geographic locations that a specified user has eligible in-store offers at. Use this endpoint to build
|
|
40
61
|
* out your [map-specific UX experiences](/2024-10-01/api/getting-started#c-discover-clos-near-you-map-view). Please note
|
|
@@ -139,6 +139,81 @@ class RewardsClient {
|
|
|
139
139
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v2/issuers/{organizationId}/users/{userId}/offers");
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* Retrieve offers for a placement slot. Returns offers sorted by highest cash back,
|
|
144
|
+
* limited by the placement's available slots.<br/>
|
|
145
|
+
* <b>Required scopes:</b> `rewards:read`
|
|
146
|
+
*
|
|
147
|
+
* @param {KardApi.OrganizationId} organizationId
|
|
148
|
+
* @param {KardApi.UserId} userId
|
|
149
|
+
* @param {string} placementId
|
|
150
|
+
* @param {KardApi.users.GetOffersByPlacementRequest} request
|
|
151
|
+
* @param {RewardsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
152
|
+
*
|
|
153
|
+
* @throws {@link KardApi.InternalServerError}
|
|
154
|
+
* @throws {@link KardApi.InvalidRequest}
|
|
155
|
+
* @throws {@link KardApi.DoesNotExistError}
|
|
156
|
+
* @throws {@link KardApi.UnauthorizedError}
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* await client.users.rewards.placementOffers("organizationId", "userId", "placementId")
|
|
160
|
+
*/
|
|
161
|
+
placementOffers(organizationId, userId, placementId, request = {}, requestOptions) {
|
|
162
|
+
return core.HttpResponsePromise.fromPromise(this.__placementOffers(organizationId, userId, placementId, request, requestOptions));
|
|
163
|
+
}
|
|
164
|
+
__placementOffers(organizationId_1, userId_1, placementId_1) {
|
|
165
|
+
return __awaiter(this, arguments, void 0, function* (organizationId, userId, placementId, request = {}, requestOptions) {
|
|
166
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
167
|
+
const { "filter[search]": filterSearch, "filter[purchaseChannel]": filterPurchaseChannel, "filter[category]": filterCategory, "filter[isTargeted]": filterIsTargeted, include, supportedComponents, } = request;
|
|
168
|
+
const _queryParams = {
|
|
169
|
+
"filter[search]": filterSearch,
|
|
170
|
+
"filter[purchaseChannel]": filterPurchaseChannel != null ? (0, json_js_1.toJson)(filterPurchaseChannel) : undefined,
|
|
171
|
+
"filter[category]": filterCategory != null ? filterCategory : undefined,
|
|
172
|
+
"filter[isTargeted]": filterIsTargeted,
|
|
173
|
+
include,
|
|
174
|
+
supportedComponents: Array.isArray(supportedComponents)
|
|
175
|
+
? supportedComponents.map((item) => item)
|
|
176
|
+
: supportedComponents != null
|
|
177
|
+
? supportedComponents
|
|
178
|
+
: undefined,
|
|
179
|
+
};
|
|
180
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
181
|
+
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);
|
|
182
|
+
const _response = yield core.fetcher({
|
|
183
|
+
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)}/users/${core.url.encodePathParam(userId)}/placements/${core.url.encodePathParam(placementId)}/offers`),
|
|
184
|
+
method: "GET",
|
|
185
|
+
headers: _headers,
|
|
186
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
187
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
188
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
189
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
190
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
191
|
+
logging: this._options.logging,
|
|
192
|
+
});
|
|
193
|
+
if (_response.ok) {
|
|
194
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
195
|
+
}
|
|
196
|
+
if (_response.error.reason === "status-code") {
|
|
197
|
+
switch (_response.error.statusCode) {
|
|
198
|
+
case 500:
|
|
199
|
+
throw new KardApi.InternalServerError(_response.error.body, _response.rawResponse);
|
|
200
|
+
case 400:
|
|
201
|
+
throw new KardApi.InvalidRequest(_response.error.body, _response.rawResponse);
|
|
202
|
+
case 404:
|
|
203
|
+
throw new KardApi.DoesNotExistError(_response.error.body, _response.rawResponse);
|
|
204
|
+
case 401:
|
|
205
|
+
throw new KardApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
206
|
+
default:
|
|
207
|
+
throw new errors.KardApiError({
|
|
208
|
+
statusCode: _response.error.statusCode,
|
|
209
|
+
body: _response.error.body,
|
|
210
|
+
rawResponse: _response.rawResponse,
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v2/issuers/{organizationId}/users/{userId}/placements/{placementId}/offers");
|
|
215
|
+
});
|
|
216
|
+
}
|
|
142
217
|
/**
|
|
143
218
|
* Retrieve national and local geographic locations that a specified user has eligible in-store offers at. Use this endpoint to build
|
|
144
219
|
* out your [map-specific UX experiences](/2024-10-01/api/getting-started#c-discover-clos-near-you-map-view). Please note
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as KardApi from "../../../../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {}
|
|
5
|
+
*/
|
|
6
|
+
export interface GetOffersByPlacementRequest {
|
|
7
|
+
/** Case-insensitive search string to filter offers by merchant name */
|
|
8
|
+
"filter[search]"?: string;
|
|
9
|
+
"filter[purchaseChannel]"?: KardApi.PurchaseChannel[];
|
|
10
|
+
"filter[category]"?: KardApi.CategoryOption;
|
|
11
|
+
"filter[isTargeted]"?: boolean;
|
|
12
|
+
/** CSV list of included resources in the response (e.g "categories"). Allowed value is `categories`. */
|
|
13
|
+
include?: string | string[];
|
|
14
|
+
/** UI component types to include in the response. */
|
|
15
|
+
supportedComponents?: KardApi.users.ComponentType | KardApi.users.ComponentType[];
|
|
16
|
+
}
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "14.
|
|
1
|
+
export declare const SDK_VERSION = "14.2.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "@kard-financial/sdk",
|
|
9
|
-
"X-Fern-SDK-Version": "14.
|
|
10
|
-
"User-Agent": "@kard-financial/sdk/14.
|
|
9
|
+
"X-Fern-SDK-Version": "14.2.0",
|
|
10
|
+
"User-Agent": "@kard-financial/sdk/14.2.0",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -35,6 +35,27 @@ export declare class RewardsClient {
|
|
|
35
35
|
*/
|
|
36
36
|
offers(organizationId: KardApi.OrganizationId, userId: KardApi.UserId, request?: KardApi.users.GetOffersByUserRequest, requestOptions?: RewardsClient.RequestOptions): core.HttpResponsePromise<KardApi.users.OffersResponseObject>;
|
|
37
37
|
private __offers;
|
|
38
|
+
/**
|
|
39
|
+
* Retrieve offers for a placement slot. Returns offers sorted by highest cash back,
|
|
40
|
+
* limited by the placement's available slots.<br/>
|
|
41
|
+
* <b>Required scopes:</b> `rewards:read`
|
|
42
|
+
*
|
|
43
|
+
* @param {KardApi.OrganizationId} organizationId
|
|
44
|
+
* @param {KardApi.UserId} userId
|
|
45
|
+
* @param {string} placementId
|
|
46
|
+
* @param {KardApi.users.GetOffersByPlacementRequest} request
|
|
47
|
+
* @param {RewardsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
48
|
+
*
|
|
49
|
+
* @throws {@link KardApi.InternalServerError}
|
|
50
|
+
* @throws {@link KardApi.InvalidRequest}
|
|
51
|
+
* @throws {@link KardApi.DoesNotExistError}
|
|
52
|
+
* @throws {@link KardApi.UnauthorizedError}
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* await client.users.rewards.placementOffers("organizationId", "userId", "placementId")
|
|
56
|
+
*/
|
|
57
|
+
placementOffers(organizationId: KardApi.OrganizationId, userId: KardApi.UserId, placementId: string, request?: KardApi.users.GetOffersByPlacementRequest, requestOptions?: RewardsClient.RequestOptions): core.HttpResponsePromise<KardApi.users.OffersResponseObject>;
|
|
58
|
+
private __placementOffers;
|
|
38
59
|
/**
|
|
39
60
|
* Retrieve national and local geographic locations that a specified user has eligible in-store offers at. Use this endpoint to build
|
|
40
61
|
* out your [map-specific UX experiences](/2024-10-01/api/getting-started#c-discover-clos-near-you-map-view). Please note
|
|
@@ -103,6 +103,81 @@ export class RewardsClient {
|
|
|
103
103
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/issuers/{organizationId}/users/{userId}/offers");
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Retrieve offers for a placement slot. Returns offers sorted by highest cash back,
|
|
108
|
+
* limited by the placement's available slots.<br/>
|
|
109
|
+
* <b>Required scopes:</b> `rewards:read`
|
|
110
|
+
*
|
|
111
|
+
* @param {KardApi.OrganizationId} organizationId
|
|
112
|
+
* @param {KardApi.UserId} userId
|
|
113
|
+
* @param {string} placementId
|
|
114
|
+
* @param {KardApi.users.GetOffersByPlacementRequest} request
|
|
115
|
+
* @param {RewardsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
116
|
+
*
|
|
117
|
+
* @throws {@link KardApi.InternalServerError}
|
|
118
|
+
* @throws {@link KardApi.InvalidRequest}
|
|
119
|
+
* @throws {@link KardApi.DoesNotExistError}
|
|
120
|
+
* @throws {@link KardApi.UnauthorizedError}
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* await client.users.rewards.placementOffers("organizationId", "userId", "placementId")
|
|
124
|
+
*/
|
|
125
|
+
placementOffers(organizationId, userId, placementId, request = {}, requestOptions) {
|
|
126
|
+
return core.HttpResponsePromise.fromPromise(this.__placementOffers(organizationId, userId, placementId, request, requestOptions));
|
|
127
|
+
}
|
|
128
|
+
__placementOffers(organizationId_1, userId_1, placementId_1) {
|
|
129
|
+
return __awaiter(this, arguments, void 0, function* (organizationId, userId, placementId, request = {}, requestOptions) {
|
|
130
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
131
|
+
const { "filter[search]": filterSearch, "filter[purchaseChannel]": filterPurchaseChannel, "filter[category]": filterCategory, "filter[isTargeted]": filterIsTargeted, include, supportedComponents, } = request;
|
|
132
|
+
const _queryParams = {
|
|
133
|
+
"filter[search]": filterSearch,
|
|
134
|
+
"filter[purchaseChannel]": filterPurchaseChannel != null ? toJson(filterPurchaseChannel) : undefined,
|
|
135
|
+
"filter[category]": filterCategory != null ? filterCategory : undefined,
|
|
136
|
+
"filter[isTargeted]": filterIsTargeted,
|
|
137
|
+
include,
|
|
138
|
+
supportedComponents: Array.isArray(supportedComponents)
|
|
139
|
+
? supportedComponents.map((item) => item)
|
|
140
|
+
: supportedComponents != null
|
|
141
|
+
? supportedComponents
|
|
142
|
+
: undefined,
|
|
143
|
+
};
|
|
144
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
145
|
+
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);
|
|
146
|
+
const _response = yield core.fetcher({
|
|
147
|
+
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)}/users/${core.url.encodePathParam(userId)}/placements/${core.url.encodePathParam(placementId)}/offers`),
|
|
148
|
+
method: "GET",
|
|
149
|
+
headers: _headers,
|
|
150
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
151
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
152
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
153
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
154
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
155
|
+
logging: this._options.logging,
|
|
156
|
+
});
|
|
157
|
+
if (_response.ok) {
|
|
158
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
159
|
+
}
|
|
160
|
+
if (_response.error.reason === "status-code") {
|
|
161
|
+
switch (_response.error.statusCode) {
|
|
162
|
+
case 500:
|
|
163
|
+
throw new KardApi.InternalServerError(_response.error.body, _response.rawResponse);
|
|
164
|
+
case 400:
|
|
165
|
+
throw new KardApi.InvalidRequest(_response.error.body, _response.rawResponse);
|
|
166
|
+
case 404:
|
|
167
|
+
throw new KardApi.DoesNotExistError(_response.error.body, _response.rawResponse);
|
|
168
|
+
case 401:
|
|
169
|
+
throw new KardApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
170
|
+
default:
|
|
171
|
+
throw new errors.KardApiError({
|
|
172
|
+
statusCode: _response.error.statusCode,
|
|
173
|
+
body: _response.error.body,
|
|
174
|
+
rawResponse: _response.rawResponse,
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/issuers/{organizationId}/users/{userId}/placements/{placementId}/offers");
|
|
179
|
+
});
|
|
180
|
+
}
|
|
106
181
|
/**
|
|
107
182
|
* Retrieve national and local geographic locations that a specified user has eligible in-store offers at. Use this endpoint to build
|
|
108
183
|
* out your [map-specific UX experiences](/2024-10-01/api/getting-started#c-discover-clos-near-you-map-view). Please note
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as KardApi from "../../../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {}
|
|
5
|
+
*/
|
|
6
|
+
export interface GetOffersByPlacementRequest {
|
|
7
|
+
/** Case-insensitive search string to filter offers by merchant name */
|
|
8
|
+
"filter[search]"?: string;
|
|
9
|
+
"filter[purchaseChannel]"?: KardApi.PurchaseChannel[];
|
|
10
|
+
"filter[category]"?: KardApi.CategoryOption;
|
|
11
|
+
"filter[isTargeted]"?: boolean;
|
|
12
|
+
/** CSV list of included resources in the response (e.g "categories"). Allowed value is `categories`. */
|
|
13
|
+
include?: string | string[];
|
|
14
|
+
/** UI component types to include in the response. */
|
|
15
|
+
supportedComponents?: KardApi.users.ComponentType | KardApi.users.ComponentType[];
|
|
16
|
+
}
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "14.
|
|
1
|
+
export declare const SDK_VERSION = "14.2.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "14.
|
|
1
|
+
export const SDK_VERSION = "14.2.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -2491,6 +2491,95 @@ await client.users.rewards.offers("organization-123", "user-123", {
|
|
|
2491
2491
|
</dl>
|
|
2492
2492
|
|
|
2493
2493
|
|
|
2494
|
+
</dd>
|
|
2495
|
+
</dl>
|
|
2496
|
+
</details>
|
|
2497
|
+
|
|
2498
|
+
<details><summary><code>client.users.rewards.<a href="/src/api/resources/users/resources/rewards/client/Client.ts">placementOffers</a>(organizationId, userId, placementId, { ...params }) -> KardApi.OffersResponseObject</code></summary>
|
|
2499
|
+
<dl>
|
|
2500
|
+
<dd>
|
|
2501
|
+
|
|
2502
|
+
#### 📝 Description
|
|
2503
|
+
|
|
2504
|
+
<dl>
|
|
2505
|
+
<dd>
|
|
2506
|
+
|
|
2507
|
+
<dl>
|
|
2508
|
+
<dd>
|
|
2509
|
+
|
|
2510
|
+
Retrieve offers for a placement slot. Returns offers sorted by highest cash back,
|
|
2511
|
+
limited by the placement's available slots.<br/>
|
|
2512
|
+
<b>Required scopes:</b> `rewards:read`
|
|
2513
|
+
</dd>
|
|
2514
|
+
</dl>
|
|
2515
|
+
</dd>
|
|
2516
|
+
</dl>
|
|
2517
|
+
|
|
2518
|
+
#### 🔌 Usage
|
|
2519
|
+
|
|
2520
|
+
<dl>
|
|
2521
|
+
<dd>
|
|
2522
|
+
|
|
2523
|
+
<dl>
|
|
2524
|
+
<dd>
|
|
2525
|
+
|
|
2526
|
+
```typescript
|
|
2527
|
+
await client.users.rewards.placementOffers("organizationId", "userId", "placementId");
|
|
2528
|
+
|
|
2529
|
+
```
|
|
2530
|
+
</dd>
|
|
2531
|
+
</dl>
|
|
2532
|
+
</dd>
|
|
2533
|
+
</dl>
|
|
2534
|
+
|
|
2535
|
+
#### ⚙️ Parameters
|
|
2536
|
+
|
|
2537
|
+
<dl>
|
|
2538
|
+
<dd>
|
|
2539
|
+
|
|
2540
|
+
<dl>
|
|
2541
|
+
<dd>
|
|
2542
|
+
|
|
2543
|
+
**organizationId:** `KardApi.OrganizationId`
|
|
2544
|
+
|
|
2545
|
+
</dd>
|
|
2546
|
+
</dl>
|
|
2547
|
+
|
|
2548
|
+
<dl>
|
|
2549
|
+
<dd>
|
|
2550
|
+
|
|
2551
|
+
**userId:** `KardApi.UserId`
|
|
2552
|
+
|
|
2553
|
+
</dd>
|
|
2554
|
+
</dl>
|
|
2555
|
+
|
|
2556
|
+
<dl>
|
|
2557
|
+
<dd>
|
|
2558
|
+
|
|
2559
|
+
**placementId:** `string`
|
|
2560
|
+
|
|
2561
|
+
</dd>
|
|
2562
|
+
</dl>
|
|
2563
|
+
|
|
2564
|
+
<dl>
|
|
2565
|
+
<dd>
|
|
2566
|
+
|
|
2567
|
+
**request:** `KardApi.users.GetOffersByPlacementRequest`
|
|
2568
|
+
|
|
2569
|
+
</dd>
|
|
2570
|
+
</dl>
|
|
2571
|
+
|
|
2572
|
+
<dl>
|
|
2573
|
+
<dd>
|
|
2574
|
+
|
|
2575
|
+
**requestOptions:** `RewardsClient.RequestOptions`
|
|
2576
|
+
|
|
2577
|
+
</dd>
|
|
2578
|
+
</dl>
|
|
2579
|
+
</dd>
|
|
2580
|
+
</dl>
|
|
2581
|
+
|
|
2582
|
+
|
|
2494
2583
|
</dd>
|
|
2495
2584
|
</dl>
|
|
2496
2585
|
</details>
|