@payloadcms/plugin-multi-tenant 4.0.0-beta.5 → 4.0.0-beta.7

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 (35) hide show
  1. package/dist/hooks/afterTenantDelete.d.ts +1 -1
  2. package/dist/hooks/afterTenantDelete.d.ts.map +1 -1
  3. package/dist/hooks/afterTenantDelete.js +17 -16
  4. package/dist/hooks/afterTenantDelete.js.map +1 -1
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +286 -214
  7. package/dist/index.js.map +1 -1
  8. package/dist/utilities/addCollectionAccess.d.ts +4 -5
  9. package/dist/utilities/addCollectionAccess.d.ts.map +1 -1
  10. package/dist/utilities/addCollectionAccess.js +36 -102
  11. package/dist/utilities/addCollectionAccess.js.map +1 -1
  12. package/dist/utilities/addFilterOptionsToFields.d.ts +2 -3
  13. package/dist/utilities/addFilterOptionsToFields.d.ts.map +1 -1
  14. package/dist/utilities/addFilterOptionsToFields.js +37 -40
  15. package/dist/utilities/addFilterOptionsToFields.js.map +1 -1
  16. package/dist/utilities/collectionAccessKeys.d.ts +3 -0
  17. package/dist/utilities/collectionAccessKeys.d.ts.map +1 -0
  18. package/dist/utilities/collectionAccessKeys.js +11 -0
  19. package/dist/utilities/collectionAccessKeys.js.map +1 -0
  20. package/dist/utilities/combineBaseAccessWithTenantAccess.d.ts +7 -0
  21. package/dist/utilities/combineBaseAccessWithTenantAccess.d.ts.map +1 -0
  22. package/dist/utilities/combineBaseAccessWithTenantAccess.js +35 -0
  23. package/dist/utilities/combineBaseAccessWithTenantAccess.js.map +1 -0
  24. package/dist/utilities/combineCollectionAccessWithTenantAccess.d.ts +4 -0
  25. package/dist/utilities/combineCollectionAccessWithTenantAccess.d.ts.map +1 -0
  26. package/dist/utilities/combineCollectionAccessWithTenantAccess.js +26 -0
  27. package/dist/utilities/combineCollectionAccessWithTenantAccess.js.map +1 -0
  28. package/dist/utilities/getGlobalViewRedirect.d.ts.map +1 -1
  29. package/dist/utilities/getGlobalViewRedirect.js +24 -20
  30. package/dist/utilities/getGlobalViewRedirect.js.map +1 -1
  31. package/dist/utilities/getTenantAccessResult.d.ts +9 -0
  32. package/dist/utilities/getTenantAccessResult.d.ts.map +1 -0
  33. package/dist/utilities/getTenantAccessResult.js +46 -0
  34. package/dist/utilities/getTenantAccessResult.js.map +1 -0
  35. package/package.json +6 -6
