jd_platform_sdk 0.0.2 → 0.0.4

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.
Files changed (63) hide show
  1. package/dist/index.d.ts +5 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +8 -0
  4. package/dist/sdk/configs/jdConfig.js +2 -2
  5. package/dist/sdk/jdConnector.d.ts +2 -2
  6. package/dist/sdk/jdConnector.d.ts.map +1 -1
  7. package/dist/sdk/jdConnector.js +10 -8
  8. package/dist/sdk/jdSdk.d.ts +1 -1
  9. package/dist/sdk/jdSdk.d.ts.map +1 -1
  10. package/dist/sdk/jdSdk.js +2 -1
  11. package/dist/sdk/models/jdApplication.d.ts +3 -3
  12. package/dist/sdk/models/jdApplication.d.ts.map +1 -1
  13. package/dist/sdk/models/jdApplication.js +3 -5
  14. package/dist/sdk/models/jdResource.d.ts +13 -12
  15. package/dist/sdk/models/jdResource.d.ts.map +1 -1
  16. package/dist/sdk/models/jdResource.js +46 -34
  17. package/dist/sdk/models/modules/geolocation/jdCity.d.ts +15 -0
  18. package/dist/sdk/models/modules/geolocation/jdCity.d.ts.map +1 -0
  19. package/dist/sdk/models/modules/geolocation/jdCity.js +50 -0
  20. package/dist/sdk/models/modules/geolocation/jdCountry.d.ts +10 -0
  21. package/dist/sdk/models/modules/geolocation/jdCountry.d.ts.map +1 -0
  22. package/dist/sdk/models/modules/geolocation/jdCountry.js +42 -0
  23. package/dist/sdk/models/modules/geolocation/jdDistrict.d.ts +14 -0
  24. package/dist/sdk/models/modules/geolocation/jdDistrict.d.ts.map +1 -0
  25. package/dist/sdk/models/modules/geolocation/jdDistrict.js +44 -0
  26. package/dist/sdk/models/modules/geolocation/jdState.d.ts +15 -0
  27. package/dist/sdk/models/modules/geolocation/jdState.d.ts.map +1 -0
  28. package/dist/sdk/models/modules/geolocation/jdState.js +50 -0
  29. package/dist/sdk/models/modules/karaoke/jdKtvShop.d.ts +24 -2
  30. package/dist/sdk/models/modules/karaoke/jdKtvShop.d.ts.map +1 -1
  31. package/dist/sdk/models/modules/karaoke/jdKtvShop.js +40 -5
  32. package/dist/sdk/models/modules/user/jdSessionUser.d.ts +17 -0
  33. package/dist/sdk/models/modules/user/jdSessionUser.d.ts.map +1 -0
  34. package/dist/sdk/models/modules/user/jdSessionUser.js +62 -0
  35. package/dist/sdk/models/modules/user/jdUser.d.ts +17 -0
  36. package/dist/sdk/models/modules/user/jdUser.d.ts.map +1 -0
  37. package/dist/sdk/models/modules/user/jdUser.js +72 -0
  38. package/dist/sdk/utilities/browserUtils.d.ts +6 -4
  39. package/dist/sdk/utilities/browserUtils.d.ts.map +1 -1
  40. package/dist/sdk/utilities/browserUtils.js +23 -21
  41. package/dist/sdk/utilities/utils.d.ts +2 -0
  42. package/dist/sdk/utilities/utils.d.ts.map +1 -1
  43. package/dist/sdk/utilities/utils.js +18 -0
  44. package/package.json +11 -2
  45. package/readme.md +5 -0
  46. package/dist/globals.d.ts +0 -7
  47. package/dist/globals.d.ts.map +0 -1
  48. package/dist/globals.js +0 -1
  49. package/dist/sdk/configs/dpConfig.d.ts +0 -15
  50. package/dist/sdk/configs/dpConfig.d.ts.map +0 -1
  51. package/dist/sdk/configs/dpConfig.js +0 -49
  52. package/dist/sdk/extensions/extensions.d.ts +0 -2
  53. package/dist/sdk/extensions/extensions.d.ts.map +0 -1
  54. package/dist/sdk/extensions/extensions.js +0 -23
  55. package/dist/sdk/utilities/crypto_utils.d.ts +0 -5
  56. package/dist/sdk/utilities/crypto_utils.d.ts.map +0 -1
  57. package/dist/sdk/utilities/crypto_utils.js +0 -26
  58. package/dist/stringUtils.d.ts +0 -3
  59. package/dist/stringUtils.d.ts.map +0 -1
  60. package/dist/stringUtils.js +0 -6
  61. package/dist/unit_tests.d.ts +0 -2
  62. package/dist/unit_tests.d.ts.map +0 -1
  63. package/dist/unit_tests.js +0 -7
@@ -1 +0,0 @@
1
- {"version":3,"file":"crypto_utils.d.ts","sourceRoot":"","sources":["../../../src/sdk/utilities/crypto_utils.ts"],"names":[],"mappings":"AAIA,qBAAa,aAAa;IAEtB,MAAM,CAAC,wBAAwB,CAAC,WAAW,EAAC,GAAG;IAqB/C,MAAM,CAAC,YAAY,CAAC,UAAU,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM;CAGvD"}
@@ -1,26 +0,0 @@
1
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2
- // @ts-ignore
3
- import hmacSha256 from 'crypto-js/hmac-sha256';
4
- export class CryptoUtility {
5
- // Generate hash string to sign to communicate with the server to allow from this client only
6
- static generateBeforeHashString(paramsArray) {
7
- const curUserId = globalThis.curUserId;
8
- const curApplicationId = globalThis.curApplicationId;
9
- const curAppSecret = globalThis.curAppSecret;
10
- const userId = curUserId.get();
11
- let strBeforeHash = curApplicationId.get() + userId;
12
- const appSecret = curAppSecret.get();
13
- // console.log(`Player ID: ${playerId}`);
14
- for (const param of paramsArray) {
15
- strBeforeHash += param;
16
- }
17
- // console.log(`Cur Application Id: ${curApplicationId.get()}`);
18
- // console.log(`Cur User Id: ${userId}`);
19
- // console.log(`Before Hash: ${strBeforeHash}`);
20
- // console.log(`App Secret: ${appSecret}`);
21
- return hmacSha256(strBeforeHash, appSecret).toString();
22
- }
23
- static generateHash(strMessage, secret) {
24
- return hmacSha256(strMessage, secret).toString();
25
- }
26
- }
@@ -1,3 +0,0 @@
1
- export declare function capitalize(text: string): string;
2
- export declare function lowercase(text: string): string;
3
- //# sourceMappingURL=stringUtils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stringUtils.d.ts","sourceRoot":"","sources":["../src/stringUtils.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C"}
@@ -1,6 +0,0 @@
1
- export function capitalize(text) {
2
- return text.charAt(0).toUpperCase() + text.slice(1);
3
- }
4
- export function lowercase(text) {
5
- return text.toLowerCase();
6
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=unit_tests.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unit_tests.d.ts","sourceRoot":"","sources":["../src/unit_tests.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- //Testing functions
2
- import { lowercase } from "./sdk/utilities/stringUtils";
3
- console.log(lowercase("Testing lowercase"));
4
- let strTest = "";
5
- console.log(`isset: ${strTest.isset()})`);
6
- strTest = "Now with value";
7
- console.log(`isset: ${strTest.isset()})`);