@squidcloud/cli 1.0.434 → 1.0.436

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/dist/index.js CHANGED
@@ -2156,6 +2156,7 @@ exports.KOTLIN_CONTROLLERS = [
2156
2156
  'integration',
2157
2157
  'internal-storage',
2158
2158
  'internalCodeExecutor',
2159
+ 'management-secret',
2159
2160
  'mutation',
2160
2161
  'native-query',
2161
2162
  'observability',
@@ -11632,7 +11633,7 @@ exports.CONNECTOR_IDS = [
11632
11633
  'linear',
11633
11634
  'mail',
11634
11635
  'salesforce',
11635
- 'servicenow',
11636
+ 'servicenow_csm',
11636
11637
  'slack',
11637
11638
  'teams',
11638
11639
  'zendesk',
@@ -23639,6 +23640,7 @@ exports.INTEGRATION_TYPES = [
23639
23640
  'alloydb',
23640
23641
  'api',
23641
23642
  'auth0',
23643
+ 'bedrock',
23642
23644
  'azure_cosmosdb',
23643
23645
  'azure_postgresql',
23644
23646
  'azure_sql',
@@ -23694,11 +23696,11 @@ exports.INTEGRATION_TYPES = [
23694
23696
  'salesforce_crm',
23695
23697
  'sap_hana',
23696
23698
  'sentry',
23697
- 'servicenow',
23698
23699
  'snowflake',
23699
23700
  'spanner',
23700
23701
  'xata',
23701
23702
  'zendesk',
23703
+ 'servicenow_csm',
23702
23704
  'freshdesk',
23703
23705
  'mail',
23704
23706
  'slack',
@@ -25171,13 +25173,16 @@ exports.RERANK_PROVIDERS = ['cohere', 'none'];
25171
25173
  /** List of available AI provider types. See AiProviderType. */
25172
25174
  exports.AI_PROVIDER_TYPES = [
25173
25175
  'anthropic',
25176
+ 'bedrock',
25174
25177
  'flux',
25175
25178
  'gemini',
25176
25179
  'openai',
25177
25180
  'grok',
25178
25181
  'stability',
25179
25182
  'voyage',
25180
- 'external',
25183
+ 'mistral',
25184
+ 'textract',
25185
+ 'external', // This is a technicality, referring to user-defined providers.
25181
25186
  ];
25182
25187
  /**
25183
25188
  * Public OpenAI chat model names (active models only).
@@ -30661,7 +30666,7 @@ function exitWithError(...messages) {
30661
30666
  (module) {
30662
30667
 
30663
30668
  "use strict";
30664
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@squidcloud/cli","version":"1.0.434","description":"The Squid CLI","main":"dist/index.js","scripts":{"start":"node dist/index.js","start-ts":"ts-node -r tsconfig-paths/register src/index.ts","prebuild":"rimraf dist","build":"webpack --mode=production","build:dev":"webpack --mode=development","lint":"eslint","link":"npm run build && chmod 755 dist/index.js && npm link","watch":"webpack --watch","deploy":"npm run build && npm pack --silent | xargs -I {} mv {} package.tgz && npm install -g package.tgz && rm -rf package.tgz","publish:public":"npm run build && npm publish --access public"},"files":["dist/**/*"],"bin":{"squid":"dist/index.js"},"keywords":[],"author":"","license":"ISC","engines":{"node":">=18.0.0"},"dependencies":{"@squidcloud/local-backend":"^1.0.434","adm-zip":"^0.5.16","copy-webpack-plugin":"^12.0.2","decompress":"^4.2.1","nodemon":"^3.1.9","terser-webpack-plugin":"^5.3.10","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0","tsconfig-paths-webpack-plugin":"^4.1.0","webpack":"^5.101.3","zip-webpack-plugin":"^4.0.1"},"devDependencies":{"@types/adm-zip":"^0.5.7","@types/decompress":"^4.2.7","@types/node":"^20.19.9","terminal-link":"^3.0.0"}}');
30669
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@squidcloud/cli","version":"1.0.436","description":"The Squid CLI","main":"dist/index.js","scripts":{"start":"node dist/index.js","start-ts":"ts-node -r tsconfig-paths/register src/index.ts","prebuild":"rimraf dist","build":"webpack --mode=production","build:dev":"webpack --mode=development","lint":"eslint","link":"npm run build && chmod 755 dist/index.js && npm link","watch":"webpack --watch","deploy":"npm run build && npm pack --silent | xargs -I {} mv {} package.tgz && npm install -g package.tgz && rm -rf package.tgz","publish:public":"npm run build && npm publish --access public"},"files":["dist/**/*"],"bin":{"squid":"dist/index.js"},"keywords":[],"author":"","license":"ISC","engines":{"node":">=18.0.0"},"dependencies":{"@squidcloud/local-backend":"^1.0.436","adm-zip":"^0.5.16","copy-webpack-plugin":"^12.0.2","decompress":"^4.2.1","nodemon":"^3.1.9","terser-webpack-plugin":"^5.3.10","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0","tsconfig-paths-webpack-plugin":"^4.1.0","webpack":"^5.101.3","zip-webpack-plugin":"^4.0.1"},"devDependencies":{"@types/adm-zip":"^0.5.7","@types/decompress":"^4.2.7","@types/node":"^20.19.9","terminal-link":"^3.0.0"}}');
30665
30670
 
30666
30671
  /***/ },
30667
30672
 
@@ -195,54 +195,136 @@ await integrations.upsertIntegration({
195
195
  });
196
196
  ```
197
197
 
198
- **Key point:** The Console provides a visual interface for management, but everything (except org/app creation) can be automated through the SDK for more flexibility and control.
198
+ **Key point:** The Console provides a visual interface for management, and everything can be automated through the SDK for more flexibility and control. For organization and application management, use the **ManagementClient** (see below).
199
+
200
+ ### 4. ManagementClient (Programmatic Org/App Management)
201
+
202
+ **What it is:** A specialized client for programmatically managing Squid organizations and applications using management API keys.
203
+
204
+ **How it works:**
205
+ - Uses management API keys (created in Console Profile Settings)
206
+ - Provides methods to create organizations and applications
207
+ - Works independently of the main Squid client
208
+ - Authenticated via management API key (starts with `squid_mgmt_`)
209
+
210
+ **Creating Management API Keys:**
211
+ 1. Go to Squid Console → Profile Settings → API Keys
212
+ 2. Click "Create API Key"
213
+ 3. Copy the key value (shown only once)
214
+ 4. Key format: `squid_mgmt_<uuid>`
215
+
216
+ **Usage:**
217
+
218
+ ```typescript
219
+ import { ManagementClient } from '@squidcloud/client';
220
+
221
+ // Initialize with management API key
222
+ const client = new ManagementClient({
223
+ apiKey: 'squid_mgmt_xxx...', // From Console Profile Settings
224
+ region: 'us-east-1.aws' // Your Squid region
225
+ });
226
+
227
+ // Create an organization
228
+ const { organizationId } = await client.createOrganization({
229
+ name: 'My Organization' // 2-50 characters
230
+ });
231
+ console.log('Created org:', organizationId);
232
+
233
+ // Create an application in the organization
234
+ const { appId } = await client.createApplication({
235
+ organizationId,
236
+ name: 'My Application',
237
+ cloudId: 'aws', // 'aws' | 'gcp' | 'azure'
238
+ region: 'us-east-1' // Cloud region (e.g., 'us-east-1', 'us-central1')
239
+ });
240
+ console.log('Created app:', appId);
241
+
242
+ // Delete an application
243
+ await client.deleteApplication({ appId });
244
+ ```
245
+
246
+ **Available Methods:**
247
+
248
+ | Method | Description |
249
+ |--------|-------------|
250
+ | `createOrganization({ name })` | Creates a new organization. User becomes admin. |
251
+ | `createApplication({ organizationId, name, cloudId, region })` | Creates an application in an organization. |
252
+ | `deleteApplication({ appId })` | Deletes an application. Requires admin role. |
253
+
254
+ **TypeScript Types:**
255
+
256
+ ```typescript
257
+ import {
258
+ ManagementClient,
259
+ ManagementClientOptions,
260
+ ManagementCloudId, // 'aws' | 'gcp' | 'azure'
261
+ ManagementCreateOrganizationRequest,
262
+ ManagementCreateOrganizationResponse,
263
+ ManagementCreateApplicationRequest,
264
+ ManagementCreateApplicationResponse,
265
+ ManagementDeleteApplicationRequest
266
+ } from '@squidcloud/client';
267
+ ```
268
+
269
+ **Key Points:**
270
+ - Management API keys are tied to a user account
271
+ - The user associated with the key becomes the organization admin
272
+ - Keys can be suspended/reactivated/deleted in Console Profile Settings
273
+ - Different from app API keys (which bypass security rules)
274
+ - Use for CI/CD pipelines, automation scripts, and programmatic management
275
+
276
+ **Use Cases:**
277
+ - Automated tenant provisioning (multi-tenant SaaS)
278
+ - CI/CD pipeline integration
279
+ - Infrastructure-as-code workflows
280
+ - Programmatic organization management
281
+ - Automated testing environments
199
282
 
200
283
  ### How They Work Together
201
284
 
202
285
  ```
203
- ┌─────────────────────┐
204
- │ CLIENT (Web/ │
205
- │ Mobile/Server) │
206
- │ │
207
- │ - Squid SDK init │
208
- │ - User auth │
209
- │ - Limited access │
210
- └──────────┬──────────┘
211
-
212
- HTTP/WebSocket
213
-
214
-
215
- ┌─────────────────────┐
216
- │ SQUID BACKEND │
217
- (Your Code)
218
-
219
- - SquidService
220
- │ - Decorators
221
- │ - Full permissions │
222
- │ - Business logic
223
- │ - Security rules │
224
- └──────────┬──────────┘
225
-
226
- Deployed via CLI
227
- │ or managed via
228
-
229
- ┌─────────────────────┐
230
- SQUID CONSOLE
231
- (Web UI)
232
-
233
- │ - Manage apps
234
- │ - AI Studio
235
- │ - Integrations │
236
- │ - Monitoring │
237
- └─────────────────────┘
286
+ ┌─────────────────────┐ ┌─────────────────────┐
287
+ │ CLIENT (Web/ MANAGEMENT CLIENT │
288
+ │ Mobile/Server) │ │ (Automation) │
289
+ │ │ │ │
290
+ │ - Squid SDK init │ │ - ManagementClient │
291
+ │ - User auth │ │ - Management API │
292
+ │ - Limited access │ │ key auth │
293
+ └──────────┬──────────┘ │ - Create orgs/apps │
294
+ └──────────┬──────────┘
295
+
296
+ HTTP/WebSocket │ HTTP
297
+ │ │
298
+ ▼ ▼
299
+ ┌─────────────────────────────────────────────────┐
300
+ SQUID BACKEND
301
+ (Your Code)
302
+
303
+ │ - SquidService - Decorators
304
+ │ - Full permissions - Business logic
305
+ │ - Security rules - Webhooks
306
+ └──────────────────────────┬──────────────────────┘
307
+
308
+ Deployed via CLI
309
+ or managed via
310
+
311
+ ┌─────────────────────────────────────────────────┐
312
+ │ SQUID CONSOLE │
313
+ (Web UI)
314
+
315
+ - Manage apps - AI Studio
316
+ │ - Integrations - Monitoring
317
+ │ - Management API Keys - Profile Settings
318
+ └─────────────────────────────────────────────────┘
238
319
  ```
239
320
 
240
321
  **Development workflow:**
241
- 1. Create application in **Squid Console**
322
+ 1. Create application in **Squid Console** (or programmatically via **ManagementClient**)
242
323
  2. Develop backend services in **Squid Backend** (local development with `squid start`)
243
324
  3. Deploy backend to Squid infrastructure (`squid deploy`)
244
325
  4. Build **Client** applications that use the Squid Client SDK
245
326
  5. Use **Console** for monitoring and management, or use **SDK** for programmatic control
327
+ 6. Use **ManagementClient** for automated org/app provisioning (CI/CD, multi-tenant SaaS)
246
328
 
247
329
  ## CLI Commands
248
330
 
@@ -1485,7 +1567,6 @@ const result = await squid.ai().executeAiQuery(
1485
1567
  'Show me all active users who registered last month',
1486
1568
  {
1487
1569
  instructions: 'Only query the users collection',
1488
- generateWalkthrough: true, // Get step-by-step explanation
1489
1570
  enableRawResults: true, // Include raw query results
1490
1571
  selectCollectionsOptions: {
1491
1572
  collectionsToUse: ['users'] // Limit to specific collections
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/cli",
3
- "version": "1.0.434",
3
+ "version": "1.0.436",
4
4
  "description": "The Squid CLI",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -28,7 +28,7 @@
28
28
  "node": ">=18.0.0"
29
29
  },
30
30
  "dependencies": {
31
- "@squidcloud/local-backend": "^1.0.434",
31
+ "@squidcloud/local-backend": "^1.0.436",
32
32
  "adm-zip": "^0.5.16",
33
33
  "copy-webpack-plugin": "^12.0.2",
34
34
  "decompress": "^4.2.1",