@discourse/types 0.0.2 → 2026.1.0-974733b

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 (211) hide show
  1. package/declarations/admin/components/admin-config-areas/upcoming-change-item.d.ts +1 -1
  2. package/declarations/admin/components/admin-config-areas/upcoming-changes.d.ts +5 -0
  3. package/declarations/admin/components/admin-config-areas/upcoming-changes.d.ts.map +1 -1
  4. package/declarations/admin/components/admin-theme-editor.d.ts +1 -1
  5. package/declarations/admin/components/dashboard-new-features.d.ts.map +1 -1
  6. package/declarations/admin/components/edit-category-security.d.ts.map +1 -1
  7. package/declarations/admin/components/webhook-event.d.ts +2 -2
  8. package/declarations/admin/models/email-template.d.ts +1 -1
  9. package/declarations/admin/models/report.d.ts +12 -12
  10. package/declarations/app/components/bookmark-icon.d.ts +1 -1
  11. package/declarations/app/components/bookmark-menu.d.ts +1 -1
  12. package/declarations/app/components/category-permission-row.d.ts.map +1 -1
  13. package/declarations/app/components/composer-toggles.d.ts +1 -1
  14. package/declarations/app/components/d-navigation-item.d.ts +1 -1
  15. package/declarations/app/components/date-input.d.ts +1 -1
  16. package/declarations/app/components/date-picker.d.ts +1 -1
  17. package/declarations/app/components/group-manage-save-button.d.ts +2 -4
  18. package/declarations/app/components/group-manage-save-button.d.ts.map +1 -1
  19. package/declarations/app/components/group-smtp-email-settings.d.ts +1 -1
  20. package/declarations/app/components/header/contents.d.ts +1 -1
  21. package/declarations/app/components/header/logo.d.ts +1 -1
  22. package/declarations/app/components/header/search-menu-wrapper.d.ts +1 -1
  23. package/declarations/app/components/header/topic/info.d.ts +1 -1
  24. package/declarations/app/components/interface-color-selector.d.ts +1 -1
  25. package/declarations/app/components/light-dark-img.d.ts +1 -1
  26. package/declarations/app/components/modal/avatar-selector.d.ts +1 -1
  27. package/declarations/app/components/modal/group-default-notifications.d.ts.map +1 -1
  28. package/declarations/app/components/modal/move-to-topic.d.ts +1 -1
  29. package/declarations/app/components/modal/spreadsheet-editor.d.ts.map +1 -1
  30. package/declarations/app/components/post/menu/buttons/delete.d.ts +2 -2
  31. package/declarations/app/components/post/meta-data/reply-to-tab.d.ts.map +1 -1
  32. package/declarations/app/components/post/quoted-content.d.ts +1 -1
  33. package/declarations/app/components/post-language-selector.d.ts.map +1 -1
  34. package/declarations/app/components/post-list/item/index.d.ts +1 -1
  35. package/declarations/app/components/reviewable-bundled-action.d.ts +1 -1
  36. package/declarations/app/components/reviewable-refresh/item.d.ts.map +1 -1
  37. package/declarations/app/components/reviewable-refresh/timeline.d.ts.map +1 -1
  38. package/declarations/app/components/sidebar/common/custom-section.d.ts +3 -3
  39. package/declarations/app/components/sidebar/common/custom-section.d.ts.map +1 -1
  40. package/declarations/app/components/sidebar/edit-navigation-menu/categories-modal.d.ts.map +1 -1
  41. package/declarations/app/components/sidebar/user/tags-section.d.ts +2 -2
  42. package/declarations/app/components/sidebar/user/tags-section.d.ts.map +1 -1
  43. package/declarations/app/components/signup-progress-bar.d.ts +1 -1
  44. package/declarations/app/components/table-header-toggle.d.ts +1 -1
  45. package/declarations/app/components/topic-drafts-dropdown.d.ts +1 -1
  46. package/declarations/app/components/topic-list/bulk-select-checkbox.d.ts +3 -0
  47. package/declarations/app/components/topic-list/bulk-select-checkbox.d.ts.map +1 -0
  48. package/declarations/app/components/topic-list/item/bulk-select-cell.d.ts.map +1 -1
  49. package/declarations/app/components/topic-list/item/replies-cell.d.ts +1 -1
  50. package/declarations/app/components/topic-list/item/topic-cell.d.ts +0 -2
  51. package/declarations/app/components/topic-list/item/topic-cell.d.ts.map +1 -1
  52. package/declarations/app/components/topic-list/item.d.ts.map +1 -1
  53. package/declarations/app/components/topic-map/topic-map-summary.d.ts +1 -1
  54. package/declarations/app/components/uppy-image-uploader.d.ts +1 -1
  55. package/declarations/app/controllers/review/index.d.ts +1 -1
  56. package/declarations/app/controllers/user-activity/bookmarks.d.ts +2 -2
  57. package/declarations/app/controllers/user.d.ts +2 -2
  58. package/declarations/app/form-kit/components/fk/control/password.d.ts +1 -1
  59. package/declarations/app/lib/deprecated.d.ts.map +1 -1
  60. package/declarations/app/lib/optional-service.d.ts +2 -2
  61. package/declarations/app/lib/optional-service.d.ts.map +1 -1
  62. package/declarations/app/lib/render-tags.d.ts.map +1 -1
  63. package/declarations/app/lib/sidebar/common/community-section/faq-section-link.d.ts +2 -2
  64. package/declarations/app/lib/sidebar/user/community-section/my-posts-section-link.d.ts +1 -1
  65. package/declarations/app/models/badge.d.ts +1 -1
  66. package/declarations/app/models/bookmark.d.ts +3 -3
  67. package/declarations/app/models/group.d.ts +1 -1
  68. package/declarations/app/models/post-stream.d.ts +1 -1
  69. package/declarations/app/models/post.d.ts +1 -1
  70. package/declarations/app/models/reviewable.d.ts +1 -1
  71. package/declarations/app/models/tag-group.d.ts +1 -1
  72. package/declarations/app/models/user.d.ts +1 -1
  73. package/declarations/app/routes/badges/index.d.ts +1 -1
  74. package/declarations/app/routes/badges/show.d.ts +1 -1
  75. package/declarations/app/routes/invites/show.d.ts +1 -1
  76. package/declarations/app/routes/second-factor-auth.d.ts +1 -1
  77. package/declarations/app/services/composer.d.ts +1 -1
  78. package/declarations/app/services/composer.d.ts.map +1 -1
  79. package/declarations/app/services/pm-topic-tracking-state.d.ts +1 -1
  80. package/declarations/app/services/search.d.ts +1 -1
  81. package/declarations/app/static/prosemirror/core/serializer.d.ts +1 -0
  82. package/declarations/app/static/prosemirror/core/serializer.d.ts.map +1 -1
  83. package/declarations/select-kit/components/composer-actions.d.ts +1 -1
  84. package/declarations/select-kit/components/email-group-user-chooser.d.ts +1 -1
  85. package/declarations/tests/helpers/qunit-helpers.d.ts +2 -1
  86. package/declarations/tests/helpers/qunit-helpers.d.ts.map +1 -1
  87. package/declarations/tests/helpers/site-settings.d.ts.map +1 -1
  88. package/declarations/tsconfig.tsbuildinfo +1 -1
  89. package/external-types/@types__jquery/JQuery.d.ts +13440 -0
  90. package/external-types/@types__jquery/JQueryStatic.d.ts +13944 -0
  91. package/external-types/@types__jquery/LICENSE +21 -0
  92. package/external-types/@types__jquery/dist/jquery.slim.d.ts +3 -0
  93. package/external-types/@types__jquery/index.d.ts +7 -0
  94. package/external-types/@types__jquery/legacy.d.ts +204 -0
  95. package/external-types/@types__jquery/misc.d.ts +7388 -0
  96. package/external-types/@types__jquery/package.json +133 -0
  97. package/external-types/@types__sinon/LICENSE +21 -0
  98. package/external-types/@types__sinon/index.d.ts +1468 -0
  99. package/external-types/@types__sinon/package.json +63 -0
  100. package/external-types/discourse-i18n/package.json +42 -0
  101. package/external-types/discourse-i18n/src/index.d.ts +70 -0
  102. package/external-types/pretender/LICENSE +19 -0
  103. package/external-types/pretender/index.d.ts +60 -0
  104. package/external-types/pretender/package.json +75 -0
  105. package/external-types.d.ts +4 -0
  106. package/package.json +13 -1
  107. package/tsconfig-plugin.json +1 -1
  108. package/declarations/admin/compat-modules.d.ts +0 -3
  109. package/declarations/admin/compat-modules.d.ts.map +0 -1
  110. package/declarations/admin/controllers/admin-web-hooks/edit.d.ts +0 -19
  111. package/declarations/admin/controllers/admin-web-hooks/edit.d.ts.map +0 -1
  112. package/declarations/admin/controllers/admin-web-hooks/index.d.ts +0 -13
  113. package/declarations/admin/controllers/admin-web-hooks/index.d.ts.map +0 -1
  114. package/declarations/admin/templates/admin-config/welcome-banner.d.ts +0 -3
  115. package/declarations/admin/templates/admin-config/welcome-banner.d.ts.map +0 -1
  116. package/declarations/app/components/about-page-user.d.ts +0 -3
  117. package/declarations/app/components/about-page-user.d.ts.map +0 -1
  118. package/declarations/app/components/bootstrap-mode-notice.d.ts +0 -7
  119. package/declarations/app/components/bootstrap-mode-notice.d.ts.map +0 -1
  120. package/declarations/app/components/d-combo-button.d.ts +0 -3
  121. package/declarations/app/components/d-combo-button.d.ts.map +0 -1
  122. package/declarations/app/components/footer-message.d.ts +0 -5
  123. package/declarations/app/components/footer-message.d.ts.map +0 -1
  124. package/declarations/app/components/group-imap-email-settings.d.ts +0 -13
  125. package/declarations/app/components/group-imap-email-settings.d.ts.map +0 -1
  126. package/declarations/app/components/scrolling-post-stream.d.ts +0 -23
  127. package/declarations/app/components/scrolling-post-stream.d.ts.map +0 -1
  128. package/declarations/app/components/top-period-buttons.d.ts +0 -7
  129. package/declarations/app/components/top-period-buttons.d.ts.map +0 -1
  130. package/declarations/app/config/environment.d.ts +0 -3
  131. package/declarations/app/config/environment.d.ts.map +0 -1
  132. package/declarations/app/lib/autocomplete/emoji.d.ts +0 -4
  133. package/declarations/app/lib/autocomplete/emoji.d.ts.map +0 -1
  134. package/declarations/app/loader.d.ts +0 -4
  135. package/declarations/app/loader.d.ts.map +0 -1
  136. package/declarations/app/services/dialog.d.ts +0 -2
  137. package/declarations/app/services/dialog.d.ts.map +0 -1
  138. package/declarations/app/services/internal-tooltip.d.ts +0 -2
  139. package/declarations/app/services/internal-tooltip.d.ts.map +0 -1
  140. package/declarations/app/services/menu.d.ts +0 -2
  141. package/declarations/app/services/menu.d.ts.map +0 -1
  142. package/declarations/app/services/toasts.d.ts +0 -2
  143. package/declarations/app/services/toasts.d.ts.map +0 -1
  144. package/declarations/app/services/tooltip.d.ts +0 -2
  145. package/declarations/app/services/tooltip.d.ts.map +0 -1
  146. package/declarations/app/static/wizard/components/fields/checkbox.d.ts +0 -5
  147. package/declarations/app/static/wizard/components/fields/checkbox.d.ts.map +0 -1
  148. package/declarations/app/static/wizard/components/fields/checkboxes.d.ts +0 -7
  149. package/declarations/app/static/wizard/components/fields/checkboxes.d.ts.map +0 -1
  150. package/declarations/app/static/wizard/components/fields/image-previews/generic.d.ts +0 -5
  151. package/declarations/app/static/wizard/components/fields/image-previews/generic.d.ts.map +0 -1
  152. package/declarations/app/static/wizard/components/fields/image-previews/index.d.ts +0 -9
  153. package/declarations/app/static/wizard/components/fields/image-previews/index.d.ts.map +0 -1
  154. package/declarations/app/static/wizard/components/fields/image-previews/logo-small.d.ts +0 -13
  155. package/declarations/app/static/wizard/components/fields/image-previews/logo-small.d.ts.map +0 -1
  156. package/declarations/app/static/wizard/components/fields/image-previews/logo.d.ts +0 -19
  157. package/declarations/app/static/wizard/components/fields/image-previews/logo.d.ts.map +0 -1
  158. package/declarations/app/static/wizard/components/fields/image.d.ts +0 -15
  159. package/declarations/app/static/wizard/components/fields/image.d.ts.map +0 -1
  160. package/declarations/app/static/wizard/components/fields/styling-preview/-homepage-preview.d.ts +0 -29
  161. package/declarations/app/static/wizard/components/fields/styling-preview/-homepage-preview.d.ts.map +0 -1
  162. package/declarations/app/static/wizard/components/fields/styling-preview/-preview-base.d.ts +0 -34
  163. package/declarations/app/static/wizard/components/fields/styling-preview/-preview-base.d.ts.map +0 -1
  164. package/declarations/app/static/wizard/components/fields/styling-preview/index.d.ts +0 -38
  165. package/declarations/app/static/wizard/components/fields/styling-preview/index.d.ts.map +0 -1
  166. package/declarations/app/static/wizard/components/wizard-canvas.d.ts +0 -14
  167. package/declarations/app/static/wizard/components/wizard-canvas.d.ts.map +0 -1
  168. package/declarations/app/widgets/actions-summary.d.ts +0 -2
  169. package/declarations/app/widgets/actions-summary.d.ts.map +0 -1
  170. package/declarations/app/widgets/bookmark-menu.d.ts +0 -2
  171. package/declarations/app/widgets/bookmark-menu.d.ts.map +0 -1
  172. package/declarations/app/widgets/post-user-tip-shim.d.ts +0 -2
  173. package/declarations/app/widgets/post-user-tip-shim.d.ts.map +0 -1
  174. package/declarations/app/widgets/topic-status.d.ts +0 -2
  175. package/declarations/app/widgets/topic-status.d.ts.map +0 -1
  176. package/declarations/select-kit/compat-modules.d.ts +0 -3
  177. package/declarations/select-kit/compat-modules.d.ts.map +0 -1
  178. package/declarations/tests/acceptance/bootstrap-mode-notice-test.d.ts +0 -2
  179. package/declarations/tests/acceptance/bootstrap-mode-notice-test.d.ts.map +0 -1
  180. package/declarations/tests/integration/components/widgets/actions-summary-test.d.ts +0 -2
  181. package/declarations/tests/integration/components/widgets/actions-summary-test.d.ts.map +0 -1
  182. package/declarations/tests/integration/components/widgets/avatar-flair-test.d.ts +0 -2
  183. package/declarations/tests/integration/components/widgets/avatar-flair-test.d.ts.map +0 -1
  184. package/declarations/tests/integration/components/widgets/button-test.d.ts +0 -2
  185. package/declarations/tests/integration/components/widgets/button-test.d.ts.map +0 -1
  186. package/declarations/tests/integration/components/widgets/post-cooked-test.d.ts +0 -2
  187. package/declarations/tests/integration/components/widgets/post-cooked-test.d.ts.map +0 -1
  188. package/declarations/tests/integration/components/widgets/post-links-test.d.ts +0 -2
  189. package/declarations/tests/integration/components/widgets/post-links-test.d.ts.map +0 -1
  190. package/declarations/tests/integration/components/widgets/post-small-action-test.d.ts +0 -2
  191. package/declarations/tests/integration/components/widgets/post-small-action-test.d.ts.map +0 -1
  192. package/declarations/tests/integration/components/widgets/post-stream-test.d.ts +0 -2
  193. package/declarations/tests/integration/components/widgets/post-stream-test.d.ts.map +0 -1
  194. package/declarations/tests/integration/components/widgets/post-test.d.ts +0 -2
  195. package/declarations/tests/integration/components/widgets/post-test.d.ts.map +0 -1
  196. package/declarations/tests/integration/components/widgets/poster-name-test.d.ts +0 -2
  197. package/declarations/tests/integration/components/widgets/poster-name-test.d.ts.map +0 -1
  198. package/declarations/tests/integration/components/widgets/render-glimmer-test.d.ts +0 -1
  199. package/declarations/tests/integration/components/widgets/render-glimmer-test.d.ts.map +0 -1
  200. package/declarations/tests/integration/components/widgets/small-user-list-test.d.ts +0 -2
  201. package/declarations/tests/integration/components/widgets/small-user-list-test.d.ts.map +0 -1
  202. package/declarations/tests/integration/components/widgets/topic-status-test.d.ts +0 -2
  203. package/declarations/tests/integration/components/widgets/topic-status-test.d.ts.map +0 -1
  204. package/declarations/tests/integration/components/widgets/widget-dropdown-test.d.ts +0 -2
  205. package/declarations/tests/integration/components/widgets/widget-dropdown-test.d.ts.map +0 -1
  206. package/declarations/tests/integration/components/widgets/widget-test.d.ts +0 -2
  207. package/declarations/tests/integration/components/widgets/widget-test.d.ts.map +0 -1
  208. package/declarations/tests/set-test-env.d.ts +0 -2
  209. package/declarations/tests/set-test-env.d.ts.map +0 -1
  210. package/declarations/tests/test-i18n.d.ts +0 -1
  211. package/declarations/tests/test-i18n.d.ts.map +0 -1
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@types/sinon",
3
+ "version": "21.0.0",
4
+ "description": "TypeScript definitions for sinon",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sinon",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "William Sears",
10
+ "githubUsername": "mrbigdog2u",
11
+ "url": "https://github.com/mrbigdog2u"
12
+ },
13
+ {
14
+ "name": "Nico Jansen",
15
+ "githubUsername": "nicojs",
16
+ "url": "https://github.com/nicojs"
17
+ },
18
+ {
19
+ "name": "James Garbutt",
20
+ "githubUsername": "43081j",
21
+ "url": "https://github.com/43081j"
22
+ },
23
+ {
24
+ "name": "Greg Jednaszewski",
25
+ "githubUsername": "gjednaszewski",
26
+ "url": "https://github.com/gjednaszewski"
27
+ },
28
+ {
29
+ "name": "John Wood",
30
+ "githubUsername": "johnjesse",
31
+ "url": "https://github.com/johnjesse"
32
+ },
33
+ {
34
+ "name": "Alec Flett",
35
+ "githubUsername": "alecf",
36
+ "url": "https://github.com/alecf"
37
+ },
38
+ {
39
+ "name": "Simon Schick",
40
+ "githubUsername": "SimonSchick",
41
+ "url": "https://github.com/SimonSchick"
42
+ },
43
+ {
44
+ "name": "Mathias Schreck",
45
+ "githubUsername": "lo1tuma",
46
+ "url": "https://github.com/lo1tuma"
47
+ }
48
+ ],
49
+ "main": "",
50
+ "types": "index.d.ts",
51
+ "repository": {
52
+ "type": "git",
53
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
54
+ "directory": "types/sinon"
55
+ },
56
+ "scripts": {},
57
+ "dependencies": {
58
+ "@types/sinonjs__fake-timers": "*"
59
+ },
60
+ "peerDependencies": {},
61
+ "typesPublisherContentHash": "23b176291f2b882b5f347933bf8e1105db9cd292e799baa0f26b11b878e60799",
62
+ "typeScriptVersion": "5.2"
63
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "discourse-i18n",
3
+ "version": "1.0.0",
4
+ "private": true,
5
+ "description": "Discourse's i18n",
6
+ "author": "Discourse <team@discourse.org>",
7
+ "license": "GPL-2.0-only",
8
+ "keywords": [
9
+ "ember-addon"
10
+ ],
11
+ "exports": {
12
+ ".": {
13
+ "types": "./src/index.d.ts",
14
+ "default": "./src/index.js"
15
+ },
16
+ "./addon-main.js": "./addon-main.cjs"
17
+ },
18
+ "files": [
19
+ "addon-main.cjs",
20
+ "src"
21
+ ],
22
+ "dependencies": {
23
+ "@embroider/addon-shim": "^1.9.0",
24
+ "@messageformat/runtime": "^3.0.2",
25
+ "make-plural": "^8.1.0"
26
+ },
27
+ "engines": {
28
+ "node": ">= 18",
29
+ "npm": "please-use-pnpm",
30
+ "yarn": "please-use-pnpm",
31
+ "pnpm": "^10"
32
+ },
33
+ "ember": {
34
+ "edition": "octane"
35
+ },
36
+ "ember-addon": {
37
+ "version": 2,
38
+ "type": "addon",
39
+ "main": "addon-main.cjs",
40
+ "app-js": {}
41
+ }
42
+ }
@@ -0,0 +1,70 @@
1
+ declare module 'discourse-i18n' {
2
+ export class I18n {
3
+ defaultLocale: string;
4
+ locale: any;
5
+ fallbackLocale: any;
6
+ translations: any;
7
+ extras: {};
8
+ noFallbacks: boolean;
9
+ testing: boolean;
10
+ verbose: boolean;
11
+ verboseIndices: Map<any, any>;
12
+ pluralizationRules: typeof Cardinals;
13
+ translate: (scope: any, options: any) => any;
14
+ t: (scope: any, options: any) => any;
15
+ currentLocale(): any;
16
+ get currentBcp47Locale(): any;
17
+ get pluralizationNormalizedLocale(): any;
18
+ enableVerboseLocalization(): void;
19
+ enableVerboseLocalizationSession(): string;
20
+ disableVerboseLocalizationSession(): string;
21
+ _translate(scope: any, options: any): any;
22
+ toNumber(number: any, options: any): string;
23
+ toHumanSize(number: any, options: any): any;
24
+ pluralize(translation: any, scope: any, options: any): any;
25
+ pluralizer(locale: any): any;
26
+ listJoiner(listOfStrings: any, delimiter: any): any;
27
+ interpolate(message: any, options: any, scope: any): any;
28
+ /**
29
+ * Extract the placeholders from the translated string before interpolation.
30
+ *
31
+ * @param {String} message The translated string.
32
+ *
33
+ * @returns {Map<String, Array<String>>} A Map keyed by the placeholder name, with the value set to
34
+ * how the placeholder appears in the string. If it appears multiple times, each instance will be
35
+ * recorded (eg, "foo" => ["%{foo}", "{{foo}}"]).
36
+ */
37
+ findPlaceholders(message: string): Map<string, Array<string>>;
38
+ findTranslation(scope: any, options: any): any;
39
+ /**
40
+ * Given the current options (and if fallback is enabled), find the translation
41
+ * for the given scope.
42
+ *
43
+ * @param {String} scope The reference for the translatable string.
44
+ * @param {Object} options Custom options for this string.
45
+ *
46
+ * @returns {Array<String>|String} The translated string, or array of strings for pluralizable translations.
47
+ */
48
+ findTranslationWithFallback(scope: string, options: any): Array<string> | string;
49
+ findAndTranslateValidNode(keys: any, translation: any): any;
50
+ lookup(scope: any, options?: {}): any;
51
+ missingTranslation(scope: any, key: any, options: any): string;
52
+ prepareOptions(...args: any[]): {};
53
+ isValidNode(obj: any, node: any): boolean;
54
+ messageFormat(key: any, options: any): any;
55
+ _verboseTranslate(scope: any, options: any): string;
56
+ loadData(): void;
57
+ _overrides: any;
58
+ _mfMessages: Messages;
59
+ #private;
60
+ }
61
+ export class I18nMissingInterpolationArgument extends Error {
62
+ constructor(message: any);
63
+ }
64
+ export default I18nInstance;
65
+ export function i18n(scope: any, options: any): any;
66
+ import * as Cardinals from "make-plural/cardinals";
67
+ import Messages from "@messageformat/runtime/messages";
68
+ declare const I18nInstance: I18n;
69
+ //# sourceMappingURL=index.d.ts.map
70
+ }
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2015 Trek Glowacki
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
@@ -0,0 +1,60 @@
1
+ declare module 'pretender' {
2
+ import FakeXMLHttpRequest from 'fake-xml-http-request';
3
+ import { Params, QueryParams } from 'route-recognizer';
4
+
5
+ type SetupCallback = (this: Server) => void;
6
+ interface SetupConfig {
7
+ forcePassthrough: boolean;
8
+ }
9
+ export type Config = SetupCallback | SetupConfig;
10
+ export class Server {
11
+ public passthrough: ResponseHandler;
12
+
13
+ constructor(config?: Config);
14
+ // HTTP request verbs
15
+ public get: RequestHandler;
16
+ public put: RequestHandler;
17
+ public post: RequestHandler;
18
+ public patch: RequestHandler;
19
+ public delete: RequestHandler;
20
+ public options: RequestHandler;
21
+ public head: RequestHandler;
22
+
23
+ public shutdown(): void;
24
+
25
+ public map(maps: Function): void;
26
+
27
+ public handledRequest(verb: string, path: string, request: FakeXMLHttpRequest & ExtraRequestData): void;
28
+ public unhandledRequest(verb: string, path: string, request: FakeXMLHttpRequest & ExtraRequestData): void;
29
+ public passthroughRequest(verb: string, path: string, request: FakeXMLHttpRequest & ExtraRequestData): void;
30
+ public erroredRequest(verb: string, path: string, request: FakeXMLHttpRequest & ExtraRequestData, error: Error): void;
31
+
32
+ public prepareBody(body: string): string;
33
+ public prepareHeaders(headers: {[k: string]: string}): {[k: string]: string};
34
+ }
35
+
36
+ export type RequestHandler = (
37
+ urlExpression: string,
38
+ response: ResponseHandler,
39
+ asyncOrDelay?: boolean | number
40
+ ) => ResponseHandlerInstance;
41
+
42
+ export type ResponseData = [number, { [k: string]: string }, string];
43
+ interface ExtraRequestData {
44
+ params: Params;
45
+ queryParams: QueryParams;
46
+ }
47
+ export type ResponseHandler = {
48
+ (request: FakeXMLHttpRequest & ExtraRequestData):
49
+ | ResponseData
50
+ | PromiseLike<ResponseData>;
51
+ };
52
+
53
+ export type ResponseHandlerInstance = ResponseHandler & {
54
+ async: boolean;
55
+ numberOfCalls: number;
56
+ }
57
+
58
+ export default Server;
59
+
60
+ }
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "pretender",
3
+ "version": "3.4.7",
4
+ "main": "./dist/pretender.js",
5
+ "module": "./dist/pretender.es.js",
6
+ "types": "index.d.ts",
7
+ "description": "Pretender is a mock server library for XMLHttpRequest and Fetch, that comes with an express/sinatra style syntax for defining routes and their handlers.",
8
+ "license": "MIT",
9
+ "scripts": {
10
+ "release": "release-it",
11
+ "prepublishOnly": "npm run build && npm run tests-only",
12
+ "build": "rollup --config",
13
+ "test": "npm run eslint && npm run tests-only",
14
+ "test-ci": "npm run build && npm run eslint && npm run tests-only-ci",
15
+ "tests-only": "karma start --single-run",
16
+ "tests-only-ci": "karma start --single-run --browsers ChromeHeadlessNoSandbox",
17
+ "eslint": "eslint src/**/*.ts test",
18
+ "test:server": "karma start --no-single-run"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "https://github.com/pretenderjs/pretender.git"
23
+ },
24
+ "publishConfig": {
25
+ "registry": "https://registry.npmjs.org/"
26
+ },
27
+ "devDependencies": {
28
+ "@rollup/plugin-commonjs": "^11.1.0",
29
+ "@rollup/plugin-node-resolve": "^7.1.3",
30
+ "abortcontroller-polyfill": "^1.1.9",
31
+ "coveralls": "^3.1.0",
32
+ "es6-promise": "^4.0.5",
33
+ "eslint": "^5.12.0",
34
+ "karma": "^5.0.6",
35
+ "karma-chrome-launcher": "^3.1.0",
36
+ "karma-coverage": "^2.0.2",
37
+ "karma-jquery": "^0.2.4",
38
+ "karma-qunit": "^4.1.1",
39
+ "karma-sinon": "^1.0.5",
40
+ "qunit": "^2.10.0",
41
+ "release-it": "^13.6.0",
42
+ "release-it-lerna-changelog": "^2.3.0",
43
+ "rollup": "^2.10.2",
44
+ "rollup-plugin-typescript": "^1.0.0",
45
+ "sinon": "^9.0.2",
46
+ "tslib": "^1.9.3",
47
+ "typescript": "~3.1.1",
48
+ "typescript-eslint-parser": "^21.0.2",
49
+ "url-parse": "^1.5.3",
50
+ "whatwg-fetch": "^3.6.2"
51
+ },
52
+ "dependencies": {
53
+ "fake-xml-http-request": "^2.1.2",
54
+ "route-recognizer": "^0.3.3"
55
+ },
56
+ "files": [
57
+ "dist",
58
+ "index.d.ts"
59
+ ],
60
+ "jspm": {
61
+ "shim": {
62
+ "pretender": {
63
+ "deps": [
64
+ "route-recognizer",
65
+ "fake-xml-http-request"
66
+ ],
67
+ "exports": "Pretender"
68
+ }
69
+ }
70
+ },
71
+ "volta": {
72
+ "node": "16.5.0",
73
+ "yarn": "1.22.4"
74
+ }
75
+ }
@@ -93,10 +93,14 @@
93
93
  /// <reference path="./external-types/@glint__ember-tsc/lib/config/loader.d.ts" />
