@things-factory/auth-google 7.0.1-beta.8 → 7.0.1-rc.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 (30) hide show
  1. package/dist-client/route.js.map +1 -1
  2. package/dist-client/tsconfig.tsbuildinfo +1 -1
  3. package/dist-server/controllers/get-oauth2-client.d.ts +2 -0
  4. package/dist-server/controllers/get-oauth2-client.js +1 -2
  5. package/dist-server/controllers/get-oauth2-client.js.map +1 -1
  6. package/dist-server/controllers/subscribe-users-change.d.ts +3 -0
  7. package/dist-server/controllers/subscribe-users-change.js +2 -3
  8. package/dist-server/controllers/subscribe-users-change.js.map +1 -1
  9. package/dist-server/controllers/sync-user-info.d.ts +41 -0
  10. package/dist-server/controllers/sync-user-info.js +2 -3
  11. package/dist-server/controllers/sync-user-info.js.map +1 -1
  12. package/dist-server/index.d.ts +3 -0
  13. package/dist-server/middlewares/google-authenticate-middleware.d.ts +2 -0
  14. package/dist-server/middlewares/google-authenticate-middleware.js +2 -3
  15. package/dist-server/middlewares/google-authenticate-middleware.js.map +1 -1
  16. package/dist-server/middlewares/index.d.ts +1 -0
  17. package/dist-server/middlewares/index.js.map +1 -1
  18. package/dist-server/router/auth-google-router.d.ts +1 -0
  19. package/dist-server/router/auth-google-webhook-router.d.ts +1 -0
  20. package/dist-server/router/auth-google-webhook-router.js.map +1 -1
  21. package/dist-server/router/index.d.ts +2 -0
  22. package/dist-server/routes.d.ts +1 -0
  23. package/dist-server/routes.js.map +1 -1
  24. package/dist-server/service/auth-google/auth-google-mutation.d.ts +3 -0
  25. package/dist-server/service/auth-google/auth-google-mutation.js +2 -2
  26. package/dist-server/service/auth-google/auth-google-mutation.js.map +1 -1
  27. package/dist-server/service/auth-google/index.d.ts +2 -0
  28. package/dist-server/service/index.d.ts +5 -0
  29. package/dist-server/tsconfig.tsbuildinfo +1 -1
  30. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"route.js","sourceRoot":"","sources":["../client/route.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,IAAY;IACxC,QAAQ,IAAI,EAAE;KACb;AACH,CAAC","sourcesContent":["export default function route(page: string) {\n switch (page) {\n }\n}\n"]}
1
+ {"version":3,"file":"route.js","sourceRoot":"","sources":["../client/route.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,IAAY;IACxC,QAAQ,IAAI,EAAE,CAAC;IACf,CAAC;AACH,CAAC","sourcesContent":["export default function route(page: string) {\n switch (page) {\n }\n}\n"]}
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../../node_modules/lerna/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/tslib/tslib.d.ts","../client/bootstrap.ts","../client/index.ts","../client/route.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/buffer/index.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/sea.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@jest/expect-utils/build/index.d.ts","../../../node_modules/chalk/index.d.ts","../../../node_modules/@sinclair/typebox/typebox.d.ts","../../../node_modules/@jest/schemas/build/index.d.ts","../../../node_modules/pretty-format/build/index.d.ts","../../../node_modules/jest-diff/build/index.d.ts","../../../node_modules/jest-matcher-utils/build/index.d.ts","../../../node_modules/expect/build/index.d.ts","../../../node_modules/@types/jest/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"f3d4da15233e593eacb3965cde7960f3fddf5878528d882bcedd5cbaba0193c7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900",{"version":"1f8f1bd57f21c36cc25547a0cb99a097f5e5443815789833d230741315a3a948","signature":"aac4ddff3d5c1247433870879e9838b1e23b81a9b62c75f59c3e1b64802f2b16"},"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",{"version":"c0ae510b4743cf5f73102c35337e76cdf9b6340c9e6f117191422603d4387236","signature":"21583817860b17e4b3e44bb8f61dd5965baf7acf41f67bfbf5546e78bd58810c"},"2db0dd3aaa2ed285950273ce96ae8a450b45423aa9da2d10e194570f1233fa6b","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1",{"version":"a14ed46fa3f5ffc7a8336b497cd07b45c2084213aaca933a22443fcb2eef0d07","affectsGlobalScope":true},"3d77c73be94570813f8cadd1f05ebc3dc5e2e4fdefe4d340ca20cd018724ee36",{"version":"392eadc2af403dd10b4debfbc655c089a7fa6a9750caeb770cfb30051e55e848","affectsGlobalScope":true},"b67f9c5d42e7770ddf8b6d1747b531275c44617e8071d2602a2cffd2932ad95e","53f0960fdcc53d097918adfd8861ffbe0db989c56ffc16c052197bf115da5ed6",{"version":"662163e5327f260b23ca0a1a1ad8a74078aabb587c904fcb5ef518986987eaff","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb",{"version":"c48c503c6b3f63baf18257e9a87559b5602a4e960107c762586d2a6a62b64a18","affectsGlobalScope":true},"b0c0d1d13be149f790a75b381b413490f98558649428bb916fd2d71a3f47a134","3c884d9d9ec454bdf0d5a0b8465bf8297d2caa4d853851d92cc417ac6f30b969","3bb6e21a9f30417c0a059e240b3f8f70c8af9c4cb6f2fd1bc2db594c647e285f","7483ef24249f6a3e24eb3d8136ec7fe0633cd6f8ffe752e2a8d99412aff35bb7","d0ca5d7df114035258a9d01165be309371fcccf0cccd9d57b1453204686d1ed0",{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true},{"version":"3e7dd0014ec3594783dc83ba8c06c13f191931a93e4d1b743371b2e7150cb9d4","affectsGlobalScope":true},"173b6275a81ebdb283b180654890f46516c21199734fed01a773b1c168b8c45c","304f66274aa8119e8d65a49b1cff84cbf803def6afe1b2cc987386e9a9890e22","1b9adafe8a7fefaeaf9099a0e06f602903f6268438147b843a33a5233ac71745","98273274f2dbb79b0b2009b20f74eca4a7146a3447c912d580cd5d2d94a7ae30","c933f7ba4b201c98b14275fd11a14abb950178afd2074703250fe3654fc10cd2","2eaa31492906bc8525aff3c3ec2236e22d90b0dfeee77089f196cd0adf0b3e3b",{"version":"ea455cc68871b049bcecd9f56d4cf27b852d6dafd5e3b54468ca87cc11604e4d","affectsGlobalScope":true},"8f5814f29dbaf8bacd1764aebdf1c8a6eb86381f6a188ddbac0fcbaab855ce52","a63d03de72adfb91777784015bd3b4125abd2f5ef867fc5a13920b5649e8f52b","d20e003f3d518a7c1f749dbe27c6ab5e3be7b3c905a48361b04a9557de4a6900",{"version":"1d4d78c8b23c9ddaaaa49485e6adc2ec01086dfe5d8d4d36ca4cdc98d2f7e74a","affectsGlobalScope":true},{"version":"44fc16356b81c0463cc7d7b2b35dcf324d8144136f5bc5ce73ced86f2b3475b5","affectsGlobalScope":true},"575fb200043b11b464db8e42cc64379c5fd322b6d787638e005b5ee98a64486d","6de2f225d942562733e231a695534b30039bdf1875b377bb7255881f0df8ede8","56249fd3ef1f6b90888e606f4ea648c43978ef43a7263aafad64f8d83cd3b8aa","139ad1dc93a503da85b7a0d5f615bddbae61ad796bc68fedd049150db67a1e26","7b166975fdbd3b37afb64707b98bca88e46577bbc6c59871f9383a7df2daacd1","9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","81505c54d7cad0009352eaa21bd923ab7cdee7ec3405357a54d9a5da033a2084","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","3c1f19c7abcda6b3a4cf9438a15c7307a080bd3b51dfd56b198d9f86baf19447","2ee1645e0df9d84467cfe1d67b0ad3003c2f387de55874d565094464ee6f2927",{"version":"abe61b580e030f1ca3ee548c8fd7b40fc686a97a056d5d1481f34c39c637345f","affectsGlobalScope":true},{"version":"9cf780e96b687e4bdfd1907ed26a688c18b89797490a00598fa8b8ab683335dd","affectsGlobalScope":true},"98e00f3613402504bc2a2c9a621800ab48e0a463d1eed062208a4ae98ad8f84c","9ae88ce9f73446c24b2d2452e993b676da1b31fca5ceb7276e7f36279f693ed1","e49d7625faff2a7842e4e7b9b197f972633fca685afcf6b4403400c97d087c36","b82c38abc53922b1b3670c3af6f333c21b735722a8f156e7d357a2da7c53a0a0",{"version":"b423f53647708043299ded4daa68d95c967a2ac30aa1437adc4442129d7d0a6c","affectsGlobalScope":true},{"version":"7245af181218216bacb01fbdf51095617a51661f20d77178c69a377e16fb69ed","affectsGlobalScope":true},"4f0fc7b7f54422bd97cfaf558ddb4bca86893839367b746a8f86b60ac7619673","4cdd8b6b51599180a387cc7c1c50f49eca5ce06595d781638fd0216520d98246","d91a7d8b5655c42986f1bdfe2105c4408f472831c8f20cf11a8c3345b6b56c8c",{"version":"ac14eb65c59722f0333e776a73e6a02cea23b5aa857a749ea176daf4e960e872","affectsGlobalScope":true},"7c6929fd7cbf38499b6a600b91c3b603d1d78395046dc3499b2b92d01418b94b",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"a42be67ed1ddaec743582f41fc219db96a1b69719fccac6d1464321178d610fc","cdcc132f207d097d7d3aa75615ab9a2e71d6a478162dde8b67f88ea19f3e54de","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","d96cc6598148bf1a98fb2e8dcf01c63a4b3558bdaec6ef35e087fd0562eb40ec",{"version":"5ab630d466ac55baa6d32820378098404fc18ba9da6f7bc5df30c5dbb1cffae8","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":99,"noEmitOnError":true,"noImplicitAny":false,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"target":4,"useDefineForClassFields":false},"fileIdsList":[[138],[140,143],[48],[84],[85,90,119],[86,91,97,98,105,116,127],[86,87,97,105],[88,128],[89,90,98,106],[90,116,124],[91,93,97,105],[84,92],[93,94],[97],[95,97],[84,97],[97,98,99,116,127],[97,98,99,112,116,119],[82,85,132],[93,97,100,105,116,127],[97,98,100,101,105,116,124,127],[100,102,116,124,127],[48,49,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134],[97,103],[104,127,132],[93,97,105,116],[106],[107],[84,108],[105,106,109,126,132],[110],[111],[97,112,113],[112,114,128,130],[85,97,116,117,118,119],[85,116,118],[116,117],[119],[120],[84,116],[97,122,123],[122,123],[90,105,116,124],[125],[105,126],[85,100,111,127],[90,128],[116,129],[104,130],[131],[85,90,97,99,108,116,127,130,132],[116,133],[136,142],[140],[137,141],[139],[59,63,127],[59,116,127],[54],[56,59,124,127],[105,124],[135],[54,135],[56,59,105,127],[51,52,55,58,85,97,116,127],[51,57],[55,59,85,119,127,135],[85,135],[75,85,135],[53,54,135],[59],[53,54,55,56,57,58,59,60,61,63,64,65,66,67,68,69,70,71,72,73,74,76,77,78,79,80,81],[59,66,67],[57,59,67,68],[58],[51,54,59],[59,63,67,68],[63],[57,59,62,127],[51,56,57,59,63,66],[85,116],[54,59,75,85,132,135],[44]],"referencedMap":[[139,1],[144,2],[48,3],[49,3],[84,4],[85,5],[86,6],[87,7],[88,8],[89,9],[90,10],[91,11],[92,12],[93,13],[94,13],[96,14],[95,15],[97,16],[98,17],[99,18],[83,19],[100,20],[101,21],[102,22],[135,23],[103,24],[104,25],[105,26],[106,27],[107,28],[108,29],[109,30],[110,31],[111,32],[112,33],[113,33],[114,34],[116,35],[118,36],[117,37],[119,38],[120,39],[121,40],[122,41],[123,42],[124,43],[125,44],[126,45],[127,46],[128,47],[129,48],[130,49],[131,50],[132,51],[133,52],[143,53],[141,54],[142,55],[140,56],[66,57],[73,58],[65,57],[80,59],[57,60],[56,61],[79,62],[74,63],[77,64],[59,65],[58,66],[54,67],[53,68],[76,69],[55,70],[60,71],[64,71],[82,72],[81,71],[68,73],[69,74],[71,75],[67,76],[70,77],[75,62],[62,78],[63,79],[72,80],[52,81],[78,82],[45,83],[47,83]],"exportedModulesMap":[[139,1],[144,2],[48,3],[49,3],[84,4],[85,5],[86,6],[87,7],[88,8],[89,9],[90,10],[91,11],[92,12],[93,13],[94,13],[96,14],[95,15],[97,16],[98,17],[99,18],[83,19],[100,20],[101,21],[102,22],[135,23],[103,24],[104,25],[105,26],[106,27],[107,28],[108,29],[109,30],[110,31],[111,32],[112,33],[113,33],[114,34],[116,35],[118,36],[117,37],[119,38],[120,39],[121,40],[122,41],[123,42],[124,43],[125,44],[126,45],[127,46],[128,47],[129,48],[130,49],[131,50],[132,51],[133,52],[143,53],[141,54],[142,55],[140,56],[66,57],[73,58],[65,57],[80,59],[57,60],[56,61],[79,62],[74,63],[77,64],[59,65],[58,66],[54,67],[53,68],[76,69],[55,70],[60,71],[64,71],[82,72],[81,71],[68,73],[69,74],[71,75],[67,76],[70,77],[75,62],[62,78],[63,79],[72,80],[52,81],[78,82]],"semanticDiagnosticsPerFile":[136,139,138,144,48,49,84,85,86,87,88,89,90,91,92,93,94,96,95,97,98,99,83,134,100,101,102,135,103,104,105,106,107,108,109,110,111,112,113,114,115,116,118,117,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,50,137,143,141,142,8,9,11,10,2,12,13,14,15,16,17,18,19,3,4,23,20,21,22,24,25,26,5,27,28,29,30,6,34,31,32,33,35,7,36,41,42,37,38,39,40,1,43,140,44,66,73,65,80,57,56,79,74,77,59,58,54,53,76,55,60,61,64,51,82,81,68,69,71,67,70,75,62,63,72,52,78,45,46,47]},"version":"4.9.5"}
1
+ {"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/tslib/tslib.d.ts","../client/bootstrap.ts","../client/index.ts","../client/route.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/buffer/index.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/sea.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@jest/expect-utils/build/index.d.ts","../../../node_modules/chalk/index.d.ts","../../../node_modules/@sinclair/typebox/typebox.d.ts","../../../node_modules/@jest/schemas/build/index.d.ts","../../../node_modules/pretty-format/build/index.d.ts","../../../node_modules/jest-diff/build/index.d.ts","../../../node_modules/jest-matcher-utils/build/index.d.ts","../../../node_modules/expect/build/index.d.ts","../../../node_modules/@types/jest/index.d.ts"],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4",{"version":"4af6b0c727b7a2896463d512fafd23634229adf69ac7c00e2ae15a09cb084fad","affectsGlobalScope":true},{"version":"9c00a480825408b6a24c63c1b71362232927247595d7c97659bc24dc68ae0757","affectsGlobalScope":true},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true},{"version":"ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"4a882ffbb4ed09d9b7734f784aebb1dfe488d63725c40759165c5d9c657ca029",{"version":"1f8f1bd57f21c36cc25547a0cb99a097f5e5443815789833d230741315a3a948","signature":"aac4ddff3d5c1247433870879e9838b1e23b81a9b62c75f59c3e1b64802f2b16"},"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",{"version":"c0ae510b4743cf5f73102c35337e76cdf9b6340c9e6f117191422603d4387236","signature":"21583817860b17e4b3e44bb8f61dd5965baf7acf41f67bfbf5546e78bd58810c"},"2db0dd3aaa2ed285950273ce96ae8a450b45423aa9da2d10e194570f1233fa6b","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1",{"version":"e7be367719c613d580d4b27fdf8fe64c9736f48217f4b322c0d63b2971460918","affectsGlobalScope":true},"3d77c73be94570813f8cadd1f05ebc3dc5e2e4fdefe4d340ca20cd018724ee36",{"version":"392eadc2af403dd10b4debfbc655c089a7fa6a9750caeb770cfb30051e55e848","affectsGlobalScope":true},"62f1c00d3d246e0e3cf0224f91e122d560428ec1ccc36bb51d4574a84f1dbad0","53f0960fdcc53d097918adfd8861ffbe0db989c56ffc16c052197bf115da5ed6",{"version":"662163e5327f260b23ca0a1a1ad8a74078aabb587c904fcb5ef518986987eaff","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb",{"version":"c48c503c6b3f63baf18257e9a87559b5602a4e960107c762586d2a6a62b64a18","affectsGlobalScope":true},"b0c0d1d13be149f790a75b381b413490f98558649428bb916fd2d71a3f47a134","3c884d9d9ec454bdf0d5a0b8465bf8297d2caa4d853851d92cc417ac6f30b969","0364f8bb461d6e84252412d4e5590feda4eb582f77d47f7a024a7a9ff105dfdc","5433f7f77cd1fd53f45bd82445a4e437b2f6a72a32070e907530a4fea56c30c8","d0ca5d7df114035258a9d01165be309371fcccf0cccd9d57b1453204686d1ed0",{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true},{"version":"1493cc4d72bfaabe2ac13e987d026a5fc99a816f6289bfca7192834a396205cf","affectsGlobalScope":true},"173b6275a81ebdb283b180654890f46516c21199734fed01a773b1c168b8c45c","304f66274aa8119e8d65a49b1cff84cbf803def6afe1b2cc987386e9a9890e22","1b9adafe8a7fefaeaf9099a0e06f602903f6268438147b843a33a5233ac71745","98273274f2dbb79b0b2009b20f74eca4a7146a3447c912d580cd5d2d94a7ae30","c933f7ba4b201c98b14275fd11a14abb950178afd2074703250fe3654fc10cd2","2eaa31492906bc8525aff3c3ec2236e22d90b0dfeee77089f196cd0adf0b3e3b",{"version":"ea455cc68871b049bcecd9f56d4cf27b852d6dafd5e3b54468ca87cc11604e4d","affectsGlobalScope":true},"8f5814f29dbaf8bacd1764aebdf1c8a6eb86381f6a188ddbac0fcbaab855ce52","a63d03de72adfb91777784015bd3b4125abd2f5ef867fc5a13920b5649e8f52b","d20e003f3d518a7c1f749dbe27c6ab5e3be7b3c905a48361b04a9557de4a6900",{"version":"1d4d78c8b23c9ddaaaa49485e6adc2ec01086dfe5d8d4d36ca4cdc98d2f7e74a","affectsGlobalScope":true},{"version":"44fc16356b81c0463cc7d7b2b35dcf324d8144136f5bc5ce73ced86f2b3475b5","affectsGlobalScope":true},"575fb200043b11b464db8e42cc64379c5fd322b6d787638e005b5ee98a64486d","6de2f225d942562733e231a695534b30039bdf1875b377bb7255881f0df8ede8","56249fd3ef1f6b90888e606f4ea648c43978ef43a7263aafad64f8d83cd3b8aa","139ad1dc93a503da85b7a0d5f615bddbae61ad796bc68fedd049150db67a1e26","7b166975fdbd3b37afb64707b98bca88e46577bbc6c59871f9383a7df2daacd1","9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","81505c54d7cad0009352eaa21bd923ab7cdee7ec3405357a54d9a5da033a2084","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","3c1f19c7abcda6b3a4cf9438a15c7307a080bd3b51dfd56b198d9f86baf19447","2ee1645e0df9d84467cfe1d67b0ad3003c2f387de55874d565094464ee6f2927",{"version":"abe61b580e030f1ca3ee548c8fd7b40fc686a97a056d5d1481f34c39c637345f","affectsGlobalScope":true},{"version":"9cf780e96b687e4bdfd1907ed26a688c18b89797490a00598fa8b8ab683335dd","affectsGlobalScope":true},"98e00f3613402504bc2a2c9a621800ab48e0a463d1eed062208a4ae98ad8f84c","9ae88ce9f73446c24b2d2452e993b676da1b31fca5ceb7276e7f36279f693ed1","e49d7625faff2a7842e4e7b9b197f972633fca685afcf6b4403400c97d087c36","b82c38abc53922b1b3670c3af6f333c21b735722a8f156e7d357a2da7c53a0a0",{"version":"b423f53647708043299ded4daa68d95c967a2ac30aa1437adc4442129d7d0a6c","affectsGlobalScope":true},{"version":"7245af181218216bacb01fbdf51095617a51661f20d77178c69a377e16fb69ed","affectsGlobalScope":true},"4f0fc7b7f54422bd97cfaf558ddb4bca86893839367b746a8f86b60ac7619673","4cdd8b6b51599180a387cc7c1c50f49eca5ce06595d781638fd0216520d98246","d91a7d8b5655c42986f1bdfe2105c4408f472831c8f20cf11a8c3345b6b56c8c",{"version":"8704423bf338bff381ebc951ed819935d0252d90cd6de7dffe5b0a5debb65d07","affectsGlobalScope":true},"7c6929fd7cbf38499b6a600b91c3b603d1d78395046dc3499b2b92d01418b94b",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"a42be67ed1ddaec743582f41fc219db96a1b69719fccac6d1464321178d610fc","cdcc132f207d097d7d3aa75615ab9a2e71d6a478162dde8b67f88ea19f3e54de","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","d96cc6598148bf1a98fb2e8dcf01c63a4b3558bdaec6ef35e087fd0562eb40ec",{"version":"5ab630d466ac55baa6d32820378098404fc18ba9da6f7bc5df30c5dbb1cffae8","affectsGlobalScope":true}],"root":[[49,51]],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":99,"noEmitOnError":true,"noImplicitAny":false,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"target":4,"useDefineForClassFields":false},"fileIdsList":[[142],[144,147],[52],[88],[89,94,123],[90,95,101,102,109,120,131],[90,91,101,109],[92,132],[93,94,102,110],[94,120,128],[95,97,101,109],[88,96],[97,98],[101],[99,101],[88,101],[101,102,103,120,131],[101,102,103,116,120,123],[86,89,136],[97,101,104,109,120,131],[101,102,104,105,109,120,128,131],[104,106,120,128,131],[52,53,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138],[101,107],[108,131,136],[97,101,109,120],[110],[111],[88,112],[109,110,113,130,136],[114],[115],[101,116,117],[116,118,132,134],[89,101,120,121,122,123],[89,120,122],[120,121],[123],[124],[88,120],[101,126,127],[126,127],[94,109,120,128],[129],[109,130],[89,104,115,131],[94,132],[120,133],[108,134],[135],[89,94,101,103,112,120,131,134,136],[120,137],[140,146],[144],[141,145],[143],[63,67,131],[63,120,131],[58],[60,63,128,131],[109,128],[139],[58,139],[60,63,109,131],[55,56,59,62,89,101,120,131],[55,61],[59,63,89,123,131,139],[89,139],[79,89,139],[57,58,139],[63],[57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,75,76,77,78,80,81,82,83,84,85],[63,70,71],[61,63,71,72],[62],[55,58,63],[63,67,71,72],[67],[61,63,66,131],[55,60,61,63,67,70],[89,120],[58,63,79,89,136,139],[48]],"referencedMap":[[143,1],[148,2],[52,3],[53,3],[88,4],[89,5],[90,6],[91,7],[92,8],[93,9],[94,10],[95,11],[96,12],[97,13],[98,13],[100,14],[99,15],[101,16],[102,17],[103,18],[87,19],[104,20],[105,21],[106,22],[139,23],[107,24],[108,25],[109,26],[110,27],[111,28],[112,29],[113,30],[114,31],[115,32],[116,33],[117,33],[118,34],[120,35],[122,36],[121,37],[123,38],[124,39],[125,40],[126,41],[127,42],[128,43],[129,44],[130,45],[131,46],[132,47],[133,48],[134,49],[135,50],[136,51],[137,52],[147,53],[145,54],[146,55],[144,56],[70,57],[77,58],[69,57],[84,59],[61,60],[60,61],[83,62],[78,63],[81,64],[63,65],[62,66],[58,67],[57,68],[80,69],[59,70],[64,71],[68,71],[86,72],[85,71],[72,73],[73,74],[75,75],[71,76],[74,77],[79,62],[66,78],[67,79],[76,80],[56,81],[82,82],[49,83],[51,83]]},"version":"5.5.2"}
@@ -0,0 +1,2 @@
1
+ import { AuthProvider } from '@things-factory/auth-base';
2
+ export declare function getOauth2Client(authProvider: AuthProvider): Promise<any>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getOauth2Client = void 0;
3
+ exports.getOauth2Client = getOauth2Client;
4
4
  const googleapis_1 = require("googleapis");
