@open-wa/wa-automate-types-only 4.75.0 → 5.0.0-alpha.0

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 (60) hide show
  1. package/.turbo/turbo-build.log +35 -0
  2. package/CHANGELOG.md +21 -0
  3. package/LICENSE.md +67 -0
  4. package/README.md +17 -1
  5. package/dist/index.cjs +74 -0
  6. package/dist/index.d.cts +3 -0
  7. package/dist/index.d.mts +3 -0
  8. package/dist/index.mjs +2 -0
  9. package/package.json +45 -39
  10. package/src/index.ts +76 -0
  11. package/tsconfig.json +10 -0
  12. package/tsdown.config.ts +7 -0
  13. package/dist/api/Client.d.ts +0 -2237
  14. package/dist/api/functions/exposed.enum.d.ts +0 -7
  15. package/dist/api/model/aliases.d.ts +0 -110
  16. package/dist/api/model/button.d.ts +0 -24
  17. package/dist/api/model/call.d.ts +0 -51
  18. package/dist/api/model/chat.d.ts +0 -221
  19. package/dist/api/model/config.d.ts +0 -836
  20. package/dist/api/model/contact.d.ts +0 -143
  21. package/dist/api/model/errors.d.ts +0 -90
  22. package/dist/api/model/events.d.ts +0 -120
  23. package/dist/api/model/group-metadata.d.ts +0 -124
  24. package/dist/api/model/id.d.ts +0 -5
  25. package/dist/api/model/index.d.ts +0 -110
  26. package/dist/api/model/label.d.ts +0 -24
  27. package/dist/api/model/media.d.ts +0 -93
  28. package/dist/api/model/message.d.ts +0 -422
  29. package/dist/api/model/product.d.ts +0 -141
  30. package/dist/api/model/reactions.d.ts +0 -76
  31. package/dist/api/model/sessionInfo.d.ts +0 -77
  32. package/dist/build/build-postman.d.ts +0 -1
  33. package/dist/cli/cli-options.d.ts +0 -9
  34. package/dist/cli/collections.d.ts +0 -2
  35. package/dist/cli/file-utils.d.ts +0 -1
  36. package/dist/cli/index.d.ts +0 -1
  37. package/dist/cli/integrations/chatwoot.d.ts +0 -49
  38. package/dist/cli/integrations/cloudflare.d.ts +0 -6
  39. package/dist/cli/logo.d.ts +0 -1
  40. package/dist/cli/server.d.ts +0 -24
  41. package/dist/cli/setup.d.ts +0 -30
  42. package/dist/config/puppeteer.config.d.ts +0 -11
  43. package/dist/controllers/auth.d.ts +0 -36
  44. package/dist/controllers/browser.d.ts +0 -17
  45. package/dist/controllers/events.d.ts +0 -82
  46. package/dist/controllers/init_patch.d.ts +0 -13
  47. package/dist/controllers/initializer.d.ts +0 -22
  48. package/dist/controllers/launch_checks.d.ts +0 -8
  49. package/dist/controllers/patch_manager.d.ts +0 -37
  50. package/dist/controllers/popup/index.d.ts +0 -3
  51. package/dist/controllers/script_preloader.d.ts +0 -17
  52. package/dist/index.d.ts +0 -13
  53. package/dist/logging/custom_transport.d.ts +0 -9
  54. package/dist/logging/logging.d.ts +0 -50
  55. package/dist/structures/Collector.d.ts +0 -202
  56. package/dist/structures/Dialog.d.ts +0 -55
  57. package/dist/structures/MessageCollector.d.ts +0 -78
  58. package/dist/structures/preProcessors.d.ts +0 -58
  59. package/dist/utils/pid_utils.d.ts +0 -1
  60. package/dist/utils/tools.d.ts +0 -152
