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

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 (100) 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/db-content-api/generated/content-api-types.d.ts +163 -103
  35. package/dist/db-content-api/generated/content-api-types.d.ts.map +1 -1
  36. package/dist/db-content-api/generated/content-api-types.js.map +1 -1
  37. package/dist/db-content-api/index.d.ts.map +1 -1
  38. package/dist/db-content-api/index.js +73 -65
  39. package/dist/db-content-api/index.js.map +1 -1
  40. package/dist/db-content-api/temp-utilities/unwrapDocument.d.ts +31 -1
  41. package/dist/db-content-api/temp-utilities/unwrapDocument.d.ts.map +1 -1
  42. package/dist/db-content-api/temp-utilities/unwrapDocument.js +24 -24
  43. package/dist/db-content-api/temp-utilities/unwrapDocument.js.map +1 -1
  44. package/dist/db-content-api/utilities/buildPathTypes.d.ts +12 -0
  45. package/dist/db-content-api/utilities/buildPathTypes.d.ts.map +1 -0
  46. package/dist/db-content-api/utilities/buildPathTypes.js +157 -0
  47. package/dist/db-content-api/utilities/buildPathTypes.js.map +1 -0
  48. package/dist/db-content-api/utilities/data/index.d.ts +2 -0
  49. package/dist/db-content-api/utilities/data/index.d.ts.map +1 -1
  50. package/dist/db-content-api/utilities/data/index.js +8 -0
  51. package/dist/db-content-api/utilities/data/index.js.map +1 -1
  52. package/dist/db-content-api/utilities/where.d.ts.map +1 -1
  53. package/dist/db-content-api/utilities/where.js +17 -3
  54. package/dist/db-content-api/utilities/where.js.map +1 -1
  55. package/dist/oauth/components/LogoutButton/index.d.ts.map +1 -1
  56. package/dist/oauth/components/LogoutButton/index.js +5 -3
  57. package/dist/oauth/components/LogoutButton/index.js.map +1 -1
  58. package/dist/oauth/endpoints/getLoginEndpoint.d.ts.map +1 -1
  59. package/dist/oauth/endpoints/getLoginEndpoint.js +17 -7
  60. package/dist/oauth/endpoints/getLoginEndpoint.js.map +1 -1
  61. package/dist/oauth/endpoints/getLogoutEndpoint.d.ts.map +1 -1
  62. package/dist/oauth/endpoints/getLogoutEndpoint.js +7 -4
  63. package/dist/oauth/endpoints/getLogoutEndpoint.js.map +1 -1
  64. package/dist/plugin/build-config.js +3 -3
  65. package/dist/plugin/build-config.js.map +1 -1
  66. package/dist/storage-content-api/api-types.d.ts +8 -1
  67. package/dist/storage-content-api/api-types.d.ts.map +1 -1
  68. package/dist/storage-content-api/api-types.js.map +1 -1
  69. package/dist/storage-content-api/client-uploads/generateSignedURL.js +1 -0
  70. package/dist/storage-content-api/client-uploads/generateSignedURL.js.map +1 -1
  71. package/dist/storage-content-api/generateURL.d.ts.map +1 -1
  72. package/dist/storage-content-api/generateURL.js +3 -2
  73. package/dist/storage-content-api/generateURL.js.map +1 -1
  74. package/dist/storage-content-api/handleDelete.d.ts.map +1 -1
  75. package/dist/storage-content-api/handleDelete.js +4 -2
  76. package/dist/storage-content-api/handleDelete.js.map +1 -1
  77. package/dist/storage-content-api/handleUpload.d.ts +1 -1
  78. package/dist/storage-content-api/handleUpload.d.ts.map +1 -1
  79. package/dist/storage-content-api/handleUpload.js +11 -3
  80. package/dist/storage-content-api/handleUpload.js.map +1 -1
  81. package/dist/storage-content-api/staticHandler.js +1 -0
  82. package/dist/storage-content-api/staticHandler.js.map +1 -1
  83. package/dist/utils/format-env-suffix.d.ts +12 -0
  84. package/dist/utils/format-env-suffix.d.ts.map +1 -0
  85. package/dist/utils/format-env-suffix.js +13 -0
  86. package/dist/utils/format-env-suffix.js.map +1 -0
  87. package/dist/utils/lambda-config.js +26 -12
  88. package/dist/utils/lambda-config.js.map +1 -1
  89. package/dist/utils/messages.d.ts.map +1 -1
  90. package/dist/utils/messages.js +1 -2
  91. package/dist/utils/messages.js.map +1 -1
  92. package/package.json +1 -1
  93. package/dist/db-content-api/temp-utilities/pagination.d.ts +0 -13
  94. package/dist/db-content-api/temp-utilities/pagination.d.ts.map +0 -1
  95. package/dist/db-content-api/temp-utilities/pagination.js +0 -45
  96. package/dist/db-content-api/temp-utilities/pagination.js.map +0 -1
  97. package/dist/oauth/utilities/getAdminPath.d.ts +0 -8
  98. package/dist/oauth/utilities/getAdminPath.d.ts.map +0 -1
  99. package/dist/oauth/utilities/getAdminPath.js +0 -9
  100. package/dist/oauth/utilities/getAdminPath.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/commands/logout.ts"],"sourcesContent":["import * as p from '@clack/prompts'\nimport pc from 'picocolors'\n\nimport { getTokenStore } from '../auth/token-store.js'\nimport * as log from '../utils/log.js'\n\n/**\n * Options for logout command\n */\nexport interface LogoutCommandOptions {\n /** Enable debug mode */\n debug?: boolean\n}\n\n/**\n * Handle the `@payloadcms/figma logout` command\n *\n * Clears all stored tokens (OAuth and project tokens) after confirmation.\n *\n * @param _options - Command options (unused)\n */\nexport async function logoutCommand(_options: LogoutCommandOptions = {}): Promise<void> {\n const tokenStore = getTokenStore()\n\n const hasTokens = tokenStore.getTokens() !== null\n\n if (!hasTokens) {\n p.log.warn(pc.yellow('No tokens found. Already logged out.'))\n return\n }\n\n // Confirm logout\n const confirmed = await p.confirm({\n initialValue: false,\n message: 'This will clear all OAuth and project tokens. Continue?',\n })\n\n if (p.isCancel(confirmed) || !confirmed) {\n p.log.info('Logout cancelled')\n return\n }\n\n const s = p.spinner()\n s.start('Clearing tokens...')\n\n try {\n // Clear OAuth tokens\n tokenStore.clearTokens()\n // Clear all project tokens\n tokenStore.clearAllProjectTokens()\n s.stop(pc.green(' Logged out successfully'))\n p.log.step('All OAuth and project tokens have been cleared')\n } catch (error) {\n s.stop(pc.red('✗ Failed to clear tokens'))\n log.error(error instanceof Error ? error.message : 'Unknown error')\n process.exit(1)\n }\n}\n"],"names":["p","pc","getTokenStore","log","logoutCommand","_options","tokenStore","hasTokens","getTokens","warn","yellow","confirmed","confirm","initialValue","message","isCancel","info","s","spinner","start","clearTokens","clearAllProjectTokens","stop","green","step","error","red","Error","process","exit"],"mappings":"AAAA,YAAYA,OAAO,iBAAgB;AACnC,OAAOC,QAAQ,aAAY;AAE3B,SAASC,aAAa,QAAQ,yBAAwB;AACtD,YAAYC,SAAS,kBAAiB;AAUtC;;;;;;CAMC,GACD,OAAO,eAAeC,cAAcC,WAAiC,CAAC,CAAC;IACrE,MAAMC,aAAaJ;IAEnB,MAAMK,YAAYD,WAAWE,SAAS,OAAO;IAE7C,IAAI,CAACD,WAAW;QACdP,EAAEG,GAAG,CAACM,IAAI,CAACR,GAAGS,MAAM,CAAC;QACrB;IACF;IAEA,iBAAiB;IACjB,MAAMC,YAAY,MAAMX,EAAEY,OAAO,CAAC;QAChCC,cAAc;QACdC,SAAS;IACX;IAEA,IAAId,EAAEe,QAAQ,CAACJ,cAAc,CAACA,WAAW;QACvCX,EAAEG,GAAG,CAACa,IAAI,CAAC;QACX;IACF;IAEA,MAAMC,IAAIjB,EAAEkB,OAAO;IACnBD,EAAEE,KAAK,CAAC;IAER,IAAI;QACF,qBAAqB;QACrBb,WAAWc,WAAW;QACtB,2BAA2B;QAC3Bd,WAAWe,qBAAqB;QAChCJ,EAAEK,IAAI,CAACrB,GAAGsB,KAAK,CAAC;QAChBvB,EAAEG,GAAG,CAACqB,IAAI,CAAC;IACb,EAAE,OAAOC,OAAO;QACdR,EAAEK,IAAI,CAACrB,GAAGyB,GAAG,CAAC;QACdvB,IAAIsB,KAAK,CAACA,iBAAiBE,QAAQF,MAAMX,OAAO,GAAG;QACnDc,QAAQC,IAAI,CAAC;IACf;AACF"}
1
+ {"version":3,"sources":["../../src/commands/logout.ts"],"sourcesContent":["import * as p from '@clack/prompts'\nimport pc from 'picocolors'\n\nimport type { Environment } from '../constants.js'\n\nimport { getTokenStore } from '../auth/token-store.js'\nimport { getEnvironment } from '../constants.js'\nimport { formatEnvSuffix } from '../utils/format-env-suffix.js'\nimport * as log from '../utils/log.js'\n\n/**\n * Options for logout command\n */\nexport interface LogoutCommandOptions {\n /** Logout from all environments */\n all?: boolean\n /** Enable debug mode */\n debug?: boolean\n}\n\nconst ALL_ENVIRONMENTS: Environment[] = ['production', 'staging']\n\n/**\n * Handle the `@payloadcms/figma logout` command\n *\n * Clears stored tokens (OAuth and project tokens) after confirmation.\n * By default clears only current environment. Use --all for all environments.\n */\nexport async function logoutCommand(options: LogoutCommandOptions = {}): Promise<void> {\n const currentEnv = getEnvironment()\n\n if (options.all) {\n await logoutAllEnvironments()\n } else {\n await logoutSingleEnvironment(currentEnv)\n }\n}\n\nasync function logoutSingleEnvironment(env: Environment): Promise<void> {\n const tokenStore = getTokenStore(env)\n const hasTokens = tokenStore.getTokens() !== null\n\n if (!hasTokens) {\n p.log.warn(pc.yellow(`No tokens found${formatEnvSuffix(env, ' for ')}. Already logged out.`))\n return\n }\n\n const confirmed = await p.confirm({\n initialValue: false,\n message: `This will clear all OAuth and project tokens${formatEnvSuffix(env, ' for ')}. Continue?`,\n })\n\n if (p.isCancel(confirmed) || !confirmed) {\n p.log.info('Logout cancelled')\n return\n }\n\n const s = p.spinner()\n s.start('Clearing tokens...')\n\n try {\n tokenStore.clearTokens()\n tokenStore.clearAllProjectTokens()\n s.stop(pc.green(`✓ Logged out${formatEnvSuffix(env, ' from ')}`))\n } catch (error) {\n s.stop(pc.red('✗ Failed to clear tokens'))\n log.error(error instanceof Error ? error.message : 'Unknown error')\n process.exit(1)\n }\n}\n\nasync function logoutAllEnvironments(): Promise<void> {\n // Check which environments have tokens\n const envsWithTokens = ALL_ENVIRONMENTS.filter((env) => {\n const store = getTokenStore(env)\n return store.getTokens() !== null\n })\n\n if (envsWithTokens.length === 0) {\n p.log.warn(pc.yellow('No tokens found in any environment. Already logged out.'))\n return\n }\n\n const envList = envsWithTokens.join(' and ')\n const confirmed = await p.confirm({\n initialValue: false,\n message: `This will clear all OAuth and project tokens for ${envList}. Continue?`,\n })\n\n if (p.isCancel(confirmed) || !confirmed) {\n p.log.info('Logout cancelled')\n return\n }\n\n const s = p.spinner()\n s.start('Clearing tokens...')\n\n try {\n for (const env of envsWithTokens) {\n const store = getTokenStore(env)\n store.clearTokens()\n store.clearAllProjectTokens()\n }\n s.stop(pc.green('✓ Logged out from all environments'))\n } catch (error) {\n s.stop(pc.red('✗ Failed to clear tokens'))\n log.error(error instanceof Error ? error.message : 'Unknown error')\n process.exit(1)\n }\n}\n"],"names":["p","pc","getTokenStore","getEnvironment","formatEnvSuffix","log","ALL_ENVIRONMENTS","logoutCommand","options","currentEnv","all","logoutAllEnvironments","logoutSingleEnvironment","env","tokenStore","hasTokens","getTokens","warn","yellow","confirmed","confirm","initialValue","message","isCancel","info","s","spinner","start","clearTokens","clearAllProjectTokens","stop","green","error","red","Error","process","exit","envsWithTokens","filter","store","length","envList","join"],"mappings":"AAAA,YAAYA,OAAO,iBAAgB;AACnC,OAAOC,QAAQ,aAAY;AAI3B,SAASC,aAAa,QAAQ,yBAAwB;AACtD,SAASC,cAAc,QAAQ,kBAAiB;AAChD,SAASC,eAAe,QAAQ,gCAA+B;AAC/D,YAAYC,SAAS,kBAAiB;AAYtC,MAAMC,mBAAkC;IAAC;IAAc;CAAU;AAEjE;;;;;CAKC,GACD,OAAO,eAAeC,cAAcC,UAAgC,CAAC,CAAC;IACpE,MAAMC,aAAaN;IAEnB,IAAIK,QAAQE,GAAG,EAAE;QACf,MAAMC;IACR,OAAO;QACL,MAAMC,wBAAwBH;IAChC;AACF;AAEA,eAAeG,wBAAwBC,GAAgB;IACrD,MAAMC,aAAaZ,cAAcW;IACjC,MAAME,YAAYD,WAAWE,SAAS,OAAO;IAE7C,IAAI,CAACD,WAAW;QACdf,EAAEK,GAAG,CAACY,IAAI,CAAChB,GAAGiB,MAAM,CAAC,CAAC,eAAe,EAAEd,gBAAgBS,KAAK,SAAS,qBAAqB,CAAC;QAC3F;IACF;IAEA,MAAMM,YAAY,MAAMnB,EAAEoB,OAAO,CAAC;QAChCC,cAAc;QACdC,SAAS,CAAC,4CAA4C,EAAElB,gBAAgBS,KAAK,SAAS,WAAW,CAAC;IACpG;IAEA,IAAIb,EAAEuB,QAAQ,CAACJ,cAAc,CAACA,WAAW;QACvCnB,EAAEK,GAAG,CAACmB,IAAI,CAAC;QACX;IACF;IAEA,MAAMC,IAAIzB,EAAE0B,OAAO;IACnBD,EAAEE,KAAK,CAAC;IAER,IAAI;QACFb,WAAWc,WAAW;QACtBd,WAAWe,qBAAqB;QAChCJ,EAAEK,IAAI,CAAC7B,GAAG8B,KAAK,CAAC,CAAC,YAAY,EAAE3B,gBAAgBS,KAAK,WAAW;IACjE,EAAE,OAAOmB,OAAO;QACdP,EAAEK,IAAI,CAAC7B,GAAGgC,GAAG,CAAC;QACd5B,IAAI2B,KAAK,CAACA,iBAAiBE,QAAQF,MAAMV,OAAO,GAAG;QACnDa,QAAQC,IAAI,CAAC;IACf;AACF;AAEA,eAAezB;IACb,uCAAuC;IACvC,MAAM0B,iBAAiB/B,iBAAiBgC,MAAM,CAAC,CAACzB;QAC9C,MAAM0B,QAAQrC,cAAcW;QAC5B,OAAO0B,MAAMvB,SAAS,OAAO;IAC/B;IAEA,IAAIqB,eAAeG,MAAM,KAAK,GAAG;QAC/BxC,EAAEK,GAAG,CAACY,IAAI,CAAChB,GAAGiB,MAAM,CAAC;QACrB;IACF;IAEA,MAAMuB,UAAUJ,eAAeK,IAAI,CAAC;IACpC,MAAMvB,YAAY,MAAMnB,EAAEoB,OAAO,CAAC;QAChCC,cAAc;QACdC,SAAS,CAAC,iDAAiD,EAAEmB,QAAQ,WAAW,CAAC;IACnF;IAEA,IAAIzC,EAAEuB,QAAQ,CAACJ,cAAc,CAACA,WAAW;QACvCnB,EAAEK,GAAG,CAACmB,IAAI,CAAC;QACX;IACF;IAEA,MAAMC,IAAIzB,EAAE0B,OAAO;IACnBD,EAAEE,KAAK,CAAC;IAER,IAAI;QACF,KAAK,MAAMd,OAAOwB,eAAgB;YAChC,MAAME,QAAQrC,cAAcW;YAC5B0B,MAAMX,WAAW;YACjBW,MAAMV,qBAAqB;QAC7B;QACAJ,EAAEK,IAAI,CAAC7B,GAAG8B,KAAK,CAAC;IAClB,EAAE,OAAOC,OAAO;QACdP,EAAEK,IAAI,CAAC7B,GAAGgC,GAAG,CAAC;QACd5B,IAAI2B,KAAK,CAACA,iBAAiBE,QAAQF,MAAMV,OAAO,GAAG;QACnDa,QAAQC,IAAI,CAAC;IACf;AACF"}
@@ -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;
@@ -3310,6 +3311,22 @@ export type components = {
3310
3311
  count: number;
3311
3312
  };
3312
3313
  };
