@overmap-ai/core 1.0.34 → 1.0.35-projects-licensing.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/dist/overmap-core.js +335 -179
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +335 -179
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/sdk.d.ts +2 -1
- package/dist/sdk/services/LicenseService.d.ts +7 -0
- package/dist/sdk/services/MainService.d.ts +2 -1
- package/dist/sdk/services/index.d.ts +1 -0
- package/dist/store/slices/categorySlice.d.ts +1 -0
- package/dist/store/slices/index.d.ts +1 -0
- package/dist/store/slices/issueSlice.d.ts +1 -0
- package/dist/store/slices/licenseSlice.d.ts +28 -0
- package/dist/store/slices/organizationSlice.d.ts +2 -1
- package/dist/store/slices/projectFileSlice.d.ts +1 -0
- package/dist/store/slices/workspaceSlice.d.ts +1 -0
- package/dist/store/store.d.ts +4 -1
- package/dist/typings/models/base.d.ts +4 -0
- package/dist/typings/models/index.d.ts +1 -0
- package/dist/typings/models/license.d.ts +12 -0
- package/package.json +1 -1
package/dist/sdk/sdk.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AttachmentService, AuthService, CategoryService, ComponentService, ComponentStageCompletionService, ComponentStageService, ComponentTypeService, EmailVerificationService, FileService, IssueCommentService, IssueService, MainService, OrganizationAccessService, ProjectAccessService, ProjectFileService, ProjectService, UserFormService, UserFormSubmissionService, WorkspaceService, OrganizationService, EmailDomainsService } from "./services";
|
|
1
|
+
import { AttachmentService, AuthService, CategoryService, ComponentService, ComponentStageCompletionService, ComponentStageService, ComponentTypeService, EmailVerificationService, FileService, IssueCommentService, IssueService, MainService, OrganizationAccessService, ProjectAccessService, ProjectFileService, ProjectService, UserFormService, UserFormSubmissionService, WorkspaceService, OrganizationService, EmailDomainsService, LicenseService } from "./services";
|
|
2
2
|
import { ToolkitStore } from "@reduxjs/toolkit/dist/configureStore.js";
|
|
3
3
|
import { RootState } from "../typings";
|
|
4
4
|
export declare class OvermapSDK {
|
|
@@ -26,5 +26,6 @@ export declare class OvermapSDK {
|
|
|
26
26
|
projectFiles: ProjectFileService;
|
|
27
27
|
emailVerification: EmailVerificationService;
|
|
28
28
|
emailDomains: EmailDomainsService;
|
|
29
|
+
licenses: LicenseService;
|
|
29
30
|
}
|
|
30
31
|
export declare const makeClient: (apiUrl: string, store: ToolkitStore<RootState>) => OvermapSDK;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseApiService } from "./BaseApiService.ts";
|
|
2
|
+
import { License } from "../../typings";
|
|
3
|
+
export declare class LicenseService extends BaseApiService {
|
|
4
|
+
pauseLicense(license: License): Promise<undefined>;
|
|
5
|
+
resumeLicense(license: License): Promise<undefined>;
|
|
6
|
+
cancelLicense(license: License): Promise<undefined>;
|
|
7
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseApiService } from "./BaseApiService";
|
|
2
|
-
import { Category, Organization, Project, User } from "../../typings";
|
|
2
|
+
import { Category, License, Organization, Project, User } from "../../typings";
|
|
3
3
|
export interface InitialAPIData {
|
|
4
4
|
projects: (Project & {
|
|
5
5
|
workspaces: {
|
|
@@ -13,6 +13,7 @@ export interface InitialAPIData {
|
|
|
13
13
|
organizations: Organization[];
|
|
14
14
|
user: User;
|
|
15
15
|
project_owners: User[];
|
|
16
|
+
licenses: License[];
|
|
16
17
|
}
|
|
17
18
|
export declare class MainService extends BaseApiService {
|
|
18
19
|
fetchInitialData(replaceExisting: boolean, uuid?: string): Promise<InitialAPIData>;
|
|
@@ -64,6 +64,7 @@ export declare const selectCategories: ((state: import("redux").EmptyObject & {
|
|
|
64
64
|
userReducer: import('..').UserState;
|
|
65
65
|
workspaceReducer: import('..').WorkspaceState;
|
|
66
66
|
emailDomainsReducer: import('..').EmailDomainState;
|
|
67
|
+
licenseReducer: import('..').LicenseState;
|
|
67
68
|
} & {
|
|
68
69
|
offline: import("@redux-offline/redux-offline/lib/types").OfflineState;
|
|
69
70
|
}) => Category[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, Category>, args_1: string | null) => Category[], {
|
|
@@ -100,6 +100,7 @@ export declare const selectAllAttachments: ((state: import("redux").EmptyObject
|
|
|
100
100
|
userReducer: import('..').UserState;
|
|
101
101
|
workspaceReducer: import("./workspaceSlice").WorkspaceState;
|
|
102
102
|
emailDomainsReducer: import('..').EmailDomainState;
|
|
103
|
+
licenseReducer: import('..').LicenseState;
|
|
103
104
|
} & {
|
|
104
105
|
offline: import("@redux-offline/redux-offline/lib/types").OfflineState;
|
|
105
106
|
}) => Stored<IssueAttachment>[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, Stored<IssueAttachment>>) => Stored<IssueAttachment>[], {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { License } from "../../typings/models/license.ts";
|
|
2
|
+
import { Reducer } from "@reduxjs/toolkit";
|
|
3
|
+
import { Selector, SelectorWithArgs } from "../../typings";
|
|
4
|
+
export interface LicenseState {
|
|
5
|
+
licenses: Record<string, License>;
|
|
6
|
+
}
|
|
7
|
+
export declare const licenseSlice: import("@reduxjs/toolkit").Slice<LicenseState, {
|
|
8
|
+
setLicenses: (state: import("immer/dist/internal.js").WritableDraft<LicenseState>, action: {
|
|
9
|
+
payload: License[];
|
|
10
|
+
}) => void;
|
|
11
|
+
resumeLicense: (state: import("immer/dist/internal.js").WritableDraft<LicenseState>, action: {
|
|
12
|
+
payload: string;
|
|
13
|
+
}) => void;
|
|
14
|
+
pauseLicense: (state: import("immer/dist/internal.js").WritableDraft<LicenseState>, action: {
|
|
15
|
+
payload: string;
|
|
16
|
+
}) => void;
|
|
17
|
+
cancelLicense: (state: import("immer/dist/internal.js").WritableDraft<LicenseState>, action: {
|
|
18
|
+
payload: string;
|
|
19
|
+
}) => void;
|
|
20
|
+
}, "license">;
|
|
21
|
+
export declare const setLicenses: import("@reduxjs/toolkit").ActionCreatorWithPayload<License[], "license/setLicenses">, pauseLicense: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "license/pauseLicense">, resumeLicense: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "license/resumeLicense">, cancelLicense: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "license/cancelLicense">;
|
|
22
|
+
export declare const selectLicenses: Selector<Record<string, License>>;
|
|
23
|
+
export declare const selectLicense: SelectorWithArgs<string, License>;
|
|
24
|
+
export declare const selectActiveLicense: Selector<License | null>;
|
|
25
|
+
export declare const selectActiveStatusLicenses: Selector<License[]>;
|
|
26
|
+
export declare const selectLicencesMapping: Selector<Record<number, License>>;
|
|
27
|
+
export declare const selectSortedLicenses: Selector<License[]>;
|
|
28
|
+
export declare const licenseReducer: Reducer<LicenseState>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Reducer } from "@reduxjs/toolkit";
|
|
2
2
|
import { Selector, SelectorWithArgs } from '../../typings/store';
|
|
3
|
-
import { User, Organization } from "../../typings";
|
|
3
|
+
import { User, Organization, License } from "../../typings";
|
|
4
4
|
export interface OrganizationState {
|
|
5
5
|
organizations: Record<number, Organization>;
|
|
6
6
|
activeOrganizationId: number | null;
|
|
@@ -24,5 +24,6 @@ export declare const selectActiveOrganization: Selector<Organization | null>;
|
|
|
24
24
|
export declare const selectOrganizationUsersIds: Selector<number[]>;
|
|
25
25
|
export declare const selectOrganizationUsersAsMapping: Selector<Record<number, User>>;
|
|
26
26
|
export declare const selectSortedOrganizationUsers: Selector<User[]>;
|
|
27
|
+
export declare const selectActiveOrganizationLicenses: Selector<License[]>;
|
|
27
28
|
export declare const selectOrganization: SelectorWithArgs<number, Organization | undefined>;
|
|
28
29
|
export declare const organizationReducer: Reducer<OrganizationState>;
|
|
@@ -72,6 +72,7 @@ export declare const selectProjectFiles: ((state: import("redux").EmptyObject &
|
|
|
72
72
|
userReducer: import('..').UserState;
|
|
73
73
|
workspaceReducer: import('..').WorkspaceState;
|
|
74
74
|
emailDomainsReducer: import('..').EmailDomainState;
|
|
75
|
+
licenseReducer: import('..').LicenseState;
|
|
75
76
|
} & {
|
|
76
77
|
offline: import("@redux-offline/redux-offline/lib/types").OfflineState;
|
|
77
78
|
}) => ProjectFile[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, ProjectFile>, args_1: number | null) => ProjectFile[], {
|
|
@@ -50,6 +50,7 @@ export declare const selectWorkspaces: ((state: import("redux").EmptyObject & {
|
|
|
50
50
|
userReducer: import('..').UserState;
|
|
51
51
|
workspaceReducer: WorkspaceState;
|
|
52
52
|
emailDomainsReducer: import('..').EmailDomainState;
|
|
53
|
+
licenseReducer: import('..').LicenseState;
|
|
53
54
|
} & {
|
|
54
55
|
offline: import("@redux-offline/redux-offline/lib/types").OfflineState;
|
|
55
56
|
}) => Workspace[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, Workspace>) => Workspace[], {
|
package/dist/store/store.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { AnyAction, Reducer } from "redux";
|
|
|
3
3
|
import { Config, OfflineAction, OfflineMetadata, OfflineState } from "@redux-offline/redux-offline/lib/types";
|
|
4
4
|
import request from "superagent";
|
|
5
5
|
import { type OfflineMetaEffect, type OvermapSDK, RequestDetails } from "../sdk";
|
|
6
|
-
import { AuthState, CategoryState, ComponentStageCompletionState, ComponentStageState, ComponentState, ComponentTypeState, EmailDomainState, FileState, IssueState, MapState, OrganizationAccessState, OrganizationState, OutboxState, ProjectAccessState, ProjectFileState, ProjectState, RehydratedState, SettingState, UserFormState, UserState, WorkspaceState } from "./slices";
|
|
6
|
+
import { AuthState, CategoryState, ComponentStageCompletionState, ComponentStageState, ComponentState, ComponentTypeState, EmailDomainState, FileState, IssueState, LicenseState, MapState, OrganizationAccessState, OrganizationState, OutboxState, ProjectAccessState, ProjectFileState, ProjectState, RehydratedState, SettingState, UserFormState, UserState, WorkspaceState } from "./slices";
|
|
7
7
|
import { VersioningState } from "./slices/versioningSlice";
|
|
8
8
|
import { RootState } from "../typings";
|
|
9
9
|
export declare const overmapReducers: {
|
|
@@ -29,6 +29,7 @@ export declare const overmapReducers: {
|
|
|
29
29
|
userReducer: Reducer<UserState>;
|
|
30
30
|
workspaceReducer: Reducer<WorkspaceState>;
|
|
31
31
|
emailDomainsReducer: Reducer<EmailDomainState>;
|
|
32
|
+
licenseReducer: Reducer<LicenseState>;
|
|
32
33
|
};
|
|
33
34
|
export declare const overmapReducer: Reducer<import("redux").CombinedState<{
|
|
34
35
|
versioning: VersioningState;
|
|
@@ -53,6 +54,7 @@ export declare const overmapReducer: Reducer<import("redux").CombinedState<{
|
|
|
53
54
|
userReducer: UserState;
|
|
54
55
|
workspaceReducer: WorkspaceState;
|
|
55
56
|
emailDomainsReducer: EmailDomainState;
|
|
57
|
+
licenseReducer: LicenseState;
|
|
56
58
|
}>, AnyAction>;
|
|
57
59
|
export declare const resetStore = "RESET";
|
|
58
60
|
export declare const rootReducer: Reducer<RootState>;
|
|
@@ -95,6 +97,7 @@ export declare const defaultStore: import("@reduxjs/toolkit/dist/configureStore"
|
|
|
95
97
|
userReducer: UserState;
|
|
96
98
|
workspaceReducer: WorkspaceState;
|
|
97
99
|
emailDomainsReducer: EmailDomainState;
|
|
100
|
+
licenseReducer: LicenseState;
|
|
98
101
|
} & {
|
|
99
102
|
offline: OfflineState;
|
|
100
103
|
}, AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<RootState, AnyAction>]>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OfflineModel, OwnedByUserOrOrganization } from "./base.ts";
|
|
2
|
+
export declare enum LicenseLevel {
|
|
3
|
+
PRO = 0
|
|
4
|
+
}
|
|
5
|
+
export interface License extends OfflineModel, OwnedByUserOrOrganization {
|
|
6
|
+
project: number;
|
|
7
|
+
level: LicenseLevel;
|
|
8
|
+
is_active: boolean;
|
|
9
|
+
is_paused: boolean;
|
|
10
|
+
is_cancelled: boolean;
|
|
11
|
+
next_billing_date: Date;
|
|
12
|
+
}
|
package/package.json
CHANGED