@cyberskill/shared 1.192.0 → 1.194.0
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/_tsup-dts-rollup.d.cts +121 -7
- package/dist/_tsup-dts-rollup.d.ts +121 -7
- package/dist/node/cli/cli.util.cjs +1 -1
- package/dist/node/cli/cli.util.js +1 -1
- package/dist/node/cli/index.cjs +1 -1
- package/dist/node/cli/index.js +1 -1
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +3 -0
- package/dist/node/index.d.ts +3 -0
- package/dist/node/index.js +1 -1
- package/dist/node/upload/index.cjs +1 -1
- package/dist/node/upload/index.d.cts +3 -0
- package/dist/node/upload/index.d.ts +3 -0
- package/dist/node/upload/index.js +1 -1
- package/dist/node/upload/upload.type.cjs +1 -1
- package/dist/node/upload/upload.type.d.cts +2 -0
- package/dist/node/upload/upload.type.d.ts +2 -0
- package/dist/node/upload/upload.type.js +1 -0
- package/dist/node/upload/upload.util.cjs +1 -1
- package/dist/node/upload/upload.util.d.cts +1 -0
- package/dist/node/upload/upload.util.d.ts +1 -0
- package/dist/node/upload/upload.util.js +1 -1
- package/dist/react/apollo-client/apollo-client.component.cjs +1 -1
- package/dist/react/apollo-client/apollo-client.component.js +1 -1
- package/dist/react/apollo-client/apollo-client.context.cjs +1 -0
- package/dist/react/apollo-client/apollo-client.context.d.cts +2 -0
- package/dist/react/apollo-client/apollo-client.context.d.ts +2 -0
- package/dist/react/apollo-client/apollo-client.context.js +1 -0
- package/dist/react/apollo-client/apollo-client.hook.cjs +1 -0
- package/dist/react/apollo-client/apollo-client.hook.d.cts +1 -0
- package/dist/react/apollo-client/apollo-client.hook.d.ts +1 -0
- package/dist/react/apollo-client/apollo-client.hook.js +1 -0
- package/dist/react/apollo-client/apollo-client.type.d.cts +1 -0
- package/dist/react/apollo-client/apollo-client.type.d.ts +1 -0
- package/dist/react/apollo-client/apollo-client.util.cjs +1 -0
- package/dist/react/apollo-client/apollo-client.util.css +1 -0
- package/dist/react/apollo-client/apollo-client.util.d.cts +1 -0
- package/dist/react/apollo-client/apollo-client.util.d.ts +1 -0
- package/dist/react/apollo-client/apollo-client.util.js +1 -0
- package/dist/react/apollo-client/index.cjs +1 -1
- package/dist/react/apollo-client/index.d.cts +13 -0
- package/dist/react/apollo-client/index.d.ts +13 -0
- package/dist/react/apollo-client/index.js +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.d.cts +13 -0
- package/dist/react/index.d.ts +13 -0
- package/dist/react/index.js +1 -1
- package/dist/react/userback/index.cjs +1 -0
- package/dist/react/userback/index.d.cts +3 -0
- package/dist/react/userback/index.d.ts +3 -0
- package/dist/react/userback/index.js +1 -0
- package/dist/react/userback/userback.component.cjs +1 -0
- package/dist/react/userback/userback.component.d.cts +1 -0
- package/dist/react/userback/userback.component.d.ts +1 -0
- package/dist/react/userback/userback.component.js +1 -0
- package/dist/react/userback/userback.type.cjs +1 -0
- package/dist/react/userback/userback.type.d.cts +2 -0
- package/dist/react/userback/userback.type.d.ts +2 -0
- package/dist/react/userback/userback.type.js +0 -0
- package/package.json +14 -7
|
@@ -4,9 +4,12 @@ import type { AggregatePaginateModel } from 'mongoose';
|
|
|
4
4
|
import type { AggregatePaginateResult } from 'mongoose';
|
|
5
5
|
import { ApolloCache } from '@apollo/client';
|
|
6
6
|
import { ApolloClient } from '@apollo/client';
|
|
7
|
+
import { ApolloClient as ApolloClient_2 } from '@apollo/client/core/core.cjs';
|
|
8
|
+
import { ApolloClient as ApolloClient_3 } from '@apollo/client-integration-nextjs';
|
|
7
9
|
import { ApolloClientOptions } from '@apollo/client';
|
|
8
10
|
import { ApolloError } from '@apollo/client';
|
|
9
11
|
import type { ApolloLink } from '@apollo/client';
|
|
12
|
+
import { ApolloQueryResult } from '@apollo/client';
|
|
10
13
|
import { ApolloServer } from '@apollo/server';
|
|
11
14
|
import type { Application } from 'express';
|
|
12
15
|
import bodyParser from 'body-parser';
|
|
@@ -46,6 +49,7 @@ import type { InsertOneResult } from 'mongodb';
|
|
|
46
49
|
import type { JSX } from 'react';
|
|
47
50
|
import { Locale } from 'date-fns/locale';
|
|
48
51
|
import type { Locale as Locale_2 } from 'date-fns';
|
|
52
|
+
import { MaybeMasked } from '@apollo/client';
|
|
49
53
|
import migrate from 'migrate-mongo';
|
|
50
54
|
import { Model } from 'mongoose';
|
|
51
55
|
import type mongoose from 'mongoose';
|
|
@@ -53,6 +57,7 @@ import mongoosePaginate from 'mongoose-paginate-v2';
|
|
|
53
57
|
import type mongooseRaw from 'mongoose';
|
|
54
58
|
import { NextFunction } from 'express';
|
|
55
59
|
import { NormalizedCacheObject } from '@apollo/client';
|
|
60
|
+
import { OperationVariables } from '@apollo/client';
|
|
56
61
|
import type { OptionalUnlessRequiredId } from 'mongodb';
|
|
57
62
|
import type { PaginateModel } from 'mongoose';
|
|
58
63
|
import type { PaginateOptions } from 'mongoose';
|
|
@@ -62,10 +67,12 @@ import type { PipelineStage } from 'mongoose';
|
|
|
62
67
|
import type { PopulateOption } from 'mongoose';
|
|
63
68
|
import type { PopulateOptions } from 'mongoose';
|
|
64
69
|
import type { PostMiddlewareFunction } from 'mongoose';
|
|
70
|
+
import { PreloadQueryComponent } from '@apollo/client-integration-nextjs';
|
|
65
71
|
import type { PreMiddlewareFunction } from 'mongoose';
|
|
66
72
|
import type { PreSaveMiddlewareFunction } from 'mongoose';
|
|
67
73
|
import type { ProjectionType } from 'mongoose';
|
|
68
74
|
import type { QueryOptions } from 'mongoose';
|
|
75
|
+
import { QueryOptions as QueryOptions_2 } from '@apollo/client';
|
|
69
76
|
import type { QueryWithHelpers } from 'mongoose';
|
|
70
77
|
import { default as React_2 } from 'react';
|
|
71
78
|
import type { ReactElement } from 'react';
|
|
@@ -86,11 +93,21 @@ import type { Type } from '@nestjs/common';
|
|
|
86
93
|
import type { UpdateQuery } from 'mongoose';
|
|
87
94
|
import type { UpdateResult } from 'mongodb';
|
|
88
95
|
import type { UriFunction } from '@apollo/client';
|
|
96
|
+
import { useApolloClient } from '@apollo/client/react/hooks/hooks.cjs';
|
|
97
|
+
import { useBackgroundQuery } from '@apollo/client/react/hooks/hooks.cjs';
|
|
98
|
+
import { useFragment } from '@apollo/client/react/hooks/hooks.cjs';
|
|
89
99
|
import { useLazyQuery } from '@apollo/client/react/hooks/hooks.cjs';
|
|
100
|
+
import { useLoadableQuery } from '@apollo/client/react/hooks/hooks.cjs';
|
|
90
101
|
import { useMutation } from '@apollo/client/react/hooks/hooks.cjs';
|
|
91
102
|
import { useQuery } from '@apollo/client/react/hooks/hooks.cjs';
|
|
103
|
+
import { useQueryRefHandlers } from '@apollo/client/react/hooks/hooks.cjs';
|
|
104
|
+
import type { UserbackOptions } from '@userback/widget';
|
|
92
105
|
import type { UserConfig } from 'vite';
|
|
106
|
+
import { useReactiveVar } from '@apollo/client/react/hooks/hooks.cjs';
|
|
107
|
+
import { useReadQuery } from '@apollo/client/react/hooks/hooks.cjs';
|
|
93
108
|
import { useSubscription } from '@apollo/client/react/hooks/hooks.cjs';
|
|
109
|
+
import { useSuspenseFragment } from '@apollo/client/react/hooks/hooks.cjs';
|
|
110
|
+
import { useSuspenseQuery } from '@apollo/client/react/hooks/hooks.cjs';
|
|
94
111
|
import { useTranslation } from 'react-i18next';
|
|
95
112
|
import { useTranslations } from 'next-intl';
|
|
96
113
|
import type { ValidationPipe } from '@nestjs/common';
|
|
@@ -109,10 +126,23 @@ export { ApolloClient }
|
|
|
109
126
|
export { ApolloClient as ApolloClient_alias_1 }
|
|
110
127
|
export { ApolloClient as ApolloClient_alias_2 }
|
|
111
128
|
|
|
129
|
+
declare const ApolloClientContext: React_2.Context<ApolloClient<NormalizedCacheObject> | null>;
|
|
130
|
+
export { ApolloClientContext }
|
|
131
|
+
export { ApolloClientContext as ApolloClientContext_alias_1 }
|
|
132
|
+
export { ApolloClientContext as ApolloClientContext_alias_2 }
|
|
133
|
+
|
|
112
134
|
export { ApolloClientOptions }
|
|
113
135
|
export { ApolloClientOptions as ApolloClientOptions_alias_1 }
|
|
114
136
|
export { ApolloClientOptions as ApolloClientOptions_alias_2 }
|
|
115
137
|
|
|
138
|
+
declare function ApolloClientProvider({ client, children, }: {
|
|
139
|
+
client: ApolloClient<NormalizedCacheObject>;
|
|
140
|
+
children: React_2.ReactNode;
|
|
141
|
+
}): React_2.JSX.Element;
|
|
142
|
+
export { ApolloClientProvider }
|
|
143
|
+
export { ApolloClientProvider as ApolloClientProvider_alias_1 }
|
|
144
|
+
export { ApolloClientProvider as ApolloClientProvider_alias_2 }
|
|
145
|
+
|
|
116
146
|
export { ApolloError }
|
|
117
147
|
export { ApolloError as ApolloError_alias_1 }
|
|
118
148
|
export { ApolloError as ApolloError_alias_2 }
|
|
@@ -134,7 +164,7 @@ export { ApolloErrorProvider }
|
|
|
134
164
|
export { ApolloErrorProvider as ApolloErrorProvider_alias_1 }
|
|
135
165
|
export { ApolloErrorProvider as ApolloErrorProvider_alias_2 }
|
|
136
166
|
|
|
137
|
-
declare function ApolloProvider({ isNextJS, options, children,
|
|
167
|
+
declare function ApolloProvider({ isNextJS, options, children, }: I_ApolloProviderProps): React_2.JSX.Element;
|
|
138
168
|
export { ApolloProvider }
|
|
139
169
|
export { ApolloProvider as ApolloProvider_alias_1 }
|
|
140
170
|
export { ApolloProvider as ApolloProvider_alias_2 }
|
|
@@ -300,6 +330,11 @@ export { createSession }
|
|
|
300
330
|
export { createSession as createSession_alias_1 }
|
|
301
331
|
export { createSession as createSession_alias_2 }
|
|
302
332
|
|
|
333
|
+
declare function createUploadConfig(overrides?: Partial<I_UploadConfig>): I_UploadConfig;
|
|
334
|
+
export { createUploadConfig }
|
|
335
|
+
export { createUploadConfig as createUploadConfig_alias_1 }
|
|
336
|
+
export { createUploadConfig as createUploadConfig_alias_2 }
|
|
337
|
+
|
|
303
338
|
declare const createWriteStream: typeof fsExtra.createWriteStream;
|
|
304
339
|
export { createWriteStream }
|
|
305
340
|
export { createWriteStream as createWriteStream_alias_1 }
|
|
@@ -1598,6 +1633,16 @@ export { E_PackageType }
|
|
|
1598
1633
|
export { E_PackageType as E_PackageType_alias_1 }
|
|
1599
1634
|
export { E_PackageType as E_PackageType_alias_2 }
|
|
1600
1635
|
|
|
1636
|
+
declare enum E_UploadType {
|
|
1637
|
+
IMAGE = "IMAGE",
|
|
1638
|
+
VIDEO = "VIDEO",
|
|
1639
|
+
DOCUMENT = "DOCUMENT",
|
|
1640
|
+
OTHER = "OTHER"
|
|
1641
|
+
}
|
|
1642
|
+
export { E_UploadType }
|
|
1643
|
+
export { E_UploadType as E_UploadType_alias_1 }
|
|
1644
|
+
export { E_UploadType as E_UploadType_alias_2 }
|
|
1645
|
+
|
|
1601
1646
|
declare const ESLINT_CLI = "eslint";
|
|
1602
1647
|
export { ESLINT_CLI }
|
|
1603
1648
|
export { ESLINT_CLI as ESLINT_CLI_alias_1 }
|
|
@@ -1671,6 +1716,15 @@ export { generateSlug }
|
|
|
1671
1716
|
export { generateSlug as generateSlug_alias_1 }
|
|
1672
1717
|
export { generateSlug as generateSlug_alias_2 }
|
|
1673
1718
|
|
|
1719
|
+
declare function getClient(options?: I_ApolloOptions, isNextJS?: boolean): ApolloClient_2<NormalizedCacheObject> | {
|
|
1720
|
+
getClient: () => ApolloClient_3<unknown>;
|
|
1721
|
+
query: <T = any, TVariables extends OperationVariables = OperationVariables>(options: QueryOptions_2<TVariables, T>) => Promise<ApolloQueryResult<MaybeMasked<T>>>;
|
|
1722
|
+
PreloadQuery: PreloadQueryComponent;
|
|
1723
|
+
};
|
|
1724
|
+
export { getClient }
|
|
1725
|
+
export { getClient as getClient_alias_1 }
|
|
1726
|
+
export { getClient as getClient_alias_2 }
|
|
1727
|
+
|
|
1674
1728
|
declare function getEnv(): I_Environment;
|
|
1675
1729
|
export { getEnv }
|
|
1676
1730
|
export { getEnv as getEnv_alias_1 }
|
|
@@ -1761,10 +1815,6 @@ export { I_ApolloOptions as I_ApolloOptions_alias_2 }
|
|
|
1761
1815
|
declare interface I_ApolloProviderProps extends I_Children_2 {
|
|
1762
1816
|
isNextJS?: boolean;
|
|
1763
1817
|
options?: I_ApolloOptions;
|
|
1764
|
-
client?: ApolloClient<NormalizedCacheObject>;
|
|
1765
|
-
makeClient?: () => ApolloClient<NormalizedCacheObject>;
|
|
1766
|
-
provider?: ComponentType<I_ApolloProviderProps>;
|
|
1767
|
-
cache?: ApolloCache<NormalizedCacheObject>;
|
|
1768
1818
|
}
|
|
1769
1819
|
export { I_ApolloProviderProps }
|
|
1770
1820
|
export { I_ApolloProviderProps as I_ApolloProviderProps_alias_1 }
|
|
@@ -2222,6 +2272,13 @@ export { I_PackageInput }
|
|
|
2222
2272
|
export { I_PackageInput as I_PackageInput_alias_1 }
|
|
2223
2273
|
export { I_PackageInput as I_PackageInput_alias_2 }
|
|
2224
2274
|
|
|
2275
|
+
declare interface I_RegisteredApolloClient {
|
|
2276
|
+
getClient: () => ApolloClient<NormalizedCacheObject>;
|
|
2277
|
+
}
|
|
2278
|
+
export { I_RegisteredApolloClient }
|
|
2279
|
+
export { I_RegisteredApolloClient as I_RegisteredApolloClient_alias_1 }
|
|
2280
|
+
export { I_RegisteredApolloClient as I_RegisteredApolloClient_alias_2 }
|
|
2281
|
+
|
|
2225
2282
|
declare type I_Return<T = void, E = unknown> = I_ReturnSuccess<T, E> | I_ReturnFailure;
|
|
2226
2283
|
export { I_Return }
|
|
2227
2284
|
export { I_Return as I_Return_alias_1 }
|
|
@@ -2299,8 +2356,10 @@ export { I_UpdateOptionsExtended as I_UpdateOptionsExtended_alias_1 }
|
|
|
2299
2356
|
export { I_UpdateOptionsExtended as I_UpdateOptionsExtended_alias_2 }
|
|
2300
2357
|
|
|
2301
2358
|
declare interface I_UploadConfig {
|
|
2302
|
-
|
|
2303
|
-
|
|
2359
|
+
[E_UploadType.IMAGE]: I_UploadTypeConfig;
|
|
2360
|
+
[E_UploadType.VIDEO]: I_UploadTypeConfig;
|
|
2361
|
+
[E_UploadType.DOCUMENT]: I_UploadTypeConfig;
|
|
2362
|
+
[E_UploadType.OTHER]: I_UploadTypeConfig;
|
|
2304
2363
|
}
|
|
2305
2364
|
export { I_UploadConfig }
|
|
2306
2365
|
export { I_UploadConfig as I_UploadConfig_alias_1 }
|
|
@@ -2314,6 +2373,7 @@ declare interface I_UploadOptions {
|
|
|
2314
2373
|
};
|
|
2315
2374
|
}>;
|
|
2316
2375
|
path: string;
|
|
2376
|
+
type: E_UploadType;
|
|
2317
2377
|
config?: I_UploadConfig;
|
|
2318
2378
|
}
|
|
2319
2379
|
export { I_UploadOptions }
|
|
@@ -2329,6 +2389,14 @@ export { I_UploadResult }
|
|
|
2329
2389
|
export { I_UploadResult as I_UploadResult_alias_1 }
|
|
2330
2390
|
export { I_UploadResult as I_UploadResult_alias_2 }
|
|
2331
2391
|
|
|
2392
|
+
declare interface I_UploadTypeConfig {
|
|
2393
|
+
allowedExtensions: string[];
|
|
2394
|
+
sizeLimit: number;
|
|
2395
|
+
}
|
|
2396
|
+
export { I_UploadTypeConfig }
|
|
2397
|
+
export { I_UploadTypeConfig as I_UploadTypeConfig_alias_1 }
|
|
2398
|
+
export { I_UploadTypeConfig as I_UploadTypeConfig_alias_2 }
|
|
2399
|
+
|
|
2332
2400
|
declare interface I_UploadValidationConfig {
|
|
2333
2401
|
filename: string;
|
|
2334
2402
|
fileSize?: number;
|
|
@@ -2337,6 +2405,19 @@ export { I_UploadValidationConfig }
|
|
|
2337
2405
|
export { I_UploadValidationConfig as I_UploadValidationConfig_alias_1 }
|
|
2338
2406
|
export { I_UploadValidationConfig as I_UploadValidationConfig_alias_2 }
|
|
2339
2407
|
|
|
2408
|
+
declare interface I_UserBackOptions extends UserbackOptions {
|
|
2409
|
+
hide: string[];
|
|
2410
|
+
}
|
|
2411
|
+
export { I_UserBackOptions }
|
|
2412
|
+
export { I_UserBackOptions as I_UserBackOptions_alias_1 }
|
|
2413
|
+
|
|
2414
|
+
declare interface I_UserBackProps {
|
|
2415
|
+
token?: string;
|
|
2416
|
+
options: I_UserBackOptions;
|
|
2417
|
+
}
|
|
2418
|
+
export { I_UserBackProps }
|
|
2419
|
+
export { I_UserBackProps as I_UserBackProps_alias_1 }
|
|
2420
|
+
|
|
2340
2421
|
declare interface I_VirtualNestedOptions {
|
|
2341
2422
|
[key: string]: I_VirtualNestedOptions | number | string | boolean;
|
|
2342
2423
|
}
|
|
@@ -3603,14 +3684,28 @@ export { upload }
|
|
|
3603
3684
|
export { upload as upload_alias_1 }
|
|
3604
3685
|
export { upload as upload_alias_2 }
|
|
3605
3686
|
|
|
3687
|
+
export { useApolloClient }
|
|
3688
|
+
export { useApolloClient as useApolloClient_alias_1 }
|
|
3689
|
+
|
|
3690
|
+
export declare function useApolloClient_alias_2(): ApolloClient<NormalizedCacheObject>;
|
|
3691
|
+
|
|
3606
3692
|
declare function useApolloError(): I_ApolloErrorContext_2;
|
|
3607
3693
|
export { useApolloError }
|
|
3608
3694
|
export { useApolloError as useApolloError_alias_1 }
|
|
3609
3695
|
export { useApolloError as useApolloError_alias_2 }
|
|
3610
3696
|
|
|
3697
|
+
export { useBackgroundQuery }
|
|
3698
|
+
export { useBackgroundQuery as useBackgroundQuery_alias_1 }
|
|
3699
|
+
|
|
3700
|
+
export { useFragment }
|
|
3701
|
+
export { useFragment as useFragment_alias_1 }
|
|
3702
|
+
|
|
3611
3703
|
export { useLazyQuery }
|
|
3612
3704
|
export { useLazyQuery as useLazyQuery_alias_1 }
|
|
3613
3705
|
|
|
3706
|
+
export { useLoadableQuery }
|
|
3707
|
+
export { useLoadableQuery as useLoadableQuery_alias_1 }
|
|
3708
|
+
|
|
3614
3709
|
declare function useLoading(): I_LoadingContext_2;
|
|
3615
3710
|
export { useLoading }
|
|
3616
3711
|
export { useLoading as useLoading_alias_1 }
|
|
@@ -3627,6 +3722,19 @@ export { useNextIntl as useNextIntl_alias_2 }
|
|
|
3627
3722
|
export { useQuery }
|
|
3628
3723
|
export { useQuery as useQuery_alias_1 }
|
|
3629
3724
|
|
|
3725
|
+
export { useQueryRefHandlers }
|
|
3726
|
+
export { useQueryRefHandlers as useQueryRefHandlers_alias_1 }
|
|
3727
|
+
|
|
3728
|
+
declare function Userback({ token, options }: I_UserBackProps): null;
|
|
3729
|
+
export { Userback }
|
|
3730
|
+
export { Userback as Userback_alias_1 }
|
|
3731
|
+
|
|
3732
|
+
export { useReactiveVar }
|
|
3733
|
+
export { useReactiveVar as useReactiveVar_alias_1 }
|
|
3734
|
+
|
|
3735
|
+
export { useReadQuery }
|
|
3736
|
+
export { useReadQuery as useReadQuery_alias_1 }
|
|
3737
|
+
|
|
3630
3738
|
declare function useStorage<T>(key: string, initialValue?: T, serializer?: I_Serializer_2<T>): {
|
|
3631
3739
|
value: T | undefined;
|
|
3632
3740
|
set: (newValue: T | ((val: T | undefined) => T)) => void;
|
|
@@ -3639,6 +3747,12 @@ export { useStorage as useStorage_alias_2 }
|
|
|
3639
3747
|
export { useSubscription }
|
|
3640
3748
|
export { useSubscription as useSubscription_alias_1 }
|
|
3641
3749
|
|
|
3750
|
+
export { useSuspenseFragment }
|
|
3751
|
+
export { useSuspenseFragment as useSuspenseFragment_alias_1 }
|
|
3752
|
+
|
|
3753
|
+
export { useSuspenseQuery }
|
|
3754
|
+
export { useSuspenseQuery as useSuspenseQuery_alias_1 }
|
|
3755
|
+
|
|
3642
3756
|
declare const useTranslateI18next: typeof useTranslation;
|
|
3643
3757
|
export { useTranslateI18next }
|
|
3644
3758
|
export { useTranslateI18next as useTranslateI18next_alias_1 }
|
|
@@ -4,9 +4,12 @@ import type { AggregatePaginateModel } from 'mongoose';
|
|
|
4
4
|
import type { AggregatePaginateResult } from 'mongoose';
|
|
5
5
|
import { ApolloCache } from '@apollo/client';
|
|
6
6
|
import { ApolloClient } from '@apollo/client';
|
|
7
|
+
import { ApolloClient as ApolloClient_2 } from '@apollo/client/core/core.cjs';
|
|
8
|
+
import { ApolloClient as ApolloClient_3 } from '@apollo/client-integration-nextjs';
|
|
7
9
|
import { ApolloClientOptions } from '@apollo/client';
|
|
8
10
|
import { ApolloError } from '@apollo/client';
|
|
9
11
|
import type { ApolloLink } from '@apollo/client';
|
|
12
|
+
import { ApolloQueryResult } from '@apollo/client';
|
|
10
13
|
import { ApolloServer } from '@apollo/server';
|
|
11
14
|
import type { Application } from 'express';
|
|
12
15
|
import bodyParser from 'body-parser';
|
|
@@ -46,6 +49,7 @@ import type { InsertOneResult } from 'mongodb';
|
|
|
46
49
|
import type { JSX } from 'react';
|
|
47
50
|
import { Locale } from 'date-fns/locale';
|
|
48
51
|
import type { Locale as Locale_2 } from 'date-fns';
|
|
52
|
+
import { MaybeMasked } from '@apollo/client';
|
|
49
53
|
import migrate from 'migrate-mongo';
|
|
50
54
|
import { Model } from 'mongoose';
|
|
51
55
|
import type mongoose from 'mongoose';
|
|
@@ -53,6 +57,7 @@ import mongoosePaginate from 'mongoose-paginate-v2';
|
|
|
53
57
|
import type mongooseRaw from 'mongoose';
|
|
54
58
|
import { NextFunction } from 'express';
|
|
55
59
|
import { NormalizedCacheObject } from '@apollo/client';
|
|
60
|
+
import { OperationVariables } from '@apollo/client';
|
|
56
61
|
import type { OptionalUnlessRequiredId } from 'mongodb';
|
|
57
62
|
import type { PaginateModel } from 'mongoose';
|
|
58
63
|
import type { PaginateOptions } from 'mongoose';
|
|
@@ -62,10 +67,12 @@ import type { PipelineStage } from 'mongoose';
|
|
|
62
67
|
import type { PopulateOption } from 'mongoose';
|
|
63
68
|
import type { PopulateOptions } from 'mongoose';
|
|
64
69
|
import type { PostMiddlewareFunction } from 'mongoose';
|
|
70
|
+
import { PreloadQueryComponent } from '@apollo/client-integration-nextjs';
|
|
65
71
|
import type { PreMiddlewareFunction } from 'mongoose';
|
|
66
72
|
import type { PreSaveMiddlewareFunction } from 'mongoose';
|
|
67
73
|
import type { ProjectionType } from 'mongoose';
|
|
68
74
|
import type { QueryOptions } from 'mongoose';
|
|
75
|
+
import { QueryOptions as QueryOptions_2 } from '@apollo/client';
|
|
69
76
|
import type { QueryWithHelpers } from 'mongoose';
|
|
70
77
|
import { default as React_2 } from 'react';
|
|
71
78
|
import type { ReactElement } from 'react';
|
|
@@ -86,11 +93,21 @@ import type { Type } from '@nestjs/common';
|
|
|
86
93
|
import type { UpdateQuery } from 'mongoose';
|
|
87
94
|
import type { UpdateResult } from 'mongodb';
|
|
88
95
|
import type { UriFunction } from '@apollo/client';
|
|
96
|
+
import { useApolloClient } from '@apollo/client/react/hooks/hooks.cjs';
|
|
97
|
+
import { useBackgroundQuery } from '@apollo/client/react/hooks/hooks.cjs';
|
|
98
|
+
import { useFragment } from '@apollo/client/react/hooks/hooks.cjs';
|
|
89
99
|
import { useLazyQuery } from '@apollo/client/react/hooks/hooks.cjs';
|
|
100
|
+
import { useLoadableQuery } from '@apollo/client/react/hooks/hooks.cjs';
|
|
90
101
|
import { useMutation } from '@apollo/client/react/hooks/hooks.cjs';
|
|
91
102
|
import { useQuery } from '@apollo/client/react/hooks/hooks.cjs';
|
|
103
|
+
import { useQueryRefHandlers } from '@apollo/client/react/hooks/hooks.cjs';
|
|
104
|
+
import type { UserbackOptions } from '@userback/widget';
|
|
92
105
|
import type { UserConfig } from 'vite';
|
|
106
|
+
import { useReactiveVar } from '@apollo/client/react/hooks/hooks.cjs';
|
|
107
|
+
import { useReadQuery } from '@apollo/client/react/hooks/hooks.cjs';
|
|
93
108
|
import { useSubscription } from '@apollo/client/react/hooks/hooks.cjs';
|
|
109
|
+
import { useSuspenseFragment } from '@apollo/client/react/hooks/hooks.cjs';
|
|
110
|
+
import { useSuspenseQuery } from '@apollo/client/react/hooks/hooks.cjs';
|
|
94
111
|
import { useTranslation } from 'react-i18next';
|
|
95
112
|
import { useTranslations } from 'next-intl';
|
|
96
113
|
import type { ValidationPipe } from '@nestjs/common';
|
|
@@ -109,10 +126,23 @@ export { ApolloClient }
|
|
|
109
126
|
export { ApolloClient as ApolloClient_alias_1 }
|
|
110
127
|
export { ApolloClient as ApolloClient_alias_2 }
|
|
111
128
|
|
|
129
|
+
declare const ApolloClientContext: React_2.Context<ApolloClient<NormalizedCacheObject> | null>;
|
|
130
|
+
export { ApolloClientContext }
|
|
131
|
+
export { ApolloClientContext as ApolloClientContext_alias_1 }
|
|
132
|
+
export { ApolloClientContext as ApolloClientContext_alias_2 }
|
|
133
|
+
|
|
112
134
|
export { ApolloClientOptions }
|
|
113
135
|
export { ApolloClientOptions as ApolloClientOptions_alias_1 }
|
|
114
136
|
export { ApolloClientOptions as ApolloClientOptions_alias_2 }
|
|
115
137
|
|
|
138
|
+
declare function ApolloClientProvider({ client, children, }: {
|
|
139
|
+
client: ApolloClient<NormalizedCacheObject>;
|
|
140
|
+
children: React_2.ReactNode;
|
|
141
|
+
}): React_2.JSX.Element;
|
|
142
|
+
export { ApolloClientProvider }
|
|
143
|
+
export { ApolloClientProvider as ApolloClientProvider_alias_1 }
|
|
144
|
+
export { ApolloClientProvider as ApolloClientProvider_alias_2 }
|
|
145
|
+
|
|
116
146
|
export { ApolloError }
|
|
117
147
|
export { ApolloError as ApolloError_alias_1 }
|
|
118
148
|
export { ApolloError as ApolloError_alias_2 }
|
|
@@ -134,7 +164,7 @@ export { ApolloErrorProvider }
|
|
|
134
164
|
export { ApolloErrorProvider as ApolloErrorProvider_alias_1 }
|
|
135
165
|
export { ApolloErrorProvider as ApolloErrorProvider_alias_2 }
|
|
136
166
|
|
|
137
|
-
declare function ApolloProvider({ isNextJS, options, children,
|
|
167
|
+
declare function ApolloProvider({ isNextJS, options, children, }: I_ApolloProviderProps): React_2.JSX.Element;
|
|
138
168
|
export { ApolloProvider }
|
|
139
169
|
export { ApolloProvider as ApolloProvider_alias_1 }
|
|
140
170
|
export { ApolloProvider as ApolloProvider_alias_2 }
|
|
@@ -300,6 +330,11 @@ export { createSession }
|
|
|
300
330
|
export { createSession as createSession_alias_1 }
|
|
301
331
|
export { createSession as createSession_alias_2 }
|
|
302
332
|
|
|
333
|
+
declare function createUploadConfig(overrides?: Partial<I_UploadConfig>): I_UploadConfig;
|
|
334
|
+
export { createUploadConfig }
|
|
335
|
+
export { createUploadConfig as createUploadConfig_alias_1 }
|
|
336
|
+
export { createUploadConfig as createUploadConfig_alias_2 }
|
|
337
|
+
|
|
303
338
|
declare const createWriteStream: typeof fsExtra.createWriteStream;
|
|
304
339
|
export { createWriteStream }
|
|
305
340
|
export { createWriteStream as createWriteStream_alias_1 }
|
|
@@ -1598,6 +1633,16 @@ export { E_PackageType }
|
|
|
1598
1633
|
export { E_PackageType as E_PackageType_alias_1 }
|
|
1599
1634
|
export { E_PackageType as E_PackageType_alias_2 }
|
|
1600
1635
|
|
|
1636
|
+
declare enum E_UploadType {
|
|
1637
|
+
IMAGE = "IMAGE",
|
|
1638
|
+
VIDEO = "VIDEO",
|
|
1639
|
+
DOCUMENT = "DOCUMENT",
|
|
1640
|
+
OTHER = "OTHER"
|
|
1641
|
+
}
|
|
1642
|
+
export { E_UploadType }
|
|
1643
|
+
export { E_UploadType as E_UploadType_alias_1 }
|
|
1644
|
+
export { E_UploadType as E_UploadType_alias_2 }
|
|
1645
|
+
|
|
1601
1646
|
declare const ESLINT_CLI = "eslint";
|
|
1602
1647
|
export { ESLINT_CLI }
|
|
1603
1648
|
export { ESLINT_CLI as ESLINT_CLI_alias_1 }
|
|
@@ -1671,6 +1716,15 @@ export { generateSlug }
|
|
|
1671
1716
|
export { generateSlug as generateSlug_alias_1 }
|
|
1672
1717
|
export { generateSlug as generateSlug_alias_2 }
|
|
1673
1718
|
|
|
1719
|
+
declare function getClient(options?: I_ApolloOptions, isNextJS?: boolean): ApolloClient_2<NormalizedCacheObject> | {
|
|
1720
|
+
getClient: () => ApolloClient_3<unknown>;
|
|
1721
|
+
query: <T = any, TVariables extends OperationVariables = OperationVariables>(options: QueryOptions_2<TVariables, T>) => Promise<ApolloQueryResult<MaybeMasked<T>>>;
|
|
1722
|
+
PreloadQuery: PreloadQueryComponent;
|
|
1723
|
+
};
|
|
1724
|
+
export { getClient }
|
|
1725
|
+
export { getClient as getClient_alias_1 }
|
|
1726
|
+
export { getClient as getClient_alias_2 }
|
|
1727
|
+
|
|
1674
1728
|
declare function getEnv(): I_Environment;
|
|
1675
1729
|
export { getEnv }
|
|
1676
1730
|
export { getEnv as getEnv_alias_1 }
|
|
@@ -1761,10 +1815,6 @@ export { I_ApolloOptions as I_ApolloOptions_alias_2 }
|
|
|
1761
1815
|
declare interface I_ApolloProviderProps extends I_Children_2 {
|
|
1762
1816
|
isNextJS?: boolean;
|
|
1763
1817
|
options?: I_ApolloOptions;
|
|
1764
|
-
client?: ApolloClient<NormalizedCacheObject>;
|
|
1765
|
-
makeClient?: () => ApolloClient<NormalizedCacheObject>;
|
|
1766
|
-
provider?: ComponentType<I_ApolloProviderProps>;
|
|
1767
|
-
cache?: ApolloCache<NormalizedCacheObject>;
|
|
1768
1818
|
}
|
|
1769
1819
|
export { I_ApolloProviderProps }
|
|
1770
1820
|
export { I_ApolloProviderProps as I_ApolloProviderProps_alias_1 }
|
|
@@ -2222,6 +2272,13 @@ export { I_PackageInput }
|
|
|
2222
2272
|
export { I_PackageInput as I_PackageInput_alias_1 }
|
|
2223
2273
|
export { I_PackageInput as I_PackageInput_alias_2 }
|
|
2224
2274
|
|
|
2275
|
+
declare interface I_RegisteredApolloClient {
|
|
2276
|
+
getClient: () => ApolloClient<NormalizedCacheObject>;
|
|
2277
|
+
}
|
|
2278
|
+
export { I_RegisteredApolloClient }
|
|
2279
|
+
export { I_RegisteredApolloClient as I_RegisteredApolloClient_alias_1 }
|
|
2280
|
+
export { I_RegisteredApolloClient as I_RegisteredApolloClient_alias_2 }
|
|
2281
|
+
|
|
2225
2282
|
declare type I_Return<T = void, E = unknown> = I_ReturnSuccess<T, E> | I_ReturnFailure;
|
|
2226
2283
|
export { I_Return }
|
|
2227
2284
|
export { I_Return as I_Return_alias_1 }
|
|
@@ -2299,8 +2356,10 @@ export { I_UpdateOptionsExtended as I_UpdateOptionsExtended_alias_1 }
|
|
|
2299
2356
|
export { I_UpdateOptionsExtended as I_UpdateOptionsExtended_alias_2 }
|
|
2300
2357
|
|
|
2301
2358
|
declare interface I_UploadConfig {
|
|
2302
|
-
|
|
2303
|
-
|
|
2359
|
+
[E_UploadType.IMAGE]: I_UploadTypeConfig;
|
|
2360
|
+
[E_UploadType.VIDEO]: I_UploadTypeConfig;
|
|
2361
|
+
[E_UploadType.DOCUMENT]: I_UploadTypeConfig;
|
|
2362
|
+
[E_UploadType.OTHER]: I_UploadTypeConfig;
|
|
2304
2363
|
}
|
|
2305
2364
|
export { I_UploadConfig }
|
|
2306
2365
|
export { I_UploadConfig as I_UploadConfig_alias_1 }
|
|
@@ -2314,6 +2373,7 @@ declare interface I_UploadOptions {
|
|
|
2314
2373
|
};
|
|
2315
2374
|
}>;
|
|
2316
2375
|
path: string;
|
|
2376
|
+
type: E_UploadType;
|
|
2317
2377
|
config?: I_UploadConfig;
|
|
2318
2378
|
}
|
|
2319
2379
|
export { I_UploadOptions }
|
|
@@ -2329,6 +2389,14 @@ export { I_UploadResult }
|
|
|
2329
2389
|
export { I_UploadResult as I_UploadResult_alias_1 }
|
|
2330
2390
|
export { I_UploadResult as I_UploadResult_alias_2 }
|
|
2331
2391
|
|
|
2392
|
+
declare interface I_UploadTypeConfig {
|
|
2393
|
+
allowedExtensions: string[];
|
|
2394
|
+
sizeLimit: number;
|
|
2395
|
+
}
|
|
2396
|
+
export { I_UploadTypeConfig }
|
|
2397
|
+
export { I_UploadTypeConfig as I_UploadTypeConfig_alias_1 }
|
|
2398
|
+
export { I_UploadTypeConfig as I_UploadTypeConfig_alias_2 }
|
|
2399
|
+
|
|
2332
2400
|
declare interface I_UploadValidationConfig {
|
|
2333
2401
|
filename: string;
|
|
2334
2402
|
fileSize?: number;
|
|
@@ -2337,6 +2405,19 @@ export { I_UploadValidationConfig }
|
|
|
2337
2405
|
export { I_UploadValidationConfig as I_UploadValidationConfig_alias_1 }
|
|
2338
2406
|
export { I_UploadValidationConfig as I_UploadValidationConfig_alias_2 }
|
|
2339
2407
|
|
|
2408
|
+
declare interface I_UserBackOptions extends UserbackOptions {
|
|
2409
|
+
hide: string[];
|
|
2410
|
+
}
|
|
2411
|
+
export { I_UserBackOptions }
|
|
2412
|
+
export { I_UserBackOptions as I_UserBackOptions_alias_1 }
|
|
2413
|
+
|
|
2414
|
+
declare interface I_UserBackProps {
|
|
2415
|
+
token?: string;
|
|
2416
|
+
options: I_UserBackOptions;
|
|
2417
|
+
}
|
|
2418
|
+
export { I_UserBackProps }
|
|
2419
|
+
export { I_UserBackProps as I_UserBackProps_alias_1 }
|
|
2420
|
+
|
|
2340
2421
|
declare interface I_VirtualNestedOptions {
|
|
2341
2422
|
[key: string]: I_VirtualNestedOptions | number | string | boolean;
|
|
2342
2423
|
}
|
|
@@ -3603,14 +3684,28 @@ export { upload }
|
|
|
3603
3684
|
export { upload as upload_alias_1 }
|
|
3604
3685
|
export { upload as upload_alias_2 }
|
|
3605
3686
|
|
|
3687
|
+
export { useApolloClient }
|
|
3688
|
+
export { useApolloClient as useApolloClient_alias_1 }
|
|
3689
|
+
|
|
3690
|
+
export declare function useApolloClient_alias_2(): ApolloClient<NormalizedCacheObject>;
|
|
3691
|
+
|
|
3606
3692
|
declare function useApolloError(): I_ApolloErrorContext_2;
|
|
3607
3693
|
export { useApolloError }
|
|
3608
3694
|
export { useApolloError as useApolloError_alias_1 }
|
|
3609
3695
|
export { useApolloError as useApolloError_alias_2 }
|
|
3610
3696
|
|
|
3697
|
+
export { useBackgroundQuery }
|
|
3698
|
+
export { useBackgroundQuery as useBackgroundQuery_alias_1 }
|
|
3699
|
+
|
|
3700
|
+
export { useFragment }
|
|
3701
|
+
export { useFragment as useFragment_alias_1 }
|
|
3702
|
+
|
|
3611
3703
|
export { useLazyQuery }
|
|
3612
3704
|
export { useLazyQuery as useLazyQuery_alias_1 }
|
|
3613
3705
|
|
|
3706
|
+
export { useLoadableQuery }
|
|
3707
|
+
export { useLoadableQuery as useLoadableQuery_alias_1 }
|
|
3708
|
+
|
|
3614
3709
|
declare function useLoading(): I_LoadingContext_2;
|
|
3615
3710
|
export { useLoading }
|
|
3616
3711
|
export { useLoading as useLoading_alias_1 }
|
|
@@ -3627,6 +3722,19 @@ export { useNextIntl as useNextIntl_alias_2 }
|
|
|
3627
3722
|
export { useQuery }
|
|
3628
3723
|
export { useQuery as useQuery_alias_1 }
|
|
3629
3724
|
|
|
3725
|
+
export { useQueryRefHandlers }
|
|
3726
|
+
export { useQueryRefHandlers as useQueryRefHandlers_alias_1 }
|
|
3727
|
+
|
|
3728
|
+
declare function Userback({ token, options }: I_UserBackProps): null;
|
|
3729
|
+
export { Userback }
|
|
3730
|
+
export { Userback as Userback_alias_1 }
|
|
3731
|
+
|
|
3732
|
+
export { useReactiveVar }
|
|
3733
|
+
export { useReactiveVar as useReactiveVar_alias_1 }
|
|
3734
|
+
|
|
3735
|
+
export { useReadQuery }
|
|
3736
|
+
export { useReadQuery as useReadQuery_alias_1 }
|
|
3737
|
+
|
|
3630
3738
|
declare function useStorage<T>(key: string, initialValue?: T, serializer?: I_Serializer_2<T>): {
|
|
3631
3739
|
value: T | undefined;
|
|
3632
3740
|
set: (newValue: T | ((val: T | undefined) => T)) => void;
|
|
@@ -3639,6 +3747,12 @@ export { useStorage as useStorage_alias_2 }
|
|
|
3639
3747
|
export { useSubscription }
|
|
3640
3748
|
export { useSubscription as useSubscription_alias_1 }
|
|
3641
3749
|
|
|
3750
|
+
export { useSuspenseFragment }
|
|
3751
|
+
export { useSuspenseFragment as useSuspenseFragment_alias_1 }
|
|
3752
|
+
|
|
3753
|
+
export { useSuspenseQuery }
|
|
3754
|
+
export { useSuspenseQuery as useSuspenseQuery_alias_1 }
|
|
3755
|
+
|
|
3642
3756
|
declare const useTranslateI18next: typeof useTranslation;
|
|
3643
3757
|
export { useTranslateI18next }
|
|
3644
3758
|
export { useTranslateI18next as useTranslateI18next_alias_1 }
|