@n8n-dev/n8n-nodes-petstore 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -0
- package/dist/credentials/PetstoreApi.credentials.d.ts +10 -0
- package/dist/credentials/PetstoreApi.credentials.js +47 -0
- package/dist/credentials/PetstoreApi.credentials.js.map +1 -0
- package/dist/icons/petstore.dark.svg +4 -0
- package/dist/icons/petstore.svg +4 -0
- package/dist/nodes/Petstore/Petstore.node.d.ts +4 -0
- package/dist/nodes/Petstore/Petstore.node.js +68 -0
- package/dist/nodes/Petstore/Petstore.node.js.map +1 -0
- package/dist/nodes/Petstore/Petstore.node.json +20 -0
- package/dist/nodes/Petstore/petstore.dark.svg +4 -0
- package/dist/nodes/Petstore/petstore.svg +4 -0
- package/dist/nodes/Petstore/resources/index.d.ts +3 -0
- package/dist/nodes/Petstore/resources/index.js +10 -0
- package/dist/nodes/Petstore/resources/index.js.map +1 -0
- package/dist/nodes/Petstore/resources/pet/index.d.ts +2 -0
- package/dist/nodes/Petstore/resources/pet/index.js +845 -0
- package/dist/nodes/Petstore/resources/pet/index.js.map +1 -0
- package/dist/nodes/Petstore/resources/store/index.d.ts +2 -0
- package/dist/nodes/Petstore/resources/store/index.js +341 -0
- package/dist/nodes/Petstore/resources/store/index.js.map +1 -0
- package/dist/nodes/Petstore/resources/user/index.d.ts +2 -0
- package/dist/nodes/Petstore/resources/user/index.js +750 -0
- package/dist/nodes/Petstore/resources/user/index.js.map +1 -0
- package/dist/package.json +53 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +53 -0
package/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# @n8n-dev/n8n-nodes-petstore
|
|
2
|
+
|
|
3
|
+
> n8n community node for **petstore** API
|
|
4
|
+
|
|
5
|
+
Swagger Petstore sample API
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @n8n-dev/n8n-nodes-petstore
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
1. In n8n: **Settings → Community Nodes → Install** → `@n8n-dev/n8n-nodes-petstore`
|
|
16
|
+
2. Add credentials: **petstore API** → API Key
|
|
17
|
+
3. Use the node in your workflows
|
|
18
|
+
|
|
19
|
+
## Auto-generated
|
|
20
|
+
|
|
21
|
+
This node was auto-generated from an OpenAPI specification using
|
|
22
|
+
[@kelvinzer0/n8n-openapi-node-ultimate](https://github.com/kelvinzer0/n8n-openapi-node-ultimate).
|
|
23
|
+
|
|
24
|
+
## License
|
|
25
|
+
|
|
26
|
+
MIT
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IAuthenticateGeneric, Icon, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class PetstoreApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
icon: Icon;
|
|
6
|
+
documentationUrl: string;
|
|
7
|
+
properties: INodeProperties[];
|
|
8
|
+
authenticate: IAuthenticateGeneric;
|
|
9
|
+
test: ICredentialTestRequest;
|
|
10
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PetstoreApi = void 0;
|
|
4
|
+
class PetstoreApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'N8nDevPetstoreApi';
|
|
7
|
+
this.displayName = 'petstore API';
|
|
8
|
+
this.icon = { light: 'file:../nodes/Petstore/petstore.svg', dark: 'file:../nodes/Petstore/petstore.dark.svg' };
|
|
9
|
+
this.documentationUrl = '';
|
|
10
|
+
this.properties = [
|
|
11
|
+
{
|
|
12
|
+
displayName: 'Base URL',
|
|
13
|
+
name: 'url',
|
|
14
|
+
type: 'string',
|
|
15
|
+
default: '/api/v3',
|
|
16
|
+
required: true,
|
|
17
|
+
placeholder: '/api/v3',
|
|
18
|
+
description: 'The base URL of your petstore API server',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: 'API Key',
|
|
22
|
+
name: 'apiKey',
|
|
23
|
+
type: 'string',
|
|
24
|
+
typeOptions: { password: true },
|
|
25
|
+
default: '',
|
|
26
|
+
required: true,
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
this.authenticate = {
|
|
30
|
+
type: 'generic',
|
|
31
|
+
properties: {
|
|
32
|
+
headers: {
|
|
33
|
+
Authorization: '=Bearer {{$credentials.apiKey}}',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
this.test = {
|
|
38
|
+
request: {
|
|
39
|
+
baseURL: '={{$credentials.url}}',
|
|
40
|
+
url: '/',
|
|
41
|
+
method: 'GET',
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.PetstoreApi = PetstoreApi;
|
|
47
|
+
//# sourceMappingURL=PetstoreApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PetstoreApi.credentials.js","sourceRoot":"","sources":["../../credentials/PetstoreApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,WAAW;IAAxB;QACC,SAAI,GAAG,mBAAmB,CAAC;QAE3B,gBAAW,GAAG,cAAc,CAAC;QAE7B,SAAI,GAAS,EAAE,KAAK,EAAE,qCAAqC,EAAE,IAAI,EAAE,0CAA0C,EAAE,CAAC;QAEhH,qBAAgB,GAAG,EAAE,CAAC;QAEtB,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,KAAK;gBACX,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,SAAS;gBAClB,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,SAAS;gBACtB,WAAW,EAAE,0CAA0C;aACvD;YACD;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;aACd;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,iCAAiC;iBAChD;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,uBAAuB;gBAChC,GAAG,EAAE,GAAG;gBACR,MAAM,EAAE,KAAK;aACb;SACD,CAAC;IACH,CAAC;CAAA;AA7CD,kCA6CC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Petstore = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const pet_1 = require("./resources/pet");
|
|
6
|
+
const store_1 = require("./resources/store");
|
|
7
|
+
const user_1 = require("./resources/user");
|
|
8
|
+
class Petstore {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.description = {
|
|
11
|
+
displayName: 'petstore',
|
|
12
|
+
name: 'N8nDevPetstore',
|
|
13
|
+
icon: { light: 'file:./petstore.svg', dark: 'file:./petstore.dark.svg' },
|
|
14
|
+
group: ['input'],
|
|
15
|
+
version: 1,
|
|
16
|
+
subtitle: '={{\$parameter["operation"] + ": " + \$parameter["resource"]}}',
|
|
17
|
+
description: 'Swagger Petstore sample API',
|
|
18
|
+
defaults: { name: 'petstore' },
|
|
19
|
+
usableAsTool: true,
|
|
20
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
21
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
22
|
+
credentials: [
|
|
23
|
+
{
|
|
24
|
+
name: 'N8nDevPetstoreApi',
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
requestDefaults: {
|
|
29
|
+
baseURL: '={{\$credentials.url}}',
|
|
30
|
+
headers: {
|
|
31
|
+
Accept: 'application/json',
|
|
32
|
+
'Content-Type': 'application/json',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
properties: [
|
|
36
|
+
{
|
|
37
|
+
"displayName": "Resource",
|
|
38
|
+
"name": "resource",
|
|
39
|
+
"type": "options",
|
|
40
|
+
"noDataExpression": true,
|
|
41
|
+
"options": [
|
|
42
|
+
{
|
|
43
|
+
"name": "Pet",
|
|
44
|
+
"value": "Pet",
|
|
45
|
+
"description": "Everything about your Pets"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "Store",
|
|
49
|
+
"value": "Store",
|
|
50
|
+
"description": "Access to Petstore orders"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "User",
|
|
54
|
+
"value": "User",
|
|
55
|
+
"description": "Operations about user"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"default": ""
|
|
59
|
+
},
|
|
60
|
+
...pet_1.petDescription,
|
|
61
|
+
...store_1.storeDescription,
|
|
62
|
+
...user_1.userDescription
|
|
63
|
+
],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.Petstore = Petstore;
|
|
68
|
+
//# sourceMappingURL=Petstore.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Petstore.node.js","sourceRoot":"","sources":["../../../nodes/Petstore/Petstore.node.ts"],"names":[],"mappings":";;;AAAA,+CAA8F;AAC9F,yCAAiD;AACjD,6CAAqD;AACrD,2CAAmD;AAEnD,MAAa,QAAQ;IAArB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE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
5
|
+
"categories": [
|
|
6
|
+
"Development"
|
|
7
|
+
],
|
|
8
|
+
"resources": {
|
|
9
|
+
"primaryDocumentation": [
|
|
10
|
+
{
|
|
11
|
+
"url": "https://github.com/kelvinzer0/n8n-nodes-petstore"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"credentialDocumentation": [
|
|
15
|
+
{
|
|
16
|
+
"url": "https://github.com/kelvinzer0/n8n-nodes-petstore?tab=readme-ov-file#credentials"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.userDescription = exports.storeDescription = exports.petDescription = void 0;
|
|
4
|
+
var pet_1 = require("./pet");
|
|
5
|
+
Object.defineProperty(exports, "petDescription", { enumerable: true, get: function () { return pet_1.petDescription; } });
|
|
6
|
+
var store_1 = require("./store");
|
|
7
|
+
Object.defineProperty(exports, "storeDescription", { enumerable: true, get: function () { return store_1.storeDescription; } });
|
|
8
|
+
var user_1 = require("./user");
|
|
9
|
+
Object.defineProperty(exports, "userDescription", { enumerable: true, get: function () { return user_1.userDescription; } });
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/Petstore/resources/index.ts"],"names":[],"mappings":";;;AAAA,6BAAuC;AAA9B,qGAAA,cAAc,OAAA;AACvB,iCAA2C;AAAlC,yGAAA,gBAAgB,OAAA;AACzB,+BAAyC;AAAhC,uGAAA,eAAe,OAAA"}
|