@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.
Files changed (212) hide show
  1. package/LICENCE +661 -0
  2. package/dist/Address.d.ts +33 -0
  3. package/dist/Address.js +97 -0
  4. package/dist/Attachment.d.ts +16 -0
  5. package/dist/Attachment.js +49 -0
  6. package/dist/AttachmentBaseUrl.d.ts +11 -0
  7. package/dist/AttachmentBaseUrl.js +41 -0
  8. package/dist/AuthTokens.d.ts +13 -0
  9. package/dist/AuthTokens.js +30 -0
  10. package/dist/Business.d.ts +44 -0
  11. package/dist/Business.js +87 -0
  12. package/dist/BusinessIdentifier.d.ts +8 -0
  13. package/dist/BusinessIdentifier.js +14 -0
  14. package/dist/BusinessLink.d.ts +21 -0
  15. package/dist/BusinessLink.js +61 -0
  16. package/dist/BusinessProfile.d.ts +11 -0
  17. package/dist/BusinessProfile.js +27 -0
  18. package/dist/CartEditor.d.ts +59 -0
  19. package/dist/CartEditor.js +324 -0
  20. package/dist/Catalog.d.ts +28 -0
  21. package/dist/Catalog.js +115 -0
  22. package/dist/Constants.d.ts +10 -0
  23. package/dist/Constants.js +43 -0
  24. package/dist/ContainerNames.d.ts +2 -0
  25. package/dist/ContainerNames.js +21 -0
  26. package/dist/Database.d.ts +15 -0
  27. package/dist/Database.js +1 -0
  28. package/dist/Entity.d.ts +27 -0
  29. package/dist/Entity.js +69 -0
  30. package/dist/Enums.d.ts +16 -0
  31. package/dist/Enums.js +18 -0
  32. package/dist/Exceptions.d.ts +4 -0
  33. package/dist/Exceptions.js +8 -0
  34. package/dist/GeneralSettings.d.ts +46 -0
  35. package/dist/GeneralSettings.js +99 -0
  36. package/dist/HttpStatusCodes.d.ts +2 -0
  37. package/dist/HttpStatusCodes.js +34 -0
  38. package/dist/Ids.d.ts +17 -0
  39. package/dist/Ids.js +78 -0
  40. package/dist/Item.d.ts +12 -0
  41. package/dist/Item.js +30 -0
  42. package/dist/LatLong.d.ts +7 -0
  43. package/dist/LatLong.js +17 -0
  44. package/dist/LiveData.d.ts +30 -0
  45. package/dist/LiveData.js +76 -0
  46. package/dist/Measures.d.ts +20 -0
  47. package/dist/Measures.js +34 -0
  48. package/dist/Message.d.ts +16 -0
  49. package/dist/Message.js +32 -0
  50. package/dist/MockDatabase.d.ts +19 -0
  51. package/dist/MockDatabase.js +73 -0
  52. package/dist/Model.d.ts +63 -0
  53. package/dist/Model.js +629 -0
  54. package/dist/Order.d.ts +31 -0
  55. package/dist/Order.js +70 -0
  56. package/dist/Package.d.ts +25 -0
  57. package/dist/Package.js +52 -0
  58. package/dist/PackageIdentifier.d.ts +8 -0
  59. package/dist/PackageIdentifier.js +14 -0
  60. package/dist/PaymentMethodDetail.d.ts +8 -0
  61. package/dist/PaymentMethodDetail.js +17 -0
  62. package/dist/Photo.d.ts +11 -0
  63. package/dist/Photo.js +29 -0
  64. package/dist/Price.d.ts +17 -0
  65. package/dist/Price.js +52 -0
  66. package/dist/PriceList.d.ts +3 -0
  67. package/dist/PriceList.js +5 -0
  68. package/dist/Product.d.ts +33 -0
  69. package/dist/Product.js +84 -0
  70. package/dist/ProductCategory.d.ts +10 -0
  71. package/dist/ProductCategory.js +18 -0
  72. package/dist/Profile.d.ts +20 -0
  73. package/dist/Profile.js +55 -0
  74. package/dist/ProtoMap.d.ts +71 -0
  75. package/dist/ProtoMap.js +1126 -0
  76. package/dist/Routes.d.ts +7 -0
  77. package/dist/Routes.js +12 -0
  78. package/dist/Service.d.ts +16 -0
  79. package/dist/Service.js +1 -0
  80. package/dist/ServiceExceptions.d.ts +40 -0
  81. package/dist/ServiceExceptions.js +84 -0
  82. package/dist/ServiceProxy.d.ts +25 -0
  83. package/dist/ServiceProxy.js +117 -0
  84. package/dist/ShoppingList.d.ts +64 -0
  85. package/dist/ShoppingList.js +188 -0
  86. package/dist/SyncCache.d.ts +28 -0
  87. package/dist/SyncCache.js +137 -0
  88. package/dist/SyncKeys.d.ts +5 -0
  89. package/dist/SyncKeys.js +41 -0
  90. package/dist/SyncState.d.ts +8 -0
  91. package/dist/SyncState.js +30 -0
  92. package/dist/Tax.d.ts +10 -0
  93. package/dist/Tax.js +30 -0
  94. package/dist/UserProfile.d.ts +16 -0
  95. package/dist/UserProfile.js +40 -0
  96. package/dist/WorkingDays.d.ts +33 -0
  97. package/dist/WorkingDays.js +121 -0
  98. package/dist/generated/Address.d.ts +77 -0
  99. package/dist/generated/Address.js +110 -0
  100. package/dist/generated/AddressList.d.ts +39 -0
  101. package/dist/generated/AddressList.js +60 -0
  102. package/dist/generated/AddressType.d.ts +15 -0
  103. package/dist/generated/AddressType.js +20 -0
  104. package/dist/generated/Attachment.d.ts +66 -0
  105. package/dist/generated/Attachment.js +89 -0
  106. package/dist/generated/AttachmentType.d.ts +154 -0
  107. package/dist/generated/AttachmentType.js +159 -0
  108. package/dist/generated/AuthTokens.d.ts +56 -0
  109. package/dist/generated/AuthTokens.js +74 -0
  110. package/dist/generated/AuthenticationMethod.d.ts +24 -0
  111. package/dist/generated/AuthenticationMethod.js +29 -0
  112. package/dist/generated/Business.d.ts +54 -0
  113. package/dist/generated/Business.js +75 -0
  114. package/dist/generated/BusinessIdentifier.d.ts +36 -0
  115. package/dist/generated/BusinessIdentifier.js +60 -0
  116. package/dist/generated/BusinessIdentifierType.d.ts +49 -0
  117. package/dist/generated/BusinessIdentifierType.js +54 -0
  118. package/dist/generated/BusinessLink.d.ts +76 -0
  119. package/dist/generated/BusinessLink.js +99 -0
  120. package/dist/generated/BusinessSyncInRequest.d.ts +42 -0
  121. package/dist/generated/BusinessSyncInRequest.js +60 -0
  122. package/dist/generated/BusinessSyncInResponse.d.ts +42 -0
  123. package/dist/generated/BusinessSyncInResponse.js +60 -0
  124. package/dist/generated/BusinessSyncOutRequest.d.ts +82 -0
  125. package/dist/generated/BusinessSyncOutRequest.js +107 -0
  126. package/dist/generated/BusinessSyncOutResponse.d.ts +106 -0
  127. package/dist/generated/BusinessSyncOutResponse.js +139 -0
  128. package/dist/generated/Configuration.d.ts +48 -0
  129. package/dist/generated/Configuration.js +63 -0
  130. package/dist/generated/Constants.d.ts +474 -0
  131. package/dist/generated/Constants.js +479 -0
  132. package/dist/generated/CreateUserRequest.d.ts +37 -0
  133. package/dist/generated/CreateUserRequest.js +59 -0
  134. package/dist/generated/DimensionUnit.d.ts +28 -0
  135. package/dist/generated/DimensionUnit.js +33 -0
  136. package/dist/generated/Dimensions.d.ts +41 -0
  137. package/dist/generated/Dimensions.js +76 -0
  138. package/dist/generated/Entity.d.ts +62 -0
  139. package/dist/generated/Entity.js +83 -0
  140. package/dist/generated/FulfillmentMode.d.ts +32 -0
  141. package/dist/generated/FulfillmentMode.js +37 -0
  142. package/dist/generated/GeneralSettings.d.ts +141 -0
  143. package/dist/generated/GeneralSettings.js +186 -0
  144. package/dist/generated/Item.d.ts +54 -0
  145. package/dist/generated/Item.js +82 -0
  146. package/dist/generated/LatLong.d.ts +36 -0
  147. package/dist/generated/LatLong.js +59 -0
  148. package/dist/generated/Message.d.ts +80 -0
  149. package/dist/generated/Message.js +114 -0
  150. package/dist/generated/MessageType.d.ts +34 -0
  151. package/dist/generated/MessageType.js +39 -0
  152. package/dist/generated/OrderStatus.d.ts +50 -0
  153. package/dist/generated/OrderStatus.js +55 -0
  154. package/dist/generated/Package.d.ts +63 -0
  155. package/dist/generated/Package.js +92 -0
  156. package/dist/generated/PackageIdentifier.d.ts +36 -0
  157. package/dist/generated/PackageIdentifier.js +60 -0
  158. package/dist/generated/PackageIdentifierType.d.ts +49 -0
  159. package/dist/generated/PackageIdentifierType.js +54 -0
  160. package/dist/generated/PartyPreferencesPayload.d.ts +41 -0
  161. package/dist/generated/PartyPreferencesPayload.js +60 -0
  162. package/dist/generated/PaymentMethod.d.ts +20 -0
  163. package/dist/generated/PaymentMethod.js +25 -0
  164. package/dist/generated/PaymentMethodDetail.d.ts +37 -0
  165. package/dist/generated/PaymentMethodDetail.js +59 -0
  166. package/dist/generated/Price.d.ts +52 -0
  167. package/dist/generated/Price.js +75 -0
  168. package/dist/generated/PriceList.d.ts +34 -0
  169. package/dist/generated/PriceList.js +51 -0
  170. package/dist/generated/Product.d.ts +77 -0
  171. package/dist/generated/Product.js +106 -0
  172. package/dist/generated/ProductCategory.d.ts +32 -0
  173. package/dist/generated/ProductCategory.js +51 -0
  174. package/dist/generated/ProductType.d.ts +42 -0
  175. package/dist/generated/ProductType.js +47 -0
  176. package/dist/generated/ProfileSyncOutRequest.d.ts +51 -0
  177. package/dist/generated/ProfileSyncOutRequest.js +75 -0
  178. package/dist/generated/ProfileSyncOutResponse.d.ts +56 -0
  179. package/dist/generated/ProfileSyncOutResponse.js +77 -0
  180. package/dist/generated/ReservedPackage.d.ts +34 -0
  181. package/dist/generated/ReservedPackage.js +39 -0
  182. package/dist/generated/Role.d.ts +71 -0
  183. package/dist/generated/Role.js +76 -0
  184. package/dist/generated/SalesOrderPayload.d.ts +85 -0
  185. package/dist/generated/SalesOrderPayload.js +123 -0
  186. package/dist/generated/ShoppingList.d.ts +99 -0
  187. package/dist/generated/ShoppingList.js +132 -0
  188. package/dist/generated/ShoppingListItem.d.ts +102 -0
  189. package/dist/generated/ShoppingListItem.js +139 -0
  190. package/dist/generated/TaskStatus.d.ts +20 -0
  191. package/dist/generated/TaskStatus.js +25 -0
  192. package/dist/generated/Tax.d.ts +37 -0
  193. package/dist/generated/Tax.js +60 -0
  194. package/dist/generated/TaxType.d.ts +25 -0
  195. package/dist/generated/TaxType.js +30 -0
  196. package/dist/generated/UrlAndToken.d.ts +54 -0
  197. package/dist/generated/UrlAndToken.js +67 -0
  198. package/dist/generated/User.d.ts +63 -0
  199. package/dist/generated/User.js +89 -0
  200. package/dist/generated/Weight.d.ts +33 -0
  201. package/dist/generated/Weight.js +60 -0
  202. package/dist/generated/WeightUnit.d.ts +28 -0
  203. package/dist/generated/WeightUnit.js +33 -0
  204. package/dist/generated/WorkingDays.d.ts +42 -0
  205. package/dist/generated/WorkingDays.js +68 -0
  206. package/dist/generated/WorkingHours.d.ts +33 -0
  207. package/dist/generated/WorkingHours.js +52 -0
  208. package/dist/generated/WorkingHoursRange.d.ts +42 -0
  209. package/dist/generated/WorkingHoursRange.js +59 -0
  210. package/dist/index.d.ts +48 -0
  211. package/dist/index.js +60 -0
  212. 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();