BBASMPlugin+CloudRequest.h
8.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
//
// BBASMPlugin+CloudRequest.h
// BBAMNP
//
// Created by zhangshengjun on 2021/2/8.
//
#import "BBASMPlugin.h"
#import <BBASchemeDispatcher/BBASchemeDispatcher.h>
NS_ASSUME_NONNULL_BEGIN
@interface BBASMPlugin (CloudRequest)
/*
* ********** description ************
* @name: cloud.callFunction
* @authority: swanAPI
* @path: /cloudRequest
* @args: [{"name": "service", "value": "string"}, {"name": "api", "value": "string"}, {"name": "stringMap", "value": {"type": {"workspaceid": "string", "name": "string", "data": "Object="}}}, {"name": "fileMap", "value": "Object"}, {"name": "cb", "value": "string"}]
* @config: {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.url", "method": "_naSwan.bridge.postMessage"}}}
* ********** description ************
* @name: cloud.deleteFile
* @authority: swanAPI
* @path: /cloudRequest
* @args: [{"name": "service", "value": "string"}, {"name": "api", "value": "string"}, {"name": "stringMap", "value": {"type": {"workspaceid": "string", "fileList": "Array"}}}, {"name": "fileMap", "value": "Object"}, {"name": "cb", "value": "string"}]
* @config: {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.url", "method": "_naSwan.bridge.postMessage"}}}
* ********** description ************
* @name: cloud.getCollection
* @authority: swanAPI
* @path: /cloudRequest
* @args: [{"name": "service", "value": "string"}, {"name": "api", "value": "string"}, {"name": "stringMap", "value": {"type": {"workspaceid": "string", "collectionname": "string", "data": {"type": {"Query": "object=", "Options": "object="}}}}}, {"name": "fileMap", "value": "Object"}, {"name": "cb", "value": "string"}]
* @config: {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.url", "method": "_naSwan.bridge.postMessage"}}}
* ********** description ************
* @name: cloud.addDocument
* @authority: swanAPI
* @path: /cloudRequest
* @args: [{"name": "service", "value": "string"}, {"name": "api", "value": "string"}, {"name": "stringMap", "value": {"type": {"workspaceid": "string", "collectionname": "string", "data": {"type": {"document": "object"}}}}}, {"name": "fileMap", "value": "Object"}, {"name": "cb", "value": "string"}]
* @config: {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.url", "method": "_naSwan.bridge.postMessage"}}}
* ********** description ************
* @name: cloud.countDocument
* @authority: swanAPI
* @path: /cloudRequest
* @args: [{"name": "service", "value": "string"}, {"name": "api", "value": "string"}, {"name": "stringMap", "value": {"type": {"workspaceid": "string", "collectionname": "string", "data": {"type": {"Query": "object=", "Options": "object="}}}}}, {"name": "fileMap", "value": "Object"}, {"name": "cb", "value": "string"}]
* @config: {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.url", "method": "_naSwan.bridge.postMessage"}}}
* ********** description ************
* @name: cloud.getDocument
* @authority: swanAPI
* @path: /cloudRequest
* @args: [{"name": "service", "value": "string"}, {"name": "api", "value": "string"}, {"name": "stringMap", "value": {"type": {"workspaceid": "string", "collectionname": "string", "documentid": "string|number"}}}, {"name": "fileMap", "value": "Object"}, {"name": "cb", "value": "string"}]
* @config: {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.url", "method": "_naSwan.bridge.postMessage"}}}
* ********** description ************
* @name: cloud.setDocument
* @authority: swanAPI
* @path: /cloudRequest
* @args: [{"name": "service", "value": "string"}, {"name": "api", "value": "string"}, {"name": "stringMap", "value": {"type": {"workspaceid": "string", "collectionname": "string", "documentid": "string|number", "data": {"type": {"Document": "object"}}}}}, {"name": "fileMap", "value": "Object"}, {"name": "cb", "value": "string"}]
* @config: {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.url", "method": "_naSwan.bridge.postMessage"}}}
* ********** description ************
* @name: cloud.renewalDocument
* @authority: swanAPI
* @path: /cloudRequest
* @args: [{"name": "service", "value": "string"}, {"name": "api", "value": "string"}, {"name": "stringMap", "value": {"type": {"workspaceid": "string", "collectionname": "string", "documentid": "string|number", "data": {"type": {"Document": "object"}}}}}, {"name": "fileMap", "value": "Object"}, {"name": "cb", "value": "string"}]
* @config: {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.url", "method": "_naSwan.bridge.postMessage"}}}
* ********** description ************
* @name: cloud.deleteDocument
* @authority: swanAPI
* @path: /cloudRequest
* @args: [{"name": "service", "value": "string"}, {"name": "api", "value": "string"}, {"name": "stringMap", "value": {"type": {"workspaceid": "string", "collectionname": "string", "documentid": "string|number"}}}, {"name": "fileMap", "value": "Object"}, {"name": "cb", "value": "string"}]
* @config: {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.url", "method": "_naSwan.bridge.postMessage"}}}
*/
- (void)cloudRequest:(BBASchemeDispatcher *)dispatcher;
/**
* 描 述: 小程序cloud云组件API能力,通过组件服务置换cloud url为 http url
* 示 例: baiduboxapp://swanAPI/cloudUploadFile?params={"service":"cloud","api":"cloudUrl","stringMap":{"fileID":"bdfile://tmp_L3N3YW5hcHBfY2hvb3NlX2FsYnVtXzE1NjQwNTkyMTQzNTdfODdiMjNhMGFmMWYyMThiZTQ3ZTc5MzJlNzY3MzJiMDgucG5n.png"},"fileMap":{}}&callback=__jsna_14
* 文 档: http://es.baidu-int.com/#/apidetail/759
* 备 注:
* ********** description ************
* @name: getCloudUrl
* @authority: swanAPI
* @path: /cloudGetUrl
* @args: [{"name": "service", "value": "string"}, {"name": "api", "value": "string"}, {"name": "stringMap", "value": {"type": {"fileID": "string"}}}, {"name": "fileMap", "value": "Object"}, {"name": "cb", "value": "string"}]
* @config: {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.url", "method": "_naSwan.bridge.postMessage"}}}
*/
- (void)cloudGetUrl:(BBASchemeDispatcher *)dispatcher;
/**
* 描 述: 小程序cloud云API端能力,实现云文件上传功能
* 示 例: baiduboxapp://swanAPI/cloud/uploadFile?params={"service":"cloud","api":"/v1/workspace/storage/request-upload","stringMap":{"cloudPath":"my-image.png","workspaceid":"first-9q5tvycr","data":{}},"fileMap":{"filePath":"bdfile://tmp_L3N3YW5hcHBfY2hvb3NlX2FsYnVtXzE1NjQxMjI5MTU4NjZfODdiMjNhMGFmMWYyMThiZTQ3ZTc5MzJlNzY3MzJiMDgucG5n.png"}}
* 文 档: http://es.baidu-int.com/#/apidetail/759
* 备 注:
* ********** description ************
* @name: cloud.uploadFile
* @authority: swanAPI
* @path: /cloudUploadFile
* @args: [{"name": "service", "value": "string"}, {"name": "api", "value": "string"}, {"name": "stringMap", "value": {"type": {"workspaceid": "string", "cloudPath": "string", "data": {"type": {"Headers": "Object="}}}}}, {"name": "fileMap", "value": {"type": {"filePath": "string"}}}, {"name": "cb", "value": "string"}]
* @config: {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.url", "method": "_naSwan.bridge.postMessage"}}}
*/
- (void)cloudUploadFile:(BBASchemeDispatcher *)dispatcher;
/**
* 描 述: 小程序cloud云API端能力,实现云文件下载功能
* 示 例: baiduboxapp://swanAPI/cloudDownloadFile?params={"service":"cloud","api":"cloudUrl","stringMap":{"fileID":"bdfile://tmp_L3N3YW5hcHBfY2hvb3NlX2FsYnVtXzE1NjQwNTkyMTQzNTdfODdiMjNhMGFmMWYyMThiZTQ3ZTc5MzJlNzY3MzJiMDgucG5n.png"},"fileMap":{}}&callback=__jsna_14
* 文 档: http://es.baidu-int.com/#/apidetail/759
* 备 注:
* ********** description ************
* @name: cloud.downloadFile
* @authority: swanAPI
* @path: /cloudDownloadFile
* @args: [{"name": "service", "value": "string"}, {"name": "api", "value": "string"}, {"name": "stringMap", "value": {"type": {"workspaceid": "string", "fileID": "string"}}}, {"name": "fileMap", "value": "Object"}, {"name": "cb", "value": "string"}]
* @config: {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.url", "method": "_naSwan.bridge.postMessage"}}}
*/
- (void)cloudDownloadFile:(BBASchemeDispatcher *)dispatcher;
@end
NS_ASSUME_NONNULL_END