@playcademy/sdk 0.2.0 → 0.2.1
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.
- package/dist/index.d.ts +1 -362
- package/dist/index.js +0 -59
- package/dist/internal.d.ts +74 -47
- package/dist/internal.js +95 -61
- package/dist/types.d.ts +38 -351
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _playcademy_realtime_server_types from '@playcademy/realtime/server/types';
|
|
2
|
-
import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
|
|
3
2
|
import * as _playcademy_timeback_types from '@playcademy/timeback/types';
|
|
3
|
+
import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
|
|
4
4
|
import { AUTH_PROVIDER_IDS } from '@playcademy/constants';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -736,166 +736,6 @@ declare const inventoryItems: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
736
736
|
};
|
|
737
737
|
dialect: "pg";
|
|
738
738
|
}>;
|
|
739
|
-
declare const gameTimebackIntegrations: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
740
|
-
name: "game_timeback_integrations";
|
|
741
|
-
schema: undefined;
|
|
742
|
-
columns: {
|
|
743
|
-
id: drizzle_orm_pg_core.PgColumn<{
|
|
744
|
-
name: "id";
|
|
745
|
-
tableName: "game_timeback_integrations";
|
|
746
|
-
dataType: "string";
|
|
747
|
-
columnType: "PgUUID";
|
|
748
|
-
data: string;
|
|
749
|
-
driverParam: string;
|
|
750
|
-
notNull: true;
|
|
751
|
-
hasDefault: true;
|
|
752
|
-
isPrimaryKey: true;
|
|
753
|
-
isAutoincrement: false;
|
|
754
|
-
hasRuntimeDefault: false;
|
|
755
|
-
enumValues: undefined;
|
|
756
|
-
baseColumn: never;
|
|
757
|
-
identity: undefined;
|
|
758
|
-
generated: undefined;
|
|
759
|
-
}, {}, {}>;
|
|
760
|
-
gameId: drizzle_orm_pg_core.PgColumn<{
|
|
761
|
-
name: "game_id";
|
|
762
|
-
tableName: "game_timeback_integrations";
|
|
763
|
-
dataType: "string";
|
|
764
|
-
columnType: "PgUUID";
|
|
765
|
-
data: string;
|
|
766
|
-
driverParam: string;
|
|
767
|
-
notNull: true;
|
|
768
|
-
hasDefault: false;
|
|
769
|
-
isPrimaryKey: false;
|
|
770
|
-
isAutoincrement: false;
|
|
771
|
-
hasRuntimeDefault: false;
|
|
772
|
-
enumValues: undefined;
|
|
773
|
-
baseColumn: never;
|
|
774
|
-
identity: undefined;
|
|
775
|
-
generated: undefined;
|
|
776
|
-
}, {}, {}>;
|
|
777
|
-
courseId: drizzle_orm_pg_core.PgColumn<{
|
|
778
|
-
name: "course_id";
|
|
779
|
-
tableName: "game_timeback_integrations";
|
|
780
|
-
dataType: "string";
|
|
781
|
-
columnType: "PgText";
|
|
782
|
-
data: string;
|
|
783
|
-
driverParam: string;
|
|
784
|
-
notNull: true;
|
|
785
|
-
hasDefault: false;
|
|
786
|
-
isPrimaryKey: false;
|
|
787
|
-
isAutoincrement: false;
|
|
788
|
-
hasRuntimeDefault: false;
|
|
789
|
-
enumValues: [string, ...string[]];
|
|
790
|
-
baseColumn: never;
|
|
791
|
-
identity: undefined;
|
|
792
|
-
generated: undefined;
|
|
793
|
-
}, {}, {}>;
|
|
794
|
-
grade: drizzle_orm_pg_core.PgColumn<{
|
|
795
|
-
name: "grade";
|
|
796
|
-
tableName: "game_timeback_integrations";
|
|
797
|
-
dataType: "number";
|
|
798
|
-
columnType: "PgInteger";
|
|
799
|
-
data: number;
|
|
800
|
-
driverParam: string | number;
|
|
801
|
-
notNull: true;
|
|
802
|
-
hasDefault: false;
|
|
803
|
-
isPrimaryKey: false;
|
|
804
|
-
isAutoincrement: false;
|
|
805
|
-
hasRuntimeDefault: false;
|
|
806
|
-
enumValues: undefined;
|
|
807
|
-
baseColumn: never;
|
|
808
|
-
identity: undefined;
|
|
809
|
-
generated: undefined;
|
|
810
|
-
}, {}, {}>;
|
|
811
|
-
subject: drizzle_orm_pg_core.PgColumn<{
|
|
812
|
-
name: "subject";
|
|
813
|
-
tableName: "game_timeback_integrations";
|
|
814
|
-
dataType: "string";
|
|
815
|
-
columnType: "PgText";
|
|
816
|
-
data: string;
|
|
817
|
-
driverParam: string;
|
|
818
|
-
notNull: true;
|
|
819
|
-
hasDefault: false;
|
|
820
|
-
isPrimaryKey: false;
|
|
821
|
-
isAutoincrement: false;
|
|
822
|
-
hasRuntimeDefault: false;
|
|
823
|
-
enumValues: [string, ...string[]];
|
|
824
|
-
baseColumn: never;
|
|
825
|
-
identity: undefined;
|
|
826
|
-
generated: undefined;
|
|
827
|
-
}, {}, {}>;
|
|
828
|
-
totalXp: drizzle_orm_pg_core.PgColumn<{
|
|
829
|
-
name: "total_xp";
|
|
830
|
-
tableName: "game_timeback_integrations";
|
|
831
|
-
dataType: "number";
|
|
832
|
-
columnType: "PgInteger";
|
|
833
|
-
data: number;
|
|
834
|
-
driverParam: string | number;
|
|
835
|
-
notNull: false;
|
|
836
|
-
hasDefault: false;
|
|
837
|
-
isPrimaryKey: false;
|
|
838
|
-
isAutoincrement: false;
|
|
839
|
-
hasRuntimeDefault: false;
|
|
840
|
-
enumValues: undefined;
|
|
841
|
-
baseColumn: never;
|
|
842
|
-
identity: undefined;
|
|
843
|
-
generated: undefined;
|
|
844
|
-
}, {}, {}>;
|
|
845
|
-
lastVerifiedAt: drizzle_orm_pg_core.PgColumn<{
|
|
846
|
-
name: "last_verified_at";
|
|
847
|
-
tableName: "game_timeback_integrations";
|
|
848
|
-
dataType: "date";
|
|
849
|
-
columnType: "PgTimestamp";
|
|
850
|
-
data: Date;
|
|
851
|
-
driverParam: string;
|
|
852
|
-
notNull: false;
|
|
853
|
-
hasDefault: false;
|
|
854
|
-
isPrimaryKey: false;
|
|
855
|
-
isAutoincrement: false;
|
|
856
|
-
hasRuntimeDefault: false;
|
|
857
|
-
enumValues: undefined;
|
|
858
|
-
baseColumn: never;
|
|
859
|
-
identity: undefined;
|
|
860
|
-
generated: undefined;
|
|
861
|
-
}, {}, {}>;
|
|
862
|
-
createdAt: drizzle_orm_pg_core.PgColumn<{
|
|
863
|
-
name: "created_at";
|
|
864
|
-
tableName: "game_timeback_integrations";
|
|
865
|
-
dataType: "date";
|
|
866
|
-
columnType: "PgTimestamp";
|
|
867
|
-
data: Date;
|
|
868
|
-
driverParam: string;
|
|
869
|
-
notNull: true;
|
|
870
|
-
hasDefault: true;
|
|
871
|
-
isPrimaryKey: false;
|
|
872
|
-
isAutoincrement: false;
|
|
873
|
-
hasRuntimeDefault: false;
|
|
874
|
-
enumValues: undefined;
|
|
875
|
-
baseColumn: never;
|
|
876
|
-
identity: undefined;
|
|
877
|
-
generated: undefined;
|
|
878
|
-
}, {}, {}>;
|
|
879
|
-
updatedAt: drizzle_orm_pg_core.PgColumn<{
|
|
880
|
-
name: "updated_at";
|
|
881
|
-
tableName: "game_timeback_integrations";
|
|
882
|
-
dataType: "date";
|
|
883
|
-
columnType: "PgTimestamp";
|
|
884
|
-
data: Date;
|
|
885
|
-
driverParam: string;
|
|
886
|
-
notNull: true;
|
|
887
|
-
hasDefault: true;
|
|
888
|
-
isPrimaryKey: false;
|
|
889
|
-
isAutoincrement: false;
|
|
890
|
-
hasRuntimeDefault: false;
|
|
891
|
-
enumValues: undefined;
|
|
892
|
-
baseColumn: never;
|
|
893
|
-
identity: undefined;
|
|
894
|
-
generated: undefined;
|
|
895
|
-
}, {}, {}>;
|
|
896
|
-
};
|
|
897
|
-
dialect: "pg";
|
|
898
|
-
}>;
|
|
899
739
|
type Item = typeof items.$inferSelect;
|
|
900
740
|
type InventoryItem = typeof inventoryItems.$inferSelect;
|
|
901
741
|
|
|
@@ -932,177 +772,6 @@ interface UserInfo {
|
|
|
932
772
|
type InventoryItemWithItem = Omit<InventoryItem, 'itemId'> & {
|
|
933
773
|
item: Item;
|
|
934
774
|
};
|
|
935
|
-
type GameTimebackIntegration = typeof gameTimebackIntegrations.$inferSelect;
|
|
936
|
-
type TodayXpResponse = {
|
|
937
|
-
xp: number;
|
|
938
|
-
date: string;
|
|
939
|
-
};
|
|
940
|
-
type TotalXpResponse = {
|
|
941
|
-
totalXp: number;
|
|
942
|
-
};
|
|
943
|
-
type XpHistoryResponse = {
|
|
944
|
-
history: Array<{
|
|
945
|
-
date: string;
|
|
946
|
-
xp: number;
|
|
947
|
-
}>;
|
|
948
|
-
};
|
|
949
|
-
type TimebackSetupRequest = {
|
|
950
|
-
gameId: string;
|
|
951
|
-
config: {
|
|
952
|
-
organization: {
|
|
953
|
-
name: string;
|
|
954
|
-
type: string;
|
|
955
|
-
identifier: string;
|
|
956
|
-
};
|
|
957
|
-
course: {
|
|
958
|
-
title: string;
|
|
959
|
-
subjects: string[];
|
|
960
|
-
grades: number[];
|
|
961
|
-
courseCode: string;
|
|
962
|
-
level: string;
|
|
963
|
-
gradingScheme: string;
|
|
964
|
-
metadata?: Record<string, unknown>;
|
|
965
|
-
};
|
|
966
|
-
component: {
|
|
967
|
-
title: string;
|
|
968
|
-
sortOrder: number;
|
|
969
|
-
prerequisites: string[];
|
|
970
|
-
prerequisiteCriteria: string;
|
|
971
|
-
};
|
|
972
|
-
resource: {
|
|
973
|
-
title: string;
|
|
974
|
-
vendorResourceId: string;
|
|
975
|
-
vendorId: string;
|
|
976
|
-
applicationId: string;
|
|
977
|
-
roles: string[];
|
|
978
|
-
importance: string;
|
|
979
|
-
metadata: {
|
|
980
|
-
type?: string;
|
|
981
|
-
launchUrl?: string;
|
|
982
|
-
toolProvider?: string;
|
|
983
|
-
instructionalMethod?: string;
|
|
984
|
-
subject?: string;
|
|
985
|
-
grades?: number[];
|
|
986
|
-
language?: string;
|
|
987
|
-
xp?: number;
|
|
988
|
-
[key: string]: unknown;
|
|
989
|
-
};
|
|
990
|
-
};
|
|
991
|
-
componentResource: {
|
|
992
|
-
title: string;
|
|
993
|
-
sortOrder: number;
|
|
994
|
-
lessonType: string | null;
|
|
995
|
-
};
|
|
996
|
-
};
|
|
997
|
-
verbose?: boolean;
|
|
998
|
-
};
|
|
999
|
-
/**
|
|
1000
|
-
* Minimal course configuration for TimeBack integration (used in user-facing config).
|
|
1001
|
-
*
|
|
1002
|
-
* NOTE: Per-course overrides (title, courseCode, level, metadata) are defined
|
|
1003
|
-
* in @playcademy/sdk/server as TimebackCourseConfigWithOverrides.
|
|
1004
|
-
* This base type only includes the minimal required fields.
|
|
1005
|
-
*
|
|
1006
|
-
* For totalXp, use metadata.metrics.totalXp (aligns with upstream TimeBack structure).
|
|
1007
|
-
*/
|
|
1008
|
-
type TimebackCourseConfig = {
|
|
1009
|
-
subject: string;
|
|
1010
|
-
grade: number;
|
|
1011
|
-
};
|
|
1012
|
-
/**
|
|
1013
|
-
* Derived course configuration after merging base + per-course overrides + templating.
|
|
1014
|
-
* This is what the CLI sends to the Platform API in PlatformTimebackSetupRequest.
|
|
1015
|
-
*/
|
|
1016
|
-
type DerivedPlatformCourseConfig = TimebackCourseConfig & {
|
|
1017
|
-
title: string;
|
|
1018
|
-
courseCode: string;
|
|
1019
|
-
level: string;
|
|
1020
|
-
metadata?: Record<string, unknown>;
|
|
1021
|
-
totalXp?: number | null;
|
|
1022
|
-
masterableUnits?: number | null;
|
|
1023
|
-
};
|
|
1024
|
-
type PlatformTimebackSetupRequest = {
|
|
1025
|
-
gameId: string;
|
|
1026
|
-
courses: DerivedPlatformCourseConfig[];
|
|
1027
|
-
baseConfig: {
|
|
1028
|
-
organization: {
|
|
1029
|
-
name: string;
|
|
1030
|
-
type: string;
|
|
1031
|
-
identifier: string;
|
|
1032
|
-
};
|
|
1033
|
-
component: {
|
|
1034
|
-
title: string;
|
|
1035
|
-
titleSuffix?: string;
|
|
1036
|
-
sortOrder: number;
|
|
1037
|
-
prerequisites: string[];
|
|
1038
|
-
prerequisiteCriteria: string;
|
|
1039
|
-
};
|
|
1040
|
-
resource: {
|
|
1041
|
-
title: string;
|
|
1042
|
-
titleSuffix?: string;
|
|
1043
|
-
vendorResourceId: string;
|
|
1044
|
-
vendorId: string;
|
|
1045
|
-
applicationId: string;
|
|
1046
|
-
roles: string[];
|
|
1047
|
-
importance: string;
|
|
1048
|
-
metadata: {
|
|
1049
|
-
type?: string;
|
|
1050
|
-
launchUrl?: string;
|
|
1051
|
-
toolProvider?: string;
|
|
1052
|
-
instructionalMethod?: string;
|
|
1053
|
-
language?: string;
|
|
1054
|
-
[key: string]: unknown;
|
|
1055
|
-
};
|
|
1056
|
-
};
|
|
1057
|
-
componentResource: {
|
|
1058
|
-
title: string;
|
|
1059
|
-
titleSuffix?: string;
|
|
1060
|
-
sortOrder: number;
|
|
1061
|
-
lessonType: string | null;
|
|
1062
|
-
};
|
|
1063
|
-
};
|
|
1064
|
-
verbose?: boolean;
|
|
1065
|
-
};
|
|
1066
|
-
type PlatformTimebackSetupResponse = {
|
|
1067
|
-
integrations: GameTimebackIntegration[];
|
|
1068
|
-
verbose?: Array<{
|
|
1069
|
-
integration: GameTimebackIntegration;
|
|
1070
|
-
config: {
|
|
1071
|
-
course: unknown;
|
|
1072
|
-
component: unknown;
|
|
1073
|
-
resource: unknown;
|
|
1074
|
-
componentResource: unknown;
|
|
1075
|
-
};
|
|
1076
|
-
}>;
|
|
1077
|
-
};
|
|
1078
|
-
type TimebackVerificationResources = {
|
|
1079
|
-
course: {
|
|
1080
|
-
found: boolean;
|
|
1081
|
-
data?: unknown;
|
|
1082
|
-
};
|
|
1083
|
-
component: {
|
|
1084
|
-
found: boolean;
|
|
1085
|
-
data?: unknown;
|
|
1086
|
-
};
|
|
1087
|
-
resource: {
|
|
1088
|
-
found: boolean;
|
|
1089
|
-
data?: unknown;
|
|
1090
|
-
};
|
|
1091
|
-
componentResource: {
|
|
1092
|
-
found: boolean;
|
|
1093
|
-
data?: unknown;
|
|
1094
|
-
};
|
|
1095
|
-
};
|
|
1096
|
-
type TimebackVerifyCourseResult = {
|
|
1097
|
-
integration: GameTimebackIntegration;
|
|
1098
|
-
resources: TimebackVerificationResources;
|
|
1099
|
-
status: 'success' | 'error';
|
|
1100
|
-
errors?: string[];
|
|
1101
|
-
};
|
|
1102
|
-
type TimebackVerifyAllResponse = {
|
|
1103
|
-
status: 'success' | 'error';
|
|
1104
|
-
results: TimebackVerifyCourseResult[];
|
|
1105
|
-
};
|
|
1106
775
|
type EndActivityResponse = {
|
|
1107
776
|
status: 'ok';
|
|
1108
777
|
courseId: string;
|
|
@@ -1113,14 +782,6 @@ type EndActivityResponse = {
|
|
|
1113
782
|
inProgress?: string;
|
|
1114
783
|
};
|
|
1115
784
|
|
|
1116
|
-
/**
|
|
1117
|
-
* Combined response type for summary method
|
|
1118
|
-
*/
|
|
1119
|
-
type XpSummaryResponse = {
|
|
1120
|
-
today: TodayXpResponse;
|
|
1121
|
-
total: TotalXpResponse;
|
|
1122
|
-
};
|
|
1123
|
-
|
|
1124
785
|
/**
|
|
1125
786
|
* Auto-initializes a PlaycademyClient with context from the environment.
|
|
1126
787
|
* Works in both iframe mode (production/development) and standalone mode (local dev).
|
|
@@ -1519,28 +1180,6 @@ declare class PlaycademyClient {
|
|
|
1519
1180
|
pauseActivity: () => void;
|
|
1520
1181
|
resumeActivity: () => void;
|
|
1521
1182
|
endActivity: (data: _playcademy_timeback_types.EndActivityScoreData) => Promise<EndActivityResponse>;
|
|
1522
|
-
management: {
|
|
1523
|
-
setup: (request: PlatformTimebackSetupRequest) => Promise<PlatformTimebackSetupResponse>;
|
|
1524
|
-
verify: (gameId: string) => Promise<TimebackVerifyAllResponse>;
|
|
1525
|
-
cleanup: (gameId: string) => Promise<void>;
|
|
1526
|
-
get: (gameId: string) => Promise<GameTimebackIntegration[]>;
|
|
1527
|
-
getConfig: (gameId: string) => Promise<TimebackSetupRequest["config"]>;
|
|
1528
|
-
};
|
|
1529
|
-
xp: {
|
|
1530
|
-
today: (options?: {
|
|
1531
|
-
date?: string;
|
|
1532
|
-
timezone?: string;
|
|
1533
|
-
}) => Promise<TodayXpResponse>;
|
|
1534
|
-
total: () => Promise<TotalXpResponse>;
|
|
1535
|
-
history: (options?: {
|
|
1536
|
-
startDate?: string;
|
|
1537
|
-
endDate?: string;
|
|
1538
|
-
}) => Promise<XpHistoryResponse>;
|
|
1539
|
-
summary: (options?: {
|
|
1540
|
-
date?: string;
|
|
1541
|
-
timezone?: string;
|
|
1542
|
-
}) => Promise<XpSummaryResponse>;
|
|
1543
|
-
};
|
|
1544
1183
|
};
|
|
1545
1184
|
/** Credits methods (credits management) */
|
|
1546
1185
|
credits: {
|
package/dist/index.js
CHANGED
|
@@ -1843,65 +1843,6 @@ function createTimebackNamespace(client) {
|
|
|
1843
1843
|
currentActivity = null;
|
|
1844
1844
|
throw error;
|
|
1845
1845
|
}
|
|
1846
|
-
},
|
|
1847
|
-
management: {
|
|
1848
|
-
setup: (request2) => {
|
|
1849
|
-
return client["request"]("/timeback/setup", "POST", {
|
|
1850
|
-
body: request2
|
|
1851
|
-
});
|
|
1852
|
-
},
|
|
1853
|
-
verify: (gameId) => {
|
|
1854
|
-
return client["request"](`/timeback/verify/${gameId}`, "GET");
|
|
1855
|
-
},
|
|
1856
|
-
cleanup: (gameId) => {
|
|
1857
|
-
return client["request"](`/timeback/integrations/${gameId}`, "DELETE");
|
|
1858
|
-
},
|
|
1859
|
-
get: (gameId) => {
|
|
1860
|
-
return client["request"](`/timeback/integrations/${gameId}`, "GET");
|
|
1861
|
-
},
|
|
1862
|
-
getConfig: (gameId) => {
|
|
1863
|
-
return client["request"](`/timeback/config/${gameId}`, "GET");
|
|
1864
|
-
}
|
|
1865
|
-
},
|
|
1866
|
-
xp: {
|
|
1867
|
-
today: async (options) => {
|
|
1868
|
-
const params = new URLSearchParams;
|
|
1869
|
-
if (options?.date)
|
|
1870
|
-
params.set("date", options.date);
|
|
1871
|
-
if (options?.timezone)
|
|
1872
|
-
params.set("tz", options.timezone);
|
|
1873
|
-
const query = params.toString();
|
|
1874
|
-
const endpoint = query ? `/timeback/xp/today?${query}` : "/timeback/xp/today";
|
|
1875
|
-
return client["request"](endpoint, "GET");
|
|
1876
|
-
},
|
|
1877
|
-
total: async () => {
|
|
1878
|
-
return client["request"]("/timeback/xp/total", "GET");
|
|
1879
|
-
},
|
|
1880
|
-
history: async (options) => {
|
|
1881
|
-
const params = new URLSearchParams;
|
|
1882
|
-
if (options?.startDate)
|
|
1883
|
-
params.set("startDate", options.startDate);
|
|
1884
|
-
if (options?.endDate)
|
|
1885
|
-
params.set("endDate", options.endDate);
|
|
1886
|
-
const query = params.toString();
|
|
1887
|
-
const endpoint = query ? `/timeback/xp/history?${query}` : "/timeback/xp/history";
|
|
1888
|
-
return client["request"](endpoint, "GET");
|
|
1889
|
-
},
|
|
1890
|
-
summary: async (options) => {
|
|
1891
|
-
const [today, total] = await Promise.all([
|
|
1892
|
-
client["request"]((() => {
|
|
1893
|
-
const params = new URLSearchParams;
|
|
1894
|
-
if (options?.date)
|
|
1895
|
-
params.set("date", options.date);
|
|
1896
|
-
if (options?.timezone)
|
|
1897
|
-
params.set("tz", options.timezone);
|
|
1898
|
-
const query = params.toString();
|
|
1899
|
-
return query ? `/timeback/xp/today?${query}` : "/timeback/xp/today";
|
|
1900
|
-
})(), "GET"),
|
|
1901
|
-
client["request"]("/timeback/xp/total", "GET")
|
|
1902
|
-
]);
|
|
1903
|
-
return { today, total };
|
|
1904
|
-
}
|
|
1905
1846
|
}
|
|
1906
1847
|
};
|
|
1907
1848
|
}
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import * as _playcademy_timeback_types from '@playcademy/timeback/types';
|
|
2
|
+
import { CourseConfig, OrganizationConfig, ComponentConfig, ResourceConfig, ComponentResourceConfig } from '@playcademy/timeback/types';
|
|
1
3
|
import * as _playcademy_realtime_server_types from '@playcademy/realtime/server/types';
|
|
2
4
|
import { InferSelectModel } from 'drizzle-orm';
|
|
3
5
|
import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
|
|
4
6
|
import * as drizzle_zod from 'drizzle-zod';
|
|
5
7
|
import { z } from 'zod';
|
|
6
|
-
import * as _playcademy_timeback_types from '@playcademy/timeback/types';
|
|
7
|
-
import { CourseConfig, OrganizationConfig, ComponentConfig, ResourceConfig, ComponentResourceConfig } from '@playcademy/timeback/types';
|
|
8
8
|
import { AUTH_PROVIDER_IDS } from '@playcademy/constants';
|
|
9
9
|
import { SchemaInfo } from '@playcademy/cloudflare';
|
|
10
10
|
|
|
@@ -4386,14 +4386,6 @@ type EndActivityResponse = {
|
|
|
4386
4386
|
inProgress?: string;
|
|
4387
4387
|
};
|
|
4388
4388
|
|
|
4389
|
-
/**
|
|
4390
|
-
* Combined response type for summary method
|
|
4391
|
-
*/
|
|
4392
|
-
type XpSummaryResponse$1 = {
|
|
4393
|
-
today: TodayXpResponse;
|
|
4394
|
-
total: TotalXpResponse;
|
|
4395
|
-
};
|
|
4396
|
-
|
|
4397
4389
|
/**
|
|
4398
4390
|
* Auto-initializes a PlaycademyClient with context from the environment.
|
|
4399
4391
|
* Works in both iframe mode (production/development) and standalone mode (local dev).
|
|
@@ -4792,28 +4784,6 @@ declare class PlaycademyClient {
|
|
|
4792
4784
|
pauseActivity: () => void;
|
|
4793
4785
|
resumeActivity: () => void;
|
|
4794
4786
|
endActivity: (data: _playcademy_timeback_types.EndActivityScoreData) => Promise<EndActivityResponse>;
|
|
4795
|
-
management: {
|
|
4796
|
-
setup: (request: PlatformTimebackSetupRequest) => Promise<PlatformTimebackSetupResponse>;
|
|
4797
|
-
verify: (gameId: string) => Promise<TimebackVerifyAllResponse>;
|
|
4798
|
-
cleanup: (gameId: string) => Promise<void>;
|
|
4799
|
-
get: (gameId: string) => Promise<GameTimebackIntegration[]>;
|
|
4800
|
-
getConfig: (gameId: string) => Promise<TimebackSetupRequest["config"]>;
|
|
4801
|
-
};
|
|
4802
|
-
xp: {
|
|
4803
|
-
today: (options?: {
|
|
4804
|
-
date?: string;
|
|
4805
|
-
timezone?: string;
|
|
4806
|
-
}) => Promise<TodayXpResponse>;
|
|
4807
|
-
total: () => Promise<TotalXpResponse>;
|
|
4808
|
-
history: (options?: {
|
|
4809
|
-
startDate?: string;
|
|
4810
|
-
endDate?: string;
|
|
4811
|
-
}) => Promise<XpHistoryResponse>;
|
|
4812
|
-
summary: (options?: {
|
|
4813
|
-
date?: string;
|
|
4814
|
-
timezone?: string;
|
|
4815
|
-
}) => Promise<XpSummaryResponse$1>;
|
|
4816
|
-
};
|
|
4817
4787
|
};
|
|
4818
4788
|
/** Credits methods (credits management) */
|
|
4819
4789
|
credits: {
|
|
@@ -5083,19 +5053,6 @@ interface ScoreSubmission {
|
|
|
5083
5053
|
achievedAt: Date;
|
|
5084
5054
|
}
|
|
5085
5055
|
|
|
5086
|
-
/**
|
|
5087
|
-
* TimeBack namespace types
|
|
5088
|
-
*/
|
|
5089
|
-
|
|
5090
|
-
/**
|
|
5091
|
-
* Combined response type for summary method
|
|
5092
|
-
*/
|
|
5093
|
-
type XpSummaryResponse = {
|
|
5094
|
-
today: TodayXpResponse;
|
|
5095
|
-
total: TotalXpResponse;
|
|
5096
|
-
history: XpHistoryResponse;
|
|
5097
|
-
};
|
|
5098
|
-
|
|
5099
5056
|
/**
|
|
5100
5057
|
* Users namespace types
|
|
5101
5058
|
*/
|
|
@@ -5255,6 +5212,41 @@ type DevUploadHooks = {
|
|
|
5255
5212
|
onClose?: () => void;
|
|
5256
5213
|
};
|
|
5257
5214
|
|
|
5215
|
+
/**
|
|
5216
|
+
* Platform TimeBack Types
|
|
5217
|
+
*
|
|
5218
|
+
* Types for TimeBack enrollment and student data on the platform side.
|
|
5219
|
+
* These are used by the cademy hub to determine which games users have access to.
|
|
5220
|
+
*/
|
|
5221
|
+
|
|
5222
|
+
/**
|
|
5223
|
+
* Enrollment data for a student in a specific game/course.
|
|
5224
|
+
* Represents the mapping between a TimeBack course and a Playcademy game.
|
|
5225
|
+
*/
|
|
5226
|
+
interface StudentEnrollment {
|
|
5227
|
+
/** The Playcademy game ID the student is enrolled in */
|
|
5228
|
+
gameId: string;
|
|
5229
|
+
/** The grade level for this enrollment */
|
|
5230
|
+
grade: number;
|
|
5231
|
+
/** The subject area (e.g., 'Math', 'Science') */
|
|
5232
|
+
subject: string;
|
|
5233
|
+
/** The TimeBack course ID */
|
|
5234
|
+
courseId: string;
|
|
5235
|
+
}
|
|
5236
|
+
/**
|
|
5237
|
+
* Response from the enrollments endpoint
|
|
5238
|
+
*/
|
|
5239
|
+
interface EnrollmentsResponse {
|
|
5240
|
+
enrollments: StudentEnrollment[];
|
|
5241
|
+
}
|
|
5242
|
+
/**
|
|
5243
|
+
* Combined response type for xp.summary() method
|
|
5244
|
+
*/
|
|
5245
|
+
interface XpSummaryResponse {
|
|
5246
|
+
today: TodayXpResponse;
|
|
5247
|
+
total: TotalXpResponse;
|
|
5248
|
+
}
|
|
5249
|
+
|
|
5258
5250
|
/**
|
|
5259
5251
|
* @fileoverview Server SDK Type Definitions
|
|
5260
5252
|
*
|
|
@@ -6561,11 +6553,46 @@ declare class PlaycademyInternalClient extends PlaycademyClient {
|
|
|
6561
6553
|
/** Scores methods */
|
|
6562
6554
|
scores: {
|
|
6563
6555
|
getByUser: (gameId: string, userId: string, options?: {
|
|
6564
|
-
limit
|
|
6556
|
+
limit
|
|
6557
|
+
/** Cross-game leaderboards (overworld) */
|
|
6558
|
+
?: number;
|
|
6565
6559
|
}) => Promise<UserScore$1[]>;
|
|
6566
6560
|
submit: (gameId: string, score: number, metadata?: Record<string, unknown>) => Promise<ScoreSubmission>;
|
|
6567
6561
|
};
|
|
6562
|
+
/** TimeBack (platform version with enrollments, game methods throw) */
|
|
6563
|
+
timeback: {
|
|
6564
|
+
startActivity: (_metadata: _playcademy_timeback_types.ActivityData) => void;
|
|
6565
|
+
pauseActivity: () => void;
|
|
6566
|
+
resumeActivity: () => void;
|
|
6567
|
+
endActivity: (_data: _playcademy_timeback_types.EndActivityScoreData) => Promise<EndActivityResponse>;
|
|
6568
|
+
management: {
|
|
6569
|
+
setup: (request: PlatformTimebackSetupRequest) => Promise<PlatformTimebackSetupResponse>;
|
|
6570
|
+
verify: (gameId: string) => Promise<TimebackVerifyAllResponse>;
|
|
6571
|
+
cleanup: (gameId: string) => Promise<void>;
|
|
6572
|
+
get: (gameId: string) => Promise<GameTimebackIntegration[]>;
|
|
6573
|
+
getConfig: (gameId: string) => Promise<TimebackSetupRequest["config"]>;
|
|
6574
|
+
};
|
|
6575
|
+
xp: {
|
|
6576
|
+
today: (options?: {
|
|
6577
|
+
date?: string;
|
|
6578
|
+
timezone?: string;
|
|
6579
|
+
}) => Promise<TodayXpResponse>;
|
|
6580
|
+
total: () => Promise<TotalXpResponse>;
|
|
6581
|
+
history: (options?: {
|
|
6582
|
+
startDate?: string;
|
|
6583
|
+
endDate?: string;
|
|
6584
|
+
}) => Promise<XpHistoryResponse>;
|
|
6585
|
+
summary: (options?: {
|
|
6586
|
+
date?: string;
|
|
6587
|
+
timezone?: string;
|
|
6588
|
+
}) => Promise<XpSummaryResponse>;
|
|
6589
|
+
};
|
|
6590
|
+
enrollments: {
|
|
6591
|
+
get: (timebackId: string, options?: TTLCacheConfig) => Promise<StudentEnrollment[]>;
|
|
6592
|
+
clearCache: (timebackId?: string) => void;
|
|
6593
|
+
};
|
|
6594
|
+
};
|
|
6568
6595
|
}
|
|
6569
6596
|
|
|
6570
6597
|
export { ApiError, ConnectionManager, ConnectionMonitor, MessageEvents, PlaycademyInternalClient as PlaycademyClient, PlaycademyError, PlaycademyInternalClient, extractApiErrorInfo, messaging };
|
|
6571
|
-
export type { Achievement, AchievementCurrent, AchievementProgressResponse, ApiErrorInfo, AuthCallbackPayload, AuthOptions, AuthProviderType, AuthResult, AuthServerMessage, AuthStateChangePayload, AuthStateUpdate, AuthenticatedUser, BetterAuthApiKey, BetterAuthApiKeyResponse, BetterAuthSignInResponse, BucketFile, CharacterComponent, CharacterComponentWithSpriteUrl, CharacterComponentsOptions, ClientConfig, ClientEvents, ConnectionMonitorConfig, ConnectionState, ConnectionStatePayload, CreateCharacterData, Currency, DevUploadEvent, DevUploadHooks, DeveloperStatusResponse, DisconnectContext, DisconnectHandler, DisplayAlertPayload, ErrorResponseBody, EventListeners, ExternalGame, FetchedGame, Game, GameContextPayload, GameLeaderboardEntry, GameSession, GameStateData, GameTokenResponse, GameUser, HostedGame, InitPayload, InventoryItem, InventoryItemWithItem, InventoryMutationResponse, Item, KeyEventPayload, LeaderboardEntry, LevelConfig, LoginResponse, ManifestV1, Map, MapElement, MapElementWithGame, MapObject, MapObjectWithItem, PlaycademyServerClientConfig, PlaycademyServerClientState, PlayerCharacter, RealtimeTokenResponse, ScoreSubmission, ShopCurrency, ShopDisplayItem, ShopViewResponse, SpriteTemplate, SpriteTemplateData, StartSessionResponse, TelemetryPayload, TodayXpResponse, TokenRefreshPayload, TokenType, TotalXpResponse, UpdateCharacterData, User, UserInfo, UserLevel, UserLevelWithConfig, UserRank, UserRankResponse, UserRoleEnumType, UserScore, XpHistoryResponse, XpSummaryResponse };
|
|
6598
|
+
export type { Achievement, AchievementCurrent, AchievementProgressResponse, ApiErrorInfo, AuthCallbackPayload, AuthOptions, AuthProviderType, AuthResult, AuthServerMessage, AuthStateChangePayload, AuthStateUpdate, AuthenticatedUser, BetterAuthApiKey, BetterAuthApiKeyResponse, BetterAuthSignInResponse, BucketFile, CharacterComponent, CharacterComponentWithSpriteUrl, CharacterComponentsOptions, ClientConfig, ClientEvents, ConnectionMonitorConfig, ConnectionState, ConnectionStatePayload, CreateCharacterData, Currency, DevUploadEvent, DevUploadHooks, DeveloperStatusResponse, DisconnectContext, DisconnectHandler, DisplayAlertPayload, EnrollmentsResponse, ErrorResponseBody, EventListeners, ExternalGame, FetchedGame, Game, GameContextPayload, GameLeaderboardEntry, GameSession, GameStateData, GameTokenResponse, GameUser, HostedGame, InitPayload, InventoryItem, InventoryItemWithItem, InventoryMutationResponse, Item, KeyEventPayload, LeaderboardEntry, LevelConfig, LoginResponse, ManifestV1, Map, MapElement, MapElementWithGame, MapObject, MapObjectWithItem, PlaycademyServerClientConfig, PlaycademyServerClientState, PlayerCharacter, RealtimeTokenResponse, ScoreSubmission, ShopCurrency, ShopDisplayItem, ShopViewResponse, SpriteTemplate, SpriteTemplateData, StartSessionResponse, StudentEnrollment, TelemetryPayload, TodayXpResponse, TokenRefreshPayload, TokenType, TotalXpResponse, UpdateCharacterData, User, UserInfo, UserLevel, UserLevelWithConfig, UserRank, UserRankResponse, UserRoleEnumType, UserScore, XpHistoryResponse, XpSummaryResponse };
|
package/dist/internal.js
CHANGED
|
@@ -1210,6 +1210,98 @@ function createScoresNamespace2(client) {
|
|
|
1210
1210
|
}
|
|
1211
1211
|
};
|
|
1212
1212
|
}
|
|
1213
|
+
// src/namespaces/platform/timeback.ts
|
|
1214
|
+
var NOT_SUPPORTED = "Activity tracking is not available on the platform client. Use the game SDK instead.";
|
|
1215
|
+
function createTimebackNamespace(client) {
|
|
1216
|
+
const enrollmentsCache = createTTLCache({
|
|
1217
|
+
ttl: 30 * 1000,
|
|
1218
|
+
keyPrefix: "platform.timeback.enrollments"
|
|
1219
|
+
});
|
|
1220
|
+
return {
|
|
1221
|
+
startActivity: (_metadata) => {
|
|
1222
|
+
throw new Error(NOT_SUPPORTED);
|
|
1223
|
+
},
|
|
1224
|
+
pauseActivity: () => {
|
|
1225
|
+
throw new Error(NOT_SUPPORTED);
|
|
1226
|
+
},
|
|
1227
|
+
resumeActivity: () => {
|
|
1228
|
+
throw new Error(NOT_SUPPORTED);
|
|
1229
|
+
},
|
|
1230
|
+
endActivity: async (_data) => {
|
|
1231
|
+
throw new Error(NOT_SUPPORTED);
|
|
1232
|
+
},
|
|
1233
|
+
management: {
|
|
1234
|
+
setup: (request2) => {
|
|
1235
|
+
return client["request"]("/timeback/setup", "POST", {
|
|
1236
|
+
body: request2
|
|
1237
|
+
});
|
|
1238
|
+
},
|
|
1239
|
+
verify: (gameId) => {
|
|
1240
|
+
return client["request"](`/timeback/verify/${gameId}`, "GET");
|
|
1241
|
+
},
|
|
1242
|
+
cleanup: (gameId) => {
|
|
1243
|
+
return client["request"](`/timeback/integrations/${gameId}`, "DELETE");
|
|
1244
|
+
},
|
|
1245
|
+
get: (gameId) => {
|
|
1246
|
+
return client["request"](`/timeback/integrations/${gameId}`, "GET");
|
|
1247
|
+
},
|
|
1248
|
+
getConfig: (gameId) => {
|
|
1249
|
+
return client["request"](`/timeback/config/${gameId}`, "GET");
|
|
1250
|
+
}
|
|
1251
|
+
},
|
|
1252
|
+
xp: {
|
|
1253
|
+
today: async (options) => {
|
|
1254
|
+
const params = new URLSearchParams;
|
|
1255
|
+
if (options?.date)
|
|
1256
|
+
params.set("date", options.date);
|
|
1257
|
+
if (options?.timezone)
|
|
1258
|
+
params.set("tz", options.timezone);
|
|
1259
|
+
const query = params.toString();
|
|
1260
|
+
const endpoint = query ? `/timeback/xp/today?${query}` : "/timeback/xp/today";
|
|
1261
|
+
return client["request"](endpoint, "GET");
|
|
1262
|
+
},
|
|
1263
|
+
total: async () => {
|
|
1264
|
+
return client["request"]("/timeback/xp/total", "GET");
|
|
1265
|
+
},
|
|
1266
|
+
history: async (options) => {
|
|
1267
|
+
const params = new URLSearchParams;
|
|
1268
|
+
if (options?.startDate)
|
|
1269
|
+
params.set("startDate", options.startDate);
|
|
1270
|
+
if (options?.endDate)
|
|
1271
|
+
params.set("endDate", options.endDate);
|
|
1272
|
+
const query = params.toString();
|
|
1273
|
+
const endpoint = query ? `/timeback/xp/history?${query}` : "/timeback/xp/history";
|
|
1274
|
+
return client["request"](endpoint, "GET");
|
|
1275
|
+
},
|
|
1276
|
+
summary: async (options) => {
|
|
1277
|
+
const [today, total] = await Promise.all([
|
|
1278
|
+
client["request"]((() => {
|
|
1279
|
+
const params = new URLSearchParams;
|
|
1280
|
+
if (options?.date)
|
|
1281
|
+
params.set("date", options.date);
|
|
1282
|
+
if (options?.timezone)
|
|
1283
|
+
params.set("tz", options.timezone);
|
|
1284
|
+
const query = params.toString();
|
|
1285
|
+
return query ? `/timeback/xp/today?${query}` : "/timeback/xp/today";
|
|
1286
|
+
})(), "GET"),
|
|
1287
|
+
client["request"]("/timeback/xp/total", "GET")
|
|
1288
|
+
]);
|
|
1289
|
+
return { today, total };
|
|
1290
|
+
}
|
|
1291
|
+
},
|
|
1292
|
+
enrollments: {
|
|
1293
|
+
get: async (timebackId, options) => {
|
|
1294
|
+
return enrollmentsCache.get(timebackId, async () => {
|
|
1295
|
+
const response = await client["request"](`/timeback/enrollments/${timebackId}`, "GET");
|
|
1296
|
+
return response.enrollments;
|
|
1297
|
+
}, options);
|
|
1298
|
+
},
|
|
1299
|
+
clearCache: (timebackId) => {
|
|
1300
|
+
enrollmentsCache.clear(timebackId);
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
};
|
|
1304
|
+
}
|
|
1213
1305
|
// src/core/auth/strategies.ts
|
|
1214
1306
|
class ApiKeyAuth {
|
|
1215
1307
|
apiKey;
|
|
@@ -2623,7 +2715,7 @@ function createRealtimeNamespace(client) {
|
|
|
2623
2715
|
};
|
|
2624
2716
|
}
|
|
2625
2717
|
// src/namespaces/game/timeback.ts
|
|
2626
|
-
function
|
|
2718
|
+
function createTimebackNamespace2(client) {
|
|
2627
2719
|
let currentActivity = null;
|
|
2628
2720
|
return {
|
|
2629
2721
|
startActivity: (metadata) => {
|
|
@@ -2688,65 +2780,6 @@ function createTimebackNamespace(client) {
|
|
|
2688
2780
|
currentActivity = null;
|
|
2689
2781
|
throw error;
|
|
2690
2782
|
}
|
|
2691
|
-
},
|
|
2692
|
-
management: {
|
|
2693
|
-
setup: (request2) => {
|
|
2694
|
-
return client["request"]("/timeback/setup", "POST", {
|
|
2695
|
-
body: request2
|
|
2696
|
-
});
|
|
2697
|
-
},
|
|
2698
|
-
verify: (gameId) => {
|
|
2699
|
-
return client["request"](`/timeback/verify/${gameId}`, "GET");
|
|
2700
|
-
},
|
|
2701
|
-
cleanup: (gameId) => {
|
|
2702
|
-
return client["request"](`/timeback/integrations/${gameId}`, "DELETE");
|
|
2703
|
-
},
|
|
2704
|
-
get: (gameId) => {
|
|
2705
|
-
return client["request"](`/timeback/integrations/${gameId}`, "GET");
|
|
2706
|
-
},
|
|
2707
|
-
getConfig: (gameId) => {
|
|
2708
|
-
return client["request"](`/timeback/config/${gameId}`, "GET");
|
|
2709
|
-
}
|
|
2710
|
-
},
|
|
2711
|
-
xp: {
|
|
2712
|
-
today: async (options) => {
|
|
2713
|
-
const params = new URLSearchParams;
|
|
2714
|
-
if (options?.date)
|
|
2715
|
-
params.set("date", options.date);
|
|
2716
|
-
if (options?.timezone)
|
|
2717
|
-
params.set("tz", options.timezone);
|
|
2718
|
-
const query = params.toString();
|
|
2719
|
-
const endpoint = query ? `/timeback/xp/today?${query}` : "/timeback/xp/today";
|
|
2720
|
-
return client["request"](endpoint, "GET");
|
|
2721
|
-
},
|
|
2722
|
-
total: async () => {
|
|
2723
|
-
return client["request"]("/timeback/xp/total", "GET");
|
|
2724
|
-
},
|
|
2725
|
-
history: async (options) => {
|
|
2726
|
-
const params = new URLSearchParams;
|
|
2727
|
-
if (options?.startDate)
|
|
2728
|
-
params.set("startDate", options.startDate);
|
|
2729
|
-
if (options?.endDate)
|
|
2730
|
-
params.set("endDate", options.endDate);
|
|
2731
|
-
const query = params.toString();
|
|
2732
|
-
const endpoint = query ? `/timeback/xp/history?${query}` : "/timeback/xp/history";
|
|
2733
|
-
return client["request"](endpoint, "GET");
|
|
2734
|
-
},
|
|
2735
|
-
summary: async (options) => {
|
|
2736
|
-
const [today, total] = await Promise.all([
|
|
2737
|
-
client["request"]((() => {
|
|
2738
|
-
const params = new URLSearchParams;
|
|
2739
|
-
if (options?.date)
|
|
2740
|
-
params.set("date", options.date);
|
|
2741
|
-
if (options?.timezone)
|
|
2742
|
-
params.set("tz", options.timezone);
|
|
2743
|
-
const query = params.toString();
|
|
2744
|
-
return query ? `/timeback/xp/today?${query}` : "/timeback/xp/today";
|
|
2745
|
-
})(), "GET"),
|
|
2746
|
-
client["request"]("/timeback/xp/total", "GET")
|
|
2747
|
-
]);
|
|
2748
|
-
return { today, total };
|
|
2749
|
-
}
|
|
2750
2783
|
}
|
|
2751
2784
|
};
|
|
2752
2785
|
}
|
|
@@ -2932,7 +2965,7 @@ class PlaycademyClient {
|
|
|
2932
2965
|
identity = createIdentityNamespace(this);
|
|
2933
2966
|
runtime = createRuntimeNamespace(this);
|
|
2934
2967
|
users = createUsersNamespace(this);
|
|
2935
|
-
timeback =
|
|
2968
|
+
timeback = createTimebackNamespace2(this);
|
|
2936
2969
|
credits = createCreditsNamespace(this);
|
|
2937
2970
|
scores = createScoresNamespace(this);
|
|
2938
2971
|
realtime = createRealtimeNamespace(this);
|
|
@@ -2958,6 +2991,7 @@ class PlaycademyInternalClient extends PlaycademyClient {
|
|
|
2958
2991
|
sprites = createSpritesNamespace(this);
|
|
2959
2992
|
telemetry = createTelemetryNamespace(this);
|
|
2960
2993
|
scores = createScoresNamespace2(this);
|
|
2994
|
+
timeback = createTimebackNamespace(this);
|
|
2961
2995
|
}
|
|
2962
2996
|
export {
|
|
2963
2997
|
messaging,
|
package/dist/types.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _playcademy_realtime_server_types from '@playcademy/realtime/server/types';
|
|
2
|
-
import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
|
|
3
|
-
import { z } from 'zod';
|
|
4
2
|
import * as _playcademy_timeback_types from '@playcademy/timeback/types';
|
|
5
3
|
import { CourseConfig, OrganizationConfig, ComponentConfig, ResourceConfig, ComponentResourceConfig } from '@playcademy/timeback/types';
|
|
4
|
+
import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
|
|
5
|
+
import { z } from 'zod';
|
|
6
6
|
import { AUTH_PROVIDER_IDS } from '@playcademy/constants';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -2121,166 +2121,6 @@ declare const playerCharacterAccessories: drizzle_orm_pg_core.PgTableWithColumns
|
|
|
2121
2121
|
};
|
|
2122
2122
|
dialect: "pg";
|
|
2123
2123
|
}>;
|
|
2124
|
-
declare const gameTimebackIntegrations: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
2125
|
-
name: "game_timeback_integrations";
|
|
2126
|
-
schema: undefined;
|
|
2127
|
-
columns: {
|
|
2128
|
-
id: drizzle_orm_pg_core.PgColumn<{
|
|
2129
|
-
name: "id";
|
|
2130
|
-
tableName: "game_timeback_integrations";
|
|
2131
|
-
dataType: "string";
|
|
2132
|
-
columnType: "PgUUID";
|
|
2133
|
-
data: string;
|
|
2134
|
-
driverParam: string;
|
|
2135
|
-
notNull: true;
|
|
2136
|
-
hasDefault: true;
|
|
2137
|
-
isPrimaryKey: true;
|
|
2138
|
-
isAutoincrement: false;
|
|
2139
|
-
hasRuntimeDefault: false;
|
|
2140
|
-
enumValues: undefined;
|
|
2141
|
-
baseColumn: never;
|
|
2142
|
-
identity: undefined;
|
|
2143
|
-
generated: undefined;
|
|
2144
|
-
}, {}, {}>;
|
|
2145
|
-
gameId: drizzle_orm_pg_core.PgColumn<{
|
|
2146
|
-
name: "game_id";
|
|
2147
|
-
tableName: "game_timeback_integrations";
|
|
2148
|
-
dataType: "string";
|
|
2149
|
-
columnType: "PgUUID";
|
|
2150
|
-
data: string;
|
|
2151
|
-
driverParam: string;
|
|
2152
|
-
notNull: true;
|
|
2153
|
-
hasDefault: false;
|
|
2154
|
-
isPrimaryKey: false;
|
|
2155
|
-
isAutoincrement: false;
|
|
2156
|
-
hasRuntimeDefault: false;
|
|
2157
|
-
enumValues: undefined;
|
|
2158
|
-
baseColumn: never;
|
|
2159
|
-
identity: undefined;
|
|
2160
|
-
generated: undefined;
|
|
2161
|
-
}, {}, {}>;
|
|
2162
|
-
courseId: drizzle_orm_pg_core.PgColumn<{
|
|
2163
|
-
name: "course_id";
|
|
2164
|
-
tableName: "game_timeback_integrations";
|
|
2165
|
-
dataType: "string";
|
|
2166
|
-
columnType: "PgText";
|
|
2167
|
-
data: string;
|
|
2168
|
-
driverParam: string;
|
|
2169
|
-
notNull: true;
|
|
2170
|
-
hasDefault: false;
|
|
2171
|
-
isPrimaryKey: false;
|
|
2172
|
-
isAutoincrement: false;
|
|
2173
|
-
hasRuntimeDefault: false;
|
|
2174
|
-
enumValues: [string, ...string[]];
|
|
2175
|
-
baseColumn: never;
|
|
2176
|
-
identity: undefined;
|
|
2177
|
-
generated: undefined;
|
|
2178
|
-
}, {}, {}>;
|
|
2179
|
-
grade: drizzle_orm_pg_core.PgColumn<{
|
|
2180
|
-
name: "grade";
|
|
2181
|
-
tableName: "game_timeback_integrations";
|
|
2182
|
-
dataType: "number";
|
|
2183
|
-
columnType: "PgInteger";
|
|
2184
|
-
data: number;
|
|
2185
|
-
driverParam: string | number;
|
|
2186
|
-
notNull: true;
|
|
2187
|
-
hasDefault: false;
|
|
2188
|
-
isPrimaryKey: false;
|
|
2189
|
-
isAutoincrement: false;
|
|
2190
|
-
hasRuntimeDefault: false;
|
|
2191
|
-
enumValues: undefined;
|
|
2192
|
-
baseColumn: never;
|
|
2193
|
-
identity: undefined;
|
|
2194
|
-
generated: undefined;
|
|
2195
|
-
}, {}, {}>;
|
|
2196
|
-
subject: drizzle_orm_pg_core.PgColumn<{
|
|
2197
|
-
name: "subject";
|
|
2198
|
-
tableName: "game_timeback_integrations";
|
|
2199
|
-
dataType: "string";
|
|
2200
|
-
columnType: "PgText";
|
|
2201
|
-
data: string;
|
|
2202
|
-
driverParam: string;
|
|
2203
|
-
notNull: true;
|
|
2204
|
-
hasDefault: false;
|
|
2205
|
-
isPrimaryKey: false;
|
|
2206
|
-
isAutoincrement: false;
|
|
2207
|
-
hasRuntimeDefault: false;
|
|
2208
|
-
enumValues: [string, ...string[]];
|
|
2209
|
-
baseColumn: never;
|
|
2210
|
-
identity: undefined;
|
|
2211
|
-
generated: undefined;
|
|
2212
|
-
}, {}, {}>;
|
|
2213
|
-
totalXp: drizzle_orm_pg_core.PgColumn<{
|
|
2214
|
-
name: "total_xp";
|
|
2215
|
-
tableName: "game_timeback_integrations";
|
|
2216
|
-
dataType: "number";
|
|
2217
|
-
columnType: "PgInteger";
|
|
2218
|
-
data: number;
|
|
2219
|
-
driverParam: string | number;
|
|
2220
|
-
notNull: false;
|
|
2221
|
-
hasDefault: false;
|
|
2222
|
-
isPrimaryKey: false;
|
|
2223
|
-
isAutoincrement: false;
|
|
2224
|
-
hasRuntimeDefault: false;
|
|
2225
|
-
enumValues: undefined;
|
|
2226
|
-
baseColumn: never;
|
|
2227
|
-
identity: undefined;
|
|
2228
|
-
generated: undefined;
|
|
2229
|
-
}, {}, {}>;
|
|
2230
|
-
lastVerifiedAt: drizzle_orm_pg_core.PgColumn<{
|
|
2231
|
-
name: "last_verified_at";
|
|
2232
|
-
tableName: "game_timeback_integrations";
|
|
2233
|
-
dataType: "date";
|
|
2234
|
-
columnType: "PgTimestamp";
|
|
2235
|
-
data: Date;
|
|
2236
|
-
driverParam: string;
|
|
2237
|
-
notNull: false;
|
|
2238
|
-
hasDefault: false;
|
|
2239
|
-
isPrimaryKey: false;
|
|
2240
|
-
isAutoincrement: false;
|
|
2241
|
-
hasRuntimeDefault: false;
|
|
2242
|
-
enumValues: undefined;
|
|
2243
|
-
baseColumn: never;
|
|
2244
|
-
identity: undefined;
|
|
2245
|
-
generated: undefined;
|
|
2246
|
-
}, {}, {}>;
|
|
2247
|
-
createdAt: drizzle_orm_pg_core.PgColumn<{
|
|
2248
|
-
name: "created_at";
|
|
2249
|
-
tableName: "game_timeback_integrations";
|
|
2250
|
-
dataType: "date";
|
|
2251
|
-
columnType: "PgTimestamp";
|
|
2252
|
-
data: Date;
|
|
2253
|
-
driverParam: string;
|
|
2254
|
-
notNull: true;
|
|
2255
|
-
hasDefault: true;
|
|
2256
|
-
isPrimaryKey: false;
|
|
2257
|
-
isAutoincrement: false;
|
|
2258
|
-
hasRuntimeDefault: false;
|
|
2259
|
-
enumValues: undefined;
|
|
2260
|
-
baseColumn: never;
|
|
2261
|
-
identity: undefined;
|
|
2262
|
-
generated: undefined;
|
|
2263
|
-
}, {}, {}>;
|
|
2264
|
-
updatedAt: drizzle_orm_pg_core.PgColumn<{
|
|
2265
|
-
name: "updated_at";
|
|
2266
|
-
tableName: "game_timeback_integrations";
|
|
2267
|
-
dataType: "date";
|
|
2268
|
-
columnType: "PgTimestamp";
|
|
2269
|
-
data: Date;
|
|
2270
|
-
driverParam: string;
|
|
2271
|
-
notNull: true;
|
|
2272
|
-
hasDefault: true;
|
|
2273
|
-
isPrimaryKey: false;
|
|
2274
|
-
isAutoincrement: false;
|
|
2275
|
-
hasRuntimeDefault: false;
|
|
2276
|
-
enumValues: undefined;
|
|
2277
|
-
baseColumn: never;
|
|
2278
|
-
identity: undefined;
|
|
2279
|
-
generated: undefined;
|
|
2280
|
-
}, {}, {}>;
|
|
2281
|
-
};
|
|
2282
|
-
dialect: "pg";
|
|
2283
|
-
}>;
|
|
2284
2124
|
|
|
2285
2125
|
declare const achievementScopeEnum: drizzle_orm_pg_core.PgEnum<["daily", "weekly", "monthly", "yearly", "game", "global", "map", "level", "event"]>;
|
|
2286
2126
|
declare const achievements: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
@@ -2830,7 +2670,6 @@ interface SpriteTemplateData {
|
|
|
2830
2670
|
};
|
|
2831
2671
|
};
|
|
2832
2672
|
}
|
|
2833
|
-
type GameTimebackIntegration = typeof gameTimebackIntegrations.$inferSelect;
|
|
2834
2673
|
type TodayXpResponse = {
|
|
2835
2674
|
xp: number;
|
|
2836
2675
|
date: string;
|
|
@@ -2844,56 +2683,6 @@ type XpHistoryResponse = {
|
|
|
2844
2683
|
xp: number;
|
|
2845
2684
|
}>;
|
|
2846
2685
|
};
|
|
2847
|
-
type TimebackSetupRequest = {
|
|
2848
|
-
gameId: string;
|
|
2849
|
-
config: {
|
|
2850
|
-
organization: {
|
|
2851
|
-
name: string;
|
|
2852
|
-
type: string;
|
|
2853
|
-
identifier: string;
|
|
2854
|
-
};
|
|
2855
|
-
course: {
|
|
2856
|
-
title: string;
|
|
2857
|
-
subjects: string[];
|
|
2858
|
-
grades: number[];
|
|
2859
|
-
courseCode: string;
|
|
2860
|
-
level: string;
|
|
2861
|
-
gradingScheme: string;
|
|
2862
|
-
metadata?: Record<string, unknown>;
|
|
2863
|
-
};
|
|
2864
|
-
component: {
|
|
2865
|
-
title: string;
|
|
2866
|
-
sortOrder: number;
|
|
2867
|
-
prerequisites: string[];
|
|
2868
|
-
prerequisiteCriteria: string;
|
|
2869
|
-
};
|
|
2870
|
-
resource: {
|
|
2871
|
-
title: string;
|
|
2872
|
-
vendorResourceId: string;
|
|
2873
|
-
vendorId: string;
|
|
2874
|
-
applicationId: string;
|
|
2875
|
-
roles: string[];
|
|
2876
|
-
importance: string;
|
|
2877
|
-
metadata: {
|
|
2878
|
-
type?: string;
|
|
2879
|
-
launchUrl?: string;
|
|
2880
|
-
toolProvider?: string;
|
|
2881
|
-
instructionalMethod?: string;
|
|
2882
|
-
subject?: string;
|
|
2883
|
-
grades?: number[];
|
|
2884
|
-
language?: string;
|
|
2885
|
-
xp?: number;
|
|
2886
|
-
[key: string]: unknown;
|
|
2887
|
-
};
|
|
2888
|
-
};
|
|
2889
|
-
componentResource: {
|
|
2890
|
-
title: string;
|
|
2891
|
-
sortOrder: number;
|
|
2892
|
-
lessonType: string | null;
|
|
2893
|
-
};
|
|
2894
|
-
};
|
|
2895
|
-
verbose?: boolean;
|
|
2896
|
-
};
|
|
2897
2686
|
/**
|
|
2898
2687
|
* Minimal course configuration for TimeBack integration (used in user-facing config).
|
|
2899
2688
|
*
|
|
@@ -2907,100 +2696,6 @@ type TimebackCourseConfig = {
|
|
|
2907
2696
|
subject: string;
|
|
2908
2697
|
grade: number;
|
|
2909
2698
|
};
|
|
2910
|
-
/**
|
|
2911
|
-
* Derived course configuration after merging base + per-course overrides + templating.
|
|
2912
|
-
* This is what the CLI sends to the Platform API in PlatformTimebackSetupRequest.
|
|
2913
|
-
*/
|
|
2914
|
-
type DerivedPlatformCourseConfig = TimebackCourseConfig & {
|
|
2915
|
-
title: string;
|
|
2916
|
-
courseCode: string;
|
|
2917
|
-
level: string;
|
|
2918
|
-
metadata?: Record<string, unknown>;
|
|
2919
|
-
totalXp?: number | null;
|
|
2920
|
-
masterableUnits?: number | null;
|
|
2921
|
-
};
|
|
2922
|
-
type PlatformTimebackSetupRequest = {
|
|
2923
|
-
gameId: string;
|
|
2924
|
-
courses: DerivedPlatformCourseConfig[];
|
|
2925
|
-
baseConfig: {
|
|
2926
|
-
organization: {
|
|
2927
|
-
name: string;
|
|
2928
|
-
type: string;
|
|
2929
|
-
identifier: string;
|
|
2930
|
-
};
|
|
2931
|
-
component: {
|
|
2932
|
-
title: string;
|
|
2933
|
-
titleSuffix?: string;
|
|
2934
|
-
sortOrder: number;
|
|
2935
|
-
prerequisites: string[];
|
|
2936
|
-
prerequisiteCriteria: string;
|
|
2937
|
-
};
|
|
2938
|
-
resource: {
|
|
2939
|
-
title: string;
|
|
2940
|
-
titleSuffix?: string;
|
|
2941
|
-
vendorResourceId: string;
|
|
2942
|
-
vendorId: string;
|
|
2943
|
-
applicationId: string;
|
|
2944
|
-
roles: string[];
|
|
2945
|
-
importance: string;
|
|
2946
|
-
metadata: {
|
|
2947
|
-
type?: string;
|
|
2948
|
-
launchUrl?: string;
|
|
2949
|
-
toolProvider?: string;
|
|
2950
|
-
instructionalMethod?: string;
|
|
2951
|
-
language?: string;
|
|
2952
|
-
[key: string]: unknown;
|
|
2953
|
-
};
|
|
2954
|
-
};
|
|
2955
|
-
componentResource: {
|
|
2956
|
-
title: string;
|
|
2957
|
-
titleSuffix?: string;
|
|
2958
|
-
sortOrder: number;
|
|
2959
|
-
lessonType: string | null;
|
|
2960
|
-
};
|
|
2961
|
-
};
|
|
2962
|
-
verbose?: boolean;
|
|
2963
|
-
};
|
|
2964
|
-
type PlatformTimebackSetupResponse = {
|
|
2965
|
-
integrations: GameTimebackIntegration[];
|
|
2966
|
-
verbose?: Array<{
|
|
2967
|
-
integration: GameTimebackIntegration;
|
|
2968
|
-
config: {
|
|
2969
|
-
course: unknown;
|
|
2970
|
-
component: unknown;
|
|
2971
|
-
resource: unknown;
|
|
2972
|
-
componentResource: unknown;
|
|
2973
|
-
};
|
|
2974
|
-
}>;
|
|
2975
|
-
};
|
|
2976
|
-
type TimebackVerificationResources = {
|
|
2977
|
-
course: {
|
|
2978
|
-
found: boolean;
|
|
2979
|
-
data?: unknown;
|
|
2980
|
-
};
|
|
2981
|
-
component: {
|
|
2982
|
-
found: boolean;
|
|
2983
|
-
data?: unknown;
|
|
2984
|
-
};
|
|
2985
|
-
resource: {
|
|
2986
|
-
found: boolean;
|
|
2987
|
-
data?: unknown;
|
|
2988
|
-
};
|
|
2989
|
-
componentResource: {
|
|
2990
|
-
found: boolean;
|
|
2991
|
-
data?: unknown;
|
|
2992
|
-
};
|
|
2993
|
-
};
|
|
2994
|
-
type TimebackVerifyCourseResult = {
|
|
2995
|
-
integration: GameTimebackIntegration;
|
|
2996
|
-
resources: TimebackVerificationResources;
|
|
2997
|
-
status: 'success' | 'error';
|
|
2998
|
-
errors?: string[];
|
|
2999
|
-
};
|
|
3000
|
-
type TimebackVerifyAllResponse = {
|
|
3001
|
-
status: 'success' | 'error';
|
|
3002
|
-
results: TimebackVerifyCourseResult[];
|
|
3003
|
-
};
|
|
3004
2699
|
type EndActivityResponse = {
|
|
3005
2700
|
status: 'ok';
|
|
3006
2701
|
courseId: string;
|
|
@@ -3011,14 +2706,6 @@ type EndActivityResponse = {
|
|
|
3011
2706
|
inProgress?: string;
|
|
3012
2707
|
};
|
|
3013
2708
|
|
|
3014
|
-
/**
|
|
3015
|
-
* Combined response type for summary method
|
|
3016
|
-
*/
|
|
3017
|
-
type XpSummaryResponse$1 = {
|
|
3018
|
-
today: TodayXpResponse;
|
|
3019
|
-
total: TotalXpResponse;
|
|
3020
|
-
};
|
|
3021
|
-
|
|
3022
2709
|
/**
|
|
3023
2710
|
* Connection monitoring types
|
|
3024
2711
|
*
|
|
@@ -3577,28 +3264,6 @@ declare class PlaycademyClient {
|
|
|
3577
3264
|
pauseActivity: () => void;
|
|
3578
3265
|
resumeActivity: () => void;
|
|
3579
3266
|
endActivity: (data: _playcademy_timeback_types.EndActivityScoreData) => Promise<EndActivityResponse>;
|
|
3580
|
-
management: {
|
|
3581
|
-
setup: (request: PlatformTimebackSetupRequest) => Promise<PlatformTimebackSetupResponse>;
|
|
3582
|
-
verify: (gameId: string) => Promise<TimebackVerifyAllResponse>;
|
|
3583
|
-
cleanup: (gameId: string) => Promise<void>;
|
|
3584
|
-
get: (gameId: string) => Promise<GameTimebackIntegration[]>;
|
|
3585
|
-
getConfig: (gameId: string) => Promise<TimebackSetupRequest["config"]>;
|
|
3586
|
-
};
|
|
3587
|
-
xp: {
|
|
3588
|
-
today: (options?: {
|
|
3589
|
-
date?: string;
|
|
3590
|
-
timezone?: string;
|
|
3591
|
-
}) => Promise<TodayXpResponse>;
|
|
3592
|
-
total: () => Promise<TotalXpResponse>;
|
|
3593
|
-
history: (options?: {
|
|
3594
|
-
startDate?: string;
|
|
3595
|
-
endDate?: string;
|
|
3596
|
-
}) => Promise<XpHistoryResponse>;
|
|
3597
|
-
summary: (options?: {
|
|
3598
|
-
date?: string;
|
|
3599
|
-
timezone?: string;
|
|
3600
|
-
}) => Promise<XpSummaryResponse$1>;
|
|
3601
|
-
};
|
|
3602
3267
|
};
|
|
3603
3268
|
/** Credits methods (credits management) */
|
|
3604
3269
|
credits: {
|
|
@@ -3868,19 +3533,6 @@ interface ScoreSubmission {
|
|
|
3868
3533
|
achievedAt: Date;
|
|
3869
3534
|
}
|
|
3870
3535
|
|
|
3871
|
-
/**
|
|
3872
|
-
* TimeBack namespace types
|
|
3873
|
-
*/
|
|
3874
|
-
|
|
3875
|
-
/**
|
|
3876
|
-
* Combined response type for summary method
|
|
3877
|
-
*/
|
|
3878
|
-
type XpSummaryResponse = {
|
|
3879
|
-
today: TodayXpResponse;
|
|
3880
|
-
total: TotalXpResponse;
|
|
3881
|
-
history: XpHistoryResponse;
|
|
3882
|
-
};
|
|
3883
|
-
|
|
3884
3536
|
/**
|
|
3885
3537
|
* Users namespace types
|
|
3886
3538
|
*/
|
|
@@ -4040,6 +3692,41 @@ type DevUploadHooks = {
|
|
|
4040
3692
|
onClose?: () => void;
|
|
4041
3693
|
};
|
|
4042
3694
|
|
|
3695
|
+
/**
|
|
3696
|
+
* Platform TimeBack Types
|
|
3697
|
+
*
|
|
3698
|
+
* Types for TimeBack enrollment and student data on the platform side.
|
|
3699
|
+
* These are used by the cademy hub to determine which games users have access to.
|
|
3700
|
+
*/
|
|
3701
|
+
|
|
3702
|
+
/**
|
|
3703
|
+
* Enrollment data for a student in a specific game/course.
|
|
3704
|
+
* Represents the mapping between a TimeBack course and a Playcademy game.
|
|
3705
|
+
*/
|
|
3706
|
+
interface StudentEnrollment {
|
|
3707
|
+
/** The Playcademy game ID the student is enrolled in */
|
|
3708
|
+
gameId: string;
|
|
3709
|
+
/** The grade level for this enrollment */
|
|
3710
|
+
grade: number;
|
|
3711
|
+
/** The subject area (e.g., 'Math', 'Science') */
|
|
3712
|
+
subject: string;
|
|
3713
|
+
/** The TimeBack course ID */
|
|
3714
|
+
courseId: string;
|
|
3715
|
+
}
|
|
3716
|
+
/**
|
|
3717
|
+
* Response from the enrollments endpoint
|
|
3718
|
+
*/
|
|
3719
|
+
interface EnrollmentsResponse {
|
|
3720
|
+
enrollments: StudentEnrollment[];
|
|
3721
|
+
}
|
|
3722
|
+
/**
|
|
3723
|
+
* Combined response type for xp.summary() method
|
|
3724
|
+
*/
|
|
3725
|
+
interface XpSummaryResponse {
|
|
3726
|
+
today: TodayXpResponse;
|
|
3727
|
+
total: TotalXpResponse;
|
|
3728
|
+
}
|
|
3729
|
+
|
|
4043
3730
|
/**
|
|
4044
3731
|
* @fileoverview Server SDK Type Definitions
|
|
4045
3732
|
*
|
|
@@ -4219,4 +3906,4 @@ interface PlaycademyServerClientState {
|
|
|
4219
3906
|
}
|
|
4220
3907
|
|
|
4221
3908
|
export { PlaycademyClient };
|
|
4222
|
-
export type { Achievement, AchievementCurrent, AchievementProgressResponse, AuthCallbackPayload, AuthOptions, AuthProviderType, AuthResult, AuthServerMessage, AuthStateChangePayload, AuthStateUpdate, AuthenticatedUser, BetterAuthApiKey, BetterAuthApiKeyResponse, BetterAuthSignInResponse, BucketFile, CharacterComponent, CharacterComponentWithSpriteUrl, CharacterComponentsOptions, ClientConfig, ClientEvents, ConnectionStatePayload, CreateCharacterData, Currency, DevUploadEvent, DevUploadHooks, DeveloperStatusResponse, DisconnectContext, DisconnectHandler, DisplayAlertPayload, EventListeners, ExternalGame, FetchedGame, Game, GameContextPayload, GameLeaderboardEntry, GameSession, GameStateData, GameTokenResponse, GameUser, HostedGame, InitPayload, InventoryItem, InventoryItemWithItem, InventoryMutationResponse, Item, KeyEventPayload, LeaderboardEntry, LevelConfig, LoginResponse, ManifestV1, Map, MapElement, MapElementWithGame, MapObject, MapObjectWithItem, PlaycademyServerClientConfig, PlaycademyServerClientState, PlayerCharacter, RealtimeTokenResponse, ScoreSubmission, ShopCurrency, ShopDisplayItem, ShopViewResponse, SpriteTemplate, SpriteTemplateData, StartSessionResponse, TelemetryPayload, TodayXpResponse, TokenRefreshPayload, TokenType, TotalXpResponse, UpdateCharacterData, User, UserInfo, UserLevel, UserLevelWithConfig, UserRank, UserRankResponse, UserRoleEnumType, UserScore, XpHistoryResponse, XpSummaryResponse };
|
|
3909
|
+
export type { Achievement, AchievementCurrent, AchievementProgressResponse, AuthCallbackPayload, AuthOptions, AuthProviderType, AuthResult, AuthServerMessage, AuthStateChangePayload, AuthStateUpdate, AuthenticatedUser, BetterAuthApiKey, BetterAuthApiKeyResponse, BetterAuthSignInResponse, BucketFile, CharacterComponent, CharacterComponentWithSpriteUrl, CharacterComponentsOptions, ClientConfig, ClientEvents, ConnectionStatePayload, CreateCharacterData, Currency, DevUploadEvent, DevUploadHooks, DeveloperStatusResponse, DisconnectContext, DisconnectHandler, DisplayAlertPayload, EnrollmentsResponse, EventListeners, ExternalGame, FetchedGame, Game, GameContextPayload, GameLeaderboardEntry, GameSession, GameStateData, GameTokenResponse, GameUser, HostedGame, InitPayload, InventoryItem, InventoryItemWithItem, InventoryMutationResponse, Item, KeyEventPayload, LeaderboardEntry, LevelConfig, LoginResponse, ManifestV1, Map, MapElement, MapElementWithGame, MapObject, MapObjectWithItem, PlaycademyServerClientConfig, PlaycademyServerClientState, PlayerCharacter, RealtimeTokenResponse, ScoreSubmission, ShopCurrency, ShopDisplayItem, ShopViewResponse, SpriteTemplate, SpriteTemplateData, StartSessionResponse, StudentEnrollment, TelemetryPayload, TodayXpResponse, TokenRefreshPayload, TokenType, TotalXpResponse, UpdateCharacterData, User, UserInfo, UserLevel, UserLevelWithConfig, UserRank, UserRankResponse, UserRoleEnumType, UserScore, XpHistoryResponse, XpSummaryResponse };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playcademy/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@playcademy/timeback": "0.0.1",
|
|
48
48
|
"@playcademy/utils": "0.0.1",
|
|
49
49
|
"@types/bun": "latest",
|
|
50
|
-
"playcademy": "0.14.
|
|
50
|
+
"playcademy": "0.14.23",
|
|
51
51
|
"rollup": "^4.50.2",
|
|
52
52
|
"rollup-plugin-dts": "^6.2.3",
|
|
53
53
|
"typescript": "^5.7.2"
|