@opexa/portal-sdk 0.0.3 → 0.0.5

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 (35) hide show
  1. package/dist/index.js +59 -59
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +123 -98
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/sdk.d.ts +1 -1
  6. package/dist/{graphql → services}/file.service.d.ts +1 -2
  7. package/dist/{session-service.d.ts → session-manager.d.ts} +6 -3
  8. package/dist/transformer.d.ts +1 -1
  9. package/dist/types.d.ts +1 -5
  10. package/dist/utils/sleep.d.ts +1 -0
  11. package/package.json +2 -2
  12. /package/dist/{graphql → services}/account.service.d.ts +0 -0
  13. /package/dist/{graphql → services}/announcement.d.ts +0 -0
  14. /package/dist/{graphql → services}/auth.service.d.ts +0 -0
  15. /package/dist/{graphql → services}/bet-record.d.ts +0 -0
  16. /package/dist/{graphql → services}/bonus.d.ts +0 -0
  17. /package/dist/{graphql → services}/cashback.d.ts +0 -0
  18. /package/dist/{graphql → services}/deposit.d.ts +0 -0
  19. /package/dist/{graphql → services}/file.d.ts +0 -0
  20. /package/dist/{graphql → services}/game.d.ts +0 -0
  21. /package/dist/{graphql → services}/game.service.d.ts +0 -0
  22. /package/dist/{graphql → services}/index.d.ts +0 -0
  23. /package/dist/{graphql → services}/member.d.ts +0 -0
  24. /package/dist/{graphql → services}/platform.d.ts +0 -0
  25. /package/dist/{graphql → services}/points.d.ts +0 -0
  26. /package/dist/{graphql → services}/portal.service.d.ts +0 -0
  27. /package/dist/{graphql → services}/promo.d.ts +0 -0
  28. /package/dist/{graphql → services}/report.service.d.ts +0 -0
  29. /package/dist/{graphql → services}/session.d.ts +0 -0
  30. /package/dist/{graphql → services}/static.service.d.ts +0 -0
  31. /package/dist/{graphql → services}/transaction.d.ts +0 -0
  32. /package/dist/{graphql → services}/types.d.ts +0 -0
  33. /package/dist/{graphql → services}/wallet.d.ts +0 -0
  34. /package/dist/{graphql → services}/wallet.service.d.ts +0 -0
  35. /package/dist/{graphql → services}/withdrawal.d.ts +0 -0
package/dist/sdk.d.ts CHANGED
@@ -20,7 +20,7 @@ export declare class Sdk {
20
20
  private reportService;
21
21
  private portalService;
22
22
  private accountService;
23
- private sessionService;
23
+ private sessionManager;
24
24
  private transformer;
25
25
  private logger;
26
26
  constructor(config: SdkConfig);
@@ -1,6 +1,5 @@
1
- import { FileQueryVariables, UploadPrivateImageFileMutationVariables } from '../graphql';
2
1
  import { GraphQLClient } from '../utils/graphql-client';
3
- import { File, UploadPrivateImageFileError } from './file';
2
+ import { File, FileQueryVariables, UploadPrivateImageFileError, UploadPrivateImageFileMutationVariables } from './file';
4
3
  import { OperationResult } from './types';
5
4
 
6
5
  export declare class FileService {
@@ -1,4 +1,4 @@
1
- import { AuthServiceConfig, CreateSessionError, CreateSessionInput, OperationResult, RefreshSessionError, Session } from './graphql';
1
+ import { AuthServiceConfig, CreateSessionError, CreateSessionInput, OperationResult, RefreshSessionError, Session } from './services';
2
2
 
3
3
  interface Data {
4
4
  session: Session;
@@ -7,13 +7,16 @@ interface Data {
7
7
  refreshToken: string;
8
8
  refreshTokenExpiresAt: number;
9
9
  }
10
- export declare class SessionService {
10
+ export declare class SessionManager {
11
11
  private logger;
12
12
  private storageKey;
13
13
  private authService;
14
+ private _refreshing;
14
15
  constructor(config: AuthServiceConfig);
16
+ get refreshing(): boolean;
17
+ set refreshing(value: boolean);
15
18
  create(input: CreateSessionInput): Promise<OperationResult<CreateSessionError>>;
16
- session(): Promise<OperationResult<RefreshSessionError, Data | null>>;
19
+ get(): Promise<OperationResult<RefreshSessionError, Data | null>>;
17
20
  destroy(): Promise<void>;
18
21
  verify(): Promise<boolean>;
19
22
  private get isServer();
@@ -1,4 +1,4 @@
1
- import type * as Internal from './graphql';
1
+ import type * as Internal from './services';
2
2
  import type * as External from './types';
3
3
  interface TransformerConfig {
4
4
  environment?: 'development' | 'production';
package/dist/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { HttpError } from './utils/http-error';
2
- import type * as Internal from './graphql';
2
+ import type * as Internal from './services';
3
3
  type WithCursor<T> = T & {
4
4
  cursor: string;
5
5
  };
@@ -377,10 +377,6 @@ export interface Game {
377
377
  id: string;
378
378
  name: string;
379
379
  type: GameType;
380
- /**
381
- * @deprecated use `images` instead
382
- */
383
- image: string;
384
380
  images: string[];
385
381
  provider: GameProvider;
386
382
  }
@@ -0,0 +1 @@
1
+ export declare function sleep(ms: number): Promise<void>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@opexa/portal-sdk",
3
3
  "type": "module",
4
- "version": "0.0.3",
4
+ "version": "0.0.5",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "typings": "dist/index.d.ts",
@@ -21,7 +21,7 @@
21
21
  ],
22
22
  "scripts": {
23
23
  "dev": "vite",
24
- "build": "vite build --mode library",
24
+ "build": "tsc --noEmit && vite build --mode library",
25
25
  "test": "vitest",
26
26
  "release": "release-it"
27
27
  },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes