@levo-so/core 0.1.59 → 0.1.60

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.
Files changed (55) hide show
  1. package/dist/index.d.ts +1763 -8
  2. package/dist/index.js +435 -89
  3. package/package.json +12 -12
  4. package/dist/client.d.ts +0 -82
  5. package/dist/constants/collection/defaultByKind.d.ts +0 -3
  6. package/dist/constants/collection/fieldInterfaceFormat.d.ts +0 -3
  7. package/dist/constants/collection/fieldInterfaces.d.ts +0 -6
  8. package/dist/constants/collection/fieldKind.d.ts +0 -26
  9. package/dist/constants/index.d.ts +0 -8
  10. package/dist/constants/integration.d.ts +0 -23
  11. package/dist/constants/media.d.ts +0 -3
  12. package/dist/constants/oauthProvider.d.ts +0 -3
  13. package/dist/control/audience.d.ts +0 -22
  14. package/dist/control/index.d.ts +0 -23
  15. package/dist/httpClient.d.ts +0 -13
  16. package/dist/logger/batch.d.ts +0 -9
  17. package/dist/logger/index.d.ts +0 -22
  18. package/dist/modules/blog.d.ts +0 -10
  19. package/dist/modules/collection.d.ts +0 -26
  20. package/dist/modules/media.d.ts +0 -11
  21. package/dist/modules/membership.d.ts +0 -21
  22. package/dist/types/audience.d.ts +0 -100
  23. package/dist/types/blog/author.d.ts +0 -30
  24. package/dist/types/blog/blogClient.d.ts +0 -51
  25. package/dist/types/blog/category.d.ts +0 -20
  26. package/dist/types/blog/index.d.ts +0 -64
  27. package/dist/types/blog/post.d.ts +0 -63
  28. package/dist/types/blog/tag.d.ts +0 -19
  29. package/dist/types/collection/collectionView.d.ts +0 -36
  30. package/dist/types/collection/draft.d.ts +0 -9
  31. package/dist/types/collection/index.d.ts +0 -7
  32. package/dist/types/collection/lemaCollection.d.ts +0 -95
  33. package/dist/types/collection/lemaField.d.ts +0 -55
  34. package/dist/types/collection/lemaSection.d.ts +0 -10
  35. package/dist/types/collection/relation.d.ts +0 -11
  36. package/dist/types/emoji.d.ts +0 -22
  37. package/dist/types/event.d.ts +0 -225
  38. package/dist/types/index.d.ts +0 -14
  39. package/dist/types/levo-query.d.ts +0 -104
  40. package/dist/types/location.d.ts +0 -6
  41. package/dist/types/media.d.ts +0 -56
  42. package/dist/types/membership/index.d.ts +0 -182
  43. package/dist/types/query.d.ts +0 -46
  44. package/dist/types/schema/field.d.ts +0 -56
  45. package/dist/types/schema/index.d.ts +0 -3
  46. package/dist/types/schema/schema.d.ts +0 -58
  47. package/dist/types/utils.d.ts +0 -8
  48. package/dist/types/workspace.d.ts +0 -172
  49. package/dist/utils/LevoError.d.ts +0 -21
  50. package/dist/utils/formatImagePath.d.ts +0 -3
  51. package/dist/utils/getLevoError.d.ts +0 -3
  52. package/dist/utils/getUserProperties.d.ts +0 -8
  53. package/dist/utils/isIncognito.d.ts +0 -9
  54. package/dist/utils/listToX.d.ts +0 -3
  55. package/dist/utils/lock.d.ts +0 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@levo-so/core",
3
- "version": "0.1.59",
3
+ "version": "0.1.60",
4
4
  "author": "Levo Engineering <devs@theinternetfolks.com>",
5
5
  "description": "Levo common utilities",
6
6
  "type": "module",
@@ -13,13 +13,6 @@
13
13
  "!dist/**/*.d.ts.map",
14
14
  "package.json"
15
15
  ],
16
- "scripts": {
17
- "clean": "rimraf dist node_modules .turbo",
18
- "check-types": "tsc --noEmit",
19
- "lint": "eslint",
20
- "build": "tsup",
21
- "dev": "tsup --watch"
22
- },
23
16
  "dependencies": {
24
17
  "@analytics/activity-utils": "0.1.16",
25
18
  "@analytics/visitor-source": "0.0.7",
@@ -29,11 +22,11 @@
29
22
  "wretch": "2.9.0"
30
23
  },
31
24
  "devDependencies": {
32
- "@levo/eslint-config": "workspace:*",
33
- "@levo/ts-config": "workspace:*",
34
25
  "@types/lodash-es": "4.17.12",
35
26
  "tsup": "8.2.4",
36
- "typescript": "5.8.3"
27
+ "typescript": "5.9.3",
28
+ "@levo/eslint-config": "0.0.0",
29
+ "@levo/ts-config": "0.0.0"
37
30
  },
