@webiny/api-websockets 6.3.0-beta.4 → 6.4.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/context/WebsocketsContext.js +57 -72
  2. package/context/WebsocketsContext.js.map +1 -1
  3. package/context/abstractions/IWebsocketsContext.js +0 -3
  4. package/context/index.js +12 -15
  5. package/context/index.js.map +1 -1
  6. package/exports/api.d.ts +1 -0
  7. package/exports/api.js +5 -0
  8. package/exports/api.js.map +1 -0
  9. package/features/WebsocketService/abstractions.js +2 -1
  10. package/features/WebsocketService/abstractions.js.map +1 -1
  11. package/features/WebsocketService/errors.js +28 -30
  12. package/features/WebsocketService/errors.js.map +1 -1
  13. package/features/WebsocketService/index.js +0 -2
  14. package/graphql/checkPermissions.js +5 -11
  15. package/graphql/checkPermissions.js.map +1 -1
  16. package/graphql/createResolvers.js +55 -76
  17. package/graphql/createResolvers.js.map +1 -1
  18. package/graphql/createTypeDefs.js +2 -3
  19. package/graphql/createTypeDefs.js.map +1 -1
  20. package/graphql/index.js +8 -7
  21. package/graphql/index.js.map +1 -1
  22. package/graphql/utils.js +8 -7
  23. package/graphql/utils.js.map +1 -1
  24. package/handler/handler.js +58 -66
  25. package/handler/handler.js.map +1 -1
  26. package/handler/headers.js +21 -28
  27. package/handler/headers.js.map +1 -1
  28. package/handler/register.js +9 -19
  29. package/handler/register.js.map +1 -1
  30. package/handler/types.js +11 -10
  31. package/handler/types.js.map +1 -1
  32. package/index.js +5 -3
  33. package/index.js.map +1 -1
  34. package/package.json +20 -20
  35. package/plugins/WebsocketsActionPlugin.js +14 -13
  36. package/plugins/WebsocketsActionPlugin.js.map +1 -1
  37. package/plugins/WebsocketsRoutePlugin.js +14 -13
  38. package/plugins/WebsocketsRoutePlugin.js.map +1 -1
  39. package/plugins/abstrations/IWebsocketsActionPlugin.js +0 -3
  40. package/plugins/index.js +0 -2
  41. package/registry/WebsocketsConnectionRegistry.js +107 -146
  42. package/registry/WebsocketsConnectionRegistry.js.map +1 -1
  43. package/registry/abstractions/IWebsocketsConnectionRegistry.js +0 -3
  44. package/registry/entity.js +44 -43
  45. package/registry/entity.js.map +1 -1
  46. package/registry/index.js +0 -2
  47. package/response/WebsocketsResponse.js +20 -19
  48. package/response/WebsocketsResponse.js.map +1 -1
  49. package/response/abstractions/IWebsocketsResponse.js +0 -3
  50. package/response/index.js +0 -2
  51. package/runner/WebsocketsRunner.js +137 -164
  52. package/runner/WebsocketsRunner.js.map +1 -1
  53. package/runner/abstractions/IWebsocketsRunner.js +0 -3
  54. package/runner/index.js +0 -2
  55. package/runner/routes/connect.js +30 -40
  56. package/runner/routes/connect.js.map +1 -1
  57. package/runner/routes/default.js +16 -22
  58. package/runner/routes/default.js.map +1 -1
  59. package/runner/routes/disconnect.js +10 -13
  60. package/runner/routes/disconnect.js.map +1 -1
  61. package/runner/routes/index.js +6 -3
  62. package/runner/routes/index.js.map +1 -1
  63. package/transport/WebsocketsTransport.js +36 -39
  64. package/transport/WebsocketsTransport.js.map +1 -1
  65. package/transport/abstractions/IWebsocketsTransport.js +0 -3
  66. package/transport/index.js +0 -2
  67. package/types.js +0 -3
  68. package/utils/middleware.js +9 -14
  69. package/utils/middleware.js.map +1 -1
  70. package/validator/WebsocketsEventValidator.js +55 -63
  71. package/validator/WebsocketsEventValidator.js.map +1 -1
  72. package/validator/abstractions/IWebsocketsEventValidator.js +0 -3
  73. package/validator/index.js +0 -2
  74. package/context/abstractions/IWebsocketsContext.js.map +0 -1
  75. package/features/WebsocketService/index.js.map +0 -1
  76. package/plugins/abstrations/IWebsocketsActionPlugin.js.map +0 -1
  77. package/plugins/index.js.map +0 -1
  78. package/registry/abstractions/IWebsocketsConnectionRegistry.js.map +0 -1
  79. package/registry/index.js.map +0 -1
  80. package/response/abstractions/IWebsocketsResponse.js.map +0 -1
  81. package/response/index.js.map +0 -1
  82. package/runner/abstractions/IWebsocketsRunner.js.map +0 -1
  83. package/runner/index.js.map +0 -1
  84. package/transport/abstractions/IWebsocketsTransport.js.map +0 -1
  85. package/transport/index.js.map +0 -1
  86. package/types.js.map +0 -1
  87. package/validator/abstractions/IWebsocketsEventValidator.js.map +0 -1
  88. package/validator/index.js.map +0 -1
