2021-08-03 16:55:52 +00:00
|
|
|
//
|
|
|
|
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
|
|
|
//
|
|
|
|
// Licensed under the Eclipse Public 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.eclipse.org/legal/epl-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.
|
|
|
|
//
|
2022-02-23 16:10:11 +00:00
|
|
|
import type { IntlString, Plugin, StatusCode } from '@anticrm/platform'
|
2021-08-03 16:55:52 +00:00
|
|
|
import { plugin } from '@anticrm/platform'
|
2022-01-24 18:30:13 +00:00
|
|
|
import { Mixin, Version } from '.'
|
2022-04-29 05:27:17 +00:00
|
|
|
import type {
|
|
|
|
Account,
|
|
|
|
AnyAttribute,
|
|
|
|
ArrOf,
|
|
|
|
AttachedDoc,
|
|
|
|
Class,
|
|
|
|
Collection,
|
|
|
|
Doc,
|
|
|
|
Interface,
|
|
|
|
Obj,
|
|
|
|
PluginConfiguration,
|
|
|
|
PropertyType,
|
|
|
|
Ref,
|
|
|
|
RefTo,
|
|
|
|
Space,
|
|
|
|
Timestamp,
|
|
|
|
Type,
|
|
|
|
UserStatus
|
|
|
|
} from './classes'
|
|
|
|
import type {
|
|
|
|
Tx,
|
|
|
|
TxBulkWrite,
|
|
|
|
TxCollectionCUD,
|
|
|
|
TxCreateDoc,
|
|
|
|
TxCUD,
|
|
|
|
TxMixin,
|
|
|
|
TxPutBag,
|
|
|
|
TxRemoveDoc,
|
|
|
|
TxUpdateDoc
|
|
|
|
} from './tx'
|
2021-08-03 16:55:52 +00:00
|
|
|
|
2021-08-04 20:24:30 +00:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
2021-08-03 16:55:52 +00:00
|
|
|
export const coreId = 'core' as Plugin
|
|
|
|
|
|
|
|
export default plugin(coreId, {
|
|
|
|
class: {
|
|
|
|
Obj: '' as Ref<Class<Obj>>,
|
|
|
|
Doc: '' as Ref<Class<Doc>>,
|
2021-11-16 18:34:20 +00:00
|
|
|
AttachedDoc: '' as Ref<Class<AttachedDoc>>,
|
2021-08-03 16:55:52 +00:00
|
|
|
Class: '' as Ref<Class<Class<Obj>>>,
|
2021-12-30 09:04:32 +00:00
|
|
|
Mixin: '' as Ref<Class<Mixin<Doc>>>,
|
2021-12-01 20:25:28 +00:00
|
|
|
Interface: '' as Ref<Class<Interface<Doc>>>,
|
2021-08-03 16:55:52 +00:00
|
|
|
Attribute: '' as Ref<Class<AnyAttribute>>,
|
|
|
|
Tx: '' as Ref<Class<Tx>>,
|
2021-10-07 20:01:17 +00:00
|
|
|
TxBulkWrite: '' as Ref<Class<TxBulkWrite>>,
|
2021-08-07 05:39:49 +00:00
|
|
|
TxCUD: '' as Ref<Class<TxCUD<Doc>>>,
|
2021-08-03 16:55:52 +00:00
|
|
|
TxCreateDoc: '' as Ref<Class<TxCreateDoc<Doc>>>,
|
2021-11-16 18:34:20 +00:00
|
|
|
TxCollectionCUD: '' as Ref<Class<TxCollectionCUD<Doc, AttachedDoc>>>,
|
2021-08-03 16:55:52 +00:00
|
|
|
TxMixin: '' as Ref<Class<TxMixin<Doc, Doc>>>,
|
|
|
|
TxUpdateDoc: '' as Ref<Class<TxUpdateDoc<Doc>>>,
|
|
|
|
TxRemoveDoc: '' as Ref<Class<TxRemoveDoc<Doc>>>,
|
2021-09-15 10:53:11 +00:00
|
|
|
TxPutBag: '' as Ref<Class<TxPutBag<PropertyType>>>,
|
2021-08-03 16:55:52 +00:00
|
|
|
Space: '' as Ref<Class<Space>>,
|
2021-09-05 12:03:33 +00:00
|
|
|
Account: '' as Ref<Class<Account>>,
|
2022-05-05 14:50:28 +00:00
|
|
|
Type: '' as Ref<Class<Type<any>>>,
|
2021-09-15 17:03:34 +00:00
|
|
|
TypeString: '' as Ref<Class<Type<string>>>,
|
2022-03-18 06:37:49 +00:00
|
|
|
TypeIntlString: '' as Ref<Class<Type<IntlString>>>,
|
2022-02-16 09:02:31 +00:00
|
|
|
TypeNumber: '' as Ref<Class<Type<string>>>,
|
2022-02-07 09:21:32 +00:00
|
|
|
TypeMarkup: '' as Ref<Class<Type<string>>>,
|
2021-10-05 14:34:52 +00:00
|
|
|
TypeBoolean: '' as Ref<Class<Type<boolean>>>,
|
|
|
|
TypeTimestamp: '' as Ref<Class<Type<Timestamp>>>,
|
2021-12-02 09:09:37 +00:00
|
|
|
TypeDate: '' as Ref<Class<Type<Timestamp | Date>>>,
|
2021-12-06 09:16:04 +00:00
|
|
|
RefTo: '' as Ref<Class<RefTo<Doc>>>,
|
2021-12-20 09:06:31 +00:00
|
|
|
ArrOf: '' as Ref<Class<ArrOf<Doc>>>,
|
2021-12-06 09:16:04 +00:00
|
|
|
Collection: '' as Ref<Class<Collection<AttachedDoc>>>,
|
2022-01-24 18:30:13 +00:00
|
|
|
Bag: '' as Ref<Class<Type<Record<string, PropertyType>>>>,
|
2022-04-01 05:57:22 +00:00
|
|
|
Version: '' as Ref<Class<Version>>,
|
2022-04-23 03:45:55 +00:00
|
|
|
PluginConfiguration: '' as Ref<Class<PluginConfiguration>>,
|
|
|
|
UserStatus: '' as Ref<Class<UserStatus>>
|
2021-08-03 16:55:52 +00:00
|
|
|
},
|
|
|
|
space: {
|
|
|
|
Tx: '' as Ref<Space>,
|
2022-02-07 09:03:14 +00:00
|
|
|
DerivedTx: '' as Ref<Space>,
|
2022-03-17 05:05:30 +00:00
|
|
|
Model: '' as Ref<Space>,
|
|
|
|
Space: '' as Ref<Space>
|
2021-08-03 16:55:52 +00:00
|
|
|
},
|
|
|
|
account: {
|
|
|
|
System: '' as Ref<Account>
|
|
|
|
},
|
|
|
|
status: {
|
|
|
|
ObjectNotFound: '' as StatusCode<{ _id: Ref<Doc> }>,
|
|
|
|
ItemNotFound: '' as StatusCode<{ _id: Ref<Doc>, _localId: string }>
|
2022-01-24 18:30:13 +00:00
|
|
|
},
|
|
|
|
version: {
|
|
|
|
Model: '' as Ref<Version>
|
2022-02-23 16:10:11 +00:00
|
|
|
},
|
|
|
|
string: {
|
|
|
|
Id: '' as IntlString,
|
|
|
|
Space: '' as IntlString,
|
|
|
|
Modified: '' as IntlString,
|
|
|
|
ModifiedBy: '' as IntlString,
|
|
|
|
Class: '' as IntlString,
|
|
|
|
AttachedTo: '' as IntlString,
|
2022-05-05 14:50:28 +00:00
|
|
|
AttachedToClass: '' as IntlString,
|
|
|
|
String: '' as IntlString,
|
|
|
|
Markup: '' as IntlString,
|
|
|
|
Number: '' as IntlString,
|
|
|
|
Boolean: '' as IntlString,
|
|
|
|
Timestamp: '' as IntlString,
|
|
|
|
Date: '' as IntlString,
|
|
|
|
IntlString: '' as IntlString,
|
|
|
|
Ref: '' as IntlString,
|
|
|
|
Collection: '' as IntlString,
|
|
|
|
Array: '' as IntlString,
|
|
|
|
Bag: '' as IntlString,
|
|
|
|
Name: '' as IntlString
|
2021-08-03 16:55:52 +00:00
|
|
|
}
|
|
|
|
})
|