### Install Limelight SDK JS Package Source: https://github.com/keja-co/limelight-sdk-js/blob/main/README.md Instructions for installing the Keja-co Limelight SDK Node module into a consuming project. It shows the recommended method using npm for published packages. ```bash npm install @keja-co/limelight-sdk@1.0.107 --save ``` -------------------------------- ### Build Limelight SDK JS Project Source: https://github.com/keja-co/limelight-sdk-js/blob/main/README.md Commands to install dependencies and build the TypeScript sources into JavaScript for the Limelight SDK. This is a prerequisite for publishing or consuming the package. ```bash npm install npm run build ``` -------------------------------- ### SDK Configuration and Initialization Source: https://context7.com/keja-co/limelight-sdk-js/llms.txt Demonstrates how to configure the Limelight API client with various authentication methods (OAuth2, API Key, dynamic tokens) and initializes API clients for specific services. Includes an example of making a request and handling potential errors. ```APIDOC ## SDK Configuration and Initialization ### Description Configuration and authentication setup for the Limelight API client. This section shows how to initialize the SDK with different authentication strategies and demonstrates basic usage. ### Method N/A (Client-side configuration and initialization) ### Endpoint N/A ### Parameters N/A ### Request Example ```typescript import { Configuration, ProductionApi, AuditionsApi } from '@keja-co/limelight-sdk'; // Basic configuration with OAuth2 bearer token const config = new Configuration({ basePath: 'https://api.limelight.example.com', accessToken: 'your-oauth2-access-token-here', headers: { 'X-Custom-Header': 'CustomValue' } }); // Initialize API clients with configuration const productionApi = new ProductionApi(config); const auditionsApi = new AuditionsApi(config); // Example usage with error handling try { const productions = await productionApi.productionV1ProductionsList({ tenantRef: 'my-theatre-company', page: 1, pageSize: 20 }); console.log(`Found ${productions.results.length} productions`); } catch (error) { console.error('API request failed:', error.message); } ``` ### Response N/A (This section describes client-side setup, not API responses directly.) ### Response Example N/A ``` -------------------------------- ### List and Search Assets with Limelight SDK JS Source: https://context7.com/keja-co/limelight-sdk-js/llms.txt Provides examples of how to list assets based on various criteria such as type, condition, location, and maintenance due dates. It also demonstrates searching for assets by name and retrieving detailed information for a specific asset. This uses the AssetsApi for listing, partial updates, and retrieval. ```typescript // List assets by type const allCostumes = await api.assetsV1AssetsList({ tenantRef, type: 'COSTUME', condition: 'EXCELLENT', page: 1, pageSize: 50 }); console.log(`Found ${allCostumes.count} costumes in excellent condition`); // List assets by location const propsRoomAssets = await api.assetsV1AssetsList({ tenantRef, locationIcontains: 'Props Room', page: 1, pageSize: 100 }); // Get assets requiring maintenance const maintenanceDue = await api.assetsV1AssetsList({ tenantRef, nextMaintenanceDateLte: new Date('2024-12-31'), page: 1, pageSize: 50 }); console.log(`${maintenanceDue.count} assets need maintenance by end of year`); // List active assignments for an asset const assetAssignments = await api.assetsV1AssetsAssignmentsList({ tenantRef, assetId: costume.id, page: 1, pageSize: 20 }); // Search assets by name const searchResults = await api.assetsV1AssetsList({ tenantRef, nameIcontains: 'Victorian', page: 1, pageSize: 20 }); // Get asset details with full history const assetDetails = await api.assetsV1AssetsRetrieve({ tenantRef, id: costume.id }); ``` -------------------------------- ### Manage Auditions with Limelight SDK JS Source: https://context7.com/keja-co/limelight-sdk-js/llms.txt This snippet demonstrates how to create audition events, schedule time slots, manage auditionee signups, and record feedback from panel members. It utilizes the AuditionsApi from the @keja-co/limelight-sdk package. Ensure the SDK is installed and configured with valid credentials. ```typescript import { AuditionsApi } from '@keja-co/limelight-sdk'; const api = new AuditionsApi(config); const tenantRef = 'broadway-theatre'; // Create audition event const audition = await api.auditionsV1AuditionsCreate({ tenantRef, audition: { name: 'Hamilton Open Auditions', description: 'Open auditions for ensemble and understudies. Please prepare 16 bars of a contemporary musical theatre song and bring sheet music.', production: 123, venue: 5, auditionDate: new Date('2024-05-01'), callbackDate: new Date('2024-05-05') } }); console.log(`Created audition: ${audition.name}`); // Create multiple time slots for audition day const timeSlots = []; const startHour = 9; const endHour = 17; for (let hour = startHour; hour < endHour; hour++) { const slot = await api.auditionsV1AuditionsSlotsCreate({ tenantRef, auditionId: audition.id, slot: { startTime: new Date(`2024-05-01T${hour.toString().padStart(2, '0')}:00:00Z`), endTime: new Date(`2024-05-01T${hour.toString().padStart(2, '0')}:15:00Z`), capacity: 1, location: 'Main Stage', notes: hour === 12 ? 'Lunch break' : '' } }); timeSlots.push(slot); } console.log(`Created ${timeSlots.length} audition slots`); // Auditionee signs up for a time slot const signup = await api.auditionsV1AuditionsSlotsSignupsCreate({ tenantRef, auditionId: audition.id, slotId: timeSlots[0].id, signup: { member: 45, notes: 'Auditioning for ensemble. Experienced in tap, jazz, and contemporary dance.', preparedSong: 'Defying Gravity', specialRequirements: 'Need accompanist' } }); // Panel member submits feedback after audition const feedback = await api.auditionsV1AuditionsSlotsSignupsFeedbackCreate({ tenantRef, auditionId: audition.id, slotId: timeSlots[0].id, signupId: signup.id, feedback: { rating: 4, comments: 'Strong vocal performance with excellent range. Good stage presence and movement. Recommend for ensemble and understudy consideration.', reviewer: 8, strengths: 'Vocals, Movement, Stage Presence', weaknesses: 'Could work on projection in larger spaces', recommendation: 'CALLBACK' } }); // Get all feedback for a signup const allFeedback = await api.auditionsV1AuditionsSlotsSignupsFeedbackList({ tenantRef, auditionId: audition.id, slotId: timeSlots[0].id, signupId: signup.id }); console.log(`Received ${allFeedback.count} feedback responses`); // List all signups for an audition const allSignups = await api.auditionsV1AuditionsSlotsSignupsList({ tenantRef, auditionId: audition.id, slotId: timeSlots[0].id, page: 1, pageSize: 50 }); // Update signup status (e.g., mark as attended) await api.auditionsV1AuditionsSlotsSignupsPartialUpdate({ tenantRef, auditionId: audition.id, slotId: timeSlots[0].id, id: signup.id, patchedSignup: { attended: true, checkInTime: new Date() } }); // Search auditions by production const productionAuditions = await api.auditionsV1AuditionsList({ tenantRef, production: 123, page: 1, pageSize: 20 }); console.log(`Found ${productionAuditions.count} auditions for this production`); ``` -------------------------------- ### List and Search Documents (TypeScript) Source: https://context7.com/keja-co/limelight-sdk-js/llms.txt This code provides examples of how to list documents filtered by status and production, and how to search for documents by title using the Limelight SDK. It demonstrates using query parameters like `statusIexact` and `titleIcontains` along with pagination controls (`page`, `pageSize`). ```typescript import { DocumentsApi } from '@keja-co/limelight-sdk'; const api = new DocumentsApi(config); const tenantRef = 'broadway-theatre'; // List documents with filters const approvedDocs = await api.documentsV1ReposDocumentsList({ tenantRef, repoId: repo.id, statusIexact: 'APPROVED', production: 123, page: 1, pageSize: 50 }); // Search documents by title const searchResults = await api.documentsV1ReposDocumentsList({ tenantRef, repoId: repo.id, titleIcontains: 'lighting', page: 1, pageSize: 20 }); // Get document with all versions const docDetails = await api.documentsV1ReposDocumentsRetrieve({ tenantRef, repoId: repo.id, id: scriptDoc.id }); // List all versions ``` -------------------------------- ### Create and Manage Forms with Limelight SDK (TypeScript) Source: https://context7.com/keja-co/limelight-sdk-js/llms.txt This snippet demonstrates how to create a new form, add different types of fields (text, email, multiple choice, file upload), and process user submissions using the Limelight SDK for TypeScript. It covers form creation, field definition, submission handling, and data retrieval. Ensure the Limelight SDK is installed and configured. ```typescript import { FormsApi } from '@keja-co/limelight-sdk'; const api = new FormsApi(config); const tenantRef = 'broadway-theatre'; // Create form for actor information const form = await api.formsV1FormsCreate({ tenantRef, form: { title: 'Actor Profile and Emergency Contact Information', description: 'Please complete this form with your current information. All fields marked with * are required.', openDateTime: new Date('2024-01-01T00:00:00Z'), closeDateTime: new Date('2024-12-31T23:59:59Z'), maxSubmissions: 500, maxIndividualSubmissions: 1, isActive: true, production: 123, allowEditing: true, requiresApproval: false } }); // Add text field const nameField = await api.formsV1FormsFieldsCreate({ tenantRef, formId: form.id, formField: { label: 'Full Legal Name', fieldType: 'TEXT', required: true, order: 1, helpText: 'As it appears on your government-issued ID', configuration: { placeholder: 'John Smith', maxLength: 100 } } }); // Add email field const emailField = await api.formsV1FormsFieldsCreate({ tenantRef, formId: form.id, formField: { label: 'Email Address', fieldType: 'EMAIL', required: true, order: 2, configuration: { placeholder: 'john.smith@example.com' } } }); // Add multiple choice field const experienceField = await api.formsV1FormsFieldsCreate({ tenantRef, formId: form.id, formField: { label: 'Years of Professional Experience', fieldType: 'MULTIPLE_CHOICE', required: true, order: 3, configuration: { choices: ['0-2 years', '3-5 years', '6-10 years', '10+ years'], allowMultiple: false } } }); // Add long text field const bioField = await api.formsV1FormsFieldsCreate({ tenantRef, formId: form.id, formField: { label: 'Professional Biography', fieldType: 'LONG_TEXT', required: false, order: 4, helpText: 'Brief professional bio (max 500 characters)', configuration: { maxLength: 500, rows: 5 } } }); // Add file upload field const headshotField = await api.formsV1FormsFieldsCreate({ tenantRef, formId: form.id, formField: { label: 'Professional Headshot', fieldType: 'FILE', required: true, order: 5, helpText: 'Upload a recent professional headshot (JPG or PNG, max 5MB)', configuration: { acceptedFileTypes: ['image/jpeg', 'image/png'], maxFileSize: 5242880 } } }); // User submits form const submission = await api.formsV1FormsSubmissionsCreate({ tenantRef, formId: form.id, submission: { member: 45, status: 'DRAFT' } }); // Submit field responses await api.formsV1FormsSubmissionsFieldResponseCreate({ tenantRef, formId: form.id, submissionId: submission.id, fieldId: nameField.id, submissionFieldValue: { value: 'Jane Elizabeth Doe' } }); await api.formsV1FormsSubmissionsFieldResponseCreate({ tenantRef, formId: form.id, submissionId: submission.id, fieldId: emailField.id, submissionFieldValue: { value: 'jane.doe@example.com' } }); await api.formsV1FormsSubmissionsFieldResponseCreate({ tenantRef, formId: form.id, submissionId: submission.id, fieldId: experienceField.id, submissionFieldValue: { value: '6-10 years' } }); // Mark submission as complete await api.formsV1FormsSubmissionsPartialUpdate({ tenantRef, formId: form.id, id: submission.id, patchedSubmission: { status: 'SUBMITTED' } }); // Get all submissions for a form const allSubmissions = await api.formsV1FormsSubmissionsList({ tenantRef, formId: form.id, page: 1, pageSize: 50 }); console.log(`Total submissions: ${allSubmissions.count}`); // Get all forms for a member const memberForms = await api.formsV1FormsSubmissionsByMemberRetrieve({ tenantRef, member: 45 }); console.log(`Member has submitted ${memberForms.length} forms`); // List all form fields const fields = await api.formsV1FormsFieldsList({ tenantRef, formId: form.id, page: 1, pageSize: 100 }); console.log(`Form has ${fields.count} fields`); ``` -------------------------------- ### Create and Link Discounts using Limelight SDK Source: https://context7.com/keja-co/limelight-sdk-js/llms.txt This snippet demonstrates the creation of discounts, including percentage-based (Early Bird) and fixed-amount (Group) discounts, using the Limelight SDK. It also shows how to link specific discounts to particular ticket types. This functionality allows for flexible promotional strategies to incentivize purchases. ```typescript // Create early bird discount const earlyBirdDiscount = await api.ticketingV1DiscountsCreate({ tenantRef, discount: { code: 'EARLYBIRD2024', name: 'Early Bird Special', description: '20% off for advance purchases', discountType: 'PERCENTAGE', value: '20.00', startDate: new Date('2024-01-01'), endDate: new Date('2024-05-31'), maxUses: 200, currentUses: 0, isActive: true, minimumPurchase: '50.00' }, productionVenueId }); // Link discount to specific ticket types await api.ticketingV1DiscountsTicketTypesCreate({ tenantRef, discountId: earlyBirdDiscount.id, discountTicketType: { ticketType: adultTicket.id } }); // Create group discount const groupDiscount = await api.ticketingV1DiscountsCreate({ tenantRef, discount: { code: 'GROUP10', name: 'Group Discount', description: '$10 off per ticket for groups of 10+', discountType: 'FIXED_AMOUNT', value: '10.00', startDate: new Date('2024-01-01'), endDate: new Date('2024-12-31'), maxUses: null, isActive: true, minimumQuantity: 10 }, productionVenueId }); ``` -------------------------------- ### Configure Limelight SDK Client Source: https://context7.com/keja-co/limelight-sdk-js/llms.txt Sets up the configuration for the Limelight API client, including base path, authentication methods (OAuth2, API key), and optional middleware for request/response interception. This configuration is used to initialize specific API client instances. ```typescript import { Configuration, ProductionApi, AuditionsApi } from '@keja-co/limelight-sdk'; // Basic configuration with OAuth2 bearer token const config = new Configuration({ basePath: 'https://api.limelight.example.com', accessToken: 'your-oauth2-access-token-here', headers: { 'X-Custom-Header': 'CustomValue' } }); // Configuration with API key authentication const apiKeyConfig = new Configuration({ basePath: 'https://api.limelight.example.com', apiKey: 'your-api-key-here' }); // Configuration with dynamic access token (for token refresh) const dynamicTokenConfig = new Configuration({ basePath: 'https://api.limelight.example.com', accessToken: async () => { // Fetch fresh token from your auth service const response = await fetch('https://auth.example.com/token'); const { access_token } = await response.json(); return access_token; } }); // Configuration with middleware for logging const loggedConfig = new Configuration({ basePath: 'https://api.limelight.example.com', accessToken: 'token', middleware: [{ pre: async (context) => { console.log(`Making ${context.init.method} request to ${context.url}`); return context; }, post: async (context) => { console.log(`Response status: ${context.response.status}`); return context.response; } }] }); // Initialize API clients with configuration const productionApi = new ProductionApi(config); const auditionsApi = new AuditionsApi(config); // Example usage with error handling try { const productions = await productionApi.productionV1ProductionsList({ tenantRef: 'my-theatre-company', page: 1, pageSize: 20 }); console.log(`Found ${productions.results.length} productions`); } catch (error) { console.error('API request failed:', error.message); } ``` -------------------------------- ### Create Document Repository and Folders (TypeScript) Source: https://context7.com/keja-co/limelight-sdk-js/llms.txt This snippet demonstrates how to create a new document repository for a production and set up a hierarchical folder structure within it. It utilizes the DocumentsApi from the Limelight SDK. The function takes configuration and tenant information to initialize the API client and then proceeds to create the main repository and its sub-folders. ```typescript import { DocumentsApi } from '@keja-co/limelight-sdk'; const api = new DocumentsApi(config); const tenantRef = 'broadway-theatre'; // Create document repository for production const repo = await api.documentsV1ReposCreate({ tenantRef, documentRepo: { name: 'Hamilton Production Documents', description: 'All documentation for Hamilton production including scripts, contracts, schedules, and technical specifications', production: 123, isActive: true } }); // Create folder structure const scriptsFolder = await api.documentsV1ReposFoldersCreate({ tenantRef, repoId: repo.id, folder: { name: 'Scripts and Libretto', description: 'Script versions and libretto', parentFolder: null, sortOrder: 1 } }); const contractsFolder = await api.documentsV1ReposFoldersCreate({ tenantRef, repoId: repo.id, folder: { name: 'Contracts', description: 'Cast and crew contracts', parentFolder: null, sortOrder: 2 } }); const techFolder = await api.documentsV1ReposFoldersCreate({ tenantRef, repoId: repo.id, folder: { name: 'Technical Specifications', description: 'Lighting, sound, and set design documents', parentFolder: null, sortOrder: 3 } }); // Create sub-folders const lightingFolder = await api.documentsV1ReposFoldersCreate({ tenantRef, repoId: repo.id, folder: { name: 'Lighting Plots', parentFolder: techFolder.id, sortOrder: 1 } }); ``` -------------------------------- ### Create Budgeting Items with Limelight SDK JS Source: https://context7.com/keja-co/limelight-sdk-js/llms.txt Demonstrates how to create cost categories, production-specific cost categories, vendors, and expenses using the Limelight SDK. It includes setting up names, descriptions, budgets, and linking expenses to vendors and categories. The code uses TypeScript and interacts with the `BudgetingApi`. ```typescript import { BudgetingApi } from '@keja-co/limelight-sdk'; const api = new BudgetingApi(config); const tenantRef = 'broadway-theatre'; // Create cost category const costCategory = await api.budgetingV1CostCategoriesCreate({ tenantRef, costCategory: { name: 'Costumes and Wardrobe', description: 'All costume design, construction, and maintenance expenses', code: 'COST-001', isActive: true } }); // Create production-specific cost category with budget const prodCostCat = await api.budgetingV1ProductionsCostCategoriesCreate({ tenantRef, productionId: 123, productionCostCategory: { category: costCategory.id, budgetAmount: '25000.00', actualAmount: '0.00', notes: 'Budget includes period costumes and accessories' } }); // Create vendor const vendor = await api.budgetingV1VendorsCreate({ tenantRef, vendor: { name: 'Broadway Costume Supply', contactName: 'Robert Chen', email: 'robert@costumesupply.com', phone: '+1-555-234-5678', address: '456 Fashion Ave, New York, NY', paymentTerms: 'Net 30', taxId: '12-3456789', isActive: true } }); // Create expense const expense = await api.budgetingV1ExpensesCreate({ tenantRef, expense: { title: 'Victorian Era Costume Fabric and Notions', description: 'Silk fabric, lace, buttons, and thread for lead actress costume', cost: '1245.50', expenseDateTime: new Date('2024-05-15T10:30:00Z'), status: 'PENDING', paymentMethod: 'CREDIT_CARD', purchaser: 45, vendor: vendor.id, prodCategory: prodCostCat.id, receiptNumber: 'INV-2024-5678', isPaid: false, dueDate: new Date('2024-06-14') } }); console.log(`Created expense ID: ${expense.id} for $${expense.cost}`); ``` -------------------------------- ### Document Creation API Source: https://context7.com/keja-co/limelight-sdk-js/llms.txt Endpoints for creating and uploading documents and their versions. ```APIDOC ## POST /v1/repos/{repoId}/documents ### Description Creates a new document within a specified repository. ### Method POST ### Endpoint /v1/repos/{repoId}/documents ### Parameters #### Path Parameters - **repoId** (string) - Required - The ID of the repository to which the document will be added. #### Query Parameters - **tenantRef** (string) - Required - The reference identifier for the tenant. #### Request Body - **document** (object) - Required - The details of the document to create. - **title** (string) - Required - The title of the document. - **description** (string) - Optional - A description for the document. - **folder** (string) - Optional - The ID of the folder the document belongs to. - **author** (integer) - Optional - The ID of the author. - **production** (integer) - Optional - The ID of the production. - **status** (string) - Optional - The status of the document (e.g., 'DRAFT', 'IN_REVIEW', 'APPROVED'). - **documentType** (string) - Optional - The type of document (e.g., 'SCRIPT', 'TECHNICAL'). - **accessLevel** (string) - Optional - The access level for the document (e.g., 'PRODUCTION_TEAM', 'TECHNICAL_CREW'). ### Request Example ```json { "tenantRef": "broadway-theatre", "repoId": "repo-12345", "document": { "title": "Hamilton - Production Script", "description": "Complete production script with blocking notes", "folder": "folder-abcde", "author": 45, "production": 123, "status": "DRAFT", "documentType": "SCRIPT", "accessLevel": "PRODUCTION_TEAM" } } ``` ### Response #### Success Response (201 Created) - **id** (string) - The unique identifier of the created document. - **title** (string) - The title of the document. - **description** (string) - The description of the document. - **folder** (string) - The ID of the folder. - **author** (integer) - The ID of the author. - **production** (integer) - The ID of the production. - **status** (string) - The status of the document. - **documentType** (string) - The type of document. - **accessLevel** (string) - The access level for the document. #### Response Example ```json { "id": "doc-xyz789", "title": "Hamilton - Production Script", "description": "Complete production script with blocking notes", "folder": "folder-abcde", "author": 45, "production": 123, "status": "DRAFT", "documentType": "SCRIPT", "accessLevel": "PRODUCTION_TEAM" } ``` ## POST /v1/repos/{repoId}/documents/{documentId}/versions ### Description Adds a new version to an existing document. ### Method POST ### Endpoint /v1/repos/{repoId}/documents/{documentId}/versions ### Parameters #### Path Parameters - **repoId** (string) - Required - The ID of the repository. - **documentId** (string) - Required - The ID of the document to add the version to. #### Query Parameters - **tenantRef** (string) - Required - The reference identifier for the tenant. #### Request Body - **documentVersion** (object) - Required - The details of the document version. - **file** (string) - Required - The name or path of the file. - **versionNumber** (string) - Required - The version number (e.g., '1.0', '2.0'). - **notes** (string) - Optional - Notes about this version. - **uploadedBy** (integer) - Optional - The ID of the user who uploaded the version. - **changeLog** (string) - Optional - A detailed log of changes in this version. ### Request Example ```json { "tenantRef": "broadway-theatre", "repoId": "repo-12345", "documentId": "doc-xyz789", "documentVersion": { "file": "hamilton_script_v1.pdf", "versionNumber": "1.0", "notes": "Initial draft with basic blocking", "uploadedBy": 45 } } ``` ### Response #### Success Response (201 Created) - **id** (string) - The unique identifier of the document version. - **file** (string) - The file name or path. - **versionNumber** (string) - The version number. - **notes** (string) - Notes about this version. - **uploadedBy** (integer) - The ID of the user who uploaded the version. - **changeLog** (string) - The change log for this version. #### Response Example ```json { "id": "ver-uvw123", "file": "hamilton_script_v1.pdf", "versionNumber": "1.0", "notes": "Initial draft with basic blocking", "uploadedBy": 45, "changeLog": null } ``` ``` -------------------------------- ### Process Customer Purchase with Limelight SDK Source: https://context7.com/keja-co/limelight-sdk-js/llms.txt This snippet details how to record a customer's purchase, including payment details, discount codes applied, and total amount, using the Limelight SDK. It then proceeds to create individual tickets associated with that purchase, linking them to specific ticket types and seats. This is fundamental for tracking sales and managing ticket inventory. ```typescript // Customer makes a purchase const purchase = await api.ticketingV1PurchasesCreate({ tenantRef, purchase: { member: 45, totalAmount: '150.00', purchaseDateTime: new Date(), paymentMethod: 'CREDIT_CARD', transactionId: 'TXN-20240515-12345', discountCode: 'EARLYBIRD2024', discountAmount: '30.00', status: 'COMPLETED' } }); // Create tickets for purchase (2 adult tickets) const ticket1 = await api.ticketingV1PurchasesTicketsCreate({ tenantRef, purchaseId: purchase.id, ticket: { ticketType: adultTicket.id, performance: 50, sectionSeat: orchestraSeats[10].id, status: 'VALID', price: '60.00' } }); const ticket2 = await api.ticketingV1PurchasesTicketsCreate({ tenantRef, purchaseId: purchase.id, ticket: { ticketType: adultTicket.id, performance: 50, sectionSeat: orchestraSeats[11].id, status: 'VALID', price: '60.00' } }); console.log(`Created purchase with tickets: ${ticket1.ticketUuid}, ${ticket2.ticketUuid}`); ``` -------------------------------- ### Upload and Version Documents (TypeScript) Source: https://context7.com/keja-co/limelight-sdk-js/llms.txt This code snippet illustrates the process of uploading a new document and then creating multiple versions of it. It covers specifying document details like title, description, folder, author, and status. Versioning involves providing file names, version numbers, notes, and changelogs. The Limelight SDK's DocumentsApi is used for these operations. ```typescript import { DocumentsApi } from '@keja-co/limelight-sdk'; const api = new DocumentsApi(config); const tenantRef = 'broadway-theatre'; // Upload document const scriptDoc = await api.documentsV1ReposDocumentsCreate({ tenantRef, repoId: repo.id, document: { title: 'Hamilton - Production Script', description: 'Complete production script with blocking notes', folder: scriptsFolder.id, author: 45, production: 123, status: 'DRAFT', documentType: 'SCRIPT', accessLevel: 'PRODUCTION_TEAM' } }); // Add initial version const version1 = await api.documentsV1ReposDocumentsVersionsCreate({ tenantRef, repoId: repo.id, documentId: scriptDoc.id, documentVersion: { file: 'hamilton_script_v1.pdf', versionNumber: '1.0', notes: 'Initial draft with basic blocking', uploadedBy: 45 } }); // Upload revised version const version2 = await api.documentsV1ReposDocumentsVersionsCreate({ tenantRef, repoId: repo.id, documentId: scriptDoc.id, documentVersion: { file: 'hamilton_script_v2.pdf', versionNumber: '2.0', notes: 'Added Act 2 choreography notes and updated dialogue based on rehearsal feedback', uploadedBy: 45, changeLog: 'Updated pages 45-67, added stage direction notes' } }); ``` -------------------------------- ### Folder Management API Source: https://context7.com/keja-co/limelight-sdk-js/llms.txt Endpoints for creating and managing folders within document repositories. ```APIDOC ## POST /v1/repos/{repoId}/folders ### Description Creates a new folder within a specified document repository. ### Method POST ### Endpoint /v1/repos/{repoId}/folders ### Parameters #### Path Parameters - **repoId** (string) - Required - The ID of the repository to which the folder will be added. #### Query Parameters - **tenantRef** (string) - Required - The reference identifier for the tenant. #### Request Body - **folder** (object) - Required - The details of the folder to create. - **name** (string) - Required - The name of the folder. - **description** (string) - Optional - A description for the folder. - **parentFolder** (string) - Optional - The ID of the parent folder if creating a sub-folder. Null for top-level folders. - **sortOrder** (integer) - Optional - The order in which the folder should appear. ### Request Example ```json { "tenantRef": "broadway-theatre", "repoId": "repo-12345", "folder": { "name": "Scripts and Libretto", "description": "Script versions and libretto", "parentFolder": null, "sortOrder": 1 } } ``` ### Response #### Success Response (201 Created) - **id** (string) - The unique identifier of the created folder. - **name** (string) - The name of the folder. - **description** (string) - The description of the folder. - **parentFolder** (string) - The ID of the parent folder. - **sortOrder** (integer) - The sort order of the folder. #### Response Example ```json { "id": "folder-abcde", "name": "Scripts and Libretto", "description": "Script versions and libretto", "parentFolder": null, "sortOrder": 1 } ``` ``` -------------------------------- ### List Purchases with Filters - JavaScript Source: https://context7.com/keja-co/limelight-sdk-js/llms.txt Fetches a list of purchases from the ticketing system, applying filters for date range and status. It demonstrates using the `ticketingV1PurchasesList` method with parameters like `tenantRef`, `purchaseDateTimeGte`, `status`, `page`, and `pageSize`. The number of purchases returned is logged to the console. ```javascript const recentPurchases = await api.ticketingV1PurchasesList({ tenantRef, purchaseDateTimeGte: new Date('2024-05-01'), status: 'COMPLETED', page: 1, pageSize: 50 }); console.log(`${recentPurchases.count} purchases this month`); ``` -------------------------------- ### Create Seating Sections and Seats using Limelight SDK Source: https://context7.com/keja-co/limelight-sdk-js/llms.txt This snippet shows how to create seating sections (e.g., Orchestra, Mezzanine) and individual seats within those sections using the Limelight SDK. It initializes the TicketingApi with configuration and then proceeds to create sections and populate them with seats, including specifying accessibility. Dependencies include the '@keja-co/limelight-sdk' package and a valid configuration object. ```typescript import { TicketingApi } from '@keja-co/limelight-sdk'; const api = new TicketingApi(config); const tenantRef = 'broadway-theatre'; const productionVenueId = 5; // Create seating sections const orchestraSection = await api.ticketingV1ProdVenueSectionsCreate({ tenantRef, productionVenueId, section: { name: 'Orchestra', capacity: 200, description: 'Premium seating closest to stage', sortOrder: 1 } }); const mezzanineSection = await api.ticketingV1ProdVenueSectionsCreate({ tenantRef, productionVenueId, section: { name: 'Mezzanine', capacity: 150, description: 'Elevated seating with excellent sightlines', sortOrder: 2 } }); // Create individual seats in orchestra section const orchestraSeats = []; const rows = ['A', 'B', 'C', 'D', 'E']; for (const row of rows) { for (let seatNum = 1; seatNum <= 20; seatNum++) { const seat = await api.ticketingV1ProdVenueSectionsSeatsCreate({ tenantRef, productionVenueId, sectionId: orchestraSection.id, sectionSeat: { row, number: seatNum.toString(), isAccessible: row === 'A' && seatNum <= 2, notes: row === 'A' && seatNum <= 2 ? 'Wheelchair accessible' : '' } }); orchestraSeats.push(seat); } } console.log(`Created ${orchestraSeats.length} orchestra seats`); ``` -------------------------------- ### Document Repository API Source: https://context7.com/keja-co/limelight-sdk-js/llms.txt Endpoints for creating and managing document repositories. ```APIDOC ## POST /v1/repos ### Description Creates a new document repository for a given tenant and production. ### Method POST ### Endpoint /v1/repos ### Parameters #### Path Parameters None #### Query Parameters - **tenantRef** (string) - Required - The reference identifier for the tenant. #### Request Body - **documentRepo** (object) - Required - The details of the document repository to create. - **name** (string) - Required - The name of the repository. - **description** (string) - Optional - A description for the repository. - **production** (integer) - Required - The ID of the production this repository belongs to. - **isActive** (boolean) - Optional - Whether the repository is active. ### Request Example ```json { "tenantRef": "broadway-theatre", "documentRepo": { "name": "Hamilton Production Documents", "description": "All documentation for Hamilton production including scripts, contracts, schedules, and technical specifications", "production": 123, "isActive": true } } ``` ### Response #### Success Response (201 Created) - **id** (string) - The unique identifier of the created repository. - **name** (string) - The name of the repository. - **description** (string) - The description of the repository. - **production** (integer) - The ID of the production. - **isActive** (boolean) - Whether the repository is active. #### Response Example ```json { "id": "repo-12345", "name": "Hamilton Production Documents", "description": "All documentation for Hamilton production including scripts, contracts, schedules, and technical specifications", "production": 123, "isActive": true } ``` ``` -------------------------------- ### Assign Assets and Record Maintenance with Limelight SDK JS Source: https://context7.com/keja-co/limelight-sdk-js/llms.txt Shows how to assign created assets to users for specific productions and how to record maintenance updates for equipment. This utilizes the AssetsApi for creating assignments and partially updating assets. Ensure you have valid asset IDs and assignment details. ```typescript // Assign costume to actor for production const costumeAssignment = await api.assetsV1AssetsAssignmentsCreate({ tenantRef, assetId: costume.id, assignment: { user: 45, production: 123, assignedDate: new Date(), expectedReturnDate: new Date('2024-09-30'), notes: 'Lead actress costume for Act 2 ballroom scene. Requires final fitting.', purpose: 'PERFORMANCE', assignedBy: 8 } }); // Assign prop to props master const propAssignment = await api.assetsV1AssetsAssignmentsCreate({ tenantRef, assetId: prop.id, assignment: { user: 67, production: 123, assignedDate: new Date(), expectedReturnDate: new Date('2024-09-30'), notes: 'Used in Act 1, Scene 3. Keep in props table stage left.', purpose: 'PERFORMANCE', assignedBy: 8 } }); // Record maintenance for spotlight await api.assetsV1AssetsPartialUpdate({ tenantRef, id: spotlight.id, patchedAsset: { lastMaintenanceDate: new Date(), nextMaintenanceDate: new Date('2025-04-01'), maintenanceNotes: 'Cleaned lens and reflector, replaced lamp, checked electrical connections. All systems operational.', condition: 'EXCELLENT' } }); ``` -------------------------------- ### Create Costume, Prop, and Equipment Assets with Limelight SDK JS Source: https://context7.com/keja-co/limelight-sdk-js/llms.txt Demonstrates how to create different types of physical assets using the AssetsApi. Each asset type has specific properties that can be defined, such as name, type, condition, purchase details, and location. This requires the AssetsApi from the Limelight SDK. ```typescript import { AssetsApi } from '@keja-co/limelight-sdk'; const api = new AssetsApi(config); const tenantRef = 'broadway-theatre'; // Create costume asset const costume = await api.assetsV1AssetsCreate({ tenantRef, asset: { name: 'Victorian Era Ball Gown - Blue Silk', type: 'COSTUME', condition: 'EXCELLENT', description: 'Authentic reproduction Victorian ball gown with hand-beaded bodice and silk train', purchaseDate: new Date('2023-08-15'), purchasePrice: '3500.00', currentValue: '3200.00', serialNumber: 'COST-VIC-001', manufacturer: 'Historical Costume Designs Inc', location: 'Costume Storage - Rack 3A', maintenanceNotes: 'Dry clean only, store with acid-free tissue' } }); // Create prop asset const prop = await api.assetsV1AssetsCreate({ tenantRef, asset: { name: 'Antique Desk Clock', type: 'PROP', condition: 'GOOD', description: 'Brass mantle clock circa 1890, working mechanism', purchaseDate: new Date('2024-01-10'), purchasePrice: '450.00', currentValue: '450.00', serialNumber: 'PROP-CLK-012', location: 'Props Room - Shelf B2', isFragile: true, requiresSpecialHandling: true, maintenanceNotes: 'Handle with care, wind mechanism weekly' } }); // Create equipment asset const spotlight = await api.assetsV1AssetsCreate({ tenantRef, asset: { name: 'ETC Source Four 750W Spotlight', type: 'EQUIPMENT', condition: 'GOOD', description: 'Ellipsoidal reflector spotlight with 36° lens', purchaseDate: new Date('2020-03-15'), purchasePrice: '850.00', currentValue: '500.00', serialNumber: 'LT-S4-036-024', manufacturer: 'Electronic Theatre Controls', modelNumber: 'S4-750-36', location: 'Lighting Grid - Position 12', warrantyExpiration: new Date('2023-03-15'), lastMaintenanceDate: new Date('2024-04-01'), nextMaintenanceDate: new Date('2024-10-01'), maintenanceNotes: 'Clean lens and reflector quarterly, check electrical connections' } }); ```