@atproto/api 0.6.5 → 0.6.6
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/client/index.d.ts +3 -0
- package/dist/client/lexicons.d.ts +35 -0
- package/dist/client/types/app/bsky/notification/registerPush.d.ts +20 -0
- package/dist/index.js +66 -15
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
- package/src/client/index.ts +13 -0
- package/src/client/lexicons.ts +36 -0
- package/src/client/types/app/bsky/notification/registerPush.ts +35 -0
- package/src/client/types/com/atproto/sync/subscribeRepos.ts +1 -0
- package/tsconfig.build.tsbuildinfo +1 -1
package/dist/client/index.d.ts
CHANGED
|
@@ -99,6 +99,7 @@ import * as AppBskyGraphUnmuteActor from './types/app/bsky/graph/unmuteActor';
|
|
|
99
99
|
import * as AppBskyGraphUnmuteActorList from './types/app/bsky/graph/unmuteActorList';
|
|
100
100
|
import * as AppBskyNotificationGetUnreadCount from './types/app/bsky/notification/getUnreadCount';
|
|
101
101
|
import * as AppBskyNotificationListNotifications from './types/app/bsky/notification/listNotifications';
|
|
102
|
+
import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/registerPush';
|
|
102
103
|
import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen';
|
|
103
104
|
import * as AppBskyUnspeccedApplyLabels from './types/app/bsky/unspecced/applyLabels';
|
|
104
105
|
import * as AppBskyUnspeccedGetPopular from './types/app/bsky/unspecced/getPopular';
|
|
@@ -218,6 +219,7 @@ export * as AppBskyGraphUnmuteActor from './types/app/bsky/graph/unmuteActor';
|
|
|
218
219
|
export * as AppBskyGraphUnmuteActorList from './types/app/bsky/graph/unmuteActorList';
|
|
219
220
|
export * as AppBskyNotificationGetUnreadCount from './types/app/bsky/notification/getUnreadCount';
|
|
220
221
|
export * as AppBskyNotificationListNotifications from './types/app/bsky/notification/listNotifications';
|
|
222
|
+
export * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/registerPush';
|
|
221
223
|
export * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen';
|
|
222
224
|
export * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet';
|
|
223
225
|
export * as AppBskyUnspeccedApplyLabels from './types/app/bsky/unspecced/applyLabels';
|
|
@@ -622,6 +624,7 @@ export declare class NotificationNS {
|
|
|
622
624
|
constructor(service: AtpServiceClient);
|
|
623
625
|
getUnreadCount(params?: AppBskyNotificationGetUnreadCount.QueryParams, opts?: AppBskyNotificationGetUnreadCount.CallOptions): Promise<AppBskyNotificationGetUnreadCount.Response>;
|
|
624
626
|
listNotifications(params?: AppBskyNotificationListNotifications.QueryParams, opts?: AppBskyNotificationListNotifications.CallOptions): Promise<AppBskyNotificationListNotifications.Response>;
|
|
627
|
+
registerPush(data?: AppBskyNotificationRegisterPush.InputSchema, opts?: AppBskyNotificationRegisterPush.CallOptions): Promise<AppBskyNotificationRegisterPush.Response>;
|
|
625
628
|
updateSeen(data?: AppBskyNotificationUpdateSeen.InputSchema, opts?: AppBskyNotificationUpdateSeen.CallOptions): Promise<AppBskyNotificationUpdateSeen.Response>;
|
|
626
629
|
}
|
|
627
630
|
export declare class RichtextNS {
|
|
@@ -3301,6 +3301,7 @@ export declare const schemaDict: {
|
|
|
3301
3301
|
};
|
|
3302
3302
|
repoOp: {
|
|
3303
3303
|
type: string;
|
|
3304
|
+
description: string;
|
|
3304
3305
|
required: string[];
|
|
3305
3306
|
nullable: string[];
|
|
3306
3307
|
properties: {
|
|
@@ -6000,6 +6001,39 @@ export declare const schemaDict: {
|
|
|
6000
6001
|
};
|
|
6001
6002
|
};
|
|
6002
6003
|
};
|
|
6004
|
+
AppBskyNotificationRegisterPush: {
|
|
6005
|
+
lexicon: number;
|
|
6006
|
+
id: string;
|
|
6007
|
+
defs: {
|
|
6008
|
+
main: {
|
|
6009
|
+
type: string;
|
|
6010
|
+
description: string;
|
|
6011
|
+
input: {
|
|
6012
|
+
encoding: string;
|
|
6013
|
+
schema: {
|
|
6014
|
+
type: string;
|
|
6015
|
+
required: string[];
|
|
6016
|
+
properties: {
|
|
6017
|
+
serviceDid: {
|
|
6018
|
+
type: string;
|
|
6019
|
+
format: string;
|
|
6020
|
+
};
|
|
6021
|
+
token: {
|
|
6022
|
+
type: string;
|
|
6023
|
+
};
|
|
6024
|
+
platform: {
|
|
6025
|
+
type: string;
|
|
6026
|
+
knownValues: string[];
|
|
6027
|
+
};
|
|
6028
|
+
appId: {
|
|
6029
|
+
type: string;
|
|
6030
|
+
};
|
|
6031
|
+
};
|
|
6032
|
+
};
|
|
6033
|
+
};
|
|
6034
|
+
};
|
|
6035
|
+
};
|
|
6036
|
+
};
|
|
6003
6037
|
AppBskyNotificationUpdateSeen: {
|
|
6004
6038
|
lexicon: number;
|
|
6005
6039
|
id: string;
|
|
@@ -6366,6 +6400,7 @@ export declare const ids: {
|
|
|
6366
6400
|
AppBskyGraphUnmuteActorList: string;
|
|
6367
6401
|
AppBskyNotificationGetUnreadCount: string;
|
|
6368
6402
|
AppBskyNotificationListNotifications: string;
|
|
6403
|
+
AppBskyNotificationRegisterPush: string;
|
|
6369
6404
|
AppBskyNotificationUpdateSeen: string;
|
|
6370
6405
|
AppBskyRichtextFacet: string;
|
|
6371
6406
|
AppBskyUnspeccedApplyLabels: string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Headers } from '@atproto/xrpc';
|
|
2
|
+
export interface QueryParams {
|
|
3
|
+
}
|
|
4
|
+
export interface InputSchema {
|
|
5
|
+
serviceDid: string;
|
|
6
|
+
token: string;
|
|
7
|
+
platform: 'ios' | 'android' | 'web' | (string & {});
|
|
8
|
+
appId: string;
|
|
9
|
+
[k: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
export interface CallOptions {
|
|
12
|
+
headers?: Headers;
|
|
13
|
+
qp?: QueryParams;
|
|
14
|
+
encoding: 'application/json';
|
|
15
|
+
}
|
|
16
|
+
export interface Response {
|
|
17
|
+
success: boolean;
|
|
18
|
+
headers: Headers;
|
|
19
|
+
}
|
|
20
|
+
export declare function toKnownErr(e: any): any;
|
package/dist/index.js
CHANGED
|
@@ -8924,6 +8924,7 @@ __export(src_exports4, {
|
|
|
8924
8924
|
AppBskyGraphUnmuteActorList: () => unmuteActorList_exports,
|
|
8925
8925
|
AppBskyNotificationGetUnreadCount: () => getUnreadCount_exports,
|
|
8926
8926
|
AppBskyNotificationListNotifications: () => listNotifications_exports,
|
|
8927
|
+
AppBskyNotificationRegisterPush: () => registerPush_exports,
|
|
8927
8928
|
AppBskyNotificationUpdateSeen: () => updateSeen_exports,
|
|
8928
8929
|
AppBskyRichtextFacet: () => facet_exports,
|
|
8929
8930
|
AppBskyUnspeccedApplyLabels: () => applyLabels_exports,
|
|
@@ -19244,6 +19245,7 @@ var schemaDict = {
|
|
|
19244
19245
|
},
|
|
19245
19246
|
repoOp: {
|
|
19246
19247
|
type: "object",
|
|
19248
|
+
description: "A repo operation, ie a write of a single record. For creates and updates, cid is the record's CID as of this operation. For deletes, it's null.",
|
|
19247
19249
|
required: ["action", "path", "cid"],
|
|
19248
19250
|
nullable: ["cid"],
|
|
19249
19251
|
properties: {
|
|
@@ -22026,6 +22028,39 @@ var schemaDict = {
|
|
|
22026
22028
|
}
|
|
22027
22029
|
}
|
|
22028
22030
|
},
|
|
22031
|
+
AppBskyNotificationRegisterPush: {
|
|
22032
|
+
lexicon: 1,
|
|
22033
|
+
id: "app.bsky.notification.registerPush",
|
|
22034
|
+
defs: {
|
|
22035
|
+
main: {
|
|
22036
|
+
type: "procedure",
|
|
22037
|
+
description: "Register for push notifications with a service",
|
|
22038
|
+
input: {
|
|
22039
|
+
encoding: "application/json",
|
|
22040
|
+
schema: {
|
|
22041
|
+
type: "object",
|
|
22042
|
+
required: ["serviceDid", "token", "platform", "appId"],
|
|
22043
|
+
properties: {
|
|
22044
|
+
serviceDid: {
|
|
22045
|
+
type: "string",
|
|
22046
|
+
format: "did"
|
|
22047
|
+
},
|
|
22048
|
+
token: {
|
|
22049
|
+
type: "string"
|
|
22050
|
+
},
|
|
22051
|
+
platform: {
|
|
22052
|
+
type: "string",
|
|
22053
|
+
knownValues: ["ios", "android", "web"]
|
|
22054
|
+
},
|
|
22055
|
+
appId: {
|
|
22056
|
+
type: "string"
|
|
22057
|
+
}
|
|
22058
|
+
}
|
|
22059
|
+
}
|
|
22060
|
+
}
|
|
22061
|
+
}
|
|
22062
|
+
}
|
|
22063
|
+
},
|
|
22029
22064
|
AppBskyNotificationUpdateSeen: {
|
|
22030
22065
|
lexicon: 1,
|
|
22031
22066
|
id: "app.bsky.notification.updateSeen",
|
|
@@ -23687,12 +23722,23 @@ function validateNotification(v) {
|
|
|
23687
23722
|
);
|
|
23688
23723
|
}
|
|
23689
23724
|
|
|
23725
|
+
// src/client/types/app/bsky/notification/registerPush.ts
|
|
23726
|
+
var registerPush_exports = {};
|
|
23727
|
+
__export(registerPush_exports, {
|
|
23728
|
+
toKnownErr: () => toKnownErr92
|
|
23729
|
+
});
|
|
23730
|
+
function toKnownErr92(e) {
|
|
23731
|
+
if (e instanceof XRPCError) {
|
|
23732
|
+
}
|
|
23733
|
+
return e;
|
|
23734
|
+
}
|
|
23735
|
+
|
|
23690
23736
|
// src/client/types/app/bsky/notification/updateSeen.ts
|
|
23691
23737
|
var updateSeen_exports = {};
|
|
23692
23738
|
__export(updateSeen_exports, {
|
|
23693
|
-
toKnownErr: () =>
|
|
23739
|
+
toKnownErr: () => toKnownErr93
|
|
23694
23740
|
});
|
|
23695
|
-
function
|
|
23741
|
+
function toKnownErr93(e) {
|
|
23696
23742
|
if (e instanceof XRPCError) {
|
|
23697
23743
|
}
|
|
23698
23744
|
return e;
|
|
@@ -23701,9 +23747,9 @@ function toKnownErr92(e) {
|
|
|
23701
23747
|
// src/client/types/app/bsky/unspecced/applyLabels.ts
|
|
23702
23748
|
var applyLabels_exports = {};
|
|
23703
23749
|
__export(applyLabels_exports, {
|
|
23704
|
-
toKnownErr: () =>
|
|
23750
|
+
toKnownErr: () => toKnownErr94
|
|
23705
23751
|
});
|
|
23706
|
-
function
|
|
23752
|
+
function toKnownErr94(e) {
|
|
23707
23753
|
if (e instanceof XRPCError) {
|
|
23708
23754
|
}
|
|
23709
23755
|
return e;
|
|
@@ -23712,9 +23758,9 @@ function toKnownErr93(e) {
|
|
|
23712
23758
|
// src/client/types/app/bsky/unspecced/getPopular.ts
|
|
23713
23759
|
var getPopular_exports = {};
|
|
23714
23760
|
__export(getPopular_exports, {
|
|
23715
|
-
toKnownErr: () =>
|
|
23761
|
+
toKnownErr: () => toKnownErr95
|
|
23716
23762
|
});
|
|
23717
|
-
function
|
|
23763
|
+
function toKnownErr95(e) {
|
|
23718
23764
|
if (e instanceof XRPCError) {
|
|
23719
23765
|
}
|
|
23720
23766
|
return e;
|
|
@@ -23723,9 +23769,9 @@ function toKnownErr94(e) {
|
|
|
23723
23769
|
// src/client/types/app/bsky/unspecced/getPopularFeedGenerators.ts
|
|
23724
23770
|
var getPopularFeedGenerators_exports = {};
|
|
23725
23771
|
__export(getPopularFeedGenerators_exports, {
|
|
23726
|
-
toKnownErr: () =>
|
|
23772
|
+
toKnownErr: () => toKnownErr96
|
|
23727
23773
|
});
|
|
23728
|
-
function
|
|
23774
|
+
function toKnownErr96(e) {
|
|
23729
23775
|
if (e instanceof XRPCError) {
|
|
23730
23776
|
}
|
|
23731
23777
|
return e;
|
|
@@ -23735,14 +23781,14 @@ function toKnownErr95(e) {
|
|
|
23735
23781
|
var getTimelineSkeleton_exports = {};
|
|
23736
23782
|
__export(getTimelineSkeleton_exports, {
|
|
23737
23783
|
UnknownFeedError: () => UnknownFeedError3,
|
|
23738
|
-
toKnownErr: () =>
|
|
23784
|
+
toKnownErr: () => toKnownErr97
|
|
23739
23785
|
});
|
|
23740
23786
|
var UnknownFeedError3 = class extends XRPCError {
|
|
23741
23787
|
constructor(src2) {
|
|
23742
23788
|
super(src2.status, src2.error, src2.message, src2.headers);
|
|
23743
23789
|
}
|
|
23744
23790
|
};
|
|
23745
|
-
function
|
|
23791
|
+
function toKnownErr97(e) {
|
|
23746
23792
|
if (e instanceof XRPCError) {
|
|
23747
23793
|
if (e.error === "UnknownFeed")
|
|
23748
23794
|
return new UnknownFeedError3(e);
|
|
@@ -25518,9 +25564,14 @@ var NotificationNS = class {
|
|
|
25518
25564
|
throw toKnownErr91(e);
|
|
25519
25565
|
});
|
|
25520
25566
|
}
|
|
25567
|
+
registerPush(data, opts) {
|
|
25568
|
+
return this._service.xrpc.call("app.bsky.notification.registerPush", opts?.qp, data, opts).catch((e) => {
|
|
25569
|
+
throw toKnownErr92(e);
|
|
25570
|
+
});
|
|
25571
|
+
}
|
|
25521
25572
|
updateSeen(data, opts) {
|
|
25522
25573
|
return this._service.xrpc.call("app.bsky.notification.updateSeen", opts?.qp, data, opts).catch((e) => {
|
|
25523
|
-
throw
|
|
25574
|
+
throw toKnownErr93(e);
|
|
25524
25575
|
});
|
|
25525
25576
|
}
|
|
25526
25577
|
};
|
|
@@ -25535,12 +25586,12 @@ var UnspeccedNS = class {
|
|
|
25535
25586
|
}
|
|
25536
25587
|
applyLabels(data, opts) {
|
|
25537
25588
|
return this._service.xrpc.call("app.bsky.unspecced.applyLabels", opts?.qp, data, opts).catch((e) => {
|
|
25538
|
-
throw
|
|
25589
|
+
throw toKnownErr94(e);
|
|
25539
25590
|
});
|
|
25540
25591
|
}
|
|
25541
25592
|
getPopular(params2, opts) {
|
|
25542
25593
|
return this._service.xrpc.call("app.bsky.unspecced.getPopular", params2, void 0, opts).catch((e) => {
|
|
25543
|
-
throw
|
|
25594
|
+
throw toKnownErr95(e);
|
|
25544
25595
|
});
|
|
25545
25596
|
}
|
|
25546
25597
|
getPopularFeedGenerators(params2, opts) {
|
|
@@ -25550,12 +25601,12 @@ var UnspeccedNS = class {
|
|
|
25550
25601
|
void 0,
|
|
25551
25602
|
opts
|
|
25552
25603
|
).catch((e) => {
|
|
25553
|
-
throw
|
|
25604
|
+
throw toKnownErr96(e);
|
|
25554
25605
|
});
|
|
25555
25606
|
}
|
|
25556
25607
|
getTimelineSkeleton(params2, opts) {
|
|
25557
25608
|
return this._service.xrpc.call("app.bsky.unspecced.getTimelineSkeleton", params2, void 0, opts).catch((e) => {
|
|
25558
|
-
throw
|
|
25609
|
+
throw toKnownErr97(e);
|
|
25559
25610
|
});
|
|
25560
25611
|
}
|
|
25561
25612
|
};
|