@pixels-online/pixels-client-js-sdk 2.16.0 → 3.0.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/dist/index.esm.js CHANGED
@@ -423,7 +423,7 @@ class SSEConnection {
423
423
  }, 30000); // 30 second timeout
424
424
  try {
425
425
  // Create SSE URL
426
- const url = new URL(this.endpoint + '/v1/sse/connect');
426
+ const url = new URL(this.endpoint + '/v2/sse/connect');
427
427
  const token = await this.tokenManager.getTokenForConnection();
428
428
  // Use CustomEventSource with Authorization Bearer header
429
429
  this.eventSource = new CustomEventSource(url.toString(), {
@@ -692,7 +692,7 @@ function computeTeamProgress(snapshots) {
692
692
  }
693
693
  else {
694
694
  const result = meetsCompletionConditions({
695
- completionConditions: entity.completionConditions || {},
695
+ completionConditions: entity.completionConditions || [],
696
696
  completionTrackers: entity.completionTrackers,
697
697
  playerSnap: entity.snapshot,
698
698
  playerOffer: {
@@ -1333,7 +1333,7 @@ class OfferwallClient {
1333
1333
  return this.getFinishedOffers('expired', params);
1334
1334
  }
1335
1335
  async getFinishedOffers(status, params) {
1336
- const data = await this.postWithAuth('/v1/client/offers/finished', {
1336
+ const data = await this.postWithAuth('/v2/client/offers/finished', {
1337
1337
  status,
1338
1338
  ...params,
1339
1339
  });
@@ -1358,7 +1358,7 @@ class OfferwallClient {
1358
1358
  }
1359
1359
  }
1360
1360
  async getOffersAndPlayer(targetId = null) {
1361
- const data = await this.postWithAuth('/v1/client/player/campaigns', {
1361
+ const data = await this.postWithAuth('/v2/client/player/campaigns', {
1362
1362
  viewingCampaigns: true,
1363
1363
  targetId: targetId || undefined,
1364
1364
  });
package/dist/index.js CHANGED
@@ -425,7 +425,7 @@ class SSEConnection {
425
425
  }, 30000); // 30 second timeout
426
426
  try {
427
427
  // Create SSE URL
428
- const url = new URL(this.endpoint + '/v1/sse/connect');
428
+ const url = new URL(this.endpoint + '/v2/sse/connect');
429
429
  const token = await this.tokenManager.getTokenForConnection();
430
430
  // Use CustomEventSource with Authorization Bearer header
431
431
  this.eventSource = new CustomEventSource(url.toString(), {
@@ -694,7 +694,7 @@ function computeTeamProgress(snapshots) {
694
694
  }
695
695
  else {
696
696
  const result = utils.meetsCompletionConditions({
697
- completionConditions: entity.completionConditions || {},
697
+ completionConditions: entity.completionConditions || [],
698
698
  completionTrackers: entity.completionTrackers,
699
699
  playerSnap: entity.snapshot,
700
700
  playerOffer: {
@@ -1335,7 +1335,7 @@ class OfferwallClient {
1335
1335
  return this.getFinishedOffers('expired', params);
1336
1336
  }
1337
1337
  async getFinishedOffers(status, params) {
1338
- const data = await this.postWithAuth('/v1/client/offers/finished', {
1338
+ const data = await this.postWithAuth('/v2/client/offers/finished', {
1339
1339
  status,
1340
1340
  ...params,
1341
1341
  });
@@ -1360,7 +1360,7 @@ class OfferwallClient {
1360
1360
  }
1361
1361
  }
1362
1362
  async getOffersAndPlayer(targetId = null) {
1363
- const data = await this.postWithAuth('/v1/client/player/campaigns', {
1363
+ const data = await this.postWithAuth('/v2/client/player/campaigns', {
1364
1364
  viewingCampaigns: true,
1365
1365
  targetId: targetId || undefined,
1366
1366
  });
@@ -427,7 +427,7 @@
427
427
  }, 30000); // 30 second timeout
428
428
  try {
429
429
  // Create SSE URL
430
- const url = new URL(this.endpoint + '/v1/sse/connect');
430
+ const url = new URL(this.endpoint + '/v2/sse/connect');
431
431
  const token = await this.tokenManager.getTokenForConnection();
432
432
  // Use CustomEventSource with Authorization Bearer header
433
433
  this.eventSource = new CustomEventSource(url.toString(), {
@@ -696,7 +696,7 @@
696
696
  }
697
697
  else {
698
698
  const result = utils.meetsCompletionConditions({
699
- completionConditions: entity.completionConditions || {},
699
+ completionConditions: entity.completionConditions || [],
700
700
  completionTrackers: entity.completionTrackers,
701
701
  playerSnap: entity.snapshot,
702
702
  playerOffer: {
@@ -1337,7 +1337,7 @@
1337
1337
  return this.getFinishedOffers('expired', params);
1338
1338
  }
1339
1339
  async getFinishedOffers(status, params) {
1340
- const data = await this.postWithAuth('/v1/client/offers/finished', {
1340
+ const data = await this.postWithAuth('/v2/client/offers/finished', {
1341
1341
  status,
1342
1342
  ...params,
1343
1343
  });
@@ -1362,7 +1362,7 @@
1362
1362
  }
1363
1363
  }
1364
1364
  async getOffersAndPlayer(targetId = null) {
1365
- const data = await this.postWithAuth('/v1/client/player/campaigns', {
1365
+ const data = await this.postWithAuth('/v2/client/player/campaigns', {
1366
1366
  viewingCampaigns: true,
1367
1367
  targetId: targetId || undefined,
1368
1368
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixels-online/pixels-client-js-sdk",
3
- "version": "2.16.0",
3
+ "version": "3.0.0",
4
4
  "description": "Pixels Client JS SDK",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -46,8 +46,8 @@
46
46
  "author": "pixels",
47
47
  "license": "AGPLv3",
48
48
  "dependencies": {
49
- "@stackedapp/types": "1.18.3",
50
- "@stackedapp/utils": "1.18.3"
49
+ "@stackedapp/types": "2.0.0",
50
+ "@stackedapp/utils": "2.0.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@rollup/plugin-commonjs": "^28.0.6",