@headspace/protos-events 1.327.0 → 1.328.0
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.
- package/lib/index.d.ts +200 -0
- package/lib/index.js +465 -0
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -7843,6 +7843,116 @@ export namespace googleReceipt {
|
|
|
7843
7843
|
/** Namespace productcatalog. */
|
|
7844
7844
|
export namespace productcatalog {
|
|
7845
7845
|
|
|
7846
|
+
/** Properties of a Product. */
|
|
7847
|
+
interface IProduct {
|
|
7848
|
+
|
|
7849
|
+
/** product id */
|
|
7850
|
+
id?: (string|null);
|
|
7851
|
+
|
|
7852
|
+
/** product name */
|
|
7853
|
+
name?: (string|null);
|
|
7854
|
+
|
|
7855
|
+
/** product business sector, e.g "B2C", "B2B" */
|
|
7856
|
+
businessSector?: (productcatalog.ProductBusinessSector|null);
|
|
7857
|
+
}
|
|
7858
|
+
|
|
7859
|
+
/** Represents a Product. */
|
|
7860
|
+
class Product implements IProduct {
|
|
7861
|
+
|
|
7862
|
+
/**
|
|
7863
|
+
* Constructs a new Product.
|
|
7864
|
+
* @param [properties] Properties to set
|
|
7865
|
+
*/
|
|
7866
|
+
constructor(properties?: productcatalog.IProduct);
|
|
7867
|
+
|
|
7868
|
+
/** product id */
|
|
7869
|
+
public id: string;
|
|
7870
|
+
|
|
7871
|
+
/** product name */
|
|
7872
|
+
public name: string;
|
|
7873
|
+
|
|
7874
|
+
/** product business sector, e.g "B2C", "B2B" */
|
|
7875
|
+
public businessSector: productcatalog.ProductBusinessSector;
|
|
7876
|
+
|
|
7877
|
+
/**
|
|
7878
|
+
* Creates a new Product instance using the specified properties.
|
|
7879
|
+
* @param [properties] Properties to set
|
|
7880
|
+
* @returns Product instance
|
|
7881
|
+
*/
|
|
7882
|
+
public static create(properties?: productcatalog.IProduct): productcatalog.Product;
|
|
7883
|
+
|
|
7884
|
+
/**
|
|
7885
|
+
* Encodes the specified Product message. Does not implicitly {@link productcatalog.Product.verify|verify} messages.
|
|
7886
|
+
* @param message Product message or plain object to encode
|
|
7887
|
+
* @param [writer] Writer to encode to
|
|
7888
|
+
* @returns Writer
|
|
7889
|
+
*/
|
|
7890
|
+
public static encode(message: productcatalog.IProduct, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
7891
|
+
|
|
7892
|
+
/**
|
|
7893
|
+
* Encodes the specified Product message, length delimited. Does not implicitly {@link productcatalog.Product.verify|verify} messages.
|
|
7894
|
+
* @param message Product message or plain object to encode
|
|
7895
|
+
* @param [writer] Writer to encode to
|
|
7896
|
+
* @returns Writer
|
|
7897
|
+
*/
|
|
7898
|
+
public static encodeDelimited(message: productcatalog.IProduct, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
7899
|
+
|
|
7900
|
+
/**
|
|
7901
|
+
* Decodes a Product message from the specified reader or buffer.
|
|
7902
|
+
* @param reader Reader or buffer to decode from
|
|
7903
|
+
* @param [length] Message length if known beforehand
|
|
7904
|
+
* @returns Product
|
|
7905
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
7906
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
7907
|
+
*/
|
|
7908
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): productcatalog.Product;
|
|
7909
|
+
|
|
7910
|
+
/**
|
|
7911
|
+
* Decodes a Product message from the specified reader or buffer, length delimited.
|
|
7912
|
+
* @param reader Reader or buffer to decode from
|
|
7913
|
+
* @returns Product
|
|
7914
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
7915
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
7916
|
+
*/
|
|
7917
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): productcatalog.Product;
|
|
7918
|
+
|
|
7919
|
+
/**
|
|
7920
|
+
* Verifies a Product message.
|
|
7921
|
+
* @param message Plain object to verify
|
|
7922
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
7923
|
+
*/
|
|
7924
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
7925
|
+
|
|
7926
|
+
/**
|
|
7927
|
+
* Creates a Product message from a plain object. Also converts values to their respective internal types.
|
|
7928
|
+
* @param object Plain object
|
|
7929
|
+
* @returns Product
|
|
7930
|
+
*/
|
|
7931
|
+
public static fromObject(object: { [k: string]: any }): productcatalog.Product;
|
|
7932
|
+
|
|
7933
|
+
/**
|
|
7934
|
+
* Creates a plain object from a Product message. Also converts values to other types if specified.
|
|
7935
|
+
* @param message Product
|
|
7936
|
+
* @param [options] Conversion options
|
|
7937
|
+
* @returns Plain object
|
|
7938
|
+
*/
|
|
7939
|
+
public static toObject(message: productcatalog.Product, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
7940
|
+
|
|
7941
|
+
/**
|
|
7942
|
+
* Converts this Product to JSON.
|
|
7943
|
+
* @returns JSON object
|
|
7944
|
+
*/
|
|
7945
|
+
public toJSON(): { [k: string]: any };
|
|
7946
|
+
}
|
|
7947
|
+
|
|
7948
|
+
/** ProductBusinessSector enum. */
|
|
7949
|
+
enum ProductBusinessSector {
|
|
7950
|
+
BUS_SEC_UNKNOWN = 0,
|
|
7951
|
+
BUS_SEC_B2C = 1,
|
|
7952
|
+
BUS_SEC_B2B = 2,
|
|
7953
|
+
BUS_SEC_PARTNERSHIP = 3
|
|
7954
|
+
}
|
|
7955
|
+
|
|
7846
7956
|
/** Properties of a ProductSku. */
|
|
7847
7957
|
interface IProductSku {
|
|
7848
7958
|
|
|
@@ -37643,6 +37753,96 @@ export class ExperimentAccessGroupMapDeleted implements IExperimentAccessGroupMa
|
|
|
37643
37753
|
public toJSON(): { [k: string]: any };
|
|
37644
37754
|
}
|
|
37645
37755
|
|
|
37756
|
+
/** Properties of a ProductCreated. */
|
|
37757
|
+
export interface IProductCreated {
|
|
37758
|
+
|
|
37759
|
+
/** ProductCreated product */
|
|
37760
|
+
product?: (productcatalog.IProduct|null);
|
|
37761
|
+
}
|
|
37762
|
+
|
|
37763
|
+
/** Represents a ProductCreated. */
|
|
37764
|
+
export class ProductCreated implements IProductCreated {
|
|
37765
|
+
|
|
37766
|
+
/**
|
|
37767
|
+
* Constructs a new ProductCreated.
|
|
37768
|
+
* @param [properties] Properties to set
|
|
37769
|
+
*/
|
|
37770
|
+
constructor(properties?: IProductCreated);
|
|
37771
|
+
|
|
37772
|
+
/** ProductCreated product. */
|
|
37773
|
+
public product?: (productcatalog.IProduct|null);
|
|
37774
|
+
|
|
37775
|
+
/**
|
|
37776
|
+
* Creates a new ProductCreated instance using the specified properties.
|
|
37777
|
+
* @param [properties] Properties to set
|
|
37778
|
+
* @returns ProductCreated instance
|
|
37779
|
+
*/
|
|
37780
|
+
public static create(properties?: IProductCreated): ProductCreated;
|
|
37781
|
+
|
|
37782
|
+
/**
|
|
37783
|
+
* Encodes the specified ProductCreated message. Does not implicitly {@link ProductCreated.verify|verify} messages.
|
|
37784
|
+
* @param message ProductCreated message or plain object to encode
|
|
37785
|
+
* @param [writer] Writer to encode to
|
|
37786
|
+
* @returns Writer
|
|
37787
|
+
*/
|
|
37788
|
+
public static encode(message: IProductCreated, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
37789
|
+
|
|
37790
|
+
/**
|
|
37791
|
+
* Encodes the specified ProductCreated message, length delimited. Does not implicitly {@link ProductCreated.verify|verify} messages.
|
|
37792
|
+
* @param message ProductCreated message or plain object to encode
|
|
37793
|
+
* @param [writer] Writer to encode to
|
|
37794
|
+
* @returns Writer
|
|
37795
|
+
*/
|
|
37796
|
+
public static encodeDelimited(message: IProductCreated, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
37797
|
+
|
|
37798
|
+
/**
|
|
37799
|
+
* Decodes a ProductCreated message from the specified reader or buffer.
|
|
37800
|
+
* @param reader Reader or buffer to decode from
|
|
37801
|
+
* @param [length] Message length if known beforehand
|
|
37802
|
+
* @returns ProductCreated
|
|
37803
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
37804
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
37805
|
+
*/
|
|
37806
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ProductCreated;
|
|
37807
|
+
|
|
37808
|
+
/**
|
|
37809
|
+
* Decodes a ProductCreated message from the specified reader or buffer, length delimited.
|
|
37810
|
+
* @param reader Reader or buffer to decode from
|
|
37811
|
+
* @returns ProductCreated
|
|
37812
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
37813
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
37814
|
+
*/
|
|
37815
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ProductCreated;
|
|
37816
|
+
|
|
37817
|
+
/**
|
|
37818
|
+
* Verifies a ProductCreated message.
|
|
37819
|
+
* @param message Plain object to verify
|
|
37820
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
37821
|
+
*/
|
|
37822
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
37823
|
+
|
|
37824
|
+
/**
|
|
37825
|
+
* Creates a ProductCreated message from a plain object. Also converts values to their respective internal types.
|
|
37826
|
+
* @param object Plain object
|
|
37827
|
+
* @returns ProductCreated
|
|
37828
|
+
*/
|
|
37829
|
+
public static fromObject(object: { [k: string]: any }): ProductCreated;
|
|
37830
|
+
|
|
37831
|
+
/**
|
|
37832
|
+
* Creates a plain object from a ProductCreated message. Also converts values to other types if specified.
|
|
37833
|
+
* @param message ProductCreated
|
|
37834
|
+
* @param [options] Conversion options
|
|
37835
|
+
* @returns Plain object
|
|
37836
|
+
*/
|
|
37837
|
+
public static toObject(message: ProductCreated, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
37838
|
+
|
|
37839
|
+
/**
|
|
37840
|
+
* Converts this ProductCreated to JSON.
|
|
37841
|
+
* @returns JSON object
|
|
37842
|
+
*/
|
|
37843
|
+
public toJSON(): { [k: string]: any };
|
|
37844
|
+
}
|
|
37845
|
+
|
|
37646
37846
|
/** Properties of a ProductSkuCreated. */
|
|
37647
37847
|
export interface IProductSkuCreated {
|
|
37648
37848
|
|
package/lib/index.js
CHANGED
|
@@ -18646,6 +18646,279 @@ $root.productcatalog = (function() {
|
|
|
18646
18646
|
*/
|
|
18647
18647
|
var productcatalog = {};
|
|
18648
18648
|
|
|
18649
|
+
productcatalog.Product = (function() {
|
|
18650
|
+
|
|
18651
|
+
/**
|
|
18652
|
+
* Properties of a Product.
|
|
18653
|
+
* @memberof productcatalog
|
|
18654
|
+
* @interface IProduct
|
|
18655
|
+
* @property {string|null} [id] product id
|
|
18656
|
+
* @property {string|null} [name] product name
|
|
18657
|
+
* @property {productcatalog.ProductBusinessSector|null} [businessSector] product business sector, e.g "B2C", "B2B"
|
|
18658
|
+
*/
|
|
18659
|
+
|
|
18660
|
+
/**
|
|
18661
|
+
* Constructs a new Product.
|
|
18662
|
+
* @memberof productcatalog
|
|
18663
|
+
* @classdesc Represents a Product.
|
|
18664
|
+
* @implements IProduct
|
|
18665
|
+
* @constructor
|
|
18666
|
+
* @param {productcatalog.IProduct=} [properties] Properties to set
|
|
18667
|
+
*/
|
|
18668
|
+
function Product(properties) {
|
|
18669
|
+
if (properties)
|
|
18670
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
18671
|
+
if (properties[keys[i]] != null)
|
|
18672
|
+
this[keys[i]] = properties[keys[i]];
|
|
18673
|
+
}
|
|
18674
|
+
|
|
18675
|
+
/**
|
|
18676
|
+
* product id
|
|
18677
|
+
* @member {string} id
|
|
18678
|
+
* @memberof productcatalog.Product
|
|
18679
|
+
* @instance
|
|
18680
|
+
*/
|
|
18681
|
+
Product.prototype.id = "";
|
|
18682
|
+
|
|
18683
|
+
/**
|
|
18684
|
+
* product name
|
|
18685
|
+
* @member {string} name
|
|
18686
|
+
* @memberof productcatalog.Product
|
|
18687
|
+
* @instance
|
|
18688
|
+
*/
|
|
18689
|
+
Product.prototype.name = "";
|
|
18690
|
+
|
|
18691
|
+
/**
|
|
18692
|
+
* product business sector, e.g "B2C", "B2B"
|
|
18693
|
+
* @member {productcatalog.ProductBusinessSector} businessSector
|
|
18694
|
+
* @memberof productcatalog.Product
|
|
18695
|
+
* @instance
|
|
18696
|
+
*/
|
|
18697
|
+
Product.prototype.businessSector = 0;
|
|
18698
|
+
|
|
18699
|
+
/**
|
|
18700
|
+
* Creates a new Product instance using the specified properties.
|
|
18701
|
+
* @function create
|
|
18702
|
+
* @memberof productcatalog.Product
|
|
18703
|
+
* @static
|
|
18704
|
+
* @param {productcatalog.IProduct=} [properties] Properties to set
|
|
18705
|
+
* @returns {productcatalog.Product} Product instance
|
|
18706
|
+
*/
|
|
18707
|
+
Product.create = function create(properties) {
|
|
18708
|
+
return new Product(properties);
|
|
18709
|
+
};
|
|
18710
|
+
|
|
18711
|
+
/**
|
|
18712
|
+
* Encodes the specified Product message. Does not implicitly {@link productcatalog.Product.verify|verify} messages.
|
|
18713
|
+
* @function encode
|
|
18714
|
+
* @memberof productcatalog.Product
|
|
18715
|
+
* @static
|
|
18716
|
+
* @param {productcatalog.IProduct} message Product message or plain object to encode
|
|
18717
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
18718
|
+
* @returns {$protobuf.Writer} Writer
|
|
18719
|
+
*/
|
|
18720
|
+
Product.encode = function encode(message, writer) {
|
|
18721
|
+
if (!writer)
|
|
18722
|
+
writer = $Writer.create();
|
|
18723
|
+
if (message.id != null && message.hasOwnProperty("id"))
|
|
18724
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.id);
|
|
18725
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
18726
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.name);
|
|
18727
|
+
if (message.businessSector != null && message.hasOwnProperty("businessSector"))
|
|
18728
|
+
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.businessSector);
|
|
18729
|
+
return writer;
|
|
18730
|
+
};
|
|
18731
|
+
|
|
18732
|
+
/**
|
|
18733
|
+
* Encodes the specified Product message, length delimited. Does not implicitly {@link productcatalog.Product.verify|verify} messages.
|
|
18734
|
+
* @function encodeDelimited
|
|
18735
|
+
* @memberof productcatalog.Product
|
|
18736
|
+
* @static
|
|
18737
|
+
* @param {productcatalog.IProduct} message Product message or plain object to encode
|
|
18738
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
18739
|
+
* @returns {$protobuf.Writer} Writer
|
|
18740
|
+
*/
|
|
18741
|
+
Product.encodeDelimited = function encodeDelimited(message, writer) {
|
|
18742
|
+
return this.encode(message, writer).ldelim();
|
|
18743
|
+
};
|
|
18744
|
+
|
|
18745
|
+
/**
|
|
18746
|
+
* Decodes a Product message from the specified reader or buffer.
|
|
18747
|
+
* @function decode
|
|
18748
|
+
* @memberof productcatalog.Product
|
|
18749
|
+
* @static
|
|
18750
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
18751
|
+
* @param {number} [length] Message length if known beforehand
|
|
18752
|
+
* @returns {productcatalog.Product} Product
|
|
18753
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
18754
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
18755
|
+
*/
|
|
18756
|
+
Product.decode = function decode(reader, length) {
|
|
18757
|
+
if (!(reader instanceof $Reader))
|
|
18758
|
+
reader = $Reader.create(reader);
|
|
18759
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.productcatalog.Product();
|
|
18760
|
+
while (reader.pos < end) {
|
|
18761
|
+
var tag = reader.uint32();
|
|
18762
|
+
switch (tag >>> 3) {
|
|
18763
|
+
case 1:
|
|
18764
|
+
message.id = reader.string();
|
|
18765
|
+
break;
|
|
18766
|
+
case 2:
|
|
18767
|
+
message.name = reader.string();
|
|
18768
|
+
break;
|
|
18769
|
+
case 3:
|
|
18770
|
+
message.businessSector = reader.int32();
|
|
18771
|
+
break;
|
|
18772
|
+
default:
|
|
18773
|
+
reader.skipType(tag & 7);
|
|
18774
|
+
break;
|
|
18775
|
+
}
|
|
18776
|
+
}
|
|
18777
|
+
return message;
|
|
18778
|
+
};
|
|
18779
|
+
|
|
18780
|
+
/**
|
|
18781
|
+
* Decodes a Product message from the specified reader or buffer, length delimited.
|
|
18782
|
+
* @function decodeDelimited
|
|
18783
|
+
* @memberof productcatalog.Product
|
|
18784
|
+
* @static
|
|
18785
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
18786
|
+
* @returns {productcatalog.Product} Product
|
|
18787
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
18788
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
18789
|
+
*/
|
|
18790
|
+
Product.decodeDelimited = function decodeDelimited(reader) {
|
|
18791
|
+
if (!(reader instanceof $Reader))
|
|
18792
|
+
reader = new $Reader(reader);
|
|
18793
|
+
return this.decode(reader, reader.uint32());
|
|
18794
|
+
};
|
|
18795
|
+
|
|
18796
|
+
/**
|
|
18797
|
+
* Verifies a Product message.
|
|
18798
|
+
* @function verify
|
|
18799
|
+
* @memberof productcatalog.Product
|
|
18800
|
+
* @static
|
|
18801
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
18802
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
18803
|
+
*/
|
|
18804
|
+
Product.verify = function verify(message) {
|
|
18805
|
+
if (typeof message !== "object" || message === null)
|
|
18806
|
+
return "object expected";
|
|
18807
|
+
if (message.id != null && message.hasOwnProperty("id"))
|
|
18808
|
+
if (!$util.isString(message.id))
|
|
18809
|
+
return "id: string expected";
|
|
18810
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
18811
|
+
if (!$util.isString(message.name))
|
|
18812
|
+
return "name: string expected";
|
|
18813
|
+
if (message.businessSector != null && message.hasOwnProperty("businessSector"))
|
|
18814
|
+
switch (message.businessSector) {
|
|
18815
|
+
default:
|
|
18816
|
+
return "businessSector: enum value expected";
|
|
18817
|
+
case 0:
|
|
18818
|
+
case 1:
|
|
18819
|
+
case 2:
|
|
18820
|
+
case 3:
|
|
18821
|
+
break;
|
|
18822
|
+
}
|
|
18823
|
+
return null;
|
|
18824
|
+
};
|
|
18825
|
+
|
|
18826
|
+
/**
|
|
18827
|
+
* Creates a Product message from a plain object. Also converts values to their respective internal types.
|
|
18828
|
+
* @function fromObject
|
|
18829
|
+
* @memberof productcatalog.Product
|
|
18830
|
+
* @static
|
|
18831
|
+
* @param {Object.<string,*>} object Plain object
|
|
18832
|
+
* @returns {productcatalog.Product} Product
|
|
18833
|
+
*/
|
|
18834
|
+
Product.fromObject = function fromObject(object) {
|
|
18835
|
+
if (object instanceof $root.productcatalog.Product)
|
|
18836
|
+
return object;
|
|
18837
|
+
var message = new $root.productcatalog.Product();
|
|
18838
|
+
if (object.id != null)
|
|
18839
|
+
message.id = String(object.id);
|
|
18840
|
+
if (object.name != null)
|
|
18841
|
+
message.name = String(object.name);
|
|
18842
|
+
switch (object.businessSector) {
|
|
18843
|
+
case "BUS_SEC_UNKNOWN":
|
|
18844
|
+
case 0:
|
|
18845
|
+
message.businessSector = 0;
|
|
18846
|
+
break;
|
|
18847
|
+
case "BUS_SEC_B2C":
|
|
18848
|
+
case 1:
|
|
18849
|
+
message.businessSector = 1;
|
|
18850
|
+
break;
|
|
18851
|
+
case "BUS_SEC_B2B":
|
|
18852
|
+
case 2:
|
|
18853
|
+
message.businessSector = 2;
|
|
18854
|
+
break;
|
|
18855
|
+
case "BUS_SEC_PARTNERSHIP":
|
|
18856
|
+
case 3:
|
|
18857
|
+
message.businessSector = 3;
|
|
18858
|
+
break;
|
|
18859
|
+
}
|
|
18860
|
+
return message;
|
|
18861
|
+
};
|
|
18862
|
+
|
|
18863
|
+
/**
|
|
18864
|
+
* Creates a plain object from a Product message. Also converts values to other types if specified.
|
|
18865
|
+
* @function toObject
|
|
18866
|
+
* @memberof productcatalog.Product
|
|
18867
|
+
* @static
|
|
18868
|
+
* @param {productcatalog.Product} message Product
|
|
18869
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
18870
|
+
* @returns {Object.<string,*>} Plain object
|
|
18871
|
+
*/
|
|
18872
|
+
Product.toObject = function toObject(message, options) {
|
|
18873
|
+
if (!options)
|
|
18874
|
+
options = {};
|
|
18875
|
+
var object = {};
|
|
18876
|
+
if (options.defaults) {
|
|
18877
|
+
object.id = "";
|
|
18878
|
+
object.name = "";
|
|
18879
|
+
object.businessSector = options.enums === String ? "BUS_SEC_UNKNOWN" : 0;
|
|
18880
|
+
}
|
|
18881
|
+
if (message.id != null && message.hasOwnProperty("id"))
|
|
18882
|
+
object.id = message.id;
|
|
18883
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
18884
|
+
object.name = message.name;
|
|
18885
|
+
if (message.businessSector != null && message.hasOwnProperty("businessSector"))
|
|
18886
|
+
object.businessSector = options.enums === String ? $root.productcatalog.ProductBusinessSector[message.businessSector] : message.businessSector;
|
|
18887
|
+
return object;
|
|
18888
|
+
};
|
|
18889
|
+
|
|
18890
|
+
/**
|
|
18891
|
+
* Converts this Product to JSON.
|
|
18892
|
+
* @function toJSON
|
|
18893
|
+
* @memberof productcatalog.Product
|
|
18894
|
+
* @instance
|
|
18895
|
+
* @returns {Object.<string,*>} JSON object
|
|
18896
|
+
*/
|
|
18897
|
+
Product.prototype.toJSON = function toJSON() {
|
|
18898
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
18899
|
+
};
|
|
18900
|
+
|
|
18901
|
+
return Product;
|
|
18902
|
+
})();
|
|
18903
|
+
|
|
18904
|
+
/**
|
|
18905
|
+
* ProductBusinessSector enum.
|
|
18906
|
+
* @name productcatalog.ProductBusinessSector
|
|
18907
|
+
* @enum {string}
|
|
18908
|
+
* @property {number} BUS_SEC_UNKNOWN=0 BUS_SEC_UNKNOWN value
|
|
18909
|
+
* @property {number} BUS_SEC_B2C=1 BUS_SEC_B2C value
|
|
18910
|
+
* @property {number} BUS_SEC_B2B=2 BUS_SEC_B2B value
|
|
18911
|
+
* @property {number} BUS_SEC_PARTNERSHIP=3 BUS_SEC_PARTNERSHIP value
|
|
18912
|
+
*/
|
|
18913
|
+
productcatalog.ProductBusinessSector = (function() {
|
|
18914
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
18915
|
+
values[valuesById[0] = "BUS_SEC_UNKNOWN"] = 0;
|
|
18916
|
+
values[valuesById[1] = "BUS_SEC_B2C"] = 1;
|
|
18917
|
+
values[valuesById[2] = "BUS_SEC_B2B"] = 2;
|
|
18918
|
+
values[valuesById[3] = "BUS_SEC_PARTNERSHIP"] = 3;
|
|
18919
|
+
return values;
|
|
18920
|
+
})();
|
|
18921
|
+
|
|
18649
18922
|
productcatalog.ProductSku = (function() {
|
|
18650
18923
|
|
|
18651
18924
|
/**
|
|
@@ -105154,6 +105427,198 @@ $root.ExperimentAccessGroupMapDeleted = (function() {
|
|
|
105154
105427
|
return ExperimentAccessGroupMapDeleted;
|
|
105155
105428
|
})();
|
|
105156
105429
|
|
|
105430
|
+
$root.ProductCreated = (function() {
|
|
105431
|
+
|
|
105432
|
+
/**
|
|
105433
|
+
* Properties of a ProductCreated.
|
|
105434
|
+
* @exports IProductCreated
|
|
105435
|
+
* @interface IProductCreated
|
|
105436
|
+
* @property {productcatalog.IProduct|null} [product] ProductCreated product
|
|
105437
|
+
*/
|
|
105438
|
+
|
|
105439
|
+
/**
|
|
105440
|
+
* Constructs a new ProductCreated.
|
|
105441
|
+
* @exports ProductCreated
|
|
105442
|
+
* @classdesc Represents a ProductCreated.
|
|
105443
|
+
* @implements IProductCreated
|
|
105444
|
+
* @constructor
|
|
105445
|
+
* @param {IProductCreated=} [properties] Properties to set
|
|
105446
|
+
*/
|
|
105447
|
+
function ProductCreated(properties) {
|
|
105448
|
+
if (properties)
|
|
105449
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
105450
|
+
if (properties[keys[i]] != null)
|
|
105451
|
+
this[keys[i]] = properties[keys[i]];
|
|
105452
|
+
}
|
|
105453
|
+
|
|
105454
|
+
/**
|
|
105455
|
+
* ProductCreated product.
|
|
105456
|
+
* @member {productcatalog.IProduct|null|undefined} product
|
|
105457
|
+
* @memberof ProductCreated
|
|
105458
|
+
* @instance
|
|
105459
|
+
*/
|
|
105460
|
+
ProductCreated.prototype.product = null;
|
|
105461
|
+
|
|
105462
|
+
/**
|
|
105463
|
+
* Creates a new ProductCreated instance using the specified properties.
|
|
105464
|
+
* @function create
|
|
105465
|
+
* @memberof ProductCreated
|
|
105466
|
+
* @static
|
|
105467
|
+
* @param {IProductCreated=} [properties] Properties to set
|
|
105468
|
+
* @returns {ProductCreated} ProductCreated instance
|
|
105469
|
+
*/
|
|
105470
|
+
ProductCreated.create = function create(properties) {
|
|
105471
|
+
return new ProductCreated(properties);
|
|
105472
|
+
};
|
|
105473
|
+
|
|
105474
|
+
/**
|
|
105475
|
+
* Encodes the specified ProductCreated message. Does not implicitly {@link ProductCreated.verify|verify} messages.
|
|
105476
|
+
* @function encode
|
|
105477
|
+
* @memberof ProductCreated
|
|
105478
|
+
* @static
|
|
105479
|
+
* @param {IProductCreated} message ProductCreated message or plain object to encode
|
|
105480
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
105481
|
+
* @returns {$protobuf.Writer} Writer
|
|
105482
|
+
*/
|
|
105483
|
+
ProductCreated.encode = function encode(message, writer) {
|
|
105484
|
+
if (!writer)
|
|
105485
|
+
writer = $Writer.create();
|
|
105486
|
+
if (message.product != null && message.hasOwnProperty("product"))
|
|
105487
|
+
$root.productcatalog.Product.encode(message.product, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
105488
|
+
return writer;
|
|
105489
|
+
};
|
|
105490
|
+
|
|
105491
|
+
/**
|
|
105492
|
+
* Encodes the specified ProductCreated message, length delimited. Does not implicitly {@link ProductCreated.verify|verify} messages.
|
|
105493
|
+
* @function encodeDelimited
|
|
105494
|
+
* @memberof ProductCreated
|
|
105495
|
+
* @static
|
|
105496
|
+
* @param {IProductCreated} message ProductCreated message or plain object to encode
|
|
105497
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
105498
|
+
* @returns {$protobuf.Writer} Writer
|
|
105499
|
+
*/
|
|
105500
|
+
ProductCreated.encodeDelimited = function encodeDelimited(message, writer) {
|
|
105501
|
+
return this.encode(message, writer).ldelim();
|
|
105502
|
+
};
|
|
105503
|
+
|
|
105504
|
+
/**
|
|
105505
|
+
* Decodes a ProductCreated message from the specified reader or buffer.
|
|
105506
|
+
* @function decode
|
|
105507
|
+
* @memberof ProductCreated
|
|
105508
|
+
* @static
|
|
105509
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
105510
|
+
* @param {number} [length] Message length if known beforehand
|
|
105511
|
+
* @returns {ProductCreated} ProductCreated
|
|
105512
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
105513
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
105514
|
+
*/
|
|
105515
|
+
ProductCreated.decode = function decode(reader, length) {
|
|
105516
|
+
if (!(reader instanceof $Reader))
|
|
105517
|
+
reader = $Reader.create(reader);
|
|
105518
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ProductCreated();
|
|
105519
|
+
while (reader.pos < end) {
|
|
105520
|
+
var tag = reader.uint32();
|
|
105521
|
+
switch (tag >>> 3) {
|
|
105522
|
+
case 1:
|
|
105523
|
+
message.product = $root.productcatalog.Product.decode(reader, reader.uint32());
|
|
105524
|
+
break;
|
|
105525
|
+
default:
|
|
105526
|
+
reader.skipType(tag & 7);
|
|
105527
|
+
break;
|
|
105528
|
+
}
|
|
105529
|
+
}
|
|
105530
|
+
return message;
|
|
105531
|
+
};
|
|
105532
|
+
|
|
105533
|
+
/**
|
|
105534
|
+
* Decodes a ProductCreated message from the specified reader or buffer, length delimited.
|
|
105535
|
+
* @function decodeDelimited
|
|
105536
|
+
* @memberof ProductCreated
|
|
105537
|
+
* @static
|
|
105538
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
105539
|
+
* @returns {ProductCreated} ProductCreated
|
|
105540
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
105541
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
105542
|
+
*/
|
|
105543
|
+
ProductCreated.decodeDelimited = function decodeDelimited(reader) {
|
|
105544
|
+
if (!(reader instanceof $Reader))
|
|
105545
|
+
reader = new $Reader(reader);
|
|
105546
|
+
return this.decode(reader, reader.uint32());
|
|
105547
|
+
};
|
|
105548
|
+
|
|
105549
|
+
/**
|
|
105550
|
+
* Verifies a ProductCreated message.
|
|
105551
|
+
* @function verify
|
|
105552
|
+
* @memberof ProductCreated
|
|
105553
|
+
* @static
|
|
105554
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
105555
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
105556
|
+
*/
|
|
105557
|
+
ProductCreated.verify = function verify(message) {
|
|
105558
|
+
if (typeof message !== "object" || message === null)
|
|
105559
|
+
return "object expected";
|
|
105560
|
+
if (message.product != null && message.hasOwnProperty("product")) {
|
|
105561
|
+
var error = $root.productcatalog.Product.verify(message.product);
|
|
105562
|
+
if (error)
|
|
105563
|
+
return "product." + error;
|
|
105564
|
+
}
|
|
105565
|
+
return null;
|
|
105566
|
+
};
|
|
105567
|
+
|
|
105568
|
+
/**
|
|
105569
|
+
* Creates a ProductCreated message from a plain object. Also converts values to their respective internal types.
|
|
105570
|
+
* @function fromObject
|
|
105571
|
+
* @memberof ProductCreated
|
|
105572
|
+
* @static
|
|
105573
|
+
* @param {Object.<string,*>} object Plain object
|
|
105574
|
+
* @returns {ProductCreated} ProductCreated
|
|
105575
|
+
*/
|
|
105576
|
+
ProductCreated.fromObject = function fromObject(object) {
|
|
105577
|
+
if (object instanceof $root.ProductCreated)
|
|
105578
|
+
return object;
|
|
105579
|
+
var message = new $root.ProductCreated();
|
|
105580
|
+
if (object.product != null) {
|
|
105581
|
+
if (typeof object.product !== "object")
|
|
105582
|
+
throw TypeError(".ProductCreated.product: object expected");
|
|
105583
|
+
message.product = $root.productcatalog.Product.fromObject(object.product);
|
|
105584
|
+
}
|
|
105585
|
+
return message;
|
|
105586
|
+
};
|
|
105587
|
+
|
|
105588
|
+
/**
|
|
105589
|
+
* Creates a plain object from a ProductCreated message. Also converts values to other types if specified.
|
|
105590
|
+
* @function toObject
|
|
105591
|
+
* @memberof ProductCreated
|
|
105592
|
+
* @static
|
|
105593
|
+
* @param {ProductCreated} message ProductCreated
|
|
105594
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
105595
|
+
* @returns {Object.<string,*>} Plain object
|
|
105596
|
+
*/
|
|
105597
|
+
ProductCreated.toObject = function toObject(message, options) {
|
|
105598
|
+
if (!options)
|
|
105599
|
+
options = {};
|
|
105600
|
+
var object = {};
|
|
105601
|
+
if (options.defaults)
|
|
105602
|
+
object.product = null;
|
|
105603
|
+
if (message.product != null && message.hasOwnProperty("product"))
|
|
105604
|
+
object.product = $root.productcatalog.Product.toObject(message.product, options);
|
|
105605
|
+
return object;
|
|
105606
|
+
};
|
|
105607
|
+
|
|
105608
|
+
/**
|
|
105609
|
+
* Converts this ProductCreated to JSON.
|
|
105610
|
+
* @function toJSON
|
|
105611
|
+
* @memberof ProductCreated
|
|
105612
|
+
* @instance
|
|
105613
|
+
* @returns {Object.<string,*>} JSON object
|
|
105614
|
+
*/
|
|
105615
|
+
ProductCreated.prototype.toJSON = function toJSON() {
|
|
105616
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
105617
|
+
};
|
|
105618
|
+
|
|
105619
|
+
return ProductCreated;
|
|
105620
|
+
})();
|
|
105621
|
+
|
|
105157
105622
|
$root.ProductSkuCreated = (function() {
|
|
105158
105623
|
|
|
105159
105624
|
/**
|
package/package.json
CHANGED