@trackunit/serverside-utils 0.5.5 → 0.5.6
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/index.cjs.js +73 -43
- package/index.esm.js +73 -43
- package/migrations/entry.js.map +1 -0
- package/package.json +2 -1
- package/src/execute-public-query.d.ts +4 -0
- package/src/generated/graphql-api/fragment-masking.d.ts +19 -0
- package/src/generated/graphql-api/gql.d.ts +37 -0
- package/src/generated/graphql-api/graphql.d.ts +132 -0
- package/src/generated/graphql-api/index.d.ts +2 -0
package/index.cjs.js
CHANGED
|
@@ -58,6 +58,10 @@ const getErrorBody = async (response) => {
|
|
|
58
58
|
* The operation name is appended to the URL so each call stays attributable by
|
|
59
59
|
* its unique operation name when observed in GraphQL Hive.
|
|
60
60
|
*
|
|
61
|
+
* @deprecated Use `createTrackunitGraphqlClient` instead. It reads authentication from the Hono
|
|
62
|
+
* context, resolves the endpoint through {@link getGraphqlUrl}, and infers result and variable
|
|
63
|
+
* types from a generated `TypedDocumentNode`, so a hand-written query string and response schema
|
|
64
|
+
* are no longer needed.
|
|
61
65
|
* @template TData The shape of the validated `data` payload.
|
|
62
66
|
* @param props - The properties of the query execution.
|
|
63
67
|
* @param props.baseUrl - The base GraphQL URL, e.g. from {@link getGraphqlUrl}.
|
|
@@ -361,40 +365,71 @@ const getDatabricksAccessToken = async ({ context, databricksHost, databricksCli
|
|
|
361
365
|
};
|
|
362
366
|
};
|
|
363
367
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
368
|
+
const ServersideUtilsHasScopesUserPermissionsDocument = {
|
|
369
|
+
kind: "Document",
|
|
370
|
+
definitions: [
|
|
371
|
+
{
|
|
372
|
+
kind: "OperationDefinition",
|
|
373
|
+
operation: "query",
|
|
374
|
+
name: { kind: "Name", value: "ServersideUtilsHasScopesUserPermissions" },
|
|
375
|
+
variableDefinitions: [
|
|
376
|
+
{
|
|
377
|
+
kind: "VariableDefinition",
|
|
378
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "securableIds" } },
|
|
379
|
+
type: {
|
|
380
|
+
kind: "NonNullType",
|
|
381
|
+
type: {
|
|
382
|
+
kind: "ListType",
|
|
383
|
+
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "ID" } } },
|
|
384
|
+
},
|
|
385
|
+
},
|
|
386
|
+
},
|
|
387
|
+
],
|
|
388
|
+
selectionSet: {
|
|
389
|
+
kind: "SelectionSet",
|
|
390
|
+
selections: [
|
|
391
|
+
{
|
|
392
|
+
kind: "Field",
|
|
393
|
+
name: { kind: "Name", value: "userCurrent" },
|
|
394
|
+
selectionSet: {
|
|
395
|
+
kind: "SelectionSet",
|
|
396
|
+
selections: [
|
|
397
|
+
{
|
|
398
|
+
kind: "Field",
|
|
399
|
+
name: { kind: "Name", value: "user" },
|
|
400
|
+
selectionSet: {
|
|
401
|
+
kind: "SelectionSet",
|
|
402
|
+
selections: [
|
|
403
|
+
{
|
|
404
|
+
kind: "Field",
|
|
405
|
+
name: { kind: "Name", value: "permissions" },
|
|
406
|
+
arguments: [
|
|
407
|
+
{
|
|
408
|
+
kind: "Argument",
|
|
409
|
+
name: { kind: "Name", value: "securableIds" },
|
|
410
|
+
value: { kind: "Variable", name: { kind: "Name", value: "securableIds" } },
|
|
411
|
+
},
|
|
412
|
+
],
|
|
413
|
+
selectionSet: {
|
|
414
|
+
kind: "SelectionSet",
|
|
415
|
+
selections: [
|
|
416
|
+
{ kind: "Field", name: { kind: "Name", value: "securableId" } },
|
|
417
|
+
{ kind: "Field", name: { kind: "Name", value: "permissions" } },
|
|
418
|
+
],
|
|
419
|
+
},
|
|
420
|
+
},
|
|
421
|
+
],
|
|
422
|
+
},
|
|
423
|
+
},
|
|
424
|
+
],
|
|
425
|
+
},
|
|
426
|
+
},
|
|
427
|
+
],
|
|
428
|
+
},
|
|
429
|
+
},
|
|
430
|
+
],
|
|
431
|
+
};
|
|
432
|
+
|
|
398
433
|
/**
|
|
399
434
|
* The only scope prefix currently supported. Scopes are configured by the
|
|
400
435
|
* developer in the Iris app manifest and follow the `<securable>.<...>` shape
|
|
@@ -403,14 +438,10 @@ const UserPermissionsDataSchema = zod.z.object({
|
|
|
403
438
|
*/
|
|
404
439
|
const SUPPORTED_SCOPE_PREFIX = "account";
|
|
405
440
|
const getScopePrefix = (scope) => scope.split(".")[0] ?? "";
|
|
406
|
-
const getCurrentUserAccountPermissions = async ({
|
|
407
|
-
const data = await
|
|
408
|
-
|
|
409
|
-
userToken,
|
|
410
|
-
operationName: USER_PERMISSIONS_OPERATION_NAME,
|
|
411
|
-
query: USER_PERMISSIONS_QUERY,
|
|
441
|
+
const getCurrentUserAccountPermissions = async ({ context, accountId, }) => {
|
|
442
|
+
const data = await createTrackunitGraphqlClient({ context }).request({
|
|
443
|
+
document: ServersideUtilsHasScopesUserPermissionsDocument,
|
|
412
444
|
variables: { securableIds: [accountId] },
|
|
413
|
-
dataSchema: UserPermissionsDataSchema,
|
|
414
445
|
});
|
|
415
446
|
return (data.userCurrent?.user?.permissions ?? [])
|
|
416
447
|
.flatMap(securablePermission => securablePermission?.permissions ?? [])
|
|
@@ -455,8 +486,7 @@ const hasScopes = async ({ context, scopes }) => {
|
|
|
455
486
|
throw new Error(`Unsupported scope "${unsupportedScope}": only "${SUPPORTED_SCOPE_PREFIX}" scopes are currently supported`);
|
|
456
487
|
}
|
|
457
488
|
const { accountId } = getAccountId({ context });
|
|
458
|
-
const
|
|
459
|
-
const grantedScopes = await getCurrentUserAccountPermissions({ baseUrl, userToken, accountId });
|
|
489
|
+
const grantedScopes = await getCurrentUserAccountPermissions({ context, accountId });
|
|
460
490
|
return scopes.every(scope => grantedScopes.includes(scope));
|
|
461
491
|
};
|
|
462
492
|
|
package/index.esm.js
CHANGED
|
@@ -56,6 +56,10 @@ const getErrorBody = async (response) => {
|
|
|
56
56
|
* The operation name is appended to the URL so each call stays attributable by
|
|
57
57
|
* its unique operation name when observed in GraphQL Hive.
|
|
58
58
|
*
|
|
59
|
+
* @deprecated Use `createTrackunitGraphqlClient` instead. It reads authentication from the Hono
|
|
60
|
+
* context, resolves the endpoint through {@link getGraphqlUrl}, and infers result and variable
|
|
61
|
+
* types from a generated `TypedDocumentNode`, so a hand-written query string and response schema
|
|
62
|
+
* are no longer needed.
|
|
59
63
|
* @template TData The shape of the validated `data` payload.
|
|
60
64
|
* @param props - The properties of the query execution.
|
|
61
65
|
* @param props.baseUrl - The base GraphQL URL, e.g. from {@link getGraphqlUrl}.
|
|
@@ -359,40 +363,71 @@ const getDatabricksAccessToken = async ({ context, databricksHost, databricksCli
|
|
|
359
363
|
};
|
|
360
364
|
};
|
|
361
365
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
366
|
+
const ServersideUtilsHasScopesUserPermissionsDocument = {
|
|
367
|
+
kind: "Document",
|
|
368
|
+
definitions: [
|
|
369
|
+
{
|
|
370
|
+
kind: "OperationDefinition",
|
|
371
|
+
operation: "query",
|
|
372
|
+
name: { kind: "Name", value: "ServersideUtilsHasScopesUserPermissions" },
|
|
373
|
+
variableDefinitions: [
|
|
374
|
+
{
|
|
375
|
+
kind: "VariableDefinition",
|
|
376
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "securableIds" } },
|
|
377
|
+
type: {
|
|
378
|
+
kind: "NonNullType",
|
|
379
|
+
type: {
|
|
380
|
+
kind: "ListType",
|
|
381
|
+
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "ID" } } },
|
|
382
|
+
},
|
|
383
|
+
},
|
|
384
|
+
},
|
|
385
|
+
],
|
|
386
|
+
selectionSet: {
|
|
387
|
+
kind: "SelectionSet",
|
|
388
|
+
selections: [
|
|
389
|
+
{
|
|
390
|
+
kind: "Field",
|
|
391
|
+
name: { kind: "Name", value: "userCurrent" },
|
|
392
|
+
selectionSet: {
|
|
393
|
+
kind: "SelectionSet",
|
|
394
|
+
selections: [
|
|
395
|
+
{
|
|
396
|
+
kind: "Field",
|
|
397
|
+
name: { kind: "Name", value: "user" },
|
|
398
|
+
selectionSet: {
|
|
399
|
+
kind: "SelectionSet",
|
|
400
|
+
selections: [
|
|
401
|
+
{
|
|
402
|
+
kind: "Field",
|
|
403
|
+
name: { kind: "Name", value: "permissions" },
|
|
404
|
+
arguments: [
|
|
405
|
+
{
|
|
406
|
+
kind: "Argument",
|
|
407
|
+
name: { kind: "Name", value: "securableIds" },
|
|
408
|
+
value: { kind: "Variable", name: { kind: "Name", value: "securableIds" } },
|
|
409
|
+
},
|
|
410
|
+
],
|
|
411
|
+
selectionSet: {
|
|
412
|
+
kind: "SelectionSet",
|
|
413
|
+
selections: [
|
|
414
|
+
{ kind: "Field", name: { kind: "Name", value: "securableId" } },
|
|
415
|
+
{ kind: "Field", name: { kind: "Name", value: "permissions" } },
|
|
416
|
+
],
|
|
417
|
+
},
|
|
418
|
+
},
|
|
419
|
+
],
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
],
|
|
423
|
+
},
|
|
424
|
+
},
|
|
425
|
+
],
|
|
426
|
+
},
|
|
427
|
+
},
|
|
428
|
+
],
|
|
429
|
+
};
|
|
430
|
+
|
|
396
431
|
/**
|
|
397
432
|
* The only scope prefix currently supported. Scopes are configured by the
|
|
398
433
|
* developer in the Iris app manifest and follow the `<securable>.<...>` shape
|
|
@@ -401,14 +436,10 @@ const UserPermissionsDataSchema = z.object({
|
|
|
401
436
|
*/
|
|
402
437
|
const SUPPORTED_SCOPE_PREFIX = "account";
|
|
403
438
|
const getScopePrefix = (scope) => scope.split(".")[0] ?? "";
|
|
404
|
-
const getCurrentUserAccountPermissions = async ({
|
|
405
|
-
const data = await
|
|
406
|
-
|
|
407
|
-
userToken,
|
|
408
|
-
operationName: USER_PERMISSIONS_OPERATION_NAME,
|
|
409
|
-
query: USER_PERMISSIONS_QUERY,
|
|
439
|
+
const getCurrentUserAccountPermissions = async ({ context, accountId, }) => {
|
|
440
|
+
const data = await createTrackunitGraphqlClient({ context }).request({
|
|
441
|
+
document: ServersideUtilsHasScopesUserPermissionsDocument,
|
|
410
442
|
variables: { securableIds: [accountId] },
|
|
411
|
-
dataSchema: UserPermissionsDataSchema,
|
|
412
443
|
});
|
|
413
444
|
return (data.userCurrent?.user?.permissions ?? [])
|
|
414
445
|
.flatMap(securablePermission => securablePermission?.permissions ?? [])
|
|
@@ -453,8 +484,7 @@ const hasScopes = async ({ context, scopes }) => {
|
|
|
453
484
|
throw new Error(`Unsupported scope "${unsupportedScope}": only "${SUPPORTED_SCOPE_PREFIX}" scopes are currently supported`);
|
|
454
485
|
}
|
|
455
486
|
const { accountId } = getAccountId({ context });
|
|
456
|
-
const
|
|
457
|
-
const grantedScopes = await getCurrentUserAccountPermissions({ baseUrl, userToken, accountId });
|
|
487
|
+
const grantedScopes = await getCurrentUserAccountPermissions({ context, accountId });
|
|
458
488
|
return scopes.every(scope => grantedScopes.includes(scope));
|
|
459
489
|
};
|
|
460
490
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry.js","sourceRoot":"","sources":["../../../../../libs/iris-app-sdk/serverside-utils/migrations/entry.ts"],"names":[],"mappings":"","sourcesContent":["export {};\n"]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/serverside-utils",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=24.x"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
+
"@graphql-typed-document-node/core": "^3.2.0",
|
|
10
11
|
"@trackunit/server-graphql-client": "0.0.6",
|
|
11
12
|
"jwt-decode": "^3.1.2",
|
|
12
13
|
"zod": "^3.25.76"
|
|
@@ -33,6 +33,10 @@ export type ExecutePublicQueryProps<TData> = {
|
|
|
33
33
|
* The operation name is appended to the URL so each call stays attributable by
|
|
34
34
|
* its unique operation name when observed in GraphQL Hive.
|
|
35
35
|
*
|
|
36
|
+
* @deprecated Use `createTrackunitGraphqlClient` instead. It reads authentication from the Hono
|
|
37
|
+
* context, resolves the endpoint through {@link getGraphqlUrl}, and infers result and variable
|
|
38
|
+
* types from a generated `TypedDocumentNode`, so a hand-written query string and response schema
|
|
39
|
+
* are no longer needed.
|
|
36
40
|
* @template TData The shape of the validated `data` payload.
|
|
37
41
|
* @param props - The properties of the query execution.
|
|
38
42
|
* @param props.baseUrl - The base GraphQL URL, e.g. from {@link getGraphqlUrl}.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
2
|
+
import { Incremental } from './graphql';
|
|
3
|
+
export type FragmentType<TDocumentType extends DocumentTypeDecoration<any, any>> = TDocumentType extends DocumentTypeDecoration<infer TType, any> ? [TType] extends [{
|
|
4
|
+
' $fragmentName'?: infer TKey;
|
|
5
|
+
}] ? TKey extends string ? {
|
|
6
|
+
' $fragmentRefs'?: {
|
|
7
|
+
[key in TKey]: TType;
|
|
8
|
+
};
|
|
9
|
+
} : never : never : never;
|
|
10
|
+
export declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>): TType;
|
|
11
|
+
export declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | undefined): TType | undefined;
|
|
12
|
+
export declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null): TType | null;
|
|
13
|
+
export declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null | undefined): TType | null | undefined;
|
|
14
|
+
export declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>>): Array<TType>;
|
|
15
|
+
export declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined): Array<TType> | null | undefined;
|
|
16
|
+
export declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>): ReadonlyArray<TType>;
|
|
17
|
+
export declare function getFragmentData<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined): ReadonlyArray<TType> | null | undefined;
|
|
18
|
+
export declare function makeFragmentData<F extends DocumentTypeDecoration<any, any>, FT extends ResultOf<F>>(data: FT, _fragment: F): FragmentType<F>;
|
|
19
|
+
export declare function isFragmentReady<TQuery, TFrag>(queryNode: DocumentTypeDecoration<TQuery, any>, fragmentNode: TypedDocumentNode<TFrag>, data: FragmentType<TypedDocumentNode<Incremental<TFrag>, any>> | null | undefined): data is FragmentType<typeof fragmentNode>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as types from './graphql';
|
|
2
|
+
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
|
|
3
|
+
/**
|
|
4
|
+
* Map of all GraphQL operations in the project.
|
|
5
|
+
*
|
|
6
|
+
* This map has several performance disadvantages:
|
|
7
|
+
* 1. It is not tree-shakeable, so it will include all operations in the project.
|
|
8
|
+
* 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.
|
|
9
|
+
* 3. It does not support dead code elimination, so it will add unused operations.
|
|
10
|
+
*
|
|
11
|
+
* Therefore it is highly recommended to use the babel or swc plugin for production.
|
|
12
|
+
* Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size
|
|
13
|
+
*/
|
|
14
|
+
declare const documents: {
|
|
15
|
+
"query ServersideUtilsHasScopesUserPermissions($securableIds: [ID!]!) {\n userCurrent {\n user {\n permissions(securableIds: $securableIds) {\n securableId\n permissions\n }\n }\n }\n}": DocumentNode<types.ServersideUtilsHasScopesUserPermissionsQuery, types.Exact<{
|
|
16
|
+
securableIds: Array<types.Scalars["ID"]["input"]> | types.Scalars["ID"]["input"];
|
|
17
|
+
}>>;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`);
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* The query argument is unknown!
|
|
29
|
+
* Please regenerate the types.
|
|
30
|
+
*/
|
|
31
|
+
export declare function graphql(source: string): unknown;
|
|
32
|
+
/**
|
|
33
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
34
|
+
*/
|
|
35
|
+
export declare function graphql(source: "query ServersideUtilsHasScopesUserPermissions($securableIds: [ID!]!) {\n userCurrent {\n user {\n permissions(securableIds: $securableIds) {\n securableId\n permissions\n }\n }\n }\n}"): (typeof documents)["query ServersideUtilsHasScopesUserPermissions($securableIds: [ID!]!) {\n userCurrent {\n user {\n permissions(securableIds: $securableIds) {\n securableId\n permissions\n }\n }\n }\n}"];
|
|
36
|
+
export type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode<infer TType, any> ? TType : never;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { TypedDocumentNode as DocumentNode } from "@graphql-typed-document-node/core";
|
|
2
|
+
export type Maybe<T> = T | null;
|
|
3
|
+
export type InputMaybe<T> = Maybe<T> | undefined;
|
|
4
|
+
export type Exact<T extends {
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
}> = {
|
|
7
|
+
[K in keyof T]: T[K];
|
|
8
|
+
};
|
|
9
|
+
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
|
10
|
+
[SubKey in K]?: Maybe<T[SubKey]>;
|
|
11
|
+
};
|
|
12
|
+
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
|
|
13
|
+
[SubKey in K]: Maybe<T[SubKey]>;
|
|
14
|
+
};
|
|
15
|
+
export type MakeEmpty<T extends {
|
|
16
|
+
[key: string]: unknown;
|
|
17
|
+
}, K extends keyof T> = {
|
|
18
|
+
[_ in K]?: never;
|
|
19
|
+
};
|
|
20
|
+
export type Incremental<T> = T | {
|
|
21
|
+
[P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never;
|
|
22
|
+
};
|
|
23
|
+
export type DateTimeISOString = string;
|
|
24
|
+
/** All built-in and custom scalars, mapped to their actual values */
|
|
25
|
+
export type Scalars = {
|
|
26
|
+
ID: {
|
|
27
|
+
input: string;
|
|
28
|
+
output: string;
|
|
29
|
+
};
|
|
30
|
+
String: {
|
|
31
|
+
input: string;
|
|
32
|
+
output: string;
|
|
33
|
+
};
|
|
34
|
+
Boolean: {
|
|
35
|
+
input: boolean;
|
|
36
|
+
output: boolean;
|
|
37
|
+
};
|
|
38
|
+
Int: {
|
|
39
|
+
input: number;
|
|
40
|
+
output: number;
|
|
41
|
+
};
|
|
42
|
+
Float: {
|
|
43
|
+
input: number;
|
|
44
|
+
output: number;
|
|
45
|
+
};
|
|
46
|
+
/** The ISO 4217 currency code of the monetary field definition. */
|
|
47
|
+
Currency: {
|
|
48
|
+
input: string;
|
|
49
|
+
output: string;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Cursor scalar type used for pagination
|
|
53
|
+
* Represents an opaque cursor string
|
|
54
|
+
*/
|
|
55
|
+
Cursor: {
|
|
56
|
+
input: string;
|
|
57
|
+
output: string;
|
|
58
|
+
};
|
|
59
|
+
/** Date scalar */
|
|
60
|
+
Date: {
|
|
61
|
+
input: DateTimeISOString;
|
|
62
|
+
output: DateTimeISOString;
|
|
63
|
+
};
|
|
64
|
+
/** DateTime scalar */
|
|
65
|
+
DateTime: {
|
|
66
|
+
input: DateTimeISOString;
|
|
67
|
+
output: DateTimeISOString;
|
|
68
|
+
};
|
|
69
|
+
/** Duration represents an ISO 8601 duration */
|
|
70
|
+
Duration: {
|
|
71
|
+
input: any;
|
|
72
|
+
output: any;
|
|
73
|
+
};
|
|
74
|
+
/** Valid email address according to https://owasp.org/www-community/OWASP_Validation_Regex_Repository */
|
|
75
|
+
EmailAddress: {
|
|
76
|
+
input: string;
|
|
77
|
+
output: string;
|
|
78
|
+
};
|
|
79
|
+
/** A (possiblely multidimensional) set of coordinates following x, y, z order. */
|
|
80
|
+
GeoJSONCoordinates: {
|
|
81
|
+
input: [number, number] | [number, number][] | [number, number][][];
|
|
82
|
+
output: [number, number] | [number, number][] | [number, number][][];
|
|
83
|
+
};
|
|
84
|
+
/** The `JSON` scalar type represents JSON values */
|
|
85
|
+
JSON: {
|
|
86
|
+
input: any;
|
|
87
|
+
output: any;
|
|
88
|
+
};
|
|
89
|
+
/** 24-hour clock time string in the format hh:mm:ss.sss or hh:mm:ss if partial seconds is zero */
|
|
90
|
+
LocalTime: {
|
|
91
|
+
input: any;
|
|
92
|
+
output: any;
|
|
93
|
+
};
|
|
94
|
+
/** Javascript `Long`. Type represents a 64 bit integer. */
|
|
95
|
+
Long: {
|
|
96
|
+
input: any;
|
|
97
|
+
output: any;
|
|
98
|
+
};
|
|
99
|
+
/** Phone number in E.164 format */
|
|
100
|
+
PhoneNumber: {
|
|
101
|
+
input: string;
|
|
102
|
+
output: string;
|
|
103
|
+
};
|
|
104
|
+
/** Uniform resource locator */
|
|
105
|
+
Url: {
|
|
106
|
+
input: string;
|
|
107
|
+
output: string;
|
|
108
|
+
};
|
|
109
|
+
/** YearMonth scalar */
|
|
110
|
+
YearMonth: {
|
|
111
|
+
input: any;
|
|
112
|
+
output: any;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
export type ServersideUtilsHasScopesUserPermissionsQueryVariables = Exact<{
|
|
116
|
+
securableIds: Array<Scalars["ID"]["input"]> | Scalars["ID"]["input"];
|
|
117
|
+
}>;
|
|
118
|
+
export type ServersideUtilsHasScopesUserPermissionsQuery = {
|
|
119
|
+
__typename?: "Query";
|
|
120
|
+
userCurrent: {
|
|
121
|
+
__typename?: "CurrentUser";
|
|
122
|
+
user: {
|
|
123
|
+
__typename?: "User";
|
|
124
|
+
permissions: Array<{
|
|
125
|
+
__typename?: "SecurablePermission";
|
|
126
|
+
securableId: string;
|
|
127
|
+
permissions: Array<string | null>;
|
|
128
|
+
} | null> | null;
|
|
129
|
+
} | null;
|
|
130
|
+
} | null;
|
|
131
|
+
};
|
|
132
|
+
export declare const ServersideUtilsHasScopesUserPermissionsDocument: DocumentNode<ServersideUtilsHasScopesUserPermissionsQuery, ServersideUtilsHasScopesUserPermissionsQueryVariables>;
|