first commit
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import baseConfig from '@ufb/eslint-config/base';
|
||||
|
||||
/** @type {import('typescript-eslint').Config} */
|
||||
export default [
|
||||
{
|
||||
ignores: ['dist/**'],
|
||||
},
|
||||
...baseConfig,
|
||||
];
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "@ufb/shared",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "tsup src/index.ts --format cjs,esm --dts",
|
||||
"clean": "git clean -xdf .cache .turbo dist node_modules",
|
||||
"dev": "tsup src/index.ts --format cjs,esm --dts",
|
||||
"format": "prettier --check . --ignore-path ../../.gitignore",
|
||||
"lint": "eslint",
|
||||
"typecheck": "tsc --noEmit --emitDeclarationOnly false"
|
||||
},
|
||||
"prettier": "@ufb/prettier-config",
|
||||
"devDependencies": {
|
||||
"@ufb/eslint-config": "workspace:*",
|
||||
"@ufb/prettier-config": "workspace:*",
|
||||
"@ufb/tsconfig": "workspace:*",
|
||||
"eslint": "catalog:",
|
||||
"prettier": "catalog:",
|
||||
"react": "^19.2.4",
|
||||
"tsup": "^8.5.1",
|
||||
"typescript": "catalog:"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
/**
|
||||
* Copyright 2025 LY Corporation
|
||||
*
|
||||
* LY Corporation licenses this file to you under the Apache License,
|
||||
* version 2.0 (the "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at:
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
const Tenant = {
|
||||
TenantNotFound: 'TenantNotFound',
|
||||
TenantAlreadyExists: 'TenantAlreadyExists',
|
||||
};
|
||||
|
||||
const User = {
|
||||
UserAlreadyExists: 'UserAlreadyExists',
|
||||
UserNotFound: 'UserNotFound',
|
||||
PasswordNotMatched: 'PasswordNotMatched',
|
||||
EmailVerification: 'EmailVerification',
|
||||
EmailNotVerified: 'EmailNotVerified',
|
||||
PrivateServiceUserCreate: 'PrivateServiceUserCreate',
|
||||
NotAllowDomain: 'NotAllowDomain',
|
||||
InvalidCode: 'InvalidCode',
|
||||
InvalidPassword: 'InvalidPassword',
|
||||
};
|
||||
const Auth = {
|
||||
PasswordNotMatch: 'PasswordNotMatch',
|
||||
BlockedUser: 'BlockedUser',
|
||||
};
|
||||
|
||||
const Role = {
|
||||
RoleNotFound: 'RoleNotFound',
|
||||
OwnerIsImmutable: 'OwnerIsImmutable',
|
||||
RoleAlreadyExists: 'RoleAlreadyExists',
|
||||
};
|
||||
|
||||
const Mailing = {
|
||||
NotVerifiedEmail: 'NotVerifiedEmail',
|
||||
InvalidEmailCode: 'InvalidEmailCode',
|
||||
};
|
||||
|
||||
const Common = {
|
||||
InvalidDateFormat: 'InvalidDateFormat',
|
||||
};
|
||||
|
||||
const Project = {
|
||||
ProjectAlreadyExists: 'ProjectAlreadyExists',
|
||||
ProjectNotFound: 'ProjectNotFound',
|
||||
ProjectInvalidName: 'ProjectInvalidName',
|
||||
};
|
||||
|
||||
const Channel = {
|
||||
ChannelAlreadyExists: 'ChannelAlreadyExists',
|
||||
ChannelNotFound: 'ChannelNotFound',
|
||||
ChannelInvalidName: 'ChannelInvalidName',
|
||||
};
|
||||
|
||||
const Issue = {
|
||||
IssueNameDuplicated: 'IssueNameDuplicated',
|
||||
IssueInvalidName: 'IssueInvalidName',
|
||||
IssueNotFound: 'IssueNotFound',
|
||||
};
|
||||
|
||||
const Category = {
|
||||
CategoryNameDuplicated: 'CategoryNameDuplicated',
|
||||
CategoryNameInvalid: 'CategoryNameInvalid',
|
||||
CategoryNotFound: 'CategoryNotFound',
|
||||
};
|
||||
|
||||
const Field = {
|
||||
FieldNameDuplicated: 'FieldNameDuplicated',
|
||||
FieldKeyDuplicated: 'FieldKeyDuplicated',
|
||||
};
|
||||
|
||||
const Option = {
|
||||
OptionNameDuplicated: 'OptionNameDuplicated',
|
||||
OptionKeyDuplicated: 'OptionKeyDuplicated',
|
||||
};
|
||||
|
||||
const Feedback = {
|
||||
InvalidExpressionFormat: 'InvalidExpressionFormat',
|
||||
InvalidFieldType: 'InvalidFieldType',
|
||||
InvalidFieldRequest: 'InvalidFieldRequest',
|
||||
};
|
||||
|
||||
const Member = {
|
||||
MemberAlreadyExists: 'MemberAlreadyExists',
|
||||
MemberNotFound: 'MemberNotFound',
|
||||
MemberUpdateRoleNotMatchedProject: 'MemberUpdateRoleNotMatchedProject',
|
||||
MemberInvalidUser: 'MemberInvalidUser',
|
||||
};
|
||||
|
||||
const Opensearch = {
|
||||
LargeWindow: 'LargeWindow',
|
||||
};
|
||||
|
||||
const Webhook = {
|
||||
WebhookAlreadyExists: 'WebhookAlreadyExists',
|
||||
WebhookNotFound: 'WebhookNotFound',
|
||||
};
|
||||
|
||||
export const ErrorCode = {
|
||||
Tenant,
|
||||
Role,
|
||||
User,
|
||||
Auth,
|
||||
Mailing,
|
||||
Common,
|
||||
Feedback,
|
||||
Project,
|
||||
Channel,
|
||||
Issue,
|
||||
Category,
|
||||
Field,
|
||||
Option,
|
||||
Member,
|
||||
Opensearch,
|
||||
Webhook,
|
||||
};
|
||||
|
||||
export type ErrorCode = typeof ErrorCode;
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Copyright 2025 LY Corporation
|
||||
*
|
||||
* LY Corporation licenses this file to you under the Apache License,
|
||||
* version 2.0 (the "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at:
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
export * from './error-code.enum';
|
||||
export * from './timezone';
|
||||
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* Copyright 2025 LY Corporation
|
||||
*
|
||||
* LY Corporation licenses this file to you under the Apache License,
|
||||
* version 2.0 (the "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at:
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
export type TimezoneOffset =
|
||||
| '-12:00'
|
||||
| '-11:00'
|
||||
| '-10:00'
|
||||
| '-09:30'
|
||||
| '-09:00'
|
||||
| '-08:00'
|
||||
| '-07:00'
|
||||
| '-06:00'
|
||||
| '-05:00'
|
||||
| '-04:00'
|
||||
| '-03:30'
|
||||
| '-03:00'
|
||||
| '-02:00'
|
||||
| '-01:00'
|
||||
| '+00:00'
|
||||
| '+01:00'
|
||||
| '+02:00'
|
||||
| '+03:00'
|
||||
| '+03:30'
|
||||
| '+04:00'
|
||||
| '+04:30'
|
||||
| '+05:00'
|
||||
| '+05:30'
|
||||
| '+05:45'
|
||||
| '+06:00'
|
||||
| '+06:30'
|
||||
| '+07:00'
|
||||
| '+08:00'
|
||||
| '+08:45'
|
||||
| '+09:00'
|
||||
| '+09:30'
|
||||
| '+10:00'
|
||||
| '+10:30'
|
||||
| '+11:00'
|
||||
| '+12:00'
|
||||
| '+12:45'
|
||||
| '+13:00'
|
||||
| '+14:00';
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"extends": "@ufb/tsconfig/internal-package.json",
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Reference in New Issue
Block a user