synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
214 lines (213 loc) • 5.98 kB
JavaScript
import { DAY_IN_MS as T } from "../../utils/SynapseConstants.js";
import { ACCESS_TYPE as o, RestrictableObjectType as r, ObjectType as s, MANAGED_ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE as A, ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE as i, TERMS_OF_USE_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE as d, SELF_SIGN_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE as u, LOCK_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE as E } from "@sage-bionetworks/synapse-types";
import R from "../entity/mockProject.js";
import { mockDucTemplateFileHandle as C } from "../mock_file_handle.js";
import { mockManagedACTAccessRequirementWikiPage as S, mockSelfSignAccessRequirementWikiPage as _, mockToUAccessRequirementWikiPage as I, mockACTAccessRequirementWikiPage as f } from "../mockWiki.js";
import { MOCK_TEAM_ID as k } from "../team/mockTeam.js";
import { MOCK_USER_ID as O } from "../user/mock_user_profile.js";
const L = 1e3, p = 1234567, Q = "mock-ar-etag", n = R.id, t = {
id: 1,
name: "Mocked access requirement",
etag: "26489045-3a98-405f-b214-9e1c90208c64",
createdOn: "2019-02-06T21:17:25.790Z",
modifiedOn: "2020-07-24T18:11:35.323Z",
versionNumber: 1,
subjectIds: [
{
id: "syn12664802",
type: r.ENTITY
}
],
createdBy: "1981374",
modifiedBy: "1981374",
accessType: o.DOWNLOAD
}, e = {
...t,
id: 1,
concreteType: A,
areOtherAttachmentsRequired: !0,
isCertifiedUserRequired: !0,
isDUCRequired: !0,
isIDUPublic: !0,
isIDURequired: !0,
ducTemplateFileHandleId: C.id,
expirationPeriod: T,
// 1 day
isIRBApprovalRequired: !0,
isValidatedProfileRequired: !0,
isTwoFaRequired: !0,
subjectsDefinedByAnnotations: !1
}, y = {
wikiPageId: S.id,
ownerObjectId: e.id.toString(),
ownerObjectType: s.ACCESS_REQUIREMENT
}, l = {
...t,
id: 2,
concreteType: d,
termsOfUse: "These are the termsOfUse for a TermsOfUseAccessRequirement. The content is inlined in the object, but **markdown** is supported.",
subjectsDefinedByAnnotations: !1
}, c = {
...t,
id: 3,
concreteType: u,
isCertifiedUserRequired: !0,
isValidatedProfileRequired: !0,
subjectsDefinedByAnnotations: !1
}, g = {
wikiPageId: _.id,
ownerObjectId: c.id.toString(),
ownerObjectType: s.ACCESS_REQUIREMENT
}, P = {
...t,
id: 4,
concreteType: i,
actContactInfo: "This is the actContactInfo for the ACTAccessRequirement. You would probably email some documentation to act@sagebase.org, or something like that. **Markdown is supported**.",
openJiraIssue: !0,
subjectsDefinedByAnnotations: !1
}, q = {
...t,
id: 5,
concreteType: E,
subjectsDefinedByAnnotations: !1,
jiraKey: ""
}, a = {
...t,
id: 6,
concreteType: d,
// termsOfUse:
// 'These are the terms of use for a TermsOfUseAccessRequirement. The content is inlined in the object, but **markdown** is supported.',
subjectsDefinedByAnnotations: !1
}, b = {
wikiPageId: I.id,
ownerObjectId: a.id.toString(),
ownerObjectType: s.ACCESS_REQUIREMENT
}, m = {
...t,
id: 7,
concreteType: i,
// actContactInfo:
// 'This is the contact info for the ACTAccessRequirement. You would probably email some documentation to act@sagebase.org, or something like that. **Markdown is supported**.',
openJiraIssue: !0,
subjectsDefinedByAnnotations: !1
}, j = {
wikiPageId: f.id,
ownerObjectId: m.id.toString(),
ownerObjectType: s.ACCESS_REQUIREMENT
}, U = {
...c,
id: 8,
subjectIds: [
{
id: k.toString(),
type: r.TEAM
}
],
accessType: o.PARTICIPATE
}, M = {
...c,
id: 9,
name: "Mock Self Sign Annotation Based Subjects AR",
subjectsDefinedByAnnotations: !0,
subjectIds: []
}, N = {
...e,
id: p
}, Y = {
results: [
{
id: e.id.toString(),
createdOn: e.createdOn,
type: e.concreteType,
modifiedOn: e.modifiedOn,
name: e.name,
version: e.versionNumber.toString(),
relatedProjectIds: [n],
reviewerIds: [O.toString()]
},
{
id: "9603055",
createdOn: "2017-08-23T18:48:20.892Z",
type: i,
modifiedOn: "2022-05-20T22:26:44.406Z",
name: "Access Requiremnent 2",
version: "269",
relatedProjectIds: [n],
reviewerIds: []
},
{
id: "9605257",
createdOn: "2021-01-15T17:05:10.544Z",
type: i,
modifiedOn: "2021-01-15T17:13:06.767Z",
name: "Another AR",
version: "3",
relatedProjectIds: [],
reviewerIds: []
},
{
id: "9605529",
createdOn: "2021-12-20T17:42:32.822Z",
type: i,
modifiedOn: "2021-12-20T18:17:46.904Z",
name: "Some mock ARs",
version: "5",
relatedProjectIds: [],
reviewerIds: []
}
],
nextPageToken: "mock-npt"
}, Z = {
results: [
{
id: "9608424",
createdOn: "2017-08-23T18:48:20.892Z",
type: i,
modifiedOn: "2022-05-20T22:26:44.406Z",
name: "Access Requirement on Page 2",
version: "269",
relatedProjectIds: [n],
reviewerIds: []
}
]
}, V = [
e,
l,
c,
P,
q,
a,
m,
U,
M,
N
], F = [
y,
g,
b,
j
];
export {
p as MOCK_ACCESS_REQUIREMENT_WITHOUT_ACL_ID,
Q as MOCK_AR_ETAG,
L as MOCK_NEWLY_CREATED_AR_ID,
P as mockACTAccessRequirement,
m as mockACTAccessRequirementWithWiki,
j as mockACTAccessRequirementWithWikiPageKey,
F as mockAccessRequirementWikiPageKeys,
V as mockAccessRequirements,
q as mockLockAccessRequirement,
e as mockManagedACTAccessRequirement,
y as mockManagedACTAccessRequirementWikiPageKey,
N as mockManagedAccessRequirementWithNoACL,
Y as mockSearchResultsPageOne,
Z as mockSearchResultsPageTwo,
c as mockSelfSignAccessRequirement,
g as mockSelfSignAccessRequirementWikiPageKey,
M as mockSelfSignAnnotationBasedSubjectsAccessRequirement,
U as mockTeamSelfSignAccessRequirement,
l as mockToUAccessRequirement,
a as mockToUAccessRequirementWithWiki,
b as mockToUAccessRequirementWithWikiPageKey
};
//# sourceMappingURL=mockAccessRequirements.js.map