@rippling/rippling-sdk 0.2.0-alpha.85 → 0.2.0-alpha.86
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/core/platform/custom-objects/category.d.mts +125 -0
- package/core/platform/custom-objects/category.d.mts.map +1 -0
- package/core/platform/custom-objects/category.d.ts +125 -0
- package/core/platform/custom-objects/category.d.ts.map +1 -0
- package/core/platform/custom-objects/category.js +188 -0
- package/core/platform/custom-objects/category.js.map +1 -0
- package/core/platform/custom-objects/category.mjs +178 -0
- package/core/platform/custom-objects/category.mjs.map +1 -0
- package/core/platform/custom-objects/definition.d.mts +147 -0
- package/core/platform/custom-objects/definition.d.mts.map +1 -0
- package/core/platform/custom-objects/definition.d.ts +147 -0
- package/core/platform/custom-objects/definition.d.ts.map +1 -0
- package/core/platform/custom-objects/definition.js +200 -0
- package/core/platform/custom-objects/definition.js.map +1 -0
- package/core/platform/custom-objects/definition.mjs +190 -0
- package/core/platform/custom-objects/definition.mjs.map +1 -0
- package/core/platform/custom-objects/fields.d.mts +302 -0
- package/core/platform/custom-objects/fields.d.mts.map +1 -0
- package/core/platform/custom-objects/fields.d.ts +302 -0
- package/core/platform/custom-objects/fields.d.ts.map +1 -0
- package/core/platform/custom-objects/fields.js +369 -0
- package/core/platform/custom-objects/fields.js.map +1 -0
- package/core/platform/custom-objects/fields.mjs +347 -0
- package/core/platform/custom-objects/fields.mjs.map +1 -0
- package/core/platform/custom-objects/function-runtime.d.mts +42 -0
- package/core/platform/custom-objects/function-runtime.d.mts.map +1 -0
- package/core/platform/custom-objects/function-runtime.d.ts +42 -0
- package/core/platform/custom-objects/function-runtime.d.ts.map +1 -0
- package/core/platform/custom-objects/function-runtime.js +38 -0
- package/core/platform/custom-objects/function-runtime.js.map +1 -0
- package/core/platform/custom-objects/function-runtime.mjs +35 -0
- package/core/platform/custom-objects/function-runtime.mjs.map +1 -0
- package/core/platform/custom-objects/lifecycle.d.mts +83 -0
- package/core/platform/custom-objects/lifecycle.d.mts.map +1 -0
- package/core/platform/custom-objects/lifecycle.d.ts +83 -0
- package/core/platform/custom-objects/lifecycle.d.ts.map +1 -0
- package/core/platform/custom-objects/lifecycle.js +372 -0
- package/core/platform/custom-objects/lifecycle.js.map +1 -0
- package/core/platform/custom-objects/lifecycle.mjs +367 -0
- package/core/platform/custom-objects/lifecycle.mjs.map +1 -0
- package/core/platform/custom-objects/manager.d.mts +354 -0
- package/core/platform/custom-objects/manager.d.mts.map +1 -0
- package/core/platform/custom-objects/manager.d.ts +354 -0
- package/core/platform/custom-objects/manager.d.ts.map +1 -0
- package/core/platform/custom-objects/manager.js +646 -0
- package/core/platform/custom-objects/manager.js.map +1 -0
- package/core/platform/custom-objects/manager.mjs +637 -0
- package/core/platform/custom-objects/manager.mjs.map +1 -0
- package/core/platform/custom-objects/provisioning.d.mts +138 -0
- package/core/platform/custom-objects/provisioning.d.mts.map +1 -0
- package/core/platform/custom-objects/provisioning.d.ts +138 -0
- package/core/platform/custom-objects/provisioning.d.ts.map +1 -0
- package/core/platform/custom-objects/provisioning.js +455 -0
- package/core/platform/custom-objects/provisioning.js.map +1 -0
- package/core/platform/custom-objects/provisioning.mjs +447 -0
- package/core/platform/custom-objects/provisioning.mjs.map +1 -0
- package/core/platform/custom-objects/rql.d.mts +122 -0
- package/core/platform/custom-objects/rql.d.mts.map +1 -0
- package/core/platform/custom-objects/rql.d.ts +122 -0
- package/core/platform/custom-objects/rql.d.ts.map +1 -0
- package/core/platform/custom-objects/rql.js +225 -0
- package/core/platform/custom-objects/rql.js.map +1 -0
- package/core/platform/custom-objects/rql.mjs +222 -0
- package/core/platform/custom-objects/rql.mjs.map +1 -0
- package/core/platform/custom-objects/schema-manager.d.mts +203 -0
- package/core/platform/custom-objects/schema-manager.d.mts.map +1 -0
- package/core/platform/custom-objects/schema-manager.d.ts +203 -0
- package/core/platform/custom-objects/schema-manager.d.ts.map +1 -0
- package/core/platform/custom-objects/schema-manager.js +256 -0
- package/core/platform/custom-objects/schema-manager.js.map +1 -0
- package/core/platform/custom-objects/schema-manager.mjs +249 -0
- package/core/platform/custom-objects/schema-manager.mjs.map +1 -0
- package/core/platform/custom-objects/typed-rql.d.mts +157 -0
- package/core/platform/custom-objects/typed-rql.d.mts.map +1 -0
- package/core/platform/custom-objects/typed-rql.d.ts +157 -0
- package/core/platform/custom-objects/typed-rql.d.ts.map +1 -0
- package/core/platform/custom-objects/typed-rql.js +583 -0
- package/core/platform/custom-objects/typed-rql.js.map +1 -0
- package/core/platform/custom-objects/typed-rql.mjs +580 -0
- package/core/platform/custom-objects/typed-rql.mjs.map +1 -0
- package/core/platform/custom-objects/types.d.mts +549 -0
- package/core/platform/custom-objects/types.d.mts.map +1 -0
- package/core/platform/custom-objects/types.d.ts +549 -0
- package/core/platform/custom-objects/types.d.ts.map +1 -0
- package/core/platform/custom-objects/types.js +20 -0
- package/core/platform/custom-objects/types.js.map +1 -0
- package/core/platform/custom-objects/types.mjs +17 -0
- package/core/platform/custom-objects/types.mjs.map +1 -0
- package/core/platform/custom-objects/validation.d.mts +97 -0
- package/core/platform/custom-objects/validation.d.mts.map +1 -0
- package/core/platform/custom-objects/validation.d.ts +97 -0
- package/core/platform/custom-objects/validation.d.ts.map +1 -0
- package/core/platform/custom-objects/validation.js +477 -0
- package/core/platform/custom-objects/validation.js.map +1 -0
- package/core/platform/custom-objects/validation.mjs +465 -0
- package/core/platform/custom-objects/validation.mjs.map +1 -0
- package/core/platform/custom-objects.d.mts +67 -0
- package/core/platform/custom-objects.d.mts.map +1 -0
- package/core/platform/custom-objects.d.ts +67 -0
- package/core/platform/custom-objects.d.ts.map +1 -0
- package/core/platform/custom-objects.js +118 -0
- package/core/platform/custom-objects.js.map +1 -0
- package/core/platform/custom-objects.mjs +45 -0
- package/core/platform/custom-objects.mjs.map +1 -0
- package/package.json +1 -1
- package/resources/custom-objects/custom-objects.d.mts +7 -0
- package/resources/custom-objects/custom-objects.d.mts.map +1 -1
- package/resources/custom-objects/custom-objects.d.ts +7 -0
- package/resources/custom-objects/custom-objects.d.ts.map +1 -1
- package/resources/custom-objects/custom-objects.js.map +1 -1
- package/resources/custom-objects/custom-objects.mjs.map +1 -1
- package/resources/custom-objects/fields.d.mts +129 -54
- package/resources/custom-objects/fields.d.mts.map +1 -1
- package/resources/custom-objects/fields.d.ts +129 -54
- package/resources/custom-objects/fields.d.ts.map +1 -1
- package/resources/levels.d.mts +25 -4
- package/resources/levels.d.mts.map +1 -1
- package/resources/levels.d.ts +25 -4
- package/resources/levels.d.ts.map +1 -1
- package/src/core/platform/custom-objects/category.ts +294 -0
- package/src/core/platform/custom-objects/definition.ts +373 -0
- package/src/core/platform/custom-objects/fields.ts +653 -0
- package/src/core/platform/custom-objects/function-runtime.ts +76 -0
- package/src/core/platform/custom-objects/lifecycle.ts +557 -0
- package/src/core/platform/custom-objects/manager.ts +959 -0
- package/src/core/platform/custom-objects/provisioning.ts +672 -0
- package/src/core/platform/custom-objects/rql.ts +375 -0
- package/src/core/platform/custom-objects/schema-manager.ts +351 -0
- package/src/core/platform/custom-objects/typed-rql.ts +1273 -0
- package/src/core/platform/custom-objects/types.ts +753 -0
- package/src/core/platform/custom-objects/validation.ts +573 -0
- package/src/core/platform/custom-objects.ts +269 -0
- package/src/resources/custom-objects/custom-objects.ts +8 -0
- package/src/resources/custom-objects/fields.ts +192 -59
- package/src/resources/levels.ts +28 -4
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
import type { RipplingSDK } from '../../../client';
|
|
2
|
+
import type {
|
|
3
|
+
CustomObjectCategoryDefinition,
|
|
4
|
+
CustomObjectCategoryMutationOptions,
|
|
5
|
+
ProvisionedCustomObjectCategory,
|
|
6
|
+
ReconciledCustomObjectCategory,
|
|
7
|
+
} from './category';
|
|
8
|
+
import {
|
|
9
|
+
buildObjectCategoryCreateParams,
|
|
10
|
+
buildObjectCategoryUpdateParams,
|
|
11
|
+
deleteCustomObjectCategoryDefinition,
|
|
12
|
+
provisionCustomObjectCategoryDefinition,
|
|
13
|
+
provisionCustomObjectCategoryDefinitions,
|
|
14
|
+
reconcileCustomObjectCategoryDefinition,
|
|
15
|
+
reconcileCustomObjectCategoryDefinitions,
|
|
16
|
+
} from './category';
|
|
17
|
+
import type { AnyCustomObjectDefinition, FieldNames, LogicalCategoryName } from './types';
|
|
18
|
+
import type {
|
|
19
|
+
ProvisionCustomObjectOptions,
|
|
20
|
+
ProvisionCustomObjectsOptions,
|
|
21
|
+
ProvisionableFieldParams,
|
|
22
|
+
ProvisionedCustomObject,
|
|
23
|
+
} from './provisioning';
|
|
24
|
+
import {
|
|
25
|
+
buildCustomObjectCreateParams,
|
|
26
|
+
buildCustomObjectNameFieldDetails,
|
|
27
|
+
buildCustomObjectUpdateParams,
|
|
28
|
+
buildProvisionableFieldParams,
|
|
29
|
+
provisionCustomObjectDefinition,
|
|
30
|
+
provisionCustomObjectDefinitions,
|
|
31
|
+
} from './provisioning';
|
|
32
|
+
import type {
|
|
33
|
+
ReconcileCustomObjectDefinitionOptions,
|
|
34
|
+
ReconcileCustomObjectDefinitionsOptions,
|
|
35
|
+
ReconciledCustomObject,
|
|
36
|
+
} from './lifecycle';
|
|
37
|
+
import {
|
|
38
|
+
deleteCustomObjectDefinition,
|
|
39
|
+
reconcileCustomObjectDefinition,
|
|
40
|
+
reconcileCustomObjectDefinitions,
|
|
41
|
+
} from './lifecycle';
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Typed manager bound to one category definition and one SDK client.
|
|
45
|
+
*
|
|
46
|
+
* @typeParam TName - Logical category name carried by the bound definition.
|
|
47
|
+
*/
|
|
48
|
+
export class TypedCustomObjectCategoryManager<TName extends LogicalCategoryName = LogicalCategoryName> {
|
|
49
|
+
private readonly client: RipplingSDK;
|
|
50
|
+
private readonly definition: CustomObjectCategoryDefinition<TName>;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Creates a typed category manager bound to one SDK client and one category definition.
|
|
54
|
+
*
|
|
55
|
+
* @param client - SDK client used for category lifecycle operations.
|
|
56
|
+
* @param definition - Typed category definition to bind to the manager.
|
|
57
|
+
*/
|
|
58
|
+
constructor(client: RipplingSDK, definition: CustomObjectCategoryDefinition<TName>) {
|
|
59
|
+
this.client = client;
|
|
60
|
+
this.definition = definition;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Returns the bound typed category definition.
|
|
65
|
+
*
|
|
66
|
+
* @returns Bound typed category definition.
|
|
67
|
+
*/
|
|
68
|
+
getDefinition(): CustomObjectCategoryDefinition<TName> {
|
|
69
|
+
return this.definition;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Builds the low-level create payload for the bound category definition.
|
|
74
|
+
*
|
|
75
|
+
* @returns REST category-create payload for the bound definition.
|
|
76
|
+
*/
|
|
77
|
+
buildCreateParams() {
|
|
78
|
+
return buildObjectCategoryCreateParams(this.definition);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Builds the low-level update payload for the bound category definition.
|
|
83
|
+
*
|
|
84
|
+
* @returns REST category-update payload for the bound definition.
|
|
85
|
+
*/
|
|
86
|
+
buildUpdateParams() {
|
|
87
|
+
return buildObjectCategoryUpdateParams(this.definition);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Provisions the bound category definition through the REST SDK.
|
|
92
|
+
*
|
|
93
|
+
* @param options - Provisioning behavior flags for display-metadata updates.
|
|
94
|
+
* @returns Provisioning result for the bound category definition.
|
|
95
|
+
*/
|
|
96
|
+
provision(
|
|
97
|
+
options: CustomObjectCategoryMutationOptions = {},
|
|
98
|
+
): Promise<ProvisionedCustomObjectCategory<TName>> {
|
|
99
|
+
return provisionCustomObjectCategoryDefinition(this.client, this.definition, options);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Reconciles the bound category definition against the backend.
|
|
104
|
+
*
|
|
105
|
+
* @param options - Reconciliation behavior flags for display-metadata updates.
|
|
106
|
+
* @returns Reconciliation result for the bound category definition.
|
|
107
|
+
*/
|
|
108
|
+
reconcile(
|
|
109
|
+
options: CustomObjectCategoryMutationOptions = {},
|
|
110
|
+
): Promise<ReconciledCustomObjectCategory<TName>> {
|
|
111
|
+
return reconcileCustomObjectCategoryDefinition(this.client, this.definition, options);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** Deletes the category that matches the bound typed definition. */
|
|
115
|
+
delete(): Promise<boolean> {
|
|
116
|
+
return deleteCustomObjectCategoryDefinition(this.client, this.definition);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Typed manager bound to one custom-object definition and one SDK client.
|
|
122
|
+
*
|
|
123
|
+
* @typeParam TDefinition - Object definition bound to the manager.
|
|
124
|
+
*/
|
|
125
|
+
export class TypedCustomObjectSchemaManager<
|
|
126
|
+
TDefinition extends AnyCustomObjectDefinition = AnyCustomObjectDefinition,
|
|
127
|
+
> {
|
|
128
|
+
private readonly client: RipplingSDK;
|
|
129
|
+
private readonly definition: TDefinition;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Creates a typed schema manager bound to one SDK client and one object definition.
|
|
133
|
+
*
|
|
134
|
+
* @param client - SDK client used for object lifecycle operations.
|
|
135
|
+
* @param definition - Typed object definition to bind to the manager.
|
|
136
|
+
*/
|
|
137
|
+
constructor(client: RipplingSDK, definition: TDefinition) {
|
|
138
|
+
this.client = client;
|
|
139
|
+
this.definition = definition;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Returns the bound typed object definition.
|
|
144
|
+
*
|
|
145
|
+
* @returns Bound typed object definition.
|
|
146
|
+
*/
|
|
147
|
+
getDefinition(): TDefinition {
|
|
148
|
+
return this.definition;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Returns a typed category manager when the bound definition embeds a category definition.
|
|
153
|
+
*
|
|
154
|
+
* @returns Typed category manager for the embedded category definition, when present.
|
|
155
|
+
*/
|
|
156
|
+
category():
|
|
157
|
+
| TypedCustomObjectCategoryManager<NonNullable<TDefinition['categoryDefinition']>['name']>
|
|
158
|
+
| undefined {
|
|
159
|
+
const categoryDefinition = this.definition.categoryDefinition;
|
|
160
|
+
return categoryDefinition == null ? undefined : (
|
|
161
|
+
new TypedCustomObjectCategoryManager(this.client, categoryDefinition)
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Builds the low-level create payload for the bound object definition using a resolved category id.
|
|
167
|
+
*
|
|
168
|
+
* @param categoryIdentifier - Resolved custom-category id or native category id required by the live API.
|
|
169
|
+
* @returns REST object-create payload for the bound definition.
|
|
170
|
+
*/
|
|
171
|
+
buildCreateParams(categoryIdentifier: string) {
|
|
172
|
+
return buildCustomObjectCreateParams(this.definition, categoryIdentifier);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Builds the low-level update payload for the bound object definition using a resolved category id.
|
|
177
|
+
*
|
|
178
|
+
* @param categoryIdentifier - Resolved custom-category id or native category id required by the live API.
|
|
179
|
+
* @returns REST object-update payload for the bound definition.
|
|
180
|
+
*/
|
|
181
|
+
buildUpdateParams(categoryIdentifier: string) {
|
|
182
|
+
return buildCustomObjectUpdateParams(this.definition, categoryIdentifier);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Builds the low-level platform-managed name-field metadata payload for the bound definition.
|
|
187
|
+
*
|
|
188
|
+
* @returns Name-field metadata payload for the bound definition, when needed.
|
|
189
|
+
*/
|
|
190
|
+
buildNameFieldDetails() {
|
|
191
|
+
return buildCustomObjectNameFieldDetails(this.definition);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Builds typed field create/update payloads for one logical field on the bound definition.
|
|
196
|
+
*
|
|
197
|
+
* @param fieldName - Logical field name to compile.
|
|
198
|
+
* @returns Frozen create/update payload pair for the requested field.
|
|
199
|
+
* @typeParam TFieldName - Logical field name being compiled.
|
|
200
|
+
*/
|
|
201
|
+
buildFieldParams<TFieldName extends FieldNames<TDefinition>>(
|
|
202
|
+
fieldName: TFieldName,
|
|
203
|
+
): ProvisionableFieldParams {
|
|
204
|
+
return buildProvisionableFieldParams(this.definition, fieldName);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Provisions the bound object definition through the REST SDK.
|
|
209
|
+
*
|
|
210
|
+
* @param options - Provisioning behavior flags for categories, display metadata, and name fields.
|
|
211
|
+
* @returns Provisioning result for the bound object definition.
|
|
212
|
+
*/
|
|
213
|
+
provision(options: ProvisionCustomObjectOptions = {}): Promise<ProvisionedCustomObject<TDefinition>> {
|
|
214
|
+
return provisionCustomObjectDefinition(this.client, this.definition, options);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Reconciles the bound object definition against the backend.
|
|
219
|
+
*
|
|
220
|
+
* @param options - Reconciliation behavior flags for categories, name fields, and deletions.
|
|
221
|
+
* @returns Reconciliation result for the bound object definition.
|
|
222
|
+
*/
|
|
223
|
+
reconcile(
|
|
224
|
+
options: ReconcileCustomObjectDefinitionOptions = {},
|
|
225
|
+
): Promise<ReconciledCustomObject<TDefinition>> {
|
|
226
|
+
return reconcileCustomObjectDefinition(this.client, this.definition, options);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/** Deletes the bound object definition by its compiled api name. */
|
|
230
|
+
delete(): Promise<void> {
|
|
231
|
+
return deleteCustomObjectDefinition(this.client, this.definition);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Root schema manager that binds typed category/object definitions to one SDK client.
|
|
237
|
+
*
|
|
238
|
+
* Use this when you want a lifecycle-oriented API for categories, object metadata,
|
|
239
|
+
* field metadata, and typed reconciliation without manually threading the same
|
|
240
|
+
* `RipplingSDK` client through every helper call.
|
|
241
|
+
*/
|
|
242
|
+
export class CustomObjectSchemaManager {
|
|
243
|
+
private readonly client: RipplingSDK;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Creates a new schema manager bound to one SDK client.
|
|
247
|
+
*
|
|
248
|
+
* @param client - SDK client used for all subsequent category and object lifecycle operations.
|
|
249
|
+
*/
|
|
250
|
+
constructor(client: RipplingSDK) {
|
|
251
|
+
this.client = client;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Returns a typed category manager bound to one category definition.
|
|
256
|
+
*
|
|
257
|
+
* @param definition - Typed category definition to bind.
|
|
258
|
+
* @returns Definition-bound category manager.
|
|
259
|
+
* @typeParam TName - Logical category name carried by the bound definition.
|
|
260
|
+
*/
|
|
261
|
+
forCategory<TName extends LogicalCategoryName>(
|
|
262
|
+
definition: CustomObjectCategoryDefinition<TName>,
|
|
263
|
+
): TypedCustomObjectCategoryManager<TName> {
|
|
264
|
+
return new TypedCustomObjectCategoryManager(this.client, definition);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Returns a typed schema manager bound to one object definition.
|
|
269
|
+
*
|
|
270
|
+
* @param definition - Typed object definition to bind.
|
|
271
|
+
* @returns Definition-bound schema manager.
|
|
272
|
+
* @typeParam TDefinition - Object definition bound to the manager.
|
|
273
|
+
*/
|
|
274
|
+
forObject<TDefinition extends AnyCustomObjectDefinition>(
|
|
275
|
+
definition: TDefinition,
|
|
276
|
+
): TypedCustomObjectSchemaManager<TDefinition> {
|
|
277
|
+
return new TypedCustomObjectSchemaManager(this.client, definition);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Short ergonomic alias for {@link forObject}.
|
|
282
|
+
*
|
|
283
|
+
* @param definition - Typed object definition to bind.
|
|
284
|
+
* @returns Definition-bound schema manager.
|
|
285
|
+
* @typeParam TDefinition - Object definition bound to the manager.
|
|
286
|
+
*/
|
|
287
|
+
for<TDefinition extends AnyCustomObjectDefinition>(
|
|
288
|
+
definition: TDefinition,
|
|
289
|
+
): TypedCustomObjectSchemaManager<TDefinition> {
|
|
290
|
+
return this.forObject(definition);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Provisions multiple typed category definitions through the REST SDK.
|
|
295
|
+
*
|
|
296
|
+
* @param definitions - Typed category definitions to provision.
|
|
297
|
+
* @param options - Provisioning behavior flags shared across the batch.
|
|
298
|
+
* @returns Provisioning results in input order.
|
|
299
|
+
*/
|
|
300
|
+
provisionCategories(
|
|
301
|
+
definitions: readonly CustomObjectCategoryDefinition[],
|
|
302
|
+
options: CustomObjectCategoryMutationOptions = {},
|
|
303
|
+
): Promise<readonly ProvisionedCustomObjectCategory[]> {
|
|
304
|
+
return provisionCustomObjectCategoryDefinitions(this.client, definitions, options);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Reconciles multiple typed category definitions against the backend.
|
|
309
|
+
*
|
|
310
|
+
* @param definitions - Typed category definitions to reconcile.
|
|
311
|
+
* @param options - Reconciliation behavior flags shared across the batch.
|
|
312
|
+
* @returns Reconciliation results in input order.
|
|
313
|
+
*/
|
|
314
|
+
reconcileCategories(
|
|
315
|
+
definitions: readonly CustomObjectCategoryDefinition[],
|
|
316
|
+
options: CustomObjectCategoryMutationOptions = {},
|
|
317
|
+
): Promise<readonly ReconciledCustomObjectCategory[]> {
|
|
318
|
+
return reconcileCustomObjectCategoryDefinitions(this.client, definitions, options);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Provisions multiple typed object definitions through the REST SDK.
|
|
323
|
+
*
|
|
324
|
+
* @param definitions - Typed object definitions to provision.
|
|
325
|
+
* @param options - Batch provisioning behavior flags.
|
|
326
|
+
* @returns Provisioning results in input order.
|
|
327
|
+
*/
|
|
328
|
+
provisionDefinitions(
|
|
329
|
+
definitions: readonly AnyCustomObjectDefinition[],
|
|
330
|
+
options: ProvisionCustomObjectsOptions = {},
|
|
331
|
+
): Promise<ReadonlyArray<ProvisionedCustomObject>> {
|
|
332
|
+
return provisionCustomObjectDefinitions(this.client, definitions, options);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Reconciles multiple typed object definitions against the backend.
|
|
337
|
+
*
|
|
338
|
+
* @param definitions - Typed object definitions to reconcile.
|
|
339
|
+
* @param options - Batch reconciliation behavior flags.
|
|
340
|
+
* @returns Reconciliation results in input order.
|
|
341
|
+
*/
|
|
342
|
+
reconcileDefinitions(
|
|
343
|
+
definitions: readonly AnyCustomObjectDefinition[],
|
|
344
|
+
options: ReconcileCustomObjectDefinitionsOptions = {},
|
|
345
|
+
): Promise<readonly ReconciledCustomObject[]> {
|
|
346
|
+
return reconcileCustomObjectDefinitions(this.client, definitions, options);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/** Short alias for teams that prefer concise schema-manager names. */
|
|
351
|
+
export class COSchemaManager extends CustomObjectSchemaManager {}
|