jpdcl 1.0.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 (103) hide show
  1. package/.env.example +15 -0
  2. package/LICENSE +21 -0
  3. package/README.md +219 -0
  4. package/dist/catalog.d.ts +141 -0
  5. package/dist/catalog.js +261 -0
  6. package/dist/catalog.js.map +1 -0
  7. package/dist/cli.d.ts +2 -0
  8. package/dist/cli.js +395 -0
  9. package/dist/cli.js.map +1 -0
  10. package/dist/config.d.ts +6 -0
  11. package/dist/config.js +13 -0
  12. package/dist/config.js.map +1 -0
  13. package/dist/credentials.d.ts +13 -0
  14. package/dist/credentials.js +100 -0
  15. package/dist/credentials.js.map +1 -0
  16. package/dist/crypto.d.ts +3 -0
  17. package/dist/crypto.js +21 -0
  18. package/dist/crypto.js.map +1 -0
  19. package/dist/dates.d.ts +5 -0
  20. package/dist/dates.js +20 -0
  21. package/dist/dates.js.map +1 -0
  22. package/dist/errors.d.ts +11 -0
  23. package/dist/errors.js +23 -0
  24. package/dist/errors.js.map +1 -0
  25. package/dist/http-handler.d.ts +1 -0
  26. package/dist/http-handler.js +46 -0
  27. package/dist/http-handler.js.map +1 -0
  28. package/dist/http.d.ts +9 -0
  29. package/dist/http.js +43 -0
  30. package/dist/http.js.map +1 -0
  31. package/dist/index.d.ts +13 -0
  32. package/dist/index.js +14 -0
  33. package/dist/index.js.map +1 -0
  34. package/dist/launcher.d.ts +2 -0
  35. package/dist/launcher.js +11 -0
  36. package/dist/launcher.js.map +1 -0
  37. package/dist/ledger-client.d.ts +112 -0
  38. package/dist/ledger-client.js +221 -0
  39. package/dist/ledger-client.js.map +1 -0
  40. package/dist/main-client.d.ts +25 -0
  41. package/dist/main-client.js +221 -0
  42. package/dist/main-client.js.map +1 -0
  43. package/dist/mcp-stdio.d.ts +2 -0
  44. package/dist/mcp-stdio.js +6 -0
  45. package/dist/mcp-stdio.js.map +1 -0
  46. package/dist/mcp.d.ts +8 -0
  47. package/dist/mcp.js +517 -0
  48. package/dist/mcp.js.map +1 -0
  49. package/dist/runtime.d.ts +27 -0
  50. package/dist/runtime.js +316 -0
  51. package/dist/runtime.js.map +1 -0
  52. package/dist/server.d.ts +4 -0
  53. package/dist/server.js +221 -0
  54. package/dist/server.js.map +1 -0
  55. package/dist/session.d.ts +4 -0
  56. package/dist/session.js +30 -0
  57. package/dist/session.js.map +1 -0
  58. package/dist/smart-client.d.ts +50 -0
  59. package/dist/smart-client.js +238 -0
  60. package/dist/smart-client.js.map +1 -0
  61. package/dist/tariff.d.ts +121 -0
  62. package/dist/tariff.js +124 -0
  63. package/dist/tariff.js.map +1 -0
  64. package/dist/types.d.ts +51 -0
  65. package/dist/types.js +2 -0
  66. package/dist/types.js.map +1 -0
  67. package/dist/worker.d.ts +5 -0
  68. package/dist/worker.js +3 -0
  69. package/dist/worker.js.map +1 -0
  70. package/openapi.yaml +284 -0
  71. package/package.json +89 -0
  72. package/scripts/audit-http.ts +36 -0
  73. package/scripts/audit-launcher.mjs +28 -0
  74. package/scripts/audit-ledger-portal.ts +23 -0
  75. package/scripts/audit-mcp.mjs +140 -0
  76. package/scripts/audit-smart-portal.mjs +63 -0
  77. package/scripts/build.mjs +19 -0
  78. package/scripts/publish-smithery.mjs +47 -0
  79. package/src/catalog.ts +291 -0
  80. package/src/cli.ts +397 -0
  81. package/src/config.ts +15 -0
  82. package/src/credentials.ts +114 -0
  83. package/src/crypto.ts +21 -0
  84. package/src/dates.ts +19 -0
  85. package/src/errors.ts +26 -0
  86. package/src/http-handler.ts +48 -0
  87. package/src/http.ts +49 -0
  88. package/src/index.ts +13 -0
  89. package/src/launcher.ts +9 -0
  90. package/src/ledger-client.ts +258 -0
  91. package/src/main-client.ts +230 -0
  92. package/src/mcp-stdio.ts +6 -0
  93. package/src/mcp.ts +546 -0
  94. package/src/runtime.ts +329 -0
  95. package/src/server.ts +218 -0
  96. package/src/session.ts +29 -0
  97. package/src/smart-client.ts +249 -0
  98. package/src/tariff.ts +148 -0
  99. package/src/toolkit.test.ts +136 -0
  100. package/src/types.ts +51 -0
  101. package/src/worker.ts +3 -0
  102. package/tsconfig.build.json +11 -0
  103. package/tsconfig.json +16 -0
