@digipair/skill-rabbitmq 0.132.8
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 +8 -0
- package/dist/index.cjs.js +68 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +53960 -0
- package/dist/schema.fr.json +163 -0
- package/dist/schema.json +163 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/lib/skill-rabbitmq.d.ts +7 -0
- package/dist/src/lib/skill-rabbitmq.d.ts.map +1 -0
- package/package.json +37 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "@digipair/skill-rabbitmq",
|
|
5
|
+
"summary": "Produire/consommer des messages RabbitMq via des channels",
|
|
6
|
+
"description": "Gérer la communication avec RabbitMq via des channels.",
|
|
7
|
+
"version": "0.1.0",
|
|
8
|
+
"x-icon": "💻"
|
|
9
|
+
},
|
|
10
|
+
"paths": {
|
|
11
|
+
"/rabbit": {
|
|
12
|
+
"post": {
|
|
13
|
+
"tags": [
|
|
14
|
+
"service"
|
|
15
|
+
],
|
|
16
|
+
"summary": "Connecter au serveur RabbitMq",
|
|
17
|
+
"parameters": [
|
|
18
|
+
{
|
|
19
|
+
"name": "url",
|
|
20
|
+
"summary": "Serveur RabbitMq",
|
|
21
|
+
"required": true,
|
|
22
|
+
"description": "Url du serveur",
|
|
23
|
+
"schema": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"x-events": [],
|
|
29
|
+
"responses": {
|
|
30
|
+
"200": {
|
|
31
|
+
"description": "Connexion au serveur RabbitMq",
|
|
32
|
+
"content": {
|
|
33
|
+
"application/json": {
|
|
34
|
+
"schema": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"properties": {
|
|
37
|
+
"createChannel": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"description": "Méthode de création des channels"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"/produce": {
|
|
50
|
+
"post": {
|
|
51
|
+
"tags": [
|
|
52
|
+
"service"
|
|
53
|
+
],
|
|
54
|
+
"summary": "Produire des messages RabbitMq",
|
|
55
|
+
"parameters": [
|
|
56
|
+
{
|
|
57
|
+
"name": "client",
|
|
58
|
+
"summary": "Connection au serveur RabbitMq",
|
|
59
|
+
"required": true,
|
|
60
|
+
"description": "Client de production/consommation de messages RabbitMq",
|
|
61
|
+
"schema": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"items": {
|
|
64
|
+
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "queue",
|
|
70
|
+
"summary": "Queue",
|
|
71
|
+
"required": true,
|
|
72
|
+
"description": "Queue RabbitMq",
|
|
73
|
+
"schema": {
|
|
74
|
+
"type": "string"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "messages",
|
|
79
|
+
"summary": "Message",
|
|
80
|
+
"required": true,
|
|
81
|
+
"description": "Contenu du message (peut être un objet stringifié)",
|
|
82
|
+
"schema": {
|
|
83
|
+
"type": "string"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"x-events": []
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"/consume": {
|
|
91
|
+
"post": {
|
|
92
|
+
"tags": [
|
|
93
|
+
"service"
|
|
94
|
+
],
|
|
95
|
+
"summary": "Consommer un message RabbitMq",
|
|
96
|
+
"parameters": [
|
|
97
|
+
{
|
|
98
|
+
"name": "client",
|
|
99
|
+
"summary": "Connection au serveur RabbitMq",
|
|
100
|
+
"required": true,
|
|
101
|
+
"description": "Client de production/consommation de messages RabbitMq",
|
|
102
|
+
"schema": {
|
|
103
|
+
"type": "array",
|
|
104
|
+
"items": {
|
|
105
|
+
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "execute",
|
|
111
|
+
"summary": "Execute",
|
|
112
|
+
"required": true,
|
|
113
|
+
"description": "Commandes à exécuter",
|
|
114
|
+
"schema": {
|
|
115
|
+
"type": "array",
|
|
116
|
+
"items": {
|
|
117
|
+
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"name": "queue",
|
|
123
|
+
"summary": "Queue",
|
|
124
|
+
"required": true,
|
|
125
|
+
"description": "Topic RabbitMq",
|
|
126
|
+
"schema": {
|
|
127
|
+
"type": "Queue"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"x-events": [],
|
|
132
|
+
"responses": {
|
|
133
|
+
"200": {
|
|
134
|
+
"description": "Objet connexion et channel pour clôture",
|
|
135
|
+
"content": {
|
|
136
|
+
"application/json": {
|
|
137
|
+
"schema": {
|
|
138
|
+
"type": "object",
|
|
139
|
+
"description": "Objets connexion et channel",
|
|
140
|
+
"properties": {
|
|
141
|
+
"connection": {
|
|
142
|
+
"type": "object",
|
|
143
|
+
"description": "Objet connexion"
|
|
144
|
+
},
|
|
145
|
+
"channel": {
|
|
146
|
+
"type": "object",
|
|
147
|
+
"description": "Objet channel"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"additionalProperties": true
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"components": {
|
|
160
|
+
"schemas": {}
|
|
161
|
+
},
|
|
162
|
+
"x-scene-blocks": {}
|
|
163
|
+
}
|
package/dist/schema.json
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "@digipair/skill-rabbitmq",
|
|
5
|
+
"summary": "Produce/consume RabbitMQ messages through channels",
|
|
6
|
+
"description": "Manage communication with RabbitMQ through channels.",
|
|
7
|
+
"version": "0.1.0",
|
|
8
|
+
"x-icon": "💻"
|
|
9
|
+
},
|
|
10
|
+
"paths": {
|
|
11
|
+
"/rabbit": {
|
|
12
|
+
"post": {
|
|
13
|
+
"tags": [
|
|
14
|
+
"service"
|
|
15
|
+
],
|
|
16
|
+
"summary": "Connect to the RabbitMQ server",
|
|
17
|
+
"parameters": [
|
|
18
|
+
{
|
|
19
|
+
"name": "url",
|
|
20
|
+
"summary": "RabbitMQ server",
|
|
21
|
+
"required": true,
|
|
22
|
+
"description": "Server URL",
|
|
23
|
+
"schema": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"x-events": [],
|
|
29
|
+
"responses": {
|
|
30
|
+
"200": {
|
|
31
|
+
"description": "Connection to the RabbitMQ server",
|
|
32
|
+
"content": {
|
|
33
|
+
"application/json": {
|
|
34
|
+
"schema": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"properties": {
|
|
37
|
+
"createChannel": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"description": "Channel creation method"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"/produce": {
|
|
50
|
+
"post": {
|
|
51
|
+
"tags": [
|
|
52
|
+
"service"
|
|
53
|
+
],
|
|
54
|
+
"summary": "Produce RabbitMQ messages",
|
|
55
|
+
"parameters": [
|
|
56
|
+
{
|
|
57
|
+
"name": "client",
|
|
58
|
+
"summary": "Connection to the RabbitMQ server",
|
|
59
|
+
"required": true,
|
|
60
|
+
"description": "RabbitMQ message producer/consumer client",
|
|
61
|
+
"schema": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"items": {
|
|
64
|
+
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "queue",
|
|
70
|
+
"summary": "Queue",
|
|
71
|
+
"required": true,
|
|
72
|
+
"description": "RabbitMQ queue",
|
|
73
|
+
"schema": {
|
|
74
|
+
"type": "string"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "messages",
|
|
79
|
+
"summary": "Message",
|
|
80
|
+
"required": true,
|
|
81
|
+
"description": "Message content (can be a stringified object)",
|
|
82
|
+
"schema": {
|
|
83
|
+
"type": "string"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"x-events": []
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"/consume": {
|
|
91
|
+
"post": {
|
|
92
|
+
"tags": [
|
|
93
|
+
"service"
|
|
94
|
+
],
|
|
95
|
+
"summary": "Consume a RabbitMQ message",
|
|
96
|
+
"parameters": [
|
|
97
|
+
{
|
|
98
|
+
"name": "client",
|
|
99
|
+
"summary": "Connection to the RabbitMQ server",
|
|
100
|
+
"required": true,
|
|
101
|
+
"description": "RabbitMQ message producer/consumer client",
|
|
102
|
+
"schema": {
|
|
103
|
+
"type": "array",
|
|
104
|
+
"items": {
|
|
105
|
+
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "execute",
|
|
111
|
+
"summary": "Execute",
|
|
112
|
+
"required": true,
|
|
113
|
+
"description": "Commands to execute",
|
|
114
|
+
"schema": {
|
|
115
|
+
"type": "array",
|
|
116
|
+
"items": {
|
|
117
|
+
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"name": "queue",
|
|
123
|
+
"summary": "Queue",
|
|
124
|
+
"required": true,
|
|
125
|
+
"description": "RabbitMQ topic",
|
|
126
|
+
"schema": {
|
|
127
|
+
"type": "Queue"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"x-events": [],
|
|
132
|
+
"responses": {
|
|
133
|
+
"200": {
|
|
134
|
+
"description": "Connection and channel object for closing",
|
|
135
|
+
"content": {
|
|
136
|
+
"application/json": {
|
|
137
|
+
"schema": {
|
|
138
|
+
"type": "object",
|
|
139
|
+
"description": "Connection and channel objects",
|
|
140
|
+
"properties": {
|
|
141
|
+
"connection": {
|
|
142
|
+
"type": "object",
|
|
143
|
+
"description": "Connection object"
|
|
144
|
+
},
|
|
145
|
+
"channel": {
|
|
146
|
+
"type": "object",
|
|
147
|
+
"description": "Channel object"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"additionalProperties": true
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"components": {
|
|
160
|
+
"schemas": {}
|
|
161
|
+
},
|
|
162
|
+
"x-scene-blocks": {}
|
|
163
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PinsSettings } from '@digipair/engine';
|
|
2
|
+
import * as amqplib from 'amqplib';
|
|
3
|
+
export declare const rabbit: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<amqplib.ChannelModel>;
|
|
4
|
+
export declare const produce: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
5
|
+
export declare const consume: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
6
|
+
export declare const consumerDisconnect: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
|
|
7
|
+
//# sourceMappingURL=skill-rabbitmq.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-rabbitmq.d.ts","sourceRoot":"","sources":["../../../src/lib/skill-rabbitmq.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AA8CnC,eAAO,MAAM,MAAM,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,kCACjB,CAAC;AAElE,eAAO,MAAM,OAAO,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACjB,CAAC;AAEnE,eAAO,MAAM,OAAO,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACjB,CAAC;AAEnE,eAAO,MAAM,kBAAkB,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,kBACjB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@digipair/skill-rabbitmq",
|
|
3
|
+
"version": "0.132.8",
|
|
4
|
+
"main": "./dist/index.cjs.js",
|
|
5
|
+
"module": "./dist/index.esm.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"digipair",
|
|
9
|
+
"web",
|
|
10
|
+
"service",
|
|
11
|
+
"tool"
|
|
12
|
+
],
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.esm.js",
|
|
17
|
+
"default": "./dist/index.cjs.js"
|
|
18
|
+
},
|
|
19
|
+
"./index.esm.js": "./dist/index.esm.js",
|
|
20
|
+
"./index.cjs.js": "./dist/index.cjs.js",
|
|
21
|
+
"./package.json": "./package.json",
|
|
22
|
+
"./schema.json": "./dist/schema.json",
|
|
23
|
+
"./schema.fr.json": "./dist/schema.fr.json"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist",
|
|
27
|
+
"README.md",
|
|
28
|
+
"package.json"
|
|
29
|
+
],
|
|
30
|
+
"nx": {
|
|
31
|
+
"name": "skill-rabbitmq"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"amqplib": "^0.10.9",
|
|
35
|
+
"@types/amqplib": "^0.10.8"
|
|
36
|
+
}
|
|
37
|
+
}
|