@siglume/api-sdk 0.9.1 → 0.10.1

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.
@@ -152,6 +152,7 @@ interface AppManifest {
152
152
  applicable_regulations?: string[];
153
153
  data_residency?: string;
154
154
  short_description?: string;
155
+ description?: string;
155
156
  docs_url?: string;
156
157
  support_contact?: string;
157
158
  seller_homepage_url?: string;
@@ -245,6 +246,7 @@ interface AppListingRecord {
245
246
  price_value_minor: number;
246
247
  currency: string;
247
248
  short_description?: string | null;
249
+ description?: string | null;
248
250
  docs_url?: string | null;
249
251
  support_contact?: string | null;
250
252
  seller_display_name?: string | null;
@@ -1186,61 +1188,8 @@ interface AgentThreadRecord {
1186
1188
  items: NetworkContentDetail[];
1187
1189
  raw: Record<string, unknown>;
1188
1190
  }
1189
- declare const RefundReason: {
1190
- readonly CUSTOMER_REQUEST: "customer-request";
1191
- readonly DUPLICATE: "duplicate";
1192
- readonly FRAUDULENT: "fraudulent";
1193
- readonly SERVICE_FAILURE: "service-failure";
1194
- readonly GOODWILL: "goodwill";
1195
- };
1196
- type RefundReason = (typeof RefundReason)[keyof typeof RefundReason];
1197
- declare const DisputeResponse: {
1198
- readonly ACCEPT: "accept";
1199
- readonly CONTEST: "contest";
1200
- };
1201
- type DisputeResponse = (typeof DisputeResponse)[keyof typeof DisputeResponse];
1202
- interface RefundRecord {
1203
- refund_id: string;
1204
- receipt_id: string;
1205
- owner_user_id?: string | null;
1206
- payment_mandate_id?: string | null;
1207
- usage_event_id?: string | null;
1208
- chain_receipt_id?: string | null;
1209
- amount_minor: number;
1210
- currency: string;
1211
- status: string;
1212
- reason_code: string;
1213
- note?: string | null;
1214
- idempotency_key?: string | null;
1215
- on_chain_tx_hash?: string | null;
1216
- metadata: Record<string, unknown>;
1217
- idempotent_replay: boolean;
1218
- created_at?: string | null;
1219
- updated_at?: string | null;
1220
- raw: Record<string, unknown>;
1221
- }
1222
- interface DisputeRecord {
1223
- dispute_id: string;
1224
- receipt_id: string;
1225
- owner_user_id?: string | null;
1226
- payment_mandate_id?: string | null;
1227
- usage_event_id?: string | null;
1228
- external_dispute_id?: string | null;
1229
- status: string;
1230
- reason_code: string;
1231
- description?: string | null;
1232
- evidence: Record<string, unknown>;
1233
- response_decision?: string | null;
1234
- response_note?: string | null;
1235
- responded_at?: string | null;
1236
- metadata: Record<string, unknown>;
1237
- idempotent_replay: boolean;
1238
- created_at?: string | null;
1239
- updated_at?: string | null;
1240
- raw: Record<string, unknown>;
1241
- }
1242
1191
 
1243
- declare const WEBHOOK_EVENT_TYPES: readonly ["subscription.created", "subscription.renewed", "subscription.cancelled", "subscription.paused", "subscription.reinstated", "refund.issued", "payment.succeeded", "payment.failed", "payment.disputed", "capability.published", "capability.delisted", "execution.completed", "execution.failed"];
1192
+ declare const WEBHOOK_EVENT_TYPES: readonly ["subscription.created", "subscription.renewed", "subscription.cancelled", "subscription.paused", "subscription.reinstated", "payment.succeeded", "payment.failed", "capability.published", "capability.delisted", "execution.completed", "execution.failed"];
1244
1193
  type WebhookEventType = (typeof WEBHOOK_EVENT_TYPES)[number];
1245
1194
  interface WebhookSubscriptionRecord {
1246
1195
  subscription_id: string;
@@ -1302,15 +1251,6 @@ interface SubscriptionLifecycleEventData extends Record<string, unknown> {
1302
1251
  currency?: string;
1303
1252
  amount_minor?: number;
1304
1253
  }
1305
- interface RefundIssuedEventData extends Record<string, unknown> {
1306
- refund_id?: string;
1307
- receipt_id?: string;
1308
- amount_minor?: number;
1309
- currency?: string;
1310
- status?: string;
1311
- payment_mandate_id?: string;
1312
- on_chain_tx_hash?: string;
1313
- }
1314
1254
  interface PaymentEventData extends SubscriptionLifecycleEventData {
1315
1255
  payment_status?: string;
1316
1256
  }
@@ -1345,14 +1285,10 @@ interface SubscriptionPausedEvent extends WebhookEventBase<"subscription.paused"
1345
1285
  }
1346
1286
  interface SubscriptionReinstatedEvent extends WebhookEventBase<"subscription.reinstated", SubscriptionLifecycleEventData> {
1347
1287
  }
1348
- interface RefundIssuedEvent extends WebhookEventBase<"refund.issued", RefundIssuedEventData> {
1349
- }
1350
1288
  interface PaymentSucceededEvent extends WebhookEventBase<"payment.succeeded", PaymentEventData> {
1351
1289
  }
1352
1290
  interface PaymentFailedEvent extends WebhookEventBase<"payment.failed", PaymentEventData> {
1353
1291
  }
1354
- interface PaymentDisputedEvent extends WebhookEventBase<"payment.disputed", PaymentEventData> {
1355
- }
1356
1292
  interface CapabilityPublishedEvent extends WebhookEventBase<"capability.published", CapabilityEventData> {
1357
1293
  }
1358
1294
  interface CapabilityDelistedEvent extends WebhookEventBase<"capability.delisted", CapabilityEventData> {
@@ -1361,7 +1297,7 @@ interface ExecutionCompletedEvent extends WebhookEventBase<"execution.completed"
1361
1297
  }
1362
1298
  interface ExecutionFailedEvent extends WebhookEventBase<"execution.failed", ExecutionFailedEventData> {
1363
1299
  }
1364
- type SiglumeWebhookEvent = SubscriptionCreatedEvent | SubscriptionRenewedEvent | SubscriptionCancelledEvent | SubscriptionPausedEvent | SubscriptionReinstatedEvent | RefundIssuedEvent | PaymentSucceededEvent | PaymentFailedEvent | PaymentDisputedEvent | CapabilityPublishedEvent | CapabilityDelistedEvent | ExecutionCompletedEvent | ExecutionFailedEvent;
1300
+ type SiglumeWebhookEvent = SubscriptionCreatedEvent | SubscriptionRenewedEvent | SubscriptionCancelledEvent | SubscriptionPausedEvent | SubscriptionReinstatedEvent | PaymentSucceededEvent | PaymentFailedEvent | CapabilityPublishedEvent | CapabilityDelistedEvent | ExecutionCompletedEvent | ExecutionFailedEvent;
1365
1301
  interface QueuedWebhookEvent {
1366
1302
  queued: boolean;
1367
1303
  event: SiglumeWebhookEvent;
@@ -1408,7 +1344,6 @@ interface SiglumeClientShape {
1408
1344
  source_url?: string;
1409
1345
  runtime_validation?: Record<string, unknown>;
1410
1346
  oauth_credentials?: Record<string, unknown> | unknown[];
1411
- metadata?: Record<string, unknown>;
1412
1347
  source_context?: Record<string, unknown>;
1413
1348
  input_form_spec?: Record<string, unknown>;
1414
1349
  }): Promise<AutoRegistrationReceipt>;
@@ -1850,39 +1785,6 @@ interface SiglumeClientShape {
1850
1785
  limit?: number;
1851
1786
  cursor?: string;
1852
1787
  }): Promise<CursorPage<SupportCaseRecord>>;
1853
- issue_partial_refund(options: {
1854
- receipt_id: string;
1855
- amount_minor: number;
1856
- reason?: RefundReason | string;
1857
- note?: string;
1858
- idempotency_key: string;
1859
- original_amount_minor?: number;
1860
- }): Promise<RefundRecord>;
1861
- issue_full_refund(options: {
1862
- receipt_id: string;
1863
- reason?: RefundReason | string;
1864
- note?: string;
1865
- idempotency_key?: string;
1866
- }): Promise<RefundRecord>;
1867
- list_refunds(options?: {
1868
- receipt_id?: string;
1869
- limit?: number;
1870
- }): Promise<RefundRecord[]>;
1871
- get_refund(refund_id: string): Promise<RefundRecord>;
1872
- get_refunds_for_receipt(receipt_id: string, options?: {
1873
- limit?: number;
1874
- }): Promise<RefundRecord[]>;
1875
- list_disputes(options?: {
1876
- receipt_id?: string;
1877
- limit?: number;
1878
- }): Promise<DisputeRecord[]>;
1879
- get_dispute(dispute_id: string): Promise<DisputeRecord>;
1880
- respond_to_dispute(options: {
1881
- dispute_id: string;
1882
- response: DisputeResponse | string;
1883
- evidence: Record<string, unknown>;
1884
- note?: string;
1885
- }): Promise<DisputeRecord>;
1886
1788
  create_webhook_subscription(options: {
1887
1789
  callback_url: string;
1888
1790
  description?: string;
@@ -152,6 +152,7 @@ interface AppManifest {
152
152
  applicable_regulations?: string[];
153
153
  data_residency?: string;
154
154
  short_description?: string;
155
+ description?: string;
155
156
  docs_url?: string;
156
157
  support_contact?: string;
157
158
  seller_homepage_url?: string;
@@ -245,6 +246,7 @@ interface AppListingRecord {
245
246
  price_value_minor: number;
246
247
  currency: string;
247
248
  short_description?: string | null;
249
+ description?: string | null;
248
250
  docs_url?: string | null;
249
251
  support_contact?: string | null;
250
252
  seller_display_name?: string | null;
@@ -1186,61 +1188,8 @@ interface AgentThreadRecord {
1186
1188
  items: NetworkContentDetail[];
1187
1189
  raw: Record<string, unknown>;
1188
1190
  }
1189
- declare const RefundReason: {
1190
- readonly CUSTOMER_REQUEST: "customer-request";
1191
- readonly DUPLICATE: "duplicate";
1192
- readonly FRAUDULENT: "fraudulent";
1193
- readonly SERVICE_FAILURE: "service-failure";
1194
- readonly GOODWILL: "goodwill";
1195
- };
1196
- type RefundReason = (typeof RefundReason)[keyof typeof RefundReason];
1197
- declare const DisputeResponse: {
1198
- readonly ACCEPT: "accept";
1199
- readonly CONTEST: "contest";
1200
- };
1201
- type DisputeResponse = (typeof DisputeResponse)[keyof typeof DisputeResponse];
1202
- interface RefundRecord {
1203
- refund_id: string;
1204
- receipt_id: string;
1205
- owner_user_id?: string | null;
1206
- payment_mandate_id?: string | null;
1207
- usage_event_id?: string | null;
1208
- chain_receipt_id?: string | null;
1209
- amount_minor: number;
1210
- currency: string;
1211
- status: string;
1212
- reason_code: string;
1213
- note?: string | null;
1214
- idempotency_key?: string | null;
1215
- on_chain_tx_hash?: string | null;
1216
- metadata: Record<string, unknown>;
1217
- idempotent_replay: boolean;
1218
- created_at?: string | null;
1219
- updated_at?: string | null;
1220
- raw: Record<string, unknown>;
1221
- }
1222
- interface DisputeRecord {
1223
- dispute_id: string;
1224
- receipt_id: string;
1225
- owner_user_id?: string | null;
1226
- payment_mandate_id?: string | null;
1227
- usage_event_id?: string | null;
1228
- external_dispute_id?: string | null;
1229
- status: string;
1230
- reason_code: string;
1231
- description?: string | null;
1232
- evidence: Record<string, unknown>;
1233
- response_decision?: string | null;
1234
- response_note?: string | null;
1235
- responded_at?: string | null;
1236
- metadata: Record<string, unknown>;
1237
- idempotent_replay: boolean;
1238
- created_at?: string | null;
1239
- updated_at?: string | null;
1240
- raw: Record<string, unknown>;
1241
- }
1242
1191
 
1243
- declare const WEBHOOK_EVENT_TYPES: readonly ["subscription.created", "subscription.renewed", "subscription.cancelled", "subscription.paused", "subscription.reinstated", "refund.issued", "payment.succeeded", "payment.failed", "payment.disputed", "capability.published", "capability.delisted", "execution.completed", "execution.failed"];
1192
+ declare const WEBHOOK_EVENT_TYPES: readonly ["subscription.created", "subscription.renewed", "subscription.cancelled", "subscription.paused", "subscription.reinstated", "payment.succeeded", "payment.failed", "capability.published", "capability.delisted", "execution.completed", "execution.failed"];
1244
1193
  type WebhookEventType = (typeof WEBHOOK_EVENT_TYPES)[number];
1245
1194
  interface WebhookSubscriptionRecord {
1246
1195
  subscription_id: string;
@@ -1302,15 +1251,6 @@ interface SubscriptionLifecycleEventData extends Record<string, unknown> {
1302
1251
  currency?: string;
1303
1252
  amount_minor?: number;
1304
1253
  }
1305
- interface RefundIssuedEventData extends Record<string, unknown> {
1306
- refund_id?: string;
1307
- receipt_id?: string;
1308
- amount_minor?: number;
1309
- currency?: string;
1310
- status?: string;
1311
- payment_mandate_id?: string;
1312
- on_chain_tx_hash?: string;
1313
- }
1314
1254
  interface PaymentEventData extends SubscriptionLifecycleEventData {
1315
1255
  payment_status?: string;
1316
1256
  }
@@ -1345,14 +1285,10 @@ interface SubscriptionPausedEvent extends WebhookEventBase<"subscription.paused"
1345
1285
  }
1346
1286
  interface SubscriptionReinstatedEvent extends WebhookEventBase<"subscription.reinstated", SubscriptionLifecycleEventData> {
1347
1287
  }
1348
- interface RefundIssuedEvent extends WebhookEventBase<"refund.issued", RefundIssuedEventData> {
1349
- }
1350
1288
  interface PaymentSucceededEvent extends WebhookEventBase<"payment.succeeded", PaymentEventData> {
1351
1289
  }
1352
1290
  interface PaymentFailedEvent extends WebhookEventBase<"payment.failed", PaymentEventData> {
1353
1291
  }
1354
- interface PaymentDisputedEvent extends WebhookEventBase<"payment.disputed", PaymentEventData> {
1355
- }
1356
1292
  interface CapabilityPublishedEvent extends WebhookEventBase<"capability.published", CapabilityEventData> {
1357
1293
  }
1358
1294
  interface CapabilityDelistedEvent extends WebhookEventBase<"capability.delisted", CapabilityEventData> {
@@ -1361,7 +1297,7 @@ interface ExecutionCompletedEvent extends WebhookEventBase<"execution.completed"
1361
1297
  }
1362
1298
  interface ExecutionFailedEvent extends WebhookEventBase<"execution.failed", ExecutionFailedEventData> {
1363
1299
  }
1364
- type SiglumeWebhookEvent = SubscriptionCreatedEvent | SubscriptionRenewedEvent | SubscriptionCancelledEvent | SubscriptionPausedEvent | SubscriptionReinstatedEvent | RefundIssuedEvent | PaymentSucceededEvent | PaymentFailedEvent | PaymentDisputedEvent | CapabilityPublishedEvent | CapabilityDelistedEvent | ExecutionCompletedEvent | ExecutionFailedEvent;
1300
+ type SiglumeWebhookEvent = SubscriptionCreatedEvent | SubscriptionRenewedEvent | SubscriptionCancelledEvent | SubscriptionPausedEvent | SubscriptionReinstatedEvent | PaymentSucceededEvent | PaymentFailedEvent | CapabilityPublishedEvent | CapabilityDelistedEvent | ExecutionCompletedEvent | ExecutionFailedEvent;
1365
1301
  interface QueuedWebhookEvent {
1366
1302
  queued: boolean;
1367
1303
  event: SiglumeWebhookEvent;
@@ -1408,7 +1344,6 @@ interface SiglumeClientShape {
1408
1344
  source_url?: string;
1409
1345
  runtime_validation?: Record<string, unknown>;
1410
1346
  oauth_credentials?: Record<string, unknown> | unknown[];
1411
- metadata?: Record<string, unknown>;
1412
1347
  source_context?: Record<string, unknown>;
1413
1348
  input_form_spec?: Record<string, unknown>;
1414
1349
  }): Promise<AutoRegistrationReceipt>;
@@ -1850,39 +1785,6 @@ interface SiglumeClientShape {
1850
1785
  limit?: number;
1851
1786
  cursor?: string;
1852
1787
  }): Promise<CursorPage<SupportCaseRecord>>;
1853
- issue_partial_refund(options: {
1854
- receipt_id: string;
1855
- amount_minor: number;
1856
- reason?: RefundReason | string;
1857
- note?: string;
1858
- idempotency_key: string;
1859
- original_amount_minor?: number;
1860
- }): Promise<RefundRecord>;
1861
- issue_full_refund(options: {
1862
- receipt_id: string;
1863
- reason?: RefundReason | string;
1864
- note?: string;
1865
- idempotency_key?: string;
1866
- }): Promise<RefundRecord>;
1867
- list_refunds(options?: {
1868
- receipt_id?: string;
1869
- limit?: number;
1870
- }): Promise<RefundRecord[]>;
1871
- get_refund(refund_id: string): Promise<RefundRecord>;
1872
- get_refunds_for_receipt(receipt_id: string, options?: {
1873
- limit?: number;
1874
- }): Promise<RefundRecord[]>;
1875
- list_disputes(options?: {
1876
- receipt_id?: string;
1877
- limit?: number;
1878
- }): Promise<DisputeRecord[]>;
1879
- get_dispute(dispute_id: string): Promise<DisputeRecord>;
1880
- respond_to_dispute(options: {
1881
- dispute_id: string;
1882
- response: DisputeResponse | string;
1883
- evidence: Record<string, unknown>;
1884
- note?: string;
1885
- }): Promise<DisputeRecord>;
1886
1788
  create_webhook_subscription(options: {
1887
1789
  callback_url: string;
1888
1790
  description?: string;
package/dist/cli/index.js CHANGED
@@ -119,18 +119,6 @@ function camelCaseFromCapabilityKey(capabilityKey) {
119
119
  }
120
120
  return `${words.map((word) => word[0].toUpperCase() + word.slice(1)).join("")}App`;
121
121
  }
122
- function buildDefaultI18n(manifestPayload) {
123
- const job = String(manifestPayload.job_to_be_done ?? "").trim();
124
- const shortDescription = String(
125
- manifestPayload.short_description ?? manifestPayload.job_to_be_done ?? manifestPayload.name ?? ""
126
- ).trim();
127
- return {
128
- job_to_be_done_en: job,
129
- job_to_be_done_ja: job,
130
- short_description_en: shortDescription,
131
- short_description_ja: shortDescription
132
- };
133
- }
134
122
  function buildRegistrationStubSource(manifestPayload, toolManualPayload) {
135
123
  const capabilityKey = String(manifestPayload.capability_key ?? "generated-registration");
136
124
  const jobToBeDone = String(
@@ -285,10 +273,8 @@ var init_webhooks = __esm({
285
273
  "subscription.cancelled",
286
274
  "subscription.paused",
287
275
  "subscription.reinstated",
288
- "refund.issued",
289
276
  "payment.succeeded",
290
277
  "payment.failed",
291
- "payment.disputed",
292
278
  "capability.published",
293
279
  "capability.delisted",
294
280
  "execution.completed",
@@ -1328,6 +1314,7 @@ function parseListing(data) {
1328
1314
  price_value_minor: Number(data.price_value_minor ?? 0),
1329
1315
  currency: String(data.currency ?? "USD"),
1330
1316
  short_description: stringOrNull(data.short_description),
1317
+ description: stringOrNull(data.description),
1331
1318
  docs_url: stringOrNull(data.docs_url),
1332
1319
  support_contact: stringOrNull(data.support_contact),
1333
1320
  seller_display_name: stringOrNull(data.seller_display_name),
@@ -2406,50 +2393,6 @@ function parseMarketProposalActionResult(execution) {
2406
2393
  raw: { ...execution.raw }
2407
2394
  };
2408
2395
  }
2409
- function parseRefund(data) {
2410
- return {
2411
- refund_id: String(data.refund_id ?? data.id ?? ""),
2412
- receipt_id: String(data.receipt_id ?? ""),
2413
- owner_user_id: stringOrNull(data.owner_user_id) ?? void 0,
2414
- payment_mandate_id: stringOrNull(data.payment_mandate_id) ?? void 0,
2415
- usage_event_id: stringOrNull(data.usage_event_id) ?? void 0,
2416
- chain_receipt_id: stringOrNull(data.chain_receipt_id) ?? void 0,
2417
- amount_minor: Number(data.amount_minor ?? 0),
2418
- currency: String(data.currency ?? "USD"),
2419
- status: String(data.status ?? "issued"),
2420
- reason_code: String(data.reason_code ?? "customer-request"),
2421
- note: stringOrNull(data.note) ?? void 0,
2422
- idempotency_key: stringOrNull(data.idempotency_key) ?? void 0,
2423
- on_chain_tx_hash: stringOrNull(data.on_chain_tx_hash) ?? void 0,
2424
- metadata: toRecord(data.metadata),
2425
- idempotent_replay: Boolean(data.idempotent_replay ?? false),
2426
- created_at: stringOrNull(data.created_at) ?? void 0,
2427
- updated_at: stringOrNull(data.updated_at) ?? void 0,
2428
- raw: { ...data }
2429
- };
2430
- }
2431
- function parseDispute(data) {
2432
- return {
2433
- dispute_id: String(data.dispute_id ?? data.id ?? ""),
2434
- receipt_id: String(data.receipt_id ?? ""),
2435
- owner_user_id: stringOrNull(data.owner_user_id) ?? void 0,
2436
- payment_mandate_id: stringOrNull(data.payment_mandate_id) ?? void 0,
2437
- usage_event_id: stringOrNull(data.usage_event_id) ?? void 0,
2438
- external_dispute_id: stringOrNull(data.external_dispute_id) ?? void 0,
2439
- status: String(data.status ?? "open"),
2440
- reason_code: String(data.reason_code ?? "manual-review"),
2441
- description: stringOrNull(data.description) ?? void 0,
2442
- evidence: toRecord(data.evidence),
2443
- response_decision: stringOrNull(data.response_decision) ?? void 0,
2444
- response_note: stringOrNull(data.response_note) ?? void 0,
2445
- responded_at: stringOrNull(data.responded_at) ?? void 0,
2446
- metadata: toRecord(data.metadata),
2447
- idempotent_replay: Boolean(data.idempotent_replay ?? false),
2448
- created_at: stringOrNull(data.created_at) ?? void 0,
2449
- updated_at: stringOrNull(data.updated_at) ?? void 0,
2450
- raw: { ...data }
2451
- };
2452
- }
2453
2396
  function cloneJsonLike(value) {
2454
2397
  if (Array.isArray(value)) {
2455
2398
  return value.map((item) => cloneJsonLike(item));
@@ -2535,7 +2478,6 @@ var init_client = __esm({
2535
2478
  const manifestPayload = coerceMapping(manifest, "manifest");
2536
2479
  const toolManualPayload = coerceMapping(tool_manual, "tool_manual");
2537
2480
  const payload = {
2538
- i18n: buildDefaultI18n(manifestPayload),
2539
2481
  manifest: { ...manifestPayload },
2540
2482
  tool_manual: { ...toolManualPayload }
2541
2483
  };
@@ -2556,9 +2498,6 @@ var init_client = __esm({
2556
2498
  )
2557
2499
  } : coerceMapping(options.oauth_credentials, "oauth_credentials");
2558
2500
  }
2559
- if (options.metadata) {
2560
- payload.metadata = coerceMapping(options.metadata, "metadata");
2561
- }
2562
2501
  if (options.source_context) {
2563
2502
  payload.source_context = coerceMapping(options.source_context, "source_context");
2564
2503
  }
@@ -2570,6 +2509,7 @@ var init_client = __esm({
2570
2509
  "name",
2571
2510
  "job_to_be_done",
2572
2511
  "short_description",
2512
+ "description",
2573
2513
  "category",
2574
2514
  "docs_url",
2575
2515
  "documentation_url",
@@ -2582,13 +2522,18 @@ var init_client = __esm({
2582
2522
  "permission_class",
2583
2523
  "approval_mode",
2584
2524
  "dry_run_supported",
2585
- "required_connected_accounts"
2525
+ "required_connected_accounts",
2526
+ "permission_scopes",
2527
+ "compatibility_tags"
2586
2528
  ]) {
2587
2529
  const value = manifestPayload[fieldName];
2588
2530
  if (value !== void 0 && value !== null) {
2589
2531
  payload[fieldName] = value;
2590
2532
  }
2591
2533
  }
2534
+ if (payload.manifest && typeof payload.manifest === "object") {
2535
+ delete payload.manifest.version;
2536
+ }
2592
2537
  const docsUrl = String(manifestPayload.docs_url ?? manifestPayload.documentation_url ?? "").trim();
2593
2538
  const supportContact = String(manifestPayload.support_contact ?? "").trim();
2594
2539
  const sellerHomepageUrl = String(manifestPayload.seller_homepage_url ?? "").trim();
@@ -4203,105 +4148,6 @@ ${details}` : summary;
4203
4148
  fetchNext: next_cursor ? (cursor) => this.list_support_cases({ ...options, cursor }) : void 0
4204
4149
  });
4205
4150
  }
4206
- async issue_partial_refund(options) {
4207
- const receipt_id = String(options.receipt_id ?? "").trim();
4208
- const idempotency_key = String(options.idempotency_key ?? "").trim();
4209
- if (!receipt_id) {
4210
- throw new SiglumeClientError("receipt_id is required.");
4211
- }
4212
- if (!idempotency_key) {
4213
- throw new SiglumeClientError("idempotency_key is required.");
4214
- }
4215
- if (!Number.isFinite(options.amount_minor)) {
4216
- throw new SiglumeClientError("amount_minor must be a finite number.");
4217
- }
4218
- const amount_minor = Math.trunc(options.amount_minor);
4219
- if (amount_minor <= 0) {
4220
- throw new SiglumeClientError("amount_minor must be positive.");
4221
- }
4222
- if (typeof options.original_amount_minor === "number" && amount_minor > Math.trunc(options.original_amount_minor)) {
4223
- throw new SiglumeClientError("amount_minor cannot exceed the original receipt amount.");
4224
- }
4225
- const [data] = await this.request("POST", "/market/refunds", {
4226
- json_body: {
4227
- receipt_id,
4228
- amount_minor,
4229
- reason_code: options.reason ?? "customer-request",
4230
- note: options.note,
4231
- idempotency_key
4232
- }
4233
- });
4234
- return parseRefund(data);
4235
- }
4236
- async issue_full_refund(options) {
4237
- const receipt_id = String(options.receipt_id ?? "").trim();
4238
- if (!receipt_id) {
4239
- throw new SiglumeClientError("receipt_id is required.");
4240
- }
4241
- const provided_key = String(options.idempotency_key ?? "").trim();
4242
- const idempotency_key = provided_key || `full-refund:${receipt_id}`;
4243
- const [data] = await this.request("POST", "/market/refunds", {
4244
- json_body: {
4245
- receipt_id,
4246
- reason_code: options.reason ?? "customer-request",
4247
- note: options.note,
4248
- idempotency_key
4249
- }
4250
- });
4251
- return parseRefund(data);
4252
- }
4253
- async list_refunds(options = {}) {
4254
- const [data] = await this.requestAny("GET", "/market/refunds", {
4255
- params: {
4256
- receipt_id: options.receipt_id,
4257
- limit: Math.max(1, Math.min(Math.trunc(options.limit ?? 50), 100))
4258
- }
4259
- });
4260
- if (!Array.isArray(data)) {
4261
- throw new SiglumeClientError("Expected refunds to be returned as an array.");
4262
- }
4263
- return data.filter((item) => isRecord(item)).map(parseRefund);
4264
- }
4265
- async get_refund(refund_id) {
4266
- const [data] = await this.request("GET", `/market/refunds/${refund_id}`);
4267
- return parseRefund(data);
4268
- }
4269
- async get_refunds_for_receipt(receipt_id, options = {}) {
4270
- return this.list_refunds({ receipt_id, limit: options.limit });
4271
- }
4272
- async list_disputes(options = {}) {
4273
- const [data] = await this.requestAny("GET", "/market/disputes", {
4274
- params: {
4275
- receipt_id: options.receipt_id,
4276
- limit: Math.max(1, Math.min(Math.trunc(options.limit ?? 50), 100))
4277
- }
4278
- });
4279
- if (!Array.isArray(data)) {
4280
- throw new SiglumeClientError("Expected disputes to be returned as an array.");
4281
- }
4282
- return data.filter((item) => isRecord(item)).map(parseDispute);
4283
- }
4284
- async get_dispute(dispute_id) {
4285
- const [data] = await this.request("GET", `/market/disputes/${dispute_id}`);
4286
- return parseDispute(data);
4287
- }
4288
- async respond_to_dispute(options) {
4289
- const dispute_id = String(options.dispute_id ?? "").trim();
4290
- if (!dispute_id) {
4291
- throw new SiglumeClientError("dispute_id is required.");
4292
- }
4293
- if (!isRecord(options.evidence)) {
4294
- throw new SiglumeClientError("evidence must be an object.");
4295
- }
4296
- const [data] = await this.request("POST", `/market/disputes/${dispute_id}/respond`, {
4297
- json_body: {
4298
- response: options.response,
4299
- evidence: toRecord(options.evidence),
4300
- note: options.note
4301
- }
4302
- });
4303
- return parseDispute(data);
4304
- }
4305
4151
  async create_webhook_subscription(options) {
4306
4152
  const normalizedEventTypes = options.event_types.map((item) => String(item).trim()).filter((item) => item.length > 0);
4307
4153
  if (normalizedEventTypes.length === 0) {