DevOp.DK.Plus.psd1
|
# # Module manifest template for DevOp.DK.Plus. The build writes DevOp.DK.Plus.psd1 next to the assembly and replaces # the version tokens from MinVer; never check in the generated file. # # CmdletsToExport is an explicit list, verified by PowerShellParityTests against the [Cmdlet] types of the assembly. # Each lane inserts its own block, commented '# lane: <area>', directly above '# lane: foundation', with a comma after # every entry; the foundation block stays last, so no lane edits another lane's lines. # @{ RootModule = 'DevOp.DK.Plus.PowerShell.dll' ModuleVersion = '0.5.0' GUID = '7672773d-d5d3-4078-be77-77a0be81690d' Author = 'DevOp' CompanyName = 'DevOp' Copyright = 'Copyright (c) DevOp 2026. MIT License.' Description = 'PowerShell cmdlets for the DK Plus (dkPlus) ERP API, one per devop-dk CLI command. Shares the devop-dk configuration and login token file; tokens are accepted only as SecureString, through DKPLUS_API_TOKEN or DKPLUS_API_TOKEN_FILE, or from the stored login.' PowerShellVersion = '7.6' CompatiblePSEditions = @('Core') # Table views generated from the devop-dk default columns by tools/update-powershell-generated.sh. FormatsToProcess = @('DevOp.DK.Plus.format.ps1xml') CmdletsToExport = @( # lane: customer 'Get-Customer', 'New-Customer', 'Update-Customer', 'Remove-Customer', 'Get-CustomerTransaction', 'Get-CustomerContact', 'New-CustomerContact', 'Update-CustomerContact', 'Remove-CustomerContact', 'Get-CustomerReceiver', 'New-CustomerReceiver', 'Update-CustomerReceiver', 'Remove-CustomerReceiver', 'Get-CustomerGroup', # lane: company 'Get-Company', 'Get-CompanyStatus', 'Get-CompanyLicence', 'Test-CompanyConnection', 'Sync-Company', 'Invoke-CompanyAction', 'Get-Permission', 'Get-TableRecord', 'Get-TableField', 'Get-TableChange', 'Get-TableDeletedRecord', 'New-TableRecord', 'Update-TableRecord', 'Remove-TableRecord', 'Get-Dimension', 'Get-Currency', 'Get-PaymentMode', 'Get-PaymentTerm', 'Get-PaymentType', 'Get-Nation', 'Get-Config', 'Set-Config', # lane: purchase 'Get-Vendor', 'New-Vendor', 'Update-Vendor', 'Get-VendorTransaction', 'Get-VendorInvoice', 'Save-VendorInvoiceAttachment', 'New-VendorInvoice', 'Update-VendorInvoiceApproval', 'Get-LedgerAccount', 'New-LedgerAccount', 'Get-LedgerAccountTransaction', 'Get-LedgerTransaction', 'New-LedgerJournal', 'Get-TaxGroup', 'New-TaxGroup', # lane: sales 'Get-Invoice', 'New-Invoice', 'Save-InvoicePdf', 'Get-InvoiceHtml', 'Send-InvoiceEmail', 'Get-Order', 'New-Order', 'Update-Order', 'Remove-Order', 'Save-OrderPdf', 'Get-OrderHtml', 'Send-OrderEmail', 'New-OrderLine', 'Update-OrderLine', 'Remove-OrderLine', 'Get-Quote', 'New-Quote', 'Update-Quote', 'Remove-Quote', 'Save-QuotePdf', 'Get-QuoteHtml', 'Send-QuoteEmail', 'New-QuoteLine', 'Update-QuoteLine', 'Remove-QuoteLine', 'Get-RecurringSale', 'New-RecurringSale', 'Update-RecurringSale', 'Remove-RecurringSale', 'New-RecurringSaleLine', 'Update-RecurringSaleLine', 'Remove-RecurringSaleLine', 'Get-SalesPerson', 'New-SalesPerson', 'Update-SalesPerson', 'Remove-SalesPerson', # lane: products 'Get-Product', 'Get-ProductPrice', 'New-Product', 'Update-Product', 'Remove-Product', 'Get-ProductGroup', 'Get-ProductCategory', 'Get-ProductUnit', 'Update-ProductWarehouse', 'Get-Warehouse', 'New-InventoryJournal', 'New-InventoryTransfer', 'New-InventoryCount', 'Get-Webhook', 'Get-WebhookTemplate', 'New-Webhook', 'Update-Webhook', 'Remove-Webhook', 'Test-Webhook', 'Get-Token', 'New-Token', 'Update-Token', 'Remove-Token', 'Get-TokenCompany', 'Get-TokenEmployee', 'Get-RequestLog', 'Save-TokenReport', 'Send-TokenReport', # lane: projects 'Get-Project', 'New-Project', 'Update-Project', 'Remove-Project', 'Get-ProjectInvoice', 'Get-ProjectJournal', 'Get-ProjectPhase', 'New-ProjectPhase', 'Update-ProjectPhase', 'Get-ProjectPhaseLink', 'New-ProjectPhaseLink', 'Remove-ProjectPhaseLink', 'Get-ProjectTask', 'New-ProjectTask', 'Update-ProjectTask', 'Get-WorkRequest', 'New-WorkRequest', 'Update-WorkRequest', 'Remove-WorkRequest', 'Get-ProjectTransaction', 'Get-ProjectTransactionMemo', 'Update-ProjectTransactionMemo', 'New-ProjectWorkEntry', 'Update-ProjectWorkEntry', 'Remove-ProjectWorkEntry', 'Get-Employee', # lane: foundation (keep last) 'Connect-DkPlus', 'Disconnect-DkPlus', 'Get-DkPlusConnection', 'Test-DkPlusConnection', 'Save-Login', 'Remove-Login' ) FunctionsToExport = @() VariablesToExport = @() AliasesToExport = @() PrivateData = @{ PSData = @{ Tags = @('dkplus', 'DK', 'ERP', 'Iceland', 'accounting', 'PSEdition_Core', 'Windows', 'Linux', 'MacOS') ProjectUri = 'https://wiki.devop.is/en/devop-dk/introduction' LicenseUri = 'https://opensource.org/license/mit' # IconUri: set when the brand icon has a public URL. ReleaseNotes = 'v0.5.0: Breaking: Get-CustomerTransaction -Include and -Exclude given without a page-only parameter (-Page, -Count, -DueAfter, -Voucher, -Sort, ...) now select the list parameter set, which takes public property names; in 0.4.2 they selected the Page set, which takes DK Plus wire field names, so a call such as -Exclude ID that worked in 0.4.2 now fails. Add -Page (or another page-only parameter) to keep the wire field names. Breaking: parameter abbreviations that were unique in 0.4.2 are now ambiguous and the binder reports an error (nothing rebinds silently): Get-Customer -N (Number/Name), -S (Search/SalesPerson), -Pa (PageSize/PaymentTerm/PaymentMode); spell the name out. Every list cmdlet (Get-Customer, Get-Product, Get-CustomerTransaction, Get-CustomerGroup, Get-ProductGroup, Get-Employee, Get-Invoice, Get-Order, Get-Quote, Get-RecurringSale, Get-PaymentMode, Get-PaymentTerm, Get-PaymentType, Get-Project, Get-ProductCategory, Get-ProductUnit, Get-Currency, Get-SalesPerson) has an All parameter set: -All returns every record without the -Take limit, streaming page by page. Breaking: -Take now accepts 1-1000 on these cmdlets (0.4.2 allowed up to 10,000); use -All to read more. -All:$false behaves like omitting -All. -All, Get-Project -Unpaged, and Get-WorkRequest -All confirm like a High-impact cmdlet because they can read a lot of data: pass -Confirm:$false in scripts, -All -WhatIf sends nothing, and a host that cannot prompt fails before any request; -WhatIf and -Confirm have no effect on the other parameter sets. Breaking: Get-Project -All used to read the unpaged v1 endpoint, which is now -Unpaged, and -All pages through the list. Get-CustomerTransaction -Customer X -All keeps reading the customer own list (GET /api/v1/Customer/X/transaction) and now fails with DkPlus.InvalidArgument when combined with -ModifiedSince, -PageSize, -Include, or -Exclude; without -Customer, -All pages through all transactions. -Include and -Exclude (with Tab completion from DkPlusProjections) select the properties DK Plus returns on the 13 cmdlets whose queries support projection; on the Get-CustomerTransaction page set they stay DK Plus wire field names and are now string[] joined with commas. Get-Customer gains -Name, -SalesPerson, -Country, -PostalCode, -PaymentTerm, -PaymentMode, -Email, -Blocked, -VatExempt, and -Deleted, and Get-Product gains -AliasItemCode, -Inactive, -OnWeb, and -Deleted: server-side filters matched as DK Plus interprets them, where a switch sends a value only when given (-Blocked:$false sends false). Text filters and -Group are sent lowercase and -Country uppercase, and -Name without * is a contains search. An invalid-argument error no longer ends with the .NET parameter-name suffix. New-TableRecord, Update-TableRecord and Remove-TableRecord write records of any dkERP table through the generic table endpoints: New- and Update- run directly, Remove- is ConfirmImpact High; what the key of Update-TableRecord means is not verified live. New-TableRecord and Update-TableRecord -Path also accept a JSON file with a UTF-8 byte order mark. Remove-Project deletes a project by -Number (from the pipeline, for example Get-Project -Number P-1 | Remove-Project) or by -RecordId (alias -Id) through the generic table endpoint on pjjob, because DK Plus has no project delete endpoint; the maintainer confirmed that the table name and both key names work; it bypasses DK Plus project validation, is ConfirmImpact High, and its effect on projects with transactions, phases or work requests is not verified live. On Windows, the stored login token now lives in the non-roaming %LOCALAPPDATA%/DevOp/devop-dk folder with an owner-only access control list (a token stored by an earlier version in %APPDATA% is moved on first use, and logout removes both). Update the CLI and the module together: the first read by a new version moves the token, and a 0.4.2 CLI or module reads only the roaming %APPDATA% copy, so it no longer finds the login. Writes of config.json and the token retry briefly when another process holds the file. On every OS, saved file names that are Windows device names (CON, NUL, COM1, ...) get a _ prefix (an attachment named con.pdf is saved as _con.pdf on Linux too). First release, with full devop-dk CLI parity: every devop-dk command has a cmdlet. Covers connections, login, and configuration; customers, contacts, item receivers, and customer groups; company settings, currencies, dimensions, nations, payment modes, terms, and types, permissions, and tables; vendors, vendor invoices and approvals, and the general ledger; sales invoices, orders, quotes, recurring sales, and sales persons, including creating them (New-Invoice posts by default; New-Order, New-Quote, and New-RecurringSale create the head, and New-*Line adds lines); products, inventory, warehouses, webhooks, and tokens; and projects, phases, tasks, work requests, transactions, work entries, and employees. Writes support -WhatIf and -Confirm, and the commands the CLI guards with --yes have ConfirmImpact High (except New-Invoice, which posts by default at Medium). Get-Help covers every cmdlet.' } } } |