Skip to content

Commit 52f760f

Browse files
Merge pull request #131 from pkedy/bump_to_1.0.3-rc.1
Updating protos and bumping to v1.0.3-rc.1
2 parents ababd2d + 7fd8182 commit 52f760f

File tree

15 files changed

+3975
-1648
lines changed

15 files changed

+3975
-1648
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dapr-client",
3-
"version": "1.0.2",
3+
"version": "1.0.3-rc.1",
44
"description": "The official Dapr (https://dapr.io) SDK for Node.js",
55
"types": "http/index.d.ts",
66
"scripts": {
@@ -51,4 +51,4 @@
5151
"url": "https://github.com/dapr/js-sdk.git",
5252
"directory": ""
5353
}
54-
}
54+
}

src/proto/dapr/proto/common/v1/common.proto

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ option go_package = "github.com/dapr/dapr/pkg/proto/common/v1;common";
2424
message HTTPExtension {
2525
// Type of HTTP 1.1 Methods
2626
// RFC 7231: https://tools.ietf.org/html/rfc7231#page-24
27+
// RFC 5789: https://datatracker.ietf.org/doc/html/rfc5789
2728
enum Verb {
2829
NONE = 0;
2930
GET = 1;
@@ -34,6 +35,7 @@ message HTTPExtension {
3435
CONNECT = 6;
3536
OPTIONS = 7;
3637
TRACE = 8;
38+
PATCH = 9;
3739
}
3840

3941
// Required. HTTP verb.
@@ -122,4 +124,20 @@ message StateOptions {
122124

123125
StateConcurrency concurrency = 1;
124126
StateConsistency consistency = 2;
125-
}
127+
}
128+
129+
130+
// ConfigurationItem represents all the configuration with its name(key).
131+
message ConfigurationItem {
132+
// Required. The name of configuration item
133+
string key = 1;
134+
135+
// Required. The value of configuration item.
136+
string value = 2;
137+
138+
// Version is response only and cannot be fetched. Store is not expected to keep all versions available
139+
string version = 3;
140+
141+
// the metadata which will be passed to/from configuration store component.
142+
map<string,string> metadata = 4;
143+
}

src/proto/dapr/proto/common/v1/common_pb.d.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export namespace HTTPExtension {
3939
CONNECT = 6,
4040
OPTIONS = 7,
4141
TRACE = 8,
42+
PATCH = 9,
4243
}
4344

4445
}
@@ -201,3 +202,34 @@ export namespace StateOptions {
201202
}
202203

203204
}
205+
206+
export class ConfigurationItem extends jspb.Message {
207+
getKey(): string;
208+
setKey(value: string): ConfigurationItem;
209+
getValue(): string;
210+
setValue(value: string): ConfigurationItem;
211+
getVersion(): string;
212+
setVersion(value: string): ConfigurationItem;
213+
214+
getMetadataMap(): jspb.Map<string, string>;
215+
clearMetadataMap(): void;
216+
217+
serializeBinary(): Uint8Array;
218+
toObject(includeInstance?: boolean): ConfigurationItem.AsObject;
219+
static toObject(includeInstance: boolean, msg: ConfigurationItem): ConfigurationItem.AsObject;
220+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
221+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
222+
static serializeBinaryToWriter(message: ConfigurationItem, writer: jspb.BinaryWriter): void;
223+
static deserializeBinary(bytes: Uint8Array): ConfigurationItem;
224+
static deserializeBinaryFromReader(message: ConfigurationItem, reader: jspb.BinaryReader): ConfigurationItem;
225+
}
226+
227+
export namespace ConfigurationItem {
228+
export type AsObject = {
229+
key: string,
230+
value: string,
231+
version: string,
232+
233+
metadataMap: Array<[string, string]>,
234+
}
235+
}

src/proto/dapr/proto/common/v1/common_pb.js

Lines changed: 247 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/**
33
* @fileoverview
44
* @enhanceable
5-
* @suppress {missingRequire} reports error on implicit type usages.
65
* @suppress {messageConventions} JS Compiler reports an error if a variable or
76
* field starts with 'MSG_' and isn't a translatable message.
87
* @public
@@ -17,6 +16,7 @@ var global = Function('return this')();
1716

1817
var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
1918
goog.object.extend(proto, google_protobuf_any_pb);
19+
goog.exportSymbol('proto.dapr.proto.common.v1.ConfigurationItem', null, global);
2020
goog.exportSymbol('proto.dapr.proto.common.v1.Etag', null, global);
2121
goog.exportSymbol('proto.dapr.proto.common.v1.HTTPExtension', null, global);
2222
goog.exportSymbol('proto.dapr.proto.common.v1.HTTPExtension.Verb', null, global);
@@ -152,6 +152,27 @@ if (goog.DEBUG && !COMPILED) {
152152
*/
153153
proto.dapr.proto.common.v1.StateOptions.displayName = 'proto.dapr.proto.common.v1.StateOptions';
154154
}
155+
/**
156+
* Generated by JsPbCodeGenerator.
157+
* @param {Array=} opt_data Optional initial data array, typically from a
158+
* server response, or constructed directly in Javascript. The array is used
159+
* in place and becomes part of the constructed object. It is not cloned.
160+
* If no data is provided, the constructed object will be empty, but still
161+
* valid.
162+
* @extends {jspb.Message}
163+
* @constructor
164+
*/
165+
proto.dapr.proto.common.v1.ConfigurationItem = function(opt_data) {
166+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
167+
};
168+
goog.inherits(proto.dapr.proto.common.v1.ConfigurationItem, jspb.Message);
169+
if (goog.DEBUG && !COMPILED) {
170+
/**
171+
* @public
172+
* @override
173+
*/
174+
proto.dapr.proto.common.v1.ConfigurationItem.displayName = 'proto.dapr.proto.common.v1.ConfigurationItem';
175+
}
155176