94
94
  /// <reference path="./external-types/@glint__ember-tsc/lib/cli/run-volar-tsc.d.ts" />
95
95
  /// <reference path="./external-types/@glint__template/-private/integration.d.ts" />
96
+ /// <reference path="./external-types/@types__jquery/index.d.ts" />
96
97
  /// <reference path="./external-types/@types__qunit/index.d.ts" />
97
98
  /// <reference path="./external-types/@types__rsvp/index.d.ts" />
99
+ /// <reference path="./external-types/@types__sinon/index.d.ts" />
100
+ /// <reference path="./external-types/discourse-i18n/src/index.d.ts" />
98
101
  /// <reference path="./external-types/ember-modifier/declarations/index.d.ts" />
99
102
  /// <reference path="./external-types/ember-qunit/types/index.d.ts" />
100
103
  /// <reference path="./external-types/ember-qunit/types/local-types.d.ts" />
101
104
  /// <reference path="./external-types/ember-qunit/types/test-loader.d.ts" />
102
105
  /// <reference path="./external-types/ember-source/types/stable/index.d.ts" />
106
+ /// <reference path="./external-types/pretender/index.d.ts" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@discourse/types",
3
- "version": "0.0.2",
3
+ "version": "2026.1.0-974733b",
4
4
  "description": "Types only",
