@api-client/core 0.18.18 → 0.18.20
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/build/src/modeling/DataDomain.d.ts +35 -1
- package/build/src/modeling/DataDomain.d.ts.map +1 -1
- package/build/src/modeling/DataDomain.js +120 -0
- package/build/src/modeling/DataDomain.js.map +1 -1
- package/build/src/modeling/DomainProperty.d.ts +10 -0
- package/build/src/modeling/DomainProperty.d.ts.map +1 -1
- package/build/src/modeling/DomainProperty.js +26 -2
- package/build/src/modeling/DomainProperty.js.map +1 -1
- package/build/src/modeling/definitions/SKU.d.ts.map +1 -1
- package/build/src/modeling/definitions/SKU.js +2 -0
- package/build/src/modeling/definitions/SKU.js.map +1 -1
- package/build/src/modeling/helpers/Intelisense.d.ts +472 -0
- package/build/src/modeling/helpers/Intelisense.d.ts.map +1 -0
- package/build/src/modeling/helpers/Intelisense.js +1201 -0
- package/build/src/modeling/helpers/Intelisense.js.map +1 -0
- package/build/src/modeling/templates/blog-domain.d.ts +40 -0
- package/build/src/modeling/templates/blog-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/blog-domain.js +621 -0
- package/build/src/modeling/templates/blog-domain.js.map +1 -0
- package/build/src/modeling/templates/ecommerce-domain.d.ts +39 -0
- package/build/src/modeling/templates/ecommerce-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/ecommerce-domain.js +662 -0
- package/build/src/modeling/templates/ecommerce-domain.js.map +1 -0
- package/build/src/modeling/templates/types.d.ts +9 -0
- package/build/src/modeling/templates/types.d.ts.map +1 -0
- package/build/src/modeling/templates/types.js +2 -0
- package/build/src/modeling/templates/types.js.map +1 -0
- package/build/src/modeling/types.d.ts +49 -0
- package/build/src/modeling/types.d.ts.map +1 -1
- package/build/src/modeling/types.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/data/models/example-generator-api.json +6 -6
- package/package.json +1 -1
- package/src/modeling/DataDomain.ts +144 -0
- package/src/modeling/DomainProperty.ts +23 -0
- package/src/modeling/definitions/SKU.ts +2 -0
- package/src/modeling/helpers/Intelisense.ts +1346 -0
- package/src/modeling/templates/blog-domain.ts +788 -0
- package/src/modeling/templates/ecommerce-domain.ts +834 -0
- package/src/modeling/templates/types.ts +9 -0
- package/src/modeling/types.ts +63 -0
- package/tests/unit/modeling/DataDomain.search.spec.ts +188 -0
- package/tests/unit/modeling/helpers/intellisense.spec.ts +971 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ecommerce-domain.js","sourceRoot":"","sources":["../../../../src/modeling/templates/ecommerce-domain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAA;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,wBAAwB,EACxB,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,2BAA2B,CAAA;AAGlC,SAAS,YAAY;IACnB,OAAO,IAAI,UAAU,CAAC;QACpB,IAAI,EAAE;YACJ,IAAI,EAAE,qBAAqB;YAC3B,WAAW,EAAE,qBAAqB;YAClC,WAAW,EACT,8GAA8G;SACjH;KACF,CAAC,CAAA;AACJ,CAAC;AAED;;;;;;;;;;;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aAAa,CAAC,GAAG,EAAE,EAC1B;QACE,IAAI,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,WAAW,EAAE,qCAAqC,EAAE;QAC7G,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,UAAU,EAAE,+CAA+C;KACtE,CACF,CAAA;IAED,OAAO,MAAM,CAAA;AACf,CAAC","sourcesContent":["/**\n * E-Commerce Data Domain Example\n *\n * This file demonstrates how to create a comprehensive e-commerce data domain\n * using the API Client Core modeling system. It follows the business-first approach\n * and demonstrates proper use of namespaces, models, entities, properties,\n * associations, and semantic annotations.\n *\n * The example includes:\n * - User Management domain with proper authentication setup\n * - Product Catalog with categories and inventory\n * - Order Management with cart functionality and payment processing\n * - Proper semantic annotations for security, timestamps, and business logic\n * - Realistic associations between entities with proper cardinality\n *\n * @example\n * ```typescript\n * import { createEcommerceDomain } from './ecommerce-domain.js'\n *\n * const domain = createEcommerceDomain()\n * console.log('Domain created with', domain.graph.nodeCount(), 'nodes')\n * ```\n */\n\nimport { DataDomain } from '../DataDomain.js'\nimport { SemanticType } from '../Semantics.js'\nimport { createCalculatedSemantic } from '../definitions/Calculated.js'\nimport { createCurrencySemantic } from '../definitions/Currency.js'\nimport { createSummarySemantic } from '../definitions/Summary.js'\nimport {\n addAvatarUrlField,\n addCreatedAtField,\n addDescriptionField,\n addEmailField,\n addFirstNameField,\n addIdField,\n addLastNameField,\n addNameField,\n addPasswordField,\n addPhoneField,\n addPublicUniqueNameField,\n addUpdatedAtField,\n addSkuField,\n addPriceField,\n addQuantityField,\n addWeightField,\n addImagesField,\n addCustomStatusField,\n addBooleanField,\n addSessionIdField,\n addExpiresAtField,\n addUnitPriceField,\n addCurrencyAmountField,\n} from '../helpers/Intelisense.js'\nimport type { CreateTemplateOptions } from './types.js'\n\nfunction createDomain(): DataDomain {\n return new DataDomain({\n info: {\n name: 'E-Commerce Platform',\n displayName: 'E-Commerce Platform',\n description:\n 'A comprehensive e-commerce platform with user management, product catalog, and order processing capabilities',\n },\n })\n}\n\n/**\n * Creates a comprehensive e-commerce data domain following domain-driven design principles.\n *\n * This function demonstrates the proper hierarchy and organization for a business domain:\n * 1. Creates the root DataDomain\n * 2. Organizes functionality into logical namespaces (User Management, Product Catalog, etc.)\n * 3. Groups related entities into models within each namespace\n * 4. Defines entities with proper semantic annotations\n * 5. Establishes associations with appropriate cardinality and business rules\n *\n * @returns A fully configured DataDomain with all e-commerce entities and relationships\n */\nexport default function createEcommerceDomain(options: CreateTemplateOptions = {}): DataDomain {\n // Ensure the root data domain\n const domain = options.domain ?? createDomain()\n\n //\n // 1. USER MANAGEMENT NAMESPACE\n //\n const userManagement = domain.addNamespace({\n info: {\n name: 'UserManagement',\n displayName: 'User Management',\n description: 'Handles user authentication, authorization, and profile management',\n },\n })\n\n // User Authentication Model\n const authModel = userManagement.addModel({\n info: {\n name: 'Authentication',\n displayName: 'User Authentication',\n description: 'User accounts and authentication data',\n },\n })\n\n // User Entity - The core user account\n const userEntity = authModel.addEntity({\n info: {\n name: 'User',\n displayName: 'User Account',\n description: 'Represents a user account in the system',\n },\n semantics: [{ id: SemanticType.User }], // Mark this as a User entity for system-wide recognition\n })\n\n // User properties with proper semantic annotations\n addIdField(userEntity, { displayName: 'User ID', description: 'Unique identifier for the user' })\n addEmailField(userEntity, { description: 'User email address for login and communication' })\n addPasswordField(userEntity, { description: 'User password for authentication' })\n\n const fName = addFirstNameField(userEntity, { description: 'User first name' })\n fName.required = true\n\n const lName = addLastNameField(userEntity, { description: 'User last name' })\n lName.required = true\n\n userEntity.addProperty({\n info: { name: 'role', displayName: 'User Role', description: 'User role for permission management' },\n type: 'string',\n required: true,\n schema: {\n enum: ['customer', 'admin', 'moderator'],\n defaultValue: {\n type: 'literal',\n value: 'customer',\n },\n },\n semantics: [{ id: SemanticType.UserRole }],\n })\n\n userEntity.addProperty({\n info: {\n name: 'email_verified',\n displayName: 'Email Verified',\n description: 'Whether the user has verified their email address',\n },\n type: 'boolean',\n required: true,\n schema: {\n defaultValue: {\n type: 'literal',\n value: 'false',\n },\n },\n })\n\n addCreatedAtField(userEntity, { description: 'When the user account was created' })\n addUpdatedAtField(userEntity, { description: 'When the user account was last updated' })\n\n // User Profile Model\n const profileModel = userManagement.addModel({\n info: {\n name: 'UserProfile',\n displayName: 'User Profile',\n description: 'Extended user profile information',\n },\n })\n\n // User Profile Entity\n const userProfileEntity = profileModel.addEntity({\n info: {\n name: 'user_profile',\n displayName: 'User Profile',\n description: 'Extended profile information for users',\n },\n })\n\n addIdField(userProfileEntity, { displayName: 'Profile ID', description: 'Unique identifier for the profile' })\n\n userProfileEntity.addProperty({\n info: { name: 'birthdate', displayName: 'Date of Birth', description: 'User date of birth' },\n type: 'date',\n })\n\n addPhoneField(userProfileEntity, { description: 'User phone number' })\n addAvatarUrlField(userProfileEntity, { description: 'URL to user profile picture' })\n\n // User-Profile Association (One-to-One), not required for registration flows.\n userEntity.addAssociation(\n { key: userProfileEntity.key },\n {\n info: { name: 'profile', displayName: 'User Profile', description: 'Link to extended profile information' },\n required: false,\n multiple: false,\n }\n )\n\n // Address Entity\n const addressEntity = profileModel.addEntity({\n info: {\n name: 'address',\n displayName: 'Address',\n description: 'Physical address information',\n },\n })\n\n addIdField(addressEntity, { displayName: 'Address ID', description: 'Unique identifier for the address' })\n\n addressEntity.addProperty({\n info: { name: 'type', displayName: 'Address Type', description: 'Type of address (shipping, billing, etc.)' },\n type: 'string',\n required: true,\n schema: {\n enum: ['shipping', 'billing', 'both'],\n },\n })\n\n addressEntity.addProperty({\n info: {\n name: 'line1',\n displayName: 'Address Line 1',\n description: 'Primary street address, including house number and street name',\n },\n type: 'string',\n required: true,\n })\n\n addressEntity.addProperty({\n info: {\n name: 'line2',\n displayName: 'Address Line 2',\n description: 'Optional field for additional street-level information like apartment numbers or building names.',\n },\n type: 'string',\n required: false,\n })\n\n addressEntity.addProperty({\n info: {\n name: 'line3',\n displayName: 'Address Line 3',\n description: 'Optional field for additional street-level information like apartment numbers or building names.',\n },\n type: 'string',\n required: false,\n })\n\n addressEntity.addProperty({\n info: { name: 'city', displayName: 'City', description: 'City name' },\n type: 'string',\n required: true,\n })\n\n addressEntity.addProperty({\n info: { name: 'state', displayName: 'State/Province', description: 'State or province' },\n type: 'string',\n required: true,\n })\n\n addressEntity.addProperty({\n info: { name: 'postal_code', displayName: 'ZIP/Postal Code', description: 'ZIP or postal code' },\n type: 'string',\n required: true,\n })\n\n addressEntity.addProperty({\n info: { name: 'country', displayName: 'Country', description: 'Country name' },\n type: 'string',\n required: true,\n })\n\n // User-Address Association (One-to-Many)\n userEntity.addAssociation(\n { key: addressEntity.key },\n {\n info: { name: 'addresses', displayName: 'User Addresses', description: 'User shipping and billing addresses' },\n required: false,\n multiple: true,\n }\n )\n\n //\n // 2. PRODUCT CATALOG NAMESPACE\n //\n const productCatalog = domain.addNamespace({\n info: {\n name: 'ProductCatalog',\n displayName: 'Product Catalog',\n description: 'Product information, categories, and inventory management',\n },\n })\n\n // Product Management Model\n const productModel = productCatalog.addModel({\n info: {\n name: 'Products',\n displayName: 'Product Management',\n description: 'Core product entities and relationships',\n },\n })\n\n // Category Entity\n const categoryEntity = productModel.addEntity({\n info: {\n name: 'category',\n displayName: 'Product Category',\n description: 'Product categorization for organization and navigation',\n },\n })\n addIdField(categoryEntity, { displayName: 'Category ID', description: 'Unique identifier for the category' })\n addNameField(categoryEntity, { displayName: 'Category Name', description: 'Display name of the category' })\n addPublicUniqueNameField(categoryEntity, {\n displayName: 'URL Slug',\n description: 'URL-friendly identifier for the category',\n })\n addDescriptionField(categoryEntity, { description: 'Category description' })\n\n // Self-referencing association for category hierarchy\n categoryEntity.addAssociation(\n { key: categoryEntity.key },\n {\n info: {\n name: 'parent_category',\n displayName: 'Parent Category',\n description: 'Parent category for hierarchical organization',\n },\n required: false,\n multiple: false,\n }\n )\n\n // Product Entity\n const productEntity = productModel.addEntity({\n info: {\n name: 'product',\n displayName: 'Product',\n description: 'Core product information and specifications',\n },\n })\n\n addIdField(productEntity, { displayName: 'Product ID', description: 'Unique identifier for the product' })\n addNameField(productEntity, { displayName: 'Product Name', description: 'Display name of the product' })\n addPublicUniqueNameField(productEntity, {\n displayName: 'URL Slug',\n description: 'URL-friendly identifier for the product',\n })\n addDescriptionField(productEntity, { description: 'Detailed product description' })\n\n productEntity.addProperty({\n info: { name: 'short_description', displayName: 'Short Description', description: 'Brief product summary' },\n type: 'string',\n semantics: [createSummarySemantic()],\n })\n\n addSkuField(productEntity, { description: 'Stock Keeping Unit - unique product identifier' })\n\n addPriceField(productEntity, { description: 'Product price in cents (USD)' })\n\n productEntity.addProperty({\n info: {\n name: 'compare_at_price',\n displayName: 'Compare at Price',\n description: 'Original price for discount display',\n },\n type: 'number',\n schema: {\n maximum: 0,\n },\n bindings: [\n {\n type: 'web',\n schema: {\n dataType: 'float',\n },\n },\n ],\n semantics: [\n createCurrencySemantic({\n storageFormat: 'integer_cents',\n defaultCurrency: 'USD',\n decimalPlaces: 2,\n allowNegative: false,\n validateCurrencyCode: true,\n }),\n ],\n })\n\n addCustomStatusField(productEntity, ['inactive', 'active', 'pending', 'archived'], {\n description: 'Current status of the product',\n })\n\n addWeightField(productEntity, { description: 'Product weight in grams' })\n\n addImagesField(productEntity, { description: 'Array of product image URLs' })\n\n addCreatedAtField(productEntity, { description: 'When the product was created' })\n addUpdatedAtField(productEntity, { description: 'When the product was last updated' })\n\n // Product-Category Association (Many-to-Many)\n productEntity.addAssociation(\n { key: categoryEntity.key },\n {\n info: {\n name: 'categories',\n displayName: 'Product Categories',\n description: 'Categories this product belongs to',\n },\n required: true,\n multiple: true,\n semantics: [{ id: SemanticType.Categories }],\n }\n )\n\n // Inventory Model\n const inventoryModel = productCatalog.addModel({\n info: {\n name: 'Inventory',\n displayName: 'Inventory Management',\n description: 'Stock levels and inventory tracking',\n },\n })\n\n // Inventory Entity\n const inventoryEntity = inventoryModel.addEntity({\n info: {\n name: 'inventory',\n displayName: 'Inventory',\n description: 'Stock levels and inventory information for products',\n },\n })\n\n addIdField(inventoryEntity, {\n displayName: 'Inventory ID',\n description: 'Unique identifier for the inventory record',\n })\n\n addQuantityField(inventoryEntity, { displayName: 'Stock Quantity', description: 'Available stock quantity' })\n\n const reservedQty = addQuantityField(inventoryEntity, {\n name: 'reserved_quantity',\n displayName: 'Reserved Quantity',\n description: 'Quantity reserved for pending orders',\n })\n reservedQty.schema = {\n defaultValue: {\n type: 'literal',\n value: '0',\n },\n minimum: 0,\n }\n\n addBooleanField(inventoryEntity, 'trackQuantity', 'true', {\n displayName: 'Track Quantity',\n description: 'Whether to track inventory for this product',\n })\n\n addBooleanField(inventoryEntity, 'allowBackorder', 'false', {\n displayName: 'Allow Backorder',\n description: 'Whether to allow ordering when out of stock',\n })\n\n // Product-Inventory Association (One-to-One)\n productEntity.addAssociation(\n { key: inventoryEntity.key },\n {\n info: {\n name: 'inventory',\n displayName: 'Product Inventory',\n description: 'Inventory information for this product',\n },\n required: true,\n multiple: false,\n }\n )\n\n //\n // 3. ORDER MANAGEMENT NAMESPACE\n //\n const orderManagement = domain.addNamespace({\n info: {\n name: 'OrderManagement',\n displayName: 'Order Management',\n description: 'Shopping cart, orders, and payment processing',\n },\n })\n\n // Shopping Cart Model\n const cartModel = orderManagement.addModel({\n info: {\n name: 'ShoppingCart',\n displayName: 'Shopping Cart',\n description: 'Shopping cart and cart items',\n },\n })\n\n // Cart Entity\n const cartEntity = cartModel.addEntity({\n info: {\n name: 'cart',\n displayName: 'Shopping Cart',\n description: 'User shopping cart',\n },\n })\n\n addIdField(cartEntity, { displayName: 'Cart ID', description: 'Unique identifier for the cart' })\n\n addSessionIdField(cartEntity, { description: 'Session identifier for guest carts' })\n\n addExpiresAtField(cartEntity, { description: 'When the cart expires for cleanup' })\n\n addCreatedAtField(cartEntity, { description: 'When the cart was created' })\n addUpdatedAtField(cartEntity, { description: 'When the cart was last updated' })\n\n // Cart-User Association (Many-to-One)\n cartEntity.addAssociation(\n { key: userEntity.key },\n {\n info: { name: 'user', displayName: 'Cart Owner', description: 'User who owns this cart' },\n required: false,\n multiple: false,\n semantics: [{ id: SemanticType.ResourceOwnerIdentifier }],\n }\n )\n\n // Cart Item Entity\n const cartItemEntity = cartModel.addEntity({\n info: {\n name: 'cart_item',\n displayName: 'Cart Item',\n description: 'Individual items in a shopping cart',\n },\n })\n\n addIdField(cartItemEntity, { displayName: 'Cart Item ID', description: 'Unique identifier for the cart item' })\n\n const cartItemQuantity = addQuantityField(cartItemEntity, { description: 'Number of items' })\n cartItemQuantity.schema = { minimum: 1 }\n\n const cartUnitPrice = addUnitPriceField(cartItemEntity, { description: 'Price per unit at time of adding to cart' })\n\n cartItemEntity.addProperty({\n info: { name: 'total_price', displayName: 'Total Price', description: 'Total price for this line item' },\n type: 'number',\n required: true,\n readOnly: true,\n semantics: [\n createCurrencySemantic({\n storageFormat: 'integer_cents',\n defaultCurrency: 'USD',\n decimalPlaces: 2,\n allowNegative: false,\n }),\n createCalculatedSemantic({\n formula: '{{unitPrice}} * {{quantity}}',\n dependencies: [cartUnitPrice.key, cartItemQuantity.key],\n recalculateOnUpdate: true,\n }),\n ],\n })\n\n // Cart-CartItem Association (One-to-Many)\n cartEntity.addAssociation(\n { key: cartItemEntity.key },\n {\n info: { name: 'items', displayName: 'Cart Items', description: 'Items in this cart' },\n required: false,\n multiple: true,\n onDelete: 'cascade',\n }\n )\n\n // CartItem-Product Association (Many-to-One)\n cartItemEntity.addAssociation(\n { key: productEntity.key },\n {\n info: { name: 'product', displayName: 'Product', description: 'Product for this cart item' },\n required: true,\n multiple: false,\n }\n )\n\n // Order Processing Model\n const orderModel = orderManagement.addModel({\n info: {\n name: 'Orders',\n displayName: 'Order Processing',\n description: 'Orders and order fulfillment',\n },\n })\n\n // Order Entity\n const orderEntity = orderModel.addEntity({\n info: {\n name: 'order',\n displayName: 'Order',\n description: 'Customer order',\n },\n })\n\n addIdField(orderEntity, { displayName: 'Order ID', description: 'Unique identifier for the order' })\n\n orderEntity.addProperty({\n info: { name: 'order_number', displayName: 'Order Number', description: 'Human-readable order number' },\n type: 'string',\n required: true,\n unique: true,\n })\n\n addCustomStatusField(\n orderEntity,\n ['pending', 'confirmed', 'processing', 'shipped', 'delivered', 'cancelled', 'refunded'],\n {\n displayName: 'Order Status',\n description: 'Current status of the order',\n }\n )\n\n const subtotal = addCurrencyAmountField(orderEntity, 'subtotal', 'Subtotal', {\n description: 'Order subtotal before taxes and shipping',\n })\n\n const taxAmount = addCurrencyAmountField(orderEntity, 'taxAmount', 'Tax Amount', {\n description: 'Total tax amount',\n })\n\n const shippingAmount = addCurrencyAmountField(orderEntity, 'shippingAmount', 'Shipping Amount', {\n description: 'Shipping cost',\n })\n\n orderEntity.addProperty({\n info: { name: 'total_amount', displayName: 'Total Amount', description: 'Final order total' },\n type: 'number',\n required: true,\n semantics: [\n createCurrencySemantic({\n storageFormat: 'integer_cents',\n defaultCurrency: 'USD',\n decimalPlaces: 2,\n allowNegative: false,\n }),\n createCalculatedSemantic({\n formula: '{{subtotal}} + {{taxAmount}} + {{shippingAmount}}',\n dependencies: [subtotal.key, taxAmount.key, shippingAmount.key],\n recalculateOnUpdate: true,\n }),\n ],\n })\n\n orderEntity.addProperty({\n info: { name: 'notes', displayName: 'Order Notes', description: 'Customer notes or special instructions' },\n type: 'string',\n })\n\n addCreatedAtField(orderEntity, { description: 'When the order was created' })\n addUpdatedAtField(orderEntity, { description: 'When the order was last updated' })\n\n // Order-User Association (Many-to-One)\n orderEntity.addAssociation(\n { key: userEntity.key },\n {\n info: { name: 'customer', displayName: 'Customer', description: 'Customer who placed this order' },\n required: true,\n multiple: false,\n semantics: [{ id: SemanticType.ResourceOwnerIdentifier }],\n }\n )\n\n // Order-Address Associations (Many-to-One)\n orderEntity.addAssociation(\n { key: addressEntity.key },\n {\n info: { name: 'shipping_address', displayName: 'Shipping Address', description: 'Address for order delivery' },\n required: true,\n multiple: false,\n }\n )\n\n orderEntity.addAssociation(\n { key: addressEntity.key },\n {\n info: { name: 'billing_address', displayName: 'Billing Address', description: 'Address for billing purposes' },\n required: true,\n multiple: false,\n }\n )\n\n // Order Line Item Entity\n const orderItemEntity = orderModel.addEntity({\n info: {\n name: 'order_item',\n displayName: 'Order Line Item',\n description: 'Individual line items in an order',\n },\n })\n\n addIdField(orderItemEntity, { displayName: 'Order Item ID', description: 'Unique identifier for the order item' })\n\n const quantity = addQuantityField(orderItemEntity, { description: 'Number of items ordered' })\n quantity.schema = { minimum: 1 }\n\n const unitPrice = addUnitPriceField(orderItemEntity, { description: 'Price per unit at time of order' })\n\n orderItemEntity.addProperty({\n info: { name: 'total_price', displayName: 'Total Price', description: 'Total price for this line item' },\n type: 'number',\n required: true,\n readOnly: true,\n semantics: [\n createCurrencySemantic({\n storageFormat: 'integer_cents',\n defaultCurrency: 'USD',\n decimalPlaces: 2,\n allowNegative: false,\n }),\n createCalculatedSemantic({\n formula: '{{quantity}} * {{unitPrice}}',\n dependencies: [quantity.key, unitPrice.key],\n recalculateOnUpdate: true,\n }),\n ],\n })\n\n // orderItemEntity.addProperty({\n // info: {\n // name: 'productSnapshot',\n // displayName: 'Product Snapshot',\n // description: 'Snapshot of product data at time of order',\n // },\n // type: 'object',\n // required: true,\n // readOnly: true,\n // })\n\n // Order-OrderItem Association (One-to-Many)\n orderEntity.addAssociation(\n { key: orderItemEntity.key },\n {\n info: { name: 'items', displayName: 'Order Items', description: 'Items in this order' },\n required: true,\n multiple: true,\n onDelete: 'cascade',\n }\n )\n\n // OrderItem-Product Association (Many-to-One)\n orderItemEntity.addAssociation(\n { key: productEntity.key },\n {\n info: { name: 'product', displayName: 'Product', description: 'Product for this order item' },\n required: true,\n multiple: false,\n }\n )\n\n // Payment Model\n const paymentModel = orderManagement.addModel({\n info: {\n name: 'Payments',\n displayName: 'Payment Processing',\n description: 'Payment methods and transactions',\n },\n })\n\n // Payment Entity\n const paymentEntity = paymentModel.addEntity({\n info: {\n name: 'payment',\n displayName: 'Payment',\n description: 'Payment transaction record',\n },\n })\n\n addIdField(paymentEntity, { displayName: 'Payment ID', description: 'Unique identifier for the payment' })\n\n paymentEntity.addProperty({\n info: { name: 'method', displayName: 'Payment Method', description: 'Method used for payment' },\n type: 'string',\n required: true,\n schema: {\n enum: ['credit_card', 'debit_card', 'paypal', 'bank_transfer', 'apple_pay', 'google_pay'],\n },\n })\n\n addCustomStatusField(paymentEntity, ['pending', 'authorized', 'captured', 'failed', 'cancelled', 'refunded'], {\n displayName: 'Payment Status',\n description: 'Current status of the payment',\n })\n\n addCurrencyAmountField(paymentEntity, 'amount', 'Payment Amount', { description: 'Amount charged' })\n\n paymentEntity.addProperty({\n info: { name: 'currency', displayName: 'Currency', description: 'Currency code for the payment' },\n type: 'string',\n required: true,\n schema: {\n defaultValue: {\n type: 'literal',\n value: 'USD',\n },\n },\n })\n\n paymentEntity.addProperty({\n info: {\n name: 'transaction_id',\n displayName: 'Transaction ID',\n description: 'External payment processor transaction ID',\n },\n type: 'string',\n })\n\n // paymentEntity.addProperty({\n // info: {\n // name: 'gatewayResponse',\n // displayName: 'Gateway Response',\n // description: 'Raw response from payment gateway',\n // },\n // type: 'object',\n // readOnly: true,\n // })\n\n addCreatedAtField(paymentEntity, { description: 'When the payment was created' })\n\n // Order-Payment Association (One-to-Many)\n orderEntity.addAssociation(\n { key: paymentEntity.key },\n {\n info: { name: 'payments', displayName: 'Order Payments', description: 'Payment transactions for this order' },\n required: false,\n multiple: true,\n onDelete: 'restrict', // Don't allow order deletion if payments exist\n }\n )\n\n return domain\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DataDomain } from '../DataDomain.js';
|
|
2
|
+
export interface CreateTemplateOptions {
|
|
3
|
+
/**
|
|
4
|
+
* The DataDomain instance to use for the template.
|
|
5
|
+
* If not provided, a new DataDomain instance will be created.
|
|
6
|
+
*/
|
|
7
|
+
domain?: DataDomain;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/modeling/templates/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,MAAM,CAAC,EAAE,UAAU,CAAA;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/modeling/templates/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { DataDomain } from '../DataDomain.js'\n\nexport interface CreateTemplateOptions {\n /**\n * The DataDomain instance to use for the template.\n * If not provided, a new DataDomain instance will be created.\n */\n domain?: DataDomain\n}\n"]}
|
|
@@ -809,5 +809,54 @@ export interface DeserializationResult {
|
|
|
809
809
|
*/
|
|
810
810
|
success: boolean;
|
|
811
811
|
}
|
|
812
|
+
/**
|
|
813
|
+
* Available node types for search filtering.
|
|
814
|
+
*/
|
|
815
|
+
export type SearchableNodeType = typeof DomainNamespaceKind | typeof DomainModelKind | typeof DomainEntityKind | typeof DomainPropertyKind | typeof DomainAssociationKind;
|
|
816
|
+
/**
|
|
817
|
+
* Search criteria for filtering domain nodes.
|
|
818
|
+
*/
|
|
819
|
+
export interface DomainSearchCriteria {
|
|
820
|
+
/**
|
|
821
|
+
* Text query to search for in name, displayName, and description fields.
|
|
822
|
+
* Can be a string for exact match or RegExp for pattern matching.
|
|
823
|
+
*/
|
|
824
|
+
query?: string | RegExp;
|
|
825
|
+
/**
|
|
826
|
+
* Filter by specific node types. If not provided, all node types are included.
|
|
827
|
+
*/
|
|
828
|
+
nodeTypes?: SearchableNodeType[];
|
|
829
|
+
/**
|
|
830
|
+
* Whether to include nodes from foreign domains in the search results.
|
|
831
|
+
* Defaults to false.
|
|
832
|
+
*/
|
|
833
|
+
includeForeignDomains?: boolean;
|
|
834
|
+
/**
|
|
835
|
+
* Case-sensitive search when using string query.
|
|
836
|
+
* Defaults to false (case-insensitive).
|
|
837
|
+
*/
|
|
838
|
+
caseSensitive?: boolean;
|
|
839
|
+
}
|
|
840
|
+
/**
|
|
841
|
+
* A search result containing a matching domain node and metadata.
|
|
842
|
+
*/
|
|
843
|
+
export interface DomainSearchResult {
|
|
844
|
+
/**
|
|
845
|
+
* The matching domain node.
|
|
846
|
+
*/
|
|
847
|
+
node: DomainGraphNodeType;
|
|
848
|
+
/**
|
|
849
|
+
* The field(s) that matched the search query.
|
|
850
|
+
*/
|
|
851
|
+
matchedFields: ('name' | 'displayName' | 'description')[];
|
|
852
|
+
/**
|
|
853
|
+
* The key used to identify this node in the graph.
|
|
854
|
+
*/
|
|
855
|
+
key: string;
|
|
856
|
+
/**
|
|
857
|
+
* Whether this node belongs to a foreign domain.
|
|
858
|
+
*/
|
|
859
|
+
isForeign: boolean;
|
|
860
|
+
}
|
|
812
861
|
export {};
|
|
813
862
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modeling/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAA;AACjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAA;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,KAAK,EACV,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,cAAc,EACf,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KA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MAAM,CAAA;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,KAAK,EAAE,eAAe,CAAA;IACtB;;OAEG;IACH,MAAM,EAAE,oBAAoB,EAAE,CAAA;IAC9B;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,OAAO,mBAAmB,GAC1B,OAAO,eAAe,GACtB,OAAO,gBAAgB,GACvB,OAAO,kBAAkB,GACzB,OAAO,qBAAqB,CAAA;AAEhC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAEvB;;OAEG;IACH,SAAS,CAAC,EAAE,kBAAkB,EAAE,CAAA;IAEhC;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAE/B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,EAAE,mBAAmB,CAAA;IAEzB;;OAEG;IACH,aAAa,EAAE,CAAC,MAAM,GAAG,aAAa,GAAG,aAAa,CAAC,EAAE,CAAA;IAEzD;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IAEX;;OAEG;IACH,SAAS,EAAE,OAAO,CAAA;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modeling/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { GraphJson } from '@api-client/graph/graph/types.js'\nimport type { Graph } from '@api-client/graph/graph/Graph.js'\nimport type { DomainAssociation } from './DomainAssociation.js'\nimport type { DomainEntity } from './DomainEntity.js'\nimport type { DomainModel } from './DomainModel.js'\nimport type { DomainNamespace } from './DomainNamespace.js'\nimport type { DomainProperty } from './DomainProperty.js'\nimport type {\n DomainNamespaceKind,\n DomainEntityKind,\n DomainModelKind,\n DomainPropertyKind,\n DomainAssociationKind,\n DataDomainKind,\n} from '../models/kinds.js'\nimport type { DataDomain } from './DataDomain.js'\n\nexport interface DataDomainRemoveOptions {\n /**\n * When true, the object will be forcibly removed.\n * The resolution defined in the `ImpactResolution` class will be applied.\n *\n * For example, when removing an entity that is a parent to another entity, it will\n * removed itself as a parent from the child entity.\n *\n * Note, this option should only be used when the DomainImpactAnalysis has been performed\n * and the user was informed of the impact.\n */\n force?: boolean\n}\n\nexport interface AssociationAddOptions {\n /**\n * When set, it is the the association target's origin data domain.\n * The key of the target data domain where this target entity is defined.\n * Only used when `key` is specified.\n */\n domain?: string\n /**\n * The key of the association target, if known.\n * If the target of the association is not specified, and the association has no other targets,\n * the association is ignored in the namespace while processing.\n */\n key?: string\n}\n\nexport interface DomainGraphEdge {\n /**\n * Indicates that the edge is to or from a foreign domain.\n */\n foreign?: boolean\n /**\n * The key of the foreign domain. Always set with the `foreign` property.\n */\n domain?: string\n /**\n * The type of the edge.\n * - `association` The edge is to an association object.\n * - When coming **from** an entity (the `v` property), that entity owns the association.\n * - When coming **to** an entity (the `w` property), that entity is the target of the association.\n * An association can have multiple targets.\n * - `property` The edge is to a property object. Can only be created between an entity and a property.\n * - The **from** (`v`) is the entity.\n * - The **to** (`w`) is the property.\n * - `parent` The edge is to a parent object.\n * - The **from** (`v`) is the child entity.\n * - The **to** (`w`) is the parent entity.\n */\n type: 'association' | 'property' | 'parent'\n}\n\nexport type DomainGraphNodeType = DomainNamespace | DomainModel | DomainEntity | DomainProperty | DomainAssociation\n\n/**\n * An interface that describes the data domain dependency.\n */\nexport interface ForeignDomainDependency {\n /**\n * The system registered key of the foreign domain.\n */\n key: string\n /**\n * The version of the foreign domain used in this domain.\n */\n version: string\n}\n\nexport interface AssociationTarget {\n /**\n * The key of the target entity.\n */\n key: string\n /**\n * The key of the target data domain.\n * This is only set when the target is in a different data domain.\n */\n domain?: string\n}\n\n/**\n * Describes the default value set on a property schema.\n */\nexport interface SchemaDefaultValue {\n /**\n * The type of the default value.\n *\n * - `literal` The `value` should be used as-is.\n * - `function` The value represents the name of the function to be used.\n */\n type: 'literal' | 'function'\n /**\n * The actual value type depends on the `type`.\n * It is always a string and it has to be casted to the property's data type.\n */\n value: string\n}\n\n/**\n * A general schema definition for a property.\n * This is propagated to all bindings (when they support these properties).\n */\nexport interface PropertySchema {\n /**\n * The minimum value of the property.\n *\n * By default it is inclusive value. Use the `exclusiveMinimum` property to make it exclusive.\n *\n * Used with:\n * - string\n * - number\n * - date\n * - time\n * - datetime\n */\n minimum?: number\n /**\n * The maximum value of the property.\n *\n * By default it is inclusive value. Use the `exclusiveMaximum` property to make it exclusive.\n *\n * Used with:\n * - string\n * - number\n * - date\n * - time\n * - datetime\n */\n maximum?: number\n /**\n * When set, the minimum value is exclusive.\n *\n * - When `false`: value ≥ minimum.\n * - When `true`: value > minimum.\n */\n exclusiveMinimum?: boolean\n /**\n * When set, the exclusiveMaximum value is exclusive.\n *\n * - When `false`: value ≤ maximum.\n * - When `true`: value < minimum.\n */\n exclusiveMaximum?: boolean\n /**\n * The multiplier value for a number scalar.\n *\n * Examples:\n * - if `1` then every integer is allowed\n * - if `2` than every even number is allowed\n * - if `0.5` than every number dividable by `0.5` is allowed\n */\n multipleOf?: number\n /**\n * The enum values for the property.\n * They are always encoded as strings. The actual type is defined in the `dataType` property.\n */\n enum?: string[]\n /**\n * The default value for the property.\n * This is always encoded as a string. The actual type is defined in the `dataType` property.\n */\n defaultValue?: SchemaDefaultValue\n /**\n * The example values for the property.\n * They are always encoded as strings. The actual type is defined in the `dataType` property.\n */\n examples?: string[]\n /**\n * The pattern to use with a string scalar.\n */\n pattern?: string\n}\n\n/**\n * The shortcut type for the data domain graph.\n */\nexport type DataDomainGraph = Graph<unknown, DomainGraphNodeType, DomainGraphEdge>\n/**\n * The serialized version of the data domain graph.\n */\nexport type SerializedGraph = GraphJson<unknown, object, DomainGraphEdge>\n\n/**\n * Represents a standardized, machine-readable error response body\n * as defined by RFC 7807 for HTTP APIs.\n */\nexport interface ProblemDetails {\n /**\n * A URI that identifies the specific problem type. Should resolve to human-readable docs.\n * e.g., \"https://docs.apinow.app/errors/validation-failed\"\n */\n type: string\n\n /**\n * A short, human-readable summary of the problem type.\n * e.g., \"Validation Error\"\n */\n title: string\n\n /**\n * The HTTP status code generated by the origin server for this problem.\n */\n status?: number\n\n /**\n * A human-readable explanation specific to this occurrence of the problem.\n */\n detail?: string\n\n /**\n * A URI that identifies the specific occurrence of the problem.\n * Can be the API request path that caused the error.\n */\n instance: string\n}\n\n/**\n * The set of supported filter operators for the List action.\n * These are used in query parameters, e.g., ?price[gte]=100\n *\n * - eq: Equal\n * - nq: Not Equal\n * - lt: Less Than\n * - lte: Less Than or Equal\n * - gt: Greater Than\n * - gte: Greater Than or Equal\n * - ex: Checks if the field exists\n * - re: Regular expression match\n * - bf: Date before a specific value\n * - af: Date after a specific value\n * - cn: String contains substring / Array contains element\n * - st: String starts with\n * - end: String ends with\n * - in: Value is one of the elements in the provided array\n * - nin: Value is not one of the elements in the provided array\n */\nexport type ResourceFilterOperator =\n | 'eq' // Equal\n | 'nq' // Not equal\n | 'lt' // Less than\n | 'lte' // Less than or equal\n | 'gt' // Greater than\n | 'gte' // Greater than or equal\n | 'ex' // Checks if the field exists\n | 're' // Regular expression match\n | 'bf' // Date before a specific value\n | 'af' // Date after a specific value\n | 'cn' // String contains substring / Array contains element\n | 'st' // String starts with\n | 'end' // String ends with\n | 'in' // Value is one of the elements in the provided array\n | 'nin' // Value is not one of the elements in the provided array\n\n/**\n * The session transport configuration interface.\n * This defines the properties that are common to all session transports.\n */\ninterface SessionTransport {\n /**\n * Whether the session transport is enabled.\n */\n enabled: boolean\n /**\n * The kind of session transport. Each interface defines its own kind.\n */\n kind: string\n}\n\n/**\n * Configuration for cookie-based session transport.\n */\nexport interface CookieConfiguration extends SessionTransport {\n kind: 'cookie'\n /**\n * The lifetime of the cookie session.\n * This is a string representing the duration, e.g., \"7d\" for 7 days or \"24h\" for 24 hours.\n *\n * @default \"7d\"\n */\n lifetime: string\n /**\n * Whether the cookie can only be accessed by the server.\n * This is a security feature to prevent client-side scripts from accessing the cookie.\n * If set to false, the cookie can be accessed by client-side scripts.\n * @default true\n */\n httpOnly: boolean // Defaults to true\n /**\n * Whether the cookie should only be sent over secure connections (HTTPS).\n * This is a security feature to prevent the cookie from being sent over unencrypted connections.\n * @default true\n */\n secure: boolean\n /**\n * The SameSite attribute of the cookie.\n * This attribute controls whether the cookie is sent with cross-site requests.\n * - 'none' means the cookie is sent with cross-site requests.\n * - 'lax' means the cookie is sent with top-level navigations and will be sent along with GET\n * requests initiated by third-party websites.\n * @default 'none'\n */\n sameSite: 'none' | 'lax'\n /**\n * The name of the cookie.\n * This is the key under which the session data will be stored in the cookie.\n * @default 'as' - 'as' stands for \"api session\"\n */\n name: string\n}\n\n/**\n * Configuration for JWT-based session transport.\n */\nexport interface JwtConfiguration extends SessionTransport {\n kind: 'jwt'\n /**\n * The lifetime of the JWT token.\n * This is a string representing the duration, e.g., \"7d\" for 7 days or \"15m\" for 15 minutes.\n *\n * @default \"7d\"\n */\n lifetime: string\n}\n\nexport interface SessionConfiguration {\n /**\n * The secret used to sign the JWT and cookies. Should be handled securely.\n * Not visible in the UI after being set.\n */\n secret: string\n /**\n * The properties from the `User` entity to be encoded into the session payload (JWT/cookie).\n * These properties become available in the `request.auth` object at runtime.\n *\n * In practice, these are the ids of the properties in the `User` entity.\n */\n properties: string[]\n /**\n * The cookie-based session transport configuration.\n */\n cookie?: CookieConfiguration\n\n /**\n * The JWT-based session transport configuration.\n */\n jwt?: JwtConfiguration\n}\n\n/**\n * Defines the authorization strategy for the API.\n * It is a base interface that can be extended for different strategies.\n * For MVP, we will start with Roles-Based Access Control (RBAC).\n */\nexport interface AuthorizationConfiguration {\n /**\n * The authorization strategy. For MVP, we will start with RBAC.\n * Post-MVP will include Permission-Based Access Control (PBAC).\n * The strategy determines how users are granted access to resources.\n *\n * - RBAC (Roles-Based Access Control): Users are assigned roles, and permissions are granted to those roles.\n * - PBAC (Permission-Based Access Control): Users are granted permissions directly, allowing for more\n * granular control.\n */\n strategy: string\n}\n\nexport interface RolesBasedAccessControl extends AuthorizationConfiguration {\n strategy: 'RBAC'\n /**\n * The property within the designated \"User\" entity that defines the user's role.\n * This field is used in access rules to grant permissions.\n *\n * This property must be marked with the \"Role\" data semantic in the Data Modeler.\n * It is required to publish the API.\n */\n roleKey: string\n}\n\n/**\n * Configures the strategy for authenticating end-users.\n * An API can only support one authentication strategy at a time.\n * This is a base interface that can be extended for different strategies.\n */\nexport interface AuthenticationConfiguration {\n /**\n * The authentication method. For MVP, this is focused on username/password.\n * This can be extended in the future to include 'SSO'.\n */\n strategy: string\n}\n\n/**\n * Configuration for username/password authentication.\n * This is the primary authentication method for the API (MVP).\n */\nexport interface UsernamePasswordConfiguration extends AuthenticationConfiguration {\n strategy: 'UsernamePassword'\n /**\n * The specific property within the User entity that holds the password.\n * This property must be marked with the \"Password\" data semantic in the Data Modeler.\n *\n * This property is required to publish the API.\n */\n passwordKey?: string\n}\n\n/**\n * Represents a Data Entity from the Data Domain that the API will expose and operate upon.\n */\nexport interface ExposedEntity {\n /**\n * The key of the Data Entity from the Data Domain.\n */\n key: string\n\n /**\n * Optional configuration for resource-wide rate limiting and throttling.\n * Defines rules to protect the resource from overuse.\n */\n rateLimiting?: RateLimitingConfiguration\n /**\n * Access control rules defining who can perform actions on this resource or collection.\n * It override the top-level access rules defined in the API model.\n */\n accessRule?: AccessRule[]\n\n /**\n * The collection of API actions (e.g., List, Read, Create) enabled for this entity.\n */\n actions: ApiAction[]\n}\n\n/**\n * Represents a specific, configurable API operation applied to a Data Entity.\n * Corresponds to common RESTful interactions.\n */\nexport type ApiAction = ListAction | ReadAction | CreateAction | UpdateAction | DeleteAction | SearchAction\n\n/**\n * A base interface for common properties across all actions.\n */\ninterface Action {\n /**\n * The specific kind of action (e.g., 'List', 'Read', etc.)\n */\n kind: string\n /**\n * Access control rules defining who can perform this action. It is only applied if the\n * authorization strategy is set to 'RBAC'.\n * If no rules grant access, it's denied by default making it essentially private.\n *\n * Note, the API can defined top level access rules that apply to all actions. If this property is set,\n * it overrides the top level access rules for this specific action.\n *\n * It is an ordered list, meaning the first rule that matches the user will be applied.\n * If multiple rules match, the first one in the list takes precedence.\n * If no rules match, the action is denied.\n */\n accessRule?: AccessRule[]\n /**\n * Optional configuration for action-wide rate limiting and throttling.\n * Defines rules to protect the action from overuse.\n */\n rateLimiting?: RateLimitingConfiguration\n}\n\n/**\n * Represents a pagination strategy for API actions that return collections of resources.\n * This is a base interface that can be extended for different pagination strategies.\n */\nexport interface PaginationStrategy {\n /**\n * The kind of pagination strategy. This is used to identify the specific pagination method.\n * For example, 'cursor' for cursor-based pagination or 'offset' for offset-based pagination.\n */\n kind: string\n /**\n * The default page size for the pagination strategy.\n * This is the number of items returned per page when no specific page size is requested.\n */\n pageSize?: number\n}\n\n/**\n * Represents the cursor-based pagination strategy.\n */\nexport interface CursorPaginationStrategy extends PaginationStrategy {\n kind: 'cursor'\n}\n\n/**\n * Represents the offset-based pagination strategy.\n */\nexport interface OffsetPaginationStrategy extends PaginationStrategy {\n kind: 'offset'\n}\n\n/**\n * Enables retrieving a collection of resources.\n * Endpoint: GET /[entity-collection-name]\n */\nexport interface ListAction extends Action {\n kind: 'list'\n /**\n * The pagination strategy used for this action.\n * This defines how the results are paginated when retrieving a collection of resources.\n * It can be either 'cursor' or 'offset'.\n */\n pagination: PaginationStrategy\n /**\n * Fields from the entity that can be used for filtering.\n * Must be marked as \"indexable\" in the Data Model.\n */\n filterableFields: string[]\n /**\n * Fields from the entity that can be used for sorting.\n */\n sortableFields: string[]\n}\n\n/**\n * Enables retrieving a single resource by its ID.\n * Endpoint: GET /[entity-collection-name]/{id}\n */\nexport interface ReadAction extends Action {\n kind: 'read'\n // Association handling (Link IDs vs. Embed) is defined on the\n // data association itself in the Data Modeler.\n}\n\n/**\n * Enables adding a new resource to a collection.\n * Endpoint: POST /[entity-collection-name]\n */\nexport interface CreateAction extends Action {\n kind: 'create'\n}\n\n/**\n * Enables modifying an existing resource.\n * Endpoints: PUT or PATCH /[entity-collection-name]/{id}\n */\nexport interface UpdateAction extends Action {\n kind: 'update'\n /**\n * The allowed HTTP methods for updates. Default: PATCH only.\n *\n * These two methods represent the two common ways to update a resource:\n * - PUT: Replaces the entire resource with the provided data.\n * - PATCH: Applies a partial update to the resource, allowing for specific fields to be modified.\n */\n allowedMethods: ('PUT' | 'PATCH')[]\n}\n\n/**\n * Enables removing an existing resource.\n * Endpoint: DELETE /[entity-collection-name]/{id}\n */\nexport interface DeleteAction extends Action {\n kind: 'delete'\n /**\n * The strategy for deletion. Default: Soft Delete.\n *\n * @default 'soft'\n */\n strategy?: 'soft' | 'hard'\n}\n\n/**\n * Enables keyword-based search across specified fields.\n * Endpoint: GET /[entity-collection-name]/search\n */\nexport interface SearchAction extends Action {\n kind: 'search'\n /**\n * The fields within the entity to be included in the search scope.\n * Must be \"indexable\" and typically text-based.\n */\n fields: string[]\n}\n\n/**\n * Defines the access control policy for a specific API action.\n * Based on the predefined rule types for session-based authentication.\n */\nexport type AccessRule =\n | AllowPublicAccessRule\n | AllowAuthenticatedAccessRule\n | MatchResourceOwnerAccessRule\n | MatchUserRoleAccessRule\n | MatchUserPropertyAccessRule\n | MatchEmailDomainAccessRule\n\nexport interface BaseAccessRule {\n /**\n * The unique identifier for the access rule.\n * This is used to reference the rule in the API configuration.\n */\n type: string\n}\n\n/**\n * The action is allowed for all users, including unauthenticated ones.\n * This is typically used for public APIs or resources that do not require authentication.\n * It is the most permissive rule and should be used with caution.\n */\nexport interface AllowPublicAccessRule extends BaseAccessRule {\n type: 'public'\n}\n/**\n * The action is allowed for any authenticated user.\n * This rule does not impose any additional restrictions based on user properties or resource ownership.\n * It is used for resources that should be accessible to all logged-in users.\n */\nexport interface AllowAuthenticatedAccessRule extends BaseAccessRule {\n type: 'authenticated'\n}\n/**\n * The action is allowed if the authenticated user's ID matches a specific property on the resource.\n * This is typically used to restrict access to resources owned by the user.\n * For example, a user can only access their own profile or documents.\n */\nexport interface MatchResourceOwnerAccessRule extends BaseAccessRule {\n type: 'resourceOwner'\n /**\n * The property on the resource that should match the authenticated user's ID.\n * This is typically the ID of the user who owns the resource.\n *\n * The domain model should annotate this property with the \"ResourceOwnerIdentifier\" semantic\n * to indicate that it is used for ownership checks.\n */\n property: string\n}\n\n/**\n * The action is allowed if the authenticated user has a specific role.\n * This is used to enforce role-based access control (RBAC).\n * For example, only users with the \"admin\" role can perform certain actions.\n */\nexport interface MatchUserRoleAccessRule extends BaseAccessRule {\n type: 'matchUserRole'\n /**\n * The role that the authenticated user must have to access the resource.\n * This is typically a property on the user entity that defines their role.\n *\n * The domain model should annotate this property with the \"UserRole\" semantic\n * to indicate that it is used for role-based access control.\n */\n role: string\n}\n/**\n * The action is allowed if a specific property on the authenticated user matches an expected value.\n * This is used to enforce other user-specific restrictions.\n */\nexport interface MatchUserPropertyAccessRule extends BaseAccessRule {\n type: 'matchUserProperty'\n /**\n * The property on the authenticated user that should match the expected value.\n */\n property: string\n /**\n * The expected value for the user property.\n */\n value: string\n}\n/**\n * The action is allowed if the authenticated user's email domain matches a specific domain.\n * This is used to restrict access based on the user's email address.\n * For example, only users with an email address from \"my-company.com\" can access certain resources.\n */\nexport interface MatchEmailDomainAccessRule extends BaseAccessRule {\n type: 'matchEmailDomain'\n /**\n * The email domain that the authenticated user's email must match.\n */\n domain: string\n}\n\n/**\n * Defines the rate limiting and throttling policies for the entire API.\n */\nexport interface RateLimitingConfiguration {\n /**\n * An ordered list of rules. The first rule that matches an incoming\n * request will be applied.\n */\n rules: RateLimitRule[]\n}\n\n/**\n * Represents a single rate limiting rule that applies to a specific\n * type of client, using a token bucket algorithm.\n */\nexport interface RateLimitRule {\n /**\n * A human-readable description of what this rule is for.\n * e.g., \"Limit anonymous users to 60 requests per hour.\"\n */\n description?: string\n\n /**\n * Defines how to group requests for rate limiting. This determines\n * who the limit applies to.\n *\n * - 'ip': Keys on the client's IP address. Best for anonymous traffic.\n * - 'userId': Keys on the authenticated user's ID. Best for logged-in users.\n * - 'role': Applies a shared limit to all users of a specific role.\n */\n key: { type: 'ip' } | { type: 'userId' } | { type: 'role'; value: string }\n\n /**\n * The number of requests allowed over the defined interval.\n * This is the rate at which tokens are added to the bucket.\n */\n rate: number\n\n /**\n * The time interval for the rate.\n */\n interval: 'second' | 'minute' | 'hour' | 'day'\n\n /**\n * The maximum number of requests that can be made in a burst.\n * This represents the \"bucket size.\" A larger burst allows for\n * more requests to be made in a short period before throttling begins.\n */\n burst: number\n}\n\nexport type DomainImpactKinds =\n | typeof DomainNamespaceKind\n | typeof DomainEntityKind\n | typeof DomainModelKind\n | typeof DomainPropertyKind\n | typeof DomainAssociationKind\n | typeof DataDomainKind\n\n/**\n * The impact analysis report\n */\nexport interface DomainImpactReport {\n /**\n * The key of the impacted data object.\n * This is the key of the object that is being changed.\n */\n key: string\n /**\n * The kind of the impacted data object.\n * This is the kind of the object that is being changed.\n */\n kind: DomainImpactKinds\n /**\n * The list of impacted data objects.\n */\n impact: DomainImpactItem[]\n /**\n * Whether it is possible to proceed with the change.\n * If the change is not possible, the reason will be in the impact list.\n */\n canProceed: boolean\n}\n\nexport interface DomainImpactItem {\n /**\n * The key of the impacted data object.\n */\n key: string\n /**\n * The kind of the impacted data object.\n */\n kind: string\n /**\n * The type of the impact.\n *\n * - `delete` - The data object would be deleted.\n */\n type: 'delete' | 'publish'\n /**\n * The impact description.\n * Explains what will happen to the impacted data object.\n * This is a human-readable description of the impact.\n * It should be clear and concise.\n */\n impact: string\n /**\n * The severity of the impact.\n *\n * - `info` - The impact is informational.\n * - `warning` - The impact can potentially cause problems but is not a blocker.\n * - `error` - The impact is a blocker and needs to be resolved before proceeding.\n */\n severity: 'info' | 'warning' | 'error'\n /**\n * The type of the relationship between two impacted objects.\n */\n relationship?: 'child'\n /**\n * The resolution of the conflict if the change will be forced.\n */\n resolution?: string\n /**\n * The optional parent of the impacted data object.\n * For example, if the impacted item is a property, this will be the entity it belongs to.\n */\n parent?: string\n}\n\nexport interface DeserializeOptions {\n /**\n * The mode to use for deserialization.\n */\n mode?: DeserializationMode\n /**\n * The serialized graph to deserialize.\n * This is the JSON representation of the graph.\n */\n json?: SerializedGraph\n /**\n * The list of foreign domains that this domain depends on.\n */\n dependencies?: DataDomain[]\n}\n\n/**\n * Describes the mode for deserializing a domain graph.\n */\nexport type DeserializationMode = 'strict' | 'lenient'\n\n/**\n * Describes an issue found during deserialization.\n */\nexport interface DeserializationIssue {\n /**\n * The type of issue encountered.\n */\n type: 'missing_node' | 'missing_edge' | 'invalid_parent' | 'missing_dependency' | 'malformed_entry' | 'unknown_kind'\n /**\n * The severity of the issue.\n */\n severity: 'error' | 'warning' | 'info'\n /**\n * A human-readable description of the issue.\n */\n message: string\n /**\n * The key of the affected node, edge, or entity if applicable.\n */\n affectedKey?: string\n /**\n * Additional context about the issue.\n */\n context?: Record<string, unknown>\n /**\n * The action taken to handle this issue in lenient mode.\n */\n resolution?: string\n}\n\n/**\n * The result of a deserialization operation.\n */\nexport interface DeserializationResult {\n /**\n * The deserialized graph.\n */\n graph: DataDomainGraph\n /**\n * Issues encountered during deserialization.\n */\n issues: DeserializationIssue[]\n /**\n * Whether the deserialization was successful.\n * This is set to true when a critical failures occurred.\n */\n success: boolean\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modeling/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { GraphJson } from '@api-client/graph/graph/types.js'\nimport type { Graph } from '@api-client/graph/graph/Graph.js'\nimport type { DomainAssociation } from './DomainAssociation.js'\nimport type { DomainEntity } from './DomainEntity.js'\nimport type { DomainModel } from './DomainModel.js'\nimport type { DomainNamespace } from './DomainNamespace.js'\nimport type { DomainProperty } from './DomainProperty.js'\nimport type {\n DomainNamespaceKind,\n DomainEntityKind,\n DomainModelKind,\n DomainPropertyKind,\n DomainAssociationKind,\n DataDomainKind,\n} from '../models/kinds.js'\nimport type { DataDomain } from './DataDomain.js'\n\nexport interface DataDomainRemoveOptions {\n /**\n * When true, the object will be forcibly removed.\n * The resolution defined in the `ImpactResolution` class will be applied.\n *\n * For example, when removing an entity that is a parent to another entity, it will\n * removed itself as a parent from the child entity.\n *\n * Note, this option should only be used when the DomainImpactAnalysis has been performed\n * and the user was informed of the impact.\n */\n force?: boolean\n}\n\nexport interface AssociationAddOptions {\n /**\n * When set, it is the the association target's origin data domain.\n * The key of the target data domain where this target entity is defined.\n * Only used when `key` is specified.\n */\n domain?: string\n /**\n * The key of the association target, if known.\n * If the target of the association is not specified, and the association has no other targets,\n * the association is ignored in the namespace while processing.\n */\n key?: string\n}\n\nexport interface DomainGraphEdge {\n /**\n * Indicates that the edge is to or from a foreign domain.\n */\n foreign?: boolean\n /**\n * The key of the foreign domain. Always set with the `foreign` property.\n */\n domain?: string\n /**\n * The type of the edge.\n * - `association` The edge is to an association object.\n * - When coming **from** an entity (the `v` property), that entity owns the association.\n * - When coming **to** an entity (the `w` property), that entity is the target of the association.\n * An association can have multiple targets.\n * - `property` The edge is to a property object. Can only be created between an entity and a property.\n * - The **from** (`v`) is the entity.\n * - The **to** (`w`) is the property.\n * - `parent` The edge is to a parent object.\n * - The **from** (`v`) is the child entity.\n * - The **to** (`w`) is the parent entity.\n */\n type: 'association' | 'property' | 'parent'\n}\n\nexport type DomainGraphNodeType = DomainNamespace | DomainModel | DomainEntity | DomainProperty | DomainAssociation\n\n/**\n * An interface that describes the data domain dependency.\n */\nexport interface ForeignDomainDependency {\n /**\n * The system registered key of the foreign domain.\n */\n key: string\n /**\n * The version of the foreign domain used in this domain.\n */\n version: string\n}\n\nexport interface AssociationTarget {\n /**\n * The key of the target entity.\n */\n key: string\n /**\n * The key of the target data domain.\n * This is only set when the target is in a different data domain.\n */\n domain?: string\n}\n\n/**\n * Describes the default value set on a property schema.\n */\nexport interface SchemaDefaultValue {\n /**\n * The type of the default value.\n *\n * - `literal` The `value` should be used as-is.\n * - `function` The value represents the name of the function to be used.\n */\n type: 'literal' | 'function'\n /**\n * The actual value type depends on the `type`.\n * It is always a string and it has to be casted to the property's data type.\n */\n value: string\n}\n\n/**\n * A general schema definition for a property.\n * This is propagated to all bindings (when they support these properties).\n */\nexport interface PropertySchema {\n /**\n * The minimum value of the property.\n *\n * By default it is inclusive value. Use the `exclusiveMinimum` property to make it exclusive.\n *\n * Used with:\n * - string\n * - number\n * - date\n * - time\n * - datetime\n */\n minimum?: number\n /**\n * The maximum value of the property.\n *\n * By default it is inclusive value. Use the `exclusiveMaximum` property to make it exclusive.\n *\n * Used with:\n * - string\n * - number\n * - date\n * - time\n * - datetime\n */\n maximum?: number\n /**\n * When set, the minimum value is exclusive.\n *\n * - When `false`: value ≥ minimum.\n * - When `true`: value > minimum.\n */\n exclusiveMinimum?: boolean\n /**\n * When set, the exclusiveMaximum value is exclusive.\n *\n * - When `false`: value ≤ maximum.\n * - When `true`: value < minimum.\n */\n exclusiveMaximum?: boolean\n /**\n * The multiplier value for a number scalar.\n *\n * Examples:\n * - if `1` then every integer is allowed\n * - if `2` than every even number is allowed\n * - if `0.5` than every number dividable by `0.5` is allowed\n */\n multipleOf?: number\n /**\n * The enum values for the property.\n * They are always encoded as strings. The actual type is defined in the `dataType` property.\n */\n enum?: string[]\n /**\n * The default value for the property.\n * This is always encoded as a string. The actual type is defined in the `dataType` property.\n */\n defaultValue?: SchemaDefaultValue\n /**\n * The example values for the property.\n * They are always encoded as strings. The actual type is defined in the `dataType` property.\n */\n examples?: string[]\n /**\n * The pattern to use with a string scalar.\n */\n pattern?: string\n}\n\n/**\n * The shortcut type for the data domain graph.\n */\nexport type DataDomainGraph = Graph<unknown, DomainGraphNodeType, DomainGraphEdge>\n/**\n * The serialized version of the data domain graph.\n */\nexport type SerializedGraph = GraphJson<unknown, object, DomainGraphEdge>\n\n/**\n * Represents a standardized, machine-readable error response body\n * as defined by RFC 7807 for HTTP APIs.\n */\nexport interface ProblemDetails {\n /**\n * A URI that identifies the specific problem type. Should resolve to human-readable docs.\n * e.g., \"https://docs.apinow.app/errors/validation-failed\"\n */\n type: string\n\n /**\n * A short, human-readable summary of the problem type.\n * e.g., \"Validation Error\"\n */\n title: string\n\n /**\n * The HTTP status code generated by the origin server for this problem.\n */\n status?: number\n\n /**\n * A human-readable explanation specific to this occurrence of the problem.\n */\n detail?: string\n\n /**\n * A URI that identifies the specific occurrence of the problem.\n * Can be the API request path that caused the error.\n */\n instance: string\n}\n\n/**\n * The set of supported filter operators for the List action.\n * These are used in query parameters, e.g., ?price[gte]=100\n *\n * - eq: Equal\n * - nq: Not Equal\n * - lt: Less Than\n * - lte: Less Than or Equal\n * - gt: Greater Than\n * - gte: Greater Than or Equal\n * - ex: Checks if the field exists\n * - re: Regular expression match\n * - bf: Date before a specific value\n * - af: Date after a specific value\n * - cn: String contains substring / Array contains element\n * - st: String starts with\n * - end: String ends with\n * - in: Value is one of the elements in the provided array\n * - nin: Value is not one of the elements in the provided array\n */\nexport type ResourceFilterOperator =\n | 'eq' // Equal\n | 'nq' // Not equal\n | 'lt' // Less than\n | 'lte' // Less than or equal\n | 'gt' // Greater than\n | 'gte' // Greater than or equal\n | 'ex' // Checks if the field exists\n | 're' // Regular expression match\n | 'bf' // Date before a specific value\n | 'af' // Date after a specific value\n | 'cn' // String contains substring / Array contains element\n | 'st' // String starts with\n | 'end' // String ends with\n | 'in' // Value is one of the elements in the provided array\n | 'nin' // Value is not one of the elements in the provided array\n\n/**\n * The session transport configuration interface.\n * This defines the properties that are common to all session transports.\n */\ninterface SessionTransport {\n /**\n * Whether the session transport is enabled.\n */\n enabled: boolean\n /**\n * The kind of session transport. Each interface defines its own kind.\n */\n kind: string\n}\n\n/**\n * Configuration for cookie-based session transport.\n */\nexport interface CookieConfiguration extends SessionTransport {\n kind: 'cookie'\n /**\n * The lifetime of the cookie session.\n * This is a string representing the duration, e.g., \"7d\" for 7 days or \"24h\" for 24 hours.\n *\n * @default \"7d\"\n */\n lifetime: string\n /**\n * Whether the cookie can only be accessed by the server.\n * This is a security feature to prevent client-side scripts from accessing the cookie.\n * If set to false, the cookie can be accessed by client-side scripts.\n * @default true\n */\n httpOnly: boolean // Defaults to true\n /**\n * Whether the cookie should only be sent over secure connections (HTTPS).\n * This is a security feature to prevent the cookie from being sent over unencrypted connections.\n * @default true\n */\n secure: boolean\n /**\n * The SameSite attribute of the cookie.\n * This attribute controls whether the cookie is sent with cross-site requests.\n * - 'none' means the cookie is sent with cross-site requests.\n * - 'lax' means the cookie is sent with top-level navigations and will be sent along with GET\n * requests initiated by third-party websites.\n * @default 'none'\n */\n sameSite: 'none' | 'lax'\n /**\n * The name of the cookie.\n * This is the key under which the session data will be stored in the cookie.\n * @default 'as' - 'as' stands for \"api session\"\n */\n name: string\n}\n\n/**\n * Configuration for JWT-based session transport.\n */\nexport interface JwtConfiguration extends SessionTransport {\n kind: 'jwt'\n /**\n * The lifetime of the JWT token.\n * This is a string representing the duration, e.g., \"7d\" for 7 days or \"15m\" for 15 minutes.\n *\n * @default \"7d\"\n */\n lifetime: string\n}\n\nexport interface SessionConfiguration {\n /**\n * The secret used to sign the JWT and cookies. Should be handled securely.\n * Not visible in the UI after being set.\n */\n secret: string\n /**\n * The properties from the `User` entity to be encoded into the session payload (JWT/cookie).\n * These properties become available in the `request.auth` object at runtime.\n *\n * In practice, these are the ids of the properties in the `User` entity.\n */\n properties: string[]\n /**\n * The cookie-based session transport configuration.\n */\n cookie?: CookieConfiguration\n\n /**\n * The JWT-based session transport configuration.\n */\n jwt?: JwtConfiguration\n}\n\n/**\n * Defines the authorization strategy for the API.\n * It is a base interface that can be extended for different strategies.\n * For MVP, we will start with Roles-Based Access Control (RBAC).\n */\nexport interface AuthorizationConfiguration {\n /**\n * The authorization strategy. For MVP, we will start with RBAC.\n * Post-MVP will include Permission-Based Access Control (PBAC).\n * The strategy determines how users are granted access to resources.\n *\n * - RBAC (Roles-Based Access Control): Users are assigned roles, and permissions are granted to those roles.\n * - PBAC (Permission-Based Access Control): Users are granted permissions directly, allowing for more\n * granular control.\n */\n strategy: string\n}\n\nexport interface RolesBasedAccessControl extends AuthorizationConfiguration {\n strategy: 'RBAC'\n /**\n * The property within the designated \"User\" entity that defines the user's role.\n * This field is used in access rules to grant permissions.\n *\n * This property must be marked with the \"Role\" data semantic in the Data Modeler.\n * It is required to publish the API.\n */\n roleKey: string\n}\n\n/**\n * Configures the strategy for authenticating end-users.\n * An API can only support one authentication strategy at a time.\n * This is a base interface that can be extended for different strategies.\n */\nexport interface AuthenticationConfiguration {\n /**\n * The authentication method. For MVP, this is focused on username/password.\n * This can be extended in the future to include 'SSO'.\n */\n strategy: string\n}\n\n/**\n * Configuration for username/password authentication.\n * This is the primary authentication method for the API (MVP).\n */\nexport interface UsernamePasswordConfiguration extends AuthenticationConfiguration {\n strategy: 'UsernamePassword'\n /**\n * The specific property within the User entity that holds the password.\n * This property must be marked with the \"Password\" data semantic in the Data Modeler.\n *\n * This property is required to publish the API.\n */\n passwordKey?: string\n}\n\n/**\n * Represents a Data Entity from the Data Domain that the API will expose and operate upon.\n */\nexport interface ExposedEntity {\n /**\n * The key of the Data Entity from the Data Domain.\n */\n key: string\n\n /**\n * Optional configuration for resource-wide rate limiting and throttling.\n * Defines rules to protect the resource from overuse.\n */\n rateLimiting?: RateLimitingConfiguration\n /**\n * Access control rules defining who can perform actions on this resource or collection.\n * It override the top-level access rules defined in the API model.\n */\n accessRule?: AccessRule[]\n\n /**\n * The collection of API actions (e.g., List, Read, Create) enabled for this entity.\n */\n actions: ApiAction[]\n}\n\n/**\n * Represents a specific, configurable API operation applied to a Data Entity.\n * Corresponds to common RESTful interactions.\n */\nexport type ApiAction = ListAction | ReadAction | CreateAction | UpdateAction | DeleteAction | SearchAction\n\n/**\n * A base interface for common properties across all actions.\n */\ninterface Action {\n /**\n * The specific kind of action (e.g., 'List', 'Read', etc.)\n */\n kind: string\n /**\n * Access control rules defining who can perform this action. It is only applied if the\n * authorization strategy is set to 'RBAC'.\n * If no rules grant access, it's denied by default making it essentially private.\n *\n * Note, the API can defined top level access rules that apply to all actions. If this property is set,\n * it overrides the top level access rules for this specific action.\n *\n * It is an ordered list, meaning the first rule that matches the user will be applied.\n * If multiple rules match, the first one in the list takes precedence.\n * If no rules match, the action is denied.\n */\n accessRule?: AccessRule[]\n /**\n * Optional configuration for action-wide rate limiting and throttling.\n * Defines rules to protect the action from overuse.\n */\n rateLimiting?: RateLimitingConfiguration\n}\n\n/**\n * Represents a pagination strategy for API actions that return collections of resources.\n * This is a base interface that can be extended for different pagination strategies.\n */\nexport interface PaginationStrategy {\n /**\n * The kind of pagination strategy. This is used to identify the specific pagination method.\n * For example, 'cursor' for cursor-based pagination or 'offset' for offset-based pagination.\n */\n kind: string\n /**\n * The default page size for the pagination strategy.\n * This is the number of items returned per page when no specific page size is requested.\n */\n pageSize?: number\n}\n\n/**\n * Represents the cursor-based pagination strategy.\n */\nexport interface CursorPaginationStrategy extends PaginationStrategy {\n kind: 'cursor'\n}\n\n/**\n * Represents the offset-based pagination strategy.\n */\nexport interface OffsetPaginationStrategy extends PaginationStrategy {\n kind: 'offset'\n}\n\n/**\n * Enables retrieving a collection of resources.\n * Endpoint: GET /[entity-collection-name]\n */\nexport interface ListAction extends Action {\n kind: 'list'\n /**\n * The pagination strategy used for this action.\n * This defines how the results are paginated when retrieving a collection of resources.\n * It can be either 'cursor' or 'offset'.\n */\n pagination: PaginationStrategy\n /**\n * Fields from the entity that can be used for filtering.\n * Must be marked as \"indexable\" in the Data Model.\n */\n filterableFields: string[]\n /**\n * Fields from the entity that can be used for sorting.\n */\n sortableFields: string[]\n}\n\n/**\n * Enables retrieving a single resource by its ID.\n * Endpoint: GET /[entity-collection-name]/{id}\n */\nexport interface ReadAction extends Action {\n kind: 'read'\n // Association handling (Link IDs vs. Embed) is defined on the\n // data association itself in the Data Modeler.\n}\n\n/**\n * Enables adding a new resource to a collection.\n * Endpoint: POST /[entity-collection-name]\n */\nexport interface CreateAction extends Action {\n kind: 'create'\n}\n\n/**\n * Enables modifying an existing resource.\n * Endpoints: PUT or PATCH /[entity-collection-name]/{id}\n */\nexport interface UpdateAction extends Action {\n kind: 'update'\n /**\n * The allowed HTTP methods for updates. Default: PATCH only.\n *\n * These two methods represent the two common ways to update a resource:\n * - PUT: Replaces the entire resource with the provided data.\n * - PATCH: Applies a partial update to the resource, allowing for specific fields to be modified.\n */\n allowedMethods: ('PUT' | 'PATCH')[]\n}\n\n/**\n * Enables removing an existing resource.\n * Endpoint: DELETE /[entity-collection-name]/{id}\n */\nexport interface DeleteAction extends Action {\n kind: 'delete'\n /**\n * The strategy for deletion. Default: Soft Delete.\n *\n * @default 'soft'\n */\n strategy?: 'soft' | 'hard'\n}\n\n/**\n * Enables keyword-based search across specified fields.\n * Endpoint: GET /[entity-collection-name]/search\n */\nexport interface SearchAction extends Action {\n kind: 'search'\n /**\n * The fields within the entity to be included in the search scope.\n * Must be \"indexable\" and typically text-based.\n */\n fields: string[]\n}\n\n/**\n * Defines the access control policy for a specific API action.\n * Based on the predefined rule types for session-based authentication.\n */\nexport type AccessRule =\n | AllowPublicAccessRule\n | AllowAuthenticatedAccessRule\n | MatchResourceOwnerAccessRule\n | MatchUserRoleAccessRule\n | MatchUserPropertyAccessRule\n | MatchEmailDomainAccessRule\n\nexport interface BaseAccessRule {\n /**\n * The unique identifier for the access rule.\n * This is used to reference the rule in the API configuration.\n */\n type: string\n}\n\n/**\n * The action is allowed for all users, including unauthenticated ones.\n * This is typically used for public APIs or resources that do not require authentication.\n * It is the most permissive rule and should be used with caution.\n */\nexport interface AllowPublicAccessRule extends BaseAccessRule {\n type: 'public'\n}\n/**\n * The action is allowed for any authenticated user.\n * This rule does not impose any additional restrictions based on user properties or resource ownership.\n * It is used for resources that should be accessible to all logged-in users.\n */\nexport interface AllowAuthenticatedAccessRule extends BaseAccessRule {\n type: 'authenticated'\n}\n/**\n * The action is allowed if the authenticated user's ID matches a specific property on the resource.\n * This is typically used to restrict access to resources owned by the user.\n * For example, a user can only access their own profile or documents.\n */\nexport interface MatchResourceOwnerAccessRule extends BaseAccessRule {\n type: 'resourceOwner'\n /**\n * The property on the resource that should match the authenticated user's ID.\n * This is typically the ID of the user who owns the resource.\n *\n * The domain model should annotate this property with the \"ResourceOwnerIdentifier\" semantic\n * to indicate that it is used for ownership checks.\n */\n property: string\n}\n\n/**\n * The action is allowed if the authenticated user has a specific role.\n * This is used to enforce role-based access control (RBAC).\n * For example, only users with the \"admin\" role can perform certain actions.\n */\nexport interface MatchUserRoleAccessRule extends BaseAccessRule {\n type: 'matchUserRole'\n /**\n * The role that the authenticated user must have to access the resource.\n * This is typically a property on the user entity that defines their role.\n *\n * The domain model should annotate this property with the \"UserRole\" semantic\n * to indicate that it is used for role-based access control.\n */\n role: string\n}\n/**\n * The action is allowed if a specific property on the authenticated user matches an expected value.\n * This is used to enforce other user-specific restrictions.\n */\nexport interface MatchUserPropertyAccessRule extends BaseAccessRule {\n type: 'matchUserProperty'\n /**\n * The property on the authenticated user that should match the expected value.\n */\n property: string\n /**\n * The expected value for the user property.\n */\n value: string\n}\n/**\n * The action is allowed if the authenticated user's email domain matches a specific domain.\n * This is used to restrict access based on the user's email address.\n * For example, only users with an email address from \"my-company.com\" can access certain resources.\n */\nexport interface MatchEmailDomainAccessRule extends BaseAccessRule {\n type: 'matchEmailDomain'\n /**\n * The email domain that the authenticated user's email must match.\n */\n domain: string\n}\n\n/**\n * Defines the rate limiting and throttling policies for the entire API.\n */\nexport interface RateLimitingConfiguration {\n /**\n * An ordered list of rules. The first rule that matches an incoming\n * request will be applied.\n */\n rules: RateLimitRule[]\n}\n\n/**\n * Represents a single rate limiting rule that applies to a specific\n * type of client, using a token bucket algorithm.\n */\nexport interface RateLimitRule {\n /**\n * A human-readable description of what this rule is for.\n * e.g., \"Limit anonymous users to 60 requests per hour.\"\n */\n description?: string\n\n /**\n * Defines how to group requests for rate limiting. This determines\n * who the limit applies to.\n *\n * - 'ip': Keys on the client's IP address. Best for anonymous traffic.\n * - 'userId': Keys on the authenticated user's ID. Best for logged-in users.\n * - 'role': Applies a shared limit to all users of a specific role.\n */\n key: { type: 'ip' } | { type: 'userId' } | { type: 'role'; value: string }\n\n /**\n * The number of requests allowed over the defined interval.\n * This is the rate at which tokens are added to the bucket.\n */\n rate: number\n\n /**\n * The time interval for the rate.\n */\n interval: 'second' | 'minute' | 'hour' | 'day'\n\n /**\n * The maximum number of requests that can be made in a burst.\n * This represents the \"bucket size.\" A larger burst allows for\n * more requests to be made in a short period before throttling begins.\n */\n burst: number\n}\n\nexport type DomainImpactKinds =\n | typeof DomainNamespaceKind\n | typeof DomainEntityKind\n | typeof DomainModelKind\n | typeof DomainPropertyKind\n | typeof DomainAssociationKind\n | typeof DataDomainKind\n\n/**\n * The impact analysis report\n */\nexport interface DomainImpactReport {\n /**\n * The key of the impacted data object.\n * This is the key of the object that is being changed.\n */\n key: string\n /**\n * The kind of the impacted data object.\n * This is the kind of the object that is being changed.\n */\n kind: DomainImpactKinds\n /**\n * The list of impacted data objects.\n */\n impact: DomainImpactItem[]\n /**\n * Whether it is possible to proceed with the change.\n * If the change is not possible, the reason will be in the impact list.\n */\n canProceed: boolean\n}\n\nexport interface DomainImpactItem {\n /**\n * The key of the impacted data object.\n */\n key: string\n /**\n * The kind of the impacted data object.\n */\n kind: string\n /**\n * The type of the impact.\n *\n * - `delete` - The data object would be deleted.\n */\n type: 'delete' | 'publish'\n /**\n * The impact description.\n * Explains what will happen to the impacted data object.\n * This is a human-readable description of the impact.\n * It should be clear and concise.\n */\n impact: string\n /**\n * The severity of the impact.\n *\n * - `info` - The impact is informational.\n * - `warning` - The impact can potentially cause problems but is not a blocker.\n * - `error` - The impact is a blocker and needs to be resolved before proceeding.\n */\n severity: 'info' | 'warning' | 'error'\n /**\n * The type of the relationship between two impacted objects.\n */\n relationship?: 'child'\n /**\n * The resolution of the conflict if the change will be forced.\n */\n resolution?: string\n /**\n * The optional parent of the impacted data object.\n * For example, if the impacted item is a property, this will be the entity it belongs to.\n */\n parent?: string\n}\n\nexport interface DeserializeOptions {\n /**\n * The mode to use for deserialization.\n */\n mode?: DeserializationMode\n /**\n * The serialized graph to deserialize.\n * This is the JSON representation of the graph.\n */\n json?: SerializedGraph\n /**\n * The list of foreign domains that this domain depends on.\n */\n dependencies?: DataDomain[]\n}\n\n/**\n * Describes the mode for deserializing a domain graph.\n */\nexport type DeserializationMode = 'strict' | 'lenient'\n\n/**\n * Describes an issue found during deserialization.\n */\nexport interface DeserializationIssue {\n /**\n * The type of issue encountered.\n */\n type: 'missing_node' | 'missing_edge' | 'invalid_parent' | 'missing_dependency' | 'malformed_entry' | 'unknown_kind'\n /**\n * The severity of the issue.\n */\n severity: 'error' | 'warning' | 'info'\n /**\n * A human-readable description of the issue.\n */\n message: string\n /**\n * The key of the affected node, edge, or entity if applicable.\n */\n affectedKey?: string\n /**\n * Additional context about the issue.\n */\n context?: Record<string, unknown>\n /**\n * The action taken to handle this issue in lenient mode.\n */\n resolution?: string\n}\n\n/**\n * The result of a deserialization operation.\n */\nexport interface DeserializationResult {\n /**\n * The deserialized graph.\n */\n graph: DataDomainGraph\n /**\n * Issues encountered during deserialization.\n */\n issues: DeserializationIssue[]\n /**\n * Whether the deserialization was successful.\n * This is set to true when a critical failures occurred.\n */\n success: boolean\n}\n\n/**\n * Available node types for search filtering.\n */\nexport type SearchableNodeType =\n | typeof DomainNamespaceKind\n | typeof DomainModelKind\n | typeof DomainEntityKind\n | typeof DomainPropertyKind\n | typeof DomainAssociationKind\n\n/**\n * Search criteria for filtering domain nodes.\n */\nexport interface DomainSearchCriteria {\n /**\n * Text query to search for in name, displayName, and description fields.\n * Can be a string for exact match or RegExp for pattern matching.\n */\n query?: string | RegExp\n\n /**\n * Filter by specific node types. If not provided, all node types are included.\n */\n nodeTypes?: SearchableNodeType[]\n\n /**\n * Whether to include nodes from foreign domains in the search results.\n * Defaults to false.\n */\n includeForeignDomains?: boolean\n\n /**\n * Case-sensitive search when using string query.\n * Defaults to false (case-insensitive).\n */\n caseSensitive?: boolean\n}\n\n/**\n * A search result containing a matching domain node and metadata.\n */\nexport interface DomainSearchResult {\n /**\n * The matching domain node.\n */\n node: DomainGraphNodeType\n\n /**\n * The field(s) that matched the search query.\n */\n matchedFields: ('name' | 'displayName' | 'description')[]\n\n /**\n * The key used to identify this node in the graph.\n */\n key: string\n\n /**\n * Whether this node belongs to a foreign domain.\n */\n isForeign: boolean\n}\n"]}
|