File tree 7 files changed +37
-8
lines changed
7 files changed +37
-8
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.12.4] - 03-17-2022
6
+
7
+ ### Changes
8
+
9
+ - Add config object for daily environment
10
+
5
11
# [ 3.12.3] - 07-12-2021
6
12
7
13
### Changes
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { AxiosResponse } from 'axios';
4
4
export enum Env {
5
5
Development = 'development' ,
6
6
Production = 'production' ,
7
+ Daily = 'daily' ,
7
8
}
8
9
9
10
// Common response
@@ -971,8 +972,6 @@ export declare class Notifications {
971
972
unsubscribe ( ) : void ;
972
973
}
973
974
974
- type Env = 'development' | 'production' ;
975
-
976
975
export interface LocalStorageMethods {
977
976
setItem : < R = void > ( key : string , value : string ) => R | void ;
978
977
getItem : < R = string | null > ( key : string ) => R | ( string | null ) ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @inplayer-org/inplayer.js" ,
3
- "version" : " 3.12.2 " ,
3
+ "version" : " 3.12.4 " ,
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 @@ -6,6 +6,22 @@ export const commonConfig = {
6
6
IOT_NOTIF_URL : 'a3gkl64duktvc4-ats.iot.eu-west-1.amazonaws.com' ,
7
7
} ;
8
8
9
+ /**
10
+ * ```typescript
11
+ * INPLAYER_TOKEN_KEY = 'inplayer_token';
12
+ * INPLAYER_IOT_KEY = 'inplayer_iot';
13
+ * INPLAYER_ACCESS_CODE_NAME = (assetId: number) => `access_code_${assetId}`;
14
+ * IOT_NOTIF_URL = 'a3gkl64duktvc4-ats.iot.eu-west-1.amazonaws.com';
15
+ * BASE_URL = 'https://services-daily.inplayer.com';
16
+ * AWS_IOT_URL = 'https://o3871l8vj7.execute-api.eu-west-1.amazonaws.com/staging/iot/keys';
17
+ * ```
18
+ */
19
+ export const dailyConfig = {
20
+ ...commonConfig ,
21
+ BASE_URL : 'https://services-daily.inplayer.com' ,
22
+ AWS_IOT_URL : 'https://o3871l8vj7.execute-api.eu-west-1.amazonaws.com/staging/iot/keys' ,
23
+ } ;
24
+
9
25
/**
10
26
* ```typescript
11
27
* INPLAYER_TOKEN_KEY = 'inplayer_token';
@@ -42,6 +58,7 @@ export const prodConfig = {
42
58
export const config = {
43
59
development : devConfig ,
44
60
production : prodConfig ,
61
+ daily : dailyConfig ,
45
62
} ;
46
63
47
64
export default config ;
Original file line number Diff line number Diff line change @@ -391,6 +391,7 @@ class Payment extends BaseExtend {
391
391
* })
392
392
* .then(data => console.log(data));
393
393
* @returns {AxiosResponse<GeneratePayPalParameters> } Contains the data:
394
+ * ```typescript
394
395
* {
395
396
* endpoint: string;
396
397
* business: string;
@@ -399,6 +400,7 @@ class Payment extends BaseExtend {
399
400
* return: string;
400
401
* cancel_return: string;
401
402
* }
403
+ * ```
402
404
*/
403
405
// object types must be anonymous(don't use interface or type alias)
404
406
// in order to data params description to be shown in typedoc
@@ -450,6 +452,7 @@ class Payment extends BaseExtend {
450
452
* .getPurchaseHistory('active', 0, 5)
451
453
* .then(data => console.log(data));
452
454
* @returns {AxiosResponse<PurchaseHistoryCollection[]> } Contains the data:
455
+ * ```typescript
453
456
* {
454
457
* total: number;
455
458
* page: number;
@@ -478,6 +481,7 @@ class Payment extends BaseExtend {
478
481
* type: string;
479
482
* }];
480
483
* }
484
+ * ```
481
485
*/
482
486
async getPurchaseHistory (
483
487
status = 'active' ,
Original file line number Diff line number Diff line change @@ -78,10 +78,12 @@ export class InPlayer {
78
78
* InPlayer.subscribe(
79
79
* 'adsasd-d1-cjc1c-1ajaveo',
80
80
* {
81
- * onMessage: (message) =>
82
- * { let body = JSON.parse(message.body); console.log(body, 'message') },
83
- * onOpen: (e) => console.log('open'),
84
- * onClose: (e) => console.log('close', e)
81
+ * onMessage: (message) =>
82
+ * {
83
+ * let body = JSON.parse(message.body); console.log(body, 'message')
84
+ * },
85
+ * onOpen: (e) => console.log('open'),
86
+ * onClose: (e) => console.log('close', e)
85
87
* }
86
88
* )
87
89
*/
@@ -128,7 +130,7 @@ export class InPlayer {
128
130
/**
129
131
* Overrides the default configs
130
132
* @method setConfig
131
- * @param {String } config 'production', 'development'
133
+ * @param {String } config 'production', 'development', 'daily'
132
134
* @example
133
135
* InPlayer.setConfig('development');
134
136
*/
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { ApiConfig, Request } from './Config';
4
4
export enum Env {
5
5
Development = 'development' ,
6
6
Production = 'production' ,
7
+ Daily = 'daily' ,
7
8
}
8
9
9
10
export interface BaseExtend {
You can’t perform that action at this time.
0 commit comments