package/.env.example ADDED
@@ -0,0 +1,15 @@
1
+ # Copy to .env (which is git-ignored and should remain mode 0600).
2
+ # The CLI, REST API, MCP, OpenCode, and other AI clients load it automatically.
3
+ JPDCL_LOGIN_ID=
4
+ JPDCL_PASSWORD=
5
+
6
+ # Optional: defaults to ~/.jpdcl/session.json
7
+ JPDCL_SESSION_FILE=
8
+
9
+ # REST API settings
10
+ JPDCL_API_HOST=127.0.0.1
11
+ JPDCL_API_PORT=8787
12
+ JPDCL_API_KEY=
13
+
14
+ # Mutating actions are disabled unless explicitly enabled.
15
+ JPDCL_ENABLE_MUTATIONS=false
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 JPDCL Toolkit contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,219 @@
1
+ # Jammu Power Distribution Corporation Limited (JPDCL) Smart Meter MCP
2
+
3
+ Unofficial, community-built, and MIT-licensed. This project is not affiliated with or endorsed by JPDCL, JERC, Genus, or the Government of Jammu and Kashmir.
4
+
5
+ An API-only MCP integration for Jammu Power Distribution Corporation Limited (JPDCL): the consumer portal, Genus smart-meter portal, and JPDCL daily import/export meter ledger. It maps 122 portal operations and exposes 29 AI-focused MCP tools with structured output, provenance, automatic authentication, deterministic tariff calculations, and guarded account actions. It never automates a browser at runtime.
6
+
7
+ ## MCP quick start
8
+
9
+ ### Hosted MCP (no installation)
10
+
11
+ The public Streamable HTTP endpoint is:
12
+
13
+ ```text
14
+ https://jpdcl.ashfaq.workers.dev/mcp
15
+ ```
16
+
17
+ It is also published as [JPDCL Smart Meter on Smithery](https://smithery.ai/servers/ashfaqmehmood-01/jpdcl). Smithery can install it into supported AI clients and asks for the JPDCL login ID and password as protected per-user connection settings:
18
+
19
+ ```sh
20
+ npx -y @smithery/cli@latest mcp add ashfaqmehmood-01/jpdcl --client opencode
21
+ ```
22
+
23
+ For a direct HTTP MCP connection, send `x-jpdcl-login-id` and `x-jpdcl-password` headers to the public endpoint. The Cloudflare Worker keeps no credential or session file; credentials are isolated to that request. Account-changing tools remain disabled unless the connection also sets `allowMutations=true` and the individual call includes explicit confirmation.
24
+
25
+ ### Local MCP with npx
26
+
27
+ The npm package is [`jpdcl`](https://www.npmjs.com/package/jpdcl). Running it without arguments starts the stdio MCP server:
28
+
29
+ ```sh
30
+ npx -y jpdcl
31
+ ```
32
+
33
+ Add it to any MCP-compatible client:
34
+
35
+ ```json
36
+ {
37
+ "mcpServers": {
38
+ "JPDCL Smart Meter": {
39
+ "command": "npx",
40
+ "args": ["-y", "jpdcl"],
41
+ "env": {
42
+ "JPDCL_SESSION_FILE": "/Users/you/.jpdcl/session.json",
43
+ "JPDCL_ENV_FILE": "/Users/you/.config/jpdcl/.env"
44
+ }
45
+ }
46
+ }
47
+ }
48
+ ```
49
+
50
+ ### OpenCode
51
+
52
+ Add this inside `~/.config/opencode/opencode.jsonc`:
53
+
54
+ ```jsonc
55
+ "mcp": {
56
+ "JPDCL Smart Meter": {
57
+ "type": "local",
58
+ "command": ["npx", "-y", "jpdcl"],
59
+ "environment": {
60
+ "JPDCL_SESSION_FILE": "/Users/you/.jpdcl/session.json",
61
+ "JPDCL_ENV_FILE": "/Users/you/.config/jpdcl/.env"
62
+ },
63
+ "enabled": true,
64
+ "timeout": 30000
65
+ }
66
+ }
67
+ ```
68
+
69
+ Confirm it with `opencode mcp list`. For a local checkout before npm publication, use `command: ["npx", "--yes", "--package", "/absolute/path/to/jpdcl", "jpdcl"]`.
70
+
71
+ ## Authentication
72
+
73
+ On first use, ask the AI client to call `jpdcl_auth_login` and provide your portal login only when the client requests it. The tool:
74
+
75
+ - authenticates against JPDCL without browser automation;
76
+ - stores the session in `JPDCL_SESSION_FILE` with permissions `0600`;
77
+ - saves credentials to `JPDCL_ENV_FILE` when requested, without returning the password;
78
+ - automatically renews expired main-portal sessions;
79
+ - obtains a fresh Genus SSO token whenever the smart-meter token expires.
80
+
81
+ For unattended setup, create the private environment file yourself:
82
+
83
+ ```sh
84
+ mkdir -p ~/.config/jpdcl
85
+ cp .env.example ~/.config/jpdcl/.env
86
+ chmod 600 ~/.config/jpdcl/.env
87
+ ```
88
+
89
+ Then fill `JPDCL_LOGIN_ID` and `JPDCL_PASSWORD`. The private environment and session files live outside the npm cache, so upgrades do not remove authentication.
90
+
91
+ ## Best MCP tools for AI
92
+
93
+ - `jpdcl_snapshot`: preferred all-in-one factual account, billing, smart-meter, and ledger response.
94
+ - `jpdcl_meter_health`: supply, reading, voltage, alarm, outage, and freshness evidence without inventing an online status.
95
+ - `jpdcl_tariff_estimate`: automatic consumption, category, sanctioned-load, plan, slab, rebate, and charge calculation.
96
+ - `jpdcl_energy_ledger`: normalized import, export, net-import registers and deterministic period differences.
97
+ - `jpdcl_account_digest`: normalized consumer, billing, payment, and consumption information.
98
+ - `jpdcl_smart_dashboard`: current Genus account and meter records.
99
+ - `jpdcl_smart_intervals`: dated interval readings.
100
+ - `jpdcl_smart_report`: voltage, current, power, energy, and other supported smart-meter reports.
101
+ - `jpdcl_smart_meter_profile`: meter and connection attributes.
102
+ - `jpdcl_smart_billing`: postpaid or prepaid billing information.
103
+ - `jpdcl_smart_alerts`: portal alarms and alert records.
104
+ - `jpdcl_catalog`: searchable inventory of every mapped operation.
105
+ - `jpdcl_read`: low-level structured access to any safe catalog endpoint.
106
+ - `jpdcl_mutate`: guarded account actions that require explicit confirmation and mutation enablement.
107
+ - `jpdcl_guide`: embedded source-selection, safety, freshness, provenance, and tariff instructions.
108
+
109
+ The remaining tools cover bills, payments, consumption, smart sessions, forecasts, preferences, support, notifications, nearby offices, tariff schedules, and authentication. MCP resources `jpdcl://catalog` and `jpdcl://guide` expose the complete machine-readable catalog and decision guide.
110
+
111
+ ## AI data policy
112
+
113
+ `jpdcl_snapshot` is the recommended default because it separates:
114
+
115
+ - observed portal data;
116
+ - deterministic calculations;
117
+ - derived forecasts;
118
+ - advisory tips and recommendations;
119
+ - unavailable or stale upstream evidence.
120
+
121
+ Forecasts, recommendations, energy-saving advice, and `smartTips` are excluded from factual responses by default. Generic reads reject derived or advisory endpoints unless the caller explicitly supplies `allowDerived=true`.
122
+
123
+ The toolkit does not claim instant live voltage or connectivity when the portal only provides delayed records. `jpdcl_meter_health` returns the newest available timestamps and evidence, allowing an AI to explain freshness instead of presenting stale data as live.
124
+
125
+ Daily and period consumption is calculated from cumulative meter registers. For net meters, tariff estimates prefer the ledger's net-import difference and fall back to Genus consumption only when necessary. Estimates remain provisional because utility cutoffs, export settlement, credits, adjustments, and duties can differ from a final bill.
126
+
127
+ ## MCP safety
128
+
129
+ Payments, complaints, profile changes, account linking, on-demand reads, preference changes, and notification deletion are disabled by default. A mutation requires both:
130
+
131
+ 1. `JPDCL_ENABLE_MUTATIONS=true` in the private environment.
132
+ 2. An explicit confirmation in the `jpdcl_mutate` call.
133
+
134
+ Never commit `.env`, session files, consumer IDs, meter numbers, bills, or readings. If a device is shared or lost, use `jpdcl auth logout` and change the portal password.
135
+
136
+ ## CLI
137
+
138
+ The same package is also the CLI. Supplying any argument selects CLI mode, while no arguments start MCP mode:
139
+
140
+ ```sh
141
+ # Login and automatic re-login setup
142
+ npx -y jpdcl auth login --login-id YOUR_MOBILE_OR_EMAIL --save-env
143
+ jpdcl auth status
144
+
145
+ # Best normalized responses
146
+ jpdcl snapshot
147
+ jpdcl account digest
148
+ jpdcl smart dashboard
149
+ jpdcl smart health
150
+ jpdcl tariff estimate
151
+ jpdcl ledger summary
152
+
153
+ # Readings and reports
154
+ jpdcl smart consumption --type monthly --value 12
155
+ jpdcl smart intervals --from 2026-07-01 --to 2026-07-24
156
+ jpdcl smart report --type voltage --from 2026-07-24 --to 2026-07-24
157
+ jpdcl ledger readings --from 2026-07-01 --to 2026-07-24 --limit 10
158
+
159
+ # Complete endpoint catalog and raw access
160
+ jpdcl catalog --portal smart
161
+ jpdcl request smart_preferences --params '{"isPrepaid":false}'
162
+ ```
163
+
164
+ All CLI output is JSON. Use `jpdcl --help` for the complete command tree.
165
+
166
+ ## REST API and TypeScript client
167
+
168
+ The secondary local REST API provides normalized routes plus full catalog access:
169
+
170
+ ```sh
171
+ JPDCL_API_KEY='choose-a-local-key' jpdcl-api
172
+
173
+ curl -H 'Authorization: Bearer choose-a-local-key' \
174
+ 'http://127.0.0.1:8787/v1/snapshot?accountId=YOUR_ACCOUNT_ID'
175
+ ```
176
+
177
+ The server binds to `127.0.0.1` by default. Set a strong `JPDCL_API_KEY` before exposing it to another process or machine. The full contract is in [openapi.yaml](./openapi.yaml), and the package root exports the typed clients for direct TypeScript use.
178
+
179
+ ## Install from source
180
+
181
+ Node.js 20 or newer is required:
182
+
183
+ ```sh
184
+ npm ci
185
+ npm run build
186
+ npm link
187
+ ```
188
+
189
+ After linking, `jpdcl` with no arguments starts MCP; `jpdcl --help` or any subcommand starts the CLI. `jpdcl-mcp` remains available as an explicit MCP-only executable, and `jpdcl-api` starts the local REST API.
190
+
191
+ ## Free public deployment
192
+
193
+ The hosted MCP runs on the Cloudflare Workers free tier. Fork the repository, authenticate Wrangler, and deploy your own copy with:
194
+
195
+ ```sh
196
+ npm ci
197
+ npx wrangler deploy
198
+ ```
199
+
200
+ `wrangler.jsonc` explicitly enables the public `workers.dev` route. No JPDCL credentials belong in Cloudflare environment variables or repository secrets because each MCP connection supplies its own protected headers.
201
+
202
+ ## Development checks
203
+
204
+ ```sh
205
+ npm run typecheck
206
+ npm test
207
+ npm run build
208
+ npm run audit:launcher
209
+ npm run audit:smart
210
+ npm run audit:ledger
211
+ npm run audit:mcp
212
+ npm pack --dry-run
213
+ ```
214
+
215
+ The MCP audit launches the real server, verifies its name, checks all 29 tool declarations and embedded resources, calls every safe tool against live APIs, and confirms mutation and derived-data guards without changing the account. Live audits require your own private JPDCL account and must never run with credentials in CI.
216
+
217
+ ## License
218
+
219
+ Released under the [MIT License](./LICENSE). Portal names, services, and data remain the property of their respective owners.
@@ -0,0 +1,141 @@
1
+ import type { EndpointDefinition } from "./types.js";
2
+ export declare const endpointCatalog: {
3
+ main_login: EndpointDefinition;
4
+ main_department_login: EndpointDefinition;
5
+ main_validate_password: EndpointDefinition;
6
+ main_reset_password: EndpointDefinition;
7
+ main_forgot_password: EndpointDefinition;
8
+ main_register: EndpointDefinition;
9
+ main_visitor_count: EndpointDefinition;
10
+ main_customer_info: EndpointDefinition;
11
+ main_accounts_for_identity: EndpointDefinition;
12
+ main_add_primary_account: EndpointDefinition;
13
+ main_linked_accounts: EndpointDefinition;
14
+ main_link_account: EndpointDefinition;
15
+ main_swap_linked_account: EndpointDefinition;
16
+ main_delink_account: EndpointDefinition;
17
+ main_update_contact: EndpointDefinition;
18
+ main_alert_settings: EndpointDefinition;
19
+ main_bill_history: EndpointDefinition;
20
+ main_bill_pdf: EndpointDefinition;
21
+ main_consumption: EndpointDefinition;
22
+ main_consumption_legacy: EndpointDefinition;
23
+ main_meter_changes: EndpointDefinition;
24
+ main_meter_status: EndpointDefinition;
25
+ main_prepaid_transactions: EndpointDefinition;
26
+ main_prepaid_bill_history: EndpointDefinition;
27
+ main_prepaid_bill_distribution: EndpointDefinition;
28
+ main_prepaid_statement_date: EndpointDefinition;
29
+ main_prepaid_statement_month: EndpointDefinition;
30
+ main_same_day_transaction: EndpointDefinition;
31
+ main_initiate_payment: EndpointDefinition;
32
+ main_cancel_payment_remark: EndpointDefinition;
33
+ main_amnesty_info: EndpointDefinition;
34
+ main_complaint_types: EndpointDefinition;
35
+ main_complaints: EndpointDefinition;
36
+ main_register_complaint: EndpointDefinition;
37
+ main_contact: EndpointDefinition;
38
+ main_group_info: EndpointDefinition;
39
+ main_group_hierarchy: EndpointDefinition;
40
+ main_group_payment: EndpointDefinition;
41
+ main_group_payment_report: EndpointDefinition;
42
+ main_smart_sso: EndpointDefinition;
43
+ main_generate_log: EndpointDefinition;
44
+ smart_otp_send: EndpointDefinition;
45
+ smart_otp_verify: EndpointDefinition;
46
+ smart_guest_otp_send: EndpointDefinition;
47
+ smart_guest_otp_verify: EndpointDefinition;
48
+ smart_switch_account: EndpointDefinition;
49
+ smart_logout: EndpointDefinition;
50
+ smart_admin_login: EndpointDefinition;
51
+ smart_admin_login_counts: EndpointDefinition;
52
+ smart_admin_bypass_link: EndpointDefinition;
53
+ smart_today_monthly: EndpointDefinition;
54
+ smart_current_month: EndpointDefinition;
55
+ smart_last_month_bill: EndpointDefinition;
56
+ smart_meter_reading: EndpointDefinition;
57
+ smart_current_meter_reading: EndpointDefinition;
58
+ smart_prepaid_recharge_balance: EndpointDefinition;
59
+ smart_prepaid_balance: EndpointDefinition;
60
+ smart_bill_summary: EndpointDefinition;
61
+ smart_insights: EndpointDefinition;
62
+ smart_forecast_today: EndpointDefinition;
63
+ smart_forecast_weekly: EndpointDefinition;
64
+ smart_forecast_monthly: EndpointDefinition;
65
+ smart_consumption_comparison: EndpointDefinition;
66
+ smart_consumption_30min: EndpointDefinition;
67
+ smart_consumption_30min_csv: EndpointDefinition;
68
+ smart_consumption_30min_pdf: EndpointDefinition;
69
+ smart_on_demand_request: EndpointDefinition;
70
+ smart_on_demand_logs: EndpointDefinition;
71
+ smart_my_alerts: EndpointDefinition;
72
+ smart_postpaid_payment_history: EndpointDefinition;
73
+ smart_postpaid_bill_history: EndpointDefinition;
74
+ smart_postpaid_last_bill: EndpointDefinition;
75
+ smart_prepaid_recharge_history: EndpointDefinition;
76
+ smart_prepaid_bill_history: EndpointDefinition;
77
+ smart_prepaid_recharge_pdf: EndpointDefinition;
78
+ smart_faqs: EndpointDefinition;
79
+ smart_contact_support: EndpointDefinition;
80
+ smart_complaint_categories: EndpointDefinition;
81
+ smart_complaint_priorities: EndpointDefinition;
82
+ smart_complaints: EndpointDefinition;
83
+ smart_create_complaint: EndpointDefinition;
84
+ smart_cancel_complaint: EndpointDefinition;
85
+ smart_track_complaint: EndpointDefinition;
86
+ smart_chatbot_questions: EndpointDefinition;
87
+ smart_chatbot_submit: EndpointDefinition;
88
+ smart_msedcl_chatbot_questions: EndpointDefinition;
89
+ smart_msedcl_chatbot_options: EndpointDefinition;
90
+ smart_msedcl_chatbot_precheck: EndpointDefinition;
91
+ smart_msedcl_chatbot_submit: EndpointDefinition;
92
+ smart_msedcl_chatbot_tickets: EndpointDefinition;
93
+ smart_msedcl_chatbot_ticket: EndpointDefinition;
94
+ smart_meter_details: EndpointDefinition;
95
+ smart_tariff_details: EndpointDefinition;
96
+ smart_slab_rates: EndpointDefinition;
97
+ smart_page_content: EndpointDefinition;
98
+ smart_update_account_label: EndpointDefinition;
99
+ smart_update_language: EndpointDefinition;
100
+ smart_preferences: EndpointDefinition;
101
+ smart_update_preferences: EndpointDefinition;
102
+ smart_enable_all_preferences: EndpointDefinition;
103
+ smart_disable_all_preferences: EndpointDefinition;
104
+ smart_update_alerts: EndpointDefinition;
105
+ smart_notifications: EndpointDefinition;
106
+ smart_notification_unread_count: EndpointDefinition;
107
+ smart_notification_mark_read: EndpointDefinition;
108
+ smart_notification_mark_all_read: EndpointDefinition;
109
+ smart_notification_delete: EndpointDefinition;
110
+ smart_notification_filter: EndpointDefinition;
111
+ smart_nearby_offices: EndpointDefinition;
112
+ smart_appliances: EndpointDefinition;
113
+ smart_report: EndpointDefinition;
114
+ smart_report_power_events: EndpointDefinition;
115
+ smart_report_daily_tod: EndpointDefinition;
116
+ smart_report_monthly_tod: EndpointDefinition;
117
+ smart_report_peak_slots: EndpointDefinition;
118
+ smart_report_peak_slots_monthly: EndpointDefinition;
119
+ smart_report_voltage: EndpointDefinition;
120
+ smart_report_demand: EndpointDefinition;
121
+ smart_payment_initiate: EndpointDefinition;
122
+ smart_payment_verify: EndpointDefinition;
123
+ ledger_consumer_readings: EndpointDefinition;
124
+ ledger_meter_alarms: EndpointDefinition;
125
+ };
126
+ export type EndpointName = keyof typeof endpointCatalog;
127
+ export declare function isEndpointName(name: string): name is EndpointName;
128
+ export declare function listEndpoints(portal?: EndpointDefinition["portal"]): {
129
+ portal: "main" | "smart" | "ledger";
130
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
131
+ path: string;
132
+ encrypted?: boolean;
133
+ auth: "public" | "public-basic" | "main-session" | "smart-bearer" | "smart-admin" | "external-basic";
134
+ mutation?: boolean;
135
+ binary?: boolean;
136
+ dataClass?: "observed" | "derived" | "advisory" | "configuration" | "transactional";
137
+ description: string;
138
+ parameters?: string[];
139
+ bodyExample?: Record<string, unknown>;
140
+ name: string;
141
+ }[];