@antcde/connect-ts 0.4.20-rc.1 → 0.4.20-rc.2
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/build/index.d.ts +34 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +3 -8
- package/build/services/{AppService/types/appManifest.d.ts → AppManifest.d.ts} +1 -16
- package/build/services/AppManifest.d.ts.map +1 -0
- package/build/services/AppService.d.ts +57 -0
- package/build/services/AppService.d.ts.map +1 -0
- package/build/services/AppService.js +47 -0
- package/build/services/AppService.types.d.ts +173 -0
- package/build/services/AppService.types.d.ts.map +1 -0
- package/build/services/Notifications/NotificationService.d.ts +2 -23
- package/build/services/Notifications/NotificationService.d.ts.map +1 -1
- package/build/services/Notifications/NotificationService.js +0 -5
- package/build/services/TableService.js +7 -7
- package/build/services/TaskService.types.d.ts.map +1 -1
- package/build/services/UserService.d.ts +0 -2
- package/build/services/UserService.d.ts.map +1 -1
- package/package.json +1 -1
- package/build/service-runtime.d.ts +0 -5
- package/build/service-runtime.d.ts.map +0 -1
- package/build/service-runtime.js +0 -6
- package/build/service-types-app.d.ts +0 -2
- package/build/service-types-app.d.ts.map +0 -1
- package/build/service-types-app.js +0 -3
- package/build/service-types.d.ts +0 -33
- package/build/service-types.d.ts.map +0 -1
- package/build/service-types.js +0 -7
- package/build/services/AppService/factory/assignments.d.ts +0 -57
- package/build/services/AppService/factory/assignments.d.ts.map +0 -1
- package/build/services/AppService/factory/assignments.js +0 -30
- package/build/services/AppService/factory/channels.d.ts +0 -25
- package/build/services/AppService/factory/channels.d.ts.map +0 -1
- package/build/services/AppService/factory/channels.js +0 -17
- package/build/services/AppService/factory/formData.d.ts +0 -14
- package/build/services/AppService/factory/formData.d.ts.map +0 -1
- package/build/services/AppService/factory/formData.js +0 -50
- package/build/services/AppService/factory/subscriptions.d.ts +0 -73
- package/build/services/AppService/factory/subscriptions.d.ts.map +0 -1
- package/build/services/AppService/factory/subscriptions.js +0 -39
- package/build/services/AppService/index.d.ts +0 -66
- package/build/services/AppService/index.d.ts.map +0 -1
- package/build/services/AppService/index.js +0 -80
- package/build/services/AppService/types/accessRequests.d.ts +0 -93
- package/build/services/AppService/types/accessRequests.d.ts.map +0 -1
- package/build/services/AppService/types/app.d.ts +0 -243
- package/build/services/AppService/types/app.d.ts.map +0 -1
- package/build/services/AppService/types/app.js +0 -4
- package/build/services/AppService/types/appCategories.d.ts +0 -16
- package/build/services/AppService/types/appCategories.d.ts.map +0 -1
- package/build/services/AppService/types/appChangelog.d.ts +0 -31
- package/build/services/AppService/types/appChangelog.d.ts.map +0 -1
- package/build/services/AppService/types/appChangelog.js +0 -1
- package/build/services/AppService/types/appManifest.d.ts.map +0 -1
- package/build/services/AppService/types/appManifest.js +0 -4
- package/build/services/AppService/types/appMedia.d.ts +0 -101
- package/build/services/AppService/types/appMedia.d.ts.map +0 -1
- package/build/services/AppService/types/appMedia.js +0 -1
- package/build/services/AppService/types/appRequests.d.ts +0 -107
- package/build/services/AppService/types/appRequests.d.ts.map +0 -1
- package/build/services/AppService/types/appRequests.js +0 -1
- package/build/services/AppService/types/channels.d.ts +0 -45
- package/build/services/AppService/types/channels.d.ts.map +0 -1
- package/build/services/AppService/types/channels.js +0 -1
- package/build/services/AppService/types/pricingTiers.d.ts +0 -85
- package/build/services/AppService/types/pricingTiers.d.ts.map +0 -1
- package/build/services/AppService/types/pricingTiers.js +0 -1
- package/build/services/AppService/types/publisherStats.d.ts +0 -20
- package/build/services/AppService/types/publisherStats.d.ts.map +0 -1
- package/build/services/AppService/types/publisherStats.js +0 -1
- package/build/services/AppService/types/releaseChannels.d.ts +0 -84
- package/build/services/AppService/types/releaseChannels.d.ts.map +0 -1
- package/build/services/AppService/types/releaseChannels.js +0 -1
- package/build/services/AppService/types/seats.d.ts +0 -184
- package/build/services/AppService/types/seats.d.ts.map +0 -1
- package/build/services/AppService/types/seats.js +0 -4
- package/build/services/AppService/types/subscriptions.d.ts +0 -182
- package/build/services/AppService/types/subscriptions.d.ts.map +0 -1
- package/build/services/AppService/types/subscriptions.js +0 -1
- package/build/services/AppService/types.d.ts +0 -14
- package/build/services/AppService/types.d.ts.map +0 -1
- package/build/services/AppService/types.js +0 -16
- package/build/services/Websockets/StoreEvents.d.ts +0 -14
- package/build/services/Websockets/StoreEvents.d.ts.map +0 -1
- package/build/services/Websockets/StoreEvents.js +0 -5
- /package/build/services/{AppService/types/accessRequests.js → AppManifest.js} +0 -0
- /package/build/services/{AppService/types/appCategories.js → AppService.types.js} +0 -0
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { AppVersion } from './appMedia';
|
|
2
|
-
/**
|
|
3
|
-
* A release channel the current viewer can install from (single-app detail,
|
|
4
|
-
* `App.channels`). Drives the channel picker (e.g. Production vs Beta):
|
|
5
|
-
* `requires_subscription` is resolved for this viewer, `is_member` reflects
|
|
6
|
-
* specific-licenses access, and `active_version` is the installable build. Pass
|
|
7
|
-
* the chosen channel's `id` as `channel_id` to install so it is pinned to it.
|
|
8
|
-
*/
|
|
9
|
-
export interface AppChannel {
|
|
10
|
-
id: string;
|
|
11
|
-
name: string;
|
|
12
|
-
color?: string | null;
|
|
13
|
-
is_default: boolean;
|
|
14
|
-
access_override: 'free' | null;
|
|
15
|
-
requires_subscription: boolean;
|
|
16
|
-
/** License-level availability (channel access_mode / membership). */
|
|
17
|
-
is_member: boolean;
|
|
18
|
-
/** Per-user open eligibility = is_member AND the user's grant channel scope. */
|
|
19
|
-
has_access: boolean;
|
|
20
|
-
/** The install's pinned/primary channel — the default the user lands on. */
|
|
21
|
-
is_primary: boolean;
|
|
22
|
-
/** Matches the user's remembered channel choice (see preferred_channel_id). */
|
|
23
|
-
is_preferred: boolean;
|
|
24
|
-
active_version: AppVersion | null;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* A release channel the current user can open, as surfaced on the list/dashboard
|
|
28
|
-
* `ListApp` (scoped to channels with `has_access` — inaccessible ones are omitted
|
|
29
|
-
* server-side). Lets the FE render the split "Open" button + channel switcher on
|
|
30
|
-
* first load without fetching the full app. `>1 entry` ⇒ show the switcher.
|
|
31
|
-
*/
|
|
32
|
-
export interface AccessibleChannel {
|
|
33
|
-
id: string;
|
|
34
|
-
name: string;
|
|
35
|
-
color: string | null;
|
|
36
|
-
/** The install's pinned/primary channel — the default to open. */
|
|
37
|
-
is_primary: boolean;
|
|
38
|
-
/** Matches the user's remembered channel choice (App.preferred_channel_id). */
|
|
39
|
-
is_preferred: boolean;
|
|
40
|
-
active_version: {
|
|
41
|
-
id: string;
|
|
42
|
-
version: string;
|
|
43
|
-
} | null;
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=channels.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/channels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,UAAU,EAAE,OAAO,CAAA;IACnB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,qBAAqB,EAAE,OAAO,CAAA;IAC9B,qEAAqE;IACrE,SAAS,EAAE,OAAO,CAAA;IAClB,gFAAgF;IAChF,UAAU,EAAE,OAAO,CAAA;IACnB,4EAA4E;IAC5E,UAAU,EAAE,OAAO,CAAA;IACnB,+EAA+E;IAC/E,YAAY,EAAE,OAAO,CAAA;IACrB,cAAc,EAAE,UAAU,GAAG,IAAI,CAAA;CAClC;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,kEAAkE;IAClE,UAAU,EAAE,OAAO,CAAA;IACnB,+EAA+E;IAC/E,YAAY,EAAE,OAAO,CAAA;IACrB,cAAc,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACvD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
export type BillingPeriod = 'monthly' | 'quarterly' | 'yearly' | 'one_time';
|
|
2
|
-
/**
|
|
3
|
-
* How a tier is billed. Drives which price fields apply:
|
|
4
|
-
* - `free` — no charge
|
|
5
|
-
* - `flat` — single `price_amount` per license
|
|
6
|
-
* - `seat` — `seat_unit_price` per assigned seat, with optional min/max seats
|
|
7
|
-
*/
|
|
8
|
-
export type PricingModel = 'free' | 'flat' | 'seat';
|
|
9
|
-
/** Tier amount field — accepts number, string (legacy BE), or null. */
|
|
10
|
-
export type PricingAmount = number | string | null;
|
|
11
|
-
/** A single feature line. Plain strings preferred; objects kept for legacy tiers. */
|
|
12
|
-
export type PricingFeature = string | Record<string, unknown>;
|
|
13
|
-
export interface PricingTier {
|
|
14
|
-
id: string;
|
|
15
|
-
subject_type: string;
|
|
16
|
-
subject_id: string;
|
|
17
|
-
name: string;
|
|
18
|
-
/** Descriptive line shown under the price on the storefront card. */
|
|
19
|
-
description: string | null;
|
|
20
|
-
price_description: string | null;
|
|
21
|
-
/** Pricing model driving the price fields. */
|
|
22
|
-
pricing_model?: PricingModel;
|
|
23
|
-
/** Numeric amount per billing period. Zero for the free tier. */
|
|
24
|
-
price_amount?: number | null;
|
|
25
|
-
/** ISO-4217 code. Defaults to EUR on BE when amount is set. */
|
|
26
|
-
price_currency?: string | null;
|
|
27
|
-
/**
|
|
28
|
-
* Per-seat unit price added on top of `price_amount`. Required when
|
|
29
|
-
* `seat_based` is true; null on flat-rate tiers.
|
|
30
|
-
*/
|
|
31
|
-
seat_unit_price?: PricingAmount;
|
|
32
|
-
billing_period: BillingPeriod;
|
|
33
|
-
trial_days: number;
|
|
34
|
-
seat_based: boolean;
|
|
35
|
-
/** Minimum seats per license for seat-based tiers. */
|
|
36
|
-
min_seats?: number | null;
|
|
37
|
-
max_seats: number | null;
|
|
38
|
-
grace_period_days: number;
|
|
39
|
-
features: PricingFeature[] | null;
|
|
40
|
-
/** Highlights the tier (badge + accent border) on the storefront. */
|
|
41
|
-
recommended?: boolean;
|
|
42
|
-
is_active: boolean;
|
|
43
|
-
sort_order: number;
|
|
44
|
-
created_at: string;
|
|
45
|
-
updated_at: string;
|
|
46
|
-
subscription_count?: number;
|
|
47
|
-
}
|
|
48
|
-
export interface CreatePricingTierData {
|
|
49
|
-
name: string;
|
|
50
|
-
description?: string | null;
|
|
51
|
-
price_description?: string | null;
|
|
52
|
-
pricing_model?: PricingModel;
|
|
53
|
-
price_amount?: number | null;
|
|
54
|
-
price_currency?: string | null;
|
|
55
|
-
seat_unit_price?: number | null;
|
|
56
|
-
billing_period: BillingPeriod;
|
|
57
|
-
trial_days?: number;
|
|
58
|
-
seat_based?: boolean;
|
|
59
|
-
min_seats?: number | null;
|
|
60
|
-
max_seats?: number | null;
|
|
61
|
-
grace_period_days?: number;
|
|
62
|
-
features?: PricingFeature[] | null;
|
|
63
|
-
recommended?: boolean;
|
|
64
|
-
sort_order?: number;
|
|
65
|
-
}
|
|
66
|
-
export interface UpdatePricingTierData {
|
|
67
|
-
name?: string;
|
|
68
|
-
description?: string | null;
|
|
69
|
-
price_description?: string | null;
|
|
70
|
-
pricing_model?: PricingModel;
|
|
71
|
-
price_amount?: number | null;
|
|
72
|
-
price_currency?: string | null;
|
|
73
|
-
seat_unit_price?: number | null;
|
|
74
|
-
billing_period?: BillingPeriod;
|
|
75
|
-
trial_days?: number;
|
|
76
|
-
seat_based?: boolean;
|
|
77
|
-
min_seats?: number | null;
|
|
78
|
-
max_seats?: number | null;
|
|
79
|
-
grace_period_days?: number;
|
|
80
|
-
features?: PricingFeature[] | null;
|
|
81
|
-
recommended?: boolean;
|
|
82
|
-
sort_order?: number;
|
|
83
|
-
is_active?: boolean;
|
|
84
|
-
}
|
|
85
|
-
//# sourceMappingURL=pricingTiers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pricingTiers.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/pricingTiers.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAA;AAE3E;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;AAEnD,uEAAuE;AACvE,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;AAElD,qFAAqF;AACrF,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE7D,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,qEAAqE;IACrE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,8CAA8C;IAC9C,aAAa,CAAC,EAAE,YAAY,CAAA;IAC5B,iEAAiE;IACjE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B;;;OAGG;IACH,eAAe,CAAC,EAAE,aAAa,CAAA;IAC/B,cAAc,EAAE,aAAa,CAAA;IAC7B,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,OAAO,CAAA;IACnB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC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AE,YAAY,CAAA;IAC5B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,cAAc,CAAC,EAAE,aAAa,CAAA;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,EAAE,cAAc,EAAE,GAAG,IAAI,CAAA;IAClC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export interface PublisherStatsAccessRequests {
|
|
2
|
-
pending: number;
|
|
3
|
-
approved: number;
|
|
4
|
-
denied: number;
|
|
5
|
-
expired: number;
|
|
6
|
-
}
|
|
7
|
-
export interface PublisherStatsApp {
|
|
8
|
-
app_id: string;
|
|
9
|
-
app_title: string;
|
|
10
|
-
app_icon_url: string | null;
|
|
11
|
-
install_count_total: number;
|
|
12
|
-
install_count_last_7d: number;
|
|
13
|
-
install_count_prev_7d: number;
|
|
14
|
-
/** null when prev_7d = 0 — render as "no baseline", semantically distinct from 0 */
|
|
15
|
-
install_trend_pct: number | null;
|
|
16
|
-
access_requests: PublisherStatsAccessRequests;
|
|
17
|
-
active_channels_count: number;
|
|
18
|
-
last_updated_at: string;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=publisherStats.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publisherStats.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/publisherStats.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,mBAAmB,EAAE,MAAM,CAAA;IAC3B,qBAAqB,EAAE,MAAM,CAAA;IAC7B,qBAAqB,EAAE,MAAM,CAAA;IAC7B,oFAAoF;IACpF,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,eAAe,EAAE,4BAA4B,CAAA;IAC7C,qBAAqB,EAAE,MAAM,CAAA;IAC7B,eAAe,EAAE,MAAM,CAAA;CACxB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import type { AppVersion } from './appMedia';
|
|
2
|
-
/**
|
|
3
|
-
* Per-channel access override (subscription bypass).
|
|
4
|
-
* - `'free'` — members of this channel skip the subscription/seat gate
|
|
5
|
-
* (other access controls still apply)
|
|
6
|
-
* - `null` — inherit the app's access model (default)
|
|
7
|
-
*
|
|
8
|
-
* Distinct from `ChannelAccessMode`, which governs WHO can access the channel.
|
|
9
|
-
*/
|
|
10
|
-
export type ReleaseChannelAccessOverride = 'free' | null;
|
|
11
|
-
/**
|
|
12
|
-
* Mutually-exclusive access mode for a release channel.
|
|
13
|
-
* - `'default'` — anyone with general app access can use the channel; the
|
|
14
|
-
* member pivot is ignored
|
|
15
|
-
* - `'specific_licenses'` — gated by the license-member pivot (the only mode
|
|
16
|
-
* whose membership grants entitlement)
|
|
17
|
-
*
|
|
18
|
-
* The former `'role'` mode (and per-channel RBAC roles) were removed.
|
|
19
|
-
*/
|
|
20
|
-
export type ChannelAccessMode = 'default' | 'specific_licenses';
|
|
21
|
-
export interface ReleaseChannel {
|
|
22
|
-
id: string;
|
|
23
|
-
name: string;
|
|
24
|
-
description: string | null;
|
|
25
|
-
color: string | null;
|
|
26
|
-
member_count: number | null;
|
|
27
|
-
active_version: AppVersion | null;
|
|
28
|
-
is_member: boolean;
|
|
29
|
-
access_override: ReleaseChannelAccessOverride;
|
|
30
|
-
access_mode: ChannelAccessMode;
|
|
31
|
-
sort_order: number;
|
|
32
|
-
/**
|
|
33
|
-
* Exactly one channel per app is the default. The default channel is
|
|
34
|
-
* auto-created on app creation and cannot be deleted; marking another
|
|
35
|
-
* channel default atomically demotes the previous one.
|
|
36
|
-
*/
|
|
37
|
-
is_default: boolean;
|
|
38
|
-
created_at?: string;
|
|
39
|
-
updated_at?: string;
|
|
40
|
-
}
|
|
41
|
-
export interface CreateReleaseChannelData {
|
|
42
|
-
name: string;
|
|
43
|
-
description?: string;
|
|
44
|
-
color?: string | null;
|
|
45
|
-
access_override?: ReleaseChannelAccessOverride;
|
|
46
|
-
access_mode?: ChannelAccessMode;
|
|
47
|
-
sort_order?: number;
|
|
48
|
-
/** Marking this channel default atomically demotes the previous default. */
|
|
49
|
-
is_default?: boolean;
|
|
50
|
-
}
|
|
51
|
-
export interface UpdateReleaseChannelData {
|
|
52
|
-
name?: string;
|
|
53
|
-
/**
|
|
54
|
-
* `undefined` leaves the description unchanged; pass `null` to clear it.
|
|
55
|
-
*/
|
|
56
|
-
description?: string | null;
|
|
57
|
-
/**
|
|
58
|
-
* `undefined` leaves the color unchanged; pass `null` to clear it.
|
|
59
|
-
*/
|
|
60
|
-
color?: string | null;
|
|
61
|
-
sort_order?: number;
|
|
62
|
-
access_override?: ReleaseChannelAccessOverride;
|
|
63
|
-
access_mode?: ChannelAccessMode;
|
|
64
|
-
/**
|
|
65
|
-
* Set `true` to promote this channel to default (demotes the previous
|
|
66
|
-
* default). The backend rejects unsetting the current default.
|
|
67
|
-
*/
|
|
68
|
-
is_default?: boolean;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Compact license identity returned by the channel members endpoints —
|
|
72
|
-
* enough to render a chip without a directory lookup.
|
|
73
|
-
*/
|
|
74
|
-
export interface ReleaseChannelMember {
|
|
75
|
-
id: string;
|
|
76
|
-
name: string;
|
|
77
|
-
/** Hex string */
|
|
78
|
-
theme: string;
|
|
79
|
-
/** Company name of the member license, or null. */
|
|
80
|
-
company: string | null;
|
|
81
|
-
/** When the license was added to the channel (members list only). */
|
|
82
|
-
added_at?: string | null;
|
|
83
|
-
}
|
|
84
|
-
//# sourceMappingURL=releaseChannels.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"releaseChannels.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/releaseChannels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C;;;;;;;GAOG;AACH,MAAM,MAAM,4BAA4B,GAAG,MAAM,GAAG,IAAI,CAAA;AAExD;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,mBAAmB,CAAA;AAE/D,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,cAAc,EAAE,UAAU,GAAG,IAAI,CAAA;IACjC,SAAS,EAAE,OAAO,CAAA;IAClB,eAAe,EAAE,4BAA4B,CAAA;IAC7C,WAAW,EAAE,iBAAiB,CAAA;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,eAAe,CAAC,EAAE,4BAA4B,CAAA;IAC9C,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,4EAA4E;IAC5E,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,eAAe,CAAC,EAAE,4BAA4B,CAAA;IAC9C,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,mDAAmD;IACnD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
/** Sentinel channel id meaning "all channels" (the channel-agnostic grant). */
|
|
2
|
-
export declare const CHANNEL_ALL = "*";
|
|
3
|
-
/** Result of setting a project's seat bundle for an app. */
|
|
4
|
-
export interface SeatAllocation {
|
|
5
|
-
app_id: string;
|
|
6
|
-
project_id: string;
|
|
7
|
-
/** The project's seat budget; `null` means no cap (cleared / non-seat). */
|
|
8
|
-
seats_allocated: number | null;
|
|
9
|
-
}
|
|
10
|
-
/** Result of assigning / unassigning a role or user to a project install. */
|
|
11
|
-
export interface AppAssignment {
|
|
12
|
-
app_id: string;
|
|
13
|
-
project_id: string;
|
|
14
|
-
role_id?: string;
|
|
15
|
-
user_id?: string;
|
|
16
|
-
assigned: boolean;
|
|
17
|
-
/** Channels granted (echoes the request; `[CHANNEL_ALL]` for all channels). */
|
|
18
|
-
channel_ids: string[];
|
|
19
|
-
}
|
|
20
|
-
/** Result of a license-scope assignment (covers all projects / license-based apps). */
|
|
21
|
-
export interface LicenseAssignment {
|
|
22
|
-
app_id: string;
|
|
23
|
-
license_id: string;
|
|
24
|
-
role_id?: string;
|
|
25
|
-
user_id?: string;
|
|
26
|
-
assigned: boolean;
|
|
27
|
-
channel_ids: string[];
|
|
28
|
-
}
|
|
29
|
-
/** A role granted app.use, with the channels it may open (`[CHANNEL_ALL]` = all). */
|
|
30
|
-
export interface AssignedRole {
|
|
31
|
-
role_id: string;
|
|
32
|
-
name: string | null;
|
|
33
|
-
channel_ids: string[];
|
|
34
|
-
/** Live rbac_role_user membership count (deleted/expiry-filtered). */
|
|
35
|
-
member_count: number;
|
|
36
|
-
}
|
|
37
|
-
/** A user pinned directly, with the channels they may open. */
|
|
38
|
-
export interface AssignedUser {
|
|
39
|
-
user_id: string;
|
|
40
|
-
name: string | null;
|
|
41
|
-
email: string | null;
|
|
42
|
-
channel_ids: string[];
|
|
43
|
-
}
|
|
44
|
-
/** An implicit admin role (always has access, all channels). */
|
|
45
|
-
export interface AdminRole {
|
|
46
|
-
role_id: string;
|
|
47
|
-
name: string | null;
|
|
48
|
-
/** Live rbac_role_user membership count (deleted/expiry-filtered). */
|
|
49
|
-
member_count: number;
|
|
50
|
-
}
|
|
51
|
-
/** The "everyone" grant on a scope — all members get access on these channels. */
|
|
52
|
-
export interface EveryoneGrant {
|
|
53
|
-
/** Channels everyone may open (`[CHANNEL_ALL]` = all). */
|
|
54
|
-
channel_ids: string[];
|
|
55
|
-
}
|
|
56
|
-
/** One occupant of a seat scope, with FIFO rank and whether they currently hold a seat. */
|
|
57
|
-
export interface SeatOccupant {
|
|
58
|
-
user_id: string;
|
|
59
|
-
/** FIFO position in the scope. `null` for license-covered occupants (no bundle rank). */
|
|
60
|
-
rank: number | null;
|
|
61
|
-
has_seat: boolean;
|
|
62
|
-
/** Resolved display name / email (no separate directory lookup needed). `null` if the user is gone. */
|
|
63
|
-
name: string | null;
|
|
64
|
-
email: string | null;
|
|
65
|
-
/** ISO-8601 claim time (role-membership / grant / admin time). */
|
|
66
|
-
claimed_at: string | null;
|
|
67
|
-
/** How the seat is held. */
|
|
68
|
-
source: 'admin' | 'role' | 'direct';
|
|
69
|
-
/** The granting role id when `source === 'role'`, else `null`. */
|
|
70
|
-
role_id: string | null;
|
|
71
|
-
/** Admin auto-seat — mandatory & unremovable (lock icon). */
|
|
72
|
-
is_admin: boolean;
|
|
73
|
-
/** Channels this occupant may open (`[CHANNEL_ALL]` = all, e.g. admins). */
|
|
74
|
-
channels: string[];
|
|
75
|
-
/**
|
|
76
|
-
* (Project occupancy only) the occupant is covered by a license-wide seat, so
|
|
77
|
-
* they consume a license seat, not a bundle seat. Absent on license_seats rows.
|
|
78
|
-
*/
|
|
79
|
-
license_covered?: boolean;
|
|
80
|
-
}
|
|
81
|
-
/** A project's seat bundle with its occupants. */
|
|
82
|
-
export interface ProjectSeatBundle {
|
|
83
|
-
project_id: string;
|
|
84
|
-
/** The project's seat budget; `null` for a project that has no bundle yet (offer to allocate). */
|
|
85
|
-
seats_allocated: number | null;
|
|
86
|
-
/** Occupants currently holding a seat (≤ seats_allocated). */
|
|
87
|
-
seats_used: number;
|
|
88
|
-
/** Occupants over the budget, blocked at access time. */
|
|
89
|
-
blocked: number;
|
|
90
|
-
/** RBAC role ids currently assigned (granted app.use) on this install. */
|
|
91
|
-
assigned_role_ids: string[];
|
|
92
|
-
/** User ids directly assigned (pinned) on this install. */
|
|
93
|
-
assigned_user_ids: string[];
|
|
94
|
-
/** Assigned roles with names + their channel scope (for channel chips). */
|
|
95
|
-
assigned_roles: AssignedRole[];
|
|
96
|
-
/** Pinned users with names + their channel scope. */
|
|
97
|
-
assigned_users: AssignedUser[];
|
|
98
|
-
/** Implicit admin role ids for this project (always-on access). */
|
|
99
|
-
admin_role_ids: string[];
|
|
100
|
-
/** Implicit admin roles with names — render as locked "always · all channels". */
|
|
101
|
-
admin_roles: AdminRole[];
|
|
102
|
-
/** Admins of this project (for the "Admin: {name}" allocation row). */
|
|
103
|
-
project_admins: AdminContact[];
|
|
104
|
-
/** Non-seat "everyone" grant for this project — null = off (specific only). */
|
|
105
|
-
everyone: EveryoneGrant | null;
|
|
106
|
-
occupants: SeatOccupant[];
|
|
107
|
-
}
|
|
108
|
-
/** An escalation contact the FE can render and `mailto:` directly. */
|
|
109
|
-
export interface AdminContact {
|
|
110
|
-
user_id: string;
|
|
111
|
-
name: string;
|
|
112
|
-
email: string;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Why the current user can't use a seat-based app (null unless blocked).
|
|
116
|
-
* Drives the storefront "no seat available — contact X" UX.
|
|
117
|
-
*/
|
|
118
|
-
export interface AccessBlock {
|
|
119
|
-
blocked: true;
|
|
120
|
-
reason: 'seat_limit_exceeded';
|
|
121
|
-
scope_type: 'licenses' | 'projects' | null;
|
|
122
|
-
scope_id: string | null;
|
|
123
|
-
rank: number | null;
|
|
124
|
-
seats_allocated: number | null;
|
|
125
|
-
seats_required: number;
|
|
126
|
-
seats_purchased: number;
|
|
127
|
-
/** Buy at least this many more seats to clear everyone. */
|
|
128
|
-
seats_to_purchase: number;
|
|
129
|
-
escalation: {
|
|
130
|
-
/** Project admins (when the block is project-scoped) — name + email for "contact X" / mailto. */
|
|
131
|
-
project_admins: AdminContact[];
|
|
132
|
-
license_admins: AdminContact[];
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
/** Current grantees of a delegated app permission (app.manage / app.assign). */
|
|
136
|
-
export interface AppDelegates {
|
|
137
|
-
role_ids: string[];
|
|
138
|
-
user_ids: string[];
|
|
139
|
-
/** Roles with display names (so the FE need not resolve ids). */
|
|
140
|
-
roles: AdminRole[];
|
|
141
|
-
/** Users with display names + email. */
|
|
142
|
-
users: AdminContact[];
|
|
143
|
-
}
|
|
144
|
-
/** One project's seat view — the project-admin assignment screen data source. */
|
|
145
|
-
export interface ProjectSeatView {
|
|
146
|
-
seat_based: boolean;
|
|
147
|
-
seats_purchased?: number;
|
|
148
|
-
seats_to_purchase?: number;
|
|
149
|
-
project?: ProjectSeatBundle;
|
|
150
|
-
}
|
|
151
|
-
/** Aggregate seat picture for an app (license admin allocation overview). */
|
|
152
|
-
export interface AppSeatPicture {
|
|
153
|
-
seat_based: boolean;
|
|
154
|
-
seats_purchased?: number;
|
|
155
|
-
/** Σ of project bundles (reserved against the pool). */
|
|
156
|
-
seats_allocated_total?: number;
|
|
157
|
-
/** Distinct occupants who want access across all scopes. */
|
|
158
|
-
seats_required?: number;
|
|
159
|
-
/** max(0, seats_required − seats_purchased) — the "buy N more" figure. */
|
|
160
|
-
seats_to_purchase?: number;
|
|
161
|
-
/** RBAC role ids assigned app.use at LICENSE scope (mirrors a bundle's assigned_role_ids). */
|
|
162
|
-
license_assigned_role_ids?: string[];
|
|
163
|
-
/** User ids pinned directly at LICENSE scope. */
|
|
164
|
-
license_assigned_user_ids?: string[];
|
|
165
|
-
/** License-scope assigned roles with names + channel scope. */
|
|
166
|
-
license_assigned_roles?: AssignedRole[];
|
|
167
|
-
/** License-scope pinned users with names + channel scope. */
|
|
168
|
-
license_assigned_users?: AssignedUser[];
|
|
169
|
-
/** Non-seat "everyone" grant at license scope — null = off (specific only). */
|
|
170
|
-
license_everyone?: EveryoneGrant | null;
|
|
171
|
-
/** Implicit license admin role ids (always-on access). */
|
|
172
|
-
license_admin_role_ids?: string[];
|
|
173
|
-
/** Implicit license admin roles with names. */
|
|
174
|
-
license_admin_roles?: AdminRole[];
|
|
175
|
-
/** License-level seat holders (admins + direct grants), cover all projects. */
|
|
176
|
-
license_seats?: SeatOccupant[];
|
|
177
|
-
/**
|
|
178
|
-
* Per-project bundles. For project-based apps this includes EVERY license
|
|
179
|
-
* project (unallocated ones have `seats_allocated: null`). Empty for
|
|
180
|
-
* license-based apps (project scope is irrelevant).
|
|
181
|
-
*/
|
|
182
|
-
projects?: ProjectSeatBundle[];
|
|
183
|
-
}
|
|
184
|
-
//# sourceMappingURL=seats.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"seats.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/seats.ts"],"names":[],"mappings":"AAGA,+EAA+E;AAC/E,eAAO,MAAM,WAAW,MAAM,CAAA;AAE9B,4DAA4D;AAC5D,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,2EAA2E;IAC3E,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;CAC/B;AAED,6EAA6E;AAC7E,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,OAAO,CAAA;IACjB,+EAA+E;IAC/E,WAAW,EAAE,MAAM,EAAE,CAAA;CACtB;AAED,uFAAuF;AACvF,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,OAAO,CAAA;IACjB,WAAW,EAAE,MAAM,EAAE,CAAA;CACtB;AAED,qFAAqF;AACrF,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAA;I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,CAAC,EAAE,iBAAiB,EAAE,CAAA;CAC/B"}
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import type { PricingModel, PricingTier } from './pricingTiers';
|
|
2
|
-
/**
|
|
3
|
-
* `pending_approval` is the initial state of a paid purchase: the buyer has
|
|
4
|
-
* requested to buy, but the publisher (seller) has not yet approved the offline
|
|
5
|
-
* payment. It grants NO access — the app stays locked until approval moves the
|
|
6
|
-
* subscription to `trial`/`active`.
|
|
7
|
-
*/
|
|
8
|
-
export type SubscriptionStatus = 'pending_approval' | 'trial' | 'active' | 'grace_period' | 'expired' | 'cancelled';
|
|
9
|
-
/**
|
|
10
|
-
* Lightweight subscription summary embedded on App / ListApp resources to drive
|
|
11
|
-
* card state (in trial, in grace period, seats badge). Mirrors the
|
|
12
|
-
* `preloadedSubscription` shape on the backend (AppService::preloadSubscriptionData).
|
|
13
|
-
*/
|
|
14
|
-
export interface AppSubscriptionSummary {
|
|
15
|
-
id: string;
|
|
16
|
-
status: SubscriptionStatus;
|
|
17
|
-
tier_id: string;
|
|
18
|
-
tier_name: string | null;
|
|
19
|
-
/**
|
|
20
|
-
* The tier's billing nature. Use this — not `status` — to tell a perpetual
|
|
21
|
-
* free plan apart from a time-limited trial of a paid tier. A free-tier
|
|
22
|
-
* subscription is always delivered as `status: 'active'` with
|
|
23
|
-
* `trial_ends_at: null` (the BE normalizes it), and `is_free: true`.
|
|
24
|
-
*/
|
|
25
|
-
pricing_model: PricingModel | null;
|
|
26
|
-
/** Convenience flag: `pricing_model === 'free'`. */
|
|
27
|
-
is_free: boolean;
|
|
28
|
-
features: Record<string, unknown>[] | null;
|
|
29
|
-
seat_based: boolean;
|
|
30
|
-
seats_purchased: number;
|
|
31
|
-
seats_used: number;
|
|
32
|
-
/** Pending seat-increase target awaiting publisher approval (null = none). */
|
|
33
|
-
requested_seats_purchased?: number | null;
|
|
34
|
-
seat_change_requested_at?: string | null;
|
|
35
|
-
trial_ends_at: string | null;
|
|
36
|
-
grace_period_ends_at: string | null;
|
|
37
|
-
current_period_start: string | null;
|
|
38
|
-
current_period_end: string | null;
|
|
39
|
-
auto_renew: boolean;
|
|
40
|
-
has_seat: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Whether the current user may manage this subscription for the license
|
|
43
|
-
* (admin role or `apps.configure`): change plan, manage seats, cancel,
|
|
44
|
-
* reactivate. Gate the My Access manage controls on this. A seat-based app
|
|
45
|
-
* where the user has no seat AND `can_manage` is false grants no access.
|
|
46
|
-
*/
|
|
47
|
-
can_manage: boolean;
|
|
48
|
-
}
|
|
49
|
-
export interface Subscription {
|
|
50
|
-
id: string;
|
|
51
|
-
subject_type: string;
|
|
52
|
-
subject_id: string;
|
|
53
|
-
license_id: string;
|
|
54
|
-
pricing_tier_id: string;
|
|
55
|
-
status: SubscriptionStatus;
|
|
56
|
-
seats_purchased: number;
|
|
57
|
-
current_period_start: string | null;
|
|
58
|
-
current_period_end: string | null;
|
|
59
|
-
grace_period_ends_at: string | null;
|
|
60
|
-
trial_ends_at: string | null;
|
|
61
|
-
payment_confirmed_at: string | null;
|
|
62
|
-
external_payment_ref: string | null;
|
|
63
|
-
auto_renew: boolean;
|
|
64
|
-
requested_tier_id: string | null;
|
|
65
|
-
tier_change_requested_at: string | null;
|
|
66
|
-
/** Pending seat-increase target awaiting publisher approval (null = none). */
|
|
67
|
-
requested_seats_purchased: number | null;
|
|
68
|
-
seat_change_requested_at: string | null;
|
|
69
|
-
/**
|
|
70
|
-
* True when the buyer must pick an active tier before the subscription
|
|
71
|
-
* can resume (e.g. their previous tier was archived). Pair with status
|
|
72
|
-
* `grace_period` to render a recovery CTA.
|
|
73
|
-
*/
|
|
74
|
-
requires_tier_selection: boolean;
|
|
75
|
-
cancelled_at: string | null;
|
|
76
|
-
/**
|
|
77
|
-
* Set when the publisher has been notified that this recurring subscription's
|
|
78
|
-
* next offline payment is due (cleared once the period advances). Used by the
|
|
79
|
-
* publisher UI to show "renewal notice sent".
|
|
80
|
-
*/
|
|
81
|
-
renewal_notified_at: string | null;
|
|
82
|
-
/**
|
|
83
|
-
* Optional buyer note attached at purchase time ("note to publisher"). Shown
|
|
84
|
-
* as a quote on the publisher approval-inbox row. Null when none was given.
|
|
85
|
-
*/
|
|
86
|
-
message?: string | null;
|
|
87
|
-
created_at: string;
|
|
88
|
-
updated_at: string;
|
|
89
|
-
pricing_tier?: PricingTier;
|
|
90
|
-
/** Populated when there is a pending tier change request. */
|
|
91
|
-
requested_tier?: PricingTier | null;
|
|
92
|
-
/**
|
|
93
|
-
* Buyer license that owns the subscription. Embedded on publisher reads
|
|
94
|
-
* (approval inbox / active subscriptions) so rows can show the license name.
|
|
95
|
-
*/
|
|
96
|
-
license?: SubscriptionLicense | null;
|
|
97
|
-
/**
|
|
98
|
-
* Who submitted the purchase request. Embedded on publisher reads for the
|
|
99
|
-
* "requested by {name}" line on the approval-inbox row.
|
|
100
|
-
*/
|
|
101
|
-
requester?: SubscriptionRequester | null;
|
|
102
|
-
}
|
|
103
|
-
export interface SubscriptionLicense {
|
|
104
|
-
id: string;
|
|
105
|
-
name: string;
|
|
106
|
-
}
|
|
107
|
-
export interface SubscriptionRequester {
|
|
108
|
-
user_id: string;
|
|
109
|
-
user_name: string;
|
|
110
|
-
license_id: string;
|
|
111
|
-
license_name: string;
|
|
112
|
-
}
|
|
113
|
-
/** Query params for the publisher's per-app subscription list. */
|
|
114
|
-
export interface FetchAppSubscriptionsParams {
|
|
115
|
-
/** Filter by status; comma-separate for multiple. Omit to exclude pending_approval. */
|
|
116
|
-
status?: SubscriptionStatus | string;
|
|
117
|
-
}
|
|
118
|
-
export interface RequestTierChangeData {
|
|
119
|
-
pricing_tier_id: string;
|
|
120
|
-
}
|
|
121
|
-
export interface RequestSeatChangeData {
|
|
122
|
-
/** Desired TOTAL seat count (must exceed the current count — increase only). */
|
|
123
|
-
seats: number;
|
|
124
|
-
/** Optional buyer note to the publisher. */
|
|
125
|
-
message?: string;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Surplus seat assignment surfaced by the API when a seat-decrease attempt
|
|
129
|
-
* fails because seats are still occupied. Buyer must revoke seats first.
|
|
130
|
-
* Sized to the surplus, ordered most-recent-first.
|
|
131
|
-
*/
|
|
132
|
-
export interface SurplusSeatAssignment {
|
|
133
|
-
seat_id: string;
|
|
134
|
-
user_id: string;
|
|
135
|
-
assigned_at: string;
|
|
136
|
-
}
|
|
137
|
-
export interface CreateSubscriptionData {
|
|
138
|
-
pricing_tier_id: string;
|
|
139
|
-
seats_purchased?: number;
|
|
140
|
-
/** Optional buyer note to the publisher (PO number, billing contact, etc.). */
|
|
141
|
-
message?: string;
|
|
142
|
-
}
|
|
143
|
-
export interface UpdateSubscriptionData {
|
|
144
|
-
/**
|
|
145
|
-
* Seat DECREASE only (no charge). Increasing seats is rejected (409) — use
|
|
146
|
-
* `requestSeatChange` so the publisher approves the offline payment.
|
|
147
|
-
*/
|
|
148
|
-
seats_purchased?: number;
|
|
149
|
-
auto_renew?: boolean;
|
|
150
|
-
}
|
|
151
|
-
export interface ConfirmPaymentData {
|
|
152
|
-
external_payment_ref?: string;
|
|
153
|
-
}
|
|
154
|
-
export interface SubscriptionSeat {
|
|
155
|
-
id: string;
|
|
156
|
-
subscription_id: string;
|
|
157
|
-
user_id: string;
|
|
158
|
-
scope_type: string | null;
|
|
159
|
-
scope_id: string | null;
|
|
160
|
-
assigned_at: string;
|
|
161
|
-
assigned_by: string | null;
|
|
162
|
-
created_at: string;
|
|
163
|
-
user?: {
|
|
164
|
-
id: string;
|
|
165
|
-
name: string;
|
|
166
|
-
email: string;
|
|
167
|
-
};
|
|
168
|
-
assigned_by_user?: {
|
|
169
|
-
id: string;
|
|
170
|
-
name: string;
|
|
171
|
-
email: string;
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
export interface AssignSeatData {
|
|
175
|
-
user_id: string;
|
|
176
|
-
}
|
|
177
|
-
export interface AvailableSeatUser {
|
|
178
|
-
id: string;
|
|
179
|
-
name: string;
|
|
180
|
-
email: string;
|
|
181
|
-
}
|
|
182
|
-
//# sourceMappingURL=subscriptions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/subscriptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAE/D;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,GAAG,OAAO,GAAG,QAAQ,GAAG,cAAc,GAAG,SAAS,GAAG,WAAW,CAAA;AAEnH;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,kBAAkB,CAAA;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB;;;;;OAKG;IACH,aAAa,EAAE,YAAY,GAAG,IAAI,CAAA;IAClC,oDAAoD;IACpD,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,IAAI,CAAA;IAC1C,UAAU,EAAE,OAAO,CAAA;IACnB,eAAe,EAAE,MAAM,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,8EAA8E;IAC9E,yBAAyB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzC,wBAAwB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,UAAU,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB;;;;;OAKG;IACH,UAAU,EAAE,OAAO,CAAA;CACp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