@actschurch/ccms-sdk 0.0.10 → 0.0.12
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/dist/models/common/ResponseData.d.ts +8 -0
- package/dist/models/common/ResponseData.d.ts.map +1 -1
- package/dist/models/vendorcatalog/CacheKeys/EventStockCacheKeys.d.ts +47 -0
- package/dist/models/vendorcatalog/CacheKeys/EventStockCacheKeys.d.ts.map +1 -0
- package/dist/models/vendorcatalog/CacheKeys/EventStockCacheKeys.js +49 -0
- package/dist/models/vendorcatalog/CacheKeys/EventStockCacheKeys.js.map +1 -0
- package/dist/models/vendorcatalog/CacheKeys/index.d.ts +1 -0
- package/dist/models/vendorcatalog/CacheKeys/index.d.ts.map +1 -1
- package/dist/models/vendorcatalog/CacheKeys/index.js +1 -0
- package/dist/models/vendorcatalog/CacheKeys/index.js.map +1 -1
- package/dist/models/vendorcatalog/EventAddOnStock.d.ts +22 -0
- package/dist/models/vendorcatalog/EventAddOnStock.d.ts.map +1 -0
- package/dist/models/vendorcatalog/EventAddOnStock.js +2 -0
- package/dist/models/vendorcatalog/EventAddOnStock.js.map +1 -0
- package/dist/models/vendorcatalog/EventVariantStock.d.ts +22 -0
- package/dist/models/vendorcatalog/EventVariantStock.d.ts.map +1 -0
- package/dist/models/vendorcatalog/EventVariantStock.js +2 -0
- package/dist/models/vendorcatalog/EventVariantStock.js.map +1 -0
- package/dist/models/vendorcatalog/ModelView/ProductStockStatusModelView.d.ts +81 -0
- package/dist/models/vendorcatalog/ModelView/ProductStockStatusModelView.d.ts.map +1 -0
- package/dist/models/vendorcatalog/ModelView/ProductStockStatusModelView.js +17 -0
- package/dist/models/vendorcatalog/ModelView/ProductStockStatusModelView.js.map +1 -0
- package/dist/models/vendorcatalog/ModelView/ShopEventProductModelView.d.ts +18 -0
- package/dist/models/vendorcatalog/ModelView/ShopEventProductModelView.d.ts.map +1 -1
- package/dist/models/vendorcatalog/ModelView/index.d.ts +1 -0
- package/dist/models/vendorcatalog/ModelView/index.d.ts.map +1 -1
- package/dist/models/vendorcatalog/ModelView/index.js +1 -0
- package/dist/models/vendorcatalog/ModelView/index.js.map +1 -1
- package/dist/models/vendorcatalog/VendorProductEventLimit.d.ts +2 -0
- package/dist/models/vendorcatalog/VendorProductEventLimit.d.ts.map +1 -1
- package/dist/models/vendorcatalog/index.d.ts +2 -0
- package/dist/models/vendorcatalog/index.d.ts.map +1 -1
- package/dist/models/vendorcatalog/index.js +2 -0
- package/dist/models/vendorcatalog/index.js.map +1 -1
- package/dist/react/hooks/index.d.ts +1 -0
- package/dist/react/hooks/index.d.ts.map +1 -1
- package/dist/react/hooks/index.js +2 -0
- package/dist/react/hooks/index.js.map +1 -1
- package/dist/react/hooks/services/useVendorCatalogServices.d.ts +9 -1
- package/dist/react/hooks/services/useVendorCatalogServices.d.ts.map +1 -1
- package/dist/react/hooks/services/useVendorCatalogServices.js +12 -0
- package/dist/react/hooks/services/useVendorCatalogServices.js.map +1 -1
- package/dist/react/hooks/useEventProductStreaming.d.ts +75 -0
- package/dist/react/hooks/useEventProductStreaming.d.ts.map +1 -0
- package/dist/react/hooks/useEventProductStreaming.js +123 -0
- package/dist/react/hooks/useEventProductStreaming.js.map +1 -0
- package/dist/services/vendorcatalog/EventProductStreamingService.d.ts +41 -0
- package/dist/services/vendorcatalog/EventProductStreamingService.d.ts.map +1 -0
- package/dist/services/vendorcatalog/EventProductStreamingService.js +47 -0
- package/dist/services/vendorcatalog/EventProductStreamingService.js.map +1 -0
- package/dist/services/vendorcatalog/StockPortalService.d.ts +52 -0
- package/dist/services/vendorcatalog/StockPortalService.d.ts.map +1 -0
- package/dist/services/vendorcatalog/StockPortalService.js +79 -0
- package/dist/services/vendorcatalog/StockPortalService.js.map +1 -0
- package/dist/services/vendorcatalog/StockShopService.d.ts +59 -0
- package/dist/services/vendorcatalog/StockShopService.d.ts.map +1 -0
- package/dist/services/vendorcatalog/StockShopService.js +98 -0
- package/dist/services/vendorcatalog/StockShopService.js.map +1 -0
- package/dist/services/vendorcatalog/VendorCatalogShopService.d.ts +10 -0
- package/dist/services/vendorcatalog/VendorCatalogShopService.d.ts.map +1 -1
- package/dist/services/vendorcatalog/VendorCatalogShopService.js +18 -0
- package/dist/services/vendorcatalog/VendorCatalogShopService.js.map +1 -1
- package/dist/services/vendorcatalog/index.d.ts +9 -0
- package/dist/services/vendorcatalog/index.d.ts.map +1 -1
- package/dist/services/vendorcatalog/index.js +7 -0
- package/dist/services/vendorcatalog/index.js.map +1 -1
- package/dist/services/vendorcatalog/models/StockRequestModels.d.ts +99 -0
- package/dist/services/vendorcatalog/models/StockRequestModels.d.ts.map +1 -0
- package/dist/services/vendorcatalog/models/StockRequestModels.js +7 -0
- package/dist/services/vendorcatalog/models/StockRequestModels.js.map +1 -0
- package/package.json +1 -1
|
@@ -15,5 +15,13 @@ export interface ResponseData<T> {
|
|
|
15
15
|
errors?: string[] | null;
|
|
16
16
|
/** UTC timestamp when the response was generated (ISO-8601 format) */
|
|
17
17
|
timestamp: string;
|
|
18
|
+
/** Total number of items across all pages */
|
|
19
|
+
totalCount?: number | null;
|
|
20
|
+
/** Number of items skipped */
|
|
21
|
+
skip?: number | null;
|
|
22
|
+
/** Number of items requested */
|
|
23
|
+
take?: number | null;
|
|
24
|
+
/** Whether there are more items beyond the current page */
|
|
25
|
+
hasMore?: boolean | null;
|
|
18
26
|
}
|
|
19
27
|
//# sourceMappingURL=ResponseData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseData.d.ts","sourceRoot":"","sources":["../../../src/models/common/ResponseData.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,8CAA8C;IAC9C,OAAO,EAAE,OAAO,CAAC;IAEjB,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAC;IAEnB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,gCAAgC;IAChC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IAEhB,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAEzB,sEAAsE;IACtE,SAAS,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ResponseData.d.ts","sourceRoot":"","sources":["../../../src/models/common/ResponseData.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,8CAA8C;IAC9C,OAAO,EAAE,OAAO,CAAC;IAEjB,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAC;IAEnB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,gCAAgC;IAChC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IAEhB,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAEzB,sEAAsE;IACtE,SAAS,EAAE,MAAM,CAAC;IAGlB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,8BAA8B;IAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,gCAAgC;IAChC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC1B"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event Stock Cache Keys
|
|
3
|
+
*
|
|
4
|
+
* Centralized cache keys for event stock data.
|
|
5
|
+
* Includes snapshot cache keys (short TTL) and interest counter keys (volatile).
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Cache keys for event stock snapshots (2-minute TTL)
|
|
9
|
+
*/
|
|
10
|
+
export declare const EventStockSnapshotCacheKeys: {
|
|
11
|
+
/**
|
|
12
|
+
* Cache key for a single product's stock status at an event.
|
|
13
|
+
* Example: CCMS:Stock:Snapshot:Product:42:Event:10
|
|
14
|
+
*/
|
|
15
|
+
readonly productAtEvent: (productId: number, eventId: number) => string;
|
|
16
|
+
/**
|
|
17
|
+
* Cache key for all products' stock at an event.
|
|
18
|
+
* Example: CCMS:Stock:Snapshot:Event:10:Products
|
|
19
|
+
*/
|
|
20
|
+
readonly eventProducts: (eventId: number) => string;
|
|
21
|
+
/**
|
|
22
|
+
* Pattern for wildcard deletion.
|
|
23
|
+
* Example: CCMS:Stock:Snapshot:*
|
|
24
|
+
*/
|
|
25
|
+
readonly pattern: () => string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Cache keys for interest counters (15-minute TTL, volatile Redis counters)
|
|
29
|
+
*/
|
|
30
|
+
export declare const EventStockInterestKeys: {
|
|
31
|
+
/**
|
|
32
|
+
* Interest counter key for a product.
|
|
33
|
+
* Example: CCMS:Stock:Interest:10:42
|
|
34
|
+
*/
|
|
35
|
+
readonly product: (eventId: number, productId: number) => string;
|
|
36
|
+
/**
|
|
37
|
+
* Interest counter key for a variant.
|
|
38
|
+
* Example: CCMS:Stock:Interest:10:variant:15
|
|
39
|
+
*/
|
|
40
|
+
readonly variant: (eventId: number, varientId: number) => string;
|
|
41
|
+
/**
|
|
42
|
+
* Interest counter key for an add-on.
|
|
43
|
+
* Example: CCMS:Stock:Interest:10:addon:5
|
|
44
|
+
*/
|
|
45
|
+
readonly addOn: (eventId: number, addOnId: number) => string;
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=EventStockCacheKeys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventStockCacheKeys.d.ts","sourceRoot":"","sources":["../../../../src/models/vendorcatalog/CacheKeys/EventStockCacheKeys.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH;;GAEG;AACH,eAAO,MAAM,2BAA2B;IACtC;;;OAGG;yCACyB,MAAM,WAAW,MAAM,KAAG,MAAM;IAG5D;;;OAGG;sCACsB,MAAM,KAAG,MAAM;IAGxC;;;OAGG;4BACU,MAAM;CACX,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,sBAAsB;IACjC;;;OAGG;gCACgB,MAAM,aAAa,MAAM,KAAG,MAAM;IAGrD;;;OAGG;gCACgB,MAAM,aAAa,MAAM,KAAG,MAAM;IAGrD;;;OAGG;8BACc,MAAM,WAAW,MAAM,KAAG,MAAM;CAEzC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event Stock Cache Keys
|
|
3
|
+
*
|
|
4
|
+
* Centralized cache keys for event stock data.
|
|
5
|
+
* Includes snapshot cache keys (short TTL) and interest counter keys (volatile).
|
|
6
|
+
*/
|
|
7
|
+
const SNAPSHOT_PREFIX = 'CCMS:Stock:Snapshot';
|
|
8
|
+
const INTEREST_PREFIX = 'CCMS:Stock:Interest';
|
|
9
|
+
/**
|
|
10
|
+
* Cache keys for event stock snapshots (2-minute TTL)
|
|
11
|
+
*/
|
|
12
|
+
export const EventStockSnapshotCacheKeys = {
|
|
13
|
+
/**
|
|
14
|
+
* Cache key for a single product's stock status at an event.
|
|
15
|
+
* Example: CCMS:Stock:Snapshot:Product:42:Event:10
|
|
16
|
+
*/
|
|
17
|
+
productAtEvent: (productId, eventId) => `${SNAPSHOT_PREFIX}:Product:${productId}:Event:${eventId}`,
|
|
18
|
+
/**
|
|
19
|
+
* Cache key for all products' stock at an event.
|
|
20
|
+
* Example: CCMS:Stock:Snapshot:Event:10:Products
|
|
21
|
+
*/
|
|
22
|
+
eventProducts: (eventId) => `${SNAPSHOT_PREFIX}:Event:${eventId}:Products`,
|
|
23
|
+
/**
|
|
24
|
+
* Pattern for wildcard deletion.
|
|
25
|
+
* Example: CCMS:Stock:Snapshot:*
|
|
26
|
+
*/
|
|
27
|
+
pattern: () => `${SNAPSHOT_PREFIX}:*`,
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Cache keys for interest counters (15-minute TTL, volatile Redis counters)
|
|
31
|
+
*/
|
|
32
|
+
export const EventStockInterestKeys = {
|
|
33
|
+
/**
|
|
34
|
+
* Interest counter key for a product.
|
|
35
|
+
* Example: CCMS:Stock:Interest:10:42
|
|
36
|
+
*/
|
|
37
|
+
product: (eventId, productId) => `${INTEREST_PREFIX}:${eventId}:${productId}`,
|
|
38
|
+
/**
|
|
39
|
+
* Interest counter key for a variant.
|
|
40
|
+
* Example: CCMS:Stock:Interest:10:variant:15
|
|
41
|
+
*/
|
|
42
|
+
variant: (eventId, varientId) => `${INTEREST_PREFIX}:${eventId}:variant:${varientId}`,
|
|
43
|
+
/**
|
|
44
|
+
* Interest counter key for an add-on.
|
|
45
|
+
* Example: CCMS:Stock:Interest:10:addon:5
|
|
46
|
+
*/
|
|
47
|
+
addOn: (eventId, addOnId) => `${INTEREST_PREFIX}:${eventId}:addon:${addOnId}`,
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=EventStockCacheKeys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventStockCacheKeys.js","sourceRoot":"","sources":["../../../../src/models/vendorcatalog/CacheKeys/EventStockCacheKeys.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,eAAe,GAAG,qBAAqB,CAAC;AAC9C,MAAM,eAAe,GAAG,qBAAqB,CAAC;AAE9C;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC;;;OAGG;IACH,cAAc,EAAE,CAAC,SAAiB,EAAE,OAAe,EAAU,EAAE,CAC7D,GAAG,eAAe,YAAY,SAAS,UAAU,OAAO,EAAE;IAE5D;;;OAGG;IACH,aAAa,EAAE,CAAC,OAAe,EAAU,EAAE,CACzC,GAAG,eAAe,UAAU,OAAO,WAAW;IAEhD;;;OAGG;IACH,OAAO,EAAE,GAAW,EAAE,CAAC,GAAG,eAAe,IAAI;CACrC,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC;;;OAGG;IACH,OAAO,EAAE,CAAC,OAAe,EAAE,SAAiB,EAAU,EAAE,CACtD,GAAG,eAAe,IAAI,OAAO,IAAI,SAAS,EAAE;IAE9C;;;OAGG;IACH,OAAO,EAAE,CAAC,OAAe,EAAE,SAAiB,EAAU,EAAE,CACtD,GAAG,eAAe,IAAI,OAAO,YAAY,SAAS,EAAE;IAEtD;;;OAGG;IACH,KAAK,EAAE,CAAC,OAAe,EAAE,OAAe,EAAU,EAAE,CAClD,GAAG,eAAe,IAAI,OAAO,UAAU,OAAO,EAAE;CAC1C,CAAC"}
|
|
@@ -14,4 +14,5 @@ export * from './VendorProductRuleCacheKeys';
|
|
|
14
14
|
export * from './VendorProductEventLimitCacheKeys';
|
|
15
15
|
export * from './VendorProductAddOnCacheKeys';
|
|
16
16
|
export * from './VendorProductAddOnCategoryCacheKeys';
|
|
17
|
+
export * from './EventStockCacheKeys';
|
|
17
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/vendorcatalog/CacheKeys/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/vendorcatalog/CacheKeys/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC;AACtD,cAAc,uBAAuB,CAAC"}
|
|
@@ -14,4 +14,5 @@ export * from './VendorProductRuleCacheKeys';
|
|
|
14
14
|
export * from './VendorProductEventLimitCacheKeys';
|
|
15
15
|
export * from './VendorProductAddOnCacheKeys';
|
|
16
16
|
export * from './VendorProductAddOnCategoryCacheKeys';
|
|
17
|
+
export * from './EventStockCacheKeys';
|
|
17
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/vendorcatalog/CacheKeys/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/vendorcatalog/CacheKeys/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC;AACtD,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event Add-On Stock Entity
|
|
3
|
+
*
|
|
4
|
+
* Represents the stock level for a specific add-on at a specific event.
|
|
5
|
+
* Uses composite key (AddOnID, EventID).
|
|
6
|
+
* Maps to the EventAddOnStock table in the database.
|
|
7
|
+
*/
|
|
8
|
+
export interface EventAddOnStock {
|
|
9
|
+
/** Add-on ID (Composite Key to VendorProductAddOn) */
|
|
10
|
+
addOnID: number;
|
|
11
|
+
/** Event ID (Composite Key to Event) */
|
|
12
|
+
eventID: number;
|
|
13
|
+
/** Maximum total quantity available for this add-on at the event */
|
|
14
|
+
maxTotalQuantity: number;
|
|
15
|
+
/** Number of units sold (confirmed orders) */
|
|
16
|
+
soldCount: number;
|
|
17
|
+
/** Creation timestamp (yyyyMMddHHmmss) */
|
|
18
|
+
createdDateTime: number;
|
|
19
|
+
/** Last modification timestamp (yyyyMMddHHmmss) */
|
|
20
|
+
modifiedDateTime: number;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=EventAddOnStock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventAddOnStock.d.ts","sourceRoot":"","sources":["../../../src/models/vendorcatalog/EventAddOnStock.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAE9B,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAEhB,oEAAoE;IACpE,gBAAgB,EAAE,MAAM,CAAC;IACzB,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,eAAe,EAAE,MAAM,CAAC;IACxB,mDAAmD;IACnD,gBAAgB,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventAddOnStock.js","sourceRoot":"","sources":["../../../src/models/vendorcatalog/EventAddOnStock.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event Variant Stock Entity
|
|
3
|
+
*
|
|
4
|
+
* Represents the stock level for a specific variant at a specific event.
|
|
5
|
+
* Uses composite key (VarientID, EventID).
|
|
6
|
+
* Maps to the EventVariantStock table in the database.
|
|
7
|
+
*/
|
|
8
|
+
export interface EventVariantStock {
|
|
9
|
+
/** Variant ID (Composite Key to VendorProductVarient) */
|
|
10
|
+
varientID: number;
|
|
11
|
+
/** Event ID (Composite Key to Event) */
|
|
12
|
+
eventID: number;
|
|
13
|
+
/** Maximum total quantity available for this variant at the event */
|
|
14
|
+
maxTotalQuantity: number;
|
|
15
|
+
/** Number of units sold (confirmed orders) */
|
|
16
|
+
soldCount: number;
|
|
17
|
+
/** Creation timestamp (yyyyMMddHHmmss) */
|
|
18
|
+
createdDateTime: number;
|
|
19
|
+
/** Last modification timestamp (yyyyMMddHHmmss) */
|
|
20
|
+
modifiedDateTime: number;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=EventVariantStock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventVariantStock.d.ts","sourceRoot":"","sources":["../../../src/models/vendorcatalog/EventVariantStock.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAEhC,yDAAyD;IACzD,SAAS,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAEhB,qEAAqE;IACrE,gBAAgB,EAAE,MAAM,CAAC;IACzB,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,eAAe,EAAE,MAAM,CAAC;IACxB,mDAAmD;IACnD,gBAAgB,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventVariantStock.js","sourceRoot":"","sources":["../../../src/models/vendorcatalog/EventVariantStock.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product Stock Status Model View
|
|
3
|
+
*
|
|
4
|
+
* Represents the stock availability status for a product at a specific event.
|
|
5
|
+
* Includes variant and add-on stock breakdowns, and interest counters.
|
|
6
|
+
* Maps to: CCMSLib.Models.VendorCatalog.ModelView.ProductStockStatusModelView
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Stock availability enum
|
|
10
|
+
*/
|
|
11
|
+
export declare enum StockAvailability {
|
|
12
|
+
Available = "Available",
|
|
13
|
+
LowStock = "LowStock",
|
|
14
|
+
SoldOut = "SoldOut"
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Product stock status at a specific event
|
|
18
|
+
*/
|
|
19
|
+
export interface ProductStockStatusModelView {
|
|
20
|
+
/** Product ID */
|
|
21
|
+
productID: number;
|
|
22
|
+
/** Event ID */
|
|
23
|
+
eventID: number;
|
|
24
|
+
/** Maximum total quantity available */
|
|
25
|
+
maxTotalQuantity: number;
|
|
26
|
+
/** Number of units sold */
|
|
27
|
+
soldCount: number;
|
|
28
|
+
/** Remaining available count (maxTotal - sold) */
|
|
29
|
+
availableCount: number;
|
|
30
|
+
/** Maximum quantity allowed per single order */
|
|
31
|
+
maxQuantityPerOrder: number;
|
|
32
|
+
/** Availability status */
|
|
33
|
+
availability: StockAvailability;
|
|
34
|
+
/** Number of people who have this item in their cart (from Redis) */
|
|
35
|
+
interestedCount: number;
|
|
36
|
+
/** Variant-level stock breakdown (if variants have stock configured) */
|
|
37
|
+
variantStock?: VariantStockStatusModelView[] | null;
|
|
38
|
+
/** Add-on-level stock breakdown (if add-ons have stock configured) */
|
|
39
|
+
addOnStock?: AddOnStockStatusModelView[] | null;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Variant stock status at a specific event
|
|
43
|
+
*/
|
|
44
|
+
export interface VariantStockStatusModelView {
|
|
45
|
+
/** Variant ID */
|
|
46
|
+
varientID: number;
|
|
47
|
+
/** Variant name (e.g., "Small", "Red") */
|
|
48
|
+
varientName?: string | null;
|
|
49
|
+
/** Variant value */
|
|
50
|
+
varientValue?: string | null;
|
|
51
|
+
/** Maximum total quantity available */
|
|
52
|
+
maxTotalQuantity: number;
|
|
53
|
+
/** Number of units sold */
|
|
54
|
+
soldCount: number;
|
|
55
|
+
/** Remaining available count */
|
|
56
|
+
availableCount: number;
|
|
57
|
+
/** Availability status */
|
|
58
|
+
availability: StockAvailability;
|
|
59
|
+
/** Number of people interested in this variant */
|
|
60
|
+
interestedCount: number;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Add-on stock status at a specific event
|
|
64
|
+
*/
|
|
65
|
+
export interface AddOnStockStatusModelView {
|
|
66
|
+
/** Add-on ID */
|
|
67
|
+
addOnID: number;
|
|
68
|
+
/** Add-on name */
|
|
69
|
+
name?: string | null;
|
|
70
|
+
/** Maximum total quantity available */
|
|
71
|
+
maxTotalQuantity: number;
|
|
72
|
+
/** Number of units sold */
|
|
73
|
+
soldCount: number;
|
|
74
|
+
/** Remaining available count */
|
|
75
|
+
availableCount: number;
|
|
76
|
+
/** Availability status */
|
|
77
|
+
availability: StockAvailability;
|
|
78
|
+
/** Number of people interested in this add-on */
|
|
79
|
+
interestedCount: number;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=ProductStockStatusModelView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductStockStatusModelView.d.ts","sourceRoot":"","sources":["../../../../src/models/vendorcatalog/ModelView/ProductStockStatusModelView.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,oBAAY,iBAAiB;IAC3B,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,gBAAgB,EAAE,MAAM,CAAC;IACzB,2BAA2B;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,kDAAkD;IAClD,cAAc,EAAE,MAAM,CAAC;IACvB,gDAAgD;IAChD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,0BAA0B;IAC1B,YAAY,EAAE,iBAAiB,CAAC;IAChC,qEAAqE;IACrE,eAAe,EAAE,MAAM,CAAC;IACxB,wEAAwE;IACxE,YAAY,CAAC,EAAE,2BAA2B,EAAE,GAAG,IAAI,CAAC;IACpD,sEAAsE;IACtE,UAAU,CAAC,EAAE,yBAAyB,EAAE,GAAG,IAAI,CAAC;CACjD;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,oBAAoB;IACpB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,uCAAuC;IACvC,gBAAgB,EAAE,MAAM,CAAC;IACzB,2BAA2B;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,0BAA0B;IAC1B,YAAY,EAAE,iBAAiB,CAAC;IAChC,kDAAkD;IAClD,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,gBAAgB;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB;IAClB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,uCAAuC;IACvC,gBAAgB,EAAE,MAAM,CAAC;IACzB,2BAA2B;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,0BAA0B;IAC1B,YAAY,EAAE,iBAAiB,CAAC;IAChC,iDAAiD;IACjD,eAAe,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product Stock Status Model View
|
|
3
|
+
*
|
|
4
|
+
* Represents the stock availability status for a product at a specific event.
|
|
5
|
+
* Includes variant and add-on stock breakdowns, and interest counters.
|
|
6
|
+
* Maps to: CCMSLib.Models.VendorCatalog.ModelView.ProductStockStatusModelView
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Stock availability enum
|
|
10
|
+
*/
|
|
11
|
+
export var StockAvailability;
|
|
12
|
+
(function (StockAvailability) {
|
|
13
|
+
StockAvailability["Available"] = "Available";
|
|
14
|
+
StockAvailability["LowStock"] = "LowStock";
|
|
15
|
+
StockAvailability["SoldOut"] = "SoldOut";
|
|
16
|
+
})(StockAvailability || (StockAvailability = {}));
|
|
17
|
+
//# sourceMappingURL=ProductStockStatusModelView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductStockStatusModelView.js","sourceRoot":"","sources":["../../../../src/models/vendorcatalog/ModelView/ProductStockStatusModelView.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,CAAN,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,4CAAuB,CAAA;IACvB,0CAAqB,CAAA;IACrB,wCAAmB,CAAA;AACrB,CAAC,EAJW,iBAAiB,KAAjB,iBAAiB,QAI5B"}
|
|
@@ -7,11 +7,19 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { VendorProductMediaModelView } from './VendorProductMediaModelView';
|
|
9
9
|
import type { VendorProductVarientModelView } from './VendorProductVarientModelView';
|
|
10
|
+
import type { VendorProductAddOnModelView } from './VendorProductAddOnModelView';
|
|
11
|
+
import type { ProductStockStatusModelView } from './ProductStockStatusModelView';
|
|
10
12
|
export interface ShopEventProductModelView {
|
|
11
13
|
/** Product ID */
|
|
12
14
|
productID: number;
|
|
13
15
|
/** Vendor ID */
|
|
14
16
|
vendorID: number;
|
|
17
|
+
/** Vendor display name (TradingName or BusinessName) */
|
|
18
|
+
vendorName?: string | null;
|
|
19
|
+
/** Vendor bio/description */
|
|
20
|
+
vendorBio?: string | null;
|
|
21
|
+
/** Event ID (0 when not in event context) */
|
|
22
|
+
eventID: number;
|
|
15
23
|
/** Product name */
|
|
16
24
|
name?: string | null;
|
|
17
25
|
/** Product code/SKU */
|
|
@@ -52,5 +60,15 @@ export interface ShopEventProductModelView {
|
|
|
52
60
|
mediaFiles?: VendorProductMediaModelView[] | null;
|
|
53
61
|
/** Active product variants */
|
|
54
62
|
productVarients?: VendorProductVarientModelView[] | null;
|
|
63
|
+
/** Active product add-ons */
|
|
64
|
+
productAddOns?: VendorProductAddOnModelView[] | null;
|
|
65
|
+
/** Full stock status with variant/addon breakdown */
|
|
66
|
+
stockStatus?: ProductStockStatusModelView | null;
|
|
67
|
+
/** Stock display badge (e.g., "Sold Out", "Only 3 left", null if plenty) */
|
|
68
|
+
stockBadge?: string | null;
|
|
69
|
+
/** Whether the product is sold out */
|
|
70
|
+
isSoldOut?: boolean;
|
|
71
|
+
/** Whether the product is low on stock */
|
|
72
|
+
isLowStock?: boolean;
|
|
55
73
|
}
|
|
56
74
|
//# sourceMappingURL=ShopEventProductModelView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShopEventProductModelView.d.ts","sourceRoot":"","sources":["../../../../src/models/vendorcatalog/ModelView/ShopEventProductModelView.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"ShopEventProductModelView.d.ts","sourceRoot":"","sources":["../../../../src/models/vendorcatalog/ModelView/ShopEventProductModelView.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AACrF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAEjF,MAAM,WAAW,yBAAyB;IAExC,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,mBAAmB;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,uBAAuB;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,0BAA0B;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,2BAA2B;IAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,kCAAkC;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB,yBAAyB;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,iBAAiB,EAAE,OAAO,CAAC;IAC3B,6BAA6B;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IAGzB,wBAAwB;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGzB,0BAA0B;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAG3B,wBAAwB;IACxB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,6BAA6B;IAC7B,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGpC,0CAA0C;IAC1C,eAAe,EAAE,MAAM,CAAC;IACxB,mDAAmD;IACnD,gBAAgB,EAAE,MAAM,CAAC;IAGzB,gDAAgD;IAChD,YAAY,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,eAAe,EAAE,MAAM,CAAC;IACxB,mEAAmE;IACnE,iBAAiB,EAAE,MAAM,CAAC;IAG1B,uCAAuC;IACvC,UAAU,CAAC,EAAE,2BAA2B,EAAE,GAAG,IAAI,CAAC;IAGlD,8BAA8B;IAC9B,eAAe,CAAC,EAAE,6BAA6B,EAAE,GAAG,IAAI,CAAC;IAGzD,6BAA6B;IAC7B,aAAa,CAAC,EAAE,2BAA2B,EAAE,GAAG,IAAI,CAAC;IAGrD,qDAAqD;IACrD,WAAW,CAAC,EAAE,2BAA2B,GAAG,IAAI,CAAC;IACjD,4EAA4E;IAC5E,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,sCAAsC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -16,4 +16,5 @@ export * from './ShopEventProductModelView';
|
|
|
16
16
|
export * from './ShopEventCatalogModelView';
|
|
17
17
|
export * from './VendorProductAddOnModelView';
|
|
18
18
|
export * from './VendorProductAddOnCategoryModelView';
|
|
19
|
+
export * from './ProductStockStatusModelView';
|
|
19
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/vendorcatalog/ModelView/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/vendorcatalog/ModelView/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC"}
|
|
@@ -16,4 +16,5 @@ export * from './ShopEventProductModelView';
|
|
|
16
16
|
export * from './ShopEventCatalogModelView';
|
|
17
17
|
export * from './VendorProductAddOnModelView';
|
|
18
18
|
export * from './VendorProductAddOnCategoryModelView';
|
|
19
|
+
export * from './ProductStockStatusModelView';
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/vendorcatalog/ModelView/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/vendorcatalog/ModelView/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC"}
|
|
@@ -14,6 +14,8 @@ export interface VendorProductEventLimit {
|
|
|
14
14
|
maxQuantityPerOrder: number;
|
|
15
15
|
/** Maximum total quantity available for the product at the event */
|
|
16
16
|
maxTotalQuantity: number;
|
|
17
|
+
/** Number of units sold (confirmed orders) */
|
|
18
|
+
soldCount: number;
|
|
17
19
|
/** Creation timestamp (yyyyMMddHHmmss) */
|
|
18
20
|
createdDateTime: number;
|
|
19
21
|
/** Last modification timestamp (yyyyMMddHHmmss) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VendorProductEventLimit.d.ts","sourceRoot":"","sources":["../../../src/models/vendorcatalog/VendorProductEventLimit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IAEtC,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAEhB,sEAAsE;IACtE,mBAAmB,EAAE,MAAM,CAAC;IAC5B,oEAAoE;IACpE,gBAAgB,EAAE,MAAM,CAAC;IACzB,0CAA0C;IAC1C,eAAe,EAAE,MAAM,CAAC;IACxB,mDAAmD;IACnD,gBAAgB,EAAE,MAAM,CAAC;CAC1B"}
|
|
1
|
+
{"version":3,"file":"VendorProductEventLimit.d.ts","sourceRoot":"","sources":["../../../src/models/vendorcatalog/VendorProductEventLimit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IAEtC,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAEhB,sEAAsE;IACtE,mBAAmB,EAAE,MAAM,CAAC;IAC5B,oEAAoE;IACpE,gBAAgB,EAAE,MAAM,CAAC;IACzB,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,eAAe,EAAE,MAAM,CAAC;IACxB,mDAAmD;IACnD,gBAAgB,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -21,6 +21,8 @@ export * from './VendorProductRule';
|
|
|
21
21
|
export * from './VendorProductAddOn';
|
|
22
22
|
export * from './VendorProductAddOnCategory';
|
|
23
23
|
export * from './VendorProductVariantCategory';
|
|
24
|
+
export * from './EventVariantStock';
|
|
25
|
+
export * from './EventAddOnStock';
|
|
24
26
|
export * from './VariantTypes';
|
|
25
27
|
export * from './ModelView';
|
|
26
28
|
export * from './CacheKeys';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/vendorcatalog/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/vendorcatalog/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,aAAa,CAAC;AAG5B,cAAc,aAAa,CAAC"}
|
|
@@ -22,6 +22,8 @@ export * from './VendorProductRule';
|
|
|
22
22
|
export * from './VendorProductAddOn';
|
|
23
23
|
export * from './VendorProductAddOnCategory';
|
|
24
24
|
export * from './VendorProductVariantCategory';
|
|
25
|
+
export * from './EventVariantStock';
|
|
26
|
+
export * from './EventAddOnStock';
|
|
25
27
|
// Predefined Variant Types (Food & Drinks Industry)
|
|
26
28
|
export * from './VariantTypes';
|
|
27
29
|
// ModelViews
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/vendorcatalog/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,gBAAgB;AAChB,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/vendorcatalog/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,gBAAgB;AAChB,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAElC,oDAAoD;AACpD,cAAc,gBAAgB,CAAC;AAE/B,aAAa;AACb,cAAc,aAAa,CAAC;AAE5B,YAAY;AACZ,cAAc,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,WAAW,CAAC;AAG1B,cAAc,UAAU,CAAC;AAGzB,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oDAAoD,CAAC;AAGnE,cAAc,eAAe,CAAC;AAG9B,cAAc,aAAa,CAAC;AAG5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAGlC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,WAAW,CAAC;AAG1B,cAAc,UAAU,CAAC;AAGzB,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oDAAoD,CAAC;AAGnE,cAAc,eAAe,CAAC;AAG9B,cAAc,aAAa,CAAC;AAG5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAGlC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,4BAA4B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react/hooks/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,iBAAiB;AACjB,cAAc,WAAW,CAAC;AAE1B,YAAY;AACZ,cAAc,UAAU,CAAC;AAEzB,yBAAyB;AACzB,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oDAAoD,CAAC;AAEnE,iBAAiB;AACjB,cAAc,eAAe,CAAC;AAE9B,eAAe;AACf,cAAc,aAAa,CAAC;AAE5B,gBAAgB;AAChB,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAElC,uBAAuB;AACvB,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react/hooks/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,iBAAiB;AACjB,cAAc,WAAW,CAAC;AAE1B,YAAY;AACZ,cAAc,UAAU,CAAC;AAEzB,yBAAyB;AACzB,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oDAAoD,CAAC;AAEnE,iBAAiB;AACjB,cAAc,eAAe,CAAC;AAE9B,eAAe;AACf,cAAc,aAAa,CAAC;AAE5B,gBAAgB;AAChB,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAElC,uBAAuB;AACvB,cAAc,oBAAoB,CAAC;AAEnC,gCAAgC;AAChC,cAAc,4BAA4B,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Vendor Catalog Service Hooks
|
|
3
3
|
* React hooks for accessing vendor catalog management services
|
|
4
4
|
*/
|
|
5
|
-
import { VendorCatalogServices, VendorProductService, VendorProductTypeService, VendorProductStatusService, VendorProductMediaTypeService, VendorProductCategoryService, VendorProductVarientService, VendorProductMediaService, VendorProductRuleService, VendorProductAnalyticService, VendorProductEventLimitService, VendorProductLogService, VendorCatalogShopService, VendorProductAddOnService, VendorProductAddOnCategoryService, VendorProductVariantCategoryService } from '../../../services/vendorcatalog';
|
|
5
|
+
import { VendorCatalogServices, VendorProductService, VendorProductTypeService, VendorProductStatusService, VendorProductMediaTypeService, VendorProductCategoryService, VendorProductVarientService, VendorProductMediaService, VendorProductRuleService, VendorProductAnalyticService, VendorProductEventLimitService, VendorProductLogService, VendorCatalogShopService, VendorProductAddOnService, VendorProductAddOnCategoryService, VendorProductVariantCategoryService, StockShopService, StockPortalService } from '../../../services/vendorcatalog';
|
|
6
6
|
/**
|
|
7
7
|
* Hook to access all vendor catalog-related services
|
|
8
8
|
* @returns VendorCatalogServices object containing all vendor catalog service instances
|
|
@@ -68,4 +68,12 @@ export declare function useVendorProductAddOnCategoryService(): VendorProductAdd
|
|
|
68
68
|
* Hook to access VendorProductVariantCategoryService
|
|
69
69
|
*/
|
|
70
70
|
export declare function useVendorProductVariantCategoryService(): VendorProductVariantCategoryService;
|
|
71
|
+
/**
|
|
72
|
+
* Hook to access StockShopService (public stock status, cart validation, interest tracking)
|
|
73
|
+
*/
|
|
74
|
+
export declare function useStockShopService(): StockShopService;
|
|
75
|
+
/**
|
|
76
|
+
* Hook to access StockPortalService (vendor stock management)
|
|
77
|
+
*/
|
|
78
|
+
export declare function useStockPortalService(): StockPortalService;
|
|
71
79
|
//# sourceMappingURL=useVendorCatalogServices.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVendorCatalogServices.d.ts","sourceRoot":"","sources":["../../../../src/react/hooks/services/useVendorCatalogServices.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,0BAA0B,EAC1B,6BAA6B,EAC7B,4BAA4B,EAC5B,2BAA2B,EAC3B,yBAAyB,EACzB,wBAAwB,EACxB,4BAA4B,EAC5B,8BAA8B,EAC9B,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,iCAAiC,EACjC,mCAAmC,
|
|
1
|
+
{"version":3,"file":"useVendorCatalogServices.d.ts","sourceRoot":"","sources":["../../../../src/react/hooks/services/useVendorCatalogServices.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,0BAA0B,EAC1B,6BAA6B,EAC7B,4BAA4B,EAC5B,2BAA2B,EAC3B,yBAAyB,EACzB,wBAAwB,EACxB,4BAA4B,EAC5B,8BAA8B,EAC9B,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,iCAAiC,EACjC,mCAAmC,EACnC,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,iCAAiC,CAAC;AAEzC;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,qBAAqB,CAMhE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,oBAAoB,CAE9D;AAED;;GAEG;AACH,wBAAgB,2BAA2B,IAAI,wBAAwB,CAEtE;AAED;;GAEG;AACH,wBAAgB,6BAA6B,IAAI,0BAA0B,CAE1E;AAED;;GAEG;AACH,wBAAgB,gCAAgC,IAAI,6BAA6B,CAEhF;AAED;;GAEG;AACH,wBAAgB,+BAA+B,IAAI,4BAA4B,CAE9E;AAED;;GAEG;AACH,wBAAgB,8BAA8B,IAAI,2BAA2B,CAE5E;AAED;;GAEG;AACH,wBAAgB,4BAA4B,IAAI,yBAAyB,CAExE;AAED;;GAEG;AACH,wBAAgB,2BAA2B,IAAI,wBAAwB,CAEtE;AAED;;GAEG;AACH,wBAAgB,+BAA+B,IAAI,4BAA4B,CAE9E;AAED;;GAEG;AACH,wBAAgB,iCAAiC,IAAI,8BAA8B,CAElF;AAED;;GAEG;AACH,wBAAgB,0BAA0B,IAAI,uBAAuB,CAEpE;AAED;;GAEG;AACH,wBAAgB,2BAA2B,IAAI,wBAAwB,CAEtE;AAED;;GAEG;AACH,wBAAgB,4BAA4B,IAAI,yBAAyB,CAExE;AAED;;GAEG;AACH,wBAAgB,oCAAoC,IAAI,iCAAiC,CAExF;AAED;;GAEG;AACH,wBAAgB,sCAAsC,IAAI,mCAAmC,CAE5F;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,gBAAgB,CAEtD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,kBAAkB,CAE1D"}
|
|
@@ -104,4 +104,16 @@ export function useVendorProductAddOnCategoryService() {
|
|
|
104
104
|
export function useVendorProductVariantCategoryService() {
|
|
105
105
|
return useVendorCatalogServices().vendorProductVariantCategory;
|
|
106
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* Hook to access StockShopService (public stock status, cart validation, interest tracking)
|
|
109
|
+
*/
|
|
110
|
+
export function useStockShopService() {
|
|
111
|
+
return useVendorCatalogServices().stockShop;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Hook to access StockPortalService (vendor stock management)
|
|
115
|
+
*/
|
|
116
|
+
export function useStockPortalService() {
|
|
117
|
+
return useVendorCatalogServices().stockPortal;
|
|
118
|
+
}
|
|
107
119
|
//# sourceMappingURL=useVendorCatalogServices.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVendorCatalogServices.js","sourceRoot":"","sources":["../../../../src/react/hooks/services/useVendorCatalogServices.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"useVendorCatalogServices.js","sourceRoot":"","sources":["../../../../src/react/hooks/services/useVendorCatalogServices.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAsBrC;;;GAGG;AACH,MAAM,UAAU,wBAAwB;IACtC,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,CAAC;IAC/B,IAAI,CAAC,QAAQ,EAAE,aAAa,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,wGAAwG,CAAC,CAAC;IAC5H,CAAC;IACD,OAAO,QAAQ,CAAC,aAAa,CAAC;AAChC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB;IACrC,OAAO,wBAAwB,EAAE,CAAC,aAAa,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,2BAA2B;IACzC,OAAO,wBAAwB,EAAE,CAAC,iBAAiB,CAAC;AACtD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,6BAA6B;IAC3C,OAAO,wBAAwB,EAAE,CAAC,mBAAmB,CAAC;AACxD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gCAAgC;IAC9C,OAAO,wBAAwB,EAAE,CAAC,sBAAsB,CAAC;AAC3D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,+BAA+B;IAC7C,OAAO,wBAAwB,EAAE,CAAC,qBAAqB,CAAC;AAC1D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,8BAA8B;IAC5C,OAAO,wBAAwB,EAAE,CAAC,oBAAoB,CAAC;AACzD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,4BAA4B;IAC1C,OAAO,wBAAwB,EAAE,CAAC,kBAAkB,CAAC;AACvD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,2BAA2B;IACzC,OAAO,wBAAwB,EAAE,CAAC,iBAAiB,CAAC;AACtD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,+BAA+B;IAC7C,OAAO,wBAAwB,EAAE,CAAC,qBAAqB,CAAC;AAC1D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iCAAiC;IAC/C,OAAO,wBAAwB,EAAE,CAAC,uBAAuB,CAAC;AAC5D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,0BAA0B;IACxC,OAAO,wBAAwB,EAAE,CAAC,gBAAgB,CAAC;AACrD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,2BAA2B;IACzC,OAAO,wBAAwB,EAAE,CAAC,iBAAiB,CAAC;AACtD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,4BAA4B;IAC1C,OAAO,wBAAwB,EAAE,CAAC,kBAAkB,CAAC;AACvD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oCAAoC;IAClD,OAAO,wBAAwB,EAAE,CAAC,0BAA0B,CAAC;AAC/D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sCAAsC;IACpD,OAAO,wBAAwB,EAAE,CAAC,4BAA4B,CAAC;AACjE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO,wBAAwB,EAAE,CAAC,SAAS,CAAC;AAC9C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB;IACnC,OAAO,wBAAwB,EAAE,CAAC,WAAW,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useEventProductStreaming Hook
|
|
3
|
+
* React hook for auto-paginated streaming of event products.
|
|
4
|
+
* Fetches all products for an event in batches, updating the UI progressively.
|
|
5
|
+
*/
|
|
6
|
+
import type { ShopEventProductModelView } from '../../models/vendorcatalog';
|
|
7
|
+
/**
|
|
8
|
+
* Hook return type
|
|
9
|
+
*/
|
|
10
|
+
export interface UseEventProductStreamingReturn {
|
|
11
|
+
/** Loaded products (accumulates as batches arrive) */
|
|
12
|
+
products: ShopEventProductModelView[];
|
|
13
|
+
/** Whether data is currently being fetched */
|
|
14
|
+
isLoading: boolean;
|
|
15
|
+
/** Whether all pages have been loaded */
|
|
16
|
+
isDone: boolean;
|
|
17
|
+
/** Progress percentage (0-100) */
|
|
18
|
+
progress: number;
|
|
19
|
+
/** Number of products loaded so far */
|
|
20
|
+
loadedCount: number;
|
|
21
|
+
/** Total number of products available (from server) */
|
|
22
|
+
totalCount: number;
|
|
23
|
+
/** Error if loading failed */
|
|
24
|
+
error: Error | null;
|
|
25
|
+
/** Start loading products */
|
|
26
|
+
load: () => Promise<void>;
|
|
27
|
+
/** Reset state and clear loaded products */
|
|
28
|
+
reset: () => void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* React hook for streaming event products with auto-pagination.
|
|
32
|
+
* Loads products in batches from the server, progressively updating the UI
|
|
33
|
+
* as each batch arrives.
|
|
34
|
+
*
|
|
35
|
+
* @param eventId - The event ID to fetch products for
|
|
36
|
+
* @param batchSize - Number of products per batch (default: 10)
|
|
37
|
+
* @returns Hook return object with products, loading state, and control functions
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* function EventProductList({ eventId }: { eventId: number }) {
|
|
42
|
+
* const {
|
|
43
|
+
* products,
|
|
44
|
+
* isLoading,
|
|
45
|
+
* isDone,
|
|
46
|
+
* progress,
|
|
47
|
+
* loadedCount,
|
|
48
|
+
* totalCount,
|
|
49
|
+
* error,
|
|
50
|
+
* load,
|
|
51
|
+
* reset,
|
|
52
|
+
* } = useEventProductStreaming(eventId, 10);
|
|
53
|
+
*
|
|
54
|
+
* useEffect(() => {
|
|
55
|
+
* load();
|
|
56
|
+
* }, [eventId]);
|
|
57
|
+
*
|
|
58
|
+
* return (
|
|
59
|
+
* <div>
|
|
60
|
+
* {isLoading && <ProgressBar value={progress} />}
|
|
61
|
+
* {error && <p>Error: {error.message}</p>}
|
|
62
|
+
* <p>{loadedCount} of {totalCount} products loaded</p>
|
|
63
|
+
* <div className="product-grid">
|
|
64
|
+
* {products.map(product => (
|
|
65
|
+
* <ProductCard key={product.productID} product={product} />
|
|
66
|
+
* ))}
|
|
67
|
+
* </div>
|
|
68
|
+
* {isDone && <p>All products loaded!</p>}
|
|
69
|
+
* </div>
|
|
70
|
+
* );
|
|
71
|
+
* }
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
export declare function useEventProductStreaming(eventId: number, batchSize?: number): UseEventProductStreamingReturn;
|
|
75
|
+
//# sourceMappingURL=useEventProductStreaming.d.ts.map
|