@juzi/wechaty-grpc 1.0.11 → 1.0.12

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.
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "Wechaty Puppet Service OpenAPI Specification",
5
5
  "description": "Wechaty is a Conversational RPA SDK for chatbot makers. With only 6 lines of code, you can create a bot on the most popular IMs like WeChat, Whatsapp, WeCom, Gitter, etc.\n\nWechaty Puppet Service is the RESTful API for Wechaty API, which is build on top of the Wechaty Puppet Abstraction and the gRPC proto definition.",
6
- "version": "1.0.11",
6
+ "version": "1.0.12",
7
7
  "contact": {
8
8
  "name": "Wechaty",
9
9
  "url": "https://github.com/wechaty/openapi",
@@ -303,88 +303,6 @@
303
303
  ]
304
304
  }
305
305
  },
306
- "/contacts/{contactId}/tag/tags/{tagId}": {
307
- "delete": {
308
- "operationId": "Puppet_TagContactTagRemove",
309
- "responses": {
310
- "200": {
311
- "description": "A successful response.",
312
- "schema": {
313
- "$ref": "#/definitions/puppetTagContactTagRemoveResponse"
314
- }
315
- },
316
- "default": {
317
- "description": "An unexpected error response.",
318
- "schema": {
319
- "$ref": "#/definitions/rpcStatus"
320
- }
321
- }
322
- },
323
- "parameters": [
324
- {
325
- "name": "contactId",
326
- "in": "path",
327
- "required": true,
328
- "type": "string"
329
- },
330
- {
331
- "name": "tagId",
332
- "in": "path",
333
- "required": true,
334
- "type": "string"
335
- },
336
- {
337
- "name": "tagGroupId",
338
- "in": "query",
339
- "required": false,
340
- "type": "string"
341
- }
342
- ],
343
- "tags": [
344
- "Puppet"
345
- ]
346
- },
347
- "put": {
348
- "operationId": "Puppet_TagContactTagAdd",
349
- "responses": {
350
- "200": {
351
- "description": "A successful response.",
352
- "schema": {
353
- "$ref": "#/definitions/puppetTagContactTagAddResponse"
354
- }
355
- },
356
- "default": {
357
- "description": "An unexpected error response.",
358
- "schema": {
359
- "$ref": "#/definitions/rpcStatus"
360
- }
361
- }
362
- },
363
- "parameters": [
364
- {
365
- "name": "contactId",
366
- "in": "path",
367
- "required": true,
368
- "type": "string"
369
- },
370
- {
371
- "name": "tagId",
372
- "in": "path",
373
- "required": true,
374
- "type": "string"
375
- },
376
- {
377
- "name": "tagGroupId",
378
- "in": "query",
379
- "required": false,
380
- "type": "string"
381
- }
382
- ],
383
- "tags": [
384
- "Puppet"
385
- ]
386
- }
387
- },
388
306
  "/contacts/{id}": {
389
307
  "get": {
390
308
  "summary": "Get a contact payload",
@@ -2029,6 +1947,16 @@
2029
1947
  "in": "path",
2030
1948
  "required": true,
2031
1949
  "type": "string"
1950
+ },
1951
+ {
1952
+ "name": "contactIds",
1953
+ "in": "query",
1954
+ "required": false,
1955
+ "type": "array",
1956
+ "items": {
1957
+ "type": "string"
1958
+ },
1959
+ "collectionFormat": "multi"
2032
1960
  }
2033
1961
  ],
2034
1962
  "tags": [
@@ -2222,14 +2150,14 @@
2222
2150
  ]
2223
2151
  }
2224
2152
  },
