@archildata/api-types 0.0.53 → 0.0.54

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.
Files changed (2) hide show
  1. package/index.d.ts +269 -0
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -236,6 +236,57 @@ export interface paths {
236
236
  patch?: never;
237
237
  trace?: never;
238
238
  };
239
+ "/api/disks/{id}/branches": {
240
+ parameters: {
241
+ query?: never;
242
+ header?: never;
243
+ path?: never;
244
+ cookie?: never;
245
+ };
246
+ /**
247
+ * List disk branches
248
+ * @description List every branch of the disk, including branches created from other
249
+ * branches, in no particular order.
250
+ */
251
+ get: operations["listBranches"];
252
+ put?: never;
253
+ /**
254
+ * Create a writable branch from a checkpoint
255
+ * @description Create a branch: an independent, writable fork of the disk that starts
256
+ * from a committed checkpoint. The checkpoint is looked up on the root
257
+ * disk, or on `from_branch` when supplied. Writes on the branch don't
258
+ * affect its source.
259
+ *
260
+ * Branch names are unique across the disk, including branches created
261
+ * from other branches. Creating a branch with a name that already exists
262
+ * returns 409, unless the request carries the `Idempotency-Key` that
263
+ * created it, in which case the existing branch is returned with 201. To
264
+ * retry safely, send the same `Idempotency-Key` and request body.
265
+ */
266
+ post: operations["createBranch"];
267
+ delete?: never;
268
+ options?: never;
269
+ head?: never;
270
+ patch?: never;
271
+ trace?: never;
272
+ };
273
+ "/api/disks/{id}/branches/{name}": {
274
+ parameters: {
275
+ query?: never;
276
+ header?: never;
277
+ path?: never;
278
+ cookie?: never;
279
+ };
280
+ /** Get a disk branch */
281
+ get: operations["getBranch"];
282
+ put?: never;
283
+ post?: never;
284
+ delete?: never;
285
+ options?: never;
286
+ head?: never;
287
+ patch?: never;
288
+ trace?: never;
289
+ };
239
290
  "/api/disks/{id}/users": {
240
291
  parameters: {
241
292
  query?: never;
@@ -909,6 +960,41 @@ export interface paths {
909
960
  export type webhooks = Record<string, never>;
910
961
  export interface components {
911
962
  schemas: {
963
+ /** @description 1-100 letters, digits, hyphens, or underscores. Unique across the disk. */
964
+ BranchName: string;
965
+ CreateBranchRequest: {
966
+ branch_name: components["schemas"]["BranchName"];
967
+ /** @description Name of a committed checkpoint on the source, which is the root disk or `from_branch` when set. */
968
+ from_checkpoint_name: string;
969
+ /** @description Name of the branch the checkpoint was taken on. Omit or leave empty to use the root disk. */
970
+ from_branch?: string;
971
+ };
972
+ BranchResponse: {
973
+ /** @description ID of the disk the branch belongs to. */
974
+ root_filesystem_id: string;
975
+ branch_name: components["schemas"]["BranchName"];
976
+ /** @description ID of the branch's own writable filesystem. */
977
+ filesystem_id: string;
978
+ /** @description Name of the checkpoint the branch started from. */
979
+ from_checkpoint_name: string;
980
+ /** @description ID of the filesystem the checkpoint was taken on; the disk ID for the root disk, or the source branch's `filesystem_id`. */
981
+ from_checkpoint_filesystem_id: string;
982
+ /**
983
+ * Format: date-time
984
+ * @description When the branch was created.
985
+ */
986
+ created_at: string;
987
+ };
988
+ BranchApiResponse: {
989
+ /** @example true */
990
+ success: boolean;
991
+ data: components["schemas"]["BranchResponse"];
992
+ };
993
+ BranchListApiResponse: {
994
+ /** @example true */
995
+ success: boolean;
996
+ data: components["schemas"]["BranchResponse"][];
997
+ };
912
998
  ErrorResponse: {
913
999
  /** @example false */
914
1000
  success: boolean;
@@ -2960,6 +3046,189 @@ export interface operations {
2960
3046
  500: components["responses"]["InternalError"];
2961
3047
  };
2962
3048
  };
3049
+ listBranches: {
3050
+ parameters: {
3051
+ query?: never;
3052
+ header?: never;
3053
+ path: {
3054
+ /** @description Disk ID (format `dsk-{16 hex chars}`) */
3055
+ id: components["parameters"]["DiskId"];
3056
+ };
3057
+ cookie?: never;
3058
+ };
3059
+ requestBody?: never;
3060
+ responses: {
3061
+ /** @description All branches of the disk */
3062
+ 200: {
3063
+ headers: {
3064
+ [name: string]: unknown;
3065
+ };
3066
+ content: {
3067
+ "application/json": components["schemas"]["BranchListApiResponse"];
3068
+ };
3069
+ };
3070
+ 400: components["responses"]["ValidationError"];
3071
+ /** @description Missing or invalid authentication credentials */
3072
+ 401: {
3073
+ headers: {
3074
+ [name: string]: unknown;
3075
+ };
3076
+ content: {
3077
+ "text/plain": string;
3078
+ };
3079
+ };
3080
+ /** @description Disk not found */
3081
+ 404: {
3082
+ headers: {
3083
+ [name: string]: unknown;
3084
+ };
3085
+ content: {
3086
+ "application/json": components["schemas"]["ErrorResponse"];
3087
+ };
3088
+ };
3089
+ 500: components["responses"]["InternalError"];
3090
+ /** @description Request timed out */
3091
+ 504: {
3092
+ headers: {
3093
+ [name: string]: unknown;
3094
+ };
3095
+ content: {
3096
+ "application/json": components["schemas"]["ErrorResponse"];
3097
+ };
3098
+ };
3099
+ };
3100
+ };
3101
+ createBranch: {
3102
+ parameters: {
3103
+ query?: never;
3104
+ header?: {
3105
+ /** @description A single UUID identifying a create operation. Keys are compared as exact, case-sensitive strings, so retries must send the identical value. */
3106
+ "Idempotency-Key"?: string;
3107
+ };
3108
+ path: {
3109
+ /** @description Disk ID (format `dsk-{16 hex chars}`) */
3110
+ id: components["parameters"]["DiskId"];
3111
+ };
3112
+ cookie?: never;
3113
+ };
3114
+ requestBody: {
3115
+ content: {
3116
+ "application/json": components["schemas"]["CreateBranchRequest"];
3117
+ };
3118
+ };
3119
+ responses: {
3120
+ /** @description Branch created, or the existing branch returned for a retry with the same Idempotency-Key */
3121
+ 201: {
3122
+ headers: {
3123
+ [name: string]: unknown;
3124
+ };
3125
+ content: {
3126
+ "application/json": components["schemas"]["BranchApiResponse"];
3127
+ };
3128
+ };
3129
+ /** @description Invalid disk ID, request body, branch name, or Idempotency-Key, or more than one Idempotency-Key header */
3130
+ 400: {
3131
+ headers: {
3132
+ [name: string]: unknown;
3133
+ };
3134
+ content: {
3135
+ "application/json": components["schemas"]["ErrorResponse"];
3136
+ "text/plain": string;
3137
+ };
3138
+ };
3139
+ /** @description Missing or invalid authentication credentials */
3140
+ 401: {
3141
+ headers: {
3142
+ [name: string]: unknown;
3143
+ };
3144
+ content: {
3145
+ "text/plain": string;
3146
+ };
3147
+ };
3148
+ /** @description Disk, source branch, or checkpoint not found */
3149
+ 404: {
3150
+ headers: {
3151
+ [name: string]: unknown;
3152
+ };
3153
+ content: {
3154
+ "application/json": components["schemas"]["ErrorResponse"];
3155
+ };
3156
+ };
3157
+ /** @description A branch with this name already exists and the request did not carry its Idempotency-Key, or the checkpoint is not yet committed */
3158
+ 409: {
3159
+ headers: {
3160
+ [name: string]: unknown;
3161
+ };
3162
+ content: {
3163
+ "application/json": components["schemas"]["ErrorResponse"];
3164
+ };
3165
+ };
3166
+ 500: components["responses"]["InternalError"];
3167
+ /** @description Request timed out and the branch may have been created; retry with the same Idempotency-Key and request body */
3168
+ 504: {
3169
+ headers: {
3170
+ [name: string]: unknown;
3171
+ };
3172
+ content: {
3173
+ "application/json": components["schemas"]["ErrorResponse"];
3174
+ };
3175
+ };
3176
+ };
3177
+ };
3178
+ getBranch: {
3179
+ parameters: {
3180
+ query?: never;
3181
+ header?: never;
3182
+ path: {
3183
+ /** @description Disk ID (format `dsk-{16 hex chars}`) */
3184
+ id: components["parameters"]["DiskId"];
3185
+ /** @description Branch name */
3186
+ name: components["schemas"]["BranchName"];
3187
+ };
3188
+ cookie?: never;
3189
+ };
3190
+ requestBody?: never;
3191
+ responses: {
3192
+ /** @description Branch details */
3193
+ 200: {
3194
+ headers: {
3195
+ [name: string]: unknown;
3196
+ };
3197
+ content: {
3198
+ "application/json": components["schemas"]["BranchApiResponse"];
3199
+ };
3200
+ };
3201
+ 400: components["responses"]["ValidationError"];
3202
+ /** @description Missing or invalid authentication credentials */
3203
+ 401: {
3204
+ headers: {
3205
+ [name: string]: unknown;
3206
+ };
3207
+ content: {
3208
+ "text/plain": string;
3209
+ };
3210
+ };
3211
+ /** @description Disk or branch not found */
3212
+ 404: {
3213
+ headers: {
3214
+ [name: string]: unknown;
3215
+ };
3216
+ content: {
3217
+ "application/json": components["schemas"]["ErrorResponse"];
3218
+ };
3219
+ };
3220
+ 500: components["responses"]["InternalError"];
3221
+ /** @description Request timed out */
3222
+ 504: {
3223
+ headers: {
3224
+ [name: string]: unknown;
3225
+ };
3226
+ content: {
3227
+ "application/json": components["schemas"]["ErrorResponse"];
3228
+ };
3229
+ };
3230
+ };
3231
+ };
2963
3232
  addDiskUser: {
2964
3233
  parameters: {
2965
3234
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archildata/api-types",
3
- "version": "0.0.53",
3
+ "version": "0.0.54",
4
4
  "description": "API types for the Archil control plane",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",