@webiny/api-prerendering-service-so-ddb 0.0.0-mt-2 → 0.0.0-unstable.06b2ede40f

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 (48) hide show
  1. package/definitions/queueJob.d.ts +6 -5
  2. package/definitions/queueJob.js +8 -16
  3. package/definitions/queueJob.js.map +1 -0
  4. package/definitions/render.d.ts +6 -5
  5. package/definitions/render.js +10 -24
  6. package/definitions/render.js.map +1 -0
  7. package/definitions/renderLegacy.d.ts +9 -0
  8. package/definitions/renderLegacy.js +48 -0
  9. package/definitions/renderLegacy.js.map +1 -0
  10. package/definitions/settings.d.ts +9 -0
  11. package/definitions/settings.js +36 -0
  12. package/definitions/settings.js.map +1 -0
  13. package/definitions/table.d.ts +7 -6
  14. package/definitions/table.js +13 -6
  15. package/definitions/table.js.map +1 -0
  16. package/definitions/tagPathLink.d.ts +56 -0
  17. package/definitions/tagPathLink.js +42 -0
  18. package/definitions/tagPathLink.js.map +1 -0
  19. package/definitions/tagPathLinkLegacy.d.ts +62 -0
  20. package/definitions/tagPathLinkLegacy.js +45 -0
  21. package/definitions/tagPathLinkLegacy.js.map +1 -0
  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 +39 -38
  27. package/index.js.map +1 -0
  28. package/operations/queueJob.d.ts +6 -0
  29. package/operations/{queueJob/index.js → queueJob.js} +24 -43
  30. package/operations/queueJob.js.map +1 -0
  31. package/operations/render.d.ts +20 -0
  32. package/operations/render.js +330 -0
  33. package/operations/render.js.map +1 -0
  34. package/operations/settings.d.ts +6 -0
  35. package/operations/settings.js +68 -0
  36. package/operations/settings.js.map +1 -0
  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 +18 -12
  42. package/types.js +8 -6
  43. package/types.js.map +1 -0
  44. package/definitions/tagUrlLink.d.ts +0 -8
  45. package/definitions/tagUrlLink.js +0 -53
  46. package/operations/queueJob/index.d.ts +0 -6
  47. package/operations/render/index.d.ts +0 -16
  48. package/operations/render/index.js +0 -336
