@payloadcms/figma 0.0.1-alpha.40 → 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.
- package/dist/auth/oauth-flow.d.ts.map +1 -1
- package/dist/auth/oauth-flow.js +6 -3
- package/dist/auth/oauth-flow.js.map +1 -1
- package/dist/auth/refresh.d.ts +2 -1
- package/dist/auth/refresh.d.ts.map +1 -1
- package/dist/auth/refresh.js +11 -3
- package/dist/auth/refresh.js.map +1 -1
- package/dist/auth/token-store.d.ts +6 -4
- package/dist/auth/token-store.d.ts.map +1 -1
- package/dist/auth/token-store.js +17 -14
- package/dist/auth/token-store.js.map +1 -1
- package/dist/auth/types.d.ts +7 -4
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/auth/types.js.map +1 -1
- package/dist/cli.js +8 -6
- package/dist/cli.js.map +1 -1
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +2 -1
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +12 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/list-tokens.d.ts +3 -3
- package/dist/commands/list-tokens.d.ts.map +1 -1
- package/dist/commands/list-tokens.js +20 -8
- package/dist/commands/list-tokens.js.map +1 -1
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +12 -4
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/logout.d.ts +5 -4
- package/dist/commands/logout.d.ts.map +1 -1
- package/dist/commands/logout.js +55 -12
- package/dist/commands/logout.js.map +1 -1
- package/dist/db-content-api/generated/content-api-types.d.ts +168 -102
- package/dist/db-content-api/generated/content-api-types.d.ts.map +1 -1
- package/dist/db-content-api/generated/content-api-types.js.map +1 -1
- package/dist/db-content-api/index.d.ts.map +1 -1
- package/dist/db-content-api/index.js +82 -67
- package/dist/db-content-api/index.js.map +1 -1
- package/dist/db-content-api/temp-utilities/unwrapDocument.d.ts +31 -1
- package/dist/db-content-api/temp-utilities/unwrapDocument.d.ts.map +1 -1
- package/dist/db-content-api/temp-utilities/unwrapDocument.js +24 -24
- package/dist/db-content-api/temp-utilities/unwrapDocument.js.map +1 -1
- package/dist/db-content-api/utilities/buildPathTypes.d.ts +12 -0
- package/dist/db-content-api/utilities/buildPathTypes.d.ts.map +1 -0
- package/dist/db-content-api/utilities/buildPathTypes.js +157 -0
- package/dist/db-content-api/utilities/buildPathTypes.js.map +1 -0
- package/dist/db-content-api/utilities/data/index.d.ts +2 -0
- package/dist/db-content-api/utilities/data/index.d.ts.map +1 -1
- package/dist/db-content-api/utilities/data/index.js +18 -1
- package/dist/db-content-api/utilities/data/index.js.map +1 -1
- package/dist/db-content-api/utilities/where.d.ts.map +1 -1
- package/dist/db-content-api/utilities/where.js +17 -3
- package/dist/db-content-api/utilities/where.js.map +1 -1
- package/dist/oauth/components/LogoutButton/index.d.ts.map +1 -1
- package/dist/oauth/components/LogoutButton/index.js +5 -3
- package/dist/oauth/components/LogoutButton/index.js.map +1 -1
- package/dist/oauth/endpoints/getLoginEndpoint.d.ts.map +1 -1
- package/dist/oauth/endpoints/getLoginEndpoint.js +17 -7
- package/dist/oauth/endpoints/getLoginEndpoint.js.map +1 -1
- package/dist/oauth/endpoints/getLogoutEndpoint.d.ts.map +1 -1
- package/dist/oauth/endpoints/getLogoutEndpoint.js +7 -4
- package/dist/oauth/endpoints/getLogoutEndpoint.js.map +1 -1
- package/dist/plugin/build-config.js +3 -3
- package/dist/plugin/build-config.js.map +1 -1
- package/dist/storage-content-api/api-types.d.ts +8 -1
- package/dist/storage-content-api/api-types.d.ts.map +1 -1
- package/dist/storage-content-api/api-types.js.map +1 -1
- package/dist/storage-content-api/client-uploads/generateSignedURL.js +1 -0
- package/dist/storage-content-api/client-uploads/generateSignedURL.js.map +1 -1
- package/dist/storage-content-api/generateURL.d.ts.map +1 -1
- package/dist/storage-content-api/generateURL.js +3 -2
- package/dist/storage-content-api/generateURL.js.map +1 -1
- package/dist/storage-content-api/handleDelete.d.ts.map +1 -1
- package/dist/storage-content-api/handleDelete.js +4 -2
- package/dist/storage-content-api/handleDelete.js.map +1 -1
- package/dist/storage-content-api/handleUpload.d.ts +1 -1
- package/dist/storage-content-api/handleUpload.d.ts.map +1 -1
- package/dist/storage-content-api/handleUpload.js +11 -3
- package/dist/storage-content-api/handleUpload.js.map +1 -1
- package/dist/storage-content-api/staticHandler.js +1 -0
- package/dist/storage-content-api/staticHandler.js.map +1 -1
- package/dist/utils/format-env-suffix.d.ts +12 -0
- package/dist/utils/format-env-suffix.d.ts.map +1 -0
- package/dist/utils/format-env-suffix.js +13 -0
- package/dist/utils/format-env-suffix.js.map +1 -0
- package/dist/utils/lambda-config.js +26 -12
- package/dist/utils/lambda-config.js.map +1 -1
- package/dist/utils/messages.d.ts.map +1 -1
- package/dist/utils/messages.js +1 -2
- package/dist/utils/messages.js.map +1 -1
- package/package.json +1 -1
- package/dist/db-content-api/temp-utilities/pagination.d.ts +0 -13
- package/dist/db-content-api/temp-utilities/pagination.d.ts.map +0 -1
- package/dist/db-content-api/temp-utilities/pagination.js +0 -45
- package/dist/db-content-api/temp-utilities/pagination.js.map +0 -1
- package/dist/oauth/utilities/getAdminPath.d.ts +0 -8
- package/dist/oauth/utilities/getAdminPath.d.ts.map +0 -1
- package/dist/oauth/utilities/getAdminPath.js +0 -9
- 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
|
|
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
|
-
|
|
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
|
-
|
|
3364
|
-
|
|
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-
|
|
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
|
-
* "
|
|
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
|
-
|
|
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
|
-
|
|
3444
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,38 +3516,46 @@ export type components = {
|
|
|
3523
3516
|
/** @example cms-xxxxx-xxxxx */
|
|
3524
3517
|
contentSystemId: string;
|
|
3525
3518
|
/** @example posts */
|
|
3526
|
-
|
|
3519
|
+
collection: string;
|
|
3527
3520
|
/** @example false */
|
|
3528
3521
|
createOnMissing: false | {
|
|
3529
3522
|
id: string;
|
|
3530
3523
|
};
|
|
3531
|
-
|
|
3532
|
-
|
|
3524
|
+
doc: components['schemas']['DataWithOperations'];
|
|
3525
|
+
/** @example 10 */
|
|
3526
|
+
limit?: number;
|
|
3527
|
+
meta?: components['schemas']['RequestMeta'];
|
|
3533
3528
|
returning?: false | {
|
|
3534
3529
|
join?: components['schemas']['JoinClause'];
|
|
3535
3530
|
locale?: components['schemas']['LocaleClause'];
|
|
3536
3531
|
select?: components['schemas']['SelectClause'];
|
|
3537
3532
|
};
|
|
3533
|
+
sort?: components['schemas']['SortClause'];
|
|
3534
|
+
where: components['schemas']['WhereClause'];
|
|
3538
3535
|
};
|
|
3539
3536
|
DeleteDocumentResponse: {
|
|
3540
3537
|
result?: {
|
|
3541
3538
|
/** @example 1 */
|
|
3542
3539
|
count: number;
|
|
3543
3540
|
} | {
|
|
3544
|
-
data: components['schemas']['Document']
|
|
3541
|
+
data: (components['schemas']['Document'] & {
|
|
3542
|
+
/** @example doc-key */
|
|
3543
|
+
id: string;
|
|
3544
|
+
})[];
|
|
3545
3545
|
};
|
|
3546
3546
|
};
|
|
3547
3547
|
DeleteDocumentRequest: {
|
|
3548
3548
|
/** @example cms-xxxxx-xxxxx */
|
|
3549
3549
|
contentSystemId: string;
|
|
3550
3550
|
/** @example posts */
|
|
3551
|
-
|
|
3552
|
-
|
|
3551
|
+
collection: string;
|
|
3552
|
+
meta?: components['schemas']['RequestMeta'];
|
|
3553
3553
|
returning?: false | {
|
|
3554
3554
|
join?: components['schemas']['JoinClause'];
|
|
3555
3555
|
locale?: components['schemas']['LocaleClause'];
|
|
3556
3556
|
select?: components['schemas']['SelectClause'];
|
|
3557
3557
|
};
|
|
3558
|
+
where: components['schemas']['WhereClause'];
|
|
3558
3559
|
};
|
|
3559
3560
|
CountDocumentVersionResponse: {
|
|
3560
3561
|
result: {
|
|
@@ -3566,48 +3567,68 @@ export type components = {
|
|
|
3566
3567
|
/** @example cms-xxxxx-xxxxx */
|
|
3567
3568
|
contentSystemId: string;
|
|
3568
3569
|
/** @example posts */
|
|
3569
|
-
|
|
3570
|
+
collection: string;
|
|
3571
|
+
meta?: components['schemas']['RequestMeta'];
|
|
3570
3572
|
where?: components['schemas']['WhereClause'];
|
|
3571
3573
|
};
|
|
3572
3574
|
DocumentVersion: {
|
|
3573
|
-
/** @example ver-xxxxx-xxxxx */
|
|
3574
|
-
id: string;
|
|
3575
3575
|
/** @example cms-xxxxx-xxxxx */
|
|
3576
3576
|
contentSystemId: string;
|
|
3577
|
-
/** @example
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
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
|
+
};
|
|
3592
3592
|
};
|
|
3593
3593
|
CreateDocumentVersionResponse: {
|
|
3594
|
-
result: {
|
|
3594
|
+
result: components['schemas']['DocumentVersion'] & {
|
|
3595
3595
|
/** @example ver-xxxxx-xxxxx */
|
|
3596
3596
|
id: string;
|
|
3597
|
-
} | {
|
|
3598
|
-
data: components['schemas']['DocumentVersion'];
|
|
3599
3597
|
};
|
|
3600
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
|
+
*/
|
|
3601
3616
|
CreateDocumentVersionRequest: {
|
|
3602
3617
|
/** @example cms-xxxxx-xxxxx */
|
|
3603
3618
|
contentSystemId: string;
|
|
3604
3619
|
/** @example posts */
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
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
|
+
};
|
|
3611
3632
|
returning?: false | {
|
|
3612
3633
|
join?: components['schemas']['JoinClause'];
|
|
3613
3634
|
locale?: components['schemas']['LocaleClause'];
|
|
@@ -3616,21 +3637,33 @@ export type components = {
|
|
|
3616
3637
|
};
|
|
3617
3638
|
FindDocumentVersionsResponse: {
|
|
3618
3639
|
result: {
|
|
3619
|
-
data: components['schemas']['DocumentVersion']
|
|
3620
|
-
|
|
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;
|
|
3621
3653
|
};
|
|
3622
3654
|
};
|
|
3623
3655
|
FindDocumentVersionsRequest: {
|
|
3624
3656
|
/** @example cms-xxxxx-xxxxx */
|
|
3625
3657
|
contentSystemId: string;
|
|
3626
3658
|
/** @example posts */
|
|
3627
|
-
|
|
3659
|
+
collection: string;
|
|
3628
3660
|
join?: components['schemas']['JoinClause'];
|
|
3629
3661
|
/** @example 10 */
|
|
3630
3662
|
limit?: number;
|
|
3631
3663
|
locale?: components['schemas']['LocaleClause'];
|
|
3632
3664
|
/** @example 1 */
|
|
3633
3665
|
page?: number;
|
|
3666
|
+
meta?: components['schemas']['RequestMeta'];
|
|
3634
3667
|
select?: components['schemas']['SelectClause'];
|
|
3635
3668
|
sort?: components['schemas']['SortClause'];
|
|
3636
3669
|
where?: components['schemas']['WhereClause'];
|
|
@@ -3640,21 +3673,38 @@ export type components = {
|
|
|
3640
3673
|
/** @example 1 */
|
|
3641
3674
|
count: number;
|
|
3642
3675
|
} | {
|
|
3643
|
-
data: components['schemas']['DocumentVersion']
|
|
3676
|
+
data: (components['schemas']['DocumentVersion'] & {
|
|
3677
|
+
/** @example ver-xxxxx-xxxxx */
|
|
3678
|
+
id: string;
|
|
3679
|
+
})[];
|
|
3644
3680
|
};
|
|
3645
3681
|
};
|
|
3646
3682
|
UpdateDocumentVersionRequest: {
|
|
3647
3683
|
/** @example cms-xxxxx-xxxxx */
|
|
3648
3684
|
contentSystemId: string;
|
|
3649
3685
|
/** @example posts */
|
|
3650
|
-
|
|
3686
|
+
collection: string;
|
|
3651
3687
|
/** @example false */
|
|
3652
3688
|
createOnMissing: false | {
|
|
3653
|
-
|
|
3689
|
+
parent: string;
|
|
3654
3690
|
latest: boolean;
|
|
3655
3691
|
};
|
|
3656
|
-
|
|
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
|
+
};
|
|
3657
3703
|
where: components['schemas']['WhereClause'];
|
|
3704
|
+
/** @example 10 */
|
|
3705
|
+
limit?: number;
|
|
3706
|
+
meta?: components['schemas']['RequestMeta'];
|
|
3707
|
+
sort?: components['schemas']['SortClause'];
|
|
3658
3708
|
returning?: false | {
|
|
3659
3709
|
join?: components['schemas']['JoinClause'];
|
|
3660
3710
|
locale?: components['schemas']['LocaleClause'];
|
|
@@ -3666,20 +3716,24 @@ export type components = {
|
|
|
3666
3716
|
/** @example 1 */
|
|
3667
3717
|
count: number;
|
|
3668
3718
|
} | {
|
|
3669
|
-
data: components['schemas']['DocumentVersion']
|
|
3719
|
+
data: (components['schemas']['DocumentVersion'] & {
|
|
3720
|
+
/** @example ver-xxxxx-xxxxx */
|
|
3721
|
+
id: string;
|
|
3722
|
+
})[];
|
|
3670
3723
|
};
|
|
3671
3724
|
};
|
|
3672
3725
|
DeleteDocumentVersionRequest: {
|
|
3673
3726
|
/** @example cms-xxxxx-xxxxx */
|
|
3674
3727
|
contentSystemId: string;
|
|
3675
3728
|
/** @example posts */
|
|
3676
|
-
|
|
3677
|
-
|
|
3729
|
+
collection: string;
|
|
3730
|
+
meta?: components['schemas']['RequestMeta'];
|
|
3678
3731
|
returning?: false | {
|
|
3679
3732
|
join?: components['schemas']['JoinClause'];
|
|
3680
3733
|
locale?: components['schemas']['LocaleClause'];
|
|
3681
3734
|
select?: components['schemas']['SelectClause'];
|
|
3682
3735
|
};
|
|
3736
|
+
where: components['schemas']['WhereClause'];
|
|
3683
3737
|
};
|
|
3684
3738
|
GeneratePresignedUploadUrlResponse: {
|
|
3685
3739
|
/** @example https://s3.amazonaws.com/bucket/key?presigned-params */
|
|
@@ -3695,6 +3749,8 @@ export type components = {
|
|
|
3695
3749
|
* @example 3600
|
|
3696
3750
|
*/
|
|
3697
3751
|
expiresIn: number;
|
|
3752
|
+
/** @example media */
|
|
3753
|
+
collectionId: string;
|
|
3698
3754
|
};
|
|
3699
3755
|
GeneratePresignedDownloadUrlResponse: {
|
|
3700
3756
|
/** @example https://s3.amazonaws.com/bucket/key?presigned-params */
|
|
@@ -3708,6 +3764,8 @@ export type components = {
|
|
|
3708
3764
|
* @example 3600
|
|
3709
3765
|
*/
|
|
3710
3766
|
expiresIn: number;
|
|
3767
|
+
/** @example media */
|
|
3768
|
+
collectionId: string;
|
|
3711
3769
|
};
|
|
3712
3770
|
InitiateMultipartUploadResponse: {
|
|
3713
3771
|
/** @example abc123xyz789 */
|
|
@@ -3718,6 +3776,8 @@ export type components = {
|
|
|
3718
3776
|
filename: string;
|
|
3719
3777
|
/** @example video/mp4 */
|
|
3720
3778
|
contentType: string;
|
|
3779
|
+
/** @example media */
|
|
3780
|
+
collectionId: string;
|
|
3721
3781
|
};
|
|
3722
3782
|
GenerateUploadPartUrlsResponse: {
|
|
3723
3783
|
/**
|
|
@@ -3753,6 +3813,8 @@ export type components = {
|
|
|
3753
3813
|
* @example 3600
|
|
3754
3814
|
*/
|
|
3755
3815
|
expiresIn: number;
|
|
3816
|
+
/** @example media */
|
|
3817
|
+
collectionId: string;
|
|
3756
3818
|
};
|
|
3757
3819
|
CompleteMultipartUploadResponse: {
|
|
3758
3820
|
/**
|
|
@@ -3780,6 +3842,8 @@ export type components = {
|
|
|
3780
3842
|
/** @example "abc123" */
|
|
3781
3843
|
ETag: string;
|
|
3782
3844
|
}[];
|
|
3845
|
+
/** @example media */
|
|
3846
|
+
collectionId: string;
|
|
3783
3847
|
};
|
|
3784
3848
|
AbortMultipartUploadResponse: {
|
|
3785
3849
|
/**
|
|
@@ -3793,6 +3857,8 @@ export type components = {
|
|
|
3793
3857
|
filename: string;
|
|
3794
3858
|
/** @example abc123xyz789 */
|
|
3795
3859
|
uploadId: string;
|
|
3860
|
+
/** @example media */
|
|
3861
|
+
collectionId: string;
|
|
3796
3862
|
};
|
|
3797
3863
|
DeleteFileResponse: {
|
|
3798
3864
|
/**
|