@peabody-soft/mbs-model-ts 1.0.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/LICENCE +661 -0
- package/dist/Address.d.ts +33 -0
- package/dist/Address.js +97 -0
- package/dist/Attachment.d.ts +16 -0
- package/dist/Attachment.js +49 -0
- package/dist/AttachmentBaseUrl.d.ts +11 -0
- package/dist/AttachmentBaseUrl.js +41 -0
- package/dist/AuthTokens.d.ts +13 -0
- package/dist/AuthTokens.js +30 -0
- package/dist/Business.d.ts +44 -0
- package/dist/Business.js +87 -0
- package/dist/BusinessIdentifier.d.ts +8 -0
- package/dist/BusinessIdentifier.js +14 -0
- package/dist/BusinessLink.d.ts +21 -0
- package/dist/BusinessLink.js +61 -0
- package/dist/BusinessProfile.d.ts +11 -0
- package/dist/BusinessProfile.js +27 -0
- package/dist/CartEditor.d.ts +59 -0
- package/dist/CartEditor.js +324 -0
- package/dist/Catalog.d.ts +28 -0
- package/dist/Catalog.js +115 -0
- package/dist/Constants.d.ts +10 -0
- package/dist/Constants.js +43 -0
- package/dist/ContainerNames.d.ts +2 -0
- package/dist/ContainerNames.js +21 -0
- package/dist/Database.d.ts +15 -0
- package/dist/Database.js +1 -0
- package/dist/Entity.d.ts +27 -0
- package/dist/Entity.js +69 -0
- package/dist/Enums.d.ts +16 -0
- package/dist/Enums.js +18 -0
- package/dist/Exceptions.d.ts +4 -0
- package/dist/Exceptions.js +8 -0
- package/dist/GeneralSettings.d.ts +46 -0
- package/dist/GeneralSettings.js +99 -0
- package/dist/HttpStatusCodes.d.ts +2 -0
- package/dist/HttpStatusCodes.js +34 -0
- package/dist/Ids.d.ts +17 -0
- package/dist/Ids.js +78 -0
- package/dist/Item.d.ts +12 -0
- package/dist/Item.js +30 -0
- package/dist/LatLong.d.ts +7 -0
- package/dist/LatLong.js +17 -0
- package/dist/LiveData.d.ts +30 -0
- package/dist/LiveData.js +76 -0
- package/dist/Measures.d.ts +20 -0
- package/dist/Measures.js +34 -0
- package/dist/Message.d.ts +16 -0
- package/dist/Message.js +32 -0
- package/dist/MockDatabase.d.ts +19 -0
- package/dist/MockDatabase.js +73 -0
- package/dist/Model.d.ts +63 -0
- package/dist/Model.js +629 -0
- package/dist/Order.d.ts +31 -0
- package/dist/Order.js +70 -0
- package/dist/Package.d.ts +25 -0
- package/dist/Package.js +52 -0
- package/dist/PackageIdentifier.d.ts +8 -0
- package/dist/PackageIdentifier.js +14 -0
- package/dist/PaymentMethodDetail.d.ts +8 -0
- package/dist/PaymentMethodDetail.js +17 -0
- package/dist/Photo.d.ts +11 -0
- package/dist/Photo.js +29 -0
- package/dist/Price.d.ts +17 -0
- package/dist/Price.js +52 -0
- package/dist/PriceList.d.ts +3 -0
- package/dist/PriceList.js +5 -0
- package/dist/Product.d.ts +33 -0
- package/dist/Product.js +84 -0
- package/dist/ProductCategory.d.ts +10 -0
- package/dist/ProductCategory.js +18 -0
- package/dist/Profile.d.ts +20 -0
- package/dist/Profile.js +55 -0
- package/dist/ProtoMap.d.ts +71 -0
- package/dist/ProtoMap.js +1126 -0
- package/dist/Routes.d.ts +7 -0
- package/dist/Routes.js +12 -0
- package/dist/Service.d.ts +16 -0
- package/dist/Service.js +1 -0
- package/dist/ServiceExceptions.d.ts +40 -0
- package/dist/ServiceExceptions.js +84 -0
- package/dist/ServiceProxy.d.ts +25 -0
- package/dist/ServiceProxy.js +117 -0
- package/dist/ShoppingList.d.ts +64 -0
- package/dist/ShoppingList.js +188 -0
- package/dist/SyncCache.d.ts +28 -0
- package/dist/SyncCache.js +137 -0
- package/dist/SyncKeys.d.ts +5 -0
- package/dist/SyncKeys.js +41 -0
- package/dist/SyncState.d.ts +8 -0
- package/dist/SyncState.js +30 -0
- package/dist/Tax.d.ts +10 -0
- package/dist/Tax.js +30 -0
- package/dist/UserProfile.d.ts +16 -0
- package/dist/UserProfile.js +40 -0
- package/dist/WorkingDays.d.ts +33 -0
- package/dist/WorkingDays.js +121 -0
- package/dist/generated/Address.d.ts +77 -0
- package/dist/generated/Address.js +110 -0
- package/dist/generated/AddressList.d.ts +39 -0
- package/dist/generated/AddressList.js +60 -0
- package/dist/generated/AddressType.d.ts +15 -0
- package/dist/generated/AddressType.js +20 -0
- package/dist/generated/Attachment.d.ts +66 -0
- package/dist/generated/Attachment.js +89 -0
- package/dist/generated/AttachmentType.d.ts +154 -0
- package/dist/generated/AttachmentType.js +159 -0
- package/dist/generated/AuthTokens.d.ts +56 -0
- package/dist/generated/AuthTokens.js +74 -0
- package/dist/generated/AuthenticationMethod.d.ts +24 -0
- package/dist/generated/AuthenticationMethod.js +29 -0
- package/dist/generated/Business.d.ts +54 -0
- package/dist/generated/Business.js +75 -0
- package/dist/generated/BusinessIdentifier.d.ts +36 -0
- package/dist/generated/BusinessIdentifier.js +60 -0
- package/dist/generated/BusinessIdentifierType.d.ts +49 -0
- package/dist/generated/BusinessIdentifierType.js +54 -0
- package/dist/generated/BusinessLink.d.ts +76 -0
- package/dist/generated/BusinessLink.js +99 -0
- package/dist/generated/BusinessSyncInRequest.d.ts +42 -0
- package/dist/generated/BusinessSyncInRequest.js +60 -0
- package/dist/generated/BusinessSyncInResponse.d.ts +42 -0
- package/dist/generated/BusinessSyncInResponse.js +60 -0
- package/dist/generated/BusinessSyncOutRequest.d.ts +82 -0
- package/dist/generated/BusinessSyncOutRequest.js +107 -0
- package/dist/generated/BusinessSyncOutResponse.d.ts +106 -0
- package/dist/generated/BusinessSyncOutResponse.js +139 -0
- package/dist/generated/Configuration.d.ts +48 -0
- package/dist/generated/Configuration.js +63 -0
- package/dist/generated/Constants.d.ts +474 -0
- package/dist/generated/Constants.js +479 -0
- package/dist/generated/CreateUserRequest.d.ts +37 -0
- package/dist/generated/CreateUserRequest.js +59 -0
- package/dist/generated/DimensionUnit.d.ts +28 -0
- package/dist/generated/DimensionUnit.js +33 -0
- package/dist/generated/Dimensions.d.ts +41 -0
- package/dist/generated/Dimensions.js +76 -0
- package/dist/generated/Entity.d.ts +62 -0
- package/dist/generated/Entity.js +83 -0
- package/dist/generated/FulfillmentMode.d.ts +32 -0
- package/dist/generated/FulfillmentMode.js +37 -0
- package/dist/generated/GeneralSettings.d.ts +141 -0
- package/dist/generated/GeneralSettings.js +186 -0
- package/dist/generated/Item.d.ts +54 -0
- package/dist/generated/Item.js +82 -0
- package/dist/generated/LatLong.d.ts +36 -0
- package/dist/generated/LatLong.js +59 -0
- package/dist/generated/Message.d.ts +80 -0
- package/dist/generated/Message.js +114 -0
- package/dist/generated/MessageType.d.ts +34 -0
- package/dist/generated/MessageType.js +39 -0
- package/dist/generated/OrderStatus.d.ts +50 -0
- package/dist/generated/OrderStatus.js +55 -0
- package/dist/generated/Package.d.ts +63 -0
- package/dist/generated/Package.js +92 -0
- package/dist/generated/PackageIdentifier.d.ts +36 -0
- package/dist/generated/PackageIdentifier.js +60 -0
- package/dist/generated/PackageIdentifierType.d.ts +49 -0
- package/dist/generated/PackageIdentifierType.js +54 -0
- package/dist/generated/PartyPreferencesPayload.d.ts +41 -0
- package/dist/generated/PartyPreferencesPayload.js +60 -0
- package/dist/generated/PaymentMethod.d.ts +20 -0
- package/dist/generated/PaymentMethod.js +25 -0
- package/dist/generated/PaymentMethodDetail.d.ts +37 -0
- package/dist/generated/PaymentMethodDetail.js +59 -0
- package/dist/generated/Price.d.ts +52 -0
- package/dist/generated/Price.js +75 -0
- package/dist/generated/PriceList.d.ts +34 -0
- package/dist/generated/PriceList.js +51 -0
- package/dist/generated/Product.d.ts +77 -0
- package/dist/generated/Product.js +106 -0
- package/dist/generated/ProductCategory.d.ts +32 -0
- package/dist/generated/ProductCategory.js +51 -0
- package/dist/generated/ProductType.d.ts +42 -0
- package/dist/generated/ProductType.js +47 -0
- package/dist/generated/ProfileSyncOutRequest.d.ts +51 -0
- package/dist/generated/ProfileSyncOutRequest.js +75 -0
- package/dist/generated/ProfileSyncOutResponse.d.ts +56 -0
- package/dist/generated/ProfileSyncOutResponse.js +77 -0
- package/dist/generated/ReservedPackage.d.ts +34 -0
- package/dist/generated/ReservedPackage.js +39 -0
- package/dist/generated/Role.d.ts +71 -0
- package/dist/generated/Role.js +76 -0
- package/dist/generated/SalesOrderPayload.d.ts +85 -0
- package/dist/generated/SalesOrderPayload.js +123 -0
- package/dist/generated/ShoppingList.d.ts +99 -0
- package/dist/generated/ShoppingList.js +132 -0
- package/dist/generated/ShoppingListItem.d.ts +102 -0
- package/dist/generated/ShoppingListItem.js +139 -0
- package/dist/generated/TaskStatus.d.ts +20 -0
- package/dist/generated/TaskStatus.js +25 -0
- package/dist/generated/Tax.d.ts +37 -0
- package/dist/generated/Tax.js +60 -0
- package/dist/generated/TaxType.d.ts +25 -0
- package/dist/generated/TaxType.js +30 -0
- package/dist/generated/UrlAndToken.d.ts +54 -0
- package/dist/generated/UrlAndToken.js +67 -0
- package/dist/generated/User.d.ts +63 -0
- package/dist/generated/User.js +89 -0
- package/dist/generated/Weight.d.ts +33 -0
- package/dist/generated/Weight.js +60 -0
- package/dist/generated/WeightUnit.d.ts +28 -0
- package/dist/generated/WeightUnit.js +33 -0
- package/dist/generated/WorkingDays.d.ts +42 -0
- package/dist/generated/WorkingDays.js +68 -0
- package/dist/generated/WorkingHours.d.ts +33 -0
- package/dist/generated/WorkingHours.js +52 -0
- package/dist/generated/WorkingHoursRange.d.ts +42 -0
- package/dist/generated/WorkingHoursRange.js +59 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.js +60 -0
- package/package.json +55 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
2
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
3
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
4
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
5
|
+
import { AddressType } from "./AddressType";
|
|
6
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
7
|
+
class Address$Type extends MessageType {
|
|
8
|
+
constructor() {
|
|
9
|
+
super("com.merabills.storefront.Address", [
|
|
10
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
11
|
+
{ no: 2, name: "addressType", kind: "enum", T: () => ["com.merabills.storefront.AddressType", AddressType] },
|
|
12
|
+
{ no: 3, name: "unitNumber", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
13
|
+
{ no: 4, name: "community", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
14
|
+
{ no: 5, name: "line2", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
15
|
+
{ no: 6, name: "city", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
16
|
+
{ no: 7, name: "state", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
17
|
+
{ no: 8, name: "pinCode", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
18
|
+
{ no: 9, name: "countryCode", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
|
|
19
|
+
]);
|
|
20
|
+
}
|
|
21
|
+
create(value) {
|
|
22
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
23
|
+
message.id = 0n;
|
|
24
|
+
message.addressType = 0;
|
|
25
|
+
message.countryCode = 0;
|
|
26
|
+
if (value !== undefined)
|
|
27
|
+
reflectionMergePartial(this, message, value);
|
|
28
|
+
return message;
|
|
29
|
+
}
|
|
30
|
+
internalBinaryRead(reader, length, options, target) {
|
|
31
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
32
|
+
while (reader.pos < end) {
|
|
33
|
+
let [fieldNo, wireType] = reader.tag();
|
|
34
|
+
switch (fieldNo) {
|
|
35
|
+
case /* int64 id */ 1:
|
|
36
|
+
message.id = reader.int64().toBigInt();
|
|
37
|
+
break;
|
|
38
|
+
case /* com.merabills.storefront.AddressType addressType */ 2:
|
|
39
|
+
message.addressType = reader.int32();
|
|
40
|
+
break;
|
|
41
|
+
case /* optional string unitNumber */ 3:
|
|
42
|
+
message.unitNumber = reader.string();
|
|
43
|
+
break;
|
|
44
|
+
case /* optional string community */ 4:
|
|
45
|
+
message.community = reader.string();
|
|
46
|
+
break;
|
|
47
|
+
case /* optional string line2 */ 5:
|
|
48
|
+
message.line2 = reader.string();
|
|
49
|
+
break;
|
|
50
|
+
case /* optional string city */ 6:
|
|
51
|
+
message.city = reader.string();
|
|
52
|
+
break;
|
|
53
|
+
case /* optional string state */ 7:
|
|
54
|
+
message.state = reader.string();
|
|
55
|
+
break;
|
|
56
|
+
case /* optional string pinCode */ 8:
|
|
57
|
+
message.pinCode = reader.string();
|
|
58
|
+
break;
|
|
59
|
+
case /* int32 countryCode */ 9:
|
|
60
|
+
message.countryCode = reader.int32();
|
|
61
|
+
break;
|
|
62
|
+
default:
|
|
63
|
+
let u = options.readUnknownField;
|
|
64
|
+
if (u === "throw")
|
|
65
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
66
|
+
let d = reader.skip(wireType);
|
|
67
|
+
if (u !== false)
|
|
68
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return message;
|
|
72
|
+
}
|
|
73
|
+
internalBinaryWrite(message, writer, options) {
|
|
74
|
+
/* int64 id = 1; */
|
|
75
|
+
if (message.id !== 0n)
|
|
76
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
77
|
+
/* com.merabills.storefront.AddressType addressType = 2; */
|
|
78
|
+
if (message.addressType !== 0)
|
|
79
|
+
writer.tag(2, WireType.Varint).int32(message.addressType);
|
|
80
|
+
/* optional string unitNumber = 3; */
|
|
81
|
+
if (message.unitNumber !== undefined)
|
|
82
|
+
writer.tag(3, WireType.LengthDelimited).string(message.unitNumber);
|
|
83
|
+
/* optional string community = 4; */
|
|
84
|
+
if (message.community !== undefined)
|
|
85
|
+
writer.tag(4, WireType.LengthDelimited).string(message.community);
|
|
86
|
+
/* optional string line2 = 5; */
|
|
87
|
+
if (message.line2 !== undefined)
|
|
88
|
+
writer.tag(5, WireType.LengthDelimited).string(message.line2);
|
|
89
|
+
/* optional string city = 6; */
|
|
90
|
+
if (message.city !== undefined)
|
|
91
|
+
writer.tag(6, WireType.LengthDelimited).string(message.city);
|
|
92
|
+
/* optional string state = 7; */
|
|
93
|
+
if (message.state !== undefined)
|
|
94
|
+
writer.tag(7, WireType.LengthDelimited).string(message.state);
|
|
95
|
+
/* optional string pinCode = 8; */
|
|
96
|
+
if (message.pinCode !== undefined)
|
|
97
|
+
writer.tag(8, WireType.LengthDelimited).string(message.pinCode);
|
|
98
|
+
/* int32 countryCode = 9; */
|
|
99
|
+
if (message.countryCode !== 0)
|
|
100
|
+
writer.tag(9, WireType.Varint).int32(message.countryCode);
|
|
101
|
+
let u = options.writeUnknownFields;
|
|
102
|
+
if (u !== false)
|
|
103
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
104
|
+
return writer;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* @generated MessageType for protobuf message com.merabills.storefront.Address
|
|
109
|
+
*/
|
|
110
|
+
export const Address = new Address$Type();
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
2
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
3
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
4
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
5
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
6
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
7
|
+
import { Address } from "./Address";
|
|
8
|
+
/**
|
|
9
|
+
* A list of addresses, one of which is the default.
|
|
10
|
+
* Not included because it is derived: size, and the default Address itself (look up
|
|
11
|
+
* defaultAddressId in addresses; when it is not found, the first address is the default).
|
|
12
|
+
*
|
|
13
|
+
* @generated from protobuf message com.merabills.storefront.AddressList
|
|
14
|
+
*/
|
|
15
|
+
export interface AddressList {
|
|
16
|
+
/**
|
|
17
|
+
* Id of the default address in the list below
|
|
18
|
+
*
|
|
19
|
+
* @generated from protobuf field: int64 defaultAddressId = 1
|
|
20
|
+
*/
|
|
21
|
+
defaultAddressId: bigint;
|
|
22
|
+
/**
|
|
23
|
+
* At most Constants.MAX_ADDRESSES addresses
|
|
24
|
+
*
|
|
25
|
+
* @generated from protobuf field: repeated com.merabills.storefront.Address addresses = 2
|
|
26
|
+
*/
|
|
27
|
+
addresses: Address[];
|
|
28
|
+
}
|
|
29
|
+
declare class AddressList$Type extends MessageType<AddressList> {
|
|
30
|
+
constructor();
|
|
31
|
+
create(value?: PartialMessage<AddressList>): AddressList;
|
|
32
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AddressList): AddressList;
|
|
33
|
+
internalBinaryWrite(message: AddressList, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* @generated MessageType for protobuf message com.merabills.storefront.AddressList
|
|
37
|
+
*/
|
|
38
|
+
export declare const AddressList: AddressList$Type;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
2
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
3
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
4
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
5
|
+
import { Address } from "./Address";
|
|
6
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
7
|
+
class AddressList$Type extends MessageType {
|
|
8
|
+
constructor() {
|
|
9
|
+
super("com.merabills.storefront.AddressList", [
|
|
10
|
+
{ no: 1, name: "defaultAddressId", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
11
|
+
{ no: 2, name: "addresses", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Address }
|
|
12
|
+
]);
|
|
13
|
+
}
|
|
14
|
+
create(value) {
|
|
15
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
16
|
+
message.defaultAddressId = 0n;
|
|
17
|
+
message.addresses = [];
|
|
18
|
+
if (value !== undefined)
|
|
19
|
+
reflectionMergePartial(this, message, value);
|
|
20
|
+
return message;
|
|
21
|
+
}
|
|
22
|
+
internalBinaryRead(reader, length, options, target) {
|
|
23
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
24
|
+
while (reader.pos < end) {
|
|
25
|
+
let [fieldNo, wireType] = reader.tag();
|
|
26
|
+
switch (fieldNo) {
|
|
27
|
+
case /* int64 defaultAddressId */ 1:
|
|
28
|
+
message.defaultAddressId = reader.int64().toBigInt();
|
|
29
|
+
break;
|
|
30
|
+
case /* repeated com.merabills.storefront.Address addresses */ 2:
|
|
31
|
+
message.addresses.push(Address.internalBinaryRead(reader, reader.uint32(), options));
|
|
32
|
+
break;
|
|
33
|
+
default:
|
|
34
|
+
let u = options.readUnknownField;
|
|
35
|
+
if (u === "throw")
|
|
36
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
37
|
+
let d = reader.skip(wireType);
|
|
38
|
+
if (u !== false)
|
|
39
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return message;
|
|
43
|
+
}
|
|
44
|
+
internalBinaryWrite(message, writer, options) {
|
|
45
|
+
/* int64 defaultAddressId = 1; */
|
|
46
|
+
if (message.defaultAddressId !== 0n)
|
|
47
|
+
writer.tag(1, WireType.Varint).int64(message.defaultAddressId);
|
|
48
|
+
/* repeated com.merabills.storefront.Address addresses = 2; */
|
|
49
|
+
for (let i = 0; i < message.addresses.length; i++)
|
|
50
|
+
Address.internalBinaryWrite(message.addresses[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
51
|
+
let u = options.writeUnknownFields;
|
|
52
|
+
if (u !== false)
|
|
53
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
54
|
+
return writer;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @generated MessageType for protobuf message com.merabills.storefront.AddressList
|
|
59
|
+
*/
|
|
60
|
+
export const AddressList = new AddressList$Type();
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type of an address. Values match the ADDRESS_TYPE_* constants of Address.
|
|
3
|
+
*
|
|
4
|
+
* @generated from protobuf enum com.merabills.storefront.AddressType
|
|
5
|
+
*/
|
|
6
|
+
export declare enum AddressType {
|
|
7
|
+
/**
|
|
8
|
+
* @generated from protobuf enum value: HOME = 0;
|
|
9
|
+
*/
|
|
10
|
+
HOME = 0,
|
|
11
|
+
/**
|
|
12
|
+
* @generated from protobuf enum value: BUSINESS = 1;
|
|
13
|
+
*/
|
|
14
|
+
BUSINESS = 1
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
// @generated by protobuf-ts 2.11.1 with parameter long_type_bigint
|
|
3
|
+
// @generated from protobuf file "AddressType.proto" (package "com.merabills.storefront", syntax proto3)
|
|
4
|
+
// tslint:disable
|
|
5
|
+
/**
|
|
6
|
+
* Type of an address. Values match the ADDRESS_TYPE_* constants of Address.
|
|
7
|
+
*
|
|
8
|
+
* @generated from protobuf enum com.merabills.storefront.AddressType
|
|
9
|
+
*/
|
|
10
|
+
export var AddressType;
|
|
11
|
+
(function (AddressType) {
|
|
12
|
+
/**
|
|
13
|
+
* @generated from protobuf enum value: HOME = 0;
|
|
14
|
+
*/
|
|
15
|
+
AddressType[AddressType["HOME"] = 0] = "HOME";
|
|
16
|
+
/**
|
|
17
|
+
* @generated from protobuf enum value: BUSINESS = 1;
|
|
18
|
+
*/
|
|
19
|
+
AddressType[AddressType["BUSINESS"] = 1] = "BUSINESS";
|
|
20
|
+
})(AddressType || (AddressType = {}));
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
2
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
3
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
4
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
5
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
6
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
7
|
+
import { AttachmentType } from "./AttachmentType";
|
|
8
|
+
import { Entity } from "./Entity";
|
|
9
|
+
/**
|
|
10
|
+
* A file (a photo of a business, product or package, for example) attached to an entity.
|
|
11
|
+
* Excluded: isPublic, isReadyForSync, isProcessingComplete.
|
|
12
|
+
* Not included because it is derived: storageFileName, built as "%04d-%02d-%02d-%016X-%s.%s" from
|
|
13
|
+
* this entity's createdAt (UTC, zero based month - September is 08), id (16 upper case hex digits),
|
|
14
|
+
* fileHash (32 upper case hex digits) and fileExtension. Case sensitive; see UrlAndToken for the url.
|
|
15
|
+
*
|
|
16
|
+
* @generated from protobuf message com.merabills.storefront.Attachment
|
|
17
|
+
*/
|
|
18
|
+
export interface Attachment {
|
|
19
|
+
/**
|
|
20
|
+
* @generated from protobuf field: com.merabills.storefront.Entity entity = 1
|
|
21
|
+
*/
|
|
22
|
+
entity?: Entity;
|
|
23
|
+
/**
|
|
24
|
+
* The type id, exposed instead of the raw value packed into this attachment's category.
|
|
25
|
+
*
|
|
26
|
+
* @generated from protobuf field: com.merabills.storefront.AttachmentType attachmentType = 2
|
|
27
|
+
*/
|
|
28
|
+
attachmentType: AttachmentType;
|
|
29
|
+
/**
|
|
30
|
+
* Id of the entity this file is attached to - a business, product or package. The most
|
|
31
|
+
* significant byte of this id is the owner's entity type (see Constants).
|
|
32
|
+
*
|
|
33
|
+
* @generated from protobuf field: int64 owningEntityId = 3
|
|
34
|
+
*/
|
|
35
|
+
owningEntityId: bigint;
|
|
36
|
+
/**
|
|
37
|
+
* MD5 hash of the attached file, exactly Constants.ATTACHMENT_FILE_HASH_SIZE_BYTES bytes long.
|
|
38
|
+
* Null / empty when the attachment is deleted.
|
|
39
|
+
*
|
|
40
|
+
* @generated from protobuf field: optional bytes fileHash = 4
|
|
41
|
+
*/
|
|
42
|
+
fileHash?: Uint8Array;
|
|
43
|
+
/**
|
|
44
|
+
* File name extension, without the dot (at most Constants.ATTACHMENT_FILE_EXTENSION_MAX_LENGTH)
|
|
45
|
+
*
|
|
46
|
+
* @generated from protobuf field: optional string fileExtension = 5
|
|
47
|
+
*/
|
|
48
|
+
fileExtension?: string;
|
|
49
|
+
/**
|
|
50
|
+
* File name, without the extension (at most Constants.ATTACHMENT_FILE_NAME_MAX_LENGTH)
|
|
51
|
+
*
|
|
52
|
+
* @generated from protobuf field: optional string fileName = 6
|
|
53
|
+
*/
|
|
54
|
+
fileName?: string;
|
|
55
|
+
}
|
|
56
|
+
declare class Attachment$Type extends MessageType<Attachment> {
|
|
57
|
+
constructor();
|
|
58
|
+
create(value?: PartialMessage<Attachment>): Attachment;
|
|
59
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Attachment): Attachment;
|
|
60
|
+
internalBinaryWrite(message: Attachment, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* @generated MessageType for protobuf message com.merabills.storefront.Attachment
|
|
64
|
+
*/
|
|
65
|
+
export declare const Attachment: Attachment$Type;
|
|
66
|
+
export {};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
2
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
3
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
4
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
5
|
+
import { AttachmentType } from "./AttachmentType";
|
|
6
|
+
import { Entity } from "./Entity";
|
|
7
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
8
|
+
class Attachment$Type extends MessageType {
|
|
9
|
+
constructor() {
|
|
10
|
+
super("com.merabills.storefront.Attachment", [
|
|
11
|
+
{ no: 1, name: "entity", kind: "message", T: () => Entity },
|
|
12
|
+
{ no: 2, name: "attachmentType", kind: "enum", T: () => ["com.merabills.storefront.AttachmentType", AttachmentType] },
|
|
13
|
+
{ no: 3, name: "owningEntityId", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
14
|
+
{ no: 4, name: "fileHash", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ },
|
|
15
|
+
{ no: 5, name: "fileExtension", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
16
|
+
{ no: 6, name: "fileName", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
|
|
17
|
+
]);
|
|
18
|
+
}
|
|
19
|
+
create(value) {
|
|
20
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
21
|
+
message.attachmentType = 0;
|
|
22
|
+
message.owningEntityId = 0n;
|
|
23
|
+
if (value !== undefined)
|
|
24
|
+
reflectionMergePartial(this, message, value);
|
|
25
|
+
return message;
|
|
26
|
+
}
|
|
27
|
+
internalBinaryRead(reader, length, options, target) {
|
|
28
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
29
|
+
while (reader.pos < end) {
|
|
30
|
+
let [fieldNo, wireType] = reader.tag();
|
|
31
|
+
switch (fieldNo) {
|
|
32
|
+
case /* com.merabills.storefront.Entity entity */ 1:
|
|
33
|
+
message.entity = Entity.internalBinaryRead(reader, reader.uint32(), options, message.entity);
|
|
34
|
+
break;
|
|
35
|
+
case /* com.merabills.storefront.AttachmentType attachmentType */ 2:
|
|
36
|
+
message.attachmentType = reader.int32();
|
|
37
|
+
break;
|
|
38
|
+
case /* int64 owningEntityId */ 3:
|
|
39
|
+
message.owningEntityId = reader.int64().toBigInt();
|
|
40
|
+
break;
|
|
41
|
+
case /* optional bytes fileHash */ 4:
|
|
42
|
+
message.fileHash = reader.bytes();
|
|
43
|
+
break;
|
|
44
|
+
case /* optional string fileExtension */ 5:
|
|
45
|
+
message.fileExtension = reader.string();
|
|
46
|
+
break;
|
|
47
|
+
case /* optional string fileName */ 6:
|
|
48
|
+
message.fileName = reader.string();
|
|
49
|
+
break;
|
|
50
|
+
default:
|
|
51
|
+
let u = options.readUnknownField;
|
|
52
|
+
if (u === "throw")
|
|
53
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
54
|
+
let d = reader.skip(wireType);
|
|
55
|
+
if (u !== false)
|
|
56
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return message;
|
|
60
|
+
}
|
|
61
|
+
internalBinaryWrite(message, writer, options) {
|
|
62
|
+
/* com.merabills.storefront.Entity entity = 1; */
|
|
63
|
+
if (message.entity)
|
|
64
|
+
Entity.internalBinaryWrite(message.entity, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
65
|
+
/* com.merabills.storefront.AttachmentType attachmentType = 2; */
|
|
66
|
+
if (message.attachmentType !== 0)
|
|
67
|
+
writer.tag(2, WireType.Varint).int32(message.attachmentType);
|
|
68
|
+
/* int64 owningEntityId = 3; */
|
|
69
|
+
if (message.owningEntityId !== 0n)
|
|
70
|
+
writer.tag(3, WireType.Varint).int64(message.owningEntityId);
|
|
71
|
+
/* optional bytes fileHash = 4; */
|
|
72
|
+
if (message.fileHash !== undefined)
|
|
73
|
+
writer.tag(4, WireType.LengthDelimited).bytes(message.fileHash);
|
|
74
|
+
/* optional string fileExtension = 5; */
|
|
75
|
+
if (message.fileExtension !== undefined)
|
|
76
|
+
writer.tag(5, WireType.LengthDelimited).string(message.fileExtension);
|
|
77
|
+
/* optional string fileName = 6; */
|
|
78
|
+
if (message.fileName !== undefined)
|
|
79
|
+
writer.tag(6, WireType.LengthDelimited).string(message.fileName);
|
|
80
|
+
let u = options.writeUnknownFields;
|
|
81
|
+
if (u !== false)
|
|
82
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
83
|
+
return writer;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* @generated MessageType for protobuf message com.merabills.storefront.Attachment
|
|
88
|
+
*/
|
|
89
|
+
export const Attachment = new Attachment$Type();
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The type of an attachment, and - for catalog and store images - the slot the image occupies.
|
|
3
|
+
* Values match the ids of the corresponding Java enum entries and must never be changed.
|
|
4
|
+
*
|
|
5
|
+
* @generated from protobuf enum com.merabills.storefront.AttachmentType
|
|
6
|
+
*/
|
|
7
|
+
export declare enum AttachmentType {
|
|
8
|
+
/**
|
|
9
|
+
* General purpose attachments of any entity
|
|
10
|
+
*
|
|
11
|
+
* @generated from protobuf enum value: GENERAL_0 = 0;
|
|
12
|
+
*/
|
|
13
|
+
GENERAL_0 = 0,
|
|
14
|
+
/**
|
|
15
|
+
* @generated from protobuf enum value: GENERAL_1 = 1;
|
|
16
|
+
*/
|
|
17
|
+
GENERAL_1 = 1,
|
|
18
|
+
/**
|
|
19
|
+
* @generated from protobuf enum value: GENERAL_2 = 2;
|
|
20
|
+
*/
|
|
21
|
+
GENERAL_2 = 2,
|
|
22
|
+
/**
|
|
23
|
+
* @generated from protobuf enum value: GENERAL_3 = 3;
|
|
24
|
+
*/
|
|
25
|
+
GENERAL_3 = 3,
|
|
26
|
+
/**
|
|
27
|
+
* The main catalog image of a product or a package
|
|
28
|
+
*
|
|
29
|
+
* @generated from protobuf enum value: CATALOG_MAIN_0 = 8;
|
|
30
|
+
*/
|
|
31
|
+
CATALOG_MAIN_0 = 8,
|
|
32
|
+
/**
|
|
33
|
+
* Catalog images showing the product in use
|
|
34
|
+
*
|
|
35
|
+
* @generated from protobuf enum value: CATALOG_LIFESTYLE_0 = 16;
|
|
36
|
+
*/
|
|
37
|
+
CATALOG_LIFESTYLE_0 = 16,
|
|
38
|
+
/**
|
|
39
|
+
* @generated from protobuf enum value: CATALOG_LIFESTYLE_1 = 17;
|
|
40
|
+
*/
|
|
41
|
+
CATALOG_LIFESTYLE_1 = 17,
|
|
42
|
+
/**
|
|
43
|
+
* @generated from protobuf enum value: CATALOG_LIFESTYLE_2 = 18;
|
|
44
|
+
*/
|
|
45
|
+
CATALOG_LIFESTYLE_2 = 18,
|
|
46
|
+
/**
|
|
47
|
+
* @generated from protobuf enum value: CATALOG_LIFESTYLE_3 = 19;
|
|
48
|
+
*/
|
|
49
|
+
CATALOG_LIFESTYLE_3 = 19,
|
|
50
|
+
/**
|
|
51
|
+
* @generated from protobuf enum value: CATALOG_LIFESTYLE_4 = 20;
|
|
52
|
+
*/
|
|
53
|
+
CATALOG_LIFESTYLE_4 = 20,
|
|
54
|
+
/**
|
|
55
|
+
* @generated from protobuf enum value: CATALOG_LIFESTYLE_5 = 21;
|
|
56
|
+
*/
|
|
57
|
+
CATALOG_LIFESTYLE_5 = 21,
|
|
58
|
+
/**
|
|
59
|
+
* @generated from protobuf enum value: CATALOG_LIFESTYLE_6 = 22;
|
|
60
|
+
*/
|
|
61
|
+
CATALOG_LIFESTYLE_6 = 22,
|
|
62
|
+
/**
|
|
63
|
+
* @generated from protobuf enum value: CATALOG_LIFESTYLE_7 = 23;
|
|
64
|
+
*/
|
|
65
|
+
CATALOG_LIFESTYLE_7 = 23,
|
|
66
|
+
/**
|
|
67
|
+
* Catalog images of the product from different angles
|
|
68
|
+
*
|
|
69
|
+
* @generated from protobuf enum value: CATALOG_ANGLE_0 = 40;
|
|
70
|
+
*/
|
|
71
|
+
CATALOG_ANGLE_0 = 40,
|
|
72
|
+
/**
|
|
73
|
+
* @generated from protobuf enum value: CATALOG_ANGLE_1 = 41;
|
|
74
|
+
*/
|
|
75
|
+
CATALOG_ANGLE_1 = 41,
|
|
76
|
+
/**
|
|
77
|
+
* @generated from protobuf enum value: CATALOG_ANGLE_2 = 42;
|
|
78
|
+
*/
|
|
79
|
+
CATALOG_ANGLE_2 = 42,
|
|
80
|
+
/**
|
|
81
|
+
* @generated from protobuf enum value: CATALOG_ANGLE_3 = 43;
|
|
82
|
+
*/
|
|
83
|
+
CATALOG_ANGLE_3 = 43,
|
|
84
|
+
/**
|
|
85
|
+
* @generated from protobuf enum value: CATALOG_ANGLE_4 = 44;
|
|
86
|
+
*/
|
|
87
|
+
CATALOG_ANGLE_4 = 44,
|
|
88
|
+
/**
|
|
89
|
+
* @generated from protobuf enum value: CATALOG_ANGLE_5 = 45;
|
|
90
|
+
*/
|
|
91
|
+
CATALOG_ANGLE_5 = 45,
|
|
92
|
+
/**
|
|
93
|
+
* @generated from protobuf enum value: CATALOG_ANGLE_6 = 46;
|
|
94
|
+
*/
|
|
95
|
+
CATALOG_ANGLE_6 = 46,
|
|
96
|
+
/**
|
|
97
|
+
* @generated from protobuf enum value: CATALOG_ANGLE_7 = 47;
|
|
98
|
+
*/
|
|
99
|
+
CATALOG_ANGLE_7 = 47,
|
|
100
|
+
/**
|
|
101
|
+
* Other catalog images
|
|
102
|
+
*
|
|
103
|
+
* @generated from protobuf enum value: CATALOG_OTHER_0 = 56;
|
|
104
|
+
*/
|
|
105
|
+
CATALOG_OTHER_0 = 56,
|
|
106
|
+
/**
|
|
107
|
+
* @generated from protobuf enum value: CATALOG_OTHER_1 = 57;
|
|
108
|
+
*/
|
|
109
|
+
CATALOG_OTHER_1 = 57,
|
|
110
|
+
/**
|
|
111
|
+
* @generated from protobuf enum value: CATALOG_OTHER_2 = 58;
|
|
112
|
+
*/
|
|
113
|
+
CATALOG_OTHER_2 = 58,
|
|
114
|
+
/**
|
|
115
|
+
* @generated from protobuf enum value: CATALOG_OTHER_3 = 59;
|
|
116
|
+
*/
|
|
117
|
+
CATALOG_OTHER_3 = 59,
|
|
118
|
+
/**
|
|
119
|
+
* Photos of the store / business
|
|
120
|
+
*
|
|
121
|
+
* @generated from protobuf enum value: STORE_0 = 64;
|
|
122
|
+
*/
|
|
123
|
+
STORE_0 = 64,
|
|
124
|
+
/**
|
|
125
|
+
* @generated from protobuf enum value: STORE_1 = 65;
|
|
126
|
+
*/
|
|
127
|
+
STORE_1 = 65,
|
|
128
|
+
/**
|
|
129
|
+
* @generated from protobuf enum value: STORE_2 = 66;
|
|
130
|
+
*/
|
|
131
|
+
STORE_2 = 66,
|
|
132
|
+
/**
|
|
133
|
+
* @generated from protobuf enum value: STORE_3 = 67;
|
|
134
|
+
*/
|
|
135
|
+
STORE_3 = 67,
|
|
136
|
+
/**
|
|
137
|
+
* Attachments of a transaction
|
|
138
|
+
*
|
|
139
|
+
* @generated from protobuf enum value: TRANSACTION_0 = 80;
|
|
140
|
+
*/
|
|
141
|
+
TRANSACTION_0 = 80,
|
|
142
|
+
/**
|
|
143
|
+
* @generated from protobuf enum value: TRANSACTION_1 = 81;
|
|
144
|
+
*/
|
|
145
|
+
TRANSACTION_1 = 81,
|
|
146
|
+
/**
|
|
147
|
+
* @generated from protobuf enum value: TRANSACTION_2 = 82;
|
|
148
|
+
*/
|
|
149
|
+
TRANSACTION_2 = 82,
|
|
150
|
+
/**
|
|
151
|
+
* @generated from protobuf enum value: TRANSACTION_3 = 83;
|
|
152
|
+
*/
|
|
153
|
+
TRANSACTION_3 = 83
|
|
154
|
+
}
|