I'm getting BadMethodCallException "Client::confidential()" from Laravel passport with MongoDB - mongodb

I'm getting this error, and I didn't understand why
Call to undefined method DesignMyNight\\Mongodb\\Passport\\Client::confidential()
Knowing that I'm using MongoDB as a database
I sent a POST request with this header and body:
Header:
Content-Type:application/json
Accept:application/json
Body:
{
"email": "khalil#gmail.com",
"password": "123456"
}
knowing that the email and the password are correct, and the register route works fine.
My Controller function :
public function login(Request $request)
{
$request->validate([
'email' => 'required|email',
'password' => 'required|min:6'
]);
if(Auth::attempt(["email" => $request->email, "password" => $request->password])){
$user = Auth::user();
$token = $user->createToken($user->email."-".now());
$token = $token->accessToken;
return response()->json([
"token" => $token
]);
}
}
My composer.json file:
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2",
"designmynight/laravel-mongodb-passport": "^1.2",
"fideloper/proxy": "^4.0",
"jenssegers/mongodb": "^3.6",
"laravel/framework": "^6.2",
"laravel/tinker": "^2.0"
},
"require-dev": {
"facade/ignition": "^1.4",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^3.0",
"phpunit/phpunit": "^8.0"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover --ansi"
],
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate --ansi"
]
}
}
My User Model:
<?php
namespace App;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use DesignMyNight\Mongodb\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Passport\HasApiTokens;
class User extends Authenticatable
{
use Notifiable, HasApiTokens;
/**
* The attributes that are mass assignable.
*
* #var array
*/
protected $fillable = [
'name', 'email', 'password',
];
/**
* The attributes that should be hidden for arrays.
*
* #var array
*/
protected $hidden = [
'password', 'remember_token',
];
/**
* The attributes that should be cast to native types.
*
* #var array
*/
protected $casts = [
'email_verified_at' => 'datetime',
];
}
The Return:
{
"message": "Call to undefined method DesignMyNight\\Mongodb\\Passport\\Client::confidential()",
"exception": "BadMethodCallException",
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php",
"line": 50,
"trace": [
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php",
"line": 36,
"function": "throwBadMethodCallException",
"class": "Illuminate\\Database\\Eloquent\\Model",
"type": "::"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php",
"line": 1620,
"function": "forwardCallTo",
"class": "Illuminate\\Database\\Eloquent\\Model",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/jenssegers/mongodb/src/Jenssegers/Mongodb/Eloquent/Model.php",
"line": 480,
"function": "__call",
"class": "Illuminate\\Database\\Eloquent\\Model",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/passport/src/Bridge/ClientRepository.php",
"line": 78,
"function": "__call",
"class": "Jenssegers\\Mongodb\\Eloquent\\Model",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/passport/src/Bridge/ClientRepository.php",
"line": 54,
"function": "handlesGrant",
"class": "Laravel\\Passport\\Bridge\\ClientRepository",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/league/oauth2-server/src/Grant/AbstractGrant.php",
"line": 182,
"function": "validateClient",
"class": "Laravel\\Passport\\Bridge\\ClientRepository",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/passport/src/Bridge/PersonalAccessGrant.php",
"line": 21,
"function": "validateClient",
"class": "League\\OAuth2\\Server\\Grant\\AbstractGrant",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/league/oauth2-server/src/AuthorizationServer.php",
"line": 198,
"function": "respondToAccessTokenRequest",
"class": "Laravel\\Passport\\Bridge\\PersonalAccessGrant",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/passport/src/PersonalAccessTokenFactory.php",
"line": 114,
"function": "respondToAccessTokenRequest",
"class": "League\\OAuth2\\Server\\AuthorizationServer",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/passport/src/PersonalAccessTokenFactory.php",
"line": 71,
"function": "dispatchRequestToAuthorizationServer",
"class": "Laravel\\Passport\\PersonalAccessTokenFactory",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/passport/src/HasApiTokens.php",
"line": 67,
"function": "make",
"class": "Laravel\\Passport\\PersonalAccessTokenFactory",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/app/Http/Controllers/AuthController.php",
"line": 48,
"function": "createToken",
"class": "App\\User",
"type": "->"
},
{
"function": "login",
"class": "App\\Http\\Controllers\\AuthController",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Routing/Controller.php",
"line": 54,
"function": "call_user_func_array"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php",
"line": 45,
"function": "callAction",
"class": "Illuminate\\Routing\\Controller",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
"line": 219,
"function": "dispatch",
"class": "Illuminate\\Routing\\ControllerDispatcher",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
"line": 176,
"function": "runController",
"class": "Illuminate\\Routing\\Route",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 681,
"function": "run",
"class": "Illuminate\\Routing\\Route",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 130,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php",
"line": 41,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 171,
"function": "handle",
"class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
"line": 59,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 171,
"function": "handle",
"class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 105,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 683,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 658,
"function": "runRouteWithinStack",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 624,
"function": "runRoute",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 613,
"function": "dispatchToRoute",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 170,
"function": "dispatch",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 130,
"function": "Illuminate\\Foundation\\Http\\{closure}",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
"line": 21,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 171,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
"line": 21,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 171,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
"line": 27,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 171,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php",
"line": 63,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 171,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/fideloper/proxy/src/TrustProxies.php",
"line": 57,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 171,
"function": "handle",
"class": "Fideloper\\Proxy\\TrustProxies",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 105,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 145,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 110,
"function": "sendRequestThroughRouter",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/public/index.php",
"line": 55,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "/home/ixi/Desktop/TuniSales/Dev/v1.0.0/server.php",
"line": 21,
"function": "require_once"
}
]
}

