jd_platform_sdk 0.2.5 → 0.3.1
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/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -0
- package/dist/sdk/configs/jdConfig.d.ts +2 -2
- package/dist/sdk/configs/jdConfig.d.ts.map +1 -1
- package/dist/sdk/configs/jdConfig.js +8 -3
- package/dist/sdk/jdConnector.d.ts +6 -6
- package/dist/sdk/jdConnector.d.ts.map +1 -1
- package/dist/sdk/jdConnector.js +17 -17
- package/dist/sdk/jdSdk.d.ts.map +1 -1
- package/dist/sdk/jdSdk.js +1 -0
- package/dist/sdk/models/dashboard/jdApplication.d.ts +10 -6
- package/dist/sdk/models/dashboard/jdApplication.d.ts.map +1 -1
- package/dist/sdk/models/dashboard/jdApplication.js +25 -0
- package/dist/sdk/models/dashboard/user/jdAccessToken.d.ts +3 -0
- package/dist/sdk/models/dashboard/user/jdAccessToken.d.ts.map +1 -1
- package/dist/sdk/models/dashboard/user/jdAccessToken.js +7 -1
- package/dist/sdk/models/dashboard/user/jdPermission.d.ts +1 -0
- package/dist/sdk/models/dashboard/user/jdPermission.d.ts.map +1 -1
- package/dist/sdk/models/dashboard/user/jdPermission.js +3 -0
- package/dist/sdk/models/dashboard/user/jdUser.d.ts +4 -0
- package/dist/sdk/models/dashboard/user/jdUser.d.ts.map +1 -1
- package/dist/sdk/models/dashboard/user/jdUser.js +12 -0
- package/dist/sdk/models/jdResource.d.ts +8 -4
- package/dist/sdk/models/jdResource.d.ts.map +1 -1
- package/dist/sdk/models/jdResource.js +71 -9
- package/dist/sdk/models/modules/auth/jdAuth.d.ts +7 -0
- package/dist/sdk/models/modules/auth/jdAuth.d.ts.map +1 -0
- package/dist/sdk/models/modules/auth/jdAuth.js +17 -0
- package/dist/sdk/models/modules/note/jdNote.d.ts +17 -0
- package/dist/sdk/models/modules/note/jdNote.d.ts.map +1 -0
- package/dist/sdk/models/modules/note/jdNote.js +39 -0
- package/dist/sdk/models/modules/player/jdPlayer.d.ts +18 -0
- package/dist/sdk/models/modules/player/jdPlayer.d.ts.map +1 -0
- package/dist/sdk/models/modules/player/jdPlayer.js +38 -0
- package/dist/sdk/models/modules/player/jdPlayerLog.d.ts +15 -0
- package/dist/sdk/models/modules/player/jdPlayerLog.d.ts.map +1 -0
- package/dist/sdk/models/modules/player/jdPlayerLog.js +32 -0
- package/dist/sdk/models/modules/player/jdPlayerRank.d.ts +15 -0
- package/dist/sdk/models/modules/player/jdPlayerRank.d.ts.map +1 -0
- package/dist/sdk/models/modules/player/jdPlayerRank.js +32 -0
- package/dist/sdk/models/modules/player/jdPlayerReport.d.ts +15 -0
- package/dist/sdk/models/modules/player/jdPlayerReport.d.ts.map +1 -0
- package/dist/sdk/models/modules/player/jdPlayerReport.js +32 -0
- package/dist/sdk/models/modules/player/jdRootPlayerExclusion.d.ts +15 -0
- package/dist/sdk/models/modules/player/jdRootPlayerExclusion.d.ts.map +1 -0
- package/dist/sdk/models/modules/player/jdRootPlayerExclusion.js +32 -0
- package/dist/sdk/models/modules/player/jdSessionUser.d.ts +15 -0
- package/dist/sdk/models/modules/player/jdSessionUser.d.ts.map +1 -0
- package/dist/sdk/models/modules/player/jdSessionUser.js +32 -0
- package/dist/sdk/utilities/browserUtils.d.ts.map +1 -1
- package/dist/sdk/utilities/browserUtils.js +1 -7
- package/dist/sdk/utilities/dateUtils.d.ts.map +1 -1
- package/dist/sdk/utilities/dateUtils.js +54 -27
- package/dist/sdk/utilities/utils.d.ts +3 -0
- package/dist/sdk/utilities/utils.d.ts.map +1 -1
- package/dist/sdk/utilities/utils.js +28 -1
- package/package.json +1 -1
- package/readme.md +1 -0
|
@@ -2,6 +2,7 @@ import { Utils } from "../utilities/utils";
|
|
|
2
2
|
import { DateUtils } from "../utilities/dateUtils";
|
|
3
3
|
import { CryptoUtils } from "../utilities/cryptoUtils";
|
|
4
4
|
import { JDConnector, SimpleResponse } from "../jdConnector";
|
|
5
|
+
import { JDConfig } from "../configs/jdConfig";
|
|
5
6
|
export const defaultPaginateParams = {
|
|
6
7
|
order_by: 'updated_at',
|
|
7
8
|
order: 'desc',
|
|
@@ -100,6 +101,13 @@ export class JDResource {
|
|
|
100
101
|
finalHeaders["random-seed"] = DateUtils.getTimeStamp();
|
|
101
102
|
return finalHeaders;
|
|
102
103
|
}
|
|
104
|
+
getAppHeaders() {
|
|
105
|
+
const finalHeaders = {};
|
|
106
|
+
finalHeaders["app-id"] = this.connectorInfo.appId;
|
|
107
|
+
finalHeaders["x-auth-token"] = this.connectorInfo.token;
|
|
108
|
+
finalHeaders["random-seed"] = DateUtils.getTimeStamp();
|
|
109
|
+
return finalHeaders;
|
|
110
|
+
}
|
|
103
111
|
//This is used to make a direct call supported on some APIs
|
|
104
112
|
addDefaultParams(params) {
|
|
105
113
|
params["app-id"] = this.connectorInfo.appId;
|
|
@@ -121,7 +129,6 @@ export class JDResource {
|
|
|
121
129
|
if (mergedParams.fields) {
|
|
122
130
|
result['fields'] = mergedParams.fields;
|
|
123
131
|
}
|
|
124
|
-
// Centralized logic for additional filters
|
|
125
132
|
if (mergedParams.published !== undefined) {
|
|
126
133
|
result['published'] = mergedParams.published !== null ? (mergedParams.published ? 'true' : 'false') : '';
|
|
127
134
|
}
|
|
@@ -135,6 +142,12 @@ export class JDResource {
|
|
|
135
142
|
result['keywords.mm'] = mergedParams.keywords_mm;
|
|
136
143
|
if (mergedParams.note)
|
|
137
144
|
result['note'] = mergedParams.note;
|
|
145
|
+
// Add any remaining params not already in result
|
|
146
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
147
|
+
if (!(key in result)) {
|
|
148
|
+
result[key] = value;
|
|
149
|
+
}
|
|
150
|
+
});
|
|
138
151
|
return result;
|
|
139
152
|
}
|
|
140
153
|
static getFieldParameters(fields) {
|
|
@@ -158,25 +171,25 @@ export class JDResource {
|
|
|
158
171
|
return await this.getRelative("/modules/contents", queryParams);
|
|
159
172
|
}
|
|
160
173
|
// HTTP Calls Utilities
|
|
161
|
-
async getRelative(relativeUrl, params, bShowErrorToast = true, bForceRefresh = false, overrideVersion = '') {
|
|
174
|
+
async getRelative(relativeUrl, params, bShowErrorToast = true, bForceRefresh = false, needPrivateAccess = false, overrideVersion = '') {
|
|
162
175
|
const finalHeaders = this.getDefaultHeaders();
|
|
163
176
|
const connector = new JDConnector();
|
|
164
|
-
const response = await connector.httpGetRelativeAsync(relativeUrl, finalHeaders, params, bShowErrorToast, bForceRefresh, true, overrideVersion);
|
|
177
|
+
const response = await connector.httpGetRelativeAsync(relativeUrl, finalHeaders, params, bShowErrorToast, bForceRefresh, true, needPrivateAccess, overrideVersion);
|
|
165
178
|
return new SimpleResponse(response.body, response.statusCode);
|
|
166
179
|
}
|
|
167
|
-
async postRelative(relativeUrl, body, bShowErrorToast = true, overrideVersion = '') {
|
|
180
|
+
async postRelative(relativeUrl, body, bShowErrorToast = true, needPrivateAccess = false, overrideVersion = '') {
|
|
168
181
|
const headers = this.getDefaultHeaders();
|
|
169
182
|
const connector = new JDConnector();
|
|
170
|
-
const response = await connector.httpPostRelativeAsync(relativeUrl, headers, body, bShowErrorToast, true, overrideVersion);
|
|
183
|
+
const response = await connector.httpPostRelativeAsync(relativeUrl, headers, body, bShowErrorToast, true, needPrivateAccess, overrideVersion);
|
|
171
184
|
return new SimpleResponse(response.body, response.statusCode);
|
|
172
185
|
}
|
|
173
186
|
// Direct Calls to the URL without using SDK
|
|
174
|
-
async getDirect(directUrl, params, bShowErrorToast = true, bForceRefresh = false, overrideVersion = '') {
|
|
175
|
-
const response = await new JDConnector().httpGetDirectAsync(directUrl, {}, params, bShowErrorToast, true, bForceRefresh, overrideVersion);
|
|
187
|
+
async getDirect(directUrl, params, bShowErrorToast = true, bForceRefresh = false, needPrivateAccess = false, overrideVersion = '') {
|
|
188
|
+
const response = await new JDConnector().httpGetDirectAsync(directUrl, {}, params, bShowErrorToast, true, bForceRefresh, needPrivateAccess, overrideVersion);
|
|
176
189
|
return new SimpleResponse(response.body, response.statusCode);
|
|
177
190
|
}
|
|
178
|
-
async postDirect(directUrl, body, bShowErrorToast = true, overrideVersion = '') {
|
|
179
|
-
const response = await new JDConnector().httpPostDirectAsync(directUrl, { 'Content-Type': 'application/json' }, body, bShowErrorToast, false, overrideVersion);
|
|
191
|
+
async postDirect(directUrl, body, bShowErrorToast = true, needPrivateAccess = false, overrideVersion = '') {
|
|
192
|
+
const response = await new JDConnector().httpPostDirectAsync(directUrl, { 'Content-Type': 'application/json' }, body, bShowErrorToast, false, needPrivateAccess, overrideVersion);
|
|
180
193
|
return new SimpleResponse(response.body, response.statusCode);
|
|
181
194
|
}
|
|
182
195
|
// Save the token and user information to globals if successful
|
|
@@ -193,4 +206,53 @@ export class JDResource {
|
|
|
193
206
|
// globalThis.userId = Utils.getString(dataUser, "_id");
|
|
194
207
|
}
|
|
195
208
|
}
|
|
209
|
+
async uploadFile(relativeUrl, field, file) {
|
|
210
|
+
const formData = new FormData();
|
|
211
|
+
formData.append(field, file); // fileField is the field name expected by the API such as receipt,icon,banner etc...
|
|
212
|
+
const strHost = JDConfig.getAPIHost();
|
|
213
|
+
const headers = this.getDefaultHeaders();
|
|
214
|
+
let url = strHost + relativeUrl;
|
|
215
|
+
try {
|
|
216
|
+
const response = await fetch(url, {
|
|
217
|
+
method: 'POST',
|
|
218
|
+
headers: headers,
|
|
219
|
+
body: formData
|
|
220
|
+
});
|
|
221
|
+
const result = await response.text();
|
|
222
|
+
return new SimpleResponse(result, response.status);
|
|
223
|
+
}
|
|
224
|
+
catch (error) {
|
|
225
|
+
if (error instanceof Error) {
|
|
226
|
+
return new SimpleResponse(error.message, 500);
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
return new SimpleResponse(String(error), 500);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
async uploadImage(id, module, field, file) {
|
|
234
|
+
const formData = new FormData();
|
|
235
|
+
formData.append(field, file);
|
|
236
|
+
const strHost = JDConfig.getAPIHost();
|
|
237
|
+
const headers = this.getAppHeaders();
|
|
238
|
+
const url = `${strHost}/modules/${module}/${id}/images/${field}`;
|
|
239
|
+
console.log(`uploadImage: ${url}`);
|
|
240
|
+
try {
|
|
241
|
+
const response = await fetch(url, {
|
|
242
|
+
method: 'POST',
|
|
243
|
+
headers: headers,
|
|
244
|
+
body: formData
|
|
245
|
+
});
|
|
246
|
+
const result = await response.text();
|
|
247
|
+
return new SimpleResponse(result, response.status);
|
|
248
|
+
}
|
|
249
|
+
catch (error) {
|
|
250
|
+
if (error instanceof Error) {
|
|
251
|
+
return new SimpleResponse(error.message, 500);
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
return new SimpleResponse(String(error), 500);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
196
258
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { JDResource, ConnectorInfo } from "../../jdResource";
|
|
2
|
+
export declare class JdAuth extends JDResource {
|
|
3
|
+
constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
|
|
4
|
+
setData(data: Record<string, any>): void;
|
|
5
|
+
loginWithFirebase(uid: string, name: string, email: string, phone: string, photo_url: string, provider: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=jdAuth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jdAuth.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/auth/jdAuth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,aAAa,EAA8F,MAAM,kBAAkB,CAAC;AAGxJ,qBAAa,MAAO,SAAQ,UAAU;gBACzB,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAA6C;IAKxG,OAAO,CAAC,IAAI,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAK1B,iBAAiB,CAAC,GAAG,EAAC,MAAM,EAAE,IAAI,EAAC,MAAM,EAAE,KAAK,EAAC,MAAM,EAAE,KAAK,EAAC,MAAM,EAAE,SAAS,EAAC,MAAM,EAAE,QAAQ,EAAC,MAAM;CAM9G"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { JDResource, ConnectorInfo } from "../../jdResource";
|
|
2
|
+
export class JdAuth extends JDResource {
|
|
3
|
+
constructor(data = {}, connectorInfo = new ConnectorInfo("", "", "")) {
|
|
4
|
+
super(connectorInfo);
|
|
5
|
+
this.setData(data);
|
|
6
|
+
}
|
|
7
|
+
setData(data) {
|
|
8
|
+
super.setData(data);
|
|
9
|
+
}
|
|
10
|
+
// Authenticate with Firebase
|
|
11
|
+
async loginWithFirebase(uid, name, email, phone, photo_url, provider) {
|
|
12
|
+
const body = { uid, name, email, phone, photo_url, provider };
|
|
13
|
+
const response = await this.postRelative('/modules/auth/firebase', body);
|
|
14
|
+
await this.checkUser(response);
|
|
15
|
+
return response;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { JDResource, ConnectorInfo, defaultSortParams, defaultUpdateFields, PaginateParams } from "../../jdResource";
|
|
2
|
+
export declare class JdNote extends JDResource {
|
|
3
|
+
constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
|
|
4
|
+
setData(data: Record<string, any>): void;
|
|
5
|
+
getContents(params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
6
|
+
paginateContents(params?: PaginateParams & {
|
|
7
|
+
language_id?: string | null;
|
|
8
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
9
|
+
findContents(params?: PaginateParams & {
|
|
10
|
+
title?: string | null;
|
|
11
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
12
|
+
getSongs(albumId: string, params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
13
|
+
getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
14
|
+
createNew(body?: Partial<typeof defaultUpdateFields>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
15
|
+
updateFields(id: string, body?: Partial<typeof defaultUpdateFields>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=jdNote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jdNote.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/note/jdNote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEnH,qBAAa,MAAO,SAAQ,UAAU;gBACzB,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAA6C;IAKxG,OAAO,CAAC,IAAI,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAI1B,WAAW,CAAC,MAAM,GAAE,OAAO,CAAC,OAAO,iBAAiB,CAAM;IAK1D,gBAAgB,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,WAAW,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;KAAM;IAM5E,YAAY,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,KAAK,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;KAAO;IAMnE,QAAQ,CAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAE,OAAO,CAAC,OAAO,iBAAiB,CAAM;IAKzE,OAAO,CAAC,EAAE,EAAC,MAAM;IAIjB,SAAS,CAAC,IAAI,GAAE,OAAO,CAAC,OAAO,mBAAmB,CAAM;IAIxD,YAAY,CAAC,EAAE,EAAC,MAAM,EAAE,IAAI,GAAE,OAAO,CAAC,OAAO,mBAAmB,CAAM;CAG5E"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { JDResource, ConnectorInfo } from "../../jdResource";
|
|
2
|
+
export class JdNote extends JDResource {
|
|
3
|
+
constructor(data = {}, connectorInfo = new ConnectorInfo("", "", "")) {
|
|
4
|
+
super(connectorInfo);
|
|
5
|
+
this.setData(data);
|
|
6
|
+
}
|
|
7
|
+
setData(data) {
|
|
8
|
+
super.setData(data);
|
|
9
|
+
}
|
|
10
|
+
async getContents(params = {}) {
|
|
11
|
+
const queryParams = this.getSortParameters(params);
|
|
12
|
+
return await this.getRelative('/modules/note/notes', queryParams);
|
|
13
|
+
}
|
|
14
|
+
async paginateContents(params = {}) {
|
|
15
|
+
const queryParams = this.getSortParameters(params);
|
|
16
|
+
if (params.language_id)
|
|
17
|
+
queryParams['language_id'] = params.language_id;
|
|
18
|
+
return await this.getRelative('/modules/note/notes/paginate', queryParams);
|
|
19
|
+
}
|
|
20
|
+
async findContents(params = {}) {
|
|
21
|
+
const queryParams = this.getSortParameters(params);
|
|
22
|
+
if (params.title)
|
|
23
|
+
queryParams['name'] = params.title;
|
|
24
|
+
return await this.getRelative('/modules/note/notes/find', queryParams);
|
|
25
|
+
}
|
|
26
|
+
async getSongs(albumId, params = {}) {
|
|
27
|
+
const queryParams = this.getSortParameters(params);
|
|
28
|
+
return await this.getRelative(`/modules/note/notes/${albumId}/songs`, queryParams);
|
|
29
|
+
}
|
|
30
|
+
async getInfo(id) {
|
|
31
|
+
return await this.getRelative(`/modules/note/notes/${id}`, {});
|
|
32
|
+
}
|
|
33
|
+
async createNew(body = {}) {
|
|
34
|
+
return await this.postRelative(`/modules/note/notes/create`, body);
|
|
35
|
+
}
|
|
36
|
+
async updateFields(id, body = {}) {
|
|
37
|
+
return await this.postRelative(`/modules/music/albums/${id}/update`, body);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { JDResource, ConnectorInfo, defaultSortParams, defaultUpdateFields, PaginateParams } from "../../jdResource";
|
|
2
|
+
export declare class JdPlayer extends JDResource {
|
|
3
|
+
constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
|
|
4
|
+
setData(data: Record<string, any>): void;
|
|
5
|
+
getContents(params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
6
|
+
paginateContents(params?: PaginateParams & {
|
|
7
|
+
name?: string | null;
|
|
8
|
+
email?: string | null;
|
|
9
|
+
phone?: string | null;
|
|
10
|
+
aya_pay_user_id?: string | null;
|
|
11
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
12
|
+
findContents(params?: PaginateParams & {
|
|
13
|
+
title?: string | null;
|
|
14
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
15
|
+
getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
16
|
+
updateFields(id: string, body?: Partial<typeof defaultUpdateFields>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=jdPlayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jdPlayer.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/player/jdPlayer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AACnH,qBAAa,QAAS,SAAQ,UAAU;gBAC3B,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAA6C;IAIxG,OAAO,CAAC,IAAI,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAI1B,WAAW,CAAC,MAAM,GAAE,OAAO,CAAC,OAAO,iBAAiB,CAAM;IAK1D,gBAAgB,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;QAAC,eAAe,CAAC,EAAE,MAAM,GAAC,IAAI,CAAA;KAAO;IAS9I,YAAY,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,KAAK,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;KAAO;IAMnE,OAAO,CAAC,EAAE,EAAC,MAAM;IAIjB,YAAY,CAAC,EAAE,EAAC,MAAM,EAAE,IAAI,GAAE,OAAO,CAAC,OAAO,mBAAmB,CAAM;CAG5E"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { JDResource, ConnectorInfo } from "../../jdResource";
|
|
2
|
+
export class JdPlayer extends JDResource {
|
|
3
|
+
constructor(data = {}, connectorInfo = new ConnectorInfo("", "", "")) {
|
|
4
|
+
super(connectorInfo);
|
|
5
|
+
this.setData(data);
|
|
6
|
+
}
|
|
7
|
+
setData(data) {
|
|
8
|
+
super.setData(data);
|
|
9
|
+
}
|
|
10
|
+
async getContents(params = {}) {
|
|
11
|
+
const queryParams = this.getSortParameters(params);
|
|
12
|
+
return await this.getRelative('/modules/player/players', queryParams);
|
|
13
|
+
}
|
|
14
|
+
async paginateContents(params = {}) {
|
|
15
|
+
const queryParams = this.getSortParameters(params);
|
|
16
|
+
if (params.name)
|
|
17
|
+
queryParams['name'] = params.name;
|
|
18
|
+
if (params.email)
|
|
19
|
+
queryParams['email'] = params.email;
|
|
20
|
+
if (params.phone)
|
|
21
|
+
queryParams['phone'] = params.phone;
|
|
22
|
+
if (params.aya_pay_user_id)
|
|
23
|
+
queryParams['wallet_user_ids.aya_pay'] = params.aya_pay_user_id;
|
|
24
|
+
return await this.getRelative('/modules/player/players/paginate', queryParams);
|
|
25
|
+
}
|
|
26
|
+
async findContents(params = {}) {
|
|
27
|
+
const queryParams = this.getSortParameters(params);
|
|
28
|
+
if (params.title)
|
|
29
|
+
queryParams['title'] = params.title;
|
|
30
|
+
return await this.getRelative('/modules/player/players/find', queryParams);
|
|
31
|
+
}
|
|
32
|
+
async getInfo(id) {
|
|
33
|
+
return await this.getRelative(`/modules/player/players/${id}`, {});
|
|
34
|
+
}
|
|
35
|
+
async updateFields(id, body = {}) {
|
|
36
|
+
return await this.postRelative(`/modules/player/players/${id}/update`, body);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { JDResource, ConnectorInfo, defaultSortParams, defaultUpdateFields, PaginateParams } from "../../jdResource";
|
|
2
|
+
export declare class JdPlayerLog extends JDResource {
|
|
3
|
+
constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
|
|
4
|
+
setData(data: Record<string, any>): void;
|
|
5
|
+
getContents(params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
6
|
+
paginateContents(params?: PaginateParams & {
|
|
7
|
+
player_id?: string | null;
|
|
8
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
9
|
+
findContents(params?: PaginateParams & {
|
|
10
|
+
title?: string | null;
|
|
11
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
12
|
+
getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
13
|
+
updateFields(id: string, body?: Partial<typeof defaultUpdateFields>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=jdPlayerLog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jdPlayerLog.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/player/jdPlayerLog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AACnH,qBAAa,WAAY,SAAQ,UAAU;gBAC9B,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAA6C;IAIxG,OAAO,CAAC,IAAI,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAI1B,WAAW,CAAC,MAAM,GAAE,OAAO,CAAC,OAAO,iBAAiB,CAAM;IAK1D,gBAAgB,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,SAAS,CAAC,EAAE,MAAM,GAAC,IAAI,CAAA;KAAO;IAM1E,YAAY,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,KAAK,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;KAAO;IAMnE,OAAO,CAAC,EAAE,EAAC,MAAM;IAIjB,YAAY,CAAC,EAAE,EAAC,MAAM,EAAE,IAAI,GAAE,OAAO,CAAC,OAAO,mBAAmB,CAAM;CAG5E"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { JDResource, ConnectorInfo } from "../../jdResource";
|
|
2
|
+
export class JdPlayerLog extends JDResource {
|
|
3
|
+
constructor(data = {}, connectorInfo = new ConnectorInfo("", "", "")) {
|
|
4
|
+
super(connectorInfo);
|
|
5
|
+
this.setData(data);
|
|
6
|
+
}
|
|
7
|
+
setData(data) {
|
|
8
|
+
super.setData(data);
|
|
9
|
+
}
|
|
10
|
+
async getContents(params = {}) {
|
|
11
|
+
const queryParams = this.getSortParameters(params);
|
|
12
|
+
return await this.getRelative('/modules/player/player_logs', queryParams);
|
|
13
|
+
}
|
|
14
|
+
async paginateContents(params = {}) {
|
|
15
|
+
const queryParams = this.getSortParameters(params);
|
|
16
|
+
if (params.player_id)
|
|
17
|
+
queryParams['player_id'] = params.player_id;
|
|
18
|
+
return await this.getRelative('/modules/player/player_logs/paginate', queryParams);
|
|
19
|
+
}
|
|
20
|
+
async findContents(params = {}) {
|
|
21
|
+
const queryParams = this.getSortParameters(params);
|
|
22
|
+
if (params.title)
|
|
23
|
+
queryParams['title'] = params.title;
|
|
24
|
+
return await this.getRelative('/modules/player/player_logs/find', queryParams);
|
|
25
|
+
}
|
|
26
|
+
async getInfo(id) {
|
|
27
|
+
return await this.getRelative(`/modules/player/player_logs/${id}`, {});
|
|
28
|
+
}
|
|
29
|
+
async updateFields(id, body = {}) {
|
|
30
|
+
return await this.postRelative(`/modules/player/player_logs/${id}/update`, body);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { JDResource, ConnectorInfo, defaultSortParams, defaultUpdateFields, PaginateParams } from "../../jdResource";
|
|
2
|
+
export declare class JdPlayerRank extends JDResource {
|
|
3
|
+
constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
|
|
4
|
+
setData(data: Record<string, any>): void;
|
|
5
|
+
getContents(params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
6
|
+
paginateContents(params?: PaginateParams & {
|
|
7
|
+
player_id?: string | null;
|
|
8
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
9
|
+
findContents(params?: PaginateParams & {
|
|
10
|
+
title?: string | null;
|
|
11
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
12
|
+
getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
13
|
+
updateFields(id: string, body?: Partial<typeof defaultUpdateFields>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=jdPlayerRank.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jdPlayerRank.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/player/jdPlayerRank.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEnH,qBAAa,YAAa,SAAQ,UAAU;gBAC/B,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAA6C;IAIxG,OAAO,CAAC,IAAI,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAI1B,WAAW,CAAC,MAAM,GAAE,OAAO,CAAC,OAAO,iBAAiB,CAAM;IAK1D,gBAAgB,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,SAAS,CAAC,EAAE,MAAM,GAAC,IAAI,CAAA;KAAO;IAM1E,YAAY,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,KAAK,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;KAAO;IAMnE,OAAO,CAAC,EAAE,EAAC,MAAM;IAIjB,YAAY,CAAC,EAAE,EAAC,MAAM,EAAE,IAAI,GAAE,OAAO,CAAC,OAAO,mBAAmB,CAAM;CAG5E"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { JDResource, ConnectorInfo } from "../../jdResource";
|
|
2
|
+
export class JdPlayerRank extends JDResource {
|
|
3
|
+
constructor(data = {}, connectorInfo = new ConnectorInfo("", "", "")) {
|
|
4
|
+
super(connectorInfo);
|
|
5
|
+
this.setData(data);
|
|
6
|
+
}
|
|
7
|
+
setData(data) {
|
|
8
|
+
super.setData(data);
|
|
9
|
+
}
|
|
10
|
+
async getContents(params = {}) {
|
|
11
|
+
const queryParams = this.getSortParameters(params);
|
|
12
|
+
return await this.getRelative('/modules/player/player_ranks', queryParams);
|
|
13
|
+
}
|
|
14
|
+
async paginateContents(params = {}) {
|
|
15
|
+
const queryParams = this.getSortParameters(params);
|
|
16
|
+
if (params.player_id)
|
|
17
|
+
queryParams['player_id'] = params.player_id;
|
|
18
|
+
return await this.getRelative('/modules/player/player_ranks/paginate', queryParams);
|
|
19
|
+
}
|
|
20
|
+
async findContents(params = {}) {
|
|
21
|
+
const queryParams = this.getSortParameters(params);
|
|
22
|
+
if (params.title)
|
|
23
|
+
queryParams['title'] = params.title;
|
|
24
|
+
return await this.getRelative('/modules/player/player_ranks/find', queryParams);
|
|
25
|
+
}
|
|
26
|
+
async getInfo(id) {
|
|
27
|
+
return await this.getRelative(`/modules/player/player_ranks/${id}`, {});
|
|
28
|
+
}
|
|
29
|
+
async updateFields(id, body = {}) {
|
|
30
|
+
return await this.postRelative(`/modules/player/player_ranks/${id}/update`, body);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { JDResource, ConnectorInfo, defaultSortParams, defaultUpdateFields, PaginateParams } from "../../jdResource";
|
|
2
|
+
export declare class JdPlayerReport extends JDResource {
|
|
3
|
+
constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
|
|
4
|
+
setData(data: Record<string, any>): void;
|
|
5
|
+
getContents(params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
6
|
+
paginateContents(params?: PaginateParams & {
|
|
7
|
+
player_id?: string | null;
|
|
8
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
9
|
+
findContents(params?: PaginateParams & {
|
|
10
|
+
title?: string | null;
|
|
11
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
12
|
+
getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
13
|
+
updateFields(id: string, body?: Partial<typeof defaultUpdateFields>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=jdPlayerReport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jdPlayerReport.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/player/jdPlayerReport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEnH,qBAAa,cAAe,SAAQ,UAAU;gBACjC,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAA6C;IAIxG,OAAO,CAAC,IAAI,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAI1B,WAAW,CAAC,MAAM,GAAE,OAAO,CAAC,OAAO,iBAAiB,CAAM;IAK1D,gBAAgB,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,SAAS,CAAC,EAAE,MAAM,GAAC,IAAI,CAAA;KAAO;IAM1E,YAAY,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,KAAK,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;KAAO;IAMnE,OAAO,CAAC,EAAE,EAAC,MAAM;IAIjB,YAAY,CAAC,EAAE,EAAC,MAAM,EAAE,IAAI,GAAE,OAAO,CAAC,OAAO,mBAAmB,CAAM;CAG5E"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { JDResource, ConnectorInfo } from "../../jdResource";
|
|
2
|
+
export class JdPlayerReport extends JDResource {
|
|
3
|
+
constructor(data = {}, connectorInfo = new ConnectorInfo("", "", "")) {
|
|
4
|
+
super(connectorInfo);
|
|
5
|
+
this.setData(data);
|
|
6
|
+
}
|
|
7
|
+
setData(data) {
|
|
8
|
+
super.setData(data);
|
|
9
|
+
}
|
|
10
|
+
async getContents(params = {}) {
|
|
11
|
+
const queryParams = this.getSortParameters(params);
|
|
12
|
+
return await this.getRelative('/modules/player/player_reports', queryParams);
|
|
13
|
+
}
|
|
14
|
+
async paginateContents(params = {}) {
|
|
15
|
+
const queryParams = this.getSortParameters(params);
|
|
16
|
+
if (params.player_id)
|
|
17
|
+
queryParams['player_id'] = params.player_id;
|
|
18
|
+
return await this.getRelative('/modules/player/player_reports/paginate', queryParams);
|
|
19
|
+
}
|
|
20
|
+
async findContents(params = {}) {
|
|
21
|
+
const queryParams = this.getSortParameters(params);
|
|
22
|
+
if (params.title)
|
|
23
|
+
queryParams['title'] = params.title;
|
|
24
|
+
return await this.getRelative('/modules/player/player_reports/find', queryParams);
|
|
25
|
+
}
|
|
26
|
+
async getInfo(id) {
|
|
27
|
+
return await this.getRelative(`/modules/player/player_reports/${id}`, {});
|
|
28
|
+
}
|
|
29
|
+
async updateFields(id, body = {}) {
|
|
30
|
+
return await this.postRelative(`/modules/player/player_reports/${id}/update`, body);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { JDResource, ConnectorInfo, defaultSortParams, defaultUpdateFields, PaginateParams } from "../../jdResource";
|
|
2
|
+
export declare class JdRootPlayerExclusion extends JDResource {
|
|
3
|
+
constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
|
|
4
|
+
setData(data: Record<string, any>): void;
|
|
5
|
+
getContents(params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
6
|
+
paginateContents(params?: PaginateParams & {
|
|
7
|
+
player_id?: string | null;
|
|
8
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
9
|
+
findContents(params?: PaginateParams & {
|
|
10
|
+
title?: string | null;
|
|
11
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
12
|
+
getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
13
|
+
updateFields(id: string, body?: Partial<typeof defaultUpdateFields>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=jdRootPlayerExclusion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jdRootPlayerExclusion.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/player/jdRootPlayerExclusion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEnH,qBAAa,qBAAsB,SAAQ,UAAU;gBACxC,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAA6C;IAIxG,OAAO,CAAC,IAAI,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAI1B,WAAW,CAAC,MAAM,GAAE,OAAO,CAAC,OAAO,iBAAiB,CAAM;IAK1D,gBAAgB,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,SAAS,CAAC,EAAE,MAAM,GAAC,IAAI,CAAA;KAAO;IAM1E,YAAY,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,KAAK,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;KAAO;IAMnE,OAAO,CAAC,EAAE,EAAC,MAAM;IAIjB,YAAY,CAAC,EAAE,EAAC,MAAM,EAAE,IAAI,GAAE,OAAO,CAAC,OAAO,mBAAmB,CAAM;CAG5E"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { JDResource, ConnectorInfo } from "../../jdResource";
|
|
2
|
+
export class JdRootPlayerExclusion extends JDResource {
|
|
3
|
+
constructor(data = {}, connectorInfo = new ConnectorInfo("", "", "")) {
|
|
4
|
+
super(connectorInfo);
|
|
5
|
+
this.setData(data);
|
|
6
|
+
}
|
|
7
|
+
setData(data) {
|
|
8
|
+
super.setData(data);
|
|
9
|
+
}
|
|
10
|
+
async getContents(params = {}) {
|
|
11
|
+
const queryParams = this.getSortParameters(params);
|
|
12
|
+
return await this.getRelative('/modules/player/root_player_exclusions', queryParams);
|
|
13
|
+
}
|
|
14
|
+
async paginateContents(params = {}) {
|
|
15
|
+
const queryParams = this.getSortParameters(params);
|
|
16
|
+
if (params.player_id)
|
|
17
|
+
queryParams['player_id'] = params.player_id;
|
|
18
|
+
return await this.getRelative('/modules/player/root_player_exclusions/paginate', queryParams);
|
|
19
|
+
}
|
|
20
|
+
async findContents(params = {}) {
|
|
21
|
+
const queryParams = this.getSortParameters(params);
|
|
22
|
+
if (params.title)
|
|
23
|
+
queryParams['title'] = params.title;
|
|
24
|
+
return await this.getRelative('/modules/player/root_player_exclusions/find', queryParams);
|
|
25
|
+
}
|
|
26
|
+
async getInfo(id) {
|
|
27
|
+
return await this.getRelative(`/modules/player/root_player_exclusions/${id}`, {});
|
|
28
|
+
}
|
|
29
|
+
async updateFields(id, body = {}) {
|
|
30
|
+
return await this.postRelative(`/modules/player/root_player_exclusions/${id}/update`, body);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { JDResource, ConnectorInfo, defaultSortParams, defaultUpdateFields, PaginateParams } from "../../jdResource";
|
|
2
|
+
export declare class JdSessionUser extends JDResource {
|
|
3
|
+
constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
|
|
4
|
+
setData(data: Record<string, any>): void;
|
|
5
|
+
getContents(params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
6
|
+
paginateContents(params?: PaginateParams & {
|
|
7
|
+
player_id?: string | null;
|
|
8
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
9
|
+
findContents(params?: PaginateParams & {
|
|
10
|
+
title?: string | null;
|
|
11
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
12
|
+
getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
13
|
+
updateFields(id: string, body?: Partial<typeof defaultUpdateFields>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=jdSessionUser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jdSessionUser.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/player/jdSessionUser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEnH,qBAAa,aAAc,SAAQ,UAAU;gBAChC,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAA6C;IAIxG,OAAO,CAAC,IAAI,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAI1B,WAAW,CAAC,MAAM,GAAE,OAAO,CAAC,OAAO,iBAAiB,CAAM;IAK1D,gBAAgB,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,SAAS,CAAC,EAAE,MAAM,GAAC,IAAI,CAAA;KAAO;IAM1E,YAAY,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,KAAK,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;KAAO;IAMnE,OAAO,CAAC,EAAE,EAAC,MAAM;IAIjB,YAAY,CAAC,EAAE,EAAC,MAAM,EAAE,IAAI,GAAE,OAAO,CAAC,OAAO,mBAAmB,CAAM;CAG5E"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { JDResource, ConnectorInfo } from "../../jdResource";
|
|
2
|
+
export class JdSessionUser extends JDResource {
|
|
3
|
+
constructor(data = {}, connectorInfo = new ConnectorInfo("", "", "")) {
|
|
4
|
+
super(connectorInfo);
|
|
5
|
+
this.setData(data);
|
|
6
|
+
}
|
|
7
|
+
setData(data) {
|
|
8
|
+
super.setData(data);
|
|
9
|
+
}
|
|
10
|
+
async getContents(params = {}) {
|
|
11
|
+
const queryParams = this.getSortParameters(params);
|
|
12
|
+
return await this.getRelative('/modules/player/session_users', queryParams);
|
|
13
|
+
}
|
|
14
|
+
async paginateContents(params = {}) {
|
|
15
|
+
const queryParams = this.getSortParameters(params);
|
|
16
|
+
if (params.player_id)
|
|
17
|
+
queryParams['player_id'] = params.player_id;
|
|
18
|
+
return await this.getRelative('/modules/player/session_users/paginate', queryParams);
|
|
19
|
+
}
|
|
20
|
+
async findContents(params = {}) {
|
|
21
|
+
const queryParams = this.getSortParameters(params);
|
|
22
|
+
if (params.title)
|
|
23
|
+
queryParams['title'] = params.title;
|
|
24
|
+
return await this.getRelative('/modules/player/session_users/find', queryParams);
|
|
25
|
+
}
|
|
26
|
+
async getInfo(id) {
|
|
27
|
+
return await this.getRelative(`/modules/player/session_users/${id}`, {});
|
|
28
|
+
}
|
|
29
|
+
async updateFields(id, body = {}) {
|
|
30
|
+
return await this.postRelative(`/modules/player/session_users/${id}/update`, body);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browserUtils.d.ts","sourceRoot":"","sources":["../../../src/sdk/utilities/browserUtils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,MAAM,EAAC,MAAM,iCAAiC,CAAC;AAEvD,qBAAa,YAAY;IAErB,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IASrD,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAC,IAAI;IAQ/C,MAAM,CAAE,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,IAAI;IAOnD,MAAM,CAAE,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAC,IAAI;IAQhD,MAAM,CAAC,SAAS,CAAC,KAAK,EAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;IAUpD,MAAM,CAAC,SAAS,CAAC,KAAK,EAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"browserUtils.d.ts","sourceRoot":"","sources":["../../../src/sdk/utilities/browserUtils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,MAAM,EAAC,MAAM,iCAAiC,CAAC;AAEvD,qBAAa,YAAY;IAErB,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IASrD,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAC,IAAI;IAQ/C,MAAM,CAAE,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,IAAI;IAOnD,MAAM,CAAE,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAC,IAAI;IAQhD,MAAM,CAAC,SAAS,CAAC,KAAK,EAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;IAUpD,MAAM,CAAC,SAAS,CAAC,KAAK,EAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM;IAI7D,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAC,GAAG,EAAE,OAAO,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAI,MAAM;IAkBhF,MAAM,CAAC,kBAAkB,CAAC,OAAO,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAI,MAAM;IAgB/D,MAAM,CAAC,kBAAkB;IAUzB,MAAM,CAAC,UAAU,IAAG,OAAO;IAK3B,MAAM,CAAC,MAAM;CAKhB"}
|
|
@@ -36,17 +36,11 @@ export class BrowserUtils {
|
|
|
36
36
|
httpOnly: true, // Prevent client-side access
|
|
37
37
|
secure: true, // Use HTTPS
|
|
38
38
|
path: '/', // Available site-wide
|
|
39
|
-
maxAge: 60 * 60 * 24 *
|
|
39
|
+
maxAge: 60 * 60 * 24 * 365 // 1 year
|
|
40
40
|
};
|
|
41
41
|
event.cookies.set(key, val, cookieOptions);
|
|
42
42
|
}
|
|
43
43
|
static getCookie(event, key, val) {
|
|
44
|
-
const cookieOptions = {
|
|
45
|
-
httpOnly: true, // Prevent client-side access
|
|
46
|
-
secure: true, // Use HTTPS
|
|
47
|
-
path: '/', // Available site-wide
|
|
48
|
-
maxAge: 60 * 60 * 24 * 7 // 1 week
|
|
49
|
-
};
|
|
50
44
|
return event.cookies.get(key);
|
|
51
45
|
}
|
|
52
46
|
static setServerUserSessionInfo(event, dataRaw) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateUtils.d.ts","sourceRoot":"","sources":["../../../src/sdk/utilities/dateUtils.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAS;IAQlB,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI;
|
|
1
|
+
{"version":3,"file":"dateUtils.d.ts","sourceRoot":"","sources":["../../../src/sdk/utilities/dateUtils.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAS;IAQlB,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI;IAoDlC,MAAM,CAAC,cAAc,IAAI,MAAM;IAK/B,MAAM,CAAC,YAAY,IAAI,MAAM;CAGhC"}
|