@indietabletop/appkit 5.3.1 → 5.5.0

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/lib/client.ts CHANGED
@@ -625,6 +625,7 @@ export class IndieTabletopClient {
625
625
  `/v1/stripe/sessions/${sessionId}`,
626
626
  object({
627
627
  status: string(),
628
+ orderRef: string(),
628
629
  products: array(ownedProduct()),
629
630
  }),
630
631
  );
@@ -67,7 +67,16 @@ export function createAppMachineProvider<
67
67
  >(options: {
68
68
  database: ModernIDB<Schema, Indexes> & DatabaseAppMachineMethods;
69
69
  client: IndieTabletopClient;
70
- pullGameDataFor: GameCode | GameCode[];
70
+
71
+ /**
72
+ * Which games should the machine pull game data for?
73
+ *
74
+ * If null is provided, no data will be pulled.
75
+ *
76
+ * @remarks Honestly this is a bit hacky and we should have a better way to
77
+ * disable sync entirely for apps that don't need it (e.g. the Creators App).
78
+ */
79
+ pullGameDataFor: GameCode | GameCode[] | null;
71
80
  }) {
72
81
  const { client, database } = options;
73
82
 
@@ -123,6 +132,10 @@ export function createAppMachineProvider<
123
132
 
124
133
  const pullChanges = fromPromise<PullResult, PullChangesInput>(
125
134
  async ({ input }) => {
135
+ if (!options.pullGameDataFor) {
136
+ return new Success({ pulled: [] });
137
+ }
138
+
126
139
  const result = await client.pullUserData({
127
140
  include: options.pullGameDataFor,
128
141
  sinceTs: input.sinceTs,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indietabletop/appkit",
3
- "version": "5.3.1",
3
+ "version": "5.5.0",
4
4
  "description": "A collection of modules used in apps built by Indie Tabletop Club",
5
5
  "private": false,
6
6
  "type": "module",