@distilled.cloud/forgejo 0.0.0 → 1.0.0-rc.9
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/LICENSE +201 -0
- package/README.md +71 -0
- package/lib/credentials.d.ts +35 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +57 -0
- package/lib/credentials.js.map +1 -0
- package/lib/errors.d.ts +56 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +36 -0
- package/lib/errors.js.map +1 -0
- package/lib/index.d.ts +28 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +28 -0
- package/lib/index.js.map +1 -0
- package/lib/protocol.d.ts +18 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +61 -0
- package/lib/protocol.js.map +1 -0
- package/lib/retry.d.ts +50 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +43 -0
- package/lib/retry.js.map +1 -0
- package/lib/services/activitypub.d.ts +121 -0
- package/lib/services/activitypub.d.ts.map +1 -0
- package/lib/services/activitypub.js +202 -0
- package/lib/services/activitypub.js.map +1 -0
- package/lib/services/admin.d.ts +1196 -0
- package/lib/services/admin.d.ts.map +1 -0
- package/lib/services/admin.js +1276 -0
- package/lib/services/admin.js.map +1 -0
- package/lib/services/index.d.ts +11 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +12 -0
- package/lib/services/index.js.map +1 -0
- package/lib/services/issue.d.ts +1479 -0
- package/lib/services/issue.d.ts.map +1 -0
- package/lib/services/issue.js +1732 -0
- package/lib/services/issue.js.map +1 -0
- package/lib/services/miscellaneous.d.ts +494 -0
- package/lib/services/miscellaneous.d.ts.map +1 -0
- package/lib/services/miscellaneous.js +471 -0
- package/lib/services/miscellaneous.js.map +1 -0
- package/lib/services/notification.d.ts +390 -0
- package/lib/services/notification.d.ts.map +1 -0
- package/lib/services/notification.js +344 -0
- package/lib/services/notification.js.map +1 -0
- package/lib/services/organization.d.ts +1593 -0
- package/lib/services/organization.d.ts.map +1 -0
- package/lib/services/organization.js +1672 -0
- package/lib/services/organization.js.map +1 -0
- package/lib/services/package.d.ts +347 -0
- package/lib/services/package.d.ts.map +1 -0
- package/lib/services/package.js +320 -0
- package/lib/services/package.js.map +1 -0
- package/lib/services/repository.d.ts +4770 -0
- package/lib/services/repository.d.ts.map +1 -0
- package/lib/services/repository.js +5449 -0
- package/lib/services/repository.js.map +1 -0
- package/lib/services/settings.d.ts +67 -0
- package/lib/services/settings.d.ts.map +1 -0
- package/lib/services/settings.js +87 -0
- package/lib/services/settings.js.map +1 -0
- package/lib/services/user.d.ts +1764 -0
- package/lib/services/user.d.ts.map +1 -0
- package/lib/services/user.js +1921 -0
- package/lib/services/user.js.map +1 -0
- package/lib/traits.d.ts +10 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +11 -0
- package/lib/traits.js.map +1 -0
- package/package.json +78 -6
- package/src/credentials.ts +89 -0
- package/src/errors.ts +72 -0
- package/src/index.ts +31 -0
- package/src/protocol.ts +86 -0
- package/src/retry.ts +74 -0
- package/src/services/activitypub.ts +415 -0
- package/src/services/admin.ts +3103 -0
- package/src/services/index.ts +11 -0
- package/src/services/issue.ts +3949 -0
- package/src/services/miscellaneous.ts +1118 -0
- package/src/services/notification.ts +847 -0
- package/src/services/organization.ts +4008 -0
- package/src/services/package.ts +767 -0
- package/src/services/repository.ts +12839 -0
- package/src/services/settings.ts +190 -0
- package/src/services/user.ts +4669 -0
- package/src/traits.ts +44 -0
package/lib/retry.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Forgejo retry surface — a veneer over `@distilled.cloud/core/retry`.
|
|
3
|
+
*
|
|
4
|
+
* The `Retry` service tag is threaded into every generated operation via
|
|
5
|
+
* `API.make({ retry: Retry })`, so a caller-installed policy applies to all
|
|
6
|
+
* Forgejo calls below it and core's `makeDefault` is the fallback when none
|
|
7
|
+
* is provided.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* import * as Forgejo from "@distilled.cloud/forgejo";
|
|
12
|
+
*
|
|
13
|
+
* myEffect.pipe(Forgejo.Retry.transient);
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
import * as Context from "effect/Context";
|
|
17
|
+
import * as Effect from "effect/Effect";
|
|
18
|
+
import * as Retries from "@distilled.cloud/core/retry";
|
|
19
|
+
export type Options = Retries.Options;
|
|
20
|
+
export type Factory = Retries.Factory;
|
|
21
|
+
export type Policy = Retries.Policy;
|
|
22
|
+
declare const Retry_base: Context.ServiceClass<Retry, "ForgejoRetry", Retries.Policy>;
|
|
23
|
+
/** Context tag for configuring retry behavior of Forgejo API calls. */
|
|
24
|
+
export declare class Retry extends Retry_base {
|
|
25
|
+
}
|
|
26
|
+
/** Provides a custom retry policy to every Forgejo API call below it. */
|
|
27
|
+
export declare const policy: {
|
|
28
|
+
(options: Options): <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, Retry>>;
|
|
29
|
+
(factory: Factory): <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, Retry>>;
|
|
30
|
+
};
|
|
31
|
+
/** Disables all automatic retries. */
|
|
32
|
+
export declare const none: <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, Retry>>;
|
|
33
|
+
/**
|
|
34
|
+
* The default retry policy (core's): transient/throttling/retryable errors,
|
|
35
|
+
* capped exponential backoff with jitter, server `retryAfter` hints honored
|
|
36
|
+
* with precedence.
|
|
37
|
+
*/
|
|
38
|
+
export declare const makeDefault: Factory;
|
|
39
|
+
export declare const jittered: <Error, Env>(self: import("effect/Schedule").Schedule<unknown, unknown, Error, Env>) => import("effect/Schedule").Schedule<unknown, unknown, Error, Env>;
|
|
40
|
+
export declare const capped: (max: import("effect/Duration").Duration) => <Error, Env>(self: import("effect/Schedule").Schedule<unknown, unknown, Error, Env>) => import("effect/Schedule").Schedule<unknown, unknown, Error, Env>;
|
|
41
|
+
/** Retry options that retry all throttling errors indefinitely. */
|
|
42
|
+
export declare const throttlingOptions: Options;
|
|
43
|
+
/** Retries all throttling errors indefinitely (honoring server hints). */
|
|
44
|
+
export declare const throttling: <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, Retry>>;
|
|
45
|
+
/** Retry options that retry all transient errors indefinitely. */
|
|
46
|
+
export declare const transientOptions: Options;
|
|
47
|
+
/** Retries all transient errors indefinitely (honoring server hints). */
|
|
48
|
+
export declare const transient: <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, Retry>>;
|
|
49
|
+
export {};
|
|
50
|
+
//# sourceMappingURL=retry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAC;AAEvD,MAAM,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AACtC,MAAM,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AACtC,MAAM,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;;AAEpC,uEAAuE;AACvE,qBAAa,KAAM,SAAQ,UAAgD;CAAG;AAE9E,yEAAyE;AACzE,eAAO,MAAM,MAAM,EAAE;IACnB,CACE,OAAO,EAAE,OAAO,GACf,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EACT,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAC3B,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,OA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E,CAAC,EAAE,CAAC,CAAC,KAC3B,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,CAAoC,CAAC"}
|
package/lib/retry.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Forgejo retry surface — a veneer over `@distilled.cloud/core/retry`.
|
|
3
|
+
*
|
|
4
|
+
* The `Retry` service tag is threaded into every generated operation via
|
|
5
|
+
* `API.make({ retry: Retry })`, so a caller-installed policy applies to all
|
|
6
|
+
* Forgejo calls below it and core's `makeDefault` is the fallback when none
|
|
7
|
+
* is provided.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* import * as Forgejo from "@distilled.cloud/forgejo";
|
|
12
|
+
*
|
|
13
|
+
* myEffect.pipe(Forgejo.Retry.transient);
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
import * as Context from "effect/Context";
|
|
17
|
+
import * as Effect from "effect/Effect";
|
|
18
|
+
import * as Layer from "effect/Layer";
|
|
19
|
+
import * as Retries from "@distilled.cloud/core/retry";
|
|
20
|
+
/** Context tag for configuring retry behavior of Forgejo API calls. */
|
|
21
|
+
export class Retry extends Context.Service()("ForgejoRetry") {
|
|
22
|
+
}
|
|
23
|
+
/** Provides a custom retry policy to every Forgejo API call below it. */
|
|
24
|
+
export const policy = (optionsOrFactory) => Effect.provide(Layer.succeed(Retry, optionsOrFactory));
|
|
25
|
+
/** Disables all automatic retries. */
|
|
26
|
+
export const none = Effect.provide(Layer.succeed(Retry, { while: () => false }));
|
|
27
|
+
/**
|
|
28
|
+
* The default retry policy (core's): transient/throttling/retryable errors,
|
|
29
|
+
* capped exponential backoff with jitter, server `retryAfter` hints honored
|
|
30
|
+
* with precedence.
|
|
31
|
+
*/
|
|
32
|
+
export const makeDefault = Retries.makeDefault;
|
|
33
|
+
export const jittered = Retries.jittered;
|
|
34
|
+
export const capped = Retries.capped;
|
|
35
|
+
/** Retry options that retry all throttling errors indefinitely. */
|
|
36
|
+
export const throttlingOptions = Retries.throttlingOptions;
|
|
37
|
+
/** Retries all throttling errors indefinitely (honoring server hints). */
|
|
38
|
+
export const throttling = policy(Retries.throttlingFactory);
|
|
39
|
+
/** Retry options that retry all transient errors indefinitely. */
|
|
40
|
+
export const transientOptions = Retries.transientOptions;
|
|
41
|
+
/** Retries all transient errors indefinitely (honoring server hints). */
|
|
42
|
+
export const transient = policy(Retries.transientFactory);
|
|
43
|
+
//# sourceMappingURL=retry.js.map
|
package/lib/retry.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAC;AAMvD,uEAAuE;AACvE,MAAM,OAAO,KAAM,SAAQ,OAAO,CAAC,OAAO,EAAiB,CAAC,cAAc,CAAC;CAAG;AAE9E,yEAAyE;AACzE,MAAM,CAAC,MAAM,MAAM,GAWf,CAAC,gBAAmC,EAAE,EAAE,CAC1C,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAEzD,sCAAsC;AACtC,MAAM,CAAC,MAAM,IAAI,GAE6B,MAAM,CAAC,OAAO,CAC1D,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,CAC7C,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAY,OAAO,CAAC,WAAW,CAAC;AAExD,MAAM,CAAC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;AACzC,MAAM,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;AAErC,mEAAmE;AACnE,MAAM,CAAC,MAAM,iBAAiB,GAAY,OAAO,CAAC,iBAAiB,CAAC;AAEpE,0EAA0E;AAC1E,MAAM,CAAC,MAAM,UAAU,GAEuB,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEhF,kEAAkE;AAClE,MAAM,CAAC,MAAM,gBAAgB,GAAY,OAAO,CAAC,gBAAgB,CAAC;AAElE,yEAAyE;AACzE,MAAM,CAAC,MAAM,SAAS,GAEwB,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import * as S from "@distilled.cloud/core/schema";
|
|
2
|
+
import * as API from "@distilled.cloud/core/api";
|
|
3
|
+
import { type ForgejoOpError, type ForgejoOpContext } from "../protocol.ts";
|
|
4
|
+
export type { ForgejoOpError, ForgejoOpContext };
|
|
5
|
+
declare const Forbidden_base: S.Class<Forbidden, S.TaggedStruct<"Forbidden", {
|
|
6
|
+
readonly code: any;
|
|
7
|
+
readonly message: any;
|
|
8
|
+
}>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
|
|
9
|
+
"@distilled.cloud/error/categories": {
|
|
10
|
+
AuthError: true;
|
|
11
|
+
};
|
|
12
|
+
});
|
|
13
|
+
export declare class Forbidden extends /*@__PURE__*/ Forbidden_base {
|
|
14
|
+
}
|
|
15
|
+
export interface ActivitypubInstanceActorRequest {
|
|
16
|
+
}
|
|
17
|
+
export declare const ActivitypubInstanceActorRequest: S.Schema<ActivitypubInstanceActorRequest>;
|
|
18
|
+
/** ActivityPub type */
|
|
19
|
+
export interface ActivityPub {
|
|
20
|
+
_context?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const ActivityPub: S.Schema<ActivityPub>;
|
|
23
|
+
export interface ActivitypubInstanceActorInboxRequest {
|
|
24
|
+
}
|
|
25
|
+
export declare const ActivitypubInstanceActorInboxRequest: S.Schema<ActivitypubInstanceActorInboxRequest>;
|
|
26
|
+
export interface ActivitypubInstanceActorInboxResponse {
|
|
27
|
+
}
|
|
28
|
+
export declare const ActivitypubInstanceActorInboxResponse: S.Schema<ActivitypubInstanceActorInboxResponse>;
|
|
29
|
+
export interface ActivitypubInstanceActorOutboxRequest {
|
|
30
|
+
}
|
|
31
|
+
export declare const ActivitypubInstanceActorOutboxRequest: S.Schema<ActivitypubInstanceActorOutboxRequest>;
|
|
32
|
+
export type ActivitypubInstanceActorOutboxResponse = unknown;
|
|
33
|
+
export declare const ActivitypubInstanceActorOutboxResponse: S.Schema<ActivitypubInstanceActorOutboxResponse>;
|
|
34
|
+
export interface ActivitypubPersonRequest {
|
|
35
|
+
/** user ID of the user */
|
|
36
|
+
user_id: number;
|
|
37
|
+
}
|
|
38
|
+
export declare const ActivitypubPersonRequest: S.Schema<ActivitypubPersonRequest>;
|
|
39
|
+
export interface ActivitypubPersonActivityRequest {
|
|
40
|
+
/** user ID of the user */
|
|
41
|
+
user_id: number;
|
|
42
|
+
/** activity ID of the sought activity */
|
|
43
|
+
activity_id: number;
|
|
44
|
+
}
|
|
45
|
+
export declare const ActivitypubPersonActivityRequest: S.Schema<ActivitypubPersonActivityRequest>;
|
|
46
|
+
export interface ActivitypubPersonActivityNoteRequest {
|
|
47
|
+
/** user ID of the user */
|
|
48
|
+
user_id: number;
|
|
49
|
+
/** activity ID of the sought activity */
|
|
50
|
+
activity_id: number;
|
|
51
|
+
}
|
|
52
|
+
export declare const ActivitypubPersonActivityNoteRequest: S.Schema<ActivitypubPersonActivityNoteRequest>;
|
|
53
|
+
export interface ActivitypubPersonFeedRequest {
|
|
54
|
+
/** user ID of the user */
|
|
55
|
+
user_id: number;
|
|
56
|
+
}
|
|
57
|
+
export declare const ActivitypubPersonFeedRequest: S.Schema<ActivitypubPersonFeedRequest>;
|
|
58
|
+
export type ActivitypubPersonFeedResponse = unknown;
|
|
59
|
+
export declare const ActivitypubPersonFeedResponse: S.Schema<ActivitypubPersonFeedResponse>;
|
|
60
|
+
export interface ActivitypubPersonInboxRequest {
|
|
61
|
+
/** user ID of the user */
|
|
62
|
+
user_id: number;
|
|
63
|
+
}
|
|
64
|
+
export declare const ActivitypubPersonInboxRequest: S.Schema<ActivitypubPersonInboxRequest>;
|
|
65
|
+
export interface ActivitypubPersonInboxResponse {
|
|
66
|
+
}
|
|
67
|
+
export declare const ActivitypubPersonInboxResponse: S.Schema<ActivitypubPersonInboxResponse>;
|
|
68
|
+
export interface ActivitypubRepositoryRequest {
|
|
69
|
+
/** repository ID of the repo */
|
|
70
|
+
repository_id: number;
|
|
71
|
+
}
|
|
72
|
+
export declare const ActivitypubRepositoryRequest: S.Schema<ActivitypubRepositoryRequest>;
|
|
73
|
+
export interface ActivitypubRepositoryInboxRequest {
|
|
74
|
+
/** repository ID of the repo */
|
|
75
|
+
repository_id: number;
|
|
76
|
+
}
|
|
77
|
+
export declare const ActivitypubRepositoryInboxRequest: S.Schema<ActivitypubRepositoryInboxRequest>;
|
|
78
|
+
export interface ActivitypubRepositoryInboxResponse {
|
|
79
|
+
}
|
|
80
|
+
export declare const ActivitypubRepositoryInboxResponse: S.Schema<ActivitypubRepositoryInboxResponse>;
|
|
81
|
+
export interface ActivitypubRepositoryOutboxRequest {
|
|
82
|
+
/** repository ID of the repo */
|
|
83
|
+
repository_id: number;
|
|
84
|
+
}
|
|
85
|
+
export declare const ActivitypubRepositoryOutboxRequest: S.Schema<ActivitypubRepositoryOutboxRequest>;
|
|
86
|
+
export type ActivitypubRepositoryOutboxResponse = unknown;
|
|
87
|
+
export declare const ActivitypubRepositoryOutboxResponse: S.Schema<ActivitypubRepositoryOutboxResponse>;
|
|
88
|
+
export type ActivitypubInstanceActorError = ForgejoOpError;
|
|
89
|
+
/** Returns the instance's Actor */
|
|
90
|
+
export declare const activitypubInstanceActor: API.OperationMethod<ActivitypubInstanceActorRequest, ActivityPub, ActivitypubInstanceActorError, ForgejoOpContext>;
|
|
91
|
+
export type ActivitypubInstanceActorInboxError = ForgejoOpError;
|
|
92
|
+
/** Send to the inbox */
|
|
93
|
+
export declare const activitypubInstanceActorInbox: API.OperationMethod<ActivitypubInstanceActorInboxRequest, ActivitypubInstanceActorInboxResponse, ActivitypubInstanceActorInboxError, ForgejoOpContext>;
|
|
94
|
+
export type ActivitypubInstanceActorOutboxError = ForgejoOpError;
|
|
95
|
+
/** Display the outbox (always empty) */
|
|
96
|
+
export declare const activitypubInstanceActorOutbox: API.OperationMethod<ActivitypubInstanceActorOutboxRequest, ActivitypubInstanceActorOutboxResponse, ActivitypubInstanceActorOutboxError, ForgejoOpContext>;
|
|
97
|
+
export type ActivitypubPersonError = ForgejoOpError;
|
|
98
|
+
/** Returns the Person actor for a user */
|
|
99
|
+
export declare const activitypubPerson: API.OperationMethod<ActivitypubPersonRequest, ActivityPub, ActivitypubPersonError, ForgejoOpContext>;
|
|
100
|
+
export type ActivitypubPersonActivityError = ForgejoOpError;
|
|
101
|
+
/** Get a specific activity of the user */
|
|
102
|
+
export declare const activitypubPersonActivity: API.OperationMethod<ActivitypubPersonActivityRequest, ActivityPub, ActivitypubPersonActivityError, ForgejoOpContext>;
|
|
103
|
+
export type ActivitypubPersonActivityNoteError = ForgejoOpError;
|
|
104
|
+
/** Get a specific activity object of the user */
|
|
105
|
+
export declare const activitypubPersonActivityNote: API.OperationMethod<ActivitypubPersonActivityNoteRequest, ActivityPub, ActivitypubPersonActivityNoteError, ForgejoOpContext>;
|
|
106
|
+
export type ActivitypubPersonFeedError = Forbidden | ForgejoOpError;
|
|
107
|
+
/** List the user's recorded activity */
|
|
108
|
+
export declare const activitypubPersonFeed: API.OperationMethod<ActivitypubPersonFeedRequest, ActivitypubPersonFeedResponse, ActivitypubPersonFeedError, ForgejoOpContext>;
|
|
109
|
+
export type ActivitypubPersonInboxError = ForgejoOpError;
|
|
110
|
+
/** Send to the inbox */
|
|
111
|
+
export declare const activitypubPersonInbox: API.OperationMethod<ActivitypubPersonInboxRequest, ActivitypubPersonInboxResponse, ActivitypubPersonInboxError, ForgejoOpContext>;
|
|
112
|
+
export type ActivitypubRepositoryError = ForgejoOpError;
|
|
113
|
+
/** Returns the Repository actor for a repo */
|
|
114
|
+
export declare const activitypubRepository: API.OperationMethod<ActivitypubRepositoryRequest, ActivityPub, ActivitypubRepositoryError, ForgejoOpContext>;
|
|
115
|
+
export type ActivitypubRepositoryInboxError = ForgejoOpError;
|
|
116
|
+
/** Send to the inbox */
|
|
117
|
+
export declare const activitypubRepositoryInbox: API.OperationMethod<ActivitypubRepositoryInboxRequest, ActivitypubRepositoryInboxResponse, ActivitypubRepositoryInboxError, ForgejoOpContext>;
|
|
118
|
+
export type ActivitypubRepositoryOutboxError = ForgejoOpError;
|
|
119
|
+
/** Display the outbox */
|
|
120
|
+
export declare const activitypubRepositoryOutbox: API.OperationMethod<ActivitypubRepositoryOutboxRequest, ActivitypubRepositoryOutboxResponse, ActivitypubRepositoryOutboxError, ForgejoOpContext>;
|
|
121
|
+
//# sourceMappingURL=activitypub.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activitypub.d.ts","sourceRoot":"","sources":["../../src/services/activitypub.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAGjD,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAC;;;;;;;;;AAEjD,qBAAa,SACX,SAAQ,aAAa,CAAC,cAMrB;CAAG;AAEN,MAAM,WAAW,+BAA+B;CAAG;AACnD,eAAO,MAAM,+BAA+B,EAM/B,CAAC,CAAC,MAAM,CAAC,+BAA+B,CAAC,CAAC;AAEvD,uBAAuB;AACvB,MAAM,WAAW,WAAW;IAC1B,QAAQ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ACzD,wBAAwB;AACxB,eAAO,MAAM,sBAAsB,EAAE,GAAG,CAAC,eAAe,CACtD,6BAA6B,EAC7B,8BAA8B,EAC9B,2BAA2B,EAC3B,gBAAgB,CAOf,CAAC;AAEJ,MAAM,MAAM,0BAA0B,GAAG,cAAc,CAAC;AACxD,8CAA8C;AAC9C,eAAO,MAAM,qBAAqB,EAAE,GAAG,CAAC,eAAe,CACrD,4BAA4B,EAC5B,WAAW,EACX,0BAA0B,EAC1B,gBAAgB,CAOf,CAAC;AAEJ,MAAM,MAAM,+BAA+B,GAAG,cAAc,CAAC;AAC7D,wBAAwB;AACxB,eAAO,MAAM,0BAA0B,EAAE,GAAG,CAAC,eAAe,CAC1D,iCAAiC,EACjC,kCAAkC,EAClC,+BAA+B,EAC/B,gBAAgB,CAOf,CAAC;AAEJ,MAAM,MAAM,gCAAgC,GAAG,cAAc,CAAC;AAC9D,yBAAyB;AACzB,eAAO,MAAM,2BAA2B,EAAE,GAAG,CAAC,eAAe,CAC3D,kCAAkC,EAClC,mCAAmC,EACnC,gCAAgC,EAChC,gBAAgB,CAOf,CAAC"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-forgejo). Do not edit.
|
|
2
|
+
import * as S from "@distilled.cloud/core/schema";
|
|
3
|
+
import * as API from "@distilled.cloud/core/api";
|
|
4
|
+
import * as C from "@distilled.cloud/core/category";
|
|
5
|
+
import * as T from "../traits.js";
|
|
6
|
+
import { ForgejoProtocol, } from "../protocol.js";
|
|
7
|
+
import * as Retry from "../retry.js";
|
|
8
|
+
export class Forbidden extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
|
|
9
|
+
/*@__PURE__*/ S.TaggedError()("Forbidden", {
|
|
10
|
+
code: S.Number,
|
|
11
|
+
message: S.String,
|
|
12
|
+
}).pipe(C.withAuthError), [{ status: 403 }]) {
|
|
13
|
+
}
|
|
14
|
+
export const ActivitypubInstanceActorRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/activitypub/actor", code: 200 }))).annotate({
|
|
15
|
+
identifier: "ActivitypubInstanceActorRequest",
|
|
16
|
+
});
|
|
17
|
+
export const ActivityPub = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
18
|
+
_context: S.optional(S.String.pipe(T.Body("@context"))),
|
|
19
|
+
})).annotate({ identifier: "ActivityPub" });
|
|
20
|
+
export const ActivitypubInstanceActorInboxRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "POST", uri: "/activitypub/actor/inbox", code: 200 }))).annotate({
|
|
21
|
+
identifier: "ActivitypubInstanceActorInboxRequest",
|
|
22
|
+
});
|
|
23
|
+
export const ActivitypubInstanceActorInboxResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
24
|
+
identifier: "ActivitypubInstanceActorInboxResponse",
|
|
25
|
+
});
|
|
26
|
+
export const ActivitypubInstanceActorOutboxRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "POST", uri: "/activitypub/actor/outbox", code: 200 }))).annotate({
|
|
27
|
+
identifier: "ActivitypubInstanceActorOutboxRequest",
|
|
28
|
+
});
|
|
29
|
+
export const ActivitypubInstanceActorOutboxResponse = /*@__PURE__*/ S.suspend(() => S.Unknown.pipe(T.RawResponseRoot())).annotate({
|
|
30
|
+
identifier: "ActivitypubInstanceActorOutboxResponse",
|
|
31
|
+
});
|
|
32
|
+
export const ActivitypubPersonRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
33
|
+
user_id: S.Number.pipe(T.Label()),
|
|
34
|
+
}).pipe(T.Http({ method: "GET", uri: "/activitypub/user-id/{user_id}", code: 200 }))).annotate({
|
|
35
|
+
identifier: "ActivitypubPersonRequest",
|
|
36
|
+
});
|
|
37
|
+
export const ActivitypubPersonActivityRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
38
|
+
user_id: S.Number.pipe(T.Label()),
|
|
39
|
+
activity_id: S.Number.pipe(T.Label()),
|
|
40
|
+
}).pipe(T.Http({
|
|
41
|
+
method: "GET",
|
|
42
|
+
uri: "/activitypub/user-id/{user_id}/activities/{activity_id}/activity",
|
|
43
|
+
code: 200,
|
|
44
|
+
}))).annotate({
|
|
45
|
+
identifier: "ActivitypubPersonActivityRequest",
|
|
46
|
+
});
|
|
47
|
+
export const ActivitypubPersonActivityNoteRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
48
|
+
user_id: S.Number.pipe(T.Label()),
|
|
49
|
+
activity_id: S.Number.pipe(T.Label()),
|
|
50
|
+
}).pipe(T.Http({
|
|
51
|
+
method: "GET",
|
|
52
|
+
uri: "/activitypub/user-id/{user_id}/activities/{activity_id}",
|
|
53
|
+
code: 200,
|
|
54
|
+
}))).annotate({
|
|
55
|
+
identifier: "ActivitypubPersonActivityNoteRequest",
|
|
56
|
+
});
|
|
57
|
+
export const ActivitypubPersonFeedRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
58
|
+
user_id: S.Number.pipe(T.Label()),
|
|
59
|
+
}).pipe(T.Http({
|
|
60
|
+
method: "GET",
|
|
61
|
+
uri: "/activitypub/user-id/{user_id}/outbox",
|
|
62
|
+
code: 200,
|
|
63
|
+
}))).annotate({
|
|
64
|
+
identifier: "ActivitypubPersonFeedRequest",
|
|
65
|
+
});
|
|
66
|
+
export const ActivitypubPersonFeedResponse = /*@__PURE__*/ S.suspend(() => S.Unknown.pipe(T.RawResponseRoot())).annotate({
|
|
67
|
+
identifier: "ActivitypubPersonFeedResponse",
|
|
68
|
+
});
|
|
69
|
+
export const ActivitypubPersonInboxRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
70
|
+
user_id: S.Number.pipe(T.Label()),
|
|
71
|
+
}).pipe(T.Http({
|
|
72
|
+
method: "POST",
|
|
73
|
+
uri: "/activitypub/user-id/{user_id}/inbox",
|
|
74
|
+
code: 200,
|
|
75
|
+
}))).annotate({
|
|
76
|
+
identifier: "ActivitypubPersonInboxRequest",
|
|
77
|
+
});
|
|
78
|
+
export const ActivitypubPersonInboxResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
79
|
+
identifier: "ActivitypubPersonInboxResponse",
|
|
80
|
+
});
|
|
81
|
+
export const ActivitypubRepositoryRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
82
|
+
repository_id: S.Number.pipe(T.Label()),
|
|
83
|
+
}).pipe(T.Http({
|
|
84
|
+
method: "GET",
|
|
85
|
+
uri: "/activitypub/repository-id/{repository_id}",
|
|
86
|
+
code: 200,
|
|
87
|
+
}))).annotate({
|
|
88
|
+
identifier: "ActivitypubRepositoryRequest",
|
|
89
|
+
});
|
|
90
|
+
export const ActivitypubRepositoryInboxRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
91
|
+
repository_id: S.Number.pipe(T.Label()),
|
|
92
|
+
}).pipe(T.Http({
|
|
93
|
+
method: "POST",
|
|
94
|
+
uri: "/activitypub/repository-id/{repository_id}/inbox",
|
|
95
|
+
code: 200,
|
|
96
|
+
}))).annotate({
|
|
97
|
+
identifier: "ActivitypubRepositoryInboxRequest",
|
|
98
|
+
});
|
|
99
|
+
export const ActivitypubRepositoryInboxResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
100
|
+
identifier: "ActivitypubRepositoryInboxResponse",
|
|
101
|
+
});
|
|
102
|
+
export const ActivitypubRepositoryOutboxRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
103
|
+
repository_id: S.Number.pipe(T.Label()),
|
|
104
|
+
}).pipe(T.Http({
|
|
105
|
+
method: "POST",
|
|
106
|
+
uri: "/activitypub/repository-id/{repository_id}/outbox",
|
|
107
|
+
code: 200,
|
|
108
|
+
}))).annotate({
|
|
109
|
+
identifier: "ActivitypubRepositoryOutboxRequest",
|
|
110
|
+
});
|
|
111
|
+
export const ActivitypubRepositoryOutboxResponse = /*@__PURE__*/ S.suspend(() => S.Unknown.pipe(T.RawResponseRoot())).annotate({
|
|
112
|
+
identifier: "ActivitypubRepositoryOutboxResponse",
|
|
113
|
+
});
|
|
114
|
+
/** Returns the instance's Actor */
|
|
115
|
+
export const activitypubInstanceActor = /*@__PURE__*/ API.make(() => ({
|
|
116
|
+
input: ActivitypubInstanceActorRequest,
|
|
117
|
+
output: ActivityPub,
|
|
118
|
+
errors: [],
|
|
119
|
+
protocol: ForgejoProtocol,
|
|
120
|
+
retry: Retry.Retry,
|
|
121
|
+
}));
|
|
122
|
+
/** Send to the inbox */
|
|
123
|
+
export const activitypubInstanceActorInbox = /*@__PURE__*/ API.make(() => ({
|
|
124
|
+
input: ActivitypubInstanceActorInboxRequest,
|
|
125
|
+
output: ActivitypubInstanceActorInboxResponse,
|
|
126
|
+
errors: [],
|
|
127
|
+
protocol: ForgejoProtocol,
|
|
128
|
+
retry: Retry.Retry,
|
|
129
|
+
}));
|
|
130
|
+
/** Display the outbox (always empty) */
|
|
131
|
+
export const activitypubInstanceActorOutbox = /*@__PURE__*/ API.make(() => ({
|
|
132
|
+
input: ActivitypubInstanceActorOutboxRequest,
|
|
133
|
+
output: ActivitypubInstanceActorOutboxResponse,
|
|
134
|
+
errors: [],
|
|
135
|
+
protocol: ForgejoProtocol,
|
|
136
|
+
retry: Retry.Retry,
|
|
137
|
+
}));
|
|
138
|
+
/** Returns the Person actor for a user */
|
|
139
|
+
export const activitypubPerson = /*@__PURE__*/ API.make(() => ({
|
|
140
|
+
input: ActivitypubPersonRequest,
|
|
141
|
+
output: ActivityPub,
|
|
142
|
+
errors: [],
|
|
143
|
+
protocol: ForgejoProtocol,
|
|
144
|
+
retry: Retry.Retry,
|
|
145
|
+
}));
|
|
146
|
+
/** Get a specific activity of the user */
|
|
147
|
+
export const activitypubPersonActivity = /*@__PURE__*/ API.make(() => ({
|
|
148
|
+
input: ActivitypubPersonActivityRequest,
|
|
149
|
+
output: ActivityPub,
|
|
150
|
+
errors: [],
|
|
151
|
+
protocol: ForgejoProtocol,
|
|
152
|
+
retry: Retry.Retry,
|
|
153
|
+
}));
|
|
154
|
+
/** Get a specific activity object of the user */
|
|
155
|
+
export const activitypubPersonActivityNote = /*@__PURE__*/ API.make(() => ({
|
|
156
|
+
input: ActivitypubPersonActivityNoteRequest,
|
|
157
|
+
output: ActivityPub,
|
|
158
|
+
errors: [],
|
|
159
|
+
protocol: ForgejoProtocol,
|
|
160
|
+
retry: Retry.Retry,
|
|
161
|
+
}));
|
|
162
|
+
/** List the user's recorded activity */
|
|
163
|
+
export const activitypubPersonFeed = /*@__PURE__*/ API.make(() => ({
|
|
164
|
+
input: ActivitypubPersonFeedRequest,
|
|
165
|
+
output: ActivitypubPersonFeedResponse,
|
|
166
|
+
errors: [Forbidden],
|
|
167
|
+
protocol: ForgejoProtocol,
|
|
168
|
+
retry: Retry.Retry,
|
|
169
|
+
}));
|
|
170
|
+
/** Send to the inbox */
|
|
171
|
+
export const activitypubPersonInbox = /*@__PURE__*/ API.make(() => ({
|
|
172
|
+
input: ActivitypubPersonInboxRequest,
|
|
173
|
+
output: ActivitypubPersonInboxResponse,
|
|
174
|
+
errors: [],
|
|
175
|
+
protocol: ForgejoProtocol,
|
|
176
|
+
retry: Retry.Retry,
|
|
177
|
+
}));
|
|
178
|
+
/** Returns the Repository actor for a repo */
|
|
179
|
+
export const activitypubRepository = /*@__PURE__*/ API.make(() => ({
|
|
180
|
+
input: ActivitypubRepositoryRequest,
|
|
181
|
+
output: ActivityPub,
|
|
182
|
+
errors: [],
|
|
183
|
+
protocol: ForgejoProtocol,
|
|
184
|
+
retry: Retry.Retry,
|
|
185
|
+
}));
|
|
186
|
+
/** Send to the inbox */
|
|
187
|
+
export const activitypubRepositoryInbox = /*@__PURE__*/ API.make(() => ({
|
|
188
|
+
input: ActivitypubRepositoryInboxRequest,
|
|
189
|
+
output: ActivitypubRepositoryInboxResponse,
|
|
190
|
+
errors: [],
|
|
191
|
+
protocol: ForgejoProtocol,
|
|
192
|
+
retry: Retry.Retry,
|
|
193
|
+
}));
|
|
194
|
+
/** Display the outbox */
|
|
195
|
+
export const activitypubRepositoryOutbox = /*@__PURE__*/ API.make(() => ({
|
|
196
|
+
input: ActivitypubRepositoryOutboxRequest,
|
|
197
|
+
output: ActivitypubRepositoryOutboxResponse,
|
|
198
|
+
errors: [],
|
|
199
|
+
protocol: ForgejoProtocol,
|
|
200
|
+
retry: Retry.Retry,
|
|
201
|
+
}));
|
|
202
|
+
//# sourceMappingURL=activitypub.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activitypub.js","sourceRoot":"","sources":["../../src/services/activitypub.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,gCAAgC,CAAC;AACpD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EACL,eAAe,GAGhB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;AAIrC,MAAM,OAAO,SACX,SAAQ,aAAa,CAAb,aAAa,CAAC,CAAC,CAAC,kBAAkB;AACxC,aAAa,CAAC,CAAC,CAAC,WAAW,EAAa,CAAC,WAAW,EAAE;IACpD,IAAI,EAAE,CAAC,CAAC,MAAM;IACd,OAAO,EAAE,CAAC,CAAC,MAAM;CAClB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,EACxB,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAClB;CAAG;AAGN,MAAM,CAAC,MAAM,+BAA+B,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAC1E,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,CACf,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,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