@webiny/api-prerendering-service-so-ddb 0.0.0-unstable.fcdad0bc61 → 0.0.0-unstable.fdd9228b5d

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 (43) hide show
  1. package/definitions/queueJob.d.ts +4 -3
  2. package/definitions/queueJob.js +8 -12
  3. package/definitions/queueJob.js.map +1 -1
  4. package/definitions/render.d.ts +4 -3
  5. package/definitions/render.js +8 -12
  6. package/definitions/render.js.map +1 -1
  7. package/definitions/renderLegacy.d.ts +4 -3
  8. package/definitions/renderLegacy.js +8 -12
  9. package/definitions/renderLegacy.js.map +1 -1
  10. package/definitions/settings.d.ts +4 -3
  11. package/definitions/settings.js +8 -12
  12. package/definitions/settings.js.map +1 -1
  13. package/definitions/table.d.ts +5 -5
  14. package/definitions/table.js +7 -6
  15. package/definitions/table.js.map +1 -1
  16. package/definitions/tagPathLink.d.ts +51 -4
  17. package/definitions/tagPathLink.js +8 -12
  18. package/definitions/tagPathLink.js.map +1 -1
  19. package/definitions/tagPathLinkLegacy.d.ts +57 -4
  20. package/definitions/tagPathLinkLegacy.js +8 -12
  21. package/definitions/tagPathLinkLegacy.js.map +1 -1
  22. package/definitions/tenantEntity.d.ts +8 -0
  23. package/definitions/tenantEntity.js +39 -0
  24. package/definitions/tenantEntity.js.map +1 -0
  25. package/index.d.ts +1 -1
  26. package/index.js +24 -30
  27. package/index.js.map +1 -1
  28. package/operations/queueJob.d.ts +2 -2
  29. package/operations/queueJob.js +21 -35
  30. package/operations/queueJob.js.map +1 -1
  31. package/operations/render.d.ts +4 -5
  32. package/operations/render.js +67 -112
  33. package/operations/render.js.map +1 -1
  34. package/operations/settings.d.ts +2 -2
  35. package/operations/settings.js +12 -19
  36. package/operations/settings.js.map +1 -1
  37. package/operations/tenant.d.ts +6 -0
  38. package/operations/tenant.js +29 -0
  39. package/operations/tenant.js.map +1 -0
  40. package/package.json +16 -31
  41. package/types.d.ts +12 -12
  42. package/types.js +6 -5
  43. package/types.js.map +1 -1
@@ -1,7 +1,8 @@
1
- import { Entity, Table } from "dynamodb-toolbox";
2
- import { Attributes } from "../types";
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
3
4
  export interface CreateQueueJobEntityParams {
4
- table: Table;
5
+ table: Table<string, string, string>;
5
6
  entityName: string;
6
7
  attributes: Attributes;
7
8
  }
