Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@baiducloud/sdk

Package Overview
Dependencies
Maintainers
5
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@baiducloud/sdk - npm Package Compare versions

Comparing version 1.0.0-rc.25 to 1.0.0-rc.27

CHANGELOG.md

5

package.json
{
"name": "@baiducloud/sdk",
"version": "1.0.0-rc.25",
"version": "1.0.0-rc.27",
"description": "Baidu Cloud Engine JavaScript SDK",

@@ -24,3 +24,4 @@ "main": "./index.js",

"木休大人 <523317421@qq.com>",
"yangwei <yangwei9012@163.com>"
"yangwei <yangwei9012@163.com>",
"lurunze <lueunze@hotmail.com>"
],

@@ -27,0 +28,0 @@ "license": "MIT",

2

README.md

@@ -20,3 +20,3 @@ Baidu Cloud Engine JavaScript SDK

```html
<script src="https://code.bdstatic.com/npm/@baiducloud/sdk@1.0.0-rc.19/dist/baidubce-sdk.bundle.min.js" ></script>
<script src="https://code.bdstatic.com/npm/@baiducloud/sdk@1.0.0-rc.25/dist/baidubce-sdk.bundle.min.js" ></script>
```

@@ -184,3 +184,14 @@ /**

// BosClient.prototype.getBucketStorageclass =
// BosClient.prototype.putBucketStorageclass =
BosClient.prototype.putBucketStorageclass = function (bucketName, storageClass, options) {
options = options || {};
var headers = {};
headers[H.CONTENT_TYPE] = 'application/json; charset=UTF-8';
return this.sendRequest('PUT', {
bucketName: bucketName,
headers: headers,
params: {storageClass: ''},
body: JSON.stringify({storageClass: storageClass}),
config: options.config
});
};
// BosClient.prototype.deleteBucketLifecycle =

@@ -262,3 +273,16 @@ // BosClient.prototype.getBucketLifecycle =

BosClient.prototype.putBucketAcl =
BosClient.prototype.putBucketAcl = function (bucketName, acl, options) {
options = options || {};
var headers = {};
headers[H.CONTENT_TYPE] = 'application/json; charset=UTF-8';
headers[H.X_BCE_ACL] = acl;
return this.sendRequest('PUT', {
bucketName: bucketName,
headers: headers,
params: {acl: ''},
config: options.config
});
};
BosClient.prototype.setBucketAcl = function (bucketName, acl, options) {

@@ -265,0 +289,0 @@ options = options || {};

@@ -235,3 +235,119 @@ /**

CfcClient.prototype.listRelations = function (opt_options) {
var options = opt_options || {};
var params = u.extend(
u.pick(options, 'FunctionBrn')
);
return this.sendRequest('GET', '/v1/relation', {
params: params,
});
};
CfcClient.prototype.createRelation = function (body, opt_options) {
/**
var body =
{
'Target': 'string',
'Source': 'string',
'Data': {
'Resource': 'string',
'Status': 'string',
'EventType': 'string'
'Name': 'string'
},
};
*/
debug('createRelation, body = %j', body);
var options = opt_options || {};
var params = u.extend(
u.pick(options, 'FunctionBrn')
);
return this.sendRequest('POST', '/v1/relation', {
// params: params,
body: JSON.stringify(body)
});
};
CfcClient.prototype.updateRelation = function (body) {
/**
var body = {
'RelationId': 'string',
'Target': 'string',
'Source': 'string',
'Data': {
'Resource': 'string',
'Status': 'string',
'EventType': 'string'
'Name': 'string'
}
}
*/
return this.sendRequest('PUT', '/v1/relation', {
body: JSON.stringify(body)
});
};
CfcClient.prototype.deleteRelation = function (opt_options) {
var options = opt_options || {};
var params = u.extend(
u.pick(options, 'Target', 'Source', 'RelationId')
);
return this.sendRequest('DELETE', '/v1/relation', {
params: params
});
};
CfcClient.prototype.listEventSourceMappings = function (opt_options) {
var options = opt_options || {};
var params = u.extend(
u.pick(options, 'FunctionName')
);
return this.sendRequest('GET', '/v1/event-source-mappings', {
params: params,
});
};
CfcClient.prototype.createEventSourceMapping = function (body) {
/**
var body =
{
BatchSize: 100
Enabled: true
EventSourceBrn: "42f6fbc2cd374bfcb80d9967370fd8ff__qa_preonline_cfc"
FunctionName: "brn:bce:cfc:bj:1a2cbf55b97ac8a7c760c4177db4e17d:function:html:$LATEST"
Source: "kafka"
StartingPosition: "TRIM_HORIZON"
}
*/
debug('createEventSourceMapping, body = %j', body);
return this.sendRequest('POST', '/v1/event-source-mappings', {
body: JSON.stringify(body)
});
};
CfcClient.prototype.updateEventSourceMapping = function (esmId, body) {
/**
var body = {
BatchSize: 100
Enabled: false
FunctionName: "brn:bce:cfc:bj:1a2cbf55b97ac8a7c760c4177db4e17d:function:html:$LATEST"
}
*/
return this.sendRequest('PUT', '/v1/event-source-mappings/' + esmId, {
body: JSON.stringify(body)
});
};
CfcClient.prototype.deleteEventSourceMapping = function (esmId) {
return this.sendRequest('DELETE', '/v1/event-source-mappings/' + esmId, {});
};
CfcClient.prototype.sendRequest = function (httpMethod, resource, varArgs) {

@@ -238,0 +354,0 @@ if (this.config.workspaceId) {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc