Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .ci/doc/eslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@
"block-spacing": ["error", "always"],
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"camelcase": ["error", { "properties": "never" }],
"comma-dangle": [
"error",
{
"arrays": "never",
"objects": "never",
"imports": "never",
"exports": "never",
"functions": "never"
}
],
"comma-spacing": ["error", { "before": false, "after": true }],
"comma-style": ["error", "last"],
"constructor-super": "error",
Expand Down
6 changes: 2 additions & 4 deletions .ci/doc/templates/default.tpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ const {
} = require('kuzzle-sdk');

// Instantiates a Kuzzle client
const
kuzzle = new Kuzzle(
new WebSocket('kuzzle', { autoReconnect: false })
);
const kuzzle = new Kuzzle(new WebSocket('kuzzle', { autoReconnect: false }));

// Adds a listener to detect any connection problems
kuzzle.on('networkError', error => {
Expand All @@ -21,6 +18,7 @@ kuzzle.on('networkError', error => {
} catch (error) {
console.log(`Can not connect to Kuzzle: ${error.message}`);
}

[snippet-code] finally {
kuzzle.disconnect();
}
Expand Down
2 changes: 1 addition & 1 deletion .ci/test-docs.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -ex

here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$here"
Expand Down
4 changes: 3 additions & 1 deletion .eslintrc-ts.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"plugin:@typescript-eslint/recommended"
],
"rules": {
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/explicit-module-boundary-types": 0
}
}
}
11 changes: 9 additions & 2 deletions doc/7/controllers/auth/delete-api-key/snippets/delete-api-key.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
try {
await kuzzle.auth.login('local', { username: 'jane.doe', password: 'password' });
await kuzzle.auth.login('local', {
username: 'jane.doe',
password: 'password',
});

await kuzzle.auth.deleteApiKey('fQRa28BsidO6V_wmOcL');
const apiKey = await kuzzle.auth.createApiKey('Sigfox API key', {
refresh: 'wait_for'
});

await kuzzle.auth.deleteApiKey(apiKey._id);

console.log('API key successfully deleted');
} catch (e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ hooks:
}
}
}' "kuzzle:7512/users/jane.doe/_create?refresh=wait_for"
&&
curl -XPOST -H "Content-type: application/json" -d '{
"description": "Sigfox API key"
}' "kuzzle:7512/users/jane.doe/api-keys/_create?_id=fQRa28BsidO6V_wmOcL&refresh=wait_for"
after:
curl -XDELETE kuzzle:7512/users/jane.doe
template: default
Expand Down
4 changes: 4 additions & 0 deletions doc/7/getting-started/react-native/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ This section deals with **Kuzzle V2** (+ **Javascript SDK 7**) and **React Nativ

"[Expo](https://docs.expo.io/versions/latest/) is a framework and a platform for universal React applications. It is a set of tools and services built around React Native and native platforms that help you develop, build, deploy, and quickly iterate on iOS, Android, and web apps from the same JavaScript/TypeScript codebase."

:::info
Note that this getting-started uses Expo for ease of use, the following React Native code is just as valid without Expo.
:::

## Prepare your environment

Create your React Native app with Expo CLI.
Expand Down
2 changes: 2 additions & 0 deletions doc/7/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ order: 0
title: Javascript SDK v7.x
description: Javascript SDK v7.x
---

<RedirectToFirstChild />
4 changes: 3 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ export * from './src/core/searchResult/Document';
export * from './src/core/searchResult/Profile';
export * from './src/core/searchResult/Role';
export * from './src/core/searchResult/Specifications';
export * from './src/core/searchResult/User';
export * from './src/core/searchResult/User';

export * from './src/utils/interfaces';
Loading