5
5
  async function getOauth2Client(authProvider) {
6
6
  try {
@@ -17,5 +17,4 @@ async function getOauth2Client(authProvider) {
17
17
  return null;
18
18
  }
19
19
  }
20
- exports.getOauth2Client = getOauth2Client;
21
20
  //# sourceMappingURL=get-oauth2-client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-oauth2-client.js","sourceRoot":"","sources":["../../server/controllers/get-oauth2-client.ts"],"names":[],"mappings":";;;AAAA,2CAAmC;AAI5B,KAAK,UAAU,eAAe,CAAC,YAA0B;IAC9D,IAAI;QACF,MAAM,EAAE,UAAU,EAAE,GAAG,YAAY,CAAA;QAEnC,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;QAE7C,MAAM,MAAM,GAAG,IAAI,mBAAM,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,CAAC,WAAW,EAAE;YAChG,sDAAsD;SACvD,CAAC,CAAA;QAEF,MAAM,MAAM,CAAC,SAAS,EAAE,CAAA;QAExB,OAAO,MAAM,CAAA;KACd;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,+BAA+B,EAAE,KAAK,CAAC,CAAA;QACrD,OAAO,IAAI,CAAA;KACZ;AACH,CAAC;AAjBD,0CAiBC","sourcesContent":["import { google } from 'googleapis'\n\nimport { AuthProvider } from '@things-factory/auth-base'\n\nexport async function getOauth2Client(authProvider: AuthProvider): Promise<any> {\n try {\n const { privateKey } = authProvider\n\n const serviceAccount = JSON.parse(privateKey)\n\n const client = new google.auth.JWT(serviceAccount.client_email, null, serviceAccount.private_key, [\n 'https://www.googleapis.com/auth/admin.directory.user'\n ])\n\n await client.authorize()\n\n return client\n } catch (error) {\n console.error('Error fetching oauth2 client:', error)\n return null\n }\n}\n"]}
1
+ {"version":3,"file":"get-oauth2-client.js","sourceRoot":"","sources":["../../server/controllers/get-oauth2-client.ts"],"names":[],"mappings":";;AAIA,0CAiBC;AArBD,2CAAmC;AAI5B,KAAK,UAAU,eAAe,CAAC,YAA0B;IAC9D,IAAI,CAAC;QACH,MAAM,EAAE,UAAU,EAAE,GAAG,YAAY,CAAA;QAEnC,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;QAE7C,MAAM,MAAM,GAAG,IAAI,mBAAM,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,CAAC,WAAW,EAAE;YAChG,sDAAsD;SACvD,CAAC,CAAA;QAEF,MAAM,MAAM,CAAC,SAAS,EAAE,CAAA;QAExB,OAAO,MAAM,CAAA;IACf,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,+BAA+B,EAAE,KAAK,CAAC,CAAA;QACrD,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC","sourcesContent":["import { google } from 'googleapis'\n\nimport { AuthProvider } from '@things-factory/auth-base'\n\nexport async function getOauth2Client(authProvider: AuthProvider): Promise<any> {\n try {\n const { privateKey } = authProvider\n\n const serviceAccount = JSON.parse(privateKey)\n\n const client = new google.auth.JWT(serviceAccount.client_email, null, serviceAccount.private_key, [\n 'https://www.googleapis.com/auth/admin.directory.user'\n ])\n\n await client.authorize()\n\n return client\n } catch (error) {\n console.error('Error fetching oauth2 client:', error)\n return null\n }\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import { AuthProvider } from '@things-factory/auth-base';
2
+ export declare function getClientState(): any;
3
+ export declare function googleSubscriptions(authProvider: AuthProvider): Promise<void>;
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.googleSubscriptions = exports.getClientState = void 0;
3
+ exports.getClientState = getClientState;
4
+ exports.googleSubscriptions = googleSubscriptions;
4
5
  const get_oauth2_client_1 = require("./get-oauth2-client");
5
6
  /* TODO Implement with google */
6
7
  var clientState;
7
8
  function getClientState() {
8
9
  return clientState;
9
10
  }
10
- exports.getClientState = getClientState;
11
11
  async function googleSubscriptions(authProvider) {
12
12
  const client = await (0, get_oauth2_client_1.getOauth2Client)(authProvider);
13
13
  // const expirationDateTime = new Date(Date.now() + 3 * 24 * 60 * 60 * 1000)
@@ -28,5 +28,4 @@ async function googleSubscriptions(authProvider) {
28
28
  // })
29
29
  // const data = await response.json()
30
30
  }
31
- exports.googleSubscriptions = googleSubscriptions;
32
31
  //# sourceMappingURL=subscribe-users-change.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"subscribe-users-change.js","sourceRoot":"","sources":["../../server/controllers/subscribe-users-change.ts"],"names":[],"mappings":";;;AAEA,2DAAqD;AAGrD,gCAAgC;AAChC,IAAI,WAAW,CAAA;AAEf,SAAgB,cAAc;IAC5B,OAAO,WAAW,CAAA;AACpB,CAAC;AAFD,wCAEC;AAEM,KAAK,UAAU,mBAAmB,CAAC,YAA0B;IAClE,MAAM,MAAM,GAAG,MAAM,IAAA,mCAAe,EAAC,YAAY,CAAC,CAAA;IAClD,4EAA4E;IAE5E,kFAAkF;IAElF,mFAAmF;IACnF,oBAAoB;IACpB,eAAe;IACf,8CAA8C;IAC9C,yCAAyC;IACzC,OAAO;IACP,2BAA2B;IAC3B,qCAAqC;IACrC,+EAA+E;IAC/E,0BAA0B;IAC1B,wFAAwF;IACxF,kBAAkB;IAClB,OAAO;IACP,KAAK;IAEL,qCAAqC;AACvC,CAAC;AAtBD,kDAsBC","sourcesContent":["import fetch from 'node-fetch'\n\nimport { getOauth2Client } from './get-oauth2-client'\nimport { AuthProvider } from '@things-factory/auth-base'\n\n/* TODO Implement with google */\nvar clientState\n\nexport function getClientState() {\n return clientState\n}\n\nexport async function googleSubscriptions(authProvider: AuthProvider) {\n const client = await getOauth2Client(authProvider)\n // const expirationDateTime = new Date(Date.now() + 3 * 24 * 60 * 60 * 1000)\n\n // clientState = `${authProvider.domainId}:${authProvider.id}` // TODO make secure\n\n // const response = await fetch('https://graph.microsoft.com/v1.0/subscriptions', {\n // method: 'POST',\n // headers: {\n // Authorization: `Bearer ${accessToken}`,\n // 'Content-Type': 'application/json'\n // },\n // body: JSON.stringify({\n // changeType: 'created,updated',\n // notificationUrl: 'YOUR_WEBHOOK_ENDPOINT_BASE' + '/webhook/google-users',\n // resource: '/users',\n // expirationDateTime: expirationDateTime.toISOString() /* 최대 3일 이내, UTC 타임으로 설정 */,\n // clientState\n // })\n // })\n\n // const data = await response.json()\n}\n"]}
1
+ {"version":3,"file":"subscribe-users-change.js","sourceRoot":"","sources":["../../server/controllers/subscribe-users-change.ts"],"names":[],"mappings":";;AAQA,wCAEC;AAED,kDAsBC;AAhCD,2DAAqD;AAGrD,gCAAgC;AAChC,IAAI,WAAW,CAAA;AAEf,SAAgB,cAAc;IAC5B,OAAO,WAAW,CAAA;AACpB,CAAC;AAEM,KAAK,UAAU,mBAAmB,CAAC,YAA0B;IAClE,MAAM,MAAM,GAAG,MAAM,IAAA,mCAAe,EAAC,YAAY,CAAC,CAAA;IAClD,4EAA4E;IAE5E,kFAAkF;IAElF,mFAAmF;IACnF,oBAAoB;IACpB,eAAe;IACf,8CAA8C;IAC9C,yCAAyC;IACzC,OAAO;IACP,2BAA2B;IAC3B,qCAAqC;IACrC,+EAA+E;IAC/E,0BAA0B;IAC1B,wFAAwF;IACxF,kBAAkB;IAClB,OAAO;IACP,KAAK;IAEL,qCAAqC;AACvC,CAAC","sourcesContent":["import fetch from 'node-fetch'\n\nimport { getOauth2Client } from './get-oauth2-client'\nimport { AuthProvider } from '@things-factory/auth-base'\n\n/* TODO Implement with google */\nvar clientState\n\nexport function getClientState() {\n return clientState\n}\n\nexport async function googleSubscriptions(authProvider: AuthProvider) {\n const client = await getOauth2Client(authProvider)\n // const expirationDateTime = new Date(Date.now() + 3 * 24 * 60 * 60 * 1000)\n\n // clientState = `${authProvider.domainId}:${authProvider.id}` // TODO make secure\n\n // const response = await fetch('https://graph.microsoft.com/v1.0/subscriptions', {\n // method: 'POST',\n // headers: {\n // Authorization: `Bearer ${accessToken}`,\n // 'Content-Type': 'application/json'\n // },\n // body: JSON.stringify({\n // changeType: 'created,updated',\n // notificationUrl: 'YOUR_WEBHOOK_ENDPOINT_BASE' + '/webhook/google-users',\n // resource: '/users',\n // expirationDateTime: expirationDateTime.toISOString() /* 최대 3일 이내, UTC 타임으로 설정 */,\n // clientState\n // })\n // })\n\n // const data = await response.json()\n}\n"]}
@@ -0,0 +1,41 @@
1
+ import { AuthProvider, User, UserStatus, UsersAuthProviders } from '@things-factory/auth-base';
2
+ export declare function syncAllUserInfo(authProvider: AuthProvider, context: ResolverContext): Promise<void>;
3
+ export declare function updateUserInfo(authProvider: AuthProvider, userInfo: any, context: ResolverContext): Promise<({
4
+ id: any;
5
+ name: any;
6
+ email: any;
7
+ creator: User;
8
+ updater: User;
9
+ domains: import("@things-factory/shell").Domain[];
10
+ roles: any[];
11
+ salt: string;
12
+ userType: string;
13
+ status: UserStatus.ACTIVATED;
14
+ passwordUpdatedAt: Date;
15
+ password: string;
16
+ } & User) | ({
17
+ name: any;
18
+ domains: import("@things-factory/shell").Domain[];
19
+ updater: User;
20
+ id: string;
21
+ description: string;
22
+ email: string;
23
+ password: string;
24
+ roles?: import("@things-factory/auth-base").Role[];
25
+ userType: string;
26
+ reference: string;
27
+ salt: string;
28
+ locale: string;
29
+ ssoId: string;
30
+ status: UserStatus;
31
+ failCount: number;
32
+ passwordUpdatedAt: Date;
33
+ owner: boolean;
34
+ credentials: import("@things-factory/auth-base").WebAuthCredential[];
35
+ usersAuthProviders: UsersAuthProviders[];
36
+ creator: User;
37
+ creatorId: string;
38
+ updaterId: string;
39
+ createdAt: Date;
40
+ updatedAt: Date;
41
+ } & User)>;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateUserInfo = exports.syncAllUserInfo = void 0;
3
+ exports.syncAllUserInfo = syncAllUserInfo;
4
+ exports.updateUserInfo = updateUserInfo;
4
5
  const googleapis_1 = require("googleapis");
5
6
  const auth_base_1 = require("@things-factory/auth-base");
6
7
  const get_oauth2_client_1 = require("./get-oauth2-client");
@@ -22,7 +23,6 @@ async function syncAllUserInfo(authProvider, context) {
22
23
  console.log('No users found.');
23
24
  }
24
25
  }
25
- exports.syncAllUserInfo = syncAllUserInfo;
26
26
  async function updateUserInfo(authProvider, userInfo, context) {
27
27
  const { tx, domain, user } = context.state;
28
28
  // {
@@ -121,5 +121,4 @@ async function updateUserInfo(authProvider, userInfo, context) {
121
121
  return updatedUser;
122
122
  }
123
123
  }
124
- exports.updateUserInfo = updateUserInfo;
125
124
  //# sourceMappingURL=sync-user-info.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sync-user-info.js","sourceRoot":"","sources":["../../server/controllers/sync-user-info.ts"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import {\n AuthProvider,\n User,\n UserStatus,\n UsersAuthProviders,\n encryptState,\n decryptState\n} from '@things-factory/auth-base'\nimport { config } from '@things-factory/env'\nimport { getOauth2Client } from './get-oauth2-client'\n\nexport async function syncAllUserInfo(authProvider: AuthProvider, context: ResolverContext) {\n const oauth2Client = await getOauth2Client(authProvider)\n\n const service = google.admin({ version: 'directory_v1', auth: oauth2Client })\n\n const res = await service.users.list({\n customer: 'my_customer' /* 'my_customer'는 G Suite 도메인의 모든 사용자를 나타내는 특수 문자열입니다 */,\n maxResults: 10,\n orderBy: 'email'\n })\n\n const users = res.data.users\n\n if (users && users.length) {\n for (const user of users) {\n await updateUserInfo(authProvider, user, context)\n }\n } else {\n console.log('No users found.')\n }\n}\n\nexport async function updateUserInfo(authProvider: AuthProvider, userInfo, context: ResolverContext) {\n const { tx, domain, user } = context.state\n\n // {\n // \"kind\": \"admin#directory#user\",\n // \"id\": \"user's unique ID\",\n // \"etag\": \"etag of this resource\",\n // \"primaryEmail\": \"user@example.com\",\n // \"name\": {\n // \"givenName\": \"First\",\n // \"familyName\": \"Last\",\n // \"fullName\": \"First Last\"\n // },\n // \"isAdmin\": false,\n // \"isDelegatedAdmin\": false,\n // \"lastLoginTime\": \"2021-04-05T12:07:41.000Z\",\n // \"creationTime\": \"2017-05-26T10:57:00.000Z\",\n // \"agreedToTerms\": true,\n // \"suspended\": false,\n // \"archived\": false,\n // \"changePasswordAtNextLogin\": false,\n // \"ipWhitelisted\": false,\n // \"emails\": [\n // {\n // \"address\": \"user@example.com\",\n // \"type\": \"work\",\n // \"customType\": \"\",\n // \"primary\": true\n // }\n // ],\n // \"organizations\": [\n // {\n // \"name\": \"Department Name\",\n // \"title\": \"Job Title\",\n // \"type\": \"work\",\n // \"primary\": true\n // }\n // ],\n // \"phones\": [\n // {\n // \"value\": \"+1 xxx-xxx-xxxx\",\n // \"type\": \"work\",\n // \"primary\": true\n // }\n // ],\n // \"aliases\": [\"alias@example.com\"],\n // // ... 다른 필드들\n // }\n const { id, name, primaryEmail } = userInfo\n\n const repository = tx.getRepository(User)\n\n // 1. 사용자를 찾는다.(email 정보로)\n const existingUser = await repository.findOne({\n where: { email: primaryEmail },\n relations: ['domains']\n })\n\n if (!existingUser) {\n // 2. 사용자가 없다면, 생성한다.\n const salt = User.generateSalt()\n\n /* normally they don't login with this password. */\n const password = salt\n\n const createdUser = await repository.save({\n id,\n name: name.fullName,\n email: primaryEmail,\n creator: user,\n updater: user,\n domains: domain ? [domain] : [],\n roles: [],\n salt,\n userType: 'user',\n // locale: preferredLanguage,\n status: UserStatus.ACTIVATED,\n passwordUpdatedAt: new Date(),\n password: User.encode(password, salt)\n })\n\n await tx.getRepository(UsersAuthProviders).save({\n domain,\n user: createdUser,\n authProvider,\n ssoId: id\n })\n\n return createdUser\n } else {\n // 3. 사용자가 있다면, 업데이트한다.\n const { domains } = existingUser\n\n if (!domains.find(existing => existing.id == domain.id)) {\n domains.push(domain)\n }\n\n const updatedUser = await repository.save({\n ...existingUser,\n name: name.fullName,\n domains,\n // locale: preferredLanguage,\n updater: user\n })\n\n const usersAuthProviders = await tx.getRepository(UsersAuthProviders).findOne({\n where: { domain: { id: domain.id }, user: { id: updatedUser.id }, authProvider: { id: authProvider.id } }\n })\n\n await tx.getRepository(UsersAuthProviders).save({\n ...usersAuthProviders,\n domain,\n user: updatedUser,\n authProvider,\n ssoId: id\n })\n\n return updatedUser\n }\n}\n"]}
1
+ {"version":3,"file":"sync-user-info.js","sourceRoot":"","sources":["../../server/controllers/sync-user-info.ts"],"names":[],"mappings":";;AAcA,0CAoBC;AAED,wCAuHC;AA1JD,2CAAmC;AAEnC,yDAOkC;AAElC,2DAAqD;AAE9C,KAAK,UAAU,eAAe,CAAC,YAA0B,EAAE,OAAwB;IACxF,MAAM,YAAY,GAAG,MAAM,IAAA,mCAAe,EAAC,YAAY,CAAC,CAAA;IAExD,MAAM,OAAO,GAAG,mBAAM,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE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,WAAW,CAAA;IACpB,CAAC;SAAM,CAAC;QACN,uBAAuB;QACvB,MAAM,EAAE,OAAO,EAAE,GAAG,YAAY,CAAA;QAEhC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,IAAI,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;YACxD,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACtB,CAAC;QAED,MAAM,WAAW,GAAG,MAAM,UAAU,CAAC,IAAI,iCACpC,YAAY,KACf,IAAI,EAAE,IAAI,CAAC,QAAQ,EACnB,OAAO;YACP,6BAA6B;YAC7B,OAAO,EAAE,IAAI,IACb,CAAA;QAEF,MAAM,kBAAkB,GAAG,MAAM,EAAE,CAAC,aAAa,CAAC,8BAAkB,CAAC,CAAC,OAAO,CAAC;YAC5E,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,WAAW,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,EAAE,YAAY,CAAC,EAAE,EAAE,EAAE;SAC1G,CAAC,CAAA;QAEF,MAAM,EAAE,CAAC,aAAa,CAAC,8BAAkB,CAAC,CAAC,IAAI,iCAC1C,kBAAkB,KACrB,MAAM,EACN,IAAI,EAAE,WAAW,EACjB,YAAY,EACZ,KAAK,EAAE,EAAE,IACT,CAAA;QAEF,OAAO,WAAW,CAAA;IACpB,CAAC;AACH,CAAC","sourcesContent":["import fetch from 'node-fetch'\nimport { google } from 'googleapis'\n\nimport {\n AuthProvider,\n User,\n UserStatus,\n UsersAuthProviders,\n encryptState,\n decryptState\n} from '@things-factory/auth-base'\nimport { config } from '@things-factory/env'\nimport { getOauth2Client } from './get-oauth2-client'\n\nexport async function syncAllUserInfo(authProvider: AuthProvider, context: ResolverContext) {\n const oauth2Client = await getOauth2Client(authProvider)\n\n const service = google.admin({ version: 'directory_v1', auth: oauth2Client })\n\n const res = await service.users.list({\n customer: 'my_customer' /* 'my_customer'는 G Suite 도메인의 모든 사용자를 나타내는 특수 문자열입니다 */,\n maxResults: 10,\n orderBy: 'email'\n })\n\n const users = res.data.users\n\n if (users && users.length) {\n for (const user of users) {\n await updateUserInfo(authProvider, user, context)\n }\n } else {\n console.log('No users found.')\n }\n}\n\nexport async function updateUserInfo(authProvider: AuthProvider, userInfo, context: ResolverContext) {\n const { tx, domain, user } = context.state\n\n // {\n // \"kind\": \"admin#directory#user\",\n // \"id\": \"user's unique ID\",\n // \"etag\": \"etag of this resource\",\n // \"primaryEmail\": \"user@example.com\",\n // \"name\": {\n // \"givenName\": \"First\",\n // \"familyName\": \"Last\",\n // \"fullName\": \"First Last\"\n // },\n // \"isAdmin\": false,\n // \"isDelegatedAdmin\": false,\n // \"lastLoginTime\": \"2021-04-05T12:07:41.000Z\",\n // \"creationTime\": \"2017-05-26T10:57:00.000Z\",\n // \"agreedToTerms\": true,\n // \"suspended\": false,\n // \"archived\": false,\n // \"changePasswordAtNextLogin\": false,\n // \"ipWhitelisted\": false,\n // \"emails\": [\n // {\n // \"address\": \"user@example.com\",\n // \"type\": \"work\",\n // \"customType\": \"\",\n // \"primary\": true\n // }\n // ],\n // \"organizations\": [\n // {\n // \"name\": \"Department Name\",\n // \"title\": \"Job Title\",\n // \"type\": \"work\",\n // \"primary\": true\n // }\n // ],\n // \"phones\": [\n // {\n // \"value\": \"+1 xxx-xxx-xxxx\",\n // \"type\": \"work\",\n // \"primary\": true\n // }\n // ],\n // \"aliases\": [\"alias@example.com\"],\n // // ... 다른 필드들\n // }\n const { id, name, primaryEmail } = userInfo\n\n const repository = tx.getRepository(User)\n\n // 1. 사용자를 찾는다.(email 정보로)\n const existingUser = await repository.findOne({\n where: { email: primaryEmail },\n relations: ['domains']\n })\n\n if (!existingUser) {\n // 2. 사용자가 없다면, 생성한다.\n const salt = User.generateSalt()\n\n /* normally they don't login with this password. */\n const password = salt\n\n const createdUser = await repository.save({\n id,\n name: name.fullName,\n email: primaryEmail,\n creator: user,\n updater: user,\n domains: domain ? [domain] : [],\n roles: [],\n salt,\n userType: 'user',\n // locale: preferredLanguage,\n status: UserStatus.ACTIVATED,\n passwordUpdatedAt: new Date(),\n password: User.encode(password, salt)\n })\n\n await tx.getRepository(UsersAuthProviders).save({\n domain,\n user: createdUser,\n authProvider,\n ssoId: id\n })\n\n return createdUser\n } else {\n // 3. 사용자가 있다면, 업데이트한다.\n const { domains } = existingUser\n\n if (!domains.find(existing => existing.id == domain.id)) {\n domains.push(domain)\n }\n\n const updatedUser = await repository.save({\n ...existingUser,\n name: name.fullName,\n domains,\n // locale: preferredLanguage,\n updater: user\n })\n\n const usersAuthProviders = await tx.getRepository(UsersAuthProviders).findOne({\n where: { domain: { id: domain.id }, user: { id: updatedUser.id }, authProvider: { id: authProvider.id } }\n })\n\n await tx.getRepository(UsersAuthProviders).save({\n ...usersAuthProviders,\n domain,\n user: updatedUser,\n authProvider,\n ssoId: id\n })\n\n return updatedUser\n }\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export * from './middlewares';
2
+ export * from './service';
3
+ import './routes';
@@ -0,0 +1,2 @@
1
+ export declare function authGoogleMiddleware(context: any, next: any): Promise<any>;
2
+ export declare function googleSubscriptionMiddleware(context: any, next: any): Promise<any>;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.googleSubscriptionMiddleware = exports.authGoogleMiddleware = void 0;
3
+ exports.authGoogleMiddleware = authGoogleMiddleware;
4
+ exports.googleSubscriptionMiddleware = googleSubscriptionMiddleware;
4
5
  const tslib_1 = require("tslib");
5
6
  const koa_passport_1 = tslib_1.__importDefault(require("koa-passport"));
6
7
  const passport_google_oauth20_1 = require("passport-google-oauth20");
@@ -40,7 +41,6 @@ async function authGoogleMiddleware(context, next) {
40
41
  successRedirect: '/auth/checkin'
41
42
  })(context, next);
42
43
  }
43
- exports.authGoogleMiddleware = authGoogleMiddleware;
44
44
  async function googleSubscriptionMiddleware(context, next) {
45
45
  var _a;
46
46
  const { path } = context;
@@ -60,5 +60,4 @@ async function googleSubscriptionMiddleware(context, next) {
60
60
  }
61
61
  return await next();
62
62
  }
63
- exports.googleSubscriptionMiddleware = googleSubscriptionMiddleware;
64
63
  //# sourceMappingURL=google-authenticate-middleware.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"google-authenticate-middleware.js","sourceRoot":"","sources":["../../server/middlewares/google-authenticate-middleware.ts"],"names":[],"mappings":";;;;AAAA,wEAAmC;AACnC,qEAAoE;AAEpE,6CAA4C;AAC5C,yDAAgD;AAEhD,MAAM,eAAe,GAAG,YAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;AAEvD,IAAI,eAAe,EAAE;IACnB,sBAAQ,CAAC,GAAG,CACV,IAAI,kCAAc,iCAEX,eAAe,KAClB,KAAK,EAAE,CAAC,SAAS,EAAE,gDAAgD,CAAC,KAEtE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,IAAI,CAAC,IAAI,KAAK,CAAC,kBAAkB,CAAC,EAAE,IAAI,CAAC,CAAA;SACjD;QAED,IAAI;YACF,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;YAClC,MAAM,KAAK,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,CAAC,EAAE,KAAK,CAAA;YAC/B,MAAM,KAAK,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,CAAC,EAAE,KAAK,CAAA;YAE/B,MAAM,IAAI,GAAG,MAAM,gBAAI,CAAC,kBAAkB,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;YAErD,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;YAErC,OAAO,IAAI,CAAC,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IAAI,EAAE,CAAA;AACrB,CAAC;AArBD,oEAqBC","sourcesContent":["import passport from 'koa-passport'\nimport { Strategy as GoogleStrategy } from 'passport-google-oauth20'\n\nimport { config } from '@things-factory/env'\nimport { User } from '@things-factory/auth-base'\n\nconst SSOGoogleConfig = config.get('sso/google/config')\n\nif (SSOGoogleConfig) {\n passport.use(\n new GoogleStrategy(\n {\n ...SSOGoogleConfig,\n scope: ['profile', 'https://www.googleapis.com/auth/userinfo.email']\n },\n async (token, tokenSecret, profile, done) => {\n if (!profile) {\n return done(new Error('No profile found'), null)\n }\n\n try {\n const { emails, photos } = profile\n const email = emails?.[0].value\n const photo = photos?.[0].value\n\n const user = await User.checkAuthWithEmail({ email })\n\n const { id, userType, status } = user\n\n return done(null, {\n id,\n userType,\n status\n })\n } catch (error) {\n return done(error)\n }\n }\n )\n )\n}\n\nexport async function authGoogleMiddleware(context, next) {\n const { path } = context\n const { user } = context.state\n\n if (user) {\n return await next()\n }\n\n await passport.authenticate('google', {\n failureRedirect: '/auth/signin',\n successRedirect: '/auth/checkin'\n })(context, next)\n}\n\nexport async function googleSubscriptionMiddleware(context, next) {\n const { path } = context\n const { user } = context.state\n\n if (user) {\n return await next()\n }\n\n await passport.authenticate('google', {\n failureRedirect: '/auth/signin',\n successRedirect: '/auth/checkin'\n })(context)\n\n /* 다음은, websocket 에서 인증을 처리하기 위한 작업임. */\n const passportObject = context.session?.passport\n if (passportObject) {\n const userEntity = await User.checkAuth(passportObject?.user)\n context.state.user = userEntity\n }\n\n return await next()\n}\n"]}
1
+ {"version":3,"file":"google-authenticate-middleware.js","sourceRoot":"","sources":["../../server/middlewares/google-authenticate-middleware.ts"],"names":[],"mappings":";;AA0CA,oDAYC;AAED,oEAqBC;;AA7ED,wEAAmC;AACnC,qEAAoE;AAEpE,6CAA4C;AAC5C,yDAAgD;AAEhD,MAAM,eAAe,GAAG,YAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;AAEvD,IAAI,eAAe,EAAE,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EAAE;QACpC,eAAe,EAAE,cAAc;QAC/B,eAAe,EAAE,eAAe;KACjC,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;AACnB,CAAC;AAEM,KAAK,UAAU,4BAA4B,CAAC,OAAO,EAAE,IAAI;;IAC9D,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAA;IACxB,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAE9B,IAAI,IAAI,EAAE,CAAC;QACT,OAAO,MAAM,IAAI,EAAE,CAAA;IACrB,CAAC;IAED,MAAM,sBAAQ,CAAC,YAAY,CAAC,QAAQ,EAAE;QACpC,eAAe,EAAE,cAAc;QAC/B,eAAe,EAAE,eAAe;KACjC,CAAC,CAAC,OAAO,CAAC,CAAA;IAEX,wCAAwC;IACxC,MAAM,cAAc,GAAG,MAAA,OAAO,CAAC,OAAO,0CAAE,QAAQ,CAAA;IAChD,IAAI,cAAc,EAAE,CAAC;QACnB,MAAM,UAAU,GAAG,MAAM,gBAAI,CAAC,SAAS,CAAC,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,IAAI,CAAC,CAAA;QAC7D,OAAO,CAAC,KAAK,CAAC,IAAI,GAAG,UAAU,CAAA;IACjC,CAAC;IAED,OAAO,MAAM,IAAI,EAAE,CAAA;AACrB,CAAC","sourcesContent":["import passport from 'koa-passport'\nimport { Strategy as GoogleStrategy } from 'passport-google-oauth20'\n\nimport { config } from '@things-factory/env'\nimport { User } from '@things-factory/auth-base'\n\nconst SSOGoogleConfig = config.get('sso/google/config')\n\nif (SSOGoogleConfig) {\n passport.use(\n new GoogleStrategy(\n {\n ...SSOGoogleConfig,\n scope: ['profile', 'https://www.googleapis.com/auth/userinfo.email']\n },\n async (token, tokenSecret, profile, done) => {\n if (!profile) {\n return done(new Error('No profile found'), null)\n }\n\n try {\n const { emails, photos } = profile\n const email = emails?.[0].value\n const photo = photos?.[0].value\n\n const user = await User.checkAuthWithEmail({ email })\n\n const { id, userType, status } = user\n\n return done(null, {\n id,\n userType,\n status\n })\n } catch (error) {\n return done(error)\n }\n }\n )\n )\n}\n\nexport async function authGoogleMiddleware(context, next) {\n const { path } = context\n const { user } = context.state\n\n if (user) {\n return await next()\n }\n\n await passport.authenticate('google', {\n failureRedirect: '/auth/signin',\n successRedirect: '/auth/checkin'\n })(context, next)\n}\n\nexport async function googleSubscriptionMiddleware(context, next) {\n const { path } = context\n const { user } = context.state\n\n if (user) {\n return await next()\n }\n\n await passport.authenticate('google', {\n failureRedirect: '/auth/signin',\n successRedirect: '/auth/checkin'\n })(context)\n\n /* 다음은, websocket 에서 인증을 처리하기 위한 작업임. */\n const passportObject = context.session?.passport\n if (passportObject) {\n const userEntity = await User.checkAuth(passportObject?.user)\n context.state.user = userEntity\n }\n\n return await next()\n}\n"]}
@@ -0,0 +1 @@
1
+ export * from './google-authenticate-middleware';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/middlewares/index.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE5C,MAAM,eAAe,GAAG,YAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;AAEvD,qFAA+E;AAE/E,IAAI,eAAe,EAAE;IACnB,OAAO,CAAC,EAAE,CAAC,+BAAsC,EAAE,CAAC,GAAG,EAAE,sBAAsB,EAAE,EAAE;QACjF,sBAAsB,CAAC,OAAO,CAAC,6DAA4B,CAAC,CAAA;IAC9D,CAAC,CAAC,CAAA;CACH;AAED,2EAAgD","sourcesContent":["import { config } from '@things-factory/env'\n\nconst SSOGoogleConfig = config.get('sso/google/config')\n\nimport { googleSubscriptionMiddleware } from './google-authenticate-middleware'\n\nif (SSOGoogleConfig) {\n process.on('bootstrap-module-subscription' as any, (app, subscriptionMiddleware) => {\n subscriptionMiddleware.unshift(googleSubscriptionMiddleware)\n })\n}\n\nexport * from './google-authenticate-middleware'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/middlewares/index.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE5C,MAAM,eAAe,GAAG,YAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;AAEvD,qFAA+E;AAE/E,IAAI,eAAe,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,+BAAsC,EAAE,CAAC,GAAG,EAAE,sBAAsB,EAAE,EAAE;QACjF,sBAAsB,CAAC,OAAO,CAAC,6DAA4B,CAAC,CAAA;IAC9D,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,2EAAgD","sourcesContent":["import { config } from '@things-factory/env'\n\nconst SSOGoogleConfig = config.get('sso/google/config')\n\nimport { googleSubscriptionMiddleware } from './google-authenticate-middleware'\n\nif (SSOGoogleConfig) {\n process.on('bootstrap-module-subscription' as any, (app, subscriptionMiddleware) => {\n subscriptionMiddleware.unshift(googleSubscriptionMiddleware)\n })\n}\n\nexport * from './google-authenticate-middleware'\n"]}
@@ -0,0 +1 @@
1
+ export declare const authGoogleRouter: any;
@@ -0,0 +1 @@
1
+ export declare const authGoogleWebhookRouter: any;
@@ -1 +1 @@
1
- {"version":3,"file":"auth-google-webhook-router.js","sourceRoot":"","sources":["../../server/router/auth-google-webhook-router.ts"],"names":[],"mappings":";;;;AAAA,oEAA+B;AAG/B,iDAAoE;AAGpE,wEAAkE;AAClE,yDAAwD;AAE3C,QAAA,uBAAuB,GAAG,IAAI,oBAAM,EAAE,CAAA;AAEnD,2CAA2C;AAC3C,6BAA6B;AAC7B,2BAA2B;AAC3B,oBAAoB;AACpB,iBAAiB;AACjB,MAAM;AACN,IAAI;AAEJ,+BAAuB,CAAC,IAAI,CAAC,uBAAuB,EAAE,KAAK,EAAC,OAAO,EAAC,EAAE;IACpE,MAAM,aAAa,GAAmB,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAA;IAChE,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAA;IACpD,MAAM,CAAC,QAAQ,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QAEjD,WAAW;QACX,yFAAyF;QACzF,kDAAkD;QAClD,yCAAyC;QACzC,iCAAiC;QACjC,kCAAkC;QAClC,yDAAyD;QACzD,6CAA6C;QAC7C,wCAAwC;QACxC,yCAAyC;QACzC,+BAA+B;QAC/B,sEAAsE;QACtE,wDAAwD;QACxD,WAAW;QAEX,yEAAyE;QAEzE,yDAAyD;QACzD,sBAAsB;QACtB,6EAA6E;QAC7E,MAAM;QACN,IAAI;IACN,CAAC,CAAC,CAAA;IAEF,OAAO,CAAC,MAAM,GAAG,GAAG,CAAA;AACtB,CAAC,CAAC,CAAA","sourcesContent":["import Router from 'koa-router'\nimport fetch from 'node-fetch'\n\nimport { getRepository, getDataSource } from '@things-factory/shell'\n\nimport { updateUserInfo } from '../controllers/sync-user-info'\nimport { getOauth2Client } from '../controllers/get-oauth2-client'\nimport { AuthProvider } from '@things-factory/auth-base'\n\nexport const authGoogleWebhookRouter = new Router()\n\n// Microsoft Graph에서 발송되는 알림을 처리하기 위한 타입 정의\n// TODO implement with google\n// interface Notification {\n// resourceData: {\n// id: string\n// }\n// }\n\nauthGoogleWebhookRouter.post('/webhook/google-users', async context => {\n const notifications: Notification[] = context.request.body.value\n const clientState = context.request.body.clientState\n const [domainId, authProviderId] = clientState?.split(':') || []\n\n if (!domainId || !authProviderId) {\n context.status = 401 // unauthorized\n context.body = 'Invalid ClientState'\n return\n }\n\n await getDataSource('tx').transaction(async tx => {\n const wrap = context.app.createContext(context.req || {}, context.res || {})\n\n wrap.state = {\n ...context.state,\n domain: null,\n tx\n }\n wrap.t = context.t\n\n const authProvider = await tx.getRepository(AuthProvider).findOne({\n where: {\n domain: { id: domainId },\n id: authProviderId\n }\n })\n\n if (!authProvider) {\n context.status = 401 // unauthorized\n context.body = 'Invalid ClientState'\n return\n }\n\n const oauth2Client = await getOauth2Client(authProvider)\n\n // for (const notification of notifications) {\n // const userId = notification.resourceData.id\n\n // try {\n // const userResponse = await fetch(`https://graph.microsoft.com/v1.0/users/${userId}`, {\n // headers: {\n // Authorization: `Bearer ${accessToken}`\n // }\n // })\n\n // if (!userResponse.ok) {\n // throw new Error(`Failed to fetch user data: ${userResponse.statusText}`)\n // }\n\n // const userInfo = await userResponse.json()\n\n // // {\n // // \"@odata.context\": \"https://graph.microsoft.com/v1.0/$metadata#users/$entity\",\n // // \"businessPhones\": [\"+1 412 555 0109\"],\n // // \"displayName\": \"Megan Bowen\",\n // // \"givenName\": \"Megan\",\n // // \"jobTitle\": \"Auditor\",\n // // \"mail\": \"MeganB@M365x214355.onmicrosoft.com\",\n // // \"mobilePhone\": \"+1 412 555 0109\",\n // // \"officeLocation\": \"12/1110\",\n // // \"preferredLanguage\": \"en-US\",\n // // \"surname\": \"Bowen\",\n // // \"userPrincipalName\": \"MeganB@M365x214355.onmicrosoft.com\",\n // // \"id\": \"48d31887-5fad-4d73-a9f5-3c356e68a038\"\n // // }\n\n // // webhook 호출로부터 호출한 tenant를 알 수 있다면, 매핑된 도메인 정보를 포함할 수 있을 것 같은데..\n\n // await updateUserInfo(authProvider, userInfo, wrap)\n // } catch (error) {\n // console.error('Error fetching user data from Microsoft Graph:', error)\n // }\n // }\n })\n\n context.status = 202\n})\n"]}
1
+ {"version":3,"file":"auth-google-webhook-router.js","sourceRoot":"","sources":["../../server/router/auth-google-webhook-router.ts"],"names":[],"mappings":";;;;AAAA,oEAA+B;AAG/B,iDAAoE;AAGpE,wEAAkE;AAClE,yDAAwD;AAE3C,QAAA,uBAAuB,GAAG,IAAI,oBAAM,EAAE,CAAA;AAEnD,2CAA2C;AAC3C,6BAA6B;AAC7B,2BAA2B;AAC3B,oBAAoB;AACpB,iBAAiB;AACjB,MAAM;AACN,IAAI;AAEJ,+BAAuB,CAAC,IAAI,CAAC,uBAAuB,EAAE,KAAK,EAAC,OAAO,EAAC,EAAE;IACpE,MAAM,aAAa,GAAmB,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAA;IAChE,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO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D;QACjD,UAAU;QACV,SAAS;QAET,8BAA8B;QAC9B,iFAAiF;QACjF,QAAQ;QAER,iDAAiD;QAEjD,WAAW;QACX,yFAAyF;QACzF,kDAAkD;QAClD,yCAAyC;QACzC,iCAAiC;QACjC,kCAAkC;QAClC,yDAAyD;QACzD,6CAA6C;QAC7C,wCAAwC;QACxC,yCAAyC;QACzC,+BAA+B;QAC/B,sEAAsE;QACtE,wDAAwD;QACxD,WAAW;QAEX,yEAAyE;QAEzE,yDAAyD;QACzD,sBAAsB;QACtB,6EAA6E;QAC7E,MAAM;QACN,IAAI;IACN,CAAC,CAAC,CAAA;IAEF,OAAO,CAAC,MAAM,GAAG,GAAG,CAAA;AACtB,CAAC,CAAC,CAAA","sourcesContent":["import Router from 'koa-router'\nimport fetch from 'node-fetch'\n\nimport { getRepository, getDataSource } from '@things-factory/shell'\n\nimport { updateUserInfo } from '../controllers/sync-user-info'\nimport { getOauth2Client } from '../controllers/get-oauth2-client'\nimport { AuthProvider } from '@things-factory/auth-base'\n\nexport const authGoogleWebhookRouter = new Router()\n\n// Microsoft Graph에서 발송되는 알림을 처리하기 위한 타입 정의\n// TODO implement with google\n// interface Notification {\n// resourceData: {\n// id: string\n// }\n// }\n\nauthGoogleWebhookRouter.post('/webhook/google-users', async context => {\n const notifications: Notification[] = context.request.body.value\n const clientState = context.request.body.clientState\n const [domainId, authProviderId] = clientState?.split(':') || []\n\n if (!domainId || !authProviderId) {\n context.status = 401 // unauthorized\n context.body = 'Invalid ClientState'\n return\n }\n\n await getDataSource('tx').transaction(async tx => {\n const wrap = context.app.createContext(context.req || {}, context.res || {})\n\n wrap.state = {\n ...context.state,\n domain: null,\n tx\n }\n wrap.t = context.t\n\n const authProvider = await tx.getRepository(AuthProvider).findOne({\n where: {\n domain: { id: domainId },\n id: authProviderId\n }\n })\n\n if (!authProvider) {\n context.status = 401 // unauthorized\n context.body = 'Invalid ClientState'\n return\n }\n\n const oauth2Client = await getOauth2Client(authProvider)\n\n // for (const notification of notifications) {\n // const userId = notification.resourceData.id\n\n // try {\n // const userResponse = await fetch(`https://graph.microsoft.com/v1.0/users/${userId}`, {\n // headers: {\n // Authorization: `Bearer ${accessToken}`\n // }\n // })\n\n // if (!userResponse.ok) {\n // throw new Error(`Failed to fetch user data: ${userResponse.statusText}`)\n // }\n\n // const userInfo = await userResponse.json()\n\n // // {\n // // \"@odata.context\": \"https://graph.microsoft.com/v1.0/$metadata#users/$entity\",\n // // \"businessPhones\": [\"+1 412 555 0109\"],\n // // \"displayName\": \"Megan Bowen\",\n // // \"givenName\": \"Megan\",\n // // \"jobTitle\": \"Auditor\",\n // // \"mail\": \"MeganB@M365x214355.onmicrosoft.com\",\n // // \"mobilePhone\": \"+1 412 555 0109\",\n // // \"officeLocation\": \"12/1110\",\n // // \"preferredLanguage\": \"en-US\",\n // // \"surname\": \"Bowen\",\n // // \"userPrincipalName\": \"MeganB@M365x214355.onmicrosoft.com\",\n // // \"id\": \"48d31887-5fad-4d73-a9f5-3c356e68a038\"\n // // }\n\n // // webhook 호출로부터 호출한 tenant를 알 수 있다면, 매핑된 도메인 정보를 포함할 수 있을 것 같은데..\n\n // await updateUserInfo(authProvider, userInfo, wrap)\n // } catch (error) {\n // console.error('Error fetching user data from Microsoft Graph:', error)\n // }\n // }\n })\n\n context.status = 202\n})\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './auth-google-router';
2
+ export * from './auth-google-webhook-router';
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1 @@
1
- {"version":3,"file":"routes.js","sourceRoot":"","sources":["../server/routes.ts"],"names":[],"mappings":";;;AAAA,wEAAmC;AACnC,6CAA4C;AAG5C,MAAM,eAAe,GAAG,YAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;AAEvD,+CAAoD;AACpD,qCAAoE;AAEpE,IAAI,eAAe,EAAE;IACnB,OAAO,CAAC,EAAE,CAAC,kCAAyC,EAAE,CAAC,CAAC,EAAE,cAAc,EAAE,EAAE;QAC1E,cAAc,CAAC,IAAI,CAAC,kCAAoB,CAAC,CAAA;IAC3C,CAAC,CAAC,CAAA;IAEF,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE;QACpF,kBAAkB,CAAC,GAAG,CAAC,yBAAgB,CAAC,MAAM,EAAE,EAAE,yBAAgB,CAAC,cAAc,EAAE,CAAC,CAAA;QACpF,kBAAkB,CAAC,GAAG,CAAC,gCAAuB,CAAC,MAAM,EAAE,EAAE,gCAAuB,CAAC,cAAc,EAAE,CAAC,CAAA;IACpG,CAAC,CAAC,CAAA;IAEF,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE;QACpF,kBAAkB,CAAC,GAAG,CACpB,0BAA0B,EAC1B,sBAAQ,CAAC,YAAY,CAAC,QAAQ,EAAE;YAC9B,KAAK,EAAE,CAAC,SAAS,EAAE,gDAAgD,CAAC;SACrE,CAAC,CACH,CAAA;IACH,CAAC,CAAC,CAAA;CACH","sourcesContent":["import passport from 'koa-passport'\nimport { config } from '@things-factory/env'\nimport { setAccessTokenCookie } from '@things-factory/auth-base'\n\nconst SSOGoogleConfig = config.get('sso/google/config')\n\nimport { authGoogleMiddleware } from './middlewares'\nimport { authGoogleRouter, authGoogleWebhookRouter } from './router'\n\nif (SSOGoogleConfig) {\n process.on('bootstrap-collect-sso-middleware' as any, (_, ssoMiddlewares) => {\n ssoMiddlewares.push(authGoogleMiddleware)\n })\n\n process.on('bootstrap-module-domain-public-route' as any, (app, domainPublicRouter) => {\n domainPublicRouter.use(authGoogleRouter.routes(), authGoogleRouter.allowedMethods())\n domainPublicRouter.use(authGoogleWebhookRouter.routes(), authGoogleWebhookRouter.allowedMethods())\n })\n\n process.on('bootstrap-module-global-public-route' as any, (app, globalPublicRouter) => {\n globalPublicRouter.get(\n '/auth/signin-with-google',\n passport.authenticate('google', {\n scope: ['profile', 'https://www.googleapis.com/auth/userinfo.email']\n })\n )\n })\n}\n"]}
1
+ {"version":3,"file":"routes.js","sourceRoot":"","sources":["../server/routes.ts"],"names":[],"mappings":";;;AAAA,wEAAmC;AACnC,6CAA4C;AAG5C,MAAM,eAAe,GAAG,YAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;AAEvD,+CAAoD;AACpD,qCAAoE;AAEpE,IAAI,eAAe,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,kCAAyC,EAAE,CAAC,CAAC,EAAE,cAAc,EAAE,EAAE;QAC1E,cAAc,CAAC,IAAI,CAAC,kCAAoB,CAAC,CAAA;IAC3C,CAAC,CAAC,CAAA;IAEF,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE;QACpF,kBAAkB,CAAC,GAAG,CAAC,yBAAgB,CAAC,MAAM,EAAE,EAAE,yBAAgB,CAAC,cAAc,EAAE,CAAC,CAAA;QACpF,kBAAkB,CAAC,GAAG,CAAC,gCAAuB,CAAC,MAAM,EAAE,EAAE,gCAAuB,CAAC,cAAc,EAAE,CAAC,CAAA;IACpG,CAAC,CAAC,CAAA;IAEF,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE;QACpF,kBAAkB,CAAC,GAAG,CACpB,0BAA0B,EAC1B,sBAAQ,CAAC,YAAY,CAAC,QAAQ,EAAE;YAC9B,KAAK,EAAE,CAAC,SAAS,EAAE,gDAAgD,CAAC;SACrE,CAAC,CACH,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import passport from 'koa-passport'\nimport { config } from '@things-factory/env'\nimport { setAccessTokenCookie } from '@things-factory/auth-base'\n\nconst SSOGoogleConfig = config.get('sso/google/config')\n\nimport { authGoogleMiddleware } from './middlewares'\nimport { authGoogleRouter, authGoogleWebhookRouter } from './router'\n\nif (SSOGoogleConfig) {\n process.on('bootstrap-collect-sso-middleware' as any, (_, ssoMiddlewares) => {\n ssoMiddlewares.push(authGoogleMiddleware)\n })\n\n process.on('bootstrap-module-domain-public-route' as any, (app, domainPublicRouter) => {\n domainPublicRouter.use(authGoogleRouter.routes(), authGoogleRouter.allowedMethods())\n domainPublicRouter.use(authGoogleWebhookRouter.routes(), authGoogleWebhookRouter.allowedMethods())\n })\n\n process.on('bootstrap-module-global-public-route' as any, (app, globalPublicRouter) => {\n globalPublicRouter.get(\n '/auth/signin-with-google',\n passport.authenticate('google', {\n scope: ['profile', 'https://www.googleapis.com/auth/userinfo.email']\n })\n )\n })\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export declare class AuthGoogleMutation {
2
+ subscribeGoogleUsers(context: ResolverContext): Promise<boolean>;
3
+ }
@@ -16,6 +16,7 @@ let AuthGoogleMutation = class AuthGoogleMutation {
16
16
  return true;
17
17
  }
18
18
  };
19
+ exports.AuthGoogleMutation = AuthGoogleMutation;
19
20
  tslib_1.__decorate([
20
21
  (0, type_graphql_1.Directive)('@transaction'),
21
22
  (0, type_graphql_1.Directive)('@privilege(superUserGranted:true)'),
@@ -25,8 +26,7 @@ tslib_1.__decorate([
25
26
  tslib_1.__metadata("design:paramtypes", [Object]),
26
27
  tslib_1.__metadata("design:returntype", Promise)
27
28
  ], AuthGoogleMutation.prototype, "subscribeGoogleUsers", null);
28
- AuthGoogleMutation = tslib_1.__decorate([
29
+ exports.AuthGoogleMutation = AuthGoogleMutation = tslib_1.__decorate([
29
30
  (0, type_graphql_1.Resolver)()
30
31
  ], AuthGoogleMutation);
31
- exports.AuthGoogleMutation = AuthGoogleMutation;
32
32
  //# sourceMappingURL=auth-google-mutation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth-google-mutation.js","sourceRoot":"","sources":["../../../server/service/auth-google/auth-google-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AAK/D,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,6BAA6B;IAC7B,kDAAkD;IAClD,gFAAgF;IAChF,oFAAoF;IACpF,6BAA6B;IAE7B,gBAAgB;IAChB,IAAI;IAKE,AAAN,KAAK,CAAC,oBAAoB,CAAQ,OAAwB;QACxD,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,OAAO,IAAI,CAAA;IACb,CAAC;CACF,CAAA;AALO;IAHL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,wBAAS,EAAC,mCAAmC,CAAC;IAC9C,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;IAC/C,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;8DAIhC;AAjBU,kBAAkB;IAD9B,IAAA,uBAAQ,GAAE;GACE,kBAAkB,CAkB9B;AAlBY,gDAAkB","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\n\nimport { syncAllUserInfo } from '../../controllers/sync-user-info'\n\n@Resolver()\nexport class AuthGoogleMutation {\n // @Directive('@transaction')\n // @Directive('@privilege(superUserGranted:true)')\n // @Mutation(returns => Boolean, { description: 'To synchronize google users' })\n // async synchronizeGoogleUsers(@Ctx() context: ResolverContext): Promise<boolean> {\n // syncAllUserInfo(context)\n\n // return true\n // }\n\n @Directive('@transaction')\n @Directive('@privilege(superUserGranted:true)')\n @Mutation(returns => Boolean, { description: 'To subscribe google users' })\n async subscribeGoogleUsers(@Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, user, tx } = context.state\n\n return true\n }\n}\n"]}
1
+ {"version":3,"file":"auth-google-mutation.js","sourceRoot":"","sources":["../../../server/service/auth-google/auth-google-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AAK/D,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,6BAA6B;IAC7B,kDAAkD;IAClD,gFAAgF;IAChF,oFAAoF;IACpF,6BAA6B;IAE7B,gBAAgB;IAChB,IAAI;IAKE,AAAN,KAAK,CAAC,oBAAoB,CAAQ,OAAwB;QACxD,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,OAAO,IAAI,CAAA;IACb,CAAC;CACF,CAAA;AAlBY,gDAAkB;AAavB;IAHL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,wBAAS,EAAC,mCAAmC,CAAC;IAC9C,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;IAC/C,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;8DAIhC;6BAjBU,kBAAkB;IAD9B,IAAA,uBAAQ,GAAE;GACE,kBAAkB,CAkB9B","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\n\nimport { syncAllUserInfo } from '../../controllers/sync-user-info'\n\n@Resolver()\nexport class AuthGoogleMutation {\n // @Directive('@transaction')\n // @Directive('@privilege(superUserGranted:true)')\n // @Mutation(returns => Boolean, { description: 'To synchronize google users' })\n // async synchronizeGoogleUsers(@Ctx() context: ResolverContext): Promise<boolean> {\n // syncAllUserInfo(context)\n\n // return true\n // }\n\n @Directive('@transaction')\n @Directive('@privilege(superUserGranted:true)')\n @Mutation(returns => Boolean, { description: 'To subscribe google users' })\n async subscribeGoogleUsers(@Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, user, tx } = context.state\n\n return true\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import { AuthGoogleMutation } from './auth-google-mutation';
2
+ export declare const resolvers: (typeof AuthGoogleMutation)[];
@@ -0,0 +1,5 @@
1
+ export declare const entities: any[];
2
+ export declare const subscribers: any[];
3
+ export declare const schema: {
4
+ resolverClasses: typeof import("./auth-google/auth-google-mutation").AuthGoogleMutation[];
5
+ };