@tolinax/ayoune-interfaces 2026.62.0 → 2026.64.0
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/data/modelNames.d.ts +5 -0
- package/data/modelNames.js +5 -0
- package/data/modelsAndRights.js +130 -0
- package/interfaces/IAssignment.d.ts +4 -2
- package/interfaces/IMarketplaceApp.d.ts +46 -0
- package/interfaces/IMarketplaceApp.js +2 -0
- package/interfaces/IMarketplaceBundle.d.ts +42 -0
- package/interfaces/IMarketplaceBundle.js +2 -0
- package/interfaces/IMarketplaceInstallation.d.ts +46 -0
- package/interfaces/IMarketplaceInstallation.js +2 -0
- package/interfaces/IMarketplaceReview.d.ts +17 -0
- package/interfaces/IMarketplaceReview.js +2 -0
- package/interfaces/INotificationAction.d.ts +28 -2
- package/interfaces/IResellerDefaultBundle.d.ts +17 -0
- package/interfaces/IResellerDefaultBundle.js +2 -0
- package/interfaces/index.d.ts +5 -0
- package/interfaces/index.js +5 -0
- package/package.json +1 -1
package/data/modelNames.d.ts
CHANGED
|
@@ -412,6 +412,10 @@ export declare enum aMN {
|
|
|
412
412
|
MarketBudgetsByIndustries = "MarketBudgetsByIndustries",
|
|
413
413
|
IndustryKPIs = "IndustryKPIs",
|
|
414
414
|
MarketResearches = "MarketResearches",
|
|
415
|
+
MarketplaceApps = "MarketplaceApps",
|
|
416
|
+
MarketplaceBundles = "MarketplaceBundles",
|
|
417
|
+
MarketplaceInstallations = "MarketplaceInstallations",
|
|
418
|
+
MarketplaceReviews = "MarketplaceReviews",
|
|
415
419
|
Markets = "Markets",
|
|
416
420
|
MaterialCommissionings = "MaterialCommissionings",
|
|
417
421
|
MeetingLocations = "MeetingLocations",
|
|
@@ -531,6 +535,7 @@ export declare enum aMN {
|
|
|
531
535
|
Repositories = "Repositories",
|
|
532
536
|
Requirements = "Requirements",
|
|
533
537
|
ResearchBudgets = "ResearchBudgets",
|
|
538
|
+
ResellerDefaultBundles = "ResellerDefaultBundles",
|
|
534
539
|
Retrospectives = "Retrospectives",
|
|
535
540
|
ReturnOrders = "ReturnOrders",
|
|
536
541
|
RewardLogs = "RewardLogs",
|
package/data/modelNames.js
CHANGED
|
@@ -416,6 +416,10 @@ var aMN;
|
|
|
416
416
|
aMN["MarketBudgetsByIndustries"] = "MarketBudgetsByIndustries";
|
|
417
417
|
aMN["IndustryKPIs"] = "IndustryKPIs";
|
|
418
418
|
aMN["MarketResearches"] = "MarketResearches";
|
|
419
|
+
aMN["MarketplaceApps"] = "MarketplaceApps";
|
|
420
|
+
aMN["MarketplaceBundles"] = "MarketplaceBundles";
|
|
421
|
+
aMN["MarketplaceInstallations"] = "MarketplaceInstallations";
|
|
422
|
+
aMN["MarketplaceReviews"] = "MarketplaceReviews";
|
|
419
423
|
aMN["Markets"] = "Markets";
|
|
420
424
|
aMN["MaterialCommissionings"] = "MaterialCommissionings";
|
|
421
425
|
aMN["MeetingLocations"] = "MeetingLocations";
|
|
@@ -535,6 +539,7 @@ var aMN;
|
|
|
535
539
|
aMN["Repositories"] = "Repositories";
|
|
536
540
|
aMN["Requirements"] = "Requirements";
|
|
537
541
|
aMN["ResearchBudgets"] = "ResearchBudgets";
|
|
542
|
+
aMN["ResellerDefaultBundles"] = "ResellerDefaultBundles";
|
|
538
543
|
aMN["Retrospectives"] = "Retrospectives";
|
|
539
544
|
aMN["ReturnOrders"] = "ReturnOrders";
|
|
540
545
|
aMN["RewardLogs"] = "RewardLogs";
|
package/data/modelsAndRights.js
CHANGED
|
@@ -7933,6 +7933,136 @@ const modelsAndRights = [
|
|
|
7933
7933
|
updateBy: "_id",
|
|
7934
7934
|
availableInSDK: false,
|
|
7935
7935
|
},
|
|
7936
|
+
// ─── Marketplace (Phase 1 Foundation — 25. April 2026) ─────────────
|
|
7937
|
+
// Five entities model the cross-customer app-distribution mechanism:
|
|
7938
|
+
// MarketplaceApps — public listing entity (publisher-owned)
|
|
7939
|
+
// MarketplaceBundles — versioned content bundle attached to an app
|
|
7940
|
+
// MarketplaceInstallations — 1:1 customer ↔ app install record
|
|
7941
|
+
// MarketplaceReviews — customer-submitted 1-5 star reviews
|
|
7942
|
+
// ResellerDefaultBundles — reseller's auto-install bundles for new customers
|
|
7943
|
+
//
|
|
7944
|
+
// All five belong to the "marketplace" module. Actions beyond CRUD are
|
|
7945
|
+
// declared below; the marketplace-api service (Phase 2) hosts them at
|
|
7946
|
+
// POST /{entity}/:id/actions/{action}. See marketplace-mvm-plan.md.
|
|
7947
|
+
{
|
|
7948
|
+
plural: "MarketplaceApps",
|
|
7949
|
+
singular: "MarketplaceApp",
|
|
7950
|
+
module: "marketplace",
|
|
7951
|
+
right: "marketplace.apps",
|
|
7952
|
+
readOnly: false,
|
|
7953
|
+
importable: false,
|
|
7954
|
+
allowDuplicate: false,
|
|
7955
|
+
updateBy: "_id",
|
|
7956
|
+
availableInSDK: true,
|
|
7957
|
+
sdkOperations: ["find", "findOne", "insert", "update", "aggregate", "count"],
|
|
7958
|
+
piiLevel: "low",
|
|
7959
|
+
searchable: true,
|
|
7960
|
+
searchableFields: ["name", "slug", "description", "category", "industry", "tags"],
|
|
7961
|
+
actions: [
|
|
7962
|
+
{ title: "PUBLISH", action: "publish", availability: "single", method: "POST", icon: "publish" },
|
|
7963
|
+
{ title: "ARCHIVE", action: "archive", availability: "single", method: "POST", icon: "archive" },
|
|
7964
|
+
{ title: "REVIEW_APPROVE", action: "review-approve", availability: "single", method: "POST", icon: "check_circle" },
|
|
7965
|
+
{ title: "REVIEW_REJECT", action: "review-reject", availability: "single", method: "POST", icon: "block", dangerous: true },
|
|
7966
|
+
{ title: "INSTALL", action: "install", availability: "single", method: "POST", icon: "download" },
|
|
7967
|
+
],
|
|
7968
|
+
entityActions: [
|
|
7969
|
+
{ name: "publish", verb: "POST", emits: "published", icon: "publish", labelKey: "marketplace.apps.actions.publish" },
|
|
7970
|
+
{ name: "archive", verb: "POST", emits: "archived", icon: "archive", labelKey: "marketplace.apps.actions.archive" },
|
|
7971
|
+
{ name: "review-approve", verb: "POST", emits: "approved", icon: "check_circle", labelKey: "marketplace.apps.actions.review-approve" },
|
|
7972
|
+
{ name: "review-reject", verb: "POST", emits: "rejected", icon: "block", dangerous: true, labelKey: "marketplace.apps.actions.review-reject" },
|
|
7973
|
+
{ name: "install", verb: "POST", emits: "installed", icon: "download", labelKey: "marketplace.apps.actions.install" },
|
|
7974
|
+
],
|
|
7975
|
+
},
|
|
7976
|
+
{
|
|
7977
|
+
plural: "MarketplaceBundles",
|
|
7978
|
+
singular: "MarketplaceBundle",
|
|
7979
|
+
module: "marketplace",
|
|
7980
|
+
right: "marketplace.bundles",
|
|
7981
|
+
readOnly: false,
|
|
7982
|
+
importable: false,
|
|
7983
|
+
allowDuplicate: false,
|
|
7984
|
+
updateBy: "_id",
|
|
7985
|
+
availableInSDK: true,
|
|
7986
|
+
sdkOperations: ["find", "findOne", "insert", "update", "aggregate", "count"],
|
|
7987
|
+
piiLevel: "low",
|
|
7988
|
+
searchable: true,
|
|
7989
|
+
searchableFields: ["version", "bundleType", "changelog"],
|
|
7990
|
+
actions: [
|
|
7991
|
+
{ title: "PUBLISH", action: "publish", availability: "single", method: "POST", icon: "publish" },
|
|
7992
|
+
{ title: "FORK", action: "fork", availability: "single", method: "POST", icon: "fork_right" },
|
|
7993
|
+
{ title: "FROM_PUBLISHER", action: "from-publisher", availability: "single", method: "POST", icon: "cloud_download" },
|
|
7994
|
+
],
|
|
7995
|
+
entityActions: [
|
|
7996
|
+
{ name: "publish", verb: "POST", emits: "published", icon: "publish", labelKey: "marketplace.bundles.actions.publish" },
|
|
7997
|
+
{ name: "fork", verb: "POST", emits: "forked", icon: "fork_right", labelKey: "marketplace.bundles.actions.fork" },
|
|
7998
|
+
{ name: "from-publisher", verb: "POST", emits: "imported", icon: "cloud_download", labelKey: "marketplace.bundles.actions.from-publisher" },
|
|
7999
|
+
],
|
|
8000
|
+
},
|
|
8001
|
+
{
|
|
8002
|
+
plural: "MarketplaceInstallations",
|
|
8003
|
+
singular: "MarketplaceInstallation",
|
|
8004
|
+
module: "marketplace",
|
|
8005
|
+
right: "marketplace.installations",
|
|
8006
|
+
readOnly: false,
|
|
8007
|
+
importable: false,
|
|
8008
|
+
allowDuplicate: false,
|
|
8009
|
+
updateBy: "_id",
|
|
8010
|
+
availableInSDK: true,
|
|
8011
|
+
sdkOperations: ["find", "findOne", "aggregate", "count"],
|
|
8012
|
+
piiLevel: "low",
|
|
8013
|
+
searchable: true,
|
|
8014
|
+
searchableFields: ["status", "bundleVersion"],
|
|
8015
|
+
actions: [
|
|
8016
|
+
{ title: "INSTALL", action: "install", availability: "single", method: "POST", icon: "download" },
|
|
8017
|
+
{ title: "UNINSTALL", action: "uninstall", availability: "single", method: "POST", icon: "delete_sweep", dangerous: true },
|
|
8018
|
+
{ title: "PAUSE", action: "pause", availability: "single", method: "POST", icon: "pause_circle" },
|
|
8019
|
+
{ title: "RESUME", action: "resume", availability: "single", method: "POST", icon: "play_circle" },
|
|
8020
|
+
{ title: "UPDATE", action: "update", availability: "single", method: "POST", icon: "system_update_alt" },
|
|
8021
|
+
],
|
|
8022
|
+
entityActions: [
|
|
8023
|
+
{ name: "install", verb: "POST", emits: "installed", icon: "download", labelKey: "marketplace.installations.actions.install" },
|
|
8024
|
+
{ name: "uninstall", verb: "POST", emits: "uninstalled", icon: "delete_sweep", dangerous: true, labelKey: "marketplace.installations.actions.uninstall" },
|
|
8025
|
+
{ name: "pause", verb: "POST", emits: "paused", icon: "pause_circle", labelKey: "marketplace.installations.actions.pause" },
|
|
8026
|
+
{ name: "resume", verb: "POST", emits: "resumed", icon: "play_circle", labelKey: "marketplace.installations.actions.resume" },
|
|
8027
|
+
{ name: "update", verb: "POST", emits: "updated", icon: "system_update_alt", labelKey: "marketplace.installations.actions.update" },
|
|
8028
|
+
],
|
|
8029
|
+
},
|
|
8030
|
+
{
|
|
8031
|
+
plural: "MarketplaceReviews",
|
|
8032
|
+
singular: "MarketplaceReview",
|
|
8033
|
+
module: "marketplace",
|
|
8034
|
+
right: "marketplace.reviews",
|
|
8035
|
+
readOnly: false,
|
|
8036
|
+
importable: false,
|
|
8037
|
+
allowDuplicate: false,
|
|
8038
|
+
updateBy: "_id",
|
|
8039
|
+
availableInSDK: true,
|
|
8040
|
+
sdkOperations: ["find", "findOne", "insert", "update", "aggregate", "count"],
|
|
8041
|
+
piiLevel: "low",
|
|
8042
|
+
searchable: true,
|
|
8043
|
+
searchableFields: ["comment", "publisherReply"],
|
|
8044
|
+
actions: [
|
|
8045
|
+
{ title: "PUBLISHER_REPLY", action: "publisher-reply", availability: "single", method: "POST", icon: "reply" },
|
|
8046
|
+
],
|
|
8047
|
+
entityActions: [
|
|
8048
|
+
{ name: "publisher-reply", verb: "POST", emits: "replied", icon: "reply", labelKey: "marketplace.reviews.actions.publisher-reply" },
|
|
8049
|
+
],
|
|
8050
|
+
},
|
|
8051
|
+
{
|
|
8052
|
+
plural: "ResellerDefaultBundles",
|
|
8053
|
+
singular: "ResellerDefaultBundle",
|
|
8054
|
+
module: "marketplace",
|
|
8055
|
+
right: "marketplace.resellerdefaultbundles",
|
|
8056
|
+
readOnly: false,
|
|
8057
|
+
importable: false,
|
|
8058
|
+
allowDuplicate: false,
|
|
8059
|
+
updateBy: "_id",
|
|
8060
|
+
availableInSDK: true,
|
|
8061
|
+
sdkOperations: ["find", "findOne", "insert", "update", "aggregate", "count"],
|
|
8062
|
+
piiLevel: "low",
|
|
8063
|
+
searchable: true,
|
|
8064
|
+
searchableFields: ["notes"],
|
|
8065
|
+
},
|
|
7936
8066
|
// ─── Desktop Client module — states + rights per view ──────────────
|
|
7937
8067
|
// desktopclient is a module in its own right (module: "desktopclient").
|
|
7938
8068
|
// Each nav entry in the desktop client IS a state — registered via
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { IDefaultFields } from "./IDefaultFields";
|
|
2
2
|
import { ITax } from "./ITax";
|
|
3
3
|
import { IFreeFields } from "./IFreeFields";
|
|
4
|
+
import { IaYOUneContract } from "./IaYOUneContract";
|
|
5
|
+
import { IShare } from "./IShare";
|
|
4
6
|
interface MachineUtilization {
|
|
5
7
|
machine: ObjectId;
|
|
6
8
|
name?: string;
|
|
@@ -44,8 +46,8 @@ export interface IAssignment extends IDefaultFields, IFreeFields {
|
|
|
44
46
|
internalDeclined?: boolean;
|
|
45
47
|
internalDeclinedReason?: string;
|
|
46
48
|
ayouneApproval?: string;
|
|
47
|
-
ayouneContract
|
|
48
|
-
shares
|
|
49
|
+
ayouneContract?: IaYOUneContract;
|
|
50
|
+
shares?: IShare[];
|
|
49
51
|
editors?: ObjectId[];
|
|
50
52
|
team?: ObjectId[];
|
|
51
53
|
agent?: string;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { IDefaultFields } from "./IDefaultFields";
|
|
2
|
+
export type MarketplaceAppPublisher = "tolinax" | "reseller" | "customer";
|
|
3
|
+
export type MarketplaceAppStatus = "draft" | "review" | "published" | "archived" | "rejected";
|
|
4
|
+
export type MarketplaceAppSubscriptionInterval = "month" | "year" | null;
|
|
5
|
+
/**
|
|
6
|
+
* Public listing entity for the aYOUne Marketplace. An `IMarketplaceApp`
|
|
7
|
+
* is the publisher-facing product record; its content (templates, products,
|
|
8
|
+
* automations, ...) is attached via one or more `IMarketplaceBundle`s.
|
|
9
|
+
*
|
|
10
|
+
* Ownership is multi-tenant: `_customerID` is always the publisher customer.
|
|
11
|
+
* Tolinax-published apps use the tolinax customer as `_customerID` and
|
|
12
|
+
* `publisher: "tolinax"`. Resellers publish apps scoped to their own
|
|
13
|
+
* customer record with `publisher: "reseller"`. Customers can publish
|
|
14
|
+
* their own private apps for re-use within related customers.
|
|
15
|
+
*/
|
|
16
|
+
export interface IMarketplaceApp extends IDefaultFields {
|
|
17
|
+
/** Owner / publisher customer (required, multi-tenant scoping field) */
|
|
18
|
+
_customerID: ObjectId;
|
|
19
|
+
/** The user within the publisher customer that pushed Publish */
|
|
20
|
+
_publisherUserID?: ObjectId;
|
|
21
|
+
publisher: MarketplaceAppPublisher;
|
|
22
|
+
name: string;
|
|
23
|
+
/** URL-safe slug, unique per `_customerID` via compound index */
|
|
24
|
+
slug: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
/** e.g. "vertical", "integration", "addon" */
|
|
27
|
+
category?: string;
|
|
28
|
+
/** Optional industry tag for discovery (e.g. "dental", "construction") */
|
|
29
|
+
industry?: string;
|
|
30
|
+
tags?: string[];
|
|
31
|
+
/** URLs (uploaded via media-api) */
|
|
32
|
+
screenshots?: string[];
|
|
33
|
+
iconUrl?: string;
|
|
34
|
+
/** 0 = free. In EUR cents to avoid floating-point drift. */
|
|
35
|
+
price?: number;
|
|
36
|
+
subscriptionInterval?: MarketplaceAppSubscriptionInterval;
|
|
37
|
+
/** Basis points for publisher share. Default 7000 (= 70%). */
|
|
38
|
+
revenueShareBps?: number;
|
|
39
|
+
status: MarketplaceAppStatus;
|
|
40
|
+
publishedAt?: Date;
|
|
41
|
+
/** Human-readable reason shown to publisher when status === "rejected" */
|
|
42
|
+
rejectionReason?: string;
|
|
43
|
+
/** Tolinax-internal review metadata (hidden from reseller/customer UIs) */
|
|
44
|
+
reviewedBy?: ObjectId;
|
|
45
|
+
reviewedAt?: Date;
|
|
46
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { IDefaultFields } from "./IDefaultFields";
|
|
2
|
+
export type MarketplaceBundleType = "vertical" | "addon" | "integration";
|
|
3
|
+
export type MarketplaceBundleContentType = "mail" | "emailtemplate" | "product" | "wallboard" | "automationtemplate" | "automation";
|
|
4
|
+
/**
|
|
5
|
+
* "clone" (default) = deep-copy the entity into the installer customer on
|
|
6
|
+
* install, after which the copy lives its own life.
|
|
7
|
+
*
|
|
8
|
+
* "reference" = the installer's customer references the publisher's entity
|
|
9
|
+
* directly (used for read-mostly catalog items and license-constrained
|
|
10
|
+
* integrations). Not all content types support referencing; the install
|
|
11
|
+
* action decides at runtime.
|
|
12
|
+
*/
|
|
13
|
+
export type MarketplaceBundleCopyStrategy = "clone" | "reference";
|
|
14
|
+
export interface IMarketplaceBundleContent {
|
|
15
|
+
entityType: MarketplaceBundleContentType;
|
|
16
|
+
/** Points to the source entity in the publisher customer's DB */
|
|
17
|
+
_entityID: ObjectId;
|
|
18
|
+
/** Default: "clone" */
|
|
19
|
+
copyStrategy?: MarketplaceBundleCopyStrategy;
|
|
20
|
+
/** Optional human-readable label for the admin-v2 bundle editor */
|
|
21
|
+
label?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A versioned bundle of content attached to a `IMarketplaceApp`. Installing
|
|
25
|
+
* an app means installing one bundle (the current `publishedAt`-latest one).
|
|
26
|
+
* New bundle versions for the same `_app` flip `updateAvailable=true` on
|
|
27
|
+
* existing installations.
|
|
28
|
+
*/
|
|
29
|
+
export interface IMarketplaceBundle extends IDefaultFields {
|
|
30
|
+
/** Publisher customer (same as the parent app's `_customerID`) */
|
|
31
|
+
_customerID: ObjectId;
|
|
32
|
+
/** -> IMarketplaceApp._id */
|
|
33
|
+
_app: ObjectId;
|
|
34
|
+
bundleType: MarketplaceBundleType;
|
|
35
|
+
/** Semver-ish, e.g. "1.0.0". Compared lexicographically for update detection. */
|
|
36
|
+
version: string;
|
|
37
|
+
contents: IMarketplaceBundleContent[];
|
|
38
|
+
/** Optional release notes shown on the install-update modal */
|
|
39
|
+
changelog?: string;
|
|
40
|
+
/** Bumped on every publish — drives "Update available" detection */
|
|
41
|
+
publishedAt?: Date;
|
|
42
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { IDefaultFields } from "./IDefaultFields";
|
|
2
|
+
import { IaYOUneContract } from "./IaYOUneContract";
|
|
3
|
+
export type MarketplaceInstallationStatus = "pending" | "active" | "paused" | "revoked";
|
|
4
|
+
/**
|
|
5
|
+
* IDs of the copied entities in the installer customer, grouped by
|
|
6
|
+
* collection. Only populated for content entries with
|
|
7
|
+
* `copyStrategy: "clone"` — "reference"-strategy entries are resolved live
|
|
8
|
+
* against the publisher customer and do not appear here.
|
|
9
|
+
*/
|
|
10
|
+
export interface IMarketplaceInstallationCopiedIds {
|
|
11
|
+
mails?: ObjectId[];
|
|
12
|
+
emailtemplates?: ObjectId[];
|
|
13
|
+
products?: ObjectId[];
|
|
14
|
+
wallboards?: ObjectId[];
|
|
15
|
+
automations?: ObjectId[];
|
|
16
|
+
automationtemplates?: ObjectId[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 1:1 installation record: one customer ↔ one app. Unique via
|
|
20
|
+
* `(_customerID, _app)` compound index. Tracks which bundle version is
|
|
21
|
+
* active, whether an update is available, and the Stripe subscription (for
|
|
22
|
+
* paid apps).
|
|
23
|
+
*
|
|
24
|
+
* The optional `ayouneContract` marker is reserved for an opt-in blockchain
|
|
25
|
+
* audit layer. It is written once on install and never read by current
|
|
26
|
+
* code — removing it later requires a migration, so it stays for now.
|
|
27
|
+
*/
|
|
28
|
+
export interface IMarketplaceInstallation extends IDefaultFields {
|
|
29
|
+
/** Installer (target) customer */
|
|
30
|
+
_customerID: ObjectId;
|
|
31
|
+
/** Source (reseller / Tolinax) customer — shortcut to the app's owner */
|
|
32
|
+
_publisherCustomerID: ObjectId;
|
|
33
|
+
_app: ObjectId;
|
|
34
|
+
_bundle: ObjectId;
|
|
35
|
+
/** Snapshot of `IMarketplaceBundle.version` at install time */
|
|
36
|
+
bundleVersion: string;
|
|
37
|
+
status: MarketplaceInstallationStatus;
|
|
38
|
+
installedAt?: Date;
|
|
39
|
+
copiedEntityIds: IMarketplaceInstallationCopiedIds;
|
|
40
|
+
/** Set to true when a newer bundle version is published for the same app */
|
|
41
|
+
updateAvailable?: boolean;
|
|
42
|
+
/** Set when the app has `price > 0` and a Stripe subscription backs it */
|
|
43
|
+
_stripeSubscriptionID?: string;
|
|
44
|
+
/** Dormant blockchain-audit marker — set on install, never read today */
|
|
45
|
+
ayouneContract?: IaYOUneContract;
|
|
46
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IDefaultFields } from "./IDefaultFields";
|
|
2
|
+
/**
|
|
3
|
+
* Customer-submitted review for an installed `IMarketplaceApp`. The
|
|
4
|
+
* publisher can reply once per review via `PUT /marketplacereviews/:id`
|
|
5
|
+
* (only `publisherReply` + `publisherRepliedAt` writable from the
|
|
6
|
+
* publisher side).
|
|
7
|
+
*/
|
|
8
|
+
export interface IMarketplaceReview extends IDefaultFields {
|
|
9
|
+
/** Reviewer customer */
|
|
10
|
+
_customerID: ObjectId;
|
|
11
|
+
_app: ObjectId;
|
|
12
|
+
/** 1-5 integer */
|
|
13
|
+
rating: number;
|
|
14
|
+
comment?: string;
|
|
15
|
+
publisherReply?: string;
|
|
16
|
+
publisherRepliedAt?: Date;
|
|
17
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* in the in-app notifications panel and (up to two primary actions) as native
|
|
4
4
|
* Web-Push action buttons on supporting platforms.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* Five dispatch modes:
|
|
7
7
|
* - `link` — internal router navigation (`href` relative to the app)
|
|
8
8
|
* - `api` — `fetch()` call to an absolute endpoint, optionally with
|
|
9
9
|
* a confirm prompt; the service-worker can execute this
|
|
@@ -12,10 +12,21 @@
|
|
|
12
12
|
* dialog in the PWA; the text is POSTed to `endpoint`.
|
|
13
13
|
* - `ai-copilot` — opens the Comm-Sidebar Copilot panel with
|
|
14
14
|
* `copilotContext` pre-populated as the first user message.
|
|
15
|
+
* - `sidebar` — opens a specific Comm-Sidebar panel with an optional
|
|
16
|
+
* `itemId` / `threadId` / `messageId` target so the
|
|
17
|
+
* PWA scrolls/loads directly to the target item.
|
|
18
|
+
* Consumed by `SidebarDeeplinkService` in the
|
|
19
|
+
* `@tolinax/ayoune-comm-sidebar` library.
|
|
15
20
|
*/
|
|
16
|
-
export type NotificationActionType = "link" | "api" | "reply" | "ai-copilot";
|
|
21
|
+
export type NotificationActionType = "link" | "api" | "reply" | "ai-copilot" | "sidebar";
|
|
17
22
|
/** Visual weight of the action button. */
|
|
18
23
|
export type NotificationActionStyle = "primary" | "secondary" | "danger";
|
|
24
|
+
/**
|
|
25
|
+
* Target panel for `type: "sidebar"` actions. Mirrors the `SidebarPanel`
|
|
26
|
+
* union in `@tolinax/ayoune-comm-sidebar` — duplicated here so the
|
|
27
|
+
* interfaces package stays free of Angular/runtime deps.
|
|
28
|
+
*/
|
|
29
|
+
export type NotificationSidebarPanel = "copilot" | "notifications" | "phone" | "video" | "chat" | "contacts" | "channels" | "support" | "inbox";
|
|
19
30
|
export interface INotificationAction {
|
|
20
31
|
/** Stable identifier per notification — used as the Web-Push `action` id. */
|
|
21
32
|
id: string;
|
|
@@ -40,6 +51,21 @@ export interface INotificationAction {
|
|
|
40
51
|
* that are rendered against the notification's `data` context before
|
|
41
52
|
* being inserted into the input. */
|
|
42
53
|
copilotContext?: string;
|
|
54
|
+
/** For `type: "sidebar"` — the target panel to open. */
|
|
55
|
+
panel?: NotificationSidebarPanel;
|
|
56
|
+
/** For `type: "sidebar"` — optional target item inside the panel
|
|
57
|
+
* (notification id, ticket id, external-inbox conversation id, etc.). */
|
|
58
|
+
itemId?: string;
|
|
59
|
+
/** For `type: "sidebar"` with `panel: "chat"` or `panel: "channels"` —
|
|
60
|
+
* the thread/channel id to load before scrolling. */
|
|
61
|
+
threadId?: string;
|
|
62
|
+
/** For `type: "sidebar"` with `panel: "chat"` or `panel: "channels"` —
|
|
63
|
+
* optional message id to scroll into view after the thread loads. */
|
|
64
|
+
messageId?: string;
|
|
65
|
+
/** For `type: "sidebar"` with `panel: "phone"` — dialer sub-action
|
|
66
|
+
* (`accept`, `reject`, `dial`). Auto-fires `CommBridgeService.voice.*`
|
|
67
|
+
* on arrival when set. */
|
|
68
|
+
panelAction?: "accept" | "reject" | "dial" | "join";
|
|
43
69
|
/** Should this action close/dismiss the notification after firing? */
|
|
44
70
|
dismissOnComplete?: boolean;
|
|
45
71
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IDefaultFields } from "./IDefaultFields";
|
|
2
|
+
/**
|
|
3
|
+
* Reseller-scoped default-bundle configuration. Allows a reseller customer
|
|
4
|
+
* to pre-configure a set of bundles that are auto-installed whenever they
|
|
5
|
+
* onboard a new sub-customer. The `order` field controls install sequence
|
|
6
|
+
* when multiple defaults apply.
|
|
7
|
+
*/
|
|
8
|
+
export interface IResellerDefaultBundle extends IDefaultFields {
|
|
9
|
+
/** Reseller customer (owner of the default configuration) */
|
|
10
|
+
_customerID: ObjectId;
|
|
11
|
+
_bundle: ObjectId;
|
|
12
|
+
_app: ObjectId;
|
|
13
|
+
autoInstallOnCustomerCreate: boolean;
|
|
14
|
+
/** Lower = installed earlier */
|
|
15
|
+
order?: number;
|
|
16
|
+
notes?: string;
|
|
17
|
+
}
|
package/interfaces/index.d.ts
CHANGED
|
@@ -434,6 +434,10 @@ export * from "./IMarketBudget";
|
|
|
434
434
|
export * from "./IMarketBudgetByIndustry";
|
|
435
435
|
export * from "./IIndustryKPI";
|
|
436
436
|
export * from "./IMarketResearch";
|
|
437
|
+
export * from "./IMarketplaceApp";
|
|
438
|
+
export * from "./IMarketplaceBundle";
|
|
439
|
+
export * from "./IMarketplaceInstallation";
|
|
440
|
+
export * from "./IMarketplaceReview";
|
|
437
441
|
export * from "./IMaterial";
|
|
438
442
|
export * from "./IMaterialCommissioning";
|
|
439
443
|
export * from "./IMeeting";
|
|
@@ -565,6 +569,7 @@ export * from "./IRepository";
|
|
|
565
569
|
export * from "./IRequirement";
|
|
566
570
|
export * from "./IRequirementSchema";
|
|
567
571
|
export * from "./IResearchBudget";
|
|
572
|
+
export * from "./IResellerDefaultBundle";
|
|
568
573
|
export * from "./IRetrospective";
|
|
569
574
|
export * from "./IReturnOrder";
|
|
570
575
|
export * from "./IRewardLog";
|
package/interfaces/index.js
CHANGED
|
@@ -450,6 +450,10 @@ __exportStar(require("./IMarketBudget"), exports);
|
|
|
450
450
|
__exportStar(require("./IMarketBudgetByIndustry"), exports);
|
|
451
451
|
__exportStar(require("./IIndustryKPI"), exports);
|
|
452
452
|
__exportStar(require("./IMarketResearch"), exports);
|
|
453
|
+
__exportStar(require("./IMarketplaceApp"), exports);
|
|
454
|
+
__exportStar(require("./IMarketplaceBundle"), exports);
|
|
455
|
+
__exportStar(require("./IMarketplaceInstallation"), exports);
|
|
456
|
+
__exportStar(require("./IMarketplaceReview"), exports);
|
|
453
457
|
__exportStar(require("./IMaterial"), exports);
|
|
454
458
|
__exportStar(require("./IMaterialCommissioning"), exports);
|
|
455
459
|
__exportStar(require("./IMeeting"), exports);
|
|
@@ -581,6 +585,7 @@ __exportStar(require("./IRepository"), exports);
|
|
|
581
585
|
__exportStar(require("./IRequirement"), exports);
|
|
582
586
|
__exportStar(require("./IRequirementSchema"), exports);
|
|
583
587
|
__exportStar(require("./IResearchBudget"), exports);
|
|
588
|
+
__exportStar(require("./IResellerDefaultBundle"), exports);
|
|
584
589
|
__exportStar(require("./IRetrospective"), exports);
|
|
585
590
|
__exportStar(require("./IReturnOrder"), exports);
|
|
586
591
|
__exportStar(require("./IRewardLog"), exports);
|