With Laravel 6.2 you need Laravel/Passport v7.5.1 not ^8.0
You do not need DesignMyNight package for Laravel/Passport to work with jenssegers/mongodb.
No migrations are required to be ran, you should call the Passport::ignoreMigrations method in the register method of your AppServiceProvider.
You may want to create a custom migration just to setup optimal indexes for the passport collections if you are expecting heavy load.
Here is a sample of my setup:
"require": {
"php": "^7.2",
"fideloper/proxy": "^4.0",
"jenssegers/mongodb": "3.6.*",
"jenssegers/mongodb-session": "1.3.*",
"laravel/framework": "^6.2",
"laravel/passport": "7.5.1",
"laravel/tinker": "^2.0",
"predis/predis": "^1.1"
},

Related

Node red write double word

How do I convert number to double word in Node-red?
I tried throwing the array in
but no response
I'm not very good at node red, please answer me, thank you
What do you mean converting 'number' to 'double word'?
Data type 'double' is already number type.
Do you mean String to number?
[
{
"id": "bd8884d5c2f82322",
"type": "tab",
"label": "플로우 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "4546977fe7434e95",
"type": "inject",
"z": "bd8884d5c2f82322",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "1234.34",
"payloadType": "str",
"x": 160,
"y": 40,
"wires": [
[
"a93489fbd55883b2",
"f1ad7ec076bceb78"
]
]
},
{
"id": "a93489fbd55883b2",
"type": "function",
"z": "bd8884d5c2f82322",
"name": "Convert String to Number",
"func": "msg.payload=Number(msg.payload);\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 370,
"y": 40,
"wires": [
[
"1f695a58ebc55f90"
]
]
},
{
"id": "1f695a58ebc55f90",
"type": "debug",
"z": "bd8884d5c2f82322",
"name": "number",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 560,
"y": 40,
"wires": []
},
{
"id": "f1ad7ec076bceb78",
"type": "debug",
"z": "bd8884d5c2f82322",
"name": "string",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 310,
"y": 80,
"wires": []
}]

Making Resets Passwords functionality I got \Mail\\Factory] is not instantiable error

