@coinlist-co/react 0.12.2-rc.818bed6 → 0.12.2-rc.99b1bd5

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 (34) hide show
  1. package/README.md +10 -0
  2. package/dist/{chunk-OUFI3D3Q.js → chunk-IQAJ3L25.js} +173 -259
  3. package/dist/chunk-IQAJ3L25.js.map +1 -0
  4. package/dist/{chunk-2HCSM3FB.js → chunk-J45AY2FX.js} +10 -10
  5. package/dist/chunk-J45AY2FX.js.map +1 -0
  6. package/dist/{chunk-YMDYLYL3.js → chunk-M2TURNJH.js} +821 -801
  7. package/dist/chunk-M2TURNJH.js.map +1 -0
  8. package/dist/chunk-MJ6YXZWH.js +22 -0
  9. package/dist/chunk-MJ6YXZWH.js.map +1 -0
  10. package/dist/client/index.d.ts +2840 -5756
  11. package/dist/client/index.js +8254 -9600
  12. package/dist/client/index.js.map +1 -1
  13. package/dist/server/index.d.ts +4 -37
  14. package/dist/server/index.js +6 -4
  15. package/dist/server/index.js.map +1 -1
  16. package/dist/{time-DJU6E8KK.d.cts → time-DkU7jivQ.d.ts} +1913 -3256
  17. package/dist/{token-registry-snapshot-DGG5N27C.d.ts → token-registry-snapshot-D0OWXMe4.d.ts} +22 -58
  18. package/dist/universal/index.d.ts +80 -1080
  19. package/dist/universal/index.js +22 -50
  20. package/package.json +18 -14
  21. package/dist/chunk-2HCSM3FB.js.map +0 -1
  22. package/dist/chunk-OUFI3D3Q.js.map +0 -1
  23. package/dist/chunk-YMDYLYL3.js.map +0 -1
  24. package/dist/client/index.cjs +0 -20774
  25. package/dist/client/index.cjs.map +0 -1
  26. package/dist/client/index.d.cts +0 -8328
  27. package/dist/server/index.cjs +0 -4580
  28. package/dist/server/index.cjs.map +0 -1
  29. package/dist/server/index.d.cts +0 -385
  30. package/dist/time-DJU6E8KK.d.ts +0 -4052
  31. package/dist/token-registry-snapshot-B0xCp3GD.d.cts +0 -245
  32. package/dist/universal/index.cjs +0 -4625
  33. package/dist/universal/index.cjs.map +0 -1
  34. package/dist/universal/index.d.cts +0 -1376
@@ -0,0 +1,22 @@
1
+ // src/universal/types/oauth-session.ts
2
+ var ClientCredentialsOAuth = (value) => value;
3
+ var OAuthRefreshToken = (value) => value;
4
+ var OAuthSession = {
5
+ fromDto: (dto) => {
6
+ const expiresAt = new Date(Date.now() + dto.expires_in * 1e3);
7
+ return {
8
+ accessToken: {
9
+ value: dto.access_token,
10
+ expiresAt
11
+ },
12
+ ...dto.refresh_token != null && dto.refresh_token !== "" ? { refreshToken: OAuthRefreshToken(dto.refresh_token) } : void 0
13
+ };
14
+ }
15
+ };
16
+
17
+ export {
18
+ ClientCredentialsOAuth,
19
+ OAuthRefreshToken,
20
+ OAuthSession
21
+ };
22
+ //# sourceMappingURL=chunk-MJ6YXZWH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/universal/types/oauth-session.ts"],"sourcesContent":["import type { OAuthSessionDto } from '@/universal/types/dto/oauth-session';\nimport type { Newtype } from '@/universal/types/newtype';\n\nexport type ClientCredentialsOAuth = Newtype<\n OAuthAccessToken,\n 'ClientCredentialsOAuth'\n>;\nexport const ClientCredentialsOAuth = (value: OAuthAccessToken) =>\n value as ClientCredentialsOAuth;\n\nexport type OAuthAccessToken = {\n value: string;\n expiresAt: Date;\n};\n\nexport type OAuthRefreshToken = Newtype<string, 'OAuthRefreshToken'>;\nexport const OAuthRefreshToken = (value: string) => value as OAuthRefreshToken;\n\nexport type OAuthSession = {\n accessToken: OAuthAccessToken;\n refreshToken?: OAuthRefreshToken;\n};\n\n/** @internal */\nexport const OAuthSession = {\n fromDto: (dto: OAuthSessionDto): OAuthSession => {\n const expiresAt = new Date(Date.now() + dto.expires_in * 1000);\n return {\n accessToken: {\n value: dto.access_token,\n expiresAt,\n },\n ...(dto.refresh_token != null && dto.refresh_token !== ''\n ? { refreshToken: OAuthRefreshToken(dto.refresh_token) }\n : undefined),\n };\n },\n};\n"],"mappings":";AAOO,IAAM,yBAAyB,CAAC,UACrC;AAQK,IAAM,oBAAoB,CAAC,UAAkB;AAQ7C,IAAM,eAAe;AAAA,EAC1B,SAAS,CAAC,QAAuC;AAC/C,UAAM,YAAY,IAAI,KAAK,KAAK,IAAI,IAAI,IAAI,aAAa,GAAI;AAC7D,WAAO;AAAA,MACL,aAAa;AAAA,QACX,OAAO,IAAI;AAAA,QACX;AAAA,MACF;AAAA,MACA,GAAI,IAAI,iBAAiB,QAAQ,IAAI,kBAAkB,KACnD,EAAE,cAAc,kBAAkB,IAAI,aAAa,EAAE,IACrD;AAAA,IACN;AAAA,EACF;AACF;","names":[]}