5
5
  "license": "GPL-2.0-only",
6
6
  "author": "Discourse",
@@ -22,6 +22,18 @@
22
22
  "./admin/*": {
23
23
  "types": "./declarations/admin/*.d.ts"
24
24
  },
25
+ "./dialog-holder/*": {
26
+ "types": "./declarations/dialog-holder/*.d.ts"
27
+ },
28
+ "./float-kit/*": {
29
+ "types": "./declarations/float-kit/*.d.ts"
30
+ },
31
+ "./select-kit/*": {
32
+ "types": "./declarations/select-kit/*.d.ts"
33
+ },
34
+ "./truth-helpers/*": {
35
+ "types": "./declarations/truth-helpers/*.d.ts"
36
+ },
25
37
  "./*": {
26
38
  "types": "./declarations/app/*.d.ts"
27
39
  }
@@ -11,6 +11,6 @@
11
11
  "declaration": true,
12
12
  "outDir": "declarations",
13
13
  "composite": true,
14
- "types": ["discourse/external-types"],
14
+ "types": ["discourse/external-types"]
15
15
  }
16
16
  }
@@ -1,3 +0,0 @@
1
- export default adminCompatModules;
2
- declare const adminCompatModules: {};
3
- //# sourceMappingURL=compat-modules.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compat-modules.d.ts","sourceRoot":"","sources":["../../../discourse/admin/compat-modules.js"],"names":[],"mappings":";AAEA,qCAA8B"}
@@ -1,19 +0,0 @@
1
- export default class AdminWebHooksEditController extends Controller<any> {
2
- constructor(owner?: import("@ember/-internals/owner").default | undefined);
3
- router: any;
4
- siteSettings: any;
5
- adminWebHooks: any;
6
- groupedEventTypes: any;
7
- defaultEventTypes: any;
8
- contentTypes: any;
9
- showTagsFilter(): any;
10
- savingStatus(isSaving: any, saved: any, saveButtonDisabled: any): any;
11
- saveButtonText(isNew: any): any;
12
- secretValidation(secret: any): EmberObject;
13
- eventTypeValidation(isWildcard: any, eventTypes: any): EmberObject;
14
- saveButtonDisabled(isSaving: any, secretValidation: any, eventTypeValidation: any, payloadUrl: any): any;
15
- save(): Promise<void>;
16
- }
17
- import Controller from "@ember/controller";
18
- import EmberObject from "@ember/object";
19
- //# sourceMappingURL=edit.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../../discourse/admin/controllers/admin-web-hooks/edit.js"],"names":[],"mappings":"AASA;;IACE,YAAgB;IAChB,kBAAsB;IAEtB,mBAA0B;IAE1B,uBAA4D;IAC5D,uBAA4D;IAC5D,kBAAkD;IAElD,sBAGC;IAED,sEAUC;IAED,gCAKC;IAED,2CAiBC;IAED,mEAQC;IAED,yGAeC;IAED,sBAaC;CACF;uBAvGgD,mBAAmB;wBAChC,eAAe"}
@@ -1,13 +0,0 @@
1
- export default class AdminWebHooksIndexController extends Controller<any> {
2
- constructor(owner?: import("@ember/-internals/owner").default | undefined);
3
- dialog: any;
4
- adminWebHooks: any;
5
- contentTypes: any;
6
- defaultEventTypes: any;
7
- deliveryStatuses: any;
8
- eventTypes: any;
9
- destroyWebhook(webhook: any): any;
10
- loadMore(): void;
11
- }
12
- import Controller from "@ember/controller";
13
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../discourse/admin/controllers/admin-web-hooks/index.js"],"names":[],"mappings":"AAOA;;IACE,YAAgB;IAChB,mBAA0B;IAE1B,kBAAkD;IAClD,uBAA4D;IAC5D,sBAA0D;IAC1D,gBAA8C;IAG9C,kCAaC;IAED,iBAGC;CACF;uBApCgD,mBAAmB"}
@@ -1,3 +0,0 @@
1
- declare const _default: import("@ember/component/template-only").TemplateOnlyComponent<never> & (abstract new () => import("@glint/template/-private/integration").InvokableInstance<() => import("@glint/template/-private/integration").ComponentReturn<{}>> & import("@glint/template/-private/integration").HasContext<import("@glint/template/-private/integration").TemplateContext<void, {}, {}, void>>);
2
- export default _default;
3
- //# sourceMappingURL=welcome-banner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"welcome-banner.d.ts","sourceRoot":"","sources":["../../../../../discourse/admin/templates/admin-config/welcome-banner.gjs"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- export default AboutPageUser;
2
- declare const AboutPageUser: import("@ember/component/template-only").TemplateOnlyComponent<never> & (abstract new () => import("@glint/template/-private/integration").InvokableInstance<() => import("@glint/template/-private/integration").ComponentReturn<{}>> & import("@glint/template/-private/integration").HasContext<import("@glint/template/-private/integration").TemplateContext<void, {}, {}, void>>);
3
- //# sourceMappingURL=about-page-user.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"about-page-user.d.ts","sourceRoot":"","sources":["../../../../discourse/app/components/about-page-user.gjs"],"names":[],"mappings":";AA0CA,qZA+FG"}
@@ -1,7 +0,0 @@
1
- export default class BootstrapModeNotice extends Component<any> {
2
- constructor(owner: import("@ember/-internals/owner").default, args: any);
3
- siteSettings: any;
4
- routeToAdminGuide(): void;
5
- }
6
- import Component from "@glimmer/component";
7
- //# sourceMappingURL=bootstrap-mode-notice.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bootstrap-mode-notice.d.ts","sourceRoot":"","sources":["../../../../discourse/app/components/bootstrap-mode-notice.gjs"],"names":[],"mappings":"AA8BA;;IACE,kBAAsB;IAEtB,0BAKC;CAeF;sBA7BqB,oBAAoB"}
@@ -1,3 +0,0 @@
1
- export default DComboButton;
2
- declare const DComboButton: import("@ember/component/template-only").TemplateOnlyComponent<never> & (abstract new () => import("@glint/template/-private/integration").InvokableInstance<() => import("@glint/template/-private/integration").ComponentReturn<{}>> & import("@glint/template/-private/integration").HasContext<import("@glint/template/-private/integration").TemplateContext<void, {}, {}, void>>);
3
- //# sourceMappingURL=d-combo-button.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"d-combo-button.d.ts","sourceRoot":"","sources":["../../../../discourse/app/components/d-combo-button.gjs"],"names":[],"mappings":";AAoGA,oZAYG"}
@@ -1,5 +0,0 @@
1
- export default class FooterMessage extends Component<any> {
2
- constructor(owner?: import("@ember/-internals/owner").default | undefined);
3
- }
4
- import Component from "@ember/component";
5
- //# sourceMappingURL=footer-message.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"footer-message.d.ts","sourceRoot":"","sources":["../../../../discourse/app/components/footer-message.gjs"],"names":[],"mappings":"AAqBA;;CAaC;sBAhBqB,kBAAkB"}
@@ -1,13 +0,0 @@
1
- export default class GroupImapEmailSettings extends Component<any> {
2
- constructor(owner?: import("@ember/-internals/owner").default | undefined);
3
- form: any;
4
- missingSettings(email_username: any, email_password: any, imap_server: any, imap_port: any): boolean;
5
- mailboxes(imapMailboxes: any): any;
6
- mailboxSelected(mailboxName: any, mailboxesSize: any): boolean;
7
- resetSettingsValid(): void;
8
- _fillForm(): void;
9
- prefillSettings(provider: any, event: any): void;
10
- testImapSettings(): Promise<void>;
11
- }
12
- import Component from "@ember/component";
13
- //# sourceMappingURL=group-imap-email-settings.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"group-imap-email-settings.d.ts","sourceRoot":"","sources":["../../../../discourse/app/components/group-imap-email-settings.gjs"],"names":[],"mappings":"AAyPA;;IAEE,UAAY;IAEZ,qGAUC;IAED,mCAMC;IAED,+DAGC;IAED,2BAGC;IAED,kBAUC;IAED,iDAIC;IAED,kCA2BC;CA8PF;sBAjWgC,kBAAkB"}
@@ -1,23 +0,0 @@
1
- export default class ScrollingPostStream {
2
- screenTrack: any;
3
- site: any;
4
- widget: string;
5
- _topVisible: any;
6
- _bottomVisible: any;
7
- _currentPostObj: any;
8
- _currentVisible: any;
9
- _currentPercent: any;
10
- buildArgs(): any;
11
- scrolled(): void;
12
- _previouslyNearby: Set<any>;
13
- _scrollTriggered(): void;
14
- _posted(staged: any): void;
15
- _refresh(args: any): void;
16
- _debouncedScroll(): void;
17
- didInsertElement(...args: any[]): void;
18
- willDestroyElement(...args: any[]): void;
19
- didUpdateAttrs(...args: any[]): void;
20
- _handleWidgetButtonHoverState(event: any): void;
21
- _removeWidgetButtonHoverState(): void;
22
- }
23
- //# sourceMappingURL=scrolling-post-stream.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scrolling-post-stream.d.ts","sourceRoot":"","sources":["../../../../discourse/app/components/scrolling-post-stream.js"],"names":[],"mappings":"AAiCA;IACE,iBAAqB;IACrB,UAAc;IAEd,eAAuB;IACvB,iBAAmB;IACnB,oBAAsB;IACtB,qBAAuB;IACvB,qBAAuB;IACvB,qBAAuB;IAEvB,iBAiBC;IAED,iBA+MC;IAFC,4BAAgC;IAIlC,yBAEC;IAED,2BAOC;IAED,0BAsBC;IAED,yBAGC;IAED,uCAuCC;IAED,yCAgBC;IAED,qCAGC;IAED,gDASC;IAED,sCAIC;CACF"}
@@ -1,7 +0,0 @@
1
- export default class TopPeriodButtons extends Component<any> {
2
- constructor(owner?: import("@ember/-internals/owner").default | undefined);
3
- periods(period: any): any;
4
- changePeriod(p: any): void;
5
- }
6
- import Component from "@ember/component";
7
- //# sourceMappingURL=top-period-buttons.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"top-period-buttons.d.ts","sourceRoot":"","sources":["../../../../discourse/app/components/top-period-buttons.gjs"],"names":[],"mappings":"AAwCA;;IAEE,0BAGC;IAED,2BAGC;CAsBF;sBAxCqB,kBAAkB"}
@@ -1,3 +0,0 @@
1
- export default output;
2
- declare let output: any;
3
- //# sourceMappingURL=environment.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../../../discourse/app/config/environment.js"],"names":[],"mappings":";AAGA,wBAAW"}
@@ -1,4 +0,0 @@
1
- export default function renderEmojiAutocomplete({ options }: {
2
- options: any;
3
- }): string;
4
- //# sourceMappingURL=emoji.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["../../../../../discourse/app/lib/autocomplete/emoji.js"],"names":[],"mappings":"AAWA;;WAQC"}
@@ -1,4 +0,0 @@
1
- export default exports;
2
- declare var exports: {};
3
- declare namespace ___Users_cvx_discourse_discourse_frontend_discourse_app_loader_ { }
4
- //# sourceMappingURL=loader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../discourse/app/loader.js"],"names":[],"mappings":";AAqFE,wBAAkC"}
@@ -1,2 +0,0 @@
1
- export { default } from "discourse/dialog-holder/services/dialog";
2
- //# sourceMappingURL=dialog.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../../discourse/app/services/dialog.js"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export { default } from "discourse/float-kit/services/internal-tooltip";
2
- //# sourceMappingURL=internal-tooltip.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"internal-tooltip.d.ts","sourceRoot":"","sources":["../../../../discourse/app/services/internal-tooltip.js"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export { default } from "discourse/float-kit/services/menu";
2
- //# sourceMappingURL=menu.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../../discourse/app/services/menu.js"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export { default } from "discourse/float-kit/services/toasts";
2
- //# sourceMappingURL=toasts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"toasts.d.ts","sourceRoot":"","sources":["../../../../discourse/app/services/toasts.js"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export { default } from "discourse/float-kit/services/tooltip";
2
- //# sourceMappingURL=tooltip.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../discourse/app/services/tooltip.js"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- export default class Checkbox extends Component<any> {
2
- constructor(owner?: import("@ember/-internals/owner").default | undefined);
3
- }
4
- import Component from "@ember/component";
5
- //# sourceMappingURL=checkbox.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../../../../../discourse/app/static/wizard/components/fields/checkbox.gjs"],"names":[],"mappings":"AA4CA;;CA0DC;sBAhEgC,kBAAkB"}
@@ -1,7 +0,0 @@
1
- export default class Checkboxes extends Component<any> {
2
- constructor(owner?: import("@ember/-internals/owner").default | undefined);
3
- init(...args: any[]): void;
4
- changed(checkbox: any): void;
5
- }
6
- import Component from "@ember/component";
7
- //# sourceMappingURL=checkboxes.d.ts.map