3314
+ /**
3315
+ * @example array
3316
+ * @enum {string}
3317
+ */
3318
+ PathType: 'array';
3319
+ /**
3320
+ * @example {
3321
+ * "author.tagIds": "array"
3322
+ * }
3323
+ */
3324
+ PathTypesMeta: {
3325
+ [key: string]: components['schemas']['PathType'];
3326
+ };
3327
+ RequestMeta: {
3328
+ pathTypes?: components['schemas']['PathTypesMeta'];
3329
+ };
3313
3330
  DataValue: string | number | boolean | unknown | components['schemas']['DataValue'][] | {
3314
3331
  [key: string]: components['schemas']['DataValue'];
3315
3332
  } | unknown;
@@ -3342,43 +3359,34 @@ export type components = {
3342
3359
  /** @example cms-xxxxx-xxxxx */
3343
3360
  contentSystemId: string;
3344
3361
  /** @example posts */
3345
- collectionId: string;
3362
+ collection: string;
3363
+ meta?: components['schemas']['RequestMeta'];
3346
3364
  where?: components['schemas']['WhereClause'];
3347
3365
  };
3348
3366
  /**
3349
3367
  * @example {
3368
+ * "id": "doc-key",
3350
3369
  * "title": "Placeholder title",
3351
- * "content": "This is placeholder content"
3370
+ * "content": "This is placeholder content",
3371
+ * "createdAt": "2024-01-01T00:00:00Z",
3372
+ * "updatedAt": "2024-01-02T00:00:00Z",
3373
+ * "deletedAt": "2024-01-05T00:00:00Z"
3352
3374
  * }
3353
3375
  */
