@prisme.ai/sdk 1.0.2 → 2.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 +250 -0
- package/dist/index.d.mts +1129 -0
- package/dist/index.d.ts +1129 -7
- package/dist/index.js +1326 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1287 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +50 -12
- package/Readme.md +0 -28
- package/dist/_virtual/_tslib.js +0 -116
- package/dist/lib/ApiError.d.ts +0 -8
- package/dist/lib/ApiError.test.d.ts +0 -1
- package/dist/lib/HTTPError.d.ts +0 -6
- package/dist/lib/HTTPError.test.d.ts +0 -1
- package/dist/lib/ImportProcessing.d.ts +0 -19
- package/dist/lib/WorkspacesEndpoint.d.ts +0 -10
- package/dist/lib/api.d.ts +0 -155
- package/dist/lib/api.test.d.ts +0 -1
- package/dist/lib/endpoints/users.d.ts +0 -13
- package/dist/lib/endpoints/workspaces.d.ts +0 -25
- package/dist/lib/endpoints/workspacesVersions.d.ts +0 -10
- package/dist/lib/events.d.ts +0 -40
- package/dist/lib/events.test.d.ts +0 -1
- package/dist/lib/fetch.d.ts +0 -2
- package/dist/lib/fetcher.d.ts +0 -24
- package/dist/lib/fetcher.test.d.ts +0 -1
- package/dist/lib/interpolate.d.ts +0 -2
- package/dist/lib/interpolate.test.d.ts +0 -1
- package/dist/lib/interpolateVars.d.ts +0 -2
- package/dist/lib/types.d.ts +0 -17
- package/dist/lib/utils.d.ts +0 -4
- package/dist/lib/utils.test.d.ts +0 -1
- package/dist/sdk/index.js +0 -19
- package/dist/sdk/lib/ApiError.js +0 -24
- package/dist/sdk/lib/HTTPError.js +0 -21
- package/dist/sdk/lib/ImportProcessing.js +0 -17
- package/dist/sdk/lib/WorkspacesEndpoint.js +0 -19
- package/dist/sdk/lib/api.js +0 -1018
- package/dist/sdk/lib/endpoints/users.js +0 -94
- package/dist/sdk/lib/endpoints/workspaces.js +0 -144
- package/dist/sdk/lib/endpoints/workspacesVersions.js +0 -40
- package/dist/sdk/lib/events.js +0 -169
- package/dist/sdk/lib/fetch.js +0 -12
- package/dist/sdk/lib/fetcher.js +0 -213
- package/dist/sdk/lib/interpolate.js +0 -26
- package/dist/sdk/lib/interpolateVars.js +0 -26
- package/dist/sdk/lib/utils.js +0 -65
- package/index.ts +0 -7
- package/lib/ApiError.test.ts +0 -13
- package/lib/ApiError.ts +0 -21
- package/lib/HTTPError.test.ts +0 -8
- package/lib/HTTPError.ts +0 -13
- package/lib/ImportProcessing.ts +0 -22
- package/lib/api.test.ts +0 -787
- package/lib/api.ts +0 -949
- package/lib/endpoints/users.ts +0 -58
- package/lib/endpoints/workspaces.ts +0 -121
- package/lib/endpoints/workspacesVersions.ts +0 -38
- package/lib/events.test.ts +0 -89
- package/lib/events.ts +0 -222
- package/lib/fetcher.test.ts +0 -246
- package/lib/fetcher.ts +0 -198
- package/lib/types.ts +0 -21
- package/lib/utils.test.ts +0 -38
- package/lib/utils.ts +0 -51
- package/tsconfig.json +0 -21
package/dist/lib/api.d.ts
DELETED
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import Fetcher, { Fetched } from './fetcher';
|
|
2
|
-
import { Event, Workspace } from './types';
|
|
3
|
-
import { Events } from './events';
|
|
4
|
-
import WorkspacesEndpoint from './endpoints/workspaces';
|
|
5
|
-
import UsersEndpoint from './endpoints/users';
|
|
6
|
-
import { ImportSuccess } from './ImportProcessing';
|
|
7
|
-
export type UserPermissions = {
|
|
8
|
-
permissions: Prismeai.UserPermissions['permissions'];
|
|
9
|
-
target: {
|
|
10
|
-
id?: string;
|
|
11
|
-
email?: string;
|
|
12
|
-
public?: boolean;
|
|
13
|
-
role?: string;
|
|
14
|
-
displayName?: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export interface ApiOptions {
|
|
18
|
-
host: string;
|
|
19
|
-
oidc?: {
|
|
20
|
-
url: string;
|
|
21
|
-
clientId: string;
|
|
22
|
-
clientIdHeader?: string;
|
|
23
|
-
redirectUri: string;
|
|
24
|
-
};
|
|
25
|
-
websockets?: {
|
|
26
|
-
transports?: string[];
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
export interface AccessToken {
|
|
30
|
-
access_token: string;
|
|
31
|
-
id_token: string;
|
|
32
|
-
scope: string;
|
|
33
|
-
expiresIn: number;
|
|
34
|
-
token_type: 'Bearer';
|
|
35
|
-
}
|
|
36
|
-
export interface InteractiveSignin {
|
|
37
|
-
interaction: string;
|
|
38
|
-
login: string;
|
|
39
|
-
password: string;
|
|
40
|
-
remember?: boolean;
|
|
41
|
-
}
|
|
42
|
-
export declare class Api extends Fetcher {
|
|
43
|
-
opts: Required<ApiOptions>;
|
|
44
|
-
private sessionId?;
|
|
45
|
-
private _user?;
|
|
46
|
-
constructor(opts: ApiOptions);
|
|
47
|
-
get user(): (Prismeai.User & {
|
|
48
|
-
sessionId?: string | undefined;
|
|
49
|
-
}) | undefined;
|
|
50
|
-
me(): Promise<any>;
|
|
51
|
-
clientId(): string;
|
|
52
|
-
getAuthorizationURL(overrideRedirectUri?: string, authParams?: {
|
|
53
|
-
max_age?: string;
|
|
54
|
-
acr_values?: string;
|
|
55
|
-
}, locale?: string | undefined): Promise<{
|
|
56
|
-
url: string;
|
|
57
|
-
codeVerifier: string;
|
|
58
|
-
clientId: string;
|
|
59
|
-
}>;
|
|
60
|
-
signin(body: InteractiveSignin): Promise<{
|
|
61
|
-
redirectTo: string;
|
|
62
|
-
}>;
|
|
63
|
-
getToken(authorizationCode: string, codeVerifier: string, overrideRedirectUri?: string): Promise<AccessToken>;
|
|
64
|
-
createAnonymousSession(): Promise<Prismeai.User & {
|
|
65
|
-
token: string;
|
|
66
|
-
}>;
|
|
67
|
-
signup(email: string, password: string, firstName: string, lastName: string, language: string): Promise<Prismeai.User & {
|
|
68
|
-
token: string;
|
|
69
|
-
}>;
|
|
70
|
-
getSignoutURL(redirectUri?: string): string;
|
|
71
|
-
sendValidationMail(email: string, language: string): Promise<unknown>;
|
|
72
|
-
validateMail(token: string): Promise<unknown>;
|
|
73
|
-
sendPasswordResetMail(email: string, language: string): Promise<unknown>;
|
|
74
|
-
passwordReset(token: string, password: string): Promise<unknown>;
|
|
75
|
-
getWorkspaces(): Promise<Workspace[]>;
|
|
76
|
-
getWorkspace(id: string): Promise<PrismeaiAPI.GetWorkspace.Responses.$200>;
|
|
77
|
-
getWorkspaceSecurity(id: string): Promise<PrismeaiAPI.GetSecurity.Responses.$200>;
|
|
78
|
-
updateWorkspaceSecurity(workspaceId: string, security: Prismeai.WorkspaceSecurity): Promise<Fetched<PrismeaiAPI.UpdateSecurity.Responses.$200>>;
|
|
79
|
-
getWorkspaceRoles(id: string): Promise<Fetched<PrismeaiAPI.GetRoles.Responses.$200>>;
|
|
80
|
-
getWorkspaceSecrets(id: string): Promise<Fetched<PrismeaiAPI.GetWorkspaceSecrets.Responses.$200>>;
|
|
81
|
-
updateWorkspaceSecrets(id: string, newSecrets: any): Promise<Workspace>;
|
|
82
|
-
deleteWorkspaceSecrets(id: string, secretName: string): Promise<Workspace>;
|
|
83
|
-
createWorkspace(newWorkspace: Partial<Prismeai.Workspace>): Promise<Workspace>;
|
|
84
|
-
duplicateWorkspace({ id }: {
|
|
85
|
-
id: string;
|
|
86
|
-
}): Promise<Workspace | null>;
|
|
87
|
-
updateWorkspace(workspace: Prismeai.DSULPatch): Promise<Fetched<PrismeaiAPI.UpdateWorkspace.Responses.$200> | null>;
|
|
88
|
-
deleteWorkspace(workspaceId: Workspace['id']): Promise<Workspace>;
|
|
89
|
-
generateApiKey(workspaceId: Workspace['id'], events: string[], uploads?: string[]): Promise<string>;
|
|
90
|
-
updateApiKey(workspaceId: Workspace['id'], apiKey: string, events: string[], uploads?: string[]): Promise<string>;
|
|
91
|
-
getAutomation(workspaceId: string, automationSlug: string): Promise<Fetched<PrismeaiAPI.GetAutomation.Responses.$200>>;
|
|
92
|
-
createAutomation(workspaceId: Workspace['id'], automation: Prismeai.Automation): Promise<Fetched<Prismeai.Automation & {
|
|
93
|
-
slug: string;
|
|
94
|
-
}>>;
|
|
95
|
-
updateAutomation(workspaceId: string, slug: string, automation: Prismeai.Automation): Promise<Fetched<Prismeai.Automation & {
|
|
96
|
-
slug: string;
|
|
97
|
-
}>>;
|
|
98
|
-
deleteAutomation(workspaceId: string, slug: string): Promise<string>;
|
|
99
|
-
getPages(workspaceId: NonNullable<Workspace['id']>): Promise<Prismeai.Page[]>;
|
|
100
|
-
getPage(workspaceId: PrismeaiAPI.GetPage.Parameters.WorkspaceId, pageSlug: PrismeaiAPI.GetPage.Parameters.Slug): Promise<Fetched<Prismeai.DetailedPage>>;
|
|
101
|
-
getPageBySlug(workspaceSlug: PrismeaiAPI.GetPageBySlug.Parameters.WorkspaceSlug, pageSlug: PrismeaiAPI.GetPageBySlug.Parameters.PageSlug): Promise<Fetched<Prismeai.DetailedPage>>;
|
|
102
|
-
createPage(workspaceId: PrismeaiAPI.CreatePage.Parameters.WorkspaceId, page: PrismeaiAPI.CreatePage.RequestBody): Promise<Prismeai.Page>;
|
|
103
|
-
updatePage(workspaceId: PrismeaiAPI.UpdatePage.Parameters.WorkspaceId, page: PrismeaiAPI.UpdatePage.RequestBody, prevSlug?: PrismeaiAPI.DeletePage.Parameters.Slug): Promise<Prismeai.Page>;
|
|
104
|
-
deletePage(workspaceId: PrismeaiAPI.DeletePage.Parameters.WorkspaceId, pageSlug: PrismeaiAPI.DeletePage.Parameters.Slug): Promise<Fetched<PrismeaiAPI.DeletePage.Responses.$200>>;
|
|
105
|
-
streamEvents(workspaceId: string, filters?: Record<string, any>): Promise<Events>;
|
|
106
|
-
getEvents(workspaceId: string, options?: Record<string, any>): Promise<Event<Date>[]>;
|
|
107
|
-
postEvents(workspaceId: PrismeaiAPI.SendWorkspaceEvent.Parameters.WorkspaceId, events: PrismeaiAPI.SendWorkspaceEvent.RequestBody['events']): Promise<boolean>;
|
|
108
|
-
findContacts(query: PrismeaiAPI.FindContacts.RequestBody): Promise<PrismeaiAPI.FindContacts.Responses.$200>;
|
|
109
|
-
getPermissions(subjectType: PrismeaiAPI.GetPermissions.Parameters.SubjectType, subjectId: string): Promise<{
|
|
110
|
-
result: UserPermissions[];
|
|
111
|
-
}>;
|
|
112
|
-
addPermissions(subjectType: PrismeaiAPI.GetPermissions.Parameters.SubjectType, subjectId: string, permissions: UserPermissions): Promise<UserPermissions>;
|
|
113
|
-
deletePermissions(subjectType: PrismeaiAPI.GetPermissions.Parameters.SubjectType, subjectId: string, id: string): Promise<Fetched<PrismeaiAPI.RevokePermissions.Responses.$200>>;
|
|
114
|
-
getApps({ query, page, limit, workspaceId, }: {
|
|
115
|
-
query?: PrismeaiAPI.SearchApps.QueryParameters['text'];
|
|
116
|
-
page?: PrismeaiAPI.SearchApps.QueryParameters['page'];
|
|
117
|
-
limit?: PrismeaiAPI.SearchApps.QueryParameters['limit'];
|
|
118
|
-
workspaceId?: PrismeaiAPI.SearchApps.QueryParameters['workspaceId'];
|
|
119
|
-
}): Promise<Fetched<PrismeaiAPI.SearchApps.Responses.$200>>;
|
|
120
|
-
getApp({ slug, }: {
|
|
121
|
-
slug?: PrismeaiAPI.GetApp.PathParameters['appSlug'];
|
|
122
|
-
}): Promise<Fetched<PrismeaiAPI.GetApp.Responses.$200>>;
|
|
123
|
-
installApp(workspaceId: PrismeaiAPI.InstallAppInstance.PathParameters['workspaceId'], body: PrismeaiAPI.InstallAppInstance.RequestBody): Promise<Fetched<PrismeaiAPI.InstallAppInstance.Responses.$200>>;
|
|
124
|
-
updateApp(workspaceId: PrismeaiAPI.ConfigureAppInstance.PathParameters['workspaceId'], slug: PrismeaiAPI.ConfigureAppInstance.PathParameters['slug'], body: PrismeaiAPI.ConfigureAppInstance.RequestBody): Promise<Fetched<PrismeaiAPI.ConfigureAppInstance.Responses.$200>>;
|
|
125
|
-
uninstallApp(workspaceId: PrismeaiAPI.UninstallAppInstance.PathParameters['workspaceId'], slug: PrismeaiAPI.ConfigureAppInstance.PathParameters['slug']): Promise<Fetched<PrismeaiAPI.UninstallAppInstance.Responses.$200>>;
|
|
126
|
-
publishApp(body: PrismeaiAPI.PublishApp.RequestBody): Promise<Fetched<PrismeaiAPI.PublishApp.Responses.$200>>;
|
|
127
|
-
listAppInstances(workspaceId: PrismeaiAPI.ListAppInstances.PathParameters['workspaceId']): Promise<Fetched<PrismeaiAPI.ListAppInstances.Responses.$200>>;
|
|
128
|
-
getAppConfig<T>(workspaceId: PrismeaiAPI.GetAppInstanceConfig.Parameters.WorkspaceId, slug: PrismeaiAPI.GetAppInstanceConfig.Parameters.Slug): Promise<T>;
|
|
129
|
-
updateAppConfig(workspaceId: PrismeaiAPI.UpdateAppInstanceConfig.Parameters.WorkspaceId, slug: PrismeaiAPI.UpdateAppInstanceConfig.Parameters.Slug, config: any): Promise<PrismeaiAPI.UpdateAppInstanceConfig.Responses.$200['config']>;
|
|
130
|
-
getAppInstance(workspaceId: string, slug: string): Promise<Fetched<PrismeaiAPI.GetAppInstance.Responses.$200>>;
|
|
131
|
-
saveAppInstance(workspaceId: PrismeaiAPI.ConfigureAppInstance.Parameters.WorkspaceId, slug: PrismeaiAPI.ConfigureAppInstance.Parameters.Slug, appInstance: PrismeaiAPI.ConfigureAppInstance.RequestBody): Promise<Fetched<PrismeaiAPI.ConfigureAppInstance.Responses.$200>>;
|
|
132
|
-
uploadFiles(files: string | string[], workspaceId: string, opts?: {
|
|
133
|
-
expiresAfter?: number;
|
|
134
|
-
public?: boolean;
|
|
135
|
-
shareToken?: boolean;
|
|
136
|
-
}): Promise<PrismeaiAPI.UploadFile.Responses.$200>;
|
|
137
|
-
replaceAllImagesData(original: any, workspaceId: string): Promise<any>;
|
|
138
|
-
getAutomationFromUrl(workspaceId: string, url: string): string | false;
|
|
139
|
-
callAutomation(workspaceId: string, automation: string, params?: any): Promise<Fetched<any>>;
|
|
140
|
-
testAutomation({ workspaceId, automation, payload, }: {
|
|
141
|
-
workspaceId: string;
|
|
142
|
-
automation: string;
|
|
143
|
-
payload?: Record<string, any>;
|
|
144
|
-
}): Promise<Fetched<any>>;
|
|
145
|
-
getWorkspaceUsage(workspaceId: PrismeaiAPI.WorkspaceUsage.Parameters.WorkspaceId, { afterDate, beforeDate, details, }?: {
|
|
146
|
-
afterDate?: PrismeaiAPI.WorkspaceUsage.Parameters.AfterDate;
|
|
147
|
-
beforeDate?: PrismeaiAPI.WorkspaceUsage.Parameters.BeforeDate;
|
|
148
|
-
details?: PrismeaiAPI.WorkspaceUsage.Parameters.Details;
|
|
149
|
-
}): Promise<Fetched<PrismeaiAPI.WorkspaceUsage.Responses.$200>>;
|
|
150
|
-
importArchive(archive: File): Promise<ImportSuccess>;
|
|
151
|
-
users(id?: string): UsersEndpoint;
|
|
152
|
-
workspaces(id: string): WorkspacesEndpoint;
|
|
153
|
-
}
|
|
154
|
-
declare const _default: Api;
|
|
155
|
-
export default _default;
|
package/dist/lib/api.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Api } from '../api';
|
|
2
|
-
export declare class UsersEndpoint {
|
|
3
|
-
private id;
|
|
4
|
-
private api;
|
|
5
|
-
constructor(id: string, api: Api);
|
|
6
|
-
update(data: Partial<Prismeai.User>): Promise<PrismeaiAPI.PatchUser.Responses.$200>;
|
|
7
|
-
updatePhoto(photo: string): Promise<PrismeaiAPI.PostUserPhoto.Responses.$200>;
|
|
8
|
-
setMeta(k: string, v: any): Promise<PrismeaiAPI.SetMeta.Responses.$200>;
|
|
9
|
-
deleteMeta(k: string): Promise<PrismeaiAPI.DeleteMeta.Responses.$200>;
|
|
10
|
-
sendDeleteValidation(): Promise<unknown>;
|
|
11
|
-
delete(token?: string): Promise<unknown>;
|
|
12
|
-
}
|
|
13
|
-
export default UsersEndpoint;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Api } from '../api';
|
|
2
|
-
import { Fetched } from '../fetcher';
|
|
3
|
-
import { ImportSuccess } from '../ImportProcessing';
|
|
4
|
-
import WorkspacesVersionsEndpoint from './workspacesVersions';
|
|
5
|
-
export declare class WorkspacesEndpoint {
|
|
6
|
-
private id;
|
|
7
|
-
private api;
|
|
8
|
-
constructor(id: string, api: Api);
|
|
9
|
-
get versions(): WorkspacesVersionsEndpoint;
|
|
10
|
-
update(workspace: Prismeai.DSULPatch): Promise<Fetched<PrismeaiAPI.UpdateWorkspace.Responses.$200> | null>;
|
|
11
|
-
delete(): Promise<PrismeaiAPI.DeleteWorkspace.Responses.$200>;
|
|
12
|
-
uploadFiles(files: string | string[], opts?: {
|
|
13
|
-
expiresAfter?: number;
|
|
14
|
-
public?: boolean;
|
|
15
|
-
shareToken?: boolean;
|
|
16
|
-
}): Promise<PrismeaiAPI.UploadFile.Responses.$200>;
|
|
17
|
-
listAppInstances(): Promise<Fetched<PrismeaiAPI.ListAppInstances.Responses.$200>>;
|
|
18
|
-
getUsage({ afterDate, beforeDate, details, }?: {
|
|
19
|
-
afterDate?: PrismeaiAPI.WorkspaceUsage.Parameters.AfterDate;
|
|
20
|
-
beforeDate?: PrismeaiAPI.WorkspaceUsage.Parameters.BeforeDate;
|
|
21
|
-
details?: PrismeaiAPI.WorkspaceUsage.Parameters.Details;
|
|
22
|
-
}): Promise<Fetched<PrismeaiAPI.WorkspaceUsage.Responses.$200>>;
|
|
23
|
-
importArchive(archive: File): Promise<ImportSuccess>;
|
|
24
|
-
}
|
|
25
|
-
export default WorkspacesEndpoint;
|
|
@@ -1,10 +0,0 @@
|
|
|
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): Promise<unknown>;
|
|
7
|
-
rollback(versionId: PrismeaiAPI.PullWorkspaceVersion.PathParameters['versionId'], opts?: PrismeaiAPI.PullWorkspaceVersion.RequestBody): Promise<unknown>;
|
|
8
|
-
export(version?: PrismeaiAPI.ExportWorkspaceVersion.Parameters.VersionId): Promise<Blob>;
|
|
9
|
-
}
|
|
10
|
-
export default WorkspacesVersionsEndpoint;
|
package/dist/lib/events.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
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
|
-
};
|
|
9
|
-
export declare class Events {
|
|
10
|
-
protected client: Socket;
|
|
11
|
-
workspaceId: string;
|
|
12
|
-
private filters;
|
|
13
|
-
private listenedUserTopics;
|
|
14
|
-
private listeners;
|
|
15
|
-
private lastReceivedEventDate;
|
|
16
|
-
private socketId?;
|
|
17
|
-
constructor({ workspaceId, token, legacyToken, apiKey, apiHost, filters, api, transports, }: {
|
|
18
|
-
workspaceId: string;
|
|
19
|
-
token: string;
|
|
20
|
-
legacyToken?: string;
|
|
21
|
-
apiKey?: string;
|
|
22
|
-
apiHost?: string;
|
|
23
|
-
filters?: Record<string, any>;
|
|
24
|
-
api: Api;
|
|
25
|
-
transports?: string[];
|
|
26
|
-
});
|
|
27
|
-
get socket(): Socket<import("@socket.io/component-emitter").DefaultEventsMap, import("@socket.io/component-emitter").DefaultEventsMap>;
|
|
28
|
-
destroy(): void;
|
|
29
|
-
all(listener: (eventName: string, eventData: Prismeai.PrismeEvent) => void): () => Socket<import("@socket.io/component-emitter").DefaultEventsMap, import("@socket.io/component-emitter").DefaultEventsMap>;
|
|
30
|
-
on(ev: string, listener: (eventData: Prismeai.PrismeEvent) => void): () => void;
|
|
31
|
-
emit(event: string, payload?: any, options?: any): void;
|
|
32
|
-
listenTopics({ event, topics, }: {
|
|
33
|
-
event: string;
|
|
34
|
-
topics: string | string[];
|
|
35
|
-
}): void;
|
|
36
|
-
updateFilters(filters: SearchOptions): void;
|
|
37
|
-
once(ev: string, listener: (eventName: string, eventData: Prismeai.PrismeEvent) => void): () => void;
|
|
38
|
-
close(): void;
|
|
39
|
-
}
|
|
40
|
-
export default Events;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/lib/fetch.d.ts
DELETED
package/dist/lib/fetcher.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export type Fetched<T> = T & {
|
|
2
|
-
headers?: Record<string, any>;
|
|
3
|
-
};
|
|
4
|
-
export declare class Fetcher {
|
|
5
|
-
host: string;
|
|
6
|
-
token: string | null;
|
|
7
|
-
legacyToken: string | null;
|
|
8
|
-
overwriteClientId?: string;
|
|
9
|
-
private clientIdHeader?;
|
|
10
|
-
protected _apiKey: string | null;
|
|
11
|
-
protected _csrfToken: string | null;
|
|
12
|
-
language: string | undefined;
|
|
13
|
-
lastReceivedHeaders?: Record<string, any>;
|
|
14
|
-
constructor(host: string, clientIdHeader?: string);
|
|
15
|
-
set apiKey(apiKey: string);
|
|
16
|
-
prepareRequest(url: string, options?: RequestInit): Promise<Response>;
|
|
17
|
-
protected _fetch<T>(url: string, options?: RequestInit, maxRetries?: number): Promise<T>;
|
|
18
|
-
get<T = any>(url: string): Promise<T>;
|
|
19
|
-
post<T>(url: string, body?: Record<string, any>, opts?: RequestInit): Promise<T>;
|
|
20
|
-
put<T>(url: string, body: Record<string, any>): Promise<T>;
|
|
21
|
-
patch<T>(url: string, body: Record<string, any>): Promise<T>;
|
|
22
|
-
delete<T>(url: string): Promise<T>;
|
|
23
|
-
}
|
|
24
|
-
export default Fetcher;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/lib/types.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import '@prisme.ai/types';
|
|
2
|
-
export interface Workspace extends Prismeai.Workspace {
|
|
3
|
-
id: string;
|
|
4
|
-
updatedAt: Date;
|
|
5
|
-
updatedBy: string;
|
|
6
|
-
createdAt: Date;
|
|
7
|
-
createdBy: string;
|
|
8
|
-
}
|
|
9
|
-
export interface Event<DateType extends Date | string> extends Omit<Prismeai.PrismeEvent, 'createdAt'> {
|
|
10
|
-
createdAt: DateType;
|
|
11
|
-
}
|
|
12
|
-
export type EventsFilters = Record<string, string> & {
|
|
13
|
-
afterDate?: PrismeaiAPI.EventsLongpolling.Parameters.AfterDate;
|
|
14
|
-
beforeDate?: PrismeaiAPI.EventsLongpolling.Parameters.BeforeDate;
|
|
15
|
-
text?: PrismeaiAPI.EventsLongpolling.Parameters.Text;
|
|
16
|
-
query?: PrismeaiAPI.EventsLongpolling.Parameters.Query;
|
|
17
|
-
};
|
package/dist/lib/utils.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const removedUndefinedProperties: (obj: any, removeEmptyStrings?: boolean) => any;
|
|
2
|
-
export declare function dataURItoBlob(dataURI: string): [Blob, string];
|
|
3
|
-
export declare function isDataURL(file: any): file is string;
|
|
4
|
-
export declare function wait(delay?: number): Promise<unknown>;
|
package/dist/lib/utils.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/sdk/index.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var api = require('./lib/api.js');
|
|
6
|
-
var ApiError = require('./lib/ApiError.js');
|
|
7
|
-
var events = require('./lib/events.js');
|
|
8
|
-
var fetcher = require('./lib/fetcher.js');
|
|
9
|
-
var HTTPError = require('./lib/HTTPError.js');
|
|
10
|
-
require('@prisme.ai/types');
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
exports.Api = api.Api;
|
|
15
|
-
exports["default"] = api["default"];
|
|
16
|
-
exports.ApiError = ApiError.ApiError;
|
|
17
|
-
exports.Events = events.Events;
|
|
18
|
-
exports.Fetcher = fetcher.Fetcher;
|
|
19
|
-
exports.HTTPError = HTTPError.HTTPError;
|
package/dist/sdk/lib/ApiError.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _tslib = require('../../_virtual/_tslib.js');
|
|
6
|
-
|
|
7
|
-
var ApiError = /** @class */ (function (_super) {
|
|
8
|
-
_tslib.__extends(ApiError, _super);
|
|
9
|
-
function ApiError(_a, code) {
|
|
10
|
-
var error = _a.error, message = _a.message, details = _a.details;
|
|
11
|
-
var _this = _super.call(this, message) || this;
|
|
12
|
-
_this.code = code;
|
|
13
|
-
_this.error = error;
|
|
14
|
-
_this.details = details;
|
|
15
|
-
return _this;
|
|
16
|
-
}
|
|
17
|
-
ApiError.prototype.toString = function () {
|
|
18
|
-
return this.error;
|
|
19
|
-
};
|
|
20
|
-
return ApiError;
|
|
21
|
-
}(Error));
|
|
22
|
-
|
|
23
|
-
exports.ApiError = ApiError;
|
|
24
|
-
exports["default"] = ApiError;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _tslib = require('../../_virtual/_tslib.js');
|
|
6
|
-
|
|
7
|
-
var HTTPError = /** @class */ (function (_super) {
|
|
8
|
-
_tslib.__extends(HTTPError, _super);
|
|
9
|
-
function HTTPError(status, code) {
|
|
10
|
-
var _this = _super.call(this, status) || this;
|
|
11
|
-
_this.code = code;
|
|
12
|
-
return _this;
|
|
13
|
-
}
|
|
14
|
-
HTTPError.prototype.toString = function () {
|
|
15
|
-
return "".concat(this.code, " ").concat(this.message);
|
|
16
|
-
};
|
|
17
|
-
return HTTPError;
|
|
18
|
-
}(Error));
|
|
19
|
-
|
|
20
|
-
exports.HTTPError = HTTPError;
|
|
21
|
-
exports["default"] = HTTPError;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _tslib = require('../../_virtual/_tslib.js');
|
|
6
|
-
|
|
7
|
-
var ImportProcessingError = /** @class */ (function (_super) {
|
|
8
|
-
_tslib.__extends(ImportProcessingError, _super);
|
|
9
|
-
function ImportProcessingError(error) {
|
|
10
|
-
var _this = _super.call(this) || this;
|
|
11
|
-
_this.error = error;
|
|
12
|
-
return _this;
|
|
13
|
-
}
|
|
14
|
-
return ImportProcessingError;
|
|
15
|
-
}(Error));
|
|
16
|
-
|
|
17
|
-
exports.ImportProcessingError = ImportProcessingError;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var WorkspacesEndpoint = /** @class */ (function () {
|
|
6
|
-
function WorkspacesEndpoint(id, api) {
|
|
7
|
-
this.versions = {
|
|
8
|
-
create: this.versionCreate.bind(this),
|
|
9
|
-
};
|
|
10
|
-
this.id = id;
|
|
11
|
-
this.api = api;
|
|
12
|
-
}
|
|
13
|
-
WorkspacesEndpoint.prototype.versionCreate = function () {
|
|
14
|
-
console.log('créer version pour', this.id, this.api);
|
|
15
|
-
};
|
|
16
|
-
return WorkspacesEndpoint;
|
|
17
|
-
}());
|
|
18
|
-
|
|
19
|
-
exports.WorkspacesEndpoint = WorkspacesEndpoint;
|