@payloadcms/figma 0.0.1-alpha.41 → 0.0.1-alpha.43

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 (139) hide show
  1. package/dist/auth/oauth-flow.d.ts.map +1 -1
  2. package/dist/auth/oauth-flow.js +6 -3
  3. package/dist/auth/oauth-flow.js.map +1 -1
  4. package/dist/auth/refresh.d.ts +2 -1
  5. package/dist/auth/refresh.d.ts.map +1 -1
  6. package/dist/auth/refresh.js +11 -3
  7. package/dist/auth/refresh.js.map +1 -1
  8. package/dist/auth/token-store.d.ts +6 -4
  9. package/dist/auth/token-store.d.ts.map +1 -1
  10. package/dist/auth/token-store.js +17 -14
  11. package/dist/auth/token-store.js.map +1 -1
  12. package/dist/auth/types.d.ts +7 -4
  13. package/dist/auth/types.d.ts.map +1 -1
  14. package/dist/auth/types.js.map +1 -1
  15. package/dist/cli.js +8 -6
  16. package/dist/cli.js.map +1 -1
  17. package/dist/commands/deploy.d.ts.map +1 -1
  18. package/dist/commands/deploy.js +2 -1
  19. package/dist/commands/deploy.js.map +1 -1
  20. package/dist/commands/init.d.ts.map +1 -1
  21. package/dist/commands/init.js +12 -1
  22. package/dist/commands/init.js.map +1 -1
  23. package/dist/commands/list-tokens.d.ts +3 -3
  24. package/dist/commands/list-tokens.d.ts.map +1 -1
  25. package/dist/commands/list-tokens.js +20 -8
  26. package/dist/commands/list-tokens.js.map +1 -1
  27. package/dist/commands/login.d.ts.map +1 -1
  28. package/dist/commands/login.js +12 -4
  29. package/dist/commands/login.js.map +1 -1
  30. package/dist/commands/logout.d.ts +5 -4
  31. package/dist/commands/logout.d.ts.map +1 -1
  32. package/dist/commands/logout.js +55 -12
  33. package/dist/commands/logout.js.map +1 -1
  34. package/dist/constants.d.ts +1 -1
  35. package/dist/constants.d.ts.map +1 -1
  36. package/dist/constants.js +19 -4
  37. package/dist/constants.js.map +1 -1
  38. package/dist/db-content-api/generated/content-api-types.d.ts +166 -277
  39. package/dist/db-content-api/generated/content-api-types.d.ts.map +1 -1
  40. package/dist/db-content-api/generated/content-api-types.js.map +1 -1
  41. package/dist/db-content-api/index.d.ts.map +1 -1
  42. package/dist/db-content-api/index.js +116 -64
  43. package/dist/db-content-api/index.js.map +1 -1
  44. package/dist/db-content-api/temp-utilities/unwrapDocument.d.ts +31 -1
  45. package/dist/db-content-api/temp-utilities/unwrapDocument.d.ts.map +1 -1
  46. package/dist/db-content-api/temp-utilities/unwrapDocument.js +24 -24
  47. package/dist/db-content-api/temp-utilities/unwrapDocument.js.map +1 -1
  48. package/dist/db-content-api/utilities/data/castFieldValue.d.ts.map +1 -1
  49. package/dist/db-content-api/utilities/data/castFieldValue.js +4 -1
  50. package/dist/db-content-api/utilities/data/castFieldValue.js.map +1 -1
  51. package/dist/db-content-api/utilities/data/index.d.ts +2 -0
  52. package/dist/db-content-api/utilities/data/index.d.ts.map +1 -1
  53. package/dist/db-content-api/utilities/data/index.js +23 -2
  54. package/dist/db-content-api/utilities/data/index.js.map +1 -1
  55. package/dist/db-content-api/utilities/meta/buildLocalizedPaths.d.ts +11 -0
  56. package/dist/db-content-api/utilities/meta/buildLocalizedPaths.d.ts.map +1 -0
  57. package/dist/db-content-api/utilities/meta/buildLocalizedPaths.js +55 -0
  58. package/dist/db-content-api/utilities/meta/buildLocalizedPaths.js.map +1 -0
  59. package/dist/db-content-api/utilities/meta/buildMeta.d.ts +22 -0
  60. package/dist/db-content-api/utilities/meta/buildMeta.d.ts.map +1 -0
  61. package/dist/db-content-api/utilities/meta/buildMeta.js +30 -0
  62. package/dist/db-content-api/utilities/meta/buildMeta.js.map +1 -0
  63. package/dist/db-content-api/utilities/meta/buildPathTypes.d.ts +7 -0
  64. package/dist/db-content-api/utilities/meta/buildPathTypes.d.ts.map +1 -0
  65. package/dist/db-content-api/utilities/meta/buildPathTypes.js +151 -0
  66. package/dist/db-content-api/utilities/meta/buildPathTypes.js.map +1 -0
  67. package/dist/db-content-api/utilities/meta/index.d.ts +5 -0
  68. package/dist/db-content-api/utilities/meta/index.d.ts.map +1 -0
  69. package/dist/db-content-api/utilities/meta/index.js +5 -0
  70. package/dist/db-content-api/utilities/meta/index.js.map +1 -0
  71. package/dist/db-content-api/utilities/where.d.ts.map +1 -1
  72. package/dist/db-content-api/utilities/where.js +17 -3
  73. package/dist/db-content-api/utilities/where.js.map +1 -1
  74. package/dist/oauth/components/LogoutButton/index.d.ts.map +1 -1
  75. package/dist/oauth/components/LogoutButton/index.js +5 -3
  76. package/dist/oauth/components/LogoutButton/index.js.map +1 -1
  77. package/dist/oauth/endpoints/getLoginEndpoint.d.ts.map +1 -1
  78. package/dist/oauth/endpoints/getLoginEndpoint.js +17 -7
  79. package/dist/oauth/endpoints/getLoginEndpoint.js.map +1 -1
  80. package/dist/oauth/endpoints/getLogoutEndpoint.d.ts.map +1 -1
  81. package/dist/oauth/endpoints/getLogoutEndpoint.js +7 -4
  82. package/dist/oauth/endpoints/getLogoutEndpoint.js.map +1 -1
  83. package/dist/plugin/build-config.js +3 -3
  84. package/dist/plugin/build-config.js.map +1 -1
  85. package/dist/storage-content-api/api-types.d.ts +8 -1
  86. package/dist/storage-content-api/api-types.d.ts.map +1 -1
  87. package/dist/storage-content-api/api-types.js.map +1 -1
  88. package/dist/storage-content-api/client-uploads/ClientUploadHandler.d.ts.map +1 -1
  89. package/dist/storage-content-api/client-uploads/ClientUploadHandler.js +3 -3
  90. package/dist/storage-content-api/client-uploads/ClientUploadHandler.js.map +1 -1
  91. package/dist/storage-content-api/client-uploads/generateSignedURL.d.ts.map +1 -1
  92. package/dist/storage-content-api/client-uploads/generateSignedURL.js +9 -1
  93. package/dist/storage-content-api/client-uploads/generateSignedURL.js.map +1 -1
  94. package/dist/storage-content-api/generateURL.d.ts.map +1 -1
  95. package/dist/storage-content-api/generateURL.js +3 -2
  96. package/dist/storage-content-api/generateURL.js.map +1 -1
  97. package/dist/storage-content-api/handleDelete.d.ts.map +1 -1
  98. package/dist/storage-content-api/handleDelete.js +4 -2
  99. package/dist/storage-content-api/handleDelete.js.map +1 -1
  100. package/dist/storage-content-api/handleUpload.d.ts +1 -1
  101. package/dist/storage-content-api/handleUpload.d.ts.map +1 -1
  102. package/dist/storage-content-api/handleUpload.js +11 -3
  103. package/dist/storage-content-api/handleUpload.js.map +1 -1
  104. package/dist/storage-content-api/staticHandler.js +1 -0
  105. package/dist/storage-content-api/staticHandler.js.map +1 -1
  106. package/dist/storage-content-api/utilities/getSafeFilename.d.ts +12 -0
  107. package/dist/storage-content-api/utilities/getSafeFilename.d.ts.map +1 -0
  108. package/dist/storage-content-api/utilities/getSafeFilename.js +61 -0
  109. package/dist/storage-content-api/utilities/getSafeFilename.js.map +1 -0
  110. package/dist/storage-content-api/utilities/index.d.ts +2 -0
  111. package/dist/storage-content-api/utilities/index.d.ts.map +1 -0
  112. package/dist/storage-content-api/utilities/index.js +3 -0
  113. package/dist/storage-content-api/utilities/index.js.map +1 -0
  114. package/dist/templates/.env.example +11 -0
  115. package/dist/utils/env-management.d.ts +9 -1
  116. package/dist/utils/env-management.d.ts.map +1 -1
  117. package/dist/utils/env-management.js +39 -17
  118. package/dist/utils/env-management.js.map +1 -1
  119. package/dist/utils/format-env-suffix.d.ts +12 -0
  120. package/dist/utils/format-env-suffix.d.ts.map +1 -0
  121. package/dist/utils/format-env-suffix.js +13 -0
  122. package/dist/utils/format-env-suffix.js.map +1 -0
  123. package/dist/utils/lambda-config.js +26 -12
  124. package/dist/utils/lambda-config.js.map +1 -1
  125. package/dist/utils/messages.d.ts.map +1 -1
  126. package/dist/utils/messages.js +1 -2
  127. package/dist/utils/messages.js.map +1 -1
  128. package/dist/utils/project.d.ts.map +1 -1
  129. package/dist/utils/project.js +3 -0
  130. package/dist/utils/project.js.map +1 -1
  131. package/package.json +2 -2
  132. package/dist/db-content-api/temp-utilities/pagination.d.ts +0 -13
  133. package/dist/db-content-api/temp-utilities/pagination.d.ts.map +0 -1
  134. package/dist/db-content-api/temp-utilities/pagination.js +0 -45
  135. package/dist/db-content-api/temp-utilities/pagination.js.map +0 -1
  136. package/dist/oauth/utilities/getAdminPath.d.ts +0 -8
  137. package/dist/oauth/utilities/getAdminPath.d.ts.map +0 -1
  138. package/dist/oauth/utilities/getAdminPath.js +0 -9
  139. package/dist/oauth/utilities/getAdminPath.js.map +0 -1
