From c428a52ecacbbf3deedbaa626f2f7d51a48561bd Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Wed, 7 Jan 2026 16:51:49 +1100 Subject: [PATCH] AP-6527 # Added OneBlink US tenant --- CHANGELOG.md | 4 ++++ docs/README.md | 8 +++++++- src/bin/oneblink-us.ts | 6 ++++++ src/config.ts | 26 ++++++++++++++++++++++++++ src/types/common.d.ts | 2 +- 5 files changed, 44 insertions(+), 2 deletions(-) create mode 100755 src/bin/oneblink-us.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index df48023..bd68cec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- OneBlink US tenant + ## [3.5.9] - 2025-08-11 ## [3.5.8] - 2025-07-10 diff --git a/docs/README.md b/docs/README.md index 85f3df3..f359a8b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -15,12 +15,18 @@ npm install -g @oneblink/cli This CLI is the entry point for all OneBlink Productivity tenants. The tenant used by the CLI is determined by the entry point command. The available tenants are: -- [OneBlink Console](https://console.oneblink.io) +- [OneBlink Console (AU)](https://console.oneblink.io) ```sh oneblink --help ``` +- [OneBlink Console (US)](https://console.us.oneblink.io) + + ```sh + oneblink-us --help + ``` + - [CivicOptimize Productivity](https://console.transform.civicplus.com) ```sh diff --git a/src/bin/oneblink-us.ts b/src/bin/oneblink-us.ts new file mode 100755 index 0000000..e872bc1 --- /dev/null +++ b/src/bin/oneblink-us.ts @@ -0,0 +1,6 @@ +#!/usr/bin/env node + +import commands from '../commands.js' +import { TENANTS } from '../config.js' + +commands(TENANTS.ONEBLINK_US) diff --git a/src/config.ts b/src/config.ts index d8be357..11ff15d 100644 --- a/src/config.ts +++ b/src/config.ts @@ -19,6 +19,17 @@ function getOneBlinkLoginClientId() { } } +function getOneBlinkUSLoginClientId() { + switch (environment) { + case 'test': { + return '1h0762m6b89hi71gln76vs3doc' + } + default: { + return 'UNKNOWN' + } + } +} + function getCivicPlusLoginClientId() { switch (environment) { case 'test': { @@ -33,6 +44,7 @@ function getCivicPlusLoginClientId() { const TENANTS: { ONEBLINK: Tenant CIVICPLUS: Tenant + ONEBLINK_US: Tenant } = { ONEBLINK: { id: 'ONEBLINK', @@ -62,6 +74,20 @@ const TENANTS: { loginClientId: getCivicPlusLoginClientId(), loginCallbackUrl: `https://console${subdomainSuffix}.transform.civicplus.com/cli-tools-callback`, }, + ONEBLINK_US: { + id: 'ONEBLINK_US', + command: 'oneblink-us', + label: 'OneBlink-US', + productLongName: 'OneBlink LcS', + productShortName: 'OneBlink LcS', + consoleOrigin: `https://console${subdomainSuffix}.us.oneblink.io`, + origin: `https://auth-api${subdomainSuffix}.us.oneblink.io`, + apiHostingBucket: `oneblink-us-api-hosting-deployments-${environment}`, + region: 'us-east-1', + loginUrl: `https://login${subdomainSuffix}.us.oneblink.io`, + loginClientId: getOneBlinkUSLoginClientId(), + loginCallbackUrl: `https://console${subdomainSuffix}.us.oneblink.io/cli-tools-callback`, + }, } export { TENANTS, USER_AGENT } diff --git a/src/types/common.d.ts b/src/types/common.d.ts index fb4ad51..715dc49 100644 --- a/src/types/common.d.ts +++ b/src/types/common.d.ts @@ -1,5 +1,5 @@ declare type Tenant = { - id: 'ONEBLINK' | 'CIVICPLUS' + id: 'ONEBLINK' | 'CIVICPLUS' | 'ONEBLINK_US' command: string label: string productShortName: string