3354
3376
  DocumentData: {
3355
3377
  [key: string]: components['schemas']['DataValue'];
3356
3378
  };
3357
3379
  Document: {
3358
- /** @example doc-key */
3359
- id: string;
3360
3380
  /** @example cms-xxxxx-xxxxx */
3361
3381
  contentSystemId: string;
3362
3382
  /** @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;
3383
+ collection: string;
3384
+ doc: components['schemas']['DocumentData'];
3375
3385
  };
3376
3386
  CreateDocumentResponse: {
3377
- result: {
3378
- /** @example doc-xxxxx-xxxxx */
3387
+ result: components['schemas']['Document'] & {
3388
+ /** @example doc-key */
3379
3389
  id: string;
3380
- } | {
3381
- data: components['schemas']['Document'];
3382
3390
  };
3383
3391
  };
3384
3392
  /** @example createdAt */
@@ -3396,7 +3404,7 @@ export type components = {
3396
3404
  * "value": "published"
3397
3405
  * },
3398
3406
  * "limit": 5,
3399
- * "offset": 0,
3407
+ * "page": 1,
3400
3408
  * "sort": [
3401
3409
  * {
3402
3410
  * "path": "title",
@@ -3413,7 +3421,7 @@ export type components = {
3413
3421
  count: boolean;
3414
3422
  where?: components['schemas']['WhereClause'];
3415
3423
  limit?: number;
3416
- offset?: number;
3424
+ page?: number;
3417
3425
  sort?: components['schemas']['SortClause'];
3418
3426
  }[];
3419
3427
  LocaleClause: {
@@ -3440,61 +3448,43 @@ export type components = {
3440
3448
  /** @example cms-xxxxx-xxxxx */
3441
3449
  contentSystemId: string;
3442
3450
  /** @example posts */
3443
- collectionId: string;
3444
- /** @example doc-key */
3445
- id: string;
3446
- data: components['schemas']['DocumentData'];
3451
+ collection: string;
3452
+ doc: components['schemas']['DocumentData'];
3447
3453
  returning?: false | {
3448
3454
  join?: components['schemas']['JoinClause'];
3449
3455
  locale?: components['schemas']['LocaleClause'];
3450
3456
  select?: components['schemas']['SelectClause'];
3451
3457
  };
3452
3458
  };
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
3459
  FindDocumentsResponse: {
3482
3460
  result: {
3483
- data: components['schemas']['Document'][];
3484
- pagination: components['schemas']['Pagination'];
3461
+ data: (components['schemas']['Document'] & {
3462
+ /** @example doc-key */
3463
+ id: string;
3464
+ })[];
3465
+ totalDocs: number;
3466
+ limit: number;
3467
+ page: number;
3468
+ totalPages: number;
3469
+ pagingCounter: number;
3470
+ hasPrevPage: boolean;
3471
+ hasNextPage: boolean;
3472
+ prevPage: number | null;
3473
+ nextPage: number | null;
3485
3474
  };
3486
3475
  };
3487
3476
  FindDocumentsRequest: {
3488
3477
  /** @example cms-xxxxx-xxxxx */
3489
3478
  contentSystemId: string;
3490
3479
  /** @example posts */
3491
- collectionId: string;
3480
+ collection: string;
3492
3481
  join?: components['schemas']['JoinClause'];
3493
3482
  /** @example 10 */
3494
3483
  limit?: number;
3495
3484
  locale?: components['schemas']['LocaleClause'];
3496
3485
  /** @example 1 */
3497
3486
  page?: number;
3487
+ meta?: components['schemas']['RequestMeta'];
3498
3488
  select?: components['schemas']['SelectClause'];
3499
3489
  sort?: components['schemas']['SortClause'];
3500
3490
  where?: components['schemas']['WhereClause'];
@@ -3504,7 +3494,10 @@ export type components = {
3504
3494
  /** @example 1 */
3505
3495
  count: number;
3506
3496
  } | {
3507
- data: components['schemas']['Document'][];
3497
+ data: (components['schemas']['Document'] & {
3498
+ /** @example doc-key */
3499
+ id: string;
3500
+ })[];
3508
3501
  };
3509
3502
  };
3510
3503
  /**
@@ -3523,41 +3516,46 @@ export type components = {
3523
3516
  /** @example cms-xxxxx-xxxxx */
3524
3517
  contentSystemId: string;
3525
3518
  /** @example posts */
3526
- collectionId: string;
3519
+ collection: string;
3527
3520
  /** @example false */
3528
3521
  createOnMissing: false | {
3529
3522
  id: string;
3530
3523
  };
3531
- data: components['schemas']['DataWithOperations'];
3532
- where: components['schemas']['WhereClause'];
3524
+ doc: components['schemas']['DataWithOperations'];
3533
3525
  /** @example 10 */
3534
3526
  limit?: number;
3535
- sort?: components['schemas']['SortClause'];
3527
+ meta?: components['schemas']['RequestMeta'];
3536
3528
  returning?: false | {
3537
3529
  join?: components['schemas']['JoinClause'];
3538
3530
  locale?: components['schemas']['LocaleClause'];
3539
3531
  select?: components['schemas']['SelectClause'];
3540
3532
  };
3533
+ sort?: components['schemas']['SortClause'];
3534
+ where: components['schemas']['WhereClause'];
3541
3535
  };
3542
3536
  DeleteDocumentResponse: {
3543
3537
  result?: {
3544
3538
  /** @example 1 */
3545
3539
  count: number;
3546
3540
  } | {
3547
- data: components['schemas']['Document'][];
3541
+ data: (components['schemas']['Document'] & {
3542
+ /** @example doc-key */
3543
+ id: string;
3544
+ })[];
3548
3545
  };
3549
3546
  };
3550
3547
  DeleteDocumentRequest: {
3551
3548
  /** @example cms-xxxxx-xxxxx */
3552
3549
  contentSystemId: string;
3553
3550
  /** @example posts */
3554
- collectionId: string;
3555
- where: components['schemas']['WhereClause'];
3551
+ collection: string;
3552
+ meta?: components['schemas']['RequestMeta'];
3556
3553
  returning?: false | {
3557
3554
  join?: components['schemas']['JoinClause'];
3558
3555
  locale?: components['schemas']['LocaleClause'];
3559
3556
  select?: components['schemas']['SelectClause'];
3560
3557
  };
3558
+ where: components['schemas']['WhereClause'];
3561
3559
  };
3562
3560
  CountDocumentVersionResponse: {
3563
3561
  result: {
@@ -3569,48 +3567,68 @@ export type components = {
3569
3567
  /** @example cms-xxxxx-xxxxx */
3570
3568
  contentSystemId: string;
3571
3569
  /** @example posts */
3572
- collectionId: string;
3570
+ collection: string;
3571
+ meta?: components['schemas']['RequestMeta'];
3573
3572
  where?: components['schemas']['WhereClause'];
3574
3573
  };
3575
3574
  DocumentVersion: {
3576
- /** @example ver-xxxxx-xxxxx */
3577
- id: string;
3578
3575
  /** @example cms-xxxxx-xxxxx */
3579
3576
  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;
3577
+ /** @example posts */
3578
+ collection: string;
3579
+ versionDoc: {
3580
+ /** @example 2024-01-01T00:00:00Z */
3581
+ createdAt?: string | null;
3582
+ /** @example 2024-01-01T00:00:00Z */
3583
+ updatedAt?: string | null;
3584
+ /** @example true */
3585
+ latest?: boolean;
3586
+ /** @example doc-key */
3587
+ parent?: string | number;
3588
+ version: components['schemas']['DocumentData'] & unknown;
3589
+ /** @example ver-xxxxx-xxxxx */
3590
+ id: string;
3591
+ };
3595
3592
  };
3596
3593
  CreateDocumentVersionResponse: {
3597
- result: {
3594
+ result: components['schemas']['DocumentVersion'] & {
3598
3595
  /** @example ver-xxxxx-xxxxx */
3599
3596
  id: string;
3600
- } | {
3601
- data: components['schemas']['DocumentVersion'];
3602
3597
  };
3603
3598
  };
3599
+ /**
3600
+ * @example {
3601
+ * "contentSystemId": "cms-xxxxx-xxxxx",
3602
+ * "collection": "posts",
3603
+ * "versionDoc": {
3604
+ * "createdAt": "2024-01-01T00:00:00Z",
3605
+ * "updatedAt": "2024-01-01T00:00:00Z",
3606
+ * "latest": true,
3607
+ * "parent": "doc-key",
3608
+ * "version": {
3609
+ * "title": "Placeholder title",
3610
+ * "content": "This is placeholder content"
3611
+ * }
3612
+ * },
3613
+ * "returning": false
3614
+ * }
3615
+ */
3604
3616
  CreateDocumentVersionRequest: {
3605
3617
  /** @example cms-xxxxx-xxxxx */
3606
3618
  contentSystemId: string;
3607
3619
  /** @example posts */
3608
- collectionId: string;
3609
- /** @example doc-key */
3610
- documentId: string;
3611
- /** @example true */
3612
- latest?: boolean;
3613
- data: components['schemas']['DocumentData'];
3620
+ collection: string;
3621
+ versionDoc: {
3622
+ /** @example 2024-01-01T00:00:00Z */
3623
+ createdAt?: string | null;
3624
+ /** @example 2024-01-01T00:00:00Z */
3625
+ updatedAt?: string | null;
3626
+ /** @example true */
3627
+ latest?: boolean;
3628
+ /** @example doc-key */
3629
+ parent?: string | number;
3630
+ version: components['schemas']['DocumentData'] & unknown;
3631
+ };
3614
3632
  returning?: false | {
3615
3633
  join?: components['schemas']['JoinClause'];
3616
3634
  locale?: components['schemas']['LocaleClause'];
@@ -3619,21 +3637,33 @@ export type components = {
3619
3637
  };
3620
3638
  FindDocumentVersionsResponse: {
3621
3639
  result: {
3622
- data: components['schemas']['DocumentVersion'][];
3623
- pagination: components['schemas']['Pagination'];
3640
+ data: (components['schemas']['DocumentVersion'] & {
3641
+ /** @example ver-xxxxx-xxxxx */
3642
+ id: string;
3643
+ })[];
3644
+ totalDocs: number;
3645
+ limit: number;
3646
+ page: number;
3647
+ totalPages: number;
3648
+ pagingCounter: number;
3649
+ hasPrevPage: boolean;
3650
+ hasNextPage: boolean;
3651
+ prevPage: number | null;
3652
+ nextPage: number | null;
3624
3653
  };
3625
3654
  };
3626
3655
  FindDocumentVersionsRequest: {
3627
3656
  /** @example cms-xxxxx-xxxxx */
3628
3657
  contentSystemId: string;
3629
3658
  /** @example posts */
3630
- collectionId: string;
3659
+ collection: string;
3631
3660
  join?: components['schemas']['JoinClause'];
3632
3661
  /** @example 10 */
3633
3662
  limit?: number;
3634
3663
  locale?: components['schemas']['LocaleClause'];
3635
3664
  /** @example 1 */
3636
3665
  page?: number;
3666
+ meta?: components['schemas']['RequestMeta'];
3637
3667
  select?: components['schemas']['SelectClause'];
3638
3668
  sort?: components['schemas']['SortClause'];
3639
3669
  where?: components['schemas']['WhereClause'];
@@ -3643,23 +3673,37 @@ export type components = {
3643
3673
  /** @example 1 */
3644
3674
  count: number;
3645
3675
  } | {
3646
- data: components['schemas']['DocumentVersion'][];
3676
+ data: (components['schemas']['DocumentVersion'] & {
3677
+ /** @example ver-xxxxx-xxxxx */
3678
+ id: string;
3679
+ })[];
3647
3680
  };
3648
3681
  };
3649
3682
  UpdateDocumentVersionRequest: {
3650
3683
  /** @example cms-xxxxx-xxxxx */
3651
3684
  contentSystemId: string;
3652
3685
  /** @example posts */
3653
- collectionId: string;
3686
+ collection: string;
3654
3687
  /** @example false */
3655
3688
  createOnMissing: false | {
3656
- documentId: string;
3689
+ parent: string;
3657
3690
  latest: boolean;
3658
3691
  };
3659
- data: components['schemas']['DataWithOperations'];
3692
+ versionDoc: {
3693
+ /** @example 2024-01-01T00:00:00Z */
3694
+ createdAt?: string | null;
3695
+ /** @example 2024-01-01T00:00:00Z */
3696
+ updatedAt?: string | null;
3697
+ /** @example true */
3698
+ latest?: boolean;
3699
+ /** @example doc-key */
3700
+ parent?: string | number;
3701
+ version: components['schemas']['DocumentData'] & unknown;
3702
+ };
3660
3703
  where: components['schemas']['WhereClause'];
3661
3704
  /** @example 10 */
3662
3705
  limit?: number;
3706
+ meta?: components['schemas']['RequestMeta'];
3663
3707
  sort?: components['schemas']['SortClause'];
3664
3708
  returning?: false | {
3665
3709
  join?: components['schemas']['JoinClause'];
@@ -3672,20 +3716,24 @@ export type components = {
3672
3716
  /** @example 1 */
3673
3717
  count: number;
3674
3718
  } | {
3675
- data: components['schemas']['DocumentVersion'][];
3719
+ data: (components['schemas']['DocumentVersion'] & {
3720
+ /** @example ver-xxxxx-xxxxx */
3721
+ id: string;
3722
+ })[];
3676
3723
  };
3677
3724
  };
3678
3725
  DeleteDocumentVersionRequest: {
3679
3726
  /** @example cms-xxxxx-xxxxx */
3680
3727
  contentSystemId: string;
3681
3728
  /** @example posts */
3682
- collectionId: string;
3683
- where: components['schemas']['WhereClause'];
3729
+ collection: string;
3730
+ meta?: components['schemas']['RequestMeta'];
3684
3731
  returning?: false | {
3685
3732
  join?: components['schemas']['JoinClause'];
3686
3733
  locale?: components['schemas']['LocaleClause'];
3687
3734
  select?: components['schemas']['SelectClause'];
3688
3735
  };
3736
+ where: components['schemas']['WhereClause'];
3689
3737
  };
3690
3738
  GeneratePresignedUploadUrlResponse: {
3691
3739
  /** @example https://s3.amazonaws.com/bucket/key?presigned-params */
@@ -3701,6 +3749,8 @@ export type components = {
3701
3749
  * @example 3600
3702
3750
  */
3703
3751
  expiresIn: number;
3752
+ /** @example media */
3753
+ collectionId: string;
3704
3754
  };
3705
3755
  GeneratePresignedDownloadUrlResponse: {
3706
3756
  /** @example https://s3.amazonaws.com/bucket/key?presigned-params */
@@ -3714,6 +3764,8 @@ export type components = {
3714
3764
  * @example 3600
3715
3765
  */
3716
3766
  expiresIn: number;
3767
+ /** @example media */
3768
+ collectionId: string;
3717
3769
  };
3718
3770
  InitiateMultipartUploadResponse: {
3719
3771
  /** @example abc123xyz789 */
@@ -3724,6 +3776,8 @@ export type components = {
3724
3776
  filename: string;
3725
3777
  /** @example video/mp4 */
3726
3778
  contentType: string;
3779
+ /** @example media */
3780
+ collectionId: string;
3727
3781
  };
3728
3782
  GenerateUploadPartUrlsResponse: {
3729
3783
  /**
@@ -3759,6 +3813,8 @@ export type components = {
3759
3813
  * @example 3600
3760
3814
  */
3761
3815
  expiresIn: number;
3816
+ /** @example media */
3817
+ collectionId: string;
3762
3818
  };
3763
3819
  CompleteMultipartUploadResponse: {
3764
3820
  /**
@@ -3786,6 +3842,8 @@ export type components = {
3786
3842
  /** @example "abc123" */
3787
3843
  ETag: string;
3788
3844
  }[];
3845
+ /** @example media */
3846
+ collectionId: string;
3789
3847
  };
3790
3848
  AbortMultipartUploadResponse: {
3791
3849
  /**
@@ -3799,6 +3857,8 @@ export type components = {
3799
3857
  filename: string;
3800
3858
  /** @example abc123xyz789 */
3801
3859
  uploadId: string;
3860
+ /** @example media */
3861
+ collectionId: string;
3802
3862
  };
3803
3863
  DeleteFileResponse: {
3804
3864
  /**