@atproto/api 0.6.24-next.1 → 0.6.24
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/CHANGELOG.md +11 -0
- package/LICENSE.txt +7 -0
- package/dist/client/lexicons.d.ts +13 -12
- package/dist/client/types/app/bsky/feed/defs.d.ts +1 -7
- package/dist/client/types/app/bsky/graph/defs.d.ts +1 -0
- package/dist/client/types/com/atproto/admin/defs.d.ts +2 -0
- package/dist/index.js +21 -28
- package/dist/index.js.map +2 -2
- package/package.json +17 -20
- package/src/client/lexicons.ts +14 -13
- package/src/client/types/app/bsky/feed/defs.ts +1 -18
- package/src/client/types/app/bsky/graph/defs.ts +1 -0
- package/src/client/types/com/atproto/admin/defs.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atproto/api
|
|
2
2
|
|
|
3
|
+
## 0.6.24
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1912](https://github.com/bluesky-social/atproto/pull/1912) [`378fc613`](https://github.com/bluesky-social/atproto/commit/378fc6132f621ca517897c9467ed5bba134b3776) Thanks [@devinivy](https://github.com/devinivy)! - Contains breaking lexicon changes: removing legacy com.atproto admin endpoints, making uri field required on app.bsky list views.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`3c0ef382`](https://github.com/bluesky-social/atproto/commit/3c0ef382c12a413cc971ae47ffb341236c545f60)]:
|
|
10
|
+
- @atproto/syntax@0.1.5
|
|
11
|
+
- @atproto/lexicon@0.3.1
|
|
12
|
+
- @atproto/xrpc@0.4.1
|
|
13
|
+
|
|
3
14
|
## 0.6.23
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Dual MIT/Apache-2.0 License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022-2023 Bluesky PBC, and Contributors
|
|
4
|
+
|
|
5
|
+
Except as otherwise noted in individual files, this software is licensed under the MIT license (<http://opensource.org/licenses/MIT>), or the Apache License, Version 2.0 (<http://www.apache.org/licenses/LICENSE-2.0>).
|
|
6
|
+
|
|
7
|
+
Downstream projects and end users may chose either license individually, or both together, at their discretion. The motivation for this dual-licensing is the additional software patent assurance provided by Apache 2.0.
|
|
@@ -587,6 +587,9 @@ export declare const schemaDict: {
|
|
|
587
587
|
type: string;
|
|
588
588
|
description: string;
|
|
589
589
|
properties: {
|
|
590
|
+
comment: {
|
|
591
|
+
type: string;
|
|
592
|
+
};
|
|
590
593
|
durationInHours: {
|
|
591
594
|
type: string;
|
|
592
595
|
description: string;
|
|
@@ -636,6 +639,9 @@ export declare const schemaDict: {
|
|
|
636
639
|
description: string;
|
|
637
640
|
required: string[];
|
|
638
641
|
properties: {
|
|
642
|
+
comment: {
|
|
643
|
+
type: string;
|
|
644
|
+
};
|
|
639
645
|
createLabelVals: {
|
|
640
646
|
type: string;
|
|
641
647
|
items: {
|
|
@@ -4572,6 +4578,9 @@ export declare const schemaDict: {
|
|
|
4572
4578
|
type: string;
|
|
4573
4579
|
format: string;
|
|
4574
4580
|
};
|
|
4581
|
+
replyDisabled: {
|
|
4582
|
+
type: string;
|
|
4583
|
+
};
|
|
4575
4584
|
};
|
|
4576
4585
|
};
|
|
4577
4586
|
feedViewPost: {
|
|
@@ -4639,10 +4648,6 @@ export declare const schemaDict: {
|
|
|
4639
4648
|
refs: string[];
|
|
4640
4649
|
};
|
|
4641
4650
|
};
|
|
4642
|
-
viewer: {
|
|
4643
|
-
type: string;
|
|
4644
|
-
ref: string;
|
|
4645
|
-
};
|
|
4646
4651
|
};
|
|
4647
4652
|
};
|
|
4648
4653
|
notFoundPost: {
|
|
@@ -4691,14 +4696,6 @@ export declare const schemaDict: {
|
|
|
4691
4696
|
};
|
|
4692
4697
|
};
|
|
4693
4698
|
};
|
|
4694
|
-
viewerThreadState: {
|
|
4695
|
-
type: string;
|
|
4696
|
-
properties: {
|
|
4697
|
-
canReply: {
|
|
4698
|
-
type: string;
|
|
4699
|
-
};
|
|
4700
|
-
};
|
|
4701
|
-
};
|
|
4702
4699
|
generatorView: {
|
|
4703
4700
|
type: string;
|
|
4704
4701
|
required: string[];
|
|
@@ -6011,6 +6008,10 @@ export declare const schemaDict: {
|
|
|
6011
6008
|
type: string;
|
|
6012
6009
|
required: string[];
|
|
6013
6010
|
properties: {
|
|
6011
|
+
uri: {
|
|
6012
|
+
type: string;
|
|
6013
|
+
format: string;
|
|
6014
|
+
};
|
|
6014
6015
|
subject: {
|
|
6015
6016
|
type: string;
|
|
6016
6017
|
ref: string;
|
|
@@ -30,6 +30,7 @@ export declare function validatePostView(v: unknown): ValidationResult;
|
|
|
30
30
|
export interface ViewerState {
|
|
31
31
|
repost?: string;
|
|
32
32
|
like?: string;
|
|
33
|
+
replyDisabled?: boolean;
|
|
33
34
|
[k: string]: unknown;
|
|
34
35
|
}
|
|
35
36
|
export declare function isViewerState(v: unknown): v is ViewerState;
|
|
@@ -75,7 +76,6 @@ export interface ThreadViewPost {
|
|
|
75
76
|
$type: string;
|
|
76
77
|
[k: string]: unknown;
|
|
77
78
|
})[];
|
|
78
|
-
viewer?: ViewerThreadState;
|
|
79
79
|
[k: string]: unknown;
|
|
80
80
|
}
|
|
81
81
|
export declare function isThreadViewPost(v: unknown): v is ThreadViewPost;
|
|
@@ -102,12 +102,6 @@ export interface BlockedAuthor {
|
|
|
102
102
|
}
|
|
103
103
|
export declare function isBlockedAuthor(v: unknown): v is BlockedAuthor;
|
|
104
104
|
export declare function validateBlockedAuthor(v: unknown): ValidationResult;
|
|
105
|
-
export interface ViewerThreadState {
|
|
106
|
-
canReply?: boolean;
|
|
107
|
-
[k: string]: unknown;
|
|
108
|
-
}
|
|
109
|
-
export declare function isViewerThreadState(v: unknown): v is ViewerThreadState;
|
|
110
|
-
export declare function validateViewerThreadState(v: unknown): ValidationResult;
|
|
111
105
|
export interface GeneratorView {
|
|
112
106
|
uri: string;
|
|
113
107
|
cid: string;
|
|
@@ -29,6 +29,7 @@ export interface ListView {
|
|
|
29
29
|
export declare function isListView(v: unknown): v is ListView;
|
|
30
30
|
export declare function validateListView(v: unknown): ValidationResult;
|
|
31
31
|
export interface ListItemView {
|
|
32
|
+
uri: string;
|
|
32
33
|
subject: AppBskyActorDefs.ProfileView;
|
|
33
34
|
[k: string]: unknown;
|
|
34
35
|
}
|
|
@@ -242,6 +242,7 @@ export declare const REVIEWOPEN = "com.atproto.admin.defs#reviewOpen";
|
|
|
242
242
|
export declare const REVIEWESCALATED = "com.atproto.admin.defs#reviewEscalated";
|
|
243
243
|
export declare const REVIEWCLOSED = "com.atproto.admin.defs#reviewClosed";
|
|
244
244
|
export interface ModEventTakedown {
|
|
245
|
+
comment?: string;
|
|
245
246
|
durationInHours?: number;
|
|
246
247
|
[k: string]: unknown;
|
|
247
248
|
}
|
|
@@ -268,6 +269,7 @@ export interface ModEventReport {
|
|
|
268
269
|
export declare function isModEventReport(v: unknown): v is ModEventReport;
|
|
269
270
|
export declare function validateModEventReport(v: unknown): ValidationResult;
|
|
270
271
|
export interface ModEventLabel {
|
|
272
|
+
comment?: string;
|
|
271
273
|
createLabelVals: string[];
|
|
272
274
|
negateLabelVals: string[];
|
|
273
275
|
[k: string]: unknown;
|
package/dist/index.js
CHANGED
|
@@ -9203,13 +9203,13 @@ var ensureValidAtUri = (uri2) => {
|
|
|
9203
9203
|
throw new Error("ATURI requires at least method and authority sections");
|
|
9204
9204
|
}
|
|
9205
9205
|
try {
|
|
9206
|
-
|
|
9207
|
-
} catch {
|
|
9208
|
-
try {
|
|
9206
|
+
if (parts[2].startsWith("did:")) {
|
|
9209
9207
|
ensureValidDid(parts[2]);
|
|
9210
|
-
}
|
|
9211
|
-
|
|
9208
|
+
} else {
|
|
9209
|
+
ensureValidHandle(parts[2]);
|
|
9212
9210
|
}
|
|
9211
|
+
} catch {
|
|
9212
|
+
throw new Error("ATURI authority must be a valid handle or DID");
|
|
9213
9213
|
}
|
|
9214
9214
|
if (parts.length >= 4) {
|
|
9215
9215
|
if (parts[3].length == 0) {
|
|
@@ -14270,7 +14270,7 @@ function datetime(path, value) {
|
|
|
14270
14270
|
} catch {
|
|
14271
14271
|
return {
|
|
14272
14272
|
success: false,
|
|
14273
|
-
error: new ValidationError(`${path} must be an
|
|
14273
|
+
error: new ValidationError(`${path} must be an valid atproto datetime (both RFC-3339 and ISO-8601)`)
|
|
14274
14274
|
};
|
|
14275
14275
|
}
|
|
14276
14276
|
return { success: true, value };
|
|
@@ -16358,6 +16358,9 @@ var schemaDict = {
|
|
|
16358
16358
|
type: "object",
|
|
16359
16359
|
description: "Take down a subject permanently or temporarily",
|
|
16360
16360
|
properties: {
|
|
16361
|
+
comment: {
|
|
16362
|
+
type: "string"
|
|
16363
|
+
},
|
|
16361
16364
|
durationInHours: {
|
|
16362
16365
|
type: "integer",
|
|
16363
16366
|
description: "Indicates how long the takedown should be in effect before automatically expiring."
|
|
@@ -16407,6 +16410,9 @@ var schemaDict = {
|
|
|
16407
16410
|
description: "Apply/Negate labels on a subject",
|
|
16408
16411
|
required: ["createLabelVals", "negateLabelVals"],
|
|
16409
16412
|
properties: {
|
|
16413
|
+
comment: {
|
|
16414
|
+
type: "string"
|
|
16415
|
+
},
|
|
16410
16416
|
createLabelVals: {
|
|
16411
16417
|
type: "array",
|
|
16412
16418
|
items: {
|
|
@@ -20536,6 +20542,9 @@ var schemaDict = {
|
|
|
20536
20542
|
like: {
|
|
20537
20543
|
type: "string",
|
|
20538
20544
|
format: "at-uri"
|
|
20545
|
+
},
|
|
20546
|
+
replyDisabled: {
|
|
20547
|
+
type: "boolean"
|
|
20539
20548
|
}
|
|
20540
20549
|
}
|
|
20541
20550
|
},
|
|
@@ -20619,10 +20628,6 @@ var schemaDict = {
|
|
|
20619
20628
|
"lex:app.bsky.feed.defs#blockedPost"
|
|
20620
20629
|
]
|
|
20621
20630
|
}
|
|
20622
|
-
},
|
|
20623
|
-
viewer: {
|
|
20624
|
-
type: "ref",
|
|
20625
|
-
ref: "lex:app.bsky.feed.defs#viewerThreadState"
|
|
20626
20631
|
}
|
|
20627
20632
|
}
|
|
20628
20633
|
},
|
|
@@ -20672,14 +20677,6 @@ var schemaDict = {
|
|
|
20672
20677
|
}
|
|
20673
20678
|
}
|
|
20674
20679
|
},
|
|
20675
|
-
viewerThreadState: {
|
|
20676
|
-
type: "object",
|
|
20677
|
-
properties: {
|
|
20678
|
-
canReply: {
|
|
20679
|
-
type: "boolean"
|
|
20680
|
-
}
|
|
20681
|
-
}
|
|
20682
|
-
},
|
|
20683
20680
|
generatorView: {
|
|
20684
20681
|
type: "object",
|
|
20685
20682
|
required: ["uri", "cid", "did", "creator", "displayName", "indexedAt"],
|
|
@@ -22027,8 +22024,12 @@ var schemaDict = {
|
|
|
22027
22024
|
},
|
|
22028
22025
|
listItemView: {
|
|
22029
22026
|
type: "object",
|
|
22030
|
-
required: ["subject"],
|
|
22027
|
+
required: ["uri", "subject"],
|
|
22031
22028
|
properties: {
|
|
22029
|
+
uri: {
|
|
22030
|
+
type: "string",
|
|
22031
|
+
format: "at-uri"
|
|
22032
|
+
},
|
|
22032
22033
|
subject: {
|
|
22033
22034
|
type: "ref",
|
|
22034
22035
|
ref: "lex:app.bsky.actor.defs#profileView"
|
|
@@ -25569,7 +25570,6 @@ __export(defs_exports6, {
|
|
|
25569
25570
|
isThreadViewPost: () => isThreadViewPost,
|
|
25570
25571
|
isThreadgateView: () => isThreadgateView,
|
|
25571
25572
|
isViewerState: () => isViewerState2,
|
|
25572
|
-
isViewerThreadState: () => isViewerThreadState,
|
|
25573
25573
|
validateBlockedAuthor: () => validateBlockedAuthor,
|
|
25574
25574
|
validateBlockedPost: () => validateBlockedPost,
|
|
25575
25575
|
validateFeedViewPost: () => validateFeedViewPost,
|
|
@@ -25583,8 +25583,7 @@ __export(defs_exports6, {
|
|
|
25583
25583
|
validateSkeletonReasonRepost: () => validateSkeletonReasonRepost,
|
|
25584
25584
|
validateThreadViewPost: () => validateThreadViewPost,
|
|
25585
25585
|
validateThreadgateView: () => validateThreadgateView,
|
|
25586
|
-
validateViewerState: () => validateViewerState2
|
|
25587
|
-
validateViewerThreadState: () => validateViewerThreadState
|
|
25586
|
+
validateViewerState: () => validateViewerState2
|
|
25588
25587
|
});
|
|
25589
25588
|
function isPostView(v) {
|
|
25590
25589
|
return isObj2(v) && hasProp2(v, "$type") && v.$type === "app.bsky.feed.defs#postView";
|
|
@@ -25640,12 +25639,6 @@ function isBlockedAuthor(v) {
|
|
|
25640
25639
|
function validateBlockedAuthor(v) {
|
|
25641
25640
|
return lexicons.validate("app.bsky.feed.defs#blockedAuthor", v);
|
|
25642
25641
|
}
|
|
25643
|
-
function isViewerThreadState(v) {
|
|
25644
|
-
return isObj2(v) && hasProp2(v, "$type") && v.$type === "app.bsky.feed.defs#viewerThreadState";
|
|
25645
|
-
}
|
|
25646
|
-
function validateViewerThreadState(v) {
|
|
25647
|
-
return lexicons.validate("app.bsky.feed.defs#viewerThreadState", v);
|
|
25648
|
-
}
|
|
25649
25642
|
function isGeneratorView(v) {
|
|
25650
25643
|
return isObj2(v) && hasProp2(v, "$type") && v.$type === "app.bsky.feed.defs#generatorView";
|
|
25651
25644
|
}
|