@carrierllc/sdk 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/data/cli.json +39 -0
- package/dist/data/operations.json +57 -0
- package/dist/operation-ids.d.ts +1 -1
- package/dist/storefront-labels.d.ts +2 -0
- package/dist/storefront-labels.js +4 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,4 +35,4 @@ const agentTools = restTools(carrier)
|
|
|
35
35
|
|
|
36
36
|
`new Mcp(token, { auth: "bearer" })` sends an OAuth access token or a Clerk organization API key. The default sends `?TOKEN=` to `https://mcp.carrier.llc/mcp`. `Cli` never invokes a shell. Catalog entries marked `internal` do not accept a customer API key.
|
|
37
37
|
|
|
38
|
-
`npm install @carrierllc/sdk@0.2.
|
|
38
|
+
`npm install @carrierllc/sdk@0.2.5` installs this surface. `0.1.0` only creates connectivity intents and products. The published tarball is the compiled `dist` output, including the generated operation catalog.
|
package/dist/data/cli.json
CHANGED
|
@@ -1698,6 +1698,45 @@
|
|
|
1698
1698
|
"restPath": "/v1/onboarding/complete",
|
|
1699
1699
|
"options": []
|
|
1700
1700
|
},
|
|
1701
|
+
{
|
|
1702
|
+
"invocation": "carrier affiliate status",
|
|
1703
|
+
"domain": "affiliate",
|
|
1704
|
+
"summary": "Read-only: returns the affiliate profile, referral code, link, counts, money owed and paid, and Connect payouts status for the authenticated operator.",
|
|
1705
|
+
"write": false,
|
|
1706
|
+
"transport": "mcp",
|
|
1707
|
+
"tool": "affiliate_status",
|
|
1708
|
+
"restMethod": null,
|
|
1709
|
+
"restPath": null,
|
|
1710
|
+
"options": []
|
|
1711
|
+
},
|
|
1712
|
+
{
|
|
1713
|
+
"invocation": "carrier affiliate commissions",
|
|
1714
|
+
"domain": "affiliate",
|
|
1715
|
+
"summary": "Read-only: returns the list of commission records for the authenticated operator.",
|
|
1716
|
+
"write": false,
|
|
1717
|
+
"transport": "mcp",
|
|
1718
|
+
"tool": "affiliate_commissions",
|
|
1719
|
+
"restMethod": null,
|
|
1720
|
+
"restPath": null,
|
|
1721
|
+
"options": [
|
|
1722
|
+
{
|
|
1723
|
+
"flags": "--limit <n>",
|
|
1724
|
+
"description": "Maximum number of commission records to return (1-200, default: 50). Default 50.",
|
|
1725
|
+
"required": false
|
|
1726
|
+
}
|
|
1727
|
+
]
|
|
1728
|
+
},
|
|
1729
|
+
{
|
|
1730
|
+
"invocation": "carrier affiliate join",
|
|
1731
|
+
"domain": "affiliate",
|
|
1732
|
+
"summary": "Join the Carrier affiliate program and generate a personal referral code and link.",
|
|
1733
|
+
"write": false,
|
|
1734
|
+
"transport": "mcp",
|
|
1735
|
+
"tool": "affiliate_join",
|
|
1736
|
+
"restMethod": null,
|
|
1737
|
+
"restPath": null,
|
|
1738
|
+
"options": []
|
|
1739
|
+
},
|
|
1701
1740
|
{
|
|
1702
1741
|
"invocation": "carrier billing events",
|
|
1703
1742
|
"domain": "billing",
|
|
@@ -1339,6 +1339,63 @@
|
|
|
1339
1339
|
"queryParams": [],
|
|
1340
1340
|
"headerParams": []
|
|
1341
1341
|
},
|
|
1342
|
+
{
|
|
1343
|
+
"id": "affiliates_me_get",
|
|
1344
|
+
"method": "GET",
|
|
1345
|
+
"path": "/v1/affiliates/me",
|
|
1346
|
+
"tag": "Affiliates",
|
|
1347
|
+
"summary": "Get this org's affiliate link, referral count, earnings and payout status",
|
|
1348
|
+
"security": "bearer",
|
|
1349
|
+
"body": false,
|
|
1350
|
+
"bodyRequired": false,
|
|
1351
|
+
"pathParams": [],
|
|
1352
|
+
"queryParams": [],
|
|
1353
|
+
"headerParams": []
|
|
1354
|
+
},
|
|
1355
|
+
{
|
|
1356
|
+
"id": "affiliates_me_create",
|
|
1357
|
+
"method": "POST",
|
|
1358
|
+
"path": "/v1/affiliates/me",
|
|
1359
|
+
"tag": "Affiliates",
|
|
1360
|
+
"summary": "Join the affiliate programme (idempotent: returns the existing code)",
|
|
1361
|
+
"security": "bearer",
|
|
1362
|
+
"body": false,
|
|
1363
|
+
"bodyRequired": false,
|
|
1364
|
+
"pathParams": [],
|
|
1365
|
+
"queryParams": [],
|
|
1366
|
+
"headerParams": []
|
|
1367
|
+
},
|
|
1368
|
+
{
|
|
1369
|
+
"id": "affiliates_me_commissions_list",
|
|
1370
|
+
"method": "GET",
|
|
1371
|
+
"path": "/v1/affiliates/me/commissions",
|
|
1372
|
+
"tag": "Affiliates",
|
|
1373
|
+
"summary": "List commissions for this org, newest period first",
|
|
1374
|
+
"security": "bearer",
|
|
1375
|
+
"body": false,
|
|
1376
|
+
"bodyRequired": false,
|
|
1377
|
+
"pathParams": [],
|
|
1378
|
+
"queryParams": [
|
|
1379
|
+
{
|
|
1380
|
+
"name": "limit",
|
|
1381
|
+
"required": false
|
|
1382
|
+
}
|
|
1383
|
+
],
|
|
1384
|
+
"headerParams": []
|
|
1385
|
+
},
|
|
1386
|
+
{
|
|
1387
|
+
"id": "affiliates_link",
|
|
1388
|
+
"method": "POST",
|
|
1389
|
+
"path": "/v1/affiliates/link",
|
|
1390
|
+
"tag": "Affiliates",
|
|
1391
|
+
"summary": "Attach a referral code to an organization created less than 30 minutes ago (browser sign-up only)",
|
|
1392
|
+
"security": "bearer",
|
|
1393
|
+
"body": true,
|
|
1394
|
+
"bodyRequired": true,
|
|
1395
|
+
"pathParams": [],
|
|
1396
|
+
"queryParams": [],
|
|
1397
|
+
"headerParams": []
|
|
1398
|
+
},
|
|
1342
1399
|
{
|
|
1343
1400
|
"id": "operator_identity_status",
|
|
1344
1401
|
"method": "GET",
|
package/dist/operation-ids.d.ts
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
*
|
|
3
3
|
* Generated by sdks/generate.py. Do not edit by hand.
|
|
4
4
|
*/
|
|
5
|
-
export type OperationId = "list_reseller_accounts" | "get_reseller_info" | "esim_status_per_account" | "list_sponsors" | "list_steering_lists" | "get_subscriber" | "list_subscribers" | "create_subscriber" | "get_sim_provider_status" | "change_sim_status" | "get_subscriber_location" | "hlr_get_bitrate" | "hlr_set_bitrate" | "list_subscriber_packages" | "assign_package" | "clean_all_packages" | "list_package_templates" | "create_package_template" | "list_location_zones" | "create_location_zone" | "list_detailed_location_zones" | "list_destination_prefixes" | "subscriber_usage" | "subscriber_network_events" | "subscriber_active_period" | "get_tariff" | "list_network_profiles" | "modify_subscriber_balance" | "modify_subscriber_status" | "modify_subscriber_contact_info" | "set_subscriber_traffic_restrictions" | "modify_subscriber_steering_list" | "move_subscriber_range_to_account" | "assign_recurring_package" | "modify_package_limits" | "modify_package_expiry" | "modify_package_status" | "stop_resume_recurring_package" | "modify_account_balance" | "delete_subscriber_package" | "modify_template_core" | "modify_template_recurring" | "modify_template_throttling" | "send_sms" | "fleet_health" | "churn_risk" | "audit_network_coverage" | "diagnose_subscriber" | "detect_usage_anomalies" | "optimize_package" | "marketing_intelligence" | "high_cost_subscribers" | "high_cost_subscribers_method_guard" | "detect_country_entry" | "list_intelligence_schedules" | "create_intelligence_schedule" | "delete_intelligence_schedule" | "run_intelligence_schedule" | "get_intelligence_schedule_report" | "get_intelligence_share" | "operator_billing_connect_begin" | "operator_billing_connect_oauth_begin" | "operator_billing_connect_oauth_complete" | "operator_billing_connect_status" | "operator_billing_connect_dashboard_link" | "operator_billing_list_payouts" | "operator_billing_create_manual_payout" | "operator_billing_get_payout_schedule" | "operator_billing_update_payout_schedule" | "operator_billing_list_fees" | "operator_billing_list_refunds" | "operator_billing_create_refund" | "operator_billing_list_disputes" | "operator_billing_submit_dispute_evidence" | "operator_billing_list_fraud_reviews" | "operator_billing_approve_fraud_review" | "operator_billing_decline_fraud_review" | "operator_billing_list_value_lists" | "operator_billing_add_value_list_item" | "operator_identity_status" | "operator_identity_create_session" | "operator_identity_update_session" | "operator_list_promotions" | "operator_create_promotion" | "signup_start" | "signup_verify" | "create_api_key" | "get_onboarding_state" | "onboarding_save_org" | "onboarding_connect_ocs_token" | "onboarding_start_managed_account" | "onboarding_save_plan" | "onboarding_skip_plan" | "onboarding_test_esim" | "onboarding_complete" | "operator_billing_stripe_webhook" | "receive_bridge4ip_webhook" | "affect_subscriber_phone_number" | "modify_subscriber_mobile_plan" | "modify_subscriber_voip_plan" | "push_steering_to_subscriber" | "modify_subscriber_package_active_period" | "get_subscriber_location_by_cell_id" | "reset_subscriber_gz_counter" | "list_destination_lists" | "list_subscriber_voip_tariff" | "list_voip_tariff_rule" | "change_network_profile_of_location_zone" | "get_network_default" | "set_network_default" | "plan_network_default" | "carrier_webhook_config" | "ai_chat" | "ai_insights" | "ai_quota" | "list_invoice_periods" | "get_billing_config" | "update_billing_config" | "stripe_connect_begin" | "stripe_connect_status" | "list_invoices" | "create_invoice" | "get_invoice" | "update_invoice" | "void_invoice" | "get_invoice_document" | "list_connectivity_plans" | "list_connectivity_products" | "create_connectivity_product" | "get_connectivity_product" | "list_connectivity_intents" | "create_connectivity_intent" | "get_connectivity_intent" | "confirm_connectivity_intent" | "create_connectivity_webhook_endpoint" | "list_connectivity_webhook_endpoints" | "delete_connectivity_webhook_endpoint" | "list_connectivity_events" | "get_connectivity_event" | "create_connectivity_usage_record" | "list_connectivity_usage_records" | "retry_connectivity_event" | "issue_esim_from_inventory" | "rollback_esim_issuance" | "subscriber_country_history" | "get_subscriber_notes" | "add_subscriber_note" | "put_subscriber_notes" | "observe_connectivity_event" | "ingest_connectivity_usage" | "ingest_cdr_events" | "aggregate_cdr" | "list_storefront_templates" | "list_storefront_buyer_orders" | "get_storefront_order" | "rollback_storefront_order" | "get_hosted_storefront" | "list_storefronts" | "create_storefront" | "get_storefront" | "update_storefront" | "upsert_storefront_plan" | "update_storefront_plan" | "health_check";
|
|
5
|
+
export type OperationId = "list_reseller_accounts" | "get_reseller_info" | "esim_status_per_account" | "list_sponsors" | "list_steering_lists" | "get_subscriber" | "list_subscribers" | "create_subscriber" | "get_sim_provider_status" | "change_sim_status" | "get_subscriber_location" | "hlr_get_bitrate" | "hlr_set_bitrate" | "list_subscriber_packages" | "assign_package" | "clean_all_packages" | "list_package_templates" | "create_package_template" | "list_location_zones" | "create_location_zone" | "list_detailed_location_zones" | "list_destination_prefixes" | "subscriber_usage" | "subscriber_network_events" | "subscriber_active_period" | "get_tariff" | "list_network_profiles" | "modify_subscriber_balance" | "modify_subscriber_status" | "modify_subscriber_contact_info" | "set_subscriber_traffic_restrictions" | "modify_subscriber_steering_list" | "move_subscriber_range_to_account" | "assign_recurring_package" | "modify_package_limits" | "modify_package_expiry" | "modify_package_status" | "stop_resume_recurring_package" | "modify_account_balance" | "delete_subscriber_package" | "modify_template_core" | "modify_template_recurring" | "modify_template_throttling" | "send_sms" | "fleet_health" | "churn_risk" | "audit_network_coverage" | "diagnose_subscriber" | "detect_usage_anomalies" | "optimize_package" | "marketing_intelligence" | "high_cost_subscribers" | "high_cost_subscribers_method_guard" | "detect_country_entry" | "list_intelligence_schedules" | "create_intelligence_schedule" | "delete_intelligence_schedule" | "run_intelligence_schedule" | "get_intelligence_schedule_report" | "get_intelligence_share" | "operator_billing_connect_begin" | "operator_billing_connect_oauth_begin" | "operator_billing_connect_oauth_complete" | "operator_billing_connect_status" | "operator_billing_connect_dashboard_link" | "operator_billing_list_payouts" | "operator_billing_create_manual_payout" | "operator_billing_get_payout_schedule" | "operator_billing_update_payout_schedule" | "operator_billing_list_fees" | "operator_billing_list_refunds" | "operator_billing_create_refund" | "operator_billing_list_disputes" | "operator_billing_submit_dispute_evidence" | "operator_billing_list_fraud_reviews" | "operator_billing_approve_fraud_review" | "operator_billing_decline_fraud_review" | "operator_billing_list_value_lists" | "operator_billing_add_value_list_item" | "affiliates_me_get" | "affiliates_me_create" | "affiliates_me_commissions_list" | "affiliates_link" | "operator_identity_status" | "operator_identity_create_session" | "operator_identity_update_session" | "operator_list_promotions" | "operator_create_promotion" | "signup_start" | "signup_verify" | "create_api_key" | "get_onboarding_state" | "onboarding_save_org" | "onboarding_connect_ocs_token" | "onboarding_start_managed_account" | "onboarding_save_plan" | "onboarding_skip_plan" | "onboarding_test_esim" | "onboarding_complete" | "operator_billing_stripe_webhook" | "receive_bridge4ip_webhook" | "affect_subscriber_phone_number" | "modify_subscriber_mobile_plan" | "modify_subscriber_voip_plan" | "push_steering_to_subscriber" | "modify_subscriber_package_active_period" | "get_subscriber_location_by_cell_id" | "reset_subscriber_gz_counter" | "list_destination_lists" | "list_subscriber_voip_tariff" | "list_voip_tariff_rule" | "change_network_profile_of_location_zone" | "get_network_default" | "set_network_default" | "plan_network_default" | "carrier_webhook_config" | "ai_chat" | "ai_insights" | "ai_quota" | "list_invoice_periods" | "get_billing_config" | "update_billing_config" | "stripe_connect_begin" | "stripe_connect_status" | "list_invoices" | "create_invoice" | "get_invoice" | "update_invoice" | "void_invoice" | "get_invoice_document" | "list_connectivity_plans" | "list_connectivity_products" | "create_connectivity_product" | "get_connectivity_product" | "list_connectivity_intents" | "create_connectivity_intent" | "get_connectivity_intent" | "confirm_connectivity_intent" | "create_connectivity_webhook_endpoint" | "list_connectivity_webhook_endpoints" | "delete_connectivity_webhook_endpoint" | "list_connectivity_events" | "get_connectivity_event" | "create_connectivity_usage_record" | "list_connectivity_usage_records" | "retry_connectivity_event" | "issue_esim_from_inventory" | "rollback_esim_issuance" | "subscriber_country_history" | "get_subscriber_notes" | "add_subscriber_note" | "put_subscriber_notes" | "observe_connectivity_event" | "ingest_connectivity_usage" | "ingest_cdr_events" | "aggregate_cdr" | "list_storefront_templates" | "list_storefront_buyer_orders" | "get_storefront_order" | "rollback_storefront_order" | "get_hosted_storefront" | "list_storefronts" | "create_storefront" | "get_storefront" | "update_storefront" | "upsert_storefront_plan" | "update_storefront_plan" | "health_check";
|
|
@@ -40,6 +40,8 @@ export declare function parseCountryInput(raw: string): {
|
|
|
40
40
|
ok: false;
|
|
41
41
|
message: string;
|
|
42
42
|
};
|
|
43
|
+
/** Upper bound for regions on one plan: every ISO 3166-1 region code (~249). */
|
|
44
|
+
export declare const MAX_REGIONS_PER_PLAN = 250;
|
|
43
45
|
/** Turns a small picture file into the data URL the shop stores. */
|
|
44
46
|
export declare function logoFileDataUrl(bytes: Uint8Array): {
|
|
45
47
|
ok: true;
|
|
@@ -63,7 +63,8 @@ export function parseCountryInput(raw) {
|
|
|
63
63
|
if (!added)
|
|
64
64
|
return { ok: false, message: "Countries are names, such as France, or codes such as FR." };
|
|
65
65
|
for (const code of added) {
|
|
66
|
-
|
|
66
|
+
// A plan can span the whole world: cap at every ISO region code (~249).
|
|
67
|
+
if (regions.length >= MAX_REGIONS_PER_PLAN)
|
|
67
68
|
break;
|
|
68
69
|
if (!regions.includes(code))
|
|
69
70
|
regions.push(code);
|
|
@@ -71,6 +72,8 @@ export function parseCountryInput(raw) {
|
|
|
71
72
|
}
|
|
72
73
|
return { ok: true, regions };
|
|
73
74
|
}
|
|
75
|
+
/** Upper bound for regions on one plan: every ISO 3166-1 region code (~249). */
|
|
76
|
+
export const MAX_REGIONS_PER_PLAN = 250;
|
|
74
77
|
function parseAmount(raw, unit, message, max, whole) {
|
|
75
78
|
const text = raw.trim().replace(unit, "").trim();
|
|
76
79
|
if (text === "" || !/^\d+(\.\d+)?$/.test(text))
|
package/dist/version.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Published version. Keep this equal to package.json. */
|
|
2
|
-
export declare const SDK_VERSION = "0.2.
|
|
3
|
-
export declare const USER_AGENT = "@carrierllc/sdk/0.2.
|
|
2
|
+
export declare const SDK_VERSION = "0.2.6";
|
|
3
|
+
export declare const USER_AGENT = "@carrierllc/sdk/0.2.6";
|
package/dist/version.js
CHANGED