@accelbyte/sdk
Advanced tools
@@ -164,6 +164,11 @@ "use strict"; | ||
| static create(...configs) { | ||
| const defaultHeaders = {}; | ||
| if (typeof window === "undefined") { | ||
| defaultHeaders["User-Agent"] = `ags-typescript-sdk/${"4.2.0"}`; | ||
| } | ||
| const axiosInstance = import_axios2.default.create( | ||
| Object.assign( | ||
| { | ||
| paramsSerializer: import_query_string.default.stringify | ||
| paramsSerializer: import_query_string.default.stringify, | ||
| headers: defaultHeaders | ||
| }, | ||
@@ -170,0 +175,0 @@ ...configs |
@@ -98,6 +98,11 @@ // src/polyfills/browser.ts | ||
| static create(...configs) { | ||
| const defaultHeaders = {}; | ||
| if (typeof window === "undefined") { | ||
| defaultHeaders["User-Agent"] = `ags-typescript-sdk/${"4.2.0"}`; | ||
| } | ||
| const axiosInstance = axios2.create( | ||
| Object.assign( | ||
| { | ||
| paramsSerializer: qs.stringify | ||
| paramsSerializer: qs.stringify, | ||
| headers: defaultHeaders | ||
| }, | ||
@@ -104,0 +109,0 @@ ...configs |
@@ -104,6 +104,11 @@ // src/polyfills/node.ts | ||
| static create(...configs) { | ||
| const defaultHeaders = {}; | ||
| if (typeof window === "undefined") { | ||
| defaultHeaders["User-Agent"] = `ags-typescript-sdk/${"4.2.0"}`; | ||
| } | ||
| const axiosInstance = axios2.create( | ||
| Object.assign( | ||
| { | ||
| paramsSerializer: qs.stringify | ||
| paramsSerializer: qs.stringify, | ||
| headers: defaultHeaders | ||
| }, | ||
@@ -110,0 +115,0 @@ ...configs |
+8
-9
| import { AxiosRequestConfig, InternalAxiosRequestConfig, AxiosResponse, AxiosInstance, AxiosError } from 'axios'; | ||
| import { ZodTypeAny, z, ZodError } from 'zod'; | ||
| import { z, ZodTypeAny, ZodError } from 'zod'; | ||
| type MakeOptional<Type, UnionKeys extends keyof Type> = Omit<Type, UnionKeys> & Partial<Pick<Type, UnionKeys>>; | ||
| type MakeRequired<T, K extends keyof T> = T & { | ||
| [P in K]-?: T[P]; | ||
| }; | ||
| declare function isType<T extends ZodTypeAny>(schema: T, data: unknown): data is z.infer<T>; | ||
| declare const CoreConfig: z.ZodObject<{ | ||
@@ -76,3 +70,3 @@ /** | ||
| interface SdkConstructorParam { | ||
| coreConfig: MakeOptional<CoreConfig, 'useSchemaValidation'>; | ||
| coreConfig: z.input<typeof CoreConfig>; | ||
| axiosConfig?: AxiosConfig; | ||
@@ -95,2 +89,7 @@ webSocketConfig?: WebSocketConfig; | ||
| type MakeRequired<T, K extends keyof T> = T & { | ||
| [P in K]-?: T[P]; | ||
| }; | ||
| declare function isType<T extends ZodTypeAny>(schema: T, data: unknown): data is z.infer<T>; | ||
| declare const AccelByte: { | ||
@@ -507,2 +506,2 @@ SDK: (param: SdkConstructorParam) => AccelByteSDK; | ||
| export { AccelByte, AccelByteSDK, type ApiError, ApiUtils, type AxiosConfig, BrowserHelper, CodeGenUtil, CoreConfig, DecodeError, DesktopChecker, ERROR_CODE_LINK_DELETION_ACCOUNT, ERROR_CODE_TOKEN_EXPIRED, ERROR_LINK_ANOTHER_3RD_PARTY_ACCOUNT, ERROR_USER_BANNED, ErrorInterceptors, IamErrorCode, type Interceptor, type MakeOptional, type MakeRequired, Network, RefreshSession, RefreshToken, type Response, type ResponseError, type SdkConstructorParam, SdkDevice, type SdkSetConfigParam, type TokenConfig, UrlHelper, Validate, type WebSocketConfig, createAuthInterceptor, createCustomPathInterceptor, createGetSessionInterceptor, createRefreshSessionInterceptor, isType }; | ||
| export { AccelByte, AccelByteSDK, type ApiError, ApiUtils, type AxiosConfig, BrowserHelper, CodeGenUtil, CoreConfig, DecodeError, DesktopChecker, ERROR_CODE_LINK_DELETION_ACCOUNT, ERROR_CODE_TOKEN_EXPIRED, ERROR_LINK_ANOTHER_3RD_PARTY_ACCOUNT, ERROR_USER_BANNED, ErrorInterceptors, IamErrorCode, type Interceptor, type MakeRequired, Network, RefreshSession, RefreshToken, type Response, type ResponseError, type SdkConstructorParam, SdkDevice, type SdkSetConfigParam, type TokenConfig, UrlHelper, Validate, type WebSocketConfig, createAuthInterceptor, createCustomPathInterceptor, createGetSessionInterceptor, createRefreshSessionInterceptor, isType }; |
+6
-6
| { | ||
| "name": "@accelbyte/sdk", | ||
| "version": "4.2.0", | ||
| "version": "4.3.0", | ||
| "author": "AccelByte Inc", | ||
@@ -44,11 +44,11 @@ "license": "SEE LICENSE IN LICENSE", | ||
| "rimraf": "4.4.1", | ||
| "rollup": "3.29.5", | ||
| "rollup": "3.30.0", | ||
| "tslib": "2.4.0", | ||
| "tsup": "8.3.5", | ||
| "typescript": "5.5.4", | ||
| "typescript": "5.8.3", | ||
| "vitest": "3.1.1" | ||
| }, | ||
| "dependencies": { | ||
| "@accelbyte/validator": "0.2.30", | ||
| "axios": "1.12.0", | ||
| "@accelbyte/validator": "0.3.0", | ||
| "axios": "1.13.5", | ||
| "buffer": "6.0.3", | ||
@@ -60,3 +60,3 @@ "crypto-js": "4.2.0", | ||
| "uuid": "8.3.2", | ||
| "validator": "13.15.20", | ||
| "validator": "13.15.22", | ||
| "ws": "8.18.0", | ||
@@ -63,0 +63,0 @@ "zod": "3.23.8" |
+3
-3
@@ -99,6 +99,6 @@ # AccelByte Gaming Services (AGS) TypeScript SDK | ||
| To retrieve data using a generated query, you can use one of the SDK's hooks. The query key used in invalidation can be found within the generated queries. | ||
| To retrieve data using a generated query, you can use one of the SDK's hooks. The query key used in invalidation can be found within the generated queries. To use the query, you need to append the import path with `/react-query`. | ||
| ```js | ||
| import { useUsersAdminApi_GetUsersMe_v3 } from '@accelbyte/sdk-iam' | ||
| import { useUsersAdminApi_GetUsersMe_v3 } from '@accelbyte/sdk-iam/react-query' | ||
@@ -125,3 +125,3 @@ const usersQuery = useUsersAdminApi_GetUsersMe_v3( | ||
| ```js | ||
| import { useUsersAdminApi_UpdateUser_v3 } from '@accelbyte/sdk-iam'; | ||
| import { useUsersAdminApi_UpdateUser_v3 } from '@accelbyte/sdk-iam/react-query'; | ||
| import { useQueryClient } from '@tanstack/react-query'; | ||
@@ -128,0 +128,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Unidentified License
LicenseSomething that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Unidentified License
LicenseSomething that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
1329748
0.1%7062
0.23%111
1.83%+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
Updated
Updated
Updated