contential
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -1,12 +0,7 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.sayHello = void 0; | ||
var sayHello = function sayHello() { | ||
console.log('Hello!'); | ||
// src/index.ts | ||
var contential = () => { | ||
console.log("Contential AI"); | ||
}; | ||
exports.sayHello = sayHello; | ||
export { | ||
contential | ||
}; |
{ | ||
"name": "contential", | ||
"version": "0.0.10", | ||
"description": "JavaScript client for Contential.", | ||
"version": "0.0.11", | ||
"description": "Contential TypeScript client", | ||
"author": "Marcel Thomas", | ||
"license": "MIT", | ||
"private": false, | ||
"main": "./dist/contential.js", | ||
"main": "dist/index.js", | ||
"module": "dist/index.mjs", | ||
"types": "dist/index.d.ts", | ||
"type": "module", | ||
"scripts": { | ||
"build": "babel src -d dist", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"dev": "tsup src/index.ts --format cjs,esm --dts --watch", | ||
"clean": "rimraf dist", | ||
"build": "npm-run-all clean build:main", | ||
"build:main": "tsup src/index.ts --format cjs,esm --dts", | ||
"lint": "tsc" | ||
}, | ||
"prepublish": "npm run build", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@types/node": "^20.4.1", | ||
"npm-run-all": "^4.1.5", | ||
"rimraf": "^5.0.1", | ||
"tsup": "^7.1.0", | ||
"tsx": "^3.12.7", | ||
"typescript": "^5.1.6" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/contential/contential-js.git" | ||
"url": "git+https://github.com/contential/contential-ts.git" | ||
}, | ||
"keywords": [ | ||
"contential", | ||
"ai" | ||
], | ||
"bugs": { | ||
"url": "https://github.com/contential/contential-js/issues" | ||
"url": "https://github.com/contential/contential-ts/issues" | ||
}, | ||
"homepage": "https://github.com/contential/contential-js#readme", | ||
"dependencies": { | ||
"@babel/runtime": "^7.8.3", | ||
"axios": "^0.19.1", | ||
"querystring": "^0.2.0", | ||
"ws": "^7.2.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.7.7", | ||
"@babel/core": "^7.7.7", | ||
"@babel/node": "^7.7.7", | ||
"@babel/plugin-proposal-class-properties": "^7.7.4", | ||
"@babel/plugin-transform-runtime": "^7.8.3", | ||
"@babel/preset-env": "^7.7.7", | ||
"nodemon": "^1.18.9" | ||
} | ||
"homepage": "https://contential.ai" | ||
} |
@@ -1,80 +0,1 @@ | ||
# Contential - JavaScript SDK | ||
JavaScript SDK for Contential content and GraphQL APIs. It helps you to easily access your data stored in Contential with your JavaScript applications. | ||
## Core features | ||
- Create, retrieve, update and remove records | ||
- Create, retrieve, update and remove lists | ||
- Subscribe to records and lists | ||
- Search lists | ||
- Make GraphQL queries on lists | ||
- Works in the browser and in Node.js | ||
## Requirements | ||
- A [Contential](https://contential.io) account | ||
- Created a [space](https://app.contential.io/account/spaces) | ||
- Created an [API key](https://app.contential.io/api-keys) | ||
- Node.js 8 or above | ||
## Installation | ||
``` | ||
npm install contential | ||
``` | ||
## Contential client | ||
Use the `createClient` method to create an authenticated client that connects to your data. | ||
```javascript | ||
const { createClient } = require('contential'); | ||
const contential = createClient({ | ||
apiKey: 'e347fea300b50578870fda807ec455', | ||
}); | ||
``` | ||
The Contential APIs use API keys to authenticate requests. You can view and manage your API keys in the [Contential Dashboard](https://app.contential.io). | ||
## Creating your first record | ||
| Property | Type | Example | Required | Description | | ||
| -------- | ---------------- | -------------- | -------- | ------------------------------------------------------ | | ||
| regionId | String | us | true | Region of where the data will be stored. | | ||
| spaceId | String | 4dcb2eaf1d | true | ID of space of where the data will be stored. | | ||
| recordId | String | my-record | true | The ID for your record. | | ||
| localeId | String | en-US | false | Locale for your data to allow for translations. | | ||
| data | String \| Object | My record data | true | The data for the record. Can be a string or an object. | | ||
```javascript | ||
const { createClient } = require('contential'); | ||
const contential = createClient({ | ||
apiKey: 'e347fea300b50578870fda807ec455', | ||
}); | ||
contential.record | ||
.add({ | ||
regionId: 'us', | ||
spaceId: '4dcb2eaf1d', | ||
recordId: 'my-record', | ||
localeId: 'en-US', | ||
data: { 'message":"Contential is amazing!' }, | ||
}) | ||
.then(result => console.log(result)) | ||
.catch(error => console.log(error)); | ||
``` | ||
## Documentation | ||
For more details on getting started with Contential, visit the [Contential Docs](https://contential.io/docs) | ||
## Get involved | ||
We appreciate any help you can give to improve Contential. | ||
PRs are welcome! | ||
## Licencse | ||
This repository is published under the [MIT](https://github.com/contential/contential-js/blob/master/LICENSE) license. | ||
# Contential - TypeScript |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
0
6
Yes
4272
9
52
1
2
2
- Removed@babel/runtime@^7.8.3
- Removedaxios@^0.19.1
- Removedquerystring@^0.2.0
- Removedws@^7.2.1
- Removed@babel/runtime@7.26.0(transitive)
- Removedaxios@0.19.2(transitive)
- Removedfollow-redirects@1.5.10(transitive)
- Removedquerystring@0.2.1(transitive)
- Removedregenerator-runtime@0.14.1(transitive)
- Removedws@7.5.10(transitive)