@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.
Files changed (88) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +71 -0
  3. package/lib/credentials.d.ts +35 -0
  4. package/lib/credentials.d.ts.map +1 -0
  5. package/lib/credentials.js +57 -0
  6. package/lib/credentials.js.map +1 -0
  7. package/lib/errors.d.ts +56 -0
  8. package/lib/errors.d.ts.map +1 -0
  9. package/lib/errors.js +36 -0
  10. package/lib/errors.js.map +1 -0
  11. package/lib/index.d.ts +28 -0
  12. package/lib/index.d.ts.map +1 -0
  13. package/lib/index.js +28 -0
  14. package/lib/index.js.map +1 -0
  15. package/lib/protocol.d.ts +18 -0
  16. package/lib/protocol.d.ts.map +1 -0
  17. package/lib/protocol.js +61 -0
  18. package/lib/protocol.js.map +1 -0
  19. package/lib/retry.d.ts +50 -0
  20. package/lib/retry.d.ts.map +1 -0
  21. package/lib/retry.js +43 -0
  22. package/lib/retry.js.map +1 -0
  23. package/lib/services/activitypub.d.ts +121 -0
  24. package/lib/services/activitypub.d.ts.map +1 -0
  25. package/lib/services/activitypub.js +202 -0
  26. package/lib/services/activitypub.js.map +1 -0
  27. package/lib/services/admin.d.ts +1196 -0
  28. package/lib/services/admin.d.ts.map +1 -0
  29. package/lib/services/admin.js +1276 -0
  30. package/lib/services/admin.js.map +1 -0
  31. package/lib/services/index.d.ts +11 -0
  32. package/lib/services/index.d.ts.map +1 -0
  33. package/lib/services/index.js +12 -0
  34. package/lib/services/index.js.map +1 -0
  35. package/lib/services/issue.d.ts +1479 -0
  36. package/lib/services/issue.d.ts.map +1 -0
  37. package/lib/services/issue.js +1732 -0
  38. package/lib/services/issue.js.map +1 -0
  39. package/lib/services/miscellaneous.d.ts +494 -0
  40. package/lib/services/miscellaneous.d.ts.map +1 -0
  41. package/lib/services/miscellaneous.js +471 -0
  42. package/lib/services/miscellaneous.js.map +1 -0
  43. package/lib/services/notification.d.ts +390 -0
  44. package/lib/services/notification.d.ts.map +1 -0
  45. package/lib/services/notification.js +344 -0
  46. package/lib/services/notification.js.map +1 -0
  47. package/lib/services/organization.d.ts +1593 -0
  48. package/lib/services/organization.d.ts.map +1 -0
  49. package/lib/services/organization.js +1672 -0
  50. package/lib/services/organization.js.map +1 -0
  51. package/lib/services/package.d.ts +347 -0
  52. package/lib/services/package.d.ts.map +1 -0
  53. package/lib/services/package.js +320 -0
  54. package/lib/services/package.js.map +1 -0
  55. package/lib/services/repository.d.ts +4770 -0
  56. package/lib/services/repository.d.ts.map +1 -0
  57. package/lib/services/repository.js +5449 -0
  58. package/lib/services/repository.js.map +1 -0
  59. package/lib/services/settings.d.ts +67 -0
  60. package/lib/services/settings.d.ts.map +1 -0
  61. package/lib/services/settings.js +87 -0
  62. package/lib/services/settings.js.map +1 -0
  63. package/lib/services/user.d.ts +1764 -0
  64. package/lib/services/user.d.ts.map +1 -0
  65. package/lib/services/user.js +1921 -0
  66. package/lib/services/user.js.map +1 -0
  67. package/lib/traits.d.ts +10 -0
  68. package/lib/traits.d.ts.map +1 -0
  69. package/lib/traits.js +11 -0
  70. package/lib/traits.js.map +1 -0
  71. package/package.json +78 -6
  72. package/src/credentials.ts +89 -0
  73. package/src/errors.ts +72 -0
  74. package/src/index.ts +31 -0
  75. package/src/protocol.ts +86 -0
  76. package/src/retry.ts +74 -0
  77. package/src/services/activitypub.ts +415 -0
  78. package/src/services/admin.ts +3103 -0
  79. package/src/services/index.ts +11 -0
  80. package/src/services/issue.ts +3949 -0
  81. package/src/services/miscellaneous.ts +1118 -0
  82. package/src/services/notification.ts +847 -0
  83. package/src/services/organization.ts +4008 -0
  84. package/src/services/package.ts +767 -0
  85. package/src/services/repository.ts +12839 -0
  86. package/src/services/settings.ts +190 -0
  87. package/src/services/user.ts +4669 -0
  88. package/src/traits.ts +44 -0
