first commit
This commit is contained in:
16
.editorconfig
Executable file
16
.editorconfig
Executable file
@ -0,0 +1,16 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[{package.json,*.yml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
7
.env.example
Executable file
7
.env.example
Executable file
@ -0,0 +1,7 @@
|
||||
HOST=0.0.0.0
|
||||
PORT=1337
|
||||
APP_KEYS="toBeModified1,toBeModified2"
|
||||
API_TOKEN_SALT=tobemodified
|
||||
ADMIN_JWT_SECRET=tobemodified
|
||||
TRANSFER_TOKEN_SALT=tobemodified
|
||||
JWT_SECRET=tobemodified
|
||||
115
.gitignore
vendored
Executable file
115
.gitignore
vendored
Executable file
@ -0,0 +1,115 @@
|
||||
############################
|
||||
# OS X
|
||||
############################
|
||||
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
Icon
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
._*
|
||||
|
||||
|
||||
############################
|
||||
# Linux
|
||||
############################
|
||||
|
||||
*~
|
||||
|
||||
|
||||
############################
|
||||
# Windows
|
||||
############################
|
||||
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
Desktop.ini
|
||||
$RECYCLE.BIN/
|
||||
*.cab
|
||||
*.msi
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
|
||||
############################
|
||||
# Packages
|
||||
############################
|
||||
|
||||
*.7z
|
||||
*.csv
|
||||
*.dat
|
||||
*.dmg
|
||||
*.gz
|
||||
*.iso
|
||||
*.jar
|
||||
*.rar
|
||||
*.tar
|
||||
*.zip
|
||||
*.com
|
||||
*.class
|
||||
*.dll
|
||||
*.exe
|
||||
*.o
|
||||
*.seed
|
||||
*.so
|
||||
*.swo
|
||||
*.swp
|
||||
*.swn
|
||||
*.swm
|
||||
*.out
|
||||
*.pid
|
||||
|
||||
|
||||
############################
|
||||
# Logs and databases
|
||||
############################
|
||||
|
||||
.tmp
|
||||
*.log
|
||||
*.sql
|
||||
*.sqlite
|
||||
*.sqlite3
|
||||
|
||||
|
||||
############################
|
||||
# Misc.
|
||||
############################
|
||||
|
||||
*#
|
||||
ssl
|
||||
.idea
|
||||
nbproject
|
||||
public/uploads/*
|
||||
!public/uploads/.gitkeep
|
||||
|
||||
############################
|
||||
# Node.js
|
||||
############################
|
||||
|
||||
lib-cov
|
||||
lcov.info
|
||||
pids
|
||||
logs
|
||||
results
|
||||
node_modules
|
||||
.node_history
|
||||
|
||||
############################
|
||||
# Tests
|
||||
############################
|
||||
|
||||
coverage
|
||||
|
||||
############################
|
||||
# Strapi
|
||||
############################
|
||||
|
||||
.env
|
||||
license.txt
|
||||
exports
|
||||
.strapi
|
||||
dist
|
||||
build
|
||||
.strapi-updater.json
|
||||
.strapi-cloud.json
|
||||
65
README.md
Executable file
65
README.md
Executable file
@ -0,0 +1,65 @@
|
||||
# version
|
||||
node: v18.20.6
|
||||
npm: 10.8.2
|
||||
|
||||
# 🚀 Getting started with Strapi
|
||||
|
||||
Strapi comes with a full featured [Command Line Interface](https://docs.strapi.io/dev-docs/cli) (CLI) which lets you scaffold and manage your project in seconds.
|
||||
|
||||
### `develop`
|
||||
|
||||
Start your Strapi application with autoReload enabled. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-develop)
|
||||
|
||||
```
|
||||
npm run develop
|
||||
# or
|
||||
yarn develop
|
||||
```
|
||||
|
||||
### `start`
|
||||
|
||||
Start your Strapi application with autoReload disabled. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-start)
|
||||
|
||||
```
|
||||
npm run start
|
||||
# or
|
||||
yarn start
|
||||
```
|
||||
|
||||
### `build`
|
||||
|
||||
Build your admin panel. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-build)
|
||||
|
||||
```
|
||||
npm run build
|
||||
# or
|
||||
yarn build
|
||||
```
|
||||
|
||||
## ⚙️ Deployment
|
||||
|
||||
Strapi gives you many possible deployment options for your project including [Strapi Cloud](https://cloud.strapi.io). Browse the [deployment section of the documentation](https://docs.strapi.io/dev-docs/deployment) to find the best solution for your use case.
|
||||
|
||||
```
|
||||
yarn strapi deploy
|
||||
```
|
||||
|
||||
## 📚 Learn more
|
||||
|
||||
- [Resource center](https://strapi.io/resource-center) - Strapi resource center.
|
||||
- [Strapi documentation](https://docs.strapi.io) - Official Strapi documentation.
|
||||
- [Strapi tutorials](https://strapi.io/tutorials) - List of tutorials made by the core team and the community.
|
||||
- [Strapi blog](https://strapi.io/blog) - Official Strapi blog containing articles made by the Strapi team and the community.
|
||||
- [Changelog](https://strapi.io/changelog) - Find out about the Strapi product updates, new features and general improvements.
|
||||
|
||||
Feel free to check out the [Strapi GitHub repository](https://github.com/strapi/strapi). Your feedback and contributions are welcome!
|
||||
|
||||
## ✨ Community
|
||||
|
||||
- [Discord](https://discord.strapi.io) - Come chat with the Strapi community including the core team.
|
||||
- [Forum](https://forum.strapi.io/) - Place to discuss, ask questions and find answers, show your Strapi project and get feedback or just talk with other Community members.
|
||||
- [Awesome Strapi](https://github.com/strapi/awesome-strapi) - A curated list of awesome things related to Strapi.
|
||||
|
||||
---
|
||||
|
||||
<sub>🤫 Psst! [Strapi is hiring](https://strapi.io/careers).</sub>
|
||||
17
config/admin.ts
Executable file
17
config/admin.ts
Executable file
@ -0,0 +1,17 @@
|
||||
export default ({ env }) => ({
|
||||
auth: {
|
||||
secret: env('ADMIN_JWT_SECRET'),
|
||||
},
|
||||
apiToken: {
|
||||
salt: env('API_TOKEN_SALT'),
|
||||
},
|
||||
transfer: {
|
||||
token: {
|
||||
salt: env('TRANSFER_TOKEN_SALT'),
|
||||
},
|
||||
},
|
||||
flags: {
|
||||
nps: env.bool('FLAG_NPS', true),
|
||||
promoteEE: env.bool('FLAG_PROMOTE_EE', true),
|
||||
},
|
||||
});
|
||||
7
config/api.ts
Executable file
7
config/api.ts
Executable file
@ -0,0 +1,7 @@
|
||||
export default {
|
||||
rest: {
|
||||
defaultLimit: 25,
|
||||
maxLimit: 100,
|
||||
withCount: true,
|
||||
},
|
||||
};
|
||||
93
config/database.ts
Executable file
93
config/database.ts
Executable file
@ -0,0 +1,93 @@
|
||||
import path from 'path';
|
||||
|
||||
export default ({ env }) => {
|
||||
const client = env('DATABASE_CLIENT', 'sqlite');
|
||||
|
||||
const connections = {
|
||||
mysql: {
|
||||
connection: {
|
||||
connectionString: env('DATABASE_URL'),
|
||||
host: env('DATABASE_HOST', 'localhost'),
|
||||
port: env.int('DATABASE_PORT', 3306),
|
||||
database: env('DATABASE_NAME', 'strapi'),
|
||||
user: env('DATABASE_USERNAME', 'strapi'),
|
||||
password: env('DATABASE_PASSWORD', 'strapi'),
|
||||
ssl: env.bool('DATABASE_SSL', false) && {
|
||||
key: env('DATABASE_SSL_KEY', undefined),
|
||||
cert: env('DATABASE_SSL_CERT', undefined),
|
||||
ca: env('DATABASE_SSL_CA', undefined),
|
||||
capath: env('DATABASE_SSL_CAPATH', undefined),
|
||||
cipher: env('DATABASE_SSL_CIPHER', undefined),
|
||||
rejectUnauthorized: env.bool(
|
||||
'DATABASE_SSL_REJECT_UNAUTHORIZED',
|
||||
true
|
||||
),
|
||||
},
|
||||
},
|
||||
pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) },
|
||||
},
|
||||
mysql2: {
|
||||
connection: {
|
||||
host: env('DATABASE_HOST', 'localhost'),
|
||||
port: env.int('DATABASE_PORT', 3306),
|
||||
database: env('DATABASE_NAME', 'strapi'),
|
||||
user: env('DATABASE_USERNAME', 'strapi'),
|
||||
password: env('DATABASE_PASSWORD', 'strapi'),
|
||||
ssl: env.bool('DATABASE_SSL', false) && {
|
||||
key: env('DATABASE_SSL_KEY', undefined),
|
||||
cert: env('DATABASE_SSL_CERT', undefined),
|
||||
ca: env('DATABASE_SSL_CA', undefined),
|
||||
capath: env('DATABASE_SSL_CAPATH', undefined),
|
||||
cipher: env('DATABASE_SSL_CIPHER', undefined),
|
||||
rejectUnauthorized: env.bool(
|
||||
'DATABASE_SSL_REJECT_UNAUTHORIZED',
|
||||
true
|
||||
),
|
||||
},
|
||||
},
|
||||
pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) },
|
||||
},
|
||||
postgres: {
|
||||
connection: {
|
||||
connectionString: env('DATABASE_URL'),
|
||||
host: env('DATABASE_HOST', 'localhost'),
|
||||
port: env.int('DATABASE_PORT', 5432),
|
||||
database: env('DATABASE_NAME', 'strapi'),
|
||||
user: env('DATABASE_USERNAME', 'strapi'),
|
||||
password: env('DATABASE_PASSWORD', 'strapi'),
|
||||
ssl: env.bool('DATABASE_SSL', false) && {
|
||||
key: env('DATABASE_SSL_KEY', undefined),
|
||||
cert: env('DATABASE_SSL_CERT', undefined),
|
||||
ca: env('DATABASE_SSL_CA', undefined),
|
||||
capath: env('DATABASE_SSL_CAPATH', undefined),
|
||||
cipher: env('DATABASE_SSL_CIPHER', undefined),
|
||||
rejectUnauthorized: env.bool(
|
||||
'DATABASE_SSL_REJECT_UNAUTHORIZED',
|
||||
true
|
||||
),
|
||||
},
|
||||
schema: env('DATABASE_SCHEMA', 'public'),
|
||||
},
|
||||
pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) },
|
||||
},
|
||||
sqlite: {
|
||||
connection: {
|
||||
filename: path.join(
|
||||
__dirname,
|
||||
'..',
|
||||
'..',
|
||||
env('DATABASE_FILENAME', '.tmp/data.db')
|
||||
),
|
||||
},
|
||||
useNullAsDefault: true,
|
||||
},
|
||||
};
|
||||
|
||||
return {
|
||||
connection: {
|
||||
client,
|
||||
...connections[client],
|
||||
acquireConnectionTimeout: env.int('DATABASE_CONNECTION_TIMEOUT', 60000),
|
||||
},
|
||||
};
|
||||
};
|
||||
12
config/middlewares.ts
Executable file
12
config/middlewares.ts
Executable file
@ -0,0 +1,12 @@
|
||||
export default [
|
||||
'strapi::logger',
|
||||
'strapi::errors',
|
||||
'strapi::security',
|
||||
'strapi::cors',
|
||||
'strapi::poweredBy',
|
||||
'strapi::query',
|
||||
'strapi::body',
|
||||
'strapi::session',
|
||||
'strapi::favicon',
|
||||
'strapi::public',
|
||||
];
|
||||
1
config/plugins.ts
Executable file
1
config/plugins.ts
Executable file
@ -0,0 +1 @@
|
||||
export default () => ({});
|
||||
10
config/server.ts
Executable file
10
config/server.ts
Executable file
@ -0,0 +1,10 @@
|
||||
export default ({ env }) => ({
|
||||
host: env('HOST', '0.0.0.0'),
|
||||
port: env.int('PORT', 1337),
|
||||
app: {
|
||||
keys: env.array('APP_KEYS'),
|
||||
},
|
||||
webhooks: {
|
||||
populateRelations: env.bool('WEBHOOKS_POPULATE_RELATIONS', false),
|
||||
},
|
||||
});
|
||||
0
database/migrations/.gitkeep
Executable file
0
database/migrations/.gitkeep
Executable file
BIN
favicon.png
Executable file
BIN
favicon.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 497 B |
20330
package-lock.json
generated
Executable file
20330
package-lock.json
generated
Executable file
File diff suppressed because it is too large
Load Diff
37
package.json
Executable file
37
package.json
Executable file
@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "mh-strapi-4-25-20",
|
||||
"private": true,
|
||||
"version": "0.1.0",
|
||||
"description": "A Strapi application",
|
||||
"scripts": {
|
||||
"develop": "strapi develop",
|
||||
"start": "strapi start",
|
||||
"build": "strapi build",
|
||||
"strapi": "strapi",
|
||||
"deploy": "strapi deploy"
|
||||
},
|
||||
"dependencies": {
|
||||
"@_sh/strapi-plugin-ckeditor": "^3.0.9",
|
||||
"@strapi/plugin-cloud": "4.25.20",
|
||||
"@strapi/plugin-i18n": "4.25.20",
|
||||
"@strapi/plugin-users-permissions": "4.25.20",
|
||||
"@strapi/strapi": "4.25.20",
|
||||
"mysql": "2.18.1",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0",
|
||||
"react-router-dom": "5.3.4",
|
||||
"strapi-plugin-import-export-entries": "^1.23.1",
|
||||
"styled-components": "5.3.3"
|
||||
},
|
||||
"author": {
|
||||
"name": "A Strapi developer"
|
||||
},
|
||||
"strapi": {
|
||||
"uuid": "a19d6bbd-6fe5-44c7-94fa-77d7791a0057"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0 <=20.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
3
public/robots.txt
Executable file
3
public/robots.txt
Executable file
@ -0,0 +1,3 @@
|
||||
# To prevent search engines from seeing the site altogether, uncomment the next two lines:
|
||||
# User-Agent: *
|
||||
# Disallow: /
|
||||
0
public/uploads/.gitkeep
Executable file
0
public/uploads/.gitkeep
Executable file
35
src/admin/app.example.tsx
Executable file
35
src/admin/app.example.tsx
Executable file
@ -0,0 +1,35 @@
|
||||
export default {
|
||||
config: {
|
||||
locales: [
|
||||
// 'ar',
|
||||
// 'fr',
|
||||
// 'cs',
|
||||
// 'de',
|
||||
// 'dk',
|
||||
// 'es',
|
||||
// 'he',
|
||||
// 'id',
|
||||
// 'it',
|
||||
// 'ja',
|
||||
// 'ko',
|
||||
// 'ms',
|
||||
// 'nl',
|
||||
// 'no',
|
||||
// 'pl',
|
||||
// 'pt-BR',
|
||||
// 'pt',
|
||||
// 'ru',
|
||||
// 'sk',
|
||||
// 'sv',
|
||||
// 'th',
|
||||
// 'tr',
|
||||
// 'uk',
|
||||
// 'vi',
|
||||
// 'zh-Hans',
|
||||
// 'zh',
|
||||
],
|
||||
},
|
||||
bootstrap(app) {
|
||||
console.log(app);
|
||||
},
|
||||
};
|
||||
13
src/admin/tsconfig.json
Executable file
13
src/admin/tsconfig.json
Executable file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"extends": "@strapi/typescript-utils/tsconfigs/admin",
|
||||
"include": [
|
||||
"../plugins/**/admin/src/**/*",
|
||||
"./"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules/",
|
||||
"build/",
|
||||
"dist/",
|
||||
"**/*.test.ts"
|
||||
]
|
||||
}
|
||||
9
src/admin/webpack.config.example.js
Executable file
9
src/admin/webpack.config.example.js
Executable file
@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
/* eslint-disable no-unused-vars */
|
||||
module.exports = (config, webpack) => {
|
||||
// Note: we provide webpack above so you should not `require` it
|
||||
// Perform customizations to webpack config
|
||||
// Important: return the modified config
|
||||
return config;
|
||||
};
|
||||
0
src/api/.gitkeep
Executable file
0
src/api/.gitkeep
Executable file
27
src/api/news-post/content-types/news-post/schema.json
Executable file
27
src/api/news-post/content-types/news-post/schema.json
Executable file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "news_posts",
|
||||
"info": {
|
||||
"singularName": "news-post",
|
||||
"pluralName": "news-posts",
|
||||
"displayName": "NewsPost"
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"pageUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"imageUrl": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/news-post/controllers/news-post.ts
Executable file
7
src/api/news-post/controllers/news-post.ts
Executable file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* news-post controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::news-post.news-post');
|
||||
7
src/api/news-post/routes/news-post.ts
Executable file
7
src/api/news-post/routes/news-post.ts
Executable file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* news-post router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::news-post.news-post');
|
||||
7
src/api/news-post/services/news-post.ts
Executable file
7
src/api/news-post/services/news-post.ts
Executable file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* news-post service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::news-post.news-post');
|
||||
24
src/api/point-balance/content-types/point-balance/schema.json
Executable file
24
src/api/point-balance/content-types/point-balance/schema.json
Executable file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "point_balances",
|
||||
"info": {
|
||||
"singularName": "point-balance",
|
||||
"pluralName": "point-balances",
|
||||
"displayName": "PointBalance",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"total_points": {
|
||||
"type": "integer"
|
||||
},
|
||||
"users_permissions_user": {
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "plugin::users-permissions.user"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/point-balance/controllers/point-balance.ts
Executable file
7
src/api/point-balance/controllers/point-balance.ts
Executable file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* point-balance controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::point-balance.point-balance');
|
||||
7
src/api/point-balance/routes/point-balance.ts
Executable file
7
src/api/point-balance/routes/point-balance.ts
Executable file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* point-balance router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::point-balance.point-balance');
|
||||
7
src/api/point-balance/services/point-balance.ts
Executable file
7
src/api/point-balance/services/point-balance.ts
Executable file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* point-balance service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::point-balance.point-balance');
|
||||
@ -0,0 +1,45 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "point_exchange_requests",
|
||||
"info": {
|
||||
"singularName": "point-exchange-request",
|
||||
"pluralName": "point-exchange-requests",
|
||||
"displayName": "PointExchangeRequest",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"type": {
|
||||
"type": "enumeration",
|
||||
"enum": [
|
||||
"add",
|
||||
"subtract"
|
||||
]
|
||||
},
|
||||
"amount": {
|
||||
"type": "integer"
|
||||
},
|
||||
"reason": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "enumeration",
|
||||
"enum": [
|
||||
"pending",
|
||||
"approved",
|
||||
"rejected"
|
||||
]
|
||||
},
|
||||
"admin_note": {
|
||||
"type": "string"
|
||||
},
|
||||
"users_permissions_users": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "plugin::users-permissions.user"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/point-exchange-request/controllers/point-exchange-request.ts
Executable file
7
src/api/point-exchange-request/controllers/point-exchange-request.ts
Executable file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* point-exchange-request controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::point-exchange-request.point-exchange-request');
|
||||
7
src/api/point-exchange-request/routes/point-exchange-request.ts
Executable file
7
src/api/point-exchange-request/routes/point-exchange-request.ts
Executable file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* point-exchange-request router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::point-exchange-request.point-exchange-request');
|
||||
7
src/api/point-exchange-request/services/point-exchange-request.ts
Executable file
7
src/api/point-exchange-request/services/point-exchange-request.ts
Executable file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* point-exchange-request service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::point-exchange-request.point-exchange-request');
|
||||
35
src/api/point-transaction/content-types/point-transaction/schema.json
Executable file
35
src/api/point-transaction/content-types/point-transaction/schema.json
Executable file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "point_transactions",
|
||||
"info": {
|
||||
"singularName": "point-transaction",
|
||||
"pluralName": "point-transactions",
|
||||
"displayName": "PointTransaction",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"Enumeration": {
|
||||
"type": "enumeration",
|
||||
"enum": [
|
||||
"add",
|
||||
"subtract",
|
||||
"adjust"
|
||||
]
|
||||
},
|
||||
"amount": {
|
||||
"type": "integer"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"users_permissions_users": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "plugin::users-permissions.user"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/point-transaction/controllers/point-transaction.ts
Executable file
7
src/api/point-transaction/controllers/point-transaction.ts
Executable file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* point-transaction controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::point-transaction.point-transaction');
|
||||
7
src/api/point-transaction/routes/point-transaction.ts
Executable file
7
src/api/point-transaction/routes/point-transaction.ts
Executable file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* point-transaction router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::point-transaction.point-transaction');
|
||||
7
src/api/point-transaction/services/point-transaction.ts
Executable file
7
src/api/point-transaction/services/point-transaction.ts
Executable file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* point-transaction service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::point-transaction.point-transaction');
|
||||
0
src/extensions/.gitkeep
Executable file
0
src/extensions/.gitkeep
Executable file
18
src/index.ts
Executable file
18
src/index.ts
Executable file
@ -0,0 +1,18 @@
|
||||
export default {
|
||||
/**
|
||||
* An asynchronous register function that runs before
|
||||
* your application is initialized.
|
||||
*
|
||||
* This gives you an opportunity to extend code.
|
||||
*/
|
||||
register(/*{ strapi }*/) {},
|
||||
|
||||
/**
|
||||
* An asynchronous bootstrap function that runs before
|
||||
* your application gets started.
|
||||
*
|
||||
* This gives you an opportunity to set up your data model,
|
||||
* run jobs, or perform some special logic.
|
||||
*/
|
||||
bootstrap(/*{ strapi }*/) {},
|
||||
};
|
||||
23
tsconfig.json
Executable file
23
tsconfig.json
Executable file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"extends": "@strapi/typescript-utils/tsconfigs/server",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"rootDir": "."
|
||||
},
|
||||
"include": [
|
||||
"./",
|
||||
"./**/*.ts",
|
||||
"./**/*.js",
|
||||
"src/**/*.json"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules/",
|
||||
"build/",
|
||||
"dist/",
|
||||
".cache/",
|
||||
".tmp/",
|
||||
"src/admin/",
|
||||
"**/*.test.*",
|
||||
"src/plugins/**"
|
||||
]
|
||||
}
|
||||
5
types/generated/components.d.ts
vendored
Executable file
5
types/generated/components.d.ts
vendored
Executable file
@ -0,0 +1,5 @@
|
||||
import type { Attribute, Schema } from '@strapi/strapi';
|
||||
|
||||
declare module '@strapi/types' {
|
||||
export module Shared {}
|
||||
}
|
||||
964
types/generated/contentTypes.d.ts
vendored
Executable file
964
types/generated/contentTypes.d.ts
vendored
Executable file
@ -0,0 +1,964 @@
|
||||
import type { Attribute, Schema } from '@strapi/strapi';
|
||||
|
||||
export interface AdminApiToken extends Schema.CollectionType {
|
||||
collectionName: 'strapi_api_tokens';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'Api Token';
|
||||
name: 'Api Token';
|
||||
pluralName: 'api-tokens';
|
||||
singularName: 'api-token';
|
||||
};
|
||||
pluginOptions: {
|
||||
'content-manager': {
|
||||
visible: false;
|
||||
};
|
||||
'content-type-builder': {
|
||||
visible: false;
|
||||
};
|
||||
};
|
||||
attributes: {
|
||||
accessKey: Attribute.String &
|
||||
Attribute.Required &
|
||||
Attribute.SetMinMaxLength<{
|
||||
minLength: 1;
|
||||
}>;
|
||||
createdAt: Attribute.DateTime;
|
||||
createdBy: Attribute.Relation<
|
||||
'admin::api-token',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
description: Attribute.String &
|
||||
Attribute.SetMinMaxLength<{
|
||||
minLength: 1;
|
||||
}> &
|
||||
Attribute.DefaultTo<''>;
|
||||
expiresAt: Attribute.DateTime;
|
||||
lastUsedAt: Attribute.DateTime;
|
||||
lifespan: Attribute.BigInteger;
|
||||
name: Attribute.String &
|
||||
Attribute.Required &
|
||||
Attribute.Unique &
|
||||
Attribute.SetMinMaxLength<{
|
||||
minLength: 1;
|
||||
}>;
|
||||
permissions: Attribute.Relation<
|
||||
'admin::api-token',
|
||||
'oneToMany',
|
||||
'admin::api-token-permission'
|
||||
>;
|
||||
type: Attribute.Enumeration<['read-only', 'full-access', 'custom']> &
|
||||
Attribute.Required &
|
||||
Attribute.DefaultTo<'read-only'>;
|
||||
updatedAt: Attribute.DateTime;
|
||||
updatedBy: Attribute.Relation<
|
||||
'admin::api-token',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
};
|
||||
}
|
||||
|
||||
export interface AdminApiTokenPermission extends Schema.CollectionType {
|
||||
collectionName: 'strapi_api_token_permissions';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'API Token Permission';
|
||||
name: 'API Token Permission';
|
||||
pluralName: 'api-token-permissions';
|
||||
singularName: 'api-token-permission';
|
||||
};
|
||||
pluginOptions: {
|
||||
'content-manager': {
|
||||
visible: false;
|
||||
};
|
||||
'content-type-builder': {
|
||||
visible: false;
|
||||
};
|
||||
};
|
||||
attributes: {
|
||||
action: Attribute.String &
|
||||
Attribute.Required &
|
||||
Attribute.SetMinMaxLength<{
|
||||
minLength: 1;
|
||||
}>;
|
||||
createdAt: Attribute.DateTime;
|
||||
createdBy: Attribute.Relation<
|
||||
'admin::api-token-permission',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
token: Attribute.Relation<
|
||||
'admin::api-token-permission',
|
||||
'manyToOne',
|
||||
'admin::api-token'
|
||||
>;
|
||||
updatedAt: Attribute.DateTime;
|
||||
updatedBy: Attribute.Relation<
|
||||
'admin::api-token-permission',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
};
|
||||
}
|
||||
|
||||
export interface AdminPermission extends Schema.CollectionType {
|
||||
collectionName: 'admin_permissions';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'Permission';
|
||||
name: 'Permission';
|
||||
pluralName: 'permissions';
|
||||
singularName: 'permission';
|
||||
};
|
||||
pluginOptions: {
|
||||
'content-manager': {
|
||||
visible: false;
|
||||
};
|
||||
'content-type-builder': {
|
||||
visible: false;
|
||||
};
|
||||
};
|
||||
attributes: {
|
||||
action: Attribute.String &
|
||||
Attribute.Required &
|
||||
Attribute.SetMinMaxLength<{
|
||||
minLength: 1;
|
||||
}>;
|
||||
actionParameters: Attribute.JSON & Attribute.DefaultTo<{}>;
|
||||
conditions: Attribute.JSON & Attribute.DefaultTo<[]>;
|
||||
createdAt: Attribute.DateTime;
|
||||
createdBy: Attribute.Relation<
|
||||
'admin::permission',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
properties: Attribute.JSON & Attribute.DefaultTo<{}>;
|
||||
role: Attribute.Relation<'admin::permission', 'manyToOne', 'admin::role'>;
|
||||
subject: Attribute.String &
|
||||
Attribute.SetMinMaxLength<{
|
||||
minLength: 1;
|
||||
}>;
|
||||
updatedAt: Attribute.DateTime;
|
||||
updatedBy: Attribute.Relation<
|
||||
'admin::permission',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
};
|
||||
}
|
||||
|
||||
export interface AdminRole extends Schema.CollectionType {
|
||||
collectionName: 'admin_roles';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'Role';
|
||||
name: 'Role';
|
||||
pluralName: 'roles';
|
||||
singularName: 'role';
|
||||
};
|
||||
pluginOptions: {
|
||||
'content-manager': {
|
||||
visible: false;
|
||||
};
|
||||
'content-type-builder': {
|
||||
visible: false;
|
||||
};
|
||||
};
|
||||
attributes: {
|
||||
code: Attribute.String &
|
||||
Attribute.Required &
|
||||
Attribute.Unique &
|
||||
Attribute.SetMinMaxLength<{
|
||||
minLength: 1;
|
||||
}>;
|
||||
createdAt: Attribute.DateTime;
|
||||
createdBy: Attribute.Relation<'admin::role', 'oneToOne', 'admin::user'> &
|
||||
Attribute.Private;
|
||||
description: Attribute.String;
|
||||
name: Attribute.String &
|
||||
Attribute.Required &
|
||||
Attribute.Unique &
|
||||
Attribute.SetMinMaxLength<{
|
||||
minLength: 1;
|
||||
}>;
|
||||
permissions: Attribute.Relation<
|
||||
'admin::role',
|
||||
'oneToMany',
|
||||
'admin::permission'
|
||||
>;
|
||||
updatedAt: Attribute.DateTime;
|
||||
updatedBy: Attribute.Relation<'admin::role', 'oneToOne', 'admin::user'> &
|
||||
Attribute.Private;
|
||||
users: Attribute.Relation<'admin::role', 'manyToMany', 'admin::user'>;
|
||||
};
|
||||
}
|
||||
|
||||
export interface AdminTransferToken extends Schema.CollectionType {
|
||||
collectionName: 'strapi_transfer_tokens';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'Transfer Token';
|
||||
name: 'Transfer Token';
|
||||
pluralName: 'transfer-tokens';
|
||||
singularName: 'transfer-token';
|
||||
};
|
||||
pluginOptions: {
|
||||
'content-manager': {
|
||||
visible: false;
|
||||
};
|
||||
'content-type-builder': {
|
||||
visible: false;
|
||||
};
|
||||
};
|
||||
attributes: {
|
||||
accessKey: Attribute.String &
|
||||
Attribute.Required &
|
||||
Attribute.SetMinMaxLength<{
|
||||
minLength: 1;
|
||||
}>;
|
||||
createdAt: Attribute.DateTime;
|
||||
createdBy: Attribute.Relation<
|
||||
'admin::transfer-token',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
description: Attribute.String &
|
||||
Attribute.SetMinMaxLength<{
|
||||
minLength: 1;
|
||||
}> &
|
||||
Attribute.DefaultTo<''>;
|
||||
expiresAt: Attribute.DateTime;
|
||||
lastUsedAt: Attribute.DateTime;
|
||||
lifespan: Attribute.BigInteger;
|
||||
name: Attribute.String &
|
||||
Attribute.Required &
|
||||
Attribute.Unique &
|
||||
Attribute.SetMinMaxLength<{
|
||||
minLength: 1;
|
||||
}>;
|
||||
permissions: Attribute.Relation<
|
||||
'admin::transfer-token',
|
||||
'oneToMany',
|
||||
'admin::transfer-token-permission'
|
||||
>;
|
||||
updatedAt: Attribute.DateTime;
|
||||
updatedBy: Attribute.Relation<
|
||||
'admin::transfer-token',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
};
|
||||
}
|
||||
|
||||
export interface AdminTransferTokenPermission extends Schema.CollectionType {
|
||||
collectionName: 'strapi_transfer_token_permissions';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'Transfer Token Permission';
|
||||
name: 'Transfer Token Permission';
|
||||
pluralName: 'transfer-token-permissions';
|
||||
singularName: 'transfer-token-permission';
|
||||
};
|
||||
pluginOptions: {
|
||||
'content-manager': {
|
||||
visible: false;
|
||||
};
|
||||
'content-type-builder': {
|
||||
visible: false;
|
||||
};
|
||||
};
|
||||
attributes: {
|
||||
action: Attribute.String &
|
||||
Attribute.Required &
|
||||
Attribute.SetMinMaxLength<{
|
||||
minLength: 1;
|
||||
}>;
|
||||
createdAt: Attribute.DateTime;
|
||||
createdBy: Attribute.Relation<
|
||||
'admin::transfer-token-permission',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
token: Attribute.Relation<
|
||||
'admin::transfer-token-permission',
|
||||
'manyToOne',
|
||||
'admin::transfer-token'
|
||||
>;
|
||||
updatedAt: Attribute.DateTime;
|
||||
updatedBy: Attribute.Relation<
|
||||
'admin::transfer-token-permission',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
};
|
||||
}
|
||||
|
||||
export interface AdminUser extends Schema.CollectionType {
|
||||
collectionName: 'admin_users';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'User';
|
||||
name: 'User';
|
||||
pluralName: 'users';
|
||||
singularName: 'user';
|
||||
};
|
||||
pluginOptions: {
|
||||
'content-manager': {
|
||||
visible: false;
|
||||
};
|
||||
'content-type-builder': {
|
||||
visible: false;
|
||||
};
|
||||
};
|
||||
attributes: {
|
||||
blocked: Attribute.Boolean & Attribute.Private & Attribute.DefaultTo<false>;
|
||||
createdAt: Attribute.DateTime;
|
||||
createdBy: Attribute.Relation<'admin::user', 'oneToOne', 'admin::user'> &
|
||||
Attribute.Private;
|
||||
email: Attribute.Email &
|
||||
Attribute.Required &
|
||||
Attribute.Private &
|
||||
Attribute.Unique &
|
||||
Attribute.SetMinMaxLength<{
|
||||
minLength: 6;
|
||||
}>;
|
||||
firstname: Attribute.String &
|
||||
Attribute.SetMinMaxLength<{
|
||||
minLength: 1;
|
||||
}>;
|
||||
isActive: Attribute.Boolean &
|
||||
Attribute.Private &
|
||||
Attribute.DefaultTo<false>;
|
||||
lastname: Attribute.String &
|
||||
Attribute.SetMinMaxLength<{
|
||||
minLength: 1;
|
||||
}>;
|
||||
password: Attribute.Password &
|
||||
Attribute.Private &
|
||||
Attribute.SetMinMaxLength<{
|
||||
minLength: 6;
|
||||
}>;
|
||||
preferedLanguage: Attribute.String;
|
||||
registrationToken: Attribute.String & Attribute.Private;
|
||||
resetPasswordToken: Attribute.String & Attribute.Private;
|
||||
roles: Attribute.Relation<'admin::user', 'manyToMany', 'admin::role'> &
|
||||
Attribute.Private;
|
||||
updatedAt: Attribute.DateTime;
|
||||
updatedBy: Attribute.Relation<'admin::user', 'oneToOne', 'admin::user'> &
|
||||
Attribute.Private;
|
||||
username: Attribute.String;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ApiNewsPostNewsPost extends Schema.CollectionType {
|
||||
collectionName: 'news_posts';
|
||||
info: {
|
||||
displayName: 'NewsPost';
|
||||
pluralName: 'news-posts';
|
||||
singularName: 'news-post';
|
||||
};
|
||||
options: {
|
||||
draftAndPublish: true;
|
||||
};
|
||||
attributes: {
|
||||
createdAt: Attribute.DateTime;
|
||||
createdBy: Attribute.Relation<
|
||||
'api::news-post.news-post',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
description: Attribute.String;
|
||||
imageUrl: Attribute.String;
|
||||
pageUrl: Attribute.String;
|
||||
publishedAt: Attribute.DateTime;
|
||||
title: Attribute.String;
|
||||
updatedAt: Attribute.DateTime;
|
||||
updatedBy: Attribute.Relation<
|
||||
'api::news-post.news-post',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ApiPointBalancePointBalance extends Schema.CollectionType {
|
||||
collectionName: 'point_balances';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'PointBalance';
|
||||
pluralName: 'point-balances';
|
||||
singularName: 'point-balance';
|
||||
};
|
||||
options: {
|
||||
draftAndPublish: true;
|
||||
};
|
||||
attributes: {
|
||||
createdAt: Attribute.DateTime;
|
||||
createdBy: Attribute.Relation<
|
||||
'api::point-balance.point-balance',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
publishedAt: Attribute.DateTime;
|
||||
total_points: Attribute.Integer;
|
||||
updatedAt: Attribute.DateTime;
|
||||
updatedBy: Attribute.Relation<
|
||||
'api::point-balance.point-balance',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
users_permissions_user: Attribute.Relation<
|
||||
'api::point-balance.point-balance',
|
||||
'oneToOne',
|
||||
'plugin::users-permissions.user'
|
||||
>;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ApiPointExchangeRequestPointExchangeRequest
|
||||
extends Schema.CollectionType {
|
||||
collectionName: 'point_exchange_requests';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'PointExchangeRequest';
|
||||
pluralName: 'point-exchange-requests';
|
||||
singularName: 'point-exchange-request';
|
||||
};
|
||||
options: {
|
||||
draftAndPublish: true;
|
||||
};
|
||||
attributes: {
|
||||
admin_note: Attribute.String;
|
||||
amount: Attribute.Integer;
|
||||
createdAt: Attribute.DateTime;
|
||||
createdBy: Attribute.Relation<
|
||||
'api::point-exchange-request.point-exchange-request',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
publishedAt: Attribute.DateTime;
|
||||
reason: Attribute.String;
|
||||
status: Attribute.Enumeration<['pending', 'approved', 'rejected']>;
|
||||
type: Attribute.Enumeration<['add', 'subtract']>;
|
||||
updatedAt: Attribute.DateTime;
|
||||
updatedBy: Attribute.Relation<
|
||||
'api::point-exchange-request.point-exchange-request',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
users_permissions_users: Attribute.Relation<
|
||||
'api::point-exchange-request.point-exchange-request',
|
||||
'oneToMany',
|
||||
'plugin::users-permissions.user'
|
||||
>;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ApiPointTransactionPointTransaction
|
||||
extends Schema.CollectionType {
|
||||
collectionName: 'point_transactions';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'PointTransaction';
|
||||
pluralName: 'point-transactions';
|
||||
singularName: 'point-transaction';
|
||||
};
|
||||
options: {
|
||||
draftAndPublish: true;
|
||||
};
|
||||
attributes: {
|
||||
amount: Attribute.Integer;
|
||||
createdAt: Attribute.DateTime;
|
||||
createdBy: Attribute.Relation<
|
||||
'api::point-transaction.point-transaction',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
description: Attribute.String;
|
||||
Enumeration: Attribute.Enumeration<['add', 'subtract', 'adjust']>;
|
||||
publishedAt: Attribute.DateTime;
|
||||
updatedAt: Attribute.DateTime;
|
||||
updatedBy: Attribute.Relation<
|
||||
'api::point-transaction.point-transaction',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
users_permissions_users: Attribute.Relation<
|
||||
'api::point-transaction.point-transaction',
|
||||
'oneToMany',
|
||||
'plugin::users-permissions.user'
|
||||
>;
|
||||
};
|
||||
}
|
||||
|
||||
export interface PluginContentReleasesRelease extends Schema.CollectionType {
|
||||
collectionName: 'strapi_releases';
|
||||
info: {
|
||||
displayName: 'Release';
|
||||
pluralName: 'releases';
|
||||
singularName: 'release';
|
||||
};
|
||||
options: {
|
||||
draftAndPublish: false;
|
||||
};
|
||||
pluginOptions: {
|
||||
'content-manager': {
|
||||
visible: false;
|
||||
};
|
||||
'content-type-builder': {
|
||||
visible: false;
|
||||
};
|
||||
};
|
||||
attributes: {
|
||||
actions: Attribute.Relation<
|
||||
'plugin::content-releases.release',
|
||||
'oneToMany',
|
||||
'plugin::content-releases.release-action'
|
||||
>;
|
||||
createdAt: Attribute.DateTime;
|
||||
createdBy: Attribute.Relation<
|
||||
'plugin::content-releases.release',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
name: Attribute.String & Attribute.Required;
|
||||
releasedAt: Attribute.DateTime;
|
||||
scheduledAt: Attribute.DateTime;
|
||||
status: Attribute.Enumeration<
|
||||
['ready', 'blocked', 'failed', 'done', 'empty']
|
||||
> &
|
||||
Attribute.Required;
|
||||
timezone: Attribute.String;
|
||||
updatedAt: Attribute.DateTime;
|
||||
updatedBy: Attribute.Relation<
|
||||
'plugin::content-releases.release',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
};
|
||||
}
|
||||
|
||||
export interface PluginContentReleasesReleaseAction
|
||||
extends Schema.CollectionType {
|
||||
collectionName: 'strapi_release_actions';
|
||||
info: {
|
||||
displayName: 'Release Action';
|
||||
pluralName: 'release-actions';
|
||||
singularName: 'release-action';
|
||||
};
|
||||
options: {
|
||||
draftAndPublish: false;
|
||||
};
|
||||
pluginOptions: {
|
||||
'content-manager': {
|
||||
visible: false;
|
||||
};
|
||||
'content-type-builder': {
|
||||
visible: false;
|
||||
};
|
||||
};
|
||||
attributes: {
|
||||
contentType: Attribute.String & Attribute.Required;
|
||||
createdAt: Attribute.DateTime;
|
||||
createdBy: Attribute.Relation<
|
||||
'plugin::content-releases.release-action',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
entry: Attribute.Relation<
|
||||
'plugin::content-releases.release-action',
|
||||
'morphToOne'
|
||||
>;
|
||||
isEntryValid: Attribute.Boolean;
|
||||
locale: Attribute.String;
|
||||
release: Attribute.Relation<
|
||||
'plugin::content-releases.release-action',
|
||||
'manyToOne',
|
||||
'plugin::content-releases.release'
|
||||
>;
|
||||
type: Attribute.Enumeration<['publish', 'unpublish']> & Attribute.Required;
|
||||
updatedAt: Attribute.DateTime;
|
||||
updatedBy: Attribute.Relation<
|
||||
'plugin::content-releases.release-action',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
};
|
||||
}
|
||||
|
||||
export interface PluginI18NLocale extends Schema.CollectionType {
|
||||
collectionName: 'i18n_locale';
|
||||
info: {
|
||||
collectionName: 'locales';
|
||||
description: '';
|
||||
displayName: 'Locale';
|
||||
pluralName: 'locales';
|
||||
singularName: 'locale';
|
||||
};
|
||||
options: {
|
||||
draftAndPublish: false;
|
||||
};
|
||||
pluginOptions: {
|
||||
'content-manager': {
|
||||
visible: false;
|
||||
};
|
||||
'content-type-builder': {
|
||||
visible: false;
|
||||
};
|
||||
};
|
||||
attributes: {
|
||||
code: Attribute.String & Attribute.Unique;
|
||||
createdAt: Attribute.DateTime;
|
||||
createdBy: Attribute.Relation<
|
||||
'plugin::i18n.locale',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
name: Attribute.String &
|
||||
Attribute.SetMinMax<
|
||||
{
|
||||
max: 50;
|
||||
min: 1;
|
||||
},
|
||||
number
|
||||
>;
|
||||
updatedAt: Attribute.DateTime;
|
||||
updatedBy: Attribute.Relation<
|
||||
'plugin::i18n.locale',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
};
|
||||
}
|
||||
|
||||
export interface PluginUploadFile extends Schema.CollectionType {
|
||||
collectionName: 'files';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'File';
|
||||
pluralName: 'files';
|
||||
singularName: 'file';
|
||||
};
|
||||
pluginOptions: {
|
||||
'content-manager': {
|
||||
visible: false;
|
||||
};
|
||||
'content-type-builder': {
|
||||
visible: false;
|
||||
};
|
||||
};
|
||||
attributes: {
|
||||
alternativeText: Attribute.String;
|
||||
caption: Attribute.String;
|
||||
createdAt: Attribute.DateTime;
|
||||
createdBy: Attribute.Relation<
|
||||
'plugin::upload.file',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
ext: Attribute.String;
|
||||
folder: Attribute.Relation<
|
||||
'plugin::upload.file',
|
||||
'manyToOne',
|
||||
'plugin::upload.folder'
|
||||
> &
|
||||
Attribute.Private;
|
||||
folderPath: Attribute.String &
|
||||
Attribute.Required &
|
||||
Attribute.Private &
|
||||
Attribute.SetMinMax<
|
||||
{
|
||||
min: 1;
|
||||
},
|
||||
number
|
||||
>;
|
||||
formats: Attribute.JSON;
|
||||
hash: Attribute.String & Attribute.Required;
|
||||
height: Attribute.Integer;
|
||||
mime: Attribute.String & Attribute.Required;
|
||||
name: Attribute.String & Attribute.Required;
|
||||
previewUrl: Attribute.String;
|
||||
provider: Attribute.String & Attribute.Required;
|
||||
provider_metadata: Attribute.JSON;
|
||||
related: Attribute.Relation<'plugin::upload.file', 'morphToMany'>;
|
||||
size: Attribute.Decimal & Attribute.Required;
|
||||
updatedAt: Attribute.DateTime;
|
||||
updatedBy: Attribute.Relation<
|
||||
'plugin::upload.file',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
url: Attribute.String & Attribute.Required;
|
||||
width: Attribute.Integer;
|
||||
};
|
||||
}
|
||||
|
||||
export interface PluginUploadFolder extends Schema.CollectionType {
|
||||
collectionName: 'upload_folders';
|
||||
info: {
|
||||
displayName: 'Folder';
|
||||
pluralName: 'folders';
|
||||
singularName: 'folder';
|
||||
};
|
||||
pluginOptions: {
|
||||
'content-manager': {
|
||||
visible: false;
|
||||
};
|
||||
'content-type-builder': {
|
||||
visible: false;
|
||||
};
|
||||
};
|
||||
attributes: {
|
||||
children: Attribute.Relation<
|
||||
'plugin::upload.folder',
|
||||
'oneToMany',
|
||||
'plugin::upload.folder'
|
||||
>;
|
||||
createdAt: Attribute.DateTime;
|
||||
createdBy: Attribute.Relation<
|
||||
'plugin::upload.folder',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
files: Attribute.Relation<
|
||||
'plugin::upload.folder',
|
||||
'oneToMany',
|
||||
'plugin::upload.file'
|
||||
>;
|
||||
name: Attribute.String &
|
||||
Attribute.Required &
|
||||
Attribute.SetMinMax<
|
||||
{
|
||||
min: 1;
|
||||
},
|
||||
number
|
||||
>;
|
||||
parent: Attribute.Relation<
|
||||
'plugin::upload.folder',
|
||||
'manyToOne',
|
||||
'plugin::upload.folder'
|
||||
>;
|
||||
path: Attribute.String &
|
||||
Attribute.Required &
|
||||
Attribute.SetMinMax<
|
||||
{
|
||||
min: 1;
|
||||
},
|
||||
number
|
||||
>;
|
||||
pathId: Attribute.Integer & Attribute.Required & Attribute.Unique;
|
||||
updatedAt: Attribute.DateTime;
|
||||
updatedBy: Attribute.Relation<
|
||||
'plugin::upload.folder',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
};
|
||||
}
|
||||
|
||||
export interface PluginUsersPermissionsPermission
|
||||
extends Schema.CollectionType {
|
||||
collectionName: 'up_permissions';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'Permission';
|
||||
name: 'permission';
|
||||
pluralName: 'permissions';
|
||||
singularName: 'permission';
|
||||
};
|
||||
pluginOptions: {
|
||||
'content-manager': {
|
||||
visible: false;
|
||||
};
|
||||
'content-type-builder': {
|
||||
visible: false;
|
||||
};
|
||||
};
|
||||
attributes: {
|
||||
action: Attribute.String & Attribute.Required;
|
||||
createdAt: Attribute.DateTime;
|
||||
createdBy: Attribute.Relation<
|
||||
'plugin::users-permissions.permission',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
role: Attribute.Relation<
|
||||
'plugin::users-permissions.permission',
|
||||
'manyToOne',
|
||||
'plugin::users-permissions.role'
|
||||
>;
|
||||
updatedAt: Attribute.DateTime;
|
||||
updatedBy: Attribute.Relation<
|
||||
'plugin::users-permissions.permission',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
};
|
||||
}
|
||||
|
||||
export interface PluginUsersPermissionsRole extends Schema.CollectionType {
|
||||
collectionName: 'up_roles';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'Role';
|
||||
name: 'role';
|
||||
pluralName: 'roles';
|
||||
singularName: 'role';
|
||||
};
|
||||
pluginOptions: {
|
||||
'content-manager': {
|
||||
visible: false;
|
||||
};
|
||||
'content-type-builder': {
|
||||
visible: false;
|
||||
};
|
||||
};
|
||||
attributes: {
|
||||
createdAt: Attribute.DateTime;
|
||||
createdBy: Attribute.Relation<
|
||||
'plugin::users-permissions.role',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
description: Attribute.String;
|
||||
name: Attribute.String &
|
||||
Attribute.Required &
|
||||
Attribute.SetMinMaxLength<{
|
||||
minLength: 3;
|
||||
}>;
|
||||
permissions: Attribute.Relation<
|
||||
'plugin::users-permissions.role',
|
||||
'oneToMany',
|
||||
'plugin::users-permissions.permission'
|
||||
>;
|
||||
type: Attribute.String & Attribute.Unique;
|
||||
updatedAt: Attribute.DateTime;
|
||||
updatedBy: Attribute.Relation<
|
||||
'plugin::users-permissions.role',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
users: Attribute.Relation<
|
||||
'plugin::users-permissions.role',
|
||||
'oneToMany',
|
||||
'plugin::users-permissions.user'
|
||||
>;
|
||||
};
|
||||
}
|
||||
|
||||
export interface PluginUsersPermissionsUser extends Schema.CollectionType {
|
||||
collectionName: 'up_users';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'User';
|
||||
name: 'user';
|
||||
pluralName: 'users';
|
||||
singularName: 'user';
|
||||
};
|
||||
options: {
|
||||
draftAndPublish: false;
|
||||
timestamps: true;
|
||||
};
|
||||
attributes: {
|
||||
blocked: Attribute.Boolean & Attribute.DefaultTo<false>;
|
||||
confirmationToken: Attribute.String & Attribute.Private;
|
||||
confirmed: Attribute.Boolean & Attribute.DefaultTo<false>;
|
||||
createdAt: Attribute.DateTime;
|
||||
createdBy: Attribute.Relation<
|
||||
'plugin::users-permissions.user',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
email: Attribute.Email &
|
||||
Attribute.Required &
|
||||
Attribute.SetMinMaxLength<{
|
||||
minLength: 6;
|
||||
}>;
|
||||
password: Attribute.Password &
|
||||
Attribute.Private &
|
||||
Attribute.SetMinMaxLength<{
|
||||
minLength: 6;
|
||||
}>;
|
||||
provider: Attribute.String;
|
||||
resetPasswordToken: Attribute.String & Attribute.Private;
|
||||
role: Attribute.Relation<
|
||||
'plugin::users-permissions.user',
|
||||
'manyToOne',
|
||||
'plugin::users-permissions.role'
|
||||
>;
|
||||
updatedAt: Attribute.DateTime;
|
||||
updatedBy: Attribute.Relation<
|
||||
'plugin::users-permissions.user',
|
||||
'oneToOne',
|
||||
'admin::user'
|
||||
> &
|
||||
Attribute.Private;
|
||||
username: Attribute.String &
|
||||
Attribute.Required &
|
||||
Attribute.Unique &
|
||||
Attribute.SetMinMaxLength<{
|
||||
minLength: 3;
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
declare module '@strapi/types' {
|
||||
export module Shared {
|
||||
export interface ContentTypes {
|
||||
'admin::api-token': AdminApiToken;
|
||||
'admin::api-token-permission': AdminApiTokenPermission;
|
||||
'admin::permission': AdminPermission;
|
||||
'admin::role': AdminRole;
|
||||
'admin::transfer-token': AdminTransferToken;
|
||||
'admin::transfer-token-permission': AdminTransferTokenPermission;
|
||||
'admin::user': AdminUser;
|
||||
'api::news-post.news-post': ApiNewsPostNewsPost;
|
||||
'api::point-balance.point-balance': ApiPointBalancePointBalance;
|
||||
'api::point-exchange-request.point-exchange-request': ApiPointExchangeRequestPointExchangeRequest;
|
||||
'api::point-transaction.point-transaction': ApiPointTransactionPointTransaction;
|
||||
'plugin::content-releases.release': PluginContentReleasesRelease;
|
||||
'plugin::content-releases.release-action': PluginContentReleasesReleaseAction;
|
||||
'plugin::i18n.locale': PluginI18NLocale;
|
||||
'plugin::upload.file': PluginUploadFile;
|
||||
'plugin::upload.folder': PluginUploadFolder;
|
||||
'plugin::users-permissions.permission': PluginUsersPermissionsPermission;
|
||||
'plugin::users-permissions.role': PluginUsersPermissionsRole;
|
||||
'plugin::users-permissions.user': PluginUsersPermissionsUser;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user