@nurama/sdk 1.4.1 → 1.4.2

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.
@@ -1,5 +1,5 @@
1
1
  import NuramaClient from '../NuramaClient.js';
2
- import { type Device, type RegisterDeviceBody, type UpdateDeviceBody, type GetUserDevicesQuery } from '@nurama/types';
2
+ import { type Device, type RegisterDeviceBody, type UpdateDeviceBody, type GetUserDevicesQuery, type LiveActivityRegistration, type RegisterLiveActivityBody } from '@nurama/types';
3
3
  /**
4
4
  * Defines device-related methods for the NuramaClient.
5
5
  * Handles device registration and management for push notifications.
@@ -70,5 +70,20 @@ export default function createDeviceMethods(client: NuramaClient): {
70
70
  * await client.device.deleteDevice('507f1f77bcf86cd799439011');
71
71
  */
72
72
  deleteDevice(deviceId: string): Promise<void>;
73
+ /**
74
+ * Register or refresh an iOS upload Live Activity, so the API carries it on by push through post-processing
75
+ * while the app is suspended. Send the activity's push token and the app's view of the batch; send it again
76
+ * as the batch changes. Requires authentication.
77
+ * @param {string} activityId - ActivityKit's id for the activity.
78
+ * @param {RegisterLiveActivityBody} body - Push token, APNs environment and the batch's files.
79
+ * @returns {Promise<LiveActivityRegistration>} The activity id and the batch's stage.
80
+ */
81
+ registerLiveActivity(activityId: string, body: RegisterLiveActivityBody): Promise<LiveActivityRegistration>;
82
+ /**
83
+ * Stop following an upload Live Activity (the app ended it). Requires authentication.
84
+ * @param {string} activityId - ActivityKit's id for the activity.
85
+ * @returns {Promise<void>}
86
+ */
87
+ endLiveActivity(activityId: string): Promise<void>;
73
88
  };
74
89
  //# sourceMappingURL=device.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../src/routes/device.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EACL,KAAK,MAAM,EACX,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACzB,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wBAAwB,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAYjH;;;;OAIG;gCAC+B,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;EAW3D"}
@@ -117,6 +117,40 @@ export default function createDeviceMethods(client) {
117
117
  sendJWT: true,
118
118
  });
119
119
  },
120
+ /**
121
+ * Register or refresh an iOS upload Live Activity, so the API carries it on by push through post-processing
122
+ * while the app is suspended. Send the activity's push token and the app's view of the batch; send it again
123
+ * as the batch changes. Requires authentication.
124
+ * @param {string} activityId - ActivityKit's id for the activity.
125
+ * @param {RegisterLiveActivityBody} body - Push token, APNs environment and the batch's files.
126
+ * @returns {Promise<LiveActivityRegistration>} The activity id and the batch's stage.
127
+ */
128
+ async registerLiveActivity(activityId, body) {
129
+ if (!activityId) {
130
+ throw new Error('activityId is required.');
131
+ }
132
+ return client._request({
133
+ method: 'PUT',
134
+ endpoint: `/v1/devices/live-activities/${activityId}`,
135
+ body,
136
+ sendJWT: true,
137
+ });
138
+ },
139
+ /**
140
+ * Stop following an upload Live Activity (the app ended it). Requires authentication.
141
+ * @param {string} activityId - ActivityKit's id for the activity.
142
+ * @returns {Promise<void>}
143
+ */
144
+ async endLiveActivity(activityId) {
145
+ if (!activityId) {
146
+ throw new Error('activityId is required.');
147
+ }
148
+ return client._request({
149
+ method: 'DELETE',
150
+ endpoint: `/v1/devices/live-activities/${activityId}`,
151
+ sendJWT: true,
152
+ });
153
+ },
120
154
  };
121
155
  }
122
156
  //# sourceMappingURL=device.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"device.js","sourceRoot":"","sources":["../../src/routes/device.ts"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,MAAoB;IAC9D,OAAO;QACL;;;;;;;;;;;;;;;;;;WAkBG;QACH,KAAK,CAAC,cAAc,CAAC,UAA8B;YACjD,IAAI,CAAC,UAAU,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC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AAM,EAAE,KAAK;gBACb,QAAQ,EAAE,+BAA+B,UAAU,EAAE;gBACrD,IAAI;gBACJ,OAAO,EAAE,IAAI;aACd,CAAC,CAAC;QACL,CAAC;QAED;;;;WAIG;QACH,KAAK,CAAC,eAAe,CAAC,UAAkB;YACtC,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;YAC7C,CAAC;YACD,OAAO,MAAM,CAAC,QAAQ,CAAO;gBAC3B,MAAM,EAAE,QAAQ;gBAChB,QAAQ,EAAE,+BAA+B,UAAU,EAAE;gBACrD,OAAO,EAAE,IAAI;aACd,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
