@antcde/connect-ts 0.4.27 → 0.4.28-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/AntConnect.d.ts +4 -0
- package/build/AntConnect.d.ts.map +1 -1
- package/build/AntConnect.js +4 -0
- package/build/comms/signal.d.ts +1 -0
- package/build/comms/signal.d.ts.map +1 -1
- package/build/comms/signal.js +1 -0
- package/build/comms/signalFilePreviewTypes.d.ts +65 -0
- package/build/comms/signalFilePreviewTypes.d.ts.map +1 -0
- package/build/comms/signalFilePreviewTypes.js +9 -0
- package/build/comms/signalRouteTypes.d.ts +38 -0
- package/build/comms/signalRouteTypes.d.ts.map +1 -0
- package/build/comms/signalRouteTypes.js +8 -0
- package/build/comms/signalTypes.d.ts +11 -46
- package/build/comms/signalTypes.d.ts.map +1 -1
- package/build/index.d.ts +26 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +5 -0
- package/build/service-runtime.d.ts +1 -1
- package/build/service-runtime.d.ts.map +1 -1
- package/build/service-runtime.js +1 -1
- package/build/service-types-app.d.ts +1 -1
- package/build/service-types-app.d.ts.map +1 -1
- package/build/service-types.d.ts +3 -1
- package/build/service-types.d.ts.map +1 -1
- package/build/services/AppService/factory/assignments.d.ts +13 -0
- package/build/services/AppService/factory/assignments.d.ts.map +1 -1
- package/build/services/AppService/factory/assignments.js +5 -0
- package/build/services/AppService/factory/resourceAccess.d.ts +1 -1
- package/build/services/AppService/factory/resourceAccess.d.ts.map +1 -1
- package/build/services/AppService/factory/resourceAccess.js +16 -0
- package/build/services/AppService/factory/resourceAssignments.d.ts +26 -2
- package/build/services/AppService/factory/resourceAssignments.d.ts.map +1 -1
- package/build/services/AppService/factory/resourceAssignments.js +2 -0
- package/build/services/AppService/factory/resourceEntitlementActions.d.ts +42 -0
- package/build/services/AppService/factory/resourceEntitlementActions.d.ts.map +1 -0
- package/build/services/AppService/factory/resourceEntitlementActions.js +10 -0
- package/build/services/AppService/factory/resources.d.ts +15 -28
- package/build/services/AppService/factory/resources.d.ts.map +1 -1
- package/build/services/AppService/factory/resources.js +2 -5
- package/build/services/AppService/factory/subscriptions.d.ts +1 -1
- package/build/services/AppService/factory/subscriptions.d.ts.map +1 -1
- package/build/services/AppService/factory/subscriptions.js +1 -1
- package/build/services/AppService/types/accessBlocks.d.ts +64 -0
- package/build/services/AppService/types/accessBlocks.d.ts.map +1 -0
- package/build/services/AppService/types/accessBlocks.js +5 -0
- package/build/services/AppService/types/app.d.ts +46 -1
- package/build/services/AppService/types/app.d.ts.map +1 -1
- package/build/services/AppService/types/appList.d.ts +17 -1
- package/build/services/AppService/types/appList.d.ts.map +1 -1
- package/build/services/AppService/types/appScopes.d.ts +56 -0
- package/build/services/AppService/types/appScopes.d.ts.map +1 -1
- package/build/services/AppService/types/resourceAssignments.d.ts +20 -0
- package/build/services/AppService/types/resourceAssignments.d.ts.map +1 -1
- package/build/services/AppService/types/resourceEntitlements.d.ts +33 -1
- package/build/services/AppService/types/resourceEntitlements.d.ts.map +1 -1
- package/build/services/AppService/types/resourceReleases.d.ts +14 -0
- package/build/services/AppService/types/resourceReleases.d.ts.map +1 -1
- package/build/services/AppService/types/resourceRequests.d.ts +29 -1
- package/build/services/AppService/types/resourceRequests.d.ts.map +1 -1
- package/build/services/AppService/types/seats.d.ts +48 -63
- package/build/services/AppService/types/seats.d.ts.map +1 -1
- package/build/services/AppService/types/seats.js +0 -2
- package/build/services/AppService/types/sellableResources.d.ts +10 -1
- package/build/services/AppService/types/sellableResources.d.ts.map +1 -1
- package/build/services/AppService/types/subscriptions.d.ts +6 -1
- package/build/services/AppService/types/subscriptions.d.ts.map +1 -1
- package/build/services/AppService/types.d.ts +1 -0
- package/build/services/AppService/types.d.ts.map +1 -1
- package/build/services/AppService/types.js +1 -0
- package/build/services/LicenseService.d.ts +1 -1
- package/build/services/LicenseService.d.ts.map +1 -1
- package/build/services/LicenseService.js +3 -1
- package/build/services/ProjectService.d.ts +0 -1
- package/build/services/ProjectService.d.ts.map +1 -1
- package/build/services/TaskService.d.ts +6 -1
- package/build/services/TaskService.d.ts.map +1 -1
- package/build/services/TaskService.js +1 -1
- package/build/services/TaskServiceQueries.d.ts +9 -1
- package/build/services/TaskServiceQueries.d.ts.map +1 -1
- package/build/services/TaskServiceQueries.js +12 -1
- package/build/services/Webhook/ConfigService.d.ts +31 -1
- package/build/services/Webhook/ConfigService.d.ts.map +1 -1
- package/build/services/Webhook/ConfigService.js +1 -1
- package/build/services/Webhook/EventService.d.ts +117 -0
- package/build/services/Webhook/EventService.d.ts.map +1 -1
- package/build/services/Webhook/TriggerChaining.d.ts +45 -0
- package/build/services/Webhook/TriggerChaining.d.ts.map +1 -0
- package/build/services/Webhook/TriggerChaining.js +1 -0
- package/build/services/Webhook/TriggerDataset.types.d.ts +160 -0
- package/build/services/Webhook/TriggerDataset.types.d.ts.map +1 -0
- package/build/services/Webhook/TriggerDataset.types.js +74 -0
- package/build/services/Webhook/TriggerDatasetColumns.d.ts +72 -0
- package/build/services/Webhook/TriggerDatasetColumns.d.ts.map +1 -0
- package/build/services/Webhook/TriggerDatasetColumns.js +116 -0
- package/build/services/Webhook/TriggerDatasetResponses.types.d.ts +158 -0
- package/build/services/Webhook/TriggerDatasetResponses.types.d.ts.map +1 -0
- package/build/services/Webhook/TriggerDatasetResponses.types.js +98 -0
- package/build/services/Webhook/TriggerDatasetSourceService.d.ts +180 -0
- package/build/services/Webhook/TriggerDatasetSourceService.d.ts.map +1 -0
- package/build/services/Webhook/TriggerDatasetSourceService.js +23 -0
- package/build/services/Webhook/TriggerDispatch.types.d.ts +89 -0
- package/build/services/Webhook/TriggerDispatch.types.d.ts.map +1 -0
- package/build/services/Webhook/TriggerDispatch.types.js +24 -0
- package/build/services/Webhook/TriggerDivergence.d.ts +30 -0
- package/build/services/Webhook/TriggerDivergence.d.ts.map +1 -0
- package/build/services/Webhook/TriggerDivergence.js +25 -0
- package/build/services/Webhook/TriggerFailedRuns.types.d.ts +57 -0
- package/build/services/Webhook/TriggerFailedRuns.types.d.ts.map +1 -0
- package/build/services/Webhook/TriggerFailedRuns.types.js +1 -0
- package/build/services/Webhook/TriggerHistoryService.d.ts +88 -18
- package/build/services/Webhook/TriggerHistoryService.d.ts.map +1 -1
- package/build/services/Webhook/TriggerLastRun.types.d.ts +80 -0
- package/build/services/Webhook/TriggerLastRun.types.d.ts.map +1 -0
- package/build/services/Webhook/TriggerLastRun.types.js +1 -0
- package/build/services/Webhook/TriggerRefusalDetail.types.d.ts +63 -0
- package/build/services/Webhook/TriggerRefusalDetail.types.d.ts.map +1 -0
- package/build/services/Webhook/TriggerRefusalDetail.types.js +12 -0
- package/build/services/Webhook/TriggerRequest.types.d.ts +77 -0
- package/build/services/Webhook/TriggerRequest.types.d.ts.map +1 -0
- package/build/services/Webhook/TriggerRequest.types.js +1 -0
- package/build/services/Webhook/TriggerSearch.types.d.ts +42 -0
- package/build/services/Webhook/TriggerSearch.types.d.ts.map +1 -0
- package/build/services/Webhook/TriggerSearch.types.js +1 -0
- package/build/services/Webhook/TriggerService.d.ts +158 -150
- package/build/services/Webhook/TriggerService.d.ts.map +1 -1
- package/build/services/Webhook/TriggerService.js +0 -24
- package/build/services/Webhook/TriggerTimeline.types.d.ts +42 -0
- package/build/services/Webhook/TriggerTimeline.types.d.ts.map +1 -0
- package/build/services/Webhook/TriggerTimeline.types.js +1 -0
- package/build/services/Webhook/TriggerVersion.types.d.ts +93 -0
- package/build/services/Webhook/TriggerVersion.types.d.ts.map +1 -0
- package/build/services/Webhook/TriggerVersion.types.js +1 -0
- package/build/services/Webhook/TriggerVersionService.d.ts +56 -0
- package/build/services/Webhook/TriggerVersionService.d.ts.map +1 -0
- package/build/services/Webhook/TriggerVersionService.js +20 -0
- package/package.json +8 -7
|
@@ -24,6 +24,22 @@ export const RESOURCE_ACCESS_REASONS = [
|
|
|
24
24
|
'not_granted',
|
|
25
25
|
'version_withdrawn',
|
|
26
26
|
'version_not_ready',
|
|
27
|
+
// AAD-1007, both 409 and both specific to an ENDPOINT listing, which sells a
|
|
28
|
+
// trigger version rather than a materialised artifact.
|
|
29
|
+
//
|
|
30
|
+
// `trigger_version_unavailable` — the listing points at a trigger version that
|
|
31
|
+
// is missing, was never released, or has been retired. To a buyer that means
|
|
32
|
+
// "come back later"; to the publisher looking at their own listing it is
|
|
33
|
+
// actionable, so the two audiences want different copy.
|
|
34
|
+
'trigger_version_unavailable',
|
|
35
|
+
// `trigger_version_not_sellable` — the version runs a script-backed action,
|
|
36
|
+
// which cannot be sold yet because a sold script would have to run as
|
|
37
|
+
// somebody and who that should be is undecided. Render the server's `message`
|
|
38
|
+
// verbatim: it says this is a platform limitation rather than a fault with
|
|
39
|
+
// the publisher's trigger, and a generic error would send them bug-hunting.
|
|
40
|
+
'trigger_version_not_sellable',
|
|
41
|
+
// No longer reachable on a normal read now both payload types have a backend,
|
|
42
|
+
// but kept: a client may still be holding one from an older deployment.
|
|
27
43
|
'payload_backend_not_implemented',
|
|
28
44
|
];
|
|
29
45
|
const _reasonsMatchTheUnion = true;
|
|
@@ -24,8 +24,11 @@ import type { DataWrapper } from "../../../types";
|
|
|
24
24
|
* nothing for it to change.
|
|
25
25
|
* 2. **No `licenseId` argument.** The entitlement is unique per license and the
|
|
26
26
|
* acting license comes from the session header, so there is nothing to pass.
|
|
27
|
-
* 3. **No project
|
|
28
|
-
*
|
|
27
|
+
* 3. **No project SCOPE** — but a project GRANTEE, which is not the same thing
|
|
28
|
+
* (AAD-959). Resources are not installed into projects, so the license/project
|
|
29
|
+
* switch the app screen has does not belong here. What does belong is granting
|
|
30
|
+
* a whole project access to the one license-level entitlement: a third kind of
|
|
31
|
+
* grantee beside roles and people, not a second place to be entitled.
|
|
29
32
|
*
|
|
30
33
|
* Every method is license-admin-only (403 otherwise) and returns the FULL
|
|
31
34
|
* picture after the change, so there is never a follow-up refetch.
|
|
@@ -61,6 +64,27 @@ export interface ResourceAssignmentFactory {
|
|
|
61
64
|
assignResourceUser: (resourceId: string, userId: string) => Promise<DataWrapper<ResourceAssignments>>;
|
|
62
65
|
/** Idempotent. */
|
|
63
66
|
unassignResourceUser: (resourceId: string, userId: string) => Promise<DataWrapper<ResourceAssignments>>;
|
|
67
|
+
/**
|
|
68
|
+
* Open the resource to everyone in a project (AAD-959).
|
|
69
|
+
*
|
|
70
|
+
* Idempotent. 400 if the project belongs to another license, 404 if it does
|
|
71
|
+
* not exist — the same distinction the role and user grants draw.
|
|
72
|
+
*
|
|
73
|
+
* **Narrowing only.** This restricts who inside an already-entitled license
|
|
74
|
+
* may read; it can never make an unentitled license readable. So it must not
|
|
75
|
+
* be offered anywhere as a route to access — a license that has not bought
|
|
76
|
+
* the resource still gets `not_entitled`, and no amount of granting changes
|
|
77
|
+
* that.
|
|
78
|
+
*
|
|
79
|
+
* **Populate the picker with `connect.projects.getProjects(licenseId)`, not
|
|
80
|
+
* `projectStore.projects`.** The store's list is pre-filtered by the OS bar's
|
|
81
|
+
* active label filter, so projects would silently disappear from this dialog
|
|
82
|
+
* because of an unrelated UI setting. It is also not the same list the
|
|
83
|
+
* top-right project switcher renders, even though they look alike.
|
|
84
|
+
*/
|
|
85
|
+
assignResourceProject: (resourceId: string, projectId: string) => Promise<DataWrapper<ResourceAssignments>>;
|
|
86
|
+
/** Idempotent. */
|
|
87
|
+
unassignResourceProject: (resourceId: string, projectId: string) => Promise<DataWrapper<ResourceAssignments>>;
|
|
64
88
|
}
|
|
65
89
|
export declare function newResourceAssignmentFactory(client: AntHttpClient): ResourceAssignmentFactory;
|
|
66
90
|
//# sourceMappingURL=resourceAssignments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resourceAssignments.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/factory/resourceAssignments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,+BAAuB;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,uBAAe;AAE1C
|
|
1
|
+
{"version":3,"file":"resourceAssignments.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/factory/resourceAssignments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,+BAAuB;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,uBAAe;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;;;OAMG;IACH,wBAAwB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC,CAAA;IAE3F,wDAAwD;IACxD,mBAAmB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC,CAAA;IACtF,oFAAoF;IACpF,qBAAqB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC,CAAA;IAExF,8DAA8D;IAC9D,kBAAkB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC,CAAA;IACrG,qFAAqF;IACrF,oBAAoB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC,CAAA;IAEvG;;;;OAIG;IACH,kBAAkB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC,CAAA;IACrG,kBAAkB;IAClB,oBAAoB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC,CAAA;IAEvG;;;;;;;;;;;;;;;;;OAiBG;IACH,qBAAqB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC,CAAA;IAC3G,kBAAkB;IAClB,uBAAuB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC,CAAA;CAC9G;AAED,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,aAAa,GAAG,yBAAyB,CAkB7F"}
|
|
@@ -8,5 +8,7 @@ export function newResourceAssignmentFactory(client) {
|
|
|
8
8
|
unassignResourceRole: (resourceId, roleId) => client.delete(`${base(resourceId)}/roles/${roleId}`),
|
|
9
9
|
assignResourceUser: (resourceId, userId) => client.post(`${base(resourceId)}/users/${userId}`),
|
|
10
10
|
unassignResourceUser: (resourceId, userId) => client.delete(`${base(resourceId)}/users/${userId}`),
|
|
11
|
+
assignResourceProject: (resourceId, projectId) => client.post(`${base(resourceId)}/projects/${projectId}`),
|
|
12
|
+
unassignResourceProject: (resourceId, projectId) => client.delete(`${base(resourceId)}/projects/${projectId}`),
|
|
11
13
|
};
|
|
12
14
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { LicenseResourceAccessEntry, ResourceAccessEntry, ResourceEntitlement } from '../types';
|
|
2
|
+
import type { AntHttpClient } from "../../../AntHttpClient";
|
|
3
|
+
import type { DataWrapper } from "../../../types";
|
|
4
|
+
/**
|
|
5
|
+
* What a BUYING license does with an entitlement it already holds (AAD-898).
|
|
6
|
+
*
|
|
7
|
+
* Split out of `resources.ts` for size, the same way commerce, snapshots,
|
|
8
|
+
* channels and uploads already were, and folded back into `SellableResourceFactory`
|
|
9
|
+
* so the public surface is unchanged — every method is still `connect.apps.*`.
|
|
10
|
+
*
|
|
11
|
+
* The line these four sit on: none of them grants or removes an entitlement.
|
|
12
|
+
* They read what the license holds and move it between versions and channels the
|
|
13
|
+
* license is already entitled to. Anything that decides WHETHER a license may
|
|
14
|
+
* read lives in the access layer, on the other side of `resources.ts`.
|
|
15
|
+
*/
|
|
16
|
+
export interface ResourceEntitlementActionFactory {
|
|
17
|
+
/** Everything this license holds, with the version each is pinned to. */
|
|
18
|
+
fetchMyResourceAccess: () => Promise<DataWrapper<ResourceAccessEntry[]>>;
|
|
19
|
+
/**
|
|
20
|
+
* Everything the LICENSE holds, usable or not — the trigger resource picker
|
|
21
|
+
* (AAD-940).
|
|
22
|
+
*
|
|
23
|
+
* Use this and not `fetchMyResourceAccess()` when choosing a resource for a
|
|
24
|
+
* trigger to consume. That one filters by the signed-in user's grant and drops
|
|
25
|
+
* revoked rows, and a trigger has no user, so it both hides resources the
|
|
26
|
+
* trigger could legitimately consume and makes a lapsed entitlement look like
|
|
27
|
+
* nothing was ever bought.
|
|
28
|
+
*/
|
|
29
|
+
fetchLicenseResourceAccess: () => Promise<DataWrapper<LicenseResourceAccessEntry[]>>;
|
|
30
|
+
/**
|
|
31
|
+
* Opt in to the version this license's channel now serves.
|
|
32
|
+
*
|
|
33
|
+
* The only routine way a pin moves forward — publishing does not move it, and
|
|
34
|
+
* that is the guarantee the buyer bought. Also the recovery action after a
|
|
35
|
+
* `version_withdrawn` block. 409 when already current.
|
|
36
|
+
*/
|
|
37
|
+
moveResourceToChannelVersion: (resourceId: string) => Promise<DataWrapper<ResourceEntitlement>>;
|
|
38
|
+
switchResourceChannel: (resourceId: string, channelId: string) => Promise<DataWrapper<ResourceEntitlement>>;
|
|
39
|
+
setResourceAutoUpdate: (resourceId: string, enabled: boolean) => Promise<DataWrapper<ResourceEntitlement>>;
|
|
40
|
+
}
|
|
41
|
+
export declare function newResourceEntitlementActionFactory(client: AntHttpClient): ResourceEntitlementActionFactory;
|
|
42
|
+
//# sourceMappingURL=resourceEntitlementActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceEntitlementActions.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/factory/resourceEntitlementActions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AACpG,OAAO,KAAK,EAAE,aAAa,EAAE,+BAAuB;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,uBAAe;AAE1C;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,gCAAgC;IAC/C,yEAAyE;IACzE,qBAAqB,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,mBAAmB,EAAE,CAAC,CAAC,CAAA;IACxE;;;;;;;;;OASG;IACH,0BAA0B,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,0BAA0B,EAAE,CAAC,CAAC,CAAA;IACpF;;;;;;OAMG;IACH,4BAA4B,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC,CAAA;IAC/F,qBAAqB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC,CAAA;IAC3G,qBAAqB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC,CAAA;CAC3G;AAED,wBAAgB,mCAAmC,CAAC,MAAM,EAAE,aAAa,GAAG,gCAAgC,CAY3G"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function newResourceEntitlementActionFactory(client) {
|
|
2
|
+
const base = (resourceId) => `/store/resources/${resourceId}`;
|
|
3
|
+
return {
|
|
4
|
+
fetchMyResourceAccess: () => client.get('/store/resources/my-access'),
|
|
5
|
+
fetchLicenseResourceAccess: () => client.get('/store/resources/license-access'),
|
|
6
|
+
moveResourceToChannelVersion: resourceId => client.post(`${base(resourceId)}/entitlement/version`),
|
|
7
|
+
switchResourceChannel: (resourceId, channelId) => client.post(`${base(resourceId)}/entitlement/channel`, { channel_id: channelId }),
|
|
8
|
+
setResourceAutoUpdate: (resourceId, enabled) => client.post(`${base(resourceId)}/entitlement/auto-update`, { enabled }),
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { CreateResourceVersionData, CreateSellableResourceData, FetchResourcesParams,
|
|
1
|
+
import type { CreateResourceVersionData, CreateSellableResourceData, FetchResourcesParams, ResourceConsumer, ResourceEntitlement, ResourceVersion, RetryResourceVersionData, SellableResource, SellableResourceListItem, StoreCapabilities, UpdateSellableResourceData } from '../types';
|
|
2
2
|
import type { ResourceAssignmentFactory } from './resourceAssignments';
|
|
3
3
|
import type { ResourceChannelFactory } from './resourceChannels';
|
|
4
4
|
import type { ResourceCommerceFactory } from './resourceCommerce';
|
|
5
|
+
import type { ResourceEntitlementActionFactory } from './resourceEntitlementActions';
|
|
5
6
|
import type { ResourceSnapshotFactory } from './resourceSnapshot';
|
|
6
7
|
import type { ResourceUploadFactory } from './resourceUploads';
|
|
7
8
|
import type { MessageResponse } from "../../../AntConnect";
|
|
@@ -20,7 +21,7 @@ import type { DataWrapper } from "../../../types";
|
|
|
20
21
|
* centrally by the app's request interceptor, and the backend resolves the
|
|
21
22
|
* caller's license from it. That is the whole entitlement context.
|
|
22
23
|
*/
|
|
23
|
-
export interface SellableResourceFactory extends ResourceAssignmentFactory, ResourceChannelFactory, ResourceCommerceFactory, ResourceSnapshotFactory, ResourceUploadFactory {
|
|
24
|
+
export interface SellableResourceFactory extends ResourceAssignmentFactory, ResourceChannelFactory, ResourceCommerceFactory, ResourceEntitlementActionFactory, ResourceSnapshotFactory, ResourceUploadFactory {
|
|
24
25
|
/**
|
|
25
26
|
* Which optional Store surfaces this deployment has on. NOT behind the flag —
|
|
26
27
|
* this is how you learn whether the flag is on.
|
|
@@ -39,9 +40,18 @@ export interface SellableResourceFactory extends ResourceAssignmentFactory, Reso
|
|
|
39
40
|
* `reason` — branch on that, not on the status code, since three distinct
|
|
40
41
|
* states share 403. Use `isResourceAccessError()` to narrow an axios error.
|
|
41
42
|
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
43
|
+
* BOTH payload types now serve. A `snapshot` resource returns its materialised
|
|
44
|
+
* artifact (AAD-939); an `endpoint` resource dispatches the trigger version the
|
|
45
|
+
* listing sells and returns its result (AAD-1007). `501
|
|
46
|
+
* payload_backend_not_implemented` is therefore no longer reachable on a normal
|
|
47
|
+
* read — if you were rendering "not implemented yet" for endpoint listings,
|
|
48
|
+
* remove it.
|
|
49
|
+
*
|
|
50
|
+
* Two refusals are specific to an endpoint listing, both 409:
|
|
51
|
+
* `trigger_version_unavailable` (the listing points at a trigger version that
|
|
52
|
+
* is missing, unreleased or retired) and `trigger_version_not_sellable`
|
|
53
|
+
* (script-backed, which cannot be sold yet — show the server's message
|
|
54
|
+
* verbatim, it explains that this is a platform limitation).
|
|
45
55
|
*
|
|
46
56
|
* An entitled read of an empty dataset is a 200 with an empty body — "empty"
|
|
47
57
|
* and "not entitled" never look the same.
|
|
@@ -139,29 +149,6 @@ export interface SellableResourceFactory extends ResourceAssignmentFactory, Reso
|
|
|
139
149
|
* paths, or to avoid waiting out the 60–300s decision TTL.
|
|
140
150
|
*/
|
|
141
151
|
flushResourceEntitlementCache: (resourceId: string) => Promise<MessageResponse>;
|
|
142
|
-
/** Everything this license holds, with the version each is pinned to. */
|
|
143
|
-
fetchMyResourceAccess: () => Promise<DataWrapper<ResourceAccessEntry[]>>;
|
|
144
|
-
/**
|
|
145
|
-
* Everything the LICENSE holds, usable or not — the trigger resource picker
|
|
146
|
-
* (AAD-940).
|
|
147
|
-
*
|
|
148
|
-
* Use this and not `fetchMyResourceAccess()` when choosing a resource for a
|
|
149
|
-
* trigger to consume. That one filters by the signed-in user's grant and drops
|
|
150
|
-
* revoked rows, and a trigger has no user, so it both hides resources the
|
|
151
|
-
* trigger could legitimately consume and makes a lapsed entitlement look like
|
|
152
|
-
* nothing was ever bought.
|
|
153
|
-
*/
|
|
154
|
-
fetchLicenseResourceAccess: () => Promise<DataWrapper<LicenseResourceAccessEntry[]>>;
|
|
155
|
-
/**
|
|
156
|
-
* Opt in to the version this license's channel now serves.
|
|
157
|
-
*
|
|
158
|
-
* The only routine way a pin moves forward — publishing does not move it, and
|
|
159
|
-
* that is the guarantee the buyer bought. Also the recovery action after a
|
|
160
|
-
* `version_withdrawn` block. 409 when already current.
|
|
161
|
-
*/
|
|
162
|
-
moveResourceToChannelVersion: (resourceId: string) => Promise<DataWrapper<ResourceEntitlement>>;
|
|
163
|
-
switchResourceChannel: (resourceId: string, channelId: string) => Promise<DataWrapper<ResourceEntitlement>>;
|
|
164
|
-
setResourceAutoUpdate: (resourceId: string, enabled: boolean) => Promise<DataWrapper<ResourceEntitlement>>;
|
|
165
152
|
}
|
|
166
153
|
export declare function newSellableResourceFactory(client: AntHttpClient): SellableResourceFactory;
|
|
167
154
|
//# sourceMappingURL=resources.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/factory/resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,oBAAoB,EACpB,
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/factory/resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,wBAAwB,EACxB,gBAAgB,EAChB,wBAAwB,EACxB,iBAAiB,EACjB,0BAA0B,EAC3B,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,KAAK,EAAE,sB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AU,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAA;IACxF,yBAAyB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC,CAAA;IACnH;;;;OAIG;IACH,6BAA6B,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,eAAe,CAAC,CAAA;CAChF;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,aAAa,GAAG,uBAAuB,CA4CzF"}
|
|
@@ -2,6 +2,7 @@ import qs from 'qs';
|
|
|
2
2
|
import { newResourceAssignmentFactory } from './resourceAssignments';
|
|
3
3
|
import { newResourceChannelFactory } from './resourceChannels';
|
|
4
4
|
import { newResourceCommerceFactory } from './resourceCommerce';
|
|
5
|
+
import { newResourceEntitlementActionFactory } from './resourceEntitlementActions';
|
|
5
6
|
import { newResourceSnapshotFactory } from './resourceSnapshot';
|
|
6
7
|
import { newResourceUploadFactory } from './resourceUploads';
|
|
7
8
|
export function newSellableResourceFactory(client) {
|
|
@@ -12,6 +13,7 @@ export function newSellableResourceFactory(client) {
|
|
|
12
13
|
...newResourceAssignmentFactory(client),
|
|
13
14
|
...newResourceChannelFactory(client),
|
|
14
15
|
...newResourceCommerceFactory(client),
|
|
16
|
+
...newResourceEntitlementActionFactory(client),
|
|
15
17
|
...newResourceSnapshotFactory(client),
|
|
16
18
|
...newResourceUploadFactory(client),
|
|
17
19
|
fetchStoreCapabilities: () => client.get('/store/capabilities'),
|
|
@@ -36,10 +38,5 @@ export function newSellableResourceFactory(client) {
|
|
|
36
38
|
fetchResourceConsumers: resourceId => client.get(`${base(resourceId)}/consumers`),
|
|
37
39
|
revokeResourceEntitlement: (resourceId, entitlementId) => client.post(`${base(resourceId)}/entitlements/${entitlementId}/revoke`),
|
|
38
40
|
flushResourceEntitlementCache: resourceId => client.post(`${base(resourceId)}/entitlements/flush-cache`),
|
|
39
|
-
fetchMyResourceAccess: () => client.get('/store/resources/my-access'),
|
|
40
|
-
fetchLicenseResourceAccess: () => client.get('/store/resources/license-access'),
|
|
41
|
-
moveResourceToChannelVersion: resourceId => client.post(`${base(resourceId)}/entitlement/version`),
|
|
42
|
-
switchResourceChannel: (resourceId, channelId) => client.post(`${base(resourceId)}/entitlement/channel`, { channel_id: channelId }),
|
|
43
|
-
setResourceAutoUpdate: (resourceId, enabled) => client.post(`${base(resourceId)}/entitlement/auto-update`, { enabled }),
|
|
44
41
|
};
|
|
45
42
|
}
|
|
@@ -14,7 +14,7 @@ export interface SubscriptionFactory {
|
|
|
14
14
|
* "pending approval" state instead of the purchase CTA. "No subscription yet"
|
|
15
15
|
* is a normal state — callers must handle null without treating it as an error.
|
|
16
16
|
*/
|
|
17
|
-
fetchCurrentSubscription: (appId: string) => Promise<DataWrapper<Subscription | null>>;
|
|
17
|
+
fetchCurrentSubscription: (appId: string, requestConfig?: Record<string, any>) => Promise<DataWrapper<Subscription | null>>;
|
|
18
18
|
fetchSubscription: (appId: string, subscriptionId: string) => Promise<DataWrapper<Subscription>>;
|
|
19
19
|
/**
|
|
20
20
|
* Buyer requests to purchase a tier. The returned subscription is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/factory/subscriptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,EAC3B,WAAW,EACX,qBAAqB,EACrB,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,eAAe,EAAE,4BAAoB;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,+BAAuB;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,uBAAe;AAG1C,MAAM,WAAW,mBAAmB;IAClC,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC,CAAA;IAC9G,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,KAAK,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAA;IACpG,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,KAAK,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAA;IACpH,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,eAAe,CAAC,CAAA;IAE9E;;;;;;OAMG;IACH,wBAAwB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"subscriptions.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/factory/subscriptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,EAC3B,WAAW,EACX,qBAAqB,EACrB,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,eAAe,EAAE,4BAAoB;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,+BAAuB;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,uBAAe;AAG1C,MAAM,WAAW,mBAAmB;IAClC,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,aAA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updatePricingTier: (appId, tierId, data) => client.put(`/store/apps/${appId}/pricing-tiers/${tierId}`, data),
|
|
8
8
|
deletePricingTier: (appId, tierId) => client.delete(`/store/apps/${appId}/pricing-tiers/${tierId}`),
|
|
9
9
|
// Subscriptions
|
|
10
|
-
fetchCurrentSubscription: appId => client.get(`/store/apps/${appId}/subscriptions/current
|
|
10
|
+
fetchCurrentSubscription: (appId, requestConfig) => client.get(`/store/apps/${appId}/subscriptions/current`, requestConfig),
|
|
11
11
|
fetchSubscription: (appId, subscriptionId) => client.get(`/store/apps/${appId}/subscriptions/${subscriptionId}`),
|
|
12
12
|
createSubscription: (appId, data) => client.post(`/store/apps/${appId}/subscriptions`, data),
|
|
13
13
|
updateSubscription: (appId, subscriptionId, data) => client.put(`/store/apps/${appId}/subscriptions/${subscriptionId}`, data),
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/** An escalation contact the FE can render and `mailto:` directly. */
|
|
2
|
+
export interface AdminContact {
|
|
3
|
+
user_id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
email: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Why the current user can't use a seat-based app.
|
|
9
|
+
* Drives the storefront "no seat available — contact X" UX.
|
|
10
|
+
*/
|
|
11
|
+
export interface SeatLimitAccessBlock {
|
|
12
|
+
blocked: true;
|
|
13
|
+
reason: 'seat_limit_exceeded';
|
|
14
|
+
scope_type: 'licenses' | 'projects' | null;
|
|
15
|
+
scope_id: string | null;
|
|
16
|
+
rank: number | null;
|
|
17
|
+
seats_allocated: number | null;
|
|
18
|
+
seats_required: number;
|
|
19
|
+
seats_purchased: number;
|
|
20
|
+
/** Buy at least this many more seats to clear everyone. */
|
|
21
|
+
seats_to_purchase: number;
|
|
22
|
+
escalation: {
|
|
23
|
+
/** Project admins (when the block is project-scoped) — name + email for "contact X" / mailto. */
|
|
24
|
+
project_admins: AdminContact[];
|
|
25
|
+
license_admins: AdminContact[];
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/** A version the viewer still holds, identified for the withdrawn-build UI. */
|
|
29
|
+
export interface AccessBlockVersion {
|
|
30
|
+
id: string;
|
|
31
|
+
version: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The publisher pulled this install's build from the release channel it was
|
|
35
|
+
* installed from (AAD-892), so the app can no longer be opened.
|
|
36
|
+
*
|
|
37
|
+
* The install itself is intact — seats, permissions and project activations
|
|
38
|
+
* survive — so moving to `update_to_version` restores access in one step.
|
|
39
|
+
* `update_to_version` is null while the channel still serves nothing: render
|
|
40
|
+
* "withdrawn, no replacement yet" rather than an Update CTA.
|
|
41
|
+
*
|
|
42
|
+
* The app stays listed (installed / my_access) precisely so this can be shown;
|
|
43
|
+
* `can_open` is false and `on_license.installed` deliberately stays true, so do
|
|
44
|
+
* NOT fall back to an Install CTA.
|
|
45
|
+
*/
|
|
46
|
+
export interface VersionWithdrawnAccessBlock {
|
|
47
|
+
blocked: true;
|
|
48
|
+
reason: 'version_withdrawn';
|
|
49
|
+
scope_type: 'licenses' | 'projects' | null;
|
|
50
|
+
scope_id: string | null;
|
|
51
|
+
/** ISO-8601 instant the build was pulled. */
|
|
52
|
+
withdrawn_at: string | null;
|
|
53
|
+
withdrawn_version: AccessBlockVersion | null;
|
|
54
|
+
update_to_version: AccessBlockVersion | null;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Why the current user can't use an app (null unless blocked).
|
|
58
|
+
*
|
|
59
|
+
* BREAKING (AAD-892): this was a single seat-shaped interface and is now a
|
|
60
|
+
* union discriminated on `reason`. Narrow on `reason` before touching
|
|
61
|
+
* seat fields — `block.reason === 'seat_limit_exceeded'`.
|
|
62
|
+
*/
|
|
63
|
+
export type AccessBlock = SeatLimitAccessBlock | VersionWithdrawnAccessBlock;
|
|
64
|
+
//# sourceMappingURL=accessBlocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessBlocks.d.ts","sourceRoot":"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GAAG,2BAA2B,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Why the current user can't use an app. Lifted out of `seats.ts` (AAD-998):
|
|
2
|
+
// only ONE of these two blocks is about seats, `app.ts` and `appList.ts` were
|
|
3
|
+
// importing `AccessBlock` from a seats file to say so, and that file had grown
|
|
4
|
+
// past the size limit carrying them.
|
|
5
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { ResourceLabel } from '../../LabelService';
|
|
2
|
+
import type { AccessBlock } from './accessBlocks';
|
|
2
3
|
import type { MyAccessRequestSummary } from './accessRequests';
|
|
3
4
|
import type { AppCategory } from './appCategories';
|
|
4
5
|
import type { AppMedia, AppVersion } from './appMedia';
|
|
5
6
|
import type { AppInProject, AppOnLicense, AppScope } from './appScopes';
|
|
6
7
|
import type { AppChannel } from './channels';
|
|
7
|
-
import type { AccessBlock } from './seats';
|
|
8
8
|
import type { AppSubscriptionSummary } from './subscriptions';
|
|
9
9
|
export type AccessLevel = 'community' | 'enterprise';
|
|
10
10
|
export type AppAvailability = 'always_available' | 'request_access' | 'private';
|
|
@@ -67,7 +67,52 @@ export interface App {
|
|
|
67
67
|
updated_at?: string;
|
|
68
68
|
path: string;
|
|
69
69
|
license: AppLicense;
|
|
70
|
+
/**
|
|
71
|
+
* ⚠️ A fact about the LICENSE, not the viewer: "my current license published
|
|
72
|
+
* this app". True for every member of that license regardless of what they
|
|
73
|
+
* may actually do, so it must never gate a publisher affordance — read
|
|
74
|
+
* `can_manage_listing` for that (AAD-998).
|
|
75
|
+
*/
|
|
70
76
|
is_owned_app: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Per-user right to maintain this app's LISTING — the publisher side:
|
|
79
|
+
* versions, channels, media, categories, changelog (AAD-998).
|
|
80
|
+
*
|
|
81
|
+
* True for an admin of the license that PUBLISHES the app, and for a
|
|
82
|
+
* **delegated maintainer**: someone granted `app.manage` from the Delegation
|
|
83
|
+
* tab's "Maintainers" list, by role or pinned individually. Nothing else in
|
|
84
|
+
* the payload reveals a per-app grant, so this is the only sound gate for the
|
|
85
|
+
* Published-apps entry, the publisher hero menu and the content tabs.
|
|
86
|
+
*
|
|
87
|
+
* ⚠️ Use this instead of `is_owned_app`, which only says "my current license
|
|
88
|
+
* published this" and is true for every member of that license, including
|
|
89
|
+
* people with no relationship to the app at all.
|
|
90
|
+
*
|
|
91
|
+
* Grants nothing on the consumer side: no access, no seat, no subscription.
|
|
92
|
+
* It does NOT imply `has_access`, `can_open`, or `on_license.can_manage`.
|
|
93
|
+
* Approvals, pricing and publisher stats stay with the license admin.
|
|
94
|
+
*/
|
|
95
|
+
can_manage_listing: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Per-user right to ADMINISTER this listing: you are an admin of the license
|
|
98
|
+
* that publishes the app (AAD-998). Pricing, access-request approvals,
|
|
99
|
+
* subscriptions and deleting the listing.
|
|
100
|
+
*
|
|
101
|
+
* The publish perspective filters its tabs on this. A delegated maintainer
|
|
102
|
+
* reads `can_manage_listing: true` with this **false** — content is theirs,
|
|
103
|
+
* the business behind it is not — so Access / Pricing / Subscriptions /
|
|
104
|
+
* Danger Zone should not render for them.
|
|
105
|
+
*
|
|
106
|
+
* ⚠️ Replaces the client-side inference `is_owned_app && on_license.can_manage`.
|
|
107
|
+
* Delete that: `is_owned_app` describes the LICENSE and is true for every one
|
|
108
|
+
* of its members, and `on_license.can_manage` is about the tenant's INSTALL,
|
|
109
|
+
* not the listing.
|
|
110
|
+
*
|
|
111
|
+
* Context-bound, like the rest of RBAC: administering a listing published by
|
|
112
|
+
* a different license reads false even for an admin of that license. You
|
|
113
|
+
* administer a listing from the tenant that publishes it.
|
|
114
|
+
*/
|
|
115
|
+
can_administer_listing: boolean;
|
|
71
116
|
/**
|
|
72
117
|
* Derived: can the current user open/use this app right now?
|
|
73
118
|
* Non-project app → `on_license.installed`; project app → `in_project.activated`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAE7D,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,YAAY,CAAA;AACpD,MAAM,MAAM,eAAe,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,SAAS,CAAA;AAC/E,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,CAAA;AAEjE;;;;;;;;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IAC3B;;;;;;;;;;;;;;;;;;OAkBG;IACH,sBAAsB,EAAE,OAAO,CAAA;IAC/B;;;;;OAKG;IACH,QAAQ,EAAE,OAAO,CAAA;IACjB,mEAAmE;IACnE,UAAU,EAAE,YAAY,CAAA;IACxB;;;;OAIG;IACH,UAAU,EAAE,YAAY,GAAG,IAAI,CAAA;IAC/B;;;;;;;;;;OAUG;IACH,gBAAgB,EAAE,OAAO,CAAA;IACzB,+EAA+E;IAC/E,2BAA2B,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1C;;;OAGG;IACH,YAAY,EAAE,QAAQ,GAAG,IAAI,CAAA;IAC7B,WAAW,EAAE,OAAO,CAAA;IACpB,QAAQ,EAAE,UAAU,EAAE,CAAA;IACtB,UAAU,EAAE,WAAW,EAAE,CAAA;IACzB,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAA;IAClB,MAAM,EAAE,aAAa,EAAE,CAAA;IACvB,cAAc,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAA;IAC3E,gFAAgF;IAChF,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAA;IACvB,yEAAyE;IACzE,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,GAAG,cAAc,CAAA;IACtC,YAAY,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAA;IAC5C,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACjC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AccessBlock } from './accessBlocks';
|
|
1
2
|
import type { MyAccessRequestSummary } from './accessRequests';
|
|
2
3
|
import type { AccessLevel, AppAvailability, AppLicense, AppTrustLevel, RequestBlockedReason } from './app';
|
|
3
4
|
import type { AppCategory } from './appCategories';
|
|
@@ -6,7 +7,6 @@ import type { AppVersionSummary } from './appMedia';
|
|
|
6
7
|
import type { AppInProject, AppOnLicense, AppScope } from './appScopes';
|
|
7
8
|
import type { AccessibleChannel } from './channels';
|
|
8
9
|
import type { CheapestTierSummary } from './pricingTiers';
|
|
9
|
-
import type { AccessBlock } from './seats';
|
|
10
10
|
import type { AppSubscriptionSummary } from './subscriptions';
|
|
11
11
|
/**
|
|
12
12
|
* Compact free/paid tier summary on a browse card (subscription-model apps
|
|
@@ -38,6 +38,22 @@ export interface ListApp {
|
|
|
38
38
|
is_deprecated: boolean;
|
|
39
39
|
deprecation_message: string | null;
|
|
40
40
|
can_configure_by_license: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Per-user right to maintain this app's LISTING content — versions, channels,
|
|
43
|
+
* media, categories, changelog (AAD-998). True for an admin of the publishing
|
|
44
|
+
* license and for a delegated maintainer (`app.manage`).
|
|
45
|
+
*
|
|
46
|
+
* ⚠️ Use this, never `is_owned_app`, which describes the LICENSE. Full rules
|
|
47
|
+
* on `App.can_manage_listing` — this is the same value, served on the row.
|
|
48
|
+
*/
|
|
49
|
+
can_manage_listing: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Admin of the license that publishes this app (AAD-998): pricing, approvals,
|
|
52
|
+
* subscriptions, deleting the listing. A maintainer reads `can_manage_listing`
|
|
53
|
+
* true with this false. Full rules on `App.can_administer_listing` — this is
|
|
54
|
+
* the same value, served on the row.
|
|
55
|
+
*/
|
|
56
|
+
can_administer_listing: boolean;
|
|
41
57
|
can_request_access: boolean;
|
|
42
58
|
/**
|
|
43
59
|
* Why `can_request_access` is false (request-access apps only). Now honored on
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appList.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/appList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAC9D,OAAO,KA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AAI,CAAA;IAC5C;;;;OAIG;IACH,YAAY,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAA;IAC5C;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B;;;;OAIG;IACH,YAAY,CAAC,EAAE,uBAAuB,CAAA;IACtC,6EAA6E;IAC7E,OAAO,CAAC,EAAE,kBAAkB,CAAA;CAC7B"}
|
|
@@ -55,6 +55,44 @@ export interface AppOnLicense {
|
|
|
55
55
|
can_install?: boolean;
|
|
56
56
|
/** Can remove the app from the license. */
|
|
57
57
|
can_uninstall: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Per-user right to administer THIS license's install of the app — seats,
|
|
60
|
+
* access assignment, delegation, subscription (AAD-998). Present on list rows
|
|
61
|
+
* AND the detail, unlike `can_install` / `can_use` above.
|
|
62
|
+
*
|
|
63
|
+
* License admin only. This is the CONSUMER half of the Manage workspace.
|
|
64
|
+
*
|
|
65
|
+
* ⚠️ Three things this is NOT:
|
|
66
|
+
* - not `can_manage_listing` (top level), the publisher-side right to
|
|
67
|
+
* maintain the listing's content. A delegated maintainer reads FALSE here
|
|
68
|
+
* and true there — seats and subscriptions are not their business.
|
|
69
|
+
* - not {@link AppSubscriptionSummary.can_manage}, which is scoped to the
|
|
70
|
+
* subscription record.
|
|
71
|
+
* - not derivable from `is_owned_app`, which describes the LICENSE.
|
|
72
|
+
*/
|
|
73
|
+
can_manage: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Per-user right to assign this app's seats at LICENSE scope (AAD-998).
|
|
76
|
+
* Present on list rows AND the detail.
|
|
77
|
+
*
|
|
78
|
+
* True for a license admin, and for a **delegated license seat manager**:
|
|
79
|
+
* someone granted `app.assign` on the license install from the Delegation
|
|
80
|
+
* tab's "Seat managers" section. For a license-based seat app this is the
|
|
81
|
+
* only assignment surface there is — it has no per-project install.
|
|
82
|
+
*
|
|
83
|
+
* Independent of {@link AppInProject.can_assign_seats}: on a multi-scope app
|
|
84
|
+
* a grant at one scope confers nothing at the other, so read the half that
|
|
85
|
+
* matches the scope you are rendering. Never OR them into one "can assign"
|
|
86
|
+
* — that would offer a project seat manager the license pool.
|
|
87
|
+
*
|
|
88
|
+
* There is deliberately **no allocation cap**: a license seat manager may
|
|
89
|
+
* assign from the whole purchased pool. Assigning is reversible, so the
|
|
90
|
+
* control is who you grant it to, not a ceiling.
|
|
91
|
+
*
|
|
92
|
+
* Assigning seats is not holding one — a seat manager reads
|
|
93
|
+
* `has_access: false` and appears on no consumer surface for this app.
|
|
94
|
+
*/
|
|
95
|
+
can_assign_seats: boolean;
|
|
58
96
|
/** The license-level ResourceApp link id; null when not installed — or implicitly installed (`my_access`). */
|
|
59
97
|
resource_app_id: string | null;
|
|
60
98
|
/** Per-install auto-update flag for the license link. */
|
|
@@ -136,6 +174,24 @@ export interface AppInProject {
|
|
|
136
174
|
can_activate?: boolean;
|
|
137
175
|
/** Can remove the activated version from the current project. */
|
|
138
176
|
can_deactivate: boolean;
|
|
177
|
+
/**
|
|
178
|
+
* Per-user right to assign this app's seats/access in the CURRENT project
|
|
179
|
+
* (AAD-998). Present on list rows AND the detail.
|
|
180
|
+
*
|
|
181
|
+
* True for a project admin (license admins cascade down to the install), and
|
|
182
|
+
* for a **delegated seat manager**: someone granted `app.assign` on this
|
|
183
|
+
* project's install from the Delegation tab's "Seat managers" list, by role
|
|
184
|
+
* or pinned individually.
|
|
185
|
+
*
|
|
186
|
+
* Assigning seats is not holding one: a seat manager reads `has_access: false`
|
|
187
|
+
* and does not appear on any consumer surface for this app. Do not render seat
|
|
188
|
+
* or access status for them from this flag.
|
|
189
|
+
*
|
|
190
|
+
* Mirrors what the assignment endpoints actually enforce, so it is safe to
|
|
191
|
+
* key the Assign seats tab off it: if this is true, the seat view loads and
|
|
192
|
+
* the assign/unassign calls are accepted.
|
|
193
|
+
*/
|
|
194
|
+
can_assign_seats: boolean;
|
|
139
195
|
/** The project-level ResourceApp link id, or null when not activated. */
|
|
140
196
|
resource_app_id: string | null;
|
|
141
197
|
/** Per-install auto-update flag for the project link. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appScopes.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/appScopes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAOnD,kEAAkE;AAClE,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAC9B,iFAAiF;IACjF,MAAM,EAAE,OAAO,CAAA;CAChB;AAED;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE;QAAE,MAAM,EAAE,OAAO,CAAA;KAAE,CAAA;IAC5B,QAAQ,EAAE,eAAe,EAAE,CAAA;CAC5B;AAED;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAA;AAE5C;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,YAAY;IAC3B,qDAAqD;IACrD,SAAS,EAAE,OAAO,CAAA;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,mGAAmG;IACnG,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,2CAA2C;IAC3C,aAAa,EAAE,OAAO,CAAA;IACtB,8GAA8G;IAC9G,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,yDAAyD;IACzD,WAAW,EAAE,OAAO,CAAA;IACpB,8DAA8D;IAC9D,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B;;;;OAIG;IACH,gBAAgB,EAAE,OAAO,CAAA;IACzB,iEAAiE;IACjE,2BAA2B,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1C;;;;;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