@prisme.ai/sdk 0.0.2 → 1.0.1
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/Readme.md +3 -1
- package/dist/lib/api.d.ts +113 -32
- package/dist/lib/endpoints/users.d.ts +9 -0
- package/dist/lib/endpoints/workspaces.d.ts +9 -0
- package/dist/lib/endpoints/workspacesVersions.d.ts +10 -0
- package/dist/lib/events.d.ts +28 -4
- package/dist/lib/fetcher.d.ts +14 -2
- package/dist/lib/types.d.ts +5 -1
- package/dist/sdk/lib/api.js +490 -87
- package/dist/sdk/lib/endpoints/users.js +43 -0
- package/dist/sdk/lib/endpoints/workspaces.js +23 -0
- package/dist/sdk/lib/endpoints/workspacesVersions.js +40 -0
- package/dist/sdk/lib/events.js +86 -9
- package/dist/sdk/lib/fetcher.js +75 -21
- package/lib/api.test.ts +610 -69
- package/lib/api.ts +556 -124
- package/lib/endpoints/users.ts +22 -0
- package/lib/endpoints/workspaces.ts +18 -0
- package/lib/endpoints/workspacesVersions.ts +34 -0
- package/lib/events.test.ts +39 -7
- package/lib/events.ts +127 -16
- package/lib/fetcher.test.ts +59 -13
- package/lib/fetcher.ts +89 -23
- package/lib/types.ts +5 -1
- package/package.json +2 -1
package/Readme.md
CHANGED
|
@@ -16,7 +16,9 @@ You can set a different host by instantiating the Api class:
|
|
|
16
16
|
|
|
17
17
|
```
|
|
18
18
|
import { Api } from '@prisme.ai/sdk';
|
|
19
|
-
const api = new Api(
|
|
19
|
+
const api = new Api({
|
|
20
|
+
host: 'https://my.custom.host'
|
|
21
|
+
})
|
|
20
22
|
```
|
|
21
23
|
|
|
22
24
|
You are able to call un authentified methods like signin or signup, but you'll need a valid token to call the other. Just set its property:
|
package/dist/lib/api.d.ts
CHANGED
|
@@ -1,59 +1,140 @@
|
|
|
1
|
-
import Fetcher from './fetcher';
|
|
1
|
+
import Fetcher, { Fetched } from './fetcher';
|
|
2
2
|
import { Event, Workspace } from './types';
|
|
3
3
|
import { Events } from './events';
|
|
4
|
-
|
|
4
|
+
import WorkspacesEndpoint from './endpoints/workspaces';
|
|
5
|
+
import UsersEndpoint from './endpoints/users';
|
|
6
|
+
export type UserPermissions = {
|
|
7
|
+
permissions: Prismeai.UserPermissions['permissions'];
|
|
8
|
+
target: {
|
|
9
|
+
id?: string;
|
|
10
|
+
email?: string;
|
|
11
|
+
public?: boolean;
|
|
12
|
+
role?: string;
|
|
13
|
+
displayName?: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export interface ApiOptions {
|
|
17
|
+
host: string;
|
|
18
|
+
oidc?: {
|
|
19
|
+
url: string;
|
|
20
|
+
clientId: string;
|
|
21
|
+
clientIdHeader?: string;
|
|
22
|
+
redirectUri: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export interface AccessToken {
|
|
26
|
+
access_token: string;
|
|
27
|
+
id_token: string;
|
|
28
|
+
scope: string;
|
|
29
|
+
expiresIn: number;
|
|
30
|
+
token_type: 'Bearer';
|
|
31
|
+
}
|
|
32
|
+
export interface InteractiveSignin {
|
|
33
|
+
interaction: string;
|
|
34
|
+
login: string;
|
|
35
|
+
password: string;
|
|
36
|
+
remember?: boolean;
|
|
37
|
+
}
|
|
5
38
|
export declare class Api extends Fetcher {
|
|
39
|
+
opts: Required<ApiOptions>;
|
|
40
|
+
private sessionId?;
|
|
41
|
+
private _user?;
|
|
42
|
+
constructor(opts: ApiOptions);
|
|
43
|
+
get user(): (Prismeai.User & {
|
|
44
|
+
sessionId?: string | undefined;
|
|
45
|
+
}) | undefined;
|
|
6
46
|
me(): Promise<any>;
|
|
7
|
-
|
|
47
|
+
clientId(): string;
|
|
48
|
+
getAuthorizationURL(overrideRedirectUri?: string, authParams?: {
|
|
49
|
+
max_age?: string;
|
|
50
|
+
acr_values?: string;
|
|
51
|
+
}, locale?: string | undefined): Promise<{
|
|
52
|
+
url: string;
|
|
53
|
+
codeVerifier: string;
|
|
54
|
+
clientId: string;
|
|
55
|
+
}>;
|
|
56
|
+
signin(body: InteractiveSignin): Promise<{
|
|
57
|
+
redirectTo: string;
|
|
58
|
+
}>;
|
|
59
|
+
getToken(authorizationCode: string, codeVerifier: string, overrideRedirectUri?: string): Promise<AccessToken>;
|
|
60
|
+
createAnonymousSession(): Promise<Prismeai.User & {
|
|
8
61
|
token: string;
|
|
9
62
|
}>;
|
|
10
|
-
signup(email: string, password: string, firstName: string, lastName: string): Promise<Prismeai.User & {
|
|
63
|
+
signup(email: string, password: string, firstName: string, lastName: string, language: string): Promise<Prismeai.User & {
|
|
11
64
|
token: string;
|
|
12
65
|
}>;
|
|
13
|
-
|
|
66
|
+
getSignoutURL(redirectUri?: string): string;
|
|
67
|
+
sendValidationMail(email: string, language: string): Promise<unknown>;
|
|
68
|
+
validateMail(token: string): Promise<unknown>;
|
|
69
|
+
sendPasswordResetMail(email: string, language: string): Promise<unknown>;
|
|
70
|
+
passwordReset(token: string, password: string): Promise<unknown>;
|
|
14
71
|
getWorkspaces(): Promise<Workspace[]>;
|
|
15
|
-
getWorkspace(id: string): Promise<
|
|
72
|
+
getWorkspace(id: string): Promise<PrismeaiAPI.GetWorkspace.Responses.$200>;
|
|
73
|
+
getWorkspaceSecurity(id: string): Promise<PrismeaiAPI.GetSecurity.Responses.$200>;
|
|
74
|
+
updateWorkspaceSecurity(workspaceId: string, security: Prismeai.WorkspaceSecurity): Promise<Fetched<PrismeaiAPI.UpdateSecurity.Responses.$200>>;
|
|
75
|
+
getWorkspaceRoles(id: string): Promise<Fetched<PrismeaiAPI.GetRoles.Responses.$200>>;
|
|
16
76
|
createWorkspace(name: string): Promise<Workspace>;
|
|
17
|
-
|
|
77
|
+
duplicateWorkspace({ id }: {
|
|
78
|
+
id: string;
|
|
79
|
+
}): Promise<Workspace | null>;
|
|
80
|
+
updateWorkspace(workspace: Prismeai.DSULPatch): Promise<Fetched<PrismeaiAPI.UpdateWorkspace.Responses.$200> | null>;
|
|
18
81
|
deleteWorkspace(workspaceId: Workspace['id']): Promise<Workspace>;
|
|
19
|
-
|
|
82
|
+
generateApiKey(workspaceId: Workspace['id'], events: string[], uploads?: string[]): Promise<string>;
|
|
83
|
+
updateApiKey(workspaceId: Workspace['id'], apiKey: string, events: string[], uploads?: string[]): Promise<string>;
|
|
84
|
+
getAutomation(workspaceId: string, automationSlug: string): Promise<Fetched<PrismeaiAPI.GetAutomation.Responses.$200>>;
|
|
85
|
+
createAutomation(workspaceId: Workspace['id'], automation: Prismeai.Automation): Promise<Fetched<Prismeai.Automation & {
|
|
20
86
|
slug: string;
|
|
21
|
-
}
|
|
22
|
-
updateAutomation(
|
|
87
|
+
}>>;
|
|
88
|
+
updateAutomation(workspaceId: string, slug: string, automation: Prismeai.Automation): Promise<Fetched<Prismeai.Automation & {
|
|
23
89
|
slug: string;
|
|
24
|
-
}
|
|
25
|
-
deleteAutomation(
|
|
90
|
+
}>>;
|
|
91
|
+
deleteAutomation(workspaceId: string, slug: string): Promise<string>;
|
|
26
92
|
getPages(workspaceId: NonNullable<Workspace['id']>): Promise<Prismeai.Page[]>;
|
|
27
|
-
getPage(workspaceId: PrismeaiAPI.GetPage.Parameters.WorkspaceId,
|
|
28
|
-
getPageBySlug(pageSlug: PrismeaiAPI.GetPageBySlug.Parameters.
|
|
29
|
-
createPage(workspaceId:
|
|
30
|
-
updatePage(workspaceId:
|
|
31
|
-
deletePage(workspaceId:
|
|
32
|
-
streamEvents(workspaceId: string): Promise<Events>;
|
|
33
|
-
getEvents(workspaceId: string, options?:
|
|
34
|
-
beforeDate?: Date | string;
|
|
35
|
-
}): Promise<Event<Date>[]>;
|
|
93
|
+
getPage(workspaceId: PrismeaiAPI.GetPage.Parameters.WorkspaceId, pageSlug: PrismeaiAPI.GetPage.Parameters.Slug): Promise<Fetched<Prismeai.DetailedPage>>;
|
|
94
|
+
getPageBySlug(workspaceSlug: PrismeaiAPI.GetPageBySlug.Parameters.WorkspaceSlug, pageSlug: PrismeaiAPI.GetPageBySlug.Parameters.PageSlug): Promise<Fetched<Prismeai.DetailedPage>>;
|
|
95
|
+
createPage(workspaceId: PrismeaiAPI.CreatePage.Parameters.WorkspaceId, page: PrismeaiAPI.CreatePage.RequestBody): Promise<Prismeai.Page>;
|
|
96
|
+
updatePage(workspaceId: PrismeaiAPI.UpdatePage.Parameters.WorkspaceId, page: PrismeaiAPI.UpdatePage.RequestBody, prevSlug?: PrismeaiAPI.DeletePage.Parameters.Slug): Promise<Prismeai.Page>;
|
|
97
|
+
deletePage(workspaceId: PrismeaiAPI.DeletePage.Parameters.WorkspaceId, pageSlug: PrismeaiAPI.DeletePage.Parameters.Slug): Promise<Fetched<PrismeaiAPI.DeletePage.Responses.$200>>;
|
|
98
|
+
streamEvents(workspaceId: string, filters?: Record<string, any>): Promise<Events>;
|
|
99
|
+
getEvents(workspaceId: string, options?: Record<string, any>): Promise<Event<Date>[]>;
|
|
36
100
|
postEvents(workspaceId: PrismeaiAPI.SendWorkspaceEvent.Parameters.WorkspaceId, events: PrismeaiAPI.SendWorkspaceEvent.RequestBody['events']): Promise<boolean>;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
101
|
+
findContacts(query: PrismeaiAPI.FindContacts.RequestBody): Promise<PrismeaiAPI.FindContacts.Responses.$200>;
|
|
102
|
+
getPermissions(subjectType: PrismeaiAPI.GetPermissions.Parameters.SubjectType, subjectId: string): Promise<{
|
|
103
|
+
result: UserPermissions[];
|
|
104
|
+
}>;
|
|
105
|
+
addPermissions(subjectType: PrismeaiAPI.GetPermissions.Parameters.SubjectType, subjectId: string, permissions: UserPermissions): Promise<UserPermissions>;
|
|
106
|
+
deletePermissions(subjectType: PrismeaiAPI.GetPermissions.Parameters.SubjectType, subjectId: string, id: string): Promise<Fetched<PrismeaiAPI.RevokePermissions.Responses.$200>>;
|
|
40
107
|
getApps({ query, page, limit, workspaceId, }: {
|
|
41
108
|
query?: PrismeaiAPI.SearchApps.QueryParameters['text'];
|
|
42
109
|
page?: PrismeaiAPI.SearchApps.QueryParameters['page'];
|
|
43
110
|
limit?: PrismeaiAPI.SearchApps.QueryParameters['limit'];
|
|
44
111
|
workspaceId?: PrismeaiAPI.SearchApps.QueryParameters['workspaceId'];
|
|
45
|
-
}): Promise<PrismeaiAPI.SearchApps.Responses.$200
|
|
46
|
-
installApp(workspaceId: PrismeaiAPI.InstallAppInstance.PathParameters['workspaceId'], body: PrismeaiAPI.InstallAppInstance.RequestBody): Promise<PrismeaiAPI.InstallAppInstance.Responses.$200
|
|
47
|
-
updateApp(workspaceId: PrismeaiAPI.ConfigureAppInstance.PathParameters['workspaceId'], slug: PrismeaiAPI.ConfigureAppInstance.PathParameters['slug'], body: PrismeaiAPI.ConfigureAppInstance.RequestBody): Promise<PrismeaiAPI.ConfigureAppInstance.Responses.$200
|
|
48
|
-
uninstallApp(workspaceId: PrismeaiAPI.UninstallAppInstance.PathParameters['workspaceId'], slug: PrismeaiAPI.ConfigureAppInstance.PathParameters['slug']): Promise<PrismeaiAPI.UninstallAppInstance.Responses.$200
|
|
49
|
-
publishApp(body: PrismeaiAPI.PublishApp.RequestBody): Promise<PrismeaiAPI.PublishApp.Responses.$200
|
|
50
|
-
listAppInstances(workspaceId: PrismeaiAPI.ListAppInstances.PathParameters['workspaceId']): Promise<PrismeaiAPI.ListAppInstances.Responses.$200
|
|
51
|
-
fetchImports(workspaceId: PrismeaiAPI.ListAppInstances.Parameters.WorkspaceId): Promise<PrismeaiAPI.ListAppInstances.Responses.$200>;
|
|
112
|
+
}): Promise<Fetched<PrismeaiAPI.SearchApps.Responses.$200>>;
|
|
113
|
+
installApp(workspaceId: PrismeaiAPI.InstallAppInstance.PathParameters['workspaceId'], body: PrismeaiAPI.InstallAppInstance.RequestBody): Promise<Fetched<PrismeaiAPI.InstallAppInstance.Responses.$200>>;
|
|
114
|
+
updateApp(workspaceId: PrismeaiAPI.ConfigureAppInstance.PathParameters['workspaceId'], slug: PrismeaiAPI.ConfigureAppInstance.PathParameters['slug'], body: PrismeaiAPI.ConfigureAppInstance.RequestBody): Promise<Fetched<PrismeaiAPI.ConfigureAppInstance.Responses.$200>>;
|
|
115
|
+
uninstallApp(workspaceId: PrismeaiAPI.UninstallAppInstance.PathParameters['workspaceId'], slug: PrismeaiAPI.ConfigureAppInstance.PathParameters['slug']): Promise<Fetched<PrismeaiAPI.UninstallAppInstance.Responses.$200>>;
|
|
116
|
+
publishApp(body: PrismeaiAPI.PublishApp.RequestBody): Promise<Fetched<PrismeaiAPI.PublishApp.Responses.$200>>;
|
|
117
|
+
listAppInstances(workspaceId: PrismeaiAPI.ListAppInstances.PathParameters['workspaceId']): Promise<Fetched<PrismeaiAPI.ListAppInstances.Responses.$200>>;
|
|
52
118
|
getAppConfig<T>(workspaceId: PrismeaiAPI.GetAppInstanceConfig.Parameters.WorkspaceId, slug: PrismeaiAPI.GetAppInstanceConfig.Parameters.Slug): Promise<T>;
|
|
53
119
|
updateAppConfig(workspaceId: PrismeaiAPI.UpdateAppInstanceConfig.Parameters.WorkspaceId, slug: PrismeaiAPI.UpdateAppInstanceConfig.Parameters.Slug, config: any): Promise<PrismeaiAPI.UpdateAppInstanceConfig.Responses.$200['config']>;
|
|
120
|
+
getAppInstance(workspaceId: string, slug: string): Promise<Fetched<PrismeaiAPI.GetAppInstance.Responses.$200>>;
|
|
121
|
+
saveAppInstance(workspaceId: PrismeaiAPI.ConfigureAppInstance.Parameters.WorkspaceId, slug: PrismeaiAPI.ConfigureAppInstance.Parameters.Slug, appInstance: PrismeaiAPI.ConfigureAppInstance.RequestBody): Promise<Fetched<PrismeaiAPI.ConfigureAppInstance.Responses.$200>>;
|
|
54
122
|
uploadFiles(files: string | string[], workspaceId: string): Promise<PrismeaiAPI.UploadFile.Responses.$200>;
|
|
55
123
|
replaceAllImagesData(original: any, workspaceId: string): Promise<any>;
|
|
56
|
-
callAutomation(workspaceId: string, automation: string): Promise<any
|
|
124
|
+
callAutomation(workspaceId: string, automation: string, params?: any): Promise<Fetched<any>>;
|
|
125
|
+
testAutomation({ workspaceId, automation, payload, }: {
|
|
126
|
+
workspaceId: string;
|
|
127
|
+
automation: string;
|
|
128
|
+
payload?: Record<string, any>;
|
|
129
|
+
}): Promise<Fetched<any>>;
|
|
130
|
+
getWorkspaceUsage(workspaceId: PrismeaiAPI.WorkspaceUsage.Parameters.WorkspaceId, { afterDate, beforeDate, details, }?: {
|
|
131
|
+
afterDate?: PrismeaiAPI.WorkspaceUsage.Parameters.AfterDate;
|
|
132
|
+
beforeDate?: PrismeaiAPI.WorkspaceUsage.Parameters.BeforeDate;
|
|
133
|
+
details?: PrismeaiAPI.WorkspaceUsage.Parameters.Details;
|
|
134
|
+
}): Promise<Fetched<PrismeaiAPI.WorkspaceUsage.Responses.$200>>;
|
|
135
|
+
importArchive(archive: File): Promise<PrismeaiAPI.ImportNewWorkspace.Responses.$200>;
|
|
136
|
+
users(id?: string): UsersEndpoint;
|
|
137
|
+
workspaces(id: string): WorkspacesEndpoint;
|
|
57
138
|
}
|
|
58
139
|
declare const _default: Api;
|
|
59
140
|
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Api } from '../api';
|
|
2
|
+
import WorkspacesVersionsEndpoint from './workspacesVersions';
|
|
3
|
+
export declare class WorkspacesEndpoint {
|
|
4
|
+
private id;
|
|
5
|
+
private api;
|
|
6
|
+
constructor(id: string, api: Api);
|
|
7
|
+
get versions(): WorkspacesVersionsEndpoint;
|
|
8
|
+
}
|
|
9
|
+
export default WorkspacesEndpoint;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Api } from '../api';
|
|
2
|
+
export declare class WorkspacesVersionsEndpoint {
|
|
3
|
+
private workspaceId;
|
|
4
|
+
private api;
|
|
5
|
+
constructor(workspaceId: string, api: Api);
|
|
6
|
+
create(version?: PrismeaiAPI.PublishWorkspaceVersion.RequestBody): void;
|
|
7
|
+
rollback(versionId: PrismeaiAPI.RollbackWorkspaceVersion.PathParameters['versionId']): void;
|
|
8
|
+
export(version?: PrismeaiAPI.ExportWorkspaceVersion.Parameters.VersionId): Promise<Blob>;
|
|
9
|
+
}
|
|
10
|
+
export default WorkspacesVersionsEndpoint;
|
package/dist/lib/events.d.ts
CHANGED
|
@@ -1,14 +1,38 @@
|
|
|
1
1
|
import { Socket } from 'socket.io-client';
|
|
2
|
+
import { Api } from './api';
|
|
3
|
+
export type PayloadQuery = Record<string, string | string[]>;
|
|
4
|
+
export type OrQuery = PayloadQuery[];
|
|
5
|
+
export type SearchOptions = Omit<PrismeaiAPI.EventsLongpolling.QueryParameters, 'query' | 'types'> & {
|
|
6
|
+
payloadQuery?: PayloadQuery | OrQuery;
|
|
7
|
+
types?: string[];
|
|
8
|
+
};
|
|
2
9
|
export declare class Events {
|
|
3
10
|
protected client: Socket;
|
|
4
11
|
workspaceId: string;
|
|
5
|
-
|
|
12
|
+
private filters;
|
|
13
|
+
private listenedUserTopics;
|
|
14
|
+
private listeners;
|
|
15
|
+
private lastReceivedEventDate;
|
|
16
|
+
constructor({ workspaceId, token, legacyToken, apiKey, apiHost, filters, api, }: {
|
|
17
|
+
workspaceId: string;
|
|
18
|
+
token: string;
|
|
19
|
+
legacyToken?: string;
|
|
20
|
+
apiKey?: string;
|
|
21
|
+
apiHost?: string;
|
|
22
|
+
filters?: Record<string, any>;
|
|
23
|
+
api: Api;
|
|
24
|
+
});
|
|
6
25
|
get socket(): Socket<import("@socket.io/component-emitter").DefaultEventsMap, import("@socket.io/component-emitter").DefaultEventsMap>;
|
|
7
26
|
destroy(): void;
|
|
8
27
|
all(listener: (eventName: string, eventData: Prismeai.PrismeEvent) => void): () => Socket<import("@socket.io/component-emitter").DefaultEventsMap, import("@socket.io/component-emitter").DefaultEventsMap>;
|
|
9
|
-
on(ev: string, listener: (
|
|
10
|
-
emit(event: string, payload?: any): void;
|
|
11
|
-
|
|
28
|
+
on(ev: string, listener: (eventData: Prismeai.PrismeEvent) => void): () => void;
|
|
29
|
+
emit(event: string, payload?: any, options?: any): void;
|
|
30
|
+
listenTopics({ event, topics, }: {
|
|
31
|
+
event: string;
|
|
32
|
+
topics: string | string[];
|
|
33
|
+
}): void;
|
|
34
|
+
updateFilters(filters: SearchOptions): void;
|
|
35
|
+
once(ev: string, listener: (eventName: string, eventData: Prismeai.PrismeEvent) => void): () => void;
|
|
12
36
|
close(): void;
|
|
13
37
|
}
|
|
14
38
|
export default Events;
|
package/dist/lib/fetcher.d.ts
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
|
+
export type Fetched<T> = T & {
|
|
2
|
+
headers?: Record<string, any>;
|
|
3
|
+
};
|
|
1
4
|
export declare class Fetcher {
|
|
2
5
|
host: string;
|
|
3
6
|
token: string | null;
|
|
4
|
-
|
|
7
|
+
legacyToken: string | null;
|
|
8
|
+
overwriteClientId?: string;
|
|
9
|
+
private clientIdHeader?;
|
|
10
|
+
protected _apiKey: string | null;
|
|
11
|
+
language: string | undefined;
|
|
12
|
+
lastReceivedHeaders?: Record<string, any>;
|
|
13
|
+
constructor(host: string, clientIdHeader?: string);
|
|
14
|
+
set apiKey(apiKey: string);
|
|
15
|
+
prepareRequest(url: string, options?: RequestInit): Promise<Response>;
|
|
5
16
|
protected _fetch<T>(url: string, options?: RequestInit): Promise<T>;
|
|
6
17
|
get<T = any>(url: string): Promise<T>;
|
|
7
|
-
post<T>(url: string, body?: Record<string, any
|
|
18
|
+
post<T>(url: string, body?: Record<string, any>, opts?: RequestInit): Promise<T>;
|
|
19
|
+
put<T>(url: string, body: Record<string, any>): Promise<T>;
|
|
8
20
|
patch<T>(url: string, body: Record<string, any>): Promise<T>;
|
|
9
21
|
delete<T>(url: string): Promise<T>;
|
|
10
22
|
}
|
package/dist/lib/types.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import '@prisme.ai/types';
|
|
2
2
|
export interface Workspace extends Prismeai.Workspace {
|
|
3
3
|
id: string;
|
|
4
|
+
updatedAt: Date;
|
|
5
|
+
updatedBy: string;
|
|
6
|
+
createdAt: Date;
|
|
7
|
+
createdBy: string;
|
|
4
8
|
}
|
|
5
9
|
export interface Event<DateType extends Date | string> extends Omit<Prismeai.PrismeEvent, 'createdAt'> {
|
|
6
10
|
createdAt: DateType;
|
|
7
11
|
}
|
|
8
|
-
export
|
|
12
|
+
export type EventsFilters = Record<string, string> & {
|
|
9
13
|
afterDate?: PrismeaiAPI.EventsLongpolling.Parameters.AfterDate;
|
|
10
14
|
beforeDate?: PrismeaiAPI.EventsLongpolling.Parameters.BeforeDate;
|
|
11
15
|
text?: PrismeaiAPI.EventsLongpolling.Parameters.Text;
|