@webiny/api-prerendering-service-so-ddb 6.0.0-alpha.0 → 6.0.0-alpha.1
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/definitions/queueJob.d.ts +3 -2
- package/definitions/queueJob.js.map +1 -1
- package/definitions/render.d.ts +3 -2
- package/definitions/render.js.map +1 -1
- package/definitions/renderLegacy.d.ts +3 -2
- package/definitions/renderLegacy.js.map +1 -1
- package/definitions/settings.d.ts +3 -2
- package/definitions/settings.js.map +1 -1
- package/definitions/table.d.ts +2 -2
- package/definitions/table.js.map +1 -1
- package/definitions/tagPathLink.d.ts +3 -2
- package/definitions/tagPathLink.js.map +1 -1
- package/definitions/tagPathLinkLegacy.d.ts +3 -2
- package/definitions/tagPathLinkLegacy.js.map +1 -1
- package/definitions/tenantEntity.d.ts +2 -1
- package/definitions/tenantEntity.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js.map +1 -1
- package/operations/settings.d.ts +2 -2
- package/operations/settings.js.map +1 -1
- package/operations/tenant.d.ts +2 -2
- package/operations/tenant.js.map +1 -1
- package/package.json +9 -9
- package/types.d.ts +5 -5
- package/types.js.map +1 -1
@@ -1,5 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
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
5
|
table: Table<string, string, string>;
|
5
6
|
entityName: string;
|
@@ -1 +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 {
|
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":[]}
|
package/definitions/render.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
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
5
|
table: Table<string, string, string>;
|
5
6
|
entityName: string;
|
@@ -1 +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 {
|
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,5 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
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
5
|
table: Table<string, string, string>;
|
5
6
|
entityName: string;
|
@@ -1 +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 {
|
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,5 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
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
5
|
table: Table<string, string, string>;
|
5
6
|
entityName: string;
|
@@ -1 +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 {
|
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":[]}
|
package/definitions/table.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb";
|
1
|
+
import type { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb";
|
2
2
|
import { Table } from "@webiny/db-dynamodb/toolbox";
|
3
|
-
import { TableModifier } from "../types";
|
3
|
+
import type { TableModifier } from "../types";
|
4
4
|
interface CreateTableParams {
|
5
5
|
table?: TableModifier;
|
6
6
|
documentClient: DynamoDBDocument;
|
package/definitions/table.js.map
CHANGED
@@ -1 +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 { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb\";\nimport { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { TableModifier } from \"~/types\";\nimport { 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
|
+
{"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,5 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
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
5
|
table: Table<string, string, string>;
|
5
6
|
entityName: string;
|
@@ -1 +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 {
|
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,5 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
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
5
|
table: Table<string, string, string>;
|
5
6
|
entityName: string;
|
@@ -1 +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 {
|
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":[]}
|
@@ -1 +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 {
|
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;
|
package/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_error","_interopRequireDefault","require","_types","_table","_render","_settings","_queueJob","_render2","_tenant","_settings2","_queueJob2","_tagPathLink","_tenantEntity","reservedFields","isReserved","name","includes","WebinyError","createPrerenderingServiceStorageOperations","params","attributes","table","documentClient","Object","values","forEach","attrs","keys","tableInstance","createTable","entities","render","createRenderEntity","entityName","ENTITIES","RENDER","settings","createSettingsEntity","SETTINGS","queueJob","createQueueJobEntity","QUEUE_JOB","tagPathLink","createTagPathLinkEntity","TAG_PATH_LINK","tenant","createTenantEntity","TENANT","getTable","getEntities","createRenderStorageOperations","entity","tagPathLinkEntity","createQueueJobStorageOperations","createSettingsStorageOperations","createTenantStorageOperations","exports"],"sources":["index.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport {
|
1
|
+
{"version":3,"names":["_error","_interopRequireDefault","require","_types","_table","_render","_settings","_queueJob","_render2","_tenant","_settings2","_queueJob2","_tagPathLink","_tenantEntity","reservedFields","isReserved","name","includes","WebinyError","createPrerenderingServiceStorageOperations","params","attributes","table","documentClient","Object","values","forEach","attrs","keys","tableInstance","createTable","entities","render","createRenderEntity","entityName","ENTITIES","RENDER","settings","createSettingsEntity","SETTINGS","queueJob","createQueueJobEntity","QUEUE_JOB","tagPathLink","createTagPathLinkEntity","TAG_PATH_LINK","tenant","createTenantEntity","TENANT","getTable","getEntities","createRenderStorageOperations","entity","tagPathLinkEntity","createQueueJobStorageOperations","createSettingsStorageOperations","createTenantStorageOperations","exports"],"sources":["index.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport type { PrerenderingServiceFactory, PrerenderingServiceFactoryParams } from \"~/types\";\nimport { ENTITIES } from \"~/types\";\nimport { createTable } from \"~/definitions/table\";\nimport { createRenderEntity } from \"~/definitions/render\";\nimport { createSettingsEntity } from \"~/definitions/settings\";\nimport { createQueueJobEntity } from \"~/definitions/queueJob\";\nimport { createRenderStorageOperations } from \"~/operations/render\";\nimport { createTenantStorageOperations } from \"~/operations/tenant\";\nimport { createSettingsStorageOperations } from \"~/operations/settings\";\nimport { createQueueJobStorageOperations } from \"~/operations/queueJob\";\nimport { createTagPathLinkEntity } from \"~/definitions/tagPathLink\";\nimport { createTenantEntity } from \"~/definitions/tenantEntity\";\n\nconst reservedFields = [\"PK\", \"SK\", \"index\", \"data\", \"TYPE\", \"__type\", \"GSI1_PK\", \"GSI1_SK\"];\n\nconst isReserved = (name: string): void => {\n if (reservedFields.includes(name) === false) {\n return;\n }\n throw new WebinyError(`Attribute name \"${name}\" is not allowed.`, \"ATTRIBUTE_NOT_ALLOWED\", {\n name\n });\n};\n\nexport const createPrerenderingServiceStorageOperations: PrerenderingServiceFactory = (\n params: PrerenderingServiceFactoryParams\n) => {\n const { attributes, table, documentClient } = params;\n\n if (attributes) {\n Object.values(attributes).forEach(attrs => {\n Object.keys(attrs).forEach(isReserved);\n });\n }\n\n const tableInstance = createTable({ table, documentClient });\n\n const entities = {\n render: createRenderEntity({\n entityName: ENTITIES.RENDER,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.RENDER] : {}\n }),\n settings: createSettingsEntity({\n entityName: ENTITIES.SETTINGS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.SETTINGS] : {}\n }),\n queueJob: createQueueJobEntity({\n entityName: ENTITIES.QUEUE_JOB,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.QUEUE_JOB] : {}\n }),\n tagPathLink: createTagPathLinkEntity({\n entityName: ENTITIES.TAG_PATH_LINK,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.TAG_PATH_LINK] : {}\n }),\n tenant: createTenantEntity({\n entityName: ENTITIES.TENANT,\n table: tableInstance\n })\n };\n\n return {\n getTable: () => tableInstance,\n getEntities: () => entities,\n ...createRenderStorageOperations({\n entity: entities.render,\n tagPathLinkEntity: entities.tagPathLink\n }),\n ...createQueueJobStorageOperations({\n entity: entities.queueJob\n }),\n ...createSettingsStorageOperations({\n entity: entities.settings\n }),\n ...createTenantStorageOperations({\n entity: entities.tenant\n })\n };\n};\n"],"mappings":"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","ignoreList":[]}
|
package/operations/settings.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { PrerenderingServiceSettingsStorageOperations } from "@webiny/api-prerendering-service/types";
|
2
|
-
import { Entity } from "@webiny/db-dynamodb/toolbox";
|
1
|
+
import type { PrerenderingServiceSettingsStorageOperations } from "@webiny/api-prerendering-service/types";
|
2
|
+
import type { Entity } from "@webiny/db-dynamodb/toolbox";
|
3
3
|
export interface CreateSettingsStorageOperationsParams {
|
4
4
|
entity: Entity<any>;
|
5
5
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_error","_interopRequireDefault","require","_get","_dbDynamodb","createSettingsStorageOperations","params","entity","getSettings","variant","keys","PK","SK","result","get","Error","data","ex","WebinyError","message","code","name","saveSettings","settings","put","item","TYPE","exports"],"sources":["settings.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport {\n PrerenderingServiceSaveSettingsParams,\n PrerenderingServiceSettingsStorageOperations,\n PrerenderingSettings\n} from \"@webiny/api-prerendering-service/types\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport { get } from \"@webiny/db-dynamodb/utils/get\";\nimport { put } from \"@webiny/db-dynamodb\";\n\nexport interface CreateSettingsStorageOperationsParams {\n entity: Entity<any>;\n}\n\nexport const createSettingsStorageOperations = (\n params: CreateSettingsStorageOperationsParams\n): PrerenderingServiceSettingsStorageOperations => {\n const { entity } = params;\n\n const getSettings = async (variant = \"default\"): Promise<PrerenderingSettings> => {\n const keys = {\n PK: \"PS#SETTINGS\",\n SK: variant\n };\n\n try {\n const result = await get<{ data: PrerenderingSettings }>({\n entity,\n keys\n });\n\n if (!result) {\n throw Error();\n }\n\n return result.data;\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not load prerendering settings!\",\n ex.code || \"GET_SETTINGS_ERROR\",\n {\n keys,\n entity: entity.name\n }\n );\n }\n };\n\n const saveSettings = async (params: PrerenderingServiceSaveSettingsParams) => {\n const { settings, variant = \"default\" } = params;\n const keys = {\n PK: \"PS#SETTINGS\",\n SK: variant\n };\n\n try {\n await put({\n entity,\n item: {\n ...keys,\n TYPE: \"ps.settings\",\n data: settings\n }\n });\n\n return settings;\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not save settings.\",\n ex.code || \"SAVE_SETTINGS_ERROR\",\n {\n keys\n }\n );\n }\n };\n\n return {\n getSettings,\n saveSettings\n };\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAOA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAMO,MAAMG,+BAA+B,GACxCC,MAA6C,IACE;EAC/C,MAAM;IAAEC;EAAO,CAAC,GAAGD,MAAM;EAEzB,MAAME,WAAW,GAAG,MAAAA,CAAOC,OAAO,GAAG,SAAS,KAAoC;IAC9E,MAAMC,IAAI,GAAG;MACTC,EAAE,EAAE,aAAa;MACjBC,EAAE,EAAEH;IACR,CAAC;IAED,IAAI;MACA,MAAMI,MAAM,GAAG,MAAM,IAAAC,QAAG,EAAiC;QACrDP,MAAM;QACNG;MACJ,CAAC,CAAC;MAEF,IAAI,CAACG,MAAM,EAAE;QACT,MAAME,KAAK,CAAC,CAAC;MACjB;MAEA,OAAOF,MAAM,CAACG,IAAI;IACtB,CAAC,CAAC,OAAOC,EAAE,EAAE;MACT,MAAM,IAAIC,cAAW,CACjBD,EAAE,CAACE,OAAO,IAAI,uCAAuC,EACrDF,EAAE,CAACG,IAAI,IAAI,oBAAoB,EAC/B;QACIV,IAAI;QACJH,MAAM,EAAEA,MAAM,CAACc;MACnB,CACJ,CAAC;IACL;EACJ,CAAC;EAED,MAAMC,YAAY,GAAG,MAAOhB,MAA6C,IAAK;IAC1E,MAAM;MAAEiB,QAAQ;MAAEd,OAAO,GAAG;IAAU,CAAC,GAAGH,MAAM;IAChD,MAAMI,IAAI,GAAG;MACTC,EAAE,EAAE,aAAa;MACjBC,EAAE,EAAEH;IACR,CAAC;IAED,IAAI;MACA,MAAM,IAAAe,eAAG,EAAC;QACNjB,MAAM;QACNkB,IAAI,EAAE;UACF,GAAGf,IAAI;UACPgB,IAAI,EAAE,aAAa;UACnBV,IAAI,EAAEO;QACV;MACJ,CAAC,CAAC;MAEF,OAAOA,QAAQ;IACnB,CAAC,CAAC,OAAON,EAAE,EAAE;MACT,MAAM,IAAIC,cAAW,CACjBD,EAAE,CAACE,OAAO,IAAI,0BAA0B,EACxCF,EAAE,CAACG,IAAI,IAAI,qBAAqB,EAChC;QACIV;MACJ,CACJ,CAAC;IACL;EACJ,CAAC;EAED,OAAO;IACHF,WAAW;IACXc;EACJ,CAAC;AACL,CAAC;AAACK,OAAA,CAAAtB,+BAAA,GAAAA,+BAAA","ignoreList":[]}
|
1
|
+
{"version":3,"names":["_error","_interopRequireDefault","require","_get","_dbDynamodb","createSettingsStorageOperations","params","entity","getSettings","variant","keys","PK","SK","result","get","Error","data","ex","WebinyError","message","code","name","saveSettings","settings","put","item","TYPE","exports"],"sources":["settings.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport type {\n PrerenderingServiceSaveSettingsParams,\n PrerenderingServiceSettingsStorageOperations,\n PrerenderingSettings\n} from \"@webiny/api-prerendering-service/types\";\nimport type { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport { get } from \"@webiny/db-dynamodb/utils/get\";\nimport { put } from \"@webiny/db-dynamodb\";\n\nexport interface CreateSettingsStorageOperationsParams {\n entity: Entity<any>;\n}\n\nexport const createSettingsStorageOperations = (\n params: CreateSettingsStorageOperationsParams\n): PrerenderingServiceSettingsStorageOperations => {\n const { entity } = params;\n\n const getSettings = async (variant = \"default\"): Promise<PrerenderingSettings> => {\n const keys = {\n PK: \"PS#SETTINGS\",\n SK: variant\n };\n\n try {\n const result = await get<{ data: PrerenderingSettings }>({\n entity,\n keys\n });\n\n if (!result) {\n throw Error();\n }\n\n return result.data;\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not load prerendering settings!\",\n ex.code || \"GET_SETTINGS_ERROR\",\n {\n keys,\n entity: entity.name\n }\n );\n }\n };\n\n const saveSettings = async (params: PrerenderingServiceSaveSettingsParams) => {\n const { settings, variant = \"default\" } = params;\n const keys = {\n PK: \"PS#SETTINGS\",\n SK: variant\n };\n\n try {\n await put({\n entity,\n item: {\n ...keys,\n TYPE: \"ps.settings\",\n data: settings\n }\n });\n\n return settings;\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not save settings.\",\n ex.code || \"SAVE_SETTINGS_ERROR\",\n {\n keys\n }\n );\n }\n };\n\n return {\n getSettings,\n saveSettings\n };\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAOA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAMO,MAAMG,+BAA+B,GACxCC,MAA6C,IACE;EAC/C,MAAM;IAAEC;EAAO,CAAC,GAAGD,MAAM;EAEzB,MAAME,WAAW,GAAG,MAAAA,CAAOC,OAAO,GAAG,SAAS,KAAoC;IAC9E,MAAMC,IAAI,GAAG;MACTC,EAAE,EAAE,aAAa;MACjBC,EAAE,EAAEH;IACR,CAAC;IAED,IAAI;MACA,MAAMI,MAAM,GAAG,MAAM,IAAAC,QAAG,EAAiC;QACrDP,MAAM;QACNG;MACJ,CAAC,CAAC;MAEF,IAAI,CAACG,MAAM,EAAE;QACT,MAAME,KAAK,CAAC,CAAC;MACjB;MAEA,OAAOF,MAAM,CAACG,IAAI;IACtB,CAAC,CAAC,OAAOC,EAAE,EAAE;MACT,MAAM,IAAIC,cAAW,CACjBD,EAAE,CAACE,OAAO,IAAI,uCAAuC,EACrDF,EAAE,CAACG,IAAI,IAAI,oBAAoB,EAC/B;QACIV,IAAI;QACJH,MAAM,EAAEA,MAAM,CAACc;MACnB,CACJ,CAAC;IACL;EACJ,CAAC;EAED,MAAMC,YAAY,GAAG,MAAOhB,MAA6C,IAAK;IAC1E,MAAM;MAAEiB,QAAQ;MAAEd,OAAO,GAAG;IAAU,CAAC,GAAGH,MAAM;IAChD,MAAMI,IAAI,GAAG;MACTC,EAAE,EAAE,aAAa;MACjBC,EAAE,EAAEH;IACR,CAAC;IAED,IAAI;MACA,MAAM,IAAAe,eAAG,EAAC;QACNjB,MAAM;QACNkB,IAAI,EAAE;UACF,GAAGf,IAAI;UACPgB,IAAI,EAAE,aAAa;UACnBV,IAAI,EAAEO;QACV;MACJ,CAAC,CAAC;MAEF,OAAOA,QAAQ;IACnB,CAAC,CAAC,OAAON,EAAE,EAAE;MACT,MAAM,IAAIC,cAAW,CACjBD,EAAE,CAACE,OAAO,IAAI,0BAA0B,EACxCF,EAAE,CAACG,IAAI,IAAI,qBAAqB,EAChC;QACIV;MACJ,CACJ,CAAC;IACL;EACJ,CAAC;EAED,OAAO;IACHF,WAAW;IACXc;EACJ,CAAC;AACL,CAAC;AAACK,OAAA,CAAAtB,+BAAA,GAAAA,+BAAA","ignoreList":[]}
|
package/operations/tenant.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { PrerenderingServiceTenantStorageOperations } from "@webiny/api-prerendering-service/types";
|
2
|
-
import { Entity } from "@webiny/db-dynamodb/toolbox";
|
1
|
+
import type { PrerenderingServiceTenantStorageOperations } from "@webiny/api-prerendering-service/types";
|
2
|
+
import type { Entity } from "@webiny/db-dynamodb/toolbox";
|
3
3
|
export interface CreateTenantStorageOperationsParams {
|
4
4
|
entity: Entity<any>;
|
5
5
|
}
|
package/operations/tenant.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_query","require","createTenantStorageOperations","params","entity","getTenantIds","tenants","queryAll","partitionKey","options","index","gt","map","tenant","data","id","exports"],"sources":["tenant.ts"],"sourcesContent":["import { PrerenderingServiceTenantStorageOperations } from \"@webiny/api-prerendering-service/types\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport { queryAll } from \"@webiny/db-dynamodb/utils/query\";\n\nexport interface CreateTenantStorageOperationsParams {\n entity: Entity<any>;\n}\n\ninterface Tenant {\n data: { id: string };\n}\n\nexport const createTenantStorageOperations = (\n params: CreateTenantStorageOperationsParams\n): PrerenderingServiceTenantStorageOperations => {\n const { entity } = params;\n\n const getTenantIds = async (): Promise<string[]> => {\n const tenants = await queryAll<Tenant>({\n entity,\n partitionKey: \"TENANTS\",\n options: {\n index: \"GSI1\",\n gt: \" \"\n }\n });\n\n return tenants.map(tenant => tenant.data.id);\n };\n\n return { getTenantIds };\n};\n"],"mappings":";;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AAUO,MAAMC,6BAA6B,GACtCC,MAA2C,IACE;EAC7C,MAAM;IAAEC;EAAO,CAAC,GAAGD,MAAM;EAEzB,MAAME,YAAY,GAAG,MAAAA,CAAA,KAA+B;IAChD,MAAMC,OAAO,GAAG,MAAM,IAAAC,eAAQ,EAAS;MACnCH,MAAM;MACNI,YAAY,EAAE,SAAS;MACvBC,OAAO,EAAE;QACLC,KAAK,EAAE,MAAM;QACbC,EAAE,EAAE;MACR;IACJ,CAAC,CAAC;IAEF,OAAOL,OAAO,CAACM,GAAG,CAACC,MAAM,IAAIA,MAAM,CAACC,IAAI,CAACC,EAAE,CAAC;EAChD,CAAC;EAED,OAAO;IAAEV;EAAa,CAAC;AAC3B,CAAC;AAACW,OAAA,CAAAd,6BAAA,GAAAA,6BAAA","ignoreList":[]}
|
1
|
+
{"version":3,"names":["_query","require","createTenantStorageOperations","params","entity","getTenantIds","tenants","queryAll","partitionKey","options","index","gt","map","tenant","data","id","exports"],"sources":["tenant.ts"],"sourcesContent":["import type { PrerenderingServiceTenantStorageOperations } from \"@webiny/api-prerendering-service/types\";\nimport type { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport { queryAll } from \"@webiny/db-dynamodb/utils/query\";\n\nexport interface CreateTenantStorageOperationsParams {\n entity: Entity<any>;\n}\n\ninterface Tenant {\n data: { id: string };\n}\n\nexport const createTenantStorageOperations = (\n params: CreateTenantStorageOperationsParams\n): PrerenderingServiceTenantStorageOperations => {\n const { entity } = params;\n\n const getTenantIds = async (): Promise<string[]> => {\n const tenants = await queryAll<Tenant>({\n entity,\n partitionKey: \"TENANTS\",\n options: {\n index: \"GSI1\",\n gt: \" \"\n }\n });\n\n return tenants.map(tenant => tenant.data.id);\n };\n\n return { getTenantIds };\n};\n"],"mappings":";;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AAUO,MAAMC,6BAA6B,GACtCC,MAA2C,IACE;EAC7C,MAAM;IAAEC;EAAO,CAAC,GAAGD,MAAM;EAEzB,MAAME,YAAY,GAAG,MAAAA,CAAA,KAA+B;IAChD,MAAMC,OAAO,GAAG,MAAM,IAAAC,eAAQ,EAAS;MACnCH,MAAM;MACNI,YAAY,EAAE,SAAS;MACvBC,OAAO,EAAE;QACLC,KAAK,EAAE,MAAM;QACbC,EAAE,EAAE;MACR;IACJ,CAAC,CAAC;IAEF,OAAOL,OAAO,CAACM,GAAG,CAACC,MAAM,IAAIA,MAAM,CAACC,IAAI,CAACC,EAAE,CAAC;EAChD,CAAC;EAED,OAAO;IAAEV;EAAa,CAAC;AAC3B,CAAC;AAACW,OAAA,CAAAd,6BAAA,GAAAA,6BAAA","ignoreList":[]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@webiny/api-prerendering-service-so-ddb",
|
3
|
-
"version": "6.0.0-alpha.
|
3
|
+
"version": "6.0.0-alpha.1",
|
4
4
|
"main": "index.js",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -18,15 +18,15 @@
|
|
18
18
|
"author": "Webiny Ltd",
|
19
19
|
"license": "MIT",
|
20
20
|
"dependencies": {
|
21
|
-
"@webiny/api-prerendering-service": "6.0.0-alpha.
|
22
|
-
"@webiny/aws-sdk": "6.0.0-alpha.
|
23
|
-
"@webiny/error": "6.0.0-alpha.
|
21
|
+
"@webiny/api-prerendering-service": "6.0.0-alpha.1",
|
22
|
+
"@webiny/aws-sdk": "6.0.0-alpha.1",
|
23
|
+
"@webiny/error": "6.0.0-alpha.1"
|
24
24
|
},
|
25
25
|
"devDependencies": {
|
26
|
-
"@webiny/db": "6.0.0-alpha.
|
27
|
-
"@webiny/db-dynamodb": "6.0.0-alpha.
|
28
|
-
"@webiny/handler-aws": "6.0.0-alpha.
|
29
|
-
"@webiny/project-utils": "6.0.0-alpha.
|
26
|
+
"@webiny/db": "6.0.0-alpha.1",
|
27
|
+
"@webiny/db-dynamodb": "6.0.0-alpha.1",
|
28
|
+
"@webiny/handler-aws": "6.0.0-alpha.1",
|
29
|
+
"@webiny/project-utils": "6.0.0-alpha.1",
|
30
30
|
"jest-dynalite": "3.6.1",
|
31
31
|
"prettier": "2.8.8",
|
32
32
|
"rimraf": "6.0.1",
|
@@ -40,5 +40,5 @@
|
|
40
40
|
"build": "node ../cli/bin.js run build",
|
41
41
|
"watch": "node ../cli/bin.js run watch"
|
42
42
|
},
|
43
|
-
"gitHead": "
|
43
|
+
"gitHead": "9bd236cf5e689f209a11bec089207dcc2d41a53c"
|
44
44
|
}
|
package/types.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb";
|
2
|
-
import { Entity, Table } from "@webiny/db-dynamodb/toolbox";
|
3
|
-
import { TableConstructor } from "@webiny/db-dynamodb/toolbox";
|
4
|
-
import { AttributeDefinition } from "@webiny/db-dynamodb/toolbox";
|
5
|
-
import { PrerenderingServiceStorageOperations as BasePrerenderingServiceStorageOperations } from "@webiny/api-prerendering-service/types";
|
1
|
+
import type { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb";
|
2
|
+
import type { Entity, Table } from "@webiny/db-dynamodb/toolbox";
|
3
|
+
import type { TableConstructor } from "@webiny/db-dynamodb/toolbox";
|
4
|
+
import type { AttributeDefinition } from "@webiny/db-dynamodb/toolbox";
|
5
|
+
import type { PrerenderingServiceStorageOperations as BasePrerenderingServiceStorageOperations } from "@webiny/api-prerendering-service/types";
|
6
6
|
export type Attributes = Record<string, AttributeDefinition>;
|
7
7
|
export declare enum ENTITIES {
|
8
8
|
RENDER = "PrerenderingServiceRender",
|
package/types.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["ENTITIES","exports"],"sources":["types.ts"],"sourcesContent":["import { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb\";\nimport { Entity, Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { TableConstructor } from \"@webiny/db-dynamodb/toolbox\";\nimport { AttributeDefinition } from \"@webiny/db-dynamodb/toolbox\";\nimport { PrerenderingServiceStorageOperations as BasePrerenderingServiceStorageOperations } from \"@webiny/api-prerendering-service/types\";\n\nexport type Attributes = Record<string, AttributeDefinition>;\n\nexport enum ENTITIES {\n RENDER = \"PrerenderingServiceRender\",\n SETTINGS = \"PrerenderingServiceSettings\",\n QUEUE_JOB = \"PrerenderingServiceQueueJob\",\n TAG_PATH_LINK = \"PrerenderingServiceTagPathLink\",\n TENANT = \"Tenant\"\n}\n\nexport interface PrerenderingServiceFactoryParams {\n documentClient: DynamoDBDocument;\n table?: TableModifier;\n attributes?: Record<ENTITIES, Attributes>;\n}\n\nexport type Entities = \"render\" | \"queueJob\" | \"tagPathLink\";\n\nexport interface PrerenderingServiceStorageOperations\n extends BasePrerenderingServiceStorageOperations {\n getTable(): Table<string, string, string>;\n getEntities(): Record<Entities, Entity<any>>;\n}\n\nexport interface PrerenderingServiceFactory {\n (params: PrerenderingServiceFactoryParams): PrerenderingServiceStorageOperations;\n}\n\nexport interface TableModifier {\n (table: TableConstructor<string, string, string>): TableConstructor<string, string, string>;\n}\n\nexport interface DataContainer<T> {\n PK: string;\n SK: string;\n data: T;\n}\n"],"mappings":";;;;;;IAQYA,QAAQ,GAAAC,OAAA,CAAAD,QAAA,0BAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA","ignoreList":[]}
|
1
|
+
{"version":3,"names":["ENTITIES","exports"],"sources":["types.ts"],"sourcesContent":["import type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb\";\nimport type { Entity, Table } from \"@webiny/db-dynamodb/toolbox\";\nimport type { TableConstructor } from \"@webiny/db-dynamodb/toolbox\";\nimport type { AttributeDefinition } from \"@webiny/db-dynamodb/toolbox\";\nimport type { PrerenderingServiceStorageOperations as BasePrerenderingServiceStorageOperations } from \"@webiny/api-prerendering-service/types\";\n\nexport type Attributes = Record<string, AttributeDefinition>;\n\nexport enum ENTITIES {\n RENDER = \"PrerenderingServiceRender\",\n SETTINGS = \"PrerenderingServiceSettings\",\n QUEUE_JOB = \"PrerenderingServiceQueueJob\",\n TAG_PATH_LINK = \"PrerenderingServiceTagPathLink\",\n TENANT = \"Tenant\"\n}\n\nexport interface PrerenderingServiceFactoryParams {\n documentClient: DynamoDBDocument;\n table?: TableModifier;\n attributes?: Record<ENTITIES, Attributes>;\n}\n\nexport type Entities = \"render\" | \"queueJob\" | \"tagPathLink\";\n\nexport interface PrerenderingServiceStorageOperations\n extends BasePrerenderingServiceStorageOperations {\n getTable(): Table<string, string, string>;\n getEntities(): Record<Entities, Entity<any>>;\n}\n\nexport interface PrerenderingServiceFactory {\n (params: PrerenderingServiceFactoryParams): PrerenderingServiceStorageOperations;\n}\n\nexport interface TableModifier {\n (table: TableConstructor<string, string, string>): TableConstructor<string, string, string>;\n}\n\nexport interface DataContainer<T> {\n PK: string;\n SK: string;\n data: T;\n}\n"],"mappings":";;;;;;IAQYA,QAAQ,GAAAC,OAAA,CAAAD,QAAA,0BAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA","ignoreList":[]}
|