@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,106 @@
|
|
|
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 { Price } from "./Price";
|
|
8
|
+
import { PriceList } from "./PriceList";
|
|
9
|
+
import { Package } from "./Package";
|
|
10
|
+
import { Product } from "./Product";
|
|
11
|
+
import { ProductCategory } from "./ProductCategory";
|
|
12
|
+
import { Message } from "./Message";
|
|
13
|
+
import { Configuration } from "./Configuration";
|
|
14
|
+
import { UrlAndToken } from "./UrlAndToken";
|
|
15
|
+
import { Attachment } from "./Attachment";
|
|
16
|
+
import { Business } from "./Business";
|
|
17
|
+
import { AuthTokens } from "./AuthTokens";
|
|
18
|
+
/**
|
|
19
|
+
* The answer to a BusinessSyncOutRequest: the entities of one business that changed since the
|
|
20
|
+
* request's update numbers, one field per entity type, flat - a client rebuilds the hierarchy from
|
|
21
|
+
* Item.parentItemId, Attachment.owningEntityId and Price.packageId, processing the arrays below in
|
|
22
|
+
* order (parent before child). An absent/empty field means that type has not changed; a tombstone
|
|
23
|
+
* (updateNumber's update-type bits = Constants.UPDATE_TYPE_DELETED) means the entity, and what it
|
|
24
|
+
* owned, was deleted. At most Constants.SYNC_OUT_LIMIT entities arrive together - that many means
|
|
25
|
+
* call again with the raised cursors.
|
|
26
|
+
*
|
|
27
|
+
* @generated from protobuf message com.merabills.storefront.BusinessSyncOutResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface BusinessSyncOutResponse {
|
|
30
|
+
/**
|
|
31
|
+
* The tokens to send with the next request, when the server has renewed one of them. Absent means
|
|
32
|
+
* what the client already holds still works - never a signal to drop the tokens it has.
|
|
33
|
+
*
|
|
34
|
+
* @generated from protobuf field: optional com.merabills.storefront.AuthTokens authTokens = 1
|
|
35
|
+
*/
|
|
36
|
+
authTokens?: AuthTokens;
|
|
37
|
+
/**
|
|
38
|
+
* The business named by the request. Absent unless it has changed. Also carried by a
|
|
39
|
+
* ProfileSyncOutResponse, with its own separate cursor - keep the two update numbers apart.
|
|
40
|
+
*
|
|
41
|
+
* @generated from protobuf field: com.merabills.storefront.Business business = 2
|
|
42
|
+
*/
|
|
43
|
+
business?: Business;
|
|
44
|
+
/**
|
|
45
|
+
* Photos of the business, its products and its packages.
|
|
46
|
+
*
|
|
47
|
+
* @generated from protobuf field: repeated com.merabills.storefront.Attachment attachments = 3
|
|
48
|
+
*/
|
|
49
|
+
attachments: Attachment[];
|
|
50
|
+
/**
|
|
51
|
+
* Where the files of every attachment of the business are, and the token that authorizes reading
|
|
52
|
+
* them - one value for the whole business, not per photo. Absent means what the client already
|
|
53
|
+
* holds still works; a client holding none sends 0 and always gets one back. Never a tombstone and
|
|
54
|
+
* never counted against Constants.SYNC_OUT_LIMIT.
|
|
55
|
+
*
|
|
56
|
+
* @generated from protobuf field: com.merabills.storefront.UrlAndToken attachmentBaseUrl = 4
|
|
57
|
+
*/
|
|
58
|
+
attachmentBaseUrl?: UrlAndToken;
|
|
59
|
+
/**
|
|
60
|
+
* The settings of the business. An array because a business can have more than one public
|
|
61
|
+
* configuration, even though only the general settings are typed today.
|
|
62
|
+
*
|
|
63
|
+
* @generated from protobuf field: repeated com.merabills.storefront.Configuration configurations = 5
|
|
64
|
+
*/
|
|
65
|
+
configurations: Configuration[];
|
|
66
|
+
/**
|
|
67
|
+
* The orders of the customer, and their shopping cart
|
|
68
|
+
*
|
|
69
|
+
* @generated from protobuf field: repeated com.merabills.storefront.Message messages = 6
|
|
70
|
+
*/
|
|
71
|
+
messages: Message[];
|
|
72
|
+
/**
|
|
73
|
+
* Item entities, in the order a client needs them: a category before its products, a product
|
|
74
|
+
* before its packages, and both a package and a price list before the prices that name them
|
|
75
|
+
*
|
|
76
|
+
* @generated from protobuf field: repeated com.merabills.storefront.ProductCategory productCategories = 7
|
|
77
|
+
*/
|
|
78
|
+
productCategories: ProductCategory[];
|
|
79
|
+
/**
|
|
80
|
+
* @generated from protobuf field: repeated com.merabills.storefront.Product products = 8
|
|
81
|
+
*/
|
|
82
|
+
products: Product[];
|
|
83
|
+
/**
|
|
84
|
+
* @generated from protobuf field: repeated com.merabills.storefront.Package packages = 9
|
|
85
|
+
*/
|
|
86
|
+
packages: Package[];
|
|
87
|
+
/**
|
|
88
|
+
* @generated from protobuf field: repeated com.merabills.storefront.PriceList priceLists = 10
|
|
89
|
+
*/
|
|
90
|
+
priceLists: PriceList[];
|
|
91
|
+
/**
|
|
92
|
+
* @generated from protobuf field: repeated com.merabills.storefront.Price prices = 11
|
|
93
|
+
*/
|
|
94
|
+
prices: Price[];
|
|
95
|
+
}
|
|
96
|
+
declare class BusinessSyncOutResponse$Type extends MessageType<BusinessSyncOutResponse> {
|
|
97
|
+
constructor();
|
|
98
|
+
create(value?: PartialMessage<BusinessSyncOutResponse>): BusinessSyncOutResponse;
|
|
99
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BusinessSyncOutResponse): BusinessSyncOutResponse;
|
|
100
|
+
internalBinaryWrite(message: BusinessSyncOutResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* @generated MessageType for protobuf message com.merabills.storefront.BusinessSyncOutResponse
|
|
104
|
+
*/
|
|
105
|
+
export declare const BusinessSyncOutResponse: BusinessSyncOutResponse$Type;
|
|
106
|
+
export {};
|
|
@@ -0,0 +1,139 @@
|
|
|
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 { Price } from "./Price";
|
|
6
|
+
import { PriceList } from "./PriceList";
|
|
7
|
+
import { Package } from "./Package";
|
|
8
|
+
import { Product } from "./Product";
|
|
9
|
+
import { ProductCategory } from "./ProductCategory";
|
|
10
|
+
import { Message } from "./Message";
|
|
11
|
+
import { Configuration } from "./Configuration";
|
|
12
|
+
import { UrlAndToken } from "./UrlAndToken";
|
|
13
|
+
import { Attachment } from "./Attachment";
|
|
14
|
+
import { Business } from "./Business";
|
|
15
|
+
import { AuthTokens } from "./AuthTokens";
|
|
16
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
17
|
+
class BusinessSyncOutResponse$Type extends MessageType {
|
|
18
|
+
constructor() {
|
|
19
|
+
super("com.merabills.storefront.BusinessSyncOutResponse", [
|
|
20
|
+
{ no: 1, name: "authTokens", kind: "message", T: () => AuthTokens },
|
|
21
|
+
{ no: 2, name: "business", kind: "message", T: () => Business },
|
|
22
|
+
{ no: 3, name: "attachments", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Attachment },
|
|
23
|
+
{ no: 4, name: "attachmentBaseUrl", kind: "message", T: () => UrlAndToken },
|
|
24
|
+
{ no: 5, name: "configurations", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Configuration },
|
|
25
|
+
{ no: 6, name: "messages", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Message },
|
|
26
|
+
{ no: 7, name: "productCategories", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ProductCategory },
|
|
27
|
+
{ no: 8, name: "products", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Product },
|
|
28
|
+
{ no: 9, name: "packages", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Package },
|
|
29
|
+
{ no: 10, name: "priceLists", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PriceList },
|
|
30
|
+
{ no: 11, name: "prices", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Price }
|
|
31
|
+
]);
|
|
32
|
+
}
|
|
33
|
+
create(value) {
|
|
34
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
35
|
+
message.attachments = [];
|
|
36
|
+
message.configurations = [];
|
|
37
|
+
message.messages = [];
|
|
38
|
+
message.productCategories = [];
|
|
39
|
+
message.products = [];
|
|
40
|
+
message.packages = [];
|
|
41
|
+
message.priceLists = [];
|
|
42
|
+
message.prices = [];
|
|
43
|
+
if (value !== undefined)
|
|
44
|
+
reflectionMergePartial(this, message, value);
|
|
45
|
+
return message;
|
|
46
|
+
}
|
|
47
|
+
internalBinaryRead(reader, length, options, target) {
|
|
48
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
49
|
+
while (reader.pos < end) {
|
|
50
|
+
let [fieldNo, wireType] = reader.tag();
|
|
51
|
+
switch (fieldNo) {
|
|
52
|
+
case /* optional com.merabills.storefront.AuthTokens authTokens */ 1:
|
|
53
|
+
message.authTokens = AuthTokens.internalBinaryRead(reader, reader.uint32(), options, message.authTokens);
|
|
54
|
+
break;
|
|
55
|
+
case /* com.merabills.storefront.Business business */ 2:
|
|
56
|
+
message.business = Business.internalBinaryRead(reader, reader.uint32(), options, message.business);
|
|
57
|
+
break;
|
|
58
|
+
case /* repeated com.merabills.storefront.Attachment attachments */ 3:
|
|
59
|
+
message.attachments.push(Attachment.internalBinaryRead(reader, reader.uint32(), options));
|
|
60
|
+
break;
|
|
61
|
+
case /* com.merabills.storefront.UrlAndToken attachmentBaseUrl */ 4:
|
|
62
|
+
message.attachmentBaseUrl = UrlAndToken.internalBinaryRead(reader, reader.uint32(), options, message.attachmentBaseUrl);
|
|
63
|
+
break;
|
|
64
|
+
case /* repeated com.merabills.storefront.Configuration configurations */ 5:
|
|
65
|
+
message.configurations.push(Configuration.internalBinaryRead(reader, reader.uint32(), options));
|
|
66
|
+
break;
|
|
67
|
+
case /* repeated com.merabills.storefront.Message messages */ 6:
|
|
68
|
+
message.messages.push(Message.internalBinaryRead(reader, reader.uint32(), options));
|
|
69
|
+
break;
|
|
70
|
+
case /* repeated com.merabills.storefront.ProductCategory productCategories */ 7:
|
|
71
|
+
message.productCategories.push(ProductCategory.internalBinaryRead(reader, reader.uint32(), options));
|
|
72
|
+
break;
|
|
73
|
+
case /* repeated com.merabills.storefront.Product products */ 8:
|
|
74
|
+
message.products.push(Product.internalBinaryRead(reader, reader.uint32(), options));
|
|
75
|
+
break;
|
|
76
|
+
case /* repeated com.merabills.storefront.Package packages */ 9:
|
|
77
|
+
message.packages.push(Package.internalBinaryRead(reader, reader.uint32(), options));
|
|
78
|
+
break;
|
|
79
|
+
case /* repeated com.merabills.storefront.PriceList priceLists */ 10:
|
|
80
|
+
message.priceLists.push(PriceList.internalBinaryRead(reader, reader.uint32(), options));
|
|
81
|
+
break;
|
|
82
|
+
case /* repeated com.merabills.storefront.Price prices */ 11:
|
|
83
|
+
message.prices.push(Price.internalBinaryRead(reader, reader.uint32(), options));
|
|
84
|
+
break;
|
|
85
|
+
default:
|
|
86
|
+
let u = options.readUnknownField;
|
|
87
|
+
if (u === "throw")
|
|
88
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
89
|
+
let d = reader.skip(wireType);
|
|
90
|
+
if (u !== false)
|
|
91
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return message;
|
|
95
|
+
}
|
|
96
|
+
internalBinaryWrite(message, writer, options) {
|
|
97
|
+
/* optional com.merabills.storefront.AuthTokens authTokens = 1; */
|
|
98
|
+
if (message.authTokens)
|
|
99
|
+
AuthTokens.internalBinaryWrite(message.authTokens, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
100
|
+
/* com.merabills.storefront.Business business = 2; */
|
|
101
|
+
if (message.business)
|
|
102
|
+
Business.internalBinaryWrite(message.business, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
103
|
+
/* repeated com.merabills.storefront.Attachment attachments = 3; */
|
|
104
|
+
for (let i = 0; i < message.attachments.length; i++)
|
|
105
|
+
Attachment.internalBinaryWrite(message.attachments[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
106
|
+
/* com.merabills.storefront.UrlAndToken attachmentBaseUrl = 4; */
|
|
107
|
+
if (message.attachmentBaseUrl)
|
|
108
|
+
UrlAndToken.internalBinaryWrite(message.attachmentBaseUrl, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
109
|
+
/* repeated com.merabills.storefront.Configuration configurations = 5; */
|
|
110
|
+
for (let i = 0; i < message.configurations.length; i++)
|
|
111
|
+
Configuration.internalBinaryWrite(message.configurations[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
112
|
+
/* repeated com.merabills.storefront.Message messages = 6; */
|
|
113
|
+
for (let i = 0; i < message.messages.length; i++)
|
|
114
|
+
Message.internalBinaryWrite(message.messages[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
115
|
+
/* repeated com.merabills.storefront.ProductCategory productCategories = 7; */
|
|
116
|
+
for (let i = 0; i < message.productCategories.length; i++)
|
|
117
|
+
ProductCategory.internalBinaryWrite(message.productCategories[i], writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
118
|
+
/* repeated com.merabills.storefront.Product products = 8; */
|
|
119
|
+
for (let i = 0; i < message.products.length; i++)
|
|
120
|
+
Product.internalBinaryWrite(message.products[i], writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
|
121
|
+
/* repeated com.merabills.storefront.Package packages = 9; */
|
|
122
|
+
for (let i = 0; i < message.packages.length; i++)
|
|
123
|
+
Package.internalBinaryWrite(message.packages[i], writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
124
|
+
/* repeated com.merabills.storefront.PriceList priceLists = 10; */
|
|
125
|
+
for (let i = 0; i < message.priceLists.length; i++)
|
|
126
|
+
PriceList.internalBinaryWrite(message.priceLists[i], writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
127
|
+
/* repeated com.merabills.storefront.Price prices = 11; */
|
|
128
|
+
for (let i = 0; i < message.prices.length; i++)
|
|
129
|
+
Price.internalBinaryWrite(message.prices[i], writer.tag(11, WireType.LengthDelimited).fork(), options).join();
|
|
130
|
+
let u = options.writeUnknownFields;
|
|
131
|
+
if (u !== false)
|
|
132
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
133
|
+
return writer;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* @generated MessageType for protobuf message com.merabills.storefront.BusinessSyncOutResponse
|
|
138
|
+
*/
|
|
139
|
+
export const BusinessSyncOutResponse = new BusinessSyncOutResponse$Type();
|
|
@@ -0,0 +1,48 @@
|
|
|
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 { GeneralSettings } from "./GeneralSettings";
|
|
8
|
+
import { Entity } from "./Entity";
|
|
9
|
+
/**
|
|
10
|
+
* A setting of a business, identified by Entity.id, with its value typed here rather than left as
|
|
11
|
+
* the serialized string Java stores. Only public configurations (id at or above
|
|
12
|
+
* Configuration.MIN_PUBLIC_CONFIGURATION_ID) are ever sent; a client switches on which member of
|
|
13
|
+
* data is set rather than checking the id.
|
|
14
|
+
*
|
|
15
|
+
* @generated from protobuf message com.merabills.storefront.Configuration
|
|
16
|
+
*/
|
|
17
|
+
export interface Configuration {
|
|
18
|
+
/**
|
|
19
|
+
* @generated from protobuf field: com.merabills.storefront.Entity entity = 1
|
|
20
|
+
*/
|
|
21
|
+
entity?: Entity;
|
|
22
|
+
/**
|
|
23
|
+
* @generated from protobuf oneof: data
|
|
24
|
+
*/
|
|
25
|
+
data: {
|
|
26
|
+
oneofKind: "generalSettings";
|
|
27
|
+
/**
|
|
28
|
+
* The publicly visible settings of the business, held in the configuration whose id is
|
|
29
|
+
* Configuration.MIN_PUBLIC_CONFIGURATION_ID
|
|
30
|
+
*
|
|
31
|
+
* @generated from protobuf field: com.merabills.storefront.GeneralSettings generalSettings = 2
|
|
32
|
+
*/
|
|
33
|
+
generalSettings: GeneralSettings;
|
|
34
|
+
} | {
|
|
35
|
+
oneofKind: undefined;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
declare class Configuration$Type extends MessageType<Configuration> {
|
|
39
|
+
constructor();
|
|
40
|
+
create(value?: PartialMessage<Configuration>): Configuration;
|
|
41
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Configuration): Configuration;
|
|
42
|
+
internalBinaryWrite(message: Configuration, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* @generated MessageType for protobuf message com.merabills.storefront.Configuration
|
|
46
|
+
*/
|
|
47
|
+
export declare const Configuration: Configuration$Type;
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
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 { GeneralSettings } from "./GeneralSettings";
|
|
6
|
+
import { Entity } from "./Entity";
|
|
7
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
8
|
+
class Configuration$Type extends MessageType {
|
|
9
|
+
constructor() {
|
|
10
|
+
super("com.merabills.storefront.Configuration", [
|
|
11
|
+
{ no: 1, name: "entity", kind: "message", T: () => Entity },
|
|
12
|
+
{ no: 2, name: "generalSettings", kind: "message", oneof: "data", T: () => GeneralSettings }
|
|
13
|
+
]);
|
|
14
|
+
}
|
|
15
|
+
create(value) {
|
|
16
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
17
|
+
message.data = { oneofKind: undefined };
|
|
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 /* com.merabills.storefront.Entity entity */ 1:
|
|
28
|
+
message.entity = Entity.internalBinaryRead(reader, reader.uint32(), options, message.entity);
|
|
29
|
+
break;
|
|
30
|
+
case /* com.merabills.storefront.GeneralSettings generalSettings */ 2:
|
|
31
|
+
message.data = {
|
|
32
|
+
oneofKind: "generalSettings",
|
|
33
|
+
generalSettings: GeneralSettings.internalBinaryRead(reader, reader.uint32(), options, message.data.generalSettings)
|
|
34
|
+
};
|
|
35
|
+
break;
|
|
36
|
+
default:
|
|
37
|
+
let u = options.readUnknownField;
|
|
38
|
+
if (u === "throw")
|
|
39
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
40
|
+
let d = reader.skip(wireType);
|
|
41
|
+
if (u !== false)
|
|
42
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return message;
|
|
46
|
+
}
|
|
47
|
+
internalBinaryWrite(message, writer, options) {
|
|
48
|
+
/* com.merabills.storefront.Entity entity = 1; */
|
|
49
|
+
if (message.entity)
|
|
50
|
+
Entity.internalBinaryWrite(message.entity, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
51
|
+
/* com.merabills.storefront.GeneralSettings generalSettings = 2; */
|
|
52
|
+
if (message.data.oneofKind === "generalSettings")
|
|
53
|
+
GeneralSettings.internalBinaryWrite(message.data.generalSettings, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
54
|
+
let u = options.writeUnknownFields;
|
|
55
|
+
if (u !== false)
|
|
56
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
57
|
+
return writer;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @generated MessageType for protobuf message com.merabills.storefront.Configuration
|
|
62
|
+
*/
|
|
63
|
+
export const Configuration = new Configuration$Type();
|