@@ -0,0 +1,190 @@
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 T from "../traits.ts";
5
+ import {
6
+ ForgejoProtocol,
7
+ type ForgejoOpError,
8
+ type ForgejoOpContext,
9
+ } from "../protocol.ts";
10
+ import * as Retry from "../retry.ts";
11
+
12
+ export type { ForgejoOpError, ForgejoOpContext };
13
+
14
+ export interface GetGeneralAPISettingsRequest {}
15
+ export const GetGeneralAPISettingsRequest = /*@__PURE__*/ S.suspend(() =>
16
+ S.Struct({}).pipe(T.Http({ method: "GET", uri: "/settings/api", code: 200 })),
17
+ ).annotate({
18
+ identifier: "GetGeneralAPISettingsRequest",
19
+ }) as any as S.Schema<GetGeneralAPISettingsRequest>;
20
+
21
+ /** GeneralAPISettings contains global api settings exposed by it */
22
+ export interface GeneralAPISettings {
23
+ default_git_trees_per_page?: number;
24
+ default_max_blob_size?: number;
25
+ default_paging_num?: number;
26
+ max_response_items?: number;
27
+ }
28
+ export const GeneralAPISettings = /*@__PURE__*/ S.suspend(() =>
29
+ S.Struct({
30
+ default_git_trees_per_page: S.optional(S.Number),
31
+ default_max_blob_size: S.optional(S.Number),
32
+ default_paging_num: S.optional(S.Number),
33
+ max_response_items: S.optional(S.Number),
34
+ }),
35
+ ).annotate({
36
+ identifier: "GeneralAPISettings",
37
+ }) as any as S.Schema<GeneralAPISettings>;
38
+
39
+ export interface GetGeneralAttachmentSettingsRequest {}
40
+ export const GetGeneralAttachmentSettingsRequest = /*@__PURE__*/ S.suspend(() =>
41
+ S.Struct({}).pipe(
42
+ T.Http({ method: "GET", uri: "/settings/attachment", code: 200 }),
43
+ ),
44
+ ).annotate({
45
+ identifier: "GetGeneralAttachmentSettingsRequest",
46
+ }) as any as S.Schema<GetGeneralAttachmentSettingsRequest>;
47
+
48
+ /** GeneralAttachmentSettings contains global Attachment settings exposed by API */
49
+ export interface GeneralAttachmentSettings {
50
+ allowed_types?: string;
51
+ enabled?: boolean;
52
+ max_files?: number;
53
+ max_size?: number;
54
+ }
55
+ export const GeneralAttachmentSettings = /*@__PURE__*/ S.suspend(() =>
56
+ S.Struct({
57
+ allowed_types: S.optional(S.String),
58
+ enabled: S.optional(S.Boolean),
59
+ max_files: S.optional(S.Number),
60
+ max_size: S.optional(S.Number),
61
+ }),
62
+ ).annotate({
63
+ identifier: "GeneralAttachmentSettings",
64
+ }) as any as S.Schema<GeneralAttachmentSettings>;
65
+
66
+ export interface GetGeneralRepositorySettingsRequest {}
67
+ export const GetGeneralRepositorySettingsRequest = /*@__PURE__*/ S.suspend(() =>
68
+ S.Struct({}).pipe(
69
+ T.Http({ method: "GET", uri: "/settings/repository", code: 200 }),
70
+ ),
71
+ ).annotate({
72
+ identifier: "GetGeneralRepositorySettingsRequest",
73
+ }) as any as S.Schema<GetGeneralRepositorySettingsRequest>;
74
+
75
+ /** GeneralRepoSettings contains global repository settings exposed by API */
76
+ export interface GeneralRepoSettings {
77
+ forks_disabled?: boolean;
78
+ http_git_disabled?: boolean;
79
+ lfs_disabled?: boolean;
80
+ migrations_disabled?: boolean;
81
+ mirrors_disabled?: boolean;
82
+ stars_disabled?: boolean;
83
+ time_tracking_disabled?: boolean;
84
+ }
85
+ export const GeneralRepoSettings = /*@__PURE__*/ S.suspend(() =>
86
+ S.Struct({
87
+ forks_disabled: S.optional(S.Boolean),
88
+ http_git_disabled: S.optional(S.Boolean),
89
+ lfs_disabled: S.optional(S.Boolean),
90
+ migrations_disabled: S.optional(S.Boolean),
91
+ mirrors_disabled: S.optional(S.Boolean),
92
+ stars_disabled: S.optional(S.Boolean),
93
+ time_tracking_disabled: S.optional(S.Boolean),
94
+ }),
95
+ ).annotate({
96
+ identifier: "GeneralRepoSettings",
97
+ }) as any as S.Schema<GeneralRepoSettings>;
98
+
99
+ export interface GetGeneralUISettingsRequest {}
100
+ export const GetGeneralUISettingsRequest = /*@__PURE__*/ S.suspend(() =>
101
+ S.Struct({}).pipe(T.Http({ method: "GET", uri: "/settings/ui", code: 200 })),
102
+ ).annotate({
103
+ identifier: "GetGeneralUISettingsRequest",
104
+ }) as any as S.Schema<GetGeneralUISettingsRequest>;
105
+
106
+ export type GeneralUISettingsAllowedReactionsList = Array<string>;
107
+ export const GeneralUISettingsAllowedReactionsList = /*@__PURE__*/ S.Array(
108
+ S.String,
109
+ ) as any as S.Schema<GeneralUISettingsAllowedReactionsList>;
110
+
111
+ export type GeneralUISettingsCustomEmojisList = Array<string>;
112
+ export const GeneralUISettingsCustomEmojisList = /*@__PURE__*/ S.Array(
113
+ S.String,
114
+ ) as any as S.Schema<GeneralUISettingsCustomEmojisList>;
115
+
116
+ /** GeneralUISettings contains global ui settings exposed by API */
117
+ export interface GeneralUISettings {
118
+ allowed_reactions?: GeneralUISettingsAllowedReactionsList;
119
+ custom_emojis?: GeneralUISettingsCustomEmojisList;
120
+ default_theme?: string;
121
+ }
122
+ export const GeneralUISettings = /*@__PURE__*/ S.suspend(() =>
123
+ S.Struct({
124
+ allowed_reactions: S.optional(GeneralUISettingsAllowedReactionsList),
125
+ custom_emojis: S.optional(GeneralUISettingsCustomEmojisList),
126
+ default_theme: S.optional(S.String),
127
+ }),
128
+ ).annotate({
129
+ identifier: "GeneralUISettings",
130
+ }) as any as S.Schema<GeneralUISettings>;
131
+
132
+ export type GetGeneralAPISettingsError = ForgejoOpError;
133
+ /** Get instance's global settings for api */
134
+ export const getGeneralAPISettings: API.OperationMethod<
135
+ GetGeneralAPISettingsRequest,
136
+ GeneralAPISettings,
137
+ GetGeneralAPISettingsError,
138
+ ForgejoOpContext
139
+ > = /*@__PURE__*/ API.make(() => ({
140
+ input: GetGeneralAPISettingsRequest,
141
+ output: GeneralAPISettings,
142
+ errors: [],
143
+ protocol: ForgejoProtocol,
144
+ retry: Retry.Retry,
145
+ }));
146
+
147
+ export type GetGeneralAttachmentSettingsError = ForgejoOpError;
148
+ /** Get instance's global settings for Attachment */
149
+ export const getGeneralAttachmentSettings: API.OperationMethod<
150
+ GetGeneralAttachmentSettingsRequest,
151
+ GeneralAttachmentSettings,
152
+ GetGeneralAttachmentSettingsError,
153
+ ForgejoOpContext
154
+ > = /*@__PURE__*/ API.make(() => ({
155
+ input: GetGeneralAttachmentSettingsRequest,
156
+ output: GeneralAttachmentSettings,
157
+ errors: [],
158
+ protocol: ForgejoProtocol,
159
+ retry: Retry.Retry,
160
+ }));
161
+
162
+ export type GetGeneralRepositorySettingsError = ForgejoOpError;
163
+ /** Get instance's global settings for repositories */
164
+ export const getGeneralRepositorySettings: API.OperationMethod<
165
+ GetGeneralRepositorySettingsRequest,
166
+ GeneralRepoSettings,
167
+ GetGeneralRepositorySettingsError,
168
+ ForgejoOpContext
169
+ > = /*@__PURE__*/ API.make(() => ({
170
+ input: GetGeneralRepositorySettingsRequest,
171
+ output: GeneralRepoSettings,
172
+ errors: [],
173
+ protocol: ForgejoProtocol,
174
+ retry: Retry.Retry,
175
+ }));
176
+
177
+ export type GetGeneralUISettingsError = ForgejoOpError;
178
+ /** Get instance's global settings for ui */
179
+ export const getGeneralUISettings: API.OperationMethod<
180
+ GetGeneralUISettingsRequest,
181
+ GeneralUISettings,
182
+ GetGeneralUISettingsError,
183
+ ForgejoOpContext
184
+ > = /*@__PURE__*/ API.make(() => ({
185
+ input: GetGeneralUISettingsRequest,
186
+ output: GeneralUISettings,
187
+ errors: [],
188
+ protocol: ForgejoProtocol,
189
+ retry: Retry.Retry,
190
+ }));