In my lumen 8.0 app I want to add Resets Passwords functionality reading
Trying to reset Passwords in Lumen
article but I got error :
{
"message": "Target [Illuminate\\Contracts\\Mail\\Factory] is not instantiable while building [Illuminate\\Notifications\\Channels\\MailChannel].",
"exception": "Illuminate\\Contracts\\Container\\BindingResolutionException",
"file": "/mnt/_work_sdb8/wwwroot/LumenProjects/PublishPagesAPI/vendor/illuminate/container/Container.php",
"line": 1089,
"trace": [
{
"file": "/mnt/_work_sdb8/wwwroot/LumenProjects/PublishPagesAPI/vendor/illuminate/container/Container.php",
"line": 882,
"function": "notInstantiable",
"class": "Illuminate\\Container\\Container",
"type": "->"
},
{
"file": "/mnt/_work_sdb8/wwwroot/LumenProjects/PublishPagesAPI/vendor/illuminate/container/Container.php",
"line": 754,
"function": "build",
"class": "Illuminate\\Container\\Container",
"type": "->"
},
{
"file": "/mnt/_work_sdb8/wwwroot/LumenProjects/PublishPagesAPI/vendor/illuminate/container/Container.php",
"line": 692,
"function": "resolve",
"class": "Illuminate\\Container\\Container",
"type": "->"
},
In my composer.json :
{
"name": "laravel/lumen",
"description": "The Laravel Lumen Framework.",
"keywords": ["framework", "laravel", "lumen"],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.3|^8.0",
"anik/form-request": "^4.2",
"cviebrock/eloquent-sluggable": "^8.0",
"dusterio/lumen-passport": "^0.3.4",
"flipbox/lumen-generator": "^8.2",
"guzzlehttp/guzzle": "^7.3",
"illuminate/mail": "^8.48",
"illuminate/notifications": "^8.49",
"intervention/image": "^2.5",
"laravel/lumen-framework": "^8.0",
"league/flysystem": " ~1.0"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"phpunit/phpunit": "^9.3"
},
"autoload": {
"files": [
"app/library/helper.php"
],
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"classmap": [
"tests/"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
]
}
}
Do I need to install some packages and how to init it in my package ?
Reading branch https://github.com/laravel/lumen-framework/issues/1057 I found decision with adding lines :
$app->alias('mail.manager', Illuminate\Mail\MailManager::class);
$app->alias('mail.manager', Illuminate\Contracts\Mail\Factory::class);
in file bootstrap/app.php. And it works!

AWS API Gateway Model Schema for table display on website

I want to display data from a API call on a Wordpress table. Most table plug-ins accept JSON results from an API call but only if it's formatted as follows
[
{
"stockId": 4,
"description": "Powerbanks",
"costPrice": 42,
"salePrice": 80,
"units": 10,
"purchaseDate": "2019-09-27T00:00:00.000Z",
"image": "power bank.jpg",
"supplierId": 0
},
{
"stockId": 8,
"description": "Chip",
"costPrice": 0.5,
"salePrice": 1.5,
"units": 49,
"purchaseDate": "2019-09-27T00:00:00.000Z",
"image": "Chip.jpg",
"supplierId": 0
},
{
"stockId": 9,
"description": "Honey",
"costPrice": 5.6,
"salePrice": 66,
"units": 33,
"purchaseDate": "2019-09-27T00:00:00.000Z",
"image": "honey.jpg",
"supplierId": 0
}
]
What JSON schema do I need to format the data like this? The JSON output starts/ends with [ ]
My current model schema looks like this at the moment
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Get all stock",
"type": "object",
"properties": {
"rows": {
"type": "array",
"items" : {
"type" : "object",
"properties": {
"stockId": { "type": "number" },
"description": { "type": "string" },
"costPrice": { "type": "number" },
"salePrice": { "type": "number" },
"units": { "type": "number" },
"purchaseDate": { "type": "string" },
"image" : { "type" : "string" },
"supplierId": { "type": "number" }
}
}
}
}
}
This gives the following output:
{
"rows": [
{
"stockId": 4,
"description": "Powerbanks",
"costPrice": 42,
"salePrice": 80,
"units": 10,
"purchaseDate": "2019-09-27T00:00:00.000Z",
"image": "power bank.jpg",
"supplierId": 0
},
{
"stockId": 8,
"description": "Chip",
"costPrice": 0.5,
"salePrice": 1.5,
"units": 49,
"purchaseDate": "2019-09-27T00:00:00.000Z",
"image": "Chip.jpg",
"supplierId": 0
},
{
"stockId": 9,
"description": "Honey",
"costPrice": 5.6,
"salePrice": 66,
"units": 33,
"purchaseDate": "2019-09-27T00:00:00.000Z",
"image": "honey.jpg",
"supplierId": 0
}
]
}
How do I change the model schema to look like the output needed?

Filter for one attribute (array) for one of its value (json)