156177

157178

@@ -288,7 +309,8 @@ proto.dapr.proto.common.v1.HTTPExtension.Verb = {
288309
DELETE: 5,
289310
CONNECT: 6,
290311
OPTIONS: 7,
291-
TRACE: 8
312+
TRACE: 8,
313+
PATCH: 9
292314
};
293315

294316
/**
@@ -1397,4 +1419,227 @@ proto.dapr.proto.common.v1.StateOptions.prototype.setConsistency = function(valu
13971419
};
13981420

13991421

1422+
1423+
1424+
1425+
if (jspb.Message.GENERATE_TO_OBJECT) {
1426+
/**
1427+
* Creates an object representation of this proto.
1428+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
1429+
* Optional fields that are not set will be set to undefined.
1430+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1431+
* For the list of reserved names please see:
1432+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
1433+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
1434+
* JSPB instance for transitional soy proto support:
1435+
* http://goto/soy-param-migration
1436+
* @return {!Object}
1437+
*/
1438+
proto.dapr.proto.common.v1.ConfigurationItem.prototype.toObject = function(opt_includeInstance) {
1439+
return proto.dapr.proto.common.v1.ConfigurationItem.toObject(opt_includeInstance, this);
1440+
};
1441+
1442+
1443+
/**
1444+
* Static version of the {@see toObject} method.
1445+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
1446+
* the JSPB instance for transitional soy proto support:
1447+
* http://goto/soy-param-migration
1448+
* @param {!proto.dapr.proto.common.v1.ConfigurationItem} msg The msg instance to transform.
1449+
* @return {!Object}
1450+
* @suppress {unusedLocalVariables} f is only used for nested messages
1451+
*/
1452+
proto.dapr.proto.common.v1.ConfigurationItem.toObject = function(includeInstance, msg) {
1453+
var f, obj = {
1454+
key: jspb.Message.getFieldWithDefault(msg, 1, ""),
1455+
value: jspb.Message.getFieldWithDefault(msg, 2, ""),
1456+
version: jspb.Message.getFieldWithDefault(msg, 3, ""),
1457+
metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : []
1458+
};
1459+
1460+
if (includeInstance) {
1461+
obj.$jspbMessageInstance = msg;
1462+
}
1463+
return obj;
1464+
};
1465+
}
1466+
1467+
1468+
/**
1469+
* Deserializes binary data (in protobuf wire format).
1470+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
1471+
* @return {!proto.dapr.proto.common.v1.ConfigurationItem}
1472+
*/
1473+
proto.dapr.proto.common.v1.ConfigurationItem.deserializeBinary = function(bytes) {
1474+
var reader = new jspb.BinaryReader(bytes);
1475+
var msg = new proto.dapr.proto.common.v1.ConfigurationItem;
1476+
return proto.dapr.proto.common.v1.ConfigurationItem.deserializeBinaryFromReader(msg, reader);
1477+
};
1478+
1479+
1480+
/**
1481+
* Deserializes binary data (in protobuf wire format) from the
1482+
* given reader into the given message object.
1483+
* @param {!proto.dapr.proto.common.v1.ConfigurationItem} msg The message object to deserialize into.
1484+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
1485+
* @return {!proto.dapr.proto.common.v1.ConfigurationItem}
1486+
*/
1487+
proto.dapr.proto.common.v1.ConfigurationItem.deserializeBinaryFromReader = function(msg, reader) {
1488+
while (reader.nextField()) {
1489+
if (reader.isEndGroup()) {
1490+
break;
1491+
}
1492+
var field = reader.getFieldNumber();
1493+
switch (field) {
1494+
case 1:
1495+
var value = /** @type {string} */ (reader.readString());
1496+
msg.setKey(value);
1497+
break;
1498+
case 2:
1499+
var value = /** @type {string} */ (reader.readString());
1500+
msg.setValue(value);
1501+
break;
1502+
case 3:
1503+
var value = /** @type {string} */ (reader.readString());
1504+
msg.setVersion(value);
1505+
break;
1506+
case 4:
1507+
var value = msg.getMetadataMap();
1508+
reader.readMessage(value, function(message, reader) {
1509+
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
1510+
});
1511+
break;
1512+
default:
1513+
reader.skipField();
1514+
break;
1515+
}
1516+
}
1517+
return msg;
1518+
};
1519+
1520+
1521+
/**
1522+
* Serializes the message to binary data (in protobuf wire format).
1523+
* @return {!Uint8Array}
1524+
*/
1525+
proto.dapr.proto.common.v1.ConfigurationItem.prototype.serializeBinary = function() {
1526+
var writer = new jspb.BinaryWriter();
1527+
proto.dapr.proto.common.v1.ConfigurationItem.serializeBinaryToWriter(this, writer);
1528+
return writer.getResultBuffer();
1529+
};
1530+
1531+
1532+
/**
1533+
* Serializes the given message to binary data (in protobuf wire
1534+
* format), writing to the given BinaryWriter.
1535+
* @param {!proto.dapr.proto.common.v1.ConfigurationItem} message
1536+
* @param {!jspb.BinaryWriter} writer
1537+
* @suppress {unusedLocalVariables} f is only used for nested messages
1538+
*/
1539+
proto.dapr.proto.common.v1.ConfigurationItem.serializeBinaryToWriter = function(message, writer) {
1540+
var f = undefined;
1541+
f = message.getKey();
1542+
if (f.length > 0) {
1543+
writer.writeString(
1544+
1,
1545+
f
1546+
);
1547+
}
1548+
f = message.getValue();
1549+
if (f.length > 0) {
1550+
writer.writeString(
1551+
2,
1552+
f
1553+
);
1554+
}
1555+
f = message.getVersion();
1556+
if (f.length > 0) {
1557+
writer.writeString(
1558+
3,
1559+
f
1560+
);
1561+
}
1562+
f = message.getMetadataMap(true);
1563+
if (f && f.getLength() > 0) {
1564+
f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
1565+
}
1566+
};
1567+
1568+
1569+
/**
1570+
* optional string key = 1;
1571+
* @return {string}
1572+
*/
1573+
proto.dapr.proto.common.v1.ConfigurationItem.prototype.getKey = function() {
1574+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1575+
};
1576+
1577+
1578+
/**
1579+
* @param {string} value
1580+
* @return {!proto.dapr.proto.common.v1.ConfigurationItem} returns this
1581+
*/
1582+
proto.dapr.proto.common.v1.ConfigurationItem.prototype.setKey = function(value) {
1583+
return jspb.Message.setProto3StringField(this, 1, value);
1584+
};
1585+
1586+
1587+
/**
1588+
* optional string value = 2;
1589+
* @return {string}
1590+
*/
1591+
proto.dapr.proto.common.v1.ConfigurationItem.prototype.getValue = function() {
1592+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1593+
};
1594+
1595+
1596+
/**
1597+
* @param {string} value
1598+
* @return {!proto.dapr.proto.common.v1.ConfigurationItem} returns this
1599+
*/
1600+
proto.dapr.proto.common.v1.ConfigurationItem.prototype.setValue = function(value) {
1601+
return jspb.Message.setProto3StringField(this, 2, value);
1602+
};
1603+
1604+
1605+
/**
1606+
* optional string version = 3;
1607+
* @return {string}
1608+
*/
1609+
proto.dapr.proto.common.v1.ConfigurationItem.prototype.getVersion = function() {
1610+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1611+
};
1612+
1613+
1614+
/**
1615+
* @param {string} value
1616+
* @return {!proto.dapr.proto.common.v1.ConfigurationItem} returns this
1617+
*/
1618+
proto.dapr.proto.common.v1.ConfigurationItem.prototype.setVersion = function(value) {
1619+
return jspb.Message.setProto3StringField(this, 3, value);
1620+
};
1621+
1622+
1623+
/**
1624+
* map<string, string> metadata = 4;
1625+
* @param {boolean=} opt_noLazyCreate Do not create the map if
1626+
* empty, instead returning `undefined`
1627+
* @return {!jspb.Map<string,string>}
1628+
*/
1629+
proto.dapr.proto.common.v1.ConfigurationItem.prototype.getMetadataMap = function(opt_noLazyCreate) {
1630+
return /** @type {!jspb.Map<string,string>} */ (
1631+
jspb.Message.getMapField(this, 4, opt_noLazyCreate,
1632+
null));
1633+
};
1634+
1635+
1636+
/**
1637+
* Clears values from the map. The map will be non-null.
1638+
* @return {!proto.dapr.proto.common.v1.ConfigurationItem} returns this
1639+
*/
1640+
proto.dapr.proto.common.v1.ConfigurationItem.prototype.clearMetadataMap = function() {
1641+
this.getMetadataMap().clear();
1642+
return this;};
1643+
1644+
14001645
goog.object.extend(exports, proto.dapr.proto.common.v1);

0 commit comments

Comments
 (0)