@antcde/connect-ts 0.4.26-rc.5 → 0.4.26
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/AntConnect.d.ts +0 -6
- package/build/AntConnect.d.ts.map +1 -1
- package/build/AntConnect.js +0 -6
- package/build/comms/client.d.ts +1 -0
- package/build/comms/client.d.ts.map +1 -1
- package/build/comms/client.js +1 -0
- package/build/comms/signalChangeTypes.d.ts +1 -27
- package/build/comms/signalChangeTypes.d.ts.map +1 -1
- package/build/comms/signalChangeTypes.js +0 -7
- package/build/comms/signalTypes.d.ts +0 -18
- package/build/comms/signalTypes.d.ts.map +1 -1
- package/build/index.d.ts +34 -5
- 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/DmsService.d.ts +0 -13
- package/build/services/DmsService.d.ts.map +1 -1
- package/build/services/DmsServiceImpl.d.ts.map +1 -1
- package/build/services/DmsServiceImpl.js +0 -8
- package/build/services/LicenseService.d.ts +1 -1
- package/build/services/LicenseService.d.ts.map +1 -1
- package/build/services/LicenseService.js +1 -1
- package/build/services/ProjectService.d.ts +0 -1
- package/build/services/ProjectService.d.ts.map +1 -1
- package/build/services/ReleaseService.d.ts +0 -1
- package/build/services/ReleaseService.d.ts.map +1 -1
- package/build/services/TableService.js +7 -7
- package/build/services/TaskService.d.ts +3 -3
- package/build/services/TaskService.d.ts.map +1 -1
- package/build/services/TaskService.js +1 -1
- package/build/services/TaskService.types.d.ts +4 -21
- package/build/services/TaskService.types.d.ts.map +1 -1
- package/build/services/TaskServiceQueries.d.ts +0 -2
- package/build/services/TaskServiceQueries.d.ts.map +1 -1
- package/build/services/TaskServiceQueries.js +2 -13
- package/build/services/TaskTemplate.types.d.ts +1 -74
- package/build/services/TaskTemplate.types.d.ts.map +1 -1
- package/build/services/TokenService.d.ts +0 -5
- package/build/services/TokenService.d.ts.map +1 -1
- package/build/services/TokenService.js +0 -1
- package/build/services/UserService.js +4 -4
- package/build/services/Webhook/TriggerHistoryService.d.ts +1 -1
- package/build/services/Webhook/TriggerHistoryService.d.ts.map +1 -1
- package/build/services/Webhook/TriggerService.d.ts +0 -28
- package/build/services/Webhook/TriggerService.d.ts.map +1 -1
- package/build/services/Webhook/TriggerService.js +0 -10
- package/package.json +6 -6
- package/schemas/app-config.schema.json +0 -6
- package/build/service-runtime.d.ts +0 -6
- package/build/service-runtime.d.ts.map +0 -1
- package/build/service-runtime.js +0 -7
- 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 -36
- package/build/service-types.d.ts.map +0 -1
- package/build/service-types.js +0 -7
- package/build/services/AppService/factory/accessRequests.d.ts +0 -19
- package/build/services/AppService/factory/accessRequests.d.ts.map +0 -1
- package/build/services/AppService/factory/accessRequests.js +0 -17
- 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 -35
- package/build/services/AppService/factory/channels.d.ts.map +0 -1
- package/build/services/AppService/factory/channels.js +0 -18
- 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/media.d.ts +0 -17
- package/build/services/AppService/factory/media.d.ts.map +0 -1
- package/build/services/AppService/factory/media.js +0 -10
- 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 -58
- package/build/services/AppService/index.d.ts.map +0 -1
- package/build/services/AppService/index.js +0 -69
- package/build/services/AppService/types/accessRequests.d.ts +0 -158
- package/build/services/AppService/types/accessRequests.d.ts.map +0 -1
- package/build/services/AppService/types/app.d.ts +0 -124
- package/build/services/AppService/types/app.d.ts.map +0 -1
- package/build/services/AppService/types/app.js +0 -6
- 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/appConfigStatus.d.ts +0 -68
- package/build/services/AppService/types/appConfigStatus.d.ts.map +0 -1
- package/build/services/AppService/types/appConfigStatus.js +0 -11
- package/build/services/AppService/types/appList.d.ts +0 -183
- package/build/services/AppService/types/appList.d.ts.map +0 -1
- package/build/services/AppService/types/appList.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 -136
- 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 -113
- 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/appScopes.d.ts +0 -165
- package/build/services/AppService/types/appScopes.d.ts.map +0 -1
- package/build/services/AppService/types/appScopes.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 -111
- 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 -127
- 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 -220
- 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 -17
- package/build/services/AppService/types.d.ts.map +0 -1
- package/build/services/AppService/types.js +0 -19
- package/build/services/OAuthClientService.d.ts +0 -20
- package/build/services/OAuthClientService.d.ts.map +0 -1
- package/build/services/OAuthClientService.js +0 -12
- package/build/services/OAuthClientService.types.d.ts +0 -37
- package/build/services/OAuthClientService.types.d.ts.map +0 -1
- package/build/services/OAuthClientService.types.js +0 -4
- package/build/services/SecretService.d.ts +0 -22
- package/build/services/SecretService.d.ts.map +0 -1
- package/build/services/SecretService.js +0 -21
- package/build/services/SecretService.types.d.ts +0 -147
- package/build/services/SecretService.types.d.ts.map +0 -1
- package/build/services/SecretService.types.js +0 -1
- package/build/services/SecretSharing.types.d.ts +0 -112
- package/build/services/SecretSharing.types.d.ts.map +0 -1
- package/build/services/SecretSharing.types.js +0 -1
- package/build/services/Webhook/TriggerSecretService.d.ts +0 -88
- package/build/services/Webhook/TriggerSecretService.d.ts.map +0 -1
- package/build/services/Webhook/TriggerSecretService.js +0 -9
- package/build/services/Websockets/StoreEvents.d.ts +0 -31
- 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,127 +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
|
-
/**
|
|
75
|
-
* A consumer that would lose access if a channel were unreleased.
|
|
76
|
-
* `type` distinguishes a license-level install from a project activation.
|
|
77
|
-
*/
|
|
78
|
-
export interface ChannelUnpublishHolder {
|
|
79
|
-
id: string;
|
|
80
|
-
name: string;
|
|
81
|
-
type: 'license' | 'project';
|
|
82
|
-
/**
|
|
83
|
-
* The license's tier, or null for project holders. Together with `created_at`
|
|
84
|
-
* this disambiguates holders whose NAMES collide — license names are not
|
|
85
|
-
* unique (auto-provisioned licenses are named after an email), so two
|
|
86
|
-
* distinct tenants can both read `someone@example.com_license`. Key rows on
|
|
87
|
-
* `id`, never on `name`, and never collapse same-named rows: each is a real
|
|
88
|
-
* tenant that will lose access.
|
|
89
|
-
*/
|
|
90
|
-
license_type?: string | null;
|
|
91
|
-
created_at?: string | null;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Blast radius of unreleasing a channel — drives the publisher's confirm
|
|
95
|
-
* dialog (AAD-892). Unreleasing revokes access for everyone who installed from
|
|
96
|
-
* the channel, so this should be shown before the destructive action.
|
|
97
|
-
*
|
|
98
|
-
* The publisher's own license is excluded: they never lose access to their own
|
|
99
|
-
* app. Counts are de-duplicated per holder.
|
|
100
|
-
*/
|
|
101
|
-
export interface ChannelUnpublishImpact {
|
|
102
|
-
licenses: number;
|
|
103
|
-
projects: number;
|
|
104
|
-
holders: ChannelUnpublishHolder[];
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Result of unreleasing a channel. `withdrawn.installs` is how many installs
|
|
108
|
-
* actually lost access — show it in the success toast ("12 installs revoked").
|
|
109
|
-
*/
|
|
110
|
-
export interface UnpublishChannelResponse {
|
|
111
|
-
message: string;
|
|
112
|
-
data: ReleaseChannel;
|
|
113
|
-
withdrawn: {
|
|
114
|
-
installs: number;
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
export interface ReleaseChannelMember {
|
|
118
|
-
id: string;
|
|
119
|
-
name: string;
|
|
120
|
-
/** Hex string */
|
|
121
|
-
theme: string;
|
|
122
|
-
/** Company name of the member license, or null. */
|
|
123
|
-
company: string | null;
|
|
124
|
-
/** When the license was added to the channel (members list only). */
|
|
125
|
-
added_at?: string | null;
|
|
126
|
-
}
|
|
127
|
-
//# 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,MAA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AAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,SAAS,GAAG,SAAS,CAAA;IAC3B;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,sBAAsB,EAAE,CAAA;CAClC;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,cAAc,CAAA;IACpB,SAAS,EAAE;QACT,QAAQ,EAAE,MAAM,CAAA;KACjB,CAAA;CACF;AAED,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,220 +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.
|
|
116
|
-
* Drives the storefront "no seat available — contact X" UX.
|
|
117
|
-
*/
|
|
118
|
-
export interface SeatLimitAccessBlock {
|
|
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
|
-
/** A version the viewer still holds, identified for the withdrawn-build UI. */
|
|
136
|
-
export interface AccessBlockVersion {
|
|
137
|
-
id: string;
|
|
138
|
-
version: string;
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* The publisher pulled this install's build from the release channel it was
|
|
142
|
-
* installed from (AAD-892), so the app can no longer be opened.
|
|
143
|
-
*
|
|
144
|
-
* The install itself is intact — seats, permissions and project activations
|
|
145
|
-
* survive — so moving to `update_to_version` restores access in one step.
|
|
146
|
-
* `update_to_version` is null while the channel still serves nothing: render
|
|
147
|
-
* "withdrawn, no replacement yet" rather than an Update CTA.
|
|
148
|
-
*
|
|
149
|
-
* The app stays listed (installed / my_access) precisely so this can be shown;
|
|
150
|
-
* `can_open` is false and `on_license.installed` deliberately stays true, so do
|
|
151
|
-
* NOT fall back to an Install CTA.
|
|
152
|
-
*/
|
|
153
|
-
export interface VersionWithdrawnAccessBlock {
|
|
154
|
-
blocked: true;
|
|
155
|
-
reason: 'version_withdrawn';
|
|
156
|
-
scope_type: 'licenses' | 'projects' | null;
|
|
157
|
-
scope_id: string | null;
|
|
158
|
-
/** ISO-8601 instant the build was pulled. */
|
|
159
|
-
withdrawn_at: string | null;
|
|
160
|
-
withdrawn_version: AccessBlockVersion | null;
|
|
161
|
-
update_to_version: AccessBlockVersion | null;
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Why the current user can't use an app (null unless blocked).
|
|
165
|
-
*
|
|
166
|
-
* BREAKING (AAD-892): this was a single seat-shaped interface and is now a
|
|
167
|
-
* union discriminated on `reason`. Narrow on `reason` before touching
|
|
168
|
-
* seat fields — `block.reason === 'seat_limit_exceeded'`.
|
|
169
|
-
*/
|
|
170
|
-
export type AccessBlock = SeatLimitAccessBlock | VersionWithdrawnAccessBlock;
|
|
171
|
-
/** Current grantees of a delegated app permission (app.manage / app.assign). */
|
|
172
|
-
export interface AppDelegates {
|
|
173
|
-
role_ids: string[];
|
|
174
|
-
user_ids: string[];
|
|
175
|
-
/** Roles with display names (so the FE need not resolve ids). */
|
|
176
|
-
roles: AdminRole[];
|
|
177
|
-
/** Users with display names + email. */
|
|
178
|
-
users: AdminContact[];
|
|
179
|
-
}
|
|
180
|
-
/** One project's seat view — the project-admin assignment screen data source. */
|
|
181
|
-
export interface ProjectSeatView {
|
|
182
|
-
seat_based: boolean;
|
|
183
|
-
seats_purchased?: number;
|
|
184
|
-
seats_to_purchase?: number;
|
|
185
|
-
project?: ProjectSeatBundle;
|
|
186
|
-
}
|
|
187
|
-
/** Aggregate seat picture for an app (license admin allocation overview). */
|
|
188
|
-
export interface AppSeatPicture {
|
|
189
|
-
seat_based: boolean;
|
|
190
|
-
seats_purchased?: number;
|
|
191
|
-
/** Σ of project bundles (reserved against the pool). */
|
|
192
|
-
seats_allocated_total?: number;
|
|
193
|
-
/** Distinct occupants who want access across all scopes. */
|
|
194
|
-
seats_required?: number;
|
|
195
|
-
/** max(0, seats_required − seats_purchased) — the "buy N more" figure. */
|
|
196
|
-
seats_to_purchase?: number;
|
|
197
|
-
/** RBAC role ids assigned app.use at LICENSE scope (mirrors a bundle's assigned_role_ids). */
|
|
198
|
-
license_assigned_role_ids?: string[];
|
|
199
|
-
/** User ids pinned directly at LICENSE scope. */
|
|
200
|
-
license_assigned_user_ids?: string[];
|
|
201
|
-
/** License-scope assigned roles with names + channel scope. */
|
|
202
|
-
license_assigned_roles?: AssignedRole[];
|
|
203
|
-
/** License-scope pinned users with names + channel scope. */
|
|
204
|
-
license_assigned_users?: AssignedUser[];
|
|
205
|
-
/** Non-seat "everyone" grant at license scope — null = off (specific only). */
|
|
206
|
-
license_everyone?: EveryoneGrant | null;
|
|
207
|
-
/** Implicit license admin role ids (always-on access). */
|
|
208
|
-
license_admin_role_ids?: string[];
|
|
209
|
-
/** Implicit license admin roles with names. */
|
|
210
|
-
license_admin_roles?: AdminRole[];
|
|
211
|
-
/** License-level seat holders (admins + direct grants), cover all projects. */
|
|
212
|
-
license_seats?: SeatOccupant[];
|
|
213
|
-
/**
|
|
214
|
-
* Per-project bundles. For project-based apps this includes EVERY license
|
|
215
|
-
* project (unallocated ones have `seats_allocated: null`). Empty for
|
|
216
|
-
* license-based apps (project scope is irrelevant).
|
|
217
|
-
*/
|
|
218
|
-
projects?: ProjectSeatBundle[];
|
|
219
|
-
}
|
|
220
|
-
//# 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;IACf,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,sEAAsE;IACtE,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,+DAA+D;AAC/D,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,WAAW,EAAE,MAA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AC/E,gBAAgB,CAAC,EAAE,aAAa,GAAG,IAAI,CAAA;IACvC,0DAA0D;IAC1D,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAA;IACjC,+CAA+C;IAC/C,mBAAmB,CAAC,EAAE,SAAS,EAAE,CAAA;IACjC,+EAA+E;IAC/E,aAAa,CAAC,EAAE,YAAY,EAAE,CAAA;IAC9B;;;;OAIG;IACH,QAAQ,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,I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AoB,CAAC,EAAE,MAAM,CAAA;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,eAAe,EAAE,MAAM,CAAA;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IAClD,gBAAgB,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;CAC/D;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;CACd"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export * from './types/accessRequests';
|
|
2
|
-
export * from './types/app';
|
|
3
|
-
export * from './types/appCategories';
|
|
4
|
-
export * from './types/appChangelog';
|
|
5
|
-
export * from './types/appConfigStatus';
|
|
6
|
-
export * from './types/appList';
|
|
7
|
-
export * from './types/appManifest';
|
|
8
|
-
export * from './types/appMedia';
|
|
9
|
-
export * from './types/appRequests';
|
|
10
|
-
export * from './types/appScopes';
|
|
11
|
-
export * from './types/channels';
|
|
12
|
-
export * from './types/pricingTiers';
|
|
13
|
-
export * from './types/publisherStats';
|
|
14
|
-
export * from './types/releaseChannels';
|
|
15
|
-
export * from './types/seats';
|
|
16
|
-
export * from './types/subscriptions';
|
|
17
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/AppService/types.ts"],"names":[],"mappings":"AAIA,cAAc,wBAAwB,CAAA;AACtC,cAAc,aAAa,CAAA;AAC3B,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// Barrel re-export for AppService types.
|
|
2
|
-
// Kept for backwards compatibility with `import { ... } from './types'`.
|
|
3
|
-
// Add new types under the appropriate domain file in `./types/*`.
|
|
4
|
-
export * from './types/accessRequests';
|
|
5
|
-
export * from './types/app';
|
|
6
|
-
export * from './types/appCategories';
|
|
7
|
-
export * from './types/appChangelog';
|
|
8
|
-
export * from './types/appConfigStatus';
|
|
9
|
-
export * from './types/appList';
|
|
10
|
-
export * from './types/appManifest';
|
|
11
|
-
export * from './types/appMedia';
|
|
12
|
-
export * from './types/appRequests';
|
|
13
|
-
export * from './types/appScopes';
|
|
14
|
-
export * from './types/channels';
|
|
15
|
-
export * from './types/pricingTiers';
|
|
16
|
-
export * from './types/publisherStats';
|
|
17
|
-
export * from './types/releaseChannels';
|
|
18
|
-
export * from './types/seats';
|
|
19
|
-
export * from './types/subscriptions';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { CreateOAuthClientBody, OAuthClientApp, UpdateOAuthClientBody } from './OAuthClientService.types';
|
|
2
|
-
import type { AntHttpClient } from "../AntHttpClient";
|
|
3
|
-
import type { DataWrapper } from "../types";
|
|
4
|
-
export type * from './OAuthClientService.types';
|
|
5
|
-
/**
|
|
6
|
-
* Admin management of third-party OAuth applications, scoped to the owner license
|
|
7
|
-
* (AAD-919). `create` and `rotateSecret` responses include the one-time
|
|
8
|
-
* `client_secret`; all other reads never expose it.
|
|
9
|
-
*/
|
|
10
|
-
export interface OAuthClientService {
|
|
11
|
-
getOAuthClients: (licenseId: string) => Promise<DataWrapper<OAuthClientApp[]>>;
|
|
12
|
-
getOAuthClient: (licenseId: string, id: string) => Promise<DataWrapper<OAuthClientApp>>;
|
|
13
|
-
createOAuthClient: (licenseId: string, body: CreateOAuthClientBody) => Promise<DataWrapper<OAuthClientApp>>;
|
|
14
|
-
updateOAuthClient: (licenseId: string, id: string, body: UpdateOAuthClientBody) => Promise<DataWrapper<OAuthClientApp>>;
|
|
15
|
-
deleteOAuthClient: (licenseId: string, id: string) => Promise<void>;
|
|
16
|
-
rotateOAuthClientSecret: (licenseId: string, id: string) => Promise<DataWrapper<OAuthClientApp>>;
|
|
17
|
-
}
|
|
18
|
-
export declare function newOAuthClientService(client: AntHttpClient): OAuthClientService;
|
|
19
|
-
export default newOAuthClientService;
|
|
20
|
-
//# sourceMappingURL=OAuthClientService.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OAuthClientService.d.ts","sourceRoot":"","sources":["../../src/services/OAuthClientService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,cAAc,EACd,qBAAqB,EACtB,MAAM,4BAA4B,CAAA;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAuB;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAe;AAI1C,mBAAmB,4BAA4B,CAAA;AAE/C;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,CAAC,CAAA;IAC9E,cAAc,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAA;IACvF,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,KAAK,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAA;IAC3G,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,KAAK,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAA;IACvH,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAEnE,uBAAuB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAA;CACjG;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,aAAa,GAAG,kBAAkB,CAsB/E;AAED,eAAe,qBAAqB,CAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export function newOAuthClientService(client) {
|
|
2
|
-
const base = (licenseId) => `/licenses/${licenseId}/oauth-clients`;
|
|
3
|
-
return {
|
|
4
|
-
getOAuthClients: async (licenseId) => await client.get(base(licenseId)),
|
|
5
|
-
getOAuthClient: async (licenseId, id) => await client.get(`${base(licenseId)}/${id}`),
|
|
6
|
-
createOAuthClient: async (licenseId, body) => await client.post(base(licenseId), body),
|
|
7
|
-
updateOAuthClient: async (licenseId, id, body) => await client.put(`${base(licenseId)}/${id}`, body),
|
|
8
|
-
deleteOAuthClient: async (licenseId, id) => await client.delete(`${base(licenseId)}/${id}`),
|
|
9
|
-
rotateOAuthClientSecret: async (licenseId, id) => await client.post(`${base(licenseId)}/${id}/rotate-secret`),
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export default newOAuthClientService;
|