@@ -1,157 +1,118 @@
1
- import WebinyError from "@webiny/error";
1
+ import error from "@webiny/error";
2
2
  import { createEntity } from "./entity.js";
3
- const PK = `WS#CONNECTIONS`;
3
+ const PK = "WS#CONNECTIONS";
4
4
  const GSI1_PK = "WS#CONNECTIONS#IDENTITY";
5
5
  const GSI2_PK = "WS#CONNECTIONS#TENANT";
6
- export class WebsocketsConnectionRegistry {
7
- constructor(documentClient) {
8
- this.entity = createEntity(documentClient);
9
- }
10
- async register(params) {
11
- const {
12
- connectionId,
13
- tenant,
14
- identity,
15
- domainName,
16
- stage,
17
- connectedOn
18
- } = params;
19
- const data = {
20
- connectionId,
21
- identity,
22
- tenant,
23
- domainName,
24
- stage,
25
- connectedOn
26
- };
27
- await this.store(data);
28
- return data;
29
- }
30
- async unregister(params) {
31
- const {
32
- connectionId
33
- } = params;
34
- const keys = {
35
- PK,
36
- SK: connectionId
37
- };
38
- const original = await this.getViaConnection(connectionId);
39
- if (!original) {
40
- const message = `There is no connection with ID "${connectionId}".`;
41
- console.error(message);
42
- throw new WebinyError(message, "CONNECTION_NOT_FOUND", keys);
6
+ class WebsocketsConnectionRegistry {
7
+ constructor(documentClient){
8
+ this.entity = createEntity(documentClient);
43
9
  }
44
- try {
45
- await this.entity.delete(keys);
46
- } catch (ex) {
47
- console.error(`Could not remove connection from the database: ${original.connectionId}`);
48
- throw new WebinyError(ex.message, ex.code, keys);
10
+ async register(params) {
11
+ const { connectionId, tenant, identity, domainName, stage, connectedOn } = params;
12
+ const data = {
13
+ connectionId,
14
+ identity,
15
+ tenant,
16
+ domainName,
17
+ stage,
18
+ connectedOn
19
+ };
20
+ await this.store(data);
21
+ return data;
49
22
  }
50
- }
51
- async getViaConnection(connectionId) {
52
- const item = await this.entity.get({
53
- PK,
54
- SK: connectionId
55
- });
56
- if (!item) {
57
- return null;
23
+ async unregister(params) {
24
+ const { connectionId } = params;
25
+ const keys = {
26
+ PK: PK,
27
+ SK: connectionId
28
+ };
29
+ const original = await this.getViaConnection(connectionId);
30
+ if (!original) {
31
+ const message = `There is no connection with ID "${connectionId}".`;
32
+ console.error(message);
33
+ throw new error(message, "CONNECTION_NOT_FOUND", keys);
34
+ }
35
+ try {
36
+ await this.entity.delete(keys);
37
+ } catch (ex) {
38
+ console.error(`Could not remove connection from the database: ${original.connectionId}`);
39
+ throw new error(ex.message, ex.code, keys);
40
+ }
58
41
  }
59
- return item?.data || null;
60
- }
61
-
62
- /**
63
- * Uses Primary keys
64
- */
65
- async listViaConnections(connections) {
66
- const reader = this.entity.createEntityReader({
67
- read: connections.map(id => {
68
- return {
69
- PK,
70
- SK: id
42
+ async getViaConnection(connectionId) {
43
+ const item = await this.entity.get({
44
+ PK: PK,
45
+ SK: connectionId
46
+ });
47
+ if (!item) return null;
48
+ return item?.data || null;
49
+ }
50
+ async listViaConnections(connections) {
51
+ const reader = this.entity.createEntityReader({
52
+ read: connections.map((id)=>({
53
+ PK: PK,
54
+ SK: id
55
+ }))
56
+ });
57
+ const results = await reader.execute();
58
+ return results.map((item)=>item.data);
59
+ }
60
+ async listViaIdentity(identity) {
61
+ const items = await this.entity.queryAll({
62
+ partitionKey: GSI1_PK,
63
+ options: {
64
+ index: "GSI1",
65
+ eq: identity
66
+ }
67
+ });
68
+ return items.map((item)=>item.data);
69
+ }
70
+ async listViaTenant(tenant) {
71
+ const options = {
72
+ beginsWith: `T#${tenant}`
71
73
  };
72
- })
73
- });
74
- const results = await reader.execute();
75
- return results.map(item => {
76
- return item.data;
77
- });
78
- }
79
-
80
- /**
81
- * Uses GSI1 keys
82
- */
83
- async listViaIdentity(identity) {
84
- const items = await this.entity.queryAll({
85
- partitionKey: GSI1_PK,
86
- options: {
87
- index: "GSI1",
88
- eq: identity
89
- }
90
- });
91
- return items.map(item => {
92
- return item.data;
93
- });
94
- }
95
-
96
- /**
97
- * Uses GSI2 keys
98
- */
99
- async listViaTenant(tenant) {
100
- const options = {
101
- beginsWith: `T#${tenant}`
102
- };
103
- const items = await this.entity.queryAll({
104
- partitionKey: GSI2_PK,
105
- options: {
106
- ...options,
107
- index: "GSI2"
108
- }
109
- });
110
- return items.map(item => {
111
- return item.data;
112
- });
113
- }
114
- async listAll() {
115
- const items = await this.entity.queryAll({
116
- partitionKey: PK,
117
- options: {
118
- gte: " "
119
- }
120
- });
121
- return items.map(item => {
122
- return item.data;
123
- });
124
- }
125
- async store(data) {
126
- const {
127
- connectionId,
128
- tenant,
129
- identity
130
- } = data;
131
- const item = {
132
- // to find specific identity related to given connection
133
- PK,
134
- SK: connectionId,
135
- // to find all connections related to given identity
136
- GSI1_PK,
137
- GSI1_SK: identity.id,
138
- // to find all connections related to given tenant
139
- GSI2_PK,
140
- GSI2_SK: `T#${tenant}`,
141
- GSI_TENANT: tenant,
142
- TYPE: "ws.connection",
143
- data
144
- };
145
- try {
146
- return await this.entity.put(item);
147
- } catch (err) {
148
- throw WebinyError.from(err, {
149
- message: "Could not store websockets connection data.",
150
- code: "STORE_WEBSOCKETS_CONNECTION_DATA_ERROR",
151
- data: item
152
- });
74
+ const items = await this.entity.queryAll({
75
+ partitionKey: GSI2_PK,
76
+ options: {
77
+ ...options,
78
+ index: "GSI2"
79
+ }
80
+ });
81
+ return items.map((item)=>item.data);
82
+ }
83
+ async listAll() {
84
+ const items = await this.entity.queryAll({
85
+ partitionKey: PK,
86
+ options: {
87
+ gte: " "
88
+ }
89
+ });
90
+ return items.map((item)=>item.data);
91
+ }
92
+ async store(data) {
93
+ const { connectionId, tenant, identity } = data;
94
+ const item = {
95
+ PK: PK,
96
+ SK: connectionId,
97
+ GSI1_PK: GSI1_PK,
98
+ GSI1_SK: identity.id,
99
+ GSI2_PK: GSI2_PK,
100
+ GSI2_SK: `T#${tenant}`,
101
+ GSI_TENANT: tenant,
102
+ TYPE: "ws.connection",
103
+ data
104
+ };
105
+ try {
106
+ return await this.entity.put(item);
107
+ } catch (err) {
108
+ throw error.from(err, {
109
+ message: "Could not store websockets connection data.",
110
+ code: "STORE_WEBSOCKETS_CONNECTION_DATA_ERROR",
111
+ data: item
112
+ });
113
+ }
153
114
  }
154
- }
155
115
  }
116
+ export { WebsocketsConnectionRegistry };
156
117
 
157
118
  //# sourceMappingURL=WebsocketsConnectionRegistry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["WebinyError","createEntity","PK","GSI1_PK","GSI2_PK","WebsocketsConnectionRegistry","constructor","documentClient","entity","register","params","connectionId","tenant","identity","domainName","stage","connectedOn","data","store","unregister","keys","SK","original","getViaConnection","message","console","error","delete","ex","code","item","get","listViaConnections","connections","reader","createEntityReader","read","map","id","results","execute","listViaIdentity","items","queryAll","partitionKey","options","index","eq","listViaTenant","beginsWith","listAll","gte","GSI1_SK","GSI2_SK","GSI_TENANT","TYPE","put","err","from"],"sources":["WebsocketsConnectionRegistry.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport type {\n IWebsocketsConnectionRegistry,\n IWebsocketsConnectionRegistryData,\n IWebsocketsConnectionRegistryRegisterParams,\n IWebsocketsConnectionRegistryUnregisterParams\n} from \"./abstractions/IWebsocketsConnectionRegistry.js\";\nimport { createEntity } from \"~/registry/entity.js\";\nimport type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport type { EntityQueryOptions } from \"@webiny/db-dynamodb/toolbox.js\";\n\nconst PK = `WS#CONNECTIONS`;\nconst GSI1_PK = \"WS#CONNECTIONS#IDENTITY\";\nconst GSI2_PK = \"WS#CONNECTIONS#TENANT\";\n\nexport class WebsocketsConnectionRegistry implements IWebsocketsConnectionRegistry {\n private readonly entity;\n\n public constructor(documentClient: DynamoDBDocument) {\n this.entity = createEntity(documentClient);\n }\n\n public async register(\n params: IWebsocketsConnectionRegistryRegisterParams\n ): Promise<IWebsocketsConnectionRegistryData> {\n const { connectionId, tenant, identity, domainName, stage, connectedOn } = params;\n\n const data: IWebsocketsConnectionRegistryData = {\n connectionId,\n identity,\n tenant,\n domainName,\n stage,\n connectedOn\n };\n await this.store(data);\n return data;\n }\n\n public async unregister(params: IWebsocketsConnectionRegistryUnregisterParams): Promise<void> {\n const { connectionId } = params;\n\n const keys = {\n PK,\n SK: connectionId\n };\n const original = await this.getViaConnection(connectionId);\n if (!original) {\n const message = `There is no connection with ID \"${connectionId}\".`;\n console.error(message);\n throw new WebinyError(message, \"CONNECTION_NOT_FOUND\", keys);\n }\n\n try {\n await this.entity.delete(keys);\n } catch (ex) {\n console.error(\n `Could not remove connection from the database: ${original.connectionId}`\n );\n throw new WebinyError(ex.message, ex.code, keys);\n }\n }\n\n private async getViaConnection(\n connectionId: string\n ): Promise<IWebsocketsConnectionRegistryData | null> {\n const item = await this.entity.get({\n PK,\n SK: connectionId\n });\n if (!item) {\n return null;\n }\n return item?.data || null;\n }\n\n /**\n * Uses Primary keys\n */\n public async listViaConnections(\n connections: string[]\n ): Promise<IWebsocketsConnectionRegistryData[]> {\n const reader = this.entity.createEntityReader({\n read: connections.map(id => {\n return {\n PK,\n SK: id\n };\n })\n });\n\n const results = await reader.execute();\n\n return results.map(item => {\n return item.data;\n });\n }\n\n /**\n * Uses GSI1 keys\n */\n public async listViaIdentity(identity: string): Promise<IWebsocketsConnectionRegistryData[]> {\n const items = await this.entity.queryAll({\n partitionKey: GSI1_PK,\n options: {\n index: \"GSI1\",\n eq: identity\n }\n });\n return items.map(item => {\n return item.data;\n });\n }\n\n /**\n * Uses GSI2 keys\n */\n public async listViaTenant(tenant: string): Promise<IWebsocketsConnectionRegistryData[]> {\n const options: Partial<EntityQueryOptions> = {\n beginsWith: `T#${tenant}`\n };\n\n const items = await this.entity.queryAll({\n partitionKey: GSI2_PK,\n options: {\n ...options,\n index: \"GSI2\"\n }\n });\n return items.map(item => {\n return item.data;\n });\n }\n\n public async listAll(): Promise<IWebsocketsConnectionRegistryData[]> {\n const items = await this.entity.queryAll({\n partitionKey: PK,\n options: {\n gte: \" \"\n }\n });\n return items.map(item => {\n return item.data;\n });\n }\n\n private async store(data: IWebsocketsConnectionRegistryData) {\n const { connectionId, tenant, identity } = data;\n const item = {\n // to find specific identity related to given connection\n PK,\n SK: connectionId,\n // to find all connections related to given identity\n GSI1_PK,\n GSI1_SK: identity.id,\n // to find all connections related to given tenant\n GSI2_PK,\n GSI2_SK: `T#${tenant}`,\n GSI_TENANT: tenant,\n TYPE: \"ws.connection\",\n data\n };\n try {\n return await this.entity.put(item);\n } catch (err) {\n throw WebinyError.from(err, {\n message: \"Could not store websockets connection data.\",\n code: \"STORE_WEBSOCKETS_CONNECTION_DATA_ERROR\",\n data: item\n });\n }\n }\n}\n"],"mappings":"AAAA,OAAOA,WAAW,MAAM,eAAe;AAOvC,SAASC,YAAY;AAIrB,MAAMC,EAAE,GAAG,gBAAgB;AAC3B,MAAMC,OAAO,GAAG,yBAAyB;AACzC,MAAMC,OAAO,GAAG,uBAAuB;AAEvC,OAAO,MAAMC,4BAA4B,CAA0C;EAGxEC,WAAWA,CAACC,cAAgC,EAAE;IACjD,IAAI,CAACC,MAAM,GAAGP,YAAY,CAACM,cAAc,CAAC;EAC9C;EAEA,MAAaE,QAAQA,CACjBC,MAAmD,EACT;IAC1C,MAAM;MAAEC,YAAY;MAAEC,MAAM;MAAEC,QAAQ;MAAEC,UAAU;MAAEC,KAAK;MAAEC;IAAY,CAAC,GAAGN,MAAM;IAEjF,MAAMO,IAAuC,GAAG;MAC5CN,YAAY;MACZE,QAAQ;MACRD,MAAM;MACNE,UAAU;MACVC,KAAK;MACLC;IACJ,CAAC;IACD,MAAM,IAAI,CAACE,KAAK,CAACD,IAAI,CAAC;IACtB,OAAOA,IAAI;EACf;EAEA,MAAaE,UAAUA,CAACT,MAAqD,EAAiB;IAC1F,MAAM;MAAEC;IAAa,CAAC,GAAGD,MAAM;IAE/B,MAAMU,IAAI,GAAG;MACTlB,EAAE;MACFmB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,IAAI;IAC/C,MAAMa,IAAI,GAAG;MACT;MACA5B,EAAE;MACFmB,EAAE,EAAEV,YAAY;MAChB;MACAR,OAAO;MACPiD,OAAO,EAAEvC,QAAQ,CAACyB,EAAE;MACpB;MACAlC,OAAO;MACPiD,OAAO,EAAE,KAAKzC,MAAM,EAAE;MACtB0C,UAAU,EAAE1C,MAAM;MAClB2C,IAAI,EAAE,eAAe;MACrBtC;IACJ,CAAC;IACD,IAAI;MACA,OAAO,MAAM,IAAI,CAACT,MAAM,CAACgD,GAAG,CAAC1B,IAAI,CAAC;IACtC,CAAC,CAAC,OAAO2B,GAAG,EAAE;MACV,MAAMzD,WAAW,CAAC0D,IAAI,CAACD,GAAG,EAAE;QACxBjC,OAAO,EAAE,6CAA6C;QACtDK,IAAI,EAAE,wCAAwC;QAC9CZ,IAAI,EAAEa;MACV,CAAC,CAAC;IACN;EACJ;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"registry/WebsocketsConnectionRegistry.js","sources":["../../src/registry/WebsocketsConnectionRegistry.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport type {\n IWebsocketsConnectionRegistry,\n IWebsocketsConnectionRegistryData,\n IWebsocketsConnectionRegistryRegisterParams,\n IWebsocketsConnectionRegistryUnregisterParams\n} from \"./abstractions/IWebsocketsConnectionRegistry.js\";\nimport { createEntity } from \"~/registry/entity.js\";\nimport type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport type { EntityQueryOptions } from \"@webiny/db-dynamodb/toolbox.js\";\n\nconst PK = `WS#CONNECTIONS`;\nconst GSI1_PK = \"WS#CONNECTIONS#IDENTITY\";\nconst GSI2_PK = \"WS#CONNECTIONS#TENANT\";\n\nexport class WebsocketsConnectionRegistry implements IWebsocketsConnectionRegistry {\n private readonly entity;\n\n public constructor(documentClient: DynamoDBDocument) {\n this.entity = createEntity(documentClient);\n }\n\n public async register(\n params: IWebsocketsConnectionRegistryRegisterParams\n ): Promise<IWebsocketsConnectionRegistryData> {\n const { connectionId, tenant, identity, domainName, stage, connectedOn } = params;\n\n const data: IWebsocketsConnectionRegistryData = {\n connectionId,\n identity,\n tenant,\n domainName,\n stage,\n connectedOn\n };\n await this.store(data);\n return data;\n }\n\n public async unregister(params: IWebsocketsConnectionRegistryUnregisterParams): Promise<void> {\n const { connectionId } = params;\n\n const keys = {\n PK,\n SK: connectionId\n };\n const original = await this.getViaConnection(connectionId);\n if (!original) {\n const message = `There is no connection with ID \"${connectionId}\".`;\n console.error(message);\n throw new WebinyError(message, \"CONNECTION_NOT_FOUND\", keys);\n }\n\n try {\n await this.entity.delete(keys);\n } catch (ex) {\n console.error(\n `Could not remove connection from the database: ${original.connectionId}`\n );\n throw new WebinyError(ex.message, ex.code, keys);\n }\n }\n\n private async getViaConnection(\n connectionId: string\n ): Promise<IWebsocketsConnectionRegistryData | null> {\n const item = await this.entity.get({\n PK,\n SK: connectionId\n });\n if (!item) {\n return null;\n }\n return item?.data || null;\n }\n\n /**\n * Uses Primary keys\n */\n public async listViaConnections(\n connections: string[]\n ): Promise<IWebsocketsConnectionRegistryData[]> {\n const reader = this.entity.createEntityReader({\n read: connections.map(id => {\n return {\n PK,\n SK: id\n };\n })\n });\n\n const results = await reader.execute();\n\n return results.map(item => {\n return item.data;\n });\n }\n\n /**\n * Uses GSI1 keys\n */\n public async listViaIdentity(identity: string): Promise<IWebsocketsConnectionRegistryData[]> {\n const items = await this.entity.queryAll({\n partitionKey: GSI1_PK,\n options: {\n index: \"GSI1\",\n eq: identity\n }\n });\n return items.map(item => {\n return item.data;\n });\n }\n\n /**\n * Uses GSI2 keys\n */\n public async listViaTenant(tenant: string): Promise<IWebsocketsConnectionRegistryData[]> {\n const options: Partial<EntityQueryOptions> = {\n beginsWith: `T#${tenant}`\n };\n\n const items = await this.entity.queryAll({\n partitionKey: GSI2_PK,\n options: {\n ...options,\n index: \"GSI2\"\n }\n });\n return items.map(item => {\n return item.data;\n });\n }\n\n public async listAll(): Promise<IWebsocketsConnectionRegistryData[]> {\n const items = await this.entity.queryAll({\n partitionKey: PK,\n options: {\n gte: \" \"\n }\n });\n return items.map(item => {\n return item.data;\n });\n }\n\n private async store(data: IWebsocketsConnectionRegistryData) {\n const { connectionId, tenant, identity } = data;\n const item = {\n // to find specific identity related to given connection\n PK,\n SK: connectionId,\n // to find all connections related to given identity\n GSI1_PK,\n GSI1_SK: identity.id,\n // to find all connections related to given tenant\n GSI2_PK,\n GSI2_SK: `T#${tenant}`,\n GSI_TENANT: tenant,\n TYPE: \"ws.connection\",\n data\n };\n try {\n return await this.entity.put(item);\n } catch (err) {\n throw WebinyError.from(err, {\n message: \"Could not store websockets connection data.\",\n code: \"STORE_WEBSOCKETS_CONNECTION_DATA_ERROR\",\n data: item\n });\n }\n }\n}\n"],"names":["PK","GSI1_PK","GSI2_PK","WebsocketsConnectionRegistry","documentClient","createEntity","params","connectionId","tenant","identity","domainName","stage","connectedOn","data","keys","original","message","console","WebinyError","ex","item","connections","reader","id","results","items","options","err"],"mappings":";;AAWA,MAAMA,KAAK;AACX,MAAMC,UAAU;AAChB,MAAMC,UAAU;AAET,MAAMC;IAGT,YAAmBC,cAAgC,CAAE;QACjD,IAAI,CAAC,MAAM,GAAGC,aAAaD;IAC/B;IAEA,MAAa,SACTE,MAAmD,EACT;QAC1C,MAAM,EAAEC,YAAY,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,KAAK,EAAEC,WAAW,EAAE,GAAGN;QAE3E,MAAMO,OAA0C;YAC5CN;YACAE;YACAD;YACAE;YACAC;YACAC;QACJ;QACA,MAAM,IAAI,CAAC,KAAK,CAACC;QACjB,OAAOA;IACX;IAEA,MAAa,WAAWP,MAAqD,EAAiB;QAC1F,MAAM,EAAEC,YAAY,EAAE,GAAGD;QAEzB,MAAMQ,OAAO;YACTd,IAAAA;YACA,IAAIO;QACR;QACA,MAAMQ,WAAW,MAAM,IAAI,CAAC,gBAAgB,CAACR;QAC7C,IAAI,CAACQ,UAAU;YAC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B;YACd,SAAS;gBACL,GAAGwB,OAAO;gBACV,OAAO;YACX;QACJ;QACA,OAAOD,MAAM,GAAG,CAACL,CAAAA,OACNA,KAAK,IAAI;IAExB;IAEA,MAAa,UAAwD;QACjE,MAAMK,QAAQ,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;YACrC,cAAczB;YACd,SAAS;gBACL,KAAK;YACT;QACJ;QACA,OAAOyB,MAAM,GAAG,CAACL,CAAAA,OACNA,KAAK,IAAI;IAExB;IAEA,MAAc,MAAMP,IAAuC,EAAE;QACzD,MAAM,EAAEN,YAAY,EAAEC,MAAM,EAAEC,QAAQ,EAAE,GAAGI;QAC3C,MAAMO,OAAO;YAETpB,IAAAA;YACA,IAAIO;YAEJN,SAAAA;YACA,SAASQ,SAAS,EAAE;YAEpBP,SAAAA;YACA,SAAS,CAAC,EAAE,EAAEM,QAAQ;YACtB,YAAYA;YACZ,MAAM;YACNK;QACJ;QACA,IAAI;YACA,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAACO;QACjC,EAAE,OAAOO,KAAK;YACV,MAAMT,MAAAA,IAAgB,CAACS,KAAK;gBACxB,SAAS;gBACT,MAAM;gBACN,MAAMP;YACV;QACJ;IACJ;AACJ"}
@@ -1,3 +0,0 @@
1
- export {};
2
-
3
- //# sourceMappingURL=IWebsocketsConnectionRegistry.js.map
@@ -1,47 +1,48 @@
1
1
  import { createStandardEntity, createTable } from "@webiny/db-dynamodb";
2
- const name = "SocketsConnectionRegistry";
3
- export const createEntity = documentClient => {
4
- const table = createTable({
5
- name: String(process.env.DB_TABLE),
6
- documentClient
7
- });
8
- return createStandardEntity({
9
- name,
10
- table: table.table,
11
- attributes: {
12
- PK: {
13
- partitionKey: true
14
- },
15
- SK: {
16
- sortKey: true
17
- },
18
- GSI1_PK: {
19
- type: "string",
20
- required: true
21
- },
22
- GSI1_SK: {
23
- type: "string",
24
- required: true
25
- },
26
- GSI2_PK: {
27
- type: "string",
28
- required: true
29
- },
30
- GSI2_SK: {
31
- type: "string",
32
- required: true
33
- },
34
- TYPE: {
35
- type: "string",
36
- default: name,
37
- required: true
38
- },
39
- data: {
40
- type: "map",
41
- required: true
42
- }
43
- }
44
- });
2
+ const entity_name = "SocketsConnectionRegistry";
3
+ const createEntity = (documentClient)=>{
4
+ const table = createTable({
5
+ name: String(process.env.DB_TABLE),
6
+ documentClient
7
+ });
8
+ return createStandardEntity({
9
+ name: entity_name,
10
+ table: table.table,
11
+ attributes: {
12
+ PK: {
13
+ partitionKey: true
14
+ },
15
+ SK: {
16
+ sortKey: true
17
+ },
18
+ GSI1_PK: {
19
+ type: "string",
20
+ required: true
21
+ },
22
+ GSI1_SK: {
23
+ type: "string",
24
+ required: true
25
+ },
26
+ GSI2_PK: {
27
+ type: "string",
28
+ required: true
29
+ },
30
+ GSI2_SK: {
31
+ type: "string",
32
+ required: true
33
+ },
34
+ TYPE: {
35
+ type: "string",
36
+ default: entity_name,
37
+ required: true
38
+ },
39
+ data: {
40
+ type: "map",
41
+ required: true
42
+ }
43
+ }
44
+ });
45
45
  };
46
+ export { createEntity };
46
47
 
47
48
  //# sourceMappingURL=entity.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createStandardEntity","createTable","name","createEntity","documentClient","table","String","process","env","DB_TABLE","attributes","PK","partitionKey","SK","sortKey","GSI1_PK","type","required","GSI1_SK","GSI2_PK","GSI2_SK","TYPE","default","data"],"sources":["entity.ts"],"sourcesContent":["import type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport { createStandardEntity, createTable } from \"@webiny/db-dynamodb\";\nimport type { IWebsocketsConnectionRegistryData } from \"./abstractions/IWebsocketsConnectionRegistry.js\";\n\nconst name = \"SocketsConnectionRegistry\";\n\nexport const createEntity = (documentClient: DynamoDBDocument) => {\n const table = createTable({\n name: String(process.env.DB_TABLE),\n documentClient\n });\n\n return createStandardEntity<IWebsocketsConnectionRegistryData>({\n name,\n table: table.table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n GSI1_PK: {\n type: \"string\",\n required: true\n },\n GSI1_SK: {\n type: \"string\",\n required: true\n },\n GSI2_PK: {\n type: \"string\",\n required: true\n },\n GSI2_SK: {\n type: \"string\",\n required: true\n },\n TYPE: {\n type: \"string\",\n default: name,\n required: true\n },\n data: {\n type: \"map\",\n required: true\n }\n }\n });\n};\n"],"mappings":"AACA,SAASA,oBAAoB,EAAEC,WAAW,QAAQ,qBAAqB;AAGvE,MAAMC,IAAI,GAAG,2BAA2B;AAExC,OAAO,MAAMC,YAAY,GAAIC,cAAgC,IAAK;EAC9D,MAAMC,KAAK,GAAGJ,WAAW,CAAC;IACtBC,IAAI,EAAEI,MAAM,CAACC,OAAO,CAACC,GAAG,CAACC,QAAQ,CAAC;IAClCL;EACJ,CAAC,CAAC;EAEF,OAAOJ,oBAAoB,CAAoC;IAC3DE,IAAI;IACJG,KAAK,EAAEA,KAAK,CAACA,KAAK;IAClBK,UAAU,EAAE;MACRC,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,OAAO,EAAE;QACLC,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACDC,OAAO,EAAE;QACLF,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACDE,OAAO,EAAE;QACLH,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACDG,OAAO,EAAE;QACLJ,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACDI,IAAI,EAAE;QACFL,IAAI,EAAE,QAAQ;QACdM,OAAO,EAAEpB,IAAI;QACbe,QAAQ,EAAE;MACd,CAAC;MACDM,IAAI,EAAE;QACFP,IAAI,EAAE,KAAK;QACXC,QAAQ,EAAE;MACd;IACJ;EACJ,CAAC,CAAC;AACN,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"registry/entity.js","sources":["../../src/registry/entity.ts"],"sourcesContent":["import type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport { createStandardEntity, createTable } from \"@webiny/db-dynamodb\";\nimport type { IWebsocketsConnectionRegistryData } from \"./abstractions/IWebsocketsConnectionRegistry.js\";\n\nconst name = \"SocketsConnectionRegistry\";\n\nexport const createEntity = (documentClient: DynamoDBDocument) => {\n const table = createTable({\n name: String(process.env.DB_TABLE),\n documentClient\n });\n\n return createStandardEntity<IWebsocketsConnectionRegistryData>({\n name,\n table: table.table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n GSI1_PK: {\n type: \"string\",\n required: true\n },\n GSI1_SK: {\n type: \"string\",\n required: true\n },\n GSI2_PK: {\n type: \"string\",\n required: true\n },\n GSI2_SK: {\n type: \"string\",\n required: true\n },\n TYPE: {\n type: \"string\",\n default: name,\n required: true\n },\n data: {\n type: \"map\",\n required: true\n }\n }\n });\n};\n"],"names":["name","createEntity","documentClient","table","createTable","String","process","createStandardEntity"],"mappings":";AAIA,MAAMA,cAAO;AAEN,MAAMC,eAAe,CAACC;IACzB,MAAMC,QAAQC,YAAY;QACtB,MAAMC,OAAOC,QAAQ,GAAG,CAAC,QAAQ;QACjCJ;IACJ;IAEA,OAAOK,qBAAwD;QAC3DP,MAAAA;QACA,OAAOG,MAAM,KAAK;QAClB,YAAY;YACR,IAAI;gBACA,cAAc;YAClB;YACA,IAAI;gBACA,SAAS;YACb;YACA,SAAS;gBACL,MAAM;gBACN,UAAU;YACd;YACA,SAAS;gBACL,MAAM;gBACN,UAAU;YACd;YACA,SAAS;gBACL,MAAM;gBACN,UAAU;YACd;YACA,SAAS;gBACL,MAAM;gBACN,UAAU;YACd;YACA,MAAM;gBACF,MAAM;gBACN,SAASH;gBACT,UAAU;YACd;YACA,MAAM;gBACF,MAAM;gBACN,UAAU;YACd;QACJ;IACJ;AACJ"}
package/registry/index.js CHANGED
@@ -1,3 +1 @@
1
1
  export * from "./WebsocketsConnectionRegistry.js";
2
-
3
- //# sourceMappingURL=index.js.map
@@ -1,22 +1,23 @@
1
- export class WebsocketsResponse {
2
- ok(params) {
3
- return {
4
- statusCode: 200,
5
- ...params
6
- };
7
- }
8
- error(params) {
9
- return {
10
- ...params,
11
- statusCode: params.statusCode || 200,
12
- error: {
13
- ...params.error,
14
- message: params.error?.message || params.message,
15
- code: params.error?.code || "UNKNOWN_ERROR",
16
- data: params.error?.data || {}
17
- }
18
- };
19
- }
1
+ class WebsocketsResponse {
2
+ ok(params) {
3
+ return {
4
+ statusCode: 200,
5
+ ...params
6
+ };
7
+ }
8
+ error(params) {
9
+ return {
10
+ ...params,
11
+ statusCode: params.statusCode || 200,
12
+ error: {
13
+ ...params.error,
14
+ message: params.error?.message || params.message,
15
+ code: params.error?.code || "UNKNOWN_ERROR",
16
+ data: params.error?.data || {}
17
+ }
18
+ };
19
+ }
20
20
  }
21
+ export { WebsocketsResponse };
21
22
 
22
23
  //# sourceMappingURL=WebsocketsResponse.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["WebsocketsResponse","ok","params","statusCode","error","message","code","data"],"sources":["WebsocketsResponse.ts"],"sourcesContent":["import type {\n IWebsocketsResponse,\n IWebsocketsResponseErrorParams,\n IWebsocketsResponseErrorResult,\n IWebsocketsResponseOkParams,\n IWebsocketsResponseOkResult\n} from \"./abstractions/IWebsocketsResponse.js\";\n\nexport class WebsocketsResponse implements IWebsocketsResponse {\n public ok(params?: IWebsocketsResponseOkParams): IWebsocketsResponseOkResult {\n return {\n statusCode: 200,\n ...params\n };\n }\n\n public error(params: IWebsocketsResponseErrorParams): IWebsocketsResponseErrorResult {\n return {\n ...params,\n statusCode: params.statusCode || 200,\n error: {\n ...params.error,\n message: params.error?.message || params.message,\n code: params.error?.code || \"UNKNOWN_ERROR\",\n data: params.error?.data || {}\n }\n };\n }\n}\n"],"mappings":"AAQA,OAAO,MAAMA,kBAAkB,CAAgC;EACpDC,EAAEA,CAACC,MAAoC,EAA+B;IACzE,OAAO;MACHC,UAAU,EAAE,GAAG;MACf,GAAGD;IACP,CAAC;EACL;EAEOE,KAAKA,CAACF,MAAsC,EAAkC;IACjF,OAAO;MACH,GAAGA,MAAM;MACTC,UAAU,EAAED,MAAM,CAACC,UAAU,IAAI,GAAG;MACpCC,KAAK,EAAE;QACH,GAAGF,MAAM,CAACE,KAAK;QACfC,OAAO,EAAEH,MAAM,CAACE,KAAK,EAAEC,OAAO,IAAIH,MAAM,CAACG,OAAO;QAChDC,IAAI,EAAEJ,MAAM,CAACE,KAAK,EAAEE,IAAI,IAAI,eAAe;QAC3CC,IAAI,EAAEL,MAAM,CAACE,KAAK,EAAEG,IAAI,IAAI,CAAC;MACjC;IACJ,CAAC;EACL;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"response/WebsocketsResponse.js","sources":["../../src/response/WebsocketsResponse.ts"],"sourcesContent":["import type {\n IWebsocketsResponse,\n IWebsocketsResponseErrorParams,\n IWebsocketsResponseErrorResult,\n IWebsocketsResponseOkParams,\n IWebsocketsResponseOkResult\n} from \"./abstractions/IWebsocketsResponse.js\";\n\nexport class WebsocketsResponse implements IWebsocketsResponse {\n public ok(params?: IWebsocketsResponseOkParams): IWebsocketsResponseOkResult {\n return {\n statusCode: 200,\n ...params\n };\n }\n\n public error(params: IWebsocketsResponseErrorParams): IWebsocketsResponseErrorResult {\n return {\n ...params,\n statusCode: params.statusCode || 200,\n error: {\n ...params.error,\n message: params.error?.message || params.message,\n code: params.error?.code || \"UNKNOWN_ERROR\",\n data: params.error?.data || {}\n }\n };\n }\n}\n"],"names":["WebsocketsResponse","params"],"mappings":"AAQO,MAAMA;IACF,GAAGC,MAAoC,EAA+B;QACzE,OAAO;YACH,YAAY;YACZ,GAAGA,MAAM;QACb;IACJ;IAEO,MAAMA,MAAsC,EAAkC;QACjF,OAAO;YACH,GAAGA,MAAM;YACT,YAAYA,OAAO,UAAU,IAAI;YACjC,OAAO;gBACH,GAAGA,OAAO,KAAK;gBACf,SAASA,OAAO,KAAK,EAAE,WAAWA,OAAO,OAAO;gBAChD,MAAMA,OAAO,KAAK,EAAE,QAAQ;gBAC5B,MAAMA,OAAO,KAAK,EAAE,QAAQ,CAAC;YACjC;QACJ;IACJ;AACJ"}
@@ -1,3 +0,0 @@
1
- export {};
2
-
3
- //# sourceMappingURL=IWebsocketsResponse.js.map
package/response/index.js CHANGED
@@ -1,3 +1 @@
1
1
  export * from "./WebsocketsResponse.js";
2
-
3
- //# sourceMappingURL=index.js.map