@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,132 @@
|
|
|
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 { ShoppingListItem } from "./ShoppingListItem";
|
|
6
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
7
|
+
class ShoppingList$Type extends MessageType {
|
|
8
|
+
constructor() {
|
|
9
|
+
super("com.merabills.storefront.ShoppingList", [
|
|
10
|
+
{ no: 1, name: "isFinal", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
11
|
+
{ no: 2, name: "autoAddDeliveryCharge", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
12
|
+
{ no: 3, name: "autoAddServiceCharge", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
13
|
+
{ no: 4, name: "inventoryLocationId", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
14
|
+
{ no: 5, name: "priceListId", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
15
|
+
{ no: 6, name: "totalAmountBeforeDiscount", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
16
|
+
{ no: 7, name: "discount", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
17
|
+
{ no: 8, name: "existingItemCount", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
18
|
+
{ no: 9, name: "deletedItemCount", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
19
|
+
{ no: 10, name: "existingItems", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ShoppingListItem },
|
|
20
|
+
{ no: 11, name: "deletedItems", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ShoppingListItem }
|
|
21
|
+
]);
|
|
22
|
+
}
|
|
23
|
+
create(value) {
|
|
24
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
25
|
+
message.isFinal = false;
|
|
26
|
+
message.autoAddDeliveryCharge = false;
|
|
27
|
+
message.autoAddServiceCharge = false;
|
|
28
|
+
message.inventoryLocationId = 0;
|
|
29
|
+
message.priceListId = 0n;
|
|
30
|
+
message.totalAmountBeforeDiscount = 0n;
|
|
31
|
+
message.discount = 0n;
|
|
32
|
+
message.existingItemCount = 0;
|
|
33
|
+
message.deletedItemCount = 0;
|
|
34
|
+
message.existingItems = [];
|
|
35
|
+
message.deletedItems = [];
|
|
36
|
+
if (value !== undefined)
|
|
37
|
+
reflectionMergePartial(this, message, value);
|
|
38
|
+
return message;
|
|
39
|
+
}
|
|
40
|
+
internalBinaryRead(reader, length, options, target) {
|
|
41
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
42
|
+
while (reader.pos < end) {
|
|
43
|
+
let [fieldNo, wireType] = reader.tag();
|
|
44
|
+
switch (fieldNo) {
|
|
45
|
+
case /* bool isFinal */ 1:
|
|
46
|
+
message.isFinal = reader.bool();
|
|
47
|
+
break;
|
|
48
|
+
case /* bool autoAddDeliveryCharge */ 2:
|
|
49
|
+
message.autoAddDeliveryCharge = reader.bool();
|
|
50
|
+
break;
|
|
51
|
+
case /* bool autoAddServiceCharge */ 3:
|
|
52
|
+
message.autoAddServiceCharge = reader.bool();
|
|
53
|
+
break;
|
|
54
|
+
case /* int32 inventoryLocationId */ 4:
|
|
55
|
+
message.inventoryLocationId = reader.int32();
|
|
56
|
+
break;
|
|
57
|
+
case /* int64 priceListId */ 5:
|
|
58
|
+
message.priceListId = reader.int64().toBigInt();
|
|
59
|
+
break;
|
|
60
|
+
case /* int64 totalAmountBeforeDiscount */ 6:
|
|
61
|
+
message.totalAmountBeforeDiscount = reader.int64().toBigInt();
|
|
62
|
+
break;
|
|
63
|
+
case /* int64 discount */ 7:
|
|
64
|
+
message.discount = reader.int64().toBigInt();
|
|
65
|
+
break;
|
|
66
|
+
case /* int32 existingItemCount */ 8:
|
|
67
|
+
message.existingItemCount = reader.int32();
|
|
68
|
+
break;
|
|
69
|
+
case /* int32 deletedItemCount */ 9:
|
|
70
|
+
message.deletedItemCount = reader.int32();
|
|
71
|
+
break;
|
|
72
|
+
case /* repeated com.merabills.storefront.ShoppingListItem existingItems */ 10:
|
|
73
|
+
message.existingItems.push(ShoppingListItem.internalBinaryRead(reader, reader.uint32(), options));
|
|
74
|
+
break;
|
|
75
|
+
case /* repeated com.merabills.storefront.ShoppingListItem deletedItems */ 11:
|
|
76
|
+
message.deletedItems.push(ShoppingListItem.internalBinaryRead(reader, reader.uint32(), options));
|
|
77
|
+
break;
|
|
78
|
+
default:
|
|
79
|
+
let u = options.readUnknownField;
|
|
80
|
+
if (u === "throw")
|
|
81
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
82
|
+
let d = reader.skip(wireType);
|
|
83
|
+
if (u !== false)
|
|
84
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return message;
|
|
88
|
+
}
|
|
89
|
+
internalBinaryWrite(message, writer, options) {
|
|
90
|
+
/* bool isFinal = 1; */
|
|
91
|
+
if (message.isFinal !== false)
|
|
92
|
+
writer.tag(1, WireType.Varint).bool(message.isFinal);
|
|
93
|
+
/* bool autoAddDeliveryCharge = 2; */
|
|
94
|
+
if (message.autoAddDeliveryCharge !== false)
|
|
95
|
+
writer.tag(2, WireType.Varint).bool(message.autoAddDeliveryCharge);
|
|
96
|
+
/* bool autoAddServiceCharge = 3; */
|
|
97
|
+
if (message.autoAddServiceCharge !== false)
|
|
98
|
+
writer.tag(3, WireType.Varint).bool(message.autoAddServiceCharge);
|
|
99
|
+
/* int32 inventoryLocationId = 4; */
|
|
100
|
+
if (message.inventoryLocationId !== 0)
|
|
101
|
+
writer.tag(4, WireType.Varint).int32(message.inventoryLocationId);
|
|
102
|
+
/* int64 priceListId = 5; */
|
|
103
|
+
if (message.priceListId !== 0n)
|
|
104
|
+
writer.tag(5, WireType.Varint).int64(message.priceListId);
|
|
105
|
+
/* int64 totalAmountBeforeDiscount = 6; */
|
|
106
|
+
if (message.totalAmountBeforeDiscount !== 0n)
|
|
107
|
+
writer.tag(6, WireType.Varint).int64(message.totalAmountBeforeDiscount);
|
|
108
|
+
/* int64 discount = 7; */
|
|
109
|
+
if (message.discount !== 0n)
|
|
110
|
+
writer.tag(7, WireType.Varint).int64(message.discount);
|
|
111
|
+
/* int32 existingItemCount = 8; */
|
|
112
|
+
if (message.existingItemCount !== 0)
|
|
113
|
+
writer.tag(8, WireType.Varint).int32(message.existingItemCount);
|
|
114
|
+
/* int32 deletedItemCount = 9; */
|
|
115
|
+
if (message.deletedItemCount !== 0)
|
|
116
|
+
writer.tag(9, WireType.Varint).int32(message.deletedItemCount);
|
|
117
|
+
/* repeated com.merabills.storefront.ShoppingListItem existingItems = 10; */
|
|
118
|
+
for (let i = 0; i < message.existingItems.length; i++)
|
|
119
|
+
ShoppingListItem.internalBinaryWrite(message.existingItems[i], writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
120
|
+
/* repeated com.merabills.storefront.ShoppingListItem deletedItems = 11; */
|
|
121
|
+
for (let i = 0; i < message.deletedItems.length; i++)
|
|
122
|
+
ShoppingListItem.internalBinaryWrite(message.deletedItems[i], writer.tag(11, WireType.LengthDelimited).fork(), options).join();
|
|
123
|
+
let u = options.writeUnknownFields;
|
|
124
|
+
if (u !== false)
|
|
125
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
126
|
+
return writer;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* @generated MessageType for protobuf message com.merabills.storefront.ShoppingList
|
|
131
|
+
*/
|
|
132
|
+
export const ShoppingList = new ShoppingList$Type();
|
|
@@ -0,0 +1,102 @@
|
|
|
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 { Tax } from "./Tax";
|
|
8
|
+
/**
|
|
9
|
+
* A line item in a shopping list: the package bought, how much, and at what price.
|
|
10
|
+
* Excluded: batches.
|
|
11
|
+
* Not included because it is derived: tax amounts, totalTax, finalPrice (= unitPrice x quantity +
|
|
12
|
+
* taxes - discount).
|
|
13
|
+
*
|
|
14
|
+
* @generated from protobuf message com.merabills.storefront.ShoppingListItem
|
|
15
|
+
*/
|
|
16
|
+
export interface ShoppingListItem {
|
|
17
|
+
/**
|
|
18
|
+
* Id of the package bought. Four ids are reserved for charge/summary lines (see ReservedPackage)
|
|
19
|
+
* and will not be found in the catalog - label those yourself.
|
|
20
|
+
*
|
|
21
|
+
* @generated from protobuf field: int64 packageId = 1
|
|
22
|
+
*/
|
|
23
|
+
packageId: bigint;
|
|
24
|
+
/**
|
|
25
|
+
* Quantity, multiplied by Constants.QUANTITY_FACTOR. 1.5 kg is stored as 1500.
|
|
26
|
+
*
|
|
27
|
+
* @generated from protobuf field: int32 quantity = 2
|
|
28
|
+
*/
|
|
29
|
+
quantity: number;
|
|
30
|
+
/**
|
|
31
|
+
* Price of one unit of the package, multiplied by Constants.AMOUNT_FACTOR.
|
|
32
|
+
* This is the offer price when the package is on offer.
|
|
33
|
+
*
|
|
34
|
+
* @generated from protobuf field: int64 unitPrice = 3
|
|
35
|
+
*/
|
|
36
|
+
unitPrice: bigint;
|
|
37
|
+
/**
|
|
38
|
+
* Position of this item in the shopping list (0 to Constants.SHOPPING_LIST_ITEM_MAX_ORDER)
|
|
39
|
+
*
|
|
40
|
+
* @generated from protobuf field: int32 shoppingListOrder = 4
|
|
41
|
+
*/
|
|
42
|
+
shoppingListOrder: number;
|
|
43
|
+
/**
|
|
44
|
+
* True if this item was created before the shopping list was made final
|
|
45
|
+
*
|
|
46
|
+
* @generated from protobuf field: bool isOriginal = 5
|
|
47
|
+
*/
|
|
48
|
+
isOriginal: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* True if this item has been deleted or replaced after the shopping list was made final
|
|
51
|
+
*
|
|
52
|
+
* @generated from protobuf field: bool isModified = 6
|
|
53
|
+
*/
|
|
54
|
+
isModified: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* @generated from protobuf field: bool isStockKeepingRequired = 7
|
|
57
|
+
*/
|
|
58
|
+
isStockKeepingRequired: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Discount in the unit price (regularPrice - offerPrice of the package), multiplied by
|
|
61
|
+
* Constants.AMOUNT_FACTOR
|
|
62
|
+
*
|
|
63
|
+
* @generated from protobuf field: int64 priceDiscount = 8
|
|
64
|
+
*/
|
|
65
|
+
priceDiscount: bigint;
|
|
66
|
+
/**
|
|
67
|
+
* Discount applied to the total price of this line item, including taxes, multiplied by
|
|
68
|
+
* Constants.AMOUNT_FACTOR
|
|
69
|
+
*
|
|
70
|
+
* @generated from protobuf field: int64 discount = 9
|
|
71
|
+
*/
|
|
72
|
+
discount: bigint;
|
|
73
|
+
/**
|
|
74
|
+
* Taxes that apply to this line item (at most Constants.MAX_TAXES)
|
|
75
|
+
*
|
|
76
|
+
* @generated from protobuf field: repeated com.merabills.storefront.Tax taxes = 10
|
|
77
|
+
*/
|
|
78
|
+
taxes: Tax[];
|
|
79
|
+
/**
|
|
80
|
+
* Number of minutes after purchase when this item expires. 0 means it does not expire.
|
|
81
|
+
*
|
|
82
|
+
* @generated from protobuf field: int32 expiry = 11
|
|
83
|
+
*/
|
|
84
|
+
expiry: number;
|
|
85
|
+
/**
|
|
86
|
+
* At most Constants.SHOPPING_LIST_ITEM_DESCRIPTION_MAX_LENGTH
|
|
87
|
+
*
|
|
88
|
+
* @generated from protobuf field: optional string description = 12
|
|
89
|
+
*/
|
|
90
|
+
description?: string;
|
|
91
|
+
}
|
|
92
|
+
declare class ShoppingListItem$Type extends MessageType<ShoppingListItem> {
|
|
93
|
+
constructor();
|
|
94
|
+
create(value?: PartialMessage<ShoppingListItem>): ShoppingListItem;
|
|
95
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ShoppingListItem): ShoppingListItem;
|
|
96
|
+
internalBinaryWrite(message: ShoppingListItem, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* @generated MessageType for protobuf message com.merabills.storefront.ShoppingListItem
|
|
100
|
+
*/
|
|
101
|
+
export declare const ShoppingListItem: ShoppingListItem$Type;
|
|
102
|
+
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 { Tax } from "./Tax";
|
|
6
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
7
|
+
class ShoppingListItem$Type extends MessageType {
|
|
8
|
+
constructor() {
|
|
9
|
+
super("com.merabills.storefront.ShoppingListItem", [
|
|
10
|
+
{ no: 1, name: "packageId", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
11
|
+
{ no: 2, name: "quantity", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
12
|
+
{ no: 3, name: "unitPrice", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
13
|
+
{ no: 4, name: "shoppingListOrder", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
14
|
+
{ no: 5, name: "isOriginal", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
15
|
+
{ no: 6, name: "isModified", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
16
|
+
{ no: 7, name: "isStockKeepingRequired", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
17
|
+
{ no: 8, name: "priceDiscount", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
18
|
+
{ no: 9, name: "discount", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
19
|
+
{ no: 10, name: "taxes", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Tax },
|
|
20
|
+
{ no: 11, name: "expiry", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
21
|
+
{ no: 12, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
|
|
22
|
+
]);
|
|
23
|
+
}
|
|
24
|
+
create(value) {
|
|
25
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
26
|
+
message.packageId = 0n;
|
|
27
|
+
message.quantity = 0;
|
|
28
|
+
message.unitPrice = 0n;
|
|
29
|
+
message.shoppingListOrder = 0;
|
|
30
|
+
message.isOriginal = false;
|
|
31
|
+
message.isModified = false;
|
|
32
|
+
message.isStockKeepingRequired = false;
|
|
33
|
+
message.priceDiscount = 0n;
|
|
34
|
+
message.discount = 0n;
|
|
35
|
+
message.taxes = [];
|
|
36
|
+
message.expiry = 0;
|
|
37
|
+
if (value !== undefined)
|
|
38
|
+
reflectionMergePartial(this, message, value);
|
|
39
|
+
return message;
|
|
40
|
+
}
|
|
41
|
+
internalBinaryRead(reader, length, options, target) {
|
|
42
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
43
|
+
while (reader.pos < end) {
|
|
44
|
+
let [fieldNo, wireType] = reader.tag();
|
|
45
|
+
switch (fieldNo) {
|
|
46
|
+
case /* int64 packageId */ 1:
|
|
47
|
+
message.packageId = reader.int64().toBigInt();
|
|
48
|
+
break;
|
|
49
|
+
case /* int32 quantity */ 2:
|
|
50
|
+
message.quantity = reader.int32();
|
|
51
|
+
break;
|
|
52
|
+
case /* int64 unitPrice */ 3:
|
|
53
|
+
message.unitPrice = reader.int64().toBigInt();
|
|
54
|
+
break;
|
|
55
|
+
case /* int32 shoppingListOrder */ 4:
|
|
56
|
+
message.shoppingListOrder = reader.int32();
|
|
57
|
+
break;
|
|
58
|
+
case /* bool isOriginal */ 5:
|
|
59
|
+
message.isOriginal = reader.bool();
|
|
60
|
+
break;
|
|
61
|
+
case /* bool isModified */ 6:
|
|
62
|
+
message.isModified = reader.bool();
|
|
63
|
+
break;
|
|
64
|
+
case /* bool isStockKeepingRequired */ 7:
|
|
65
|
+
message.isStockKeepingRequired = reader.bool();
|
|
66
|
+
break;
|
|
67
|
+
case /* int64 priceDiscount */ 8:
|
|
68
|
+
message.priceDiscount = reader.int64().toBigInt();
|
|
69
|
+
break;
|
|
70
|
+
case /* int64 discount */ 9:
|
|
71
|
+
message.discount = reader.int64().toBigInt();
|
|
72
|
+
break;
|
|
73
|
+
case /* repeated com.merabills.storefront.Tax taxes */ 10:
|
|
74
|
+
message.taxes.push(Tax.internalBinaryRead(reader, reader.uint32(), options));
|
|
75
|
+
break;
|
|
76
|
+
case /* int32 expiry */ 11:
|
|
77
|
+
message.expiry = reader.int32();
|
|
78
|
+
break;
|
|
79
|
+
case /* optional string description */ 12:
|
|
80
|
+
message.description = reader.string();
|
|
81
|
+
break;
|
|
82
|
+
default:
|
|
83
|
+
let u = options.readUnknownField;
|
|
84
|
+
if (u === "throw")
|
|
85
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
86
|
+
let d = reader.skip(wireType);
|
|
87
|
+
if (u !== false)
|
|
88
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return message;
|
|
92
|
+
}
|
|
93
|
+
internalBinaryWrite(message, writer, options) {
|
|
94
|
+
/* int64 packageId = 1; */
|
|
95
|
+
if (message.packageId !== 0n)
|
|
96
|
+
writer.tag(1, WireType.Varint).int64(message.packageId);
|
|
97
|
+
/* int32 quantity = 2; */
|
|
98
|
+
if (message.quantity !== 0)
|
|
99
|
+
writer.tag(2, WireType.Varint).int32(message.quantity);
|
|
100
|
+
/* int64 unitPrice = 3; */
|
|
101
|
+
if (message.unitPrice !== 0n)
|
|
102
|
+
writer.tag(3, WireType.Varint).int64(message.unitPrice);
|
|
103
|
+
/* int32 shoppingListOrder = 4; */
|
|
104
|
+
if (message.shoppingListOrder !== 0)
|
|
105
|
+
writer.tag(4, WireType.Varint).int32(message.shoppingListOrder);
|
|
106
|
+
/* bool isOriginal = 5; */
|
|
107
|
+
if (message.isOriginal !== false)
|
|
108
|
+
writer.tag(5, WireType.Varint).bool(message.isOriginal);
|
|
109
|
+
/* bool isModified = 6; */
|
|
110
|
+
if (message.isModified !== false)
|
|
111
|
+
writer.tag(6, WireType.Varint).bool(message.isModified);
|
|
112
|
+
/* bool isStockKeepingRequired = 7; */
|
|
113
|
+
if (message.isStockKeepingRequired !== false)
|
|
114
|
+
writer.tag(7, WireType.Varint).bool(message.isStockKeepingRequired);
|
|
115
|
+
/* int64 priceDiscount = 8; */
|
|
116
|
+
if (message.priceDiscount !== 0n)
|
|
117
|
+
writer.tag(8, WireType.Varint).int64(message.priceDiscount);
|
|
118
|
+
/* int64 discount = 9; */
|
|
119
|
+
if (message.discount !== 0n)
|
|
120
|
+
writer.tag(9, WireType.Varint).int64(message.discount);
|
|
121
|
+
/* repeated com.merabills.storefront.Tax taxes = 10; */
|
|
122
|
+
for (let i = 0; i < message.taxes.length; i++)
|
|
123
|
+
Tax.internalBinaryWrite(message.taxes[i], writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
124
|
+
/* int32 expiry = 11; */
|
|
125
|
+
if (message.expiry !== 0)
|
|
126
|
+
writer.tag(11, WireType.Varint).int32(message.expiry);
|
|
127
|
+
/* optional string description = 12; */
|
|
128
|
+
if (message.description !== undefined)
|
|
129
|
+
writer.tag(12, WireType.LengthDelimited).string(message.description);
|
|
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.ShoppingListItem
|
|
138
|
+
*/
|
|
139
|
+
export const ShoppingListItem = new ShoppingListItem$Type();
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Processing status of a message.
|
|
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.TaskStatus
|
|
6
|
+
*/
|
|
7
|
+
export declare enum TaskStatus {
|
|
8
|
+
/**
|
|
9
|
+
* @generated from protobuf enum value: NOT_YET_PROCESSED = 0;
|
|
10
|
+
*/
|
|
11
|
+
NOT_YET_PROCESSED = 0,
|
|
12
|
+
/**
|
|
13
|
+
* @generated from protobuf enum value: COMPLETED = 1;
|
|
14
|
+
*/
|
|
15
|
+
COMPLETED = 1,
|
|
16
|
+
/**
|
|
17
|
+
* @generated from protobuf enum value: REJECTED = 2;
|
|
18
|
+
*/
|
|
19
|
+
REJECTED = 2
|
|
20
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
// @generated by protobuf-ts 2.11.1 with parameter long_type_bigint
|
|
3
|
+
// @generated from protobuf file "TaskStatus.proto" (package "com.merabills.storefront", syntax proto3)
|
|
4
|
+
// tslint:disable
|
|
5
|
+
/**
|
|
6
|
+
* Processing status of a message.
|
|
7
|
+
* Values match the ids of the corresponding Java enum entries and must never be changed.
|
|
8
|
+
*
|
|
9
|
+
* @generated from protobuf enum com.merabills.storefront.TaskStatus
|
|
10
|
+
*/
|
|
11
|
+
export var TaskStatus;
|
|
12
|
+
(function (TaskStatus) {
|
|
13
|
+
/**
|
|
14
|
+
* @generated from protobuf enum value: NOT_YET_PROCESSED = 0;
|
|
15
|
+
*/
|
|
16
|
+
TaskStatus[TaskStatus["NOT_YET_PROCESSED"] = 0] = "NOT_YET_PROCESSED";
|
|
17
|
+
/**
|
|
18
|
+
* @generated from protobuf enum value: COMPLETED = 1;
|
|
19
|
+
*/
|
|
20
|
+
TaskStatus[TaskStatus["COMPLETED"] = 1] = "COMPLETED";
|
|
21
|
+
/**
|
|
22
|
+
* @generated from protobuf enum value: REJECTED = 2;
|
|
23
|
+
*/
|
|
24
|
+
TaskStatus[TaskStatus["REJECTED"] = 2] = "REJECTED";
|
|
25
|
+
})(TaskStatus || (TaskStatus = {}));
|
|
@@ -0,0 +1,37 @@
|
|
|
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 { TaxType } from "./TaxType";
|
|
8
|
+
/**
|
|
9
|
+
* A tax and the rate at which it applies. Replaces the parallel taxCodes / taxRates arrays in Java.
|
|
10
|
+
*
|
|
11
|
+
* @generated from protobuf message com.merabills.storefront.Tax
|
|
12
|
+
*/
|
|
13
|
+
export interface Tax {
|
|
14
|
+
/**
|
|
15
|
+
* Exposed instead of the raw tax code
|
|
16
|
+
*
|
|
17
|
+
* @generated from protobuf field: com.merabills.storefront.TaxType type = 1
|
|
18
|
+
*/
|
|
19
|
+
type: TaxType;
|
|
20
|
+
/**
|
|
21
|
+
* Tax rate, multiplied by Constants.TAX_RATE_FACTOR. 18% is stored as 1800.
|
|
22
|
+
*
|
|
23
|
+
* @generated from protobuf field: int32 rate = 2
|
|
24
|
+
*/
|
|
25
|
+
rate: number;
|
|
26
|
+
}
|
|
27
|
+
declare class Tax$Type extends MessageType<Tax> {
|
|
28
|
+
constructor();
|
|
29
|
+
create(value?: PartialMessage<Tax>): Tax;
|
|
30
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Tax): Tax;
|
|
31
|
+
internalBinaryWrite(message: Tax, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @generated MessageType for protobuf message com.merabills.storefront.Tax
|
|
35
|
+
*/
|
|
36
|
+
export declare const Tax: Tax$Type;
|
|
37
|
+
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 { TaxType } from "./TaxType";
|
|
6
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
7
|
+
class Tax$Type extends MessageType {
|
|
8
|
+
constructor() {
|
|
9
|
+
super("com.merabills.storefront.Tax", [
|
|
10
|
+
{ no: 1, name: "type", kind: "enum", T: () => ["com.merabills.storefront.TaxType", TaxType] },
|
|
11
|
+
{ no: 2, name: "rate", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
|
|
12
|
+
]);
|
|
13
|
+
}
|
|
14
|
+
create(value) {
|
|
15
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
16
|
+
message.type = 0;
|
|
17
|
+
message.rate = 0;
|
|
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.TaxType type */ 1:
|
|
28
|
+
message.type = reader.int32();
|
|
29
|
+
break;
|
|
30
|
+
case /* int32 rate */ 2:
|
|
31
|
+
message.rate = reader.int32();
|
|
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
|
+
/* com.merabills.storefront.TaxType type = 1; */
|
|
46
|
+
if (message.type !== 0)
|
|
47
|
+
writer.tag(1, WireType.Varint).int32(message.type);
|
|
48
|
+
/* int32 rate = 2; */
|
|
49
|
+
if (message.rate !== 0)
|
|
50
|
+
writer.tag(2, WireType.Varint).int32(message.rate);
|
|
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.Tax
|
|
59
|
+
*/
|
|
60
|
+
export const Tax = new Tax$Type();
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A tax that applies to a product or to a line item. A raw Java tax code is only unique within a
|
|
3
|
+
* country, so values here are not that raw code: they are computed ids, TaxType.createId(country,
|
|
4
|
+
* taxCode) = (country.getNumeric() << 8) | taxCode, making each value globally unique and
|
|
5
|
+
* self-describing rather than meaningful only together with some other, separately carried country
|
|
6
|
+
* code. A client can recover the ISO 3166-1 numeric country code with (value >> 8); it cannot
|
|
7
|
+
* recover the raw tax code beyond the low 8 bits, and does not need to - the enum name already
|
|
8
|
+
* carries that meaning.
|
|
9
|
+
*
|
|
10
|
+
* @generated from protobuf enum com.merabills.storefront.TaxType
|
|
11
|
+
*/
|
|
12
|
+
export declare enum TaxType {
|
|
13
|
+
/**
|
|
14
|
+
* No country's numeric code is ever 0, so this id can never collide with a real one
|
|
15
|
+
*
|
|
16
|
+
* @generated from protobuf enum value: UNSPECIFIED_TAX_TYPE = 0;
|
|
17
|
+
*/
|
|
18
|
+
UNSPECIFIED_TAX_TYPE = 0,
|
|
19
|
+
/**
|
|
20
|
+
* India (countryCode 356): Goods and Services Tax (taxCode 0)
|
|
21
|
+
*
|
|
22
|
+
* @generated from protobuf enum value: GST = 91136;
|
|
23
|
+
*/
|
|
24
|
+
GST = 91136
|
|
25
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
// @generated by protobuf-ts 2.11.1 with parameter long_type_bigint
|
|
3
|
+
// @generated from protobuf file "TaxType.proto" (package "com.merabills.storefront", syntax proto3)
|
|
4
|
+
// tslint:disable
|
|
5
|
+
/**
|
|
6
|
+
* A tax that applies to a product or to a line item. A raw Java tax code is only unique within a
|
|
7
|
+
* country, so values here are not that raw code: they are computed ids, TaxType.createId(country,
|
|
8
|
+
* taxCode) = (country.getNumeric() << 8) | taxCode, making each value globally unique and
|
|
9
|
+
* self-describing rather than meaningful only together with some other, separately carried country
|
|
10
|
+
* code. A client can recover the ISO 3166-1 numeric country code with (value >> 8); it cannot
|
|
11
|
+
* recover the raw tax code beyond the low 8 bits, and does not need to - the enum name already
|
|
12
|
+
* carries that meaning.
|
|
13
|
+
*
|
|
14
|
+
* @generated from protobuf enum com.merabills.storefront.TaxType
|
|
15
|
+
*/
|
|
16
|
+
export var TaxType;
|
|
17
|
+
(function (TaxType) {
|
|
18
|
+
/**
|
|
19
|
+
* No country's numeric code is ever 0, so this id can never collide with a real one
|
|
20
|
+
*
|
|
21
|
+
* @generated from protobuf enum value: UNSPECIFIED_TAX_TYPE = 0;
|
|
22
|
+
*/
|
|
23
|
+
TaxType[TaxType["UNSPECIFIED_TAX_TYPE"] = 0] = "UNSPECIFIED_TAX_TYPE";
|
|
24
|
+
/**
|
|
25
|
+
* India (countryCode 356): Goods and Services Tax (taxCode 0)
|
|
26
|
+
*
|
|
27
|
+
* @generated from protobuf enum value: GST = 91136;
|
|
28
|
+
*/
|
|
29
|
+
TaxType[TaxType["GST"] = 91136] = "GST";
|
|
30
|
+
})(TaxType || (TaxType = {}));
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
/**
|
|
8
|
+
* Where a set of files is, the read-only signature that authorizes reading them, and when both
|
|
9
|
+
* expire. Carried once, as BusinessSyncOutResponse.attachmentBaseUrl for a business's photos - not an
|
|
10
|
+
* entity, and never deleted, only expired.
|
|
11
|
+
*
|
|
12
|
+
* Build a file's url as resourceUrl + "/" + storage file name + "?" + sasToken (see Attachment for
|
|
13
|
+
* the storage file name). The token is a credential - do not log it - but unlike AuthTokens.userToken
|
|
14
|
+
* and BusinessLink.linkToken it is meant to go in a url: it is scoped to one container, read only and
|
|
15
|
+
* short lived.
|
|
16
|
+
*
|
|
17
|
+
* @generated from protobuf message com.merabills.storefront.UrlAndToken
|
|
18
|
+
*/
|
|
19
|
+
export interface UrlAndToken {
|
|
20
|
+
/**
|
|
21
|
+
* The url of the container the files are in. Always https, never with a trailing slash or a query
|
|
22
|
+
* string of its own.
|
|
23
|
+
*
|
|
24
|
+
* @generated from protobuf field: string resourceUrl = 1
|
|
25
|
+
*/
|
|
26
|
+
resourceUrl: string;
|
|
27
|
+
/**
|
|
28
|
+
* The shared access signature that authorizes reading a file, ready to use as a query string
|
|
29
|
+
* ("sv=...&se=...&sig=...", no leading "?"). Append it as-is; never parse or rebuild it.
|
|
30
|
+
*
|
|
31
|
+
* @generated from protobuf field: string sasToken = 2
|
|
32
|
+
*/
|
|
33
|
+
sasToken: string;
|
|
34
|
+
/**
|
|
35
|
+
* When the fields above stop working, in milliseconds since Jan 1, 1970 UTC. Send this back as
|
|
36
|
+
* BusinessSyncOutRequest.attachmentBaseUrlExpiry. Treat it as expired
|
|
37
|
+
* Constants.ATTACHMENT_BASE_URL_EXPIRY_MARGIN early, so a url being built cannot expire before it
|
|
38
|
+
* is fetched.
|
|
39
|
+
*
|
|
40
|
+
* @generated from protobuf field: int64 expiry = 3
|
|
41
|
+
*/
|
|
42
|
+
expiry: bigint;
|
|
43
|
+
}
|
|
44
|
+
declare class UrlAndToken$Type extends MessageType<UrlAndToken> {
|
|
45
|
+
constructor();
|
|
46
|
+
create(value?: PartialMessage<UrlAndToken>): UrlAndToken;
|
|
47
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UrlAndToken): UrlAndToken;
|
|
48
|
+
internalBinaryWrite(message: UrlAndToken, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* @generated MessageType for protobuf message com.merabills.storefront.UrlAndToken
|
|
52
|
+
*/
|
|
53
|
+
export declare const UrlAndToken: UrlAndToken$Type;
|
|
54
|
+
export {};
|