@squidcloud/cli 1.0.431 → 1.0.433

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.
@@ -929,6 +929,17 @@ export class MyService extends SquidService {
929
929
 
930
930
  **Webhook URL:** `https://<appId>.<region>.squid.cloud/webhooks/<webhook-id>`
931
931
 
932
+ **Client - Get webhook URL:**
933
+ ```typescript
934
+ // Get URL for a specific webhook
935
+ const webhookUrl = squid.getWebhookUrl('github-events');
936
+ // Returns: https://<appId>.<region>.squid.cloud/webhooks/github-events
937
+
938
+ // Get base webhooks URL (no webhook ID)
939
+ const baseUrl = squid.getWebhookUrl();
940
+ // Returns: https://<appId>.<region>.squid.cloud/webhooks
941
+ ```
942
+
932
943
  **Client - Call webhook programmatically (optional):**
933
944
  ```typescript
934
945
  // Usually webhooks are called by external services, but you can also call them from client
@@ -1932,6 +1943,26 @@ const discovered = await integrations.discoverDataConnectionSchema('postgres-db'
1932
1943
  console.log(discovered.schema); // Discovered tables, columns, relationships
1933
1944
  console.log(discovered.collectionReadiness); // Permission and replication status
1934
1945
 
1946
+ // Test a database connection to verify it is working (before or after saving)
1947
+ const testResult = await integrations.testDataConnection({
1948
+ id: 'my-postgres',
1949
+ type: 'postgres',
1950
+ configuration: {
1951
+ connectionOptions: {
1952
+ host: 'localhost',
1953
+ port: 5432,
1954
+ database: 'mydb',
1955
+ user: 'user',
1956
+ secrets: { password: 'pass' }
1957
+ }
1958
+ }
1959
+ });
1960
+ if (testResult.success) {
1961
+ console.log('Connection successful!');
1962
+ } else {
1963
+ console.log('Connection failed:', testResult.errorMessage);
1964
+ }
1965
+
1935
1966
  // Discover schema from a GraphQL endpoint
1936
1967
  const graphqlSchema = await integrations.discoverGraphQLConnectionSchema('my-graphql', {
1937
1968
  connectionOptions: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/cli",
3
- "version": "1.0.431",
3
+ "version": "1.0.433",
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.431",
31
+ "@squidcloud/local-backend": "^1.0.433",
32
32
  "adm-zip": "^0.5.16",
33
33
  "copy-webpack-plugin": "^12.0.2",
34
34
  "decompress": "^4.2.1",