@antcde/connect-ts 0.4.27-rc.2 → 0.4.27-rc.4
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/comms/client.d.ts.map +1 -1
- package/build/comms/client.js +39 -41
- package/build/comms/connection.d.ts +32 -0
- package/build/comms/connection.d.ts.map +1 -0
- package/build/comms/connection.js +159 -0
- package/build/comms/handshake.d.ts +16 -0
- package/build/comms/handshake.d.ts.map +1 -0
- package/build/comms/handshake.js +73 -0
- package/build/comms/host.d.ts.map +1 -1
- package/build/comms/host.js +22 -26
- package/build/comms/hostSlot.d.ts +23 -0
- package/build/comms/hostSlot.d.ts.map +1 -0
- package/build/comms/hostSlot.js +55 -0
- package/build/comms/transport.d.ts +18 -2
- package/build/comms/transport.d.ts.map +1 -1
- package/build/comms/transport.js +25 -10
- package/build/index.d.ts +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/service-runtime.d.ts +2 -2
- package/build/service-runtime.d.ts.map +1 -1
- package/build/service-runtime.js +2 -2
- package/build/service-types-app.d.ts +1 -1
- package/build/service-types-app.d.ts.map +1 -1
- package/build/services/AppService/factory/categories.d.ts +30 -0
- package/build/services/AppService/factory/categories.d.ts.map +1 -0
- package/build/services/AppService/factory/categories.js +11 -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 +12 -0
- package/build/services/AppService/factory/resourceAssignments.d.ts +66 -0
- package/build/services/AppService/factory/resourceAssignments.d.ts.map +1 -0
- package/build/services/AppService/factory/resourceAssignments.js +12 -0
- package/build/services/AppService/factory/resourceChannels.d.ts +89 -0
- package/build/services/AppService/factory/resourceChannels.d.ts.map +1 -0
- package/build/services/AppService/factory/resourceChannels.js +19 -0
- package/build/services/AppService/factory/resourceSnapshot.d.ts +13 -0
- package/build/services/AppService/factory/resourceSnapshot.d.ts.map +1 -1
- package/build/services/AppService/factory/resourceSnapshot.js +21 -0
- package/build/services/AppService/factory/resourceUploads.d.ts +37 -0
- package/build/services/AppService/factory/resourceUploads.d.ts.map +1 -0
- package/build/services/AppService/factory/resourceUploads.js +8 -0
- package/build/services/AppService/factory/resources.d.ts +43 -29
- package/build/services/AppService/factory/resources.d.ts.map +1 -1
- package/build/services/AppService/factory/resources.js +8 -7
- package/build/services/AppService/factory/taxonomy.d.ts +25 -0
- package/build/services/AppService/factory/taxonomy.d.ts.map +1 -0
- package/build/services/AppService/factory/taxonomy.js +5 -0
- package/build/services/AppService/index.d.ts +4 -5
- package/build/services/AppService/index.d.ts.map +1 -1
- package/build/services/AppService/index.js +4 -6
- package/build/services/AppService/types/appCategories.d.ts +28 -0
- package/build/services/AppService/types/appCategories.d.ts.map +1 -1
- package/build/services/AppService/types/resourceAssignments.d.ts +38 -0
- package/build/services/AppService/types/resourceAssignments.d.ts.map +1 -0
- package/build/services/AppService/types/resourceAssignments.js +10 -0
- package/build/services/AppService/types/resourceEntitlements.d.ts +18 -1
- package/build/services/AppService/types/resourceEntitlements.d.ts.map +1 -1
- package/build/services/AppService/types/resourceReleases.d.ts +93 -6
- package/build/services/AppService/types/resourceReleases.d.ts.map +1 -1
- package/build/services/AppService/types/resourceRequests.d.ts +10 -0
- package/build/services/AppService/types/resourceRequests.d.ts.map +1 -1
- package/build/services/AppService/types/sellableResources.d.ts +43 -1
- package/build/services/AppService/types/sellableResources.d.ts.map +1 -1
- package/build/services/AppService/types/snapshotFileSource.d.ts +110 -0
- package/build/services/AppService/types/snapshotFileSource.d.ts.map +1 -0
- package/build/services/AppService/types/snapshotFileSource.js +8 -0
- package/build/services/AppService/types/snapshotPayload.d.ts +30 -10
- package/build/services/AppService/types/snapshotPayload.d.ts.map +1 -1
- package/build/services/AppService/types/snapshotPayload.js +5 -2
- package/build/services/AppService/types/snapshotSources.d.ts +19 -1
- package/build/services/AppService/types/snapshotSources.d.ts.map +1 -1
- package/build/services/AppService/types/snapshotUploads.d.ts +109 -0
- package/build/services/AppService/types/snapshotUploads.d.ts.map +1 -0
- package/build/services/AppService/types/snapshotUploads.js +20 -0
- package/build/services/AppService/types/taxonomy.d.ts +76 -0
- package/build/services/AppService/types/taxonomy.d.ts.map +1 -0
- package/build/services/AppService/types/taxonomy.js +1 -0
- package/build/services/AppService/types.d.ts +4 -0
- package/build/services/AppService/types.d.ts.map +1 -1
- package/build/services/AppService/types.js +4 -0
- package/build/services/Webhook/TriggerService.d.ts +44 -0
- package/build/services/Webhook/TriggerService.d.ts.map +1 -1
- package/build/services/Webhook/TriggerService.js +15 -0
- package/package.json +1 -1
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CreateResourceVersionData, CreateSellableResourceData, FetchResourcesParams, LicenseResourceAccessEntry, ResourceAccessEntry, ResourceConsumer, ResourceEntitlement, ResourceVersion, RetryResourceVersionData, SellableResource, SellableResourceListItem, StoreCapabilities, UpdateSellableResourceData } from '../types';
|
|
2
|
+
import type { ResourceAssignmentFactory } from './resourceAssignments';
|
|
3
|
+
import type { ResourceChannelFactory } from './resourceChannels';
|
|
2
4
|
import type { ResourceCommerceFactory } from './resourceCommerce';
|
|
3
5
|
import type { ResourceSnapshotFactory } from './resourceSnapshot';
|
|
6
|
+
import type { ResourceUploadFactory } from './resourceUploads';
|
|
4
7
|
import type { MessageResponse } from "../../../AntConnect";
|
|
5
8
|
import type { AntHttpClient } from "../../../AntHttpClient";
|
|
6
9
|
import type { DataWrapper } from "../../../types";
|
|
@@ -17,7 +20,7 @@ import type { DataWrapper } from "../../../types";
|
|
|
17
20
|
* centrally by the app's request interceptor, and the backend resolves the
|
|
18
21
|
* caller's license from it. That is the whole entitlement context.
|
|
19
22
|
*/
|
|
20
|
-
export interface SellableResourceFactory extends ResourceCommerceFactory, ResourceSnapshotFactory {
|
|
23
|
+
export interface SellableResourceFactory extends ResourceAssignmentFactory, ResourceChannelFactory, ResourceCommerceFactory, ResourceSnapshotFactory, ResourceUploadFactory {
|
|
21
24
|
/**
|
|
22
25
|
* Which optional Store surfaces this deployment has on. NOT behind the flag —
|
|
23
26
|
* this is how you learn whether the flag is on.
|
|
@@ -94,38 +97,38 @@ export interface SellableResourceFactory extends ResourceCommerceFactory, Resour
|
|
|
94
97
|
* sees the row count and size before committing to a version number.
|
|
95
98
|
*/
|
|
96
99
|
createResourceVersion: (resourceId: string, data: CreateResourceVersionData) => Promise<DataWrapper<ResourceVersion>>;
|
|
97
|
-
/** Refused while any license is pinned to it. */
|
|
98
|
-
deleteResourceVersion: (resourceId: string, versionId: string) => Promise<MessageResponse>;
|
|
99
|
-
fetchResourceChannels: (resourceId: string) => Promise<DataWrapper<ResourceChannel[]>>;
|
|
100
|
-
createResourceChannel: (resourceId: string, data: CreateResourceChannelData) => Promise<DataWrapper<ResourceChannel>>;
|
|
101
|
-
updateResourceChannel: (resourceId: string, channelId: string, data: CreateResourceChannelData) => Promise<DataWrapper<ResourceChannel>>;
|
|
102
|
-
/** The default channel cannot be deleted (400). */
|
|
103
|
-
deleteResourceChannel: (resourceId: string, channelId: string) => Promise<MessageResponse>;
|
|
104
100
|
/**
|
|
105
|
-
*
|
|
101
|
+
* Delete a version.
|
|
102
|
+
*
|
|
103
|
+
* **409, not a silent unpublish (AAD-950).** Refused while a channel is serving
|
|
104
|
+
* the version — the message names the channel — and while any license is pinned
|
|
105
|
+
* to it. Pull the channel with `unpublishResourceChannel()` first, deliberately,
|
|
106
|
+
* so the publisher sees the blast radius via `fetchResourceUnpublishImpact()`
|
|
107
|
+
* instead of it happening behind a delete.
|
|
106
108
|
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
* is a
|
|
110
|
-
*
|
|
111
|
-
* not `ready`.
|
|
109
|
+
* The version number is freed for reuse ONLY if the version was never live. One
|
|
110
|
+
* that was published and later removed keeps its number reserved permanently, and
|
|
111
|
+
* re-creating it is a 409 saying so — a buyer may hold that dataset, and the
|
|
112
|
+
* version string is how they identify it.
|
|
112
113
|
*/
|
|
113
|
-
|
|
114
|
+
deleteResourceVersion: (resourceId: string, versionId: string) => Promise<MessageResponse>;
|
|
114
115
|
/**
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
116
|
+
* Re-run a failed materialisation, KEEPING the version number (AAD-950).
|
|
117
|
+
*
|
|
118
|
+
* The escape from a failed publish. 409 unless `payload_state` is `failed`
|
|
119
|
+
* (`ready` has nothing to retry, `pending` already has a job running); 422 on a
|
|
120
|
+
* resource with no payload to prepare.
|
|
121
|
+
*
|
|
122
|
+
* Returns the version back in `pending` — resume the same poll you run after
|
|
123
|
+
* `createResourceVersion()`; there is no second state machine.
|
|
124
|
+
*
|
|
125
|
+
* Pass `payload_config` to REPLACE the stored selection. Send it whenever the
|
|
126
|
+
* failure was caused by the selection itself rather than by a transient fault —
|
|
127
|
+
* `source_table_missing` and `unpublishable_column_type` will reproduce forever on
|
|
128
|
+
* a bare replay. It is held to the same contract as on create, personal-data
|
|
129
|
+
* declaration included.
|
|
118
130
|
*/
|
|
119
|
-
|
|
120
|
-
message: string;
|
|
121
|
-
data: {
|
|
122
|
-
withdrawn: {
|
|
123
|
-
entitlements: number;
|
|
124
|
-
};
|
|
125
|
-
};
|
|
126
|
-
}>;
|
|
127
|
-
/** Who an unpublish would cut off — show this before confirming. */
|
|
128
|
-
fetchResourceUnpublishImpact: (resourceId: string, channelId: string) => Promise<DataWrapper<ResourceUnpublishImpact>>;
|
|
131
|
+
retryResourceVersion: (resourceId: string, versionId: string, data?: RetryResourceVersionData) => Promise<DataWrapper<ResourceVersion>>;
|
|
129
132
|
fetchResourceEntitlements: (resourceId: string) => Promise<DataWrapper<ResourceEntitlement[]>>;
|
|
130
133
|
/** Lifetime call totals per consuming license. Not a time series. */
|
|
131
134
|
fetchResourceConsumers: (resourceId: string) => Promise<DataWrapper<ResourceConsumer[]>>;
|
|
@@ -138,6 +141,17 @@ export interface SellableResourceFactory extends ResourceCommerceFactory, Resour
|
|
|
138
141
|
flushResourceEntitlementCache: (resourceId: string) => Promise<MessageResponse>;
|
|
139
142
|
/** Everything this license holds, with the version each is pinned to. */
|
|
140
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[]>>;
|
|
141
155
|
/**
|
|
142
156
|
* Opt in to the version this license's channel now serves.
|
|
143
157
|
*
|
|
@@ -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,
|
|
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,0BAA0B,EAC1B,mBAAmB,EACnB,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,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAChE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AACjE,OAAO,KAAK,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AC,CAAA;IACnH;;;;OAIG;IACH,6BAA6B,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,eAAe,CAAC,CAAA;IAG/E,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,0BAA0B,CAAC,MAAM,EAAE,aAAa,GAAG,uBAAuB,CAmDzF"}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import qs from 'qs';
|
|
2
|
+
import { newResourceAssignmentFactory } from './resourceAssignments';
|
|
3
|
+
import { newResourceChannelFactory } from './resourceChannels';
|
|
2
4
|
import { newResourceCommerceFactory } from './resourceCommerce';
|
|
3
5
|
import { newResourceSnapshotFactory } from './resourceSnapshot';
|
|
6
|
+
import { newResourceUploadFactory } from './resourceUploads';
|
|
4
7
|
export function newSellableResourceFactory(client) {
|
|
5
8
|
const base = (resourceId) => `/store/resources/${resourceId}`;
|
|
6
9
|
return {
|
|
7
10
|
// Commerce (AAD-898) and snapshot payloads (AAD-939) live in their own files for
|
|
8
11
|
// size; folded in here so the public surface stays one factory.
|
|
12
|
+
...newResourceAssignmentFactory(client),
|
|
13
|
+
...newResourceChannelFactory(client),
|
|
9
14
|
...newResourceCommerceFactory(client),
|
|
10
15
|
...newResourceSnapshotFactory(client),
|
|
16
|
+
...newResourceUploadFactory(client),
|
|
11
17
|
fetchStoreCapabilities: () => client.get('/store/capabilities'),
|
|
12
18
|
fetchResources: (params = {}, requestConfig) => {
|
|
13
19
|
const queryString = qs.stringify(params, { skipNulls: true, arrayFormat: 'brackets' });
|
|
@@ -25,18 +31,13 @@ export function newSellableResourceFactory(client) {
|
|
|
25
31
|
fetchResourceVersion: (resourceId, versionId) => client.get(`${base(resourceId)}/versions/${versionId}`),
|
|
26
32
|
createResourceVersion: (resourceId, data) => client.post(`${base(resourceId)}/versions`, data),
|
|
27
33
|
deleteResourceVersion: (resourceId, versionId) => client.delete(`${base(resourceId)}/versions/${versionId}`),
|
|
28
|
-
|
|
29
|
-
createResourceChannel: (resourceId, data) => client.post(`${base(resourceId)}/channels`, data),
|
|
30
|
-
updateResourceChannel: (resourceId, channelId, data) => client.put(`${base(resourceId)}/channels/${channelId}`, data),
|
|
31
|
-
deleteResourceChannel: (resourceId, channelId) => client.delete(`${base(resourceId)}/channels/${channelId}`),
|
|
32
|
-
publishResourceVersion: (resourceId, channelId, versionId) => client.post(`${base(resourceId)}/channels/${channelId}/publish`, { version_id: versionId }),
|
|
33
|
-
unpublishResourceChannel: (resourceId, channelId) => client.delete(`${base(resourceId)}/channels/${channelId}/active-version`),
|
|
34
|
-
fetchResourceUnpublishImpact: (resourceId, channelId) => client.get(`${base(resourceId)}/channels/${channelId}/unpublish-impact`),
|
|
34
|
+
retryResourceVersion: (resourceId, versionId, data = {}) => client.post(`${base(resourceId)}/versions/${versionId}/retry`, data),
|
|
35
35
|
fetchResourceEntitlements: resourceId => client.get(`${base(resourceId)}/entitlements`),
|
|
36
36
|
fetchResourceConsumers: resourceId => client.get(`${base(resourceId)}/consumers`),
|
|
37
37
|
revokeResourceEntitlement: (resourceId, entitlementId) => client.post(`${base(resourceId)}/entitlements/${entitlementId}/revoke`),
|
|
38
38
|
flushResourceEntitlementCache: resourceId => client.post(`${base(resourceId)}/entitlements/flush-cache`),
|
|
39
39
|
fetchMyResourceAccess: () => client.get('/store/resources/my-access'),
|
|
40
|
+
fetchLicenseResourceAccess: () => client.get('/store/resources/license-access'),
|
|
40
41
|
moveResourceToChannelVersion: resourceId => client.post(`${base(resourceId)}/entitlement/version`),
|
|
41
42
|
switchResourceChannel: (resourceId, channelId) => client.post(`${base(resourceId)}/entitlement/channel`, { channel_id: channelId }),
|
|
42
43
|
setResourceAutoUpdate: (resourceId, enabled) => client.post(`${base(resourceId)}/entitlement/auto-update`, { enabled }),
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { StoreTaxonomy } from '../types';
|
|
2
|
+
import type { AntHttpClient } from "../../../AntHttpClient";
|
|
3
|
+
import type { DataWrapper } from "../../../types";
|
|
4
|
+
/**
|
|
5
|
+
* How Discover is navigated (AAD-935 item 1). Split out of the AppService
|
|
6
|
+
* factory to keep `index.ts` focused; composed into `AppService` there.
|
|
7
|
+
*/
|
|
8
|
+
export interface StoreTaxonomyFactory {
|
|
9
|
+
/**
|
|
10
|
+
* The top-level kinds and their subcategories.
|
|
11
|
+
*
|
|
12
|
+
* **Ungated, and safe to call before you know whether resources are
|
|
13
|
+
* enabled** — that is the reason it exists. With the flag off it returns the
|
|
14
|
+
* single `apps` kind whose subcategories are the same rows
|
|
15
|
+
* `fetchCategories()` returns, so rendering the tree gives you today's flat
|
|
16
|
+
* category rail. Do not gate the call on `fetchStoreCapabilities()`; read the
|
|
17
|
+
* number of kinds instead.
|
|
18
|
+
*
|
|
19
|
+
* Navigation only: neither `fetchApps` nor `fetchResources` changes shape
|
|
20
|
+
* because of it, and the client still stamps `kind` when it merges them.
|
|
21
|
+
*/
|
|
22
|
+
fetchStoreTaxonomy: () => Promise<DataWrapper<StoreTaxonomy>>;
|
|
23
|
+
}
|
|
24
|
+
export declare function newStoreTaxonomyFactory(client: AntHttpClient): StoreTaxonomyFactory;
|
|
25
|
+
//# sourceMappingURL=taxonomy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taxonomy.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/factory/taxonomy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,+BAAuB;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,uBAAe;AAE1C;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;;;;;;;OAYG;IACH,kBAAkB,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAA;CAC9D;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,aAAa,GAAG,oBAAoB,CAInF"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import type { AppAccessRequestFactory } from './factory/accessRequests';
|
|
2
2
|
import type { AppAssignmentFactory } from './factory/assignments';
|
|
3
|
+
import type { AppCategoryFactory } from './factory/categories';
|
|
3
4
|
import type { ReleaseChannelFactory } from './factory/channels';
|
|
4
5
|
import type { AppMediaFactory } from './factory/media';
|
|
5
6
|
import type { SellableResourceFactory } from './factory/resources';
|
|
6
7
|
import type { SubscriptionFactory } from './factory/subscriptions';
|
|
7
|
-
import type {
|
|
8
|
+
import type { StoreTaxonomyFactory } from './factory/taxonomy';
|
|
9
|
+
import type { App, AppChangelogEntry, AppConfigResource, AppImpactAnalysis, AppResourceStatus, AppResourceSyncResult, AppRunnableContexts, AppTemplate, AppUpdateResult, AppVersionFormData, AvailableUpdatesParams, AvailableUpdatesResponse, BatchUpdateAppsParams, BatchUpdateAppsResponse, FetchAppChangelogParams, FetchAppsParams, ListApp, PublisherStatsApp, UpdateInstalledAppParams } from './types';
|
|
8
10
|
import type { MessageResponse } from "../../AntConnect";
|
|
9
11
|
import type { AntHttpClient } from "../../AntHttpClient";
|
|
10
12
|
import type { DataWrapper } from "../../types";
|
|
11
13
|
export * from './types';
|
|
12
|
-
export interface AppService extends SubscriptionFactory, SellableResourceFactory, ReleaseChannelFactory, AppAssignmentFactory, AppAccessRequestFactory, AppMediaFactory {
|
|
14
|
+
export interface AppService extends SubscriptionFactory, SellableResourceFactory, ReleaseChannelFactory, AppAssignmentFactory, AppAccessRequestFactory, AppMediaFactory, AppCategoryFactory, StoreTaxonomyFactory {
|
|
13
15
|
createApp: (appData: AppTemplate) => Promise<DataWrapper<App>>;
|
|
14
16
|
updateApp: (id: string, appData: Partial<AppTemplate>) => Promise<DataWrapper<App>>;
|
|
15
17
|
deleteApp: (id: string) => Promise<MessageResponse>;
|
|
@@ -49,9 +51,6 @@ export interface AppService extends SubscriptionFactory, SellableResourceFactory
|
|
|
49
51
|
updateInstalledApp: (appId: string, params?: UpdateInstalledAppParams, requestConfig?: Record<string, any>) => Promise<DataWrapper<AppUpdateResult>>;
|
|
50
52
|
batchUpdateApps: (params?: BatchUpdateAppsParams) => Promise<DataWrapper<BatchUpdateAppsResponse>>;
|
|
51
53
|
fetchAvailableUpdates: (params?: AvailableUpdatesParams) => Promise<DataWrapper<AvailableUpdatesResponse>>;
|
|
52
|
-
fetchCategories: (params?: any) => Promise<DataWrapper<AppCategory[]>>;
|
|
53
|
-
fetchCategory: (categoryId: string) => Promise<AppCategory>;
|
|
54
|
-
updateAppCategories: (appId: string, data: CategoryRelationData) => Promise<DataWrapper<App>>;
|
|
55
54
|
fetchAppChangelog: (appId: string, params?: FetchAppChangelogParams) => Promise<DataWrapper<AppChangelogEntry[]>>;
|
|
56
55
|
}
|
|
57
56
|
export declare function newAppService(client: AntHttpClient): AppService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/AppService/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,KAAK,EACV,GAAG,EACH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/AppService/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAC9D,OAAO,KAAK,EACV,GAAG,EACH,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,eAAe,EACf,OAAO,EACP,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,eAAe,EAAE,yBAAoB;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,4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AAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,KAAK,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;IAGhH,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;IAC5E,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;IAe5D,kBAAkB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,wBAAwB,EAAE,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAAA;IAGpJ,eAAe,EAAE,CAAC,MAAM,CAAC,EAAE,qBAAqB,KAAK,OAAO,CAAC,WAAW,CAAC,uBAAuB,CAAC,CAAC,CAAA;IAGlG,qBAAqB,EAAE,CAAC,MAAM,CAAC,EAAE,sBAAsB,KAAK,OAAO,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC,CAAA;IAG1G,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,uBAAuB,KAAK,OAAO,CAAC,WAAW,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAA;CAClH;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,GAAG,UAAU,CA8F/D;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import qs from 'qs';
|
|
2
2
|
import { newAppAccessRequestFactory } from './factory/accessRequests';
|
|
3
3
|
import { newAppAssignmentFactory } from './factory/assignments';
|
|
4
|
+
import { newAppCategoryFactory } from './factory/categories';
|
|
4
5
|
import { newReleaseChannelFactory } from './factory/channels';
|
|
5
6
|
import { maybeFormData, toFormData } from './factory/formData';
|
|
6
7
|
import { newAppMediaFactory } from './factory/media';
|
|
7
8
|
import { newSellableResourceFactory } from './factory/resources';
|
|
8
9
|
import { newSubscriptionFactory } from './factory/subscriptions';
|
|
10
|
+
import { newStoreTaxonomyFactory } from './factory/taxonomy';
|
|
9
11
|
export * from './types';
|
|
10
12
|
export function newAppService(client) {
|
|
11
13
|
return {
|
|
@@ -15,6 +17,8 @@ export function newAppService(client) {
|
|
|
15
17
|
...newAppAssignmentFactory(client),
|
|
16
18
|
...newAppAccessRequestFactory(client),
|
|
17
19
|
...newAppMediaFactory(client),
|
|
20
|
+
...newAppCategoryFactory(client),
|
|
21
|
+
...newStoreTaxonomyFactory(client),
|
|
18
22
|
// An icon File is sent as multipart; a scalar-only edit stays JSON. updateApp
|
|
19
23
|
// is a PUT, but PHP doesn't parse multipart PUT bodies, so spoof it with POST
|
|
20
24
|
// + `_method=PUT` when a file rides along.
|
|
@@ -62,12 +66,6 @@ export function newAppService(client) {
|
|
|
62
66
|
updateInstalledApp: (appId, params = {}, requestConfig) => client.post(`/store/apps/${appId}/update`, params, requestConfig),
|
|
63
67
|
batchUpdateApps: (params = {}) => client.post('/store/resources/apps/batch-update', params),
|
|
64
68
|
fetchAvailableUpdates: (params = {}) => client.get('/store/resources/apps/updates-available', { params }),
|
|
65
|
-
fetchCategories: (params = {}) => {
|
|
66
|
-
const queryString = qs.stringify(params, { skipNulls: true, arrayFormat: 'brackets' });
|
|
67
|
-
return client.get(`/store/app-categories${queryString ? `?${queryString}` : ''}`);
|
|
68
|
-
},
|
|
69
|
-
fetchCategory: categoryId => client.get(`/store/app-categories/${categoryId}`),
|
|
70
|
-
updateAppCategories: (appId, data) => client.post(`/store/apps/${appId}/categories`, data),
|
|
71
69
|
fetchAppChangelog: (appId, params = {}) => {
|
|
72
70
|
const queryString = qs.stringify(params, { skipNulls: true });
|
|
73
71
|
return client.get(`/store/apps/${appId}/changelog${queryString ? `?${queryString}` : ''}`);
|
|
@@ -8,8 +8,36 @@ export interface AppCategory {
|
|
|
8
8
|
* call sites (e.g. category management screens) may not request it.
|
|
9
9
|
*/
|
|
10
10
|
app_count?: number;
|
|
11
|
+
/**
|
|
12
|
+
* Whether a publisher may pick this category on their own listing (AAD-935
|
|
13
|
+
* item 2).
|
|
14
|
+
*
|
|
15
|
+
* `false` for curated buckets like "System", which group first-party apps for
|
|
16
|
+
* buyers to browse but are awarded by the platform — passing one to
|
|
17
|
+
* `updateAppCategories` or in `category_ids` is a 422. Prefer
|
|
18
|
+
* `fetchCategories({ assignable: true })` in the listing editor over filtering
|
|
19
|
+
* on this client-side.
|
|
20
|
+
*
|
|
21
|
+
* Optional because a response served before AAD-935 has no such key; treat a
|
|
22
|
+
* missing value as `true`.
|
|
23
|
+
*/
|
|
24
|
+
is_assignable?: boolean;
|
|
11
25
|
updated_at: string;
|
|
12
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Query params for the category catalog.
|
|
29
|
+
*/
|
|
30
|
+
export interface FetchCategoriesParams {
|
|
31
|
+
search?: string;
|
|
32
|
+
/** Count deprecated apps in `app_count` too. */
|
|
33
|
+
include_deprecated?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Narrow to categories a publisher may pick for their own listing. What the
|
|
36
|
+
* listing editor wants; Discover's rail wants the full list, because "System"
|
|
37
|
+
* is browsable.
|
|
38
|
+
*/
|
|
39
|
+
assignable?: boolean;
|
|
40
|
+
}
|
|
13
41
|
export interface CategoryRelationData {
|
|
14
42
|
categories: string[];
|
|
15
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appCategories.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/appCategories.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,EAAE,CAAA;CACrB"}
|
|
1
|
+
{"version":3,"file":"appCategories.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/appCategories.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;;;;;;;OAYG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,gDAAgD;IAChD,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,EAAE,CAAA;CACrB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** A role granted `resource.use`. */
|
|
2
|
+
export interface ResourceAssignedRole {
|
|
3
|
+
role_id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
/** Live rbac_role_user membership count (deleted/expiry-filtered). */
|
|
6
|
+
member_count: number;
|
|
7
|
+
}
|
|
8
|
+
/** A user granted `resource.use` directly, rather than through a role. */
|
|
9
|
+
export interface ResourceAssignedUser {
|
|
10
|
+
user_id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A license admin role. These always have access whether or not anyone assigned
|
|
15
|
+
* them — surfaced so the screen can say so, rather than leaving an admin
|
|
16
|
+
* wondering why they can read something they are not listed on.
|
|
17
|
+
*/
|
|
18
|
+
export interface ResourceAdminRole {
|
|
19
|
+
role_id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
}
|
|
22
|
+
/** The whole access picture for one held resource. */
|
|
23
|
+
export interface ResourceAssignments {
|
|
24
|
+
assigned_roles: ResourceAssignedRole[];
|
|
25
|
+
assigned_users: ResourceAssignedUser[];
|
|
26
|
+
admin_roles: ResourceAdminRole[];
|
|
27
|
+
/** Roles that could still be assigned — already excludes admin and "everyone". */
|
|
28
|
+
available_roles: ResourceAssignedRole[];
|
|
29
|
+
/**
|
|
30
|
+
* Whether the resource is open to every member of the license.
|
|
31
|
+
*
|
|
32
|
+
* A plain boolean, not the app side's `{ channel_ids } | null`, for the same
|
|
33
|
+
* reason grants carry no channel. `false` is the state a freshly bought
|
|
34
|
+
* resource is in: closed, admins only, until someone grants.
|
|
35
|
+
*/
|
|
36
|
+
everyone: boolean;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=resourceAssignments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceAssignments.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/resourceAssignments.ts"],"names":[],"mappings":"AAUA,qCAAqC;AACrC,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,sEAAsE;IACtE,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,0EAA0E;AAC1E,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;CACb;AAED,sDAAsD;AACtD,MAAM,WAAW,mBAAmB;IAClC,cAAc,EAAE,oBAAoB,EAAE,CAAA;IACtC,cAAc,EAAE,oBAAoB,EAAE,CAAA;IACtC,WAAW,EAAE,iBAAiB,EAAE,CAAA;IAChC,kFAAkF;IAClF,eAAe,EAAE,oBAAoB,EAAE,CAAA;IACvC;;;;;;OAMG;IACH,QAAQ,EAAE,OAAO,CAAA;CAClB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Who inside the BUYING license may use a resource that license bought (AAD-954).
|
|
2
|
+
// Backend: app/Modules/Store/Services/Resource/ResourceAccessAssignmentService.php
|
|
3
|
+
//
|
|
4
|
+
// Shaped to match the app store's seat payload (`AssignedRole` / `AssignedUser`
|
|
5
|
+
// in `./seats`) so the manage-access screen can be the same experience — with
|
|
6
|
+
// one deliberate difference: **no `channel_ids` anywhere**. A resource
|
|
7
|
+
// entitlement pins one channel and one version for the whole license, so every
|
|
8
|
+
// user reads the same build; a per-user channel would be a control that does
|
|
9
|
+
// nothing. Do not add one.
|
|
10
|
+
export {};
|
|
@@ -19,6 +19,8 @@ import type { ResourceVersionSummary } from './resourceReleases';
|
|
|
19
19
|
* | `entitlement_revoked` | 403 | the publisher revoked it — contact them |
|
|
20
20
|
* | `subscription_expired` | 403 | the subscription lapsed — renew |
|
|
21
21
|
* | `subscription_pending_approval` | 403 | awaiting the publisher's approval — wait, do NOT render as expired |
|
|
22
|
+
* | `channel_not_accessible` | 403 | they DID buy it, but the track is restricted and their license is not listed — ask the publisher, never offer a purchase |
|
|
23
|
+
* | `not_granted` | 403 | the licence has it, this user does not — point at the licence admin |
|
|
22
24
|
* | `version_withdrawn` | 409 | the pinned build was pulled — offer the Update action |
|
|
23
25
|
* | `version_not_ready` | 409 | the payload has not finished preparing — poll |
|
|
24
26
|
* | `payload_backend_not_implemented` | 501 | no backend registered yet (the phase-1 default) |
|
|
@@ -27,7 +29,22 @@ import type { ResourceVersionSummary } from './resourceReleases';
|
|
|
27
29
|
* this license has no relationship with both 404, so the API never confirms that
|
|
28
30
|
* another license's unpublished product exists.
|
|
29
31
|
*/
|
|
30
|
-
export type ResourceAccessReason = 'not_entitled' | 'entitlement_revoked' | 'subscription_expired' | 'subscription_pending_approval'
|
|
32
|
+
export type ResourceAccessReason = 'not_entitled' | 'entitlement_revoked' | 'subscription_expired' | 'subscription_pending_approval'
|
|
33
|
+
/**
|
|
34
|
+
* AAD-949. Reachable ONLY by a license holding a live entitlement — the
|
|
35
|
+
* entitlement checks run first — so the remedy is "ask the publisher to add
|
|
36
|
+
* you to that track", never "buy this". Must not be collapsed into
|
|
37
|
+
* `not_entitled`: the two are answered by different people.
|
|
38
|
+
*/
|
|
39
|
+
| 'channel_not_accessible'
|
|
40
|
+
/**
|
|
41
|
+
* AAD-954. The license bought it and may draw from the track, but THIS USER
|
|
42
|
+
* holds no grant. The only reason that is about a person rather than a
|
|
43
|
+
* license, and it is checked last — so the remedy is always "ask your
|
|
44
|
+
* license admin", never "buy this". Show the manage-access route to an
|
|
45
|
+
* admin and a "request access from your admin" message to anyone else.
|
|
46
|
+
*/
|
|
47
|
+
| 'not_granted' | 'version_withdrawn' | 'version_not_ready' | 'payload_backend_not_implemented';
|
|
31
48
|
/** The body of a refused access-layer read. */
|
|
32
49
|
export interface ResourceAccessError {
|
|
33
50
|
message: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resourceEntitlements.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/resourceEntitlements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAEhE;;;;;;GAMG;AAEH
|
|
1
|
+
{"version":3,"file":"resourceEntitlements.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/resourceEntitlements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAEhE;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,oBAAoB,GAC1B,cAAc,GACd,qBAAqB,GACrB,sBAAsB,GACtB,+BAA+B;AACjC;;;;;GAKG;GACD,wBAAwB;AAC1B;;;;;;GAMG;GACD,aAAa,GACb,mBAAmB,GACnB,mBAAmB,GACnB,iCAAiC,CAAA;AAEvC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CAAA;IAClB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;CACnB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ResourceVersionSource } from './snapshotFileSource';
|
|
1
2
|
import type { SnapshotPayloadConfig, SnapshotPayloadSchema } from './snapshotPayload';
|
|
2
3
|
import type { SnapshotErrorCode, SnapshotErrorContext } from './snapshotSources';
|
|
3
4
|
/**
|
|
@@ -101,21 +102,52 @@ export interface ResourceVersion {
|
|
|
101
102
|
*/
|
|
102
103
|
first_published_at: string | null;
|
|
103
104
|
/**
|
|
104
|
-
*
|
|
105
|
+
* Where this version's rows came from, available from the moment it is declared.
|
|
106
|
+
*
|
|
107
|
+
* A linked TABLE carries a table reference; an uploaded FILE carries provenance
|
|
108
|
+
* instead — filename, format, size, digest and `verified: false`. The platform can
|
|
109
|
+
* inspect a table inside the publisher's own license and cannot inspect an
|
|
110
|
+
* uploaded file's origin at all, which is why the two say different things.
|
|
105
111
|
*
|
|
106
112
|
* Present even while `pending` or `failed`, when `payload_schema` is still null —
|
|
107
113
|
* the row that most needs to say where it came from is the one that failed.
|
|
108
114
|
*
|
|
115
|
+
* Discriminated on `type`, and ABSENT MEANS `'table'` (AAD-948), so read it as
|
|
116
|
+
* `source?.type ?? 'table'` — the optional chain matters, because the field itself
|
|
117
|
+
* is optional (below) and a non-publisher never receives it at all.
|
|
118
|
+
*
|
|
109
119
|
* ⚠️ **PUBLISHER-ONLY, and ABSENT rather than null for anyone else**, for the same
|
|
110
|
-
* reason as `payload_config`: it names the publisher's table.
|
|
120
|
+
* reason as `payload_config`: it names the publisher's own table or file.
|
|
111
121
|
*/
|
|
112
|
-
source?:
|
|
113
|
-
table_id: string;
|
|
114
|
-
table_name: string | null;
|
|
115
|
-
} | null;
|
|
122
|
+
source?: ResourceVersionSource | null;
|
|
116
123
|
created_at: string;
|
|
117
124
|
updated_at: string;
|
|
118
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* Who may draw releases from a channel (AAD-949).
|
|
128
|
+
*
|
|
129
|
+
* - `'default'` — every ENTITLED license may use the channel; the member pivot is
|
|
130
|
+
* ignored even if rows exist
|
|
131
|
+
* - `'specific_licenses'` — only entitled licenses on the member pivot may use it
|
|
132
|
+
*
|
|
133
|
+
* ⚠️ **This narrows an entitlement; it never grants one.** The app store's
|
|
134
|
+
* identically-named mode does double duty — there, channel membership is itself a
|
|
135
|
+
* route into entitlement. On a resource it is not: entitlement always comes from a
|
|
136
|
+
* purchase, so adding a license to a channel gives it nothing it did not already
|
|
137
|
+
* have. A member with no entitlement is refused `not_entitled`.
|
|
138
|
+
*/
|
|
139
|
+
export type ResourceChannelAccessMode = 'default' | 'specific_licenses';
|
|
140
|
+
/**
|
|
141
|
+
* Per-channel commercial bypass (AAD-949).
|
|
142
|
+
*
|
|
143
|
+
* - `'free'` — members of this channel are not blocked by a lapsed subscription
|
|
144
|
+
* - `null` — inherit the resource's access model (default)
|
|
145
|
+
*
|
|
146
|
+
* Only valid on a `specific_licenses` channel of a subscription resource; anything
|
|
147
|
+
* else is a 422 on `errors.access_override`. It relaxes the commercial gate for an
|
|
148
|
+
* entitlement that ALREADY exists and cannot create one.
|
|
149
|
+
*/
|
|
150
|
+
export type ResourceChannelAccessOverride = 'free' | null;
|
|
119
151
|
/** A release channel. `active_version` is null when the channel serves nothing. */
|
|
120
152
|
export interface ResourceChannel {
|
|
121
153
|
id: string;
|
|
@@ -125,12 +157,67 @@ export interface ResourceChannel {
|
|
|
125
157
|
color: string | null;
|
|
126
158
|
sort_order: number;
|
|
127
159
|
is_default: boolean;
|
|
160
|
+
access_mode: ResourceChannelAccessMode;
|
|
161
|
+
access_override: ResourceChannelAccessOverride;
|
|
162
|
+
/**
|
|
163
|
+
* Whether the CURRENT license is on this channel's member pivot.
|
|
164
|
+
*
|
|
165
|
+
* Do not render this as "has access": it is one of two conditions, and the other
|
|
166
|
+
* (an entitlement) is not visible here. It is only meaningful when `access_mode`
|
|
167
|
+
* is `specific_licenses`.
|
|
168
|
+
*/
|
|
169
|
+
is_member: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* How many licenses are on the pivot. **Publisher-only — `null` for anyone
|
|
172
|
+
* else**, rather than 0, so "not shown to you" and "nobody is a member" stay
|
|
173
|
+
* distinguishable.
|
|
174
|
+
*/
|
|
175
|
+
member_count: number | null;
|
|
128
176
|
active_version: ResourceVersionSummary | null;
|
|
129
177
|
/** Convenience mirror of `active_version !== null`. */
|
|
130
178
|
is_publishing: boolean;
|
|
131
179
|
created_at: string;
|
|
132
180
|
updated_at: string;
|
|
133
181
|
}
|
|
182
|
+
/**
|
|
183
|
+
* Partial update — omit a key to leave it alone, send `null` to clear a nullable
|
|
184
|
+
* one. `name` is NOT required, unlike on create.
|
|
185
|
+
*
|
|
186
|
+
* The backend refuses `is_default: false` on the current default (400): a resource
|
|
187
|
+
* must always have exactly one, so switch by promoting another channel.
|
|
188
|
+
*/
|
|
189
|
+
export interface UpdateResourceChannelData {
|
|
190
|
+
name?: string;
|
|
191
|
+
description?: string | null;
|
|
192
|
+
color?: string | null;
|
|
193
|
+
access_mode?: ResourceChannelAccessMode;
|
|
194
|
+
access_override?: ResourceChannelAccessOverride;
|
|
195
|
+
sort_order?: number;
|
|
196
|
+
is_default?: boolean;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* A license on a channel's member pivot. Enough to render a chip without a
|
|
200
|
+
* directory lookup — the same shape the app store's channel members endpoint
|
|
201
|
+
* returns, so the manage-access views can share components.
|
|
202
|
+
*/
|
|
203
|
+
export interface ResourceChannelMember {
|
|
204
|
+
id: string;
|
|
205
|
+
name: string;
|
|
206
|
+
/** Always null: the V1 Company model was removed, so no display name exists. */
|
|
207
|
+
company: string | null;
|
|
208
|
+
/** Hex string. */
|
|
209
|
+
theme: string;
|
|
210
|
+
/** When the license was added to the channel. */
|
|
211
|
+
added_at: string | null;
|
|
212
|
+
}
|
|
213
|
+
/** Body for `retryResourceVersion()`. Everything is optional. */
|
|
214
|
+
export interface RetryResourceVersionData {
|
|
215
|
+
/**
|
|
216
|
+
* Replaces the stored selection. Omit to replay exactly what failed, which is
|
|
217
|
+
* right for a transient fault and useless for a failure caused by the selection.
|
|
218
|
+
*/
|
|
219
|
+
payload_config?: SnapshotPayloadConfig | Record<string, unknown>;
|
|
220
|
+
}
|
|
134
221
|
/** Who an unpublish would cut off. */
|
|
135
222
|
export interface ResourceUnpublishImpact {
|
|
136
223
|
licenses: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resourceReleases.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/resourceReleases.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AACrF,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAEhF;;;;;;GAMG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEjE,uEAAuE;AACvE,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,oBAAoB,CAAA;CACpC;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,aAAa,EAAE,oBAAoB,CAAA;IACnC;;;;;;OAMG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,yEAAyE;IACzE,kBAAkB,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC5C;;;;;;;OAOG;IACH,qBAAqB,EAAE,oBAAoB,GAAG,IAAI,CAAA;IAClD;;;;;;;OAOG;IACH,cAAc,EAAE,qBAAqB,GAAG,IAAI,CAAA;IAC5C;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACvE;;;;;OAKG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,uFAAuF;IACvF,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB;;;;;OAKG;IACH,gBAAgB,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,OAAO,CAAC;QAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC,CAAA;IACvG;;;;;;;OAOG;IACH,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC
|
|
1
|
+
{"version":3,"file":"resourceReleases.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/resourceReleases.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AACrF,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAEhF;;;;;;GAMG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEjE,uEAAuE;AACvE,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,oBAAoB,CAAA;CACpC;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAA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M,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,KAAK,CAAC;QACb,UAAU,EAAE,MAAM,CAAA;QAClB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;QAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;KAC1B,CAAC,CAAA;CACH"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AppTrustLevel } from './app';
|
|
2
|
+
import type { ResourceChannelAccessMode, ResourceChannelAccessOverride } from './resourceReleases';
|
|
2
3
|
import type { ResourceCategory, ResourcePayloadType } from './sellableResources';
|
|
3
4
|
import type { SnapshotPayloadConfig } from './snapshotPayload';
|
|
4
5
|
/**
|
|
@@ -87,7 +88,16 @@ export interface CreateResourceChannelData {
|
|
|
87
88
|
name: string;
|
|
88
89
|
description?: string | null;
|
|
89
90
|
color?: string | null;
|
|
91
|
+
/** Who may draw from the track. Defaults to `default` (AAD-949). */
|
|
92
|
+
access_mode?: ResourceChannelAccessMode;
|
|
93
|
+
/** Only valid on a `specific_licenses` channel of a subscription resource. */
|
|
94
|
+
access_override?: ResourceChannelAccessOverride;
|
|
90
95
|
sort_order?: number;
|
|
96
|
+
/**
|
|
97
|
+
* Marking this channel default demotes the previous default atomically. The
|
|
98
|
+
* first channel on a resource with no default is promoted automatically.
|
|
99
|
+
*/
|
|
100
|
+
is_default?: boolean;
|
|
91
101
|
}
|
|
92
102
|
/**
|
|
93
103
|
* Buying a resource.
|