@withone/sdk 0.6.0 → 0.8.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.d.mts +15 -12
- package/dist/index.d.ts +15 -12
- package/package.json +7 -7
package/dist/index.d.mts
CHANGED
|
@@ -230,7 +230,7 @@ type GrantCreatedPayload = {
|
|
|
230
230
|
*/
|
|
231
231
|
client_id: string;
|
|
232
232
|
connect_user_id: string;
|
|
233
|
-
environment:
|
|
233
|
+
environment: 'test' | 'live';
|
|
234
234
|
grant_id: string;
|
|
235
235
|
/**
|
|
236
236
|
* Which revision of this grant's reach the delivery describes. Bumped by
|
|
@@ -251,7 +251,7 @@ type GrantCreatedPayload = {
|
|
|
251
251
|
* Where the user answered: the page One renders, or the connect card
|
|
252
252
|
* framed inside the application's own site.
|
|
253
253
|
*/
|
|
254
|
-
consent_surface:
|
|
254
|
+
consent_surface: 'hosted' | 'connect';
|
|
255
255
|
created_at: string;
|
|
256
256
|
};
|
|
257
257
|
type GrantRevokedPayload = {
|
|
@@ -261,7 +261,7 @@ type GrantRevokedPayload = {
|
|
|
261
261
|
*/
|
|
262
262
|
client_id: string;
|
|
263
263
|
connect_user_id: string;
|
|
264
|
-
environment:
|
|
264
|
+
environment: 'test' | 'live';
|
|
265
265
|
grant_id: string;
|
|
266
266
|
/**
|
|
267
267
|
* Which revision of this grant's reach the delivery describes. Bumped by
|
|
@@ -281,11 +281,12 @@ type GrantRevokedPayload = {
|
|
|
281
281
|
reason?: string | null;
|
|
282
282
|
revoked_at: string;
|
|
283
283
|
/**
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
284
|
+
* Who ended a grant, which decides how the application answers: after the
|
|
285
|
+
* user or a departure it may prompt the user to reconnect, and after the
|
|
286
|
+
* application's owner or a tenant admin ended it deliberately it does not.
|
|
287
|
+
* One field rather than one event per actor.
|
|
287
288
|
*/
|
|
288
|
-
revoked_by:
|
|
289
|
+
revoked_by: 'user' | 'developer' | 'departure' | 'admin';
|
|
289
290
|
};
|
|
290
291
|
type GrantUpdatedPayload = {
|
|
291
292
|
/**
|
|
@@ -294,7 +295,7 @@ type GrantUpdatedPayload = {
|
|
|
294
295
|
*/
|
|
295
296
|
client_id: string;
|
|
296
297
|
connect_user_id: string;
|
|
297
|
-
environment:
|
|
298
|
+
environment: 'test' | 'live';
|
|
298
299
|
grant_id: string;
|
|
299
300
|
/**
|
|
300
301
|
* Which revision of this grant's reach the delivery describes. Bumped by
|
|
@@ -312,11 +313,13 @@ type GrantUpdatedPayload = {
|
|
|
312
313
|
version: number;
|
|
313
314
|
} & {
|
|
314
315
|
/**
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
*
|
|
316
|
+
* What moved a live grant.
|
|
317
|
+
*
|
|
318
|
+
* One field on `grant.updated` rather than two events: an application can
|
|
319
|
+
* prompt the user to re-consent and cannot prompt them to un-edit, so it
|
|
320
|
+
* branches on this, but it is one occurrence either way.
|
|
318
321
|
*/
|
|
319
|
-
source:
|
|
322
|
+
source: 'consent' | 'user_edit';
|
|
320
323
|
updated_at: string;
|
|
321
324
|
};
|
|
322
325
|
interface MemberAddedPayload {
|
package/dist/index.d.ts
CHANGED
|
@@ -230,7 +230,7 @@ type GrantCreatedPayload = {
|
|
|
230
230
|
*/
|
|
231
231
|
client_id: string;
|
|
232
232
|
connect_user_id: string;
|
|
233
|
-
environment:
|
|
233
|
+
environment: 'test' | 'live';
|
|
234
234
|
grant_id: string;
|
|
235
235
|
/**
|
|
236
236
|
* Which revision of this grant's reach the delivery describes. Bumped by
|
|
@@ -251,7 +251,7 @@ type GrantCreatedPayload = {
|
|
|
251
251
|
* Where the user answered: the page One renders, or the connect card
|
|
252
252
|
* framed inside the application's own site.
|
|
253
253
|
*/
|
|
254
|
-
consent_surface:
|
|
254
|
+
consent_surface: 'hosted' | 'connect';
|
|
255
255
|
created_at: string;
|
|
256
256
|
};
|
|
257
257
|
type GrantRevokedPayload = {
|
|
@@ -261,7 +261,7 @@ type GrantRevokedPayload = {
|
|
|
261
261
|
*/
|
|
262
262
|
client_id: string;
|
|
263
263
|
connect_user_id: string;
|
|
264
|
-
environment:
|
|
264
|
+
environment: 'test' | 'live';
|
|
265
265
|
grant_id: string;
|
|
266
266
|
/**
|
|
267
267
|
* Which revision of this grant's reach the delivery describes. Bumped by
|
|
@@ -281,11 +281,12 @@ type GrantRevokedPayload = {
|
|
|
281
281
|
reason?: string | null;
|
|
282
282
|
revoked_at: string;
|
|
283
283
|
/**
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
284
|
+
* Who ended a grant, which decides how the application answers: after the
|
|
285
|
+
* user or a departure it may prompt the user to reconnect, and after the
|
|
286
|
+
* application's owner or a tenant admin ended it deliberately it does not.
|
|
287
|
+
* One field rather than one event per actor.
|
|
287
288
|
*/
|
|
288
|
-
revoked_by:
|
|
289
|
+
revoked_by: 'user' | 'developer' | 'departure' | 'admin';
|
|
289
290
|
};
|
|
290
291
|
type GrantUpdatedPayload = {
|
|
291
292
|
/**
|
|
@@ -294,7 +295,7 @@ type GrantUpdatedPayload = {
|
|
|
294
295
|
*/
|
|
295
296
|
client_id: string;
|
|
296
297
|
connect_user_id: string;
|
|
297
|
-
environment:
|
|
298
|
+
environment: 'test' | 'live';
|
|
298
299
|
grant_id: string;
|
|
299
300
|
/**
|
|
300
301
|
* Which revision of this grant's reach the delivery describes. Bumped by
|
|
@@ -312,11 +313,13 @@ type GrantUpdatedPayload = {
|
|
|
312
313
|
version: number;
|
|
313
314
|
} & {
|
|
314
315
|
/**
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
*
|
|
316
|
+
* What moved a live grant.
|
|
317
|
+
*
|
|
318
|
+
* One field on `grant.updated` rather than two events: an application can
|
|
319
|
+
* prompt the user to re-consent and cannot prompt them to un-edit, so it
|
|
320
|
+
* branches on this, but it is one occurrence either way.
|
|
318
321
|
*/
|
|
319
|
-
source:
|
|
322
|
+
source: 'consent' | 'user_edit';
|
|
320
323
|
updated_at: string;
|
|
321
324
|
};
|
|
322
325
|
interface MemberAddedPayload {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@withone/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "The One SDK for Node: a typed client over the One API.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -206,12 +206,12 @@
|
|
|
206
206
|
"native.d.ts"
|
|
207
207
|
],
|
|
208
208
|
"optionalDependencies": {
|
|
209
|
-
"@withone/sdk-linux-x64-gnu": "0.
|
|
210
|
-
"@withone/sdk-linux-arm64-gnu": "0.
|
|
211
|
-
"@withone/sdk-linux-x64-musl": "0.
|
|
212
|
-
"@withone/sdk-darwin-x64": "0.
|
|
213
|
-
"@withone/sdk-darwin-arm64": "0.
|
|
214
|
-
"@withone/sdk-win32-x64-msvc": "0.
|
|
209
|
+
"@withone/sdk-linux-x64-gnu": "0.8.0",
|
|
210
|
+
"@withone/sdk-linux-arm64-gnu": "0.8.0",
|
|
211
|
+
"@withone/sdk-linux-x64-musl": "0.8.0",
|
|
212
|
+
"@withone/sdk-darwin-x64": "0.8.0",
|
|
213
|
+
"@withone/sdk-darwin-arm64": "0.8.0",
|
|
214
|
+
"@withone/sdk-win32-x64-msvc": "0.8.0"
|
|
215
215
|
},
|
|
216
216
|
"scripts": {
|
|
217
217
|
"build:native": "napi build --platform --release --js native.js --dts native.d.ts --dts-header \"export type JsonValue = string | number | boolean | null | { [key: string]: JsonValue } | JsonValue[];\n\"",
|