cilantro-sdk 0.0.44 → 0.0.46

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 (86) hide show
  1. package/README.md +11 -9
  2. package/dist/api/admin/admin.d.ts +7 -5
  3. package/dist/api/admin/admin.d.ts.map +1 -1
  4. package/dist/api/auth/auth.d.ts +7 -1
  5. package/dist/api/auth/auth.d.ts.map +1 -1
  6. package/dist/api/platforms/platforms.d.ts +5 -5
  7. package/dist/api/platforms/platforms.d.ts.map +1 -1
  8. package/dist/auth.cjs +115 -21
  9. package/dist/auth.cjs.map +4 -4
  10. package/dist/auth.d.ts +100 -3
  11. package/dist/auth.d.ts.map +1 -1
  12. package/dist/auth.mjs +110 -21
  13. package/dist/auth.mjs.map +4 -4
  14. package/dist/index.cjs +117 -26
  15. package/dist/index.cjs.map +3 -3
  16. package/dist/index.mjs +117 -26
  17. package/dist/index.mjs.map +3 -3
  18. package/dist/models/adminControllerFindAllUsersParams.d.ts +18 -0
  19. package/dist/models/adminControllerFindAllUsersParams.d.ts.map +1 -0
  20. package/dist/models/adminControllerFindAllWalletsParams.d.ts +18 -0
  21. package/dist/models/adminControllerFindAllWalletsParams.d.ts.map +1 -0
  22. package/dist/models/adminControllerFindWalletsByUserIdParams.d.ts +18 -0
  23. package/dist/models/adminControllerFindWalletsByUserIdParams.d.ts.map +1 -0
  24. package/dist/models/adminControllerGetAllApiKeysParams.d.ts +18 -0
  25. package/dist/models/adminControllerGetAllApiKeysParams.d.ts.map +1 -0
  26. package/dist/models/adminControllerGetWalletAssetsByWalletIdAssetType.d.ts +14 -0
  27. package/dist/models/adminControllerGetWalletAssetsByWalletIdAssetType.d.ts.map +1 -0
  28. package/dist/models/adminControllerGetWalletAssetsByWalletIdParams.d.ts +15 -0
  29. package/dist/models/adminControllerGetWalletAssetsByWalletIdParams.d.ts.map +1 -0
  30. package/dist/models/authControllerDiscordCallbackGetParams.d.ts +12 -0
  31. package/dist/models/authControllerDiscordCallbackGetParams.d.ts.map +1 -0
  32. package/dist/models/authControllerGetDiscordAuthorizeUrl200.d.ts +11 -0
  33. package/dist/models/authControllerGetDiscordAuthorizeUrl200.d.ts.map +1 -0
  34. package/dist/models/authControllerGetDiscordAuthorizeUrlParams.d.ts +12 -0
  35. package/dist/models/authControllerGetDiscordAuthorizeUrlParams.d.ts.map +1 -0
  36. package/dist/models/discordCallbackDto.d.ts +16 -0
  37. package/dist/models/discordCallbackDto.d.ts.map +1 -0
  38. package/dist/models/index.d.ts +19 -0
  39. package/dist/models/index.d.ts.map +1 -1
  40. package/dist/models/loginResponseDataDto.d.ts +11 -2
  41. package/dist/models/loginResponseDataDto.d.ts.map +1 -1
  42. package/dist/models/loginResponseDataDtoUser.d.ts +3 -0
  43. package/dist/models/loginResponseDataDtoUser.d.ts.map +1 -1
  44. package/dist/models/loginResponseDataDtoUserType.d.ts +3 -0
  45. package/dist/models/loginResponseDataDtoUserType.d.ts.map +1 -1
  46. package/dist/models/loginResponseDto.d.ts +0 -1
  47. package/dist/models/loginResponseDto.d.ts.map +1 -1
  48. package/dist/models/platformApiKeysListResponseDto.d.ts +3 -0
  49. package/dist/models/platformApiKeysListResponseDto.d.ts.map +1 -1
  50. package/dist/models/platformApiKeysListResponseDtoMeta.d.ts +14 -0
  51. package/dist/models/platformApiKeysListResponseDtoMeta.d.ts.map +1 -0
  52. package/dist/models/platformControllerFindAllParams.d.ts +18 -0
  53. package/dist/models/platformControllerFindAllParams.d.ts.map +1 -0
  54. package/dist/models/platformControllerGetSubscriptionsForPlatformParams.d.ts +18 -0
  55. package/dist/models/platformControllerGetSubscriptionsForPlatformParams.d.ts.map +1 -0
  56. package/dist/models/platformControllerGetUsersForPlatformParams.d.ts +18 -0
  57. package/dist/models/platformControllerGetUsersForPlatformParams.d.ts.map +1 -0
  58. package/dist/models/platformControllerGetWalletsForPlatformParams.d.ts +18 -0
  59. package/dist/models/platformControllerGetWalletsForPlatformParams.d.ts.map +1 -0
  60. package/dist/models/socialLoginDto.d.ts +4 -2
  61. package/dist/models/socialLoginDto.d.ts.map +1 -1
  62. package/dist/models/socialLoginDtoProvider.d.ts +1 -0
  63. package/dist/models/socialLoginDtoProvider.d.ts.map +1 -1
  64. package/dist/models/subscriptionsListResponseDto.d.ts +3 -0
  65. package/dist/models/subscriptionsListResponseDto.d.ts.map +1 -1
  66. package/dist/models/subscriptionsListResponseDtoMeta.d.ts +14 -0
  67. package/dist/models/subscriptionsListResponseDtoMeta.d.ts.map +1 -0
  68. package/dist/models/tokenResponseDataDto.d.ts +18 -0
  69. package/dist/models/tokenResponseDataDto.d.ts.map +1 -0
  70. package/dist/models/tokenResponseDto.d.ts +3 -8
  71. package/dist/models/tokenResponseDto.d.ts.map +1 -1
  72. package/dist/models/usersListResponseDto.d.ts +3 -0
  73. package/dist/models/usersListResponseDto.d.ts.map +1 -1
  74. package/dist/models/usersListResponseDtoMeta.d.ts +14 -0
  75. package/dist/models/usersListResponseDtoMeta.d.ts.map +1 -0
  76. package/dist/models/walletsListResponseDto.d.ts +3 -0
  77. package/dist/models/walletsListResponseDto.d.ts.map +1 -1
  78. package/dist/models/walletsListResponseDtoMeta.d.ts +14 -0
  79. package/dist/models/walletsListResponseDtoMeta.d.ts.map +1 -0
  80. package/dist/platform.cjs +8 -8
  81. package/dist/platform.cjs.map +2 -2
  82. package/dist/platform.d.ts +4 -4
  83. package/dist/platform.d.ts.map +1 -1
  84. package/dist/platform.mjs +8 -8
  85. package/dist/platform.mjs.map +2 -2
  86. package/package.json +4 -2
package/README.md CHANGED
@@ -94,8 +94,8 @@ const authResult = await login({
94
94
  password: 'password123'
95
95
  });
96
96
 
97
- // Manually set authentication
98
- setAuth({ jwt: authResult.data.jwt });
97
+ // Manually set authentication (API returns accessToken)
98
+ setAuth({ jwt: authResult.data.accessToken });
99
99
 
100
100
  // Make authenticated requests