@@ -1,8 +1,9 @@
1
- import { Entity, Table } from "dynamodb-toolbox";
2
- import { Attributes } from "../types";
3
- export interface Params {
4
- table: Table;
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
4
+ export interface CreateQueueJobEntityParams {
5
+ table: Table<string, string, string>;
5
6
  entityName: string;
6
7
  attributes: Attributes;
7
8
  }
8
- export declare const createQueueJobEntity: (params: Params) => Entity<any>;
9
+ export declare const createQueueJobEntity: (params: CreateQueueJobEntityParams) => Entity<any>;
@@ -1,30 +1,20 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.createQueueJobEntity = void 0;
9
-
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
-
12
- var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
14
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
15
-
16
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
17
-
7
+ var _toolbox = require("@webiny/db-dynamodb/toolbox");
18
8
  const createQueueJobEntity = params => {
19
9
  const {
20
10
  entityName,
21
11
  attributes,
22
12
  table
23
13
  } = params;
24
- return new _dynamodbToolbox.Entity({
14
+ return new _toolbox.Entity({
25
15
  name: entityName,
26
16
  table,
27
- attributes: _objectSpread({
17
+ attributes: {
28
18
  PK: {
29
19
  partitionKey: true
30
20
  },
@@ -39,9 +29,11 @@ const createQueueJobEntity = params => {
39
29
  },
40
30
  args: {
41
31
  type: "map"
42
- }
43
- }, attributes || {})
32
+ },
33
+ ...(attributes || {})
34
+ }
44
35
  });
45
36
  };
37
+ exports.createQueueJobEntity = createQueueJobEntity;
46
38
 
47
- exports.createQueueJobEntity = createQueueJobEntity;
39
+ //# sourceMappingURL=queueJob.js.map
@@ -0,0 +1 @@
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,8 +1,9 @@
1
- import { Entity, Table } from "dynamodb-toolbox";
2
- import { Attributes } from "../types";
3
- export interface Params {
4
- table: Table;
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
4
+ export interface CreateRenderEntityParams {
5
+ table: Table<string, string, string>;
5
6
  entityName: string;
6
7
  attributes: Attributes;
7
8
  }
8
- export declare const createRenderEntity: (params: Params) => Entity<any>;
9
+ export declare const createRenderEntity: (params: CreateRenderEntityParams) => Entity<any>;
@@ -1,30 +1,20 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.createRenderEntity = void 0;
9
-
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
-
12
- var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
14
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
15
-
16
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
17
-
7
+ var _toolbox = require("@webiny/db-dynamodb/toolbox");
18
8
  const createRenderEntity = params => {
19
9
  const {
20
10
  entityName,
21
11
  attributes,
22
12
  table
23
13
  } = params;
24
- return new _dynamodbToolbox.Entity({
14
+ return new _toolbox.Entity({
25
15
  name: entityName,
26
16
  table,
27
- attributes: _objectSpread({
17
+ attributes: {
28
18
  PK: {
29
19
  partitionKey: true
30
20
  },
@@ -34,23 +24,19 @@ const createRenderEntity = params => {
34
24
  TYPE: {
35
25
  type: "string"
36
26
  },
37
- namespace: {
27
+ GSI1_PK: {
38
28
  type: "string"
39
29
  },
40
- url: {
30
+ GSI1_SK: {
41
31
  type: "string"
42
32
  },
43
- args: {
44
- type: "map"
45
- },
46
- configuration: {
33
+ data: {
47
34
  type: "map"
48
35
  },
49
- files: {
50
- type: "list"
51
- }
52
- }, attributes || {})
36
+ ...(attributes || {})
37
+ }
53
38
  });
54
39
  };
40
+ exports.createRenderEntity = createRenderEntity;
55
41
 
56
- exports.createRenderEntity = createRenderEntity;
42
+ //# sourceMappingURL=render.js.map
@@ -0,0 +1 @@
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":[]}
@@ -0,0 +1,9 @@
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
4
+ export interface CreateRenderEntityParams {
5
+ table: Table<string, string, string>;
6
+ entityName: string;
7
+ attributes: Attributes;
8
+ }
9
+ export declare const createRenderEntity: (params: CreateRenderEntityParams) => Entity<any>;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createRenderEntity = void 0;
7
+ var _toolbox = require("@webiny/db-dynamodb/toolbox");
8
+ const createRenderEntity = params => {
9
+ const {
10
+ entityName,
11
+ attributes,
12
+ table
13
+ } = params;
14
+ return new _toolbox.Entity({
15
+ name: entityName,
16
+ table,
17
+ attributes: {
18
+ PK: {
19
+ partitionKey: true
20
+ },
21
+ SK: {
22
+ sortKey: true
23
+ },
24
+ TYPE: {
25
+ type: "string"
26
+ },
27
+ namespace: {
28
+ type: "string"
29
+ },
30
+ url: {
31
+ type: "string"
32
+ },
33
+ args: {
34
+ type: "map"
35
+ },
36
+ configuration: {
37
+ type: "map"
38
+ },
39
+ files: {
40
+ type: "list"
41
+ },
42
+ ...(attributes || {})
43
+ }
44
+ });
45
+ };
46
+ exports.createRenderEntity = createRenderEntity;
47
+
48
+ //# sourceMappingURL=renderLegacy.js.map
@@ -0,0 +1 @@
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":[]}
@@ -0,0 +1,9 @@
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
4
+ export interface CreateSettingsEntityParams {
5
+ table: Table<string, string, string>;
6
+ entityName: string;
7
+ attributes: Attributes;
8
+ }
9
+ export declare const createSettingsEntity: (params: CreateSettingsEntityParams) => Entity<any>;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createSettingsEntity = void 0;
7
+ var _toolbox = require("@webiny/db-dynamodb/toolbox");
8
+ const createSettingsEntity = params => {
9
+ const {
10
+ entityName,
11
+ attributes,
12
+ table
13
+ } = params;
14
+ return new _toolbox.Entity({
15
+ name: entityName,
16
+ table,
17
+ attributes: {
18
+ PK: {
19
+ partitionKey: true
20
+ },
21
+ SK: {
22
+ sortKey: true
23
+ },
24
+ TYPE: {
25
+ type: "string"
26
+ },
27
+ data: {
28
+ type: "map"
29
+ },
30
+ ...(attributes || {})
31
+ }
32
+ });
33
+ };
34
+ exports.createSettingsEntity = createSettingsEntity;
35
+
36
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
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,8 +1,9 @@
1
- import { DocumentClient } from "aws-sdk/clients/dynamodb";
2
- import { Table } from "dynamodb-toolbox";
3
- import { TableModifier } from "../types";
4
- export interface Params {
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
+ interface CreateTableParams {
5
5
  table?: TableModifier;
6
- documentClient: DocumentClient;
6
+ documentClient: DynamoDBDocument;
7
7
  }
8
- export declare const createTable: (params: Params) => Table;
8
+ export declare const createTable: (params: CreateTableParams) => Table<string, string, string>;
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,
@@ -16,10 +14,19 @@ const createTable = params => {
16
14
  name: process.env.DB_TABLE_PRERENDERING_SERVICE || process.env.DB_TABLE,
17
15
  partitionKey: "PK",
18
16
  sortKey: "SK",
19
- DocumentClient: documentClient
17
+ DocumentClient: documentClient,
18
+ indexes: {
19
+ GSI1: {
20
+ partitionKey: "GSI1_PK",
21
+ sortKey: "GSI1_SK"
22
+ }
23
+ },
24
+ autoExecute: true,
25
+ autoParse: true
20
26
  };
21
27
  const config = typeof table === "function" ? table(tableConfig) : tableConfig;
22
- return new _dynamodbToolbox.Table(config);
28
+ return new _toolbox.Table(config);
23
29
  };
30
+ exports.createTable = createTable;
24
31
 
25
- exports.createTable = createTable;
32
+ //# sourceMappingURL=table.js.map
@@ -0,0 +1 @@
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":[]}
@@ -0,0 +1,56 @@
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
4
+ interface CreateTagPathLinkEntityParams {
5
+ table: Table<string, string, string>;
6
+ entityName: string;
7
+ attributes: Attributes;
8
+ }
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
+ }>;
56
+ export {};
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createTagPathLinkEntity = void 0;
7
+ var _toolbox = require("@webiny/db-dynamodb/toolbox");
8
+ const createTagPathLinkEntity = params => {
9
+ const {
10
+ entityName,
11
+ attributes,
12
+ table
13
+ } = params;
14
+ return new _toolbox.Entity({
15
+ name: entityName,
16
+ table,
17
+ attributes: {
18
+ PK: {
19
+ partitionKey: true
20
+ },
21
+ SK: {
22
+ sortKey: true
23
+ },
24
+ TYPE: {
25
+ type: "string"
26
+ },
27
+ GSI1_PK: {
28
+ type: "string"
29
+ },
30
+ GSI1_SK: {
31
+ type: "string"
32
+ },
33
+ data: {
34
+ type: "map"
35
+ },
36
+ ...(attributes || {})
37
+ }
38
+ });
39
+ };
40
+ exports.createTagPathLinkEntity = createTagPathLinkEntity;
41
+
42
+ //# sourceMappingURL=tagPathLink.js.map
@@ -0,0 +1 @@
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":[]}
@@ -0,0 +1,62 @@
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
4
+ interface CreateTagUrlLinkEntityParams {
5
+ table: Table<string, string, string>;
6
+ entityName: string;
7
+ attributes: Attributes;
8
+ }
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
+ }>;
62
+ export {};
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createTagUrlLinkEntity = void 0;
7
+ var _toolbox = require("@webiny/db-dynamodb/toolbox");
8
+ const createTagUrlLinkEntity = params => {
9
+ const {
10
+ entityName,
11
+ attributes,
12
+ table
13
+ } = params;
14
+ return new _toolbox.Entity({
15
+ name: entityName,
16
+ table,
17
+ attributes: {
18
+ PK: {
19
+ partitionKey: true
20
+ },
21
+ SK: {
22
+ sortKey: true
23
+ },
24
+ TYPE: {
25
+ type: "string"
26
+ },
27
+ namespace: {
28
+ type: "string"
29
+ },
30
+ url: {
31
+ type: "string"
32
+ },
33
+ value: {
34
+ type: "string"
35
+ },
36
+ key: {
37
+ type: "string"
38
+ },
39
+ ...(attributes || {})
40
+ }
41
+ });
42
+ };
43
+ exports.createTagUrlLinkEntity = createTagUrlLinkEntity;
44
+
45
+ //# sourceMappingURL=tagPathLinkLegacy.js.map
@@ -0,0 +1 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_toolbox","require","createTenantEntity","entityName","table","Entity","name","attributes","PK","partitionKey","SK","sortKey","GSI1_PK","type","GSI1_SK","TYPE","id","exports"],"sources":["tenantEntity.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n}\n\nexport const createTenantEntity = ({ entityName, table }: Params): Entity<any> => {\n return new Entity({\n table,\n name: entityName,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n GSI1_PK: {\n type: \"string\"\n },\n GSI1_SK: {\n type: \"string\"\n },\n TYPE: {\n type: \"string\"\n },\n id: {\n type: \"string\"\n }\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAOO,MAAMC,kBAAkB,GAAGA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,KAAkB;EAC9E,OAAO,IAAIC,eAAM,CAAC;IACdD,KAAK;IACLE,IAAI,EAAEH,UAAU;IAChBI,UAAU,EAAE;MACRC,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,OAAO,EAAE;QACLC,IAAI,EAAE;MACV,CAAC;MACDC,OAAO,EAAE;QACLD,IAAI,EAAE;MACV,CAAC;MACDE,IAAI,EAAE;QACFF,IAAI,EAAE;MACV,CAAC;MACDG,EAAE,EAAE;QACAH,IAAI,EAAE;MACV;IACJ;EACJ,CAAC,CAAC;AACN,CAAC;AAACI,OAAA,CAAAf,kBAAA,GAAAA,kBAAA","ignoreList":[]}
package/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { PrerenderingServiceFactory } from "./types";
1
+ import type { PrerenderingServiceFactory } from "./types";
2
2
  export declare const createPrerenderingServiceStorageOperations: PrerenderingServiceFactory;