@sage-bionetworks/synapse-types 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  import { ACTAccessRequirement, ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE } from './ACTAccessRequirement';
2
+ import { JSON_SCHEMA_ACCESS_REQUIREMENT_CONCRETE_TYPE, JsonSchemaAccessRequirement } from './JsonSchemaAccessRequirement';
2
3
  import { MANAGED_ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE, ManagedACTAccessRequirement } from './ManagedACTAccessRequirement';
3
- export type ACT_ACCESS_REQUIREMENT_INTERFACE_CONCRETE_TYPE = ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE | MANAGED_ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE;
4
- export type ACTAccessRequirementInterface = ACTAccessRequirement | ManagedACTAccessRequirement;
4
+ export type ACT_ACCESS_REQUIREMENT_INTERFACE_CONCRETE_TYPE = ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE | JSON_SCHEMA_ACCESS_REQUIREMENT_CONCRETE_TYPE | MANAGED_ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE;
5
+ export type ACTAccessRequirementInterface = ACTAccessRequirement | JsonSchemaAccessRequirement | ManagedACTAccessRequirement;
@@ -0,0 +1,32 @@
1
+ import { FormTemplateReference } from '@sage-bionetworks/synapse-client';
2
+ import ACCESS_TYPE from '../ACCESS_TYPE';
3
+ import { RestrictableObjectDescriptor } from './RestrictableObjectDescriptor';
4
+ export declare const JSON_SCHEMA_ACCESS_REQUIREMENT_CONCRETE_TYPE_DISPLAY_VALUE = "JSON Schema";
5
+ export declare const JSON_SCHEMA_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.JsonSchemaAccessRequirement";
6
+ export type JSON_SCHEMA_ACCESS_REQUIREMENT_CONCRETE_TYPE = typeof JSON_SCHEMA_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE;
7
+ /**
8
+ * An access requirement that collects additional information described by a JSON Schema and rendered using a
9
+ * FormTemplate, on top of the accessor and document flow of a {@link ManagedACTAccessRequirement}.
10
+ */
11
+ export type JsonSchemaAccessRequirement = {
12
+ versionNumber: number;
13
+ id: number;
14
+ name: string;
15
+ etag: string;
16
+ createdOn: string;
17
+ modifiedOn: string;
18
+ createdBy: string;
19
+ modifiedBy: string;
20
+ subjectsDefinedByAnnotations: boolean;
21
+ subjectIds: Array<RestrictableObjectDescriptor>;
22
+ accessType: ACCESS_TYPE;
23
+ concreteType: JSON_SCHEMA_ACCESS_REQUIREMENT_CONCRETE_TYPE;
24
+ isCertifiedUserRequired: boolean;
25
+ isValidatedProfileRequired: boolean;
26
+ isDUCRequired: boolean;
27
+ ducTemplateFileHandleId?: string;
28
+ expirationPeriod: number;
29
+ isTwoFaRequired: boolean;
30
+ eDucTemplateId?: string;
31
+ formTemplateRef: FormTemplateReference;
32
+ };
@@ -0,0 +1,3 @@
1
+ export const JSON_SCHEMA_ACCESS_REQUIREMENT_CONCRETE_TYPE_DISPLAY_VALUE = 'JSON Schema';
2
+ export const JSON_SCHEMA_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE = 'org.sagebionetworks.repo.model.JsonSchemaAccessRequirement';
3
+ //# sourceMappingURL=JsonSchemaAccessRequirement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JsonSchemaAccessRequirement.js","sourceRoot":"","sources":["../../src/AccessRequirement/JsonSchemaAccessRequirement.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,0DAA0D,GACrE,aAAa,CAAA;AACf,MAAM,CAAC,MAAM,kDAAkD,GAC7D,4DAA4D,CAAA"}
@@ -17,7 +17,7 @@ export interface SigningOfficial {
17
17
  export interface RequestInterface {
18
18
  id: string;
19
19
  accessRequirementId: string;
20
- researchProjectId: string;
20
+ researchProjectId?: string;
21
21
  createdOn: string;
22
22
  modifiedOn: string;
23
23
  createdBy: string;
@@ -32,6 +32,7 @@ export interface RequestInterface {
32
32
  principalInvestigator?: PrincipalInvestigator;
33
33
  signingOfficial?: SigningOfficial;
34
34
  eDucSignatureEnvelopeId?: string;
35
+ schemaData?: Record<string, unknown>;
35
36
  }
36
37
  export interface Request extends RequestInterface {
37
38
  concreteType: 'org.sagebionetworks.repo.model.dataaccess.Request';
@@ -19,8 +19,8 @@ export type Submission = {
19
19
  attachments?: Array<string>;
20
20
  /** List of user changes. A user can gain access, renew access or have access revoked. */
21
21
  accessorChanges: Array<AccessorChange>;
22
- /** A research project describes a project at an institution that used a controlled data set for the purposes that are stated in the Intended Data Use Statement. */
23
- researchProjectSnapshot: ResearchProject;
22
+ /** A research project describes a project at an institution that used a controlled data set for the purposes that are stated in the Intended Data Use Statement. Absent for submissions that collect no first-class research project fields. */
23
+ researchProjectSnapshot?: ResearchProject;
24
24
  /** True if this submission is a renewal submission. */
25
25
  isRenewalSubmission: boolean;
26
26
  /** Link(s) to publication that used the controlled data. */
@@ -39,6 +39,8 @@ export type Submission = {
39
39
  state: SubmissionState;
40
40
  /** The reason this submission is rejected, if it's rejected. */
41
41
  rejectedReason?: string;
42
+ /** Additional data provided by the submitter, validated against the JSON Schema referenced by the Access Requirement's form template. */
43
+ schemaData?: Record<string, unknown>;
42
44
  /** Synapse employs an Optimistic Concurrency Control (OCC) scheme to handle concurrent updates. Since the E-Tag changes every time a request is updated it is used to detect when a client's current representation of a request is out-of-date. */
43
45
  etag: string;
44
46
  /** The ID of the subject user interested in. This information will be used to help user navigate back to where they were to continue their work. */
@@ -5,6 +5,7 @@ export * from './AccessRequirementStatus';
5
5
  export * from './ACTAccessRequirement';
6
6
  export * from './ACTAccessRequirementInterface';
7
7
  export * from './CreateSubmissionRequest';
8
+ export * from './JsonSchemaAccessRequirement';
8
9
  export * from './LockAccessRequirement';
9
10
  export * from './ManagedACTAccessRequirement';
10
11
  export * from './ManagedACTAccessRequirementStatus';
@@ -5,6 +5,7 @@ export * from './AccessRequirementStatus';
5
5
  export * from './ACTAccessRequirement';
6
6
  export * from './ACTAccessRequirementInterface';
7
7
  export * from './CreateSubmissionRequest';
8
+ export * from './JsonSchemaAccessRequirement';
8
9
  export * from './LockAccessRequirement';
9
10
  export * from './ManagedACTAccessRequirement';
10
11
  export * from './ManagedACTAccessRequirementStatus';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/AccessRequirement/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAAyB,CAAA;AACvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,qCAAqC,CAAA;AACnD,cAAc,oBAAoB,CAAA;AAClC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,sCAAsC,CAAA;AACpD,cAAc,cAAc,CAAA;AAC5B,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/AccessRequirement/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,2BAA2B,CAAA;AACzC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,yBAAyB,CAAA;AACvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,qCAAqC,CAAA;AACnD,cAAc,oBAAoB,CAAA;AAClC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,sCAAsC,CAAA;AACpD,cAAc,cAAc,CAAA;AAC5B,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA"}
@@ -7,6 +7,7 @@ export declare const ENTITY_VIEW_TYPE_MASK_VIEW = 16;
7
7
  export declare const ENTITY_VIEW_TYPE_MASK_DOCKER = 32;
8
8
  export declare const ENTITY_VIEW_TYPE_MASK_SUBMISSIONVIEW = 64;
9
9
  export declare const ENTITY_VIEW_TYPE_MASK_DATASET = 128;
10
+ export declare const ENTITY_VIEW_TYPE_MASK_RECORDSET = 1024;
10
11
  export declare const ENTITY_VIEW_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.table.EntityView";
11
12
  export type ENTITY_VIEW_CONCRETE_TYPE = typeof ENTITY_VIEW_CONCRETE_TYPE_VALUE;
12
13
  export interface EntityView extends View {
@@ -6,5 +6,6 @@ export const ENTITY_VIEW_TYPE_MASK_VIEW = 0x10;
6
6
  export const ENTITY_VIEW_TYPE_MASK_DOCKER = 0x20;
7
7
  export const ENTITY_VIEW_TYPE_MASK_SUBMISSIONVIEW = 0x40;
8
8
  export const ENTITY_VIEW_TYPE_MASK_DATASET = 0x80;
9
+ export const ENTITY_VIEW_TYPE_MASK_RECORDSET = 0x400;
9
10
  export const ENTITY_VIEW_CONCRETE_TYPE_VALUE = 'org.sagebionetworks.repo.model.table.EntityView';
10
11
  //# sourceMappingURL=EntityView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EntityView.js","sourceRoot":"","sources":["../../src/Table/EntityView.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAAA;AAC9C,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,CAAA;AACjD,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,CAAA;AAC/C,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,CAAA;AAChD,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAAA;AAC9C,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,CAAA;AAChD,MAAM,CAAC,MAAM,oCAAoC,GAAG,IAAI,CAAA;AACxD,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,CAAA;AAEjD,MAAM,CAAC,MAAM,+BAA+B,GAC1C,iDAAiD,CAAA"}
1
+ {"version":3,"file":"EntityView.js","sourceRoot":"","sources":["../../src/Table/EntityView.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAAA;AAC9C,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,CAAA;AACjD,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,CAAA;AAC/C,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,CAAA;AAChD,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAAA;AAC9C,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,CAAA;AAChD,MAAM,CAAC,MAAM,oCAAoC,GAAG,IAAI,CAAA;AACxD,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,CAAA;AACjD,MAAM,CAAC,MAAM,+BAA+B,GAAG,KAAK,CAAA;AAEpD,MAAM,CAAC,MAAM,+BAA+B,GAC1C,iDAAiD,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sage-bionetworks/synapse-types",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",