Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

contential

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

contential - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

.github/workflows/publish.yaml

17

dist/index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc