@levo-so/core 0.1.60 → 0.1.62
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/index.d.ts +528 -502
- package/dist/index.js +239 -1204
- package/package.json +9 -15
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as wretch_addons_queryString from 'wretch/addons/queryString';
|
|
2
2
|
import * as wretch from 'wretch';
|
|
3
|
-
import * as analytics from 'analytics';
|
|
4
3
|
|
|
5
4
|
declare const MediaKindList: readonly ["image", "video", "audio", "document"];
|
|
6
|
-
declare const MediaKind: Record<"
|
|
5
|
+
declare const MediaKind: Record<"image" | "video" | "audio" | "document", "image" | "video" | "audio" | "document">;
|
|
7
6
|
|
|
8
7
|
interface IFaviconSrcset {
|
|
9
8
|
"16": string;
|
|
@@ -245,13 +244,11 @@ declare namespace BlogClient {
|
|
|
245
244
|
}
|
|
246
245
|
}
|
|
247
246
|
|
|
248
|
-
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"];
|
|
247
|
+
declare const CommonFieldInterfacesList: readonly ["TextWidget", "CurrencyWidget", "TextareaWidget", "GeocoderWidget", "MultiGeocoderWidget", "DropdownWidget", "ToggleCheckboxWidget", "RadioWidget", "NumberWidget", "EmailWidget", "PhoneWidget", "URLWidget", "DateWidget", "TimeWidget", "SwitchWidget", "RichTextWidget", "DateTimeWidget", "CheckboxWidget", "ImageUploadWidget", "MultiImageUploadWidget", "FileUploadWidget", "MultiFileUploadWidget", "MultiDropdownWidget", "MultiTextWidget"];
|
|
249
248
|
declare const ComplexFieldInterfacesList: readonly ["CollectionWidget", "ArrayWidget", "RecordWidget", "JSONWidget", "SlugWidget"];
|
|
250
|
-
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"];
|
|
251
|
-
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">;
|
|
252
|
-
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">;
|
|
253
|
-
|
|
254
|
-
declare const formatsByInterface: Record<(typeof FieldInterfacesList)[number], string[]>;
|
|
249
|
+
declare const FieldInterfacesList: readonly ["TextWidget", "CurrencyWidget", "TextareaWidget", "GeocoderWidget", "MultiGeocoderWidget", "DropdownWidget", "ToggleCheckboxWidget", "RadioWidget", "NumberWidget", "EmailWidget", "PhoneWidget", "URLWidget", "DateWidget", "TimeWidget", "SwitchWidget", "RichTextWidget", "DateTimeWidget", "CheckboxWidget", "ImageUploadWidget", "MultiImageUploadWidget", "FileUploadWidget", "MultiFileUploadWidget", "MultiDropdownWidget", "MultiTextWidget", "CollectionWidget", "ArrayWidget", "RecordWidget", "JSONWidget", "SlugWidget"];
|
|
250
|
+
declare const CommonFieldIntefaces: Record<"TextWidget" | "CurrencyWidget" | "TextareaWidget" | "GeocoderWidget" | "MultiGeocoderWidget" | "DropdownWidget" | "ToggleCheckboxWidget" | "RadioWidget" | "NumberWidget" | "EmailWidget" | "PhoneWidget" | "URLWidget" | "DateWidget" | "TimeWidget" | "SwitchWidget" | "RichTextWidget" | "DateTimeWidget" | "CheckboxWidget" | "ImageUploadWidget" | "MultiImageUploadWidget" | "FileUploadWidget" | "MultiFileUploadWidget" | "MultiDropdownWidget" | "MultiTextWidget", "TextWidget" | "CurrencyWidget" | "TextareaWidget" | "GeocoderWidget" | "MultiGeocoderWidget" | "DropdownWidget" | "ToggleCheckboxWidget" | "RadioWidget" | "NumberWidget" | "EmailWidget" | "PhoneWidget" | "URLWidget" | "DateWidget" | "TimeWidget" | "SwitchWidget" | "RichTextWidget" | "DateTimeWidget" | "CheckboxWidget" | "ImageUploadWidget" | "MultiImageUploadWidget" | "FileUploadWidget" | "MultiFileUploadWidget" | "MultiDropdownWidget" | "MultiTextWidget">;
|
|
251
|
+
declare const FieldInterfaces: Record<"TextWidget" | "CurrencyWidget" | "TextareaWidget" | "GeocoderWidget" | "MultiGeocoderWidget" | "DropdownWidget" | "ToggleCheckboxWidget" | "RadioWidget" | "NumberWidget" | "EmailWidget" | "PhoneWidget" | "URLWidget" | "DateWidget" | "TimeWidget" | "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" | "TimeWidget" | "SwitchWidget" | "RichTextWidget" | "DateTimeWidget" | "CheckboxWidget" | "ImageUploadWidget" | "MultiImageUploadWidget" | "FileUploadWidget" | "MultiFileUploadWidget" | "MultiDropdownWidget" | "MultiTextWidget" | "CollectionWidget" | "ArrayWidget" | "RecordWidget" | "JSONWidget" | "SlugWidget">;
|
|
255
252
|
|
|
256
253
|
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"];
|
|
257
254
|
declare const FieldKind: {
|
|
@@ -280,8 +277,7 @@ declare const interfaceKinds: Record<(typeof FieldInterfacesList)[number], (type
|
|
|
280
277
|
|
|
281
278
|
declare const defaultByKinds: Record<(typeof FieldKindList)[number], any>;
|
|
282
279
|
|
|
283
|
-
declare const
|
|
284
|
-
type ILevoOAuthProvider = (typeof LevoOAuthProviderList)[number];
|
|
280
|
+
declare const formatsByInterface: Record<(typeof FieldInterfacesList)[number], string[]>;
|
|
285
281
|
|
|
286
282
|
declare const LEVO_INTEGRATIONS: {
|
|
287
283
|
readonly beacon: "so.levo.beacon";
|
|
@@ -307,6 +303,9 @@ type ILevoIntegrationInstance = {
|
|
|
307
303
|
key: string;
|
|
308
304
|
};
|
|
309
305
|
|
|
306
|
+
declare const LevoOAuthProviderList: readonly ["google", "linkedin", "microsoft"];
|
|
307
|
+
type ILevoOAuthProvider = (typeof LevoOAuthProviderList)[number];
|
|
308
|
+
|
|
310
309
|
/**
|
|
311
310
|
* Defines the structure for a field in a generic schema system. Levo Collection builds its own types on top of this, so this type is not used directly.
|
|
312
311
|
*/
|
|
@@ -700,6 +699,8 @@ interface ILemaFieldOptions {
|
|
|
700
699
|
disableValidation?: boolean;
|
|
701
700
|
/** Validation presets for the field. */
|
|
702
701
|
validationsPresets?: string[];
|
|
702
|
+
/** Whether to verify email/phone values or not */
|
|
703
|
+
verification?: boolean;
|
|
703
704
|
}
|
|
704
705
|
/**
|
|
705
706
|
* Represents a field in a Levo Collection schema, including its configuration and options.
|
|
@@ -713,7 +714,7 @@ type ILemaField = Mandatory<Omit<IField, "fields" | "options">, "key" | "kind" |
|
|
|
713
714
|
options: ILemaFieldOptions;
|
|
714
715
|
};
|
|
715
716
|
|
|
716
|
-
type ICollectionsView = "table" | "kanban" | "calendar";
|
|
717
|
+
type ICollectionsView = "table" | "kanban" | "calendar" | "cards";
|
|
717
718
|
interface IGroupBy {
|
|
718
719
|
label: string;
|
|
719
720
|
value: string;
|
|
@@ -725,6 +726,13 @@ interface ICollectionLayoutOptions {
|
|
|
725
726
|
description?: string;
|
|
726
727
|
columnsOrder?: string[];
|
|
727
728
|
selectedColumns?: string[];
|
|
729
|
+
selectedFields?: string[];
|
|
730
|
+
/** Field key for cover image (kanban) */
|
|
731
|
+
coverImage?: string;
|
|
732
|
+
/** Field key for card header (kanban) - defaults to created_at if not set */
|
|
733
|
+
headerField?: string;
|
|
734
|
+
/** Array of field keys to display as info points below description (kanban) */
|
|
735
|
+
infoFields?: string[];
|
|
728
736
|
}
|
|
729
737
|
interface ICollectionLayout {
|
|
730
738
|
kind: ICollectionsView;
|
|
@@ -757,6 +765,264 @@ interface IDraftEntry {
|
|
|
757
765
|
updated_at: string;
|
|
758
766
|
}
|
|
759
767
|
|
|
768
|
+
interface IGeocoderLocation extends Partial<google.maps.places.PlaceResult> {
|
|
769
|
+
place_name: string;
|
|
770
|
+
latitude?: number;
|
|
771
|
+
longitude?: number;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
declare namespace LevoEvent {
|
|
775
|
+
interface Root {
|
|
776
|
+
_id: string;
|
|
777
|
+
cover_image: IMediaObject | null;
|
|
778
|
+
contact_email?: string;
|
|
779
|
+
title: string;
|
|
780
|
+
kind: "virtual" | "in_person";
|
|
781
|
+
timing: string;
|
|
782
|
+
url: string | null;
|
|
783
|
+
location: IGeocoderLocation | null;
|
|
784
|
+
is_location_public?: boolean;
|
|
785
|
+
is_url_public?: boolean;
|
|
786
|
+
starts_at?: string | null;
|
|
787
|
+
ends_at?: string | null;
|
|
788
|
+
cadence: string;
|
|
789
|
+
repeat_every: number;
|
|
790
|
+
description: string;
|
|
791
|
+
slug: string;
|
|
792
|
+
status: "draft" | "canceled" | "published";
|
|
793
|
+
accept_registration: boolean;
|
|
794
|
+
max_capacity: number;
|
|
795
|
+
banners: IMediaObject[];
|
|
796
|
+
created_at: Date;
|
|
797
|
+
created_by: string;
|
|
798
|
+
updated_at: Date;
|
|
799
|
+
updated_by: string;
|
|
800
|
+
external_ticketing?: string;
|
|
801
|
+
ticket_order?: "alphabetical-asc" | "alphabetical-desc" | "price-asc" | "price-desc" | "custom";
|
|
802
|
+
series?: {
|
|
803
|
+
_id: string;
|
|
804
|
+
slug: string;
|
|
805
|
+
name: string;
|
|
806
|
+
description?: string;
|
|
807
|
+
cover_image?: IMediaObject | null;
|
|
808
|
+
status?: string;
|
|
809
|
+
created_at?: string;
|
|
810
|
+
updated_at?: string;
|
|
811
|
+
};
|
|
812
|
+
}
|
|
813
|
+
namespace Ticket {
|
|
814
|
+
interface Tax {
|
|
815
|
+
_id: string;
|
|
816
|
+
label: string;
|
|
817
|
+
percentage: number;
|
|
818
|
+
country_code: string;
|
|
819
|
+
}
|
|
820
|
+
interface Root {
|
|
821
|
+
_id: string;
|
|
822
|
+
event: string;
|
|
823
|
+
icon: IMediaObject | null;
|
|
824
|
+
title: string;
|
|
825
|
+
description: string;
|
|
826
|
+
quantity: number | null;
|
|
827
|
+
starts_at: Date | null;
|
|
828
|
+
ends_at: Date | null;
|
|
829
|
+
waitlist_enabled: boolean;
|
|
830
|
+
requires_approval: boolean;
|
|
831
|
+
hidden: boolean;
|
|
832
|
+
allow_to_upgrade: boolean;
|
|
833
|
+
include_in_upgrade: boolean;
|
|
834
|
+
enforce_max_quantity: boolean;
|
|
835
|
+
status: string;
|
|
836
|
+
offerings: string[];
|
|
837
|
+
coupons: string[];
|
|
838
|
+
sale_count: number;
|
|
839
|
+
currency: string;
|
|
840
|
+
unit_amount: number;
|
|
841
|
+
base_price: number;
|
|
842
|
+
created_at: Date | string;
|
|
843
|
+
created_by: string;
|
|
844
|
+
updated_at: Date | string;
|
|
845
|
+
updated_by: string;
|
|
846
|
+
tax_enabled?: boolean;
|
|
847
|
+
tax_inclusive?: boolean;
|
|
848
|
+
taxes?: Tax[] | string[];
|
|
849
|
+
}
|
|
850
|
+
type Create = Pick<Root, "title" | "description" | "quantity" | "starts_at" | "ends_at" | "waitlist_enabled" | "hidden" | "enforce_max_quantity" | "offerings" | "coupons">;
|
|
851
|
+
}
|
|
852
|
+
namespace Coupon {
|
|
853
|
+
interface Root {
|
|
854
|
+
_id: string;
|
|
855
|
+
event: string;
|
|
856
|
+
code: string;
|
|
857
|
+
description: string | null;
|
|
858
|
+
kind: string;
|
|
859
|
+
percent_off: number | null;
|
|
860
|
+
amount_off: number | null;
|
|
861
|
+
currency: string;
|
|
862
|
+
starts_at: Date | null;
|
|
863
|
+
expires_at: Date | null;
|
|
864
|
+
max_redemptions: number | null;
|
|
865
|
+
minimum_amount: number | null;
|
|
866
|
+
is_public: boolean;
|
|
867
|
+
created_at: Date;
|
|
868
|
+
created_by: string;
|
|
869
|
+
updated_at: Date;
|
|
870
|
+
updated_by: string;
|
|
871
|
+
status: string;
|
|
872
|
+
tickets: string[];
|
|
873
|
+
}
|
|
874
|
+
type Create = Pick<Root, "code" | "description" | "kind" | "percent_off" | "amount_off" | "currency" | "starts_at" | "expires_at" | "max_redemptions" | "minimum_amount" | "is_public" | "tickets">;
|
|
875
|
+
type CreateBulk = Pick<Root, "description" | "kind" | "percent_off" | "amount_off" | "currency" | "starts_at" | "expires_at" | "max_redemptions" | "minimum_amount" | "is_public" | "tickets"> & {
|
|
876
|
+
coupon_count: number;
|
|
877
|
+
code_length: number;
|
|
878
|
+
};
|
|
879
|
+
type Update = Partial<Pick<Root, "code" | "description" | "kind" | "percent_off" | "amount_off" | "currency" | "starts_at" | "expires_at" | "max_redemptions" | "minimum_amount" | "is_public" | "tickets">>;
|
|
880
|
+
type Validate = {
|
|
881
|
+
base_amount: number;
|
|
882
|
+
sale_amount: number;
|
|
883
|
+
discountable_amount: number;
|
|
884
|
+
discount: number;
|
|
885
|
+
};
|
|
886
|
+
}
|
|
887
|
+
namespace Offering {
|
|
888
|
+
interface Root {
|
|
889
|
+
_id: string;
|
|
890
|
+
event: string;
|
|
891
|
+
title: string;
|
|
892
|
+
description: string;
|
|
893
|
+
enabled: boolean;
|
|
894
|
+
checkin_count: number;
|
|
895
|
+
tickets: string[];
|
|
896
|
+
attendees: string[];
|
|
897
|
+
created_at: Date;
|
|
898
|
+
created_by: string;
|
|
899
|
+
updated_at: Date;
|
|
900
|
+
updated_by: string;
|
|
901
|
+
}
|
|
902
|
+
type Create = Pick<Root, "title" | "description" | "enabled" | "tickets">;
|
|
903
|
+
type Update = Partial<Pick<Root, "title" | "description" | "enabled" | "tickets">>;
|
|
904
|
+
}
|
|
905
|
+
namespace Attendee {
|
|
906
|
+
interface Root {
|
|
907
|
+
_id: string;
|
|
908
|
+
public_id: string;
|
|
909
|
+
name: string;
|
|
910
|
+
email: string;
|
|
911
|
+
mobile: string | null;
|
|
912
|
+
event: string;
|
|
913
|
+
booking: Booking.Root;
|
|
914
|
+
ticket: Pick<LevoEvent.Ticket.Root, "_id" | "title" | "currency" | "quantity" | "status" | "unit_amount">;
|
|
915
|
+
price: string;
|
|
916
|
+
account: string | null;
|
|
917
|
+
status: string;
|
|
918
|
+
created_at: Date;
|
|
919
|
+
updated_at: Date;
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
namespace Booking {
|
|
923
|
+
interface Root {
|
|
924
|
+
_id: string;
|
|
925
|
+
slug: string;
|
|
926
|
+
public_id: string;
|
|
927
|
+
quantity: number;
|
|
928
|
+
unit_amount: number;
|
|
929
|
+
total_amount?: number;
|
|
930
|
+
discount: number;
|
|
931
|
+
currency: string;
|
|
932
|
+
payment_link: string | null;
|
|
933
|
+
account: string | null;
|
|
934
|
+
event: string;
|
|
935
|
+
coupon: string | null;
|
|
936
|
+
code: string | null;
|
|
937
|
+
status: string;
|
|
938
|
+
paid: boolean;
|
|
939
|
+
info: Record<string, any>;
|
|
940
|
+
taxes?: Array<{
|
|
941
|
+
id: string;
|
|
942
|
+
label: string;
|
|
943
|
+
percentage: number;
|
|
944
|
+
amount: number;
|
|
945
|
+
}>;
|
|
946
|
+
qr_image: IMediaObject & {
|
|
947
|
+
width: number;
|
|
948
|
+
height: number;
|
|
949
|
+
};
|
|
950
|
+
/** Invoice PDF file (same shape as qr_image), null if not generated */
|
|
951
|
+
invoice: (IMediaObject & {
|
|
952
|
+
width: number;
|
|
953
|
+
height: number;
|
|
954
|
+
}) | null;
|
|
955
|
+
created_at: Date;
|
|
956
|
+
updated_at: Date;
|
|
957
|
+
attendees: LevoEvent.Attendee.Root[];
|
|
958
|
+
}
|
|
959
|
+
type Create = Omit<Pick<Root, "event" | "coupon">, "attendees"> & {
|
|
960
|
+
attendees: Mandatory<LevoEvent.Attendee.Root, "name" | "ticket" | "email">;
|
|
961
|
+
};
|
|
962
|
+
}
|
|
963
|
+
namespace Series {
|
|
964
|
+
interface Root {
|
|
965
|
+
_id: string;
|
|
966
|
+
slug: string;
|
|
967
|
+
name: string;
|
|
968
|
+
description: string;
|
|
969
|
+
cover_image: string | null;
|
|
970
|
+
status: "published" | string;
|
|
971
|
+
created_at: string;
|
|
972
|
+
updated_at: string;
|
|
973
|
+
events: any[];
|
|
974
|
+
}
|
|
975
|
+
interface Create {
|
|
976
|
+
name: string;
|
|
977
|
+
}
|
|
978
|
+
interface Update {
|
|
979
|
+
name: string;
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
/**
|
|
984
|
+
* Main Object
|
|
985
|
+
*/
|
|
986
|
+
interface IAttendee {
|
|
987
|
+
checkin_at?: Date | null;
|
|
988
|
+
_id: string;
|
|
989
|
+
public_id: string;
|
|
990
|
+
name: string;
|
|
991
|
+
email: string;
|
|
992
|
+
mobile: string | null;
|
|
993
|
+
event: string;
|
|
994
|
+
booking: string;
|
|
995
|
+
ticket: Record<string, string>;
|
|
996
|
+
price: string;
|
|
997
|
+
account?: any;
|
|
998
|
+
status: string;
|
|
999
|
+
created_at: string;
|
|
1000
|
+
updated_at: string;
|
|
1001
|
+
}
|
|
1002
|
+
interface IBooking {
|
|
1003
|
+
_id: string;
|
|
1004
|
+
public_id: string;
|
|
1005
|
+
quantity: number;
|
|
1006
|
+
unit_amount: number;
|
|
1007
|
+
total_amount?: number;
|
|
1008
|
+
event: string;
|
|
1009
|
+
currency: string;
|
|
1010
|
+
account: string;
|
|
1011
|
+
coupon?: null;
|
|
1012
|
+
status: string;
|
|
1013
|
+
paid: boolean;
|
|
1014
|
+
discount: number;
|
|
1015
|
+
taxes?: Array<{
|
|
1016
|
+
id: string;
|
|
1017
|
+
label: string;
|
|
1018
|
+
percentage: number;
|
|
1019
|
+
amount: number;
|
|
1020
|
+
}>;
|
|
1021
|
+
created_at: string;
|
|
1022
|
+
updated_at: string;
|
|
1023
|
+
attendees?: IAttendee[];
|
|
1024
|
+
}
|
|
1025
|
+
|
|
760
1026
|
declare namespace ILevoMembership {
|
|
761
1027
|
interface sub_account_oauth_credentials {
|
|
762
1028
|
provider: string;
|
|
@@ -937,112 +1203,256 @@ declare namespace ILevoMembership {
|
|
|
937
1203
|
export { };
|
|
938
1204
|
}
|
|
939
1205
|
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
"page.selection": "page.selection";
|
|
966
|
-
"user.active": "user.active";
|
|
967
|
-
"user.idle": "user.idle";
|
|
1206
|
+
interface IOrganization {
|
|
1207
|
+
_id: string;
|
|
1208
|
+
accounts: string[];
|
|
1209
|
+
approval_status: string | null;
|
|
1210
|
+
approval_updated_at: string | null;
|
|
1211
|
+
approval_updated_by: string | null;
|
|
1212
|
+
created_at: string | null;
|
|
1213
|
+
deleted_at: string | null;
|
|
1214
|
+
member_count: number | null;
|
|
1215
|
+
name: string;
|
|
1216
|
+
owner: string;
|
|
1217
|
+
referral_code: string;
|
|
1218
|
+
referral_count: number | null;
|
|
1219
|
+
size: string;
|
|
1220
|
+
updated_at: string | null;
|
|
1221
|
+
badge_granted_at: string | null;
|
|
1222
|
+
logo: IMediaObject | null;
|
|
1223
|
+
icon: IMediaObject | null;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
declare const FORUM_POST_KIND: {
|
|
1227
|
+
readonly post: "post";
|
|
1228
|
+
readonly poll: "poll";
|
|
1229
|
+
readonly gallery: "gallery";
|
|
1230
|
+
readonly link: "link";
|
|
968
1231
|
};
|
|
969
|
-
declare
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1232
|
+
declare const ForumPostKindExpandedList: Array<keyof typeof FORUM_POST_KIND>;
|
|
1233
|
+
type ForumPostKind = (typeof ForumPostKindExpandedList)[number];
|
|
1234
|
+
declare const FORUM_POST_STATUS: {
|
|
1235
|
+
readonly draft: "draft";
|
|
1236
|
+
readonly published: "published";
|
|
1237
|
+
readonly unpublished: "unpublished";
|
|
1238
|
+
readonly archived: "archived";
|
|
1239
|
+
readonly flagged: "flagged";
|
|
1240
|
+
readonly pending_moderation: "pending_moderation";
|
|
1241
|
+
};
|
|
1242
|
+
type ForumPostStatus = (typeof FORUM_POST_STATUS)[keyof typeof FORUM_POST_STATUS];
|
|
1243
|
+
interface IForumPostOption {
|
|
1244
|
+
_id: string;
|
|
1245
|
+
count: number;
|
|
1246
|
+
label: string;
|
|
1247
|
+
}
|
|
1248
|
+
interface IForumPostLinkMetaData {
|
|
1249
|
+
meta_title: string;
|
|
1250
|
+
meta_description: string;
|
|
1251
|
+
og_image: IMediaObject | null;
|
|
1252
|
+
}
|
|
1253
|
+
interface IForumPost {
|
|
1254
|
+
_id: string;
|
|
1255
|
+
comments_count: number;
|
|
1256
|
+
created_at: string;
|
|
1257
|
+
created_by?: ILevoMembership.Account | null;
|
|
1258
|
+
expires_at?: string | null;
|
|
1259
|
+
kind: ForumPostKind;
|
|
1260
|
+
upvote_count: number;
|
|
1261
|
+
upvoted_at: string | null;
|
|
1262
|
+
downvote_count: number;
|
|
1263
|
+
downvoted_at: string | null;
|
|
1264
|
+
media: IMediaObject[];
|
|
1265
|
+
metadata: Partial<IForumPostLinkMetaData> | null;
|
|
1266
|
+
published_at: string | null;
|
|
1267
|
+
show_participant_list: boolean;
|
|
1268
|
+
show_participant_vote: boolean;
|
|
1269
|
+
slug: string;
|
|
1270
|
+
url: string;
|
|
1271
|
+
title: string;
|
|
1272
|
+
content?: string;
|
|
1273
|
+
updated_at: string;
|
|
1274
|
+
deleted_at: string | null;
|
|
1275
|
+
deleted_by: string | null;
|
|
1276
|
+
vote_count?: number | null;
|
|
1277
|
+
total_votes?: number | null;
|
|
1278
|
+
user_voted_option?: string | null;
|
|
1279
|
+
options: IForumPostOption[];
|
|
1280
|
+
thread: string | null;
|
|
1281
|
+
resource_type: string;
|
|
1282
|
+
status?: ForumPostStatus;
|
|
1283
|
+
organization: IOrganization | null;
|
|
1284
|
+
categories: IForumCategory[];
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
interface IForumCategory {
|
|
1288
|
+
posts: IForumPost[];
|
|
1289
|
+
_id: string;
|
|
1290
|
+
forum: string;
|
|
1291
|
+
slug: string;
|
|
1292
|
+
name: string;
|
|
1293
|
+
description: string;
|
|
1294
|
+
og_image?: IMediaObject;
|
|
1295
|
+
og_title: string;
|
|
1296
|
+
og_description: string;
|
|
1297
|
+
meta_title: string;
|
|
1298
|
+
meta_description: string;
|
|
1299
|
+
created_at: string;
|
|
1300
|
+
updated_at: string;
|
|
1301
|
+
created_by: string;
|
|
1302
|
+
updated_by: string;
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
declare const COMMENT_STATUS: {
|
|
1306
|
+
readonly published: "published";
|
|
1307
|
+
readonly unpublished: "unpublished";
|
|
1308
|
+
readonly archived: "archived";
|
|
1309
|
+
readonly flagged: "flagged";
|
|
1310
|
+
readonly pending_moderation: "pending_moderation";
|
|
1311
|
+
};
|
|
1312
|
+
type CommentStatus = (typeof COMMENT_STATUS)[keyof typeof COMMENT_STATUS];
|
|
1313
|
+
/**
|
|
1314
|
+
* Comment thread settings
|
|
1315
|
+
*/
|
|
1316
|
+
interface ICommentThreadSettings {
|
|
1317
|
+
auto_approve: boolean;
|
|
1318
|
+
max_depth: number;
|
|
1319
|
+
moderation_enabled: boolean;
|
|
1320
|
+
}
|
|
1321
|
+
/**
|
|
1322
|
+
* Comment thread metadata
|
|
1323
|
+
*/
|
|
1324
|
+
interface IThread {
|
|
1325
|
+
_id: string;
|
|
1326
|
+
comment_count: number;
|
|
1327
|
+
created_at: string;
|
|
1328
|
+
last_comment_at: string;
|
|
1329
|
+
resource_id: string;
|
|
1330
|
+
resource_type: string;
|
|
1331
|
+
settings: ICommentThreadSettings;
|
|
1332
|
+
status: string;
|
|
1333
|
+
updated_at: string;
|
|
1334
|
+
}
|
|
1335
|
+
interface IComment {
|
|
1336
|
+
_id: string;
|
|
1337
|
+
author: ILevoMembership.Account | null;
|
|
1338
|
+
content: string;
|
|
1339
|
+
created_at: string;
|
|
1340
|
+
edited_at: string | null;
|
|
1341
|
+
flag_count: number;
|
|
1342
|
+
parent: IComment | null;
|
|
1343
|
+
status: string;
|
|
1344
|
+
thread: IThread;
|
|
1345
|
+
updated_at: string;
|
|
1346
|
+
moderation_reason: string;
|
|
1347
|
+
reply_count: number;
|
|
1348
|
+
replies: IComment[];
|
|
1349
|
+
user_flagged: boolean;
|
|
1350
|
+
user_liked: boolean;
|
|
1351
|
+
upvote_count: number;
|
|
1352
|
+
downvote_count: number;
|
|
1353
|
+
organization: IOrganization | null;
|
|
1354
|
+
post?: IForumPost;
|
|
1355
|
+
}
|
|
1356
|
+
interface ICommentsUserEngagement {
|
|
1357
|
+
comment_id: string;
|
|
1358
|
+
user_flagged: boolean;
|
|
1359
|
+
user_liked: boolean;
|
|
1360
|
+
upvoted_at: string | null;
|
|
1361
|
+
downvoted_at: string | null;
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
interface IForum {
|
|
1365
|
+
_id: string;
|
|
1366
|
+
name: string;
|
|
1367
|
+
slug: string;
|
|
1368
|
+
description: string;
|
|
1369
|
+
status: string;
|
|
1370
|
+
settings: IForumSettings;
|
|
1371
|
+
created_at: string;
|
|
1372
|
+
}
|
|
1373
|
+
interface IForumSettings {
|
|
1374
|
+
enable_ai_moderation_for_comment: boolean;
|
|
1375
|
+
enable_auto_approve_for_comment: boolean;
|
|
1376
|
+
allow_reporting_for_comment: boolean;
|
|
1377
|
+
allow_moderator_to_delete_comment: boolean;
|
|
1378
|
+
allow_moderator_to_unpublish_comment: boolean;
|
|
1379
|
+
enable_ai_moderation_for_post: boolean;
|
|
1380
|
+
enable_auto_approve_for_post: boolean;
|
|
1381
|
+
allow_reporting_for_post: boolean;
|
|
1382
|
+
allow_moderator_to_delete_post: boolean;
|
|
1383
|
+
allow_moderator_to_unpublish_post: boolean;
|
|
1384
|
+
allow_users_to_create_post: boolean;
|
|
1385
|
+
invite_only: boolean;
|
|
1386
|
+
allow_join_requests: boolean;
|
|
1387
|
+
allow_public_view_for_post: boolean;
|
|
1388
|
+
allow_public_view_for_comment: boolean;
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
/**
|
|
1392
|
+
* Forum Member Object
|
|
1393
|
+
*
|
|
1394
|
+
* forum: Forum ID
|
|
1395
|
+
*
|
|
1396
|
+
* account: Membership
|
|
1397
|
+
*/
|
|
1398
|
+
interface IForumMember {
|
|
1399
|
+
_id: string;
|
|
1400
|
+
forum: string;
|
|
1401
|
+
account: ILevoMembership.Account;
|
|
1402
|
+
created_by: ILevoMembership.Account;
|
|
1403
|
+
created_at: string;
|
|
1404
|
+
updated_at: string;
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
/**
|
|
1408
|
+
* Forum Join Request Object
|
|
1409
|
+
*
|
|
1410
|
+
* Represents a user's request to join an invite-only forum
|
|
1411
|
+
*/
|
|
1412
|
+
interface IForumJoinRequest {
|
|
1413
|
+
_id: string;
|
|
1414
|
+
forum: string;
|
|
1415
|
+
account: ILevoMembership.Account;
|
|
1416
|
+
message?: string;
|
|
1417
|
+
created_at: string;
|
|
1418
|
+
updated_at: string;
|
|
1419
|
+
}
|
|
1420
|
+
/**
|
|
1421
|
+
* Response from GET /v1/community/:forum/member/get-me
|
|
1422
|
+
*
|
|
1423
|
+
* Contains both member status and pending join request
|
|
1424
|
+
*/
|
|
1425
|
+
interface IForumMembershipStatus {
|
|
1426
|
+
member: IForumMember | null;
|
|
1427
|
+
join_request: IForumJoinRequest | null;
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
interface IForumTag {
|
|
1431
|
+
posts: IForumPost[];
|
|
1432
|
+
_id: string;
|
|
1433
|
+
forum: string;
|
|
1434
|
+
slug: string;
|
|
1435
|
+
name: string;
|
|
1436
|
+
description: string;
|
|
1437
|
+
og_image?: IMediaObject;
|
|
1438
|
+
og_title: string;
|
|
1439
|
+
og_description: string;
|
|
1440
|
+
meta_title: string;
|
|
1441
|
+
meta_description: string;
|
|
1442
|
+
created_at: string;
|
|
1443
|
+
updated_at: string;
|
|
1444
|
+
created_by: string;
|
|
1445
|
+
updated_by: string;
|
|
1036
1446
|
}
|
|
1037
1447
|
|
|
1038
1448
|
interface IMeta {
|
|
1039
1449
|
total: number;
|
|
1040
1450
|
pages: number;
|
|
1041
1451
|
}
|
|
1042
|
-
interface IResponseMultiple<T = Record<string, unknown
|
|
1452
|
+
interface IResponseMultiple<T = Record<string, unknown>, U = IMeta> {
|
|
1043
1453
|
status: boolean;
|
|
1044
1454
|
content: {
|
|
1045
|
-
meta:
|
|
1455
|
+
meta: U;
|
|
1046
1456
|
data: T[];
|
|
1047
1457
|
};
|
|
1048
1458
|
}
|
|
@@ -1236,6 +1646,8 @@ interface IWorkspace {
|
|
|
1236
1646
|
linkedin?: string;
|
|
1237
1647
|
instagram?: string;
|
|
1238
1648
|
};
|
|
1649
|
+
/** Whether user has an existing website or is creating new */
|
|
1650
|
+
website_status?: "existing" | "new";
|
|
1239
1651
|
};
|
|
1240
1652
|
settings: {
|
|
1241
1653
|
head_code?: string;
|
|
@@ -1251,359 +1663,10 @@ interface IWorkspace {
|
|
|
1251
1663
|
subscription: ISubscription | null;
|
|
1252
1664
|
}
|
|
1253
1665
|
|
|
1254
|
-
interface IGeocoderLocation extends Partial<google.maps.places.PlaceResult> {
|
|
1255
|
-
place_name: string;
|
|
1256
|
-
latitude?: number;
|
|
1257
|
-
longitude?: number;
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
declare namespace LevoEvent {
|
|
1261
|
-
interface Root {
|
|
1262
|
-
_id: string;
|
|
1263
|
-
cover_image: IMediaObject | null;
|
|
1264
|
-
contact_email?: string;
|
|
1265
|
-
title: string;
|
|
1266
|
-
kind: "virtual" | "in_person";
|
|
1267
|
-
timing: string;
|
|
1268
|
-
url: string | null;
|
|
1269
|
-
location: IGeocoderLocation | null;
|
|
1270
|
-
is_location_public?: boolean;
|
|
1271
|
-
is_url_public?: boolean;
|
|
1272
|
-
starts_at?: string | null;
|
|
1273
|
-
ends_at?: string | null;
|
|
1274
|
-
cadence: string;
|
|
1275
|
-
repeat_every: number;
|
|
1276
|
-
description: string;
|
|
1277
|
-
slug: string;
|
|
1278
|
-
status: "draft" | "canceled" | "published";
|
|
1279
|
-
accept_registration: boolean;
|
|
1280
|
-
max_capacity: number;
|
|
1281
|
-
banners: IMediaObject[];
|
|
1282
|
-
created_at: Date;
|
|
1283
|
-
created_by: string;
|
|
1284
|
-
updated_at: Date;
|
|
1285
|
-
updated_by: string;
|
|
1286
|
-
external_ticketing?: string;
|
|
1287
|
-
ticket_order?: "alphabetical-asc" | "alphabetical-desc" | "price-asc" | "price-desc" | "custom";
|
|
1288
|
-
series?: {
|
|
1289
|
-
_id: string;
|
|
1290
|
-
slug: string;
|
|
1291
|
-
name: string;
|
|
1292
|
-
description?: string;
|
|
1293
|
-
cover_image?: IMediaObject | null;
|
|
1294
|
-
status?: string;
|
|
1295
|
-
created_at?: string;
|
|
1296
|
-
updated_at?: string;
|
|
1297
|
-
};
|
|
1298
|
-
}
|
|
1299
|
-
namespace Ticket {
|
|
1300
|
-
interface Root {
|
|
1301
|
-
_id: string;
|
|
1302
|
-
event: string;
|
|
1303
|
-
icon: IMediaObject | null;
|
|
1304
|
-
title: string;
|
|
1305
|
-
description: string;
|
|
1306
|
-
quantity: number | null;
|
|
1307
|
-
starts_at: Date | null;
|
|
1308
|
-
ends_at: Date | null;
|
|
1309
|
-
waitlist_enabled: boolean;
|
|
1310
|
-
requires_approval: boolean;
|
|
1311
|
-
hidden: boolean;
|
|
1312
|
-
allow_to_upgrade: boolean;
|
|
1313
|
-
include_in_upgrade: boolean;
|
|
1314
|
-
enforce_max_quantity: boolean;
|
|
1315
|
-
status: string;
|
|
1316
|
-
offerings: string[];
|
|
1317
|
-
coupons: string[];
|
|
1318
|
-
sale_count: number;
|
|
1319
|
-
currency: string;
|
|
1320
|
-
unit_amount: number;
|
|
1321
|
-
base_price: number;
|
|
1322
|
-
created_at: Date | string;
|
|
1323
|
-
created_by: string;
|
|
1324
|
-
updated_at: Date | string;
|
|
1325
|
-
updated_by: string;
|
|
1326
|
-
}
|
|
1327
|
-
type Create = Pick<Root, "title" | "description" | "quantity" | "starts_at" | "ends_at" | "waitlist_enabled" | "hidden" | "enforce_max_quantity" | "offerings" | "coupons">;
|
|
1328
|
-
}
|
|
1329
|
-
namespace Coupon {
|
|
1330
|
-
interface Root {
|
|
1331
|
-
_id: string;
|
|
1332
|
-
event: string;
|
|
1333
|
-
code: string;
|
|
1334
|
-
kind: string;
|
|
1335
|
-
percent_off: number | null;
|
|
1336
|
-
amount_off: number | null;
|
|
1337
|
-
currency: string;
|
|
1338
|
-
starts_at: Date | null;
|
|
1339
|
-
expires_at: Date | null;
|
|
1340
|
-
max_redemptions: number | null;
|
|
1341
|
-
minimum_amount: number | null;
|
|
1342
|
-
is_public: boolean;
|
|
1343
|
-
created_at: Date;
|
|
1344
|
-
created_by: string;
|
|
1345
|
-
updated_at: Date;
|
|
1346
|
-
updated_by: string;
|
|
1347
|
-
status: string;
|
|
1348
|
-
tickets: string[];
|
|
1349
|
-
}
|
|
1350
|
-
type Create = Pick<Root, "code" | "kind" | "percent_off" | "amount_off" | "currency" | "starts_at" | "expires_at" | "max_redemptions" | "minimum_amount" | "is_public" | "tickets">;
|
|
1351
|
-
type CreateBulk = Pick<Root, "kind" | "percent_off" | "amount_off" | "currency" | "starts_at" | "expires_at" | "max_redemptions" | "minimum_amount" | "is_public" | "tickets"> & {
|
|
1352
|
-
coupon_count: number;
|
|
1353
|
-
code_length: number;
|
|
1354
|
-
};
|
|
1355
|
-
type Update = Partial<Pick<Root, "code" | "kind" | "percent_off" | "amount_off" | "currency" | "starts_at" | "expires_at" | "max_redemptions" | "minimum_amount" | "is_public" | "tickets">>;
|
|
1356
|
-
type Validate = {
|
|
1357
|
-
base_amount: number;
|
|
1358
|
-
sale_amount: number;
|
|
1359
|
-
discountable_amount: number;
|
|
1360
|
-
discount: number;
|
|
1361
|
-
};
|
|
1362
|
-
}
|
|
1363
|
-
namespace Offering {
|
|
1364
|
-
interface Root {
|
|
1365
|
-
_id: string;
|
|
1366
|
-
event: string;
|
|
1367
|
-
title: string;
|
|
1368
|
-
description: string;
|
|
1369
|
-
enabled: boolean;
|
|
1370
|
-
checkin_count: number;
|
|
1371
|
-
tickets: string[];
|
|
1372
|
-
attendees: string[];
|
|
1373
|
-
created_at: Date;
|
|
1374
|
-
created_by: string;
|
|
1375
|
-
updated_at: Date;
|
|
1376
|
-
updated_by: string;
|
|
1377
|
-
}
|
|
1378
|
-
type Create = Pick<Root, "title" | "description" | "enabled" | "tickets">;
|
|
1379
|
-
type Update = Partial<Pick<Root, "title" | "description" | "enabled" | "tickets">>;
|
|
1380
|
-
}
|
|
1381
|
-
namespace Attendee {
|
|
1382
|
-
interface Root {
|
|
1383
|
-
_id: string;
|
|
1384
|
-
public_id: string;
|
|
1385
|
-
name: string;
|
|
1386
|
-
email: string;
|
|
1387
|
-
mobile: string | null;
|
|
1388
|
-
event: string;
|
|
1389
|
-
booking: Booking.Root;
|
|
1390
|
-
ticket: Pick<LevoEvent.Ticket.Root, "_id" | "title" | "currency" | "quantity" | "status" | "unit_amount">;
|
|
1391
|
-
price: string;
|
|
1392
|
-
account: string | null;
|
|
1393
|
-
status: string;
|
|
1394
|
-
created_at: Date;
|
|
1395
|
-
updated_at: Date;
|
|
1396
|
-
}
|
|
1397
|
-
}
|
|
1398
|
-
namespace Booking {
|
|
1399
|
-
interface Root {
|
|
1400
|
-
_id: string;
|
|
1401
|
-
slug: string;
|
|
1402
|
-
public_id: string;
|
|
1403
|
-
quantity: number;
|
|
1404
|
-
unit_amount: number;
|
|
1405
|
-
discount: number;
|
|
1406
|
-
currency: string;
|
|
1407
|
-
payment_link: string | null;
|
|
1408
|
-
account: string | null;
|
|
1409
|
-
event: string;
|
|
1410
|
-
coupon: string | null;
|
|
1411
|
-
code: string | null;
|
|
1412
|
-
status: string;
|
|
1413
|
-
paid: boolean;
|
|
1414
|
-
info: Record<string, any>;
|
|
1415
|
-
qr_image: IMediaObject & {
|
|
1416
|
-
width: number;
|
|
1417
|
-
height: number;
|
|
1418
|
-
};
|
|
1419
|
-
created_at: Date;
|
|
1420
|
-
updated_at: Date;
|
|
1421
|
-
attendees: LevoEvent.Attendee.Root[];
|
|
1422
|
-
}
|
|
1423
|
-
type Create = Omit<Pick<Root, "event" | "coupon">, "attendees"> & {
|
|
1424
|
-
attendees: Mandatory<LevoEvent.Attendee.Root, "name" | "ticket" | "email">;
|
|
1425
|
-
};
|
|
1426
|
-
}
|
|
1427
|
-
namespace Series {
|
|
1428
|
-
interface Root {
|
|
1429
|
-
_id: string;
|
|
1430
|
-
slug: string;
|
|
1431
|
-
name: string;
|
|
1432
|
-
description: string;
|
|
1433
|
-
cover_image: string | null;
|
|
1434
|
-
status: "published" | string;
|
|
1435
|
-
created_at: string;
|
|
1436
|
-
updated_at: string;
|
|
1437
|
-
events: any[];
|
|
1438
|
-
}
|
|
1439
|
-
interface Create {
|
|
1440
|
-
name: string;
|
|
1441
|
-
}
|
|
1442
|
-
interface Update {
|
|
1443
|
-
name: string;
|
|
1444
|
-
}
|
|
1445
|
-
}
|
|
1446
|
-
}
|
|
1447
|
-
/**
|
|
1448
|
-
* Main Object
|
|
1449
|
-
*/
|
|
1450
|
-
interface IAttendee {
|
|
1451
|
-
checkin_at?: Date | null;
|
|
1452
|
-
_id: string;
|
|
1453
|
-
public_id: string;
|
|
1454
|
-
name: string;
|
|
1455
|
-
email: string;
|
|
1456
|
-
mobile: string | null;
|
|
1457
|
-
event: string;
|
|
1458
|
-
booking: string;
|
|
1459
|
-
ticket: Record<string, string>;
|
|
1460
|
-
price: string;
|
|
1461
|
-
account?: any;
|
|
1462
|
-
status: string;
|
|
1463
|
-
created_at: string;
|
|
1464
|
-
updated_at: string;
|
|
1465
|
-
}
|
|
1466
|
-
interface IBooking {
|
|
1467
|
-
_id: string;
|
|
1468
|
-
public_id: string;
|
|
1469
|
-
quantity: number;
|
|
1470
|
-
unit_amount: number;
|
|
1471
|
-
event: string;
|
|
1472
|
-
currency: string;
|
|
1473
|
-
account: string;
|
|
1474
|
-
coupon?: null;
|
|
1475
|
-
status: string;
|
|
1476
|
-
paid: boolean;
|
|
1477
|
-
discount: number;
|
|
1478
|
-
created_at: string;
|
|
1479
|
-
updated_at: string;
|
|
1480
|
-
attendees?: IAttendee[];
|
|
1481
|
-
}
|
|
1482
|
-
|
|
1483
|
-
declare const FORUM_POST_KIND: {
|
|
1484
|
-
readonly post: "post";
|
|
1485
|
-
readonly poll: "poll";
|
|
1486
|
-
readonly gallery: "gallery";
|
|
1487
|
-
readonly link: "link";
|
|
1488
|
-
};
|
|
1489
|
-
declare const ForumPostKindExpandedList: Array<keyof typeof FORUM_POST_KIND>;
|
|
1490
|
-
type ForumPostKind = (typeof ForumPostKindExpandedList)[number];
|
|
1491
|
-
interface IForumPostOption {
|
|
1492
|
-
_id: string;
|
|
1493
|
-
count: number;
|
|
1494
|
-
label: string;
|
|
1495
|
-
}
|
|
1496
|
-
interface IForumPostLinkMetaData {
|
|
1497
|
-
meta_title: string;
|
|
1498
|
-
meta_description: string;
|
|
1499
|
-
og_image: IMediaObject | null;
|
|
1500
|
-
}
|
|
1501
|
-
interface IForumPost {
|
|
1502
|
-
_id: string;
|
|
1503
|
-
comments_count: number;
|
|
1504
|
-
created_at: string;
|
|
1505
|
-
created_by?: ILevoMembership.Account | null;
|
|
1506
|
-
expires_at?: string | null;
|
|
1507
|
-
kind: ForumPostKind;
|
|
1508
|
-
upvote_count: number;
|
|
1509
|
-
upvoted_at: string | null;
|
|
1510
|
-
downvote_count: number;
|
|
1511
|
-
downvoted_at: string | null;
|
|
1512
|
-
media: IMediaObject[];
|
|
1513
|
-
metadata: Partial<IForumPostLinkMetaData> | null;
|
|
1514
|
-
published_at: string | null;
|
|
1515
|
-
show_participant_list: boolean;
|
|
1516
|
-
show_participant_vote: boolean;
|
|
1517
|
-
slug: string;
|
|
1518
|
-
url: string;
|
|
1519
|
-
title: string;
|
|
1520
|
-
content?: string;
|
|
1521
|
-
updated_at: string;
|
|
1522
|
-
deleted_at: string | null;
|
|
1523
|
-
deleted_by: string | null;
|
|
1524
|
-
vote_count?: number | null;
|
|
1525
|
-
total_votes?: number | null;
|
|
1526
|
-
user_voted_option?: string | null;
|
|
1527
|
-
options: IForumPostOption[];
|
|
1528
|
-
thread: string | null;
|
|
1529
|
-
resource_type: string;
|
|
1530
|
-
}
|
|
1531
|
-
|
|
1532
|
-
declare const COMMENT_STATUS: {
|
|
1533
|
-
readonly active: "active";
|
|
1534
|
-
readonly edited: "edited";
|
|
1535
|
-
readonly deleted: "deleted";
|
|
1536
|
-
readonly pending_moderation: "pending_moderation";
|
|
1537
|
-
};
|
|
1538
|
-
type CommentStatus = (typeof COMMENT_STATUS)[keyof typeof COMMENT_STATUS];
|
|
1539
|
-
/**
|
|
1540
|
-
* Comment thread settings
|
|
1541
|
-
*/
|
|
1542
|
-
interface ICommentThreadSettings {
|
|
1543
|
-
auto_approve: boolean;
|
|
1544
|
-
max_depth: number;
|
|
1545
|
-
moderation_enabled: boolean;
|
|
1546
|
-
}
|
|
1547
|
-
/**
|
|
1548
|
-
* Comment thread metadata
|
|
1549
|
-
*/
|
|
1550
|
-
interface IThread {
|
|
1551
|
-
_id: string;
|
|
1552
|
-
comment_count: number;
|
|
1553
|
-
created_at: string;
|
|
1554
|
-
last_comment_at: string;
|
|
1555
|
-
resource_id: string;
|
|
1556
|
-
resource_type: string;
|
|
1557
|
-
settings: ICommentThreadSettings;
|
|
1558
|
-
status: string;
|
|
1559
|
-
updated_at: string;
|
|
1560
|
-
}
|
|
1561
|
-
interface IComment {
|
|
1562
|
-
_id: string;
|
|
1563
|
-
author: ILevoMembership.Account | null;
|
|
1564
|
-
content: string;
|
|
1565
|
-
created_at: string;
|
|
1566
|
-
edited_at: string | null;
|
|
1567
|
-
flag_count: number;
|
|
1568
|
-
parent: IComment | null;
|
|
1569
|
-
status: string;
|
|
1570
|
-
thread: IThread;
|
|
1571
|
-
updated_at: string;
|
|
1572
|
-
moderation_reason: string;
|
|
1573
|
-
reply_count: number;
|
|
1574
|
-
replies: IComment[];
|
|
1575
|
-
user_flagged: boolean;
|
|
1576
|
-
user_liked: boolean;
|
|
1577
|
-
}
|
|
1578
|
-
interface ThreadId {
|
|
1579
|
-
_id: string;
|
|
1580
|
-
comment_count: number;
|
|
1581
|
-
created_at: string;
|
|
1582
|
-
last_comment_at: any;
|
|
1583
|
-
resource_id: string;
|
|
1584
|
-
resource_type: string;
|
|
1585
|
-
settings: Settings;
|
|
1586
|
-
status: string;
|
|
1587
|
-
updated_at: string;
|
|
1588
|
-
}
|
|
1589
|
-
interface Settings {
|
|
1590
|
-
auto_approve: boolean;
|
|
1591
|
-
ai_moderation: boolean;
|
|
1592
|
-
}
|
|
1593
|
-
|
|
1594
1666
|
interface ICoreOptions {
|
|
1595
|
-
appName?: string;
|
|
1596
|
-
workspace: WorkspaceID | null;
|
|
1597
|
-
/** Site ID for analytics tracking */
|
|
1598
|
-
site?: string | null;
|
|
1599
1667
|
apiUrl: string;
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
directInsightsUrl?: string;
|
|
1603
|
-
/** Insights mode: 'auto' (default) detects via ping, 'proxy' forces reverse proxy, 'direct' forces direct API */
|
|
1604
|
-
insightsMode?: "auto" | "proxy" | "direct";
|
|
1605
|
-
/** Timeout for proxy ping detection in ms (default: 3000) */
|
|
1606
|
-
pingTimeout?: number;
|
|
1668
|
+
workspace: WorkspaceID | null;
|
|
1669
|
+
appName?: string;
|
|
1607
1670
|
NODE_ENV: string;
|
|
1608
1671
|
APP_MODE: string;
|
|
1609
1672
|
}
|
|
@@ -1639,28 +1702,7 @@ interface ILevoClientOptions extends ICoreOptions {
|
|
|
1639
1702
|
}
|
|
1640
1703
|
declare const createLevoClient: (options: ILevoClientOptions) => {
|
|
1641
1704
|
readonly apiUrl: string;
|
|
1642
|
-
readonly insightsUrl: string;
|
|
1643
1705
|
readonly workspace: `W${string}` | null;
|
|
1644
|
-
readonly audience: {
|
|
1645
|
-
readonly instance: analytics.AnalyticsInstance | null;
|
|
1646
|
-
readonly is_identified: boolean;
|
|
1647
|
-
storage_keys: {
|
|
1648
|
-
identify: string;
|
|
1649
|
-
open_tabs: string;
|
|
1650
|
-
current_tab: string;
|
|
1651
|
-
all_tabs: string;
|
|
1652
|
-
device_token: string;
|
|
1653
|
-
session_token: string;
|
|
1654
|
-
mode: string;
|
|
1655
|
-
};
|
|
1656
|
-
initiate: (properties: ILevoAudience.Properties) => Promise<any>;
|
|
1657
|
-
identify: (options?: {
|
|
1658
|
-
withLock?: boolean;
|
|
1659
|
-
}) => Promise<void>;
|
|
1660
|
-
track: <T extends ILevoAudience.Properties>(event: AnalyticsEventType, properties: T & ILevoAudience.Properties) => Promise<any>;
|
|
1661
|
-
bounce: (properties: ILevoAudience.Properties) => Promise<void>;
|
|
1662
|
-
destroy: () => void;
|
|
1663
|
-
};
|
|
1664
1706
|
readonly blog: {
|
|
1665
1707
|
getAllBlogs: (blog_key: string, data?: LevoQuery.FindQuery, options?: BlogClient.OptionParams) => Promise<IResponseMultiple<BlogClient.BlogData>>;
|
|
1666
1708
|
getSingleBlog: (blog_key: string, slug: string, options?: BlogClient.OptionParams) => Promise<IResponseSingle<BlogClient.BlogData>>;
|
|
@@ -1681,7 +1723,7 @@ declare const createLevoClient: (options: ILevoClientOptions) => {
|
|
|
1681
1723
|
signUpWithPassword: <T = ILevoMembership.Account>(data: ILevoMembership.Request.SignUpWithPassword, options?: wretch.WretchOptions) => Promise<T>;
|
|
1682
1724
|
};
|
|
1683
1725
|
readonly collection: {
|
|
1684
|
-
getAllCollections: (data?: LevoQuery.FindQuery<"id" | "workspace_id" | "description" | "created_at" | "updated_at" | "key" | "readonly" | "hidden" | "icon" | "on_submit" | "on_update" | "
|
|
1726
|
+
getAllCollections: (data?: LevoQuery.FindQuery<"name" | "id" | "workspace_id" | "description" | "created_at" | "updated_at" | "key" | "readonly" | "hidden" | "icon" | "on_submit" | "on_update" | "sections" | "views" | "title_field" | "email_field" | "mobile_field" | "settings" | "module_name" | "allow_draft">, options?: wretch.WretchOptions) => Promise<IResponseMultiple<ILemaCollection>>;
|
|
1685
1727
|
getCollectionByIDExpanded: <T = ILemaCollection>(id: string, options?: wretch.WretchOptions) => Promise<IResponseSingle<T>>;
|
|
1686
1728
|
createCollection: (data: ILemaCollection) => Promise<IResponseSingle<ILemaCollection>>;
|
|
1687
1729
|
saveCollectionData: ({ collection_id, data, options, }: {
|
|
@@ -1696,6 +1738,7 @@ declare const createLevoClient: (options: ILevoClientOptions) => {
|
|
|
1696
1738
|
editDraftEntry: (collection_key: string, id: string, data: any) => Promise<IResponseSingle<IDraftEntry>>;
|
|
1697
1739
|
getDraftEntry: (collection_key: string) => Promise<IResponseMultiple<IDraftEntry>>;
|
|
1698
1740
|
submitDraftEntry: (collection_key: string, data: any) => Promise<IResponseSingle<IDraftEntry>>;
|
|
1741
|
+
getFilters: (collectionId: string, options?: wretch.WretchOptions) => Promise<IResponseMultiple<ILemaCollection["sections"][number]["fields"][number]>>;
|
|
1699
1742
|
};
|
|
1700
1743
|
readonly media: {
|
|
1701
1744
|
mediaBulkUpload: (formData: FormData, options?: wretch.WretchOptions) => Promise<IResponseMultiple<IMedia>>;
|
|
@@ -1709,6 +1752,7 @@ declare const createLevoClient: (options: ILevoClientOptions) => {
|
|
|
1709
1752
|
};
|
|
1710
1753
|
readonly fetch: wretch_addons_queryString.QueryStringAddon & wretch.Wretch<wretch_addons_queryString.QueryStringAddon, unknown, undefined>;
|
|
1711
1754
|
readonly APP_MODE: string;
|
|
1755
|
+
readonly NODE_ENV: string;
|
|
1712
1756
|
readonly pageContext: IPageContext | null;
|
|
1713
1757
|
updatePageContext: (newContext: IPageContext | null) => void;
|
|
1714
1758
|
updateWorkspace: (workspace: string | null) => void;
|
|
@@ -1739,25 +1783,7 @@ declare class LevoError extends Error {
|
|
|
1739
1783
|
|
|
1740
1784
|
declare const getLevoError: (error: any) => LevoError;
|
|
1741
1785
|
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
*
|
|
1745
|
-
* const lock = new LocalStorageLock("myResource");
|
|
1746
|
-
* if (lock.acquireLock()) {
|
|
1747
|
-
* console.log("Lock acquired");
|
|
1748
|
-
* // Do some work...
|
|
1749
|
-
* lock.releaseLock();
|
|
1750
|
-
* } else {
|
|
1751
|
-
* console.log("Lock is already held by another instance");
|
|
1752
|
-
* }
|
|
1753
|
-
*
|
|
1754
|
-
*/
|
|
1755
|
-
declare class LocalStorageLock {
|
|
1756
|
-
private key;
|
|
1757
|
-
constructor(lockKey: string);
|
|
1758
|
-
acquireLock(expiryMs?: number): boolean;
|
|
1759
|
-
releaseLock(): void;
|
|
1760
|
-
isLocked(expiryMs?: number): boolean;
|
|
1761
|
-
}
|
|
1786
|
+
declare const listToColumn: <T extends string>(columns: readonly string[]) => Record<T, string>;
|
|
1787
|
+
declare const listToRecord: <T extends string>(columns: readonly string[]) => { [K in T]: K; };
|
|
1762
1788
|
|
|
1763
|
-
export {
|
|
1789
|
+
export { BlogClient, COMMENT_STATUS, type CommentStatus, CommonFieldIntefaces, CommonFieldInterfacesList, type ComparableFilter, ComparableOperators, ComplexFieldInterfacesList, type DeepPartial, FORUM_POST_KIND, FORUM_POST_STATUS, type FieldFilter, FieldInterfaces, FieldInterfacesList, FieldKind, FieldKindList, type FieldType, type Filter, type ForumPostKind, ForumPostKindExpandedList, type ForumPostStatus, type IAddress, type IAttendee, type IAuthor, type IBlog, type IBlogCategory, type IBlogTag, type IBooking, type ICollectionLayout, type ICollectionLayoutOptions, type ICollectionQuery, type ICollectionValue, type ICollectionView, type ICollectionViews, type ICollectionsView, type IComment, type ICommentThreadSettings, type ICommentsUserEngagement, type IContactInfo, type IContent, type IDefaultPermissionsObject, type IDraftEntry, type IEmailAddress, type IEmojiData, type IErrorContent, type IErrorParams, type IFaviconMedia, type IFaviconMediaObject, type IFeatureFlags, type IField, type IFieldError, type IFieldUpdate, type IFilter, type IForum, type IForumCategory, type IForumJoinRequest, type IForumMember, type IForumMembershipStatus, type IForumPost, type IForumPostOption, type IForumSettings, type IForumTag, type IGeocoderLocation, type IGroupBy, type IIcon, type IIconCat, type IIconData, type ILemaCollection, type ILemaCollectionRelationship, type ILemaField, type ILemaFieldOptions, type ILemaRelation, type ILemaRelationOnDelete, type ILemaSection, type ILevoClient, type ILevoClientOptions, type ILevoIntegrationInstance, type ILevoIntegrationList, ILevoMembership, type ILevoOAuthProvider, type IMe, type IMedia, type IMediaObject, type IMeta, type IModuleAccessControl, type INotificationData, type INotificationWithTrigger, type IOrganization, type IPhoneNumber, type IPlan, type IPlanFeature, type IPlanGroup, type IPlanPrice, type IPost, type IResponseError, type IResponseMultiple, type IResponseMyCategory, type IResponseSingle, type ISchema, type ISection, type ISubscription, type IThread, type IWorkspace, LEVO_INTEGRATIONS, LEVO_INTEGRATIONS_LIST, LevoError, LevoEvent, LevoOAuthProviderList, LevoQuery, type LogicalFilter, LogicalOperators, type Mandatory, MediaKind, MediaKindList, type PlanKind, type Prettify, type WithinFilterType, type WorkspaceID, createLevoClient, defaultByKinds, formatImagePath, formatsByInterface, getLevoError, interfaceKinds, listToColumn, listToRecord };
|