@squidcloud/slack-client 1.0.409

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.
@@ -0,0 +1,183 @@
1
+ /**
2
+ * The extraction method to use for processing documents.
3
+ */
4
+ export type DocumentExtractionMethod = 'mistral_ocr' | 'legacy';
5
+ /**
6
+ * Options for customizing how data is extracted from a document.
7
+ */
8
+ export interface ExtractDataFromDocumentOptions {
9
+ /**
10
+ * Minimum width/height (in pixels) of images to extract. Smaller images will be ignored.
11
+ */
12
+ imageMinSizePixels?: number;
13
+ /**
14
+ * Whether to extract embedded images from the document.
15
+ */
16
+ extractImages?: boolean;
17
+ /**
18
+ * Specific page indexes to extract from the document (0-based). If omitted, all pages are extracted.
19
+ */
20
+ pageIndexes?: number[];
21
+ /**
22
+ * The preferred method for extracting data from the document.
23
+ */
24
+ preferredExtractionMethod?: DocumentExtractionMethod;
25
+ /**
26
+ * Whether Squid keeps or discards the original file.
27
+ *
28
+ * Keeping the original file allows reprocessing and the ability for the user to download it later.
29
+ *
30
+ * Defaults to false.
31
+ */
32
+ discardOriginalFile?: boolean;
33
+ }
34
+ /**
35
+ * Request payload for extracting data from a document via URL.
36
+ */
37
+ export interface ExtractDataFromDocumentUrlRequest {
38
+ /**
39
+ * The publicly accessible URL pointing to the document file.
40
+ */
41
+ url: string;
42
+ /**
43
+ * Optional parameters to control how the extraction is performed.
44
+ */
45
+ options?: ExtractDataFromDocumentOptions;
46
+ }
47
+ /**
48
+ * Request payload for extracting data from a document file (uploaded directly).
49
+ */
50
+ export interface ExtractDataFromDocumentFileRequest {
51
+ /**
52
+ * Optional parameters to control how the extraction is performed.
53
+ */
54
+ options?: ExtractDataFromDocumentOptions;
55
+ }
56
+ /**
57
+ * Representation of an image extracted from a document, for use in generated content.
58
+ */
59
+ export interface ExtractDataFromDocumentImage {
60
+ /**
61
+ * A unique identifier for the image.
62
+ */
63
+ id: string;
64
+ /**
65
+ * A placeholder or marker in the content where this image should be inserted.
66
+ */
67
+ textToReplaceInContent: string;
68
+ /**
69
+ * The base64-encoded image data, prefixed with its MIME type (e.g., data:image/png;base64,...).
70
+ */
71
+ imageBase64Url: string;
72
+ }
73
+ /**
74
+ * A single extracted page from the document, including structured content and images.
75
+ */
76
+ export interface ExtractDataFromDocumentPage {
77
+ /**
78
+ * Optional title for the page (e.g., sheet name or section heading).
79
+ */
80
+ title?: string;
81
+ /**
82
+ * Page index in the original document (0-based).
83
+ */
84
+ index: number;
85
+ /**
86
+ * Extracted textual content or CSV representation of the page.
87
+ */
88
+ content: string;
89
+ /**
90
+ * List of images extracted from this page.
91
+ */
92
+ images: Array<ExtractDataFromDocumentImage>;
93
+ }
94
+ /**
95
+ * The full result of extracting data from a document, including all pages and any extracted images.
96
+ */
97
+ export interface ExtractDataFromDocumentResponse {
98
+ /**
99
+ * Array of pages containing extracted data.
100
+ */
101
+ pages: Array<ExtractDataFromDocumentPage>;
102
+ /**
103
+ * Path to the original file in cloud storage, if applicable.
104
+ */
105
+ longTermStoragePath?: string;
106
+ }
107
+ /**
108
+ * Create PDF request type.
109
+ */
110
+ export type CreatePdfType = 'html' | 'url';
111
+ /** The type of output options to apply when creating a PDF document. */
112
+ export type CreatePdfOutputOptionsType = 'format' | 'dimensions';
113
+ /** Base interface for PDF output options. This is used to define the type of output options. */
114
+ export interface BaseCreatePdfOutputOptions {
115
+ /** The type of output options, either 'format' or 'dimensions'. */
116
+ type: CreatePdfOutputOptionsType;
117
+ }
118
+ /** Output options by format */
119
+ export interface CreatePdfOutputFormatOptions extends BaseCreatePdfOutputOptions {
120
+ /** The type of output options, always 'format' for this interface. */
121
+ type: 'format';
122
+ /** The type of formatting, always 'format' for this interface. */
123
+ format: 'letter' | 'legal' | 'tabloid' | 'ledger' | 'a0' | 'a1' | 'a2' | 'a3' | 'a4' | 'a5' | 'a6';
124
+ }
125
+ /** Output options by custom dimensions */
126
+ export interface CreatePdfOutputDimensionsOptions extends BaseCreatePdfOutputOptions {
127
+ /** The type of formatting, always 'dimensions' for this interface. */
128
+ type: 'dimensions';
129
+ /** The width of the PDF document in pixels. */
130
+ width: number;
131
+ /** The height of the PDF document in pixels. */
132
+ height: number;
133
+ }
134
+ /** Combined formatting options for creating a PDF document. */
135
+ export type CreatePdfOutputOptions = CreatePdfOutputFormatOptions | CreatePdfOutputDimensionsOptions;
136
+ /**
137
+ * Base request for creating a PDF document.
138
+ */
139
+ export interface BaseCreatePdfRequest {
140
+ /**
141
+ * The type of PDF creation to perform, either from HTML or a URL.
142
+ */
143
+ type: CreatePdfType;
144
+ /** The formatting options for the PDF document. Can be either a predefined format (like 'letter') or custom dimensions. */
145
+ outputOptions?: CreatePdfOutputOptions;
146
+ /** Optional title for the PDF document. */
147
+ title?: string;
148
+ }
149
+ /**
150
+ * Request payload for creating a PDF from a URL.
151
+ */
152
+ export interface CreatePdfFromUrlRequest extends BaseCreatePdfRequest {
153
+ /** The type of PDF creation, always 'url' for this request. */
154
+ type: 'url';
155
+ /**
156
+ * The URL of the webpage to convert into a PDF.
157
+ */
158
+ url: string;
159
+ }
160
+ /**
161
+ * Request payload for creating a PDF from HTML content.
162
+ */
163
+ export interface CreatePdfFromHtmlRequest extends BaseCreatePdfRequest {
164
+ /** The type of PDF creation, always 'html' for this request. */
165
+ type: 'html';
166
+ /** The HTML content to convert into a PDF. Should not contain <html>, <body>, <head>, should just include the inner HTML */
167
+ innerHtml: string;
168
+ /** Optional URL for CSS styles to apply to the HTML content. */
169
+ cssUrl?: string;
170
+ }
171
+ /**
172
+ * Combined request type for creating a PDF, which can be either from a URL or HTML content.
173
+ */
174
+ export type CreatePdfRequest = CreatePdfFromUrlRequest | CreatePdfFromHtmlRequest;
175
+ /**
176
+ * Response type for the PDF creation operation, containing the URL of the generated PDF.
177
+ */
178
+ export interface CreatePdfResponse {
179
+ /** The publicly accessible URL where the generated PDF can be downloaded. */
180
+ url: string;
181
+ /** The generated filename. */
182
+ fileName?: string;
183
+ }
@@ -0,0 +1,51 @@
1
+ import { IntegrationId } from './communication.public-types';
2
+ /** List of all integration types supported by Squid. */
3
+ export declare const INTEGRATION_TYPES: readonly ["active_directory", "ai_agents", "ai_chatbot", "algolia", "alloydb", "api", "auth0", "azure_cosmosdb", "azure_postgresql", "azure_sql", "bigquery", "built_in_db", "built_in_gcs", "built_in_queue", "built_in_s3", "cassandra", "clickhouse", "cloudsql", "cockroach", "cognito", "connected_knowledgebases", "confluence", "confluent", "datadog", "db2", "descope", "documentdb", "dynamodb", "elasticsearch", "firebase_auth", "firestore", "gcs", "google_calendar", "google_docs", "google_drive", "graphql", "hubspot", "jira", "jwt_hmac", "jwt_rsa", "kafka", "linear", "mariadb", "monday", "mongo", "mssql", "databricks", "mysql", "newrelic", "okta", "onedrive", "oracledb", "pinecone", "postgres", "redis", "s3", "salesforce_crm", "sap_hana", "sentry", "servicenow", "snowflake", "spanner", "xata", "zendesk", "mail", "slack", "mcp", "a2a", "legend"];
4
+ /**
5
+ * @category Database
6
+ */
7
+ export declare const DATA_INTEGRATION_TYPES: readonly ["bigquery", "built_in_db", "clickhouse", "cockroach", "mongo", "mssql", "databricks", "mysql", "oracledb", "postgres", "sap_hana", "snowflake", "elasticsearch", "legend"];
8
+ /**
9
+ * @category Auth
10
+ */
11
+ export declare const AUTH_INTEGRATION_TYPES: readonly ["auth0", "jwt_rsa", "jwt_hmac", "cognito", "okta", "descope", "firebase_auth"];
12
+ /** Supported integration types for GraphQL-based services. */
13
+ export declare const GRAPHQL_INTEGRATION_TYPES: readonly ["graphql", "linear"];
14
+ /** Supported integration types for HTTP-based services. */
15
+ export declare const HTTP_INTEGRATION_TYPES: readonly ["api"];
16
+ /** Represents a supported integration type identifier, such as 'postgres', 'auth0', or 's3'. */
17
+ export type IntegrationType = (typeof INTEGRATION_TYPES)[number];
18
+ /** Supported schema types for integrations */
19
+ export declare const INTEGRATION_SCHEMA_TYPES: readonly ["data", "api", "graphql"];
20
+ /** Describes the type of schema the integration provides, such as data, API, or GraphQL schema. */
21
+ export type IntegrationSchemaType = (typeof INTEGRATION_SCHEMA_TYPES)[number];
22
+ /**
23
+ * @category Database
24
+ */
25
+ export declare const BUILT_IN_DB_INTEGRATION_ID: IntegrationId;
26
+ /**
27
+ * @category Queue
28
+ */
29
+ export declare const BUILT_IN_QUEUE_INTEGRATION_ID: IntegrationId;
30
+ /**
31
+ * ID for the cloud specific storage integration: s3 (built_in_s3) or gcs (built_in_gcs).
32
+ * @category
33
+ */
34
+ export declare const BUILT_IN_STORAGE_INTEGRATION_ID: IntegrationId;
35
+ /** Metadata describing a configured integration, including its ID, type, timestamps, and optional configuration object. */
36
+ export interface IntegrationInfo<ConfigurationType = Record<string, any> | undefined> {
37
+ /** The unique identifier of the integration instance. */
38
+ id: IntegrationId;
39
+ /** The type of the integration (e.g., postgres, auth0, s3). */
40
+ type: IntegrationType;
41
+ /** The date when the integration was created. */
42
+ creationDate?: Date;
43
+ /** The date when the integration was last updated. */
44
+ updateDate?: Date;
45
+ /** The configuration object for the integration, if any. */
46
+ configuration: ConfigurationType;
47
+ }
48
+ /** Integration IDs used for built-in integrations by Squid. */
49
+ export declare const SQUID_BUILT_IN_INTEGRATION_IDS: readonly [string, string, string];
50
+ /** Returns true if ID is a built-in integration ID in Squid. */
51
+ export declare function isBuiltInIntegrationId(id: unknown): id is (typeof SQUID_BUILT_IN_INTEGRATION_IDS)[number];
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Represents a unique identifier for a job.
3
+ */
4
+ export type JobId = string;
5
+ /** Represents a request to get an asynchronous job by its ID. */
6
+ export interface GetJobRequest {
7
+ /** The unique identifier of the job to retrieve */
8
+ jobId: JobId;
9
+ }
10
+ /**
11
+ * Represents a request to get an asynchronous job by its ID.
12
+ */
13
+ export interface GetJobResponse {
14
+ /** The job details */
15
+ job: AsyncJob | undefined;
16
+ }
17
+ /**
18
+ * Represents a request to subscribe to job updates.
19
+ * This allows clients to receive real-time updates about the job's status.
20
+ */
21
+ export interface SubscribeToJobRequest {
22
+ /** The unique identifier of the job to subscribe to */
23
+ jobId: JobId;
24
+ }
25
+ /**
26
+ * Represents an asynchronous job
27
+ */
28
+ export interface AsyncJob<T = any> {
29
+ /**
30
+ * The unique identifier of the job.
31
+ */
32
+ id: JobId;
33
+ /**
34
+ * The timestamp when the job was created.
35
+ */
36
+ createdAt: Date;
37
+ /**
38
+ * The timestamp when the job was last updated.
39
+ */
40
+ updatedAt: Date;
41
+ /**
42
+ * The current status of the job.
43
+ * Can be one of the following:
44
+ * - 'in_progress': The job is currently being processed.
45
+ * - 'completed': The job has finished successfully.
46
+ * - 'failed': The job has failed.
47
+ */
48
+ status: 'in_progress' | 'completed' | 'failed';
49
+ /**
50
+ * The result of the job, if available.
51
+ * This is of type `T` and is optional.
52
+ */
53
+ result?: T;
54
+ /**
55
+ * The error message, if the job has failed.
56
+ * This is optional.
57
+ */
58
+ error?: string;
59
+ }
@@ -0,0 +1,51 @@
1
+ /**
2
+ * A type alias for an ApiKey.
3
+ * @category Secret
4
+ */
5
+ export type ApiKey = string;
6
+ /**
7
+ * The secret key, an alias for a string.
8
+ * @category Secret
9
+ */
10
+ export type SecretKey = string;
11
+ /**
12
+ * The secret value.
13
+ * @category Secret
14
+ */
15
+ export type SecretValue = string | number | boolean;
16
+ /**
17
+ * Metadata for a secret, including its key and last updated timestamp.
18
+ * @category Secret
19
+ */
20
+ export interface SecretMetadata {
21
+ /** The key identifying the secret. */
22
+ key: SecretKey;
23
+ /** The timestamp (in milliseconds) when the secret was last updated. */
24
+ lastUpdated: number;
25
+ }
26
+ /**
27
+ * A secret entry combining metadata with a typed value.
28
+ * @category Secret
29
+ */
30
+ export interface SecretEntry<T extends SecretValue = SecretValue> extends SecretMetadata {
31
+ /** The value of the secret, constrained to the specified type. */
32
+ value: T;
33
+ }
34
+ /**
35
+ * An API key entry combining metadata with a string value.
36
+ * @category Secret
37
+ */
38
+ export interface ApiKeyEntry extends SecretMetadata {
39
+ /** The string value of the API key. */
40
+ value: string;
41
+ }
42
+ /**
43
+ * A request structure for setting a secret with a key-value pair.
44
+ * @category Secret
45
+ */
46
+ export interface SetSecretRequestEntry {
47
+ /** The key identifying the secret to set. */
48
+ key: SecretKey;
49
+ /** The value to assign to the secret. */
50
+ value: SecretValue;
51
+ }
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@squidcloud/slack-client",
3
+ "version": "1.0.409",
4
+ "description": "Squid Slack Client",
5
+ "main": "dist/index.js",
6
+ "types": "dist/client/src/index.d.ts",
7
+ "scripts": {
8
+ "prebuild": "del-cli dist",
9
+ "build": "webpack --mode=production",
10
+ "lint": "eslint",
11
+ "publish:public": "npm run build && npm publish --access public"
12
+ },
13
+ "files": [
14
+ "dist/**/*"
15
+ ],
16
+ "keywords": [],
17
+ "author": "",
18
+ "license": "ISC",
19
+ "dependencies": {
20
+ "assertic": "^1.3.0",
21
+ "lodash": "^4.17.21",
22
+ "@squidcloud/client": "^1.0.409",
23
+ "@slack/bolt": "^4.5.0"
24
+ },
25
+ "engines": {
26
+ "node": ">=20.0.0"
27
+ }
28
+ }