mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 03:31:27 +00:00
Fix merge conflicts
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import { Schema, model, Types } from 'mongoose';
|
||||
|
||||
export interface IAPIKeyData {
|
||||
name: string;
|
||||
user: Types.ObjectId;
|
||||
expiresAt: Date;
|
||||
secretHash: string;
|
||||
}
|
||||
|
||||
const apiKeyDataSchema = new Schema<IAPIKeyData>(
|
||||
{
|
||||
name: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
user: {
|
||||
type: Schema.Types.ObjectId,
|
||||
ref: 'User',
|
||||
required: true
|
||||
},
|
||||
expiresAt: {
|
||||
type: Date
|
||||
},
|
||||
secretHash: {
|
||||
type: String,
|
||||
required: true,
|
||||
select: false
|
||||
}
|
||||
},
|
||||
{
|
||||
timestamps: true
|
||||
}
|
||||
);
|
||||
|
||||
const APIKeyData = model<IAPIKeyData>('APIKeyData', apiKeyDataSchema);
|
||||
|
||||
export default APIKeyData;
|
||||
@@ -14,7 +14,8 @@ import Token, { IToken } from './token';
|
||||
import User, { IUser } from './user';
|
||||
import UserAction, { IUserAction } from './userAction';
|
||||
import Workspace, { IWorkspace } from './workspace';
|
||||
import ServiceTokenData, { IServiceTokenData } from './serviceTokenData ';
|
||||
import ServiceTokenData, { IServiceTokenData } from './serviceTokenData';
|
||||
import APIKeyData, { IAPIKeyData } from './apiKeyData';
|
||||
|
||||
export {
|
||||
BackupPrivateKey,
|
||||
@@ -50,5 +51,7 @@ export {
|
||||
Workspace,
|
||||
IWorkspace,
|
||||
ServiceTokenData,
|
||||
IServiceTokenData
|
||||
IServiceTokenData,
|
||||
APIKeyData,
|
||||
IAPIKeyData
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Schema, model, Types } from 'mongoose';
|
||||
import { ADMIN, MEMBER, INVITED, COMPLETED, GRANTED } from '../variables';
|
||||
import { ADMIN, MEMBER } from '../variables';
|
||||
|
||||
export interface IMembership {
|
||||
_id: Types.ObjectId;
|
||||
@@ -7,7 +7,6 @@ export interface IMembership {
|
||||
inviteEmail?: string;
|
||||
workspace: Types.ObjectId;
|
||||
role: 'admin' | 'member';
|
||||
status: 'invited' | 'completed' | 'granted';
|
||||
}
|
||||
|
||||
const membershipSchema = new Schema(
|
||||
@@ -28,12 +27,6 @@ const membershipSchema = new Schema(
|
||||
type: String,
|
||||
enum: [ADMIN, MEMBER],
|
||||
required: true
|
||||
},
|
||||
status: {
|
||||
// INVITED, COMPLETED, GRANTED
|
||||
type: String,
|
||||
enum: [INVITED, COMPLETED, GRANTED],
|
||||
required: true
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Schema, model, Types } from 'mongoose';
|
||||
import { ENV_DEV, ENV_TESTING, ENV_STAGING, ENV_PROD } from '../variables';
|
||||
|
||||
export interface IServiceTokenData {
|
||||
name: string;
|
||||
@@ -38,7 +37,6 @@ const serviceTokenDataSchema = new Schema<IServiceTokenData>(
|
||||
},
|
||||
secretHash: {
|
||||
type: String,
|
||||
unique: true,
|
||||
required: true,
|
||||
select: false
|
||||
},
|
||||
Reference in New Issue
Block a user