@@ -2837,7 +2837,7 @@ export type paths = {
2837
2837
  patch?: never;
2838
2838
  trace?: never;
2839
2839
  };
2840
- '/api/v0/uploads/{filename}': {
2840
+ '/api/v0/uploads/{collectionId}/{filename}': {
2841
2841
  parameters: {
2842
2842
  query?: never;
2843
2843
  header?: never;
@@ -2852,6 +2852,7 @@ export type paths = {
2852
2852
  query?: never;
2853
2853
  header?: never;
2854
2854
  path: {
2855
+ collectionId: string;
2855
2856
  filename: string;
2856
2857
  };
2857
2858
  cookie?: never;
@@ -2934,140 +2935,6 @@ export type paths = {
2934
2935
  patch?: never;
2935
2936
  trace?: never;
2936
2937
  };
2937
- '/.well-known/jwks.json': {
2938
- parameters: {
2939
- query?: never;
2940
- header?: never;
2941
- path?: never;
2942
- cookie?: never;
2943
- };
2944
- get: {
2945
- parameters: {
2946
- query?: never;
2947
- header?: never;
2948
- path?: never;
2949
- cookie?: never;
2950
- };
2951
- requestBody?: never;
2952
- responses: {
2953
- /** @description JSON Web Key Set */
2954
- 200: {
2955
- headers: {
2956
- [name: string]: unknown;
2957
- };
2958
- content: {
2959
- 'application/json': components['schemas']['JwksResponse'];
2960
- };
2961
- };
2962
- /** @description Internal Server Error - Key not found */
2963
- 500: {
2964
- headers: {
2965
- [name: string]: unknown;
2966
- };
2967
- content: {
2968
- 'application/json': {
2969
- message: string;
2970
- };
2971
- };
2972
- };
2973
- };
2974
- };
2975
- put?: never;
2976
- post?: never;
2977
- delete?: never;
2978
- options?: never;
2979
- head?: never;
2980
- patch?: never;
2981
- trace?: never;
2982
- };
2983
- '/dev/jwt': {
2984
- parameters: {
2985
- query?: never;
2986
- header?: never;
2987
- path?: never;
2988
- cookie?: never;
2989
- };
2990
- get?: never;
2991
- put?: never;
2992
- post: {
2993
- parameters: {
2994
- query?: never;
2995
- header?: never;
2996
- path?: never;
2997
- cookie?: never;
2998
- };
2999
- requestBody?: {
3000
- content: {
3001
- 'application/json': components['schemas']['CreateJwtRequest'];
3002
- };
3003
- };
3004
- responses: {
3005
- /** @description JWT created successfully */
3006
- 200: {
3007
- headers: {
3008
- [name: string]: unknown;
3009
- };
3010
- content: {
3011
- 'application/json': components['schemas']['CreateJwtResponse'];
3012
- };
3013
- };
3014
- /** @description Internal Server Error - Private key not found */
3015
- 500: {
3016
- headers: {
3017
- [name: string]: unknown;
3018
- };
3019
- content: {
3020
- 'application/json': {
3021
- message: string;
3022
- };
3023
- };
3024
- };
3025
- };
3026
- };
3027
- delete?: never;
3028
- options?: never;
3029
- head?: never;
3030
- patch?: never;
3031
- trace?: never;
3032
- };
3033
- '/dev/clear-db': {
3034
- parameters: {
3035
- query?: never;
3036
- header?: never;
3037
- path?: never;
3038
- cookie?: never;
3039
- };
3040
- get?: never;
3041
- put?: never;
3042
- post: {
3043
- parameters: {
3044
- query?: never;
3045
- header?: never;
3046
- path?: never;
3047
- cookie?: never;
3048
- };
3049
- requestBody?: never;
3050
- responses: {
3051
- /** @description Database cleared successfully */
3052
- 200: {
3053
- headers: {
3054
- [name: string]: unknown;
3055
- };
3056
- content: {
3057
- 'application/json': {
3058
- message: string;
3059
- success: boolean;
3060
- };
3061
- };
3062
- };
3063
- };
3064
- };
3065
- delete?: never;
3066
- options?: never;
3067
- head?: never;
3068
- patch?: never;
3069
- trace?: never;
3070
- };
3071
2938
  };
3072
2939
  export type webhooks = Record<string, never>;
3073
2940
  export type components = {
@@ -3310,6 +3177,23 @@ export type components = {
3310
3177
  count: number;
3311
3178
  };
3312
3179
  };
3180
+ /**
3181
+ * @example array
3182
+ * @enum {string}
3183
+ */
3184
+ PathType: 'array';
3185
+ /**
3186
+ * @example {
3187
+ * "author.tagIds": "array"
3188
+ * }
3189
+ */
3190
+ PathTypesMeta: {
3191
+ [key: string]: components['schemas']['PathType'];
3192
+ };
3193
+ RequestMeta: {
3194
+ localizedPaths?: string[];
3195
+ pathTypes?: components['schemas']['PathTypesMeta'];
3196
+ };
3313
3197
  DataValue: string | number | boolean | unknown | components['schemas']['DataValue'][] | {
3314
3198
  [key: string]: components['schemas']['DataValue'];
3315
3199
  } | unknown;
@@ -3342,43 +3226,34 @@ export type components = {
3342
3226
  /** @example cms-xxxxx-xxxxx */
3343
3227
  contentSystemId: string;
3344
3228
  /** @example posts */
3345
- collectionId: string;
3229
+ collection: string;
3230
+ meta?: components['schemas']['RequestMeta'];
3346
3231
  where?: components['schemas']['WhereClause'];
3347
3232
  };
3348
3233
  /**
3349
3234
  * @example {
3235
+ * "id": "doc-key",
3350
3236
  * "title": "Placeholder title",
3351
- * "content": "This is placeholder content"
3237
+ * "content": "This is placeholder content",
3238
+ * "createdAt": "2024-01-01T00:00:00Z",
3239
+ * "updatedAt": "2024-01-02T00:00:00Z",
3240
+ * "deletedAt": "2024-01-05T00:00:00Z"
3352
3241
  * }
3353
3242
  */
3354
3243
  DocumentData: {
3355
3244
  [key: string]: components['schemas']['DataValue'];
3356
3245
  };
3357
3246
  Document: {
3358
- /** @example doc-key */
3359
- id: string;
3360
3247
  /** @example cms-xxxxx-xxxxx */
3361
3248
  contentSystemId: string;
3362
3249
  /** @example posts */
3363
- collectionId: string;
3364
- data: components['schemas']['DocumentData'];
3365
- /**
3366
- * Format: date
3367
- * @example 2024-01-01T00:00:00Z
3368
- */
3369
- createdAt: string;
3370
- /**
3371
- * Format: date
3372
- * @example 2024-01-01T00:00:00Z
3373
- */
3374
- updatedAt: string;
3250
+ collection: string;
3251
+ doc: components['schemas']['DocumentData'];
3375
3252
  };
3376
3253
  CreateDocumentResponse: {
3377
- result: {
3378
- /** @example doc-xxxxx-xxxxx */
3254
+ result: components['schemas']['Document'] & {
3255
+ /** @example doc-key */
3379
3256
  id: string;
3380
- } | {
3381
- data: components['schemas']['Document'];
3382
3257
  };
3383
3258
  };
3384
3259
  /** @example createdAt */
@@ -3396,7 +3271,7 @@ export type components = {
3396
3271
  * "value": "published"
3397
3272
  * },
3398
3273
  * "limit": 5,
3399
- * "offset": 0,
3274
+ * "page": 1,
3400
3275
  * "sort": [
3401
3276
  * {
3402
3277
  * "path": "title",
@@ -3413,14 +3288,11 @@ export type components = {
3413
3288
  count: boolean;
3414
3289
  where?: components['schemas']['WhereClause'];
3415
3290
  limit?: number;
3416
- offset?: number;
3291
+ page?: number;
3417
3292
  sort?: components['schemas']['SortClause'];
3418
3293
  }[];
3419
- LocaleClause: {
3420
- locale: string;
3421
- fallbackLocale: string;
3422
- paths: string[];
3423
- };
3294
+ /** @example es */
3295
+ LocaleClause: string;
3424
3296
  /**
3425
3297
  * @example {
3426
3298
  * "mode": "include",
@@ -3440,61 +3312,43 @@ export type components = {
3440
3312
  /** @example cms-xxxxx-xxxxx */
3441
3313
  contentSystemId: string;
3442
3314
  /** @example posts */
3443
- collectionId: string;
3444
- /** @example doc-key */
3445
- id: string;
3446
- data: components['schemas']['DocumentData'];
3315
+ collection: string;
3316
+ doc: components['schemas']['DocumentData'];
3447
3317
  returning?: false | {
3448
3318
  join?: components['schemas']['JoinClause'];
3449
3319
  locale?: components['schemas']['LocaleClause'];
3450
3320
  select?: components['schemas']['SelectClause'];
3451
3321
  };
3452
3322
  };
3453
- /**
3454
- * @example {
3455
- * "total": 100,
3456
- * "current": {
3457
- * "limit": 10,
3458
- * "page": 1
3459
- * },
3460
- * "next": {
3461
- * "limit": 10,
3462
- * "page": 2
3463
- * }
3464
- * }
3465
- */
3466
- Pagination: {
3467
- total: number;
3468
- current: {
3469
- limit: number;
3470
- page: number;
3471
- };
3472
- next?: {
3473
- limit: number;
3474
- page: number;
3475
- };
3476
- prev?: {
3477
- limit: number;
3478
- page: number;
3479
- };
3480
- };
3481
3323
  FindDocumentsResponse: {
3482
3324
  result: {
3483
- data: components['schemas']['Document'][];
3484
- pagination: components['schemas']['Pagination'];
3325
+ data: (components['schemas']['Document'] & {
3326
+ /** @example doc-key */
3327
+ id: string;
3328
+ })[];
3329
+ totalDocs: number;
3330
+ limit: number;
3331
+ page: number;
3332
+ totalPages: number;
3333
+ pagingCounter: number;
3334
+ hasPrevPage: boolean;
3335
+ hasNextPage: boolean;
3336
+ prevPage: number | null;
3337
+ nextPage: number | null;
3485
3338
  };
3486
3339
  };
3487
3340
  FindDocumentsRequest: {
3488
3341
  /** @example cms-xxxxx-xxxxx */
3489
3342
  contentSystemId: string;
3490
3343
  /** @example posts */
3491
- collectionId: string;
3344
+ collection: string;
3492
3345
  join?: components['schemas']['JoinClause'];
3493
3346
  /** @example 10 */
3494
3347
  limit?: number;
3495
3348
  locale?: components['schemas']['LocaleClause'];
3496
3349
  /** @example 1 */
3497
3350
  page?: number;
3351
+ meta?: components['schemas']['RequestMeta'];
3498
3352
  select?: components['schemas']['SelectClause'];
3499
3353
  sort?: components['schemas']['SortClause'];
3500
3354
  where?: components['schemas']['WhereClause'];
@@ -3504,7 +3358,10 @@ export type components = {
3504
3358
  /** @example 1 */
3505
3359
  count: number;
3506
3360
  } | {
3507
- data: components['schemas']['Document'][];
3361
+ data: (components['schemas']['Document'] & {
3362
+ /** @example doc-key */
3363
+ id: string;
3364
+ })[];
3508
3365
  };
3509
3366
  };
3510
3367
  /**
@@ -3523,41 +3380,46 @@ export type components = {
3523
3380
  /** @example cms-xxxxx-xxxxx */
3524
3381
  contentSystemId: string;
3525
3382
  /** @example posts */
3526
- collectionId: string;
3383
+ collection: string;
3527
3384
  /** @example false */
3528
3385
  createOnMissing: false | {
3529
3386
  id: string;
3530
3387
  };
3531
- data: components['schemas']['DataWithOperations'];
3532
- where: components['schemas']['WhereClause'];
3388
+ doc: components['schemas']['DataWithOperations'];
3533
3389
  /** @example 10 */
3534
3390
  limit?: number;
3535
- sort?: components['schemas']['SortClause'];
3391
+ meta?: components['schemas']['RequestMeta'];
3536
3392
  returning?: false | {
3537
3393
  join?: components['schemas']['JoinClause'];
3538
3394
  locale?: components['schemas']['LocaleClause'];
3539
3395
  select?: components['schemas']['SelectClause'];
3540
3396
  };
3397
+ sort?: components['schemas']['SortClause'];
3398
+ where: components['schemas']['WhereClause'];
3541
3399
  };
3542
3400
  DeleteDocumentResponse: {
3543
3401
  result?: {
3544
3402
  /** @example 1 */
3545
3403
  count: number;
3546
3404
  } | {
3547
- data: components['schemas']['Document'][];
3405
+ data: (components['schemas']['Document'] & {
3406
+ /** @example doc-key */
3407
+ id: string;
3408
+ })[];
3548
3409
  };
3549
3410
  };
3550
3411
  DeleteDocumentRequest: {
3551
3412
  /** @example cms-xxxxx-xxxxx */
3552
3413
  contentSystemId: string;
3553
3414
  /** @example posts */
3554
- collectionId: string;
3555
- where: components['schemas']['WhereClause'];
3415
+ collection: string;
3416
+ meta?: components['schemas']['RequestMeta'];
3556
3417
  returning?: false | {
3557
3418
  join?: components['schemas']['JoinClause'];
3558
3419
  locale?: components['schemas']['LocaleClause'];
3559
3420
  select?: components['schemas']['SelectClause'];
3560
3421
  };
3422
+ where: components['schemas']['WhereClause'];
3561
3423
  };
3562
3424
  CountDocumentVersionResponse: {
3563
3425
  result: {
@@ -3569,48 +3431,68 @@ export type components = {
3569
3431
  /** @example cms-xxxxx-xxxxx */
3570
3432
  contentSystemId: string;
3571
3433
  /** @example posts */
3572
- collectionId: string;
3434
+ collection: string;
3435
+ meta?: components['schemas']['RequestMeta'];
3573
3436
  where?: components['schemas']['WhereClause'];
3574
3437
  };
3575
3438
  DocumentVersion: {
3576
- /** @example ver-xxxxx-xxxxx */
3577
- id: string;
3578
3439
  /** @example cms-xxxxx-xxxxx */
3579
3440
  contentSystemId: string;
3580
- /** @example doc-key */
3581
- documentId: string;
3582
- /** @example true */
3583
- latest: boolean;
3584
- data: components['schemas']['DocumentData'];
3585
- /**
3586
- * Format: date
3587
- * @example 2024-01-01T00:00:00Z
3588
- */
3589
- createdAt: string;
3590
- /**
3591
- * Format: date
3592
- * @example 2024-01-01T00:00:00Z
3593
- */
3594
- updatedAt: string;
3441
+ /** @example posts */
3442
+ collection: string;
3443
+ versionDoc: {
3444
+ /** @example 2024-01-01T00:00:00Z */
3445
+ createdAt?: string | null;
3446
+ /** @example 2024-01-01T00:00:00Z */
3447
+ updatedAt?: string | null;
3448
+ /** @example true */
3449
+ latest?: boolean;
3450
+ /** @example doc-key */
3451
+ parent?: string | number;
3452
+ version: components['schemas']['DocumentData'] & unknown;
3453
+ /** @example ver-xxxxx-xxxxx */
3454
+ id: string;
3455
+ };
3595
3456
  };
3596
3457
  CreateDocumentVersionResponse: {
3597
- result: {
3458
+ result: components['schemas']['DocumentVersion'] & {
3598
3459
  /** @example ver-xxxxx-xxxxx */
3599
3460
  id: string;
3600
- } | {
3601
- data: components['schemas']['DocumentVersion'];
3602
3461
  };
3603
3462
  };
3463
+ /**
3464
+ * @example {
3465
+ * "contentSystemId": "cms-xxxxx-xxxxx",
3466
+ * "collection": "posts",
3467
+ * "versionDoc": {
3468
+ * "createdAt": "2024-01-01T00:00:00Z",
3469
+ * "updatedAt": "2024-01-01T00:00:00Z",
3470
+ * "latest": true,
3471
+ * "parent": "doc-key",
3472
+ * "version": {
3473
+ * "title": "Placeholder title",
3474
+ * "content": "This is placeholder content"
3475
+ * }
3476
+ * },
3477
+ * "returning": false
3478
+ * }
3479
+ */
3604
3480
  CreateDocumentVersionRequest: {
3605
3481
  /** @example cms-xxxxx-xxxxx */
3606
3482
  contentSystemId: string;
3607
3483
  /** @example posts */
3608
- collectionId: string;
3609
- /** @example doc-key */
3610
- documentId: string;
3611
- /** @example true */
3612
- latest?: boolean;
3613
- data: components['schemas']['DocumentData'];
3484
+ collection: string;
3485
+ versionDoc: {
3486
+ /** @example 2024-01-01T00:00:00Z */
3487
+ createdAt?: string | null;
3488
+ /** @example 2024-01-01T00:00:00Z */
3489
+ updatedAt?: string | null;
3490
+ /** @example true */
3491
+ latest?: boolean;
3492
+ /** @example doc-key */
3493
+ parent?: string | number;
3494
+ version: components['schemas']['DocumentData'] & unknown;
3495
+ };
3614
3496
  returning?: false | {
3615
3497
  join?: components['schemas']['JoinClause'];
3616
3498
  locale?: components['schemas']['LocaleClause'];
@@ -3619,21 +3501,33 @@ export type components = {
3619
3501
  };
3620
3502
  FindDocumentVersionsResponse: {
3621
3503
  result: {
3622
- data: components['schemas']['DocumentVersion'][];
3623
- pagination: components['schemas']['Pagination'];
3504
+ data: (components['schemas']['DocumentVersion'] & {
3505
+ /** @example ver-xxxxx-xxxxx */
3506
+ id: string;
3507
+ })[];
3508
+ totalDocs: number;
3509
+ limit: number;
3510
+ page: number;
3511
+ totalPages: number;
3512
+ pagingCounter: number;
3513
+ hasPrevPage: boolean;
3514
+ hasNextPage: boolean;
3515
+ prevPage: number | null;
3516
+ nextPage: number | null;
3624
3517
  };
3625
3518
  };
3626
3519
  FindDocumentVersionsRequest: {
3627
3520
  /** @example cms-xxxxx-xxxxx */
3628
3521
  contentSystemId: string;
3629
3522
  /** @example posts */
3630
- collectionId: string;
3523
+ collection: string;
3631
3524
  join?: components['schemas']['JoinClause'];
3632
3525
  /** @example 10 */
3633
3526
  limit?: number;
3634
3527
  locale?: components['schemas']['LocaleClause'];
3635
3528
  /** @example 1 */
3636
3529
  page?: number;
3530
+ meta?: components['schemas']['RequestMeta'];
3637
3531
  select?: components['schemas']['SelectClause'];
3638
3532
  sort?: components['schemas']['SortClause'];
3639
3533
  where?: components['schemas']['WhereClause'];
@@ -3643,23 +3537,37 @@ export type components = {
3643
3537
  /** @example 1 */
3644
3538
  count: number;
3645
3539
  } | {
3646
- data: components['schemas']['DocumentVersion'][];
3540
+ data: (components['schemas']['DocumentVersion'] & {
3541
+ /** @example ver-xxxxx-xxxxx */
3542
+ id: string;
3543
+ })[];
3647
3544
  };
3648
3545
  };
3649
3546
  UpdateDocumentVersionRequest: {
3650
3547
  /** @example cms-xxxxx-xxxxx */
3651
3548
  contentSystemId: string;
3652
3549
  /** @example posts */
3653
- collectionId: string;
3550
+ collection: string;
3654
3551
  /** @example false */
3655
3552
  createOnMissing: false | {
3656
- documentId: string;
3553
+ parent: string;
3657
3554
  latest: boolean;
3658
3555
  };
3659
- data: components['schemas']['DataWithOperations'];
3556
+ versionDoc: {
3557
+ /** @example 2024-01-01T00:00:00Z */
3558
+ createdAt?: string | null;
3559
+ /** @example 2024-01-01T00:00:00Z */
3560
+ updatedAt?: string | null;
3561
+ /** @example true */
3562
+ latest?: boolean;
3563
+ /** @example doc-key */
3564
+ parent?: string | number;
3565
+ version: components['schemas']['DocumentData'] & unknown;
3566
+ };
3660
3567
  where: components['schemas']['WhereClause'];
3661
3568
  /** @example 10 */
3662
3569
  limit?: number;
3570
+ meta?: components['schemas']['RequestMeta'];
3663
3571
  sort?: components['schemas']['SortClause'];
3664
3572
  returning?: false | {
3665
3573
  join?: components['schemas']['JoinClause'];
@@ -3672,20 +3580,24 @@ export type components = {
3672
3580
  /** @example 1 */
3673
3581
  count: number;
3674
3582
  } | {
3675
- data: components['schemas']['DocumentVersion'][];
3583
+ data: (components['schemas']['DocumentVersion'] & {
3584
+ /** @example ver-xxxxx-xxxxx */
3585
+ id: string;
3586
+ })[];
3676
3587
  };
3677
3588
  };
3678
3589
  DeleteDocumentVersionRequest: {
3679
3590
  /** @example cms-xxxxx-xxxxx */
3680
3591
  contentSystemId: string;
3681
3592
  /** @example posts */
3682
- collectionId: string;
3683
- where: components['schemas']['WhereClause'];
3593
+ collection: string;
3594
+ meta?: components['schemas']['RequestMeta'];
3684
3595
  returning?: false | {
3685
3596
  join?: components['schemas']['JoinClause'];
3686
3597
  locale?: components['schemas']['LocaleClause'];
3687
3598
  select?: components['schemas']['SelectClause'];
3688
3599
  };
3600
+ where: components['schemas']['WhereClause'];
3689
3601
  };
3690
3602
  GeneratePresignedUploadUrlResponse: {
3691
3603
  /** @example https://s3.amazonaws.com/bucket/key?presigned-params */
@@ -3701,6 +3613,8 @@ export type components = {
3701
3613
  * @example 3600
3702
3614
  */
3703
3615
  expiresIn: number;
3616
+ /** @example media */
3617
+ collectionId: string;
3704
3618
  };
3705
3619
  GeneratePresignedDownloadUrlResponse: {
3706
3620
  /** @example https://s3.amazonaws.com/bucket/key?presigned-params */
@@ -3714,6 +3628,8 @@ export type components = {
3714
3628
  * @example 3600
3715
3629
  */
3716
3630
  expiresIn: number;
3631
+ /** @example media */
3632
+ collectionId: string;
3717
3633
  };
3718
3634
  InitiateMultipartUploadResponse: {
3719
3635
  /** @example abc123xyz789 */
@@ -3724,6 +3640,8 @@ export type components = {
3724
3640
  filename: string;
3725
3641
  /** @example video/mp4 */
3726
3642
  contentType: string;
3643
+ /** @example media */
3644
+ collectionId: string;
3727
3645
  };
3728
3646
  GenerateUploadPartUrlsResponse: {
3729
3647
  /**
@@ -3759,6 +3677,8 @@ export type components = {
3759
3677
  * @example 3600
3760
3678
  */
3761
3679
  expiresIn: number;
3680
+ /** @example media */
3681
+ collectionId: string;
3762
3682
  };
3763
3683
  CompleteMultipartUploadResponse: {
3764
3684
  /**
@@ -3786,6 +3706,8 @@ export type components = {
3786
3706
  /** @example "abc123" */
3787
3707
  ETag: string;
3788
3708
  }[];
3709
+ /** @example media */
3710
+ collectionId: string;
3789
3711
  };
3790
3712
  AbortMultipartUploadResponse: {
3791
3713
  /**
@@ -3799,6 +3721,8 @@ export type components = {
3799
3721
  filename: string;
3800
3722
  /** @example abc123xyz789 */
3801
3723
  uploadId: string;
3724
+ /** @example media */
3725
+ collectionId: string;
3802
3726
  };
3803
3727
  DeleteFileResponse: {
3804
3728
  /**
@@ -3807,41 +3731,6 @@ export type components = {
3807
3731
  */
3808
3732
  success: true;
3809
3733
  };
3810
- JwksResponse: {
3811
- keys: {
3812
- /** @example RSA */
3813
- kty: string;
3814
- /** @example sig */
3815
- use: string;
3816
- /** @example dev-key-1 */
3817
- kid: string;
3818
- /** @example RS256 */
3819
- alg: string;
3820
- /** @example base64url-encoded-modulus */
3821
- n: string;
3822
- /** @example AQAB */
3823
- e: string;
3824
- }[];
3825
- };
3826
- CreateJwtResponse: {
3827
- /**
3828
- * @description Generated JWT token
3829
- * @example eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
3830
- */
3831
- token: string;
3832
- /**
3833
- * @description Token expiration time in seconds
3834
- * @example 604800
3835
- */
3836
- expires_in: number;
3837
- };
3838
- CreateJwtRequest: {
3839
- /**
3840
- * @description Content system ID to include in the JWT aud field
3841
- * @example 4cfea8de-4f44-4efd-a8fc-7d539249e9f1
3842
- */
3843
- content_system_id?: string;
3844
- };
3845
3734
  };
3846
3735
  responses: never;
3847
3736
  parameters: never;