@opexa/portal-sdk 0.0.90 → 0.0.92
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/README.md +1622 -1622
- package/dist/index.js +55 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +271 -143
- package/dist/index.mjs.map +1 -1
- package/dist/sdk/sdk.d.ts +7 -2
- package/dist/sdk/transformer.d.ts +2 -0
- package/dist/sdk/types.d.ts +23 -2
- package/dist/services/index.d.ts +1 -0
- package/dist/services/queries.d.ts +4 -0
- package/dist/services/trigger.service.d.ts +12 -0
- package/dist/services/types.d.ts +44 -0
- package/package.json +81 -81
package/dist/sdk/sdk.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccountReturn, ActivityRecordsInput, ActivityRecordsReturn, AnnouncementsInput, AnnouncementsReturn, AuthenticateInput, AuthenticateReturn, AvailablePromosReturn, BetRecordsInput, BetRecordsReturn, BonusReturn, CashbackBonusReturn, CashbacksReturn, ClaimCashbackBonusReturn, CreateAccountInput, CreateAccountInput__Next, CreateAccountReturn, CreateDepositInput, CreateDepositReturn, CreateGameSessionInput, CreateGameSessionReturn, CreateWithdrawalInput, CreateWithdrawalReturn, DeleteAccountReturn, DepositRecordsInput, DepositRecordsReturn, DepositReturn, DepositsCountReturn, DownlinesByNameInput, DownlinesByNameReturn, EndGameSessionReturn, FileReturn, GameReturn, GameSessionReturn, GamesInput, GamesReturn, LatestBetRecordsReturn, MayaSignInInput, MayaSignInReturn,
|
|
1
|
+
import { AccountReturn, ActivityRecordsInput, ActivityRecordsReturn, AnnouncementsInput, AnnouncementsReturn, AuthenticateInput, AuthenticateReturn, AvailablePromosReturn, BetRecordsInput, BetRecordsReturn, BonusReturn, CashbackBonusReturn, CashbacksReturn, ClaimCashbackBonusReturn, CreateAccountInput, CreateAccountInput__Next, CreateAccountReturn, CreateDepositInput, CreateDepositReturn, CreateGameSessionInput, CreateGameSessionReturn, CreateWithdrawalInput, CreateWithdrawalReturn, DeleteAccountReturn, DepositRecordsInput, DepositRecordsReturn, DepositReturn, DepositsCountReturn, DownlinesByNameInput, DownlinesByNameReturn, EndGameSessionReturn, FileReturn, GameReturn, GameSessionReturn, GamesInput, GamesReturn, LatestBetRecordsReturn, MarkAllMessagesAsReadReturn, MarkMessageAsReadReturn, MayaSignInInput, MayaSignInReturn, MessagesInput, MessagesReturn, MobileNumberSignInInput, MobileNumberSignInReturn, NameAndPasswordSignInInput, NameAndPasswordSignInReturn, PaymentSettingsReturn, PlatformReturn, PlatformReturn__Next, PointsClubSettingsReturn, PointsWalletReturn, PointsWalletTransactionsInput, PointsWalletTransactionsReturn, ProfileCompletionReturn, PromosReturn, RedeemPointsInput, RedeemPointsReturn, ReferralCodeReturn, ReferralCommissionReturn, ReferralsInput, ReferralsReturn, RegisterMayaAccountInput, RegisterMayaAccountReturn, RemainingDailyWithdrawalsCountReturn, ResetPasswordInput, ResetPasswordReturn, SendVerificationCodeInput__Next, SendVerificationCodeReturn, SendVerificationCodeReturn__Next, SessionReturn, SiteReturn, SubmitVerificationDetailsInput, SubmitVerificationDetailsReturn, TokenSignInInput, TokenSignInReturn, TransactionRecordsInput, TransactionRecordsReturn, UnreadMessagesCountInput, UnreadMessagesCountReturn, UpdateAccountInput, UpdateAccountReturn, UpdateReferralCodeInput, UpdateReferralCodeReturn, UpdateVerificationDetailsInput, UpdateVerificationDetailsReturn, UplinesByNameInput, UplinesByNameReturn, UploadImageFileInput, UploadImageFileReturn, ValidateMayaSessionReturn, VerificationDetailsReturn, VerifyMobileNumberReturn, WalletReturn, WatchSessionInput, WithdrawalRecordsInput, WithdrawalRecordsReturn } from './types';
|
|
2
2
|
|
|
3
3
|
export interface SdkConfig {
|
|
4
4
|
site: string;
|
|
@@ -16,6 +16,7 @@ export declare class Sdk {
|
|
|
16
16
|
private accountService;
|
|
17
17
|
private reportService;
|
|
18
18
|
private portalService;
|
|
19
|
+
private triggerService;
|
|
19
20
|
private sessionManager;
|
|
20
21
|
private transformer;
|
|
21
22
|
private logger;
|
|
@@ -26,7 +27,7 @@ export declare class Sdk {
|
|
|
26
27
|
signIn(input: NameAndPasswordSignInInput): Promise<NameAndPasswordSignInReturn>;
|
|
27
28
|
signIn(input: MobileNumberSignInInput): Promise<MobileNumberSignInReturn>;
|
|
28
29
|
signIn(input: MayaSignInInput): Promise<MayaSignInReturn>;
|
|
29
|
-
signIn(input: TokenSignInInput): Promise<
|
|
30
|
+
signIn(input: TokenSignInInput): Promise<TokenSignInReturn>;
|
|
30
31
|
authenticate(input: AuthenticateInput): Promise<AuthenticateReturn>;
|
|
31
32
|
signOut(): Promise<void>;
|
|
32
33
|
watchSession(input: WatchSessionInput): () => void;
|
|
@@ -93,5 +94,9 @@ export declare class Sdk {
|
|
|
93
94
|
uplinesByName(input: UplinesByNameInput): Promise<UplinesByNameReturn>;
|
|
94
95
|
downlinesByName(input: DownlinesByNameInput): Promise<DownlinesByNameReturn>;
|
|
95
96
|
pointsClubSettings(): Promise<PointsClubSettingsReturn>;
|
|
97
|
+
messages(input?: MessagesInput): Promise<MessagesReturn>;
|
|
98
|
+
unreadMessagesCount(input?: UnreadMessagesCountInput): Promise<UnreadMessagesCountReturn>;
|
|
99
|
+
markMessageAsRead(id: string): Promise<MarkMessageAsReadReturn>;
|
|
100
|
+
markAllMessageAsRead(): Promise<MarkAllMessagesAsReadReturn>;
|
|
96
101
|
}
|
|
97
102
|
export default Sdk;
|
|
@@ -35,6 +35,7 @@ export declare class Transformer {
|
|
|
35
35
|
platform__next: (data: Internal.Platform__Next) => External.Platform__Next;
|
|
36
36
|
pointsClubSettings: (data: Internal.PointsClubSettings) => External.PointsClubSettings;
|
|
37
37
|
paymentSettings: (data: Internal.PaymentSettings) => External.PaymentSettings;
|
|
38
|
+
message: (data: Internal.Message) => External.Message;
|
|
38
39
|
};
|
|
39
40
|
private site;
|
|
40
41
|
/** @deprecated */
|
|
@@ -65,5 +66,6 @@ export declare class Transformer {
|
|
|
65
66
|
private activityRecord;
|
|
66
67
|
private referral;
|
|
67
68
|
private referralCommission;
|
|
69
|
+
private message;
|
|
68
70
|
}
|
|
69
71
|
export {};
|
package/dist/sdk/types.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export interface MayaSignInInput {
|
|
|
40
40
|
}
|
|
41
41
|
export type MayaSignInReturn = OperationResult<SignInError>;
|
|
42
42
|
export type MobileNumberSignInReturn = OperationResult<SignInError>;
|
|
43
|
-
export type
|
|
43
|
+
export type TokenSignInReturn = OperationResult<SignInError>;
|
|
44
44
|
export type NameAndPasswordSignInReturn = OperationResult<SignInError, {
|
|
45
45
|
'2FAEnabled': true;
|
|
46
46
|
authenticator: Authenticator;
|
|
@@ -50,7 +50,7 @@ export type NameAndPasswordSignInReturn = OperationResult<SignInError, {
|
|
|
50
50
|
}>;
|
|
51
51
|
export type SignInInput = NameAndPasswordSignInInput | MobileNumberSignInInput | MayaSignInInput | TokenSignInInput;
|
|
52
52
|
export type SignInError = UnionAlias<Internal.CreateSessionError>;
|
|
53
|
-
export type SignInReturn = NameAndPasswordSignInReturn | MobileNumberSignInReturn | MayaSignInReturn |
|
|
53
|
+
export type SignInReturn = NameAndPasswordSignInReturn | MobileNumberSignInReturn | MayaSignInReturn | TokenSignInReturn;
|
|
54
54
|
export type RefreshSessionError = UnionAlias<Internal.RefreshSessionError>;
|
|
55
55
|
export interface SecurityQuestionAuthenticateInput extends Internal.SecurityQuestionAuthenticateInput {
|
|
56
56
|
}
|
|
@@ -808,4 +808,25 @@ export interface PointsClubSettings {
|
|
|
808
808
|
multiplier: number;
|
|
809
809
|
}
|
|
810
810
|
export type PointsClubSettingsReturn = OperationResult<never, PointsClubSettings | null>;
|
|
811
|
+
export type MessageLogo = UnionAlias<Internal.MessageLogo>;
|
|
812
|
+
export interface MessageAction extends Internal.MessageAction {
|
|
813
|
+
}
|
|
814
|
+
export interface Message {
|
|
815
|
+
id: string;
|
|
816
|
+
logo: MessageLogo;
|
|
817
|
+
title: string;
|
|
818
|
+
popup: boolean;
|
|
819
|
+
content: string;
|
|
820
|
+
actions: MessageAction[];
|
|
821
|
+
markedAsRead: boolean;
|
|
822
|
+
dateTimeCreated: Date;
|
|
823
|
+
}
|
|
824
|
+
export interface MessagesInput extends Internal.MessagesQueryVariables {
|
|
825
|
+
}
|
|
826
|
+
export type MessagesReturn = OperationResult<never, PaginatedQueryResult<'messages', Message>>;
|
|
827
|
+
export type MarkMessageAsReadReturn = OperationResult;
|
|
828
|
+
export type MarkAllMessagesAsReadReturn = OperationResult;
|
|
829
|
+
export interface UnreadMessagesCountInput extends Internal.UnreadMessagesCountQueryVariables {
|
|
830
|
+
}
|
|
831
|
+
export type UnreadMessagesCountReturn = OperationResult<never, number>;
|
|
811
832
|
export {};
|
package/dist/services/index.d.ts
CHANGED
|
@@ -72,3 +72,7 @@ export declare const UPLINES_BY_NAME_QUERY: string;
|
|
|
72
72
|
export declare const DOWNLINES_BY_NAME_QUERY: string;
|
|
73
73
|
export declare const REFERRAL_COMMISSION_QUERY: string;
|
|
74
74
|
export declare const POINTS_CLUB_SETTINGS_QUERY: string;
|
|
75
|
+
export declare const MESSAGES_QUERY: string;
|
|
76
|
+
export declare const UNREAD_MESSAGES_COUNT_QUERY: string;
|
|
77
|
+
export declare const MARK_MESSAGE_AS_READ_MUTATION: string;
|
|
78
|
+
export declare const MARK_ALL_MESSAGE_AS_READ_MUTATION: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GraphQLClient } from '../utils/graphql-client';
|
|
2
|
+
import { OperationResult } from '../utils/types';
|
|
3
|
+
import { MarkMessageAsReadMutationVariables, Message, MessagesQueryVariables, PaginatedQueryResult, UnreadMessagesCountQueryVariables } from './types';
|
|
4
|
+
|
|
5
|
+
export declare class TriggerService {
|
|
6
|
+
private client;
|
|
7
|
+
constructor(client: GraphQLClient);
|
|
8
|
+
messages(variables?: MessagesQueryVariables): Promise<OperationResult<never, PaginatedQueryResult<Message>>>;
|
|
9
|
+
unreadMessagesCount(variables?: UnreadMessagesCountQueryVariables): Promise<OperationResult<never, number>>;
|
|
10
|
+
markMessageAsRead(variables: MarkMessageAsReadMutationVariables): Promise<OperationResult>;
|
|
11
|
+
markAllMessageAsRead(): Promise<OperationResult>;
|
|
12
|
+
}
|
package/dist/services/types.d.ts
CHANGED
|
@@ -1144,3 +1144,47 @@ export interface PointsClubSettings {
|
|
|
1144
1144
|
export interface PointsClubSettingsQuery {
|
|
1145
1145
|
pointsClubSettings?: PointsClubSettings | null;
|
|
1146
1146
|
}
|
|
1147
|
+
export interface MessageAction {
|
|
1148
|
+
name: string;
|
|
1149
|
+
url: string;
|
|
1150
|
+
}
|
|
1151
|
+
export type MessageLogo = 'MESSAGE' | 'CHECK' | 'CELEBRATE' | 'ALERT';
|
|
1152
|
+
export interface Message {
|
|
1153
|
+
id: string;
|
|
1154
|
+
logo: MessageLogo;
|
|
1155
|
+
title: string;
|
|
1156
|
+
popup: boolean;
|
|
1157
|
+
content: string;
|
|
1158
|
+
actions: MessageAction[];
|
|
1159
|
+
markedAsRead: boolean;
|
|
1160
|
+
dateTimeCreated: DateString;
|
|
1161
|
+
}
|
|
1162
|
+
export interface MessagesQueryVariables {
|
|
1163
|
+
first?: number;
|
|
1164
|
+
after?: string;
|
|
1165
|
+
filter?: {
|
|
1166
|
+
popup?: BooleanFilterField;
|
|
1167
|
+
markedAsRead?: BooleanFilterField;
|
|
1168
|
+
};
|
|
1169
|
+
}
|
|
1170
|
+
export interface MessagesQuery extends PaginatedQuery<'messages', Message> {
|
|
1171
|
+
}
|
|
1172
|
+
export interface MarkMessageAsReadMutation {
|
|
1173
|
+
markMessageAsRead: boolean;
|
|
1174
|
+
}
|
|
1175
|
+
export interface MarkMessageAsReadMutationVariables {
|
|
1176
|
+
id: string;
|
|
1177
|
+
}
|
|
1178
|
+
export interface MarkAllMessageAsReadMutation {
|
|
1179
|
+
markAllMessageAsRead: boolean;
|
|
1180
|
+
}
|
|
1181
|
+
export interface UnreadMessagesCountQuery {
|
|
1182
|
+
messages: {
|
|
1183
|
+
totalCount: number;
|
|
1184
|
+
};
|
|
1185
|
+
}
|
|
1186
|
+
export interface UnreadMessagesCountQueryVariables {
|
|
1187
|
+
filter?: {
|
|
1188
|
+
popup?: BooleanFilterField;
|
|
1189
|
+
};
|
|
1190
|
+
}
|
package/package.json
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@opexa/portal-sdk",
|
|
3
|
-
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"module": "dist/index.mjs",
|
|
7
|
-
"typings": "dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"require": "./dist/index.js",
|
|
11
|
-
"import": "./dist/index.mjs",
|
|
12
|
-
"types": "./dist/index.d.ts"
|
|
13
|
-
},
|
|
14
|
-
"./package.json": "./package.json"
|
|
15
|
-
},
|
|
16
|
-
"publishConfig": {
|
|
17
|
-
"access": "public"
|
|
18
|
-
},
|
|
19
|
-
"files": [
|
|
20
|
-
"dist"
|
|
21
|
-
],
|
|
22
|
-
"scripts": {
|
|
23
|
-
"dev": "vite",
|
|
24
|
-
"build": "tsc --noEmit && vite build --mode library",
|
|
25
|
-
"test": "vitest",
|
|
26
|
-
"release": "release-it"
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"@opexa/object-id": "0.1.6"
|
|
30
|
-
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@ark-ui/react": "3.5.0",
|
|
33
|
-
"@faker-js/faker": "8.4.1",
|
|
34
|
-
"@fontsource/fira-code": "5.0.18",
|
|
35
|
-
"@fontsource/inter": "5.0.19",
|
|
36
|
-
"@hookform/resolvers": "3.9.0",
|
|
37
|
-
"@types/node": "20.14.11",
|
|
38
|
-
"@types/react": "18.3.3",
|
|
39
|
-
"@types/react-dom": "18.3.0",
|
|
40
|
-
"@untitled-theme/icons-react": "0.10.5",
|
|
41
|
-
"@vitejs/plugin-react-swc": "3.7.0",
|
|
42
|
-
"autoprefixer": "10.4.19",
|
|
43
|
-
"clsx": "2.1.1",
|
|
44
|
-
"date-fns": "3.6.0",
|
|
45
|
-
"graphql-config": "5.0.3",
|
|
46
|
-
"msw": "2.3.2",
|
|
47
|
-
"postcss": "8.4.39",
|
|
48
|
-
"react": "18.3.1",
|
|
49
|
-
"react-dom": "18.3.1",
|
|
50
|
-
"react-hook-form": "7.52.1",
|
|
51
|
-
"react-router-dom": "6.25.1",
|
|
52
|
-
"release-it": "17.6.0",
|
|
53
|
-
"shiki": "1.11.0",
|
|
54
|
-
"tailwind-variants": "0.2.1",
|
|
55
|
-
"tailwindcss": "3.4.6",
|
|
56
|
-
"typescript": "5.5.4",
|
|
57
|
-
"vite": "5.3.4",
|
|
58
|
-
"vite-plugin-dts": "3.9.1",
|
|
59
|
-
"vite-plugin-node-polyfills": "0.22.0",
|
|
60
|
-
"vite-tsconfig-paths": "4.3.2",
|
|
61
|
-
"vitest": "2.0.4",
|
|
62
|
-
"zod": "3.23.8"
|
|
63
|
-
},
|
|
64
|
-
"release-it": {
|
|
65
|
-
"git": {
|
|
66
|
-
"commitMessage": "chore: release ${npm.name} v${version}",
|
|
67
|
-
"tagName": "${npm.name}@${version}"
|
|
68
|
-
},
|
|
69
|
-
"github": {
|
|
70
|
-
"release": false
|
|
71
|
-
},
|
|
72
|
-
"hooks": {
|
|
73
|
-
"before:init": [
|
|
74
|
-
"pnpm test"
|
|
75
|
-
],
|
|
76
|
-
"after:bump": [
|
|
77
|
-
"pnpm build"
|
|
78
|
-
]
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@opexa/portal-sdk",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.0.92",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"typings": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"require": "./dist/index.js",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"./package.json": "./package.json"
|
|
15
|
+
},
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"dev": "vite",
|
|
24
|
+
"build": "tsc --noEmit && vite build --mode library",
|
|
25
|
+
"test": "vitest",
|
|
26
|
+
"release": "release-it"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@opexa/object-id": "0.1.6"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@ark-ui/react": "3.5.0",
|
|
33
|
+
"@faker-js/faker": "8.4.1",
|
|
34
|
+
"@fontsource/fira-code": "5.0.18",
|
|
35
|
+
"@fontsource/inter": "5.0.19",
|
|
36
|
+
"@hookform/resolvers": "3.9.0",
|
|
37
|
+
"@types/node": "20.14.11",
|
|
38
|
+
"@types/react": "18.3.3",
|
|
39
|
+
"@types/react-dom": "18.3.0",
|
|
40
|
+
"@untitled-theme/icons-react": "0.10.5",
|
|
41
|
+
"@vitejs/plugin-react-swc": "3.7.0",
|
|
42
|
+
"autoprefixer": "10.4.19",
|
|
43
|
+
"clsx": "2.1.1",
|
|
44
|
+
"date-fns": "3.6.0",
|
|
45
|
+
"graphql-config": "5.0.3",
|
|
46
|
+
"msw": "2.3.2",
|
|
47
|
+
"postcss": "8.4.39",
|
|
48
|
+
"react": "18.3.1",
|
|
49
|
+
"react-dom": "18.3.1",
|
|
50
|
+
"react-hook-form": "7.52.1",
|
|
51
|
+
"react-router-dom": "6.25.1",
|
|
52
|
+
"release-it": "17.6.0",
|
|
53
|
+
"shiki": "1.11.0",
|
|
54
|
+
"tailwind-variants": "0.2.1",
|
|
55
|
+
"tailwindcss": "3.4.6",
|
|
56
|
+
"typescript": "5.5.4",
|
|
57
|
+
"vite": "5.3.4",
|
|
58
|
+
"vite-plugin-dts": "3.9.1",
|
|
59
|
+
"vite-plugin-node-polyfills": "0.22.0",
|
|
60
|
+
"vite-tsconfig-paths": "4.3.2",
|
|
61
|
+
"vitest": "2.0.4",
|
|
62
|
+
"zod": "3.23.8"
|
|
63
|
+
},
|
|
64
|
+
"release-it": {
|
|
65
|
+
"git": {
|
|
66
|
+
"commitMessage": "chore: release ${npm.name} v${version}",
|
|
67
|
+
"tagName": "${npm.name}@${version}"
|
|
68
|
+
},
|
|
69
|
+
"github": {
|
|
70
|
+
"release": false
|
|
71
|
+
},
|
|
72
|
+
"hooks": {
|
|
73
|
+
"before:init": [
|
|
74
|
+
"pnpm test"
|
|
75
|
+
],
|
|
76
|
+
"after:bump": [
|
|
77
|
+
"pnpm build"
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|