File tree Expand file tree Collapse file tree 6 files changed +13
-9
lines changed Expand file tree Collapse file tree 6 files changed +13
-9
lines changed Original file line number Diff line number Diff line change 2
2
3
3
All notable changes to this project will be documented in this file.
4
4
5
+ # [ 3.13.16] - 08-08-2023
6
+
7
+ - Modified ` merchantUuid ` parameter in ` getAsset ` method to be optional
8
+
5
9
# [ 3.13.15] - 24-07-2023
6
10
7
11
- Added ` getFeatureFlags ` method and ` FeatureFlagData ` type to ` Account ` module
Original file line number Diff line number Diff line change @@ -520,7 +520,7 @@ export declare class Asset {
520
520
521
521
checkAccessForAsset ( id : number ) : Promise < AxiosResponse < GetItemAccessV1 > > ;
522
522
isFreeTrialUsed ( id : number ) : Promise < AxiosResponse < boolean > > ;
523
- getAsset ( assetId : number , merchantUuid : string ) : Promise < AxiosResponse < ItemDetailsV1 > > ;
523
+ getAsset ( assetId : number , merchantUuid : string ) : Promise < AxiosResponse < ExternalItemDetails > > ;
524
524
getExternalAsset (
525
525
assetType : string ,
526
526
externalId : string ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @inplayer-org/inplayer.js" ,
3
- "version" : " 3.13.15 " ,
3
+ "version" : " 3.13.16 " ,
4
4
"author" : " InPlayer" ,
5
5
"license" : " MIT" ,
6
6
"description" : " A Javascript SDK for Inplayer's RESTful API" ,
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ export const API = {
31
31
merchantRestrictionSettings : ( merchantUuid : string ) : string => `/restrictions/settings/${ merchantUuid } ` ,
32
32
33
33
// Items
34
- getAsset : ( id : number , merchantUuid : string ) : string => `/items/${ merchantUuid } / ${ id } ` ,
34
+ getAsset : ( id : number , merchantUuid ? : string ) : string => `/items/${ merchantUuid ? ` ${ merchantUuid } /` : '' } ${ id } ` ,
35
35
getExternalAsset : ( assetType : string , externalId : string , merchantUuid ?: string ) : string => {
36
36
let url = `/items/assets/external/${ assetType } /${ externalId } ` ;
37
37
if ( merchantUuid ) {
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ class Asset extends BaseExtend {
98
98
* @method getAsset
99
99
* @async
100
100
* @param {number } assetId The id of created premium content in InPlayer Dashboard (i.e asset id).
101
- * @param {string } merchantUuid The Merchant's unique universal identifier (Merchant UUID).
101
+ * @param {string? } merchantUuid The Merchant's unique universal identifier (Merchant UUID).
102
102
* You can find it on the InPlayer's dashboard at the Account Details section as Account ID.
103
103
* @example
104
104
* InPlayer.Asset
@@ -133,8 +133,8 @@ class Asset extends BaseExtend {
133
133
*/
134
134
async getAsset (
135
135
assetId : number ,
136
- merchantUuid : string ,
137
- ) : Promise < AxiosResponse < ItemDetailsV1 > > {
136
+ merchantUuid ? : string ,
137
+ ) : Promise < AxiosResponse < ExternalItemDetails > > {
138
138
return this . request . get ( API . getAsset ( assetId , merchantUuid ) ) ;
139
139
}
140
140
Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ export interface ItemDetailsAccess extends ItemDetailsV1 {
170
170
}
171
171
172
172
export interface ExternalItemDetails extends ItemDetailsV1 {
173
- access_fees : GetAccessFee [ ] ;
173
+ access_fees : AccessFee [ ] ;
174
174
metahash : Record < string , string > ;
175
175
}
176
176
@@ -368,8 +368,8 @@ export interface Asset extends BaseExtend {
368
368
isFreeTrialUsed ( id : number ) : Promise < AxiosResponse < boolean > > ;
369
369
getAsset (
370
370
assetId : number ,
371
- merchantUuid : string
372
- ) : Promise < AxiosResponse < ItemDetailsV1 > > ;
371
+ merchantUuid ? : string
372
+ ) : Promise < AxiosResponse < ExternalItemDetails > > ;
373
373
getExternalAsset (
374
374
assetType : string ,
375
375
externalId : string ,
You can’t perform that action at this time.
0 commit comments