|
1 | 1 | // @generated by Stately. DO NOT EDIT. |
2 | 2 | /* eslint-disable */ |
3 | 3 |
|
4 | | -import { createClient as createGenericClient, StatelyError } from "@stately-cloud/client"; |
| 4 | +import { createClient as createGenericClient } from '@stately-cloud/client'; |
5 | 5 | import { |
6 | 6 | ApiAppSchema, |
7 | | - GlobalSettingsSchema, |
8 | | - ItemAnnotationSchema, |
9 | | - ItemHashTagSchema, |
10 | | - LoadoutSchema, |
11 | | - LoadoutShareSchema, |
12 | | - SearchSchema, |
13 | | - SettingsSchema, |
14 | | - TriumphSchema, |
15 | 7 | ArtifactUnlocksSchema, |
16 | 8 | CollapsedSectionSchema, |
17 | 9 | CustomStatDefSchema, |
18 | | - CustomStatWeightsEntrySchema, |
19 | 10 | CustomStatsEntrySchema, |
| 11 | + CustomStatWeightsEntrySchema, |
| 12 | + GlobalSettingsSchema, |
20 | 13 | InGameLoadoutIdentifiersSchema, |
| 14 | + ItemAnnotationSchema, |
| 15 | + ItemHashTagSchema, |
21 | 16 | LoadoutItemSchema, |
22 | 17 | LoadoutParametersSchema, |
| 18 | + LoadoutSchema, |
| 19 | + LoadoutShareSchema, |
23 | 20 | ModsByBucketEntrySchema, |
| 21 | + SearchSchema, |
| 22 | + SettingsSchema, |
24 | 23 | SocketOverrideSchema, |
25 | 24 | StatConstraintSchema, |
26 | 25 | StatConstraintsEntrySchema, |
27 | | -} from "./stately_pb.js"; |
| 26 | + TriumphSchema, |
| 27 | +} from './stately_pb.js'; |
28 | 28 |
|
29 | 29 | export const typeToSchema = { |
30 | 30 | // itemTypes |
31 | | - "ApiApp": ApiAppSchema, |
32 | | - "GlobalSettings": GlobalSettingsSchema, |
33 | | - "ItemAnnotation": ItemAnnotationSchema, |
34 | | - "ItemHashTag": ItemHashTagSchema, |
35 | | - "Loadout": LoadoutSchema, |
36 | | - "LoadoutShare": LoadoutShareSchema, |
37 | | - "Search": SearchSchema, |
38 | | - "Settings": SettingsSchema, |
39 | | - "Triumph": TriumphSchema, |
| 31 | + ApiApp: ApiAppSchema, |
| 32 | + GlobalSettings: GlobalSettingsSchema, |
| 33 | + ItemAnnotation: ItemAnnotationSchema, |
| 34 | + ItemHashTag: ItemHashTagSchema, |
| 35 | + Loadout: LoadoutSchema, |
| 36 | + LoadoutShare: LoadoutShareSchema, |
| 37 | + Search: SearchSchema, |
| 38 | + Settings: SettingsSchema, |
| 39 | + Triumph: TriumphSchema, |
40 | 40 |
|
41 | 41 | // objectTypes |
42 | | - "ArtifactUnlocks": ArtifactUnlocksSchema, |
43 | | - "CollapsedSection": CollapsedSectionSchema, |
44 | | - "CustomStatDef": CustomStatDefSchema, |
45 | | - "CustomStatWeightsEntry": CustomStatWeightsEntrySchema, |
46 | | - "CustomStatsEntry": CustomStatsEntrySchema, |
47 | | - "InGameLoadoutIdentifiers": InGameLoadoutIdentifiersSchema, |
48 | | - "LoadoutItem": LoadoutItemSchema, |
49 | | - "LoadoutParameters": LoadoutParametersSchema, |
50 | | - "ModsByBucketEntry": ModsByBucketEntrySchema, |
51 | | - "SocketOverride": SocketOverrideSchema, |
52 | | - "StatConstraint": StatConstraintSchema, |
53 | | - "StatConstraintsEntry": StatConstraintsEntrySchema, |
| 42 | + ArtifactUnlocks: ArtifactUnlocksSchema, |
| 43 | + CollapsedSection: CollapsedSectionSchema, |
| 44 | + CustomStatDef: CustomStatDefSchema, |
| 45 | + CustomStatWeightsEntry: CustomStatWeightsEntrySchema, |
| 46 | + CustomStatsEntry: CustomStatsEntrySchema, |
| 47 | + InGameLoadoutIdentifiers: InGameLoadoutIdentifiersSchema, |
| 48 | + LoadoutItem: LoadoutItemSchema, |
| 49 | + LoadoutParameters: LoadoutParametersSchema, |
| 50 | + ModsByBucketEntry: ModsByBucketEntrySchema, |
| 51 | + SocketOverride: SocketOverrideSchema, |
| 52 | + StatConstraint: StatConstraintSchema, |
| 53 | + StatConstraintsEntry: StatConstraintsEntrySchema, |
54 | 54 | }; |
55 | 55 |
|
56 | | -const SCHEMA_VERSION_ID = 1 |
| 56 | +/** The version of the schema that this client was generated for. */ |
| 57 | +const SCHEMA_VERSION_ID = 2; |
57 | 58 |
|
58 | 59 | export function createClient(storeId, opts) { |
59 | | - |
60 | 60 | return createGenericClient(storeId, typeToSchema, SCHEMA_VERSION_ID, opts); |
61 | 61 | } |
| 62 | + |
| 63 | +if (createGenericClient.length < 3) { |
| 64 | + throw new Error( |
| 65 | + 'Your version of @stately-cloud/client is too old. Please update to the latest version.', |
| 66 | + ); |
| 67 | +} |
0 commit comments