@nohead/sdk 0.2.0 → 0.4.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/CHANGELOG.md +130 -1
- package/README.md +82 -32
- package/dist/client.d.ts +4 -1
- package/dist/client.js +14 -1
- package/dist/core.d.ts +33 -9
- package/dist/core.js +29 -7
- package/dist/errors.d.ts +5 -2
- package/dist/errors.js +25 -11
- package/dist/generated/operations.gen.d.ts +165 -13
- package/dist/generated/operations.gen.js +27 -8
- package/dist/generated/schemas.gen.d.ts +1 -1
- package/dist/generated/types.gen.d.ts +2904 -3037
- package/dist/index.d.ts +2 -2
- package/dist/resources/assets.d.ts +25 -6
- package/dist/resources/assets.js +34 -8
- package/dist/resources/drafts.d.ts +41 -0
- package/dist/resources/drafts.js +63 -0
- package/dist/resources/other.d.ts +6 -1
- package/dist/resources/other.js +16 -2
- package/dist/resources/records.d.ts +46 -17
- package/dist/resources/records.js +40 -3
- package/dist/resources/resource.d.ts +5 -0
- package/dist/resources/resource.js +14 -0
- package/dist/resources/schema.d.ts +27 -20
- package/dist/resources/schema.js +24 -10
- package/dist/resources/webhooks.d.ts +20 -6
- package/dist/resources/webhooks.js +25 -5
- package/dist/types.d.ts +99 -12
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/webhooks.d.ts +37 -17
- package/package.json +2 -1
package/dist/errors.js
CHANGED
|
@@ -7,7 +7,10 @@ export class APIError extends NoheadError {
|
|
|
7
7
|
name = "APIError";
|
|
8
8
|
/** The HTTP status. */
|
|
9
9
|
status;
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* The error `type`, e.g. `validation_error`; undefined if the body had
|
|
12
|
+
* none. A type newer than this SDK is kept as its string.
|
|
13
|
+
*/
|
|
11
14
|
type;
|
|
12
15
|
/** The request's ID (`req_…`), for support requests and logs. */
|
|
13
16
|
requestId;
|
|
@@ -97,7 +100,10 @@ export class UploadError extends NoheadError {
|
|
|
97
100
|
export class WebhookVerificationError extends NoheadError {
|
|
98
101
|
name = "WebhookVerificationError";
|
|
99
102
|
}
|
|
100
|
-
|
|
103
|
+
// By error `type`, one class for each the SDK knows. A Map, so a lookup finds
|
|
104
|
+
// only these: a plain object would also find Object.prototype's
|
|
105
|
+
// (`constructor`, `toString`).
|
|
106
|
+
const CLASSES = new Map(Object.entries({
|
|
101
107
|
invalid_request: InvalidRequestError,
|
|
102
108
|
authentication_error: AuthenticationError,
|
|
103
109
|
plan_limit_exceeded: PlanLimitExceededError,
|
|
@@ -109,11 +115,11 @@ const CLASSES = {
|
|
|
109
115
|
rate_limited: RateLimitError,
|
|
110
116
|
internal_error: InternalServerError,
|
|
111
117
|
service_unavailable: ServiceUnavailableError,
|
|
112
|
-
};
|
|
118
|
+
}));
|
|
113
119
|
/** The error for a response, by its `type`, or by status when it has none. */
|
|
114
120
|
export function apiError(status, body, headers) {
|
|
115
121
|
const type = errorEnvelope(body)?.type;
|
|
116
|
-
const Class = (type && CLASSES
|
|
122
|
+
const Class = (type && CLASSES.get(type)) ||
|
|
117
123
|
(status === 503
|
|
118
124
|
? ServiceUnavailableError
|
|
119
125
|
: status >= 500
|
|
@@ -133,12 +139,20 @@ export function retryAfterSeconds(headers) {
|
|
|
133
139
|
? undefined
|
|
134
140
|
: Math.max(0, (date - Date.now()) / 1000);
|
|
135
141
|
}
|
|
142
|
+
// The error envelope's fields that have the right type: a proxy or gateway
|
|
143
|
+
// in front of the API may answer with any JSON.
|
|
136
144
|
function errorEnvelope(body) {
|
|
137
|
-
if (
|
|
145
|
+
if (!isObject(body) || !isObject(body.error))
|
|
138
146
|
return undefined;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
?
|
|
143
|
-
: undefined
|
|
144
|
-
|
|
147
|
+
const { type, message, request_id, details } = body.error;
|
|
148
|
+
return {
|
|
149
|
+
type: typeof type === "string" ? type : undefined,
|
|
150
|
+
message: typeof message === "string" ? message : undefined,
|
|
151
|
+
request_id: typeof request_id === "string" ? request_id : undefined,
|
|
152
|
+
// Only objects: currentRevision reads each detail's fields.
|
|
153
|
+
details: Array.isArray(details)
|
|
154
|
+
? details.filter(isObject)
|
|
155
|
+
: undefined,
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
const isObject = (value) => typeof value === "object" && value !== null;
|
|
@@ -24,15 +24,23 @@ export declare const OPERATIONS: {
|
|
|
24
24
|
readonly method: "GET";
|
|
25
25
|
readonly path: "/v1/projects/{project_id}/assets";
|
|
26
26
|
};
|
|
27
|
+
readonly assets_purge: {
|
|
28
|
+
readonly method: "POST";
|
|
29
|
+
readonly path: "/v1/assets/{asset_id}/purge";
|
|
30
|
+
};
|
|
27
31
|
readonly assets_restore: {
|
|
28
32
|
readonly method: "POST";
|
|
29
33
|
readonly path: "/v1/assets/{asset_id}/restore";
|
|
30
34
|
};
|
|
31
35
|
readonly assets_upload: {
|
|
32
36
|
readonly method: "POST";
|
|
33
|
-
readonly path: "/v1/projects/{project_id}/assets
|
|
37
|
+
readonly path: "/v1/projects/{project_id}/assets";
|
|
38
|
+
};
|
|
39
|
+
readonly assets_usage: {
|
|
40
|
+
readonly method: "GET";
|
|
41
|
+
readonly path: "/v1/assets/{asset_id}/usage";
|
|
34
42
|
};
|
|
35
|
-
readonly
|
|
43
|
+
readonly audit_events_list: {
|
|
36
44
|
readonly method: "GET";
|
|
37
45
|
readonly path: "/v1/projects/{project_id}/audit-events";
|
|
38
46
|
};
|
|
@@ -68,6 +76,38 @@ export declare const OPERATIONS: {
|
|
|
68
76
|
readonly method: "PATCH";
|
|
69
77
|
readonly path: "/v1/collections/{collection_id}";
|
|
70
78
|
};
|
|
79
|
+
readonly drafts_create: {
|
|
80
|
+
readonly method: "POST";
|
|
81
|
+
readonly path: "/v1/records/{record_id}/drafts";
|
|
82
|
+
};
|
|
83
|
+
readonly drafts_discard: {
|
|
84
|
+
readonly method: "DELETE";
|
|
85
|
+
readonly path: "/v1/drafts/{draft_id}";
|
|
86
|
+
};
|
|
87
|
+
readonly drafts_get: {
|
|
88
|
+
readonly method: "GET";
|
|
89
|
+
readonly path: "/v1/drafts/{draft_id}";
|
|
90
|
+
};
|
|
91
|
+
readonly drafts_list: {
|
|
92
|
+
readonly method: "GET";
|
|
93
|
+
readonly path: "/v1/collections/{collection_id}/drafts";
|
|
94
|
+
};
|
|
95
|
+
readonly drafts_merge: {
|
|
96
|
+
readonly method: "POST";
|
|
97
|
+
readonly path: "/v1/drafts/{draft_id}/merge";
|
|
98
|
+
};
|
|
99
|
+
readonly drafts_schedule: {
|
|
100
|
+
readonly method: "PUT";
|
|
101
|
+
readonly path: "/v1/drafts/{draft_id}/schedule";
|
|
102
|
+
};
|
|
103
|
+
readonly drafts_unschedule: {
|
|
104
|
+
readonly method: "DELETE";
|
|
105
|
+
readonly path: "/v1/drafts/{draft_id}/schedule";
|
|
106
|
+
};
|
|
107
|
+
readonly drafts_update: {
|
|
108
|
+
readonly method: "PATCH";
|
|
109
|
+
readonly path: "/v1/drafts/{draft_id}";
|
|
110
|
+
};
|
|
71
111
|
readonly feature_flags_list: {
|
|
72
112
|
readonly method: "GET";
|
|
73
113
|
readonly path: "/v1/feature-flags";
|
|
@@ -80,6 +120,14 @@ export declare const OPERATIONS: {
|
|
|
80
120
|
readonly method: "DELETE";
|
|
81
121
|
readonly path: "/v1/fields/{field_id}";
|
|
82
122
|
};
|
|
123
|
+
readonly fields_get: {
|
|
124
|
+
readonly method: "GET";
|
|
125
|
+
readonly path: "/v1/fields/{field_id}";
|
|
126
|
+
};
|
|
127
|
+
readonly fields_get_order: {
|
|
128
|
+
readonly method: "GET";
|
|
129
|
+
readonly path: "/v1/collections/{collection_id}/field-order";
|
|
130
|
+
};
|
|
83
131
|
readonly fields_list: {
|
|
84
132
|
readonly method: "GET";
|
|
85
133
|
readonly path: "/v1/collections/{collection_id}/fields";
|
|
@@ -93,8 +141,8 @@ export declare const OPERATIONS: {
|
|
|
93
141
|
readonly path: "/v1/fields/{field_id}/aliases/{alias}";
|
|
94
142
|
};
|
|
95
143
|
readonly fields_reorder: {
|
|
96
|
-
readonly method: "
|
|
97
|
-
readonly path: "/v1/collections/{collection_id}/
|
|
144
|
+
readonly method: "PUT";
|
|
145
|
+
readonly path: "/v1/collections/{collection_id}/field-order";
|
|
98
146
|
};
|
|
99
147
|
readonly fields_restore: {
|
|
100
148
|
readonly method: "POST";
|
|
@@ -128,6 +176,10 @@ export declare const OPERATIONS: {
|
|
|
128
176
|
readonly method: "GET";
|
|
129
177
|
readonly path: "/v1/projects/{project_id}/search";
|
|
130
178
|
};
|
|
179
|
+
readonly record_drafts_list: {
|
|
180
|
+
readonly method: "GET";
|
|
181
|
+
readonly path: "/v1/records/{record_id}/drafts";
|
|
182
|
+
};
|
|
131
183
|
readonly record_revisions_get: {
|
|
132
184
|
readonly method: "GET";
|
|
133
185
|
readonly path: "/v1/records/{record_id}/revisions/{revision}";
|
|
@@ -142,7 +194,7 @@ export declare const OPERATIONS: {
|
|
|
142
194
|
};
|
|
143
195
|
readonly records_bulk: {
|
|
144
196
|
readonly method: "POST";
|
|
145
|
-
readonly path: "/v1/collections/{collection_id}/
|
|
197
|
+
readonly path: "/v1/collections/{collection_id}/record-batches";
|
|
146
198
|
};
|
|
147
199
|
readonly records_count: {
|
|
148
200
|
readonly method: "GET";
|
|
@@ -164,13 +216,21 @@ export declare const OPERATIONS: {
|
|
|
164
216
|
readonly method: "GET";
|
|
165
217
|
readonly path: "/v1/records/{record_id}";
|
|
166
218
|
};
|
|
219
|
+
readonly records_get_publication: {
|
|
220
|
+
readonly method: "GET";
|
|
221
|
+
readonly path: "/v1/records/{record_id}/publication";
|
|
222
|
+
};
|
|
223
|
+
readonly records_get_schedule: {
|
|
224
|
+
readonly method: "GET";
|
|
225
|
+
readonly path: "/v1/records/{record_id}/schedule";
|
|
226
|
+
};
|
|
167
227
|
readonly records_list: {
|
|
168
228
|
readonly method: "GET";
|
|
169
229
|
readonly path: "/v1/collections/{collection_id}/records";
|
|
170
230
|
};
|
|
171
231
|
readonly records_publish: {
|
|
172
232
|
readonly method: "POST";
|
|
173
|
-
readonly path: "/v1/records/{record_id}/
|
|
233
|
+
readonly path: "/v1/records/{record_id}/publication";
|
|
174
234
|
};
|
|
175
235
|
readonly records_restore: {
|
|
176
236
|
readonly method: "POST";
|
|
@@ -181,8 +241,8 @@ export declare const OPERATIONS: {
|
|
|
181
241
|
readonly path: "/v1/records/{record_id}/schedule";
|
|
182
242
|
};
|
|
183
243
|
readonly records_unpublish: {
|
|
184
|
-
readonly method: "
|
|
185
|
-
readonly path: "/v1/records/{record_id}/
|
|
244
|
+
readonly method: "DELETE";
|
|
245
|
+
readonly path: "/v1/records/{record_id}/publication";
|
|
186
246
|
};
|
|
187
247
|
readonly records_unschedule: {
|
|
188
248
|
readonly method: "DELETE";
|
|
@@ -192,9 +252,13 @@ export declare const OPERATIONS: {
|
|
|
192
252
|
readonly method: "PATCH";
|
|
193
253
|
readonly path: "/v1/records/{record_id}";
|
|
194
254
|
};
|
|
255
|
+
readonly scheduled_changes_list: {
|
|
256
|
+
readonly method: "GET";
|
|
257
|
+
readonly path: "/v1/collections/{collection_id}/scheduled-changes";
|
|
258
|
+
};
|
|
195
259
|
readonly schema_changes_get: {
|
|
196
260
|
readonly method: "GET";
|
|
197
|
-
readonly path: "/v1/
|
|
261
|
+
readonly path: "/v1/schema-changes/{schema_change_id}";
|
|
198
262
|
};
|
|
199
263
|
readonly schema_changes_list: {
|
|
200
264
|
readonly method: "GET";
|
|
@@ -220,6 +284,14 @@ export declare const OPERATIONS: {
|
|
|
220
284
|
readonly method: "POST";
|
|
221
285
|
readonly path: "/v1/webhook-deliveries/{delivery_id}/retry";
|
|
222
286
|
};
|
|
287
|
+
readonly webhook_secrets_list: {
|
|
288
|
+
readonly method: "GET";
|
|
289
|
+
readonly path: "/v1/webhooks/{webhook_id}/secrets";
|
|
290
|
+
};
|
|
291
|
+
readonly webhook_secrets_retire: {
|
|
292
|
+
readonly method: "DELETE";
|
|
293
|
+
readonly path: "/v1/webhook-secrets/{secret_id}";
|
|
294
|
+
};
|
|
223
295
|
readonly webhooks_create: {
|
|
224
296
|
readonly method: "POST";
|
|
225
297
|
readonly path: "/v1/projects/{project_id}/webhooks";
|
|
@@ -236,9 +308,13 @@ export declare const OPERATIONS: {
|
|
|
236
308
|
readonly method: "GET";
|
|
237
309
|
readonly path: "/v1/projects/{project_id}/webhooks";
|
|
238
310
|
};
|
|
311
|
+
readonly webhooks_restore: {
|
|
312
|
+
readonly method: "POST";
|
|
313
|
+
readonly path: "/v1/webhooks/{webhook_id}/restore";
|
|
314
|
+
};
|
|
239
315
|
readonly webhooks_rotate_secret: {
|
|
240
316
|
readonly method: "POST";
|
|
241
|
-
readonly path: "/v1/webhooks/{webhook_id}/
|
|
317
|
+
readonly path: "/v1/webhooks/{webhook_id}/secrets";
|
|
242
318
|
};
|
|
243
319
|
readonly webhooks_test: {
|
|
244
320
|
readonly method: "POST";
|
|
@@ -275,6 +351,10 @@ export interface Operations {
|
|
|
275
351
|
data: T.AssetsListData;
|
|
276
352
|
response: T.AssetsListResponse;
|
|
277
353
|
};
|
|
354
|
+
assets_purge: {
|
|
355
|
+
data: T.AssetsPurgeData;
|
|
356
|
+
response: T.AssetsPurgeResponse;
|
|
357
|
+
};
|
|
278
358
|
assets_restore: {
|
|
279
359
|
data: T.AssetsRestoreData;
|
|
280
360
|
response: T.AssetsRestoreResponse;
|
|
@@ -283,9 +363,13 @@ export interface Operations {
|
|
|
283
363
|
data: T.AssetsUploadData;
|
|
284
364
|
response: T.AssetsUploadResponse;
|
|
285
365
|
};
|
|
286
|
-
|
|
287
|
-
data: T.
|
|
288
|
-
response: T.
|
|
366
|
+
assets_usage: {
|
|
367
|
+
data: T.AssetsUsageData;
|
|
368
|
+
response: T.AssetsUsageResponse;
|
|
369
|
+
};
|
|
370
|
+
audit_events_list: {
|
|
371
|
+
data: T.AuditEventsListData;
|
|
372
|
+
response: T.AuditEventsListResponse;
|
|
289
373
|
};
|
|
290
374
|
collections_create: {
|
|
291
375
|
data: T.CollectionsCreateData;
|
|
@@ -319,6 +403,38 @@ export interface Operations {
|
|
|
319
403
|
data: T.CollectionsUpdateData;
|
|
320
404
|
response: T.CollectionsUpdateResponse;
|
|
321
405
|
};
|
|
406
|
+
drafts_create: {
|
|
407
|
+
data: T.DraftsCreateData;
|
|
408
|
+
response: T.DraftsCreateResponse;
|
|
409
|
+
};
|
|
410
|
+
drafts_discard: {
|
|
411
|
+
data: T.DraftsDiscardData;
|
|
412
|
+
response: T.DraftsDiscardResponse;
|
|
413
|
+
};
|
|
414
|
+
drafts_get: {
|
|
415
|
+
data: T.DraftsGetData;
|
|
416
|
+
response: T.DraftsGetResponse;
|
|
417
|
+
};
|
|
418
|
+
drafts_list: {
|
|
419
|
+
data: T.DraftsListData;
|
|
420
|
+
response: T.DraftsListResponse;
|
|
421
|
+
};
|
|
422
|
+
drafts_merge: {
|
|
423
|
+
data: T.DraftsMergeData;
|
|
424
|
+
response: T.DraftsMergeResponse;
|
|
425
|
+
};
|
|
426
|
+
drafts_schedule: {
|
|
427
|
+
data: T.DraftsScheduleData;
|
|
428
|
+
response: T.DraftsScheduleResponse;
|
|
429
|
+
};
|
|
430
|
+
drafts_unschedule: {
|
|
431
|
+
data: T.DraftsUnscheduleData;
|
|
432
|
+
response: T.DraftsUnscheduleResponse;
|
|
433
|
+
};
|
|
434
|
+
drafts_update: {
|
|
435
|
+
data: T.DraftsUpdateData;
|
|
436
|
+
response: T.DraftsUpdateResponse;
|
|
437
|
+
};
|
|
322
438
|
feature_flags_list: {
|
|
323
439
|
data: T.FeatureFlagsListData;
|
|
324
440
|
response: T.FeatureFlagsListResponse;
|
|
@@ -331,6 +447,14 @@ export interface Operations {
|
|
|
331
447
|
data: T.FieldsDeleteData;
|
|
332
448
|
response: T.FieldsDeleteResponse;
|
|
333
449
|
};
|
|
450
|
+
fields_get: {
|
|
451
|
+
data: T.FieldsGetData;
|
|
452
|
+
response: T.FieldsGetResponse;
|
|
453
|
+
};
|
|
454
|
+
fields_get_order: {
|
|
455
|
+
data: T.FieldsGetOrderData;
|
|
456
|
+
response: T.FieldsGetOrderResponse;
|
|
457
|
+
};
|
|
334
458
|
fields_list: {
|
|
335
459
|
data: T.FieldsListData;
|
|
336
460
|
response: T.FieldsListResponse;
|
|
@@ -379,6 +503,10 @@ export interface Operations {
|
|
|
379
503
|
data: T.ProjectsSearchData;
|
|
380
504
|
response: T.ProjectsSearchResponse;
|
|
381
505
|
};
|
|
506
|
+
record_drafts_list: {
|
|
507
|
+
data: T.RecordDraftsListData;
|
|
508
|
+
response: T.RecordDraftsListResponse;
|
|
509
|
+
};
|
|
382
510
|
record_revisions_get: {
|
|
383
511
|
data: T.RecordRevisionsGetData;
|
|
384
512
|
response: T.RecordRevisionsGetResponse;
|
|
@@ -415,6 +543,14 @@ export interface Operations {
|
|
|
415
543
|
data: T.RecordsGetData;
|
|
416
544
|
response: T.RecordsGetResponse;
|
|
417
545
|
};
|
|
546
|
+
records_get_publication: {
|
|
547
|
+
data: T.RecordsGetPublicationData;
|
|
548
|
+
response: T.RecordsGetPublicationResponse;
|
|
549
|
+
};
|
|
550
|
+
records_get_schedule: {
|
|
551
|
+
data: T.RecordsGetScheduleData;
|
|
552
|
+
response: T.RecordsGetScheduleResponse;
|
|
553
|
+
};
|
|
418
554
|
records_list: {
|
|
419
555
|
data: T.RecordsListData;
|
|
420
556
|
response: T.RecordsListResponse;
|
|
@@ -443,6 +579,10 @@ export interface Operations {
|
|
|
443
579
|
data: T.RecordsUpdateData;
|
|
444
580
|
response: T.RecordsUpdateResponse;
|
|
445
581
|
};
|
|
582
|
+
scheduled_changes_list: {
|
|
583
|
+
data: T.ScheduledChangesListData;
|
|
584
|
+
response: T.ScheduledChangesListResponse;
|
|
585
|
+
};
|
|
446
586
|
schema_changes_get: {
|
|
447
587
|
data: T.SchemaChangesGetData;
|
|
448
588
|
response: T.SchemaChangesGetResponse;
|
|
@@ -471,6 +611,14 @@ export interface Operations {
|
|
|
471
611
|
data: T.WebhookDeliveriesRetryData;
|
|
472
612
|
response: T.WebhookDeliveriesRetryResponse;
|
|
473
613
|
};
|
|
614
|
+
webhook_secrets_list: {
|
|
615
|
+
data: T.WebhookSecretsListData;
|
|
616
|
+
response: T.WebhookSecretsListResponse;
|
|
617
|
+
};
|
|
618
|
+
webhook_secrets_retire: {
|
|
619
|
+
data: T.WebhookSecretsRetireData;
|
|
620
|
+
response: T.WebhookSecretsRetireResponse;
|
|
621
|
+
};
|
|
474
622
|
webhooks_create: {
|
|
475
623
|
data: T.WebhooksCreateData;
|
|
476
624
|
response: T.WebhooksCreateResponse;
|
|
@@ -487,6 +635,10 @@ export interface Operations {
|
|
|
487
635
|
data: T.WebhooksListData;
|
|
488
636
|
response: T.WebhooksListResponse;
|
|
489
637
|
};
|
|
638
|
+
webhooks_restore: {
|
|
639
|
+
data: T.WebhooksRestoreData;
|
|
640
|
+
response: T.WebhooksRestoreResponse;
|
|
641
|
+
};
|
|
490
642
|
webhooks_rotate_secret: {
|
|
491
643
|
data: T.WebhooksRotateSecretData;
|
|
492
644
|
response: T.WebhooksRotateSecretResponse;
|
|
@@ -5,9 +5,11 @@ export const OPERATIONS = {
|
|
|
5
5
|
assets_get: { method: "GET", path: "/v1/assets/{asset_id}" },
|
|
6
6
|
assets_image_url: { method: "GET", path: "/v1/assets/{asset_id}/image-url" },
|
|
7
7
|
assets_list: { method: "GET", path: "/v1/projects/{project_id}/assets" },
|
|
8
|
+
assets_purge: { method: "POST", path: "/v1/assets/{asset_id}/purge" },
|
|
8
9
|
assets_restore: { method: "POST", path: "/v1/assets/{asset_id}/restore" },
|
|
9
|
-
assets_upload: { method: "POST", path: "/v1/projects/{project_id}/assets
|
|
10
|
-
|
|
10
|
+
assets_upload: { method: "POST", path: "/v1/projects/{project_id}/assets" },
|
|
11
|
+
assets_usage: { method: "GET", path: "/v1/assets/{asset_id}/usage" },
|
|
12
|
+
audit_events_list: { method: "GET", path: "/v1/projects/{project_id}/audit-events" },
|
|
11
13
|
collections_create: { method: "POST", path: "/v1/projects/{project_id}/collections" },
|
|
12
14
|
collections_delete: { method: "DELETE", path: "/v1/collections/{collection_id}" },
|
|
13
15
|
collections_get: { method: "GET", path: "/v1/collections/{collection_id}" },
|
|
@@ -16,13 +18,23 @@ export const OPERATIONS = {
|
|
|
16
18
|
collections_restore: { method: "POST", path: "/v1/collections/{collection_id}/restore" },
|
|
17
19
|
collections_search: { method: "GET", path: "/v1/collections/{collection_id}/search" },
|
|
18
20
|
collections_update: { method: "PATCH", path: "/v1/collections/{collection_id}" },
|
|
21
|
+
drafts_create: { method: "POST", path: "/v1/records/{record_id}/drafts" },
|
|
22
|
+
drafts_discard: { method: "DELETE", path: "/v1/drafts/{draft_id}" },
|
|
23
|
+
drafts_get: { method: "GET", path: "/v1/drafts/{draft_id}" },
|
|
24
|
+
drafts_list: { method: "GET", path: "/v1/collections/{collection_id}/drafts" },
|
|
25
|
+
drafts_merge: { method: "POST", path: "/v1/drafts/{draft_id}/merge" },
|
|
26
|
+
drafts_schedule: { method: "PUT", path: "/v1/drafts/{draft_id}/schedule" },
|
|
27
|
+
drafts_unschedule: { method: "DELETE", path: "/v1/drafts/{draft_id}/schedule" },
|
|
28
|
+
drafts_update: { method: "PATCH", path: "/v1/drafts/{draft_id}" },
|
|
19
29
|
feature_flags_list: { method: "GET", path: "/v1/feature-flags" },
|
|
20
30
|
fields_create: { method: "POST", path: "/v1/collections/{collection_id}/fields" },
|
|
21
31
|
fields_delete: { method: "DELETE", path: "/v1/fields/{field_id}" },
|
|
32
|
+
fields_get: { method: "GET", path: "/v1/fields/{field_id}" },
|
|
33
|
+
fields_get_order: { method: "GET", path: "/v1/collections/{collection_id}/field-order" },
|
|
22
34
|
fields_list: { method: "GET", path: "/v1/collections/{collection_id}/fields" },
|
|
23
35
|
fields_migrate: { method: "POST", path: "/v1/fields/{field_id}/migrations" },
|
|
24
36
|
fields_remove_alias: { method: "DELETE", path: "/v1/fields/{field_id}/aliases/{alias}" },
|
|
25
|
-
fields_reorder: { method: "
|
|
37
|
+
fields_reorder: { method: "PUT", path: "/v1/collections/{collection_id}/field-order" },
|
|
26
38
|
fields_restore: { method: "POST", path: "/v1/fields/{field_id}/restore" },
|
|
27
39
|
fields_update: { method: "PATCH", path: "/v1/fields/{field_id}" },
|
|
28
40
|
health_check: { method: "GET", path: "/v1/health" },
|
|
@@ -31,34 +43,41 @@ export const OPERATIONS = {
|
|
|
31
43
|
migrations_get: { method: "GET", path: "/v1/migrations/{migration_id}" },
|
|
32
44
|
migrations_list: { method: "GET", path: "/v1/collections/{collection_id}/migrations" },
|
|
33
45
|
projects_search: { method: "GET", path: "/v1/projects/{project_id}/search" },
|
|
46
|
+
record_drafts_list: { method: "GET", path: "/v1/records/{record_id}/drafts" },
|
|
34
47
|
record_revisions_get: { method: "GET", path: "/v1/records/{record_id}/revisions/{revision}" },
|
|
35
48
|
record_revisions_list: { method: "GET", path: "/v1/records/{record_id}/revisions" },
|
|
36
49
|
record_revisions_revert: { method: "POST", path: "/v1/records/{record_id}/revisions/{revision}/revert" },
|
|
37
|
-
records_bulk: { method: "POST", path: "/v1/collections/{collection_id}/
|
|
50
|
+
records_bulk: { method: "POST", path: "/v1/collections/{collection_id}/record-batches" },
|
|
38
51
|
records_count: { method: "GET", path: "/v1/collections/{collection_id}/records/count" },
|
|
39
52
|
records_create: { method: "POST", path: "/v1/collections/{collection_id}/records" },
|
|
40
53
|
records_delete: { method: "DELETE", path: "/v1/records/{record_id}" },
|
|
41
54
|
records_diff: { method: "GET", path: "/v1/records/{record_id}/diff" },
|
|
42
55
|
records_get: { method: "GET", path: "/v1/records/{record_id}" },
|
|
56
|
+
records_get_publication: { method: "GET", path: "/v1/records/{record_id}/publication" },
|
|
57
|
+
records_get_schedule: { method: "GET", path: "/v1/records/{record_id}/schedule" },
|
|
43
58
|
records_list: { method: "GET", path: "/v1/collections/{collection_id}/records" },
|
|
44
|
-
records_publish: { method: "POST", path: "/v1/records/{record_id}/
|
|
59
|
+
records_publish: { method: "POST", path: "/v1/records/{record_id}/publication" },
|
|
45
60
|
records_restore: { method: "POST", path: "/v1/records/{record_id}/restore" },
|
|
46
61
|
records_schedule: { method: "PUT", path: "/v1/records/{record_id}/schedule" },
|
|
47
|
-
records_unpublish: { method: "
|
|
62
|
+
records_unpublish: { method: "DELETE", path: "/v1/records/{record_id}/publication" },
|
|
48
63
|
records_unschedule: { method: "DELETE", path: "/v1/records/{record_id}/schedule" },
|
|
49
64
|
records_update: { method: "PATCH", path: "/v1/records/{record_id}" },
|
|
50
|
-
|
|
65
|
+
scheduled_changes_list: { method: "GET", path: "/v1/collections/{collection_id}/scheduled-changes" },
|
|
66
|
+
schema_changes_get: { method: "GET", path: "/v1/schema-changes/{schema_change_id}" },
|
|
51
67
|
schema_changes_list: { method: "GET", path: "/v1/collections/{collection_id}/schema-changes" },
|
|
52
68
|
search_index_get: { method: "GET", path: "/v1/collections/{collection_id}/search-index" },
|
|
53
69
|
search_index_rebuild: { method: "POST", path: "/v1/collections/{collection_id}/search-index/rebuild" },
|
|
54
70
|
webhook_deliveries_get: { method: "GET", path: "/v1/webhook-deliveries/{delivery_id}" },
|
|
55
71
|
webhook_deliveries_list: { method: "GET", path: "/v1/webhooks/{webhook_id}/deliveries" },
|
|
56
72
|
webhook_deliveries_retry: { method: "POST", path: "/v1/webhook-deliveries/{delivery_id}/retry" },
|
|
73
|
+
webhook_secrets_list: { method: "GET", path: "/v1/webhooks/{webhook_id}/secrets" },
|
|
74
|
+
webhook_secrets_retire: { method: "DELETE", path: "/v1/webhook-secrets/{secret_id}" },
|
|
57
75
|
webhooks_create: { method: "POST", path: "/v1/projects/{project_id}/webhooks" },
|
|
58
76
|
webhooks_delete: { method: "DELETE", path: "/v1/webhooks/{webhook_id}" },
|
|
59
77
|
webhooks_get: { method: "GET", path: "/v1/webhooks/{webhook_id}" },
|
|
60
78
|
webhooks_list: { method: "GET", path: "/v1/projects/{project_id}/webhooks" },
|
|
61
|
-
|
|
79
|
+
webhooks_restore: { method: "POST", path: "/v1/webhooks/{webhook_id}/restore" },
|
|
80
|
+
webhooks_rotate_secret: { method: "POST", path: "/v1/webhooks/{webhook_id}/secrets" },
|
|
62
81
|
webhooks_test: { method: "POST", path: "/v1/webhooks/{webhook_id}/test" },
|
|
63
82
|
webhooks_update: { method: "PATCH", path: "/v1/webhooks/{webhook_id}" },
|
|
64
83
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type {
|
|
1
|
+
export type { Actor, ApiKeyScope, Asset, AssetEventData, AssetField, AssetFieldConfiguration, AssetFieldCreate, AssetList, AssetProperties, AssetUploadCreate, AssetUploadTarget, AssetUsage, AssetWithUpload, AuditEvent, AuditEventList, BooleanField, BooleanFieldConfiguration, BooleanFieldCreate, Change, Collection, CollectionCreate, CollectionList, CollectionUpdate, DateField, DateFieldConfiguration, DateFieldCreate, DecimalField, DecimalFieldConfiguration, DecimalFieldCreate, DownloadUrl, Draft, DraftCreate, DraftEventData, DraftList, DraftSchedule, DraftScheduleUpdate, EnumField, EnumFieldConfiguration, EnumFieldCreate, Error, ErrorDetail, ErrorType, FeatureFlags, Field, FieldAliasEventData, FieldConfiguration, FieldCreate, FieldCreateProperties, FieldDefinition, FieldList, FieldMigration, FieldMigrationCounts, FieldMigrationList, FieldMigrationPreview, FieldMigrationRequest, FieldOrder, FieldProperties, FieldType, FieldUpdate, Health, ImageUrl, IntegerField, IntegerFieldConfiguration, IntegerFieldCreate, JsonField, JsonFieldConfiguration, JsonFieldCreate, ListMeta, LongTextField, LongTextFieldConfiguration, LongTextFieldCreate, MergedDraft, NullableTimestamp, Principal, PublishedOnly, RecordBatch, RecordBatchRequest, RecordCount, RecordData, RecordDiff, RecordEventData, RecordFilterValue, RecordList, RecordPublication, RecordRevision, RecordRevisionDetail, RecordRevisionList, RecordRevisionOperation, RecordRevisionProperties, RecordSchedule, RecordScheduleUpdate, RecordWrite, RelationField, RelationFieldConfiguration, RelationFieldCreate, RequestId, RevertPreview, RichTextField, RichTextFieldConfiguration, RichTextFieldCreate, ScheduledChange, ScheduledChangeList, Schema, SchemaChange, SchemaChangeDetail, SchemaChangeList, SchemaChangeProperties, SchemaDefinition, SchemaEventData, SearchIndex, SearchResults, TextField, TextFieldConfiguration, TextFieldCreate, TimeFilter, Timestamp, Via, Webhook, WebhookCreate, WebhookDelivery, WebhookDeliveryDetail, WebhookDeliveryList, WebhookDeliveryProperties, WebhookEventPayload, WebhookEventType, WebhookList, WebhookProperties, WebhookSecret, WebhookSecretList, WebhookSecretProperties, WebhookSecretWithValue, WebhookSubscription, WebhookTestEventData, WebhookUpdate, WebhookWithSecret, } from "./types.gen.ts";
|