serene-core-client 0.1.6 → 0.1.8
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/src/apollo/access.d.ts +1 -1
- package/dist/src/apollo/mailing-lists.d.ts +2 -2
- package/dist/src/apollo/quotas.d.ts +1 -1
- package/dist/src/apollo/techs.d.ts +1 -1
- package/dist/src/apollo/tips.d.ts +3 -3
- package/dist/src/apollo/user-preferences.d.ts +2 -2
- package/dist/src/apollo/users.d.ts +6 -6
- package/dist/src/components/account/profile.js +6 -9
- package/dist/src/components/basics/json-display.js +2 -1
- package/dist/src/components/css/loaders.d.ts +1 -0
- package/dist/src/components/css/loaders.js +1 -1
- package/dist/src/components/mailing-lists/sign-up.js +1 -1
- package/dist/src/components/tech/load-techs.js +1 -1
- package/dist/src/components/tips/load-tips.js +1 -1
- package/dist/src/components/tips/tip.js +1 -1
- package/dist/src/index.d.ts +36 -36
- package/dist/src/index.js +36 -36
- package/dist/src/services/access/service.d.ts +1 -1
- package/dist/src/services/access/service.js +2 -2
- package/dist/src/services/rest-api/service.js +3 -4
- package/dist/src/services/users/profile-service.js +1 -1
- package/dist/src/services/users/user-preferences-service.js +1 -1
- package/dist/src/services/users/user-service.js +1 -1
- package/dist/src/services/utils/date.d.ts +1 -1
- package/dist/src/services/utils/date.js +1 -1
- package/package.json +7 -3
- package/src/apollo/access.ts +0 -10
- package/src/apollo/mailing-lists.ts +0 -35
- package/src/apollo/quotas.ts +0 -22
- package/src/apollo/techs.ts +0 -16
- package/src/apollo/tips.ts +0 -48
- package/src/apollo/user-preferences.ts +0 -34
- package/src/apollo/users.ts +0 -66
- package/src/components/account/profile.tsx +0 -280
- package/src/components/basics/copy-text-icon.tsx +0 -34
- package/src/components/basics/editable-string-list.tsx +0 -97
- package/src/components/basics/json-display.tsx +0 -71
- package/src/components/basics/mui-auto-focus.tsx +0 -19
- package/src/components/basics/text-area-field.tsx +0 -63
- package/src/components/basics/view-link-field.tsx +0 -32
- package/src/components/basics/view-markdown-field.tsx +0 -31
- package/src/components/basics/view-text-field.tsx +0 -28
- package/src/components/buttons/labeled-icon-button.tsx +0 -53
- package/src/components/css/loaders.tsx +0 -0
- package/src/components/mailing-lists/sign-up.tsx +0 -126
- package/src/components/notifications/action.tsx +0 -50
- package/src/components/tech/load-techs.tsx +0 -66
- package/src/components/tech/tech-autocomplete.tsx +0 -65
- package/src/components/tips/load-tips.tsx +0 -75
- package/src/components/tips/tip.tsx +0 -96
- package/src/index.ts +0 -36
- package/src/services/access/service.ts +0 -126
- package/src/services/locale/countries.ts +0 -483
- package/src/services/rest-api/request.ts +0 -10
- package/src/services/rest-api/service.ts +0 -130
- package/src/services/users/profile-service.ts +0 -28
- package/src/services/users/user-preferences-service.ts +0 -64
- package/src/services/users/user-service.ts +0 -310
- package/src/services/utils/date.ts +0 -6
- package/src/services/utils/functions.ts +0 -8
- package/src/services/utils/service.ts +0 -12
- package/src/services/utils/string.ts +0 -48
- package/src/services/utils/tree.ts +0 -88
- package/src/types/types.ts +0 -4
- package/tsconfig.json +0 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const isAdminUserQuery: import("
|
|
1
|
+
export declare const isAdminUserQuery: import("@apollo/client").DocumentNode;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const mailingListSignupMutation: import("
|
|
2
|
-
export declare const verifySignupMutation: import("
|
|
1
|
+
export declare const mailingListSignupMutation: import("@apollo/client").DocumentNode;
|
|
2
|
+
export declare const verifySignupMutation: import("@apollo/client").DocumentNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getResourceQuotaUsageQuery: import("
|
|
1
|
+
export declare const getResourceQuotaUsageQuery: import("@apollo/client").DocumentNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getTechsQuery: import("
|
|
1
|
+
export declare const getTechsQuery: import("@apollo/client").DocumentNode;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const getTipsByUserProfileIdAndTagsQuery: import("
|
|
2
|
-
export declare const tipGotItExistsQuery: import("
|
|
3
|
-
export declare const upsertTipGotItMutation: import("
|
|
1
|
+
export declare const getTipsByUserProfileIdAndTagsQuery: import("@apollo/client").DocumentNode;
|
|
2
|
+
export declare const tipGotItExistsQuery: import("@apollo/client").DocumentNode;
|
|
3
|
+
export declare const upsertTipGotItMutation: import("@apollo/client").DocumentNode;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const getUserPreferencesQuery: import("
|
|
2
|
-
export declare const upsertUserPreferenceMutation: import("
|
|
1
|
+
export declare const getUserPreferencesQuery: import("@apollo/client").DocumentNode;
|
|
2
|
+
export declare const upsertUserPreferenceMutation: import("@apollo/client").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const createBlankUserMutation: import("
|
|
2
|
-
export declare const createUserByEmailMutation: import("
|
|
3
|
-
export declare const getOrCreateSignedOutUserMutation: import("
|
|
4
|
-
export declare const getOrCreateUserByEmailMutation: import("
|
|
5
|
-
export declare const updateIFileCreatedByMutation: import("
|
|
6
|
-
export declare const verifySignedInUserProfileIdQuery: import("
|
|
1
|
+
export declare const createBlankUserMutation: import("@apollo/client").DocumentNode;
|
|
2
|
+
export declare const createUserByEmailMutation: import("@apollo/client").DocumentNode;
|
|
3
|
+
export declare const getOrCreateSignedOutUserMutation: import("@apollo/client").DocumentNode;
|
|
4
|
+
export declare const getOrCreateUserByEmailMutation: import("@apollo/client").DocumentNode;
|
|
5
|
+
export declare const updateIFileCreatedByMutation: import("@apollo/client").DocumentNode;
|
|
6
|
+
export declare const verifySignedInUserProfileIdQuery: import("@apollo/client").DocumentNode;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { signIn, signOut } from 'next-auth/react';
|
|
3
3
|
import { useQuery } from '@apollo/client/react';
|
|
4
|
-
import Button from '@mui/material
|
|
5
|
-
import TextField from '@mui/material/TextField';
|
|
6
|
-
import Select from '@mui/material/Select';
|
|
4
|
+
import { Button, FormControl, InputLabel, Select, TextField, Typography } from '@mui/material';
|
|
7
5
|
import { useEffect, useState } from 'react';
|
|
8
|
-
import { ActionNotification } from '../notifications/action';
|
|
9
|
-
import { RestApiService } from '../../services/rest-api/service';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { ProfileService } from '../../services/users/profile-service';
|
|
6
|
+
import { ActionNotification } from '../notifications/action.js';
|
|
7
|
+
import { RestApiService } from '../../services/rest-api/service.js';
|
|
8
|
+
import { countries } from '../../services/locale/countries.js';
|
|
9
|
+
import { getUserPreferencesQuery } from '../../apollo/user-preferences.js';
|
|
10
|
+
import { ProfileService } from '../../services/users/profile-service.js';
|
|
14
11
|
export function Profile({ userProfile, clientUrl, serverUrl, session }) {
|
|
15
12
|
// Consts
|
|
16
13
|
const personalDetails = 'personal details';
|
|
@@ -3,7 +3,8 @@ import { useState } from 'react';
|
|
|
3
3
|
import { Box, IconButton } from '@mui/material';
|
|
4
4
|
import AddIcon from '@mui/icons-material/Add';
|
|
5
5
|
import { PrismLight as SyntaxHighlighter } from 'react-syntax-highlighter';
|
|
6
|
-
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
import oneLight from 'react-syntax-highlighter/dist/esm/styles/prism/one-light.js';
|
|
7
8
|
export function JsonDisplay({ str, format = false, minified = false }) {
|
|
8
9
|
const [isMinified, setIsMinified] = useState(minified);
|
|
9
10
|
return (_jsxs(Box, { sx: { position: 'relative' }, children: [_jsx(Box, { component: 'pre', sx: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { useMutation } from '@apollo/client/react';
|
|
4
|
-
import { mailingListSignupMutation } from '../../apollo/mailing-lists';
|
|
5
4
|
import { Alert, Button, TextField } from '@mui/material';
|
|
5
|
+
import { mailingListSignupMutation } from '../../apollo/mailing-lists.js';
|
|
6
6
|
export function MailingListSignUp({ mailingListName }) {
|
|
7
7
|
// State
|
|
8
8
|
const [alertSeverity, setAlertSeverity] = useState(undefined);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect } from 'react';
|
|
3
3
|
import { useQuery } from '@apollo/client/react';
|
|
4
|
-
import { getTechsQuery } from '../../apollo/techs';
|
|
4
|
+
import { getTechsQuery } from '../../apollo/techs.js';
|
|
5
5
|
export function LoadTechByFilter({ userProfileId, resource, setTechs }) {
|
|
6
6
|
// GraphQL
|
|
7
7
|
const { refetch: fetchTechsQuery } = useQuery(getTechsQuery, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect } from 'react';
|
|
3
3
|
import { useQuery } from '@apollo/client/react';
|
|
4
|
-
import { getTipsByUserProfileIdAndTagsQuery } from '../../apollo/tips';
|
|
4
|
+
import { getTipsByUserProfileIdAndTagsQuery } from '../../apollo/tips.js';
|
|
5
5
|
export function LoadTips({ userProfileId, tipTags, setTips }) {
|
|
6
6
|
// GraphQL
|
|
7
7
|
const { refetch: fetchGetTipsByUserProfileIdAndTagsQuery } = useQuery(getTipsByUserProfileIdAndTagsQuery, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMutation } from '@apollo/client/react';
|
|
3
|
-
import { upsertTipGotItMutation } from '../../apollo/tips';
|
|
4
3
|
import { Button, Card, CardActions, CardContent, Typography } from '@mui/material';
|
|
4
|
+
import { upsertTipGotItMutation } from '../../apollo/tips.js';
|
|
5
5
|
export function Tip({ name, label, text, setFocusRef = undefined, setTipVisible, style = {}, userProfileId }) {
|
|
6
6
|
// GraphQL
|
|
7
7
|
const [sendUpsertTipGotItMutation] = useMutation(upsertTipGotItMutation, {
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
export * from './apollo/access';
|
|
2
|
-
export * from './apollo/mailing-lists';
|
|
3
|
-
export * from './apollo/quotas';
|
|
4
|
-
export * from './apollo/techs';
|
|
5
|
-
export * from './apollo/tips';
|
|
6
|
-
export * from './apollo/user-preferences';
|
|
7
|
-
export * from './apollo/users';
|
|
8
|
-
export * from './components/account/profile';
|
|
9
|
-
export * from './components/basics/copy-text-icon';
|
|
10
|
-
export * from './components/basics/editable-string-list';
|
|
11
|
-
export * from './components/basics/json-display';
|
|
12
|
-
export * from './components/basics/mui-auto-focus';
|
|
13
|
-
export * from './components/basics/text-area-field';
|
|
14
|
-
export * from './components/basics/view-link-field';
|
|
15
|
-
export * from './components/basics/view-markdown-field';
|
|
16
|
-
export * from './components/basics/view-text-field';
|
|
17
|
-
export * from './components/buttons/labeled-icon-button';
|
|
18
|
-
export * from './components/mailing-lists/sign-up';
|
|
19
|
-
export * from './components/notifications/action';
|
|
20
|
-
export * from './components/tech/load-techs';
|
|
21
|
-
export * from './components/tech/tech-autocomplete';
|
|
22
|
-
export * from './components/tips/load-tips';
|
|
23
|
-
export * from './components/tips/tip';
|
|
24
|
-
export * from './services/access/service';
|
|
25
|
-
export * from './services/locale/countries';
|
|
26
|
-
export * from './services/rest-api/request';
|
|
27
|
-
export * from './services/rest-api/service';
|
|
28
|
-
export * from './services/users/profile-service';
|
|
29
|
-
export * from './services/users/user-preferences-service';
|
|
30
|
-
export * from './services/users/user-service';
|
|
31
|
-
export * from './services/utils/date';
|
|
32
|
-
export * from './services/utils/functions';
|
|
33
|
-
export * from './services/utils/service';
|
|
34
|
-
export * from './services/utils/string';
|
|
35
|
-
export * from './services/utils/tree';
|
|
36
|
-
export * from './types/types';
|
|
1
|
+
export * from './apollo/access.js';
|
|
2
|
+
export * from './apollo/mailing-lists.js';
|
|
3
|
+
export * from './apollo/quotas.js';
|
|
4
|
+
export * from './apollo/techs.js';
|
|
5
|
+
export * from './apollo/tips.js';
|
|
6
|
+
export * from './apollo/user-preferences.js';
|
|
7
|
+
export * from './apollo/users.js';
|
|
8
|
+
export * from './components/account/profile.js';
|
|
9
|
+
export * from './components/basics/copy-text-icon.js';
|
|
10
|
+
export * from './components/basics/editable-string-list.js';
|
|
11
|
+
export * from './components/basics/json-display.js';
|
|
12
|
+
export * from './components/basics/mui-auto-focus.js';
|
|
13
|
+
export * from './components/basics/text-area-field.js';
|
|
14
|
+
export * from './components/basics/view-link-field.js';
|
|
15
|
+
export * from './components/basics/view-markdown-field.js';
|
|
16
|
+
export * from './components/basics/view-text-field.js';
|
|
17
|
+
export * from './components/buttons/labeled-icon-button.js';
|
|
18
|
+
export * from './components/mailing-lists/sign-up.js';
|
|
19
|
+
export * from './components/notifications/action.js';
|
|
20
|
+
export * from './components/tech/load-techs.js';
|
|
21
|
+
export * from './components/tech/tech-autocomplete.js';
|
|
22
|
+
export * from './components/tips/load-tips.js';
|
|
23
|
+
export * from './components/tips/tip.js';
|
|
24
|
+
export * from './services/access/service.js';
|
|
25
|
+
export * from './services/locale/countries.js';
|
|
26
|
+
export * from './services/rest-api/request.js';
|
|
27
|
+
export * from './services/rest-api/service.js';
|
|
28
|
+
export * from './services/users/profile-service.js';
|
|
29
|
+
export * from './services/users/user-preferences-service.js';
|
|
30
|
+
export * from './services/users/user-service.js';
|
|
31
|
+
export * from './services/utils/date.js';
|
|
32
|
+
export * from './services/utils/functions.js';
|
|
33
|
+
export * from './services/utils/service.js';
|
|
34
|
+
export * from './services/utils/string.js';
|
|
35
|
+
export * from './services/utils/tree.js';
|
|
36
|
+
export * from './types/types.js';
|
package/dist/src/index.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
export * from './apollo/access';
|
|
2
|
-
export * from './apollo/mailing-lists';
|
|
3
|
-
export * from './apollo/quotas';
|
|
4
|
-
export * from './apollo/techs';
|
|
5
|
-
export * from './apollo/tips';
|
|
6
|
-
export * from './apollo/user-preferences';
|
|
7
|
-
export * from './apollo/users';
|
|
8
|
-
export * from './components/account/profile';
|
|
9
|
-
export * from './components/basics/copy-text-icon';
|
|
10
|
-
export * from './components/basics/editable-string-list';
|
|
11
|
-
export * from './components/basics/json-display';
|
|
12
|
-
export * from './components/basics/mui-auto-focus';
|
|
13
|
-
export * from './components/basics/text-area-field';
|
|
14
|
-
export * from './components/basics/view-link-field';
|
|
15
|
-
export * from './components/basics/view-markdown-field';
|
|
16
|
-
export * from './components/basics/view-text-field';
|
|
17
|
-
export * from './components/buttons/labeled-icon-button';
|
|
18
|
-
export * from './components/mailing-lists/sign-up';
|
|
19
|
-
export * from './components/notifications/action';
|
|
20
|
-
export * from './components/tech/load-techs';
|
|
21
|
-
export * from './components/tech/tech-autocomplete';
|
|
22
|
-
export * from './components/tips/load-tips';
|
|
23
|
-
export * from './components/tips/tip';
|
|
24
|
-
export * from './services/access/service';
|
|
25
|
-
export * from './services/locale/countries';
|
|
26
|
-
export * from './services/rest-api/request';
|
|
27
|
-
export * from './services/rest-api/service';
|
|
28
|
-
export * from './services/users/profile-service';
|
|
29
|
-
export * from './services/users/user-preferences-service';
|
|
30
|
-
export * from './services/users/user-service';
|
|
31
|
-
export * from './services/utils/date';
|
|
32
|
-
export * from './services/utils/functions';
|
|
33
|
-
export * from './services/utils/service';
|
|
34
|
-
export * from './services/utils/string';
|
|
35
|
-
export * from './services/utils/tree';
|
|
36
|
-
export * from './types/types';
|
|
1
|
+
export * from './apollo/access.js';
|
|
2
|
+
export * from './apollo/mailing-lists.js';
|
|
3
|
+
export * from './apollo/quotas.js';
|
|
4
|
+
export * from './apollo/techs.js';
|
|
5
|
+
export * from './apollo/tips.js';
|
|
6
|
+
export * from './apollo/user-preferences.js';
|
|
7
|
+
export * from './apollo/users.js';
|
|
8
|
+
export * from './components/account/profile.js';
|
|
9
|
+
export * from './components/basics/copy-text-icon.js';
|
|
10
|
+
export * from './components/basics/editable-string-list.js';
|
|
11
|
+
export * from './components/basics/json-display.js';
|
|
12
|
+
export * from './components/basics/mui-auto-focus.js';
|
|
13
|
+
export * from './components/basics/text-area-field.js';
|
|
14
|
+
export * from './components/basics/view-link-field.js';
|
|
15
|
+
export * from './components/basics/view-markdown-field.js';
|
|
16
|
+
export * from './components/basics/view-text-field.js';
|
|
17
|
+
export * from './components/buttons/labeled-icon-button.js';
|
|
18
|
+
export * from './components/mailing-lists/sign-up.js';
|
|
19
|
+
export * from './components/notifications/action.js';
|
|
20
|
+
export * from './components/tech/load-techs.js';
|
|
21
|
+
export * from './components/tech/tech-autocomplete.js';
|
|
22
|
+
export * from './components/tips/load-tips.js';
|
|
23
|
+
export * from './components/tips/tip.js';
|
|
24
|
+
export * from './services/access/service.js';
|
|
25
|
+
export * from './services/locale/countries.js';
|
|
26
|
+
export * from './services/rest-api/request.js';
|
|
27
|
+
export * from './services/rest-api/service.js';
|
|
28
|
+
export * from './services/users/profile-service.js';
|
|
29
|
+
export * from './services/users/user-preferences-service.js';
|
|
30
|
+
export * from './services/users/user-service.js';
|
|
31
|
+
export * from './services/utils/date.js';
|
|
32
|
+
export * from './services/utils/functions.js';
|
|
33
|
+
export * from './services/utils/service.js';
|
|
34
|
+
export * from './services/utils/string.js';
|
|
35
|
+
export * from './services/utils/tree.js';
|
|
36
|
+
export * from './types/types.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getCookie, setCookie } from 'cookies-next';
|
|
2
|
-
import { isAdminUserQuery } from '../../apollo/access';
|
|
3
|
-
import { UsersService } from '../users/user-service';
|
|
2
|
+
import { isAdminUserQuery } from '../../apollo/access.js';
|
|
3
|
+
import { UsersService } from '../users/user-service.js';
|
|
4
4
|
export class AccessService {
|
|
5
5
|
// Consts
|
|
6
6
|
clName = 'AccessService';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { UtilsService } from '../utils/service';
|
|
1
|
+
import { postToServerHeaders } from './request.js';
|
|
2
|
+
import { UtilsService } from '../utils/service.js';
|
|
4
3
|
export class RestApiService {
|
|
5
4
|
// localClientUrl: e.g. http://localhost:3001 (irrespective of the domain name)
|
|
6
5
|
localClientUrl;
|
|
@@ -49,7 +48,7 @@ export class RestApiService {
|
|
|
49
48
|
routeOnSuccess !== null) {
|
|
50
49
|
const utilsService = new UtilsService();
|
|
51
50
|
const baseUrl = utilsService.getBaseUrl(window.location.href);
|
|
52
|
-
|
|
51
|
+
window.location.href = `${baseUrl}${routeOnSuccess}`;
|
|
53
52
|
}
|
|
54
53
|
}
|
|
55
54
|
else {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getCookie, setCookie } from 'cookies-next';
|
|
2
|
-
import { getOrCreateSignedOutUserMutation, getOrCreateUserByEmailMutation, verifySignedInUserProfileIdQuery } from '../../apollo/users';
|
|
3
2
|
import { getSession } from 'next-auth/react';
|
|
3
|
+
import { getOrCreateSignedOutUserMutation, getOrCreateUserByEmailMutation, verifySignedInUserProfileIdQuery } from '../../apollo/users.js';
|
|
4
4
|
export class UsersService {
|
|
5
5
|
// Consts
|
|
6
6
|
clName = 'UsersService';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function timestampToDateTime(timestamp: number):
|
|
1
|
+
export declare function timestampToDateTime(timestamp: number): string;
|
package/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "serene-core-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"main": "./dist/src/index.js",
|
|
5
6
|
"types": "./dist/src/index.d.ts",
|
|
6
7
|
"exports": {
|
|
7
8
|
".": "./dist/src/index.js"
|
|
8
9
|
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
9
13
|
"dependencies": {
|
|
10
14
|
"@apollo/client": "^4.1.6",
|
|
11
15
|
"@auth/core": "^0.34.3",
|
|
@@ -18,7 +22,7 @@
|
|
|
18
22
|
"@types/node": "^22",
|
|
19
23
|
"@types/react": "^19",
|
|
20
24
|
"@types/react-dom": "^19",
|
|
21
|
-
"@types/react-syntax-highlighter": "^
|
|
25
|
+
"@types/react-syntax-highlighter": "^16.1.1",
|
|
22
26
|
"cookies-next": "^6.1.1",
|
|
23
27
|
"date-fns": "^4.1.0",
|
|
24
28
|
"next": "^16.1.6",
|
|
@@ -27,7 +31,7 @@
|
|
|
27
31
|
"react": "^19.2.4",
|
|
28
32
|
"react-dom": "^19.2.4",
|
|
29
33
|
"react-markdown": "10.1.0",
|
|
30
|
-
"react-syntax-highlighter": "^
|
|
34
|
+
"react-syntax-highlighter": "^16.1.1",
|
|
31
35
|
"typescript": "^5"
|
|
32
36
|
},
|
|
33
37
|
"devDependencies": {
|
package/src/apollo/access.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { gql } from '@apollo/client'
|
|
2
|
-
|
|
3
|
-
export const mailingListSignupMutation = gql`
|
|
4
|
-
mutation mailingListSignup(
|
|
5
|
-
$mailingListName: String!,
|
|
6
|
-
$email: String!,
|
|
7
|
-
$firstName: String)
|
|
8
|
-
{
|
|
9
|
-
mailingListSignup(
|
|
10
|
-
mailingListName: $mailingListName,
|
|
11
|
-
email: $email,
|
|
12
|
-
firstName: $firstName) {
|
|
13
|
-
|
|
14
|
-
verified
|
|
15
|
-
message
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
`
|
|
19
|
-
|
|
20
|
-
export const verifySignupMutation = gql`
|
|
21
|
-
mutation verifySignup(
|
|
22
|
-
$mailingListName: String!,
|
|
23
|
-
$email: String!,
|
|
24
|
-
$verifyCode: String)
|
|
25
|
-
{
|
|
26
|
-
verifySignup(
|
|
27
|
-
mailingListName: $mailingListName,
|
|
28
|
-
email: $email,
|
|
29
|
-
verifyCode: $verifyCode) {
|
|
30
|
-
|
|
31
|
-
verified
|
|
32
|
-
message
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
`
|
package/src/apollo/quotas.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { gql } from '@apollo/client'
|
|
2
|
-
|
|
3
|
-
export const getResourceQuotaUsageQuery = gql`
|
|
4
|
-
query getResourceQuotaUsage(
|
|
5
|
-
$userProfileId: String!,
|
|
6
|
-
$resource: String!,
|
|
7
|
-
$day: String,
|
|
8
|
-
$viewUserProfileId: String) {
|
|
9
|
-
getResourceQuotaUsage(
|
|
10
|
-
userProfileId: $userProfileId,
|
|
11
|
-
resource: $resource,
|
|
12
|
-
day: $day,
|
|
13
|
-
viewUserProfileId: $viewUserProfileId) {
|
|
14
|
-
|
|
15
|
-
userProfileId
|
|
16
|
-
resource
|
|
17
|
-
day
|
|
18
|
-
quota
|
|
19
|
-
usage
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
`
|
package/src/apollo/techs.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { gql } from '@apollo/client'
|
|
2
|
-
|
|
3
|
-
export const getTechsQuery = gql`
|
|
4
|
-
query getTechs(
|
|
5
|
-
$userProfileId: String!,
|
|
6
|
-
$resource: String!) {
|
|
7
|
-
getTechs(
|
|
8
|
-
userProfileId: $userProfileId,
|
|
9
|
-
resource: $resource) {
|
|
10
|
-
|
|
11
|
-
id
|
|
12
|
-
resource
|
|
13
|
-
variantName
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
`
|
package/src/apollo/tips.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { gql } from '@apollo/client'
|
|
2
|
-
|
|
3
|
-
export const getTipsByUserProfileIdAndTagsQuery = gql`
|
|
4
|
-
query getTipsByUserProfileIdAndTags(
|
|
5
|
-
$userProfileId: String!,
|
|
6
|
-
$tags: [String]) {
|
|
7
|
-
getTipsByUserProfileIdAndTags(
|
|
8
|
-
userProfileId: $userProfileId,
|
|
9
|
-
tags: $tags) {
|
|
10
|
-
|
|
11
|
-
status
|
|
12
|
-
message
|
|
13
|
-
tips {
|
|
14
|
-
id
|
|
15
|
-
name
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
`
|
|
20
|
-
|
|
21
|
-
export const tipGotItExistsQuery = gql`
|
|
22
|
-
query tipGotItExists(
|
|
23
|
-
$name: String!,
|
|
24
|
-
$userProfileId: String!) {
|
|
25
|
-
tipGotItExists(
|
|
26
|
-
name: $name,
|
|
27
|
-
userProfileId: $userProfileId) {
|
|
28
|
-
|
|
29
|
-
status
|
|
30
|
-
message
|
|
31
|
-
exists
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
`
|
|
35
|
-
|
|
36
|
-
export const upsertTipGotItMutation = gql`
|
|
37
|
-
mutation upsertTipGotIt(
|
|
38
|
-
$name: String!,
|
|
39
|
-
$userProfileId: String!) {
|
|
40
|
-
upsertTipGotIt(
|
|
41
|
-
name: $name,
|
|
42
|
-
userProfileId: $userProfileId) {
|
|
43
|
-
|
|
44
|
-
status
|
|
45
|
-
message
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
`
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { gql } from '@apollo/client'
|
|
2
|
-
|
|
3
|
-
export const getUserPreferencesQuery = gql`
|
|
4
|
-
query getUserPreferences(
|
|
5
|
-
$userProfileId: String!,
|
|
6
|
-
$category: String!,
|
|
7
|
-
$keys: [String]) {
|
|
8
|
-
getUserPreferences(
|
|
9
|
-
userProfileId: $userProfileId,
|
|
10
|
-
category: $category,
|
|
11
|
-
keys: $keys) {
|
|
12
|
-
category
|
|
13
|
-
key
|
|
14
|
-
value
|
|
15
|
-
values
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
`
|
|
19
|
-
|
|
20
|
-
export const upsertUserPreferenceMutation = gql`
|
|
21
|
-
mutation upsertUserPreference(
|
|
22
|
-
$userProfileId: String!,
|
|
23
|
-
$category: String!,
|
|
24
|
-
$key: String!,
|
|
25
|
-
$value: String,
|
|
26
|
-
$values: [String]) {
|
|
27
|
-
upsertUserPreference(
|
|
28
|
-
userProfileId: $userProfileId,
|
|
29
|
-
category: $category,
|
|
30
|
-
key: $key,
|
|
31
|
-
value: $value,
|
|
32
|
-
values: $values)
|
|
33
|
-
}
|
|
34
|
-
`
|
package/src/apollo/users.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { gql } from '@apollo/client'
|
|
2
|
-
|
|
3
|
-
export const createBlankUserMutation = gql`
|
|
4
|
-
mutation createBlankUser {
|
|
5
|
-
createBlankUser {
|
|
6
|
-
|
|
7
|
-
id
|
|
8
|
-
userId
|
|
9
|
-
isAdmin
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
`
|
|
13
|
-
|
|
14
|
-
export const createUserByEmailMutation = gql`
|
|
15
|
-
mutation createUserByEmail($email: String!) {
|
|
16
|
-
createUserByEmail(email: $email)
|
|
17
|
-
}
|
|
18
|
-
`
|
|
19
|
-
|
|
20
|
-
export const getOrCreateSignedOutUserMutation = gql`
|
|
21
|
-
mutation getOrCreateSignedOutUser(
|
|
22
|
-
$signedOutId: String,
|
|
23
|
-
$defaultUserPreferences: String) {
|
|
24
|
-
getOrCreateSignedOutUser(
|
|
25
|
-
signedOutId: $signedOutId,
|
|
26
|
-
defaultUserPreferences: $defaultUserPreferences) {
|
|
27
|
-
|
|
28
|
-
id
|
|
29
|
-
userId
|
|
30
|
-
isAdmin
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
`
|
|
34
|
-
|
|
35
|
-
export const getOrCreateUserByEmailMutation = gql`
|
|
36
|
-
mutation getOrCreateUserByEmail(
|
|
37
|
-
$email: String!,
|
|
38
|
-
$defaultUserPreferences: String) {
|
|
39
|
-
getOrCreateUserByEmail(
|
|
40
|
-
email: $email,
|
|
41
|
-
defaultUserPreferences: $defaultUserPreferences) {
|
|
42
|
-
|
|
43
|
-
id
|
|
44
|
-
userId
|
|
45
|
-
isAdmin
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
`
|
|
49
|
-
|
|
50
|
-
export const updateIFileCreatedByMutation = gql`
|
|
51
|
-
mutation updateIFileCreatedBy(
|
|
52
|
-
$id: String!,
|
|
53
|
-
$userId: String!,
|
|
54
|
-
$signedOutUserId: String!) {
|
|
55
|
-
updateIFileCreatedBy(
|
|
56
|
-
id: $id,
|
|
57
|
-
userId: $userId,
|
|
58
|
-
signedOutUserId: $signedOutUserId)
|
|
59
|
-
}
|
|
60
|
-
`
|
|
61
|
-
|
|
62
|
-
export const verifySignedInUserProfileIdQuery = gql`
|
|
63
|
-
query verifySignedInUserProfileId($userProfileId: String!) {
|
|
64
|
-
verifySignedInUserProfileId(userProfileId: $userProfileId)
|
|
65
|
-
}
|
|
66
|
-
`
|