@innvoid/getmarket-contracts 0.1.8 → 0.1.9

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.
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-7TADTTEV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-RWL4ZMMB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// packages/contracts/src/index.ts\nexport * from \"./common\";\nexport * from \"./auth\";\nexport * from \"./platform\";\nexport * from \"./md\";\nexport * from \"./res\";\nexport * from \"./fis\";\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// packages/contracts/src/index.ts\nexport * from \"./common\";\nexport * from \"./auth\";\nexport * from \"./platform\";\nexport * from \"./md\";\nexport * from \"./res\";\nexport * from \"./fis\";\nexport * from \"./media\";\nexport * from \"./mkp\";\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
package/dist/index.d.cts CHANGED
@@ -4,3 +4,5 @@ export { PlatformResolveTenantResponse, PlatformServiceCode, PlatformTenantResol
4
4
  export { MdCommuneRef, MdCommunesRefsRequest, MdCommunesRefsResponse, MdCountriesRefsRequest, MdCountriesRefsResponse, MdCountryRef, MdCurrenciesRefsRequest, MdCurrenciesRefsResponse, MdCurrencyRef, MdMeasureRef, MdMeasureTypeRef, MdMeasureTypesRefsRequest, MdMeasureTypesRefsResponse, MdMeasuresRefsRequest, MdMeasuresRefsResponse, MdRegionRef, MdRegionsRefsRequest, MdRegionsRefsResponse, MdUnitRef, MdUnitsRefsRequest, MdUnitsRefsResponse } from './md.cjs';
5
5
  export { ResAttributeMeasureTypeRef, ResAttributeOptionRef, ResAttributeOptionsRefsRequest, ResAttributeOptionsRefsResponse, ResAttributeRef, ResAttributeType, ResAttributeValueRef, ResAttributeValuesRefsRequest, ResAttributeValuesRefsResponse, ResAttributesRefsRequest, ResAttributesRefsResponse, ResCategoriesRefsRequest, ResCategoriesRefsResponse, ResCategoryRef, ResResourceRef, ResResourcesRefsRequest, ResResourcesRefsResponse, ResVarietiesRefsRequest, ResVarietiesRefsResponse, ResVarietyRef } from './res.cjs';
6
6
  export { FisCancelRequest, FisCancelResponse, FisDirection, FisDocLifecycleStatus, FisDocType, FisDocumentTotalsSnapshot, FisDocumentsRefsRequest, FisDocumentsRefsResponse, FisFiscalDocumentRef, FisIssueRequest, FisIssueResponse, FisLineForTaxCalc, FisRate, FisRoundingMode, FisStatus, FisSubmissionRef, FisSubmissionStatus, FisSubmissionStatusResponse, FisSubmissionsRefsRequest, FisSubmissionsRefsResponse, FisSubmitRequest, FisSubmitResponse, FisTaxCalculateRequest, FisTaxCalculateResponse, FisTaxCalculationSnapshot, FisTaxLineSnapshot, FisTaxRef, FisTaxRule, FisTaxRuleTarget, FisTaxType, FisTaxesRefsRequest, FisTaxesRefsResponse } from './fis.cjs';
7
+ export { MediaFileRef, MediaFileTypeCategory, MediaFileTypeRef, MediaFileTypesRefsRequest, MediaFileTypesRefsResponse, MediaFilesRefsRequest, MediaFilesRefsResponse, MediaVariantRef, MediaVisibility } from './media.cjs';
8
+ export { MkpArtistRef, MkpCartItemRef, MkpCartRef, MkpCartStatus, MkpEventArtistRef, MkpEventAttendanceRef, MkpEventMediaRef, MkpEventProgramRef, MkpEventRef, MkpEventStatus, MkpEventZoneAccessRef, MkpEventZoneRef, MkpEventsRefsRequest, MkpEventsRefsResponse, MkpOfferType, MkpPromotionInventoryRef, MkpPromotionMediaRef, MkpPromotionRef, MkpPromotionStatus, MkpPromotionsRefsRequest, MkpPromotionsRefsResponse, MkpPublicationMediaRef, MkpPublicationRef, MkpPublicationStatus, MkpPublicationsRefsRequest, MkpPublicationsRefsResponse, MkpTicketRef, MkpTicketTypeRef } from './mkp.cjs';
package/dist/index.d.ts CHANGED
@@ -4,3 +4,5 @@ export { PlatformResolveTenantResponse, PlatformServiceCode, PlatformTenantResol
4
4
  export { MdCommuneRef, MdCommunesRefsRequest, MdCommunesRefsResponse, MdCountriesRefsRequest, MdCountriesRefsResponse, MdCountryRef, MdCurrenciesRefsRequest, MdCurrenciesRefsResponse, MdCurrencyRef, MdMeasureRef, MdMeasureTypeRef, MdMeasureTypesRefsRequest, MdMeasureTypesRefsResponse, MdMeasuresRefsRequest, MdMeasuresRefsResponse, MdRegionRef, MdRegionsRefsRequest, MdRegionsRefsResponse, MdUnitRef, MdUnitsRefsRequest, MdUnitsRefsResponse } from './md.js';
5
5
  export { ResAttributeMeasureTypeRef, ResAttributeOptionRef, ResAttributeOptionsRefsRequest, ResAttributeOptionsRefsResponse, ResAttributeRef, ResAttributeType, ResAttributeValueRef, ResAttributeValuesRefsRequest, ResAttributeValuesRefsResponse, ResAttributesRefsRequest, ResAttributesRefsResponse, ResCategoriesRefsRequest, ResCategoriesRefsResponse, ResCategoryRef, ResResourceRef, ResResourcesRefsRequest, ResResourcesRefsResponse, ResVarietiesRefsRequest, ResVarietiesRefsResponse, ResVarietyRef } from './res.js';
6
6
  export { FisCancelRequest, FisCancelResponse, FisDirection, FisDocLifecycleStatus, FisDocType, FisDocumentTotalsSnapshot, FisDocumentsRefsRequest, FisDocumentsRefsResponse, FisFiscalDocumentRef, FisIssueRequest, FisIssueResponse, FisLineForTaxCalc, FisRate, FisRoundingMode, FisStatus, FisSubmissionRef, FisSubmissionStatus, FisSubmissionStatusResponse, FisSubmissionsRefsRequest, FisSubmissionsRefsResponse, FisSubmitRequest, FisSubmitResponse, FisTaxCalculateRequest, FisTaxCalculateResponse, FisTaxCalculationSnapshot, FisTaxLineSnapshot, FisTaxRef, FisTaxRule, FisTaxRuleTarget, FisTaxType, FisTaxesRefsRequest, FisTaxesRefsResponse } from './fis.js';
7
+ export { MediaFileRef, MediaFileTypeCategory, MediaFileTypeRef, MediaFileTypesRefsRequest, MediaFileTypesRefsResponse, MediaFilesRefsRequest, MediaFilesRefsResponse, MediaVariantRef, MediaVisibility } from './media.js';
8
+ export { MkpArtistRef, MkpCartItemRef, MkpCartRef, MkpCartStatus, MkpEventArtistRef, MkpEventAttendanceRef, MkpEventMediaRef, MkpEventProgramRef, MkpEventRef, MkpEventStatus, MkpEventZoneAccessRef, MkpEventZoneRef, MkpEventsRefsRequest, MkpEventsRefsResponse, MkpOfferType, MkpPromotionInventoryRef, MkpPromotionMediaRef, MkpPromotionRef, MkpPromotionStatus, MkpPromotionsRefsRequest, MkpPromotionsRefsResponse, MkpPublicationMediaRef, MkpPublicationRef, MkpPublicationStatus, MkpPublicationsRefsRequest, MkpPublicationsRefsResponse, MkpTicketRef, MkpTicketTypeRef } from './mkp.js';
package/dist/index.js CHANGED
@@ -1,7 +1,9 @@
1
+ import "./chunk-7TADTTEV.js";
1
2
  import "./chunk-5CHG5ZVH.js";
2
3
  import "./chunk-GYQ2KZV6.js";
3
4
  import "./chunk-PAA2WCJ2.js";
4
5
  import "./chunk-EAJW72VX.js";
5
6
  import "./chunk-PDYRRMMO.js";
6
7
  import "./chunk-YLVXY5BQ.js";
8
+ import "./chunk-RWL4ZMMB.js";
7
9
  //# sourceMappingURL=index.js.map
package/dist/media.cjs ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/media.ts
17
+ var media_exports = {};
18
+ module.exports = __toCommonJS(media_exports);
19
+ //# sourceMappingURL=media.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/media.ts"],"sourcesContent":["// packages/contracts/src/media.ts\nimport type { UID, Code, RefBase, BulkUidsRequest, BulkRefsResponse } from \"./common\";\n\n/**\n * MEDIA is SoT for files/assets (images, videos, documents, etc.).\n * Other services only store media_file_uid in their own tables.\n *\n * Conventions:\n * - media_file_uid: UID of MediaFile\n * - media_file_type_code: stable code for the type (IMAGE, VIDEO, PDF, DOCX, XLSX, ...)\n */\n\n// ------------------------------------\n// File Type\n// ------------------------------------\nexport type MediaFileTypeCategory =\n | \"IMAGE\"\n | \"VIDEO\"\n | \"AUDIO\"\n | \"DOCUMENT\"\n | \"ARCHIVE\"\n | \"OTHER\"\n | (string & {});\n\nexport type MediaFileTypeRef = RefBase & {\n uid: UID; // media_file_type_uid\n code: Code; // IMAGE, VIDEO, PDF, DOCX, XLSX, ZIP, ...\n category?: MediaFileTypeCategory;\n\n // optional hints\n mime?: string; // image/png, application/pdf, ...\n extensions?: string[]; // [\"png\",\"jpg\"]\n status?: \"ACTIVE\" | \"INACTIVE\" | string;\n};\n\n// ------------------------------------\n// File (Asset)\n// ------------------------------------\nexport type MediaVisibility = \"PUBLIC\" | \"PRIVATE\" | \"SIGNED\" | (string & {});\n\nexport type MediaVariantRef = {\n name: Code; // \"original\", \"thumb\", \"small\", \"web\", ...\n url: string;\n width?: number | null;\n height?: number | null;\n size_bytes?: number | null;\n};\n\nexport type MediaFileRef = RefBase & {\n uid: UID; // media_file_uid\n type_uid?: UID | null; // media_file_type_uid (optional if you rely on code)\n type_code?: Code | null; // IMAGE, PDF, ...\n\n // storage\n bucket?: string | null;\n path?: string | null;\n\n // content metadata\n mime?: string | null;\n size_bytes?: number | null;\n sha256?: string | null;\n\n // access\n visibility?: MediaVisibility;\n url?: string | null; // optional public/signed URL (if provided)\n variants?: MediaVariantRef[]; // thumbnails / transcoded versions\n\n // generic metadata\n meta?: Record<string, any>;\n\n status?: \"ACTIVE\" | \"DELETED\" | \"INACTIVE\" | string;\n};\n\n// ------------------------------------\n// Bulk refs endpoints (internal)\n// ------------------------------------\nexport type MediaFilesRefsRequest = BulkUidsRequest;\nexport type MediaFilesRefsResponse = BulkRefsResponse<MediaFileRef>;\n\nexport type MediaFileTypesRefsRequest = BulkUidsRequest;\nexport type MediaFileTypesRefsResponse = BulkRefsResponse<MediaFileTypeRef>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,48 @@
1
+ import { RefBase, UID, Code, BulkUidsRequest, BulkRefsResponse } from './common.cjs';
2
+
3
+ /**
4
+ * MEDIA is SoT for files/assets (images, videos, documents, etc.).
5
+ * Other services only store media_file_uid in their own tables.
6
+ *
7
+ * Conventions:
8
+ * - media_file_uid: UID of MediaFile
9
+ * - media_file_type_code: stable code for the type (IMAGE, VIDEO, PDF, DOCX, XLSX, ...)
10
+ */
11
+ type MediaFileTypeCategory = "IMAGE" | "VIDEO" | "AUDIO" | "DOCUMENT" | "ARCHIVE" | "OTHER" | (string & {});
12
+ type MediaFileTypeRef = RefBase & {
13
+ uid: UID;
14
+ code: Code;
15
+ category?: MediaFileTypeCategory;
16
+ mime?: string;
17
+ extensions?: string[];
18
+ status?: "ACTIVE" | "INACTIVE" | string;
19
+ };
20
+ type MediaVisibility = "PUBLIC" | "PRIVATE" | "SIGNED" | (string & {});
21
+ type MediaVariantRef = {
22
+ name: Code;
23
+ url: string;
24
+ width?: number | null;
25
+ height?: number | null;
26
+ size_bytes?: number | null;
27
+ };
28
+ type MediaFileRef = RefBase & {
29
+ uid: UID;
30
+ type_uid?: UID | null;
31
+ type_code?: Code | null;
32
+ bucket?: string | null;
33
+ path?: string | null;
34
+ mime?: string | null;
35
+ size_bytes?: number | null;
36
+ sha256?: string | null;
37
+ visibility?: MediaVisibility;
38
+ url?: string | null;
39
+ variants?: MediaVariantRef[];
40
+ meta?: Record<string, any>;
41
+ status?: "ACTIVE" | "DELETED" | "INACTIVE" | string;
42
+ };
43
+ type MediaFilesRefsRequest = BulkUidsRequest;
44
+ type MediaFilesRefsResponse = BulkRefsResponse<MediaFileRef>;
45
+ type MediaFileTypesRefsRequest = BulkUidsRequest;
46
+ type MediaFileTypesRefsResponse = BulkRefsResponse<MediaFileTypeRef>;
47
+
48
+ export type { MediaFileRef, MediaFileTypeCategory, MediaFileTypeRef, MediaFileTypesRefsRequest, MediaFileTypesRefsResponse, MediaFilesRefsRequest, MediaFilesRefsResponse, MediaVariantRef, MediaVisibility };
@@ -0,0 +1,48 @@
1
+ import { RefBase, UID, Code, BulkUidsRequest, BulkRefsResponse } from './common.js';
2
+
3
+ /**
4
+ * MEDIA is SoT for files/assets (images, videos, documents, etc.).
5
+ * Other services only store media_file_uid in their own tables.
6
+ *
7
+ * Conventions:
8
+ * - media_file_uid: UID of MediaFile
9
+ * - media_file_type_code: stable code for the type (IMAGE, VIDEO, PDF, DOCX, XLSX, ...)
10
+ */
11
+ type MediaFileTypeCategory = "IMAGE" | "VIDEO" | "AUDIO" | "DOCUMENT" | "ARCHIVE" | "OTHER" | (string & {});
12
+ type MediaFileTypeRef = RefBase & {
13
+ uid: UID;
14
+ code: Code;
15
+ category?: MediaFileTypeCategory;
16
+ mime?: string;
17
+ extensions?: string[];
18
+ status?: "ACTIVE" | "INACTIVE" | string;
19
+ };
20
+ type MediaVisibility = "PUBLIC" | "PRIVATE" | "SIGNED" | (string & {});
21
+ type MediaVariantRef = {
22
+ name: Code;
23
+ url: string;
24
+ width?: number | null;
25
+ height?: number | null;
26
+ size_bytes?: number | null;
27
+ };
28
+ type MediaFileRef = RefBase & {
29
+ uid: UID;
30
+ type_uid?: UID | null;
31
+ type_code?: Code | null;
32
+ bucket?: string | null;
33
+ path?: string | null;
34
+ mime?: string | null;
35
+ size_bytes?: number | null;
36
+ sha256?: string | null;
37
+ visibility?: MediaVisibility;
38
+ url?: string | null;
39
+ variants?: MediaVariantRef[];
40
+ meta?: Record<string, any>;
41
+ status?: "ACTIVE" | "DELETED" | "INACTIVE" | string;
42
+ };
43
+ type MediaFilesRefsRequest = BulkUidsRequest;
44
+ type MediaFilesRefsResponse = BulkRefsResponse<MediaFileRef>;
45
+ type MediaFileTypesRefsRequest = BulkUidsRequest;
46
+ type MediaFileTypesRefsResponse = BulkRefsResponse<MediaFileTypeRef>;
47
+
48
+ export type { MediaFileRef, MediaFileTypeCategory, MediaFileTypeRef, MediaFileTypesRefsRequest, MediaFileTypesRefsResponse, MediaFilesRefsRequest, MediaFilesRefsResponse, MediaVariantRef, MediaVisibility };
package/dist/media.js ADDED
@@ -0,0 +1,2 @@
1
+ import "./chunk-RWL4ZMMB.js";
2
+ //# sourceMappingURL=media.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/dist/mkp.cjs ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/mkp.ts
17
+ var mkp_exports = {};
18
+ module.exports = __toCommonJS(mkp_exports);
19
+ //# sourceMappingURL=mkp.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/mkp.ts"],"sourcesContent":["// packages/contracts/src/mkp.ts\nimport type {UID, Code, RefBase, BulkUidsRequest, BulkRefsResponse} from \"./common\";\n\n/**\n * MARKETPLACE (MKP) domain.\n * Includes: listings/offers/publications, cart, promotions, events, ticketing.\n *\n * References:\n * - auth_*_uid : AUTH\n * - res_*_uid : RESOURCE\n * - media_file_uid : MEDIA\n */\n\n// ------------------------------------\n// Cart\n// ------------------------------------\nexport type MkpCartStatus = \"OPEN\" | \"CHECKED_OUT\" | \"ABANDONED\" | \"CLOSED\" | (string & {});\n\nexport type MkpCartRef = RefBase & {\n uid: UID; // mkp_cart_uid\n auth_customer_uid?: UID | null;\n auth_branch_uid?: UID | null; // context branch (optional)\n status?: MkpCartStatus;\n created_at?: string;\n};\n\nexport type MkpCartItemRef = RefBase & {\n uid: UID; // mkp_cart_item_uid\n cart_uid: UID; // mkp_cart_uid\n res_variety_uid: UID; // RES\n quantity: number;\n\n // optional: snapshot pricing (not SoT; ERP/PRICING may be later)\n price_snapshot?: number | null;\n currency_code_snapshot?: Code | null;\n};\n\n// ------------------------------------\n// Publication / Listing / Offer\n// ------------------------------------\nexport type MkpPublicationStatus =\n | \"DRAFT\"\n | \"ACTIVE\"\n | \"PAUSED\"\n | \"SOLD_OUT\"\n | \"CLOSED\"\n | \"BANNED\"\n | (string & {});\n\nexport type MkpOfferType = \"SELL\" | \"BUY\" | \"SERVICE\" | (string & {});\n\nexport type MkpPublicationRef = RefBase & {\n uid: UID; // mkp_publication_uid\n status?: MkpPublicationStatus;\n offer_type?: MkpOfferType;\n\n // who publishes\n auth_company_uid?: UID | null;\n auth_branch_uid?: UID | null;\n auth_employee_uid?: UID | null;\n auth_customer_uid?: UID | null;\n\n // what is being offered (Resource)\n res_resource_uid?: UID | null;\n res_variety_uid?: UID | null;\n\n // listing data\n title?: string | null;\n description?: string | null;\n sku?: string | null;\n\n // pricing\n price?: number | null;\n currency_code?: Code | null;\n\n // stock hint (optional; actual stock may live in ERP inventory)\n stock_quantity?: number | null;\n\n // location hints (MD)\n md_country_uid?: UID | null;\n md_region_uid?: UID | null;\n md_commune_uid?: UID | null;\n\n // media cover (optional)\n cover_media_file_uid?: UID | null;\n\n created_at?: string;\n updated_at?: string;\n};\n\nexport type MkpPublicationMediaRef = RefBase & {\n uid: UID; // mkp_publication_media_uid\n publication_uid: UID; // mkp_publication_uid\n media_file_uid: UID; // MEDIA\n correlative: number; // ✅ ordering (required)\n};\n\n// ------------------------------------\n// Promotions\n// ------------------------------------\nexport type MkpPromotionStatus = \"DRAFT\" | \"ACTIVE\" | \"PAUSED\" | \"FINISHED\" | (string & {});\n\nexport type MkpPromotionRef = RefBase & {\n uid: UID; // mkp_promotion_uid\n status?: MkpPromotionStatus;\n\n title?: string | null;\n description?: string | null;\n\n starts_at?: string | null;\n ends_at?: string | null;\n\n auth_company_uid?: UID | null;\n auth_branch_uid?: UID | null;\n};\n\nexport type MkpPromotionMediaRef = RefBase & {\n uid: UID; // mkp_promotion_media_uid\n promotion_uid: UID; // mkp_promotion_uid\n media_file_uid: UID; // MEDIA\n correlative: number; // ✅ ordering (required)\n};\n\n// If you have “promotion_inventory” today, keep it as local link.\n// Inventory is ERP-local (id) for now; later can evolve to erp_inventory_uid if you create it.\nexport type MkpPromotionInventoryRef = RefBase & {\n uid: UID; // mkp_promotion_inventory_uid\n promotion_uid: UID;\n erp_inventory_id?: number | null; // local numeric id (ERP DB)\n status?: \"ACTIVE\" | \"INACTIVE\" | string;\n};\n\n// ------------------------------------\n// Events / Ticketing\n// ------------------------------------\nexport type MkpEventStatus = \"DRAFT\" | \"ACTIVE\" | \"PAUSED\" | \"CANCELLED\" | \"FINISHED\" | (string & {});\n\nexport type MkpEventRef = RefBase & {\n uid: UID; // mkp_event_uid\n status?: MkpEventStatus;\n\n title?: string | null;\n description?: string | null;\n\n starts_at?: string | null;\n ends_at?: string | null;\n\n auth_company_uid?: UID | null;\n auth_branch_uid?: UID | null;\n\n // location (MD)\n md_country_uid?: UID | null;\n md_region_uid?: UID | null;\n md_commune_uid?: UID | null;\n address_text?: string | null;\n};\n\nexport type MkpEventMediaRef = RefBase & {\n uid: UID; // mkp_event_media_uid\n event_uid: UID; // mkp_event_uid\n media_file_uid: UID; // MEDIA\n correlative: number; // ✅ ordering (required)\n};\n\nexport type MkpEventProgramRef = RefBase & {\n uid: UID; // mkp_event_program_uid\n event_uid: UID;\n title?: string | null;\n starts_at?: string | null;\n ends_at?: string | null;\n};\n\nexport type MkpEventZoneRef = RefBase & {\n uid: UID; // mkp_event_zone_uid\n event_uid: UID;\n name?: string | null;\n capacity?: number | null;\n};\n\nexport type MkpEventZoneAccessRef = RefBase & {\n uid: UID; // mkp_event_zone_access_uid\n event_zone_uid: UID;\n ticket_type_uid: UID; // mkp_ticket_type_uid\n};\n\nexport type MkpTicketTypeRef = RefBase & {\n uid: UID; // mkp_ticket_type_uid\n event_uid: UID;\n\n name?: string | null;\n price?: number | null;\n currency_code?: Code | null;\n\n stock?: number | null;\n status?: \"ACTIVE\" | \"INACTIVE\" | string;\n};\n\nexport type MkpTicketRef = RefBase & {\n uid: UID; // mkp_ticket_uid\n ticket_type_uid: UID; // mkp_ticket_type_uid\n event_uid: UID;\n\n // ownership\n auth_customer_uid?: UID | null;\n\n status?: \"RESERVED\" | \"PAID\" | \"CANCELLED\" | \"USED\" | (string & {});\n};\n\nexport type MkpEventAttendanceRef = RefBase & {\n uid: UID; // mkp_event_attendance_uid\n ticket_uid: UID;\n event_uid: UID;\n\n checked_at?: string | null;\n\n // scanned_by (employee in Auth)\n auth_employee_uid?: UID | null;\n};\n\n// Artist (optional, based on your current marketplace structure)\nexport type MkpArtistRef = RefBase & {\n uid: UID; // mkp_artist_uid\n name?: string;\n};\n\nexport type MkpEventArtistRef = RefBase & {\n uid: UID; // mkp_event_artist_uid\n event_uid: UID;\n artist_uid: UID;\n};\n\n// ------------------------------------\n// Bulk refs endpoints (internal)\n// ------------------------------------\nexport type MkpPublicationsRefsRequest = BulkUidsRequest;\nexport type MkpPublicationsRefsResponse = BulkRefsResponse<MkpPublicationRef>;\n\nexport type MkpEventsRefsRequest = BulkUidsRequest;\nexport type MkpEventsRefsResponse = BulkRefsResponse<MkpEventRef>;\n\nexport type MkpPromotionsRefsRequest = BulkUidsRequest;\nexport type MkpPromotionsRefsResponse = BulkRefsResponse<MkpPromotionRef>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
package/dist/mkp.d.cts ADDED
@@ -0,0 +1,160 @@
1
+ import { RefBase, UID, Code, BulkUidsRequest, BulkRefsResponse } from './common.cjs';
2
+
3
+ /**
4
+ * MARKETPLACE (MKP) domain.
5
+ * Includes: listings/offers/publications, cart, promotions, events, ticketing.
6
+ *
7
+ * References:
8
+ * - auth_*_uid : AUTH
9
+ * - res_*_uid : RESOURCE
10
+ * - media_file_uid : MEDIA
11
+ */
12
+ type MkpCartStatus = "OPEN" | "CHECKED_OUT" | "ABANDONED" | "CLOSED" | (string & {});
13
+ type MkpCartRef = RefBase & {
14
+ uid: UID;
15
+ auth_customer_uid?: UID | null;
16
+ auth_branch_uid?: UID | null;
17
+ status?: MkpCartStatus;
18
+ created_at?: string;
19
+ };
20
+ type MkpCartItemRef = RefBase & {
21
+ uid: UID;
22
+ cart_uid: UID;
23
+ res_variety_uid: UID;
24
+ quantity: number;
25
+ price_snapshot?: number | null;
26
+ currency_code_snapshot?: Code | null;
27
+ };
28
+ type MkpPublicationStatus = "DRAFT" | "ACTIVE" | "PAUSED" | "SOLD_OUT" | "CLOSED" | "BANNED" | (string & {});
29
+ type MkpOfferType = "SELL" | "BUY" | "SERVICE" | (string & {});
30
+ type MkpPublicationRef = RefBase & {
31
+ uid: UID;
32
+ status?: MkpPublicationStatus;
33
+ offer_type?: MkpOfferType;
34
+ auth_company_uid?: UID | null;
35
+ auth_branch_uid?: UID | null;
36
+ auth_employee_uid?: UID | null;
37
+ auth_customer_uid?: UID | null;
38
+ res_resource_uid?: UID | null;
39
+ res_variety_uid?: UID | null;
40
+ title?: string | null;
41
+ description?: string | null;
42
+ sku?: string | null;
43
+ price?: number | null;
44
+ currency_code?: Code | null;
45
+ stock_quantity?: number | null;
46
+ md_country_uid?: UID | null;
47
+ md_region_uid?: UID | null;
48
+ md_commune_uid?: UID | null;
49
+ cover_media_file_uid?: UID | null;
50
+ created_at?: string;
51
+ updated_at?: string;
52
+ };
53
+ type MkpPublicationMediaRef = RefBase & {
54
+ uid: UID;
55
+ publication_uid: UID;
56
+ media_file_uid: UID;
57
+ correlative: number;
58
+ };
59
+ type MkpPromotionStatus = "DRAFT" | "ACTIVE" | "PAUSED" | "FINISHED" | (string & {});
60
+ type MkpPromotionRef = RefBase & {
61
+ uid: UID;
62
+ status?: MkpPromotionStatus;
63
+ title?: string | null;
64
+ description?: string | null;
65
+ starts_at?: string | null;
66
+ ends_at?: string | null;
67
+ auth_company_uid?: UID | null;
68
+ auth_branch_uid?: UID | null;
69
+ };
70
+ type MkpPromotionMediaRef = RefBase & {
71
+ uid: UID;
72
+ promotion_uid: UID;
73
+ media_file_uid: UID;
74
+ correlative: number;
75
+ };
76
+ type MkpPromotionInventoryRef = RefBase & {
77
+ uid: UID;
78
+ promotion_uid: UID;
79
+ erp_inventory_id?: number | null;
80
+ status?: "ACTIVE" | "INACTIVE" | string;
81
+ };
82
+ type MkpEventStatus = "DRAFT" | "ACTIVE" | "PAUSED" | "CANCELLED" | "FINISHED" | (string & {});
83
+ type MkpEventRef = RefBase & {
84
+ uid: UID;
85
+ status?: MkpEventStatus;
86
+ title?: string | null;
87
+ description?: string | null;
88
+ starts_at?: string | null;
89
+ ends_at?: string | null;
90
+ auth_company_uid?: UID | null;
91
+ auth_branch_uid?: UID | null;
92
+ md_country_uid?: UID | null;
93
+ md_region_uid?: UID | null;
94
+ md_commune_uid?: UID | null;
95
+ address_text?: string | null;
96
+ };
97
+ type MkpEventMediaRef = RefBase & {
98
+ uid: UID;
99
+ event_uid: UID;
100
+ media_file_uid: UID;
101
+ correlative: number;
102
+ };
103
+ type MkpEventProgramRef = RefBase & {
104
+ uid: UID;
105
+ event_uid: UID;
106
+ title?: string | null;
107
+ starts_at?: string | null;
108
+ ends_at?: string | null;
109
+ };
110
+ type MkpEventZoneRef = RefBase & {
111
+ uid: UID;
112
+ event_uid: UID;
113
+ name?: string | null;
114
+ capacity?: number | null;
115
+ };
116
+ type MkpEventZoneAccessRef = RefBase & {
117
+ uid: UID;
118
+ event_zone_uid: UID;
119
+ ticket_type_uid: UID;
120
+ };
121
+ type MkpTicketTypeRef = RefBase & {
122
+ uid: UID;
123
+ event_uid: UID;
124
+ name?: string | null;
125
+ price?: number | null;
126
+ currency_code?: Code | null;
127
+ stock?: number | null;
128
+ status?: "ACTIVE" | "INACTIVE" | string;
129
+ };
130
+ type MkpTicketRef = RefBase & {
131
+ uid: UID;
132
+ ticket_type_uid: UID;
133
+ event_uid: UID;
134
+ auth_customer_uid?: UID | null;
135
+ status?: "RESERVED" | "PAID" | "CANCELLED" | "USED" | (string & {});
136
+ };
137
+ type MkpEventAttendanceRef = RefBase & {
138
+ uid: UID;
139
+ ticket_uid: UID;
140
+ event_uid: UID;
141
+ checked_at?: string | null;
142
+ auth_employee_uid?: UID | null;
143
+ };
144
+ type MkpArtistRef = RefBase & {
145
+ uid: UID;
146
+ name?: string;
147
+ };
148
+ type MkpEventArtistRef = RefBase & {
149
+ uid: UID;
150
+ event_uid: UID;
151
+ artist_uid: UID;
152
+ };
153
+ type MkpPublicationsRefsRequest = BulkUidsRequest;
154
+ type MkpPublicationsRefsResponse = BulkRefsResponse<MkpPublicationRef>;
155
+ type MkpEventsRefsRequest = BulkUidsRequest;
156
+ type MkpEventsRefsResponse = BulkRefsResponse<MkpEventRef>;
157
+ type MkpPromotionsRefsRequest = BulkUidsRequest;
158
+ type MkpPromotionsRefsResponse = BulkRefsResponse<MkpPromotionRef>;
159
+
160
+ export type { MkpArtistRef, MkpCartItemRef, MkpCartRef, MkpCartStatus, MkpEventArtistRef, MkpEventAttendanceRef, MkpEventMediaRef, MkpEventProgramRef, MkpEventRef, MkpEventStatus, MkpEventZoneAccessRef, MkpEventZoneRef, MkpEventsRefsRequest, MkpEventsRefsResponse, MkpOfferType, MkpPromotionInventoryRef, MkpPromotionMediaRef, MkpPromotionRef, MkpPromotionStatus, MkpPromotionsRefsRequest, MkpPromotionsRefsResponse, MkpPublicationMediaRef, MkpPublicationRef, MkpPublicationStatus, MkpPublicationsRefsRequest, MkpPublicationsRefsResponse, MkpTicketRef, MkpTicketTypeRef };
package/dist/mkp.d.ts ADDED
@@ -0,0 +1,160 @@
1
+ import { RefBase, UID, Code, BulkUidsRequest, BulkRefsResponse } from './common.js';
2
+
3
+ /**
4
+ * MARKETPLACE (MKP) domain.
5
+ * Includes: listings/offers/publications, cart, promotions, events, ticketing.
6
+ *
7
+ * References:
8
+ * - auth_*_uid : AUTH
9
+ * - res_*_uid : RESOURCE
10
+ * - media_file_uid : MEDIA
11
+ */
12
+ type MkpCartStatus = "OPEN" | "CHECKED_OUT" | "ABANDONED" | "CLOSED" | (string & {});
13
+ type MkpCartRef = RefBase & {
14
+ uid: UID;
15
+ auth_customer_uid?: UID | null;
16
+ auth_branch_uid?: UID | null;
17
+ status?: MkpCartStatus;
18
+ created_at?: string;
19
+ };
20
+ type MkpCartItemRef = RefBase & {
21
+ uid: UID;
22
+ cart_uid: UID;
23
+ res_variety_uid: UID;
24
+ quantity: number;
25
+ price_snapshot?: number | null;
26
+ currency_code_snapshot?: Code | null;
27
+ };
28
+ type MkpPublicationStatus = "DRAFT" | "ACTIVE" | "PAUSED" | "SOLD_OUT" | "CLOSED" | "BANNED" | (string & {});
29
+ type MkpOfferType = "SELL" | "BUY" | "SERVICE" | (string & {});
30
+ type MkpPublicationRef = RefBase & {
31
+ uid: UID;
32
+ status?: MkpPublicationStatus;
33
+ offer_type?: MkpOfferType;
34
+ auth_company_uid?: UID | null;
35
+ auth_branch_uid?: UID | null;
36
+ auth_employee_uid?: UID | null;
37
+ auth_customer_uid?: UID | null;
38
+ res_resource_uid?: UID | null;
39
+ res_variety_uid?: UID | null;
40
+ title?: string | null;
41
+ description?: string | null;
42
+ sku?: string | null;
43
+ price?: number | null;
44
+ currency_code?: Code | null;
45
+ stock_quantity?: number | null;
46
+ md_country_uid?: UID | null;
47
+ md_region_uid?: UID | null;
48
+ md_commune_uid?: UID | null;
49
+ cover_media_file_uid?: UID | null;
50
+ created_at?: string;
51
+ updated_at?: string;
52
+ };
53
+ type MkpPublicationMediaRef = RefBase & {
54
+ uid: UID;
55
+ publication_uid: UID;
56
+ media_file_uid: UID;
57
+ correlative: number;
58
+ };
59
+ type MkpPromotionStatus = "DRAFT" | "ACTIVE" | "PAUSED" | "FINISHED" | (string & {});
60
+ type MkpPromotionRef = RefBase & {
61
+ uid: UID;
62
+ status?: MkpPromotionStatus;
63
+ title?: string | null;
64
+ description?: string | null;
65
+ starts_at?: string | null;
66
+ ends_at?: string | null;
67
+ auth_company_uid?: UID | null;
68
+ auth_branch_uid?: UID | null;
69
+ };
70
+ type MkpPromotionMediaRef = RefBase & {
71
+ uid: UID;
72
+ promotion_uid: UID;
73
+ media_file_uid: UID;
74
+ correlative: number;
75
+ };
76
+ type MkpPromotionInventoryRef = RefBase & {
77
+ uid: UID;
78
+ promotion_uid: UID;
79
+ erp_inventory_id?: number | null;
80
+ status?: "ACTIVE" | "INACTIVE" | string;
81
+ };
82
+ type MkpEventStatus = "DRAFT" | "ACTIVE" | "PAUSED" | "CANCELLED" | "FINISHED" | (string & {});
83
+ type MkpEventRef = RefBase & {
84
+ uid: UID;
85
+ status?: MkpEventStatus;
86
+ title?: string | null;
87
+ description?: string | null;
88
+ starts_at?: string | null;
89
+ ends_at?: string | null;
90
+ auth_company_uid?: UID | null;
91
+ auth_branch_uid?: UID | null;
92
+ md_country_uid?: UID | null;
93
+ md_region_uid?: UID | null;
94
+ md_commune_uid?: UID | null;
95
+ address_text?: string | null;
96
+ };
97
+ type MkpEventMediaRef = RefBase & {
98
+ uid: UID;
99
+ event_uid: UID;
100
+ media_file_uid: UID;
101
+ correlative: number;
102
+ };
103
+ type MkpEventProgramRef = RefBase & {
104
+ uid: UID;
105
+ event_uid: UID;
106
+ title?: string | null;
107
+ starts_at?: string | null;
108
+ ends_at?: string | null;
109
+ };
110
+ type MkpEventZoneRef = RefBase & {
111
+ uid: UID;
112
+ event_uid: UID;
113
+ name?: string | null;
114
+ capacity?: number | null;
115
+ };
116
+ type MkpEventZoneAccessRef = RefBase & {
117
+ uid: UID;
118
+ event_zone_uid: UID;
119
+ ticket_type_uid: UID;
120
+ };
121
+ type MkpTicketTypeRef = RefBase & {
122
+ uid: UID;
123
+ event_uid: UID;
124
+ name?: string | null;
125
+ price?: number | null;
126
+ currency_code?: Code | null;
127
+ stock?: number | null;
128
+ status?: "ACTIVE" | "INACTIVE" | string;
129
+ };
130
+ type MkpTicketRef = RefBase & {
131
+ uid: UID;
132
+ ticket_type_uid: UID;
133
+ event_uid: UID;
134
+ auth_customer_uid?: UID | null;
135
+ status?: "RESERVED" | "PAID" | "CANCELLED" | "USED" | (string & {});
136
+ };
137
+ type MkpEventAttendanceRef = RefBase & {
138
+ uid: UID;
139
+ ticket_uid: UID;
140
+ event_uid: UID;
141
+ checked_at?: string | null;
142
+ auth_employee_uid?: UID | null;
143
+ };
144
+ type MkpArtistRef = RefBase & {
145
+ uid: UID;
146
+ name?: string;
147
+ };
148
+ type MkpEventArtistRef = RefBase & {
149
+ uid: UID;
150
+ event_uid: UID;
151
+ artist_uid: UID;
152
+ };
153
+ type MkpPublicationsRefsRequest = BulkUidsRequest;
154
+ type MkpPublicationsRefsResponse = BulkRefsResponse<MkpPublicationRef>;
155
+ type MkpEventsRefsRequest = BulkUidsRequest;
156
+ type MkpEventsRefsResponse = BulkRefsResponse<MkpEventRef>;
157
+ type MkpPromotionsRefsRequest = BulkUidsRequest;
158
+ type MkpPromotionsRefsResponse = BulkRefsResponse<MkpPromotionRef>;
159
+
160
+ export type { MkpArtistRef, MkpCartItemRef, MkpCartRef, MkpCartStatus, MkpEventArtistRef, MkpEventAttendanceRef, MkpEventMediaRef, MkpEventProgramRef, MkpEventRef, MkpEventStatus, MkpEventZoneAccessRef, MkpEventZoneRef, MkpEventsRefsRequest, MkpEventsRefsResponse, MkpOfferType, MkpPromotionInventoryRef, MkpPromotionMediaRef, MkpPromotionRef, MkpPromotionStatus, MkpPromotionsRefsRequest, MkpPromotionsRefsResponse, MkpPublicationMediaRef, MkpPublicationRef, MkpPublicationStatus, MkpPublicationsRefsRequest, MkpPublicationsRefsResponse, MkpTicketRef, MkpTicketTypeRef };
package/dist/mkp.js ADDED
@@ -0,0 +1,2 @@
1
+ import "./chunk-7TADTTEV.js";
2
+ //# sourceMappingURL=mkp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/platform.ts"],"sourcesContent":["// packages/contracts/src/platform.ts\nimport type {UID, Code} from \"./common\";\n\n/**\n * PLATFORM is SoT for runtime tenant resolution (routing, schemas, etc.)\n * - Used by internal calls to decide db/schema/shard per company + service.\n */\n\nexport type PlatformServiceCode =\n | \"auth\"\n | \"erp\"\n | \"res\"\n | \"md\"\n | \"log\"\n | \"fis\"\n | \"pay\"\n | \"mkp\"\n | \"iot\"\n | \"media\"\n | (string & {});\n\nexport type PlatformTenantResolved = {\n // ✅ canonical (aligned with SDK request context: company_uid)\n company_uid: UID;\n\n // which service is asking for routing info\n service: PlatformServiceCode;\n\n status: \"ACTIVE\" | \"INACTIVE\" | string;\n\n // runtime routing hints\n tenant_key?: string; // stable tenant identifier\n db_name?: string | null;\n schema_name?: string | null;\n shard?: string | null;\n\n // optional: feature flags\n features?: Record<string, boolean>;\n};\n\nexport type PlatformResolveTenantResponse = {\n ok: true;\n tenant: PlatformTenantResolved;\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../src/platform.ts"],"sourcesContent":["// packages/contracts/src/platform.ts\nimport type {UID, Code} from \"./common\";\n\n/**\n * PLATFORM is SoT for runtime tenant resolution (routing, schemas, etc.)\n * - Used by internal calls to decide db/schema/shard per company + service.\n */\n\nexport type PlatformServiceCode =\n | \"auth\"\n | \"erp\"\n | \"res\"\n | \"md\"\n | \"log\"\n | \"fis\"\n | \"pay\"\n | \"mkp\"\n | \"iot\"\n | \"media\"\n | \"not\"\n | (string & {});\n\nexport type PlatformTenantResolved = {\n // ✅ canonical (aligned with SDK request context: company_uid)\n company_uid: UID;\n\n // which service is asking for routing info\n service: PlatformServiceCode;\n\n status: \"ACTIVE\" | \"INACTIVE\" | string;\n\n // runtime routing hints\n tenant_key?: string; // stable tenant identifier\n db_name?: string | null;\n schema_name?: string | null;\n shard?: string | null;\n\n // optional: feature flags\n features?: Record<string, boolean>;\n};\n\nexport type PlatformResolveTenantResponse = {\n ok: true;\n tenant: PlatformTenantResolved;\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -4,7 +4,7 @@ import { UID } from './common.cjs';
4
4
  * PLATFORM is SoT for runtime tenant resolution (routing, schemas, etc.)
5
5
  * - Used by internal calls to decide db/schema/shard per company + service.
6
6
  */
7
- type PlatformServiceCode = "auth" | "erp" | "res" | "md" | "log" | "fis" | "pay" | "mkp" | "iot" | "media" | (string & {});
7
+ type PlatformServiceCode = "auth" | "erp" | "res" | "md" | "log" | "fis" | "pay" | "mkp" | "iot" | "media" | "not" | (string & {});
8
8
  type PlatformTenantResolved = {
9
9
  company_uid: UID;
10
10
  service: PlatformServiceCode;
@@ -4,7 +4,7 @@ import { UID } from './common.js';
4
4
  * PLATFORM is SoT for runtime tenant resolution (routing, schemas, etc.)
5
5
  * - Used by internal calls to decide db/schema/shard per company + service.
6
6
  */
7
- type PlatformServiceCode = "auth" | "erp" | "res" | "md" | "log" | "fis" | "pay" | "mkp" | "iot" | "media" | (string & {});
7
+ type PlatformServiceCode = "auth" | "erp" | "res" | "md" | "log" | "fis" | "pay" | "mkp" | "iot" | "media" | "not" | (string & {});
8
8
  type PlatformTenantResolved = {
9
9
  company_uid: UID;
10
10
  service: PlatformServiceCode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innvoid/getmarket-contracts",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",