-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathindex.d.ts
117 lines (93 loc) · 3.5 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
import { Response } from "../contentstackCollection";
import { Query } from "../query";
import { User } from "../user";
import { AnyProperty, SystemFields } from "../utility/fields";
import { Pagination } from "../utility/pagination";
import { Asset, Assets } from "./asset";
import { Branch, Branches } from "./branch";
import { BranchAlias, BranchAliases } from "./branchAlias";
import { BulkOperation } from "./bulkOperation";
import { ContentType, ContentTypes } from "./contentType";
import { DeliveryToken, DeliveryTokens } from "./deliveryToken";
import { Environment, Environments } from "./environment";
import { Extension, Extensions } from "./extension";
import { GlobalField, GlobalFields } from "./globalField";
import { Label, Labels } from "./label";
import { Locale, Locales } from "./locale";
import { Release, Releases } from "./release";
import { Role, Roles } from "./role";
import { Webhook, Webhooks } from "./webhook";
import { Workflow, Workflows } from "./workflow";
import { Taxonomy, Taxonomies } from "./taxonomy";
import { ManagementToken, ManagementTokens } from "./managementToken";
import { Variant, Variants } from "./variants";
import { VariantGroup, VariantGroups } from "./VariantGroup";
import { VariantGroupVariant, VariantGroupVariants } from "./VariantGroup/variants";
export interface StackConfig {
api_key:string
management_token?: string
branch_uid?: string
}
export interface StackDetails {
stack: {
name: string
description: string
master_locale: string
}
}
export interface Stack extends SystemFields {
api_key: string
name: string
fetch(param?: AnyProperty): Promise<Stack>
query(param?: Pagination & AnyProperty): Query<Stack>
update(param?: AnyProperty): Promise<Stack>
locale(): Locales
locale(code: string): Locale
environment(): Environments
environment(uid: string): Environment
branch(): Branches
branch(uid: string): Branch
branchAlias(): BranchAliases
branchAlias(uid: string): BranchAlias
contentType(): ContentTypes
contentType(uid: string): ContentType
globalField(): GlobalFields
globalField({}): GlobalFields
globalField(uid: string): GlobalField
globalField(uid: string, option: object): GlobalField
asset(): Assets
asset(uid: string): Asset
deliveryToken(): DeliveryTokens
deliveryToken(uid: string): DeliveryToken
extension(): Extensions
extension(uid: string): Extension
workflow(): Workflows
workflow(uid: string): Workflow
webhook(): Webhooks
webhook(uid: string): Webhook
label(): Labels
label(uid: string): Label
release(): Releases
release(uid: string): Release
bulkOperation(): BulkOperation
users(): Promise<Array<User>>
updateUsersRoles(users: AnyProperty): Promise<any>
transferOwnership(email: string): Promise<Response>
settings(): Promise<any>
resetSettings(): Promise<any>
addSettings(stackVariables: AnyProperty): Promise<any>
share(emails: Array<string>, roles: AnyProperty): Promise<Response>
unShare(email: string): Promise<Response>
role(): Roles
role(uid: string): Role
taxonomy(): Taxonomies
taxonomy(uid: string): Taxonomy
managementToken(): ManagementTokens
managementToken(uid: string): ManagementToken
variants(): Variants
variants(uid: string): Variant
variantGroup(): VariantGroups
variantGroup(uid: string): VariantGroup
variant(): VariantGroupVariants
variant(uid: string): VariantGroupVariant
}