@mpgd/adapter-ait 0.3.2 → 0.4.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.
Files changed (2) hide show
  1. package/dist/index.js +41 -0
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -25,6 +25,20 @@ export function createAitPlatformGateway(input) {
25
25
  getCapabilities: () => request('runtime.getCapabilities', {}),
26
26
  identity: {
27
27
  getPlayer: () => request('identity.getPlayer', {}),
28
+ getSession: () => request('identity.getSession', {}),
29
+ requestUpgrade: (payload) => request('identity.requestUpgrade', payload),
30
+ },
31
+ presentation: {
32
+ getLaunchIntent: () => request('presentation.getLaunchIntent', {}),
33
+ requestGameSurface: (payload) => request('presentation.requestGameSurface', payload),
34
+ },
35
+ sharing: {
36
+ share: (payload) => request('share.share', payload),
37
+ readInboundShare: () => request('share.readInboundShare', {}),
38
+ },
39
+ notifications: {
40
+ getStatus: (topic) => request('notifications.getStatus', { topic }),
41
+ requestSubscription: (topic) => request('notifications.requestSubscription', { topic }),
28
42
  },
29
43
  commerce: {
30
44
  getProducts: () => request('commerce.getProducts', {}),
@@ -84,6 +98,33 @@ export function createAitSandboxBridge() {
84
98
  playerId: 'ait-sandbox-player',
85
99
  displayName: 'AIT Sandbox Player',
86
100
  });
101
+ case 'identity.getSession':
102
+ return ok(input, {
103
+ identityLevel: 'platform-anonymous',
104
+ playerId: 'ait-sandbox-player',
105
+ trustLevel: 'platform-asserted',
106
+ });
107
+ case 'identity.requestUpgrade':
108
+ return ok(input, {
109
+ status: 'unavailable',
110
+ reloadExpected: false,
111
+ });
112
+ case 'presentation.getLaunchIntent':
113
+ return ok(input, {
114
+ entry: 'home',
115
+ });
116
+ case 'presentation.requestGameSurface':
117
+ return ok(input, 'already-fullscreen');
118
+ case 'share.share':
119
+ return ok(input, {
120
+ status: 'shared',
121
+ });
122
+ case 'share.readInboundShare':
123
+ return ok(input, null);
124
+ case 'notifications.getStatus':
125
+ return ok(input, 'configuration-required');
126
+ case 'notifications.requestSubscription':
127
+ return ok(input, 'unavailable');
87
128
  case 'commerce.getProducts':
88
129
  return ok(input, [
89
130
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpgd/adapter-ait",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "description": "Apps in Toss WebView platform adapter for mpgd games.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -34,8 +34,8 @@
34
34
  "dist"
35
35
  ],
36
36
  "dependencies": {
37
- "@mpgd/bridge": "0.3.2",
38
- "@mpgd/platform": "0.3.2"
37
+ "@mpgd/bridge": "0.5.0",
38
+ "@mpgd/platform": "0.4.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "ttsc": "0.16.9",