@customafk/lunas-api-sdk 0.0.85 → 0.0.86
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.cjs.map +1 -1
- package/dist/index.d.cts +1424 -330
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1424 -330
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../src/utils.ts"],"sourcesContent":["import { AppType } from '@/router';\nimport type { Treaty } from '@elysiajs/eden';\nimport { treaty } from '@elysiajs/eden';\n\ntype RefreshStatus = 'SUCCESS' | 'FAILED';\n\n// Trick to extract Treaty Client type\nclass _Client {\n public static client: Treaty.Create<AppType>;\n public getClient() {\n return null;\n }\n}\n\n// tsdown cannot serialize the Elysia type chain directly — it drops the AppType\n// import when inlining types.d.ts, leaving AppType = any. Having an unexported\n// runtime function forces rolldown-plugin-dts to process the return type eagerly\n// from source rather than from a lazy declaration reference.\nconst _createClient = () => _Client.client;\nexport type TClient = ReturnType<typeof _createClient>;\n\nexport type TUser = Treaty.Data<\n Awaited<ReturnType<TClient['admin']['v1']['auth']['me']['get']>>\n>['data'];\n\ntype Config = {\n baseURL: string;\n config?: Omit<Treaty.Config, 'onResponse'>;\n};\n\nexport class ClientApi {\n // Keep track of the ongoing \"me\" request to prevent multiple simultaneous calls\n private static _client: TClient | undefined;\n private static _getMeTask: Promise<unknown> | null = null;\n private static _refreshTokenTask: Promise<{ status: RefreshStatus }> | null =\n null;\n private static _logoutTask: Promise<unknown> | null = null;\n\n public static user: TUser = null;\n\n public static listeners: {\n onUserChange?: (user: TUser | null) => void | Promise<void>;\n onGetMe?: (user: TUser | null) => void | Promise<void>;\n onLogout?: () => void | Promise<void>;\n onUnauthorized?: () => void | Promise<void>;\n onRefreshToken?: (status: 'SUCCESS' | 'FAILED') => void | Promise<void>;\n } | null = null;\n\n private static async _getUser() {\n // If already logged in, no need to fetch again\n if (ClientApi.user) return;\n\n // Ensure client is initialized\n if (!ClientApi._client) return;\n\n // If there's an ongoing \"me\" request, await its completion\n if (ClientApi._getMeTask) {\n await ClientApi._getMeTask;\n return;\n }\n\n const getMe = ClientApi._client.admin.v1.auth.me.get();\n // Store the ongoing task, so other can know about it and await it if needed\n ClientApi._getMeTask = getMe;\n try {\n const res = await getMe;\n if (!!res.data && !!res.data.data && res.data.success) {\n ClientApi.user = res.data.data;\n\n // CASE: Token Expired\n } else if (res?.data?.statusCode === 4001) {\n const { status } = await ClientApi._refreshToken();\n if (status === 'SUCCESS') {\n const _res = await ClientApi._client.admin.v1.auth.me.get();\n if (\n !!_res.data &&\n _res.data.success &&\n _res.data.statusCode === 200\n ) {\n ClientApi.user = _res.data.data;\n } else {\n ClientApi.user = null;\n }\n }\n if (status === 'FAILED') {\n ClientApi.user = null;\n }\n // CASE: Unauthorized\n } else {\n ClientApi.user = null;\n console.error('Failed to fetch user data:', JSON.stringify(res.data));\n }\n } catch (error) {\n console.error('Error fetching user data:', JSON.stringify(error));\n ClientApi.user = null;\n } finally {\n ClientApi._getMeTask = null;\n }\n }\n\n private static async _refreshToken() {\n // Ensure client is initialized\n if (!ClientApi._client) return { status: 'FAILED' as const };\n\n // If there's an ongoing \"refresh token\" request, await its completion\n if (ClientApi._refreshTokenTask) {\n const res = await ClientApi._refreshTokenTask;\n return res;\n }\n\n const handler = async (): Promise<{ status: RefreshStatus }> => {\n try {\n const res =\n await ClientApi._client?.admin.v1.auth['refresh-token'].get();\n if (!!res?.data && !!res.data.success && res.data.statusCode === 200) {\n return { status: 'SUCCESS' };\n }\n return { status: 'FAILED' };\n } catch (error) {\n console.error('Error refreshing token:', JSON.stringify(error));\n return { status: 'FAILED' };\n }\n };\n // Store the ongoing task, so other can know about it and await it if needed\n ClientApi._refreshTokenTask = handler();\n return ClientApi._refreshTokenTask.finally(() => {\n ClientApi._refreshTokenTask = null;\n });\n }\n\n private static async _logout() {\n // Ensure client is initialized\n if (!ClientApi._client) return;\n try {\n // If there's an ongoing \"logout\" request, await its completion\n if (ClientApi._logoutTask) {\n await ClientApi._logoutTask;\n return;\n }\n\n const logout = ClientApi._client.admin.v1.auth.logout.delete();\n // Store the ongoing task, so other can know about it and await it if needed\n ClientApi._logoutTask = logout;\n await logout;\n } catch (error) {\n console.error('Error during logout:', error);\n } finally {\n ClientApi.user = null;\n ClientApi._logoutTask = null;\n ClientApi.listeners?.onUserChange?.(null);\n ClientApi.listeners?.onLogout?.();\n }\n }\n\n constructor({ baseURL, config }: Config) {\n // Initialize Treaty Client\n if (!ClientApi._client) {\n ClientApi._client = treaty<Type.AppType>(baseURL, config);\n }\n\n this._onUnauthorized = async () => {\n ClientApi.user = null;\n await ClientApi.listeners?.onUserChange?.(null);\n await ClientApi.listeners?.onUnauthorized?.();\n };\n }\n\n public async getUser() {\n await ClientApi._getUser();\n await ClientApi.listeners?.onGetMe?.(ClientApi.user);\n return ClientApi.user ?? null;\n }\n\n public getClient(): TClient | undefined {\n return ClientApi._client;\n }\n\n public async logout() {\n await ClientApi._logout();\n }\n\n public async fetchApi<TData>({\n request,\n }: {\n request: (api: TClient) => Promise<TData>;\n }): Promise<TData | null> {\n // Ensure client is initialized\n if (!ClientApi._client) {\n throw new Error('Client not initialized');\n }\n\n try {\n // Await ongoing \"me\" request to ensure user state is up-to-date\n if (ClientApi._getMeTask) {\n console.log(\n 'Awaiting ongoing _getMeTask before proceeding with fetchApi'\n );\n await ClientApi._getMeTask;\n }\n\n // Await ongoing \"refresh token\" request to ensure token state is up-to-date\n if (ClientApi._refreshTokenTask) {\n console.log(\n 'Awaiting ongoing _refreshTokenTask before proceeding with fetchApi'\n );\n await ClientApi._refreshTokenTask;\n }\n\n // Await ongoing \"logout\" request to ensure user is logged out properly\n if (ClientApi._logoutTask) {\n console.log(\n 'Awaiting ongoing _logoutTask before proceeding with fetchApi'\n );\n await ClientApi._logoutTask;\n }\n\n const response = (await request(\n ClientApi._client\n )) as Treaty.TreatyResponse<Record<number, Type.TResponse<unknown>>>;\n\n // Check if response data exists\n if (!response.data) {\n console.error('No response data received from API request');\n return null;\n }\n\n // Check for status codes in the response data\n const _data = response.data;\n\n // CASE: User is Unauthorized\n if (_data?.statusCode === 401) {\n await this._onUnauthorized?.();\n return null;\n }\n\n // CASE: TOKEN EXPIRED - Re-fetch user data\n if (_data?.statusCode === 4001) {\n const { status } = await ClientApi._refreshToken();\n await ClientApi.listeners?.onRefreshToken?.(status);\n if (status === 'SUCCESS') {\n const response = (await request(\n ClientApi._client\n )) as Treaty.TreatyResponse<Record<number, Type.TResponse<unknown>>>;\n return response as TData;\n }\n if (status === 'FAILED') {\n await ClientApi._logout();\n return null;\n }\n }\n\n return response as TData;\n } catch (error) {\n console.error('Error in fetchApi:', JSON.stringify(error));\n return null;\n }\n }\n\n private _onUnauthorized?: () => void | Promise<void>;\n}\n"],"mappings":"gCA8BA,IAAa,EAAb,MAAa,CAAU,wBAGgC,mCAEnD,6BACoD,sBAE1B,2BAQjB,KAEX,aAAqB,UAAW,CAK9B,GAHI,EAAU,MAGV,CAAC,EAAU,QAAS,OAGxB,GAAI,EAAU,WAAY,CACxB,MAAM,EAAU,WAChB,OAGF,IAAM,EAAQ,EAAU,QAAQ,MAAM,GAAG,KAAK,GAAG,KAAK,CAEtD,EAAU,WAAa,EACvB,GAAI,CACF,IAAM,EAAM,MAAM,EAClB,GAAM,EAAI,MAAU,EAAI,KAAK,MAAQ,EAAI,KAAK,QAC5C,EAAU,KAAO,EAAI,KAAK,aAGjB,GAAK,MAAM,aAAe,KAAM,CACzC,GAAM,CAAE,UAAW,MAAM,EAAU,eAAe,CAClD,GAAI,IAAW,UAAW,CACxB,IAAM,EAAO,MAAM,EAAU,QAAQ,MAAM,GAAG,KAAK,GAAG,KAAK,CAEvD,EAAK,MACP,EAAK,KAAK,SACV,EAAK,KAAK,aAAe,IAEzB,EAAU,KAAO,EAA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,WAAW,kBAAkB,EAIjD,MAAa,SAAU,CAGrB,OAFA,MAAM,EAAU,UAAU,CAC1B,MAAM,EAAU,WAAW,UAAU,EAAU,KAAK,CAC7C,EAAU,MAAQ,KAG3B,WAAwC,CACtC,OAAO,EAAU,QAGnB,MAAa,QAAS,CACpB,MAAM,EAAU,SAAS,CAG3B,MAAa,SAAgB,CAC3B,WAGwB,CAExB,GAAI,CAAC,EAAU,QACb,MAAU,MAAM,yBAAyB,CAG3C,GAAI,CAEE,EAAU,aACZ,QAAQ,IACN,8DACD,CACD,MAAM,EAAU,YAId,EAAU,oBACZ,QAAQ,IACN,qEACD,CACD,MAAM,EAAU,mBAId,EAAU,cACZ,QAAQ,IACN,+DACD,CACD,MAAM,EAAU,aAGlB,IAAM,EAAY,MAAM,EACtB,EAAU,QACX,CAGD,GAAI,CAAC,EAAS,KAEZ,OADA,QAAQ,MAAM,6CAA6C,CACpD,KAIT,IAAM,EAAQ,EAAS,KAGvB,GAAI,GAAO,aAAe,IAExB,OADA,MAAM,KAAK,mBAAmB,CACvB,KAIT,GAAI,GAAO,aAAe,KAAM,CAC9B,GAAM,CAAE,UAAW,MAAM,EAAU,eAAe,CAElD,GADA,MAAM,EAAU,WAAW,iBAAiB,EAAO,CAC/C,IAAW,UAIb,OAHkB,MAAM,EACtB,EAAU,QACX,CAGH,GAAI,IAAW,SAEb,OADA,MAAM,EAAU,SAAS,CAClB,KAIX,OAAO,QACA,EAAO,CAEd,OADA,QAAQ,MAAM,qBAAsB,KAAK,UAAU,EAAM,CAAC,CACnD"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../src/utils.ts"],"sourcesContent":["import type { AppType } from '@/router';\nimport type { Treaty } from '@elysiajs/eden';\nimport { treaty } from '@elysiajs/eden';\n\ntype RefreshStatus = 'SUCCESS' | 'FAILED';\n\n// Trick to extract Treaty Client type\nclass _Client {\n public static client: Treaty.Create<AppType>;\n public getClient() {\n return null;\n }\n}\n\n// tsdown cannot serialize the Elysia type chain directly — it drops the AppType\n// import when inlining types.d.ts, leaving AppType = any. Having an unexported\n// runtime function forces rolldown-plugin-dts to process the return type eagerly\n// from source rather than from a lazy declaration reference.\nconst _createClient = () => _Client.client;\nexport type TClient = ReturnType<typeof _createClient>;\n\nexport type TUser = Treaty.Data<\n Awaited<ReturnType<TClient['admin']['v1']['auth']['me']['get']>>\n>['data'];\n\ntype Config = {\n baseURL: string;\n config?: Omit<Treaty.Config, 'onResponse'>;\n};\n\nexport class ClientApi {\n // Keep track of the ongoing \"me\" request to prevent multiple simultaneous calls\n private static _client: TClient | undefined;\n private static _getMeTask: Promise<unknown> | null = null;\n private static _refreshTokenTask: Promise<{ status: RefreshStatus }> | null =\n null;\n private static _logoutTask: Promise<unknown> | null = null;\n\n public static user: TUser = null;\n\n public static listeners: {\n onUserChange?: (user: TUser | null) => void | Promise<void>;\n onGetMe?: (user: TUser | null) => void | Promise<void>;\n onLogout?: () => void | Promise<void>;\n onUnauthorized?: () => void | Promise<void>;\n onRefreshToken?: (status: 'SUCCESS' | 'FAILED') => void | Promise<void>;\n } | null = null;\n\n private static async _getUser() {\n // If already logged in, no need to fetch again\n if (ClientApi.user) return;\n\n // Ensure client is initialized\n if (!ClientApi._client) return;\n\n // If there's an ongoing \"me\" request, await its completion\n if (ClientApi._getMeTask) {\n await ClientApi._getMeTask;\n return;\n }\n\n const getMe = ClientApi._client.admin.v1.auth.me.get();\n // Store the ongoing task, so other can know about it and await it if needed\n ClientApi._getMeTask = getMe;\n try {\n const res = await getMe;\n if (res.data && res.data.data && res.data.success) {\n ClientApi.user = res.data.data;\n\n // CASE: Token Expired\n } else if (res?.data?.statusCode === 4001) {\n const { status } = await ClientApi._refreshToken();\n if (status === 'SUCCESS') {\n const _res = await ClientApi._client.admin.v1.auth.me.get();\n if (_res.data && _res.data.success && _res.data.statusCode === 200) {\n ClientApi.user = _res.data.data;\n } else {\n ClientApi.user = null;\n }\n }\n if (status === 'FAILED') {\n ClientApi.user = null;\n }\n // CASE: Unauthorized\n } else {\n ClientApi.user = null;\n console.error('Failed to fetch user data:', JSON.stringify(res.data));\n }\n } catch (error) {\n console.error('Error fetching user data:', JSON.stringify(error));\n ClientApi.user = null;\n } finally {\n ClientApi._getMeTask = null;\n }\n }\n\n private static async _refreshToken() {\n // Ensure client is initialized\n if (!ClientApi._client) return { status: 'FAILED' as const };\n\n // If there's an ongoing \"refresh token\" request, await its completion\n if (ClientApi._refreshTokenTask) {\n const res = await ClientApi._refreshTokenTask;\n return res;\n }\n\n const handler = async (): Promise<{ status: RefreshStatus }> => {\n try {\n const res =\n await ClientApi._client?.admin.v1.auth['refresh-token'].get();\n if (res?.data && res.data.success && res.data.statusCode === 200) {\n return { status: 'SUCCESS' };\n }\n return { status: 'FAILED' };\n } catch (error) {\n console.error('Error refreshing token:', JSON.stringify(error));\n return { status: 'FAILED' };\n }\n };\n // Store the ongoing task, so other can know about it and await it if needed\n ClientApi._refreshTokenTask = handler();\n return ClientApi._refreshTokenTask.finally(() => {\n ClientApi._refreshTokenTask = null;\n });\n }\n\n private static async _logout() {\n // Ensure client is initialized\n if (!ClientApi._client) return;\n try {\n // If there's an ongoing \"logout\" request, await its completion\n if (ClientApi._logoutTask) {\n await ClientApi._logoutTask;\n return;\n }\n\n const logout = ClientApi._client.admin.v1.auth.logout.delete();\n // Store the ongoing task, so other can know about it and await it if needed\n ClientApi._logoutTask = logout;\n await logout;\n } catch (error) {\n console.error('Error during logout:', error);\n } finally {\n ClientApi.user = null;\n ClientApi._logoutTask = null;\n ClientApi.listeners?.onUserChange?.(null);\n ClientApi.listeners?.onLogout?.();\n }\n }\n\n constructor({ baseURL, config }: Config) {\n // Initialize Treaty Client\n if (!ClientApi._client) {\n ClientApi._client = treaty<Type.AppType>(baseURL, config);\n }\n\n this._onUnauthorized = async () => {\n ClientApi.user = null;\n await ClientApi.listeners?.onUserChange?.(null);\n await ClientApi.listeners?.onUnauthorized?.();\n };\n }\n\n public async getUser() {\n await ClientApi._getUser();\n await ClientApi.listeners?.onGetMe?.(ClientApi.user);\n return ClientApi.user ?? null;\n }\n\n public getClient(): TClient | undefined {\n return ClientApi._client;\n }\n\n public async logout() {\n await ClientApi._logout();\n }\n\n public async fetchApi<TData>({\n request,\n }: {\n request: (api: TClient) => Promise<TData>;\n }): Promise<TData | null> {\n // Ensure client is initialized\n if (!ClientApi._client) {\n throw new Error('Client not initialized');\n }\n\n try {\n // Await ongoing \"me\" request to ensure user state is up-to-date\n if (ClientApi._getMeTask) {\n console.log(\n 'Awaiting ongoing _getMeTask before proceeding with fetchApi'\n );\n await ClientApi._getMeTask;\n }\n\n // Await ongoing \"refresh token\" request to ensure token state is up-to-date\n if (ClientApi._refreshTokenTask) {\n console.log(\n 'Awaiting ongoing _refreshTokenTask before proceeding with fetchApi'\n );\n await ClientApi._refreshTokenTask;\n }\n\n // Await ongoing \"logout\" request to ensure user is logged out properly\n if (ClientApi._logoutTask) {\n console.log(\n 'Awaiting ongoing _logoutTask before proceeding with fetchApi'\n );\n await ClientApi._logoutTask;\n }\n\n const response = (await request(\n ClientApi._client\n )) as Treaty.TreatyResponse<Record<number, Type.TResponse<unknown>>>;\n\n // Check if response data exists\n if (!response.data) {\n console.error('No response data received from API request');\n return null;\n }\n\n // Check for status codes in the response data\n const _data = response.data;\n\n // CASE: User is Unauthorized\n if (_data?.statusCode === 401) {\n await this._onUnauthorized?.();\n return null;\n }\n\n // CASE: TOKEN EXPIRED - Re-fetch user data\n if (_data?.statusCode === 4001) {\n const { status } = await ClientApi._refreshToken();\n await ClientApi.listeners?.onRefreshToken?.(status);\n if (status === 'SUCCESS') {\n const response = (await request(\n ClientApi._client\n )) as Treaty.TreatyResponse<Record<number, Type.TResponse<unknown>>>;\n return response as TData;\n }\n if (status === 'FAILED') {\n await ClientApi._logout();\n return null;\n }\n }\n\n return response as TData;\n } catch (error) {\n console.error('Error in fetchApi:', JSON.stringify(error));\n return null;\n }\n }\n\n private _onUnauthorized?: () => void | Promise<void>;\n}\n"],"mappings":"gCA8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