@@ -0,0 +1,35 @@
1
+
2
+ > @open-wa/wa-automate-types-only@5.0.0-alpha.0 build /Users/Mohammed/projects/tools/wa/packages/types-only
3
+ > tsdown
4
+
5
+ ℹ tsdown v0.21.7 powered by rolldown v1.0.0-rc.12
6
+ ℹ config file: /Users/Mohammed/projects/tools/wa/packages/types-only/tsdown.config.ts
7
+ (node:1231) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///Users/Mohammed/projects/tools/wa/packages/types-only/tsdown.config.ts?no-cache=ffb724cf-016b-4c21-b050-8f475c6c99cb is not specified and it doesn't parse as CommonJS.
8
+ Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
9
+ To eliminate this warning, add "type": "module" to /Users/Mohammed/projects/tools/wa/packages/types-only/package.json.
10
+ (Use `node --trace-warnings ...` to show where the warning was created)
11
+ ℹ entry: src/index.ts
12
+ ℹ tsconfig: tsconfig.json
13
+ ℹ Build start
14
+ ℹ Cleaning 4 files
15
+ ℹ [CJS] dist/index.cjs 1.74 kB │ gzip: 0.33 kB
16
+ ℹ [CJS] 1 files, total: 1.74 kB
17
+ [PLUGIN_TIMINGS] Warning: Your build spent significant time in plugin `tsdown:deps`. See https://rolldown.rs/options/checks#plugintimings for more details.
18
+
19
+ ℹ [ESM] dist/index.mjs 0.40 kB │ gzip: 0.17 kB
20
+ ℹ [ESM] dist/index.d.mts 1.64 kB │ gzip: 0.52 kB
21
+ [PLUGIN_TIMINGS] Warning: Your build spent significant time in plugins. Here is a breakdown:
22
+ ℹ [ESM] 2 files, total: 2.04 kB
23
+ ℹ [CJS] dist/index.d.cts 1.64 kB │ gzip: 0.52 kB
24
+ ℹ [CJS] 1 files, total: 1.64 kB
25
+ ✔ Build complete in 3782ms
26
+ - rolldown-plugin-dts:generate (50%)
27
+ - tsdown:deps (47%)
28
+ See https://rolldown.rs/options/checks#plugintimings for more details.
29
+
30
+ [PLUGIN_TIMINGS] Warning: Your build spent significant time in plugins. Here is a breakdown:
31
+ - rolldown-plugin-dts:generate (51%)
32
+ - tsdown:deps (47%)
33
+ See https://rolldown.rs/options/checks#plugintimings for more details.
34
+
35
+ ✔ Build complete in 3787ms
package/CHANGELOG.md ADDED
@@ -0,0 +1,21 @@
1
+ # @open-wa/wa-automate-types-only
2
+
3
+ ## 5.0.0-alpha.2
4
+
5
+ ### Minor Changes
6
+
7
+ - Dry run minor bump
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies []:
12
+ - @open-wa/schema@6.0.0-alpha.2
13
+
14
+ ## 5.0.1-alpha.2
15
+
16
+ ### Patch Changes
17
+
18
+ - Dry run patch bump
19
+
20
+ - Updated dependencies []:
21
+ - @open-wa/schema@5.0.1-alpha.2
package/LICENSE.md ADDED
@@ -0,0 +1,67 @@
1
+ ### Copyright (c) 2020 Mohammed Shah
2
+
3
+ # Hippocratic + Do Not Harm (H-DNH) Version 1.1
4
+
5
+ ## Preamble
6
+
7
+ Most software today is developed with little to no thought of how it will be used, or the consequences for our society and planet.
8
+
9
+ As software developers, we engineer the infrastructure of the 21st century. We recognise that our infrastructure has great power to shape the world and the lives of those we share it with, and we choose to consciously take responsibility for the social and environmental impacts of what we build.
10
+
11
+ We envisage a world free from injustice, inequality, and the reckless destruction of lives and our planet. We reject slavery in all its forms, whether by force, indebtedness, or by algorithms that hack human vulnerabilities. We seek a world where humankind is at peace with our neighbours, nature, and ourselves. We want our work to enrich the physical, mental and spiritual wellbeing of all society.
12
+
13
+ We build software to further this vision of a just world, or at the very least, to not put that vision further from reach.
14
+
15
+ ## Terms
16
+
17
+ Licensor hereby grants permission by this license ("License"), free of charge, to any person or entity (the "Licensee") obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
18
+
19
+ 1. All redistribution of source code or binary form, including any modifications must be under these terms. You must inform recipients that the code is governed by these conditions, and how they can obtain a copy of this license. You may not attempt to alter the conditions of who may/may not use this software.
20
+
21
+ 2. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
22
+
23
+ 3. This software must not be used by any organisation, website, product or service that:
24
+
25
+ a) lobbies for, promotes, or derives a majority of income from actions that support or contribute to:
26
+ * sex trafficking
27
+ * human trafficking
28
+ * slavery
29
+ * indentured servitude
30
+ * gambling
31
+ * tobacco
32
+ * adversely addictive behaviours
33
+ * nuclear energy
34
+ * warfare
35
+ * weapons manufacturing
36
+ * war crimes
37
+ * settler colonialism
38
+ * apartheid
39
+ * vaccine misinformation
40
+ * climate misinformation
41
+ * child endangerment
42
+ * violence (except when required to protect public safety)
43
+ * burning of forests
44
+ * deforestation
45
+ * hate speech or discrimination based on age, gender, gender identity, race, sexuality, religion, nationality
46
+
47
+ b) lobbies against, or derives a majority of income from actions that discourage or frustrate:
48
+ * peace
49
+ * access to the rights set out in the Universal Declaration of Human Rights and the Convention on the Rights of the Child
50
+ * peaceful assembly and association (including worker associations)
51
+ * a safe environment or action to curtail the use of fossil fuels or prevent climate change
52
+ * democratic processes
53
+
54
+
55
+ 4. Compliance with Human Rights Laws and Human Rights Principles:
56
+
57
+ a. **Human Rights Laws**. The Software shall not be used by any person or entity for any systems, activities, or other uses that violate any applicable laws, regulations, or rules that protect human, civil, labor, privacy, political, environmental, security, economic, due process, or similar rights (the "Human Rights Laws"). Where the Human Rights Laws of more than one jurisdiction are applicable to the use of the Software, the Human Rights Laws that are most protective of the individuals or groups harmed shall apply.
58
+
59
+ b. **Human Rights Principles**. Licensee is advised to consult the articles of the United Nations Universal Declaration of Human Rights (https://www.un.org/en/universal-declaration-human-rights/) and the United Nations Global Compact (https://www.unglobalcompact.org/ what-is-gc/mission/principles) that define recognized principles of international human rights (the "Human Rights Principles"). It is Licensor's express intent that all use of the Software be consistent with Human Rights Principles. If Licensor receives notification or otherwise learns of an alleged violation of any Human Rights Principles relating to Licensee's use of the Software, Licensor may in its discretion and without obligation (i) (a) notify Licensee of such allegation and (b) allow Licensee 90 days from notification under (i)(a) to investigate and respond to Licensor regarding the allegation and (ii) (a) after the earlier of 90 days from notification under (i)(a), or Licensee's response under (i)(b), notify Licensee of License termination and (b) allow Licensee an additional 90 days from notification under (ii)(a) to cease use of the Software.
60
+
61
+ c. **Indemnity**. Licensee shall hold harmless and indemnify Licensor against all losses, damages, liabilities, deficiencies, claims, actions, judgments, settlements, interest, awards, penalties, fines, costs, or expenses of whatever kind, including Licensor's reasonable attorneys' fees, arising out of or relating to Licensee's non-compliance with this License or use of the Software in violation of Human Rights Laws or Human Rights Principles. 
62
+
63
+ 5. Enforceability: If any portion or provision of this License is determined to be invalid, illegal, or unenforceable by a court of competent jurisdiction, then such invalidity, illegality, or unenforceability shall not affect any other term or provision of this License or invalidate or render unenforceable such term or provision in any other jurisdiction. Upon a determination that any term or provision is invalid, illegal, or unenforceable, to the extent permitted by applicable law, the court may modify this License to affect the original intent of the parties as closely as possible. The section headings are for convenience only and are not intended to affect the construction or interpretation of this License. Any rule of construction to the effect that ambiguities are to be resolved against the drafting party shall not apply in interpreting this License. The language in this License shall be interpreted as to its fair meaning and not strictly for or against any party.
64
+
65
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
66
+
67
+ This license is an extension of the Hippocratic License - an Ethical Source license (https://ethicalsource.dev) and the Do Not Harm License - (https://github.com/raisely/NoHarm)
package/README.md CHANGED
@@ -1,3 +1,19 @@
1
1
  # @open-wa/wa-automate-types-only
2
2
 
3
- You are most likely looking for [@open-wa/wa-automate](https://www.npmjs.com/package/@open-wa/wa-automate). This package is identical to [@open-wa/wa-automate](https://www.npmjs.com/package/@open-wa/wa-automate) but only contains it's types.
3
+ Lightweight type-only re-exports from @open-wa/schema zero runtime dependencies
4
+
5
+ Part of the [@open-wa v5 monorepo](https://github.com/open-wa/wa-automate-nodejs).
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pnpm add @open-wa/wa-automate-types-only
11
+ ```
12
+
13
+ ## Documentation
14
+
15
+ See the [docs site](https://docs.openwa.dev).
16
+
17
+ ## License
18
+
19
+ [H-DNH V1.0](https://github.com/open-wa/wa-automate-nodejs/blob/main/LICENSE.md) — Hippocratic + Do Not Harm
package/dist/index.cjs ADDED
@@ -0,0 +1,74 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let _open_wa_schema = require("@open-wa/schema");
3
+ Object.defineProperty(exports, "ActionEnum", {
4
+ enumerable: true,
5
+ get: function() {
6
+ return _open_wa_schema.ActionEnum;
7
+ }
8
+ });
9
+ Object.defineProperty(exports, "ActionType", {
10
+ enumerable: true,
11
+ get: function() {
12
+ return _open_wa_schema.ActionType;
13
+ }
14
+ });
15
+ Object.defineProperty(exports, "FunctionalityEnum", {
16
+ enumerable: true,
17
+ get: function() {
18
+ return _open_wa_schema.FunctionalityEnum;
19
+ }
20
+ });
21
+ Object.defineProperty(exports, "FunctionalityScope", {
22
+ enumerable: true,
23
+ get: function() {
24
+ return _open_wa_schema.FunctionalityScope;
25
+ }
26
+ });
27
+ Object.defineProperty(exports, "HttpMethod", {
28
+ enumerable: true,
29
+ get: function() {
30
+ return _open_wa_schema.HttpMethod;
31
+ }
32
+ });
33
+ Object.defineProperty(exports, "HttpMethodEnum", {
34
+ enumerable: true,
35
+ get: function() {
36
+ return _open_wa_schema.HttpMethodEnum;
37
+ }
38
+ });
39
+ Object.defineProperty(exports, "LicenseEnum", {
40
+ enumerable: true,
41
+ get: function() {
42
+ return _open_wa_schema.LicenseEnum;
43
+ }
44
+ });
45
+ Object.defineProperty(exports, "LicenseTier", {
46
+ enumerable: true,
47
+ get: function() {
48
+ return _open_wa_schema.LicenseTier;
49
+ }
50
+ });
51
+ Object.defineProperty(exports, "NotificationLanguage", {
52
+ enumerable: true,
53
+ get: function() {
54
+ return _open_wa_schema.NotificationLanguage;
55
+ }
56
+ });
57
+ Object.defineProperty(exports, "QRFormat", {
58
+ enumerable: true,
59
+ get: function() {
60
+ return _open_wa_schema.QRFormat;
61
+ }
62
+ });
63
+ Object.defineProperty(exports, "SimpleListener", {
64
+ enumerable: true,
65
+ get: function() {
66
+ return _open_wa_schema.SimpleListener;
67
+ }
68
+ });
69
+ Object.defineProperty(exports, "StateEnum", {
70
+ enumerable: true,
71
+ get: function() {
72
+ return _open_wa_schema.StateEnum;
73
+ }
74
+ });
@@ -0,0 +1,3 @@
1
+ import { ActionEnum, ActionType, Base64, CapabilityDefinition, CapabilityMetadata, CapabilityStatus, CapabilityType, Chat, ChatId, ClientConfig, ClientFunctionMetadata, Config, Contact, ContactId, Content, DataURL, DeepPartialConfig, DevTools, EventDefinition, EventMetadata, EventStatus, FunctionalityEnum, FunctionalityScope, GroupChatId, GroupId, GroupMetadata, HttpMethod, HttpMethodEnum, Id, InferInput, InferOutput, LicenseEnum, LicenseTier, Message, MessageAck, MessageId, MessageTypes, MethodDefinition, NotificationLanguage, ParameterMetadata, PartialConfig, QRFormat, QueueOptions, SessionData, SimpleListener, StateEnum, StrictConfig, Viewport } from "@open-wa/schema";
2
+ import { BaseClient, BaseNamespacedClient } from "@open-wa/schema/generated";
3
+ export { ActionEnum, ActionType, type Base64, type BaseClient, type BaseNamespacedClient, type CapabilityDefinition, type CapabilityMetadata, type CapabilityStatus, type CapabilityType, type Chat, type ChatId, type ClientConfig, type ClientFunctionMetadata, type Config, type Contact, type ContactId, type Content, type DataURL, type DeepPartialConfig, type DevTools, type EventDefinition, type EventMetadata, type EventStatus, FunctionalityEnum, FunctionalityScope, type GroupChatId, type GroupId, type GroupMetadata, HttpMethod, HttpMethodEnum, type Id, type InferInput, type InferOutput, LicenseEnum, LicenseTier, type Message, type MessageAck, type MessageId, type MessageTypes, type MethodDefinition, NotificationLanguage, type ParameterMetadata, type PartialConfig, QRFormat, type QueueOptions, type SessionData, SimpleListener, StateEnum, type StrictConfig, type Viewport };
@@ -0,0 +1,3 @@
1
+ import { ActionEnum, ActionType, Base64, CapabilityDefinition, CapabilityMetadata, CapabilityStatus, CapabilityType, Chat, ChatId, ClientConfig, ClientFunctionMetadata, Config, Contact, ContactId, Content, DataURL, DeepPartialConfig, DevTools, EventDefinition, EventMetadata, EventStatus, FunctionalityEnum, FunctionalityScope, GroupChatId, GroupId, GroupMetadata, HttpMethod, HttpMethodEnum, Id, InferInput, InferOutput, LicenseEnum, LicenseTier, Message, MessageAck, MessageId, MessageTypes, MethodDefinition, NotificationLanguage, ParameterMetadata, PartialConfig, QRFormat, QueueOptions, SessionData, SimpleListener, StateEnum, StrictConfig, Viewport } from "@open-wa/schema";
2
+ import { BaseClient, BaseNamespacedClient } from "@open-wa/schema/generated";
3
+ export { ActionEnum, ActionType, type Base64, type BaseClient, type BaseNamespacedClient, type CapabilityDefinition, type CapabilityMetadata, type CapabilityStatus, type CapabilityType, type Chat, type ChatId, type ClientConfig, type ClientFunctionMetadata, type Config, type Contact, type ContactId, type Content, type DataURL, type DeepPartialConfig, type DevTools, type EventDefinition, type EventMetadata, type EventStatus, FunctionalityEnum, FunctionalityScope, type GroupChatId, type GroupId, type GroupMetadata, HttpMethod, HttpMethodEnum, type Id, type InferInput, type InferOutput, LicenseEnum, LicenseTier, type Message, type MessageAck, type MessageId, type MessageTypes, type MethodDefinition, NotificationLanguage, type ParameterMetadata, type PartialConfig, QRFormat, type QueueOptions, type SessionData, SimpleListener, StateEnum, type StrictConfig, type Viewport };
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import { ActionEnum, ActionType, FunctionalityEnum, FunctionalityScope, HttpMethod, HttpMethodEnum, LicenseEnum, LicenseTier, NotificationLanguage, QRFormat, SimpleListener, StateEnum } from "@open-wa/schema";
2
+ export { ActionEnum, ActionType, FunctionalityEnum, FunctionalityScope, HttpMethod, HttpMethodEnum, LicenseEnum, LicenseTier, NotificationLanguage, QRFormat, SimpleListener, StateEnum };
package/package.json CHANGED
@@ -1,41 +1,47 @@
1
1
  {
2
- "name": "@open-wa/wa-automate-types-only",
3
- "version": "4.75.0",
4
- "description": "Types generated from the @open-wa/wa-automate package",
5
- "scripts": {
6
- "build": "tsc",
7
- "deploy": "npm run build && npm version",
8
- "pub": "npm run build && npm run _ver && npm publish",
9
- "_ver": "awk -F'\"' '/\"version\": \".+\"/{ print $4; exit; }' ../package.json | xargs -I{} npm version {} --allow-same-version",
10
- "test": "echo \"Error: no test specified\" && exit 1"
11
- },
12
- "types": "dist/index.d.ts",
13
- "keywords": [
14
- "typescript",
15
- "ts",
16
- "types",
17
- "open-wa",
18
- "wa-automate"
19
- ],
20
- "files": [
21
- "dist/index.d.ts",
22
- "dist"
23
- ],
24
- "repository": {
25
- "type": "git",
26
- "url": "git+https://github.com/open-wa/wa-automate-nodejs.git"
27
- },
28
- "author": "Mohammed Shah <@smashah>",
29
- "publishConfig": {
30
- "access": "public"
31
- },
32
- "license": "H-DNH V1.0",
33
- "bugs": {
34
- "url": "https://github.com/open-wa/wa-automate-nodejs/issues"
35
- },
36
- "homepage": "https://github.com/open-wa/wa-automate-nodejs#readme",
37
- "engines": {
38
- "node": ">=12.18.3",
39
- "npm": ">=7.9.0"
2
+ "name": "@open-wa/wa-automate-types-only",
3
+ "version": "5.0.0-alpha.0",
4
+ "description": "Lightweight type-only re-exports from @open-wa/schema — zero runtime dependencies",
5
+ "main": "./dist/index.cjs",
6
+ "module": "./dist/index.mjs",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "require": {
11
+ "types": "./dist/index.d.cts",
12
+ "default": "./dist/index.cjs"
13
+ },
14
+ "import": {
15
+ "types": "./dist/index.d.mts",
16
+ "default": "./dist/index.mjs"
17
+ }
40
18
  }
41
- }
19
+ },
20
+ "keywords": [
21
+ "typescript",
22
+ "ts",
23
+ "types",
24
+ "open-wa",
25
+ "wa-automate"
26
+ ],
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/open-wa/wa-automate-nodejs.git"
30
+ },
31
+ "author": "Mohammed Shah <@smashah>",
32
+ "publishConfig": {
33
+ "access": "public"
34
+ },
35
+ "license": "H-DNH V1.0",
36
+ "dependencies": {
37
+ "@open-wa/schema": "5.0.0-alpha.0"
38
+ },
39
+ "devDependencies": {
40
+ "typescript": "^6.0.3"
41
+ },
42
+ "scripts": {
43
+ "build": "tsdown",
44
+ "dev": "tsdown --watch",
45
+ "clean": "rimraf dist"
46
+ }
47
+ }
package/src/index.ts ADDED
@@ -0,0 +1,76 @@
1
+ /**
2
+ * @open-wa/wa-automate-types-only
3
+ *
4
+ * Lightweight type-only re-exports from @open-wa/schema.
5
+ * This package ships ZERO runtime code — only .d.ts declarations.
6
+ * Use it when you need open-wa types without pulling in zod, codecs, or other runtime deps.
7
+ */
8
+ export type {
9
+ // === Identity types ===
10
+ ChatId,
11
+ MessageId,
12
+ ContactId,
13
+ GroupChatId,
14
+ GroupId,
15
+
16
+ // === Core model types ===
17
+ Chat,
18
+ Message,
19
+ Contact,
20
+ Content,
21
+ GroupMetadata,
22
+ Id,
23
+ DataURL,
24
+ Base64,
25
+
26
+ // === Message types ===
27
+ MessageAck,
28
+ MessageTypes,
29
+
30
+ // === Config types ===
31
+ Config,
32
+ StrictConfig,
33
+ PartialConfig,
34
+ DeepPartialConfig,
35
+ ClientConfig,
36
+ SessionData,
37
+ DevTools,
38
+ Viewport,
39
+ QueueOptions,
40
+
41
+ // === Method types ===
42
+ ClientFunctionMetadata,
43
+ MethodDefinition,
44
+ ParameterMetadata,
45
+ CapabilityDefinition,
46
+ CapabilityMetadata,
47
+ CapabilityStatus,
48
+ CapabilityType,
49
+
50
+ // === Event types ===
51
+ EventDefinition,
52
+ EventMetadata,
53
+ EventStatus,
54
+
55
+ // === Schema inference helpers ===
56
+ InferInput,
57
+ InferOutput,
58
+ } from '@open-wa/schema';
59
+
60
+ export type { BaseClient, BaseNamespacedClient } from '@open-wa/schema/generated';
61
+
62
+ // === Value re-exports (enums, constants needed at type-level) ===
63
+ export {
64
+ SimpleListener,
65
+ HttpMethod,
66
+ HttpMethodEnum,
67
+ LicenseTier,
68
+ LicenseEnum,
69
+ FunctionalityScope,
70
+ FunctionalityEnum,
71
+ ActionType,
72
+ ActionEnum,
73
+ StateEnum,
74
+ NotificationLanguage,
75
+ QRFormat,
76
+ } from '@open-wa/schema';
package/tsconfig.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist",
5
+ "rootDir": "./src",
6
+ "moduleResolution": "bundler",
7
+ "module": "ESNext"
8
+ },
9
+ "include": ["src/**/*"]
10
+ }
@@ -0,0 +1,7 @@
1
+ import { defineConfig } from 'tsdown'
2
+
3
+ export default defineConfig({
4
+ entry: ['src/index.ts'],
5
+ format: ['cjs', 'esm'],
6
+ dts: true,
7
+ })