38
31
  "main": "./dist/index.js",
39
32
  "module": "./dist/index.js",
@@ -43,5 +36,12 @@
43
36
  "types": "./dist/index.d.ts",
44
37
  "default": "./dist/index.js"
45
38
  }
39
+ },
40
+ "scripts": {
41
+ "clean": "rimraf dist node_modules .turbo",
42
+ "check-types": "tsc --noEmit",
43
+ "lint": "eslint",
44
+ "build": "tsup",
45
+ "dev": "tsup --watch"
46
46
  }
47
- }
47
+ }
package/dist/client.d.ts DELETED
@@ -1,82 +0,0 @@
1
- import { ICoreOptions } from "./control";
2
- import { IPageContext } from "./httpClient";
3
- import { ILoggerOptions } from "./logger";
4
- export interface ILevoClientOptions extends ICoreOptions {
5
- pageContext?: IPageContext | null;
6
- loggerOptions?: ILoggerOptions;
7
- }
8
- export declare const createLevoClient: (options: ILevoClientOptions) => {
9
- readonly apiUrl: string;
10
- readonly insightsUrl: string;
11
- readonly workspace: `W${string}` | null;
12
- readonly audience: {
13
- readonly instance: import("analytics").AnalyticsInstance | null;
14
- readonly is_identified: boolean;
15
- storage_keys: {
16
- identify: string;
17
- open_tabs: string;
18
- current_tab: string;
19
- all_tabs: string;
20
- };
21
- initiate: (properties: import(".").ILevoAudience.Properties) => Promise<any>;
22
- identify: (options?: {
23
- withLock?: boolean;
24
- }) => Promise<void>;
25
- track: <T extends import(".").ILevoAudience.Properties>(event: import(".").AnalyticsEventType, properties: T & import(".").ILevoAudience.Properties) => Promise<any>;
26
- bounce: (properties: import(".").ILevoAudience.Properties) => Promise<void>;
27
- };
28
- readonly blog: {
29
- getAllBlogs: (blog_key: string, data?: import(".").LevoQuery.FindQuery, options?: import(".").BlogClient.OptionParams) => Promise<import(".").IResponseMultiple<import(".").BlogClient.BlogData>>;
30
- getSingleBlog: (blog_key: string, slug: string, options?: import(".").BlogClient.OptionParams) => Promise<import(".").IResponseSingle<import(".").BlogClient.BlogData>>;
31
- };
32
- readonly membership: {
33
- getOAuthURL: (options?: import("wretch").WretchOptions) => Promise<import(".").ILevoMembership.OAuthURLList>;
34
- signOut: <T = {
35
- status: boolean;
36
- }>(options?: import("wretch").WretchOptions) => Promise<T>;
37
- getMe: <T = import(".").ILevoMembership.Account>(options?: import("wretch").WretchOptions) => Promise<T>;
38
- updateMe: <T = import(".").ILevoMembership.Account>(data: import(".").ILevoMembership.Request.UpdateMe, options?: import("wretch").WretchOptions) => Promise<T>;
39
- createPassword: <T = import(".").ILevoMembership.Account>(data: import(".").ILevoMembership.Request.CreatePassword, options?: import("wretch").WretchOptions) => Promise<T>;
40
- isLoggedIn: <T = import(".").ILevoMembership.Account>(options?: import("wretch").WretchOptions) => Promise<T | null>;
41
- requestMagicLink: (data: import(".").ILevoMembership.Request.RequestMagicLink, options?: import("wretch").WretchOptions) => Promise<Pick<import(".").ILevoMembership.Otp, "_id" | "content">>;
42
- requestOtp: (data: import(".").ILevoMembership.Request.RequestOtp, options?: import("wretch").WretchOptions) => Promise<Pick<import(".").ILevoMembership.Otp, "_id" | "content">>;
43
- signInWithOtp: <T = import(".").ILevoMembership.Account>(data: import(".").ILevoMembership.Request.SignInWithOtp, options?: import("wretch").WretchOptions) => Promise<T>;
44
- signInWithPassword: <T = import(".").ILevoMembership.Account>(data: import(".").ILevoMembership.Request.SignInWithPassword, options?: import("wretch").WretchOptions) => Promise<T>;
45
- signUpWithPassword: <T = import(".").ILevoMembership.Account>(data: import(".").ILevoMembership.Request.SignUpWithPassword, options?: import("wretch").WretchOptions) => Promise<T>;
46
- };
47
- readonly collection: {
48
- getAllCollections: (data?: import(".").LevoQuery.FindQuery<"id" | "workspace_id" | "description" | "created_at" | "updated_at" | "key" | "readonly" | "hidden" | "icon" | "on_submit" | "on_update" | "name" | "sections" | "views" | "title_field" | "email_field" | "mobile_field" | "settings" | "module_name" | "allow_draft">, options?: import("wretch").WretchOptions) => Promise<import(".").IResponseMultiple<import(".").ILemaCollection>>;
49
- getCollectionByIDExpanded: <T = import(".").ILemaCollection>(id: string, options?: import("wretch").WretchOptions) => Promise<import(".").IResponseSingle<T>>;
50
- createCollection: (data: import(".").ILemaCollection) => Promise<import(".").IResponseSingle<import(".").ILemaCollection>>;
51
- saveCollectionData: ({ collection_id, data, options, }: {
52
- collection_id: string;
53
- data: any;
54
- options?: import("wretch").WretchOptions;
55
- }) => Promise<import(".").IResponseSingle<any>>;
56
- getCollectionContentList: ({ collection_key, page, search, limit, where, }: {
57
- collection_key: string;
58
- } & import(".").LevoQuery.FindQuery) => Promise<import(".").IResponseMultiple<Record<string, unknown>>>;
59
- saveDraftEntry: (collection_key: string, data: any) => Promise<import(".").IResponseSingle<import(".").IDraftEntry>>;
60
- editDraftEntry: (collection_key: string, id: string, data: any) => Promise<import(".").IResponseSingle<import(".").IDraftEntry>>;
61
- getDraftEntry: (collection_key: string) => Promise<import(".").IResponseMultiple<import(".").IDraftEntry>>;
62
- submitDraftEntry: (collection_key: string, data: any) => Promise<import(".").IResponseSingle<import(".").IDraftEntry>>;
63
- };
64
- readonly media: {
65
- mediaBulkUpload: (formData: FormData, options?: import("wretch").WretchOptions) => Promise<import(".").IResponseMultiple<import(".").IMedia>>;
66
- getAllMedia: (data?: import(".").LevoQuery.FindQuery) => Promise<import(".").IResponseMultiple<import(".").IMedia>>;
67
- };
68
- readonly logger: {
69
- debug: (...args: any[]) => void;
70
- info: (...args: any[]) => void;
71
- warn: (...args: any[]) => void;
72
- error: (...args: any[]) => void;
73
- };
74
- readonly fetch: import("wretch/addons/queryString").QueryStringAddon & import("wretch").Wretch<import("wretch/addons/queryString").QueryStringAddon, unknown, undefined>;
75
- readonly APP_MODE: string;
76
- readonly pageContext: IPageContext | null;
77
- updatePageContext: (newContext: IPageContext | null) => void;
78
- updateWorkspace: (workspace: string | null) => void;
79
- };
80
- export type ILevoClient = ReturnType<typeof createLevoClient>;
81
- export { type WorkspaceID } from "./control";
82
- //# sourceMappingURL=client.d.ts.map
@@ -1,3 +0,0 @@
1
- import type { FieldKindList } from "./fieldKind";
2
- export declare const defaultByKinds: Record<(typeof FieldKindList)[number], any>;
3
- //# sourceMappingURL=defaultByKind.d.ts.map
@@ -1,3 +0,0 @@
1
- import type { FieldInterfacesList } from "./fieldInterfaces";
2
- export declare const formatsByInterface: Record<(typeof FieldInterfacesList)[number], string[]>;
3
- //# sourceMappingURL=fieldInterfaceFormat.d.ts.map
@@ -1,6 +0,0 @@
1
- export declare const CommonFieldInterfacesList: readonly ["TextWidget", "CurrencyWidget", "TextareaWidget", "GeocoderWidget", "MultiGeocoderWidget", "DropdownWidget", "ToggleCheckboxWidget", "RadioWidget", "NumberWidget", "EmailWidget", "PhoneWidget", "URLWidget", "DateWidget", "SwitchWidget", "RichTextWidget", "DateTimeWidget", "CheckboxWidget", "ImageUploadWidget", "MultiImageUploadWidget", "FileUploadWidget", "MultiFileUploadWidget", "MultiDropdownWidget", "MultiTextWidget"];
2
- export declare const ComplexFieldInterfacesList: readonly ["CollectionWidget", "ArrayWidget", "RecordWidget", "JSONWidget", "SlugWidget"];
3
- export declare const FieldInterfacesList: readonly ["TextWidget", "CurrencyWidget", "TextareaWidget", "GeocoderWidget", "MultiGeocoderWidget", "DropdownWidget", "ToggleCheckboxWidget", "RadioWidget", "NumberWidget", "EmailWidget", "PhoneWidget", "URLWidget", "DateWidget", "SwitchWidget", "RichTextWidget", "DateTimeWidget", "CheckboxWidget", "ImageUploadWidget", "MultiImageUploadWidget", "FileUploadWidget", "MultiFileUploadWidget", "MultiDropdownWidget", "MultiTextWidget", "CollectionWidget", "ArrayWidget", "RecordWidget", "JSONWidget", "SlugWidget"];
4
- export declare const CommonFieldIntefaces: Record<"TextWidget" | "CurrencyWidget" | "TextareaWidget" | "GeocoderWidget" | "MultiGeocoderWidget" | "DropdownWidget" | "ToggleCheckboxWidget" | "RadioWidget" | "NumberWidget" | "EmailWidget" | "PhoneWidget" | "URLWidget" | "DateWidget" | "SwitchWidget" | "RichTextWidget" | "DateTimeWidget" | "CheckboxWidget" | "ImageUploadWidget" | "MultiImageUploadWidget" | "FileUploadWidget" | "MultiFileUploadWidget" | "MultiDropdownWidget" | "MultiTextWidget", "TextWidget" | "CurrencyWidget" | "TextareaWidget" | "GeocoderWidget" | "MultiGeocoderWidget" | "DropdownWidget" | "ToggleCheckboxWidget" | "RadioWidget" | "NumberWidget" | "EmailWidget" | "PhoneWidget" | "URLWidget" | "DateWidget" | "SwitchWidget" | "RichTextWidget" | "DateTimeWidget" | "CheckboxWidget" | "ImageUploadWidget" | "MultiImageUploadWidget" | "FileUploadWidget" | "MultiFileUploadWidget" | "MultiDropdownWidget" | "MultiTextWidget">;
5
- export declare const FieldInterfaces: Record<"TextWidget" | "CurrencyWidget" | "TextareaWidget" | "GeocoderWidget" | "MultiGeocoderWidget" | "DropdownWidget" | "ToggleCheckboxWidget" | "RadioWidget" | "NumberWidget" | "EmailWidget" | "PhoneWidget" | "URLWidget" | "DateWidget" | "SwitchWidget" | "RichTextWidget" | "DateTimeWidget" | "CheckboxWidget" | "ImageUploadWidget" | "MultiImageUploadWidget" | "FileUploadWidget" | "MultiFileUploadWidget" | "MultiDropdownWidget" | "MultiTextWidget" | "CollectionWidget" | "ArrayWidget" | "RecordWidget" | "JSONWidget" | "SlugWidget", "TextWidget" | "CurrencyWidget" | "TextareaWidget" | "GeocoderWidget" | "MultiGeocoderWidget" | "DropdownWidget" | "ToggleCheckboxWidget" | "RadioWidget" | "NumberWidget" | "EmailWidget" | "PhoneWidget" | "URLWidget" | "DateWidget" | "SwitchWidget" | "RichTextWidget" | "DateTimeWidget" | "CheckboxWidget" | "ImageUploadWidget" | "MultiImageUploadWidget" | "FileUploadWidget" | "MultiFileUploadWidget" | "MultiDropdownWidget" | "MultiTextWidget" | "CollectionWidget" | "ArrayWidget" | "RecordWidget" | "JSONWidget" | "SlugWidget">;
6
- //# sourceMappingURL=fieldInterfaces.d.ts.map
@@ -1,26 +0,0 @@
1
- import type { FieldInterfacesList } from "./fieldInterfaces";
2
- export declare const FieldKindList: readonly ["collection", "record", "group", "public-id", "string", "array-string", "number", "array-number", "date", "array-date", "boolean", "array-boolean", "json", "array-json", "file", "array-file", "location", "array-location", "richtext", "identifier"];
3
- export declare const FieldKind: {
4
- identifier: "identifier";
5
- collection: "collection";
6
- "public-id": "public-id";
7
- string: "string";
8
- number: "number";
9
- boolean: "boolean";
10
- date: "date";
11
- json: "json";
12
- "array-string": "array-string";
13
- "array-number": "array-number";
14
- "array-date": "array-date";
15
- "array-boolean": "array-boolean";
16
- file: "file";
17
- "array-file": "array-file";
18
- record: "record";
19
- group: "group";
20
- location: "location";
21
- "array-location": "array-location";
22
- richtext: "richtext";
23
- "array-json": "array-json";
24
- };
25
- export declare const interfaceKinds: Record<(typeof FieldInterfacesList)[number], (typeof FieldKindList)[number]>;
26
- //# sourceMappingURL=fieldKind.d.ts.map
@@ -1,8 +0,0 @@
1
- export * from "./collection/fieldInterfaceFormat";
2
- export * from "./collection/defaultByKind";
3
- export * from "./collection/fieldKind";
4
- export * from "./collection/fieldInterfaces";
5
- export * from "./media";
6
- export * from "./oauthProvider";
7
- export * from "./integration";
8
- //# sourceMappingURL=index.d.ts.map
@@ -1,23 +0,0 @@
1
- export declare const LEVO_INTEGRATIONS: {
2
- readonly beacon: "so.levo.beacon";
3
- readonly blog: "so.levo.blog";
4
- readonly event: "so.levo.event";
5
- readonly membership: "so.levo.membership";
6
- readonly payment: "so.levo.payment";
7
- readonly search_console: "com.google.search_console";
8
- };
9
- export declare const LEVO_INTEGRATIONS_LIST: ("so.levo.beacon" | "so.levo.blog" | "so.levo.event" | "so.levo.membership" | "so.levo.payment" | "com.google.search_console")[];
10
- export type ILevoIntegrationList = (typeof LEVO_INTEGRATIONS)[keyof typeof LEVO_INTEGRATIONS][];
11
- export type ILevoIntegrationInstance = {
12
- id: string;
13
- name: string;
14
- publisher: string;
15
- description: string;
16
- url: string | null;
17
- logo: string | null;
18
- dashboard_url: string | null;
19
- sidebar_icon: string | null;
20
- show_on_sidebar: boolean;
21
- key: string;
22
- };
23
- //# sourceMappingURL=integration.d.ts.map
@@ -1,3 +0,0 @@
1
- export declare const MediaKindList: readonly ["image", "video", "audio", "document"];
2
- export declare const MediaKind: Record<"audio" | "video" | "image" | "document", "audio" | "video" | "image" | "document">;
3
- //# sourceMappingURL=media.d.ts.map
@@ -1,3 +0,0 @@
1
- export declare const LevoOAuthProviderList: readonly ["google", "linkedin", "microsoft"];
2
- export type ILevoOAuthProvider = (typeof LevoOAuthProviderList)[number];
3
- //# sourceMappingURL=oauthProvider.d.ts.map
@@ -1,22 +0,0 @@
1
- import { type AnalyticsInstance } from "analytics";
2
- import type { AnalyticsEventType, ILevoAudience } from "../types/audience";
3
- import { IHttpClient } from "../httpClient";
4
- import { ILevoControl } from ".";
5
- export declare const createLevoAudienceModule: (core: ILevoControl, httpClient: IHttpClient) => {
6
- readonly instance: AnalyticsInstance | null;
7
- readonly is_identified: boolean;
8
- storage_keys: {
9
- identify: string;
10
- open_tabs: string;
11
- current_tab: string;
12
- all_tabs: string;
13
- };
14
- initiate: (properties: ILevoAudience.Properties) => Promise<any>;
15
- identify: (options?: {
16
- withLock?: boolean;
17
- }) => Promise<void>;
18
- track: <T extends ILevoAudience.Properties>(event: AnalyticsEventType, properties: T & ILevoAudience.Properties) => Promise<any>;
19
- bounce: (properties: ILevoAudience.Properties) => Promise<void>;
20
- };
21
- export type ILevoAudienceModule = ReturnType<typeof createLevoAudienceModule>;
22
- //# sourceMappingURL=audience.d.ts.map
@@ -1,23 +0,0 @@
1
- export interface ICoreOptions {
2
- appName?: string;
3
- workspace: WorkspaceID | null;
4
- apiUrl: string;
5
- insightsUrl?: string;
6
- NODE_ENV: string;
7
- APP_MODE: string;
8
- }
9
- export type WorkspaceID = `W${string}`;
10
- export declare const workspaceIdRegex: RegExp;
11
- /**
12
- * @description base factory that includes levo workspace details, analytics tools & fetch client
13
- */
14
- export declare const createLevoControl: (options: ICoreOptions) => {
15
- workspace: WorkspaceID | null;
16
- readonly appName: string | undefined;
17
- readonly apiUrl: string;
18
- readonly insightsUrl: string;
19
- readonly NODE_ENV: string;
20
- readonly APP_MODE: string;
21
- };
22
- export type ILevoControl = ReturnType<typeof createLevoControl>;
23
- //# sourceMappingURL=index.d.ts.map
@@ -1,13 +0,0 @@
1
- import { ILevoControl } from "./control";
2
- export interface IPageContext {
3
- url: string;
4
- id?: string;
5
- referrer?: string;
6
- title?: string;
7
- }
8
- export declare const createHttpClient: (core: ILevoControl, pageContext?: IPageContext | null) => {
9
- readonly instance: import("wretch/addons/queryString").QueryStringAddon & import("wretch").Wretch<import("wretch/addons/queryString").QueryStringAddon, unknown, undefined>;
10
- pageContext: IPageContext | null | undefined;
11
- };
12
- export type IHttpClient = ReturnType<typeof createHttpClient>;
13
- //# sourceMappingURL=httpClient.d.ts.map
@@ -1,9 +0,0 @@
1
- export interface IBatchOptions {
2
- logApiUrl?: string;
3
- }
4
- export type CallbackFunction = (log: object) => Promise<void>;
5
- export declare const createLogBatch: (options?: IBatchOptions) => {
6
- ingest: (log: object) => void;
7
- flush: () => Promise<void>;
8
- };
9
- //# sourceMappingURL=batch.d.ts.map
@@ -1,22 +0,0 @@
1
- import { ILevoControl } from "../control";
2
- import { IBatchOptions } from "./batch";
3
- export declare const isBrowser: boolean;
4
- export declare enum LogLevel {
5
- debug = 0,
6
- info = 1,
7
- warn = 2,
8
- error = 3,
9
- off = 100
10
- }
11
- export interface ILoggerOptions extends IBatchOptions {
12
- level?: LogLevel;
13
- enableRemote?: boolean;
14
- context?: Record<string, any>;
15
- }
16
- export declare const createLevoLogger: (core: ILevoControl, options?: ILoggerOptions) => {
17
- debug: (...args: any[]) => void;
18
- info: (...args: any[]) => void;
19
- warn: (...args: any[]) => void;
20
- error: (...args: any[]) => void;
21
- };
22
- //# sourceMappingURL=index.d.ts.map
@@ -1,10 +0,0 @@
1
- import type { BlogClient, IResponseMultiple, IResponseSingle } from "../types";
2
- import type { LevoQuery } from "../types/levo-query";
3
- import { ILevoControl } from "../control";
4
- import { ILevoAudienceModule } from "../control/audience";
5
- import { IHttpClient } from "../httpClient";
6
- export declare const createLevoBlogModule: (core: ILevoControl, httpClient: IHttpClient, audience?: ILevoAudienceModule | null) => {
7
- getAllBlogs: (blog_key: string, data?: LevoQuery.FindQuery, options?: BlogClient.OptionParams) => Promise<IResponseMultiple<BlogClient.BlogData>>;
8
- getSingleBlog: (blog_key: string, slug: string, options?: BlogClient.OptionParams) => Promise<IResponseSingle<BlogClient.BlogData>>;
9
- };
10
- //# sourceMappingURL=blog.d.ts.map
@@ -1,26 +0,0 @@
1
- import type { WretchOptions } from "wretch";
2
- import type { IDraftEntry, ILemaCollection, IResponseMultiple, IResponseSingle, Prettify } from "../types";
3
- import type { LevoQuery } from "../types/levo-query";
4
- import { ILevoControl } from "../control";
5
- import { ILevoAudienceModule } from "../control/audience";
6
- import { IHttpClient } from "../httpClient";
7
- type ColumnKeys = Prettify<keyof ILemaCollection>;
8
- export declare const createLevoCollectionModule: (core: ILevoControl, httpsClient: IHttpClient, audience?: ILevoAudienceModule | null) => {
9
- getAllCollections: (data?: LevoQuery.FindQuery<ColumnKeys>, options?: WretchOptions) => Promise<IResponseMultiple<ILemaCollection>>;
10
- getCollectionByIDExpanded: <T = ILemaCollection>(id: string, options?: WretchOptions) => Promise<IResponseSingle<T>>;
11
- createCollection: (data: ILemaCollection) => Promise<IResponseSingle<ILemaCollection>>;
12
- saveCollectionData: ({ collection_id, data, options, }: {
13
- collection_id: string;
14
- data: any;
15
- options?: WretchOptions;
16
- }) => Promise<IResponseSingle<any>>;
17
- getCollectionContentList: ({ collection_key, page, search, limit, where, }: {
18
- collection_key: string;
19
- } & LevoQuery.FindQuery) => Promise<IResponseMultiple<Record<string, unknown>>>;
20
- saveDraftEntry: (collection_key: string, data: any) => Promise<IResponseSingle<IDraftEntry>>;
21
- editDraftEntry: (collection_key: string, id: string, data: any) => Promise<IResponseSingle<IDraftEntry>>;
22
- getDraftEntry: (collection_key: string) => Promise<IResponseMultiple<IDraftEntry>>;
23
- submitDraftEntry: (collection_key: string, data: any) => Promise<IResponseSingle<IDraftEntry>>;
24
- };
25
- export {};
26
- //# sourceMappingURL=collection.d.ts.map
@@ -1,11 +0,0 @@
1
- import type { WretchOptions } from "wretch";
2
- import type { IMedia, IResponseMultiple } from "../types";
3
- import type { LevoQuery } from "../types/levo-query";
4
- import { ILevoControl } from "../control";
5
- import { ILevoAudienceModule } from "../control/audience";
6
- import { IHttpClient } from "../httpClient";
7
- export declare const createLevoMediaModule: (core: ILevoControl, httpsClient: IHttpClient, audience?: ILevoAudienceModule | null) => {
8
- mediaBulkUpload: (formData: FormData, options?: WretchOptions) => Promise<IResponseMultiple<IMedia>>;
9
- getAllMedia: (data?: LevoQuery.FindQuery) => Promise<IResponseMultiple<IMedia>>;
10
- };
11
- //# sourceMappingURL=media.d.ts.map
@@ -1,21 +0,0 @@
1
- import type { WretchOptions } from "wretch";
2
- import type { ILevoMembership } from "../types/membership";
3
- import { ILevoControl } from "../control";
4
- import { ILevoAudienceModule } from "../control/audience";
5
- import { IHttpClient } from "../httpClient";
6
- export declare const createLevoMembershipModule: (core: ILevoControl, httpsClient: IHttpClient, audience?: ILevoAudienceModule | null) => {
7
- getOAuthURL: (options?: WretchOptions) => Promise<ILevoMembership.OAuthURLList>;
8
- signOut: <T = {
9
- status: boolean;
10
- }>(options?: WretchOptions) => Promise<T>;
11
- getMe: <T = ILevoMembership.Account>(options?: WretchOptions) => Promise<T>;
12
- updateMe: <T = ILevoMembership.Account>(data: ILevoMembership.Request.UpdateMe, options?: WretchOptions) => Promise<T>;
13
- createPassword: <T = ILevoMembership.Account>(data: ILevoMembership.Request.CreatePassword, options?: WretchOptions) => Promise<T>;
14
- isLoggedIn: <T = ILevoMembership.Account>(options?: WretchOptions) => Promise<T | null>;
15
- requestMagicLink: (data: ILevoMembership.Request.RequestMagicLink, options?: WretchOptions) => Promise<Pick<ILevoMembership.Otp, "_id" | "content">>;
16
- requestOtp: (data: ILevoMembership.Request.RequestOtp, options?: WretchOptions) => Promise<Pick<ILevoMembership.Otp, "_id" | "content">>;
17
- signInWithOtp: <T = ILevoMembership.Account>(data: ILevoMembership.Request.SignInWithOtp, options?: WretchOptions) => Promise<T>;
18
- signInWithPassword: <T = ILevoMembership.Account>(data: ILevoMembership.Request.SignInWithPassword, options?: WretchOptions) => Promise<T>;
19
- signUpWithPassword: <T = ILevoMembership.Account>(data: ILevoMembership.Request.SignUpWithPassword, options?: WretchOptions) => Promise<T>;
20
- };
21
- //# sourceMappingURL=membership.d.ts.map
@@ -1,100 +0,0 @@
1
- export declare const AnalyticsEventsList: readonly ["bevy.collection.filled", "bevy.collection.submitted", "bevy.collection.view", "block.view", "blog.post.view", "event.booking.confirmed", "event.booking.initiated", "event.booking.pending", "event.coupon.applied", "event.event.view", "form.change", "form.submit", "membership.account.signin", "membership.account.signout", "membership.account.signup", "button.click", "page.bounce", "page.click", "page.copy", "page.impression", "page.scroll", "page.view", "page.metrics", "page.selection", "page.speedtest", "user.active", "user.speedtest", "user.idle"];
2
- export type AnalyticsEventType = (typeof AnalyticsEventsList)[number];
3
- export declare const AnalyticsEvents: {
4
- "bevy.collection.filled": "bevy.collection.filled";
5
- "bevy.collection.submitted": "bevy.collection.submitted";
6
- "bevy.collection.view": "bevy.collection.view";
7
- "block.view": "block.view";
8
- "blog.post.view": "blog.post.view";
9
- "event.booking.confirmed": "event.booking.confirmed";
10
- "event.booking.initiated": "event.booking.initiated";
11
- "event.booking.pending": "event.booking.pending";
12
- "event.coupon.applied": "event.coupon.applied";
13
- "event.event.view": "event.event.view";
14
- "form.change": "form.change";
15
- "form.submit": "form.submit";
16
- "membership.account.signin": "membership.account.signin";
17
- "membership.account.signout": "membership.account.signout";
18
- "membership.account.signup": "membership.account.signup";
19
- "button.click": "button.click";
20
- "page.bounce": "page.bounce";
21
- "page.click": "page.click";
22
- "page.copy": "page.copy";
23
- "page.impression": "page.impression";
24
- "page.scroll": "page.scroll";
25
- "page.view": "page.view";
26
- "page.metrics": "page.metrics";
27
- "page.selection": "page.selection";
28
- "page.speedtest": "page.speedtest";
29
- "user.active": "user.active";
30
- "user.speedtest": "user.speedtest";
31
- "user.idle": "user.idle";
32
- };
33
- export declare namespace ILevoAudience {
34
- interface Traits {
35
- private_mode: boolean;
36
- dark_mode: boolean;
37
- locale: string;
38
- timezone: string;
39
- referrer: {
40
- type: string;
41
- referrer: Record<string, string>;
42
- data: Record<string, string>;
43
- };
44
- properties: Record<string, any>;
45
- withLock?: boolean;
46
- }
47
- type BaseProperties = Traits & {
48
- resource: string;
49
- identifier: string;
50
- };
51
- interface BlockProperties {
52
- id: string;
53
- }
54
- interface ActivityProperties {
55
- seconds_idle?: number;
56
- seconds_active?: number;
57
- }
58
- interface ScrollProperties {
59
- percent: number;
60
- }
61
- type Properties = Partial<BaseProperties & BlockProperties & ActivityProperties & ScrollProperties> & Partial<Omit<BaseInput, "workspace_id" | "tab_count" | "tab_id">> & Record<string, any>;
62
- type EventProperties = {
63
- properties: Properties;
64
- traits: Traits;
65
- event: AnalyticsEventType;
66
- type: "track" | "page" | "identify";
67
- userId: string | null;
68
- };
69
- type BaseInput = {
70
- workspace_id: string;
71
- hostname: string;
72
- pathname: string;
73
- page_title: string;
74
- url: string;
75
- created_at: string;
76
- tab_id: string;
77
- tab_count: number;
78
- };
79
- type WelcomeInput = Traits & BaseInput;
80
- type WelcomeResponse = {
81
- session: string;
82
- device: string;
83
- };
84
- type CollectInput = BaseInput & {
85
- session_id?: string;
86
- device_id?: string;
87
- event: AnalyticsEventType;
88
- version?: number;
89
- properties: Properties;
90
- resource: string;
91
- identifier: string | undefined;
92
- };
93
- type ActivityStatus = {
94
- isIdle: boolean;
95
- isDisabled: boolean;
96
- active: number;
97
- idle: number;
98
- };
99
- }
100
- //# sourceMappingURL=audience.d.ts.map
@@ -1,30 +0,0 @@
1
- export interface IAuthor {
2
- _id: string;
3
- public_id: string;
4
- slug: string;
5
- first_name: string;
6
- last_name: string;
7
- profile_picture: any;
8
- active_at: Date;
9
- }
10
- export interface IMe {
11
- _id: string;
12
- public_id: string;
13
- slug: string;
14
- first_name: string;
15
- last_name: string;
16
- email: string;
17
- bio: string;
18
- website: string;
19
- profile_picture: any;
20
- og_image: any;
21
- og_title: string;
22
- og_description: string;
23
- meta_title: string;
24
- meta_description: string;
25
- last_access_at: Date;
26
- active_at: Date;
27
- created_at: Date;
28
- updated_at: Date;
29
- }
30
- //# sourceMappingURL=author.d.ts.map
@@ -1,51 +0,0 @@
1
- import type { IPost } from "./post";
2
- export declare namespace BlogClient {
3
- interface CoverImage {
4
- _id: string;
5
- location: string;
6
- mimetype: string;
7
- kind: string;
8
- external: boolean;
9
- }
10
- interface CategoriesEntity {
11
- _id: string;
12
- slug: string;
13
- name: string;
14
- }
15
- interface AuthorsEntity {
16
- posts?: string[] | null;
17
- _id: string;
18
- public_id: string;
19
- slug: string;
20
- first_name: string;
21
- last_name: string;
22
- email: string;
23
- bio: string;
24
- website: string;
25
- profile_picture?: null | {
26
- location: string;
27
- };
28
- og_image: string;
29
- og_title: string;
30
- og_description: string;
31
- meta_title: string;
32
- meta_description: string;
33
- last_access_at: string;
34
- active_at: string;
35
- created_at: string;
36
- updated_at: string;
37
- }
38
- interface IBlogResponse {
39
- meta: {
40
- pages: number;
41
- filter_count: number;
42
- };
43
- data: IPost[];
44
- }
45
- type BlogData = IPost;
46
- interface OptionParams {
47
- workspace_id: string;
48
- params?: Record<string, string>;
49
- }
50
- }
51
- //# sourceMappingURL=blogClient.d.ts.map
@@ -1,20 +0,0 @@
1
- import type { IMediaObject } from "../media";
2
- import type { IPost } from "./post";
3
- export interface IBlogCategory {
4
- posts: IPost[];
5
- _id: string;
6
- blog: string;
7
- slug: string;
8
- name: string;
9
- description: string;
10
- og_image?: IMediaObject;
11
- og_title: string;
12
- og_description: string;
13
- meta_title: string;
14
- meta_description: string;
15
- created_at: Date;
16
- updated_at: Date;
17
- created_by: Date;
18
- updated_by: Date;
19
- }
20
- //# sourceMappingURL=category.d.ts.map