@@ -1,26 +1,20 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.createQueueJobEntity = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
- var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
7
+ var _toolbox = require("@webiny/db-dynamodb/toolbox");
14
8
  const createQueueJobEntity = params => {
15
9
  const {
16
10
  entityName,
17
11
  attributes,
18
12
  table
19
13
  } = params;
20
- return new _dynamodbToolbox.Entity({
14
+ return new _toolbox.Entity({
21
15
  name: entityName,
22
16
  table,
23
- attributes: (0, _objectSpread2.default)({
17
+ attributes: {
24
18
  PK: {
25
19
  partitionKey: true
26
20
  },
@@ -35,9 +29,11 @@ const createQueueJobEntity = params => {
35
29
  },
36
30
  args: {
37
31
  type: "map"
38
- }
39
- }, attributes || {})
32
+ },
33
+ ...(attributes || {})
34
+ }
40
35
  });
41
36
  };
37
+ exports.createQueueJobEntity = createQueueJobEntity;
42
38
 
43
- exports.createQueueJobEntity = createQueueJobEntity;
39
+ //# sourceMappingURL=queueJob.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createQueueJobEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","id","args"],"sources":["queueJob.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\nexport interface CreateQueueJobEntityParams {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createQueueJobEntity = (params: CreateQueueJobEntityParams): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n id: {\n type: \"string\"\n },\n args: {\n type: \"map\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,oBAAoB,GAAIC,MAAD,IAAqD;EACrF,MAAM;IAAEC,UAAF;IAAcC,UAAd;IAA0BC;EAA1B,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEJ,UADQ;IAEdE,KAFc;IAGdD,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,IAAI,EAAE;QACFC,IAAI,EAAE;MADJ,CAPA;MAUNC,EAAE,EAAE;QACAD,IAAI,EAAE;MADN,CAVE;MAaNE,IAAI,EAAE;QACFF,IAAI,EAAE;MADJ;IAbA,GAgBFT,UAAU,IAAI,EAhBZ;EAHI,CAAX,CAAP;AAsBH,CAxBM"}
1
+ {"version":3,"names":["_toolbox","require","createQueueJobEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","id","args","exports"],"sources":["queueJob.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\nexport interface CreateQueueJobEntityParams {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createQueueJobEntity = (params: CreateQueueJobEntityParams): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n id: {\n type: \"string\"\n },\n args: {\n type: \"map\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,oBAAoB,GAAIC,MAAkC,IAAkB;EACrF,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDC,EAAE,EAAE;QACAD,IAAI,EAAE;MACV,CAAC;MACDE,IAAI,EAAE;QACFF,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACY,OAAA,CAAAf,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -1,7 +1,8 @@
1
- import { Entity, Table } from "dynamodb-toolbox";
2
- import { Attributes } from "../types";
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
3
4
  export interface CreateRenderEntityParams {
4
- table: Table;
5
+ table: Table<string, string, string>;
5
6
  entityName: string;
6
7
  attributes: Attributes;
7
8
  }
@@ -1,26 +1,20 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.createRenderEntity = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
- var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
7
+ var _toolbox = require("@webiny/db-dynamodb/toolbox");
14
8
  const createRenderEntity = params => {
15
9
  const {
16
10
  entityName,
17
11
  attributes,
18
12
  table
19
13
  } = params;
20
- return new _dynamodbToolbox.Entity({
14
+ return new _toolbox.Entity({
21
15
  name: entityName,
22
16
  table,
23
- attributes: (0, _objectSpread2.default)({
17
+ attributes: {
24
18
  PK: {
25
19
  partitionKey: true
26
20
  },
@@ -38,9 +32,11 @@ const createRenderEntity = params => {
38
32
  },
39
33
  data: {
40
34
  type: "map"
41
- }
42
- }, attributes || {})
35
+ },
36
+ ...(attributes || {})
37
+ }
43
38
  });
44
39
  };
40
+ exports.createRenderEntity = createRenderEntity;
45
41
 
46
- exports.createRenderEntity = createRenderEntity;
42
+ //# sourceMappingURL=render.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createRenderEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","GSI1_PK","GSI1_SK","data"],"sources":["render.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\nexport interface CreateRenderEntityParams {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createRenderEntity = (params: CreateRenderEntityParams): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n GSI1_PK: {\n type: \"string\"\n },\n GSI1_SK: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,kBAAkB,GAAIC,MAAD,IAAmD;EACjF,MAAM;IAAEC,UAAF;IAAcC,UAAd;IAA0BC;EAA1B,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEJ,UADQ;IAEdE,KAFc;IAGdD,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,IAAI,EAAE;QACFC,IAAI,EAAE;MADJ,CAPA;MAUNC,OAAO,EAAE;QACLD,IAAI,EAAE;MADD,CAVH;MAaNE,OAAO,EAAE;QACLF,IAAI,EAAE;MADD,CAbH;MAgBNG,IAAI,EAAE;QACFH,IAAI,EAAE;MADJ;IAhBA,GAmBFT,UAAU,IAAI,EAnBZ;EAHI,CAAX,CAAP;AAyBH,CA3BM"}
1
+ {"version":3,"names":["_toolbox","require","createRenderEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","GSI1_PK","GSI1_SK","data","exports"],"sources":["render.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\nexport interface CreateRenderEntityParams {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createRenderEntity = (params: CreateRenderEntityParams): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n GSI1_PK: {\n type: \"string\"\n },\n GSI1_SK: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,kBAAkB,GAAIC,MAAgC,IAAkB;EACjF,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDC,OAAO,EAAE;QACLD,IAAI,EAAE;MACV,CAAC;MACDE,OAAO,EAAE;QACLF,IAAI,EAAE;MACV,CAAC;MACDG,IAAI,EAAE;QACFH,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACa,OAAA,CAAAhB,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -1,7 +1,8 @@
1
- import { Entity, Table } from "dynamodb-toolbox";
2
- import { Attributes } from "../types";
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
3
4
  export interface CreateRenderEntityParams {
4
- table: Table;
5
+ table: Table<string, string, string>;
5
6
  entityName: string;
6
7
  attributes: Attributes;
7
8
  }
@@ -1,26 +1,20 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.createRenderEntity = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
- var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
7
+ var _toolbox = require("@webiny/db-dynamodb/toolbox");
14
8
  const createRenderEntity = params => {
15
9
  const {
16
10
  entityName,
17
11
  attributes,
18
12
  table
19
13
  } = params;
20
- return new _dynamodbToolbox.Entity({
14
+ return new _toolbox.Entity({
21
15
  name: entityName,
22
16
  table,
23
- attributes: (0, _objectSpread2.default)({
17
+ attributes: {
24
18
  PK: {
25
19
  partitionKey: true
26
20
  },
@@ -44,9 +38,11 @@ const createRenderEntity = params => {
44
38
  },
45
39
  files: {
46
40
  type: "list"
47
- }
48
- }, attributes || {})
41
+ },
42
+ ...(attributes || {})
43
+ }
49
44
  });
50
45
  };
46
+ exports.createRenderEntity = createRenderEntity;
51
47
 
52
- exports.createRenderEntity = createRenderEntity;
48
+ //# sourceMappingURL=renderLegacy.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createRenderEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","namespace","url","args","configuration","files"],"sources":["renderLegacy.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\nexport interface CreateRenderEntityParams {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createRenderEntity = (params: CreateRenderEntityParams): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n namespace: {\n type: \"string\"\n },\n url: {\n type: \"string\"\n },\n args: {\n type: \"map\"\n },\n configuration: {\n type: \"map\"\n },\n files: {\n type: \"list\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,kBAAkB,GAAIC,MAAD,IAAmD;EACjF,MAAM;IAAEC,UAAF;IAAcC,UAAd;IAA0BC;EAA1B,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEJ,UADQ;IAEdE,KAFc;IAGdD,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,IAAI,EAAE;QACFC,IAAI,EAAE;MADJ,CAPA;MAUNC,SAAS,EAAE;QACPD,IAAI,EAAE;MADC,CAVL;MAaNE,GAAG,EAAE;QACDF,IAAI,EAAE;MADL,CAbC;MAgBNG,IAAI,EAAE;QACFH,IAAI,EAAE;MADJ,CAhBA;MAmBNI,aAAa,EAAE;QACXJ,IAAI,EAAE;MADK,CAnBT;MAsBNK,KAAK,EAAE;QACHL,IAAI,EAAE;MADH;IAtBD,GAyBFT,UAAU,IAAI,EAzBZ;EAHI,CAAX,CAAP;AA+BH,CAjCM"}
1
+ {"version":3,"names":["_toolbox","require","createRenderEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","namespace","url","args","configuration","files","exports"],"sources":["renderLegacy.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\nexport interface CreateRenderEntityParams {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createRenderEntity = (params: CreateRenderEntityParams): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n namespace: {\n type: \"string\"\n },\n url: {\n type: \"string\"\n },\n args: {\n type: \"map\"\n },\n configuration: {\n type: \"map\"\n },\n files: {\n type: \"list\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,kBAAkB,GAAIC,MAAgC,IAAkB;EACjF,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDC,SAAS,EAAE;QACPD,IAAI,EAAE;MACV,CAAC;MACDE,GAAG,EAAE;QACDF,IAAI,EAAE;MACV,CAAC;MACDG,IAAI,EAAE;QACFH,IAAI,EAAE;MACV,CAAC;MACDI,aAAa,EAAE;QACXJ,IAAI,EAAE;MACV,CAAC;MACDK,KAAK,EAAE;QACHL,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACe,OAAA,CAAAlB,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -1,7 +1,8 @@
1
- import { Entity, Table } from "dynamodb-toolbox";
2
- import { Attributes } from "../types";
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
3
4
  export interface CreateSettingsEntityParams {
4
- table: Table;
5
+ table: Table<string, string, string>;
5
6
  entityName: string;
6
7
  attributes: Attributes;
7
8
  }
@@ -1,26 +1,20 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.createSettingsEntity = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
- var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
7
+ var _toolbox = require("@webiny/db-dynamodb/toolbox");
14
8
  const createSettingsEntity = params => {
15
9
  const {
16
10
  entityName,
17
11
  attributes,
18
12
  table
19
13
  } = params;
20
- return new _dynamodbToolbox.Entity({
14
+ return new _toolbox.Entity({
21
15
  name: entityName,
22
16
  table,
23
- attributes: (0, _objectSpread2.default)({
17
+ attributes: {
24
18
  PK: {
25
19
  partitionKey: true
26
20
  },
@@ -32,9 +26,11 @@ const createSettingsEntity = params => {
32
26
  },
33
27
  data: {
34
28
  type: "map"
35
- }
36
- }, attributes || {})
29
+ },
30
+ ...(attributes || {})
31
+ }
37
32
  });
38
33
  };
34
+ exports.createSettingsEntity = createSettingsEntity;
39
35
 
40
- exports.createSettingsEntity = createSettingsEntity;
36
+ //# sourceMappingURL=settings.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createSettingsEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","data"],"sources":["settings.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\nexport interface CreateSettingsEntityParams {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSettingsEntity = (params: CreateSettingsEntityParams): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,oBAAoB,GAAIC,MAAD,IAAqD;EACrF,MAAM;IAAEC,UAAF;IAAcC,UAAd;IAA0BC;EAA1B,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEJ,UADQ;IAEdE,KAFc;IAGdD,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,IAAI,EAAE;QACFC,IAAI,EAAE;MADJ,CAPA;MAUNC,IAAI,EAAE;QACFD,IAAI,EAAE;MADJ;IAVA,GAaFT,UAAU,IAAI,EAbZ;EAHI,CAAX,CAAP;AAmBH,CArBM"}
1
+ {"version":3,"names":["_toolbox","require","createSettingsEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","data","exports"],"sources":["settings.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\nexport interface CreateSettingsEntityParams {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSettingsEntity = (params: CreateSettingsEntityParams): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,oBAAoB,GAAIC,MAAkC,IAAkB;EACrF,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDC,IAAI,EAAE;QACFD,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACW,OAAA,CAAAd,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -1,9 +1,9 @@
1
- import { DocumentClient } from "aws-sdk/clients/dynamodb";
2
- import { Table } from "dynamodb-toolbox";
3
- import { TableModifier } from "../types";
1
+ import type { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb";
2
+ import { Table } from "@webiny/db-dynamodb/toolbox";
3
+ import type { TableModifier } from "../types";
4
4
  interface CreateTableParams {
5
5
  table?: TableModifier;
6
- documentClient: DocumentClient;
6
+ documentClient: DynamoDBDocument;
7
7
  }
8
- export declare const createTable: (params: CreateTableParams) => Table;
8
+ export declare const createTable: (params: CreateTableParams) => Table<string, string, string>;
9
9
  export {};
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.createTable = void 0;
7
-
8
- var _dynamodbToolbox = require("dynamodb-toolbox");
9
-
7
+ var _toolbox = require("@webiny/db-dynamodb/toolbox");
10
8
  const createTable = params => {
11
9
  const {
12
10
  table,
@@ -22,10 +20,13 @@ const createTable = params => {
22
20
  partitionKey: "GSI1_PK",
23
21
  sortKey: "GSI1_SK"
24
22
  }
25
- }
23
+ },
24
+ autoExecute: true,
25
+ autoParse: true
26
26
  };
27
27
  const config = typeof table === "function" ? table(tableConfig) : tableConfig;
28
- return new _dynamodbToolbox.Table(config);
28
+ return new _toolbox.Table(config);
29
29
  };
30
+ exports.createTable = createTable;
30
31
 
31
- exports.createTable = createTable;
32
+ //# sourceMappingURL=table.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createTable","params","table","documentClient","tableConfig","name","process","env","DB_TABLE_PRERENDERING_SERVICE","DB_TABLE","partitionKey","sortKey","DocumentClient","indexes","GSI1","config","Table"],"sources":["table.ts"],"sourcesContent":["import { DocumentClient } from \"aws-sdk/clients/dynamodb\";\nimport { Table } from \"dynamodb-toolbox\";\nimport { TableModifier } from \"~/types\";\nimport { TableConstructor } from \"dynamodb-toolbox/dist/classes/Table\";\n\ninterface CreateTableParams {\n table?: TableModifier;\n documentClient: DocumentClient;\n}\n\nexport const createTable = (params: CreateTableParams): Table => {\n const { table, documentClient } = params;\n\n const tableConfig: TableConstructor = {\n name: (process.env.DB_TABLE_PRERENDERING_SERVICE || process.env.DB_TABLE) as string,\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient,\n indexes: {\n GSI1: {\n partitionKey: \"GSI1_PK\",\n sortKey: \"GSI1_SK\"\n }\n }\n };\n\n const config = typeof table === \"function\" ? table(tableConfig) : tableConfig;\n\n return new Table(config);\n};\n"],"mappings":";;;;;;;AACA;;AASO,MAAMA,WAAW,GAAIC,MAAD,IAAsC;EAC7D,MAAM;IAAEC,KAAF;IAASC;EAAT,IAA4BF,MAAlC;EAEA,MAAMG,WAA6B,GAAG;IAClCC,IAAI,EAAGC,OAAO,CAACC,GAAR,CAAYC,6BAAZ,IAA6CF,OAAO,CAACC,GAAR,CAAYE,QAD9B;IAElCC,YAAY,EAAE,IAFoB;IAGlCC,OAAO,EAAE,IAHyB;IAIlCC,cAAc,EAAET,cAJkB;IAKlCU,OAAO,EAAE;MACLC,IAAI,EAAE;QACFJ,YAAY,EAAE,SADZ;QAEFC,OAAO,EAAE;MAFP;IADD;EALyB,CAAtC;EAaA,MAAMI,MAAM,GAAG,OAAOb,KAAP,KAAiB,UAAjB,GAA8BA,KAAK,CAACE,WAAD,CAAnC,GAAmDA,WAAlE;EAEA,OAAO,IAAIY,sBAAJ,CAAUD,MAAV,CAAP;AACH,CAnBM"}
1
+ {"version":3,"names":["_toolbox","require","createTable","params","table","documentClient","tableConfig","name","process","env","DB_TABLE_PRERENDERING_SERVICE","DB_TABLE","partitionKey","sortKey","DocumentClient","indexes","GSI1","autoExecute","autoParse","config","Table","exports"],"sources":["table.ts"],"sourcesContent":["import type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb\";\nimport { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport type { TableModifier } from \"~/types\";\nimport type { TableConstructor } from \"@webiny/db-dynamodb/toolbox\";\n\ninterface CreateTableParams {\n table?: TableModifier;\n documentClient: DynamoDBDocument;\n}\n\nexport const createTable = (params: CreateTableParams): Table<string, string, string> => {\n const { table, documentClient } = params;\n\n const tableConfig: TableConstructor<string, string, string> = {\n name: (process.env.DB_TABLE_PRERENDERING_SERVICE || process.env.DB_TABLE) as string,\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient,\n indexes: {\n GSI1: {\n partitionKey: \"GSI1_PK\",\n sortKey: \"GSI1_SK\"\n }\n },\n autoExecute: true,\n autoParse: true\n };\n\n const config = typeof table === \"function\" ? table(tableConfig) : tableConfig;\n\n return new Table(config);\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,WAAW,GAAIC,MAAyB,IAAoC;EACrF,MAAM;IAAEC,KAAK;IAAEC;EAAe,CAAC,GAAGF,MAAM;EAExC,MAAMG,WAAqD,GAAG;IAC1DC,IAAI,EAAGC,OAAO,CAACC,GAAG,CAACC,6BAA6B,IAAIF,OAAO,CAACC,GAAG,CAACE,QAAmB;IACnFC,YAAY,EAAE,IAAI;IAClBC,OAAO,EAAE,IAAI;IACbC,cAAc,EAAET,cAAc;IAC9BU,OAAO,EAAE;MACLC,IAAI,EAAE;QACFJ,YAAY,EAAE,SAAS;QACvBC,OAAO,EAAE;MACb;IACJ,CAAC;IACDI,WAAW,EAAE,IAAI;IACjBC,SAAS,EAAE;EACf,CAAC;EAED,MAAMC,MAAM,GAAG,OAAOf,KAAK,KAAK,UAAU,GAAGA,KAAK,CAACE,WAAW,CAAC,GAAGA,WAAW;EAE7E,OAAO,IAAIc,cAAK,CAACD,MAAM,CAAC;AAC5B,CAAC;AAACE,OAAA,CAAAnB,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -1,9 +1,56 @@
1
- import { Entity, Table } from "dynamodb-toolbox";
2
- import { Attributes } from "../types";
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
3
4
  interface CreateTagPathLinkEntityParams {
4
- table: Table;
5
+ table: Table<string, string, string>;
5
6
  entityName: string;
6
7
  attributes: Attributes;
7
8
  }
8
- export declare const createTagPathLinkEntity: (params: CreateTagPathLinkEntityParams) => Entity<{}>;
9
+ export declare const createTagPathLinkEntity: (params: CreateTagPathLinkEntityParams) => Entity<string, import("dynamodb-toolbox/dist/cjs/classes/Entity").Overlay, import("dynamodb-toolbox/dist/cjs/classes/Entity").Overlay, Table<string, string, string>, boolean, boolean, boolean, string, string, string, boolean, {
10
+ PK: {
11
+ partitionKey: true;
12
+ };
13
+ SK: {
14
+ sortKey: true;
15
+ };
16
+ TYPE: {
17
+ type: "string";
18
+ };
19
+ GSI1_PK: {
20
+ type: "string";
21
+ };
22
+ GSI1_SK: {
23
+ type: "string";
24
+ };
25
+ data: {
26
+ type: "map";
27
+ };
28
+ }, {
29
+ PK: {
30
+ partitionKey: true;
31
+ };
32
+ SK: {
33
+ sortKey: true;
34
+ };
35
+ TYPE: {
36
+ type: "string";
37
+ };
38
+ GSI1_PK: {
39
+ type: "string";
40
+ };
41
+ GSI1_SK: {
42
+ type: "string";
43
+ };
44
+ data: {
45
+ type: "map";
46
+ };
47
+ }, import("dynamodb-toolbox/dist/cjs/classes/Entity").ParsedAttributes<import("ts-toolbelt/out/Any/Key").Key>, any, {
48
+ [x: string]: any;
49
+ [x: number]: any;
50
+ [x: symbol]: any;
51
+ }, {
52
+ [x: string]: any;
53
+ [x: number]: any;
54
+ [x: symbol]: any;
55
+ }>;
9
56
  export {};
@@ -1,26 +1,20 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.createTagPathLinkEntity = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
- var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
7
+ var _toolbox = require("@webiny/db-dynamodb/toolbox");
14
8
  const createTagPathLinkEntity = params => {
15
9
  const {
16
10
  entityName,
17
11
  attributes,
18
12
  table
19
13
  } = params;
20
- return new _dynamodbToolbox.Entity({
14
+ return new _toolbox.Entity({
21
15
  name: entityName,
22
16
  table,
23
- attributes: (0, _objectSpread2.default)({
17
+ attributes: {
24
18
  PK: {
25
19
  partitionKey: true
26
20
  },
@@ -38,9 +32,11 @@ const createTagPathLinkEntity = params => {
38
32
  },
39
33
  data: {
40
34
  type: "map"
41
- }
42
- }, attributes || {})
35
+ },
36
+ ...(attributes || {})
37
+ }
43
38
  });
44
39
  };
40
+ exports.createTagPathLinkEntity = createTagPathLinkEntity;
45
41
 
46
- exports.createTagPathLinkEntity = createTagPathLinkEntity;
42
+ //# sourceMappingURL=tagPathLink.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createTagPathLinkEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","GSI1_PK","GSI1_SK","data"],"sources":["tagPathLink.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface CreateTagPathLinkEntityParams {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createTagPathLinkEntity = (params: CreateTagPathLinkEntityParams) => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n GSI1_PK: {\n type: \"string\"\n },\n GSI1_SK: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,uBAAuB,GAAIC,MAAD,IAA2C;EAC9E,MAAM;IAAEC,UAAF;IAAcC,UAAd;IAA0BC;EAA1B,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEJ,UADQ;IAEdE,KAFc;IAGdD,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,IAAI,EAAE;QACFC,IAAI,EAAE;MADJ,CAPA;MAUNC,OAAO,EAAE;QACLD,IAAI,EAAE;MADD,CAVH;MAaNE,OAAO,EAAE;QACLF,IAAI,EAAE;MADD,CAbH;MAgBNG,IAAI,EAAE;QACFH,IAAI,EAAE;MADJ;IAhBA,GAmBFT,UAAU,IAAI,EAnBZ;EAHI,CAAX,CAAP;AAyBH,CA3BM"}
1
+ {"version":3,"names":["_toolbox","require","createTagPathLinkEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","GSI1_PK","GSI1_SK","data","exports"],"sources":["tagPathLink.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\ninterface CreateTagPathLinkEntityParams {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createTagPathLinkEntity = (params: CreateTagPathLinkEntityParams) => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n GSI1_PK: {\n type: \"string\"\n },\n GSI1_SK: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,uBAAuB,GAAIC,MAAqC,IAAK;EAC9E,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDC,OAAO,EAAE;QACLD,IAAI,EAAE;MACV,CAAC;MACDE,OAAO,EAAE;QACLF,IAAI,EAAE;MACV,CAAC;MACDG,IAAI,EAAE;QACFH,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACa,OAAA,CAAAhB,uBAAA,GAAAA,uBAAA","ignoreList":[]}
@@ -1,9 +1,62 @@
1
- import { Entity, Table } from "dynamodb-toolbox";
2
- import { Attributes } from "../types";
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
3
4
  interface CreateTagUrlLinkEntityParams {
4
- table: Table;
5
+ table: Table<string, string, string>;
5
6
  entityName: string;
6
7
  attributes: Attributes;
7
8
  }
8
- export declare const createTagUrlLinkEntity: (params: CreateTagUrlLinkEntityParams) => Entity<{}>;
9
+ export declare const createTagUrlLinkEntity: (params: CreateTagUrlLinkEntityParams) => Entity<string, import("dynamodb-toolbox/dist/cjs/classes/Entity").Overlay, import("dynamodb-toolbox/dist/cjs/classes/Entity").Overlay, Table<string, string, string>, boolean, boolean, boolean, string, string, string, boolean, {
10
+ PK: {
11
+ partitionKey: true;
12
+ };
13
+ SK: {
14
+ sortKey: true;
15
+ };
16
+ TYPE: {
17
+ type: "string";
18
+ };
19
+ namespace: {
20
+ type: "string";
21
+ };
22
+ url: {
23
+ type: "string";
24
+ };
25
+ value: {
26
+ type: "string";
27
+ };
28
+ key: {
29
+ type: "string";
30
+ };
31
+ }, {
32
+ PK: {
33
+ partitionKey: true;
34
+ };
35
+ SK: {
36
+ sortKey: true;
37
+ };
38
+ TYPE: {
39
+ type: "string";
40
+ };
41
+ namespace: {
42
+ type: "string";
43
+ };
44
+ url: {
45
+ type: "string";
46
+ };
47
+ value: {
48
+ type: "string";
49
+ };
50
+ key: {
51
+ type: "string";
52
+ };
53
+ }, import("dynamodb-toolbox/dist/cjs/classes/Entity").ParsedAttributes<import("ts-toolbelt/out/Any/Key").Key>, any, {
54
+ [x: string]: any;
55
+ [x: number]: any;
56
+ [x: symbol]: any;
57
+ }, {
58
+ [x: string]: any;
59
+ [x: number]: any;
60
+ [x: symbol]: any;
61
+ }>;
9
62
  export {};
@@ -1,26 +1,20 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.createTagUrlLinkEntity = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
- var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
7
+ var _toolbox = require("@webiny/db-dynamodb/toolbox");
14
8
  const createTagUrlLinkEntity = params => {
15
9
  const {
16
10
  entityName,
17
11
  attributes,
18
12
  table
19
13
  } = params;
20
- return new _dynamodbToolbox.Entity({
14
+ return new _toolbox.Entity({
21
15
  name: entityName,
22
16
  table,
23
- attributes: (0, _objectSpread2.default)({
17
+ attributes: {
24
18
  PK: {
25
19
  partitionKey: true
26
20
  },
@@ -41,9 +35,11 @@ const createTagUrlLinkEntity = params => {
41
35
  },
42
36
  key: {
43
37
  type: "string"
44
- }
45
- }, attributes || {})
38
+ },
39
+ ...(attributes || {})
40
+ }
46
41
  });
47
42
  };
43
+ exports.createTagUrlLinkEntity = createTagUrlLinkEntity;
48
44
 
49
- exports.createTagUrlLinkEntity = createTagUrlLinkEntity;
45
+ //# sourceMappingURL=tagPathLinkLegacy.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createTagUrlLinkEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","namespace","url","value","key"],"sources":["tagPathLinkLegacy.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface CreateTagUrlLinkEntityParams {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createTagUrlLinkEntity = (params: CreateTagUrlLinkEntityParams) => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n namespace: {\n type: \"string\"\n },\n url: {\n type: \"string\"\n },\n value: {\n type: \"string\"\n },\n key: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,sBAAsB,GAAIC,MAAD,IAA0C;EAC5E,MAAM;IAAEC,UAAF;IAAcC,UAAd;IAA0BC;EAA1B,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEJ,UADQ;IAEdE,KAFc;IAGdD,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,IAAI,EAAE;QACFC,IAAI,EAAE;MADJ,CAPA;MAUNC,SAAS,EAAE;QACPD,IAAI,EAAE;MADC,CAVL;MAaNE,GAAG,EAAE;QACDF,IAAI,EAAE;MADL,CAbC;MAgBNG,KAAK,EAAE;QACHH,IAAI,EAAE;MADH,CAhBD;MAmBNI,GAAG,EAAE;QACDJ,IAAI,EAAE;MADL;IAnBC,GAsBFT,UAAU,IAAI,EAtBZ;EAHI,CAAX,CAAP;AA4BH,CA9BM"}
1
+ {"version":3,"names":["_toolbox","require","createTagUrlLinkEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","namespace","url","value","key","exports"],"sources":["tagPathLinkLegacy.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\ninterface CreateTagUrlLinkEntityParams {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createTagUrlLinkEntity = (params: CreateTagUrlLinkEntityParams) => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n namespace: {\n type: \"string\"\n },\n url: {\n type: \"string\"\n },\n value: {\n type: \"string\"\n },\n key: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,sBAAsB,GAAIC,MAAoC,IAAK;EAC5E,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDC,SAAS,EAAE;QACPD,IAAI,EAAE;MACV,CAAC;MACDE,GAAG,EAAE;QACDF,IAAI,EAAE;MACV,CAAC;MACDG,KAAK,EAAE;QACHH,IAAI,EAAE;MACV,CAAC;MACDI,GAAG,EAAE;QACDJ,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACc,OAAA,CAAAjB,sBAAA,GAAAA,sBAAA","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ interface Params {
4
+ table: Table<string, string, string>;
5
+ entityName: string;
6
+ }
7
+ export declare const createTenantEntity: ({ entityName, table }: Params) => Entity<any>;
8
+ export {};
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createTenantEntity = void 0;
7
+ var _toolbox = require("@webiny/db-dynamodb/toolbox");
8
+ const createTenantEntity = ({
9
+ entityName,
10
+ table
11
+ }) => {
12
+ return new _toolbox.Entity({
13
+ table,
14
+ name: entityName,
15
+ attributes: {
16
+ PK: {
17
+ partitionKey: true
18
+ },
19
+ SK: {
20
+ sortKey: true
21
+ },
22
+ GSI1_PK: {
23
+ type: "string"
24
+ },
25
+ GSI1_SK: {
26
+ type: "string"
27
+ },
28
+ TYPE: {
29
+ type: "string"
30
+ },
31
+ id: {
32
+ type: "string"
33
+ }
34
+ }
35
+ });
36
+ };
37
+ exports.createTenantEntity = createTenantEntity;
38
+
39
+ //# sourceMappingURL=tenantEntity.js.map