-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom-object.ts
152 lines (150 loc) · 4.31 KB
/
custom-object.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/**
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
*/
import { BaseResource, CreatedBy, LastModifiedBy } from './common.js'
export interface CustomObject extends BaseResource {
/**
* Unique identifier of the CustomObject.
*
*/
readonly id: string
/**
* Current version of the CustomObject.
*
*
*/
readonly version: number
/**
* Date and time (UTC) the CustomObject was initially created.
*
*
*/
readonly createdAt: string
/**
* Date and time (UTC) the CustomObject was last updated.
*
*
*/
readonly lastModifiedAt: string
/**
* Present on resources created after 1 February 2019 except for [events not tracked](/../api/client-logging#events-tracked).
*
*
*/
readonly lastModifiedBy?: LastModifiedBy
/**
* Present on resources created after 1 February 2019 except for [events not tracked](/../api/client-logging#events-tracked).
*
*
*/
readonly createdBy?: CreatedBy
/**
* Namespace to group CustomObjects.
*
*
*/
readonly container: string
/**
* User-defined unique identifier of the CustomObject within the defined `container`.
*
*
*/
readonly key: string
/**
* JSON standard types Number, String, Boolean, Array, Object, and [common API data types](/../api/types).
* For values of type [Reference](ctp:api:type:Reference) the integrity of the data is not guaranteed.
* If the referenced object is deleted, the API does not delete the corresponding reference to it and the `value` points to a non-existing object in such case.
*
*
*/
readonly value: any
}
export interface CustomObjectDraft {
/**
* Namespace to group CustomObjects.
*
*
*/
readonly container: string
/**
* User-defined unique identifier of the CustomObject within the defined `container`.
*
*
*/
readonly key: string
/**
* JSON standard types Number, String, Boolean, Array, Object, and [common API data types](/../api/types).
* For values of type [Reference](ctp:api:type:Reference) the integrity of the data is not guaranteed.
* If the referenced object is deleted, the API does not delete the corresponding reference to it and the `value` points to a non-existing object in such case.
*
*
*/
readonly value: any
/**
* Current version of the CustomObject.
*
*
*/
readonly version?: number
}
/**
* [PagedQueryResult](/../api/general-concepts#pagedqueryresult) with `results` containing an array of [CustomObject](ctp:api:type:CustomObject).
*
*/
export interface CustomObjectPagedQueryResponse {
/**
* Number of [results requested](/../api/general-concepts#limit).
*
*
*/
readonly limit: number
/**
* Number of [elements skipped](/../api/general-concepts#offset).
*
*
*/
readonly offset: number
/**
* Actual number of results returned.
*
*
*/
readonly count: number
/**
* The total number of results matching the query.
* This number is an estimation that is not [strongly consistent](/../api/general-concepts#strong-consistency).
* This field is returned by default.
* For improved performance, calculating this field can be deactivated by using the query parameter `withTotal=false`.
* When the results are filtered with a [Query Predicate](/../api/predicates/query), `total` is subject to a [limit](/../api/limits#queries).
*
*
*/
readonly total?: number
/**
* [CustomObjects](ctp:api:type:CustomObject) matching the query.
*
*
*/
readonly results: CustomObject[]
}
/**
* [Reference](ctp:api:type:Reference) to a [CustomObject](ctp:api:type:CustomObject).
*
*/
export interface CustomObjectReference {
readonly typeId: 'key-value-document'
/**
* Unique identifier of the referenced [CustomObject](ctp:api:type:CustomObject).
*
*
*/
readonly id: string
/**
* Contains the representation of the expanded CustomObject. Only present in responses to requests with [Reference Expansion](/../api/general-concepts#reference-expansion) for CustomObjects.
*
*
*/
readonly obj?: CustomObject
}