wcz-test 6.5.2 → 6.5.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.
@@ -1,12 +1,13 @@
1
- export { P as Platform } from './utils-DLRiZ02r.js';
1
+ export { P as Platform } from './utils-ChipkRJ9.js';
2
2
  export { default as i18n, t } from 'i18next';
3
3
  export { initReactI18next, useTranslation } from 'react-i18next';
4
4
  export { default as LanguageDetector } from 'i18next-browser-languagedetector';
5
5
  import * as nanostores from 'nanostores';
6
- import * as node_modules_better_auth_dist_shared_better_auth_BNARIIb2 from 'node_modules/better-auth/dist/shared/better-auth.BNARIIb2';
7
- import * as node_modules_better_auth_dist_shared_better_auth_DNnBkMGu from 'node_modules/better-auth/dist/shared/better-auth.DNnBkMGu';
6
+ import * as better_auth from 'better-auth';
8
7
  import * as _better_fetch_fetch from '@better-fetch/fetch';
9
8
  import 'axios';
9
+ import 'uuidv7';
10
+ import '@t3-oss/env-core';
10
11
 
11
12
  declare const WISTRON_PRIMARY_COLOR = "#00506E";
12
13
  declare const WISTRON_SECONDARY_COLOR = "#64DC00";
@@ -82,7 +83,7 @@ declare const authClient: {
82
83
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
83
84
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
84
85
  disableValidation?: boolean | undefined;
85
- }>(data_0: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
86
+ }>(data_0: better_auth.Prettify<{
86
87
  provider: unknown;
87
88
  callbackURL?: string | undefined;
88
89
  newUserCallbackURL?: string | undefined;
@@ -175,7 +176,7 @@ declare const authClient: {
175
176
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
176
177
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
177
178
  disableValidation?: boolean | undefined;
178
- }>(data_0?: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
179
+ }>(data_0?: better_auth.Prettify<{
179
180
  query?: Record<string, any> | undefined;
180
181
  fetchOptions?: FetchOptions | undefined;
181
182
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -246,7 +247,7 @@ declare const authClient: {
246
247
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
247
248
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
248
249
  disableValidation?: boolean | undefined;
249
- }>(data_0: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
250
+ }>(data_0: better_auth.Prettify<{
250
251
  email: string;
251
252
  name: string;
252
253
  password: string;
@@ -340,7 +341,7 @@ declare const authClient: {
340
341
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
341
342
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
342
343
  disableValidation?: boolean | undefined;
343
- }>(data_0: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
344
+ }>(data_0: better_auth.Prettify<{
344
345
  email: string;
345
346
  password: string;
346
347
  callbackURL?: string | undefined;
@@ -422,7 +423,7 @@ declare const authClient: {
422
423
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
423
424
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
424
425
  disableValidation?: boolean | undefined;
425
- }>(data_0: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
426
+ }>(data_0: better_auth.Prettify<{
426
427
  email: string;
427
428
  redirectTo?: string | undefined;
428
429
  } & {
@@ -492,7 +493,7 @@ declare const authClient: {
492
493
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
493
494
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
494
495
  disableValidation?: boolean | undefined;
495
- }>(data_0: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
496
+ }>(data_0: better_auth.Prettify<{
496
497
  newPassword: string;
497
498
  token?: string | undefined;
498
499
  } & {
@@ -560,7 +561,7 @@ declare const authClient: {
560
561
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
561
562
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
562
563
  disableValidation?: boolean | undefined;
563
- }>(data_0: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
564
+ }>(data_0: better_auth.Prettify<{
564
565
  query: {
565
566
  token: string;
566
567
  callbackURL?: string | undefined;
@@ -641,7 +642,7 @@ declare const authClient: {
641
642
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
642
643
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
643
644
  disableValidation?: boolean | undefined;
644
- }>(data_0: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
645
+ }>(data_0: better_auth.Prettify<{
645
646
  email: string;
646
647
  callbackURL?: string | undefined;
647
648
  } & {
@@ -709,7 +710,7 @@ declare const authClient: {
709
710
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
710
711
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
711
712
  disableValidation?: boolean | undefined;
712
- }>(data_0: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
713
+ }>(data_0: better_auth.Prettify<{
713
714
  newEmail: string;
714
715
  callbackURL?: string | undefined;
715
716
  } & {
@@ -778,7 +779,7 @@ declare const authClient: {
778
779
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
779
780
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
780
781
  disableValidation?: boolean | undefined;
781
- }>(data_0: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
782
+ }>(data_0: better_auth.Prettify<{
782
783
  newPassword: string;
783
784
  currentPassword: string;
784
785
  revokeOtherSessions?: boolean | undefined;
@@ -856,7 +857,7 @@ declare const authClient: {
856
857
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
857
858
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
858
859
  disableValidation?: boolean | undefined;
859
- }>(data_0?: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
860
+ }>(data_0?: better_auth.Prettify<{
860
861
  image?: string | null;
861
862
  name?: string;
862
863
  fetchOptions?: FetchOptions | undefined;
@@ -924,7 +925,7 @@ declare const authClient: {
924
925
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
925
926
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
926
927
  disableValidation?: boolean | undefined;
927
- }>(data_0?: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
928
+ }>(data_0?: better_auth.Prettify<{
928
929
  callbackURL?: string | undefined;
929
930
  password?: string | undefined;
930
931
  token?: string | undefined;
@@ -996,7 +997,7 @@ declare const authClient: {
996
997
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
997
998
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
998
999
  disableValidation?: boolean | undefined;
999
- }>(data_0: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
1000
+ }>(data_0: better_auth.Prettify<{
1000
1001
  query: {
1001
1002
  callbackURL: string;
1002
1003
  };
@@ -1063,7 +1064,7 @@ declare const authClient: {
1063
1064
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1064
1065
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1065
1066
  disableValidation?: boolean | undefined;
1066
- }>(data_0: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
1067
+ }>(data_0: better_auth.Prettify<{
1067
1068
  email: string;
1068
1069
  redirectTo?: string | undefined;
1069
1070
  } & {
@@ -1134,7 +1135,7 @@ declare const authClient: {
1134
1135
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1135
1136
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1136
1137
  disableValidation?: boolean | undefined;
1137
- }>(data_0: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
1138
+ }>(data_0: better_auth.Prettify<{
1138
1139
  query: {
1139
1140
  callbackURL: string;
1140
1141
  };
@@ -1198,10 +1199,10 @@ declare const authClient: {
1198
1199
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1199
1200
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1200
1201
  disableValidation?: boolean | undefined;
1201
- }>(data_0?: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
1202
+ }>(data_0?: better_auth.Prettify<{
1202
1203
  query?: Record<string, any> | undefined;
1203
1204
  fetchOptions?: FetchOptions | undefined;
1204
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
1205
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<better_auth.Prettify<{
1205
1206
  id: string;
1206
1207
  createdAt: Date;
1207
1208
  updatedAt: Date;
@@ -1270,7 +1271,7 @@ declare const authClient: {
1270
1271
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1271
1272
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1272
1273
  disableValidation?: boolean | undefined;
1273
- }>(data_0: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
1274
+ }>(data_0: better_auth.Prettify<{
1274
1275
  token: string;
1275
1276
  } & {
1276
1277
  fetchOptions?: FetchOptions | undefined;
@@ -1334,7 +1335,7 @@ declare const authClient: {
1334
1335
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1335
1336
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1336
1337
  disableValidation?: boolean | undefined;
1337
- }>(data_0?: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
1338
+ }>(data_0?: better_auth.Prettify<{
1338
1339
  query?: Record<string, any> | undefined;
1339
1340
  fetchOptions?: FetchOptions | undefined;
1340
1341
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -1397,7 +1398,7 @@ declare const authClient: {
1397
1398
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1398
1399
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1399
1400
  disableValidation?: boolean | undefined;
1400
- }>(data_0?: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
1401
+ }>(data_0?: better_auth.Prettify<{
1401
1402
  query?: Record<string, any> | undefined;
1402
1403
  fetchOptions?: FetchOptions | undefined;
1403
1404
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -1474,7 +1475,7 @@ declare const authClient: {
1474
1475
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1475
1476
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1476
1477
  disableValidation?: boolean | undefined;
1477
- }>(data_0: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
1478
+ }>(data_0: better_auth.Prettify<{
1478
1479
  provider: unknown;
1479
1480
  callbackURL?: string | undefined;
1480
1481
  idToken?: {
@@ -1551,7 +1552,7 @@ declare const authClient: {
1551
1552
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1552
1553
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1553
1554
  disableValidation?: boolean | undefined;
1554
- }>(data_0?: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
1555
+ }>(data_0?: better_auth.Prettify<{
1555
1556
  query?: Record<string, any> | undefined;
1556
1557
  fetchOptions?: FetchOptions | undefined;
1557
1558
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -1623,7 +1624,7 @@ declare const authClient: {
1623
1624
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1624
1625
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1625
1626
  disableValidation?: boolean | undefined;
1626
- }>(data_0: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
1627
+ }>(data_0: better_auth.Prettify<{
1627
1628
  query: {
1628
1629
  token: string;
1629
1630
  callbackURL?: string | undefined;
@@ -1694,7 +1695,7 @@ declare const authClient: {
1694
1695
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1695
1696
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1696
1697
  disableValidation?: boolean | undefined;
1697
- }>(data_0: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
1698
+ }>(data_0: better_auth.Prettify<{
1698
1699
  providerId: string;
1699
1700
  accountId?: string | undefined;
1700
1701
  } & {
@@ -1763,7 +1764,7 @@ declare const authClient: {
1763
1764
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1764
1765
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1765
1766
  disableValidation?: boolean | undefined;
1766
- }>(data_0: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
1767
+ }>(data_0: better_auth.Prettify<{
1767
1768
  providerId: string;
1768
1769
  accountId?: string | undefined;
1769
1770
  userId?: string | undefined;
@@ -1831,7 +1832,7 @@ declare const authClient: {
1831
1832
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1832
1833
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1833
1834
  disableValidation?: boolean | undefined;
1834
- }>(data_0: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
1835
+ }>(data_0: better_auth.Prettify<{
1835
1836
  providerId: string;
1836
1837
  accountId?: string | undefined;
1837
1838
  userId?: string | undefined;
@@ -1902,7 +1903,7 @@ declare const authClient: {
1902
1903
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1903
1904
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1904
1905
  disableValidation?: boolean | undefined;
1905
- }>(data_0: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
1906
+ }>(data_0: better_auth.Prettify<{
1906
1907
  accountId: string;
1907
1908
  } & {
1908
1909
  fetchOptions?: FetchOptions | undefined;
@@ -1970,7 +1971,7 @@ declare const authClient: {
1970
1971
  output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1971
1972
  errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1972
1973
  disableValidation?: boolean | undefined;
1973
- }>(data_0?: node_modules_better_auth_dist_shared_better_auth_DNnBkMGu.a<{
1974
+ }>(data_0?: better_auth.Prettify<{
1974
1975
  query?: {
1975
1976
  disableCookieCache?: unknown;
1976
1977
  disableRefresh?: unknown;
@@ -2027,7 +2028,7 @@ declare const authClient: {
2027
2028
  isRefetching: boolean;
2028
2029
  error: _better_fetch_fetch.BetterFetchError | null;
2029
2030
  refetch: (queryParams?: {
2030
- query?: node_modules_better_auth_dist_shared_better_auth_BNARIIb2.i;
2031
+ query?: better_auth.SessionQueryParams;
2031
2032
  }) => void;
2032
2033
  };
2033
2034
  $Infer: {
@@ -2,11 +2,11 @@ import {
2
2
  WISTRON_PRIMARY_COLOR,
3
3
  WISTRON_SECONDARY_COLOR,
4
4
  authClient
5
- } from "./chunk-H35VQRS4.js";
5
+ } from "./chunk-CNDRHYQK.js";
6
6
  import {
7
7
  Platform
8
- } from "./chunk-T723TJ46.js";
9
- import "./chunk-MZYWQKGY.js";
8
+ } from "./chunk-6E3FH46P.js";
9
+ import "./chunk-DXXZZHAK.js";
10
10
  import "./chunk-5WRI5ZAA.js";
11
11
 
12
12
  // src/client-utils.ts
@@ -11,10 +11,10 @@ import {
11
11
  useGetFileMetas,
12
12
  useGetFileThumbnail,
13
13
  useOpenFile
14
- } from "./chunk-SIBFDHFS.js";
14
+ } from "./chunk-Y2SJVB7N.js";
15
15
  import "./chunk-TME53DAF.js";
16
- import "./chunk-T723TJ46.js";
17
- import "./chunk-MZYWQKGY.js";
16
+ import "./chunk-6E3FH46P.js";
17
+ import "./chunk-DXXZZHAK.js";
18
18
  import "./chunk-5WRI5ZAA.js";
19
19
 
20
20
  // src/components/core/TypographyWithIcon.tsx
package/dist/hooks.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ButtonProps, TextFieldProps, SliderProps, RadioGroupProps, SwitchProps, CheckboxProps, AutocompleteProps } from '@mui/material';
2
2
  import { DateTimePickerProps, DatePickerProps } from '@mui/x-date-pickers-pro';
3
- import { F as FormOmittedProps } from './utils-DLRiZ02r.js';
3
+ import { F as FormOmittedProps } from './utils-ChipkRJ9.js';
4
4
  import { NumericFormatProps, InputAttributes } from 'react-number-format/types/types';
5
5
  import * as _tanstack_react_form from '@tanstack/react-form';
6
6
  import * as react from 'react';
@@ -8,6 +8,8 @@ import { ReactNode } from 'react';
8
8
  import * as _tanstack_form_core from '@tanstack/form-core';
9
9
  export { useInView } from 'react-intersection-observer';
10
10
  import 'axios';
11
+ import 'uuidv7';
12
+ import '@t3-oss/env-core';
11
13
 
12
14
  type FormSubmitButtonProps = Omit<ButtonProps, "loading" | "disabled" | "onClick" | "type">;
13
15
 
package/dist/hooks.js CHANGED
@@ -3,8 +3,8 @@ import {
3
3
  } from "./chunk-4UULRYGW.js";
4
4
  import {
5
5
  getFieldStatus
6
- } from "./chunk-T723TJ46.js";
7
- import "./chunk-MZYWQKGY.js";
6
+ } from "./chunk-6E3FH46P.js";
7
+ import "./chunk-DXXZZHAK.js";
8
8
  import "./chunk-5WRI5ZAA.js";
9
9
 
10
10
  // src/hooks/FormHooks.ts
package/dist/index.d.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  import { LinkOptions } from '@tanstack/react-router';
2
2
  import { FC, ReactNode } from 'react';
3
3
  import { CssVarsThemeOptions } from '@mui/material';
4
- export { r as rootRouteHead } from './utils-DLRiZ02r.js';
4
+ export { r as rootRouteHead } from './utils-ChipkRJ9.js';
5
5
  import 'axios';
6
+ import 'uuidv7';
7
+ import '@t3-oss/env-core';
6
8
 
7
9
  interface NavigationPageItem extends Partial<Pick<LinkOptions, "to" | "href" | "params" | "search">> {
8
10
  title: string;
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  _extends,
3
3
  authClient,
4
4
  useGetTheme
5
- } from "./chunk-H35VQRS4.js";
5
+ } from "./chunk-CNDRHYQK.js";
6
6
  import {
7
7
  RouterListItemButton
8
8
  } from "./chunk-ZMWQQXZT.js";
@@ -12,10 +12,10 @@ import {
12
12
  } from "./chunk-4UULRYGW.js";
13
13
  import {
14
14
  rootRouteHead
15
- } from "./chunk-T723TJ46.js";
15
+ } from "./chunk-6E3FH46P.js";
16
16
  import {
17
17
  clientEnv
18
- } from "./chunk-MZYWQKGY.js";
18
+ } from "./chunk-DXXZZHAK.js";
19
19
  import {
20
20
  __commonJS,
21
21
  __toESM
package/dist/queries.d.ts CHANGED
@@ -1582,4 +1582,4 @@ declare const useCancelApproval: (options?: UseCancelApprovalOptions) => _tansta
1582
1582
  emailBody: string;
1583
1583
  }, unknown>;
1584
1584
 
1585
- export { type GetFileMetasParams, GetFileMetasParamsSchema, type GetFileParams, GetFileParamsSchema, type GetFileThumbnailParams, GetFileThumbnailParamsSchema, approveApproval, cancelApproval, createApproval, getApproval, getApprovals, resubmitApproval, useApproveApproval, useCancelApproval, useCreateApproval, useDeleteFile, useDeleteFiles, useDownloadFile, useGetApproval, useGetApprovals, useGetFile, useGetFileMetas, useGetFileThumbnail, useGetPeopleSoftActiveEmployees, useGetPeopleSoftCompanyGeneralManager, useGetPeopleSoftDepartmentById, useGetPeopleSoftDepartmentEmployees, useGetPeopleSoftDepartmentManager, useGetPeopleSoftDepartments, useGetPeopleSoftEmployeeById, useGetPeopleSoftEmployeeGeneralManager, useGetPeopleSoftEmployeeManager, useGetPeopleSoftEmployeeSubordinates, useGetPeopleSoftEmployeeSupervisor, useGetPeopleSoftEmployees, useGetPeopleSoftEmployeesSearch, useGetPeopleSoftPreviousEmployeeIds, useOpenFile, useResubmitApproval, useUpdateFileMeta, useUploadFile, useWithdrawApproval, withdrawApproval };
1585
+ export { approveApproval, cancelApproval, createApproval, getApproval, getApprovals, resubmitApproval, useApproveApproval, useCancelApproval, useCreateApproval, useDeleteFile, useDeleteFiles, useDownloadFile, useGetApproval, useGetApprovals, useGetFile, useGetFileMetas, useGetFileThumbnail, useGetPeopleSoftActiveEmployees, useGetPeopleSoftCompanyGeneralManager, useGetPeopleSoftDepartmentById, useGetPeopleSoftDepartmentEmployees, useGetPeopleSoftDepartmentManager, useGetPeopleSoftDepartments, useGetPeopleSoftEmployeeById, useGetPeopleSoftEmployeeGeneralManager, useGetPeopleSoftEmployeeManager, useGetPeopleSoftEmployeeSubordinates, useGetPeopleSoftEmployeeSupervisor, useGetPeopleSoftEmployees, useGetPeopleSoftEmployeesSearch, useGetPeopleSoftPreviousEmployeeIds, useOpenFile, useResubmitApproval, useUpdateFileMeta, useUploadFile, useWithdrawApproval, withdrawApproval };
package/dist/queries.js CHANGED
@@ -1,7 +1,4 @@
1
1
  import {
2
- GetFileMetasParamsSchema,
3
- GetFileParamsSchema,
4
- GetFileThumbnailParamsSchema,
5
2
  useDeleteFile,
6
3
  useDeleteFiles,
7
4
  useDownloadFile,
@@ -11,7 +8,7 @@ import {
11
8
  useOpenFile,
12
9
  useUpdateFileMeta,
13
10
  useUploadFile
14
- } from "./chunk-SIBFDHFS.js";
11
+ } from "./chunk-Y2SJVB7N.js";
15
12
  import {
16
13
  ApprovalStatus,
17
14
  ApprovalStepResult
@@ -20,10 +17,10 @@ import "./chunk-TME53DAF.js";
20
17
  import {
21
18
  httpClient,
22
19
  toKebabCase
23
- } from "./chunk-T723TJ46.js";
20
+ } from "./chunk-6E3FH46P.js";
24
21
  import {
25
22
  clientEnv
26
- } from "./chunk-MZYWQKGY.js";
23
+ } from "./chunk-DXXZZHAK.js";
27
24
  import "./chunk-5WRI5ZAA.js";
28
25
 
29
26
  // src/queries/PeopleSoftHooks.ts
@@ -227,9 +224,6 @@ var useGetPeopleSoftCompanyGeneralManager = (companyCode, options) => {
227
224
  });
228
225
  };
229
226
 
230
- // src/queries/ApprovalHooks.ts
231
- import { useMutation, useQuery as useQuery2, useQueryClient } from "@tanstack/react-query";
232
-
233
227
  // src/queries/Approval.ts
234
228
  import { createIsomorphicFn } from "@tanstack/react-start";
235
229
  import z from "zod";
@@ -309,6 +303,7 @@ var withdrawApproval = createIsomorphicFn().server(withdrawApprovalBase).client(
309
303
  var cancelApproval = createIsomorphicFn().server(cancelApprovalBase).client(cancelApprovalBase);
310
304
 
311
305
  // src/queries/ApprovalHooks.ts
306
+ import { useMutation, useQuery as useQuery2, useQueryClient } from "@tanstack/react-query";
312
307
  var useGetApprovals = (params, options) => useQuery2({
313
308
  ...options,
314
309
  queryKey: [ROUTE, params],
@@ -360,9 +355,6 @@ var useCancelApproval = (options) => {
360
355
  });
361
356
  };
362
357
  export {
363
- GetFileMetasParamsSchema,
364
- GetFileParamsSchema,
365
- GetFileThumbnailParamsSchema,
366
358
  approveApproval,
367
359
  cancelApproval,
368
360
  createApproval,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/queries/PeopleSoftHooks.ts","../src/queries/ApprovalHooks.ts","../src/queries/Approval.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\r\nimport type { DefinedInitialDataOptions } from \"@tanstack/react-query\";\r\nimport type { Department } from \"~/models/peoplesoft/Department\";\r\nimport type { Employee } from \"~/models/peoplesoft/Employee\";\r\nimport { httpClient } from \"~/lib/utils\";\r\n\r\nconst QUERY_KEY = \"ps\";\r\nconst DAY = 1000 * 60 * 60 * 24;\r\n\r\ntype OptionalId = string | undefined | null;\r\n\r\ntype BaseEmployeeArrayQueryOptions = Omit<DefinedInitialDataOptions<Array<Employee>>, \"queryKey\" | \"queryFn\" | \"staleTime\" | \"gcTime\" | \"refetchOnWindowFocus\" | \"initialData\">;\r\ntype BaseEmployeeQueryOptions = Omit<DefinedInitialDataOptions<Employee>, \"queryKey\" | \"queryFn\" | \"staleTime\" | \"gcTime\" | \"refetchOnWindowFocus\" | \"initialData\">;\r\ntype BaseDepartmentArrayQueryOptions = Omit<DefinedInitialDataOptions<Array<Department>>, \"queryKey\" | \"queryFn\" | \"staleTime\" | \"gcTime\" | \"refetchOnWindowFocus\" | \"initialData\">;\r\ntype BaseDepartmentQueryOptions = Omit<DefinedInitialDataOptions<Department>, \"queryKey\" | \"queryFn\" | \"staleTime\" | \"gcTime\" | \"refetchOnWindowFocus\" | \"initialData\">;\r\n\r\nexport const useGetPeopleSoftEmployeesSearch = (searchTerm: string, options?: BaseEmployeeArrayQueryOptions) => {\r\n return useQuery<Array<Employee>>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"employee\", \"search\", searchTerm],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/employee?search=${searchTerm}`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftEmployees = (options?: BaseEmployeeArrayQueryOptions) => {\r\n return useQuery<Array<Employee>>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"employee\"],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/employee/all`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftActiveEmployees = (options?: BaseEmployeeArrayQueryOptions) => {\r\n return useQuery<Array<Employee>>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"employee\", \"active\"],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/employee/active`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftEmployeeById = (employeeId: OptionalId, options?: BaseEmployeeQueryOptions) => {\r\n return useQuery<Employee>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"employee\", employeeId],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/employee/${employeeId}`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftPreviousEmployeeIds = (options?: BaseEmployeeArrayQueryOptions) => {\r\n return useQuery<Array<Employee>>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"employee\", \"previousIds\"],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/employee/previousIds`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftEmployeeSupervisor = (employeeId: OptionalId, options?: BaseEmployeeQueryOptions) => {\r\n return useQuery<Employee>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"employee\", employeeId, \"supervisor\"],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/employee/${employeeId}/supervisor`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftEmployeeSubordinates = (employeeId: OptionalId, options?: BaseEmployeeArrayQueryOptions) => {\r\n return useQuery<Array<Employee>>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"employee\", employeeId, \"subordinates\"],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/employee/${employeeId}/subordinates`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftEmployeeManager = (employeeId: OptionalId, options?: BaseEmployeeQueryOptions) => {\r\n return useQuery<Employee>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"employee\", employeeId, \"manager\"],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/employee/${employeeId}/manager`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftEmployeeGeneralManager = (employeeId: OptionalId, options?: BaseEmployeeQueryOptions) => {\r\n return useQuery<Employee>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"employee\", employeeId, \"generalManager\"],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/employee/${employeeId}/generalManager`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftDepartments = (options?: BaseDepartmentArrayQueryOptions) => {\r\n return useQuery<Array<Department>>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"department\"],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/department/all`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftDepartmentById = (departmentId: OptionalId, options?: BaseDepartmentQueryOptions) => {\r\n return useQuery<Department>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"department\", departmentId],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/department/${departmentId}`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftDepartmentManager = (departmentId: OptionalId, options?: BaseEmployeeQueryOptions) => {\r\n return useQuery<Employee>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"department\", departmentId, \"manager\"],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/department/${departmentId}/manager`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftDepartmentEmployees = (departmentId: OptionalId, options?: BaseEmployeeArrayQueryOptions) => {\r\n return useQuery<Array<Employee>>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"department\", departmentId, \"employees\"],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/department/${departmentId}/employees`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftCompanyGeneralManager = (companyCode: OptionalId, options?: BaseEmployeeQueryOptions) => {\r\n return useQuery<Employee>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"company\", companyCode, \"generalManager\"],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/company/${companyCode}/generalManager`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};","import { useMutation, useQuery, useQueryClient } from \"@tanstack/react-query\";\r\nimport { ROUTE, approveApproval, cancelApproval, createApproval, getApproval, getApprovals, resubmitApproval, withdrawApproval } from \"./Approval\";\r\nimport type { GetApprovalsParams } from \"./Approval\";\r\nimport type { DefinedInitialDataOptions, UseMutationOptions } from \"@tanstack/react-query\";\r\nimport type { Approval, ApproveApproval, CancelApproval, CreateApproval, ResubmitApproval, WithdrawApproval } from \"~/models/approval/Approval\";\r\n\r\ntype UseGetApprovalsOptions = Omit<DefinedInitialDataOptions<Array<Approval>>, \"queryKey\" | \"queryFn\" | \"initialData\">;\r\ntype UseGetApprovalOptions = Omit<DefinedInitialDataOptions<Approval>, \"queryKey\" | \"queryFn\" | \"initialData\">;\r\ntype UseCreateApprovalOptions = Omit<UseMutationOptions<Approval, Error, CreateApproval>, \"mutationFn\" | \"onSettled\">;\r\ntype UseApproveApprovalOptions = Omit<UseMutationOptions<Approval, Error, ApproveApproval>, \"mutationFn\" | \"onSettled\">;\r\ntype UseResubmitApprovalOptions = Omit<UseMutationOptions<Approval, Error, ResubmitApproval>, \"mutationFn\" | \"onSettled\">;\r\ntype UseWithdrawApprovalOptions = Omit<UseMutationOptions<void, Error, WithdrawApproval>, \"mutationFn\" | \"onSettled\">;\r\ntype UseCancelApprovalOptions = Omit<UseMutationOptions<void, Error, CancelApproval>, \"mutationFn\" | \"onSettled\">;\r\n\r\nexport const useGetApprovals = (params?: GetApprovalsParams, options?: UseGetApprovalsOptions) =>\r\n useQuery<Array<Approval>>({\r\n ...options,\r\n queryKey: [ROUTE, params],\r\n queryFn: ({ signal }) => getApprovals(params, signal),\r\n });\r\n\r\nexport const useGetApproval = (id: string, options?: UseGetApprovalOptions) => useQuery<Approval>({\r\n ...options,\r\n queryKey: [ROUTE, id],\r\n queryFn: ({ signal }) => getApproval(id, signal),\r\n});\r\n\r\nexport const useCreateApproval = (options?: UseCreateApprovalOptions) => {\r\n const queryClient = useQueryClient();\r\n\r\n return useMutation<Approval, Error, CreateApproval>({\r\n ...options,\r\n mutationFn: data => createApproval(data),\r\n onSettled: () => queryClient.invalidateQueries({ queryKey: [ROUTE], exact: false })\r\n });\r\n};\r\n\r\nexport const useApproveApproval = (options?: UseApproveApprovalOptions) => {\r\n const queryClient = useQueryClient();\r\n\r\n return useMutation<Approval, Error, ApproveApproval>({\r\n ...options,\r\n mutationFn: data => approveApproval(data),\r\n onSettled: () => queryClient.invalidateQueries({ queryKey: [ROUTE], exact: false })\r\n });\r\n};\r\n\r\nexport const useResubmitApproval = (options?: UseResubmitApprovalOptions) => {\r\n const queryClient = useQueryClient();\r\n\r\n return useMutation<Approval, Error, ResubmitApproval>({\r\n ...options,\r\n mutationFn: data => resubmitApproval(data),\r\n onSettled: () => queryClient.invalidateQueries({ queryKey: [ROUTE], exact: false })\r\n });\r\n};\r\n\r\nexport const useWithdrawApproval = (options?: UseWithdrawApprovalOptions) => {\r\n const queryClient = useQueryClient();\r\n\r\n return useMutation<void, Error, WithdrawApproval>({\r\n ...options,\r\n mutationFn: data => withdrawApproval(data),\r\n onSettled: () => queryClient.invalidateQueries({ queryKey: [ROUTE], exact: false })\r\n });\r\n};\r\n\r\nexport const useCancelApproval = (options?: UseCancelApprovalOptions) => {\r\n const queryClient = useQueryClient();\r\n\r\n return useMutation<void, Error, CancelApproval>({\r\n ...options,\r\n mutationFn: data => cancelApproval(data),\r\n onSettled: () => queryClient.invalidateQueries({ queryKey: [ROUTE], exact: false })\r\n });\r\n};\r\n","import { createIsomorphicFn } from \"@tanstack/react-start\";\r\nimport z from \"zod\";\r\nimport type { Approval, ApproveApproval, CancelApproval, CreateApproval, ResubmitApproval, WithdrawApproval } from \"~/models/approval/Approval\";\r\nimport { clientEnv } from \"~/env\";\r\nimport { httpClient, toKebabCase } from \"~/lib/utils\";\r\nimport { ApprovalStatus } from \"~/models/approval/ApprovalStatus\";\r\nimport { ApprovalStepResult } from \"~/models/approval/ApprovalStepResult\";\r\n\r\nexport const ROUTE = \"approval\";\r\nconst APP_NAME = toKebabCase(clientEnv.VITE_APP_TITLE);\r\n\r\nconst GetApprovalsParamsSchema = z.object({\r\n appName: z.string().min(1).max(255).default(APP_NAME).optional(),\r\n status: ApprovalStatus.optional(),\r\n approverEmployeeId: z.string().min(1).max(20).optional(),\r\n stepResult: ApprovalStepResult.optional()\r\n});\r\n\r\nexport type GetApprovalsParams = z.infer<typeof GetApprovalsParamsSchema>;\r\n\r\nconst getApprovalsBase = async (params?: GetApprovalsParams, signal?: AbortSignal) => {\r\n const queryParams = new URLSearchParams();\r\n\r\n queryParams.append(\"applicationName\", params?.appName ?? APP_NAME);\r\n if (params?.status) queryParams.append(\"status\", params.status.toString());\r\n if (params?.approverEmployeeId) queryParams.append(\"approverEmployeeId\", params.approverEmployeeId);\r\n if (params?.stepResult) queryParams.append(\"stepResult\", params.stepResult.toString());\r\n\r\n const request = await httpClient.request<Array<Approval>>({\r\n url: `/${ROUTE}/Requests/Requests?${queryParams.toString()}`,\r\n method: \"GET\",\r\n signal,\r\n });\r\n\r\n return request.data;\r\n};\r\n\r\nconst getApprovalBase = async (id: string, signal?: AbortSignal) => {\r\n const request = await httpClient.request<Approval>({\r\n url: `/${ROUTE}/Requests/${id}`,\r\n method: \"GET\",\r\n signal,\r\n });\r\n\r\n return request.data;\r\n};\r\n\r\nconst createApprovalBase = async (data: CreateApproval) => {\r\n const request = await httpClient.request<Approval>({\r\n url: `/${ROUTE}/Requests`,\r\n method: \"POST\",\r\n data\r\n });\r\n\r\n return request.data;\r\n};\r\n\r\nconst approveApprovalBase = async (data: ApproveApproval) => {\r\n const request = await httpClient.request<Approval>({\r\n url: `/${ROUTE}/Requests/${data.id}/single-approval`,\r\n method: \"POST\",\r\n data\r\n });\r\n\r\n return request.data;\r\n};\r\n\r\nconst resubmitApprovalBase = async (data: ResubmitApproval) => {\r\n const request = await httpClient.request<Approval>({\r\n url: `/${ROUTE}/Requests/${data.id}/resubmit`,\r\n method: \"POST\",\r\n data\r\n });\r\n\r\n return request.data;\r\n};\r\n\r\nconst withdrawApprovalBase = async (data: WithdrawApproval) => {\r\n await httpClient.request<void>({\r\n url: `/${ROUTE}/Requests/${data.id}/withdraw`,\r\n method: \"POST\",\r\n data\r\n });\r\n};\r\n\r\nconst cancelApprovalBase = async (data: CancelApproval) => {\r\n await httpClient.request<void>({\r\n url: `/${ROUTE}/Requests/${data.id}/cancel`,\r\n method: \"POST\",\r\n data\r\n });\r\n};\r\n\r\nexport const getApprovals = createIsomorphicFn().server(getApprovalsBase).client(getApprovalsBase);\r\nexport const getApproval = createIsomorphicFn().server(getApprovalBase).client(getApprovalBase);\r\nexport const createApproval = createIsomorphicFn().server(createApprovalBase).client(createApprovalBase);\r\nexport const approveApproval = createIsomorphicFn().server(approveApprovalBase).client(approveApprovalBase);\r\nexport const resubmitApproval = createIsomorphicFn().server(resubmitApprovalBase).client(resubmitApprovalBase);\r\nexport const withdrawApproval = createIsomorphicFn().server(withdrawApprovalBase).client(withdrawApprovalBase);\r\nexport const cancelApproval = createIsomorphicFn().server(cancelApprovalBase).client(cancelApprovalBase);\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,gBAAgB;AAMzB,IAAM,YAAY;AAClB,IAAM,MAAM,MAAO,KAAK,KAAK;AAStB,IAAM,kCAAkC,CAAC,YAAoB,YAA4C;AAC5G,SAAO,SAA0B;AAAA,IAC7B,GAAG;AAAA,IACH,UAAU,CAAC,WAAW,YAAY,UAAU,UAAU;AAAA,IACtD,SAAS,CAAC,EAAE,OAAO,MAAM,WAAW,QAAQ;AAAA,MACxC,KAAK,IAAI,SAAS,uBAAuB,UAAU;AAAA,MACnD,QAAQ;AAAA,MACR;AAAA,IACJ,CAAC;AAAA,IACD,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,sBAAsB;AAAA,EAC1B,CAAC;AACL;AAEO,IAAM,4BAA4B,CAAC,YAA4C;AAClF,SAAO,SAA0B;AAAA,IAC7B,GAAG;AAAA,IACH,UAAU,CAAC,WAAW,U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O,MAAM,CAAC;AAAA,EACtF,CAAC;AACL;AAEO,IAAM,qBAAqB,CAAC,YAAwC;AACvE,QAAM,cAAc,eAAe;AAEnC,SAAO,YAA8C;AAAA,IACjD,GAAG;AAAA,IACH,YAAY,UAAQ,gBAAgB,IAAI;AAAA,IACxC,WAAW,MAAM,YAAY,kBAAkB,EAAE,UAAU,CAAC,KAAK,GAAG,OAAO,MAAM,CAAC;AAAA,EACtF,CAAC;AACL;AAEO,IAAM,sBAAsB,CAAC,YAAyC;AACzE,QAAM,cAAc,eAAe;AAEnC,SAAO,YAA+C;AAAA,IAClD,GAAG;AAAA,IACH,YAAY,UAAQ,iBAAiB,IAAI;AAAA,IACzC,WAAW,MAAM,YAAY,kBAAkB,EAAE,UAAU,CAAC,KAAK,GAAG,OAAO,MAAM,CAAC;AAAA,EACtF,CAAC;AACL;AAEO,IAAM,sBAAsB,CAAC,YAAyC;AACzE,QAAM,cAAc,eAAe;AAEnC,SAAO,YAA2C;AAAA,IAC9C,GAAG;AAAA,IACH,YAAY,UAAQ,iBAAiB,IAAI;AAAA,IACzC,WAAW,MAAM,YAAY,kBAAkB,EAAE,UAAU,CAAC,KAAK,GAAG,OAAO,MAAM,CAAC;AAAA,EACtF,CAAC;AACL;AAEO,IAAM,oBAAoB,CAAC,YAAuC;AACrE,QAAM,cAAc,eAAe;AAEnC,SAAO,YAAyC;AAAA,IAC5C,GAAG;AAAA,IACH,YAAY,UAAQ,eAAe,IAAI;AAAA,IACvC,WAAW,MAAM,YAAY,kBAAkB,EAAE,UAAU,CAAC,KAAK,GAAG,OAAO,MAAM,CAAC;AAAA,EACtF,CAAC;AACL;","names":["useQuery","useQuery"]}
1
+ {"version":3,"sources":["../src/queries/PeopleSoftHooks.ts","../src/queries/Approval.ts","../src/queries/ApprovalHooks.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\r\nimport type { DefinedInitialDataOptions } from \"@tanstack/react-query\";\r\nimport type { Department } from \"~/models/peoplesoft/Department\";\r\nimport type { Employee } from \"~/models/peoplesoft/Employee\";\r\nimport { httpClient } from \"~/lib/utils\";\r\n\r\nconst QUERY_KEY = \"ps\";\r\nconst DAY = 1000 * 60 * 60 * 24;\r\n\r\ntype OptionalId = string | undefined | null;\r\n\r\ntype BaseEmployeeArrayQueryOptions = Omit<DefinedInitialDataOptions<Array<Employee>>, \"queryKey\" | \"queryFn\" | \"staleTime\" | \"gcTime\" | \"refetchOnWindowFocus\" | \"initialData\">;\r\ntype BaseEmployeeQueryOptions = Omit<DefinedInitialDataOptions<Employee>, \"queryKey\" | \"queryFn\" | \"staleTime\" | \"gcTime\" | \"refetchOnWindowFocus\" | \"initialData\">;\r\ntype BaseDepartmentArrayQueryOptions = Omit<DefinedInitialDataOptions<Array<Department>>, \"queryKey\" | \"queryFn\" | \"staleTime\" | \"gcTime\" | \"refetchOnWindowFocus\" | \"initialData\">;\r\ntype BaseDepartmentQueryOptions = Omit<DefinedInitialDataOptions<Department>, \"queryKey\" | \"queryFn\" | \"staleTime\" | \"gcTime\" | \"refetchOnWindowFocus\" | \"initialData\">;\r\n\r\nexport const useGetPeopleSoftEmployeesSearch = (searchTerm: string, options?: BaseEmployeeArrayQueryOptions) => {\r\n return useQuery<Array<Employee>>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"employee\", \"search\", searchTerm],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/employee?search=${searchTerm}`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftEmployees = (options?: BaseEmployeeArrayQueryOptions) => {\r\n return useQuery<Array<Employee>>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"employee\"],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/employee/all`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftActiveEmployees = (options?: BaseEmployeeArrayQueryOptions) => {\r\n return useQuery<Array<Employee>>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"employee\", \"active\"],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/employee/active`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftEmployeeById = (employeeId: OptionalId, options?: BaseEmployeeQueryOptions) => {\r\n return useQuery<Employee>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"employee\", employeeId],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/employee/${employeeId}`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftPreviousEmployeeIds = (options?: BaseEmployeeArrayQueryOptions) => {\r\n return useQuery<Array<Employee>>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"employee\", \"previousIds\"],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/employee/previousIds`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftEmployeeSupervisor = (employeeId: OptionalId, options?: BaseEmployeeQueryOptions) => {\r\n return useQuery<Employee>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"employee\", employeeId, \"supervisor\"],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/employee/${employeeId}/supervisor`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftEmployeeSubordinates = (employeeId: OptionalId, options?: BaseEmployeeArrayQueryOptions) => {\r\n return useQuery<Array<Employee>>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"employee\", employeeId, \"subordinates\"],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/employee/${employeeId}/subordinates`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftEmployeeManager = (employeeId: OptionalId, options?: BaseEmployeeQueryOptions) => {\r\n return useQuery<Employee>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"employee\", employeeId, \"manager\"],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/employee/${employeeId}/manager`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftEmployeeGeneralManager = (employeeId: OptionalId, options?: BaseEmployeeQueryOptions) => {\r\n return useQuery<Employee>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"employee\", employeeId, \"generalManager\"],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/employee/${employeeId}/generalManager`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftDepartments = (options?: BaseDepartmentArrayQueryOptions) => {\r\n return useQuery<Array<Department>>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"department\"],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/department/all`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftDepartmentById = (departmentId: OptionalId, options?: BaseDepartmentQueryOptions) => {\r\n return useQuery<Department>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"department\", departmentId],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/department/${departmentId}`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftDepartmentManager = (departmentId: OptionalId, options?: BaseEmployeeQueryOptions) => {\r\n return useQuery<Employee>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"department\", departmentId, \"manager\"],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/department/${departmentId}/manager`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftDepartmentEmployees = (departmentId: OptionalId, options?: BaseEmployeeArrayQueryOptions) => {\r\n return useQuery<Array<Employee>>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"department\", departmentId, \"employees\"],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/department/${departmentId}/employees`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const useGetPeopleSoftCompanyGeneralManager = (companyCode: OptionalId, options?: BaseEmployeeQueryOptions) => {\r\n return useQuery<Employee>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"company\", companyCode, \"generalManager\"],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/company/${companyCode}/generalManager`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: DAY,\r\n gcTime: DAY,\r\n refetchOnWindowFocus: false,\r\n });\r\n};","import { createIsomorphicFn } from \"@tanstack/react-start\";\r\nimport z from \"zod\";\r\nimport type { Approval, ApproveApproval, CancelApproval, CreateApproval, ResubmitApproval, WithdrawApproval } from \"~/models/approval/Approval\";\r\nimport { clientEnv } from \"~/env\";\r\nimport { httpClient, toKebabCase } from \"~/lib/utils\";\r\nimport { ApprovalStatus } from \"~/models/approval/ApprovalStatus\";\r\nimport { ApprovalStepResult } from \"~/models/approval/ApprovalStepResult\";\r\n\r\nexport const ROUTE = \"approval\";\r\nconst APP_NAME = toKebabCase(clientEnv.VITE_APP_TITLE);\r\n\r\nconst GetApprovalsParamsSchema = z.object({\r\n appName: z.string().min(1).max(255).default(APP_NAME).optional(),\r\n status: ApprovalStatus.optional(),\r\n approverEmployeeId: z.string().min(1).max(20).optional(),\r\n stepResult: ApprovalStepResult.optional()\r\n});\r\n\r\nexport type GetApprovalsParams = z.infer<typeof GetApprovalsParamsSchema>;\r\n\r\nconst getApprovalsBase = async (params?: GetApprovalsParams, signal?: AbortSignal) => {\r\n const queryParams = new URLSearchParams();\r\n\r\n queryParams.append(\"applicationName\", params?.appName ?? APP_NAME);\r\n if (params?.status) queryParams.append(\"status\", params.status.toString());\r\n if (params?.approverEmployeeId) queryParams.append(\"approverEmployeeId\", params.approverEmployeeId);\r\n if (params?.stepResult) queryParams.append(\"stepResult\", params.stepResult.toString());\r\n\r\n const request = await httpClient.request<Array<Approval>>({\r\n url: `/${ROUTE}/Requests/Requests?${queryParams.toString()}`,\r\n method: \"GET\",\r\n signal,\r\n });\r\n\r\n return request.data;\r\n};\r\n\r\nconst getApprovalBase = async (id: string, signal?: AbortSignal) => {\r\n const request = await httpClient.request<Approval>({\r\n url: `/${ROUTE}/Requests/${id}`,\r\n method: \"GET\",\r\n signal,\r\n });\r\n\r\n return request.data;\r\n};\r\n\r\nconst createApprovalBase = async (data: CreateApproval) => {\r\n const request = await httpClient.request<Approval>({\r\n url: `/${ROUTE}/Requests`,\r\n method: \"POST\",\r\n data\r\n });\r\n\r\n return request.data;\r\n};\r\n\r\nconst approveApprovalBase = async (data: ApproveApproval) => {\r\n const request = await httpClient.request<Approval>({\r\n url: `/${ROUTE}/Requests/${data.id}/single-approval`,\r\n method: \"POST\",\r\n data\r\n });\r\n\r\n return request.data;\r\n};\r\n\r\nconst resubmitApprovalBase = async (data: ResubmitApproval) => {\r\n const request = await httpClient.request<Approval>({\r\n url: `/${ROUTE}/Requests/${data.id}/resubmit`,\r\n method: \"POST\",\r\n data\r\n });\r\n\r\n return request.data;\r\n};\r\n\r\nconst withdrawApprovalBase = async (data: WithdrawApproval) => {\r\n await httpClient.request<void>({\r\n url: `/${ROUTE}/Requests/${data.id}/withdraw`,\r\n method: \"POST\",\r\n data\r\n });\r\n};\r\n\r\nconst cancelApprovalBase = async (data: CancelApproval) => {\r\n await httpClient.request<void>({\r\n url: `/${ROUTE}/Requests/${data.id}/cancel`,\r\n method: \"POST\",\r\n data\r\n });\r\n};\r\n\r\nexport const getApprovals = createIsomorphicFn().server(getApprovalsBase).client(getApprovalsBase);\r\nexport const getApproval = createIsomorphicFn().server(getApprovalBase).client(getApprovalBase);\r\nexport const createApproval = createIsomorphicFn().server(createApprovalBase).client(createApprovalBase);\r\nexport const approveApproval = createIsomorphicFn().server(approveApprovalBase).client(approveApprovalBase);\r\nexport const resubmitApproval = createIsomorphicFn().server(resubmitApprovalBase).client(resubmitApprovalBase);\r\nexport const withdrawApproval = createIsomorphicFn().server(withdrawApprovalBase).client(withdrawApprovalBase);\r\nexport const cancelApproval = createIsomorphicFn().server(cancelApprovalBase).client(cancelApprovalBase);\r\n","import { useMutation, useQuery, useQueryClient } from \"@tanstack/react-query\";\r\nimport { ROUTE, approveApproval, cancelApproval, createApproval, getApproval, getApprovals, resubmitApproval, withdrawApproval } from \"./Approval\";\r\nimport type { GetApprovalsParams } from \"./Approval\";\r\nimport type { DefinedInitialDataOptions, UseMutationOptions } from \"@tanstack/react-query\";\r\nimport type { Approval, ApproveApproval, CancelApproval, CreateApproval, ResubmitApproval, WithdrawApproval } from \"~/models/approval/Approval\";\r\n\r\ntype UseGetApprovalsOptions = Omit<DefinedInitialDataOptions<Array<Approval>>, \"queryKey\" | \"queryFn\" | \"initialData\">;\r\ntype UseGetApprovalOptions = Omit<DefinedInitialDataOptions<Approval>, \"queryKey\" | \"queryFn\" | \"initialData\">;\r\ntype UseCreateApprovalOptions = Omit<UseMutationOptions<Approval, Error, CreateApproval>, \"mutationFn\" | \"onSettled\">;\r\ntype UseApproveApprovalOptions = Omit<UseMutationOptions<Approval, Error, ApproveApproval>, \"mutationFn\" | \"onSettled\">;\r\ntype UseResubmitApprovalOptions = Omit<UseMutationOptions<Approval, Error, ResubmitApproval>, \"mutationFn\" | \"onSettled\">;\r\ntype UseWithdrawApprovalOptions = Omit<UseMutationOptions<void, Error, WithdrawApproval>, \"mutationFn\" | \"onSettled\">;\r\ntype UseCancelApprovalOptions = Omit<UseMutationOptions<void, Error, CancelApproval>, \"mutationFn\" | \"onSettled\">;\r\n\r\nexport const useGetApprovals = (params?: GetApprovalsParams, options?: UseGetApprovalsOptions) =>\r\n useQuery<Array<Approval>>({\r\n ...options,\r\n queryKey: [ROUTE, params],\r\n queryFn: ({ signal }) => getApprovals(params, signal),\r\n });\r\n\r\nexport const useGetApproval = (id: string, options?: UseGetApprovalOptions) => useQuery<Approval>({\r\n ...options,\r\n queryKey: [ROUTE, id],\r\n queryFn: ({ signal }) => getApproval(id, signal),\r\n});\r\n\r\nexport const useCreateApproval = (options?: UseCreateApprovalOptions) => {\r\n const queryClient = useQueryClient();\r\n\r\n return useMutation<Approval, Error, CreateApproval>({\r\n ...options,\r\n mutationFn: data => createApproval(data),\r\n onSettled: () => queryClient.invalidateQueries({ queryKey: [ROUTE], exact: false })\r\n });\r\n};\r\n\r\nexport const useApproveApproval = (options?: UseApproveApprovalOptions) => {\r\n const queryClient = useQueryClient();\r\n\r\n return useMutation<Approval, Error, ApproveApproval>({\r\n ...options,\r\n mutationFn: data => approveApproval(data),\r\n onSettled: () => queryClient.invalidateQueries({ queryKey: [ROUTE], exact: false })\r\n });\r\n};\r\n\r\nexport const useResubmitApproval = (options?: UseResubmitApprovalOptions) => {\r\n const queryClient = useQueryClient();\r\n\r\n return useMutation<Approval, Error, ResubmitApproval>({\r\n ...options,\r\n mutationFn: data => resubmitApproval(data),\r\n onSettled: () => queryClient.invalidateQueries({ queryKey: [ROUTE], exact: false })\r\n });\r\n};\r\n\r\nexport const useWithdrawApproval = (options?: UseWithdrawApprovalOptions) => {\r\n const queryClient = useQueryClient();\r\n\r\n return useMutation<void, Error, WithdrawApproval>({\r\n ...options,\r\n mutationFn: data => withdrawApproval(data),\r\n onSettled: () => queryClient.invalidateQueries({ queryKey: [ROUTE], exact: false })\r\n });\r\n};\r\n\r\nexport const useCancelApproval = (options?: UseCancelApprovalOptions) => {\r\n const queryClient = useQueryClient();\r\n\r\n return useMutation<void, Error, CancelApproval>({\r\n ...options,\r\n mutationFn: data => cancelApproval(data),\r\n onSettled: () => queryClient.invalidateQueries({ queryKey: [ROUTE], exact: false })\r\n });\r\n};\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,gBAAgB;AAMzB,IAAM,YAAY;AAClB,IAAM,MAAM,MAAO,KAAK,KAAK;AAStB,IAAM,kCAAkC,CAAC,YAAoB,YAA4C;AAC5G,SAAO,SAA0B;AAAA,IAC7B,GAAG;AAAA,IACH,UAAU,CAAC,WAAW,YAAY,UAAU,UAAU;AAAA,IACtD,SAAS,CAAC,EAAE,OAAO,MAAM,WAAW,QAAQ;AAAA,MACxC,KAAK,IAAI,SAAS,uBAAuB,UAAU;AAAA,MACnD,QAAQ;AAAA,MACR;AAAA,IACJ,CAAC;AAAA,IACD,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,sBAAsB;AAAA,EAC1B,CAAC;AACL;AAEO,IAAM,4BAA4B,CAAC,YAA4C;AAClF,SAAO,SAA0B;AAAA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kBAAkB,EAAE,UAAU,CAAC,KAAK,GAAG,OAAO,MAAM,CAAC;AAAA,EACtF,CAAC;AACL;AAEO,IAAM,qBAAqB,CAAC,YAAwC;AACvE,QAAM,cAAc,eAAe;AAEnC,SAAO,YAA8C;AAAA,IACjD,GAAG;AAAA,IACH,YAAY,UAAQ,gBAAgB,IAAI;AAAA,IACxC,WAAW,MAAM,YAAY,kBAAkB,EAAE,UAAU,CAAC,KAAK,GAAG,OAAO,MAAM,CAAC;AAAA,EACtF,CAAC;AACL;AAEO,IAAM,sBAAsB,CAAC,YAAyC;AACzE,QAAM,cAAc,eAAe;AAEnC,SAAO,YAA+C;AAAA,IAClD,GAAG;AAAA,IACH,YAAY,UAAQ,iBAAiB,IAAI;AAAA,IACzC,WAAW,MAAM,YAAY,kBAAkB,EAAE,UAAU,CAAC,KAAK,GAAG,OAAO,MAAM,CAAC;AAAA,EACtF,CAAC;AACL;AAEO,IAAM,sBAAsB,CAAC,YAAyC;AACzE,QAAM,cAAc,eAAe;AAEnC,SAAO,YAA2C;AAAA,IAC9C,GAAG;AAAA,IACH,YAAY,UAAQ,iBAAiB,IAAI;AAAA,IACzC,WAAW,MAAM,YAAY,kBAAkB,EAAE,UAAU,CAAC,KAAK,GAAG,OAAO,MAAM,CAAC;AAAA,EACtF,CAAC;AACL;AAEO,IAAM,oBAAoB,CAAC,YAAuC;AACrE,QAAM,cAAc,eAAe;AAEnC,SAAO,YAAyC;AAAA,IAC5C,GAAG;AAAA,IACH,YAAY,UAAQ,eAAe,IAAI;AAAA,IACvC,WAAW,MAAM,YAAY,kBAAkB,EAAE,UAAU,CAAC,KAAK,GAAG,OAAO,MAAM,CAAC;AAAA,EACtF,CAAC;AACL;","names":["useQuery","useQuery"]}
@@ -1,9 +1,43 @@
1
1
  import { Pool } from 'pg';
2
2
  export { Pool } from 'pg';
3
3
  import * as drizzle_orm_node_postgres from 'drizzle-orm/node-postgres';
4
+ import * as better_call from 'better-call';
5
+ import * as better_auth_adapters from 'better-auth/adapters';
6
+ import * as better_auth from 'better-auth';
4
7
 
5
8
  declare const db: drizzle_orm_node_postgres.NodePgDatabase<Record<string, never>> & {
6
9
  $client: Pool;
7
10
  };
8
11
 
9
- export { db };
12
+ declare const auth: better_auth.Auth<{
13
+ database: (options: better_auth.BetterAuthOptions) => better_auth_adapters.DBAdapter<better_auth.BetterAuthOptions>;
14
+ session: {
15
+ cookieCache: {
16
+ enabled: true;
17
+ maxAge: number;
18
+ };
19
+ };
20
+ socialProviders: {
21
+ microsoft: {
22
+ clientId: string;
23
+ clientSecret: string;
24
+ };
25
+ };
26
+ plugins: [{
27
+ id: "react-start-cookies";
28
+ hooks: {
29
+ after: {
30
+ matcher(ctx: better_call.EndpointContext<string, any> & Omit<better_call.InputContext<string, any>, "method"> & {
31
+ context: better_auth.AuthContext & {
32
+ returned?: unknown;
33
+ responseHeaders?: Headers;
34
+ };
35
+ headers?: Headers;
36
+ }): true;
37
+ handler: (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<void>;
38
+ }[];
39
+ };
40
+ }];
41
+ }>;
42
+
43
+ export { auth, db };