@payloadcms/payload-cloud 3.0.0-canary.dc8b1fe → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
- (The MIT License)
1
+ MIT License
2
2
 
3
- Copyright (c) 2018-2022 Payload CMS, LLC <info@payloadcms.com>
3
+ Copyright (c) 2018-2024 Payload CMS, Inc. <info@payloadcms.com>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { CollectionConfig, Config, FileData, PayloadRequest, TypeWithID } from 'payload';
1
+ import type { CollectionConfig, Config, FileData, PayloadRequest, TypeWithID, UploadCollectionSlug } from 'payload';
2
2
  export interface File {
3
3
  buffer: Buffer;
4
4
  filename: string;
@@ -81,7 +81,7 @@ export interface PluginOptions {
81
81
  /**
82
82
  * Caching configuration per-collection
83
83
  */
84
- collections?: Record<string, CollectionCachingConfig>;
84
+ collections?: Partial<Record<UploadCollectionSlug, CollectionCachingConfig>>;
85
85
  /** Caching in seconds override for all collections
86
86
  * @default 86400 (24 hours)
87
87
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAE7F,MAAM,WAAW,IAAI;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE;IAChC,UAAU,EAAE,gBAAgB,CAAA;IAC5B,IAAI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;;;;;;;;;;;;;OAiBG;IAEH,aAAa,CAAC,EACV;QACE;;WAEG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,CAAC,CAAA;QAC5E;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,GACD,KAAK,CAAA;CACV;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA"}
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { CollectionConfig, Config, FileData, PayloadRequest, TypeWithID } from 'payload'\n\nexport interface File {\n buffer: Buffer\n filename: string\n filesize: number\n mimeType: string\n tempFilePath?: string\n}\n\nexport type HandleUpload = (args: {\n collection: CollectionConfig\n data: any\n file: File\n req: PayloadRequest\n}) => Promise<void> | void\n\nexport interface TypeWithPrefix {\n prefix?: string\n}\n\nexport type HandleDelete = (args: {\n collection: CollectionConfig\n doc: FileData & TypeWithID & TypeWithPrefix\n filename: string\n req: PayloadRequest\n}) => Promise<void> | void\n\nexport type GenerateURL = (args: {\n collection: CollectionConfig\n filename: string\n prefix?: string\n}) => Promise<string> | string\n\nexport type StaticHandler = (\n req: PayloadRequest,\n args: { params: { collection: string; filename: string } },\n) => Promise<Response> | Promise<void> | Response | void\n\nexport interface PayloadCloudEmailOptions {\n apiKey: string\n config: Config\n defaultDomain: string\n defaultFromAddress?: string\n defaultFromName?: string\n skipVerify?: boolean\n}\n\nexport interface PluginOptions {\n /** Payload Cloud Email\n * @default true\n */\n email?:\n | {\n defaultFromAddress: string\n defaultFromName: string\n skipVerify?: boolean\n }\n | false\n\n /**\n * Payload Cloud API endpoint\n *\n * @internal Endpoint override for developement\n */\n endpoint?: string\n\n /** Payload Cloud Storage\n * @default true\n */\n storage?: false\n\n /**\n * Upload caching. Defaults to 24 hours for all collections.\n *\n * Optionally configure caching per collection\n *\n * ```ts\n * {\n * collSlug1: {\n * maxAge: 3600 // Custom value in seconds\n * },\n * collSlug2: {\n * enabled: false // Disable caching for this collection\n * }\n * }\n * ```\n *\n * @default true\n */\n\n uploadCaching?:\n | {\n /**\n * Caching configuration per-collection\n */\n collections?: Record<string, CollectionCachingConfig>\n /** Caching in seconds override for all collections\n * @default 86400 (24 hours)\n */\n maxAge?: number\n }\n | false\n}\n\nexport type CollectionCachingConfig = {\n /**\n * Enable/disable caching for this collection\n *\n * @default true\n */\n enabled?: boolean\n /** Caching in seconds override for this collection\n * @default 86400 (24 hours)\n */\n maxAge?: number\n}\n"],"names":[],"mappings":"AAyGA,WAWC"}
1
+ {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type {\n CollectionConfig,\n Config,\n FileData,\n PayloadRequest,\n TypeWithID,\n UploadCollectionSlug,\n} from 'payload'\n\nexport interface File {\n buffer: Buffer\n filename: string\n filesize: number\n mimeType: string\n tempFilePath?: string\n}\n\nexport type HandleUpload = (args: {\n collection: CollectionConfig\n data: any\n file: File\n req: PayloadRequest\n}) => Promise<void> | void\n\nexport interface TypeWithPrefix {\n prefix?: string\n}\n\nexport type HandleDelete = (args: {\n collection: CollectionConfig\n doc: FileData & TypeWithID & TypeWithPrefix\n filename: string\n req: PayloadRequest\n}) => Promise<void> | void\n\nexport type GenerateURL = (args: {\n collection: CollectionConfig\n filename: string\n prefix?: string\n}) => Promise<string> | string\n\nexport type StaticHandler = (\n req: PayloadRequest,\n args: { params: { collection: string; filename: string } },\n) => Promise<Response> | Promise<void> | Response | void\n\nexport interface PayloadCloudEmailOptions {\n apiKey: string\n config: Config\n defaultDomain: string\n defaultFromAddress?: string\n defaultFromName?: string\n skipVerify?: boolean\n}\n\nexport interface PluginOptions {\n /** Payload Cloud Email\n * @default true\n */\n email?:\n | {\n defaultFromAddress: string\n defaultFromName: string\n skipVerify?: boolean\n }\n | false\n\n /**\n * Payload Cloud API endpoint\n *\n * @internal Endpoint override for developement\n */\n endpoint?: string\n\n /** Payload Cloud Storage\n * @default true\n */\n storage?: false\n\n /**\n * Upload caching. Defaults to 24 hours for all collections.\n *\n * Optionally configure caching per collection\n *\n * ```ts\n * {\n * collSlug1: {\n * maxAge: 3600 // Custom value in seconds\n * },\n * collSlug2: {\n * enabled: false // Disable caching for this collection\n * }\n * }\n * ```\n *\n * @default true\n */\n\n uploadCaching?:\n | {\n /**\n * Caching configuration per-collection\n */\n collections?: Partial<Record<UploadCollectionSlug, CollectionCachingConfig>>\n /** Caching in seconds override for all collections\n * @default 86400 (24 hours)\n */\n maxAge?: number\n }\n | false\n}\n\nexport type CollectionCachingConfig = {\n /**\n * Enable/disable caching for this collection\n *\n * @default true\n */\n enabled?: boolean\n /** Caching in seconds override for this collection\n * @default 86400 (24 hours)\n */\n maxAge?: number\n}\n"],"names":[],"mappings":"AAgHA,WAWC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/payload-cloud",
3
- "version": "3.0.0-canary.dc8b1fe",
3
+ "version": "3.0.0",
4
4
  "description": "The official Payload Cloud plugin",
5
5
  "homepage": "https://payloadcms.com",
6
6
  "repository": {
@@ -9,6 +9,14 @@
9
9
  "directory": "packages/payload-cloud"
10
10
  },
11
11
  "license": "MIT",
12
+ "author": "Payload <dev@payloadcms.com> (https://payloadcms.com)",
13
+ "maintainers": [
14
+ {
15
+ "name": "Payload",
16
+ "email": "info@payloadcms.com",
17
+ "url": "https://payloadcms.com"
18
+ }
19
+ ],
12
20
  "type": "module",
13
21
  "exports": {
14
22
  ".": {
@@ -30,16 +38,16 @@
30
38
  "amazon-cognito-identity-js": "^6.1.2",
31
39
  "nodemailer": "6.9.10",
32
40
  "resend": "^0.17.2",
33
- "@payloadcms/email-nodemailer": "3.0.0-canary.dc8b1fe"
41
+ "@payloadcms/email-nodemailer": "3.0.0"
34
42
  },
35
43
  "devDependencies": {
36
44
  "@types/jest": "29.5.12",
37
45
  "@types/nodemailer": "6.4.14",
38
46
  "ts-jest": "^29.1.0",
39
- "payload": "3.0.0-canary.dc8b1fe"
47
+ "payload": "3.0.0"
40
48
  },
41
49
  "peerDependencies": {
42
- "payload": "3.0.0-canary.dc8b1fe"
50
+ "payload": "3.0.0"
43
51
  },
44
52
  "scripts": {
45
53
  "build": "pnpm build:types && pnpm build:swc",