@squidcloud/client 1.0.201 → 1.0.202
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/cjs/index.js +5 -34290
- package/dist/typescript-client/src/squid.d.ts +12 -4
- package/package.json +2 -2
|
@@ -174,10 +174,7 @@ export declare class Squid {
|
|
|
174
174
|
executeFunction<T = any>(functionName: string, ...params: any[]): Promise<T>;
|
|
175
175
|
/**
|
|
176
176
|
* Executes a native relational query with the given parameters and returns a promise with the result.
|
|
177
|
-
*
|
|
178
|
-
* Native queries allow you to execute raw SQL or other database-specific queries directly against the database.
|
|
179
|
-
* This can be useful when you need to perform operations that are not easily accomplished with other high-level
|
|
180
|
-
* abstractions.
|
|
177
|
+
* See https://docs.squid.cloud/docs/development-tools/backend/native-queries#native-relational-queries.
|
|
181
178
|
*
|
|
182
179
|
* @param integrationId The id of the integration that the query is associated with.
|
|
183
180
|
* @param query The raw SQL or other database-specific query to execute.
|
|
@@ -186,6 +183,17 @@ export declare class Squid {
|
|
|
186
183
|
* @type {Promise<Array<SquidDocument>>}
|
|
187
184
|
*/
|
|
188
185
|
executeNativeRelationalQuery<T = any>(integrationId: IntegrationId, query: string, params?: Record<string, any>): Promise<Array<T>>;
|
|
186
|
+
/**
|
|
187
|
+
* Executes a native Mongo/built-in-db query with the given pipeline and returns a promise with the result.
|
|
188
|
+
* See https://docs.squid.cloud/docs/development-tools/backend/native-queries#native-mongodb-queries.
|
|
189
|
+
*
|
|
190
|
+
* @param integrationId The id of the integration that the query is associated with.
|
|
191
|
+
* @param collectionName The collection to query.
|
|
192
|
+
* @param aggregationPipeline The aggregation pipeline for the query.
|
|
193
|
+
* @returns A promise that resolves with the result of the query.
|
|
194
|
+
* @type {Promise<Array<SquidDocument>>}
|
|
195
|
+
*/
|
|
196
|
+
executeNativeMongoQuery<T = any>(integrationId: IntegrationId, collectionName: string, aggregationPipeline: Array<any | undefined>): Promise<Array<T>>;
|
|
189
197
|
callApi<T = any>(integrationId: IntegrationId, endpointId: ApiEndpointId, request?: Record<string, any>, options?: Omit<CallApiOptions, 'nativeResponse'> | (CallApiOptions & {
|
|
190
198
|
nativeResponse: false;
|
|
191
199
|
})): Promise<T>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squidcloud/client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.202",
|
|
4
4
|
"description": "A typescript implementation of the Squid client",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"types": "dist/typescript-client/src/index.d.ts",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"build:prod": "webpack --mode=production",
|
|
15
15
|
"watch": "webpack --watch",
|
|
16
16
|
"lint": "eslint . --ext .ts",
|
|
17
|
-
"build-and-check-public-types": "npm run
|
|
17
|
+
"build-and-check-public-types": "npm run build && npm run check-public-types",
|
|
18
18
|
"check-public-types": "rimraf dist/internal-common/src/types dist/internal-common/src/utils && tsc -p tsconfig.types.json",
|
|
19
19
|
"test": "jest --detectOpenHandles",
|
|
20
20
|
"test:watch": "jest --watch",
|