Having the following record
{
"name": "
 Festões Plástico, 12mt x 17cm - Festas Populares",
"categories": [
"Festas",
"Casamentos",
"Decorações"
],
"hierarchicalCategories": {
"lvl0": "Festas",
"lvl1": "Festas > Casamentos",
"lvl2": "Festas > Casamentos > Decorações"
},
"description": "",
"brand": "Misterius",
"price": 14.94,
"stock": "Disponível",
"prices": [
{
"value": 12,
"type": "specificValue",
"family": "fatos",
"subfamily": "example"
},
{
"value": 13,
"type": "specificValue13",
"family": "fatos13",
"subfamily": "example13"
},
{
"value": 14,
"type": "specificValue14",
"family": "fatos14",
"subfamily": "example14"
},
{
"value": 15,
"type": "specificValue15",
"family": "fatos15",
"subfamily": "example15"
},
{
"value": 16,
"type": "specificValue16",
"family": "fatos16",
"subfamily": "example16"
}
],
"color": [
{
"name": "Amarelo",
"label": "Amarelo,#FFFF00",
"hexa": "#FFFF00"
},
{
"name": "Azul",
"label": "Azul,#0000FF",
"hexa": "#0000FF"
},
{
"name": "Branco",
"label": "Branco,#FFFFFF",
"hexa": "#FFFFFF"
},
{
"name": "Laranja",
"label": "Laranja,#FFA500",
"hexa": "#FFA500"
},
{
"name": "Verde Escuro",
"label": "Verde Escuro,#006400",
"hexa": "#006400"
},
{
"name": "Vermelho",
"label": "Vermelho,#FF0000",
"hexa": "#FF0000"
}
],
"specialcategorie": "",
"reference": "3546",
"rating": 0,
"free_shipping": false,
"popularity": 0,
"objectID": "30"
}
Now by searching for "Festas Populares" will return the record and its attributes, is it possible to also filter for one attribute array as "prices" to only return one json. for example "prices.type"="specificValue14" and "family"="fatos14" and "family"="fatos" and "subfamily"="example"
{
“value”: 14,
“type”: “specificValue14”,
“family”: “fatos14”,
“subfamily”: “example14”
}
the record return would be:
{
"name": "
 Festões Plástico, 12mt x 17cm - Festas Populares",
"categories": [
"Festas",
"Casamentos",
"Decorações"
],
"hierarchicalCategories": {
"lvl0": "Festas",
"lvl1": "Festas > Casamentos",
"lvl2": "Festas > Casamentos > Decorações"
},
"description": "",
"brand": "Misterius",
"price": 14.94,
"stock": "Disponível",
"prices": [
{
"value": 14,
"type": "specificValue14",
"family": "fatos14",
"subfamily": "example14"
}
],
"color": [
{
"name": "Amarelo",
"label": "Amarelo,#FFFF00",
"hexa": "#FFFF00"
},
{
"name": "Azul",
"label": "Azul,#0000FF",
"hexa": "#0000FF"
},
{
"name": "Branco",
"label": "Branco,#FFFFFF",
"hexa": "#FFFFFF"
},
{
"name": "Laranja",
"label": "Laranja,#FFA500",
"hexa": "#FFA500"
},
{
"name": "Verde Escuro",
"label": "Verde Escuro,#006400",
"hexa": "#006400"
},
{
"name": "Vermelho",
"label": "Vermelho,#FF0000",
"hexa": "#FF0000"
}
],
"specialcategorie": "",
"reference": "3546",
"rating": 0,
"free_shipping": false,
"popularity": 0,
"objectID": "30"
}
for some context a product can have multiple prices associated, for a specific user, or one day there is campaign giving discount, etc so for that cases want to filter price associated to the product/record.
No, this is not possible with Algolia. Records are always returned with the attributes specified inside attributesToRetrieve. These attributes are returned in full.

How to delete a connector plugin in Kafka

Here's the list of my connector plugins:
> curl localhost:8083/connector-plugins
{
"class": "io.confluent.connect.activemq.ActiveMQSourceConnector",
"type": "source",
"version": "4.1.0"
}, {
"class": "io.confluent.connect.elasticsearch.ElasticsearchSinkConnector",
"type": "sink",
"version": "4.1.0"
}, {
"class": "io.confluent.connect.hdfs.HdfsSinkConnector",
"type": "sink",
"version": "4.1.0"
}, {
"class": "io.confluent.connect.hdfs.tools.SchemaSourceConnector",
"type": "source",
"version": "1.1.0-cp1"
}, {
"class": "io.confluent.connect.ibm.mq.IbmMQSourceConnector",
"type": "source",
"version": "4.1.0"
}, {
"class": "io.confluent.connect.jdbc.JdbcSinkConnector",
"type": "sink",
"version": "4.1.0"
}, {
"class": "io.confluent.connect.jdbc.JdbcSourceConnector",
"type": "source",
"version": "4.1.0"
}, {
"class": "io.confluent.connect.jms.JmsSourceConnector",
"type": "source",
"version": "4.1.0"
}, {
"class": "io.confluent.connect.replicator.ReplicatorSourceConnector",
"type": "source",
"version": "4.1.0"
}, {
"class": "io.confluent.connect.s3.S3SinkConnector",
"type": "sink",
"version": "4.1.0"
}, {
"class": "io.confluent.connect.storage.tools.SchemaSourceConnector",
"type": "source",
"version": "1.1.0-cp1"
}, {
"class": "io.debezium.connector.mysql.MySqlConnector",
"type": "source",
"version": "0.7.5"
}, {
"class": "org.apache.kafka.connect.file.FileStreamSinkConnector",
"type": "sink",
"version": "1.1.0-cp1"
}, {
"class": "org.apache.kafka.connect.file.FileStreamSourceConnector",
"type": "source",
"version": "1.1.0-cp1"
}
How can I delete the following connector?
{
"class": "io.debezium.connector.mysql.MySqlConnector",
"type": "source",
"version": "0.7.5"
}
Remove it from your plugin.path.
plugin.path is path at which all connector files gets installed. for example it could be /opt/confluent-7.0.0/share/confluent-hub-components/