101
101
  const result = await sendSOL('wallet-id', {
@@ -310,14 +310,15 @@ configure({
310
310
  });
311
311
  ```
312
312
 
313
- ### `setAuth(auth: { jwt?: string; apiKey?: string }): void`
313
+ ### `setAuth(auth: { jwt?: string; apiKey?: string; platformApiKey?: string }): void`
314
314
 
315
- Update authentication credentials after initialization. Useful when credentials change (e.g., after login or token refresh).
315
+ Update authentication credentials after initialization. Useful when credentials change (e.g., after login or token refresh). The API key is set from `apiKey` or `platformApiKey` (whichever is provided).
316
316
 
317
317
  **Parameters:**
318
318
  - `auth` (`object`): Authentication credentials
319
- - `jwt?` (`string`): JWT token to set
319
+ - `jwt?` (`string`): JWT access token to set (from login/social/Discord)
320
320
  - `apiKey?` (`string`): API key to set
321
+ - `platformApiKey?` (`string`): Platform API key (alternative to `apiKey`)
321
322
 
322
323
  **Returns:** `void`
323
324
 
@@ -332,7 +333,7 @@ const result = await login({
332
333
  password: 'password123'
333
334
  });
334
335
 
335
- setAuth({ jwt: result.data.jwt });
336
+ setAuth({ jwt: result.data.accessToken });
336
337
  ```
337
338
 
338
339
  ### `clearAuth(): void`
@@ -429,14 +430,15 @@ configure({
429
430
  });
430
431
  ```
431
432
 
432
- #### `setAuth(auth: { jwt?: string; apiKey?: string }): void`
433
+ #### `setAuth(auth: { jwt?: string; apiKey?: string; platformApiKey?: string }): void`
433
434
 
434
- Update authentication credentials after initialization.
435
+ Update authentication credentials after initialization. API key is set from `apiKey` or `platformApiKey`.
435
436
 
436
437
  **Parameters:**
437
438
  - `auth` (`object`): Authentication credentials
438
- - `jwt?` (`string`): JWT token
439
+ - `jwt?` (`string`): JWT access token
439
440
  - `apiKey?` (`string`): API key
441
+ - `platformApiKey?` (`string`): Platform API key (alternative to `apiKey`)
440
442
 
441
443
  **Returns:** `void`
442
444
 
@@ -5,14 +5,14 @@
5
5
  * API documentation for Cilantro Smart API - A Solana wallet management system
6
6
  * OpenAPI spec version: 1.0
7
7
  */
8
- import type { AdminControllerFindAllParams, AdminControllerFindAllPlatformsParams, AdminControllerGetPlatformActivityTimelineParams, AdminControllerGetPlatformGrowthTrendsParams, AdminControllerGetPlatformsWithUsersParams, AdminControllerGetTopPlatformsParams, AdminControllerGetUsersWithWalletsParams, AdminControllerGetWalletAssetsParams, AdminCurrentResponseDto, AdminResponseDto, AdminsListResponseDto, AnalyticsOverviewResponseDto, CreateAdminDto, PlatformActivityTimelineResponseDto, PlatformAnalyticsResponseDto, PlatformApiKeyResponseDto, PlatformApiKeysListResponseDto, PlatformGrowthTrendsResponseDto, PlatformPaginatedResponseDto, PlatformResponseDto, PlatformUsageMetricsResponseDto, PlatformWithUsersResponseDto, RecentActivityResponseDto, TopPlatformsResponseDto, UpdateAdminDto, UpdatePlatformDto, UserResponseDto, UserWithWalletsResponseDto, UsersListResponseDto, WalletAnalyticsResponseDto, WalletAssetsListResponseDto, WalletSuccessResponseDto, WalletsListResponseDto } from "../../models";
8
+ import type { AdminControllerFindAllParams, AdminControllerFindAllPlatformsParams, AdminControllerFindAllUsersParams, AdminControllerFindAllWalletsParams, AdminControllerFindWalletsByUserIdParams, AdminControllerGetAllApiKeysParams, AdminControllerGetPlatformActivityTimelineParams, AdminControllerGetPlatformGrowthTrendsParams, AdminControllerGetPlatformsWithUsersParams, AdminControllerGetTopPlatformsParams, AdminControllerGetUsersWithWalletsParams, AdminControllerGetWalletAssetsByWalletIdParams, AdminControllerGetWalletAssetsParams, AdminCurrentResponseDto, AdminResponseDto, AdminsListResponseDto, AnalyticsOverviewResponseDto, CreateAdminDto, PlatformActivityTimelineResponseDto, PlatformAnalyticsResponseDto, PlatformApiKeyResponseDto, PlatformApiKeysListResponseDto, PlatformGrowthTrendsResponseDto, PlatformPaginatedResponseDto, PlatformResponseDto, PlatformUsageMetricsResponseDto, PlatformWithUsersResponseDto, RecentActivityResponseDto, TopPlatformsResponseDto, UpdateAdminDto, UpdatePlatformDto, UserResponseDto, UserWithWalletsResponseDto, UsersListResponseDto, WalletAnalyticsResponseDto, WalletAssetsListResponseDto, WalletAssetsResponseDto, WalletSuccessResponseDto, WalletsListResponseDto } from "../../models";
9
9
  import { customInstance } from "../../api-client";
10
10
  type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
11
11
  export declare const getAdmin: () => {
12
12
  adminControllerCreate: (createAdminDto: CreateAdminDto, options?: SecondParameter<typeof customInstance<AdminResponseDto>>) => Promise<AdminResponseDto>;
13
13
  adminControllerFindAll: (params?: AdminControllerFindAllParams, options?: SecondParameter<typeof customInstance<AdminsListResponseDto>>) => Promise<AdminsListResponseDto>;
14
14
  adminControllerGetCurrentAdmin: (options?: SecondParameter<typeof customInstance<AdminCurrentResponseDto>>) => Promise<AdminCurrentResponseDto>;
15
- adminControllerGetAllApiKeys: (options?: SecondParameter<typeof customInstance<PlatformApiKeysListResponseDto>>) => Promise<PlatformApiKeysListResponseDto>;
15
+ adminControllerGetAllApiKeys: (params?: AdminControllerGetAllApiKeysParams, options?: SecondParameter<typeof customInstance<PlatformApiKeysListResponseDto>>) => Promise<PlatformApiKeysListResponseDto>;
16
16
  adminControllerGetplatformApiKey: (platformId: string, options?: SecondParameter<typeof customInstance<PlatformApiKeyResponseDto>>) => Promise<PlatformApiKeyResponseDto>;
17
17
  adminControllerFindOne: (id: string, options?: SecondParameter<typeof customInstance<AdminResponseDto>>) => Promise<AdminResponseDto>;
18
18
  adminControllerUpdate: (id: string, updateAdminDto: UpdateAdminDto, options?: SecondParameter<typeof customInstance<AdminResponseDto>>) => Promise<AdminResponseDto>;
@@ -22,10 +22,11 @@ export declare const getAdmin: () => {
22
22
  adminControllerFindOnePlatform: (id: string, options?: SecondParameter<typeof customInstance<PlatformResponseDto>>) => Promise<PlatformResponseDto>;
23
23
  adminControllerUpdatePlatform: (id: string, updatePlatformDto: UpdatePlatformDto, options?: SecondParameter<typeof customInstance<PlatformResponseDto>>) => Promise<PlatformResponseDto>;
24
24
  adminControllerRemovePlatform: (id: string, options?: SecondParameter<typeof customInstance<PlatformResponseDto>>) => Promise<PlatformResponseDto>;
25
- adminControllerFindAllUsers: (options?: SecondParameter<typeof customInstance<UsersListResponseDto>>) => Promise<UsersListResponseDto>;
25
+ adminControllerFindAllUsers: (params?: AdminControllerFindAllUsersParams, options?: SecondParameter<typeof customInstance<UsersListResponseDto>>) => Promise<UsersListResponseDto>;
26
26
  adminControllerFindOneUser: (id: string, options?: SecondParameter<typeof customInstance<UserResponseDto>>) => Promise<UserResponseDto>;
27
- adminControllerFindAllWallets: (options?: SecondParameter<typeof customInstance<WalletsListResponseDto>>) => Promise<WalletsListResponseDto>;
28
- adminControllerFindWalletsByUserId: (userId: string, options?: SecondParameter<typeof customInstance<WalletsListResponseDto>>) => Promise<WalletsListResponseDto>;
27
+ adminControllerFindAllWallets: (params?: AdminControllerFindAllWalletsParams, options?: SecondParameter<typeof customInstance<WalletsListResponseDto>>) => Promise<WalletsListResponseDto>;
28
+ adminControllerFindWalletsByUserId: (userId: string, params?: AdminControllerFindWalletsByUserIdParams, options?: SecondParameter<typeof customInstance<WalletsListResponseDto>>) => Promise<WalletsListResponseDto>;
29
+ adminControllerGetWalletAssetsByWalletId: (id: string, params?: AdminControllerGetWalletAssetsByWalletIdParams, options?: SecondParameter<typeof customInstance<WalletAssetsResponseDto>>) => Promise<WalletAssetsResponseDto>;
29
30
  adminControllerFindOneWallet: (id: string, options?: SecondParameter<typeof customInstance<WalletSuccessResponseDto>>) => Promise<WalletSuccessResponseDto>;
30
31
  adminControllerGetOverviewAnalytics: (options?: SecondParameter<typeof customInstance<AnalyticsOverviewResponseDto>>) => Promise<AnalyticsOverviewResponseDto>;
31
32
  adminControllerGetWalletAnalytics: (options?: SecondParameter<typeof customInstance<WalletAnalyticsResponseDto>>) => Promise<WalletAnalyticsResponseDto>;
@@ -57,6 +58,7 @@ export type AdminControllerFindAllUsersResult = NonNullable<Awaited<ReturnType<R
57
58
  export type AdminControllerFindOneUserResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getAdmin>["adminControllerFindOneUser"]>>>;
58
59
  export type AdminControllerFindAllWalletsResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getAdmin>["adminControllerFindAllWallets"]>>>;
59
60
  export type AdminControllerFindWalletsByUserIdResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getAdmin>["adminControllerFindWalletsByUserId"]>>>;
61
+ export type AdminControllerGetWalletAssetsByWalletIdResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getAdmin>["adminControllerGetWalletAssetsByWalletId"]>>>;
60
62
  export type AdminControllerFindOneWalletResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getAdmin>["adminControllerFindOneWallet"]>>>;
61
63
  export type AdminControllerGetOverviewAnalyticsResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getAdmin>["adminControllerGetOverviewAnalytics"]>>>;
62
64
  export type AdminControllerGetWalletAnalyticsResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getAdmin>["adminControllerGetWalletAnalytics"]>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../../src/api/admin/admin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EACV,4BAA4B,EAC5B,qCAAqC,EACrC,gDAAgD,EAChD,4CAA4C,EAC5C,0CAA0C,EAC1C,oCAAoC,EACpC,wCAAwC,EACxC,oCAAoC,EACpC,uBAAuB,EACvB,gBAAgB,EAChB,qBAAqB,EACrB,4BAA4B,EAC5B,cAAc,EACd,mCAAmC,EACnC,4BAA4B,EAC5B,yBAAyB,EACzB,8BAA8B,EAC9B,+BAA+B,EAC/B,4BAA4B,EAC5B,mBAAmB,EACnB,+BAA+B,EAC/B,4BAA4B,EAC5B,yBAAyB,EACzB,uBAAuB,EACvB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,0BAA0B,EAC1B,oBAAoB,EACpB,0BAA0B,EAC1B,2BAA2B,EAC3B,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,KAAK,eAAe,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK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M,4CAA4C,GAAG,WAAW,CACpE,OAAO,CACL,UAAU,CACR,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC,wCAAwC,CAAC,CACtE,CACF,CACF,CAAC;AACF,MAAM,MAAM,oCAAoC,GAAG,WAAW,CAC5D,OAAO,CACL,UAAU,CAAC,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC,gCAAgC,CAAC,CAAC,CAC1E,CACF,CAAC;AACF,MAAM,MAAM,gDAAgD,GAAG,WAAW,CACxE,OAAO,CACL,UAAU,CACR,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC,4CAA4C,CAAC,CAC1E,CACF,CACF,CAAC"}
@@ -5,11 +5,14 @@
5
5
  * API documentation for Cilantro Smart API - A Solana wallet management system
6
6
  * OpenAPI spec version: 1.0
7
7
  */
8
- import type { AuthSuccessResponseDto, CommonLoginDto, LoginResponseDto, PasswordResetConfirmDto, PasswordResetRequestDto, RefreshTokenDto, SocialLoginDto, TokenResponseDto, VerifyEmailDto } from "../../models";
8
+ import type { AuthControllerDiscordCallbackGetParams, AuthControllerGetDiscordAuthorizeUrl200, AuthControllerGetDiscordAuthorizeUrlParams, AuthSuccessResponseDto, CommonLoginDto, DiscordCallbackDto, LoginResponseDto, PasswordResetConfirmDto, PasswordResetRequestDto, RefreshTokenDto, SocialLoginDto, TokenResponseDto, VerifyEmailDto } from "../../models";
9
9
  import { customInstance } from "../../api-client";
10
10
  type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
11
11
  export declare const getAuth: () => {
12
12
  authControllerLogin: (commonLoginDto: CommonLoginDto, options?: SecondParameter<typeof customInstance<LoginResponseDto>>) => Promise<LoginResponseDto>;
13
+ authControllerGetDiscordAuthorizeUrl: (params: AuthControllerGetDiscordAuthorizeUrlParams, options?: SecondParameter<typeof customInstance<AuthControllerGetDiscordAuthorizeUrl200>>) => Promise<AuthControllerGetDiscordAuthorizeUrl200>;
14
+ authControllerDiscordCallbackGet: (params: AuthControllerDiscordCallbackGetParams, options?: SecondParameter<typeof customInstance<void>>) => Promise<void>;
15
+ authControllerDiscordCallback: (discordCallbackDto: DiscordCallbackDto, options?: SecondParameter<typeof customInstance<LoginResponseDto>>) => Promise<LoginResponseDto>;
13
16
  authControllerSocialLogin: (socialLoginDto: SocialLoginDto, options?: SecondParameter<typeof customInstance<LoginResponseDto>>) => Promise<LoginResponseDto>;
14
17
  authControllerRefreshToken: (refreshTokenDto: RefreshTokenDto, options?: SecondParameter<typeof customInstance<TokenResponseDto>>) => Promise<TokenResponseDto>;
15
18
  authControllerLogout: (refreshTokenDto: RefreshTokenDto, options?: SecondParameter<typeof customInstance<AuthSuccessResponseDto>>) => Promise<AuthSuccessResponseDto>;
@@ -19,6 +22,9 @@ export declare const getAuth: () => {
19
22
  authControllerResendVerification: (passwordResetRequestDto: PasswordResetRequestDto, options?: SecondParameter<typeof customInstance<AuthSuccessResponseDto>>) => Promise<AuthSuccessResponseDto>;
20
23
  };
21
24
  export type AuthControllerLoginResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getAuth>["authControllerLogin"]>>>;
25
+ export type AuthControllerGetDiscordAuthorizeUrlResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getAuth>["authControllerGetDiscordAuthorizeUrl"]>>>;
26
+ export type AuthControllerDiscordCallbackGetResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getAuth>["authControllerDiscordCallbackGet"]>>>;
27
+ export type AuthControllerDiscordCallbackResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getAuth>["authControllerDiscordCallback"]>>>;
22
28
  export type AuthControllerSocialLoginResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getAuth>["authControllerSocialLogin"]>>>;
23
29
  export type AuthControllerRefreshTokenResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getAuth>["authControllerRefreshToken"]>>>;
24
30
  export type AuthControllerLogoutResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getAuth>["authControllerLogout"]>>>;
@@ -1 +1 @@
1
- {"version":3,"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C;AACF,MAAM,MAAM,sCAAsC,GAAG,WAAW,CAC9D,OAAO,CACL,UAAU,CAAC,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,kCAAkC,CAAC,CAAC,CAC3E,CACF,CAAC"}
@@ -5,25 +5,25 @@
5
5
  * API documentation for Cilantro Smart API - A Solana wallet management system
6
6
  * OpenAPI spec version: 1.0
7
7
  */
8
- import type { AuthSuccessResponseDto, CancelSubscriptionDto, ChangePasswordDto, ConfirmPaymentDto, CreatePlatformDto, CreateUserDto, DowngradeSubscriptionDto, LinkPaymentDto, PaymentHistoryResponseDto, PlatformCreatedResponseDto, PlatformResponseDto, PlatformsListResponseDto, RenewSubscriptionDto, SubscriptionHistoryResponseDto, SubscriptionResponseDto, SubscriptionsListResponseDto, UpdatePlatformDto, UpdateUserDto, UpgradeSubscriptionDto, UserResponseDto, UsersListResponseDto, WalletsListResponseDto } from "../../models";
8
+ import type { AuthSuccessResponseDto, CancelSubscriptionDto, ChangePasswordDto, ConfirmPaymentDto, CreatePlatformDto, CreateUserDto, DowngradeSubscriptionDto, LinkPaymentDto, PaymentHistoryResponseDto, PlatformControllerFindAllParams, PlatformControllerGetSubscriptionsForPlatformParams, PlatformControllerGetUsersForPlatformParams, PlatformControllerGetWalletsForPlatformParams, PlatformCreatedResponseDto, PlatformResponseDto, PlatformsListResponseDto, RenewSubscriptionDto, SubscriptionHistoryResponseDto, SubscriptionResponseDto, SubscriptionsListResponseDto, UpdatePlatformDto, UpdateUserDto, UpgradeSubscriptionDto, UserResponseDto, UsersListResponseDto, WalletsListResponseDto } from "../../models";
9
9
  import { customInstance } from "../../api-client";
10
10
  type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
11
11
  export declare const getPlatforms: () => {
12
12
  platformControllerCreate: (createPlatformDto: CreatePlatformDto, options?: SecondParameter<typeof customInstance<PlatformCreatedResponseDto>>) => Promise<PlatformCreatedResponseDto>;
13
- platformControllerFindAll: (options?: SecondParameter<typeof customInstance<PlatformsListResponseDto>>) => Promise<PlatformsListResponseDto>;
13
+ platformControllerFindAll: (params?: PlatformControllerFindAllParams, options?: SecondParameter<typeof customInstance<PlatformsListResponseDto>>) => Promise<PlatformsListResponseDto>;
14
14
  platformControllerGetOwnProfile: (options?: SecondParameter<typeof customInstance<PlatformResponseDto>>) => Promise<PlatformResponseDto>;
15
15
  platformControllerUpdateOwnProfile: (updatePlatformDto: UpdatePlatformDto, options?: SecondParameter<typeof customInstance<PlatformResponseDto>>) => Promise<PlatformResponseDto>;
16
16
  platformControllerChangePassword: (changePasswordDto: ChangePasswordDto, options?: SecondParameter<typeof customInstance<AuthSuccessResponseDto>>) => Promise<AuthSuccessResponseDto>;
17
17
  platformControllerFindOne: (id: string, options?: SecondParameter<typeof customInstance<PlatformResponseDto>>) => Promise<PlatformResponseDto>;
18
18
  platformControllerUpdate: (id: string, updatePlatformDto: UpdatePlatformDto, options?: SecondParameter<typeof customInstance<PlatformResponseDto>>) => Promise<PlatformResponseDto>;
19
19
  platformControllerRemove: (id: string, options?: SecondParameter<typeof customInstance<PlatformResponseDto>>) => Promise<PlatformResponseDto>;
20
- platformControllerGetUsersForPlatform: (options?: SecondParameter<typeof customInstance<UsersListResponseDto>>) => Promise<UsersListResponseDto>;
20
+ platformControllerGetUsersForPlatform: (params?: PlatformControllerGetUsersForPlatformParams, options?: SecondParameter<typeof customInstance<UsersListResponseDto>>) => Promise<UsersListResponseDto>;
21
21
  platformControllerCreateUserForPlatform: (createUserDto: CreateUserDto, options?: SecondParameter<typeof customInstance<UserResponseDto>>) => Promise<UserResponseDto>;
22
22
  platformControllerUpdateUserForPlatform: (userId: string, updateUserDto: UpdateUserDto, options?: SecondParameter<typeof customInstance<UserResponseDto>>) => Promise<UserResponseDto>;
23
23
  platformControllerRemoveUserForPlatform: (userId: string, options?: SecondParameter<typeof customInstance<UserResponseDto>>) => Promise<UserResponseDto>;
24
24
  platformControllerToggleUserActiveForPlatform: (userId: string, options?: SecondParameter<typeof customInstance<UserResponseDto>>) => Promise<UserResponseDto>;
25
- platformControllerGetWalletsForPlatform: (options?: SecondParameter<typeof customInstance<WalletsListResponseDto>>) => Promise<WalletsListResponseDto>;
26
- platformControllerGetSubscriptionsForPlatform: (options?: SecondParameter<typeof customInstance<SubscriptionsListResponseDto>>) => Promise<SubscriptionsListResponseDto>;
25
+ platformControllerGetWalletsForPlatform: (params?: PlatformControllerGetWalletsForPlatformParams, options?: SecondParameter<typeof customInstance<WalletsListResponseDto>>) => Promise<WalletsListResponseDto>;
26
+ platformControllerGetSubscriptionsForPlatform: (params?: PlatformControllerGetSubscriptionsForPlatformParams, options?: SecondParameter<typeof customInstance<SubscriptionsListResponseDto>>) => Promise<SubscriptionsListResponseDto>;
27
27
  platformControllerGetSubscriptionById: (subscriptionId: string, options?: SecondParameter<typeof customInstance<SubscriptionResponseDto>>) => Promise<SubscriptionResponseDto>;
28
28
  platformControllerRenewSubscription: (subscriptionId: string, renewSubscriptionDto: RenewSubscriptionDto, options?: SecondParameter<typeof customInstance<SubscriptionResponseDto>>) => Promise<SubscriptionResponseDto>;
29
29
  platformControllerUpgradeSubscription: (subscriptionId: string, upgradeSubscriptionDto: UpgradeSubscriptionDto, options?: SecondParameter<typeof customInstance<SubscriptionResponseDto>>) => Promise<SubscriptionResponseDto>;
@@ -1 +1 @@
1
- {"version":3,"file":"platforms.d.ts","sourceRoot":"","sources":["../../../src/api/platforms/platforms.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,wBAAwB,EACxB,cAAc,EACd,yBAAyB,EACzB,0BAA0B,EAC1B,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,8BAA8B,EAC9B,uBAAuB,EACvB,4BAA4B,EAC5B,iBAAiB,EACjB,aAAa,EACb,sBAAsB,EACtB,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACvB,MA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,GAAG,WAAW,CAC9D,OAAO,CACL,UAAU,CACR,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,kCAAkC,CAAC,CACpE,CACF,CACF,CAAC;AACF,MAAM,MAAM,mCAAmC,GAAG,WAAW,CAC3D,OAAO,CACL,UAAU,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAC7E,CACF,CAAC;AACF,MAAM,MAAM,yCAAyC,GAAG,WAAW,CACjE,OAAO,CACL,UAAU,CACR,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,qCAAqC,CAAC,CACvE,CACF,CACF,CAAC"}
1
+ {"version":3,"file":"platforms.d.ts","sourceRoot":"","sources":["../../../src/api/platforms/platforms.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,wBAAwB,EACxB,cAAc,EACd,yBAAyB,EACzB,+BAA+B,EAC/B,mDAAmD,EACnD,2CAA2C,EAC3C,6CAA6C,EAC7C,0BAA0B,EAC1B,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,8BAA8B,EAC9B,uBAAuB,EACvB,4BAA4B,EAC5B,iBAAiB,EACjB,aAAa,EACb,sBAAsB,EACtB,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,KAAK,eAAe,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,OAAO,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/E,eAAO,MAAM,YAAY;kDAMF,iBAAiB,YAC1B,eAAe,CACvB,OAAO,cAAc,CAAC,0BAA0B,CAAC,CAClD;yCAiBQ,+BAA+B,YAC9B,eAAe,CAAC,OAAO,cAAc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AG,WAAW,CACjE,OAAO,CACL,UAAU,CACR,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,qCAAqC,CAAC,CACvE,CACF,CACF,CAAC"}
package/dist/auth.cjs CHANGED
@@ -31,16 +31,18 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var auth_exports = {};
32
32
  __export(auth_exports, {
33
33
  SocialLoginDtoProvider: () => SocialLoginDtoProvider,
34
+ discordCallback: () => discordCallback,
35
+ discordCallbackAndSetAuth: () => discordCallbackAndSetAuth,
36
+ getDiscordAuthorizeUrl: () => getDiscordAuthorizeUrl,
37
+ getTokensFromFragment: () => getTokensFromFragment,
34
38
  login: () => login,
35
39
  loginAndSetAuth: () => loginAndSetAuth,
40
+ setAuthFromFragment: () => setAuthFromFragment,
36
41
  socialLogin: () => socialLogin,
37
42
  socialLoginAndSetAuth: () => socialLoginAndSetAuth
38
43
  });
39
44
  module.exports = __toCommonJS(auth_exports);
40
45
 
41
- // src/api-client.ts
42
- var import_axios = __toESM(require("axios"));
43
-
44
46
  // src/config.ts
45
47
  var GLOBAL_CONFIG_KEY = "__CILANTRO_SDK_CONFIG__";
46
48
  function getGlobalConfig() {
@@ -62,12 +64,12 @@ function getGlobalConfig() {
62
64
  return defaultConfig;
63
65
  }
64
66
  var currentConfig = getGlobalConfig();
65
- function setAuth(auth) {
67
+ function setAuth(auth2) {
66
68
  currentConfig = getGlobalConfig();
67
- if (auth.jwt !== void 0) {
68
- currentConfig.jwt = auth.jwt;
69
+ if (auth2.jwt !== void 0) {
70
+ currentConfig.jwt = auth2.jwt;
69
71
  }
70
- currentConfig.apiKey = auth.apiKey ?? auth.platformApiKey;
72
+ currentConfig.apiKey = auth2.apiKey ?? auth2.platformApiKey;
71
73
  if (typeof globalThis !== "undefined") {
72
74
  globalThis.__CILANTRO_SDK_CONFIG__ = currentConfig;
73
75
  } else if (typeof globalThis.window !== "undefined") {
@@ -80,6 +82,7 @@ function getConfig() {
80
82
  }
81
83
 
82
84
  // src/api-client.ts
85
+ var import_axios = __toESM(require("axios"));
83
86
  var axiosInstance = import_axios.default.create();
84
87
  axiosInstance.interceptors.request.use(
85
88
  (config) => {
@@ -112,7 +115,7 @@ var customInstance = (config, options) => {
112
115
 
113
116
  // src/api/auth/auth.ts
114
117
  var getAuth = () => {
115
- const authControllerLogin2 = (commonLoginDto, options) => {
118
+ const authControllerLogin = (commonLoginDto, options) => {
116
119
  return customInstance(
117
120
  {
118
121
  url: `/auth/login`,
@@ -123,7 +126,30 @@ var getAuth = () => {
123
126
  options
124
127
  );
125
128
  };
126
- const authControllerSocialLogin2 = (socialLoginDto, options) => {
129
+ const authControllerGetDiscordAuthorizeUrl = (params, options) => {
130
+ return customInstance(
131
+ { url: `/auth/discord/authorize`, method: "GET", params },
132
+ options
133
+ );
134
+ };
135
+ const authControllerDiscordCallbackGet = (params, options) => {
136
+ return customInstance(
137
+ { url: `/auth/discord/callback`, method: "GET", params },
138
+ options
139
+ );
140
+ };
141
+ const authControllerDiscordCallback = (discordCallbackDto, options) => {
142
+ return customInstance(
143
+ {
144
+ url: `/auth/social/discord/callback`,
145
+ method: "POST",
146
+ headers: { "Content-Type": "application/json" },
147
+ data: discordCallbackDto
148
+ },
149
+ options
150
+ );
151
+ };
152
+ const authControllerSocialLogin = (socialLoginDto, options) => {
127
153
  return customInstance(
128
154
  {
129
155
  url: `/auth/social`,
@@ -201,8 +227,11 @@ var getAuth = () => {
201
227
  );
202
228
  };
203
229
  return {
204
- authControllerLogin: authControllerLogin2,
205
- authControllerSocialLogin: authControllerSocialLogin2,
230
+ authControllerLogin,
231
+ authControllerGetDiscordAuthorizeUrl,
232
+ authControllerDiscordCallbackGet,
233
+ authControllerDiscordCallback,
234
+ authControllerSocialLogin,
206
235
  authControllerRefreshToken,
207
236
  authControllerLogout,
208
237
  authControllerRequestPasswordReset,
@@ -215,20 +244,22 @@ var getAuth = () => {
215
244
  // src/models/socialLoginDtoProvider.ts
216
245
  var SocialLoginDtoProvider = {
217
246
  google: "google",
218
- apple: "apple"
247
+ apple: "apple",
248
+ discord: "discord"
219
249
  };
220
250
 
221
251
  // src/auth.ts
222
- var { authControllerLogin, authControllerSocialLogin } = getAuth();
223
- var login = authControllerLogin;
224
- var socialLogin = authControllerSocialLogin;
252
+ var auth = getAuth();
253
+ var login = auth.authControllerLogin;
254
+ var socialLogin = auth.authControllerSocialLogin;
255
+ var discordCallback = auth.authControllerDiscordCallback;
225
256
  async function loginAndSetAuth(credentials, options) {
226
257
  var _a, _b;
227
258
  const result = await login(credentials, options);
228
- if ((_a = result.data) == null ? void 0 : _a.jwt) {
229
- setAuth({ jwt: result.data.jwt });
259
+ if ((_a = result.data) == null ? void 0 : _a.accessToken) {
260
+ setAuth({ jwt: result.data.accessToken });
230
261
  }
231
- if ((_b = result.data) == null ? void 0 : _b.apiKey) {
262
+ if (((_b = result.data) == null ? void 0 : _b.apiKey) !== void 0) {
232
263
  setAuth({ apiKey: result.data.apiKey });
233
264
  }
234
265
  return result;
@@ -236,10 +267,68 @@ async function loginAndSetAuth(credentials, options) {
236
267
  async function socialLoginAndSetAuth(credentials, options) {
237
268
  var _a, _b;
238
269
  const result = await socialLogin(credentials, options);
239
- if ((_a = result.data) == null ? void 0 : _a.jwt) {
240
- setAuth({ jwt: result.data.jwt });
270
+ if ((_a = result.data) == null ? void 0 : _a.accessToken) {
271
+ setAuth({ jwt: result.data.accessToken });
272
+ }
273
+ if (((_b = result.data) == null ? void 0 : _b.apiKey) !== void 0) {
274
+ setAuth({ apiKey: result.data.apiKey });
275
+ }
276
+ return result;
277
+ }
278
+ async function getDiscordAuthorizeUrl(params) {
279
+ const config = getConfig();
280
+ const platformApiKey = params.platformApiKey ?? config.apiKey;
281
+ if (!platformApiKey) {
282
+ throw new Error(
283
+ "Platform API key required for Discord auth. Pass platformApiKey or set it via setAuth({ apiKey }) or configure({ apiKey })."
284
+ );
285
+ }
286
+ return auth.authControllerGetDiscordAuthorizeUrl({
287
+ client_redirect_uri: params.clientRedirectUri,
288
+ platformApiKey
289
+ });
290
+ }
291
+ function getTokensFromFragment(hash) {
292
+ const raw = hash ?? (typeof window !== "undefined" ? window.location.hash.slice(1) : void 0);
293
+ if (!raw)
294
+ return null;
295
+ const params = new URLSearchParams(raw);
296
+ const accessToken = params.get("access_token");
297
+ const refreshToken = params.get("refresh_token");
298
+ if (!accessToken || !refreshToken)
299
+ return null;
300
+ return {
301
+ accessToken,
302
+ refreshToken,
303
+ expiresIn: params.get("expires_in") ?? void 0,
304
+ tokenType: params.get("token_type") ?? void 0
305
+ };
306
+ }
307
+ function setAuthFromFragment(options) {
308
+ const hash = (options == null ? void 0 : options.hash) ?? (typeof window !== "undefined" ? window.location.hash.slice(1) : void 0);
309
+ const tokens = getTokensFromFragment(hash ?? void 0);
310
+ if (!tokens)
311
+ return null;
312
+ setAuth({ jwt: tokens.accessToken });
313
+ if ((options == null ? void 0 : options.clearHash) !== false && typeof window !== "undefined" && window.history.replaceState) {
314
+ window.history.replaceState(null, "", window.location.pathname + window.location.search);
315
+ }
316
+ return tokens;
317
+ }
318
+ async function discordCallbackAndSetAuth(params) {
319
+ var _a, _b;
320
+ const result = await auth.authControllerDiscordCallback(
321
+ {
322
+ code: params.code,
323
+ redirect_uri: params.redirectUri,
324
+ ...params.platformApiKey !== void 0 && { platformApiKey: params.platformApiKey }
325
+ },
326
+ params.options
327
+ );
328
+ if ((_a = result.data) == null ? void 0 : _a.accessToken) {
329
+ setAuth({ jwt: result.data.accessToken });
241
330
  }
242
- if ((_b = result.data) == null ? void 0 : _b.apiKey) {
331
+ if (((_b = result.data) == null ? void 0 : _b.apiKey) !== void 0) {
243
332
  setAuth({ apiKey: result.data.apiKey });
244
333
  }
245
334
  return result;
@@ -247,8 +336,13 @@ async function socialLoginAndSetAuth(credentials, options) {
247
336
  // Annotate the CommonJS export names for ESM import in node:
248
337
  0 && (module.exports = {
249
338
  SocialLoginDtoProvider,
339
+ discordCallback,
340
+ discordCallbackAndSetAuth,
341
+ getDiscordAuthorizeUrl,
342
+ getTokensFromFragment,
250
343
  login,
251
344
  loginAndSetAuth,
345
+ setAuthFromFragment,
252
346
  socialLogin,
253
347
  socialLoginAndSetAuth
254
348
  });
package/dist/auth.cjs.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../src/auth.ts", "../src/api-client.ts", "../src/config.ts", "../src/api/auth/auth.ts", "../src/models/socialLoginDtoProvider.ts"],
4
- "sourcesContent": ["/**\r\n * Auth module - Simplified exports for authentication-related API functions\r\n */\r\n\r\nimport { getAuth } from './api/auth/auth';\r\nimport { setAuth } from './config';\r\nimport type { CommonLoginDto, SocialLoginDto } from './models';\r\nimport type {\r\n AuthControllerLoginResult,\r\n AuthControllerSocialLoginResult,\r\n} from './api/auth/auth';\r\n\r\nconst { authControllerLogin, authControllerSocialLogin } = getAuth();\r\n\r\n// Export auth functions with simplified names\r\nexport const login = authControllerLogin;\r\nexport const socialLogin = authControllerSocialLogin;\r\n\r\ntype AuthRequestOptions = Parameters<\r\n ReturnType<typeof getAuth>['authControllerLogin']\r\n>[1];\r\n\r\ntype SocialAuthRequestOptions = Parameters<\r\n ReturnType<typeof getAuth>['authControllerSocialLogin']\r\n>[1];\r\n\r\n/**\r\n * Login and automatically set authentication credentials\r\n * This is a convenience function that calls login() and setAuth() automatically\r\n * \r\n * @param credentials - Login credentials\r\n * @returns Login result with user information\r\n * \r\n * @example\r\n * ```typescript\r\n * import { loginAndSetAuth } from 'cilantro-smart-sdk/auth';\r\n * import { sendSOL } from 'cilantro-smart-sdk/wallet';\r\n * \r\n * // Login and set auth in one step\r\n * const result = await loginAndSetAuth({\r\n * usernameOrEmail: 'user@example.com',\r\n * password: 'password123'\r\n * });\r\n * \r\n * // Now you can make authenticated requests\r\n * await sendSOL('wallet-id', { ... });\r\n * ```\r\n */\r\nexport async function loginAndSetAuth(\r\n credentials: CommonLoginDto,\r\n options?: AuthRequestOptions\r\n): Promise<AuthControllerLoginResult> {\r\n const result = await login(credentials, options);\r\n \r\n // Automatically set auth from login response\r\n if (result.data?.jwt) {\r\n setAuth({ jwt: result.data.jwt });\r\n }\r\n if (result.data?.apiKey) {\r\n setAuth({ apiKey: result.data.apiKey });\r\n }\r\n \r\n return result;\r\n}\r\n\r\n/**\r\n * Authenticate with Google or Apple id_token and automatically set authentication credentials.\r\n * Use after the user signs in with Google/Apple OAuth and you receive the id_token.\r\n *\r\n * @param credentials - Social login credentials (provider + id_token)\r\n * @returns Login result with user information\r\n *\r\n * @example\r\n * ```typescript\r\n * import { socialLoginAndSetAuth } from 'cilantro-sdk/auth';\r\n *\r\n * // After user signs in with Google Sign-In\r\n * await socialLoginAndSetAuth({\r\n * provider: 'google',\r\n * id_token: googleUser.credential.id_token,\r\n * });\r\n *\r\n * // After user signs in with Apple\r\n * await socialLoginAndSetAuth({\r\n * provider: 'apple',\r\n * id_token: appleIdToken,\r\n * platformApiKey: 'your-api-key', // optional if sent via X-API-Key header\r\n * });\r\n * ```\r\n */\r\nexport async function socialLoginAndSetAuth(\r\n credentials: SocialLoginDto,\r\n options?: SocialAuthRequestOptions\r\n): Promise<AuthControllerSocialLoginResult> {\r\n const result = await socialLogin(credentials, options);\r\n\r\n if (result.data?.jwt) {\r\n setAuth({ jwt: result.data.jwt });\r\n }\r\n if (result.data?.apiKey) {\r\n setAuth({ apiKey: result.data.apiKey });\r\n }\r\n\r\n return result;\r\n}\r\n\r\n// Export types\r\nexport type {\r\n AuthControllerLoginResult,\r\n AuthControllerSocialLoginResult,\r\n AuthControllerRequestPasswordResetResult,\r\n AuthControllerConfirmPasswordResetResult,\r\n AuthControllerVerifyEmailResult,\r\n AuthControllerResendVerificationResult,\r\n} from './api/auth/auth';\r\n\r\nexport type {\r\n CommonLoginDto,\r\n SocialLoginDto,\r\n AuthControllerLogin200,\r\n AuthControllerLogin200Data,\r\n} from './models';\r\n\r\nexport { SocialLoginDtoProvider } from './models';\r\n\r\n// Input/Output helper types for convenience wrappers\r\nexport type LoginParams = CommonLoginDto;\r\nexport type LoginResult = AuthControllerLoginResult;\r\nexport type LoginOptions = AuthRequestOptions;\r\n\r\nexport type LoginAndSetAuthParams = CommonLoginDto;\r\nexport type LoginAndSetAuthOptions = AuthRequestOptions | undefined;\r\nexport type LoginAndSetAuthResult = AuthControllerLoginResult;\r\n\r\nexport type SocialLoginAndSetAuthParams = SocialLoginDto;\r\nexport type SocialLoginAndSetAuthOptions = SocialAuthRequestOptions | undefined;\r\nexport type SocialLoginAndSetAuthResult = AuthControllerSocialLoginResult;\r\n\r\n", "/**\r\n * Custom API client instance for Cilantro Smart SDK\r\n * Handles authentication (JWT tokens and API keys) automatically\r\n * @internal\r\n */\r\n\r\nimport axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';\r\nimport { getConfig } from './config';\r\n\r\n// Create axios instance with dynamic baseURL\r\nconst axiosInstance: AxiosInstance = axios.create();\r\n\r\n// Request interceptor to add authentication headers and dynamic baseURL\r\naxiosInstance.interceptors.request.use(\r\n (config) => {\r\n const sdkConfig = getConfig();\r\n \r\n // Set baseURL dynamically from config\r\n config.baseURL = sdkConfig.baseURL || 'https://api.cilantro.gg';\r\n \r\n // Add JWT token if available\r\n if (sdkConfig.jwt) {\r\n config.headers.Authorization = `Bearer ${sdkConfig.jwt}`;\r\n }\r\n \r\n // Add API key if available (for platform/user authentication)\r\n if (sdkConfig.apiKey) {\r\n config.headers['X-API-Key'] = sdkConfig.apiKey;\r\n }\r\n \r\n return config;\r\n },\r\n (error) => {\r\n return Promise.reject(error);\r\n }\r\n);\r\n\r\n/**\r\n * Custom instance wrapper for orval\r\n * @internal\r\n */\r\nexport const customInstance = <T>(\r\n config: AxiosRequestConfig,\r\n options?: AxiosRequestConfig,\r\n): Promise<T> => {\r\n const source = axios.CancelToken.source();\r\n const promise = axiosInstance({\r\n ...config,\r\n ...options,\r\n cancelToken: source.token,\r\n }).then(({ data }: AxiosResponse<T>) => data);\r\n\r\n // @ts-ignore\r\n promise.cancel = () => {\r\n source.cancel('Query was cancelled');\r\n };\r\n\r\n return promise;\r\n};\r\n\r\nexport default customInstance;\r\n", "/**\r\n * SDK Configuration Management\r\n * Centralized configuration for authentication and API settings\r\n */\r\n\r\n/**\r\n * SDK Configuration interface\r\n */\r\nexport interface SDKConfig {\r\n /** JWT token for authentication */\r\n jwt?: string;\r\n /** API key for authentication (alternative to JWT) */\r\n apiKey?: string;\r\n /** Base URL for the API (defaults to https://api.cilantro.gg) */\r\n baseURL?: string;\r\n}\r\n\r\n/**\r\n * Internal configuration state\r\n * Uses global variable to share state across bundled modules\r\n */\r\nconst GLOBAL_CONFIG_KEY = '__CILANTRO_SDK_CONFIG__';\r\n\r\n// Extend global types\r\ndeclare global {\r\n var __CILANTRO_SDK_CONFIG__: SDKConfig | undefined;\r\n}\r\n\r\n// Get or create global config\r\nfunction getGlobalConfig(): SDKConfig {\r\n const defaultConfig: SDKConfig = {\r\n baseURL: process.env.CILANTRO_API_URL || 'https://api.cilantro.gg',\r\n };\r\n \r\n if (typeof global !== 'undefined') {\r\n if (!global.__CILANTRO_SDK_CONFIG__) {\r\n global.__CILANTRO_SDK_CONFIG__ = defaultConfig;\r\n }\r\n return global.__CILANTRO_SDK_CONFIG__;\r\n } else if (typeof (globalThis as any).window !== 'undefined') {\r\n const win = (globalThis as any).window;\r\n if (!win[GLOBAL_CONFIG_KEY]) {\r\n win[GLOBAL_CONFIG_KEY] = defaultConfig;\r\n }\r\n return win[GLOBAL_CONFIG_KEY];\r\n }\r\n \r\n // Fallback for environments without global/window\r\n return defaultConfig;\r\n}\r\n\r\nlet currentConfig: SDKConfig = getGlobalConfig();\r\n\r\n/**\r\n * Configure the SDK with authentication credentials and settings\r\n * \r\n * @param config - Configuration options\r\n * @example\r\n * ```typescript\r\n * import { configure } from 'cilantro-smart-sdk';\r\n * \r\n * // Configure with API key\r\n * configure({ \r\n * apiKey: 'your-api-key',\r\n * baseURL: 'https://api.cilantro.gg' \r\n * });\r\n * \r\n * // Configure with JWT token\r\n * configure({ \r\n * jwt: 'your-jwt-token' \r\n * });\r\n * ```\r\n */\r\nexport function configure(config: SDKConfig): void {\r\n currentConfig = {\r\n ...currentConfig,\r\n ...config,\r\n };\r\n // Also update global config\r\n if (typeof global !== 'undefined') {\r\n global.__CILANTRO_SDK_CONFIG__ = currentConfig;\r\n } else if (typeof (globalThis as any).window !== 'undefined') {\r\n ((globalThis as any).window as any)[GLOBAL_CONFIG_KEY] = currentConfig;\r\n }\r\n}\r\n\r\n/**\r\n * Set or update authentication credentials\r\n * \r\n * @param auth - Authentication credentials (JWT and/or API key)\r\n * @example\r\n * ```typescript\r\n * import { setAuth } from 'cilantro-smart-sdk';\r\n * import { login } from 'cilantro-smart-sdk/auth';\r\n * \r\n * const result = await login({ \r\n * usernameOrEmail: 'user@example.com',\r\n * password: 'password123' \r\n * });\r\n * \r\n * setAuth({ jwt: result.data.jwt });\r\n * ```\r\n */\r\nexport function setAuth(auth: { jwt?: string; apiKey?: string; platformApiKey?: string }): void {\r\n // Refresh from global first\r\n currentConfig = getGlobalConfig();\r\n \r\n if (auth.jwt !== undefined) {\r\n currentConfig.jwt = auth.jwt;\r\n }\r\n currentConfig.apiKey = auth.apiKey ?? auth.platformApiKey;\r\n \r\n // Update global config\r\n if (typeof global !== 'undefined') {\r\n global.__CILANTRO_SDK_CONFIG__ = currentConfig;\r\n } else if (typeof (globalThis as any).window !== 'undefined') {\r\n ((globalThis as any).window as any)[GLOBAL_CONFIG_KEY] = currentConfig;\r\n }\r\n}\r\n\r\n/**\r\n * Clear all authentication credentials\r\n * \r\n * @example\r\n * ```typescript\r\n * import { clearAuth } from 'cilantro-smart-sdk';\r\n * \r\n * clearAuth();\r\n * ```\r\n */\r\nexport function clearAuth(): void {\r\n currentConfig = getGlobalConfig();\r\n currentConfig.jwt = undefined;\r\n currentConfig.apiKey = undefined;\r\n \r\n // Update global config\r\n if (typeof global !== 'undefined') {\r\n global.__CILANTRO_SDK_CONFIG__ = currentConfig;\r\n } else if (typeof (globalThis as any).window !== 'undefined') {\r\n ((globalThis as any).window as any)[GLOBAL_CONFIG_KEY] = currentConfig;\r\n }\r\n}\r\n\r\n/**\r\n * Get current SDK configuration (internal use only)\r\n * @internal\r\n */\r\nexport function getConfig(): Readonly<SDKConfig> {\r\n // Always get fresh from global to ensure we have the latest config\r\n currentConfig = getGlobalConfig();\r\n return currentConfig;\r\n}\r\n", "/**\n * Generated by orval v7.17.0 \uD83C\uDF7A\n * Do not edit manually.\n * Cilantro Smart API\n * API documentation for Cilantro Smart API - A Solana wallet management system\n * OpenAPI spec version: 1.0\n */\nimport type {\n AuthSuccessResponseDto,\n CommonLoginDto,\n LoginResponseDto,\n PasswordResetConfirmDto,\n PasswordResetRequestDto,\n RefreshTokenDto,\n SocialLoginDto,\n TokenResponseDto,\n VerifyEmailDto,\n} from \"../../models\";\n\nimport { customInstance } from \"../../api-client\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\nexport const getAuth = () => {\n /**\n * Authenticate as admin, platform, or user. Returns access token (1h expiry) and refresh token (7d expiry).\n * @summary Universal login endpoint\n */\n const authControllerLogin = (\n commonLoginDto: CommonLoginDto,\n options?: SecondParameter<typeof customInstance<LoginResponseDto>>,\n ) => {\n return customInstance<LoginResponseDto>(\n {\n url: `/auth/login`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: commonLoginDto,\n },\n options,\n );\n };\n /**\n * Authenticate with Google or Apple id_token. Send platformApiKey in body or X-API-Key header. Returns same access and refresh tokens as POST /auth/login.\n * @summary Social login (Web3Auth-style)\n */\n const authControllerSocialLogin = (\n socialLoginDto: SocialLoginDto,\n options?: SecondParameter<typeof customInstance<LoginResponseDto>>,\n ) => {\n return customInstance<LoginResponseDto>(\n {\n url: `/auth/social`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: socialLoginDto,\n },\n options,\n );\n };\n /**\n * Use a valid refresh token to obtain a new access token. The old refresh token is revoked and a new one is issued (token rotation).\n * @summary Refresh access token\n */\n const authControllerRefreshToken = (\n refreshTokenDto: RefreshTokenDto,\n options?: SecondParameter<typeof customInstance<TokenResponseDto>>,\n ) => {\n return customInstance<TokenResponseDto>(\n {\n url: `/auth/refresh`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: refreshTokenDto,\n },\n options,\n );\n };\n /**\n * Revoke the provided refresh token to logout the current session.\n * @summary Logout (revoke refresh token)\n */\n const authControllerLogout = (\n refreshTokenDto: RefreshTokenDto,\n options?: SecondParameter<typeof customInstance<AuthSuccessResponseDto>>,\n ) => {\n return customInstance<AuthSuccessResponseDto>(\n {\n url: `/auth/logout`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: refreshTokenDto,\n },\n options,\n );\n };\n /**\n * Request a password reset link to be sent to the provided email address. Works for both platform and user accounts.\n * @summary Request password reset\n */\n const authControllerRequestPasswordReset = (\n passwordResetRequestDto: PasswordResetRequestDto,\n options?: SecondParameter<typeof customInstance<AuthSuccessResponseDto>>,\n ) => {\n return customInstance<AuthSuccessResponseDto>(\n {\n url: `/auth/password-reset/request`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: passwordResetRequestDto,\n },\n options,\n );\n };\n /**\n * Reset password using the token received via email.\n * @summary Confirm password reset\n */\n const authControllerConfirmPasswordReset = (\n passwordResetConfirmDto: PasswordResetConfirmDto,\n options?: SecondParameter<typeof customInstance<AuthSuccessResponseDto>>,\n ) => {\n return customInstance<AuthSuccessResponseDto>(\n {\n url: `/auth/password-reset/confirm`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: passwordResetConfirmDto,\n },\n options,\n );\n };\n /**\n * Verify email address using the token received via email.\n * @summary Verify email address\n */\n const authControllerVerifyEmail = (\n verifyEmailDto: VerifyEmailDto,\n options?: SecondParameter<typeof customInstance<AuthSuccessResponseDto>>,\n ) => {\n return customInstance<AuthSuccessResponseDto>(\n {\n url: `/auth/verify-email`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: verifyEmailDto,\n },\n options,\n );\n };\n /**\n * Resend email verification link to the provided email address.\n * @summary Resend verification email\n */\n const authControllerResendVerification = (\n passwordResetRequestDto: PasswordResetRequestDto,\n options?: SecondParameter<typeof customInstance<AuthSuccessResponseDto>>,\n ) => {\n return customInstance<AuthSuccessResponseDto>(\n {\n url: `/auth/resend-verification`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: passwordResetRequestDto,\n },\n options,\n );\n };\n return {\n authControllerLogin,\n authControllerSocialLogin,\n authControllerRefreshToken,\n authControllerLogout,\n authControllerRequestPasswordReset,\n authControllerConfirmPasswordReset,\n authControllerVerifyEmail,\n authControllerResendVerification,\n };\n};\nexport type AuthControllerLoginResult = NonNullable<\n Awaited<ReturnType<ReturnType<typeof getAuth>[\"authControllerLogin\"]>>\n>;\nexport type AuthControllerSocialLoginResult = NonNullable<\n Awaited<ReturnType<ReturnType<typeof getAuth>[\"authControllerSocialLogin\"]>>\n>;\nexport type AuthControllerRefreshTokenResult = NonNullable<\n Awaited<ReturnType<ReturnType<typeof getAuth>[\"authControllerRefreshToken\"]>>\n>;\nexport type AuthControllerLogoutResult = NonNullable<\n Awaited<ReturnType<ReturnType<typeof getAuth>[\"authControllerLogout\"]>>\n>;\nexport type AuthControllerRequestPasswordResetResult = NonNullable<\n Awaited<\n ReturnType<ReturnType<typeof getAuth>[\"authControllerRequestPasswordReset\"]>\n >\n>;\nexport type AuthControllerConfirmPasswordResetResult = NonNullable<\n Awaited<\n ReturnType<ReturnType<typeof getAuth>[\"authControllerConfirmPasswordReset\"]>\n >\n>;\nexport type AuthControllerVerifyEmailResult = NonNullable<\n Awaited<ReturnType<ReturnType<typeof getAuth>[\"authControllerVerifyEmail\"]>>\n>;\nexport type AuthControllerResendVerificationResult = NonNullable<\n Awaited<\n ReturnType<ReturnType<typeof getAuth>[\"authControllerResendVerification\"]>\n >\n>;\n", "/**\n * Generated by orval v7.17.0 \uD83C\uDF7A\n * Do not edit manually.\n * Cilantro Smart API\n * API documentation for Cilantro Smart API - A Solana wallet management system\n * OpenAPI spec version: 1.0\n */\n\n/**\n * OAuth provider used for social login\n */\nexport type SocialLoginDtoProvider =\n (typeof SocialLoginDtoProvider)[keyof typeof SocialLoginDtoProvider];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const SocialLoginDtoProvider = {\n google: \"google\",\n apple: \"apple\",\n} as const;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACMA,mBAAwE;;;ACexE,IAAM,oBAAoB;AAQ1B,SAAS,kBAA6B;AACpC,QAAM,gBAA2B;AAAA,IAC/B,SAAS,QAAQ,IAAI,oBAAoB;AAAA,EAC3C;AAEA,MAAI,OAAO,eAAW,aAAa;AACjC,QAAI,CAAC,WAAO,yBAAyB;AACnC,iBAAO,0BAA0B;AAAA,IACnC;AACA,WAAO,WAAO;AAAA,EAChB,WAAW,OAAQ,WAAmB,WAAW,aAAa;AAC5D,UAAM,MAAO,WAAmB;AAChC,QAAI,CAAC,IAAI,iBAAiB,GAAG;AAC3B,UAAI,iBAAiB,IAAI;AAAA,IAC3B;AACA,WAAO,IAAI,iBAAiB;AAAA,EAC9B;AAGA,SAAO;AACT;AAEA,IAAI,gBAA2B,gBAAgB;AAoDxC,SAAS,QAAQ,MAAwE;AAE9F,kBAAgB,gBAAgB;AAEhC,MAAI,KAAK,QAAQ,QAAW;AAC1B,kBAAc,MAAM,KAAK;AAAA,EAC3B;AACA,gBAAc,SAAS,KAAK,UAAU,KAAK;AAG3C,MAAI,OAAO,eAAW,aAAa;AACjC,eAAO,0BAA0B;AAAA,EACnC,WAAW,OAAQ,WAAmB,WAAW,aAAa;AAC5D,IAAE,WAAmB,OAAe,iBAAiB,IAAI;AAAA,EAC3D;AACF;AA6BO,SAAS,YAAiC;AAE/C,kBAAgB,gBAAgB;AAChC,SA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BAAyB;AAAA,EACpC,QAAQ;AAAA,EACR,OAAO;AACT;;;AJNA,IAAM,EAAE,qBAAqB,0BAA0B,IAAI,QAAQ;AAG5D,IAAM,QAAQ;AACd,IAAM,cAAc;AAgC3B,eAAsB,gBACpB,aACA,SACoC;AAnDtC;AAoDE,QAAM,SAAS,MAAM,MAAM,aAAa,OAAO;AAG/C,OAAI,YAAO,SAAP,mBAAa,KAAK;AACpB,YAAQ,EAAE,KAAK,OAAO,KAAK,IAAI,CAAC;AAAA,EAClC;AACA,OAAI,YAAO,SAAP,mBAAa,QAAQ;AACvB,YAAQ,EAAE,QAAQ,OAAO,KAAK,OAAO,CAAC;AAAA,EACxC;AAEA,SAAO;AACT;AA2BA,eAAsB,sBACpB,aACA,SAC0C;AA7F5C;AA8FE,QAAM,SAAS,MAAM,YAAY,aAAa,OAAO;AAErD,OAAI,YAAO,SAAP,mBAAa,KAAK;AACpB,YAAQ,EAAE,KAAK,OAAO,KAAK,IAAI,CAAC;AAAA,EAClC;AACA,OAAI,YAAO,SAAP,mBAAa,QAAQ;AACvB,YAAQ,EAAE,QAAQ,OAAO,KAAK,OAAO,CAAC;AAAA,EACxC;AAEA,SAAO;AACT;",
6
- "names": ["axios", "authControllerLogin", "authControllerSocialLogin"]
3
+ "sources": ["../src/auth.ts", "../src/config.ts", "../src/api-client.ts", "../src/api/auth/auth.ts", "../src/models/socialLoginDtoProvider.ts"],
4
+ "sourcesContent": ["/**\r\n * Auth module - Simplified exports for authentication-related API functions\r\n */\r\n\r\nimport { getConfig, setAuth } from './config';\r\nimport { getAuth } from './api/auth/auth';\r\nimport type { CommonLoginDto, SocialLoginDto } from './models';\r\nimport type {\r\n AuthControllerLoginResult,\r\n AuthControllerSocialLoginResult,\r\n AuthControllerGetDiscordAuthorizeUrlResult,\r\n AuthControllerDiscordCallbackResult,\r\n} from './api/auth/auth';\r\n\r\nconst auth = getAuth();\r\n\r\n// Export auth functions with simplified names\r\nexport const login = auth.authControllerLogin;\r\nexport const socialLogin = auth.authControllerSocialLogin;\r\n\r\n/**\r\n * Legacy: exchange Discord code for tokens when your app receives the code (your URL in Discord redirects).\r\n * Recommended flow is getDiscordAuthorizeUrl + setAuthFromFragment (backend-only callback).\r\n */\r\nexport const discordCallback = auth.authControllerDiscordCallback;\r\n\r\ntype AuthRequestOptions = Parameters<\r\n ReturnType<typeof getAuth>['authControllerLogin']\r\n>[1];\r\n\r\ntype SocialAuthRequestOptions = Parameters<\r\n ReturnType<typeof getAuth>['authControllerSocialLogin']\r\n>[1];\r\n\r\ntype DiscordCallbackOptions = Parameters<\r\n ReturnType<typeof getAuth>['authControllerDiscordCallback']\r\n>[1];\r\n\r\n/**\r\n * Login and automatically set authentication credentials\r\n * This is a convenience function that calls login() and setAuth() automatically\r\n * \r\n * @param credentials - Login credentials\r\n * @returns Login result with user information\r\n * \r\n * @example\r\n * ```typescript\r\n * import { loginAndSetAuth } from 'cilantro-smart-sdk/auth';\r\n * import { sendSOL } from 'cilantro-smart-sdk/wallet';\r\n * \r\n * // Login and set auth in one step\r\n * const result = await loginAndSetAuth({\r\n * usernameOrEmail: 'user@example.com',\r\n * password: 'password123'\r\n * });\r\n * \r\n * // Now you can make authenticated requests\r\n * await sendSOL('wallet-id', { ... });\r\n * ```\r\n */\r\nexport async function loginAndSetAuth(\r\n credentials: CommonLoginDto,\r\n options?: AuthRequestOptions\r\n): Promise<AuthControllerLoginResult> {\r\n const result = await login(credentials, options);\r\n \r\n // Automatically set auth from login response (API uses accessToken, we store as jwt)\r\n if (result.data?.accessToken) {\r\n setAuth({ jwt: result.data.accessToken });\r\n }\r\n if (result.data?.apiKey !== undefined) {\r\n setAuth({ apiKey: result.data.apiKey });\r\n }\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * Authenticate with Google or Apple id_token and automatically set authentication credentials.\r\n * Use after the user signs in with Google/Apple OAuth and you receive the id_token.\r\n *\r\n * @param credentials - Social login credentials (provider + id_token)\r\n * @returns Login result with user information\r\n *\r\n * @example\r\n * ```typescript\r\n * import { socialLoginAndSetAuth } from 'cilantro-sdk/auth';\r\n *\r\n * // After user signs in with Google Sign-In\r\n * await socialLoginAndSetAuth({\r\n * provider: 'google',\r\n * id_token: googleUser.credential.id_token,\r\n * });\r\n *\r\n * // After user signs in with Apple\r\n * await socialLoginAndSetAuth({\r\n * provider: 'apple',\r\n * id_token: appleIdToken,\r\n * platformApiKey: 'your-api-key', // optional if sent via X-API-Key header\r\n * });\r\n * ```\r\n */\r\nexport async function socialLoginAndSetAuth(\r\n credentials: SocialLoginDto,\r\n options?: SocialAuthRequestOptions\r\n): Promise<AuthControllerSocialLoginResult> {\r\n const result = await socialLogin(credentials, options);\r\n\r\n if (result.data?.accessToken) {\r\n setAuth({ jwt: result.data.accessToken });\r\n }\r\n if (result.data?.apiKey !== undefined) {\r\n setAuth({ apiKey: result.data.apiKey });\r\n }\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * Discord OAuth2 login \u2013 Step 1: get the authorize URL and redirect the user.\r\n * Discord redirects only to the backend; the backend then redirects to your clientRedirectUri with\r\n * tokens in the URL fragment (#access_token=...&refresh_token=...). Use setAuthFromFragment() on\r\n * the page at clientRedirectUri to parse and set auth.\r\n *\r\n * @param params.clientRedirectUri - Where the user should land after login (e.g. https://myapp.com/dashboard or /auth/callback). Backend redirects here with tokens in the fragment.\r\n * @param params.platformApiKey - Platform API key (optional if already set via setAuth/configure).\r\n * @returns Promise with { authorizeUrl }. Redirect the user to authorizeUrl.\r\n *\r\n * @example\r\n * ```ts\r\n * const { authorizeUrl } = await getDiscordAuthorizeUrl({\r\n * clientRedirectUri: 'https://myapp.com/dashboard',\r\n * });\r\n * window.location.href = authorizeUrl;\r\n * ```\r\n */\r\nexport async function getDiscordAuthorizeUrl(params: {\r\n clientRedirectUri: string;\r\n platformApiKey?: string;\r\n}): Promise<AuthControllerGetDiscordAuthorizeUrlResult> {\r\n const config = getConfig();\r\n const platformApiKey = params.platformApiKey ?? config.apiKey;\r\n if (!platformApiKey) {\r\n throw new Error(\r\n 'Platform API key required for Discord auth. Pass platformApiKey or set it via setAuth({ apiKey }) or configure({ apiKey }).'\r\n );\r\n }\r\n return auth.authControllerGetDiscordAuthorizeUrl({\r\n client_redirect_uri: params.clientRedirectUri,\r\n platformApiKey,\r\n });\r\n}\r\n\r\n/**\r\n * Parses the URL fragment from the Discord redirect (backend sends tokens in the fragment).\r\n * Use on the page at client_redirect_uri after the user returns from Discord login.\r\n *\r\n * @param hash - Fragment string (e.g. window.location.hash.slice(1)). If omitted, returns null (for non-browser or no hash).\r\n * @returns Parsed tokens or null if hash is empty/invalid.\r\n */\r\nexport function getTokensFromFragment(\r\n hash?: string\r\n): { accessToken: string; refreshToken: string; expiresIn?: string; tokenType?: string } | null {\r\n const raw = hash ?? (typeof window !== 'undefined' ? window.location.hash.slice(1) : undefined);\r\n if (!raw) return null;\r\n const params = new URLSearchParams(raw);\r\n const accessToken = params.get('access_token');\r\n const refreshToken = params.get('refresh_token');\r\n if (!accessToken || !refreshToken) return null;\r\n return {\r\n accessToken,\r\n refreshToken,\r\n expiresIn: params.get('expires_in') ?? undefined,\r\n tokenType: params.get('token_type') ?? undefined,\r\n };\r\n}\r\n\r\n/**\r\n * Discord OAuth2 \u2013 Step 2: read tokens from the URL fragment and set SDK auth.\r\n * Call this on the page at client_redirect_uri (the URL you passed to getDiscordAuthorizeUrl).\r\n *\r\n * @param options.hash - Fragment to parse (defaults to window.location.hash if in browser).\r\n * @param options.clearHash - If true (default), removes the fragment from the URL after reading.\r\n * @returns The parsed tokens, or null if no valid tokens in fragment.\r\n *\r\n * @example\r\n * ```ts\r\n * // On your dashboard or /auth/callback page\r\n * const tokens = setAuthFromFragment({ clearHash: true });\r\n * if (tokens) redirectToApp();\r\n * ```\r\n */\r\nexport function setAuthFromFragment(options?: {\r\n hash?: string;\r\n clearHash?: boolean;\r\n}): { accessToken: string; refreshToken: string; expiresIn?: string; tokenType?: string } | null {\r\n const hash = options?.hash ?? (typeof window !== 'undefined' ? window.location.hash.slice(1) : undefined);\r\n const tokens = getTokensFromFragment(hash ?? undefined);\r\n if (!tokens) return null;\r\n setAuth({ jwt: tokens.accessToken });\r\n if (options?.clearHash !== false && typeof window !== 'undefined' && window.history.replaceState) {\r\n window.history.replaceState(null, '', window.location.pathname + window.location.search);\r\n }\r\n return tokens;\r\n}\r\n\r\n/**\r\n * Legacy: exchange Discord code for Cilantro tokens and set auth.\r\n * Use only when your app receives the code from Discord (your URL in Discord redirects).\r\n * Recommended flow is getDiscordAuthorizeUrl + setAuthFromFragment.\r\n */\r\nexport async function discordCallbackAndSetAuth(params: {\r\n code: string;\r\n redirectUri: string;\r\n platformApiKey?: string;\r\n options?: DiscordCallbackOptions;\r\n}): Promise<AuthControllerDiscordCallbackResult> {\r\n const result = await auth.authControllerDiscordCallback(\r\n {\r\n code: params.code,\r\n redirect_uri: params.redirectUri,\r\n ...(params.platformApiKey !== undefined && { platformApiKey: params.platformApiKey }),\r\n },\r\n params.options\r\n );\r\n if (result.data?.accessToken) {\r\n setAuth({ jwt: result.data.accessToken });\r\n }\r\n if (result.data?.apiKey !== undefined) {\r\n setAuth({ apiKey: result.data.apiKey });\r\n }\r\n return result;\r\n}\r\n\r\n// Export types\r\nexport type {\r\n AuthControllerLoginResult,\r\n AuthControllerSocialLoginResult,\r\n AuthControllerGetDiscordAuthorizeUrlResult,\r\n AuthControllerDiscordCallbackResult,\r\n AuthControllerRequestPasswordResetResult,\r\n AuthControllerConfirmPasswordResetResult,\r\n AuthControllerVerifyEmailResult,\r\n AuthControllerResendVerificationResult,\r\n} from './api/auth/auth';\r\n\r\nexport type {\r\n CommonLoginDto,\r\n SocialLoginDto,\r\n AuthControllerLogin200,\r\n AuthControllerLogin200Data,\r\n DiscordCallbackDto,\r\n AuthControllerGetDiscordAuthorizeUrlParams,\r\n AuthControllerGetDiscordAuthorizeUrl200,\r\n} from './models';\r\n\r\nexport { SocialLoginDtoProvider } from './models';\r\n\r\nexport type LoginParams = CommonLoginDto;\r\nexport type LoginResult = AuthControllerLoginResult;\r\nexport type LoginOptions = AuthRequestOptions;\r\nexport type LoginAndSetAuthParams = CommonLoginDto;\r\nexport type LoginAndSetAuthOptions = AuthRequestOptions | undefined;\r\nexport type LoginAndSetAuthResult = AuthControllerLoginResult;\r\nexport type SocialLoginAndSetAuthParams = SocialLoginDto;\r\nexport type SocialLoginAndSetAuthOptions = SocialAuthRequestOptions | undefined;\r\nexport type SocialLoginAndSetAuthResult = AuthControllerSocialLoginResult;\r\n/** Response from getDiscordAuthorizeUrl(); redirect the user to authorizeUrl. */\r\nexport type DiscordAuthorizeUrlResponse = { authorizeUrl: string };\r\n\r\nexport type GetDiscordAuthorizeUrlParams = {\r\n clientRedirectUri: string;\r\n platformApiKey?: string;\r\n};\r\n\r\n/** Tokens parsed from the URL fragment after Discord redirect (Step 2). */\r\nexport type DiscordFragmentTokens = {\r\n accessToken: string;\r\n refreshToken: string;\r\n expiresIn?: string;\r\n tokenType?: string;\r\n};\r\nexport type DiscordCallbackAndSetAuthParams = {\r\n code: string;\r\n redirectUri: string;\r\n platformApiKey?: string;\r\n options?: DiscordCallbackOptions;\r\n};\r\n", "/**\r\n * SDK Configuration Management\r\n * Centralized configuration for authentication and API settings\r\n */\r\n\r\n/**\r\n * SDK Configuration interface\r\n */\r\nexport interface SDKConfig {\r\n /** JWT token for authentication */\r\n jwt?: string;\r\n /** API key for authentication (alternative to JWT) */\r\n apiKey?: string;\r\n /** Base URL for the API (defaults to https://api.cilantro.gg) */\r\n baseURL?: string;\r\n}\r\n\r\n/**\r\n * Internal configuration state\r\n * Uses global variable to share state across bundled modules\r\n */\r\nconst GLOBAL_CONFIG_KEY = '__CILANTRO_SDK_CONFIG__';\r\n\r\n// Extend global types\r\ndeclare global {\r\n var __CILANTRO_SDK_CONFIG__: SDKConfig | undefined;\r\n}\r\n\r\n// Get or create global config\r\nfunction getGlobalConfig(): SDKConfig {\r\n const defaultConfig: SDKConfig = {\r\n baseURL: process.env.CILANTRO_API_URL || 'https://api.cilantro.gg',\r\n };\r\n \r\n if (typeof global !== 'undefined') {\r\n if (!global.__CILANTRO_SDK_CONFIG__) {\r\n global.__CILANTRO_SDK_CONFIG__ = defaultConfig;\r\n }\r\n return global.__CILANTRO_SDK_CONFIG__;\r\n } else if (typeof (globalThis as any).window !== 'undefined') {\r\n const win = (globalThis as any).window;\r\n if (!win[GLOBAL_CONFIG_KEY]) {\r\n win[GLOBAL_CONFIG_KEY] = defaultConfig;\r\n }\r\n return win[GLOBAL_CONFIG_KEY];\r\n }\r\n \r\n // Fallback for environments without global/window\r\n return defaultConfig;\r\n}\r\n\r\nlet currentConfig: SDKConfig = getGlobalConfig();\r\n\r\n/**\r\n * Configure the SDK with authentication credentials and settings\r\n * \r\n * @param config - Configuration options\r\n * @example\r\n * ```typescript\r\n * import { configure } from 'cilantro-smart-sdk';\r\n * \r\n * // Configure with API key\r\n * configure({ \r\n * apiKey: 'your-api-key',\r\n * baseURL: 'https://api.cilantro.gg' \r\n * });\r\n * \r\n * // Configure with JWT token\r\n * configure({ \r\n * jwt: 'your-jwt-token' \r\n * });\r\n * ```\r\n */\r\nexport function configure(config: SDKConfig): void {\r\n currentConfig = {\r\n ...currentConfig,\r\n ...config,\r\n };\r\n // Also update global config\r\n if (typeof global !== 'undefined') {\r\n global.__CILANTRO_SDK_CONFIG__ = currentConfig;\r\n } else if (typeof (globalThis as any).window !== 'undefined') {\r\n ((globalThis as any).window as any)[GLOBAL_CONFIG_KEY] = currentConfig;\r\n }\r\n}\r\n\r\n/**\r\n * Set or update authentication credentials\r\n * \r\n * @param auth - Authentication credentials (JWT and/or API key)\r\n * @example\r\n * ```typescript\r\n * import { setAuth } from 'cilantro-smart-sdk';\r\n * import { login } from 'cilantro-smart-sdk/auth';\r\n * \r\n * const result = await login({ \r\n * usernameOrEmail: 'user@example.com',\r\n * password: 'password123' \r\n * });\r\n * \r\n * setAuth({ jwt: result.data.jwt });\r\n * ```\r\n */\r\nexport function setAuth(auth: { jwt?: string; apiKey?: string; platformApiKey?: string }): void {\r\n // Refresh from global first\r\n currentConfig = getGlobalConfig();\r\n \r\n if (auth.jwt !== undefined) {\r\n currentConfig.jwt = auth.jwt;\r\n }\r\n currentConfig.apiKey = auth.apiKey ?? auth.platformApiKey;\r\n \r\n // Update global config\r\n if (typeof global !== 'undefined') {\r\n global.__CILANTRO_SDK_CONFIG__ = currentConfig;\r\n } else if (typeof (globalThis as any).window !== 'undefined') {\r\n ((globalThis as any).window as any)[GLOBAL_CONFIG_KEY] = currentConfig;\r\n }\r\n}\r\n\r\n/**\r\n * Clear all authentication credentials\r\n * \r\n * @example\r\n * ```typescript\r\n * import { clearAuth } from 'cilantro-smart-sdk';\r\n * \r\n * clearAuth();\r\n * ```\r\n */\r\nexport function clearAuth(): void {\r\n currentConfig = getGlobalConfig();\r\n currentConfig.jwt = undefined;\r\n currentConfig.apiKey = undefined;\r\n \r\n // Update global config\r\n if (typeof global !== 'undefined') {\r\n global.__CILANTRO_SDK_CONFIG__ = currentConfig;\r\n } else if (typeof (globalThis as any).window !== 'undefined') {\r\n ((globalThis as any).window as any)[GLOBAL_CONFIG_KEY] = currentConfig;\r\n }\r\n}\r\n\r\n/**\r\n * Get current SDK configuration (internal use only)\r\n * @internal\r\n */\r\nexport function getConfig(): Readonly<SDKConfig> {\r\n // Always get fresh from global to ensure we have the latest config\r\n currentConfig = getGlobalConfig();\r\n return currentConfig;\r\n}\r\n", "/**\r\n * Custom API client instance for Cilantro Smart SDK\r\n * Handles authentication (JWT tokens and API keys) automatically\r\n * @internal\r\n */\r\n\r\nimport axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';\r\nimport { getConfig } from './config';\r\n\r\n// Create axios instance with dynamic baseURL\r\nconst axiosInstance: AxiosInstance = axios.create();\r\n\r\n// Request interceptor to add authentication headers and dynamic baseURL\r\naxiosInstance.interceptors.request.use(\r\n (config) => {\r\n const sdkConfig = getConfig();\r\n \r\n // Set baseURL dynamically from config\r\n config.baseURL = sdkConfig.baseURL || 'https://api.cilantro.gg';\r\n \r\n // Add JWT token if available\r\n if (sdkConfig.jwt) {\r\n config.headers.Authorization = `Bearer ${sdkConfig.jwt}`;\r\n }\r\n \r\n // Add API key if available (for platform/user authentication)\r\n if (sdkConfig.apiKey) {\r\n config.headers['X-API-Key'] = sdkConfig.apiKey;\r\n }\r\n \r\n return config;\r\n },\r\n (error) => {\r\n return Promise.reject(error);\r\n }\r\n);\r\n\r\n/**\r\n * Custom instance wrapper for orval\r\n * @internal\r\n */\r\nexport const customInstance = <T>(\r\n config: AxiosRequestConfig,\r\n options?: AxiosRequestConfig,\r\n): Promise<T> => {\r\n const source = axios.CancelToken.source();\r\n const promise = axiosInstance({\r\n ...config,\r\n ...options,\r\n cancelToken: source.token,\r\n }).then(({ data }: AxiosResponse<T>) => data);\r\n\r\n // @ts-ignore\r\n promise.cancel = () => {\r\n source.cancel('Query was cancelled');\r\n };\r\n\r\n return promise;\r\n};\r\n\r\nexport default customInstance;\r\n", "/**\n * Generated by orval v7.17.0 \uD83C\uDF7A\n * Do not edit manually.\n * Cilantro Smart API\n * API documentation for Cilantro Smart API - A Solana wallet management system\n * OpenAPI spec version: 1.0\n */\nimport type {\n AuthControllerDiscordCallbackGetParams,\n AuthControllerGetDiscordAuthorizeUrl200,\n AuthControllerGetDiscordAuthorizeUrlParams,\n AuthSuccessResponseDto,\n CommonLoginDto,\n DiscordCallbackDto,\n LoginResponseDto,\n PasswordResetConfirmDto,\n PasswordResetRequestDto,\n RefreshTokenDto,\n SocialLoginDto,\n TokenResponseDto,\n VerifyEmailDto,\n} from \"../../models\";\n\nimport { customInstance } from \"../../api-client\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\nexport const getAuth = () => {\n /**\n * Authenticate as admin, platform, or user. Returns access token (1h expiry) and refresh token (7d expiry).\n * @summary Universal login endpoint\n */\n const authControllerLogin = (\n commonLoginDto: CommonLoginDto,\n options?: SecondParameter<typeof customInstance<LoginResponseDto>>,\n ) => {\n return customInstance<LoginResponseDto>(\n {\n url: `/auth/login`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: commonLoginDto,\n },\n options,\n );\n };\n /**\n * Returns the Discord authorization URL. Your app redirects the user there. Discord redirects to the backend callback; the backend then redirects the browser to client_redirect_uri with tokens in the URL fragment. Set only the backend URL in Discord Developer Portal (e.g. https://api.cilantro.gg/auth/discord/callback).\n * @summary Get Discord OAuth2 authorize URL (backend-handled callback)\n */\n const authControllerGetDiscordAuthorizeUrl = (\n params: AuthControllerGetDiscordAuthorizeUrlParams,\n options?: SecondParameter<\n typeof customInstance<AuthControllerGetDiscordAuthorizeUrl200>\n >,\n ) => {\n return customInstance<AuthControllerGetDiscordAuthorizeUrl200>(\n { url: `/auth/discord/authorize`, method: \"GET\", params },\n options,\n );\n };\n /**\n * Discord redirects here with code and state. Backend exchanges the code, issues tokens, then redirects the browser to the client URL with tokens in the fragment.\n * @summary Discord OAuth2 callback (backend redirect target)\n */\n const authControllerDiscordCallbackGet = (\n params: AuthControllerDiscordCallbackGetParams,\n options?: SecondParameter<typeof customInstance<void>>,\n ) => {\n return customInstance<void>(\n { url: `/auth/discord/callback`, method: \"GET\", params },\n options,\n );\n };\n /**\n * Send the authorization code and redirect_uri from your Discord callback page. Backend exchanges the code for a Discord access_token, then finds or creates the user and returns Cilantro access and refresh tokens (same shape as POST /auth/login).\n * @summary Discord OAuth2 callback (SDK / backend-handled flow)\n */\n const authControllerDiscordCallback = (\n discordCallbackDto: DiscordCallbackDto,\n options?: SecondParameter<typeof customInstance<LoginResponseDto>>,\n ) => {\n return customInstance<LoginResponseDto>(\n {\n url: `/auth/social/discord/callback`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: discordCallbackDto,\n },\n options,\n );\n };\n /**\n * Authenticate with Google (id_token), Apple (id_token), or Discord (access_token). Send platformApiKey in body or X-API-Key header. Returns same access and refresh tokens as POST /auth/login. For Discord SDK flow use GET /auth/discord/authorize and POST /auth/social/discord/callback instead.\n * @summary Social login (Web3Auth-style)\n */\n const authControllerSocialLogin = (\n socialLoginDto: SocialLoginDto,\n options?: SecondParameter<typeof customInstance<LoginResponseDto>>,\n ) => {\n return customInstance<LoginResponseDto>(\n {\n url: `/auth/social`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: socialLoginDto,\n },\n options,\n );\n };\n /**\n * Use a valid refresh token to obtain a new access token. The old refresh token is revoked and a new one is issued (token rotation).\n * @summary Refresh access token\n */\n const authControllerRefreshToken = (\n refreshTokenDto: RefreshTokenDto,\n options?: SecondParameter<typeof customInstance<TokenResponseDto>>,\n ) => {\n return customInstance<TokenResponseDto>(\n {\n url: `/auth/refresh`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: refreshTokenDto,\n },\n options,\n );\n };\n /**\n * Revoke the provided refresh token to logout the current session.\n * @summary Logout (revoke refresh token)\n */\n const authControllerLogout = (\n refreshTokenDto: RefreshTokenDto,\n options?: SecondParameter<typeof customInstance<AuthSuccessResponseDto>>,\n ) => {\n return customInstance<AuthSuccessResponseDto>(\n {\n url: `/auth/logout`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: refreshTokenDto,\n },\n options,\n );\n };\n /**\n * Request a password reset link to be sent to the provided email address. Works for both platform and user accounts.\n * @summary Request password reset\n */\n const authControllerRequestPasswordReset = (\n passwordResetRequestDto: PasswordResetRequestDto,\n options?: SecondParameter<typeof customInstance<AuthSuccessResponseDto>>,\n ) => {\n return customInstance<AuthSuccessResponseDto>(\n {\n url: `/auth/password-reset/request`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: passwordResetRequestDto,\n },\n options,\n );\n };\n /**\n * Reset password using the token received via email.\n * @summary Confirm password reset\n */\n const authControllerConfirmPasswordReset = (\n passwordResetConfirmDto: PasswordResetConfirmDto,\n options?: SecondParameter<typeof customInstance<AuthSuccessResponseDto>>,\n ) => {\n return customInstance<AuthSuccessResponseDto>(\n {\n url: `/auth/password-reset/confirm`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: passwordResetConfirmDto,\n },\n options,\n );\n };\n /**\n * Verify email address using the token received via email.\n * @summary Verify email address\n */\n const authControllerVerifyEmail = (\n verifyEmailDto: VerifyEmailDto,\n options?: SecondParameter<typeof customInstance<AuthSuccessResponseDto>>,\n ) => {\n return customInstance<AuthSuccessResponseDto>(\n {\n url: `/auth/verify-email`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: verifyEmailDto,\n },\n options,\n );\n };\n /**\n * Resend email verification link to the provided email address.\n * @summary Resend verification email\n */\n const authControllerResendVerification = (\n passwordResetRequestDto: PasswordResetRequestDto,\n options?: SecondParameter<typeof customInstance<AuthSuccessResponseDto>>,\n ) => {\n return customInstance<AuthSuccessResponseDto>(\n {\n url: `/auth/resend-verification`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: passwordResetRequestDto,\n },\n options,\n );\n };\n return {\n authControllerLogin,\n authControllerGetDiscordAuthorizeUrl,\n authControllerDiscordCallbackGet,\n authControllerDiscordCallback,\n authControllerSocialLogin,\n authControllerRefreshToken,\n authControllerLogout,\n authControllerRequestPasswordReset,\n authControllerConfirmPasswordReset,\n authControllerVerifyEmail,\n authControllerResendVerification,\n };\n};\nexport type AuthControllerLoginResult = NonNullable<\n Awaited<ReturnType<ReturnType<typeof getAuth>[\"authControllerLogin\"]>>\n>;\nexport type AuthControllerGetDiscordAuthorizeUrlResult = NonNullable<\n Awaited<\n ReturnType<\n ReturnType<typeof getAuth>[\"authControllerGetDiscordAuthorizeUrl\"]\n >\n >\n>;\nexport type AuthControllerDiscordCallbackGetResult = NonNullable<\n Awaited<\n ReturnType<ReturnType<typeof getAuth>[\"authControllerDiscordCallbackGet\"]>\n >\n>;\nexport type AuthControllerDiscordCallbackResult = NonNullable<\n Awaited<\n ReturnType<ReturnType<typeof getAuth>[\"authControllerDiscordCallback\"]>\n >\n>;\nexport type AuthControllerSocialLoginResult = NonNullable<\n Awaited<ReturnType<ReturnType<typeof getAuth>[\"authControllerSocialLogin\"]>>\n>;\nexport type AuthControllerRefreshTokenResult = NonNullable<\n Awaited<ReturnType<ReturnType<typeof getAuth>[\"authControllerRefreshToken\"]>>\n>;\nexport type AuthControllerLogoutResult = NonNullable<\n Awaited<ReturnType<ReturnType<typeof getAuth>[\"authControllerLogout\"]>>\n>;\nexport type AuthControllerRequestPasswordResetResult = NonNullable<\n Awaited<\n ReturnType<ReturnType<typeof getAuth>[\"authControllerRequestPasswordReset\"]>\n >\n>;\nexport type AuthControllerConfirmPasswordResetResult = NonNullable<\n Awaited<\n ReturnType<ReturnType<typeof getAuth>[\"authControllerConfirmPasswordReset\"]>\n >\n>;\nexport type AuthControllerVerifyEmailResult = NonNullable<\n Awaited<ReturnType<ReturnType<typeof getAuth>[\"authControllerVerifyEmail\"]>>\n>;\nexport type AuthControllerResendVerificationResult = NonNullable<\n Awaited<\n ReturnType<ReturnType<typeof getAuth>[\"authControllerResendVerification\"]>\n >\n>;\n", "/**\n * Generated by orval v7.17.0 \uD83C\uDF7A\n * Do not edit manually.\n * Cilantro Smart API\n * API documentation for Cilantro Smart API - A Solana wallet management system\n * OpenAPI spec version: 1.0\n */\n\n/**\n * OAuth provider used for social login\n */\nexport type SocialLoginDtoProvider =\n (typeof SocialLoginDtoProvider)[keyof typeof SocialLoginDtoProvider];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const SocialLoginDtoProvider = {\n google: \"google\",\n apple: \"apple\",\n discord: \"discord\",\n} as const;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACqBA,IAAM,oBAAoB;AAQ1B,SAAS,kBAA6B;AACpC,QAAM,gBAA2B;AAAA,IAC/B,SAAS,QAAQ,IAAI,oBAAoB;AAAA,EAC3C;AAEA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