@@ -13,7 +13,7 @@ type Args = {
13
13
  * - delete documents related to tenant
14
14
  * - remove tenant from users
15
15
  */
16
- export declare const addTenantCleanup: ({ collection, enabledSlugs, tenantFieldName, tenantsCollectionSlug, usersSlug, usersTenantsArrayFieldName, usersTenantsArrayTenantFieldName, }: Args) => void;
16
+ export declare const addTenantCleanup: ({ collection, enabledSlugs, tenantFieldName, tenantsCollectionSlug, usersSlug, usersTenantsArrayFieldName, usersTenantsArrayTenantFieldName, }: Args) => CollectionConfig;
17
17
  export declare const afterTenantDelete: ({ enabledSlugs, tenantFieldName, tenantsCollectionSlug, usersSlug, usersTenantsArrayFieldName, usersTenantsArrayTenantFieldName, }: Omit<Args, 'collection'>) => CollectionAfterDeleteHook;
18
18
  export {};
19
19
  //# sourceMappingURL=afterTenantDelete.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"afterTenantDelete.d.ts","sourceRoot":"","sources":["../../src/hooks/afterTenantDelete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,gBAAgB,EAGjB,MAAM,SAAS,CAAA;AAShB,KAAK,IAAI,GAAG;IACV,UAAU,EAAE,gBAAgB,CAAA;IAC5B,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,eAAe,EAAE,MAAM,CAAA;IACvB,qBAAqB,EAAE,MAAM,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;IACjB,0BAA0B,EAAE,MAAM,CAAA;IAClC,gCAAgC,EAAE,MAAM,CAAA;CACzC,CAAA;AACD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,mJAQ1B,IAAI,SAiBN,CAAA;AAED,eAAO,MAAM,iBAAiB,uIAQzB,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,KAAG,yBA+E7B,CAAA"}
1
+ {"version":3,"file":"afterTenantDelete.d.ts","sourceRoot":"","sources":["../../src/hooks/afterTenantDelete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,gBAAgB,EAGjB,MAAM,SAAS,CAAA;AAShB,KAAK,IAAI,GAAG;IACV,UAAU,EAAE,gBAAgB,CAAA;IAC5B,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,eAAe,EAAE,MAAM,CAAA;IACvB,qBAAqB,EAAE,MAAM,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;IACjB,0BAA0B,EAAE,MAAM,CAAA;IAClC,gCAAgC,EAAE,MAAM,CAAA;CACzC,CAAA;AACD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,mJAQ1B,IAAI,KAAG,gBAgBR,CAAA;AAEF,eAAO,MAAM,iBAAiB,uIAQzB,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,KAAG,yBA+E7B,CAAA"}
@@ -5,22 +5,23 @@ import { getTenantFromCookie } from '../utilities/getTenantFromCookie.js';
5
5
  * Add cleanup logic when tenant is deleted
6
6
  * - delete documents related to tenant
7
7
  * - remove tenant from users
8
- */ export const addTenantCleanup = ({ collection, enabledSlugs, tenantFieldName, tenantsCollectionSlug, usersSlug, usersTenantsArrayFieldName, usersTenantsArrayTenantFieldName })=>{
9
- if (!collection.hooks) {
10
- collection.hooks = {};
11
- }
12
- if (!collection.hooks?.afterDelete) {
13
- collection.hooks.afterDelete = [];
14
- }
15
- collection.hooks.afterDelete.push(afterTenantDelete({
16
- enabledSlugs,
17
- tenantFieldName,
18
- tenantsCollectionSlug,
19
- usersSlug,
20
- usersTenantsArrayFieldName,
21
- usersTenantsArrayTenantFieldName
22
- }));
23
- };
8
+ */ export const addTenantCleanup = ({ collection, enabledSlugs, tenantFieldName, tenantsCollectionSlug, usersSlug, usersTenantsArrayFieldName, usersTenantsArrayTenantFieldName })=>({
9
+ ...collection,
10
+ hooks: {
11
+ ...collection.hooks,
12
+ afterDelete: [
13
+ ...collection.hooks?.afterDelete || [],
14
+ afterTenantDelete({
15
+ enabledSlugs,
16
+ tenantFieldName,
17
+ tenantsCollectionSlug,
18
+ usersSlug,
19
+ usersTenantsArrayFieldName,
20
+ usersTenantsArrayTenantFieldName
21
+ })
22
+ ]
23
+ }
24
+ });
24
25
  export const afterTenantDelete = ({ enabledSlugs, tenantFieldName, tenantsCollectionSlug, usersSlug, usersTenantsArrayFieldName, usersTenantsArrayTenantFieldName })=>async ({ id, req })=>{
25
26
  const idType = getCollectionIDType({
26
27
  collectionSlug: tenantsCollectionSlug,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/afterTenantDelete.ts"],"sourcesContent":["import type {\n CollectionAfterDeleteHook,\n CollectionConfig,\n JsonObject,\n PaginatedDocs,\n} from 'payload'\n\nimport { generateCookie, mergeHeaders } from 'payload'\n\nimport type { UserWithTenantsField } from '../types.js'\n\nimport { getCollectionIDType } from '../utilities/getCollectionIDType.js'\nimport { getTenantFromCookie } from '../utilities/getTenantFromCookie.js'\n\ntype Args = {\n collection: CollectionConfig\n enabledSlugs: string[]\n tenantFieldName: string\n tenantsCollectionSlug: string\n usersSlug: string\n usersTenantsArrayFieldName: string\n usersTenantsArrayTenantFieldName: string\n}\n/**\n * Add cleanup logic when tenant is deleted\n * - delete documents related to tenant\n * - remove tenant from users\n */\nexport const addTenantCleanup = ({\n collection,\n enabledSlugs,\n tenantFieldName,\n tenantsCollectionSlug,\n usersSlug,\n usersTenantsArrayFieldName,\n usersTenantsArrayTenantFieldName,\n}: Args) => {\n if (!collection.hooks) {\n collection.hooks = {}\n }\n if (!collection.hooks?.afterDelete) {\n collection.hooks.afterDelete = []\n }\n collection.hooks.afterDelete.push(\n afterTenantDelete({\n enabledSlugs,\n tenantFieldName,\n tenantsCollectionSlug,\n usersSlug,\n usersTenantsArrayFieldName,\n usersTenantsArrayTenantFieldName,\n }),\n )\n}\n\nexport const afterTenantDelete =\n ({\n enabledSlugs,\n tenantFieldName,\n tenantsCollectionSlug,\n usersSlug,\n usersTenantsArrayFieldName,\n usersTenantsArrayTenantFieldName,\n }: Omit<Args, 'collection'>): CollectionAfterDeleteHook =>\n async ({ id, req }) => {\n const idType = getCollectionIDType({\n collectionSlug: tenantsCollectionSlug,\n payload: req.payload,\n })\n const currentTenantCookieID = getTenantFromCookie(req.headers, idType)\n if (currentTenantCookieID === id) {\n const newHeaders = new Headers({\n 'Set-Cookie': generateCookie<string>({\n name: 'payload-tenant',\n expires: new Date(Date.now() - 1000),\n path: '/',\n returnCookieAsObject: false,\n value: '',\n }),\n })\n\n req.responseHeaders = req.responseHeaders\n ? mergeHeaders(req.responseHeaders, newHeaders)\n : newHeaders\n }\n const cleanupPromises: Promise<JsonObject>[] = []\n enabledSlugs.forEach((slug) => {\n cleanupPromises.push(\n req.payload.delete({\n collection: slug,\n overrideAccess: true,\n req,\n where: {\n [tenantFieldName]: {\n in: [id],\n },\n },\n }),\n )\n })\n\n try {\n const usersWithTenant = (await req.payload.find({\n collection: usersSlug,\n depth: 0,\n limit: 0,\n overrideAccess: true,\n req,\n where: {\n [`${usersTenantsArrayFieldName}.${usersTenantsArrayTenantFieldName}`]: {\n in: [id],\n },\n },\n })) as PaginatedDocs<UserWithTenantsField>\n\n usersWithTenant?.docs?.forEach((user) => {\n cleanupPromises.push(\n req.payload.update({\n id: user.id,\n collection: usersSlug,\n data: {\n [usersTenantsArrayFieldName]: (\n ((user as Record<string, unknown>)[usersTenantsArrayFieldName] as Record<\n string,\n string\n >[]) || []\n ).filter((row: Record<string, string>) => {\n if (row[usersTenantsArrayTenantFieldName]) {\n return row[usersTenantsArrayTenantFieldName] !== id\n }\n }),\n },\n overrideAccess: true,\n req,\n }),\n )\n })\n } catch (e) {\n console.error('Error deleting tenants from users:', e)\n }\n\n await Promise.all(cleanupPromises)\n }\n"],"names":["generateCookie","mergeHeaders","getCollectionIDType","getTenantFromCookie","addTenantCleanup","collection","enabledSlugs","tenantFieldName","tenantsCollectionSlug","usersSlug","usersTenantsArrayFieldName","usersTenantsArrayTenantFieldName","hooks","afterDelete","push","afterTenantDelete","id","req","idType","collectionSlug","payload","currentTenantCookieID","headers","newHeaders","Headers","name","expires","Date","now","path","returnCookieAsObject","value","responseHeaders","cleanupPromises","forEach","slug","delete","overrideAccess","where","in","usersWithTenant","find","depth","limit","docs","user","update","data","filter","row","e","console","error","Promise","all"],"mappings":"AAOA,SAASA,cAAc,EAAEC,YAAY,QAAQ,UAAS;AAItD,SAASC,mBAAmB,QAAQ,sCAAqC;AACzE,SAASC,mBAAmB,QAAQ,sCAAqC;AAWzE;;;;CAIC,GACD,OAAO,MAAMC,mBAAmB,CAAC,EAC/BC,UAAU,EACVC,YAAY,EACZC,eAAe,EACfC,qBAAqB,EACrBC,SAAS,EACTC,0BAA0B,EAC1BC,gCAAgC,EAC3B;IACL,IAAI,CAACN,WAAWO,KAAK,EAAE;QACrBP,WAAWO,KAAK,GAAG,CAAC;IACtB;IACA,IAAI,CAACP,WAAWO,KAAK,EAAEC,aAAa;QAClCR,WAAWO,KAAK,CAACC,WAAW,GAAG,EAAE;IACnC;IACAR,WAAWO,KAAK,CAACC,WAAW,CAACC,IAAI,CAC/BC,kBAAkB;QAChBT;QACAC;QACAC;QACAC;QACAC;QACAC;IACF;AAEJ,EAAC;AAED,OAAO,MAAMI,oBACX,CAAC,EACCT,YAAY,EACZC,eAAe,EACfC,qBAAqB,EACrBC,SAAS,EACTC,0BAA0B,EAC1BC,gCAAgC,EACP,GAC3B,OAAO,EAAEK,EAAE,EAAEC,GAAG,EAAE;QAChB,MAAMC,SAAShB,oBAAoB;YACjCiB,gBAAgBX;YAChBY,SAASH,IAAIG,OAAO;QACtB;QACA,MAAMC,wBAAwBlB,oBAAoBc,IAAIK,OAAO,EAAEJ;QAC/D,I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AgB;oBAChBpB;gBACF;YAEJ;QACF,EAAE,OAAOiC,GAAG;YACVC,QAAQC,KAAK,CAAC,sCAAsCF;QACtD;QAEA,MAAMG,QAAQC,GAAG,CAACrB;IACpB,EAAC"}
1
+ {"version":3,"sources":["../../src/hooks/afterTenantDelete.ts"],"sourcesContent":["import type {\n CollectionAfterDeleteHook,\n CollectionConfig,\n JsonObject,\n PaginatedDocs,\n} from 'payload'\n\nimport { generateCookie, mergeHeaders } from 'payload'\n\nimport type { UserWithTenantsField } from '../types.js'\n\nimport { getCollectionIDType } from '../utilities/getCollectionIDType.js'\nimport { getTenantFromCookie } from '../utilities/getTenantFromCookie.js'\n\ntype Args = {\n collection: CollectionConfig\n enabledSlugs: string[]\n tenantFieldName: string\n tenantsCollectionSlug: string\n usersSlug: string\n usersTenantsArrayFieldName: string\n usersTenantsArrayTenantFieldName: string\n}\n/**\n * Add cleanup logic when tenant is deleted\n * - delete documents related to tenant\n * - remove tenant from users\n */\nexport const addTenantCleanup = ({\n collection,\n enabledSlugs,\n tenantFieldName,\n tenantsCollectionSlug,\n usersSlug,\n usersTenantsArrayFieldName,\n usersTenantsArrayTenantFieldName,\n}: Args): CollectionConfig => ({\n ...collection,\n hooks: {\n ...collection.hooks,\n afterDelete: [\n ...(collection.hooks?.afterDelete || []),\n afterTenantDelete({\n enabledSlugs,\n tenantFieldName,\n tenantsCollectionSlug,\n usersSlug,\n usersTenantsArrayFieldName,\n usersTenantsArrayTenantFieldName,\n }),\n ],\n },\n})\n\nexport const afterTenantDelete =\n ({\n enabledSlugs,\n tenantFieldName,\n tenantsCollectionSlug,\n usersSlug,\n usersTenantsArrayFieldName,\n usersTenantsArrayTenantFieldName,\n }: Omit<Args, 'collection'>): CollectionAfterDeleteHook =>\n async ({ id, req }) => {\n const idType = getCollectionIDType({\n collectionSlug: tenantsCollectionSlug,\n payload: req.payload,\n })\n const currentTenantCookieID = getTenantFromCookie(req.headers, idType)\n if (currentTenantCookieID === id) {\n const newHeaders = new Headers({\n 'Set-Cookie': generateCookie<string>({\n name: 'payload-tenant',\n expires: new Date(Date.now() - 1000),\n path: '/',\n returnCookieAsObject: false,\n value: '',\n }),\n })\n\n req.responseHeaders = req.responseHeaders\n ? mergeHeaders(req.responseHeaders, newHeaders)\n : newHeaders\n }\n const cleanupPromises: Promise<JsonObject>[] = []\n enabledSlugs.forEach((slug) => {\n cleanupPromises.push(\n req.payload.delete({\n collection: slug,\n overrideAccess: true,\n req,\n where: {\n [tenantFieldName]: {\n in: [id],\n },\n },\n }),\n )\n })\n\n try {\n const usersWithTenant = (await req.payload.find({\n collection: usersSlug,\n depth: 0,\n limit: 0,\n overrideAccess: true,\n req,\n where: {\n [`${usersTenantsArrayFieldName}.${usersTenantsArrayTenantFieldName}`]: {\n in: [id],\n },\n },\n })) as PaginatedDocs<UserWithTenantsField>\n\n usersWithTenant?.docs?.forEach((user) => {\n cleanupPromises.push(\n req.payload.update({\n id: user.id,\n collection: usersSlug,\n data: {\n [usersTenantsArrayFieldName]: (\n ((user as Record<string, unknown>)[usersTenantsArrayFieldName] as Record<\n string,\n string\n >[]) || []\n ).filter((row: Record<string, string>) => {\n if (row[usersTenantsArrayTenantFieldName]) {\n return row[usersTenantsArrayTenantFieldName] !== id\n }\n }),\n },\n overrideAccess: true,\n req,\n }),\n )\n })\n } catch (e) {\n console.error('Error deleting tenants from users:', e)\n }\n\n await Promise.all(cleanupPromises)\n }\n"],"names":["generateCookie","mergeHeaders","getCollectionIDType","getTenantFromCookie","addTenantCleanup","collection","enabledSlugs","tenantFieldName","tenantsCollectionSlug","usersSlug","usersTenantsArrayFieldName","usersTenantsArrayTenantFieldName","hooks","afterDelete","afterTenantDelete","id","req","idType","collectionSlug","payload","currentTenantCookieID","headers","newHeaders","Headers","name","expires","Date","now","path","returnCookieAsObject","value","responseHeaders","cleanupPromises","forEach","slug","push","delete","overrideAccess","where","in","usersWithTenant","find","depth","limit","docs","user","update","data","filter","row","e","console","error","Promise","all"],"mappings":"AAOA,SAASA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BrB;gBACAsB,OAAO;oBACL,CAAC/B,gBAAgB,EAAE;wBACjBgC,IAAI;4BAACxB;yBAAG;oBACV;gBACF;YACF;QAEJ;QAEA,IAAI;YACF,MAAMyB,kBAAmB,MAAMxB,IAAIG,OAAO,CAACsB,IAAI,CAAC;gBAC9CpC,YAAYI;gBACZiC,OAAO;gBACPC,OAAO;gBACPN,gBAAgB;gBAChBrB;gBACAsB,OAAO;oBACL,CAAC,GAAG5B,2BAA2B,CAAC,EAAEC,kCAAkC,CAAC,EAAE;wBACrE4B,IAAI;4BAACxB;yBAAG;oBACV;gBACF;YACF;YAEAyB,iBAAiBI,MAAMX,QAAQ,CAACY;gBAC9Bb,gBAAgBG,IAAI,CAClBnB,IAAIG,OAAO,CAAC2B,MAAM,CAAC;oBACjB/B,IAAI8B,KAAK9B,EAAE;oBACXV,YAAYI;oBACZsC,MAAM;wBACJ,CAACrC,2BAA2B,EAAE,AAC5B,CAAA,AAAC,AAACmC,IAAgC,CAACnC,2BAA2B,IAGtD,EAAE,AAAD,EACTsC,MAAM,CAAC,CAACC;4BACR,IAAIA,GAAG,CAACtC,iCAAiC,EAAE;gCACzC,OAAOsC,GAAG,CAACtC,iCAAiC,KAAKI;4BACnD;wBACF;oBACF;oBACAsB,gBAAgB;oBAChBrB;gBACF;YAEJ;QACF,EAAE,OAAOkC,GAAG;YACVC,QAAQC,KAAK,CAAC,sCAAsCF;QACtD;QAEA,MAAMG,QAAQC,GAAG,CAACtB;IACpB,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAA;AAezD,eAAO,MAAM,iBAAiB,gEA6b5B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAA;AAezD,eAAO,MAAM,iBAAiB,gEAsf5B,CAAA"}