This commit is contained in:
Artur
2024-10-24 14:43:55 -03:00
commit 66d06e460d
36 changed files with 22118 additions and 0 deletions

7
.env.example Normal file
View 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

131
.gitignore vendored Normal file
View File

@@ -0,0 +1,131 @@
############################
# 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
.tsbuildinfo
.eslintcache
############################
# Node.js
############################
lib-cov
lcov.info
pids
logs
results
node_modules
.node_history
############################
# Package managers
############################
.yarn/*
!.yarn/cache
!.yarn/unplugged
!.yarn/patches
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.pnp.*
yarn-error.log
############################
# Tests
############################
coverage
############################
# Strapi
############################
.env
license.txt
exports
.strapi
dist
build
.strapi-updater.json
.strapi-cloud.json

61
README.md Normal file
View File

@@ -0,0 +1,61 @@
# 🚀 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 Normal file
View 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 Normal file
View File

@@ -0,0 +1,7 @@
export default {
rest: {
defaultLimit: 25,
maxLimit: 100,
withCount: true,
},
};

60
config/database.ts Normal file
View File

@@ -0,0 +1,60 @@
import path from 'path';
export default ({ env }) => {
const client = env('DATABASE_CLIENT', 'sqlite');
const connections = {
mysql: {
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 Normal file
View 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 Normal file
View File

@@ -0,0 +1 @@
export default () => ({});

7
config/server.ts Normal file
View File

@@ -0,0 +1,7 @@
export default ({ env }) => ({
host: env('HOST', '0.0.0.0'),
port: env.int('PORT', 1337),
app: {
keys: env.array('APP_KEYS'),
},
});

View File

BIN
favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

20437
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

36
package.json Normal file
View File

@@ -0,0 +1,36 @@
{
"name": "campaign-site-strapi",
"version": "0.1.0",
"private": true,
"description": "A Strapi application",
"scripts": {
"build": "strapi build",
"deploy": "strapi deploy",
"develop": "strapi develop",
"start": "strapi start",
"strapi": "strapi"
},
"dependencies": {
"@strapi/plugin-cloud": "^5.1.0",
"@strapi/plugin-users-permissions": "^5.1.0",
"@strapi/strapi": "^5.1.0",
"pg": "^8.8.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.0.0",
"styled-components": "^6.0.0"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"typescript": "^5"
},
"engines": {
"node": ">=18.0.0 <=20.x.x",
"npm": ">=6.0.0"
},
"strapi": {
"uuid": "5abf6821-db81-4a9d-86eb-69ff422ab730"
}
}

3
public/robots.txt Normal file
View 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 Normal file
View File

37
src/admin/app.example.tsx Normal file
View File

@@ -0,0 +1,37 @@
import type { StrapiApp } from '@strapi/strapi/admin';
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: StrapiApp) {
console.log(app);
},
};

20
src/admin/tsconfig.json Normal file
View File

@@ -0,0 +1,20 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Bundler",
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["../plugins/**/admin/src/**/*", "./"],
"exclude": ["node_modules/", "build/", "dist/", "**/*.test.ts"]
}

View File

@@ -0,0 +1,12 @@
import { mergeConfig, type UserConfig } from 'vite';
export default (config: UserConfig) => {
// Important: always return the modified config
return mergeConfig(config, {
resolve: {
alias: {
'@': '/src',
},
},
});
};

0
src/api/.gitkeep Normal file
View File

View File

