Skip to content

Commit 7ac2ca0

Browse files
revert removing trailing comma
1 parent 754feaf commit 7ac2ca0

File tree

7 files changed

+82
-81
lines changed

7 files changed

+82
-81
lines changed

.prettierrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"tabWidth": 2,
33
"useTabs": false,
4-
"singleQuote": true
4+
"singleQuote": true,
5+
"trailingComma": "all"
56
}

src/constants/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const API = {
4242
getExternalAsset: (
4343
assetType: string,
4444
externalId: string,
45-
merchantUuid?: string
45+
merchantUuid?: string,
4646
): string => {
4747
let url = `/items/assets/external/${assetType}/${externalId}`;
4848
if (merchantUuid) {
@@ -94,7 +94,7 @@ export const API = {
9494
page: number,
9595
startDate?: string,
9696
endDate?: string,
97-
type?: string
97+
type?: string,
9898
): string => {
9999
let url = `/payments/transactions?exclude=store-payment&size=${size}&page=${page}`;
100100

@@ -148,7 +148,7 @@ export const API = {
148148
merchantUuid: string,
149149
page: number,
150150
size: number,
151-
filter: string
151+
filter: string,
152152
): string =>
153153
`/v2/nfts/${merchantUuid}?filter=${filter}&page=${page}&size=${size}`,
154154
getMerchantNFT: (merchantUuid: string, nftId: number): string =>

src/endpoints/asset.ts

+23-23
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class Asset extends BaseExtend {
6262
* ```
6363
*/
6464
async checkAccessForAsset(
65-
id: number
65+
id: number,
6666
): Promise<AxiosResponse<GetItemAccessV1>> {
6767
const tokenObject = await this.request.getToken();
6868

@@ -134,7 +134,7 @@ class Asset extends BaseExtend {
134134
*/
135135
async getAsset(
136136
assetId: number,
137-
merchantUuid?: string
137+
merchantUuid?: string,
138138
): Promise<AxiosResponse<ExternalItemDetails>> {
139139
return this.request.get(API.getAsset(assetId, merchantUuid));
140140
}
@@ -258,10 +258,10 @@ class Asset extends BaseExtend {
258258
async getExternalAsset(
259259
assetType: string,
260260
externalId: string,
261-
merchantUuid = ''
261+
merchantUuid = '',
262262
): Promise<AxiosResponse<ExternalItemDetails>> {
263263
return this.request.get(
264-
API.getExternalAsset(assetType, externalId, merchantUuid)
264+
API.getExternalAsset(assetType, externalId, merchantUuid),
265265
);
266266
}
267267

@@ -340,7 +340,7 @@ class Asset extends BaseExtend {
340340
* ```
341341
*/
342342
async getAssetsInPackage(
343-
id: number
343+
id: number,
344344
): Promise<AxiosResponse<GetAssetsInPackage>> {
345345
return this.request.get(API.getAssetsInPackage(id));
346346
}
@@ -453,7 +453,7 @@ class Asset extends BaseExtend {
453453
* ```
454454
*/
455455
async getAssetAccessFees(
456-
id: number
456+
id: number,
457457
): Promise<AxiosResponse<GetAccessFeesResponse>> {
458458
return this.request.get(API.getAssetAccessFees(id));
459459
}
@@ -533,7 +533,7 @@ class Asset extends BaseExtend {
533533
page = 0,
534534
startDate?: string,
535535
endDate?: string,
536-
type?: string
536+
type?: string,
537537
): Promise<AxiosResponse<AssetsTransactions>> {
538538
const tokenObject = await this.request.getToken();
539539

@@ -543,7 +543,7 @@ class Asset extends BaseExtend {
543543
headers: {
544544
Authorization: `Bearer ${tokenObject.token}`,
545545
},
546-
}
546+
},
547547
);
548548
}
549549

@@ -587,9 +587,9 @@ class Asset extends BaseExtend {
587587
reduce(
588588
browserDetails,
589589
(acc: string, details: Record<string, any>) => `${acc}${details.value}`,
590-
''
590+
'',
591591
),
592-
31
592+
31,
593593
);
594594

595595
formData.set('item_id', String(item_id));
@@ -607,7 +607,7 @@ class Asset extends BaseExtend {
607607

608608
await tokenStorage.setItem(
609609
this.config.INPLAYER_ACCESS_CODE_NAME(item_id),
610-
JSON.stringify(accessCode)
610+
JSON.stringify(accessCode),
611611
);
612612

613613
return response;
@@ -634,15 +634,15 @@ class Asset extends BaseExtend {
634634
* ```
635635
*/
636636
getAccessCode(
637-
assetId: number
637+
assetId: number,
638638
): CodeAccessData | null | Promise<CodeAccessData | null> {
639639
const accessCode = tokenStorage.getItem(
640-
this.config.INPLAYER_ACCESS_CODE_NAME(assetId)
640+
this.config.INPLAYER_ACCESS_CODE_NAME(assetId),
641641
);
642642

643643
if (isPromise(accessCode)) {
644644
return (accessCode as Promise<string>).then((resolvedString) =>
645-
resolvedString ? (JSON.parse(resolvedString) as CodeAccessData) : null
645+
resolvedString ? (JSON.parse(resolvedString) as CodeAccessData) : null,
646646
) as Promise<CodeAccessData | null>;
647647
}
648648

@@ -672,7 +672,7 @@ class Asset extends BaseExtend {
672672
* ```
673673
*/
674674
async getAccesCodeSessions(
675-
codeId: number
675+
codeId: number,
676676
): Promise<AxiosResponse<Array<CodeAccessSessionsData>>> {
677677
return this.request.get(API.requestAccessCodeSessions(codeId));
678678
}
@@ -695,7 +695,7 @@ class Asset extends BaseExtend {
695695
* ```
696696
*/
697697
async terminateSession(
698-
assetId: number
698+
assetId: number,
699699
): Promise<AxiosResponse<CommonResponse> | null> {
700700
const accessCode: CodeAccessData | null = await this.getAccessCode(assetId);
701701

@@ -704,11 +704,11 @@ class Asset extends BaseExtend {
704704
}
705705

706706
const response = await this.request.delete(
707-
API.terminateSession(accessCode.code_id, accessCode.browser_fingerprint)
707+
API.terminateSession(accessCode.code_id, accessCode.browser_fingerprint),
708708
);
709709

710710
await tokenStorage.removeItem(
711-
this.config.INPLAYER_ACCESS_CODE_NAME(assetId)
711+
this.config.INPLAYER_ACCESS_CODE_NAME(assetId),
712712
);
713713

714714
return response;
@@ -755,7 +755,7 @@ class Asset extends BaseExtend {
755755
return this.request.post(
756756
API.requestDataCaptureNoAuthAccess,
757757
qs.stringify(accessData),
758-
{ headers }
758+
{ headers },
759759
);
760760
}
761761

@@ -778,7 +778,7 @@ class Asset extends BaseExtend {
778778
*/
779779
async getCloudfrontURL(
780780
assetId: number,
781-
videoUrl: string
781+
videoUrl: string,
782782
): Promise<AxiosResponse<CloudfrontUrl>> {
783783
const tokenObject = await this.request.getToken();
784784

@@ -817,7 +817,7 @@ class Asset extends BaseExtend {
817817
* ```
818818
*/
819819
async getDonationOptions(
820-
assetId: number
820+
assetId: number,
821821
): Promise<AxiosResponse<DonationDetails>> {
822822
const tokenObject = await this.request.getToken();
823823

@@ -846,7 +846,7 @@ class Asset extends BaseExtend {
846846
*/
847847
async getSignedMediaToken(
848848
appConfigId: string,
849-
mediaId: string
849+
mediaId: string,
850850
): Promise<AxiosResponse<SignedMediaResponse>> {
851851
const tokenObject = await this.request.getToken();
852852

@@ -858,7 +858,7 @@ class Asset extends BaseExtend {
858858
}
859859

860860
async getSiteEntitlements(
861-
siteId: string
861+
siteId: string,
862862
): Promise<AxiosResponse<SiteEntitlementsResponse>> {
863863
const tokenObject = await this.request.getToken();
864864

src/endpoints/payment.ts

+15-15
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ class Payment extends BaseExtend {
228228
* ```
229229
*/
230230
async createDonationPayment(
231-
data: CreateDonationPaymentData
231+
data: CreateDonationPaymentData,
232232
): Promise<AxiosResponse<CreateDonationPaymentData>> {
233233
const body: CreateDonationPaymentRequestBody = {
234234
number: data.number,
@@ -256,7 +256,7 @@ class Payment extends BaseExtend {
256256
Authorization: `Bearer ${tokenObject.token}`,
257257
'Content-Type': 'application/x-www-form-urlencoded',
258258
},
259-
}
259+
},
260260
);
261261
}
262262

@@ -282,7 +282,7 @@ class Payment extends BaseExtend {
282282
* ```
283283
*/
284284
async confirmPayment(
285-
paymentIntentId: string
285+
paymentIntentId: string,
286286
): Promise<AxiosResponse<CommonResponse>> {
287287
if (!paymentIntentId) {
288288
const response: CustomErrorResponse = {
@@ -377,7 +377,7 @@ class Payment extends BaseExtend {
377377
Authorization: `Bearer ${tokenObject.token}`,
378378
'Content-Type': 'application/x-www-form-urlencoded',
379379
},
380-
}
380+
},
381381
);
382382
}
383383

@@ -498,7 +498,7 @@ class Payment extends BaseExtend {
498498
async getPurchaseHistory(
499499
status = 'active',
500500
page = 0,
501-
limit = 5
501+
limit = 5,
502502
): Promise<AxiosResponse<GetPurchaseHistoryResponse>> {
503503
const tokenObject = await this.request.getToken();
504504

@@ -508,7 +508,7 @@ class Payment extends BaseExtend {
508508
headers: {
509509
Authorization: `Bearer ${tokenObject.token}`,
510510
},
511-
}
511+
},
512512
);
513513
}
514514

@@ -674,7 +674,7 @@ class Payment extends BaseExtend {
674674
Authorization: `Bearer ${tokenObject.token}`,
675675
'Content-Type': 'application/x-www-form-urlencoded',
676676
},
677-
}
677+
},
678678
);
679679
}
680680

@@ -779,7 +779,7 @@ class Payment extends BaseExtend {
779779
Authorization: `Bearer ${tokenObject.token}`,
780780
'Content-Type': 'application/x-www-form-urlencoded',
781781
},
782-
}
782+
},
783783
);
784784
}
785785

@@ -841,7 +841,7 @@ class Payment extends BaseExtend {
841841
Authorization: `Bearer ${tokenObject.token}`,
842842
'Content-Type': 'application/x-www-form-urlencoded',
843843
},
844-
}
844+
},
845845
);
846846
}
847847

@@ -981,7 +981,7 @@ class Payment extends BaseExtend {
981981
Authorization: `Bearer ${tokenObject.token}`,
982982
'Content-Type': 'application/x-www-form-urlencoded',
983983
},
984-
}
984+
},
985985
);
986986
}
987987

@@ -1123,7 +1123,7 @@ class Payment extends BaseExtend {
11231123
Authorization: `Bearer ${tokenObject.token}`,
11241124
'Content-Type': 'application/x-www-form-urlencoded',
11251125
},
1126-
}
1126+
},
11271127
);
11281128
}
11291129

@@ -1185,7 +1185,7 @@ class Payment extends BaseExtend {
11851185
Authorization: `Bearer ${tokenObject.token}`,
11861186
'Content-Type': 'application/x-www-form-urlencoded',
11871187
},
1188-
}
1188+
},
11891189
);
11901190
}
11911191

@@ -1251,13 +1251,13 @@ class Payment extends BaseExtend {
12511251
Authorization: `Bearer ${tokenObject.token}`,
12521252
'Content-Type': 'application/x-www-form-urlencoded',
12531253
},
1254-
}
1254+
},
12551255
);
12561256
}
12571257

12581258
async getSitePlans(
12591259
siteId: string,
1260-
plansIds?: string[]
1260+
plansIds?: string[],
12611261
): Promise<AxiosResponse<PlansListResponse>> {
12621262
return this.request.get(API.getSitePlans(siteId, plansIds), {
12631263
headers: {
@@ -1269,7 +1269,7 @@ class Payment extends BaseExtend {
12691269

12701270
async getSitePlanPrices(
12711271
siteId: string,
1272-
planId: string
1272+
planId: string,
12731273
): Promise<AxiosResponse<PlanPricesResponse>> {
12741274
return this.request.get(API.getSitePlanPrices(siteId, planId), {
12751275
headers: {

0 commit comments

Comments
 (0)