@squidcloud/teams-client 1.0.418
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/teams/common/src/teams-types.d.ts +54 -0
- package/dist/connectors/teams/teams-client/src/index.d.ts +2 -0
- package/dist/connectors/teams/teams-client/src/teams-client.d.ts +25 -0
- package/dist/index.js +1 -0
- package/dist/internal-common/src/public-types/communication.public-types.d.ts +30 -0
- package/dist/node_modules/json-schema-typed/draft-2020-12.d.ts +1239 -0
- package/package.json +27 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { IntegrationId } from '../../../../internal-common/src/public-types/communication.public-types';
|
|
2
|
+
/** Teams conversation/channel ID */
|
|
3
|
+
export type ConversationId = string;
|
|
4
|
+
/** Teams team ID */
|
|
5
|
+
export type TeamId = string;
|
|
6
|
+
/** Page size for pagination and batching operations */
|
|
7
|
+
export declare const PAGE_SIZE = 50;
|
|
8
|
+
/** List of conversation types. */
|
|
9
|
+
export declare const RECIPIENT_TYPES: readonly ["team", "channel", "chat", "user"];
|
|
10
|
+
/** Types of conversations in Teams. */
|
|
11
|
+
export type RecipientType = (typeof RECIPIENT_TYPES)[number];
|
|
12
|
+
/**
|
|
13
|
+
* Teams user profile object.
|
|
14
|
+
*/
|
|
15
|
+
export interface TeamsUser {
|
|
16
|
+
id: string;
|
|
17
|
+
displayName?: string;
|
|
18
|
+
userPrincipalName?: string;
|
|
19
|
+
mail?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Request to search for messages related to a given prompt.
|
|
23
|
+
*/
|
|
24
|
+
export interface SearchTeamsMessagesRequest {
|
|
25
|
+
/** The search query */
|
|
26
|
+
prompt: string;
|
|
27
|
+
/** Which Teams integration instance to search. */
|
|
28
|
+
integrationId: IntegrationId;
|
|
29
|
+
/** Restrict the search to the given team names, comma-separated. */
|
|
30
|
+
teamNames?: string;
|
|
31
|
+
/** Restrict the search to the given channel names, comma-separated. */
|
|
32
|
+
channelNames?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Message search result chunk.
|
|
36
|
+
*/
|
|
37
|
+
export interface SearchTeamsMessagesResultChunk {
|
|
38
|
+
/**
|
|
39
|
+
* Conversation messages.
|
|
40
|
+
* Contains an arbitrary subset of messages in sequential & chronological order, where the
|
|
41
|
+
* matching messages are contained within the subset.
|
|
42
|
+
*/
|
|
43
|
+
messages: string;
|
|
44
|
+
/** Team name the messages came from. */
|
|
45
|
+
teamName?: string;
|
|
46
|
+
/** Channel/conversation name the messages came from. */
|
|
47
|
+
channelName?: string;
|
|
48
|
+
/** Conversation Type. */
|
|
49
|
+
conversationType?: RecipientType;
|
|
50
|
+
/** Thread ID if these messages are part of a thread. */
|
|
51
|
+
threadId?: string;
|
|
52
|
+
/** The day date (in UTC) that the conversation took place. */
|
|
53
|
+
timestamp?: Date;
|
|
54
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Squid } from '@squidcloud/client';
|
|
2
|
+
import { SearchTeamsMessagesRequest, SearchTeamsMessagesResultChunk } from '../../common/src/teams-types';
|
|
3
|
+
/**
|
|
4
|
+
* Client for interacting with the Microsoft Teams connector.
|
|
5
|
+
*/
|
|
6
|
+
export declare class SquidTeamsClient {
|
|
7
|
+
private readonly squid;
|
|
8
|
+
private readonly integrationId;
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new Teams client instance.
|
|
11
|
+
*
|
|
12
|
+
* @param squid - Squid client instance. Provide an instance that includes the Squid API key.
|
|
13
|
+
* @param integrationId - The ID of the Teams integration in the Squid console
|
|
14
|
+
*/
|
|
15
|
+
constructor(squid: Squid, integrationId: string);
|
|
16
|
+
/**
|
|
17
|
+
* Search for messages related to the given prompt query string.
|
|
18
|
+
*
|
|
19
|
+
* The provided `squid` instance requires your Squid API key to use this function.
|
|
20
|
+
*
|
|
21
|
+
* @param request Request parameters for searching within a Teams integration instance.
|
|
22
|
+
* @returns Array of chunks of messages that contain messages related to the query.
|
|
23
|
+
*/
|
|
24
|
+
searchMessages(request: Omit<SearchTeamsMessagesRequest, 'integrationId'>): Promise<SearchTeamsMessagesResultChunk[]>;
|
|
25
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var e={d:(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{PAGE_SIZE:()=>r,RECIPIENT_TYPES:()=>o,SquidTeamsClient:()=>s});const r=50,o=["team","channel","chat","user"];class s{constructor(e,t){this.squid=e,this.integrationId=t}async searchMessages(e){const t={...e,integrationId:this.integrationId};return this.squid.executeFunction("searchMessagesInTeams",t)}}var n=exports;for(var a in t)n[a]=t[a];t.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** A type alias for an application id. */
|
|
2
|
+
export type AppId = string;
|
|
3
|
+
/** A tuple of environment identifiers like 'dev' or 'prod'. */
|
|
4
|
+
export declare const ENVIRONMENT_IDS: readonly ["dev", "prod"];
|
|
5
|
+
/** A type representing valid environment identifiers derived from ENVIRONMENT_IDS. */
|
|
6
|
+
export type EnvironmentId = (typeof ENVIRONMENT_IDS)[number];
|
|
7
|
+
/** A type alias for a squid developer identifier. */
|
|
8
|
+
export type SquidDeveloperId = string;
|
|
9
|
+
/** A type alias for an integration id. */
|
|
10
|
+
export type IntegrationId = string;
|
|
11
|
+
/** A type alias for a client identifier. */
|
|
12
|
+
export type ClientId = string;
|
|
13
|
+
/** A type alias for a squid document identifier. */
|
|
14
|
+
export type SquidDocId = string;
|
|
15
|
+
/** A type alias for a client request identifier. */
|
|
16
|
+
export type ClientRequestId = string;
|
|
17
|
+
/** ID of AI agent. Also known as AI profile id. */
|
|
18
|
+
export type AiAgentId = string;
|
|
19
|
+
/** App-level ID of AI Knowledge Base */
|
|
20
|
+
export type AiKnowledgeBaseId = string;
|
|
21
|
+
/**
|
|
22
|
+
* The built-in agent id. Cannot be customized.
|
|
23
|
+
* @category AI
|
|
24
|
+
*/
|
|
25
|
+
export declare const BUILT_IN_AGENT_ID = "built_in_agent";
|
|
26
|
+
/**
|
|
27
|
+
* A type alias for an AI context identifier.
|
|
28
|
+
* @category AI
|
|
29
|
+
*/
|
|
30
|
+
export type AiContextId = string;
|