Skip to content

Commit ada634c

Browse files
Search string for can be any string
1 parent 524f702 commit ada634c

File tree

7 files changed

+14
-12
lines changed

7 files changed

+14
-12
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
# [3.13.27] - 19-06-2024
6+
7+
### Changes
8+
9+
- Search string for `InPlayer.Payment.getSitePlans` can be any string
10+
511
# [3.13.26] - 19-06-2024
612

713
### Fixes

index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ export declare class Payment {
10181018
) => Promise<AxiosResponse<CommonResponse>>;
10191019
getSitePlans: (
10201020
siteId: string,
1021-
plansIds?: string[]
1021+
searchString?: string
10221022
) => Promise<AxiosResponse<PlansListResponse>>;
10231023
getSitePlanPrices: (
10241024
siteId: string,

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@inplayer-org/inplayer.js",
3-
"version": "3.13.26",
3+
"version": "3.13.27",
44
"author": "InPlayer",
55
"license": "MIT",
66
"description": "A Javascript SDK for Inplayer's RESTful API",

src/constants/index.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,8 @@ export const API = {
110110

111111
return url;
112112
},
113-
getSitePlans: (siteId: string, plansIds: string[] = []) =>
114-
`/v3/sites/${siteId}/plans${
115-
plansIds.length
116-
? `?q=id:(${plansIds.map((planId) => `"${planId}"`).join(' OR ')})`
117-
: ''
118-
}`,
113+
getSitePlans: (siteId: string, searchString?: string) =>
114+
`/v3/sites/${siteId}/plans${searchString ? `?${searchString}` : ''}`,
119115

120116
getSitePlanPrices: (siteId: string, planId: string) =>
121117
`/v3/sites/${siteId}/plans/${planId}/prices`,

src/endpoints/payment.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1257,9 +1257,9 @@ class Payment extends BaseExtend {
12571257

12581258
async getSitePlans(
12591259
siteId: string,
1260-
plansIds?: string[]
1260+
searchString?: string
12611261
): Promise<AxiosResponse<PlansListResponse>> {
1262-
return this.request.get(API.getSitePlans(siteId, plansIds), {
1262+
return this.request.get(API.getSitePlans(siteId, searchString), {
12631263
headers: {
12641264
Accept: 'application/json',
12651265
'Content-Type': 'application/json'

src/models/Config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export interface ApiEndpoints {
6666
payForAssetDonation: string;
6767
confirmForAssetDonation: string;
6868
validateReceipt: (platform: string) => string;
69-
getSitePlans: (siteId: string, plansIds?: string[]) => string;
69+
getSitePlans: (siteId: string, searchString: string) => string;
7070
getSitePlanPrices: (siteId: string, planId: string) => string;
7171
getAssetsHistory: (
7272
size: number,

src/models/IPayment.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ export interface Payment extends BaseExtend {
455455

456456
getSitePlans: (
457457
siteId: string,
458-
plansIds?: string[],
458+
searchString?: string,
459459
) => Promise<AxiosResponse<PlansListResponse>>;
460460

461461
getSitePlanPrices: (

0 commit comments

Comments
 (0)