From ff21b38a78a505846c591f7f5db71630555d7fe7 Mon Sep 17 00:00:00 2001 From: Joe Caputo Date: Thu, 8 Aug 2024 21:37:40 -0400 Subject: [PATCH] fix: suggestions from PR review --- services/graph/apps/api/src/metadata.ts | 118 ++++++++++++++++++++--- services/graph/libs/common/src/.DS_Store | Bin 6148 -> 0 bytes 2 files changed, 105 insertions(+), 13 deletions(-) delete mode 100644 services/graph/libs/common/src/.DS_Store diff --git a/services/graph/apps/api/src/metadata.ts b/services/graph/apps/api/src/metadata.ts index 39896373..4d3a2b92 100644 --- a/services/graph/apps/api/src/metadata.ts +++ b/services/graph/apps/api/src/metadata.ts @@ -1,15 +1,107 @@ /* eslint-disable */ export default async () => { - const t = { - ["../../../libs/common/src/dtos/privacy-type.enum"]: await import("../../../libs/common/src/dtos/privacy-type.enum"), - ["../../../libs/common/src/dtos/direction.enum"]: await import("../../../libs/common/src/dtos/direction.enum"), - ["../../../libs/common/src/dtos/connection-type.enum"]: await import("../../../libs/common/src/dtos/connection-type.enum"), - ["../../../libs/common/src/dtos/connection.dto"]: await import("../../../libs/common/src/dtos/connection.dto"), - ["../../../libs/common/src/dtos/key-type.enum"]: await import("../../../libs/common/src/dtos/key-type.enum"), - ["../../../libs/common/src/dtos/dsnp-graph-edge.dto"]: await import("../../../libs/common/src/dtos/dsnp-graph-edge.dto"), - ["../../../libs/common/src/dtos/graph-key-pair.dto"]: await import("../../../libs/common/src/dtos/graph-key-pair.dto"), - ["../../../libs/common/src/dtos/user-graph.dto"]: await import("../../../libs/common/src/dtos/user-graph.dto"), - ["../../../libs/common/src/dtos/graph-change-response.dto"]: await import("../../../libs/common/src/dtos/graph-change-response.dto") - }; - return { "@nestjs/swagger": { "models": [[import("../../../libs/common/src/dtos/connection.dto"), { "ConnectionDto": { dsnpId: { required: true, type: () => String }, privacyType: { required: true, enum: t["../../../libs/common/src/dtos/privacy-type.enum"].PrivacyType }, direction: { required: true, enum: t["../../../libs/common/src/dtos/direction.enum"].Direction }, connectionType: { required: true, enum: t["../../../libs/common/src/dtos/connection-type.enum"].ConnectionType } }, "ConnectionDtoWrapper": { data: { required: true, type: () => [t["../../../libs/common/src/dtos/connection.dto"].ConnectionDto] } } }], [import("../../../libs/common/src/dtos/dsnp-graph-edge.dto"), { "DsnpGraphEdge": { userId: { required: true, type: () => String }, since: { required: true, type: () => Number } } }], [import("../../../libs/common/src/dtos/graph-key-pair.dto"), { "GraphKeyPairDto": { publicKey: { required: true, type: () => String }, privateKey: { required: true, type: () => String }, keyType: { required: true, type: () => String, enum: t["../../../libs/common/src/dtos/key-type.enum"].KeyType } } }], [import("../../../libs/common/src/dtos/user-graph.dto"), { "UserGraphDto": { dsnpId: { required: true, type: () => String }, dsnpGraphEdges: { required: false, type: () => [t["../../../libs/common/src/dtos/dsnp-graph-edge.dto"].DsnpGraphEdge] } } }], [import("../../../libs/common/src/dtos/graph-change-response.dto"), { "GraphChangeRepsonseDto": { referenceId: { required: true, type: () => String } } }], [import("../../../libs/common/src/dtos/graph-query-params.dto"), { "GraphsQueryParamsDto": { dsnpIds: { required: true, type: () => [String] }, privacyType: { required: true, enum: t["../../../libs/common/src/dtos/privacy-type.enum"].PrivacyType }, graphKeyPairs: { required: false, type: () => [t["../../../libs/common/src/dtos/graph-key-pair.dto"].GraphKeyPairDto] } } }], [import("../../../libs/common/src/dtos/provider-graph.dto"), { "ProviderGraphDto": { dsnpId: { required: true, type: () => String }, connections: { required: true, type: () => ({ data: { required: true, type: () => [t["../../../libs/common/src/dtos/connection.dto"].ConnectionDto] } }) }, graphKeyPairs: { required: false, type: () => [t["../../../libs/common/src/dtos/graph-key-pair.dto"].GraphKeyPairDto] }, webhookUrl: { required: false, type: () => String } } }], [import("../../../libs/common/src/dtos/watch-graphs.dto"), { "WatchGraphsDto": { dsnpIds: { required: false, type: () => [String] }, webhookEndpoint: { required: true, type: () => String } } }]], "controllers": [[import("./controllers/health.controller"), { "HealthController": { "healthz": {}, "livez": {}, "readyz": {} } }], [import("./controllers/v1/webhooks-v1.controller"), { "WebhooksControllerV1": { "getAllWebhooks": { type: Object }, "getWebhooksForMsa": { type: [String] }, "getWebhooksForUrl": { type: [String] }, "watchGraphs": {}, "deleteAllWebhooks": {}, "deleteWebhooksForMsa": {}, "deleteAllWebhooksForUrl": {} } }], [import("./controllers/v1/graph-v1.controller"), { "GraphControllerV1": { "getGraphs": { type: [t["../../../libs/common/src/dtos/user-graph.dto"].UserGraphDto] }, "updateGraph": { type: t["../../../libs/common/src/dtos/graph-change-response.dto"].GraphChangeRepsonseDto } } }]] } }; -}; \ No newline at end of file + const t = { + ['../../../libs/common/src/dtos/privacy-type.enum']: await import('../../../libs/common/src/dtos/privacy-type.enum'), + ['../../../libs/common/src/dtos/direction.enum']: await import('../../../libs/common/src/dtos/direction.enum'), + ['../../../libs/common/src/dtos/connection-type.enum']: await import('../../../libs/common/src/dtos/connection-type.enum'), + ['../../../libs/common/src/dtos/connection.dto']: await import('../../../libs/common/src/dtos/connection.dto'), + ['../../../libs/common/src/dtos/key-type.enum']: await import('../../../libs/common/src/dtos/key-type.enum'), + ['../../../libs/common/src/dtos/dsnp-graph-edge.dto']: await import('../../../libs/common/src/dtos/dsnp-graph-edge.dto'), + ['../../../libs/common/src/dtos/graph-key-pair.dto']: await import('../../../libs/common/src/dtos/graph-key-pair.dto'), + ['../../../libs/common/src/dtos/user-graph.dto']: await import('../../../libs/common/src/dtos/user-graph.dto'), + ['../../../libs/common/src/dtos/graph-change-response.dto']: await import('../../../libs/common/src/dtos/graph-change-response.dto'), + }; + return { + '@nestjs/swagger': { + models: [ + [ + import('../../../libs/common/src/dtos/connection.dto'), + { + ConnectionDto: { + dsnpId: { required: true, type: () => String }, + privacyType: { required: true, enum: t['../../../libs/common/src/dtos/privacy-type.enum'].PrivacyType }, + direction: { required: true, enum: t['../../../libs/common/src/dtos/direction.enum'].Direction }, + connectionType: { required: true, enum: t['../../../libs/common/src/dtos/connection-type.enum'].ConnectionType }, + }, + ConnectionDtoWrapper: { data: { required: true, type: () => [t['../../../libs/common/src/dtos/connection.dto'].ConnectionDto] } }, + }, + ], + [ + import('../../../libs/common/src/dtos/dsnp-graph-edge.dto'), + { DsnpGraphEdge: { userId: { required: true, type: () => String }, since: { required: true, type: () => Number } } }, + ], + [ + import('../../../libs/common/src/dtos/graph-key-pair.dto'), + { + GraphKeyPairDto: { + publicKey: { required: true, type: () => String }, + privateKey: { required: true, type: () => String }, + keyType: { required: true, type: () => String, enum: t['../../../libs/common/src/dtos/key-type.enum'].KeyType }, + }, + }, + ], + [ + import('../../../libs/common/src/dtos/user-graph.dto'), + { + UserGraphDto: { + dsnpId: { required: true, type: () => String }, + dsnpGraphEdges: { required: false, type: () => [t['../../../libs/common/src/dtos/dsnp-graph-edge.dto'].DsnpGraphEdge] }, + }, + }, + ], + [import('../../../libs/common/src/dtos/graph-change-response.dto'), { GraphChangeRepsonseDto: { referenceId: { required: true, type: () => String } } }], + [ + import('../../../libs/common/src/dtos/graph-query-params.dto'), + { + GraphsQueryParamsDto: { + dsnpIds: { required: true, type: () => [String] }, + privacyType: { required: true, enum: t['../../../libs/common/src/dtos/privacy-type.enum'].PrivacyType }, + graphKeyPairs: { required: false, type: () => [t['../../../libs/common/src/dtos/graph-key-pair.dto'].GraphKeyPairDto] }, + }, + }, + ], + [ + import('../../../libs/common/src/dtos/provider-graph.dto'), + { + ProviderGraphDto: { + dsnpId: { required: true, type: () => String }, + connections: { required: true, type: () => ({ data: { required: true, type: () => [t['../../../libs/common/src/dtos/connection.dto'].ConnectionDto] } }) }, + graphKeyPairs: { required: false, type: () => [t['../../../libs/common/src/dtos/graph-key-pair.dto'].GraphKeyPairDto] }, + webhookUrl: { required: false, type: () => String }, + }, + }, + ], + [ + import('../../../libs/common/src/dtos/watch-graphs.dto'), + { WatchGraphsDto: { dsnpIds: { required: false, type: () => [String] }, webhookEndpoint: { required: true, type: () => String } } }, + ], + ], + controllers: [ + [import('./controllers/health.controller'), { HealthController: { healthz: {}, livez: {}, readyz: {} } }], + [ + import('./controllers/v1/webhooks-v1.controller'), + { + WebhooksControllerV1: { + getAllWebhooks: { type: Object }, + getWebhooksForMsa: { type: [String] }, + getWebhooksForUrl: { type: [String] }, + watchGraphs: {}, + deleteAllWebhooks: {}, + deleteWebhooksForMsa: {}, + deleteAllWebhooksForUrl: {}, + }, + }, + ], + [ + import('./controllers/v1/graph-v1.controller'), + { + GraphControllerV1: { + getGraphs: { type: [t['../../../libs/common/src/dtos/user-graph.dto'].UserGraphDto] }, + updateGraph: { type: t['../../../libs/common/src/dtos/graph-change-response.dto'].GraphChangeRepsonseDto }, + }, + }, + ], + ], + }, + }; +}; diff --git a/services/graph/libs/common/src/.DS_Store b/services/graph/libs/common/src/.DS_Store deleted file mode 100644 index 392ccaaafcaff2ca661ecdfb0e91bc03db9d7cc3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~JqiLr422WjLa^D=avBfd4F=H@>;)_qY(&AodXDZ(CJ2t!BJu*sn`9;|`xQGI z5z+N+T#57|GJ~7S(n4d3ypvI`a+1q^I3EwE;~q7uPvWet;k`8bu}vWX5+DH*AORBi zAp&-9!)EiUj3ht;B=96)--iS@&7q~Le>xC+1b}uZyJ79K1T}(S!u1*@b}wNT4Awt$A&s;vtg>c