package/dist/version.js CHANGED
@@ -3,10 +3,10 @@
3
3
  * AUTO-GENERATED by scripts/generate-version-info.cjs - DO NOT EDIT MANUALLY
4
4
  */
5
5
  export const SDK_VERSION = {
6
- version: '1.4.1',
7
- buildTimestamp: '2026-10-10T06:58:40.258Z',
8
- buildHash: 'f6505e2eb9725dc8d239bb401ced8f88',
9
- gitCommit: '1c00e18',
6
+ version: '1.4.2',
7
+ buildTimestamp: '2026-10-13T14:29:32.506Z',
8
+ buildHash: '4d2cf795aed2effc13ea74e85309a692',
9
+ gitCommit: '6c603cf',
10
10
  dirty: false,
11
11
  };
12
12
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nurama/sdk",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Provides API, web-socket, and additional utilities for interfacing with the Nurama platform.",
5
5
  "main": "dist/NuramaClient.js",
6
6
  "module": "dist/NuramaClient.js",
@@ -33,7 +33,7 @@
33
33
  "dependencies": {
34
34
  "jwt-decode": "^4.0.0",
35
35
  "socket.io-client": "^4.7.2",
36
- "@nurama/types": "1.4.1"
36
+ "@nurama/types": "1.4.2"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/jest": "^29.5.14",
@@ -4,6 +4,8 @@ import {
4
4
  type RegisterDeviceBody,
5
5
  type UpdateDeviceBody,
6
6
  type GetUserDevicesQuery,
7
+ type LiveActivityRegistration,
8
+ type RegisterLiveActivityBody,
7
9
  } from '@nurama/types';
8
10
 
9
11
  /**
@@ -129,5 +131,41 @@ export default function createDeviceMethods(client: NuramaClient) {
129
131
  sendJWT: true,
130
132
  });
131
133
  },
134
+
135
+ /**
136
+ * Register or refresh an iOS upload Live Activity, so the API carries it on by push through post-processing
137
+ * while the app is suspended. Send the activity's push token and the app's view of the batch; send it again
138
+ * as the batch changes. Requires authentication.
139
+ * @param {string} activityId - ActivityKit's id for the activity.
140
+ * @param {RegisterLiveActivityBody} body - Push token, APNs environment and the batch's files.
141
+ * @returns {Promise<LiveActivityRegistration>} The activity id and the batch's stage.
142
+ */
143
+ async registerLiveActivity(activityId: string, body: RegisterLiveActivityBody): Promise<LiveActivityRegistration> {
144
+ if (!activityId) {
145
+ throw new Error('activityId is required.');
146
+ }
147
+ return client._request<LiveActivityRegistration>({
148
+ method: 'PUT',
149
+ endpoint: `/v1/devices/live-activities/${activityId}`,
150
+ body,
151
+ sendJWT: true,
152
+ });
153
+ },
154
+
155
+ /**
156
+ * Stop following an upload Live Activity (the app ended it). Requires authentication.
157
+ * @param {string} activityId - ActivityKit's id for the activity.
158
+ * @returns {Promise<void>}
159
+ */
160
+ async endLiveActivity(activityId: string): Promise<void> {
161
+ if (!activityId) {
162
+ throw new Error('activityId is required.');
163
+ }
164
+ return client._request<void>({
165
+ method: 'DELETE',
166
+ endpoint: `/v1/devices/live-activities/${activityId}`,
167
+ sendJWT: true,
168
+ });
169
+ },
132
170
  };
133
171
  }
package/src/version.ts CHANGED
@@ -14,9 +14,9 @@ export interface SDKVersionInfo {
14
14
  }
15
15
 
16
16
  export const SDK_VERSION: SDKVersionInfo = {
17
- version: '1.4.1',
18
- buildTimestamp: '2026-10-10T06:58:40.258Z',
19
- buildHash: 'f6505e2eb9725dc8d239bb401ced8f88',
20
- gitCommit: '1c00e18',
17
+ version: '1.4.2',
18
+ buildTimestamp: '2026-10-13T14:29:32.506Z',
19
+ buildHash: '4d2cf795aed2effc13ea74e85309a692',
20
+ gitCommit: '6c603cf',
21
21
  dirty: false,
22
22
  };