contentful-management 11.55.0-canary.9 → 11.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -14
- package/dist/contentful-management.browser.js +290 -240
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.node.js +204 -212
- package/dist/contentful-management.node.js.map +1 -1
- package/dist/contentful-management.node.min.js +1 -1
- package/dist/es-modules/adapters/REST/endpoints/app-action-call.js +59 -0
- package/dist/es-modules/adapters/REST/endpoints/entry.js +6 -31
- package/dist/es-modules/adapters/REST/endpoints/index.js +0 -2
- package/dist/es-modules/adapters/REST/endpoints/release.js +0 -24
- package/dist/es-modules/common-types.js +2 -0
- package/dist/es-modules/contentful-management.js +1 -1
- package/dist/es-modules/create-environment-api.js +39 -4
- package/dist/es-modules/entities/app-action-call.js +35 -0
- package/dist/es-modules/plain/plain-client.js +4 -9
- package/dist/typings/adapters/REST/endpoints/app-action-call.d.ts +3 -0
- package/dist/typings/adapters/REST/endpoints/index.d.ts +0 -2
- package/dist/typings/common-types.d.ts +39 -137
- package/dist/typings/create-entry-api.d.ts +1 -1
- package/dist/typings/create-environment-api.d.ts +31 -9
- package/dist/typings/entities/app-action-call.d.ts +37 -1
- package/dist/typings/entities/entry.d.ts +3 -3
- package/dist/typings/entities/release.d.ts +1 -18
- package/dist/typings/export-types.d.ts +1 -1
- package/dist/typings/plain/common-types.d.ts +17 -92
- package/dist/typings/plain/entities/app-action-call.d.ts +84 -2
- package/dist/typings/plain/wrappers/wrap.d.ts +0 -2
- package/package.json +2 -6
- package/dist/es-modules/adapters/REST/endpoints/release-entry.js +0 -63
- package/dist/typings/adapters/REST/endpoints/release-entry.d.ts +0 -7
|
@@ -4,7 +4,7 @@ import type { Stream } from 'stream';
|
|
|
4
4
|
import type { AccessTokenProps, CreatePersonalAccessTokenProps as CreatePATProps } from './entities/access-token';
|
|
5
5
|
import type { ApiKeyProps, CreateApiKeyProps } from './entities/api-key';
|
|
6
6
|
import type { AppActionProps, CreateAppActionProps } from './entities/app-action';
|
|
7
|
-
import type { AppActionCallProps, AppActionCallResponse, CreateAppActionCallProps } from './entities/app-action-call';
|
|
7
|
+
import type { AppActionCallProps, AppActionCallResponse, AppActionCallRawResponseProps, CreateAppActionCallProps } from './entities/app-action-call';
|
|
8
8
|
import type { AppBundleProps, CreateAppBundleProps } from './entities/app-bundle';
|
|
9
9
|
import type { AppDefinitionProps, AppInstallationsForOrganizationProps, CreateAppDefinitionProps } from './entities/app-definition';
|
|
10
10
|
import type { AppDetailsProps, CreateAppDetailsProps } from './entities/app-details';
|
|
@@ -28,7 +28,7 @@ import type { CreateOrganizationInvitationProps, OrganizationInvitationProps } f
|
|
|
28
28
|
import type { OrganizationMembershipProps } from './entities/organization-membership';
|
|
29
29
|
import type { CreatePersonalAccessTokenProps, PersonalAccessTokenProps } from './entities/personal-access-token';
|
|
30
30
|
import type { PreviewApiKeyProps } from './entities/preview-api-key';
|
|
31
|
-
import type { ReleasePayload,
|
|
31
|
+
import type { ReleasePayload, ReleaseProps, ReleaseQueryOptions, ReleaseValidatePayload } from './entities/release';
|
|
32
32
|
import type { ReleaseAction, ReleaseActionProps, ReleaseActionQueryOptions } from './entities/release-action';
|
|
33
33
|
import type { CreateRoleProps, RoleProps } from './entities/role';
|
|
34
34
|
import type { ScheduledActionProps } from './entities/scheduled-action';
|
|
@@ -268,6 +268,9 @@ type MRInternal<UA extends boolean> = {
|
|
|
268
268
|
(opts: MROpts<'AppActionCall', 'create', UA>): MRReturn<'AppActionCall', 'create'>;
|
|
269
269
|
(opts: MROpts<'AppActionCall', 'createWithResponse', UA>): MRReturn<'AppActionCall', 'createWithResponse'>;
|
|
270
270
|
(opts: MROpts<'AppActionCall', 'getCallDetails', UA>): MRReturn<'AppActionCall', 'getCallDetails'>;
|
|
271
|
+
(opts: MROpts<'AppActionCall', 'get', UA>): MRReturn<'AppActionCall', 'get'>;
|
|
272
|
+
(opts: MROpts<'AppActionCall', 'createWithResult', UA>): MRReturn<'AppActionCall', 'createWithResult'>;
|
|
273
|
+
(opts: MROpts<'AppActionCall', 'getResponse', UA>): MRReturn<'AppActionCall', 'getResponse'>;
|
|
271
274
|
(opts: MROpts<'AppBundle', 'get', UA>): MRReturn<'AppBundle', 'get'>;
|
|
272
275
|
(opts: MROpts<'AppBundle', 'getMany', UA>): MRReturn<'AppBundle', 'getMany'>;
|
|
273
276
|
(opts: MROpts<'AppBundle', 'delete', UA>): MRReturn<'AppBundle', 'delete'>;
|
|
@@ -451,12 +454,6 @@ type MRInternal<UA extends boolean> = {
|
|
|
451
454
|
(opts: MROpts<'ReleaseAction', 'get', UA>): MRReturn<'ReleaseAction', 'get'>;
|
|
452
455
|
(opts: MROpts<'ReleaseAction', 'getMany', UA>): MRReturn<'ReleaseAction', 'getMany'>;
|
|
453
456
|
(opts: MROpts<'ReleaseAction', 'queryForRelease', UA>): MRReturn<'ReleaseAction', 'queryForRelease'>;
|
|
454
|
-
(opts: MROpts<'ReleaseEntry', 'get', UA>): MRReturn<'ReleaseEntry', 'get'>;
|
|
455
|
-
(opts: MROpts<'ReleaseEntry', 'getMany', UA>): MRReturn<'ReleaseEntry', 'getMany'>;
|
|
456
|
-
(opts: MROpts<'ReleaseEntry', 'update', UA>): MRReturn<'ReleaseEntry', 'update'>;
|
|
457
|
-
(opts: MROpts<'ReleaseEntry', 'patch', UA>): MRReturn<'ReleaseEntry', 'patch'>;
|
|
458
|
-
(opts: MROpts<'ReleaseEntry', 'create', UA>): MRReturn<'ReleaseEntry', 'create'>;
|
|
459
|
-
(opts: MROpts<'ReleaseEntry', 'createWithId', UA>): MRReturn<'ReleaseEntry', 'createWithId'>;
|
|
460
457
|
(opts: MROpts<'Resource', 'getMany', UA>): MRReturn<'Resource', 'getMany'>;
|
|
461
458
|
(opts: MROpts<'ResourceProvider', 'get', UA>): MRReturn<'ResourceProvider', 'get'>;
|
|
462
459
|
(opts: MROpts<'ResourceProvider', 'upsert', UA>): MRReturn<'ResourceProvider', 'upsert'>;
|
|
@@ -794,6 +791,10 @@ export type MRActions = {
|
|
|
794
791
|
payload: CreateAppActionCallProps;
|
|
795
792
|
return: AppActionCallProps;
|
|
796
793
|
};
|
|
794
|
+
get: {
|
|
795
|
+
params: GetAppActionCallParamsWithId;
|
|
796
|
+
return: AppActionCallProps;
|
|
797
|
+
};
|
|
797
798
|
getCallDetails: {
|
|
798
799
|
params: GetAppActionCallDetailsParams;
|
|
799
800
|
return: AppActionCallResponse;
|
|
@@ -803,6 +804,15 @@ export type MRActions = {
|
|
|
803
804
|
payload: CreateAppActionCallProps;
|
|
804
805
|
return: AppActionCallResponse;
|
|
805
806
|
};
|
|
807
|
+
createWithResult: {
|
|
808
|
+
params: CreateWithResponseParams;
|
|
809
|
+
payload: CreateAppActionCallProps;
|
|
810
|
+
return: AppActionCallProps;
|
|
811
|
+
};
|
|
812
|
+
getResponse: {
|
|
813
|
+
params: GetAppActionCallParamsWithId;
|
|
814
|
+
return: AppActionCallRawResponseProps;
|
|
815
|
+
};
|
|
806
816
|
};
|
|
807
817
|
AppBundle: {
|
|
808
818
|
get: {
|
|
@@ -1494,21 +1504,28 @@ export type MRActions = {
|
|
|
1494
1504
|
return: CollectionProp<EntryProps<any>>;
|
|
1495
1505
|
};
|
|
1496
1506
|
getMany: {
|
|
1497
|
-
params:
|
|
1498
|
-
return: CollectionProp<EntryProps<any
|
|
1507
|
+
params: GetSpaceEnvironmentParams & QueryParams;
|
|
1508
|
+
return: CollectionProp<EntryProps<any>>;
|
|
1499
1509
|
};
|
|
1500
1510
|
get: {
|
|
1501
|
-
params:
|
|
1502
|
-
|
|
1511
|
+
params: GetSpaceEnvironmentParams & {
|
|
1512
|
+
entryId: string;
|
|
1513
|
+
} & QueryParams;
|
|
1514
|
+
return: EntryProps<any>;
|
|
1503
1515
|
};
|
|
1504
1516
|
patch: {
|
|
1505
|
-
params:
|
|
1517
|
+
params: GetSpaceEnvironmentParams & {
|
|
1518
|
+
entryId: string;
|
|
1519
|
+
version: number;
|
|
1520
|
+
};
|
|
1506
1521
|
payload: OpPatch[];
|
|
1507
1522
|
headers?: RawAxiosRequestHeaders;
|
|
1508
1523
|
return: EntryProps<any>;
|
|
1509
1524
|
};
|
|
1510
1525
|
update: {
|
|
1511
|
-
params:
|
|
1526
|
+
params: GetSpaceEnvironmentParams & {
|
|
1527
|
+
entryId: string;
|
|
1528
|
+
};
|
|
1512
1529
|
payload: EntryProps<any>;
|
|
1513
1530
|
headers?: RawAxiosRequestHeaders;
|
|
1514
1531
|
return: EntryProps<any>;
|
|
@@ -1547,8 +1564,7 @@ export type MRActions = {
|
|
|
1547
1564
|
create: {
|
|
1548
1565
|
params: GetSpaceEnvironmentParams & {
|
|
1549
1566
|
contentTypeId: string;
|
|
1550
|
-
|
|
1551
|
-
} & QueryParams;
|
|
1567
|
+
};
|
|
1552
1568
|
payload: CreateEntryProps<any>;
|
|
1553
1569
|
return: EntryProps<any>;
|
|
1554
1570
|
};
|
|
@@ -1556,10 +1572,9 @@ export type MRActions = {
|
|
|
1556
1572
|
params: GetSpaceEnvironmentParams & {
|
|
1557
1573
|
entryId: string;
|
|
1558
1574
|
contentTypeId: string;
|
|
1559
|
-
releaseId?: string;
|
|
1560
1575
|
};
|
|
1561
1576
|
payload: CreateEntryProps<any>;
|
|
1562
|
-
return: EntryProps<any
|
|
1577
|
+
return: EntryProps<any>;
|
|
1563
1578
|
};
|
|
1564
1579
|
references: {
|
|
1565
1580
|
params: GetSpaceEnvironmentParams & {
|
|
@@ -1816,14 +1831,14 @@ export type MRActions = {
|
|
|
1816
1831
|
};
|
|
1817
1832
|
create: {
|
|
1818
1833
|
params: GetSpaceEnvironmentParams;
|
|
1819
|
-
payload: ReleasePayload
|
|
1834
|
+
payload: ReleasePayload;
|
|
1820
1835
|
return: ReleaseProps;
|
|
1821
1836
|
};
|
|
1822
1837
|
update: {
|
|
1823
1838
|
params: GetReleaseParams & {
|
|
1824
1839
|
version: number;
|
|
1825
1840
|
};
|
|
1826
|
-
payload: ReleasePayload
|
|
1841
|
+
payload: ReleasePayload;
|
|
1827
1842
|
return: ReleaseProps;
|
|
1828
1843
|
};
|
|
1829
1844
|
delete: {
|
|
@@ -1854,81 +1869,6 @@ export type MRActions = {
|
|
|
1854
1869
|
return: ReleaseActionProps<'validate'>;
|
|
1855
1870
|
};
|
|
1856
1871
|
};
|
|
1857
|
-
ReleaseEntry: {
|
|
1858
|
-
get: {
|
|
1859
|
-
params: GetReleaseEntryParams;
|
|
1860
|
-
return: EntryProps<any, any>;
|
|
1861
|
-
};
|
|
1862
|
-
getMany: {
|
|
1863
|
-
params: GetManyReleaseEntryParams;
|
|
1864
|
-
return: CollectionProp<EntryProps<any, any>>;
|
|
1865
|
-
};
|
|
1866
|
-
update: {
|
|
1867
|
-
params: UpdateReleaseEntryParams & {
|
|
1868
|
-
entryId: string;
|
|
1869
|
-
};
|
|
1870
|
-
payload: EntryProps<any>;
|
|
1871
|
-
headers?: RawAxiosRequestHeaders;
|
|
1872
|
-
return: EntryProps<any, {
|
|
1873
|
-
release: {
|
|
1874
|
-
sys: {
|
|
1875
|
-
type: 'Link';
|
|
1876
|
-
linkType: 'Entry' | 'Asset';
|
|
1877
|
-
id: string;
|
|
1878
|
-
};
|
|
1879
|
-
};
|
|
1880
|
-
}>;
|
|
1881
|
-
};
|
|
1882
|
-
patch: {
|
|
1883
|
-
params: PatchReleaseEntryParams & {
|
|
1884
|
-
entryId: string;
|
|
1885
|
-
version: number;
|
|
1886
|
-
};
|
|
1887
|
-
payload: OpPatch[];
|
|
1888
|
-
headers?: RawAxiosRequestHeaders;
|
|
1889
|
-
return: EntryProps<any, {
|
|
1890
|
-
release: {
|
|
1891
|
-
sys: {
|
|
1892
|
-
type: 'Link';
|
|
1893
|
-
linkType: 'Entry' | 'Asset';
|
|
1894
|
-
id: string;
|
|
1895
|
-
};
|
|
1896
|
-
};
|
|
1897
|
-
}>;
|
|
1898
|
-
};
|
|
1899
|
-
create: {
|
|
1900
|
-
params: CreateReleaseEntryParams;
|
|
1901
|
-
payload: CreateEntryProps<any>;
|
|
1902
|
-
headers?: RawAxiosRequestHeaders;
|
|
1903
|
-
return: EntryProps<any, {
|
|
1904
|
-
release: {
|
|
1905
|
-
sys: {
|
|
1906
|
-
type: 'Link';
|
|
1907
|
-
linkType: 'Entry' | 'Asset';
|
|
1908
|
-
id: string;
|
|
1909
|
-
};
|
|
1910
|
-
};
|
|
1911
|
-
}>;
|
|
1912
|
-
};
|
|
1913
|
-
createWithId: {
|
|
1914
|
-
params: GetSpaceEnvironmentParams & {
|
|
1915
|
-
releaseId: string;
|
|
1916
|
-
entryId: string;
|
|
1917
|
-
contentTypeId: string;
|
|
1918
|
-
};
|
|
1919
|
-
payload: CreateEntryProps<any>;
|
|
1920
|
-
headers?: RawAxiosRequestHeaders;
|
|
1921
|
-
return: EntryProps<any, {
|
|
1922
|
-
release: {
|
|
1923
|
-
sys: {
|
|
1924
|
-
type: 'Link';
|
|
1925
|
-
linkType: 'Entry' | 'Asset';
|
|
1926
|
-
id: string;
|
|
1927
|
-
};
|
|
1928
|
-
};
|
|
1929
|
-
}>;
|
|
1930
|
-
};
|
|
1931
|
-
};
|
|
1932
1872
|
ReleaseAction: {
|
|
1933
1873
|
get: {
|
|
1934
1874
|
params: GetReleaseParams & {
|
|
@@ -2576,6 +2516,9 @@ export type GetAppActionCallDetailsParams = GetSpaceEnvironmentParams & {
|
|
|
2576
2516
|
appActionId: string;
|
|
2577
2517
|
callId: string;
|
|
2578
2518
|
};
|
|
2519
|
+
export type GetAppActionCallParamsWithId = GetAppActionCallParams & {
|
|
2520
|
+
callId: string;
|
|
2521
|
+
};
|
|
2579
2522
|
export type GetAppBundleParams = GetAppDefinitionParams & {
|
|
2580
2523
|
appBundleId: string;
|
|
2581
2524
|
};
|
|
@@ -2602,19 +2545,6 @@ export type GetEditorInterfaceParams = GetSpaceEnvironmentParams & {
|
|
|
2602
2545
|
};
|
|
2603
2546
|
export type GetEntryParams = GetSpaceEnvironmentParams & {
|
|
2604
2547
|
entryId: string;
|
|
2605
|
-
releaseId?: string;
|
|
2606
|
-
};
|
|
2607
|
-
export type GetManyEntryParams = GetSpaceEnvironmentParams & {
|
|
2608
|
-
releaseId?: string;
|
|
2609
|
-
};
|
|
2610
|
-
export type PatchEntryParams = GetSpaceEnvironmentParams & {
|
|
2611
|
-
entryId: string;
|
|
2612
|
-
version: number;
|
|
2613
|
-
releaseId?: string;
|
|
2614
|
-
};
|
|
2615
|
-
export type UpdateEntryParams = GetSpaceEnvironmentParams & {
|
|
2616
|
-
entryId: string;
|
|
2617
|
-
releaseId?: string;
|
|
2618
2548
|
};
|
|
2619
2549
|
export type GetExtensionParams = GetSpaceEnvironmentParams & {
|
|
2620
2550
|
extensionId: string;
|
|
@@ -2638,34 +2568,9 @@ export type GetFunctionLogParams = GetManyFunctionLogParams & {
|
|
|
2638
2568
|
export type GetOrganizationParams = {
|
|
2639
2569
|
organizationId: string;
|
|
2640
2570
|
};
|
|
2641
|
-
export type GetReleaseParams =
|
|
2642
|
-
releaseId: string;
|
|
2643
|
-
};
|
|
2644
|
-
export type GetReleaseEntryParams = GetSpaceEnvironmentParams & {
|
|
2645
|
-
releaseId?: string;
|
|
2646
|
-
entryId: string;
|
|
2647
|
-
};
|
|
2648
|
-
export type GetManyReleaseEntryParams = GetSpaceEnvironmentParams & {
|
|
2571
|
+
export type GetReleaseParams = GetSpaceEnvironmentParams & {
|
|
2649
2572
|
releaseId: string;
|
|
2650
2573
|
};
|
|
2651
|
-
export type UpdateReleaseEntryParams = GetSpaceEnvironmentParams & {
|
|
2652
|
-
releaseId: string;
|
|
2653
|
-
entryId: string;
|
|
2654
|
-
};
|
|
2655
|
-
export type PatchReleaseEntryParams = GetSpaceEnvironmentParams & {
|
|
2656
|
-
releaseId: string;
|
|
2657
|
-
entryId: string;
|
|
2658
|
-
version: number;
|
|
2659
|
-
};
|
|
2660
|
-
export type CreateReleaseEntryParams = GetSpaceEnvironmentParams & {
|
|
2661
|
-
releaseId: string;
|
|
2662
|
-
contentTypeId: string;
|
|
2663
|
-
};
|
|
2664
|
-
export type CreateWithIdReleaseEntryParams = GetSpaceEnvironmentParams & {
|
|
2665
|
-
releaseId: string;
|
|
2666
|
-
entryId: string;
|
|
2667
|
-
contentTypeId: string;
|
|
2668
|
-
};
|
|
2669
2574
|
export type GetSnapshotForContentTypeParams = GetSpaceEnvironmentParams & {
|
|
2670
2575
|
contentTypeId: string;
|
|
2671
2576
|
};
|
|
@@ -2812,7 +2717,4 @@ export type GetUserParams = {
|
|
|
2812
2717
|
export declare enum ScheduledActionReferenceFilters {
|
|
2813
2718
|
contentTypeAnnotationNotIn = "sys.contentType.metadata.annotations.ContentType[nin]"
|
|
2814
2719
|
}
|
|
2815
|
-
export type ReleaseEnvironmentParams = GetSpaceEnvironmentParams & {
|
|
2816
|
-
releaseSchemaVersion?: 'Release.v1' | 'Release.v2';
|
|
2817
|
-
};
|
|
2818
2720
|
export {};
|
|
@@ -327,5 +327,5 @@ export default function createEntryApi(makeRequest: MakeRequest): {
|
|
|
327
327
|
/**
|
|
328
328
|
* Recursively collects references of an entry and their descendants
|
|
329
329
|
*/
|
|
330
|
-
references: (options?: EntryReferenceOptionsProps) => Promise<import("./common-types").Collection<Entry, EntryProps<import("./common-types").KeyValueMap
|
|
330
|
+
references: (options?: EntryReferenceOptionsProps) => Promise<import("./common-types").Collection<Entry, EntryProps<import("./common-types").KeyValueMap>>>;
|
|
331
331
|
};
|
|
@@ -3,12 +3,12 @@ import type { AcceptsQueryOptions, BasicCursorPaginationOptions, CreatedAtInterv
|
|
|
3
3
|
import type { BasicQueryOptions, MakeRequest } from './common-types';
|
|
4
4
|
import type { CreateAppInstallationProps } from './entities/app-installation';
|
|
5
5
|
import type { CreateAppSignedRequestProps } from './entities/app-signed-request';
|
|
6
|
-
import type { CreateAppActionCallProps } from './entities/app-action-call';
|
|
6
|
+
import type { CreateAppActionCallProps, AppActionCallRawResponseProps } from './entities/app-action-call';
|
|
7
7
|
import type { AssetFileProp, AssetProps, CreateAssetFromFilesOptions, CreateAssetProps } from './entities/asset';
|
|
8
8
|
import type { CreateAssetKeyProps } from './entities/asset-key';
|
|
9
9
|
import type { BulkAction, BulkActionPayload, BulkActionPublishPayload, BulkActionUnpublishPayload, BulkActionValidatePayload } from './entities/bulk-action';
|
|
10
10
|
import type { ReleaseActionQueryOptions } from './entities/release-action';
|
|
11
|
-
import type { ReleasePayload, ReleaseQueryOptions, ReleaseValidatePayload
|
|
11
|
+
import type { ReleasePayload, ReleaseQueryOptions, ReleaseValidatePayload } from './entities/release';
|
|
12
12
|
import type { ContentTypeProps, CreateContentTypeProps } from './entities/content-type';
|
|
13
13
|
import type { CreateEntryProps, EntryProps, EntryReferenceOptionsProps, EntryReferenceProps } from './entities/entry';
|
|
14
14
|
import type { CreateExtensionProps } from './entities/extension';
|
|
@@ -269,7 +269,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest): {
|
|
|
269
269
|
*
|
|
270
270
|
* // Using Thenables
|
|
271
271
|
* client.getSpace('<space_id>')
|
|
272
|
-
* .then((space) => space.getEnvironment('<
|
|
272
|
+
* .then((space) => space.getEnvironment('<environment_id>'))
|
|
273
273
|
* .then((environment) => environment.createUnpublishBulkAction(payload))
|
|
274
274
|
* .then((bulkAction) => console.log(bulkAction.waitProcessing()))
|
|
275
275
|
* .catch(console.error)
|
|
@@ -277,7 +277,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest): {
|
|
|
277
277
|
* // Using async/await
|
|
278
278
|
* try {
|
|
279
279
|
* const space = await clientgetSpace('<space_id>')
|
|
280
|
-
* const environment = await space.getEnvironment('<
|
|
280
|
+
* const environment = await space.getEnvironment('<environment_id>')
|
|
281
281
|
* const bulkActionInProgress = await environment.createUnpublishBulkAction(payload)
|
|
282
282
|
*
|
|
283
283
|
* // You can wait for a recently created BulkAction to be processed by using `bulkAction.waitProcessing()`
|
|
@@ -486,7 +486,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest): {
|
|
|
486
486
|
* .catch(console.error)
|
|
487
487
|
* ```
|
|
488
488
|
*/
|
|
489
|
-
getEntries(query?: QueryOptions): Promise<import("./common-types").Collection<import("./entities/entry").Entry, EntryProps<import("./common-types").KeyValueMap
|
|
489
|
+
getEntries(query?: QueryOptions): Promise<import("./common-types").Collection<import("./entities/entry").Entry, EntryProps<import("./common-types").KeyValueMap>>>;
|
|
490
490
|
/**
|
|
491
491
|
* Gets a collection of published Entries
|
|
492
492
|
* @param query - Object with search parameters. Check the <a href="https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters">JS SDK tutorial</a> and the <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters">REST API reference</a> for more details.
|
|
@@ -505,7 +505,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest): {
|
|
|
505
505
|
* .catch(console.error)
|
|
506
506
|
* ```
|
|
507
507
|
*/
|
|
508
|
-
getPublishedEntries(query?: QueryOptions): Promise<import("./common-types").Collection<import("./entities/entry").Entry, EntryProps<import("./common-types").KeyValueMap
|
|
508
|
+
getPublishedEntries(query?: QueryOptions): Promise<import("./common-types").Collection<import("./entities/entry").Entry, EntryProps<import("./common-types").KeyValueMap>>>;
|
|
509
509
|
/**
|
|
510
510
|
* Creates a Entry
|
|
511
511
|
* @param contentTypeId - The Content Type ID of the newly created Entry
|
|
@@ -574,7 +574,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest): {
|
|
|
574
574
|
*
|
|
575
575
|
* // Get entry references
|
|
576
576
|
* client.getSpace('<space_id>')
|
|
577
|
-
* .then((space) => space.getEnvironment('<
|
|
577
|
+
* .then((space) => space.getEnvironment('<environment_id>'))
|
|
578
578
|
* .then((environment) => environment.getEntryReferences('<entry_id>', {include: number}))
|
|
579
579
|
* .then((entry) => console.log(entry.includes))
|
|
580
580
|
* // or
|
|
@@ -1068,6 +1068,28 @@ export default function createEnvironmentApi(makeRequest: MakeRequest): {
|
|
|
1068
1068
|
* ```
|
|
1069
1069
|
*/
|
|
1070
1070
|
createAppActionCall(appDefinitionId: string, appActionId: string, data: CreateAppActionCallProps): Promise<import("./entities/app-action-call").AppActionCall>;
|
|
1071
|
+
/**
|
|
1072
|
+
* Gets the raw response (headers/body) for a completed App Action Call
|
|
1073
|
+
* @param appDefinitionId - AppDefinition ID
|
|
1074
|
+
* @param appActionId - App Action ID
|
|
1075
|
+
* @param callId - App Action Call ID
|
|
1076
|
+
* @return Promise for the raw response object including `response.body` and optional `response.headers`
|
|
1077
|
+
* @example ```javascript
|
|
1078
|
+
* const contentful = require('contentful-management')
|
|
1079
|
+
*
|
|
1080
|
+
* const client = contentful.createClient({
|
|
1081
|
+
* accessToken: '<content_management_api_key>'
|
|
1082
|
+
* })
|
|
1083
|
+
*
|
|
1084
|
+
* client
|
|
1085
|
+
* .getSpace('<space_id>')
|
|
1086
|
+
* .then((space) => space.getEnvironment('<environment_id>'))
|
|
1087
|
+
* .then((environment) => environment.getAppActionCallResponse('<app_definition_id>', '<app_action_id>', '<call_id>'))
|
|
1088
|
+
* .then((raw) => console.log(raw.response.body))
|
|
1089
|
+
* .catch(console.error)
|
|
1090
|
+
* ```
|
|
1091
|
+
*/
|
|
1092
|
+
getAppActionCallResponse(appDefinitionId: string, appActionId: string, callId: string): Promise<AppActionCallRawResponseProps>;
|
|
1071
1093
|
/**
|
|
1072
1094
|
* Creates an app signed request
|
|
1073
1095
|
* @param appDefinitionId - AppDefinition ID
|
|
@@ -1358,7 +1380,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest): {
|
|
|
1358
1380
|
*/
|
|
1359
1381
|
updateRelease({ releaseId, payload, version, }: {
|
|
1360
1382
|
releaseId: string;
|
|
1361
|
-
payload: ReleasePayload
|
|
1383
|
+
payload: ReleasePayload;
|
|
1362
1384
|
version: number;
|
|
1363
1385
|
}): Promise<import("./entities/release").Release>;
|
|
1364
1386
|
/**
|
|
@@ -1590,7 +1612,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest): {
|
|
|
1590
1612
|
* })
|
|
1591
1613
|
*
|
|
1592
1614
|
* client.getSpace('<space_id>')
|
|
1593
|
-
* .then((space) => space.getEnvironment('<
|
|
1615
|
+
* .then((space) => space.getEnvironment('<environment_id>'))
|
|
1594
1616
|
* .then((environment) => environment.getResourceTypes({limit: 10}))
|
|
1595
1617
|
* .then((installations) => console.log(installations.items))
|
|
1596
1618
|
* .catch(console.error)
|
|
@@ -6,25 +6,61 @@ type AppActionCallSys = Except<BasicMetaSysProps, 'version'> & {
|
|
|
6
6
|
space: SysLink;
|
|
7
7
|
environment: SysLink;
|
|
8
8
|
action: SysLink;
|
|
9
|
+
appActionCallResponse?: SysLink;
|
|
9
10
|
};
|
|
10
11
|
type RetryOptions = Pick<CreateWithResponseParams, 'retries' | 'retryInterval'>;
|
|
12
|
+
export type AppActionCallStatus = 'processing' | 'succeeded' | 'failed';
|
|
13
|
+
export interface AppActionCallErrorProps {
|
|
14
|
+
sys: {
|
|
15
|
+
type: 'Error';
|
|
16
|
+
id: string;
|
|
17
|
+
};
|
|
18
|
+
message: string;
|
|
19
|
+
details?: Record<string, unknown>;
|
|
20
|
+
statusCode?: number;
|
|
21
|
+
}
|
|
11
22
|
export type AppActionCallProps = {
|
|
12
23
|
/**
|
|
13
24
|
* System metadata
|
|
14
25
|
*/
|
|
15
26
|
sys: AppActionCallSys;
|
|
27
|
+
/** The execution status of the app action call, if available */
|
|
28
|
+
status?: AppActionCallStatus;
|
|
29
|
+
/** Structured result when execution succeeded */
|
|
30
|
+
result?: unknown;
|
|
31
|
+
/** Structured error when execution failed */
|
|
32
|
+
error?: AppActionCallErrorProps;
|
|
16
33
|
};
|
|
17
34
|
export type CreateAppActionCallProps = {
|
|
18
35
|
/** The body for the call */
|
|
19
36
|
parameters: {
|
|
20
|
-
[key: string]:
|
|
37
|
+
[key: string]: unknown;
|
|
21
38
|
};
|
|
22
39
|
};
|
|
23
40
|
type AppActionCallApi = {
|
|
24
41
|
createWithResponse(): Promise<AppActionCallResponse>;
|
|
25
42
|
getCallDetails(): Promise<AppActionCallResponse>;
|
|
43
|
+
get(): Promise<AppActionCallProps>;
|
|
44
|
+
createWithResult(): Promise<AppActionCallProps>;
|
|
26
45
|
};
|
|
27
46
|
export type AppActionCallResponse = WebhookCallDetailsProps;
|
|
47
|
+
export interface AppActionCallRawResponseProps {
|
|
48
|
+
sys: {
|
|
49
|
+
id: string;
|
|
50
|
+
type: 'AppActionCallResponse';
|
|
51
|
+
space: SysLink;
|
|
52
|
+
environment: SysLink;
|
|
53
|
+
appInstallation: SysLink;
|
|
54
|
+
appAction: SysLink;
|
|
55
|
+
createdAt: string;
|
|
56
|
+
};
|
|
57
|
+
response: {
|
|
58
|
+
headers?: {
|
|
59
|
+
contentType?: string;
|
|
60
|
+
};
|
|
61
|
+
body: string;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
28
64
|
export interface AppActionCallResponseData extends AppActionCallResponse, DefaultElements<AppActionCallResponse>, AppActionCallApi {
|
|
29
65
|
}
|
|
30
66
|
export interface AppActionCall extends AppActionCallProps, DefaultElements<AppActionCallProps> {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { CollectionProp, DefaultElements, EntryMetaSysProps, KeyValueMap, MakeRequest, MetadataProps } from '../common-types';
|
|
2
2
|
import type { ContentfulEntryApi } from '../create-entry-api';
|
|
3
3
|
import type { AssetProps } from './asset';
|
|
4
|
-
export type EntryProps<T = KeyValueMap
|
|
5
|
-
sys: EntryMetaSysProps
|
|
4
|
+
export type EntryProps<T = KeyValueMap> = {
|
|
5
|
+
sys: EntryMetaSysProps;
|
|
6
6
|
metadata?: MetadataProps;
|
|
7
7
|
fields: T;
|
|
8
8
|
};
|
|
@@ -50,4 +50,4 @@ export declare function wrapEntry(makeRequest: MakeRequest, data: EntryProps): E
|
|
|
50
50
|
* Data is also mixed in with link getters if links exist and includes were requested
|
|
51
51
|
* @private
|
|
52
52
|
*/
|
|
53
|
-
export declare const wrapEntryCollection: (makeRequest: MakeRequest, data: CollectionProp<EntryProps<KeyValueMap
|
|
53
|
+
export declare const wrapEntryCollection: (makeRequest: MakeRequest, data: CollectionProp<EntryProps<KeyValueMap>>) => import("../common-types").Collection<Entry, EntryProps<KeyValueMap>>;
|
|
@@ -18,8 +18,6 @@ export interface ReleaseQueryOptions {
|
|
|
18
18
|
'sys.createdBy.sys.id[in]'?: string;
|
|
19
19
|
/** Comma-separated filter (inclusion) by Release status (active, archived) */
|
|
20
20
|
'sys.status[in]'?: ReleaseStatus;
|
|
21
|
-
/** Determines the Release API version to use. 'Release.v1' refers to Launch, 'Release.v2' refers to Releases. */
|
|
22
|
-
'sys.schemaVersion'?: 'Release.v1' | 'Release.v2';
|
|
23
21
|
/** Comma-separated filter (exclusion) by Release status (active, archived) */
|
|
24
22
|
'sys.status[nin]'?: ReleaseStatus;
|
|
25
23
|
/** Find releases using full text phrase and term matching */
|
|
@@ -57,7 +55,6 @@ export type ReleaseSysProps = {
|
|
|
57
55
|
createdAt: ISO8601Timestamp;
|
|
58
56
|
updatedAt: ISO8601Timestamp;
|
|
59
57
|
lastAction?: Link<'ReleaseAction'>;
|
|
60
|
-
schemaVersion?: 'Release.v2';
|
|
61
58
|
};
|
|
62
59
|
export type ReleaseReferenceFilters = ScheduledActionReferenceFilters;
|
|
63
60
|
export declare const ReleaseReferenceFilters: typeof ScheduledActionReferenceFilters;
|
|
@@ -75,23 +72,9 @@ export interface ReleaseProps {
|
|
|
75
72
|
metadata?: ReleaseMetadata;
|
|
76
73
|
}
|
|
77
74
|
export interface ReleasePayload extends MakeRequestPayload {
|
|
78
|
-
sys?: {
|
|
79
|
-
type: 'Release';
|
|
80
|
-
schemaVersion?: 'Release.v1' | undefined;
|
|
81
|
-
};
|
|
82
75
|
title: string;
|
|
83
76
|
entities: BaseCollection<Link<Entity>>;
|
|
84
77
|
}
|
|
85
|
-
export interface ReleasePayloadV2 extends MakeRequestPayload {
|
|
86
|
-
sys?: {
|
|
87
|
-
type: 'Release';
|
|
88
|
-
schemaVersion: 'Release.v2';
|
|
89
|
-
};
|
|
90
|
-
title: string;
|
|
91
|
-
entities: BaseCollection<{
|
|
92
|
-
entity: Link<Entity>;
|
|
93
|
-
} & ReleaseValidatePayload>;
|
|
94
|
-
}
|
|
95
78
|
export interface ReleaseValidatePayload {
|
|
96
79
|
action?: 'publish';
|
|
97
80
|
}
|
|
@@ -112,7 +95,7 @@ export interface ReleaseApiMethods {
|
|
|
112
95
|
* */
|
|
113
96
|
unarchive(): Promise<Release>;
|
|
114
97
|
/** Updates a Release and returns the updated Release object */
|
|
115
|
-
update(payload: ReleasePayload
|
|
98
|
+
update(payload: ReleasePayload): Promise<Release>;
|
|
116
99
|
/** Deletes a Release and all ReleaseActions linked to it (non-reversible) */
|
|
117
100
|
delete(): Promise<void>;
|
|
118
101
|
/** Publishes a Release and waits until the asynchronous action is completed */
|
|
@@ -5,7 +5,7 @@ export type { AppAccessToken, AppAccessTokenProps, CreateAppAccessTokenProps, }
|
|
|
5
5
|
export type { AiAction, AiActionProps, CreateAiActionProps } from './entities/ai-action';
|
|
6
6
|
export type { AiActionInvocation, AiActionInvocationProps } from './entities/ai-action-invocation';
|
|
7
7
|
export type { AppAction, AppActionCategoryProps, AppActionCategoryType, AppActionParameterDefinition, AppActionProps, AppActionType, CreateAppActionProps, } from './entities/app-action';
|
|
8
|
-
export type { AppActionCall, AppActionCallProps, CreateAppActionCallProps, } from './entities/app-action-call';
|
|
8
|
+
export type { AppActionCall, AppActionCallProps, AppActionCallErrorProps, AppActionCallRawResponseProps, AppActionCallStatus, CreateAppActionCallProps, } from './entities/app-action-call';
|
|
9
9
|
export type { AppBundle, AppBundleFile, AppBundleProps, CreateAppBundleProps, } from './entities/app-bundle';
|
|
10
10
|
export type { AppDefinition, AppDefinitionProps, AppLocation, CreateAppDefinitionProps, EntryFieldLocation, NavigationItem, PageLocation, SimpleLocation, } from './entities/app-definition';
|
|
11
11
|
export type { AppDetails, AppDetailsProps, AppIcon, CreateAppDetailsProps, IconType, } from './entities/app-details';
|