@@ -0,0 +1,50 @@
{
"kind": "collectionType",
"collectionName": "orders",
"info": {
"singularName": "order",
"pluralName": "orders",
"displayName": "Order"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"perk": {
"type": "relation",
"relation": "oneToOne",
"target": "api::perk.perk"
},
"userId": {
"type": "string",
"required": true
},
"userEmail": {
"type": "email",
"required": true
},
"shippingAddressLine1": {
"type": "string",
"required": false
},
"shippingAddressLine2": {
"type": "string"
},
"shippingCity": {
"type": "string"
},
"shippingState": {
"type": "string"
},
"shippingCountry": {
"type": "string"
},
"shippingZip": {
"type": "string"
},
"shippingPhone": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,7 @@
/**
* order controller
*/
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::order.order');

View File

@@ -0,0 +1,7 @@
/**
* order router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::order.order');

View File

@@ -0,0 +1,7 @@
/**
* order service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::order.order');

View File

@@ -0,0 +1,47 @@
{
"kind": "collectionType",
"collectionName": "perks",
"info": {
"singularName": "perk",
"pluralName": "perks",
"displayName": "Perk",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"name": {
"type": "string",
"required": true
},
"price": {
"type": "integer",
"required": true
},
"images": {
"type": "media",
"multiple": true,
"required": true,
"allowedTypes": [
"images",
"files"
]
},
"fundSlugWhitelist": {
"type": "string",
"required": false,
"regex": "^(monero|firo|privacyguides|general)(,(monero|firo|privacyguides|general))*$"
},
"needsShippingAddress": {
"type": "boolean",
"required": false,
"default": true
},
"description": {
"type": "text",
"required": true
}
}
}

View File

@@ -0,0 +1,7 @@
/**
* perk controller
*/
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::perk.perk');

View File

@@ -0,0 +1,7 @@
/**
* perk router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::perk.perk');

View File

@@ -0,0 +1,7 @@
/**
* perk service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::perk.perk');

View File

@@ -0,0 +1,51 @@
{
"kind": "collectionType",
"collectionName": "points",
"info": {
"singularName": "point",
"pluralName": "points",
"displayName": "Point",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"balanceChange": {
"type": "biginteger",
"required": true
},
"balance": {
"type": "biginteger",
"required": true
},
"perk": {
"type": "relation",
"relation": "oneToOne",
"target": "api::perk.perk"
},
"order": {
"type": "relation",
"relation": "oneToOne",
"target": "api::order.order"
},
"userId": {
"type": "string",
"required": true
},
"donationId": {
"type": "string",
"required": false
},
"donationProjectSlug": {
"type": "string"
},
"donationProjectName": {
"type": "string"
},
"donationFundSlug": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,7 @@
/**
* point controller
*/
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::point.point');

View File

@@ -0,0 +1,7 @@
/**
* point router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::point.point');

View File

@@ -0,0 +1,7 @@
/**
* point service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::point.point');

0
src/extensions/.gitkeep Normal file
View File

20
src/index.ts Normal file
View File

@@ -0,0 +1,20 @@
// import type { Core } from '@strapi/strapi';
export default {
/**
* An asynchronous register function that runs before
* your application is initialized.
*
* This gives you an opportunity to extend code.
*/
register(/* { strapi }: { strapi: Core.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 }: { strapi: Core.Strapi } */) {},
};

43
tsconfig.json Normal file
View File

@@ -0,0 +1,43 @@
{
"compilerOptions": {
"module": "CommonJS",
"moduleResolution": "Node",
"lib": ["ES2020"],
"target": "ES2019",
"strict": false,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"incremental": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"noEmitOnError": true,
"noImplicitThis": true,
"outDir": "dist",
"rootDir": "."
},
"include": [
// Include root files
"./",
// Include all ts files
"./**/*.ts",
// Include all js files
"./**/*.js",
// Force the JSON files in the src folder to be included
"src/**/*.json"
],
"exclude": [
"node_modules/",
"build/",
"dist/",
".cache/",
".tmp/",
// Do not include admin files in the server compilation
"src/admin/",
// Do not include test files
"**/*.test.*",
// Do not include plugins in the server compilation
"src/plugins/**"
]
}

3
types/generated/components.d.ts vendored Normal file
View File

@@ -0,0 +1,3 @@
/*
* The app doesn't have any components yet.
*/

993
types/generated/contentTypes.d.ts vendored Normal file
View File

@@ -0,0 +1,993 @@
import type { Struct, Schema } from '@strapi/strapi';
export interface PluginUploadFile extends Struct.CollectionTypeSchema {
collectionName: 'files';
info: {
singularName: 'file';
pluralName: 'files';
displayName: 'File';
description: '';
};
options: {
draftAndPublish: false;
};
pluginOptions: {
'content-manager': {
visible: false;
};
'content-type-builder': {
visible: false;
};
};
attributes: {
name: Schema.Attribute.String & Schema.Attribute.Required;
alternativeText: Schema.Attribute.String;
caption: Schema.Attribute.String;
width: Schema.Attribute.Integer;
height: Schema.Attribute.Integer;
formats: Schema.Attribute.JSON;
hash: Schema.Attribute.String & Schema.Attribute.Required;
ext: Schema.Attribute.String;
mime: Schema.Attribute.String & Schema.Attribute.Required;
size: Schema.Attribute.Decimal & Schema.Attribute.Required;
url: Schema.Attribute.String & Schema.Attribute.Required;
previewUrl: Schema.Attribute.String;
provider: Schema.Attribute.String & Schema.Attribute.Required;
provider_metadata: Schema.Attribute.JSON;
related: Schema.Attribute.Relation<'morphToMany'>;
folder: Schema.Attribute.Relation<'manyToOne', 'plugin::upload.folder'> &
Schema.Attribute.Private;
folderPath: Schema.Attribute.String &
Schema.Attribute.Required &
Schema.Attribute.Private &
Schema.Attribute.SetMinMaxLength<{
minLength: 1;
}>;
createdAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
publishedAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<
'oneToMany',
'plugin::upload.file'
> &
Schema.Attribute.Private;
};
}
export interface PluginUploadFolder extends Struct.CollectionTypeSchema {
collectionName: 'upload_folders';
info: {
singularName: 'folder';
pluralName: 'folders';
displayName: 'Folder';
};
options: {
draftAndPublish: false;
};
pluginOptions: {
'content-manager': {
visible: false;
};
'content-type-builder': {
visible: false;
};
};
attributes: {
name: Schema.Attribute.String &
Schema.Attribute.Required &
Schema.Attribute.SetMinMaxLength<{
minLength: 1;
}>;
pathId: Schema.Attribute.Integer &
Schema.Attribute.Required &
Schema.Attribute.Unique;
parent: Schema.Attribute.Relation<'manyToOne', 'plugin::upload.folder'>;
children: Schema.Attribute.Relation<'oneToMany', 'plugin::upload.folder'>;
files: Schema.Attribute.Relation<'oneToMany', 'plugin::upload.file'>;
path: Schema.Attribute.String &
Schema.Attribute.Required &
Schema.Attribute.SetMinMaxLength<{
minLength: 1;
}>;
createdAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
publishedAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<
'oneToMany',
'plugin::upload.folder'
> &
Schema.Attribute.Private;
};
}
export interface PluginI18NLocale extends Struct.CollectionTypeSchema {
collectionName: 'i18n_locale';
info: {
singularName: 'locale';
pluralName: 'locales';
collectionName: 'locales';
displayName: 'Locale';
description: '';
};
options: {
draftAndPublish: false;
};
pluginOptions: {
'content-manager': {
visible: false;
};
'content-type-builder': {
visible: false;
};
};
attributes: {
name: Schema.Attribute.String &
Schema.Attribute.SetMinMax<
{
min: 1;
max: 50;
},
number
>;
code: Schema.Attribute.String & Schema.Attribute.Unique;
createdAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
publishedAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<
'oneToMany',
'plugin::i18n.locale'
> &
Schema.Attribute.Private;
};
}
export interface PluginContentReleasesRelease
extends Struct.CollectionTypeSchema {
collectionName: 'strapi_releases';
info: {
singularName: 'release';
pluralName: 'releases';
displayName: 'Release';
};
options: {
draftAndPublish: false;
};
pluginOptions: {
'content-manager': {
visible: false;
};
'content-type-builder': {
visible: false;
};
};
attributes: {
name: Schema.Attribute.String & Schema.Attribute.Required;
releasedAt: Schema.Attribute.DateTime;
scheduledAt: Schema.Attribute.DateTime;
timezone: Schema.Attribute.String;
status: Schema.Attribute.Enumeration<
['ready', 'blocked', 'failed', 'done', 'empty']
> &
Schema.Attribute.Required;
actions: Schema.Attribute.Relation<
'oneToMany',
'plugin::content-releases.release-action'
>;
createdAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
publishedAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<
'oneToMany',
'plugin::content-releases.release'
> &
Schema.Attribute.Private;
};
}
export interface PluginContentReleasesReleaseAction
extends Struct.CollectionTypeSchema {
collectionName: 'strapi_release_actions';
info: {
singularName: 'release-action';
pluralName: 'release-actions';
displayName: 'Release Action';
};
options: {
draftAndPublish: false;
};
pluginOptions: {
'content-manager': {
visible: false;
};
'content-type-builder': {
visible: false;
};
};
attributes: {
type: Schema.Attribute.Enumeration<['publish', 'unpublish']> &
Schema.Attribute.Required;
contentType: Schema.Attribute.String & Schema.Attribute.Required;
entryDocumentId: Schema.Attribute.String;
locale: Schema.Attribute.String & Schema.Attribute.Private;
release: Schema.Attribute.Relation<
'manyToOne',
'plugin::content-releases.release'
>;
isEntryValid: Schema.Attribute.Boolean;
createdAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
publishedAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<
'oneToMany',
'plugin::content-releases.release-action'
> &
Schema.Attribute.Private;
};
}
export interface PluginReviewWorkflowsWorkflow
extends Struct.CollectionTypeSchema {
collectionName: 'strapi_workflows';
info: {
name: 'Workflow';
description: '';
singularName: 'workflow';
pluralName: 'workflows';
displayName: 'Workflow';
};
options: {
draftAndPublish: false;
};
pluginOptions: {
'content-manager': {
visible: false;
};
'content-type-builder': {
visible: false;
};
};
attributes: {
name: Schema.Attribute.String &
Schema.Attribute.Required &
Schema.Attribute.Unique;
stages: Schema.Attribute.Relation<
'oneToMany',
'plugin::review-workflows.workflow-stage'
>;
contentTypes: Schema.Attribute.JSON &
Schema.Attribute.Required &
Schema.Attribute.DefaultTo<'[]'>;
createdAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
publishedAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<
'oneToMany',
'plugin::review-workflows.workflow'
> &
Schema.Attribute.Private;
};
}
export interface PluginReviewWorkflowsWorkflowStage
extends Struct.CollectionTypeSchema {
collectionName: 'strapi_workflows_stages';
info: {
name: 'Workflow Stage';
description: '';
singularName: 'workflow-stage';
pluralName: 'workflow-stages';
displayName: 'Stages';
};
options: {
version: '1.1.0';
draftAndPublish: false;
};
pluginOptions: {
'content-manager': {
visible: false;
};
'content-type-builder': {
visible: false;
};
};
attributes: {
name: Schema.Attribute.String;
color: Schema.Attribute.String & Schema.Attribute.DefaultTo<'#4945FF'>;
workflow: Schema.Attribute.Relation<
'manyToOne',
'plugin::review-workflows.workflow'
>;
permissions: Schema.Attribute.Relation<'manyToMany', 'admin::permission'>;
createdAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
publishedAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<
'oneToMany',
'plugin::review-workflows.workflow-stage'
> &
Schema.Attribute.Private;
};
}
export interface PluginUsersPermissionsPermission
extends Struct.CollectionTypeSchema {
collectionName: 'up_permissions';
info: {
name: 'permission';
description: '';
singularName: 'permission';
pluralName: 'permissions';
displayName: 'Permission';
};
options: {
draftAndPublish: false;
};
pluginOptions: {
'content-manager': {
visible: false;
};
'content-type-builder': {
visible: false;
};
};
attributes: {
action: Schema.Attribute.String & Schema.Attribute.Required;
role: Schema.Attribute.Relation<
'manyToOne',
'plugin::users-permissions.role'
>;
createdAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
publishedAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<
'oneToMany',
'plugin::users-permissions.permission'
> &
Schema.Attribute.Private;
};
}
export interface PluginUsersPermissionsRole
extends Struct.CollectionTypeSchema {
collectionName: 'up_roles';
info: {
name: 'role';
description: '';
singularName: 'role';
pluralName: 'roles';
displayName: 'Role';
};
options: {
draftAndPublish: false;
};
pluginOptions: {
'content-manager': {
visible: false;
};
'content-type-builder': {
visible: false;
};
};
attributes: {
name: Schema.Attribute.String &
Schema.Attribute.Required &
Schema.Attribute.SetMinMaxLength<{
minLength: 3;
}>;
description: Schema.Attribute.String;
type: Schema.Attribute.String & Schema.Attribute.Unique;
permissions: Schema.Attribute.Relation<
'oneToMany',
'plugin::users-permissions.permission'
>;
users: Schema.Attribute.Relation<
'oneToMany',
'plugin::users-permissions.user'
>;
createdAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
publishedAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<
'oneToMany',
'plugin::users-permissions.role'
> &
Schema.Attribute.Private;
};
}
export interface PluginUsersPermissionsUser
extends Struct.CollectionTypeSchema {
collectionName: 'up_users';
info: {
name: 'user';
description: '';
singularName: 'user';
pluralName: 'users';
displayName: 'User';
};
options: {
timestamps: true;
draftAndPublish: false;
};
attributes: {
username: Schema.Attribute.String &
Schema.Attribute.Required &
Schema.Attribute.Unique &
Schema.Attribute.SetMinMaxLength<{
minLength: 3;
}>;
email: Schema.Attribute.Email &
Schema.Attribute.Required &
Schema.Attribute.SetMinMaxLength<{
minLength: 6;
}>;
provider: Schema.Attribute.String;
password: Schema.Attribute.Password &
Schema.Attribute.Private &
Schema.Attribute.SetMinMaxLength<{
minLength: 6;
}>;
resetPasswordToken: Schema.Attribute.String & Schema.Attribute.Private;
confirmationToken: Schema.Attribute.String & Schema.Attribute.Private;
confirmed: Schema.Attribute.Boolean & Schema.Attribute.DefaultTo<false>;
blocked: Schema.Attribute.Boolean & Schema.Attribute.DefaultTo<false>;
role: Schema.Attribute.Relation<
'manyToOne',
'plugin::users-permissions.role'
>;
createdAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
publishedAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<
'oneToMany',
'plugin::users-permissions.user'
> &
Schema.Attribute.Private;
};
}
export interface ApiOrderOrder extends Struct.CollectionTypeSchema {
collectionName: 'orders';
info: {
singularName: 'order';
pluralName: 'orders';
displayName: 'Order';
};
options: {
draftAndPublish: true;
};
attributes: {
perk: Schema.Attribute.Relation<'oneToOne', 'api::perk.perk'>;
userId: Schema.Attribute.String & Schema.Attribute.Required;
userEmail: Schema.Attribute.Email & Schema.Attribute.Required;
shippingAddressLine1: Schema.Attribute.String;
shippingAddressLine2: Schema.Attribute.String;
shippingCity: Schema.Attribute.String;
shippingState: Schema.Attribute.String;
shippingCountry: Schema.Attribute.String;
shippingZip: Schema.Attribute.String;
shippingPhone: Schema.Attribute.String;
createdAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
publishedAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<'oneToMany', 'api::order.order'> &
Schema.Attribute.Private;
};
}
export interface ApiPerkPerk extends Struct.CollectionTypeSchema {
collectionName: 'perks';
info: {
singularName: 'perk';
pluralName: 'perks';
displayName: 'Perk';
description: '';
};
options: {
draftAndPublish: true;
};
attributes: {
name: Schema.Attribute.String & Schema.Attribute.Required;
price: Schema.Attribute.Integer & Schema.Attribute.Required;
images: Schema.Attribute.Media<'images' | 'files', true> &
Schema.Attribute.Required;
fundSlugWhitelist: Schema.Attribute.String;
needsShippingAddress: Schema.Attribute.Boolean &
Schema.Attribute.DefaultTo<true>;
description: Schema.Attribute.Text & Schema.Attribute.Required;
createdAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
publishedAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<'oneToMany', 'api::perk.perk'> &
Schema.Attribute.Private;
};
}
export interface ApiPointPoint extends Struct.CollectionTypeSchema {
collectionName: 'points';
info: {
singularName: 'point';
pluralName: 'points';
displayName: 'Point';
description: '';
};
options: {
draftAndPublish: true;
};
attributes: {
balanceChange: Schema.Attribute.BigInteger & Schema.Attribute.Required;
balance: Schema.Attribute.BigInteger & Schema.Attribute.Required;
perk: Schema.Attribute.Relation<'oneToOne', 'api::perk.perk'>;
order: Schema.Attribute.Relation<'oneToOne', 'api::order.order'>;
userId: Schema.Attribute.String & Schema.Attribute.Required;
donationId: Schema.Attribute.String;
donationProjectSlug: Schema.Attribute.String;
donationProjectName: Schema.Attribute.String;
donationFundSlug: Schema.Attribute.String;
createdAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
publishedAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<'oneToMany', 'api::point.point'> &
Schema.Attribute.Private;
};
}
export interface AdminPermission extends Struct.CollectionTypeSchema {
collectionName: 'admin_permissions';
info: {
name: 'Permission';
description: '';
singularName: 'permission';
pluralName: 'permissions';
displayName: 'Permission';
};
options: {
draftAndPublish: false;
};
pluginOptions: {
'content-manager': {
visible: false;
};
'content-type-builder': {
visible: false;
};
};
attributes: {
action: Schema.Attribute.String &
Schema.Attribute.Required &
Schema.Attribute.SetMinMaxLength<{
minLength: 1;
}>;
actionParameters: Schema.Attribute.JSON & Schema.Attribute.DefaultTo<{}>;
subject: Schema.Attribute.String &
Schema.Attribute.SetMinMaxLength<{
minLength: 1;
}>;
properties: Schema.Attribute.JSON & Schema.Attribute.DefaultTo<{}>;
conditions: Schema.Attribute.JSON & Schema.Attribute.DefaultTo<[]>;
role: Schema.Attribute.Relation<'manyToOne', 'admin::role'>;
createdAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
publishedAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<'oneToMany', 'admin::permission'> &
Schema.Attribute.Private;
};
}
export interface AdminUser extends Struct.CollectionTypeSchema {
collectionName: 'admin_users';
info: {
name: 'User';
description: '';
singularName: 'user';
pluralName: 'users';
displayName: 'User';
};
options: {
draftAndPublish: false;
};
pluginOptions: {
'content-manager': {
visible: false;
};
'content-type-builder': {
visible: false;
};
};
attributes: {
firstname: Schema.Attribute.String &
Schema.Attribute.SetMinMaxLength<{
minLength: 1;
}>;
lastname: Schema.Attribute.String &
Schema.Attribute.SetMinMaxLength<{
minLength: 1;
}>;
username: Schema.Attribute.String;
email: Schema.Attribute.Email &
Schema.Attribute.Required &
Schema.Attribute.Private &
Schema.Attribute.Unique &
Schema.Attribute.SetMinMaxLength<{
minLength: 6;
}>;
password: Schema.Attribute.Password &
Schema.Attribute.Private &
Schema.Attribute.SetMinMaxLength<{
minLength: 6;
}>;
resetPasswordToken: Schema.Attribute.String & Schema.Attribute.Private;
registrationToken: Schema.Attribute.String & Schema.Attribute.Private;
isActive: Schema.Attribute.Boolean &
Schema.Attribute.Private &
Schema.Attribute.DefaultTo<false>;
roles: Schema.Attribute.Relation<'manyToMany', 'admin::role'> &
Schema.Attribute.Private;
blocked: Schema.Attribute.Boolean &
Schema.Attribute.Private &
Schema.Attribute.DefaultTo<false>;
preferedLanguage: Schema.Attribute.String;
createdAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
publishedAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<'oneToMany', 'admin::user'> &
Schema.Attribute.Private;
};
}
export interface AdminRole extends Struct.CollectionTypeSchema {
collectionName: 'admin_roles';
info: {
name: 'Role';
description: '';
singularName: 'role';
pluralName: 'roles';
displayName: 'Role';
};
options: {
draftAndPublish: false;
};
pluginOptions: {
'content-manager': {
visible: false;
};
'content-type-builder': {
visible: false;
};
};
attributes: {
name: Schema.Attribute.String &
Schema.Attribute.Required &
Schema.Attribute.Unique &
Schema.Attribute.SetMinMaxLength<{
minLength: 1;
}>;
code: Schema.Attribute.String &
Schema.Attribute.Required &
Schema.Attribute.Unique &
Schema.Attribute.SetMinMaxLength<{
minLength: 1;
}>;
description: Schema.Attribute.String;
users: Schema.Attribute.Relation<'manyToMany', 'admin::user'>;
permissions: Schema.Attribute.Relation<'oneToMany', 'admin::permission'>;
createdAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
publishedAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<'oneToMany', 'admin::role'> &
Schema.Attribute.Private;
};
}
export interface AdminApiToken extends Struct.CollectionTypeSchema {
collectionName: 'strapi_api_tokens';
info: {
name: 'Api Token';
singularName: 'api-token';
pluralName: 'api-tokens';
displayName: 'Api Token';
description: '';
};
options: {
draftAndPublish: false;
};
pluginOptions: {
'content-manager': {
visible: false;
};
'content-type-builder': {
visible: false;
};
};
attributes: {
name: Schema.Attribute.String &
Schema.Attribute.Required &
Schema.Attribute.Unique &
Schema.Attribute.SetMinMaxLength<{
minLength: 1;
}>;
description: Schema.Attribute.String &
Schema.Attribute.SetMinMaxLength<{
minLength: 1;
}> &
Schema.Attribute.DefaultTo<''>;
type: Schema.Attribute.Enumeration<['read-only', 'full-access', 'custom']> &
Schema.Attribute.Required &
Schema.Attribute.DefaultTo<'read-only'>;
accessKey: Schema.Attribute.String &
Schema.Attribute.Required &
Schema.Attribute.SetMinMaxLength<{
minLength: 1;
}>;
lastUsedAt: Schema.Attribute.DateTime;
permissions: Schema.Attribute.Relation<
'oneToMany',
'admin::api-token-permission'
>;
expiresAt: Schema.Attribute.DateTime;
lifespan: Schema.Attribute.BigInteger;
createdAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
publishedAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<'oneToMany', 'admin::api-token'> &
Schema.Attribute.Private;
};
}
export interface AdminApiTokenPermission extends Struct.CollectionTypeSchema {
collectionName: 'strapi_api_token_permissions';
info: {
name: 'API Token Permission';
description: '';
singularName: 'api-token-permission';
pluralName: 'api-token-permissions';
displayName: 'API Token Permission';
};
options: {
draftAndPublish: false;
};
pluginOptions: {
'content-manager': {
visible: false;
};
'content-type-builder': {
visible: false;
};
};
attributes: {
action: Schema.Attribute.String &
Schema.Attribute.Required &
Schema.Attribute.SetMinMaxLength<{
minLength: 1;
}>;
token: Schema.Attribute.Relation<'manyToOne', 'admin::api-token'>;
createdAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
publishedAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<
'oneToMany',
'admin::api-token-permission'
> &
Schema.Attribute.Private;
};
}
export interface AdminTransferToken extends Struct.CollectionTypeSchema {
collectionName: 'strapi_transfer_tokens';
info: {
name: 'Transfer Token';
singularName: 'transfer-token';
pluralName: 'transfer-tokens';
displayName: 'Transfer Token';
description: '';
};
options: {
draftAndPublish: false;
};
pluginOptions: {
'content-manager': {
visible: false;
};
'content-type-builder': {
visible: false;
};
};
attributes: {
name: Schema.Attribute.String &
Schema.Attribute.Required &
Schema.Attribute.Unique &
Schema.Attribute.SetMinMaxLength<{
minLength: 1;
}>;
description: Schema.Attribute.String &
Schema.Attribute.SetMinMaxLength<{
minLength: 1;
}> &
Schema.Attribute.DefaultTo<''>;
accessKey: Schema.Attribute.String &
Schema.Attribute.Required &
Schema.Attribute.SetMinMaxLength<{
minLength: 1;
}>;
lastUsedAt: Schema.Attribute.DateTime;
permissions: Schema.Attribute.Relation<
'oneToMany',
'admin::transfer-token-permission'
>;
expiresAt: Schema.Attribute.DateTime;
lifespan: Schema.Attribute.BigInteger;
createdAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
publishedAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<
'oneToMany',
'admin::transfer-token'
> &
Schema.Attribute.Private;
};
}
export interface AdminTransferTokenPermission
extends Struct.CollectionTypeSchema {
collectionName: 'strapi_transfer_token_permissions';
info: {
name: 'Transfer Token Permission';
description: '';
singularName: 'transfer-token-permission';
pluralName: 'transfer-token-permissions';
displayName: 'Transfer Token Permission';
};
options: {
draftAndPublish: false;
};
pluginOptions: {
'content-manager': {
visible: false;
};
'content-type-builder': {
visible: false;
};
};
attributes: {
action: Schema.Attribute.String &
Schema.Attribute.Required &
Schema.Attribute.SetMinMaxLength<{
minLength: 1;
}>;
token: Schema.Attribute.Relation<'manyToOne', 'admin::transfer-token'>;
createdAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
publishedAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<
'oneToMany',
'admin::transfer-token-permission'
> &
Schema.Attribute.Private;
};
}
declare module '@strapi/strapi' {
export module Public {
export interface ContentTypeSchemas {
'plugin::upload.file': PluginUploadFile;
'plugin::upload.folder': PluginUploadFolder;
'plugin::i18n.locale': PluginI18NLocale;
'plugin::content-releases.release': PluginContentReleasesRelease;
'plugin::content-releases.release-action': PluginContentReleasesReleaseAction;
'plugin::review-workflows.workflow': PluginReviewWorkflowsWorkflow;
'plugin::review-workflows.workflow-stage': PluginReviewWorkflowsWorkflowStage;
'plugin::users-permissions.permission': PluginUsersPermissionsPermission;
'plugin::users-permissions.role': PluginUsersPermissionsRole;
'plugin::users-permissions.user': PluginUsersPermissionsUser;
'api::order.order': ApiOrderOrder;
'api::perk.perk': ApiPerkPerk;
'api::point.point': ApiPointPoint;
'admin::permission': AdminPermission;
'admin::user': AdminUser;
'admin::role': AdminRole;
'admin::api-token': AdminApiToken;
'admin::api-token-permission': AdminApiTokenPermission;
'admin::transfer-token': AdminTransferToken;
'admin::transfer-token-permission': AdminTransferTokenPermission;
}
}
}