@opengis/fcore 0.0.1-beta.5 → 0.0.1-beta.7
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/config.js +1 -1
- package/dist/context.js +1 -1
- package/dist/errors.js +1 -1
- package/dist/fastify.d.ts +2 -1
- package/dist/fastify.d.ts.map +1 -1
- package/dist/fastify.js +1 -1
- package/dist/fcore.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/migrations/cli.js +1 -1
- package/dist/migrations/runner.js +1 -1
- package/dist/modules/auth/adduser-cli.js +1 -1
- package/dist/modules/auth/passwd-cli.js +1 -1
- package/dist/modules/auth/permission-cli.js +1 -1
- package/dist/modules/auth/route.d.ts.map +1 -1
- package/dist/modules/auth/route.js +1 -1
- package/dist/modules/auth/schema.d.ts +3 -0
- package/dist/modules/auth/schema.d.ts.map +1 -1
- package/dist/modules/auth/schema.js +1 -1
- package/dist/modules/auth/services/change-password.js +1 -1
- package/dist/modules/auth/services/get-current-user.d.ts +1 -0
- package/dist/modules/auth/services/get-current-user.d.ts.map +1 -1
- package/dist/modules/auth/services/get-current-user.js +1 -1
- package/dist/modules/auth/services/registration.js +1 -1
- package/dist/modules/auth/services/verify-two-factor.js +1 -1
- package/dist/modules/file/mime.d.ts +3 -0
- package/dist/modules/file/mime.d.ts.map +1 -0
- package/dist/modules/file/mime.js +1 -0
- package/dist/modules/file/route.d.ts.map +1 -1
- package/dist/modules/file/route.js +1 -1
- package/dist/modules/file/schema.d.ts +3 -0
- package/dist/modules/file/schema.d.ts.map +1 -1
- package/dist/modules/file/schema.js +1 -1
- package/dist/modules/file/services/get-file.js +1 -1
- package/dist/modules/file/services/resize-file.d.ts.map +1 -1
- package/dist/modules/file/services/resize-file.js +1 -1
- package/dist/modules/file/services/upload-file.d.ts +4 -6
- package/dist/modules/file/services/upload-file.d.ts.map +1 -1
- package/dist/modules/file/services/upload-file.js +1 -1
- package/dist/modules/resource/route.d.ts +0 -3
- package/dist/modules/resource/route.d.ts.map +1 -1
- package/dist/modules/resource/route.js +1 -1
- package/dist/modules/resource/schema.d.ts +3 -0
- package/dist/modules/resource/schema.d.ts.map +1 -1
- package/dist/modules/resource/schema.js +1 -1
- package/dist/modules/resource/services/add-note.js +1 -1
- package/dist/modules/resource/services/add-resource-file.js +1 -1
- package/dist/modules/resource/services/create-resource-relation.js +1 -1
- package/dist/modules/resource/services/create-resource.js +1 -1
- package/dist/modules/resource/services/delete-resource-relation.js +1 -1
- package/dist/modules/resource/services/delete-resource.js +1 -1
- package/dist/modules/resource/services/export-resource.d.ts.map +1 -1
- package/dist/modules/resource/services/export-resource.js +1 -1
- package/dist/modules/resource/services/get-resource.d.ts.map +1 -1
- package/dist/modules/resource/services/get-resource.js +1 -1
- package/dist/modules/resource/services/list-resource-relation.d.ts +2 -0
- package/dist/modules/resource/services/list-resource-relation.d.ts.map +1 -1
- package/dist/modules/resource/services/list-resource-relation.js +1 -1
- package/dist/modules/resource/services/list-resources.d.ts.map +1 -1
- package/dist/modules/resource/services/list-resources.js +1 -1
- package/dist/modules/resource/services/search-resource.d.ts.map +1 -1
- package/dist/modules/resource/services/search-resource.js +1 -1
- package/dist/modules/resource/services/suggest-resource.d.ts.map +1 -1
- package/dist/modules/resource/services/suggest-resource.js +1 -1
- package/dist/modules/resource/services/update-resource-relation.d.ts +10 -0
- package/dist/modules/resource/services/update-resource-relation.d.ts.map +1 -0
- package/dist/modules/resource/services/update-resource-relation.js +1 -0
- package/dist/modules/resource/services/update-resource.js +1 -1
- package/dist/modules/resource/services/upload-resource-file.js +1 -1
- package/dist/modules/system/route.d.ts.map +1 -1
- package/dist/modules/system/route.js +1 -1
- package/dist/modules/system/schema.js +1 -1
- package/dist/modules/system/services/check-system.d.ts.map +1 -1
- package/dist/modules/system/services/check-system.js +1 -1
- package/dist/modules/system/services/get-access.d.ts.map +1 -1
- package/dist/modules/system/services/get-access.js +1 -1
- package/dist/modules/system/services/get-api-list.d.ts.map +1 -1
- package/dist/modules/system/services/get-api-list.js +1 -1
- package/dist/modules/system/services/get-audit-log.d.ts.map +1 -1
- package/dist/modules/system/services/get-audit-log.js +1 -1
- package/dist/modules/system/services/get-dictionary.js +1 -1
- package/dist/modules/system/services/get-system-log.d.ts.map +1 -1
- package/dist/modules/system/services/get-system-log.js +1 -1
- package/dist/modules/system/services/get-system-settings.d.ts.map +1 -1
- package/dist/modules/system/services/get-system-settings.js +1 -1
- package/dist/modules/system/services/list-dictionaries.js +1 -1
- package/dist/modules/system/services/set-access.d.ts.map +1 -1
- package/dist/modules/system/services/set-access.js +1 -1
- package/dist/modules/system/services/update-dictionary.d.ts.map +1 -1
- package/dist/modules/system/services/update-dictionary.js +1 -1
- package/dist/modules/system/services/update-system-settings.d.ts.map +1 -1
- package/dist/modules/system/services/update-system-settings.js +1 -1
- package/dist/modules/utils/require-admin.js +1 -1
- package/dist/modules/utils/safe-user.js +1 -1
- package/dist/modules/utils/unsupported.js +1 -1
- package/dist/plugins/audit/audit.js +1 -1
- package/dist/plugins/audit/index.js +1 -1
- package/dist/plugins/audit/services/write-audit.js +1 -1
- package/dist/plugins/auth/get-user-permissions.js +1 -1
- package/dist/plugins/auth/index.js +1 -1
- package/dist/plugins/auth/verifyUser.js +1 -1
- package/dist/plugins/dictionary.d.ts +3 -0
- package/dist/plugins/dictionary.d.ts.map +1 -1
- package/dist/plugins/dictionary.js +1 -1
- package/dist/plugins/file.d.ts +3 -6
- package/dist/plugins/file.d.ts.map +1 -1
- package/dist/plugins/file.js +1 -1
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/plugins/jwt.d.ts +4 -0
- package/dist/plugins/jwt.d.ts.map +1 -0
- package/dist/plugins/jwt.js +1 -0
- package/dist/plugins/logger/index.js +1 -1
- package/dist/plugins/logger/transport.js +1 -1
- package/dist/plugins/pg.d.ts.map +1 -1
- package/dist/plugins/pg.js +1 -1
- package/dist/plugins/redis.js +1 -1
- package/dist/plugins/resource/index.js +1 -1
- package/dist/plugins/resource/resource.d.ts.map +1 -1
- package/dist/plugins/resource/resource.js +1 -1
- package/dist/plugins/resource/resource.registry.js +1 -1
- package/dist/plugins/resource/resource.types.d.ts +18 -3
- package/dist/plugins/resource/resource.types.d.ts.map +1 -1
- package/dist/plugins/resource/services/add-dictionary-lookup-data.d.ts +3 -0
- package/dist/plugins/resource/services/add-dictionary-lookup-data.d.ts.map +1 -0
- package/dist/plugins/resource/services/add-dictionary-lookup-data.js +1 -0
- package/dist/plugins/resource/services/add-file-token.d.ts +3 -0
- package/dist/plugins/resource/services/add-file-token.d.ts.map +1 -0
- package/dist/plugins/resource/services/add-file-token.js +1 -0
- package/dist/plugins/resource/services/add-table-lookup-data.d.ts +4 -0
- package/dist/plugins/resource/services/add-table-lookup-data.d.ts.map +1 -0
- package/dist/plugins/resource/services/add-table-lookup-data.js +1 -0
- package/dist/plugins/resource/services/create-relation.js +1 -1
- package/dist/plugins/resource/services/create.d.ts.map +1 -1
- package/dist/plugins/resource/services/create.js +1 -1
- package/dist/plugins/resource/services/delete-relation.js +1 -1
- package/dist/plugins/resource/services/delete.d.ts.map +1 -1
- package/dist/plugins/resource/services/delete.js +1 -1
- package/dist/plugins/resource/services/find-one.d.ts +3 -2
- package/dist/plugins/resource/services/find-one.d.ts.map +1 -1
- package/dist/plugins/resource/services/find-one.js +1 -1
- package/dist/plugins/resource/services/find-relation.d.ts +3 -2
- package/dist/plugins/resource/services/find-relation.d.ts.map +1 -1
- package/dist/plugins/resource/services/find-relation.js +1 -1
- package/dist/plugins/resource/services/find.d.ts.map +1 -1
- package/dist/plugins/resource/services/find.js +1 -1
- package/dist/plugins/resource/services/update-relation.d.ts +11 -0
- package/dist/plugins/resource/services/update-relation.d.ts.map +1 -0
- package/dist/plugins/resource/services/update-relation.js +1 -0
- package/dist/plugins/resource/services/update.d.ts.map +1 -1
- package/dist/plugins/resource/services/update.js +1 -1
- package/dist/plugins/resource/utils/auto-index.d.ts +4 -0
- package/dist/plugins/resource/utils/auto-index.d.ts.map +1 -0
- package/dist/plugins/resource/utils/auto-index.js +1 -0
- package/dist/plugins/resource/utils/fields.js +1 -1
- package/dist/plugins/resource/utils/filters.d.ts +3 -2
- package/dist/plugins/resource/utils/filters.d.ts.map +1 -1
- package/dist/plugins/resource/utils/filters.js +1 -1
- package/dist/plugins/resource/utils/permissions.js +1 -1
- package/dist/plugins/resource/utils/sort.d.ts.map +1 -1
- package/dist/plugins/resource/utils/sort.js +1 -1
- package/dist/plugins/resource/utils/sql.js +1 -1
- package/dist/shared/getIP.js +1 -1
- package/migrations/20260905120000_add_user_foreign_keys.sql +42 -42
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function U(){const D=['width','height','fit','cover','logs','file','File\x20not\x20found','startsWith','image/','Only\x20image\x20files\x20can\x20be\x20resized','isInteger','\x20must\x20be\x20a\x20positive\x20integer'];U=function(){return D;};return U();}function z(C,N){C=C-0x6f;const r=U();let p=r[C];return p;}import{NotFoundError,ValidationError}from'../../../errors.js';import{fileTypeFromBuffer}from'file-type';import{createHash}from'node:crypto';import{mkdir,readFile,writeFile}from'node:fs/promises';import C from'node:path';import N from'sharp';export async function resizeFile(r,p){const t=z,c=r['pathOrToken']??r['path'];if(!c)throw new ValidationError('File\x20path\x20is\x20required');const x=parseDimension(r[t(0x6f)],t(0x6f))??0xc8,m=parseDimension(r[t(0x70)],'height'),Q=createHash('sha256')['update'](c+':'+x+':'+(m??'auto')+':'+(r[t(0x71)]??t(0x72)))['digest']('hex'),u=C['resolve'](t(0x73),'resize'),L=C['join'](u,Q+'.jpg');try{return await readFile(L);}catch(F){if(F['code']!=='ENOENT')throw F;}if(!await p[t(0x74)]['exists'](c))throw new NotFoundError(t(0x75));const T=await p[t(0x74)]['get'](c),Y=await fileTypeFromBuffer(T);if(!Y?.['mime'][t(0x76)](t(0x77)))throw new ValidationError(t(0x78));const f=await N(T)['resize']({'width':x,'height':m,'fit':r[t(0x71)]??'cover'})['toBuffer']();return await mkdir(u,{'recursive':!![]}),await writeFile(L,f),f;}function parseDimension(r,p){const h=z;if(r===undefined||r==='')return undefined;const c=Number(r);if(!Number[h(0x79)](c)||c<=0x0)throw new ValidationError(p+h(0x7a));return c;}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Implements the upload file application service for the File module.
|
|
3
|
-
*/
|
|
4
1
|
import type { AppContext, User } from "../../../context.js";
|
|
2
|
+
import type { MultipartFile } from "@fastify/multipart";
|
|
5
3
|
export interface UploadFileParams {
|
|
6
4
|
user?: User;
|
|
7
|
-
file:
|
|
5
|
+
file: MultipartFile;
|
|
8
6
|
metadata: {
|
|
9
7
|
name?: string;
|
|
10
8
|
path?: string;
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
resource?: string;
|
|
10
|
+
resourceId?: string;
|
|
13
11
|
};
|
|
14
12
|
}
|
|
15
13
|
export declare function uploadFile(params: UploadFileParams, ctx: AppContext): Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-file.d.ts","sourceRoot":"","sources":["../../../../src/modules/file/services/upload-file.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"upload-file.d.ts","sourceRoot":"","sources":["../../../../src/modules/file/services/upload-file.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,IAAI,EAAE,aAAa,CAAC;IACpB,QAAQ,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AACD,wBAAsB,UAAU,CAC9B,MAAM,EAAE,gBAAgB,EACxB,GAAG,EAAE,UAAU,GACd,OAAO,CAAC,GAAG,CAAC,CAqDd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function z(C,N){C=C-0x12a;const r=U();let p=r[C];return p;}import{fileTypeFromBuffer}from'file-type';import C from'../mime.js';import{randomUUID}from'node:crypto';function U(){const F=['metadata','replace','getFullYear','getDate','padStart','resourceId','file','put','\x0a\x20\x20\x20\x20\x20\x20\x20\x20INSERT\x20INTO\x20admin.files\x20(resource,\x20resource_id,\x20file_path,\x20file_type,\x20size,uploaded_name,file_name,ext,created_by)\x0a\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20($1,\x20$2,\x20$3,\x20$4,\x20$5,\x20$6,\x20$7,\x20$8,\x20$9)\x0a\x20\x20\x20\x20\x20\x20\x20\x20RETURNING\x20*\x0a\x20\x20\x20\x20\x20\x20','resource','name','split','pop'];U=function(){return F;};return U();}export async function uploadFile(N,r){const f=z,p=(N[f(0x12a)]['name']??randomUUID())[f(0x12b)](/[^a-zA-Z0-9._-]/g,'_'),c=new Date(),x=String(c[f(0x12c)]())['slice'](-0x2),m=String(c['getMonth']()+0x1)['padStart'](0x2,'0'),Q=String(c[f(0x12d)]())[f(0x12e)](0x2,'0'),u=N['metadata']['path']??(N['metadata']['resource']?N['metadata']['resource']+'/'+(N['metadata'][f(0x12f)]??randomUUID())+'/'+p:null)??'uploads/'+x+'/'+m+'-'+Q+'/'+p,L=await N['file']['toBuffer'](),T=await fileTypeFromBuffer(L);if(!C['has'](N[f(0x130)]['mimetype'])&&(T?.['mime']?!C['has'](T['mime']):!![]))throw new Error('Unsupported\x20file\x20type:\x20'+N[f(0x130)]['mimetype']);await r['file'][f(0x131)](u,L);const Y=await r['pg']['query'](f(0x132),[N[f(0x12a)][f(0x133)]??null,N['metadata']['resourceId']??null,u,N[f(0x130)]['mimetype'],N['file'][f(0x130)]['bytesRead'],N['metadata'][f(0x134)],p,N['file']['mimetype'][f(0x135)]('/')[f(0x136)]()??null,N['user']?.['id']??null]);return Y['rows'][0x0];}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Registers HTTP routes for this FCore module and delegates operations to application services.
|
|
3
|
-
*/
|
|
4
1
|
import type { FastifyPluginAsync } from "fastify";
|
|
5
2
|
import type { AppContext } from "../../context.js";
|
|
6
3
|
export declare function resourceRoutes(ctx: AppContext): FastifyPluginAsync;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../src/modules/resource/route.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../src/modules/resource/route.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAsBnD,wBAAgB,cAAc,CAAC,GAAG,EAAE,UAAU,GAAG,kBAAkB,CA+RlE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2f45f1=_0x22ab;(function(_0x9fe4fa,_0x397dd4){const _0x5567bc=_0x22ab,_0x391327=_0x9fe4fa();while(!![]){try{const _0x45f6ca=parseInt(_0x5567bc(0xff))/0x1*(-parseInt(_0x5567bc(0xd7))/0x2)+-parseInt(_0x5567bc(0x104))/0x3+-parseInt(_0x5567bc(0xc6))/0x4*(parseInt(_0x5567bc(0xec))/0x5)+parseInt(_0x5567bc(0x116))/0x6*(-parseInt(_0x5567bc(0x110))/0x7)+-parseInt(_0x5567bc(0xd2))/0x8*(parseInt(_0x5567bc(0xc9))/0x9)+parseInt(_0x5567bc(0x11a))/0xa*(parseInt(_0x5567bc(0xf3))/0xb)+parseInt(_0x5567bc(0xea))/0xc;if(_0x45f6ca===_0x397dd4)break;else _0x391327['push'](_0x391327['shift']());}catch(_0x11ed92){_0x391327['push'](_0x391327['shift']());}}}(_0x360f,0x38634));import{listResources}from'./services/list-resources.js';function _0x360f(){const _0x5daccd=['/api/resource/:resource/:id','49469QSyiQl','Returns\x20suggested\x20values\x20for\x20a\x20resource\x20field.','Deletes\x20a\x20record\x20from\x20a\x20registered\x20resource.','Puhsc','Returns\x20related\x20records\x20for\x20a\x20resource\x20record.','resourceField','258WLapeo','FDWaK','MlWQi','put','2870JWgyLu','OCvNQ','/api/resource/:resource/search','Upload\x20resource\x20file','rCXMi','mGGmI','List\x20resource\x20records','Returns\x20one\x20record\x20from\x20a\x20registered\x20resource.','hMIPa','iSrpG','Exports\x20readable\x20records\x20from\x20a\x20registered\x20resource.','params','resourceId','Get\x20resource\x20record','UYLId','get','184936DeUbwB','EiPsA','ijRyb','27YdqaTZ','/api/resource/:resource/:id/:relation','delete','QTBNU','IPRyu','/api/resource/:resource/export','/api/resource/:resource','Creates\x20a\x20record\x20in\x20a\x20registered\x20resource.','vQDCg','263688JGRwul','user','lILXP','Search\x20resource','Uploads\x20a\x20file\x20to\x20a\x20Resource\x20record\x20and\x20stores\x20its\x20metadata.','2VzDDXe','permissions','description','hWbmy','fDqQW','Creates\x20a\x20relation\x20for\x20a\x20resource\x20record.','*:read','/api/resource/:resource/:id/upload','Create\x20resource\x20record','Returns\x20records\x20from\x20a\x20registered\x20resource.','uploadResourceFile','aYiAR','Delete\x20resource\x20record','Searches\x20records\x20in\x20a\x20registered\x20resource.','bNIOq','Update\x20resource\x20record','Suggest\x20resource\x20values','resourceIdRelationId','exportResource','17242332xozFxJ','access','35hoagsj','fcore','schema','WBPxn','jxpkb','resourceIdRelation','/api/resource/:resource/:id/:relation/:relationId','4345hPtuKB','resource','uploadResourceFileBody','bRvnx','hQVRu','Create\x20resource\x20relation','tags','body','yXtTe','ZYMRf','resource:update','suggestQuery','296987rZaEkC','sqTrL','nOWYm','Deletes\x20a\x20relation\x20from\x20a\x20resource\x20record.','List\x20resource\x20relations','887619auafmR','summary','Delete\x20resource\x20relation','query','exportResourceQuery','/api/suggest/:resource/:field','Export\x20resource\x20records','vTucH','mQjnx','post','Updates\x20a\x20record\x20in\x20a\x20registered\x20resource.'];_0x360f=function(){return _0x5daccd;};return _0x360f();}import{getResource}from'./services/get-resource.js';import{createResource}from'./services/create-resource.js';import{updateResource}from'./services/update-resource.js';import{deleteResource}from'./services/delete-resource.js';import{listResourceRelation}from'./services/list-resource-relation.js';import{createResourceRelation}from'./services/create-resource-relation.js';import{deleteResourceRelation}from'./services/delete-resource-relation.js';import{searchResource}from'./services/search-resource.js';import{exportResource}from'./services/export-resource.js';import{suggestResource}from'./services/suggest-resource.js';function _0x22ab(_0x5f21fe,_0x386867){_0x5f21fe=_0x5f21fe-0xbe;const _0x360fb3=_0x360f();let _0x22ab9d=_0x360fb3[_0x5f21fe];return _0x22ab9d;}import{uploadResourceFile}from'./services/upload-resource-file.js';import{resourceSchemas}from'./schema.js';const user=_0x40dbfe=>_0x40dbfe[_0x2f45f1(0xd3)];export function resourceRoutes(_0x635041){const _0x3eeac0=_0x2f45f1,_0x3cb7e4={};_0x3cb7e4[_0x3eeac0(0xcd)]=_0x3eeac0(0x11c),_0x3cb7e4[_0x3eeac0(0xf6)]=_0x3eeac0(0xed),_0x3cb7e4[_0x3eeac0(0x11e)]=_0x3eeac0(0xf4),_0x3cb7e4[_0x3eeac0(0xc4)]=_0x3eeac0(0xd5),_0x3cb7e4[_0x3eeac0(0xbe)]=_0x3eeac0(0xe4),_0x3cb7e4[_0x3eeac0(0x10c)]=_0x3eeac0(0xd3),_0x3cb7e4[_0x3eeac0(0xe2)]=_0x3eeac0(0x109),_0x3cb7e4[_0x3eeac0(0x117)]=_0x3eeac0(0xe7),_0x3cb7e4[_0x3eeac0(0x10b)]=_0x3eeac0(0x111),_0x3cb7e4[_0x3eeac0(0xfb)]=_0x3eeac0(0xce),_0x3cb7e4[_0x3eeac0(0xbf)]=_0x3eeac0(0x10a),_0x3cb7e4[_0x3eeac0(0xef)]=_0x3eeac0(0xc0),_0x3cb7e4[_0x3eeac0(0xdb)]=_0x3eeac0(0xdd),_0x3cb7e4[_0x3eeac0(0xf0)]=_0x3eeac0(0xe0),_0x3cb7e4[_0x3eeac0(0xe5)]=_0x3eeac0(0xd0),_0x3cb7e4[_0x3eeac0(0x11b)]=_0x3eeac0(0x10f),_0x3cb7e4[_0x3eeac0(0xd1)]=_0x3eeac0(0xe6),_0x3cb7e4[_0x3eeac0(0xda)]=_0x3eeac0(0xe3),_0x3cb7e4[_0x3eeac0(0x100)]=_0x3eeac0(0x112),_0x3cb7e4[_0x3eeac0(0xc7)]=_0x3eeac0(0xde),_0x3cb7e4[_0x3eeac0(0xcc)]=_0x3eeac0(0x11d),_0x3cb7e4[_0x3eeac0(0xf7)]=_0x3eeac0(0xd6),_0x3cb7e4[_0x3eeac0(0x101)]=_0x3eeac0(0xfd),_0x3cb7e4[_0x3eeac0(0xd4)]=_0x3eeac0(0x103),_0x3cb7e4[_0x3eeac0(0xfc)]=_0x3eeac0(0x114),_0x3cb7e4[_0x3eeac0(0xc8)]=_0x3eeac0(0xdc),_0x3cb7e4[_0x3eeac0(0x11f)]=_0x3eeac0(0xf2),_0x3cb7e4[_0x3eeac0(0x118)]=_0x3eeac0(0x106),_0x3cb7e4[_0x3eeac0(0x113)]=_0x3eeac0(0x102);const _0x9c0b1d=_0x3cb7e4;return async _0xbf8b3e=>{const _0x55d241=_0x3eeac0;_0xbf8b3e[_0x55d241(0xc5)](_0x9c0b1d[_0x55d241(0xcd)],{'schema':{'tags':[_0x9c0b1d[_0x55d241(0xf6)],_0x9c0b1d[_0x55d241(0x11e)]],'summary':_0x9c0b1d[_0x55d241(0xc4)],'description':_0x9c0b1d[_0x55d241(0xbe)],'access':_0x9c0b1d[_0x55d241(0x10c)],'permissions':[],'params':resourceSchemas[_0x55d241(0xf4)]}},async _0xebbca6=>searchResource({..._0xebbca6[_0x55d241(0x107)],..._0xebbca6[_0x55d241(0xc1)],'user':user(_0xebbca6)},_0x635041)),_0xbf8b3e[_0x55d241(0xc5)](_0x9c0b1d[_0x55d241(0xe2)],{'schema':{'tags':[_0x9c0b1d[_0x55d241(0xf6)],_0x9c0b1d[_0x55d241(0x11e)]],'summary':_0x9c0b1d[_0x55d241(0x117)],'description':_0x9c0b1d[_0x55d241(0x10b)],'access':_0x9c0b1d[_0x55d241(0x10c)],'permissions':[],'params':resourceSchemas[_0x55d241(0x115)],'querystring':resourceSchemas[_0x55d241(0xfe)]}},async _0x2b26af=>suggestResource({..._0x2b26af[_0x55d241(0x107)],..._0x2b26af[_0x55d241(0xc1)],'user':user(_0x2b26af)},_0x635041)),_0xbf8b3e[_0x55d241(0xc5)](_0x9c0b1d[_0x55d241(0xfb)],{'schema':{'tags':[_0x55d241(0xed),_0x9c0b1d[_0x55d241(0x11e)]],'summary':_0x9c0b1d[_0x55d241(0xbf)],'description':_0x9c0b1d[_0x55d241(0xef)],'access':_0x9c0b1d[_0x55d241(0x10c)],'permissions':[_0x9c0b1d[_0x55d241(0xdb)]],'params':resourceSchemas[_0x55d241(0xe9)],'querystring':resourceSchemas[_0x55d241(0x108)]}},async _0x1f92fd=>exportResource({..._0x1f92fd[_0x55d241(0x107)],..._0x1f92fd[_0x55d241(0xc1)],'user':user(_0x1f92fd)},_0x635041));const _0x252b3c={};_0x252b3c[_0x55d241(0xf9)]=[_0x55d241(0xed),_0x9c0b1d[_0x55d241(0x11e)]],_0x252b3c[_0x55d241(0x105)]=_0x55d241(0x120),_0x252b3c[_0x55d241(0xd9)]=_0x9c0b1d[_0x55d241(0xf0)],_0x252b3c[_0x55d241(0xeb)]=_0x9c0b1d[_0x55d241(0x10c)],_0x252b3c[_0x55d241(0xd8)]=[],_0x252b3c[_0x55d241(0xc1)]=resourceSchemas[_0x55d241(0xf4)];const _0x2940d1={};_0x2940d1[_0x55d241(0xee)]=_0x252b3c,_0xbf8b3e[_0x55d241(0xc5)](_0x55d241(0xcf),_0x2940d1,async _0x105743=>listResources({..._0x105743[_0x55d241(0x107)],..._0x105743[_0x55d241(0xc1)],'user':user(_0x105743)},_0x635041));const _0x3c2a55={};_0x3c2a55[_0x55d241(0xf9)]=[_0x9c0b1d[_0x55d241(0xf6)],_0x9c0b1d[_0x55d241(0x11e)]],_0x3c2a55[_0x55d241(0x105)]=_0x55d241(0xdf),_0x3c2a55[_0x55d241(0xd9)]=_0x9c0b1d[_0x55d241(0xe5)],_0x3c2a55[_0x55d241(0xeb)]=_0x9c0b1d[_0x55d241(0x10c)],_0x3c2a55[_0x55d241(0xd8)]=[],_0x3c2a55[_0x55d241(0xc1)]=resourceSchemas[_0x55d241(0xf4)];const _0x2df7ea={};_0x2df7ea[_0x55d241(0xee)]=_0x3c2a55,_0xbf8b3e[_0x55d241(0x10d)](_0x55d241(0xcf),_0x2df7ea,async _0x579147=>createResource({..._0x579147[_0x55d241(0xc1)],'data':_0x579147[_0x55d241(0xfa)],'user':user(_0x579147)},_0x635041)),_0xbf8b3e[_0x55d241(0xc5)](_0x9c0b1d[_0x55d241(0x11b)],{'schema':{'tags':[_0x55d241(0xed),_0x9c0b1d[_0x55d241(0x11e)]],'summary':_0x55d241(0xc3),'description':_0x55d241(0x121),'access':_0x9c0b1d[_0x55d241(0x10c)],'permissions':[],'params':resourceSchemas[_0x55d241(0xc2)]}},async _0xcde646=>getResource({..._0xcde646[_0x55d241(0xc1)],'user':user(_0xcde646)},_0x635041)),_0xbf8b3e[_0x55d241(0x119)](_0x9c0b1d[_0x55d241(0x11b)],{'schema':{'tags':[_0x9c0b1d[_0x55d241(0xf6)],_0x9c0b1d[_0x55d241(0x11e)]],'summary':_0x9c0b1d[_0x55d241(0xd1)],'description':_0x55d241(0x10e),'access':_0x9c0b1d[_0x55d241(0x10c)],'permissions':[],'params':resourceSchemas[_0x55d241(0xc2)]}},async _0x238a47=>updateResource({..._0x238a47[_0x55d241(0xc1)],'patch':_0x238a47[_0x55d241(0xfa)],'user':user(_0x238a47)},_0x635041)),_0xbf8b3e[_0x55d241(0xcb)](_0x9c0b1d[_0x55d241(0x11b)],{'schema':{'tags':[_0x9c0b1d[_0x55d241(0xf6)],_0x9c0b1d[_0x55d241(0x11e)]],'summary':_0x9c0b1d[_0x55d241(0xda)],'description':_0x9c0b1d[_0x55d241(0x100)],'access':_0x9c0b1d[_0x55d241(0x10c)],'permissions':[],'params':resourceSchemas[_0x55d241(0xc2)]}},async _0x21efd0=>deleteResource({..._0x21efd0[_0x55d241(0xc1)],'user':user(_0x21efd0)},_0x635041)),_0xbf8b3e[_0x55d241(0x10d)](_0x9c0b1d[_0x55d241(0xc7)],{'schema':{'tags':[_0x55d241(0xed),_0x55d241(0xf4)],'summary':_0x9c0b1d[_0x55d241(0xcc)],'description':_0x9c0b1d[_0x55d241(0xf7)],'access':_0x9c0b1d[_0x55d241(0x10c)],'permissions':[_0x9c0b1d[_0x55d241(0x101)]],'params':resourceSchemas[_0x55d241(0xe1)],'body':resourceSchemas[_0x55d241(0xf5)]}},async _0x431847=>uploadResourceFile({..._0x431847[_0x55d241(0xc1)],..._0x431847[_0x55d241(0xfa)],'user':user(_0x431847)},_0x635041));const _0x50f57c={};_0x50f57c[_0x55d241(0xf9)]=[_0x9c0b1d[_0x55d241(0xf6)],_0x9c0b1d[_0x55d241(0x11e)]],_0x50f57c[_0x55d241(0x105)]=_0x9c0b1d[_0x55d241(0xd4)],_0x50f57c[_0x55d241(0xd9)]=_0x9c0b1d[_0x55d241(0xfc)],_0x50f57c[_0x55d241(0xeb)]=_0x9c0b1d[_0x55d241(0x10c)],_0x50f57c[_0x55d241(0xd8)]=[],_0x50f57c[_0x55d241(0xc1)]=resourceSchemas[_0x55d241(0xf1)];const _0x14ee5e={};_0x14ee5e[_0x55d241(0xee)]=_0x50f57c,_0xbf8b3e[_0x55d241(0xc5)](_0x55d241(0xca),_0x14ee5e,async _0x4b1c01=>listResourceRelation({..._0x4b1c01[_0x55d241(0x107)],..._0x4b1c01[_0x55d241(0xc1)],'user':user(_0x4b1c01)},_0x635041));const _0x234a7a={};_0x234a7a[_0x55d241(0xf9)]=[_0x9c0b1d[_0x55d241(0xf6)],_0x9c0b1d[_0x55d241(0x11e)]],_0x234a7a[_0x55d241(0x105)]=_0x55d241(0xf8),_0x234a7a[_0x55d241(0xd9)]=_0x9c0b1d[_0x55d241(0xc8)],_0x234a7a[_0x55d241(0xeb)]=_0x55d241(0xd3),_0x234a7a[_0x55d241(0xd8)]=[],_0x234a7a[_0x55d241(0xc1)]=resourceSchemas[_0x55d241(0xf1)];const _0x8fdc43={};_0x8fdc43[_0x55d241(0xee)]=_0x234a7a,_0xbf8b3e[_0x55d241(0x10d)](_0x55d241(0xca),_0x8fdc43,async _0x24c2fb=>createResourceRelation({..._0x24c2fb[_0x55d241(0xc1)],'data':_0x24c2fb[_0x55d241(0xfa)],'user':user(_0x24c2fb)},_0x635041)),_0xbf8b3e[_0x55d241(0xcb)](_0x9c0b1d[_0x55d241(0x11f)],{'schema':{'tags':[_0x55d241(0xed),_0x9c0b1d[_0x55d241(0x11e)]],'summary':_0x9c0b1d[_0x55d241(0x118)],'description':_0x9c0b1d[_0x55d241(0x113)],'access':_0x55d241(0xd3),'permissions':[],'params':resourceSchemas[_0x55d241(0xe8)]}},async _0x5221f8=>deleteResourceRelation({..._0x5221f8[_0x55d241(0xc1)],'user':user(_0x5221f8)},_0x635041));};}
|
|
1
|
+
const m=z;function U(){const L=['user','get','/api/resource/:resource/search','resource','Searches\x20records\x20in\x20a\x20registered\x20resource.','/api/suggest/:resource/:field','fcore','Returns\x20suggested\x20values\x20for\x20a\x20resource\x20field.','suggestQuery','/api/resource/:resource/export','Exports\x20readable\x20records\x20from\x20a\x20registered\x20resource.','params','/api/resource/:resource/:id','resourceIncludeQuery','post','/api/resource/:resource/:id/upload','uploadResourceFile','permissions',':update','fields','resourceIdRelation','/api/resource/:resource/:id/:relation','Delete\x20resource\x20relation'];U=function(){return L;};return U();}import{ForbiddenError}from'../../errors.js';import{listResources}from'./services/list-resources.js';import{getResource}from'./services/get-resource.js';import{createResource}from'./services/create-resource.js';import{updateResource}from'./services/update-resource.js';import{deleteResource}from'./services/delete-resource.js';import{listResourceRelation}from'./services/list-resource-relation.js';import{createResourceRelation}from'./services/create-resource-relation.js';import{updateResourceRelation}from'./services/update-resource-relation.js';import{deleteResourceRelation}from'./services/delete-resource-relation.js';import{searchResource}from'./services/search-resource.js';import{exportResource}from'./services/export-resource.js';import{suggestResource}from'./services/suggest-resource.js';function z(C,N){C=C-0x1bf;const r=U();let p=r[C];return p;}import{resourceSchemas}from'./schema.js';import{uploadFile}from'../file/services/upload-file.js';const user=C=>C[m(0x1bf)];export function resourceRoutes(C){return async N=>{const Q=z;N[Q(0x1c0)](Q(0x1c1),{'schema':{'tags':['fcore',Q(0x1c2)],'summary':'Search\x20resource','description':Q(0x1c3),'access':'user','permissions':[],'params':resourceSchemas['resource']}},async r=>searchResource({...r['query'],...r['params'],'user':user(r)},C)),N[Q(0x1c0)](Q(0x1c4),{'schema':{'tags':[Q(0x1c5),Q(0x1c2)],'summary':'Suggest\x20resource\x20values','description':Q(0x1c6),'access':Q(0x1bf),'permissions':[],'params':resourceSchemas['resourceField'],'querystring':resourceSchemas[Q(0x1c7)]}},async r=>suggestResource({...r['query'],...r['params'],'user':user(r)},C)),N['get'](Q(0x1c8),{'schema':{'tags':['fcore',Q(0x1c2)],'summary':'Export\x20resource\x20records','description':Q(0x1c9),'access':'user','permissions':['*:read'],'params':resourceSchemas['exportResource'],'querystring':resourceSchemas['exportResourceQuery']}},async r=>exportResource({...r['query'],...r['params'],'user':user(r)},C)),N['get']('/api/resource/:resource',{'schema':{'tags':['fcore','resource'],'summary':'List\x20resource\x20records','description':'Returns\x20records\x20from\x20a\x20registered\x20resource.','access':'user','permissions':[],'params':resourceSchemas[Q(0x1c2)]}},async r=>listResources({...r['query'],...r['params'],'user':user(r)},C)),N['post']('/api/resource/:resource',{'schema':{'tags':['fcore',Q(0x1c2)],'summary':'Create\x20resource\x20record','description':'Creates\x20a\x20record\x20in\x20a\x20registered\x20resource.','access':'user','permissions':[],'params':resourceSchemas['resource']}},async r=>createResource({...r[Q(0x1ca)],'data':r['body'],'user':user(r)},C)),N['get'](Q(0x1cb),{'schema':{'tags':['fcore','resource'],'summary':'Get\x20resource\x20record','description':'Returns\x20one\x20record\x20from\x20a\x20registered\x20resource.','access':'user','permissions':[],'params':resourceSchemas['resourceId'],'querystring':resourceSchemas[Q(0x1cc)]}},async r=>getResource({...r['query'],...r['params'],'user':user(r)},C)),N['put']('/api/resource/:resource/:id',{'schema':{'tags':['fcore','resource'],'summary':'Update\x20resource\x20record','description':'Updates\x20a\x20record\x20in\x20a\x20registered\x20resource.','access':Q(0x1bf),'permissions':[],'params':resourceSchemas['resourceId']}},async r=>updateResource({...r[Q(0x1ca)],'patch':r['body'],'user':user(r)},C)),N['delete']('/api/resource/:resource/:id',{'schema':{'tags':[Q(0x1c5),'resource'],'summary':'Delete\x20resource\x20record','description':'Deletes\x20a\x20record\x20from\x20a\x20registered\x20resource.','access':'user','permissions':[],'params':resourceSchemas['resourceId']}},async r=>deleteResource({...r[Q(0x1ca)],'user':user(r)},C)),N[Q(0x1cd)](Q(0x1ce),{'schema':{'tags':[Q(0x1c5),'resource'],'summary':'Upload\x20resource\x20file','description':'Uploads\x20a\x20file\x20to\x20a\x20Resource\x20record\x20and\x20stores\x20its\x20metadata.','access':'user','permissions':[],'params':resourceSchemas[Q(0x1cf)]}},async r=>{const u=Q,p=await r['file']();if(!p)throw new Error('File\x20is\x20required');const c=r['params'][u(0x1c2)],x=r['params']['id'];if(r['user']?.['type']!=='admin'&&!r[u(0x1bf)]?.[u(0x1d0)]['includes'](c+':update'))throw new ForbiddenError('Missing\x20permission:\x20'+c+u(0x1d1));return uploadFile({'file':p,'metadata':{'name':p['filename'],'path':p[u(0x1d2)]['path']?.['value'],'resource':c,'resourceId':x},'user':r['user']},C);}),N['get']('/api/resource/:resource/:id/:relation',{'schema':{'tags':['fcore','resource'],'summary':'List\x20resource\x20relations','description':'Returns\x20related\x20records\x20for\x20a\x20resource\x20record.','access':'user','permissions':[],'schema':{'params':resourceSchemas[Q(0x1d3)]}}},async r=>listResourceRelation({...r['query'],...r['params'],'user':user(r)},C)),N['post'](Q(0x1d4),{'schema':{'tags':[Q(0x1c5),'resource'],'summary':'Create\x20resource\x20relation','description':'Creates\x20a\x20relation\x20for\x20a\x20resource\x20record.','access':'user','permissions':[],'params':resourceSchemas[Q(0x1d3)]}},async r=>createResourceRelation({...r['params'],'data':r['body'],'user':user(r)},C)),N['delete']('/api/resource/:resource/:id/:relation/:relationId',{'schema':{'tags':['fcore','resource'],'summary':Q(0x1d5),'description':'Deletes\x20a\x20relation\x20from\x20a\x20resource\x20record.','access':Q(0x1bf),'permissions':[],'params':resourceSchemas['resourceIdRelationId']}},async r=>deleteResourceRelation({...r['params'],'user':user(r)},C)),N['put']('/api/resource/:resource/:id/:relation/:relationId',{'schema':{'tags':[Q(0x1c5),'resource'],'summary':'Update\x20resource\x20relation','description':'Updates\x20a\x20related\x20resource\x20record.','access':'user','permissions':[],'params':resourceSchemas['resourceIdRelationId']}},async r=>updateResourceRelation({...r[Q(0x1ca)],'data':r['body'],'user':user(r)},C));};}
|
|
@@ -36,6 +36,9 @@ export declare const resourceSchemas: {
|
|
|
36
36
|
resource: import("@sinclair/typebox").TString;
|
|
37
37
|
id: import("@sinclair/typebox").TString;
|
|
38
38
|
}>;
|
|
39
|
+
resourceIncludeQuery: import("@sinclair/typebox").TObject<{
|
|
40
|
+
include: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
41
|
+
}>;
|
|
39
42
|
resourceIdRelation: import("@sinclair/typebox").TObject<{
|
|
40
43
|
resource: import("@sinclair/typebox").TString;
|
|
41
44
|
id: import("@sinclair/typebox").TString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/modules/resource/schema.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,QAAQ,SAAS,CAAC;IACvB,UAAU,aAAa;QACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;QACrC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;KACxB;CACF;AAED,eAAO,MAAM,UAAU,qCAIrB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AAEnD,eAAO,MAAM,eAAe;IAC1B,cAAc;;;IACd,QAAQ;;;IACR,cAAc;;;IACd,aAAa;;;;IACb,YAAY;;;;;IAKZ,UAAU;;;;IACV,kBAAkB;;;;;IAKlB,oBAAoB;;;;;;IAMpB,kBAAkB;;;;IAIlB,sBAAsB;;;;IAItB,mBAAmB;;;;;;;;CAQpB,CAAC"}
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/modules/resource/schema.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,QAAQ,SAAS,CAAC;IACvB,UAAU,aAAa;QACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;QACrC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;KACxB;CACF;AAED,eAAO,MAAM,UAAU,qCAIrB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AAEnD,eAAO,MAAM,eAAe;IAC1B,cAAc;;;IACd,QAAQ;;;IACR,cAAc;;;IACd,aAAa;;;;IACb,YAAY;;;;;IAKZ,UAAU;;;;IACV,oBAAoB;;;IAGpB,kBAAkB;;;;;IAKlB,oBAAoB;;;;;;IAMpB,kBAAkB;;;;IAIlB,sBAAsB;;;;IAItB,mBAAmB;;;;;;;;CAQpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const C=z;function z(C,N){C=C-0x1cc;const r=U();let p=r[C];return p;}import{Type}from'@sinclair/typebox';function U(){const N=['Object','Optional','String','Any','Unknown'];U=function(){return N;};return U();}export const identifier=Type['String']({'minLength':0x1,'maxLength':0x80,'pattern':'^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$'});export const resourceSchemas={'dictionaryName':Type[C(0x1cc)]({'name':identifier}),'resource':Type[C(0x1cc)]({'resource':identifier}),'exportResource':Type['Object']({'resource':identifier}),'resourceField':Type['Object']({'resource':identifier,'field':identifier}),'suggestQuery':Type['Object']({'q':Type[C(0x1cd)](Type[C(0x1ce)]()),'search':Type['Optional'](Type['String']()),'limit':Type['Optional'](Type['Integer']({'minimum':0x1,'maximum':0xc8}))}),'resourceId':Type['Object']({'resource':identifier,'id':identifier}),'resourceIncludeQuery':Type[C(0x1cc)]({'include':Type['Optional'](Type[C(0x1ce)]({'minLength':0x1}))}),'resourceIdRelation':Type['Object']({'resource':identifier,'id':identifier,'relation':identifier}),'resourceIdRelationId':Type['Object']({'resource':identifier,'id':identifier,'relation':identifier,'relationId':identifier}),'uploadResourceFile':Type['Object']({'resource':identifier,'id':identifier}),'uploadResourceFileBody':Type['Object']({'file':Type[C(0x1cf)](),'fileName':Type['String']({'minLength':0x1,'maxLength':0xff})}),'exportResourceQuery':Type['Object']({'filter':Type['Optional'](Type['Record'](Type[C(0x1ce)](),Type[C(0x1d0)]())),'sort':Type[C(0x1cd)](Type['Array'](Type['String']({'minLength':0x1}))),'search':Type['Optional'](Type[C(0x1ce)]()),'limit':Type['Optional'](Type['Integer']({'minimum':0x1,'maximum':0xc8})),'offset':Type['Optional'](Type['Integer']({'minimum':0x0})),'fields':Type[C(0x1cd)](Type['Array'](identifier))})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export async function addNote(C,N){const p=await N['pg']['query']('INSERT\x20INTO\x20admin.notes(resource,resource_id,body)\x20VALUES\x20($1,$2,$3)\x20RETURNING\x20*',[C['resource'],String(C['id']),C['body']]);return p['rows'][0x0];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function z(C,N){C=C-0x9b;const r=U();let p=r[C];return p;}export async function addResourceFile(C,N){const p=z,r=await N['pg']['query'](p(0x9b),[C['resource'],String(C['id']),C[p(0x9c)],C[p(0x9d)]??null]);return r[p(0x9e)][0x0];}function U(){const c=['\x0a\x20\x20\x20\x20\x20\x20\x20\x20INSERT\x20INTO\x20admin.files\x20(resource,\x20resource_id,\x20file_path,\x20size)\x0a\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20($1,\x20$2,\x20$3,\x20$4)\x0a\x20\x20\x20\x20\x20\x20\x20\x20RETURNING\x20*\x0a\x20\x20\x20\x20\x20\x20','filePath','size','rows'];U=function(){return c;};return U();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function z(C,N){C=C-0x64;const r=U();let p=r[C];return p;}export async function createResourceRelation(C,N){const Q=z,{resource:r,id:p,relation:c,data:x,user:m}=C;return N['resource'][Q(0x64)]({'name':r,'id':p,'relation':c,'data':x,'user':m});}function U(){const u=['createRelation'];U=function(){return u;};return U();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export async function createResource(C,N){var r=z;return N[r(0xd3)]['create']({'name':C[r(0xd3)],'data':C[r(0xd4)],'user':C['user']});}function z(C,N){C=C-0xd3;var r=U();var p=r[C];return p;}function U(){var p=['resource','data'];U=function(){return p;};return U();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export async function deleteResourceRelation(C,N){const m=z,{resource:r,id:p,relation:c,relationId:x}=C;return N['resource'][m(0x144)]({'name':r,'id':p,'relation':c,'relationId':x});}function z(C,N){C=C-0x144;const r=U();let p=r[C];return p;}function U(){const Q=['deleteRelation'];U=function(){return Q;};return U();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
export async function deleteResource(C,N){var r=z;return N['resource']['delete']({'name':C['resource'],'id':C['id'],'user':C[r(0x12e)]});}function z(C,N){C=C-0x12e;var r=U();var p=r[C];return p;}function U(){var p=['user'];U=function(){return p;};return U();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export-resource.d.ts","sourceRoot":"","sources":["../../../../src/modules/resource/services/export-resource.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"export-resource.d.ts","sourceRoot":"","sources":["../../../../src/modules/resource/services/export-resource.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,wBAAsB,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAcrG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function z(C,N){C=C-0x1e1;const r=U();let p=r[C];return p;}import{parseFilterQuery}from'../../../plugins/resource/utils/filters.js';function U(){const c=['find','sort','limit'];U=function(){return c;};return U();}export async function exportResource(C,N){const p=z,r=await N['resource'][p(0x1e1)]({'name':C['resource'],'query':{'filter':parseFilterQuery(C),'sort':C[p(0x1e2)],'search':C['search'],'limit':C[p(0x1e3)],'offset':C['offset'],'fields':C['fields']},'user':C['user']});return r['rows'];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-resource.d.ts","sourceRoot":"","sources":["../../../../src/modules/resource/services/get-resource.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,wBAAsB,WAAW,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"get-resource.d.ts","sourceRoot":"","sources":["../../../../src/modules/resource/services/get-resource.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,wBAAsB,WAAW,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,CAO5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function U(){var p=['resource','findOne','include'];U=function(){return p;};return U();}function z(C,N){C=C-0xa4;var r=U();var p=r[C];return p;}export async function getResource(C,N){var r=z;return N[r(0xa4)][r(0xa5)]({'name':C['resource'],'id':C['id'],'query':{'include':C[r(0xa6)]},'user':C['user']});}
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
* Implements the list resource relation application service for its module.
|
|
3
3
|
*/
|
|
4
4
|
import type { AppContext, User } from '../../../context.js';
|
|
5
|
+
import type { ResourceQuery } from '../../../plugins/resource/resource.types.js';
|
|
5
6
|
export declare function listResourceRelation(params: {
|
|
6
7
|
resource: string;
|
|
7
8
|
id: string;
|
|
8
9
|
relation: string;
|
|
10
|
+
query?: ResourceQuery;
|
|
9
11
|
user?: User;
|
|
10
12
|
}, ctx: AppContext): Promise<any>;
|
|
11
13
|
//# sourceMappingURL=list-resource-relation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-resource-relation.d.ts","sourceRoot":"","sources":["../../../../src/modules/resource/services/list-resource-relation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"list-resource-relation.d.ts","sourceRoot":"","sources":["../../../../src/modules/resource/services/list-resource-relation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAEjF,wBAAsB,oBAAoB,CACxC,MAAM,EAAE;IACN,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,IAAI,CAAC,EAAE,IAAI,CAAC;CACb,EACD,GAAG,EAAE,UAAU,GACd,OAAO,CAAC,GAAG,CAAC,CAGd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
export async function listResourceRelation(C,N){const {resource:r,id:p,relation:c,query:x,user:m}=C;return N['resource']['findRelation']({'name':r,'id':p,'relation':c,'query':x,'user':m});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-resources.d.ts","sourceRoot":"","sources":["../../../../src/modules/resource/services/list-resources.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"list-resources.d.ts","sourceRoot":"","sources":["../../../../src/modules/resource/services/list-resources.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,wBAAsB,aAAa,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,CAY9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{parseFilterQuery}from'../../../plugins/resource/utils/filters.js';function z(C,N){C=C-0x1d5;var r=U();var p=r[C];return p;}function U(){var p=['resource','offset','page','limit'];U=function(){return p;};return U();}export async function listResources(C,N){var r=z;return N['resource']['find']({'name':C[r(0x1d5)],'query':{'filter':parseFilterQuery(C),'sort':C['sort'],'search':C['search'],'limit':C['limit'],'offset':C[r(0x1d6)]??(C['page']?Math['max'](C[r(0x1d7)]-0x1,0x0):0x0)*(C[r(0x1d8)]??0x14)},'user':C['user']});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-resource.d.ts","sourceRoot":"","sources":["../../../../src/modules/resource/services/search-resource.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"search-resource.d.ts","sourceRoot":"","sources":["../../../../src/modules/resource/services/search-resource.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,wBAAsB,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,CAE/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
import{parseFilterQuery}from'../../../plugins/resource/utils/filters.js';function z(C,N){C=C-0x121;var r=U();var p=r[C];return p;}function U(){var p=['user'];U=function(){return p;};return U();}export async function searchResource(C,N){var r=z;return N['resource']['find']({'name':C['resource'],'query':{...C,'filter':parseFilterQuery(C)},'user':C[r(0x121)]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggest-resource.d.ts","sourceRoot":"","sources":["../../../../src/modules/resource/services/suggest-resource.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"suggest-resource.d.ts","sourceRoot":"","sources":["../../../../src/modules/resource/services/suggest-resource.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,KAAK,qBAAqB,GAAG;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAElB,CAAC;AAEF,wBAAsB,eAAe,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA4ClG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
import{ValidationError}from'../../../errors.js';function U(){const D=['resource','toLowerCase','min','max','fields','lookup','query','SELECT\x20','now','field','name','startsWith','map','code','text'];U=function(){return D;};return U();}import{autoIndex}from'../../../plugins/resource/utils/auto-index.js';function z(C,N){C=C-0x11f;const r=U();let p=r[C];return p;}export async function suggestResource(C,N){const h=z,r=N[h(0x11f)]['get'](C['resource']),p=String(C['search']??C['q']??'')[h(0x120)](),c=Math[h(0x121)](Math[h(0x122)](Number(C['limit']??0x14),0x1),0xc8),x=Date['now'](),m=r[h(0x123)][C['field']],Q=m?.[h(0x124)]?.['dictionary'],u=m?.['lookup']?.['table'];if(u){const Y=m[h(0x124)]?.['textField']??'name',f=m['lookup']?.['valueField']??'id';autoIndex(u,Y,'text',N['pg']);const F=await N['pg'][h(0x125)](h(0x126)+f+'\x20as\x20id,\x20'+Y+'\x20as\x20text\x20FROM\x20'+u+'\x20WHERE\x20lower('+Y+')\x20~\x20$1\x20LIMIT\x20$2',[''+p[h(0x120)](),c])['then'](t=>t['rows']);return{'limit':c,'count':F['length'],'search':p,'time':Date[h(0x127)]()-x,'data':F};}if(!Q)throw new ValidationError('Field\x20has\x20no\x20lookup\x20dictionary:\x20'+C[h(0x128)]);const L=await N['dictionary']['get'](Q),T=L['filter'](t=>!p||t['code']['startsWith'](p)||t[h(0x129)][h(0x12a)](p))['slice'](0x0,c)[h(0x12b)](t=>({'id':t[h(0x12c)]||t['id'],'text':t['name']||t[h(0x12d)]}));return{'search':p,'limit':c,'count':T['length'],'time':Date['now']()-x,'data':T};}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AppContext, User } from "../../../context.js";
|
|
2
|
+
export declare function updateResourceRelation(params: {
|
|
3
|
+
resource: string;
|
|
4
|
+
id: string;
|
|
5
|
+
relation: string;
|
|
6
|
+
relationId: string;
|
|
7
|
+
data: Record<string, unknown>;
|
|
8
|
+
user?: User;
|
|
9
|
+
}, ctx: AppContext): Promise<Record<string, unknown>>;
|
|
10
|
+
//# sourceMappingURL=update-resource-relation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-resource-relation.d.ts","sourceRoot":"","sources":["../../../../src/modules/resource/services/update-resource-relation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE5D,wBAAsB,sBAAsB,CACxC,MAAM,EAAE;IACJ,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,IAAI,CAAC,EAAE,IAAI,CAAC;CACf,EACD,GAAG,EAAE,UAAU,GAChB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAUlC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export async function updateResourceRelation(C,N){const {resource:r,id:p,relation:c,relationId:x,data:m,user:Q}=C;return N['resource']['updateRelation']({'name':r,'id':p,'relation':c,'relationId':x,'data':m,'user':Q});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function U(){var p=['resource','user'];U=function(){return p;};return U();}function z(C,N){C=C-0x1a8;var r=U();var p=r[C];return p;}export async function updateResource(C,N){var r=z;return N[r(0x1a8)]['update']({'name':C['resource'],'id':C['id'],'data':C['patch'],'user':C[r(0x1a9)]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{ForbiddenError,NotFoundError,ValidationError}from'../../../errors.js';export async function uploadResourceFile(C,N){const m=z,r=N[m(0x1bf)][m(0x1c0)](C['resource']);if(r['access']==='admin'&&C['user']?.['type']!=='admin')throw new ForbiddenError(m(0x1c1));if(C['user']?.[m(0x1c2)]!=='admin'&&!C[m(0x1c3)]?.['permissions']?.[m(0x1c4)]((r[m(0x1c5)]??r['name'])+m(0x1c6)))throw new ForbiddenError('Missing\x20permission:\x20'+(r['permission']??r[m(0x1c7)])+':update');if(!Buffer[m(0x1c8)](C['file'])||C['file']['length']===0x0)throw new ValidationError('File\x20is\x20required');const p=C[m(0x1c9)][m(0x1ca)](/[^A-Za-z0-9._-]/g,'_');if(!p)throw new ValidationError('File\x20name\x20is\x20required');const c='files/'+C[m(0x1bf)]+'/'+String(C['id'])+'/'+p;await N[m(0x1cb)]['put'](c,C[m(0x1cb)]);if(!await N['file']['exists'](c))throw new NotFoundError('Uploaded\x20file\x20not\x20found');const x=await N['pg']['query']('\x0a\x20\x20\x20\x20\x20\x20\x20\x20INSERT\x20INTO\x20admin.files\x20(resource,\x20resource_id,\x20file_path,\x20size)\x0a\x20\x20\x20\x20\x20\x20\x20\x20VALUES\x20($1,\x20$2,\x20$3,\x20$4)\x0a\x20\x20\x20\x20\x20\x20\x20\x20RETURNING\x20*\x0a\x20\x20\x20\x20',[C['resource'],String(C['id']),c,C['file']['length']]);return x['rows'][0x0];}function z(C,N){C=C-0x1bf;const r=U();let p=r[C];return p;}function U(){const Q=['resource','get','Admin\x20access\x20required','type','user','includes','permission',':update','name','isBuffer','fileName','replace','file'];U=function(){return Q;};return U();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../src/modules/system/route.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAanD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG9C,wBAAgB,YAAY,CAC1B,GAAG,EAAE,UAAU,EACf,SAAS,GAAE,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAa,GACnD,kBAAkB,
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../src/modules/system/route.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAanD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG9C,wBAAgB,YAAY,CAC1B,GAAG,EAAE,UAAU,EACf,SAAS,GAAE,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAa,GACnD,kBAAkB,CA8JpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xc32977=_0xa56a;(function(_0x5230bc,_0x437178){const _0x38ecda=_0xa56a,_0x28d318=_0x5230bc();while(!![]){try{const _0x553941=parseInt(_0x38ecda(0xcd))/0x1*(parseInt(_0x38ecda(0xe9))/0x2)+-parseInt(_0x38ecda(0xdb))/0x3*(-parseInt(_0x38ecda(0xc4))/0x4)+parseInt(_0x38ecda(0xf9))/0x5*(-parseInt(_0x38ecda(0xf7))/0x6)+parseInt(_0x38ecda(0xe3))/0x7*(parseInt(_0x38ecda(0xd4))/0x8)+parseInt(_0x38ecda(0xb3))/0x9+-parseInt(_0x38ecda(0x9d))/0xa*(-parseInt(_0x38ecda(0xb8))/0xb)+parseInt(_0x38ecda(0xb1))/0xc;if(_0x553941===_0x437178)break;else _0x28d318['push'](_0x28d318['shift']());}catch(_0x4b21ec){_0x28d318['push'](_0x28d318['shift']());}}}(_0x2b73,0xcee9e));import{getSystemSettings}from'./services/get-system-settings.js';import{updateSystemSettings}from'./services/update-system-settings.js';import{getAuditLog}from'./services/get-audit-log.js';import{checkSystem}from'./services/check-system.js';import{getApiList}from'./services/get-api-list.js';import{getSystemLog}from'./services/get-system-log.js';function _0x2b73(){const _0x28a048=['356311jGqlOI','post','system','system:dictionaries','Get\x20access\x20rules','send','List\x20platform\x20dictionaries','8PcNqaV','Checks\x20the\x20availability\x20of\x20system\x20dependencies.','schema','RVDOU','system:access','AxZQJ','iCCMK','3OGKHsw','Returns\x20a\x20registered\x20platform\x20dictionary\x20by\x20name.','IoUhg','NRraR','BYEtd','koQuF','hQmOX','AgFHI','4519018sAnGWf','system:settings','Returns\x20the\x20list\x20of\x20registered\x20platform\x20APIs.','access','/api/dictionaries','shzcU','2pgglil','zASBG','PlOLn','Set\x20access\x20rules','nsCPm','/api/dictionaries/:name','Returns\x20all\x20available\x20dictionaries\x20registered\x20by\x20the\x20platform.','apiListQuery','Returns\x20system\x20logger\x20entries\x20for\x20the\x20requested\x20path.','system:audit','summary','Returns\x20system\x20settings\x20as\x20nested\x20JSON.','OPqFJ','yCtep','750LONwTK','HtIGu','36865mxiasX','accessTarget','description','/api/system/audit','type','CEFpx','deOXW','get','tags','Get\x20platform\x20dictionary','permissions','Replaces\x20direct\x20access\x20rules\x20for\x20a\x20user\x20or\x20role.','dictionaryName','admin','1356070VczYbf','LWdrM','FzNIm','system:check','TamHJ','fcore','DqJUM','Get\x20system\x20settings','/api/system/settings','Update\x20platform\x20dictionary','UIHGT','params','logger','sXXEq','lqGEa','JcFva','Returns\x20direct\x20and\x20role-based\x20access\x20rules\x20for\x20a\x20user\x20or\x20role.','wTDKb','LejfZ','Get\x20audit\x20log','1752vZLPdd','/api/system/logger','2219175ngbRYc','Returns\x20the\x20system\x20audit\x20log\x20entries.','/api/system/check','/api/access/:type/:id','system:logs','11BXtBzC','query','List\x20APIs','Update\x20system\x20settings','dictionaryItems','QOCso','Get\x20system\x20log','Replaces\x20the\x20items\x20of\x20a\x20registered\x20platform\x20dictionary.','hLQGh','Check\x20system\x20health','XiKmy','JvhLi','1539720BIWSTk','body','rdYRH','/api/system/list','yqPCH','settings','Updates\x20system\x20settings\x20using\x20flat\x20dot-notation\x20keys.','user','querystring'];_0x2b73=function(){return _0x28a048;};return _0x2b73();}import{listDictionaries}from'./services/list-dictionaries.js';import{getDictionary}from'./services/get-dictionary.js';import{updateDictionary}from'./services/update-dictionary.js';import{getAccess}from'./services/get-access.js';function _0xa56a(_0x1fccdf,_0x393dbe){_0x1fccdf=_0x1fccdf-0x99;const _0x2b7339=_0x2b73();let _0xa56a46=_0x2b7339[_0x1fccdf];return _0xa56a46;}import{setAccess}from'./services/set-access.js';import{systemSchemas}from'./schema.js';const u=_0x93714a=>_0x93714a[_0xc32977(0xcb)];export function systemRoutes(_0x40c68c,_0x33b2fc=new Map()){const _0x1fd71b=_0xc32977,_0x121b41={'zASBG':function(_0x2b1b07,_0x50595b,_0x493432){return _0x2b1b07(_0x50595b,_0x493432);},'rdYRH':_0x1fd71b(0xa2),'RVDOU':_0x1fd71b(0xd3),'IoUhg':_0x1fd71b(0xef),'sXXEq':_0x1fd71b(0xd0),'JvhLi':_0x1fd71b(0xee),'deOXW':_0x1fd71b(0xcf),'lqGEa':_0x1fd71b(0x102),'nsCPm':_0x1fd71b(0x9c),'yqPCH':_0x1fd71b(0xa6),'CEFpx':_0x1fd71b(0xbf),'TamHJ':_0x1fd71b(0xb6),'LWdrM':_0x1fd71b(0xd1),'koQuF':_0x1fd71b(0xec),'hQmOX':_0x1fd71b(0x9a),'PlOLn':_0x1fd71b(0xd8),'LejfZ':_0x1fd71b(0xa5),'yCtep':_0x1fd71b(0xf4),'OPqFJ':_0x1fd71b(0xbb),'AgFHI':_0x1fd71b(0xca),'BYEtd':_0x1fd71b(0xe4),'DqJUM':_0x1fd71b(0xb2),'AxZQJ':_0x1fd71b(0xbe),'HtIGu':_0x1fd71b(0xf1),'iCCMK':_0x1fd71b(0xb7),'NRraR':_0x1fd71b(0xfc),'XiKmy':_0x1fd71b(0xb0),'UIHGT':_0x1fd71b(0xb4),'QOCso':_0x1fd71b(0xc1),'JcFva':_0x1fd71b(0xd5),'wTDKb':_0x1fd71b(0xa0),'hLQGh':_0x1fd71b(0xba),'FzNIm':_0x1fd71b(0xe5)};return async _0x5c37fc=>{const _0xfc0ace=_0x1fd71b,_0x3d15c1={'shzcU':function(_0x5c276c,_0x43069c,_0x50644d){const _0x3045e2=_0xa56a;return _0x121b41[_0x3045e2(0xea)](_0x5c276c,_0x43069c,_0x50644d);}},_0x65628a={};_0x65628a[_0xfc0ace(0x101)]=[_0x121b41[_0xfc0ace(0xc6)],_0xfc0ace(0xcf)],_0x65628a[_0xfc0ace(0xf3)]=_0x121b41[_0xfc0ace(0xd7)],_0x65628a[_0xfc0ace(0xfb)]=_0x121b41[_0xfc0ace(0xdd)],_0x65628a[_0xfc0ace(0xe6)]=_0xfc0ace(0x9c),_0x65628a[_0xfc0ace(0x99)]=[_0x121b41[_0xfc0ace(0xaa)]];const _0x3f8f56={};_0x3f8f56[_0xfc0ace(0xd6)]=_0x65628a,_0x5c37fc[_0xfc0ace(0x100)](_0xfc0ace(0xe7),_0x3f8f56,async _0x1dcce3=>listDictionaries({'user':u(_0x1dcce3)},_0x40c68c)),_0x5c37fc[_0xfc0ace(0x100)](_0x121b41[_0xfc0ace(0xc3)],{'schema':{'tags':[_0x121b41[_0xfc0ace(0xc6)],_0x121b41[_0xfc0ace(0xff)]],'summary':_0x121b41[_0xfc0ace(0xab)],'description':_0xfc0ace(0xdc),'access':_0x121b41[_0xfc0ace(0xed)],'permissions':[_0x121b41[_0xfc0ace(0xaa)]],'params':systemSchemas[_0xfc0ace(0x9b)]}},async _0x4a14a5=>getDictionary({..._0x4a14a5[_0xfc0ace(0xa8)],'user':u(_0x4a14a5)},_0x40c68c)),_0x5c37fc[_0xfc0ace(0xce)](_0x121b41[_0xfc0ace(0xc3)],{'schema':{'tags':[_0xfc0ace(0xa2),_0x121b41[_0xfc0ace(0xff)]],'summary':_0x121b41[_0xfc0ace(0xc8)],'description':_0x121b41[_0xfc0ace(0xfe)],'access':_0xfc0ace(0x9c),'permissions':[_0x121b41[_0xfc0ace(0xaa)]],'params':systemSchemas[_0xfc0ace(0x9b)],'body':systemSchemas[_0xfc0ace(0xbc)]}},async _0x543019=>updateDictionary({..._0x543019[_0xfc0ace(0xa8)],..._0x543019[_0xfc0ace(0xc5)],'user':u(_0x543019)},_0x40c68c));const _0x3780be=async _0x3cdc7b=>getAccess({..._0x3cdc7b[_0xfc0ace(0xa8)],'user':u(_0x3cdc7b)},_0x40c68c);_0x5c37fc[_0xfc0ace(0x100)](_0x121b41[_0xfc0ace(0xa1)],{'schema':{'tags':[_0xfc0ace(0xa2),_0x121b41[_0xfc0ace(0xff)]],'summary':_0x121b41[_0xfc0ace(0x9e)],'description':_0xfc0ace(0xad),'access':_0x121b41[_0xfc0ace(0xed)],'permissions':[_0xfc0ace(0xd8)],'params':systemSchemas[_0xfc0ace(0xfa)]}},_0x3780be);const _0x433ce4={};_0x433ce4[_0xfc0ace(0x101)]=[_0x121b41[_0xfc0ace(0xc6)],_0x121b41[_0xfc0ace(0xff)]],_0x433ce4[_0xfc0ace(0xf3)]=_0x121b41[_0xfc0ace(0xe0)],_0x433ce4[_0xfc0ace(0xfb)]=_0x121b41[_0xfc0ace(0xe1)],_0x433ce4[_0xfc0ace(0xe6)]=_0x121b41[_0xfc0ace(0xed)],_0x433ce4[_0xfc0ace(0x99)]=[_0x121b41[_0xfc0ace(0xeb)]],_0x433ce4[_0xfc0ace(0xa8)]=systemSchemas[_0xfc0ace(0xfa)],_0x433ce4[_0xfc0ace(0xc5)]=systemSchemas[_0xfc0ace(0xe6)];const _0x58cbdf={};_0x58cbdf[_0xfc0ace(0xd6)]=_0x433ce4,_0x5c37fc[_0xfc0ace(0xce)](_0xfc0ace(0xb6),_0x58cbdf,async _0x391f7d=>setAccess({..._0x391f7d[_0xfc0ace(0xa8)],..._0x391f7d[_0xfc0ace(0xc5)],'user':u(_0x391f7d)},_0x40c68c)),_0x5c37fc[_0xfc0ace(0x100)](_0x121b41[_0xfc0ace(0xaf)],{'schema':{'tags':[_0x121b41[_0xfc0ace(0xc6)],_0x121b41[_0xfc0ace(0xff)]],'summary':_0xfc0ace(0xa4),'description':_0x121b41[_0xfc0ace(0xf6)],'access':_0xfc0ace(0x9c),'permissions':[_0xfc0ace(0xe4)]}},async _0x3ff9a4=>getSystemSettings({..._0x3ff9a4[_0xfc0ace(0xa8)],'user':u(_0x3ff9a4)},_0x40c68c));const _0x1d6fcc={};_0x1d6fcc[_0xfc0ace(0x101)]=[_0xfc0ace(0xa2),_0x121b41[_0xfc0ace(0xff)]],_0x1d6fcc[_0xfc0ace(0xf3)]=_0x121b41[_0xfc0ace(0xf5)],_0x1d6fcc[_0xfc0ace(0xfb)]=_0x121b41[_0xfc0ace(0xe2)],_0x1d6fcc[_0xfc0ace(0xe6)]=_0x121b41[_0xfc0ace(0xed)],_0x1d6fcc[_0xfc0ace(0x99)]=[_0x121b41[_0xfc0ace(0xdf)]],_0x1d6fcc[_0xfc0ace(0xc5)]=systemSchemas[_0xfc0ace(0xc9)];const _0x53fddf={};_0x53fddf[_0xfc0ace(0xd6)]=_0x1d6fcc,_0x5c37fc[_0xfc0ace(0xce)](_0xfc0ace(0xa5),_0x53fddf,async _0x1da9cf=>updateSystemSettings({..._0x1da9cf[_0xfc0ace(0xa8)],'patch':_0x1da9cf[_0xfc0ace(0xc5)],'user':u(_0x1da9cf)},_0x40c68c)),_0x5c37fc[_0xfc0ace(0x100)](_0x121b41[_0xfc0ace(0xa3)],{'schema':{'tags':[_0x121b41[_0xfc0ace(0xc6)],_0x121b41[_0xfc0ace(0xff)]],'summary':_0x121b41[_0xfc0ace(0xd9)],'description':_0x121b41[_0xfc0ace(0xf8)],'access':_0x121b41[_0xfc0ace(0xed)],'permissions':[_0x121b41[_0xfc0ace(0xda)]],'querystring':systemSchemas[_0xfc0ace(0xa9)]}},async(_0x183912,_0x32ccc2)=>{const _0x5a7368=_0xfc0ace,{contentType:_0x24531e,body:_0x1535bf}=await _0x3d15c1[_0x5a7368(0xe8)](getSystemLog,{..._0x183912[_0x5a7368(0xb9)],'user':u(_0x183912)},_0x40c68c);return _0x32ccc2[_0x5a7368(0xfd)](_0x24531e)[_0x5a7368(0xd2)](_0x1535bf);}),_0x5c37fc[_0xfc0ace(0x100)](_0x121b41[_0xfc0ace(0xde)],{'schema':{'tags':[_0xfc0ace(0xa2),_0x121b41[_0xfc0ace(0xff)]],'summary':_0x121b41[_0xfc0ace(0xc2)],'description':_0x121b41[_0xfc0ace(0xa7)],'access':_0x121b41[_0xfc0ace(0xed)],'permissions':[_0xfc0ace(0xf2)]}},async _0x3b880b=>getAuditLog({..._0x3b880b[_0xfc0ace(0xb9)],'user':u(_0x3b880b)},_0x40c68c));const _0x23d856={};_0x23d856[_0xfc0ace(0x101)]=[_0xfc0ace(0xa2),_0x121b41[_0xfc0ace(0xff)]],_0x23d856[_0xfc0ace(0xf3)]=_0x121b41[_0xfc0ace(0xbd)],_0x23d856[_0xfc0ace(0xfb)]=_0x121b41[_0xfc0ace(0xac)],_0x23d856[_0xfc0ace(0xe6)]=_0x121b41[_0xfc0ace(0xed)],_0x23d856[_0xfc0ace(0x99)]=[_0x121b41[_0xfc0ace(0xae)]];const _0x456306={};_0x456306[_0xfc0ace(0xd6)]=_0x23d856,_0x5c37fc[_0xfc0ace(0x100)](_0xfc0ace(0xb5),_0x456306,async _0x25ed84=>checkSystem({'user':u(_0x25ed84)},_0x40c68c));const _0x243706={};_0x243706[_0xfc0ace(0x101)]=[_0x121b41[_0xfc0ace(0xc6)],_0x121b41[_0xfc0ace(0xff)]],_0x243706[_0xfc0ace(0xf3)]=_0x121b41[_0xfc0ace(0xc0)],_0x243706[_0xfc0ace(0xfb)]=_0x121b41[_0xfc0ace(0x9f)],_0x243706[_0xfc0ace(0xe6)]=_0x121b41[_0xfc0ace(0xed)],_0x243706[_0xfc0ace(0x99)]=[],_0x243706[_0xfc0ace(0xcc)]=systemSchemas[_0xfc0ace(0xf0)];const _0x33af13={};_0x33af13[_0xfc0ace(0xd6)]=_0x243706,_0x5c37fc[_0xfc0ace(0x100)](_0xfc0ace(0xc7),_0x33af13,async _0x4e136b=>getApiList({'user':u(_0x4e136b),'apiRoutes':_0x33b2fc,..._0x4e136b[_0xfc0ace(0xb9)]},_0x40c68c));};}
|
|
1
|
+
import{getSystemSettings}from'./services/get-system-settings.js';import{updateSystemSettings}from'./services/update-system-settings.js';import{getAuditLog}from'./services/get-audit-log.js';import{checkSystem}from'./services/check-system.js';import{getApiList}from'./services/get-api-list.js';import{getSystemLog}from'./services/get-system-log.js';function z(C,N){C=C-0x181;const r=U();let p=r[C];return p;}import{getDictionary}from'./services/get-dictionary.js';import{updateDictionary}from'./services/update-dictionary.js';import{getAccess}from'./services/get-access.js';import{setAccess}from'./services/set-access.js';import{systemSchemas}from'./schema.js';function U(){const Y=['system','Get\x20platform\x20dictionary','user','system:dictionaries','dictionaryName','params','Replaces\x20direct\x20access\x20rules\x20for\x20a\x20user\x20or\x20role.','admin','get','/api/system/settings','Get\x20system\x20log','logger','type','/api/system/check','fcore','apiListQuery'];U=function(){return Y;};return U();}const u=C=>C['user'];export function systemRoutes(C,N=new Map()){return async r=>{const L=z;r['get']('/api/dictionary/:name',{'schema':{'tags':['fcore',L(0x181)],'summary':L(0x182),'description':'Returns\x20a\x20registered\x20platform\x20dictionary\x20by\x20name.','access':'user','permissions':['system:dictionaries'],'params':systemSchemas['dictionaryName']}},async c=>({'items':await getDictionary({...c['params'],'user':u(c)},C)})),r['post']('/api/dictionary/:name',{'schema':{'tags':['fcore',L(0x181)],'summary':'Update\x20platform\x20dictionary','description':'Replaces\x20the\x20items\x20of\x20a\x20registered\x20platform\x20dictionary.','access':L(0x183),'permissions':[L(0x184)],'params':systemSchemas[L(0x185)],'body':systemSchemas['dictionaryItems']}},async c=>updateDictionary({...c[L(0x186)],...c['body'],'user':u(c)},C));const p=async c=>getAccess({...c['params'],'user':u(c)},C);r['get']('/api/access/:type/:id',{'schema':{'tags':['fcore','system'],'summary':'Get\x20access\x20rules','description':'Returns\x20direct\x20and\x20role-based\x20access\x20rules\x20for\x20a\x20user\x20or\x20role.','access':'admin','permissions':['system:access'],'params':systemSchemas['accessTarget']}},p),r['post']('/api/access/:type/:id',{'schema':{'tags':['fcore','system'],'summary':'Set\x20access\x20rules','description':L(0x187),'access':L(0x188),'permissions':['system:access'],'params':systemSchemas['accessTarget'],'body':systemSchemas['access']}},async c=>setAccess({...c['params'],...c['body'],'user':u(c)},C)),r[L(0x189)](L(0x18a),{'schema':{'tags':['fcore','system'],'summary':'Get\x20system\x20settings','description':'Returns\x20system\x20settings\x20as\x20nested\x20JSON.','access':'admin','permissions':['system:settings']}},async c=>getSystemSettings({...c['params'],'user':u(c)},C)),r['post']('/api/system/settings',{'schema':{'tags':['fcore','system'],'summary':'Update\x20system\x20settings','description':'Updates\x20system\x20settings\x20using\x20flat\x20dot-notation\x20keys.','access':'admin','permissions':['system:settings'],'body':systemSchemas['settings']}},async c=>updateSystemSettings({...c['params'],'patch':c['body'],'user':u(c)},C)),r[L(0x189)]('/api/system/logger',{'schema':{'tags':['fcore','system'],'summary':L(0x18b),'description':'Returns\x20system\x20logger\x20entries\x20for\x20the\x20requested\x20path.','access':L(0x183),'permissions':['system:logs'],'querystring':systemSchemas[L(0x18c)]}},async(c,x)=>{const T=L,{contentType:m,body:Q}=await getSystemLog({...c['query'],'user':u(c)},C);return x[T(0x18d)](m)['send'](Q);}),r[L(0x189)]('/api/system/audit',{'schema':{'tags':['fcore','system'],'summary':'Get\x20audit\x20log','description':'Returns\x20the\x20system\x20audit\x20log\x20entries.','access':L(0x183),'permissions':['system:audit']}},async c=>getAuditLog({...c['query'],'user':u(c)},C)),r['get'](L(0x18e),{'schema':{'tags':['fcore','system'],'summary':'Check\x20system\x20health','description':'Checks\x20the\x20availability\x20of\x20system\x20dependencies.','access':L(0x183),'permissions':['system:check']}},async c=>checkSystem({'user':u(c)},C)),r[L(0x189)]('/api/system/list',{'schema':{'tags':[L(0x18f),'system'],'summary':'List\x20APIs','description':'Returns\x20the\x20list\x20of\x20registered\x20platform\x20APIs.','access':L(0x188),'permissions':[],'querystring':systemSchemas[L(0x190)]}},async c=>getApiList({'user':u(c),'apiRoutes':N,...c['query']},C));};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const C=z;function U(){const N=['Object','Array','Union','Null','Literal','short'];U=function(){return N;};return U();}function z(C,N){C=C-0x7e;const r=U();let p=r[C];return p;}import{Type}from'@sinclair/typebox';export const identifier=Type['String']({'minLength':0x1,'maxLength':0x80,'pattern':'^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$'});export const systemSchemas={'dictionaryName':Type['Object']({'name':identifier}),'dictionaryItems':Type[C(0x7e)]({'items':Type[C(0x7f)](Type['Object']({'id':Type['Optional'](Type[C(0x80)]([Type['String'](),Type['Number']()])),'code':Type['String']({'minLength':0x1}),'name':Type['String']({'minLength':0x1}),'parentId':Type['Optional'](Type['Union']([Type['String'](),Type['Number'](),Type[C(0x81)]()]))},{'additionalProperties':!![]}))}),'accessTarget':Type[C(0x7e)]({'type':Type[C(0x80)]([Type['Literal']('user'),Type[C(0x82)]('role')]),'id':identifier}),'access':Type['Object']({'access':Type[C(0x7f)](Type['Object']({'resource':Type['String']({'minLength':0x1,'maxLength':0x80}),'actions':Type[C(0x7f)](Type['String']({'minLength':0x1,'maxLength':0x80}),{'minItems':0x1})}))}),'apiListQuery':Type[C(0x7e)]({'format':Type['Optional'](Type['Union']([Type['Literal'](C(0x83)),Type[C(0x82)]('extended')]))}),'settingsEntity':Type['Object']({'entity':Type['Optional'](identifier)}),'settings':Type['Record'](Type['String']({'minLength':0x1}),Type['Unknown']()),'logger':Type[C(0x7e)]({'path':Type['Optional'](Type['String']({'maxLength':0x100,'pattern':'^[A-Za-z0-9_.\x5c-/]*$'}))})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-system.d.ts","sourceRoot":"","sources":["../../../../src/modules/system/services/check-system.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE5D,wBAAsB,WAAW,CAC/B,MAAM,EAAE;IACN,IAAI,EAAE,IAAI,CAAC;CACZ,EACD,GAAG,EAAE,UAAU,GACd,OAAO,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"check-system.d.ts","sourceRoot":"","sources":["../../../../src/modules/system/services/check-system.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE5D,wBAAsB,WAAW,CAC/B,MAAM,EAAE;IACN,IAAI,EAAE,IAAI,CAAC;CACZ,EACD,GAAG,EAAE,UAAU,GACd,OAAO,CAAC,GAAG,CAAC,CAcd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function z(C,N){C=C-0x199;const r=U();let p=r[C];return p;}export async function checkSystem(C,N){const c=z,[r,p]=await Promise['allSettled']([N['pg']['query']('SELECT\x201'),N['redis'][c(0x199)]()]);return{'status':r[c(0x19a)]==='fulfilled'&&p['status']===c(0x19b)?'ok':c(0x19c),'pg':r['status'],'redis':p['status']};}function U(){const x=['ping','status','fulfilled','degraded'];U=function(){return x;};return U();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-access.d.ts","sourceRoot":"","sources":["../../../../src/modules/system/services/get-access.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"get-access.d.ts","sourceRoot":"","sources":["../../../../src/modules/system/services/get-access.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACzB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,wBAAsB,SAAS,CAC7B,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,EACzD,GAAG,EAAE,UAAU,GACd,OAAO,CAAC;IAAE,MAAM,EAAE,YAAY,EAAE,CAAA;CAAE,CAAC,CAkBrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export async function getAccess(C,N){const c=z,r=C['type']==='user'?'\x0a\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20ra.resource,\x20ra.actions,\x20ra.role_id\x20AS\x20role\x0a\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20admin.role_access\x20ra\x0a\x20\x20\x20\x20\x20\x20\x20\x20LEFT\x20JOIN\x20admin.user_roles\x20ur\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ON\x20ur.role_id\x20=\x20ra.role_id\x20AND\x20ur.user_uid\x20=\x20$1\x0a\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20ra.user_uid\x20=\x20$1\x20OR\x20ur.user_uid\x20=\x20$1\x0a\x20\x20\x20\x20\x20\x20':'\x0a\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20ra.resource,\x20ra.actions,\x20ra.role_id\x20AS\x20role\x0a\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20admin.role_access\x20ra\x0a\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20ra.role_id\x20=\x20$1\x0a\x20\x20\x20\x20\x20\x20',p=await N['pg'][c(0x118)](r,[C['id']]);return{'access':p[c(0x119)]};}function z(C,N){C=C-0x118;const r=U();let p=r[C];return p;}function U(){const x=['query','rows'];U=function(){return x;};return U();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-api-list.d.ts","sourceRoot":"","sources":["../../../../src/modules/system/services/get-api-list.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAiB,MAAM,kBAAkB,CAAC;AAEhE,wBAAsB,UAAU,CAC9B,MAAM,EAAE;IACN,IAAI,EAAE,IAAI,CAAC;IACX,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACzC,MAAM,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;CAC/B,EACD,GAAG,EAAE,UAAU,GACd,OAAO,CAAC,QAAQ,EAAE,GAAG,MAAM,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"get-api-list.d.ts","sourceRoot":"","sources":["../../../../src/modules/system/services/get-api-list.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAiB,MAAM,kBAAkB,CAAC;AAEhE,wBAAsB,UAAU,CAC9B,MAAM,EAAE;IACN,IAAI,EAAE,IAAI,CAAC;IACX,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACzC,MAAM,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;CAC/B,EACD,GAAG,EAAE,UAAU,GACd,OAAO,CAAC,QAAQ,EAAE,GAAG,MAAM,EAAE,CAAC,CAWhC"}
|