@sogni-ai/sogni-client 3.0.0-alpha.2 → 3.0.0-alpha.21

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 (56) hide show
  1. package/CHANGELOG.md +145 -0
  2. package/README.md +3 -1
  3. package/dist/Account/CurrentAccount.d.ts +3 -3
  4. package/dist/Account/CurrentAccount.js +14 -4
  5. package/dist/Account/CurrentAccount.js.map +1 -1
  6. package/dist/Account/index.d.ts +6 -4
  7. package/dist/Account/index.js +8 -5
  8. package/dist/Account/index.js.map +1 -1
  9. package/dist/Account/types.d.ts +5 -0
  10. package/dist/ApiClient/WebSocketClient/events.d.ts +21 -7
  11. package/dist/ApiClient/WebSocketClient/index.js +13 -3
  12. package/dist/ApiClient/WebSocketClient/index.js.map +1 -1
  13. package/dist/Projects/Job.d.ts +41 -0
  14. package/dist/Projects/Job.js +77 -1
  15. package/dist/Projects/Job.js.map +1 -1
  16. package/dist/Projects/Project.d.ts +1 -1
  17. package/dist/Projects/Project.js +22 -19
  18. package/dist/Projects/Project.js.map +1 -1
  19. package/dist/Projects/createJobRequestMessage.js +1 -1
  20. package/dist/Projects/createJobRequestMessage.js.map +1 -1
  21. package/dist/Projects/index.d.ts +5 -1
  22. package/dist/Projects/index.js +44 -8
  23. package/dist/Projects/index.js.map +1 -1
  24. package/dist/Projects/types/ControlNetParams.d.ts +1 -1
  25. package/dist/Projects/types/events.d.ts +6 -0
  26. package/dist/Projects/types/index.d.ts +7 -0
  27. package/dist/Projects/utils.d.ts +2 -0
  28. package/dist/Projects/utils.js +14 -0
  29. package/dist/Projects/utils.js.map +1 -0
  30. package/dist/Stats/types.d.ts +1 -1
  31. package/dist/index.d.ts +2 -1
  32. package/dist/index.js.map +1 -1
  33. package/dist/types/token.d.ts +1 -0
  34. package/dist/types/token.js +3 -0
  35. package/dist/types/token.js.map +1 -0
  36. package/dist/version.d.ts +1 -1
  37. package/dist/version.js +2 -1
  38. package/dist/version.js.map +1 -1
  39. package/package.json +1 -1
  40. package/src/Account/CurrentAccount.ts +16 -6
  41. package/src/Account/index.ts +15 -13
  42. package/src/Account/types.ts +7 -0
  43. package/src/ApiClient/WebSocketClient/events.ts +25 -8
  44. package/src/ApiClient/WebSocketClient/index.ts +13 -3
  45. package/src/Projects/Job.ts +97 -1
  46. package/src/Projects/Project.ts +24 -20
  47. package/src/Projects/createJobRequestMessage.ts +2 -1
  48. package/src/Projects/index.ts +44 -8
  49. package/src/Projects/types/ControlNetParams.ts +2 -1
  50. package/src/Projects/types/events.ts +6 -0
  51. package/src/Projects/types/index.ts +8 -0
  52. package/src/Projects/utils.ts +12 -0
  53. package/src/Stats/types.ts +2 -0
  54. package/src/index.ts +3 -1
  55. package/src/types/token.ts +1 -0
  56. package/src/version.ts +2 -1
@@ -1,5 +1,6 @@
1
1
  import { SupernetType } from '../../ApiClient/WebSocketClient/types';
2
2
  import { ControlNetParams } from './ControlNetParams';
3
+ import { TokenType } from '../../types/token';
3
4
 
4
5
  export interface SupportedModel {
5
6
  id: string;
@@ -141,6 +142,11 @@ export interface ProjectParams {
141
142
  * ControlNet model parameters
142
143
  */
143
144
  controlNet?: ControlNetParams;
145
+ /**
146
+ * Select which tokens to use for the project.
147
+ * If not specified, the Sogni token will be used.
148
+ */
149
+ tokenType?: TokenType;
144
150
  }
145
151
 
146
152
  export type ImageUrlParams = {
@@ -195,3 +201,5 @@ export interface EstimateRequest {
195
201
  */
196
202
  height?: number;
197
203
  }
204
+
205
+ export type EnhancementStrength = 'light' | 'medium' | 'heavy';
@@ -0,0 +1,12 @@
1
+ import { EnhancementStrength } from './types';
2
+
3
+ export function getEnhacementStrength(strength: EnhancementStrength): number {
4
+ switch (strength) {
5
+ case 'light':
6
+ return 0.15;
7
+ case 'heavy':
8
+ return 0.49;
9
+ default:
10
+ return 0.35;
11
+ }
12
+ }
@@ -4,7 +4,9 @@ export type LeaderboardType =
4
4
  | 'renderSecCompleteWorker'
5
5
  | 'renderSecCompleteArtist'
6
6
  | 'renderTokenCompleteWorker'
7
+ | 'renderTokenCompleteWorker2'
7
8
  | 'renderTokenCompleteArtist'
9
+ | 'renderTokenCompleteArtist2'
8
10
  | 'jobCompleteWorker'
9
11
  | 'jobCompleteArtist'
10
12
  | 'projectCompleteArtist'
package/src/index.ts CHANGED
@@ -18,6 +18,7 @@ import { AvailableModel, ProjectParams, Scheduler, TimeStepSpacing } from './Pro
18
18
  import StatsApi from './Stats';
19
19
  // Base Types
20
20
  import ErrorData from './types/ErrorData';
21
+ import { TokenType } from './types/token';
21
22
 
22
23
  export type {
23
24
  AvailableModel,
@@ -29,7 +30,8 @@ export type {
29
30
  ProjectStatus,
30
31
  Scheduler,
31
32
  SupernetType,
32
- TimeStepSpacing
33
+ TimeStepSpacing,
34
+ TokenType
33
35
  };
34
36
 
35
37
  export { ApiError, CurrentAccount, Job, Project };
@@ -0,0 +1 @@
1
+ export type TokenType = 'sogni' | 'spark';
package/src/version.ts CHANGED
@@ -1 +1,2 @@
1
- export const LIB_VERSION = "1.0.0-alpha.4";
1
+ import { version } from '../package.json';
2
+ export const LIB_VERSION = version;