Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating protos and bumping to v1.0.3-rc.1 #131

Merged
merged 1 commit into from
Nov 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dapr-client",
"version": "1.0.2",
"version": "1.0.3-rc.1",
"description": "The official Dapr (https://dapr.io) SDK for Node.js",
"types": "http/index.d.ts",
"scripts": {
Expand Down Expand Up @@ -51,4 +51,4 @@
"url": "https://github.com/dapr/js-sdk.git",
"directory": ""
}
}
}
20 changes: 19 additions & 1 deletion src/proto/dapr/proto/common/v1/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ option go_package = "github.com/dapr/dapr/pkg/proto/common/v1;common";
message HTTPExtension {
// Type of HTTP 1.1 Methods
// RFC 7231: https://tools.ietf.org/html/rfc7231#page-24
// RFC 5789: https://datatracker.ietf.org/doc/html/rfc5789
enum Verb {
NONE = 0;
GET = 1;
Expand All @@ -34,6 +35,7 @@ message HTTPExtension {
CONNECT = 6;
OPTIONS = 7;
TRACE = 8;
PATCH = 9;
}

// Required. HTTP verb.
Expand Down Expand Up @@ -122,4 +124,20 @@ message StateOptions {

StateConcurrency concurrency = 1;
StateConsistency consistency = 2;
}
}


// ConfigurationItem represents all the configuration with its name(key).
message ConfigurationItem {
// Required. The name of configuration item
string key = 1;

// Required. The value of configuration item.
string value = 2;

// Version is response only and cannot be fetched. Store is not expected to keep all versions available
string version = 3;

// the metadata which will be passed to/from configuration store component.
map<string,string> metadata = 4;
}
32 changes: 32 additions & 0 deletions src/proto/dapr/proto/common/v1/common_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export namespace HTTPExtension {
CONNECT = 6,
OPTIONS = 7,
TRACE = 8,
PATCH = 9,
}

}
Expand Down Expand Up @@ -201,3 +202,34 @@ export namespace StateOptions {
}

}

export class ConfigurationItem extends jspb.Message {
getKey(): string;
setKey(value: string): ConfigurationItem;
getValue(): string;
setValue(value: string): ConfigurationItem;
getVersion(): string;
setVersion(value: string): ConfigurationItem;

getMetadataMap(): jspb.Map<string, string>;
clearMetadataMap(): void;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ConfigurationItem.AsObject;
static toObject(includeInstance: boolean, msg: ConfigurationItem): ConfigurationItem.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: ConfigurationItem, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ConfigurationItem;
static deserializeBinaryFromReader(message: ConfigurationItem, reader: jspb.BinaryReader): ConfigurationItem;
}

export namespace ConfigurationItem {
export type AsObject = {
key: string,
value: string,
version: string,

metadataMap: Array<[string, string]>,
}
}
249 changes: 247 additions & 2 deletions src/proto/dapr/proto/common/v1/common_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
Expand All @@ -17,6 +16,7 @@ var global = Function('return this')();

var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
goog.object.extend(proto, google_protobuf_any_pb);
goog.exportSymbol('proto.dapr.proto.common.v1.ConfigurationItem', null, global);
goog.exportSymbol('proto.dapr.proto.common.v1.Etag', null, global);
goog.exportSymbol('proto.dapr.proto.common.v1.HTTPExtension', null, global);
goog.exportSymbol('proto.dapr.proto.common.v1.HTTPExtension.Verb', null, global);
Expand Down Expand Up @@ -152,6 +152,27 @@ if (goog.DEBUG && !COMPILED) {
*/
proto.dapr.proto.common.v1.StateOptions.displayName = 'proto.dapr.proto.common.v1.StateOptions';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.dapr.proto.common.v1.ConfigurationItem = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.dapr.proto.common.v1.ConfigurationItem, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.dapr.proto.common.v1.ConfigurationItem.displayName = 'proto.dapr.proto.common.v1.ConfigurationItem';
}



Expand Down Expand Up @@ -288,7 +309,8 @@ proto.dapr.proto.common.v1.HTTPExtension.Verb = {
DELETE: 5,
CONNECT: 6,
OPTIONS: 7,
TRACE: 8
TRACE: 8,
PATCH: 9
};

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





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.dapr.proto.common.v1.ConfigurationItem.prototype.toObject = function(opt_includeInstance) {
return proto.dapr.proto.common.v1.ConfigurationItem.toObject(opt_includeInstance, this);
};


/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.dapr.proto.common.v1.ConfigurationItem} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.dapr.proto.common.v1.ConfigurationItem.toObject = function(includeInstance, msg) {
var f, obj = {
key: jspb.Message.getFieldWithDefault(msg, 1, ""),
value: jspb.Message.getFieldWithDefault(msg, 2, ""),
version: jspb.Message.getFieldWithDefault(msg, 3, ""),
metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : []
};

if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}


/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.dapr.proto.common.v1.ConfigurationItem}
*/
proto.dapr.proto.common.v1.ConfigurationItem.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.dapr.proto.common.v1.ConfigurationItem;
return proto.dapr.proto.common.v1.ConfigurationItem.deserializeBinaryFromReader(msg, reader);
};


/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.dapr.proto.common.v1.ConfigurationItem} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.dapr.proto.common.v1.ConfigurationItem}
*/
proto.dapr.proto.common.v1.ConfigurationItem.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setKey(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setValue(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setVersion(value);
break;
case 4:
var value = msg.getMetadataMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
});
break;
default:
reader.skipField();
break;
}
}
return msg;
};


/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.dapr.proto.common.v1.ConfigurationItem.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.dapr.proto.common.v1.ConfigurationItem.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};


/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.dapr.proto.common.v1.ConfigurationItem} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.dapr.proto.common.v1.ConfigurationItem.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getKey();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getValue();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getVersion();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getMetadataMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
}
};


/**
* optional string key = 1;
* @return {string}
*/
proto.dapr.proto.common.v1.ConfigurationItem.prototype.getKey = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
* @param {string} value
* @return {!proto.dapr.proto.common.v1.ConfigurationItem} returns this
*/
proto.dapr.proto.common.v1.ConfigurationItem.prototype.setKey = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};


/**
* optional string value = 2;
* @return {string}
*/
proto.dapr.proto.common.v1.ConfigurationItem.prototype.getValue = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
* @param {string} value
* @return {!proto.dapr.proto.common.v1.ConfigurationItem} returns this
*/
proto.dapr.proto.common.v1.ConfigurationItem.prototype.setValue = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};


/**
* optional string version = 3;
* @return {string}
*/
proto.dapr.proto.common.v1.ConfigurationItem.prototype.getVersion = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
* @param {string} value
* @return {!proto.dapr.proto.common.v1.ConfigurationItem} returns this
*/
proto.dapr.proto.common.v1.ConfigurationItem.prototype.setVersion = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};


/**
* map<string, string> metadata = 4;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<string,string>}
*/
proto.dapr.proto.common.v1.ConfigurationItem.prototype.getMetadataMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<string,string>} */ (
jspb.Message.getMapField(this, 4, opt_noLazyCreate,
null));
};


/**
* Clears values from the map. The map will be non-null.
* @return {!proto.dapr.proto.common.v1.ConfigurationItem} returns this
*/
proto.dapr.proto.common.v1.ConfigurationItem.prototype.clearMetadataMap = function() {
this.getMetadataMap().clear();
return this;};


goog.object.extend(exports, proto.dapr.proto.common.v1);
Loading