-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from cap-js/main
Main to develop code changes
- Loading branch information
Showing
9 changed files
with
256 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"env": { | ||
"commonjs": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"extends": [ "prettier", "plugin:node/recommended"], | ||
"globals": { | ||
"Atomics": "readonly", | ||
"SharedArrayBuffer": "readonly" | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 2018 | ||
}, | ||
"plugins": ["prettier"], | ||
"rules": { | ||
"prettier/prettier": "error", | ||
"no-unused-vars": "warn", | ||
"no-console": "off", | ||
"func-names": "off", | ||
"no-plusplus": "off", | ||
"no-process-exit": "off", | ||
"class-methods-use-this": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
gen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/** | ||
* Entry point for the plugin | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const config = { | ||
verbose: true, | ||
testTimeout: 100000, | ||
testMatch: ['**/test/*.test.js'], | ||
collectCoverageFrom: [ | ||
'**/lib/*', | ||
'**/srv/*', | ||
'**/cds-plugin.js' | ||
], | ||
coverageReporters: ['lcov', 'text', 'text-summary'], | ||
}; | ||
|
||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated manifest.yml based on template version 0.1.0 | ||
# appName = document-management | ||
# language=nodejs | ||
# multitenancy=false | ||
--- | ||
applications: | ||
# ----------------------------------------------------------------------------------- | ||
# Backend Service | ||
# ----------------------------------------------------------------------------------- | ||
- name: document-management-srv | ||
random-route: true # for development only | ||
path: gen/srv | ||
memory: 256M | ||
buildpack: nodejs_buildpack | ||
services: | ||
- sdm-di | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
_schema-version: '3.1' | ||
ID: cap-js.document-management | ||
version: 1.0.0 | ||
description: "CAP plugin for effortless integration of CAP applications with SAP | ||
Document Management Service." | ||
parameters: | ||
enable-parallel-deployments: true | ||
build-parameters: | ||
before-all: | ||
- builder: custom | ||
commands: | ||
- npx cds build --production | ||
modules: | ||
- name: document-management-srv | ||
type: nodejs | ||
path: gen/srv | ||
parameters: | ||
buildpack: nodejs_buildpack | ||
build-parameters: | ||
builder: npm | ||
provides: | ||
- name: srv-api # required by consumers of CAP services (e.g. approuter) | ||
properties: | ||
srv-url: ${default-url} | ||
requires: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"name": "@cap-js/document-management", | ||
"version": "1.0.0", | ||
"description": "CAP plugin for effortless integration of CAP applications with SAP Document Management Service.", | ||
"main": "cds-plugin.js", | ||
"files": [ | ||
"lib", | ||
"srv" | ||
], | ||
"keywords": [ | ||
"sap", | ||
"cap", | ||
"dms", | ||
"sdm", | ||
"plugin" | ||
], | ||
"dependencies": { | ||
"@sap/cds": "^7", | ||
"@sap/cds-lsp": "^7.6.1", | ||
"@sap/xssec": "^3.6.1", | ||
"dotenv": "^16.3.1", | ||
"express": "^4" | ||
}, | ||
"devDependencies": { | ||
"@cap-js/sqlite": "^1", | ||
"@sap/cds-dk": "^7", | ||
"eslint": "^8.57.0", | ||
"jest": "^29.7.0" | ||
}, | ||
"scripts": { | ||
"start": "cds-serve", | ||
"test": "jest --coverage --config jest.config.js" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
service SDMService { | ||
@cds.persistence.skip | ||
entity CmisObject { | ||
key objectId : String; | ||
baseTypeId : String; | ||
versionSeriesId : String; | ||
versionSeriesCheckedOutId : String; | ||
objectTypeId : String; | ||
name : String; | ||
isMajorVersion : Boolean; | ||
description : String; | ||
contentStreamMimeType : String; | ||
contentStreamId : String; | ||
contentStreamLength : Integer; | ||
contentStreamFileName : String; | ||
isLatestMajorVersion : Boolean; | ||
isPrivateWorkingCopy : Boolean; | ||
isLatestVersion : Boolean; | ||
isImmutable : Boolean; | ||
path : String; | ||
parentId : String; | ||
checkinComment : String; | ||
versionLabel : String; | ||
isVersionSeriesCheckedOut : String; | ||
createdBy : String; | ||
creationDate : String; | ||
lastModifiedBy : String; | ||
lastModificationDate : String; | ||
versionSeriesCheckedOutBy : String; | ||
changeToken : String; | ||
} | ||
|
||
@cds.persistence.skip | ||
entity CmisExtensionType { | ||
key extTypeId : String; | ||
baseTypeId : String; | ||
lastModifiedBy : String; | ||
createdBy : String; | ||
lastModificationDate : String; | ||
creationDate : String; | ||
localName : String; | ||
localNamespace : String; | ||
queryName : String; | ||
displayName : String; | ||
parentId : String; | ||
description : String; | ||
creatable : Boolean; | ||
fileable : Boolean; | ||
queryable : Boolean; | ||
controllablePolicy : String; | ||
controllableACL : String; | ||
fulltextIndexed : Boolean; | ||
includedInSupertypeQuery : Boolean; | ||
} | ||
|
||
@cds.persistence.skip | ||
entity CmisTypeProperty { | ||
key id : String; | ||
extTypeId : String; | ||
lastModifiedBy : String; | ||
createdBy : String; | ||
lastModificationDate : String; | ||
creationDate : String; | ||
localName : String; | ||
localNamespace : String; | ||
queryName : String; | ||
displayName : String; | ||
propertyType : String; | ||
description : String; | ||
cardinality : String; | ||
updatability : String; | ||
inherited : Boolean; | ||
required : Boolean; | ||
queryable : Boolean; | ||
orderable : Boolean; | ||
openChoice : Boolean; | ||
defaultValue : String; | ||
maxLength : Integer; | ||
precision : String; | ||
minValue : Integer; | ||
maxValue : Integer; | ||
resolution : Integer; | ||
choices : String; | ||
} | ||
|
||
@cds.persistence.skip | ||
entity CmisTypeObject { | ||
key id : String; | ||
objectId : String; | ||
extTypeId : String; | ||
lastModifiedBy : String; | ||
createdBy : String; | ||
lastModificationDate : String; | ||
creationDate : String; | ||
} | ||
|
||
@cds.persistence.skip | ||
entity CmisTypePropertyData { | ||
key id : String; | ||
objectId : String; | ||
typeObjectMappingId : String; | ||
lastModifiedBy : String; | ||
createdBy : String; | ||
lastModificationDate : String; | ||
creationDate : String; | ||
typePropertyId : String; | ||
propertyValue : String; | ||
} | ||
|
||
@cds.persistence.skip | ||
entity CmisRepository { | ||
repositoryId : String; | ||
repositoryName : String; | ||
repositoryDescription : String; | ||
vendorName : String; | ||
productName : String; | ||
productVersion : String; | ||
rootFolderId : String; | ||
latestChangeLogToken : String; | ||
cmisVersionSupported : Boolean; | ||
changesIncomplete : Boolean; | ||
changesOnType : String; | ||
principalIdAnonymous : String; | ||
principalIdAnyone : String; | ||
repositoryUrl : String; | ||
rootFolderUrl : String; | ||
cmisRepositoryId : String; | ||
repositoryCategory : String; | ||
externalId : String; | ||
connectionType : String; | ||
extendedFeatures : String; | ||
aclCapabilities : String; | ||
capabilities : String; | ||
} | ||
} |