@squidcloud/freshdesk-client 1.0.496 → 1.0.498
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/connectors/freshdesk/common/src/freshdesk-types.d.ts +1 -28
- package/dist/internal-common/src/ai/system-openai-compatible.d.ts +35 -0
- package/dist/internal-common/src/public-types/ai-agent-integrations.public-types.d.ts +71 -0
- package/dist/internal-common/src/public-types/ai-agent.public-types.d.ts +1594 -0
- package/dist/internal-common/src/public-types/ai-common.public-types.d.ts +303 -0
- package/dist/internal-common/src/public-types/ai-function.public-types.d.ts +114 -0
- package/dist/internal-common/src/public-types/ai-knowledge-base.public-types.d.ts +2378 -0
- package/dist/internal-common/src/public-types/ai-query.public-types.d.ts +266 -0
- package/dist/internal-common/src/public-types/api-client.public-types.d.ts +9 -0
- package/dist/internal-common/src/public-types/api.public-types.d.ts +99 -0
- package/dist/internal-common/src/public-types/backend.public-types.d.ts +61 -0
- package/dist/internal-common/src/public-types/connector.public-types.d.ts +12 -0
- package/dist/internal-common/src/public-types/context.public-types.d.ts +83 -0
- package/dist/internal-common/src/public-types/document.public-types.d.ts +71 -0
- package/dist/internal-common/src/public-types/event.public-types.d.ts +18 -0
- package/dist/internal-common/src/public-types/extraction.public-types.d.ts +405 -0
- package/dist/internal-common/src/public-types/http-status.public-types.d.ts +415 -0
- package/dist/internal-common/src/public-types/integration.public-types.d.ts +65 -0
- package/dist/internal-common/src/public-types/job.public-types.d.ts +101 -0
- package/dist/internal-common/src/public-types/langgraph.public-types.d.ts +50 -0
- package/dist/internal-common/src/public-types/metadata-filter.public-types.d.ts +106 -0
- package/dist/internal-common/src/public-types/query.public-types.d.ts +149 -0
- package/dist/internal-common/src/public-types/scheduler.public-types.d.ts +43 -0
- package/dist/internal-common/src/public-types/schema.public-types.d.ts +88 -0
- package/dist/internal-common/src/public-types/secret.public-types.d.ts +82 -0
- package/dist/internal-common/src/public-types/socket.public-types.d.ts +4 -0
- package/dist/internal-common/src/public-types/source-code.public-types.d.ts +208 -0
- package/dist/internal-common/src/public-types/typescript.public-types.d.ts +20 -0
- package/dist/internal-common/src/public-types-backend/ai-agent.public-context.d.ts +101 -0
- package/dist/internal-common/src/public-types-backend/api-call.public-context.d.ts +30 -0
- package/dist/internal-common/src/public-types-backend/application.public-types.d.ts +94 -0
- package/dist/internal-common/src/public-types-backend/bundle-api.public-types.d.ts +199 -0
- package/dist/internal-common/src/public-types-backend/bundle-data.public-types.d.ts +18 -0
- package/dist/internal-common/src/public-types-backend/distributed-lock.public-context.d.ts +4 -0
- package/dist/internal-common/src/public-types-backend/graphql.public-context.d.ts +7 -0
- package/dist/internal-common/src/public-types-backend/langgraph.public-context.d.ts +16 -0
- package/dist/internal-common/src/public-types-backend/mcp.public-types.d.ts +55 -0
- package/dist/internal-common/src/public-types-backend/metric.public-context.d.ts +12 -0
- package/dist/internal-common/src/public-types-backend/mutation.public-context.d.ts +161 -0
- package/dist/internal-common/src/public-types-backend/native-query.public-context.d.ts +75 -0
- package/dist/internal-common/src/public-types-backend/query.public-context.d.ts +193 -0
- package/dist/internal-common/src/public-types-backend/storage.public-types.d.ts +15 -0
- package/dist/internal-common/src/public-types-backend/topic.public-context.d.ts +17 -0
- package/dist/internal-common/src/types/application.types.d.ts +98 -0
- package/dist/internal-common/src/types/backend-run.types.d.ts +55 -0
- package/dist/internal-common/src/types/bundle-data.types.d.ts +18 -0
- package/dist/internal-common/src/types/connector.types.d.ts +77 -0
- package/dist/internal-common/src/types/integrations/ai.types.d.ts +1 -0
- package/dist/internal-common/src/types/integrations/api.types.d.ts +76 -0
- package/dist/internal-common/src/types/integrations/auth.types.d.ts +1 -0
- package/dist/internal-common/src/types/integrations/database.types.d.ts +44 -0
- package/dist/internal-common/src/types/integrations/observability.types.d.ts +1 -0
- package/dist/internal-common/src/types/integrations/queue-types.d.ts +1 -0
- package/dist/internal-common/src/types/integrations/schemas.d.ts +6 -0
- package/dist/internal-common/src/types/integrations/storage-types.d.ts +22 -0
- package/dist/internal-common/src/types/langgraph.types.d.ts +1 -0
- package/dist/internal-common/src/types/openapi.types.d.ts +1 -0
- package/dist/internal-common/src/types/query.types.d.ts +21 -0
- package/dist/internal-common/src/types/secret.types.d.ts +7 -0
- package/dist/internal-common/src/types/time-units.d.ts +1 -0
- package/dist/internal-common/src/utils/object.d.ts +88 -0
- package/dist/internal-common/src/utils/serialization.d.ts +30 -0
- package/dist/internal-common/src/utils/worker-manager-utils.d.ts +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { AppId, IntegrationId } from '../public-types/communication.public-types';
|
|
2
|
+
import { CONNECTOR_IDS, type ConnectorId } from '../public-types/connector.public-types';
|
|
3
|
+
import { IntegrationType } from '../public-types/integration.public-types';
|
|
4
|
+
import { ApplicationBundleData } from './bundle-data.types';
|
|
5
|
+
export { CONNECTOR_IDS };
|
|
6
|
+
export type { ConnectorId };
|
|
7
|
+
export interface ConnectorPackageMetadata {
|
|
8
|
+
id: ConnectorId;
|
|
9
|
+
integrationTypes: Array<IntegrationType>;
|
|
10
|
+
bundleData: ApplicationBundleData;
|
|
11
|
+
/** Version as in package.json. */
|
|
12
|
+
version: string;
|
|
13
|
+
}
|
|
14
|
+
/** A file inside a connector package that contains package metadata. */
|
|
15
|
+
export declare const CONNECTOR_METADATA_JSON_FILE = "connector-metadata.json";
|
|
16
|
+
/** Per application app connectors. */
|
|
17
|
+
export interface ApplicationAppConnectors {
|
|
18
|
+
appConnectors: Array<ConnectorId>;
|
|
19
|
+
}
|
|
20
|
+
export interface UpdateApplicationAppConnectorsWebhookPayload {
|
|
21
|
+
appId: AppId;
|
|
22
|
+
appConnectors: Array<ConnectorId>;
|
|
23
|
+
}
|
|
24
|
+
/** Persistent info about the connector stored in 'activeConnectors' collection. */
|
|
25
|
+
export interface ConnectorInfo {
|
|
26
|
+
/** Connector ID. */
|
|
27
|
+
id: ConnectorId;
|
|
28
|
+
/** Version of the connector used for all future application deployments. */
|
|
29
|
+
version: string;
|
|
30
|
+
/**
|
|
31
|
+
* A list of integration IDs for which this connector code should be deployed.
|
|
32
|
+
* If not present, the connector ID is the only integration ID it can be used with.
|
|
33
|
+
*/
|
|
34
|
+
integrationTypes: Array<IntegrationType>;
|
|
35
|
+
/** Connector package metadata. */
|
|
36
|
+
bundleData: ApplicationBundleData;
|
|
37
|
+
/** Date when the S3 connector bundle was last updated. */
|
|
38
|
+
lastModifiedDate: Date;
|
|
39
|
+
}
|
|
40
|
+
/** A request to Core to update the latest active connector version used by Core. */
|
|
41
|
+
export interface SyncConnectorRequest {
|
|
42
|
+
connectorId: ConnectorId;
|
|
43
|
+
/** When defined, the connectors are not checked via S3 but picked up from the local dir. */
|
|
44
|
+
localConnectorsDir?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface SyncConnectorResponse {
|
|
47
|
+
connectorId: ConnectorId;
|
|
48
|
+
version: string;
|
|
49
|
+
}
|
|
50
|
+
/** Sync status for a connector integration. */
|
|
51
|
+
export interface ConnectorSyncStatus {
|
|
52
|
+
integrationId: IntegrationId;
|
|
53
|
+
syncStatus: 'idle' | 'in_progress' | 'completed' | 'failed';
|
|
54
|
+
lastSync?: Date;
|
|
55
|
+
syncStartTime?: Date;
|
|
56
|
+
/** Number of items successfully synced in the current or most recent run. */
|
|
57
|
+
itemsSyncedInCurrentRun: number;
|
|
58
|
+
/** Total items to sync in the current or most recent run (enables progress: synced/total). */
|
|
59
|
+
itemsTotalInCurrentRun: number;
|
|
60
|
+
/** Number of items currently in a failed state. */
|
|
61
|
+
itemsFailedTotal: number;
|
|
62
|
+
}
|
|
63
|
+
/** One item that failed to sync for a connector integration. */
|
|
64
|
+
export interface ConnectorSyncFailedItem {
|
|
65
|
+
/** The connector-specific id of the item (issue key, ticket id, url, etc.). */
|
|
66
|
+
id: string;
|
|
67
|
+
/** Human-readable title of the item, when known. */
|
|
68
|
+
title?: string;
|
|
69
|
+
/** Message describing the most recent failure. */
|
|
70
|
+
error: string;
|
|
71
|
+
}
|
|
72
|
+
/** One page of a connector's failed sync items, keyset-paginated by item id. */
|
|
73
|
+
export interface ConnectorSyncFailedItemsPage {
|
|
74
|
+
items: Array<ConnectorSyncFailedItem>;
|
|
75
|
+
/** Pass as the next page's `afterId` to continue. Undefined when this is the last page. */
|
|
76
|
+
nextAfterId?: string;
|
|
77
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export interface JiraIntegrationConfiguration {
|
|
2
|
+
/** Authentication mode: 'apiKey' uses email + API key, 'oauth' uses OAuth 2.0 */
|
|
3
|
+
authMode: 'apiKey' | 'oauth';
|
|
4
|
+
/** Jira API key (required when authMode === 'apiKey') */
|
|
5
|
+
apiKey?: string;
|
|
6
|
+
/** Jira email associated with the API key (required when authMode === 'apiKey') */
|
|
7
|
+
email?: string;
|
|
8
|
+
/** OAuth 2.0 client ID (required when authMode === 'oauth') */
|
|
9
|
+
clientId?: string;
|
|
10
|
+
/** OAuth 2.0 redirect URI (required when authMode === 'oauth') */
|
|
11
|
+
redirectUri?: string;
|
|
12
|
+
/** OAuth 2.0 secrets */
|
|
13
|
+
secrets?: {
|
|
14
|
+
/** OAuth 2.0 client secret */
|
|
15
|
+
clientSecret?: string;
|
|
16
|
+
};
|
|
17
|
+
/** Jira domain name */
|
|
18
|
+
domain: string;
|
|
19
|
+
/** Atlassian Cloud ID. When set, API calls use https://api.atlassian.com/ex/jira/{cloudId}/... instead of https://{domain}.atlassian.net/... */
|
|
20
|
+
cloudId?: string;
|
|
21
|
+
/** Enable issue indexing for semantic search */
|
|
22
|
+
indexIssues?: boolean;
|
|
23
|
+
/** Array of project keys to index. If empty, all projects are indexed. */
|
|
24
|
+
selectedProjectKeys?: Array<string>;
|
|
25
|
+
/** Number of days of issue history to sync (default: 30) */
|
|
26
|
+
issueHistoryDays?: number;
|
|
27
|
+
/** Statuses that cause issues to be auto-deleted from the KB.
|
|
28
|
+
* Defaults to: Cancelled, Canceled, Rejected, Won't Fix, Duplicate */
|
|
29
|
+
terminalStatuses?: Array<string>;
|
|
30
|
+
}
|
|
31
|
+
export interface JiraJsmIntegrationConfiguration {
|
|
32
|
+
/** Authentication mode: 'apiKey' uses email + API key, 'oauth' uses OAuth 2.0 */
|
|
33
|
+
authMode: 'apiKey' | 'oauth';
|
|
34
|
+
/** Jira API key (required when authMode === 'apiKey') */
|
|
35
|
+
apiKey?: string;
|
|
36
|
+
/** Jira email associated with the API key (required when authMode === 'apiKey') */
|
|
37
|
+
email?: string;
|
|
38
|
+
/** OAuth 2.0 client ID (required when authMode === 'oauth') */
|
|
39
|
+
clientId?: string;
|
|
40
|
+
/** OAuth 2.0 redirect URI (required when authMode === 'oauth') */
|
|
41
|
+
redirectUri?: string;
|
|
42
|
+
/** OAuth 2.0 secrets */
|
|
43
|
+
secrets?: {
|
|
44
|
+
/** OAuth 2.0 client secret */
|
|
45
|
+
clientSecret?: string;
|
|
46
|
+
};
|
|
47
|
+
/** Jira domain name (e.g. "my-company" for my-company.atlassian.net) */
|
|
48
|
+
domain: string;
|
|
49
|
+
/** Atlassian Cloud ID. When set, API calls use https://api.atlassian.com/ex/jira/{cloudId}/... instead of https://{domain}.atlassian.net/... */
|
|
50
|
+
cloudId?: string;
|
|
51
|
+
/** Enable request indexing for semantic search */
|
|
52
|
+
indexRequests?: boolean;
|
|
53
|
+
/** Array of service desk IDs to index. If empty, all service desks are indexed. */
|
|
54
|
+
selectedServiceDeskIds?: Array<string>;
|
|
55
|
+
/** Number of days of request history to sync (default: 30) */
|
|
56
|
+
requestHistoryDays?: number;
|
|
57
|
+
}
|
|
58
|
+
export interface GenericSiteIngesterIntegrationConfiguration {
|
|
59
|
+
/** The ingestion mode. Only `'sitemap'` is implemented today. */
|
|
60
|
+
type: 'sitemap';
|
|
61
|
+
/** URL of the site's sitemap.xml, following the sitemaps.org protocol. */
|
|
62
|
+
sitemapUrl: string;
|
|
63
|
+
/**
|
|
64
|
+
* When true, pages are rendered in a headless browser before extraction, so client-side JavaScript
|
|
65
|
+
* (SPAs, content hydrated after page load) runs and appears in the ingested text. Slower and more
|
|
66
|
+
* resource-intensive per page than the default plain HTTP fetch, since each page launches a real
|
|
67
|
+
* browser and waits for its network activity to settle. Leave off for sites whose content is already
|
|
68
|
+
* present in the initial HTML (most server-rendered sites and docs/help centers).
|
|
69
|
+
*/
|
|
70
|
+
useBrowserRendering?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Comma-separated substrings; a sitemap URL is skipped entirely (never fetched or synced) if it
|
|
73
|
+
* contains any of them. Example: "/blog/draft-,?preview=,/staging/".
|
|
74
|
+
*/
|
|
75
|
+
excludeUrlPatterns?: string;
|
|
76
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { CollectionName } from '../../public-types/document.public-types';
|
|
2
|
+
import { CollectionSchemaApi } from '../../public-types/schema.public-types';
|
|
3
|
+
import { BaseIntegrationSchema } from './schemas';
|
|
4
|
+
type TableName = string;
|
|
5
|
+
type AssociationName = string;
|
|
6
|
+
/**
|
|
7
|
+
* API-boundary mirror of {@link IntegrationDataSchema} for OpenAPI-exposed
|
|
8
|
+
* controllers. See {@link CollectionSchemaApi} for the rationale.
|
|
9
|
+
*/
|
|
10
|
+
export interface IntegrationDataSchemaApi extends BaseIntegrationSchema {
|
|
11
|
+
collections: Record<TableName, CollectionSchemaApi>;
|
|
12
|
+
associations?: Record<AssociationName, AssociationSchema>;
|
|
13
|
+
storedProcedures?: Record<string, StoredProcedureSchema>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* API-boundary mirror of {@link DiscoverDataConnectionSchemaResponse}.
|
|
17
|
+
* See {@link IntegrationDataSchemaApi} for the rationale.
|
|
18
|
+
*/
|
|
19
|
+
export interface DiscoverDataConnectionSchemaResponseApi {
|
|
20
|
+
schema: IntegrationDataSchemaApi;
|
|
21
|
+
collectionReadiness: Record<CollectionName, CollectionReadiness>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* API-boundary mirror of {@link GenerateAiDescriptionsForDataSchemaResponse}.
|
|
25
|
+
* See {@link IntegrationDataSchemaApi} for the rationale.
|
|
26
|
+
*/
|
|
27
|
+
export interface GenerateAiDescriptionsForDataSchemaResponseApi {
|
|
28
|
+
schema: IntegrationDataSchemaApi;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* API-boundary mirror of {@link GenerateAiDescriptionsForAssociationsResponse}.
|
|
32
|
+
* See {@link IntegrationDataSchemaApi} for the rationale.
|
|
33
|
+
*/
|
|
34
|
+
export interface GenerateAiDescriptionsForAssociationsResponseApi {
|
|
35
|
+
schema: IntegrationDataSchemaApi;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* API-boundary mirror of {@link GenerateAiDescriptionsForStoredProceduresResponse}.
|
|
39
|
+
* See {@link IntegrationDataSchemaApi} for the rationale.
|
|
40
|
+
*/
|
|
41
|
+
export interface GenerateAiDescriptionsForStoredProceduresResponseApi {
|
|
42
|
+
schema: IntegrationDataSchemaApi;
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IntegrationType } from '../../public-types/integration.public-types';
|
|
2
|
+
export { isIntegrationDisabled } from '../../public-types/integration.public-types';
|
|
3
|
+
/** Returns whether an integration of [type] runs a query with a caller-supplied access token. */
|
|
4
|
+
export declare function supportsPerRequestAccessToken(type: IntegrationType): boolean;
|
|
5
|
+
/** Narrows a config to the integration types that accept a caller-supplied access token. */
|
|
6
|
+
export declare function isPerRequestAccessTokenIntegration(integration: IntegrationConfig): integration is IntegrationConfigTypes[(typeof PER_REQUEST_ACCESS_TOKEN_INTEGRATION_TYPES)[number]];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** Downloads a SharePoint staging sweep keeps in flight when the integration does not say. */
|
|
2
|
+
export declare const SHAREPOINT_DEFAULT_STAGING_CONCURRENCY = 10;
|
|
3
|
+
/** Most downloads a SharePoint staging sweep may keep in flight, so one integration cannot swamp Graph or core. */
|
|
4
|
+
export declare const SHAREPOINT_MAX_STAGING_CONCURRENCY = 50;
|
|
5
|
+
export interface SharePointStagingConfiguration {
|
|
6
|
+
/**
|
|
7
|
+
* Downloads a staging sweep keeps in flight, an integer from 1 to {@link SHAREPOINT_MAX_STAGING_CONCURRENCY};
|
|
8
|
+
* defaults to {@link SHAREPOINT_DEFAULT_STAGING_CONCURRENCY}.
|
|
9
|
+
*/
|
|
10
|
+
concurrency?: number;
|
|
11
|
+
/**
|
|
12
|
+
* When true, a sweep that stops on its budget with an index request still open is followed by another
|
|
13
|
+
* sweep at once, for as long as sweeps keep moving files, instead of waiting for the next scheduled tick.
|
|
14
|
+
*/
|
|
15
|
+
continuous?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface FileInDirectory {
|
|
18
|
+
filename: string;
|
|
19
|
+
absoluteFilePathInBucket: string;
|
|
20
|
+
size: number;
|
|
21
|
+
lastModified: Date;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Condition, DocIdCondition, SimpleCondition } from '../public-types/query.public-types';
|
|
2
|
+
/**
|
|
3
|
+
* Whether a LIKE pattern has a backslash before anything but `%`, `_` or another backslash, which is not
|
|
4
|
+
* a valid escape. Executors disagree on what it matches: PostgreSQL reads `\d` as `d`, while Mongo and
|
|
5
|
+
* the local matcher pass it to a regex as a digit.
|
|
6
|
+
*/
|
|
7
|
+
export declare function hasInvalidLikeEscape(pattern: string): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Generates the regex pattern, handling special characters as follows:
|
|
10
|
+
* - `_` is replaced with a `.`
|
|
11
|
+
* - `%` is replaced with `[\s\S]*`.
|
|
12
|
+
* - The above characters can be escaped with \, eg. `\_` is replaced with `_` and `\%` with `%`.
|
|
13
|
+
* - All special characters in regex (-, /, \, ^, $, *, +, ?, ., (, ), |, [, ], {, }) get escaped with \
|
|
14
|
+
*
|
|
15
|
+
* Exported for testing purposes.
|
|
16
|
+
* */
|
|
17
|
+
export declare function replaceSpecialCharacters(input: string): string;
|
|
18
|
+
/** Returns true if the condition is a 'SimpleCondition' or false otherwise. */
|
|
19
|
+
export declare function isSimpleCondition(condition: Condition): condition is SimpleCondition;
|
|
20
|
+
/** Returns true if the condition is a 'DocIdCondition' or false otherwise. */
|
|
21
|
+
export declare function isDocIdCondition(condition: Condition): condition is DocIdCondition;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ApiKeyEntry } from '../public-types/secret.public-types';
|
|
2
|
+
export declare const BACKEND_API_KEY = "_BACKEND_API_KEY";
|
|
3
|
+
export declare const APP_API_KEY = "APP_API_KEY";
|
|
4
|
+
export declare const AGENT_API_HEADER = "x-squid-agent-api-key";
|
|
5
|
+
export interface AgentSecrets {
|
|
6
|
+
apiKey: ApiKeyEntry | undefined;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/** Splits a field path into the segments `getInPath` walks: a dot or a bracket separates them. */
|
|
2
|
+
export declare const SPLIT_REGEX_FOR_GET_IN_PATH: RegExp;
|
|
3
|
+
/** Returns a value by the `path`. Works with array indexes, like a.b[0]. */
|
|
4
|
+
export declare function getInPath(obj: unknown, path: string): any;
|
|
5
|
+
export declare function isDateObject(value: unknown): value is Date;
|
|
6
|
+
/** Sets a value by path . Does not support array indexes. */
|
|
7
|
+
export declare function setInPath(obj: object, path: string, value: unknown, delimiter?: string): void;
|
|
8
|
+
export declare function deleteInPath(obj: object, path: string, delimiter?: string): void;
|
|
9
|
+
export declare function replaceKeyInMap<K, T>(map: Map<K, T | undefined>, a: K, b: K): void;
|
|
10
|
+
export declare function replaceKeyInRecord<K extends keyof any, T>(record: Record<K, T>, a: K, b: K): void;
|
|
11
|
+
export declare function isNil(obj: unknown): obj is null | undefined;
|
|
12
|
+
export declare function isEqual(a: unknown, b: unknown): boolean;
|
|
13
|
+
export declare function isEmpty(a: unknown): boolean;
|
|
14
|
+
export declare function omit<T extends object, K extends PropertyKey[]>(object: T | null | undefined, ...fieldsToRemove: K): Pick<T, Exclude<keyof T, K[number]>>;
|
|
15
|
+
export type CloneCustomizer = (value: unknown) => unknown | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Creates a deep copy of the specified object, including all nested objects and specifically handling Date, Map, and
|
|
18
|
+
* Set fields.
|
|
19
|
+
*
|
|
20
|
+
* The customizer function can modify the cloning process for the object and its fields. If the customizer
|
|
21
|
+
* returns 'undefined' for any input, the function falls back to the standard cloning logic.
|
|
22
|
+
*
|
|
23
|
+
* The cloning process is recursive, ensuring deep cloning of all objects.
|
|
24
|
+
*
|
|
25
|
+
* Note: This function does not support cloning objects with circular dependencies and will throw a system stack
|
|
26
|
+
* overflow error if encountered.
|
|
27
|
+
*/
|
|
28
|
+
export declare function cloneDeep<R = unknown>(value: R, customizer?: CloneCustomizer): R;
|
|
29
|
+
/** Creates a shallow clone of the object. */
|
|
30
|
+
export declare function cloneShallow<T>(value: T): T;
|
|
31
|
+
export declare function deepMerge<T extends object, U extends object>(target: T, source: U): T & U;
|
|
32
|
+
/** Returns true if the `value` is a defined object and is not an array. */
|
|
33
|
+
export declare function isPlainObject(value: unknown): value is object;
|
|
34
|
+
/** Compares 2 values. 'null' and 'undefined' values are considered equal and are less than any other values. */
|
|
35
|
+
export declare function compareValues(v1: unknown, v2: unknown): number;
|
|
36
|
+
/** Returns a new object with all top-level object fields re-mapped using `valueMapperFn`. */
|
|
37
|
+
export declare function mapValues<ResultType extends object = Record<string, unknown>, InputType extends Record<string, unknown> = Record<string, unknown>>(obj: InputType, valueMapperFn: (value: any, key: keyof InputType, obj: InputType) => unknown): ResultType;
|
|
38
|
+
/** Groups elements of the array by key. See _.groupBy for details. */
|
|
39
|
+
export declare function groupBy<T, K extends PropertyKey>(array: T[], getKey: (item: T) => K): Record<K, T[]>;
|
|
40
|
+
/**
|
|
41
|
+
* Picks selected fields from the object and returns a new object with the fields selected.
|
|
42
|
+
* The selected fields are assigned by reference (there is no cloning).
|
|
43
|
+
*/
|
|
44
|
+
export declare function pick<T extends object, K extends keyof T>(obj: T, keys: ReadonlyArray<K>): Pick<T, K>;
|
|
45
|
+
/** Inverts the record: swaps keys and values. */
|
|
46
|
+
export declare function invert<K extends string | number, V extends string | number>(record: Record<K, V>): Record<V, K>;
|
|
47
|
+
/**
|
|
48
|
+
* Creates an array of numbers (positive and/or negative) progressing from start up to, but not including, end.
|
|
49
|
+
* If end is less than start a zero-length range is created unless a negative step is specified.
|
|
50
|
+
*
|
|
51
|
+
* Same as lodash range but with an additional parameter: `maximumNumberOfItems`.
|
|
52
|
+
*/
|
|
53
|
+
export declare function range(start: number, end: number, step: number, maximumNumberOfItems?: number): number[];
|
|
54
|
+
/** Returns count of top level properties in object. */
|
|
55
|
+
export declare function countObjectKeys(obj: object | undefined | null): number;
|
|
56
|
+
/** Returns object entries sorted by name. */
|
|
57
|
+
export declare function getSortedEntries<T>(record: Record<string, T>): Array<[string, T]>;
|
|
58
|
+
/** Removes top level fields which are empty objects. May be used for value formatting. */
|
|
59
|
+
export declare function removeEmptyTopLevelRecords<T extends object>(record: T): Partial<T>;
|
|
60
|
+
export declare function removeUndefinedValues<V>(tags: Record<string, V | undefined>): Record<string, V>;
|
|
61
|
+
export declare function extractKey(line: string | undefined): string | null;
|
|
62
|
+
/** Represents a line in a diff output */
|
|
63
|
+
export interface DiffLine {
|
|
64
|
+
lineNumber: number;
|
|
65
|
+
text: string;
|
|
66
|
+
type: 'unchanged' | 'added' | 'removed' | 'changed';
|
|
67
|
+
}
|
|
68
|
+
/** Result of computing a line-by-line diff between two objects */
|
|
69
|
+
export interface DiffResult {
|
|
70
|
+
leftLines: Array<DiffLine>;
|
|
71
|
+
rightLines: Array<DiffLine>;
|
|
72
|
+
hasChanges: boolean;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Computes a line-by-line diff between two objects.
|
|
76
|
+
* Objects are serialized to JSON with sorted keys for consistent comparison.
|
|
77
|
+
* @param before The previous/left object (can be undefined for new objects)
|
|
78
|
+
* @param after The current/right object
|
|
79
|
+
* @returns DiffResult with left and right lines and whether there are changes
|
|
80
|
+
*/
|
|
81
|
+
export declare function computeObjectDiff(before: unknown, after: unknown): DiffResult;
|
|
82
|
+
/**
|
|
83
|
+
* Formats an object as diff lines (all unchanged).
|
|
84
|
+
* Useful for displaying a single object without comparison.
|
|
85
|
+
* @param obj The object to format
|
|
86
|
+
* @returns Array of DiffLine with all lines marked as unchanged
|
|
87
|
+
*/
|
|
88
|
+
export declare function formatObjectAsLines(obj: unknown): Array<DiffLine>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare function sortKeys(json: unknown): any;
|
|
2
|
+
export declare function normalizeJsonAsString(json: unknown): string;
|
|
3
|
+
export declare function serializeObj(obj: unknown): string;
|
|
4
|
+
/**
|
|
5
|
+
* A `JSON.stringify` replacer writing a `Date` as `{ $date }`, the form {@link deserializeObj} reads back,
|
|
6
|
+
* for callers that keep every other value's own `toJSON`. The date is read off the holder, since a
|
|
7
|
+
* replacer is handed the `toJSON` text of a date; an invalid date keeps that text, `null`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function writeDateAsBson(this: Record<string, unknown>, key: string, value: unknown): unknown;
|
|
10
|
+
export declare function deserializeObj<T = any>(str: string): T;
|
|
11
|
+
/**
|
|
12
|
+
* Deserializes a multipart request payload when present.
|
|
13
|
+
* NestJS does not pull the body out of a multipart request, and leaves the JSON payload in its `body` form field;
|
|
14
|
+
* plain JSON requests carry the payload as-is.
|
|
15
|
+
*/
|
|
16
|
+
export declare function deserializeMultipartBody<T>(request: T): T;
|
|
17
|
+
export declare function encodeValueForMapping(value: unknown): string;
|
|
18
|
+
export declare function decodeValueForMapping(encodedString: string): any;
|
|
19
|
+
/**
|
|
20
|
+
* Compares 2 objects by their normalized JSON value.
|
|
21
|
+
* This function should not be used with objects with circular references.
|
|
22
|
+
* Returns true if the object are equal.
|
|
23
|
+
*/
|
|
24
|
+
export declare function compareByNormalizedJsonValue<T>(v1: T | undefined, v2: T | undefined): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Compares 2 objects by their normalized JSON value for specific fields only.
|
|
27
|
+
* This function should not be used with objects with circular references.
|
|
28
|
+
* Returns true if the specified fields are equal.
|
|
29
|
+
*/
|
|
30
|
+
export declare function compareByNormalizedJsonValueForFields<T>(v1: T | undefined, v2: T | undefined, fields: Array<keyof T>): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squidcloud/freshdesk-client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.498",
|
|
4
4
|
"description": "Squid Freshdesk Client - SDK for interacting with the Freshdesk connector",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/freshdesk-client/src/index.d.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"license": "ISC",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"assertic": "^1.3.0",
|
|
26
|
-
"@squidcloud/client": "^1.0.
|
|
26
|
+
"@squidcloud/client": "^1.0.498"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
29
|
"node": ">=20.0.0"
|