2024-05-07 12:04:03 +09:00

421 lines
8.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 階層
* @const {number}
*/
export const TIERS = {
//OMDS東京
TIER1: 1,
//OMDS現地法人
TIER2: 2,
//代理店
TIER3: 3,
//販売店
TIER4: 4,
//エンドユーザー
TIER5: 5,
} as const;
/**
* 音声ファイルをEast USに保存する国リスト
* @const {number}
*/
export const BLOB_STORAGE_REGION_US = ["CA", "KY", "US"];
/**
* 音声ファイルをAustralia Eastに保存する国リスト
* @const {number}
*/
export const BLOB_STORAGE_REGION_AU = ["AU", "NZ"];
/**
* 音声ファイルをNorth Europeに保存する国リスト
* @const {number}
*/
export const BLOB_STORAGE_REGION_EU = [
"AT",
"BE",
"BG",
"HR",
"CY",
"CZ",
"DK",
"EE",
"FI",
"FR",
"DE",
"GR",
"HU",
"IS",
"IE",
"IT",
"LV",
"LI",
"LT",
"LU",
"MT",
"NL",
"NO",
"PL",
"PT",
"RO",
"RS",
"SK",
"SI",
"ZA",
"ES",
"SE",
"CH",
"TR",
"GB",
];
/**
* 管理ロール
* @const {string[]}
*/
export const ADMIN_ROLES = {
ADMIN: "admin",
STANDARD: "standard",
} as const;
/**
* ロール
* @const {string[]}
*/
export const USER_ROLES = {
NONE: "none",
AUTHOR: "author",
TYPIST: "typist",
} as const;
/**
* ライセンス注文状態
* @const {string[]}
*/
export const LICENSE_ISSUE_STATUS = {
ISSUE_REQUESTING: "Issue Requesting",
ISSUED: "Issued",
CANCELED: "Order Canceled",
};
/**
* ライセンス種別
* @const {string[]}
*/
export const LICENSE_TYPE = {
TRIAL: "TRIAL",
NORMAL: "NORMAL",
CARD: "CARD",
} as const;
/**
* ライセンス状態
* @const {string[]}
*/
export const LICENSE_ALLOCATED_STATUS = {
UNALLOCATED: "Unallocated",
ALLOCATED: "Allocated",
REUSABLE: "Reusable",
DELETED: "Deleted",
} as const;
/**
* 切り替え元種別
* @const {string[]}
*/
export const SWITCH_FROM_TYPE = {
NONE: "NONE",
CARD: "CARD",
TRIAL: "TRIAL",
} as const;
/**
* ライセンスの期限切れが近いと見なす日数のしきい値
* @const {number}
*/
export const LICENSE_EXPIRATION_THRESHOLD_DAYS = 14;
/**
* ライセンスの有効期間
* @const {number}
*/
export const LICENSE_EXPIRATION_DAYS = 365;
/**
* タイムゾーンを加味したライセンスの有効期間8時間
* @const {number}
*/
export const LICENSE_EXPIRATION_TIME_WITH_TIMEZONE = 8;
/**
* カードライセンスの桁数
* @const {number}
*/
export const CARD_LICENSE_LENGTH = 20;
/**
* 音声ファイルに紐づくオプションアイテムの数
* @const {string}
*/
export const OPTION_ITEM_NUM = 10;
/**
* 文字起こしタスクのステータス
* @const {string[]}
*/
export const TASK_STATUS = {
UPLOADED: "Uploaded",
PENDING: "Pending",
IN_PROGRESS: "InProgress",
FINISHED: "Finished",
BACKUP: "Backup",
} as const;
/**
* タスク一覧でソート可能な属性の一覧
*/
export const TASK_LIST_SORTABLE_ATTRIBUTES = [
"JOB_NUMBER",
"STATUS",
"ENCRYPTION",
"AUTHOR_ID",
"WORK_TYPE",
"FILE_NAME",
"FILE_LENGTH",
"FILE_SIZE",
"RECORDING_STARTED_DATE",
"RECORDING_FINISHED_DATE",
"UPLOAD_DATE",
"TRANSCRIPTION_STARTED_DATE",
"TRANSCRIPTION_FINISHED_DATE",
] as const;
/**
* タスク一覧のソート条件(昇順・降順)
*/
export const SORT_DIRECTIONS = ["ASC", "DESC"] as const;
/**
* 通知タグの最大個数
* NotificationHubの仕様上タグ式のOR条件で使えるタグは20個まで
* https://learn.microsoft.com/ja-jp/azure/notification-hubs/notification-hubs-tags-segment-push-message#tag-expressions
*/
export const TAG_MAX_COUNT = 20;
/**
* 通知のプラットフォーム種別文字列
*/
export const PNS = {
WNS: "wns",
APNS: "apns",
};
/**
* ユーザーのライセンス状態
*/
export const USER_LICENSE_STATUS = {
NORMAL: "Normal",
NO_LICENSE: "NoLicense",
ALERT: "Alert",
RENEW: "Renew",
};
/**
*トライアルライセンスの有効期限(日数)
* @const {number}
*/
export const TRIAL_LICENSE_EXPIRATION_DAYS = 30;
/**
* ライセンスの発行数
* @const {number}
*/
export const TRIAL_LICENSE_ISSUE_NUM = 100;
/**
* worktypeの最大登録数
* @const {number}
*/
export const WORKTYPE_MAX_COUNT = 20;
/**
* worktypeのDefault値の取りうる値
**/
export const OPTION_ITEM_VALUE_TYPE = {
DEFAULT: "Default",
BLANK: "Blank",
LAST_INPUT: "LastInput",
} as const;
/**
* ADB2Cユーザのidentity.signInType
* @const {string[]}
*/
export const ADB2C_SIGN_IN_TYPE = {
EMAILADDRESS: "emailAddress",
} as const;
/**
* MANUAL_RECOVERY_REQUIRED
* @const {string}
*/
export const MANUAL_RECOVERY_REQUIRED = "[MANUAL_RECOVERY_REQUIRED]";
/**
* 利用規約種別
* @const {string[]}
*/
export const TERM_TYPE = {
EULA: "EULA",
DPA: "DPA",
} as const;
/**
* HTTPメソッド
* @const {string[]}
*/
export const HTTP_METHODS = {
POST: "POST",
GET: "GET",
DELETE: "DELETE",
HEAD: "HEAD",
PATCH: "PATCH",
PUT: "PUT",
OPTIONS: "OPTIONS",
TRACE: "TRACE",
CONNECT: "CONNECT",
};
/**
* HTTPステータスコード
* @const {string[]}
*/
export const HTTP_STATUS_CODES = {
OK: 200,
BAD_REQUEST: 400,
INTERNAL_SERVER_ERROR: 500,
};
/**
* ユーザー一括登録用のBlobコンテナ名
* @const {string}
*/
export const IMPORT_USERS_CONTAINER_NAME = "import-users";
/**
* ユーザー一括登録の最大処理時間(分)
* @const {number}
*/
export const IMPORT_USERS_MAX_DURATION_MINUTES = 30;
/**
* ユーザー一括登録のステージ管理ファイル名
* @const {string}
*/
export const IMPORT_USERS_STAGE_FILE_NAME = "stage.json";
/**
* ユーザー一括登録のステージ管理のステージ
* @const {string}
*/
export const IMPORT_USERS_STAGES = {
CREATED: "created",
PRAPARE: "prepare",
START: "start",
COMPLETE: "complete",
DONE: "done",
} as const;
/**
* ユーザーのロールと数値のマッピング
* @const {string}
*/
export const RoleNumberMap: Record<number, string> = {
0: USER_ROLES.NONE,
1: USER_ROLES.AUTHOR,
2: USER_ROLES.TYPIST,
} as const;
export const SYSTEM_IMPORT_USERS = "import-users";
export const ROW_START_INDEX = 2;
/**
* ファイル保持日数の初期値
* @const {number}
*/
export const FILE_RETENTION_DAYS_DEFAULT = 30;
/**
* ライセンス数推移出力機能のCSVヘッダ
* @const {string[]}
*/
export const LICENSE_COUNT_ANALYSIS_HEADER = {
ACCOUNT: "アカウント",
TARGET_YEAE_AND_MONTH: "対象年月",
CATEGORY_1: "カテゴリー1",
CATEGORY_2: "カテゴリー2",
LICENSE_TYPE: "ライセンス種別",
ROLE: "役割",
COUNT: "数量",
};
/**
* ライセンス数推移出力機能のCSV項目で使用する日本語カテゴリー1
* @const {string[]}
*/
export const LICENSE_COUNT_ANALYSIS_CATEGORY_1 = {
VALID_LICENSES: "有効ライセンス数",
NEW_ISSUE_LICENSES: "新規発行ライセンス数",
INVALID_LICENSES: "失効ライセンス数",
SWICHED_LICENSES: "有効ライセンス切り替え",
};
/**
* ライセンス数推移出力機能のCSV項目で使用する日本語カテゴリー2
* @const {string[]}
*/
export const LICENSE_COUNT_ANALYSIS_CATEGORY_2 = {
OWNER_LICENSES: "所有ライセンス数",
IN_USE_LICENSES: "使用中ライセンス数",
};
/**
* ライセンス数推移出力機能のCSV項目で使用する日本語ライセンス種別
* @const {string[]}
*/
export const LICENSE_COUNT_ANALYSIS_LICENSE_TYPE = {
TRIAL: "Trial",
STANDARD: "Standard",
CARD: "Card",
SWITCH_FROM_TRIAL: "トライアルから切り替え",
SWITCH_FROM_CARD: "カードから切り替え",
};
/**
* ライセンス数推移出力機能のCSV項目で使用する日本語役割
* @const {string[]}
*/
export const LICENSE_COUNT_ANALYSIS_ROLE = {
AUTHOR: "Author",
TYPIST: "Typist",
NONE: "None",
UNALLOCATED: "Unallocated",
};
/**
* ライセンス数推移出力機能のファイルの先頭文字列
* @const {string[]}
*/
export const LICENSE_COUNT_ANALYSIS_FRONT_STRING = "LicenseAggregated";
/**
* ライセンス数推移CSV用のコンテナー名
* @const {string}
*/
export const LICENSE_COUNT_ANALYSIS_CONTAINER_NAME = "analysis-licenses";
/**
* メールの置換文字列
* @const {string}
*/
export const CUSTOMER_NAME = "$CUSTOMER_NAME$";
export const DEALER_NAME = "$DEALER_NAME$";
export const TOP_URL = "$TOP_URL$";
export const USER_NAME = "$USER_NAME$";
export const USER_EMAIL = "$USER_EMAIL$";