2225
- "/tag/groups": {
2226
- "get": {
2227
- "operationId": "Puppet_TagGroupList",
2153
+ "/tag/add": {
2154
+ "post": {
2155
+ "operationId": "Puppet_TagTagAdd",
2228
2156
  "responses": {
2229
2157
  "200": {
2230
2158
  "description": "A successful response.",
2231
2159
  "schema": {
2232
- "$ref": "#/definitions/puppetTagGroupListResponse"
2160
+ "$ref": "#/definitions/puppetTagTagAddResponse"
2233
2161
  }
2234
2162
  },
2235
2163
  "default": {
@@ -2239,19 +2167,29 @@
2239
2167
  }
2240
2168
  }
2241
2169
  },
2170
+ "parameters": [
2171
+ {
2172
+ "name": "body",
2173
+ "in": "body",
2174
+ "required": true,
2175
+ "schema": {
2176
+ "$ref": "#/definitions/puppetTagTagAddRequest"
2177
+ }
2178
+ }
2179
+ ],
2242
2180
  "tags": [
2243
2181
  "Puppet"
2244
2182
  ]
2245
2183
  }
2246
2184
  },
2247
- "/tag/groups/{tagGroupId}/tags": {
2248
- "get": {
2249
- "operationId": "Puppet_TagGroupTagList",
2185
+ "/tag/addContactTag": {
2186
+ "post": {
2187
+ "operationId": "Puppet_TagContactTagAdd",
2250
2188
  "responses": {
2251
2189
  "200": {
2252
2190
  "description": "A successful response.",
2253
2191
  "schema": {
2254
- "$ref": "#/definitions/puppetTagGroupTagListResponse"
2192
+ "$ref": "#/definitions/puppetTagContactTagAddResponse"
2255
2193
  }
2256
2194
  },
2257
2195
  "default": {
@@ -2263,10 +2201,12 @@
2263
2201
  },
2264
2202
  "parameters": [
2265
2203
  {
2266
- "name": "tagGroupId",
2267
- "in": "path",
2204
+ "name": "body",
2205
+ "in": "body",
2268
2206
  "required": true,
2269
- "type": "string"
2207
+ "schema": {
2208
+ "$ref": "#/definitions/puppetTagContactTagAddRequest"
2209
+ }
2270
2210
  }
2271
2211
  ],
2272
2212
  "tags": [
@@ -2274,14 +2214,14 @@
2274
2214
  ]
2275
2215
  }
2276
2216
  },
2277
- "/tag/tags": {
2278
- "get": {
2279
- "operationId": "Puppet_TagTagList",
2217
+ "/tag/delete": {
2218
+ "post": {
2219
+ "operationId": "Puppet_TagTagDelete",
2280
2220
  "responses": {
2281
2221
  "200": {
2282
2222
  "description": "A successful response.",
2283
2223
  "schema": {
2284
- "$ref": "#/definitions/puppetTagTagListResponse"
2224
+ "$ref": "#/definitions/puppetTagTagDeleteResponse"
2285
2225
  }
2286
2226
  },
2287
2227
  "default": {
@@ -2291,19 +2231,29 @@
2291
2231
  }
2292
2232
  }
2293
2233
  },
2234
+ "parameters": [
2235
+ {
2236
+ "name": "body",
2237
+ "in": "body",
2238
+ "required": true,
2239
+ "schema": {
2240
+ "$ref": "#/definitions/puppetTagTagDeleteRequest"
2241
+ }
2242
+ }
2243
+ ],
2294
2244
  "tags": [
2295
2245
  "Puppet"
2296
2246
  ]
2297
2247
  }
2298
2248
  },
2299
- "/tag/{tagGroupId}/{tagId}/contacts": {
2249
+ "/tag/groups/{tagGroupId}/tags": {
2300
2250
  "get": {
2301
- "operationId": "Puppet_TagTagContactList",
2251
+ "operationId": "Puppet_TagGroupTagList",
2302
2252
  "responses": {
2303
2253
  "200": {
2304
2254
  "description": "A successful response.",
2305
2255
  "schema": {
2306
- "$ref": "#/definitions/puppetTagTagContactListResponse"
2256
+ "$ref": "#/definitions/puppetTagGroupTagListResponse"
2307
2257
  }
2308
2258
  },
2309
2259
  "default": {
@@ -2319,12 +2269,6 @@
2319
2269
  "in": "path",
2320
2270
  "required": true,
2321
2271
  "type": "string"
2322
- },
2323
- {
2324
- "name": "tagId",
2325
- "in": "path",
2326
- "required": true,
2327
- "type": "string"
2328
2272
  }
2329
2273
  ],
2330
2274
  "tags": [
@@ -2332,14 +2276,36 @@
2332
2276
  ]
2333
2277
  }
2334
2278
  },
2335
- "/tags/groups/{tagGroupId}": {
2336
- "delete": {
2337
- "operationId": "Puppet_TagGroupDelete",
2279
+ "/tag/list": {
2280
+ "get": {
2281
+ "operationId": "Puppet_TagTagList",
2338
2282
  "responses": {
2339
2283
  "200": {
2340
2284
  "description": "A successful response.",
2341
2285
  "schema": {
2342
- "$ref": "#/definitions/puppetTagGroupDeleteResponse"
2286
+ "$ref": "#/definitions/puppetTagTagListResponse"
2287
+ }
2288
+ },
2289
+ "default": {
2290
+ "description": "An unexpected error response.",
2291
+ "schema": {
2292
+ "$ref": "#/definitions/rpcStatus"
2293
+ }
2294
+ }
2295
+ },
2296
+ "tags": [
2297
+ "Puppet"
2298
+ ]
2299
+ }
2300
+ },
2301
+ "/tag/removeContactTag": {
2302
+ "post": {
2303
+ "operationId": "Puppet_TagContactTagRemove",
2304
+ "responses": {
2305
+ "200": {
2306
+ "description": "A successful response.",
2307
+ "schema": {
2308
+ "$ref": "#/definitions/puppetTagContactTagRemoveResponse"
2343
2309
  }
2344
2310
  },
2345
2311
  "default": {
@@ -2351,10 +2317,12 @@
2351
2317
  },
2352
2318
  "parameters": [
2353
2319
  {
2354
- "name": "tagGroupId",
2355
- "in": "path",
2320
+ "name": "body",
2321
+ "in": "body",
2356
2322
  "required": true,
2357
- "type": "string"
2323
+ "schema": {
2324
+ "$ref": "#/definitions/puppetTagContactTagRemoveRequest"
2325
+ }
2358
2326
  }
2359
2327
  ],
2360
2328
  "tags": [
@@ -2362,14 +2330,14 @@
2362
2330
  ]
2363
2331
  }
2364
2332
  },
2365
- "/tags/groups/{tagGroupId}/tags/{tagId}": {
2366
- "delete": {
2367
- "operationId": "Puppet_TagTagDelete",
2333
+ "/tag/{tag.groupId}/{tag.id}/contacts": {
2334
+ "get": {
2335
+ "operationId": "Puppet_TagTagContactList",
2368
2336
  "responses": {
2369
2337
  "200": {
2370
2338
  "description": "A successful response.",
2371
2339
  "schema": {
2372
- "$ref": "#/definitions/puppetTagTagDeleteResponse"
2340
+ "$ref": "#/definitions/puppetTagTagContactListResponse"
2373
2341
  }
2374
2342
  },
2375
2343
  "default": {
@@ -2381,13 +2349,13 @@
2381
2349
  },
2382
2350
  "parameters": [
2383
2351
  {
2384
- "name": "tagGroupId",
2352
+ "name": "tag.groupId",
2385
2353
  "in": "path",
2386
2354
  "required": true,
2387
2355
  "type": "string"
2388
2356
  },
2389
2357
  {
2390
- "name": "tagId",
2358
+ "name": "tag.id",
2391
2359
  "in": "path",
2392
2360
  "required": true,
2393
2361
  "type": "string"
@@ -2398,14 +2366,14 @@
2398
2366
  ]
2399
2367
  }
2400
2368
  },
2401
- "/tags/groups/{tagGroupId}/tags/{tagName}": {
2402
- "put": {
2403
- "operationId": "Puppet_TagTagAdd",
2369
+ "/tagGroup/add": {
2370
+ "post": {
2371
+ "operationId": "Puppet_TagGroupAdd",
2404
2372
  "responses": {
2405
2373
  "200": {
2406
2374
  "description": "A successful response.",
2407
2375
  "schema": {
2408
- "$ref": "#/definitions/puppetTagTagAddResponse"
2376
+ "$ref": "#/definitions/puppetTagGroupAddResponse"
2409
2377
  }
2410
2378
  },
2411
2379
  "default": {
@@ -2417,16 +2385,12 @@
2417
2385
  },
2418
2386
  "parameters": [
2419
2387
  {
2420
- "name": "tagGroupId",
2421
- "in": "path",
2422
- "required": true,
2423
- "type": "string"
2424
- },
2425
- {
2426
- "name": "tagName",
2427
- "in": "path",
2388
+ "name": "body",
2389
+ "in": "body",
2428
2390
  "required": true,
2429
- "type": "string"
2391
+ "schema": {
2392
+ "$ref": "#/definitions/puppetTagGroupAddRequest"
2393
+ }
2430
2394
  }
2431
2395
  ],
2432
2396
  "tags": [
@@ -2434,14 +2398,14 @@
2434
2398
  ]
2435
2399
  }
2436
2400
  },
2437
- "/tags/groups/{tagGroupName}": {
2438
- "put": {
2439
- "operationId": "Puppet_TagGroupAdd",
2401
+ "/tagGroup/delete": {
2402
+ "post": {
2403
+ "operationId": "Puppet_TagGroupDelete",
2440
2404
  "responses": {
2441
2405
  "200": {
2442
2406
  "description": "A successful response.",
2443
2407
  "schema": {
2444
- "$ref": "#/definitions/puppetTagGroupAddResponse"
2408
+ "$ref": "#/definitions/puppetTagGroupDeleteResponse"
2445
2409
  }
2446
2410
  },
2447
2411
  "default": {
@@ -2453,10 +2417,12 @@
2453
2417
  },
2454
2418
  "parameters": [
2455
2419
  {
2456
- "name": "tagGroupName",
2457
- "in": "path",
2420
+ "name": "body",
2421
+ "in": "body",
2458
2422
  "required": true,
2459
- "type": "string"
2423
+ "schema": {
2424
+ "$ref": "#/definitions/puppetTagGroupDeleteRequest"
2425
+ }
2460
2426
  }
2461
2427
  ],
2462
2428
  "tags": [
@@ -2464,6 +2430,28 @@
2464
2430
  ]
2465
2431
  }
2466
2432
  },
2433
+ "/tagGroup/list": {
2434
+ "get": {
2435
+ "operationId": "Puppet_TagGroupList",
2436
+ "responses": {
2437
+ "200": {
2438
+ "description": "A successful response.",
2439
+ "schema": {
2440
+ "$ref": "#/definitions/puppetTagGroupListResponse"
2441
+ }
2442
+ },
2443
+ "default": {
2444
+ "description": "An unexpected error response.",
2445
+ "schema": {
2446
+ "$ref": "#/definitions/rpcStatus"
2447
+ }
2448
+ }
2449
+ },
2450
+ "tags": [
2451
+ "Puppet"
2452
+ ]
2453
+ }
2454
+ },
2467
2455
  "/upload": {
2468
2456
  "post": {
2469
2457
  "operationId": "Puppet_Upload",
@@ -3757,6 +3745,23 @@
3757
3745
  "puppetStopResponse": {
3758
3746
  "type": "object"
3759
3747
  },
3748
+ "puppetTagContactTagAddRequest": {
3749
+ "type": "object",
3750
+ "properties": {
3751
+ "tags": {
3752
+ "type": "array",
3753
+ "items": {
3754
+ "$ref": "#/definitions/puppetTagIdentifier"
3755
+ }
3756
+ },
3757
+ "contactIds": {
3758
+ "type": "array",
3759
+ "items": {
3760
+ "type": "string"
3761
+ }
3762
+ }
3763
+ }
3764
+ },
3760
3765
  "puppetTagContactTagAddResponse": {
3761
3766
  "type": "object"
3762
3767
  },
@@ -3771,9 +3776,34 @@
3771
3776
  }
3772
3777
  }
3773
3778
  },
3779
+ "puppetTagContactTagRemoveRequest": {
3780
+ "type": "object",
3781
+ "properties": {
3782
+ "tags": {
3783
+ "type": "array",
3784
+ "items": {
3785
+ "$ref": "#/definitions/puppetTagIdentifier"
3786
+ }
3787
+ },
3788
+ "contactIds": {
3789
+ "type": "array",
3790
+ "items": {
3791
+ "type": "string"
3792
+ }
3793
+ }
3794
+ }
3795
+ },
3774
3796
  "puppetTagContactTagRemoveResponse": {
3775
3797
  "type": "object"
3776
3798
  },
3799
+ "puppetTagGroupAddRequest": {
3800
+ "type": "object",
3801
+ "properties": {
3802
+ "tagGroupName": {
3803
+ "type": "string"
3804
+ }
3805
+ }
3806
+ },
3777
3807
  "puppetTagGroupAddResponse": {
3778
3808
  "type": "object",
3779
3809
  "properties": {
@@ -3782,6 +3812,14 @@
3782
3812
  }
3783
3813
  }
3784
3814
  },
3815
+ "puppetTagGroupDeleteRequest": {
3816
+ "type": "object",
3817
+ "properties": {
3818
+ "tagGroupId": {
3819
+ "type": "string"
3820
+ }
3821
+ }
3822
+ },
3785
3823
  "puppetTagGroupDeleteResponse": {
3786
3824
  "type": "object"
3787
3825
  },
@@ -3818,6 +3856,17 @@
3818
3856
  }
3819
3857
  }
3820
3858
  },
3859
+ "puppetTagIdentifier": {
3860
+ "type": "object",
3861
+ "properties": {
3862
+ "id": {
3863
+ "type": "string"
3864
+ },
3865
+ "groupId": {
3866
+ "type": "string"
3867
+ }
3868
+ }
3869
+ },
3821
3870
  "puppetTagPayload": {
3822
3871
  "type": "object",
3823
3872
  "properties": {
@@ -3835,6 +3884,17 @@
3835
3884
  }
3836
3885
  }
3837
3886
  },
3887
+ "puppetTagTagAddRequest": {
3888
+ "type": "object",
3889
+ "properties": {
3890
+ "tagName": {
3891
+ "type": "string"
3892
+ },
3893
+ "tagGroupId": {
3894
+ "type": "string"
3895
+ }
3896
+ }
3897
+ },
3838
3898
  "puppetTagTagAddResponse": {
3839
3899
  "type": "object",
3840
3900
  "properties": {
@@ -3854,6 +3914,14 @@
3854
3914
  }
3855
3915
  }
3856
3916
  },
3917
+ "puppetTagTagDeleteRequest": {
3918
+ "type": "object",
3919
+ "properties": {
3920
+ "tag": {
3921
+ "$ref": "#/definitions/puppetTagIdentifier"
3922
+ }
3923
+ }
3924
+ },
3857
3925
  "puppetTagTagDeleteResponse": {
3858
3926
  "type": "object"
3859
3927
  },
@@ -1,8 +1,8 @@
1
1
  syntax = "proto3";
2
2
  package wechaty.puppet;
3
3
 
4
- option go_package="github.com/wechaty/go-grpc/wechaty/puppet";
5
- option java_package="io.github.wechaty.grpc.puppet";
4
+ option go_package = "github.com/wechaty/go-grpc/wechaty/puppet";
5
+ option java_package = "io.github.wechaty.grpc.puppet";
6
6
  option csharp_namespace = "github.wechaty.grpc.puppet";
7
7
 
8
8
  import "google/protobuf/wrappers.proto";
@@ -27,8 +27,8 @@ message RoomPayloadResponse {
27
27
  }
28
28
 
29
29
  message RoomAddRequest {
30
- string id = 1;
31
- string contact_id = 2;
30
+ string id = 1;
31
+ string contact_id = 2;
32
32
  bool invite_only = 3;
33
33
  }
34
34
  message RoomAddResponse {}
@@ -42,15 +42,16 @@ message RoomAvatarResponse {
42
42
 
43
43
  message RoomCreateRequest {
44
44
  repeated string contact_ids = 1;
45
- string topic = 2;
45
+ string topic = 2;
46
46
  }
47
47
  message RoomCreateResponse {
48
48
  string id = 1;
49
49
  }
50
50
 
51
51
  message RoomDelRequest {
52
- string id = 1;
53
- string contact_id = 2;
52
+ string id = 1;
53
+ string contact_id = 2 [deprecated = true]; // Deprecated, will be removed after bot updated
54
+ repeated string contact_ids = 3;
54
55
  }
55
56
  message RoomDelResponse {}
56
57
 
@@ -60,13 +61,13 @@ message RoomQuitRequest {
60
61
  message RoomQuitResponse {}
61
62
 
62
63
  message RoomTopicRequest {
63
- string id = 1;
64
+ string id = 1;
64
65
  google.protobuf.StringValue topic_string_value_deprecated = 2 [deprecated = true]; // DEPRECATED, will be removed after Dec 31, 2022
65
- optional string topic = 3;
66
+ optional string topic = 3;
66
67
  }
67
68
  message RoomTopicResponse {
68
69
  google.protobuf.StringValue topic_string_value_deprecated = 1 [deprecated = true]; // DEPRECATED, will be removed after Dec 31, 2022
69
- string topic = 2;
70
+ string topic = 2;
70
71
  }
71
72
 
72
73
  message RoomQRCodeRequest {
@@ -77,12 +78,12 @@ message RoomQRCodeResponse {
77
78
  }
78
79
 
79
80
  message RoomAnnounceRequest {
80
- string id = 1;
81
+ string id = 1;
81
82
  google.protobuf.StringValue text_string_value_deprecated = 2 [deprecated = true]; // DEPRECATED, will be removed after Dec 31, 2022
82
- optional string text = 3;
83
+ optional string text = 3;
83
84
  }
84
85
  message RoomAnnounceResponse {
85
86
  google.protobuf.StringValue text_string_value_deprecated = 1 [deprecated = true]; // DEPRECATED, will be removed after Dec 31, 2022
86
- string text = 2;
87
+ string text = 2;
87
88
  }
88
89
 
@@ -17,24 +17,27 @@ message TagPayload {
17
17
  TagType type = 4;
18
18
  }
19
19
 
20
+ message TagIdentifier {
21
+ string id = 1;
22
+ string group_id = 2;
23
+ }
24
+
20
25
  message TagGroupPayload {
21
26
  string id = 1;
22
27
  string name = 2;
23
28
  }
24
29
 
25
30
  message TagContactTagAddRequest {
26
- string tag_group_id = 1;
27
- string tag_id = 2;
28
- string contact_id = 3;
31
+ repeated TagIdentifier tags = 1;
32
+ repeated string contact_ids = 2;
29
33
  }
30
34
 
31
35
  message TagContactTagAddResponse {
32
36
  }
33
37
 
34
38
  message TagContactTagRemoveRequest {
35
- string tag_group_id = 1;
36
- string tag_id = 2;
37
- string contact_id = 3;
39
+ repeated TagIdentifier tags = 1;
40
+ repeated string contact_ids = 2;
38
41
  }
39
42
 
40
43
  message TagContactTagRemoveResponse {
@@ -56,8 +59,8 @@ message TagGroupDeleteResponse {
56
59
  }
57
60
 
58
61
  message TagTagAddRequest {
59
- string tag_group_id = 1;
60
- string tag_name = 2;
62
+ string tag_name = 1;
63
+ string tag_group_id = 2;
61
64
  }
62
65
 
63
66
  message TagTagAddResponse {
@@ -65,8 +68,7 @@ message TagTagAddResponse {
65
68
  }
66
69
 
67
70
  message TagTagDeleteRequest {
68
- string tag_group_id = 1;
69
- string tag_id = 2;
71
+ TagIdentifier tag = 1;
70
72
  }
71
73
 
72
74
  message TagTagDeleteResponse {
@@ -103,8 +105,7 @@ message TagContactTagListResponse {
103
105
  }
104
106
 
105
107
  message TagTagContactListRequest {
106
- string tag_group_id = 1;
107
- string tag_id = 2;
108
+ TagIdentifier tag = 1;
108
109
  }
109
110
 
110
111
  message TagTagContactListResponse {