shopline-mcp 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.
@@ -0,0 +1,4607 @@
1
+ export declare const toolSpecs: readonly [{
2
+ readonly module: "tools/addon_product_tools.py";
3
+ readonly name: "list_addon_products";
4
+ readonly write: false;
5
+ readonly description: "取得加購商品列表,支援依關鍵字搜尋。\n\n【用途】\n瀏覽或搜尋商店所有加購商品(Addon Products)設定,了解加購商品名稱、\n價格與庫存狀況。若提供搜尋關鍵字則呼叫搜尋端點,否則列出所有加購商品。\n適合分析加購策略與商品搭配情況。\n\n【呼叫的 Shopline API】\n- GET /v1/addon_products(無搜尋條件時)\n- GET /v1/addon_products/search(有搜尋條件時)\n\n【回傳結構】\ndict 含 total_found, returned, items[]。\n每筆包含 id, name, sku, price (TWD), quantity, status, created_at。";
6
+ readonly params: readonly [{
7
+ readonly name: "search_keyword";
8
+ readonly description: "搜尋關鍵字(加購商品名稱)";
9
+ readonly default: null;
10
+ readonly hasDefault: true;
11
+ readonly kind: "string";
12
+ readonly optional: true;
13
+ }, {
14
+ readonly name: "max_results";
15
+ readonly description: "最多回傳筆數";
16
+ readonly default: 50;
17
+ readonly hasDefault: true;
18
+ readonly kind: "integer";
19
+ readonly optional: false;
20
+ }];
21
+ readonly docEndpoints: readonly [{
22
+ readonly method: "GET";
23
+ readonly path: "/v1/addon_products";
24
+ }, {
25
+ readonly method: "GET";
26
+ readonly path: "/v1/addon_products/search";
27
+ }];
28
+ readonly operations: readonly [{
29
+ readonly kind: "api_get";
30
+ readonly method: "GET";
31
+ readonly endpointKey: "addon_products_search";
32
+ readonly params: "params";
33
+ }, {
34
+ readonly kind: "fetch_all_pages";
35
+ readonly method: "GET";
36
+ readonly endpointKey: "addon_products";
37
+ }];
38
+ readonly sourceLocation: {
39
+ readonly line: 16;
40
+ readonly endLine: 61;
41
+ };
42
+ }, {
43
+ readonly module: "tools/affiliate_tools.py";
44
+ readonly name: "list_affiliate_campaigns";
45
+ readonly write: false;
46
+ readonly description: "取得聯盟行銷活動列表。\n\n【用途】\n瀏覽商店所有聯盟行銷(Affiliate)活動,了解活動名稱、狀態與推廣條件。\n可取得 campaign_id 後進一步呼叫 get_affiliate_campaign_detail 或\nget_affiliate_campaign_usage 查詢詳細資訊與訂單使用統計。\n\n【呼叫的 Shopline API】\n- GET /v1/affiliate_campaigns\n\n【回傳結構】\ndict 含 total_found, returned, items[]。\n每筆包含 id, title, status, commission_type, commission_value, created_at。";
47
+ readonly params: readonly [{
48
+ readonly name: "max_results";
49
+ readonly description: "最多回傳筆數";
50
+ readonly default: 50;
51
+ readonly hasDefault: true;
52
+ readonly kind: "integer";
53
+ readonly optional: false;
54
+ }];
55
+ readonly docEndpoints: readonly [{
56
+ readonly method: "GET";
57
+ readonly path: "/v1/affiliate_campaigns";
58
+ }];
59
+ readonly operations: readonly [{
60
+ readonly kind: "fetch_all_pages";
61
+ readonly method: "GET";
62
+ readonly endpointKey: "affiliate_campaigns";
63
+ }];
64
+ readonly sourceLocation: {
65
+ readonly line: 16;
66
+ readonly endLine: 53;
67
+ };
68
+ }, {
69
+ readonly module: "tools/affiliate_tools.py";
70
+ readonly name: "get_affiliate_campaign_detail";
71
+ readonly write: false;
72
+ readonly description: "取得單一聯盟行銷活動的完整詳情。\n\n【用途】\n查詢特定聯盟行銷活動的佣金規則、適用範圍與推廣連結等完整資訊。\n適合在已知 campaign_id 的情況下取得所有欄位。\n\n【呼叫的 Shopline API】\n- GET /v1/affiliate_campaigns/{campaign_id}\n\n【回傳結構】\ndict 包含 id, title, status, commission_type, commission_value,\ntracking_code, start_at, end_at, created_at, updated_at 等完整欄位。";
73
+ readonly params: readonly [{
74
+ readonly name: "campaign_id";
75
+ readonly description: "聯盟行銷活動 ID(由 list_affiliate_campaigns 回傳的 id 欄位)";
76
+ readonly default: null;
77
+ readonly hasDefault: false;
78
+ readonly kind: "string";
79
+ readonly optional: false;
80
+ }];
81
+ readonly docEndpoints: readonly [{
82
+ readonly method: "GET";
83
+ readonly path: "/v1/affiliate_campaigns/{campaign_id}";
84
+ }];
85
+ readonly operations: readonly [{
86
+ readonly kind: "api_get";
87
+ readonly method: "GET";
88
+ readonly endpointKey: "affiliate_campaign_detail";
89
+ readonly path_params: "{'campaign_id': campaign_id}";
90
+ }];
91
+ readonly sourceLocation: {
92
+ readonly line: 57;
93
+ readonly endLine: 89;
94
+ };
95
+ }, {
96
+ readonly module: "tools/affiliate_tools.py";
97
+ readonly name: "get_affiliate_campaign_usage";
98
+ readonly write: false;
99
+ readonly description: "取得聯盟行銷活動的訂單使用統計。\n\n【用途】\n分析特定聯盟行銷活動帶來的訂單數與銷售額,評估推廣效果。\n回傳訂單使用紀錄,可計算總訂單數、總銷售額、佣金金額等。\n\n【呼叫的 Shopline API】\n- GET /v1/affiliate_campaigns/{campaign_id}/order_usage\n\n【回傳結構】\ndict 含 campaign_id, total_orders, total_revenue (TWD), items[]。\n每筆訂單包含 order_id, order_number, revenue, commission, created_at。";
100
+ readonly params: readonly [{
101
+ readonly name: "campaign_id";
102
+ readonly description: "聯盟行銷活動 ID(由 list_affiliate_campaigns 回傳的 id 欄位)";
103
+ readonly default: null;
104
+ readonly hasDefault: false;
105
+ readonly kind: "string";
106
+ readonly optional: false;
107
+ }];
108
+ readonly docEndpoints: readonly [{
109
+ readonly method: "GET";
110
+ readonly path: "/v1/affiliate_campaigns/{campaign_id}/order_usage";
111
+ }];
112
+ readonly operations: readonly [{
113
+ readonly kind: "api_get";
114
+ readonly method: "GET";
115
+ readonly endpointKey: "affiliate_campaign_order_usage";
116
+ readonly path_params: "{'campaign_id': campaign_id}";
117
+ }];
118
+ readonly sourceLocation: {
119
+ readonly line: 93;
120
+ readonly endLine: 134;
121
+ };
122
+ }, {
123
+ readonly module: "tools/agent_tools.py";
124
+ readonly name: "list_agents";
125
+ readonly write: false;
126
+ readonly description: "取得商店的代理人帳號清單。\n\n【用途】\n查看商店目前設定的代理人帳號,代理人通常用於\n客服、業務等特定角色的操作授權。適合確認代理人\n配置或了解有哪些外部帳號有商店操作權限。\n\n【呼叫的 Shopline API】\n- GET /v1/agents\n\n【回傳結構】\ndict 含 total, agents[]。\n每個 agent 包含 id, name, email, role,\nenabled, created_at 等。";
127
+ readonly params: readonly [];
128
+ readonly docEndpoints: readonly [{
129
+ readonly method: "GET";
130
+ readonly path: "/v1/agents";
131
+ }];
132
+ readonly operations: readonly [{
133
+ readonly kind: "api_get";
134
+ readonly method: "GET";
135
+ readonly endpointKey: "agents";
136
+ }];
137
+ readonly sourceLocation: {
138
+ readonly line: 13;
139
+ readonly endLine: 46;
140
+ };
141
+ }, {
142
+ readonly module: "tools/analytics_tools.py";
143
+ readonly name: "get_rfm_analysis";
144
+ readonly write: false;
145
+ readonly description: "根據訂單資料進行 RFM(Recency/Frequency/Monetary)分群分析。注意:僅能分析有下單紀錄的客戶(Customers API 為 403)。";
146
+ readonly params: readonly [{
147
+ readonly name: "start_date";
148
+ readonly description: "分析區間起始 YYYY-MM-DD";
149
+ readonly default: null;
150
+ readonly hasDefault: false;
151
+ readonly kind: "string";
152
+ readonly optional: false;
153
+ }, {
154
+ readonly name: "end_date";
155
+ readonly description: "分析區間結束 YYYY-MM-DD";
156
+ readonly default: null;
157
+ readonly hasDefault: false;
158
+ readonly kind: "string";
159
+ readonly optional: false;
160
+ }, {
161
+ readonly name: "r_days_threshold";
162
+ readonly description: "Recency 門檻天數(最近消費 ≤ 此值為高 R)";
163
+ readonly default: 30;
164
+ readonly hasDefault: true;
165
+ readonly kind: "integer";
166
+ readonly optional: false;
167
+ }, {
168
+ readonly name: "f_threshold";
169
+ readonly description: "Frequency 門檻(消費 ≥ 此值為高 F)";
170
+ readonly default: 2;
171
+ readonly hasDefault: true;
172
+ readonly kind: "integer";
173
+ readonly optional: false;
174
+ }, {
175
+ readonly name: "m_threshold";
176
+ readonly description: "Monetary 門檻金額(累計 ≥ 此值為高 M)";
177
+ readonly default: 5000;
178
+ readonly hasDefault: true;
179
+ readonly kind: "number";
180
+ readonly optional: false;
181
+ }];
182
+ readonly docEndpoints: readonly [];
183
+ readonly operations: readonly [{
184
+ readonly kind: "fetch_all_pages";
185
+ readonly method: "GET";
186
+ readonly endpointKey: "orders_search";
187
+ readonly params: "params";
188
+ }];
189
+ readonly sourceLocation: {
190
+ readonly line: 25;
191
+ readonly endLine: 112;
192
+ };
193
+ }, {
194
+ readonly module: "tools/analytics_tools.py";
195
+ readonly name: "get_repurchase_analysis";
196
+ readonly write: false;
197
+ readonly description: "分析客戶回購率與回購週期。計算新客 vs 舊客比例、回購率、平均回購天數。";
198
+ readonly params: readonly [{
199
+ readonly name: "start_date";
200
+ readonly description: "分析區間起始 YYYY-MM-DD";
201
+ readonly default: null;
202
+ readonly hasDefault: false;
203
+ readonly kind: "string";
204
+ readonly optional: false;
205
+ }, {
206
+ readonly name: "end_date";
207
+ readonly description: "分析區間結束 YYYY-MM-DD";
208
+ readonly default: null;
209
+ readonly hasDefault: false;
210
+ readonly kind: "string";
211
+ readonly optional: false;
212
+ }];
213
+ readonly docEndpoints: readonly [];
214
+ readonly operations: readonly [{
215
+ readonly kind: "fetch_all_pages";
216
+ readonly method: "GET";
217
+ readonly endpointKey: "orders_search";
218
+ readonly params: "params";
219
+ }];
220
+ readonly sourceLocation: {
221
+ readonly line: 119;
222
+ readonly endLine: 182;
223
+ };
224
+ }, {
225
+ readonly module: "tools/analytics_tools.py";
226
+ readonly name: "get_customer_geo_analysis";
227
+ readonly write: false;
228
+ readonly description: "根據訂單的收件地址分析客戶地區分佈(縣市層級)。";
229
+ readonly params: readonly [{
230
+ readonly name: "start_date";
231
+ readonly description: "分析區間起始 YYYY-MM-DD";
232
+ readonly default: null;
233
+ readonly hasDefault: false;
234
+ readonly kind: "string";
235
+ readonly optional: false;
236
+ }, {
237
+ readonly name: "end_date";
238
+ readonly description: "分析區間結束 YYYY-MM-DD";
239
+ readonly default: null;
240
+ readonly hasDefault: false;
241
+ readonly kind: "string";
242
+ readonly optional: false;
243
+ }, {
244
+ readonly name: "channel";
245
+ readonly description: "通路篩選";
246
+ readonly default: "all";
247
+ readonly hasDefault: true;
248
+ readonly kind: "enum";
249
+ readonly optional: false;
250
+ readonly enum: readonly ["online", "pos", "all"];
251
+ }];
252
+ readonly docEndpoints: readonly [];
253
+ readonly operations: readonly [{
254
+ readonly kind: "fetch_all_pages";
255
+ readonly method: "GET";
256
+ readonly endpointKey: "orders_search";
257
+ readonly params: "params";
258
+ }];
259
+ readonly sourceLocation: {
260
+ readonly line: 189;
261
+ readonly endLine: 236;
262
+ };
263
+ }, {
264
+ readonly module: "tools/analytics_tools.py";
265
+ readonly name: "get_inventory_turnover";
266
+ readonly write: false;
267
+ readonly description: "計算庫存周轉指標:周轉天數、周轉率。需要商品庫存 + 銷售數據。";
268
+ readonly params: readonly [{
269
+ readonly name: "start_date";
270
+ readonly description: "分析區間起始 YYYY-MM-DD";
271
+ readonly default: null;
272
+ readonly hasDefault: false;
273
+ readonly kind: "string";
274
+ readonly optional: false;
275
+ }, {
276
+ readonly name: "end_date";
277
+ readonly description: "分析區間結束 YYYY-MM-DD";
278
+ readonly default: null;
279
+ readonly hasDefault: false;
280
+ readonly kind: "string";
281
+ readonly optional: false;
282
+ }];
283
+ readonly docEndpoints: readonly [];
284
+ readonly operations: readonly [{
285
+ readonly kind: "fetch_all_pages";
286
+ readonly method: "GET";
287
+ readonly endpointKey: "products";
288
+ }, {
289
+ readonly kind: "fetch_all_pages";
290
+ readonly method: "GET";
291
+ readonly endpointKey: "orders_search";
292
+ readonly params: "params";
293
+ }];
294
+ readonly sourceLocation: {
295
+ readonly line: 243;
296
+ readonly endLine: 309;
297
+ };
298
+ }, {
299
+ readonly module: "tools/analytics_tools.py";
300
+ readonly name: "get_category_sales";
301
+ readonly write: false;
302
+ readonly description: "依商品分類(Category)彙總銷售數據:各分類的營業額、銷量、商品數。需交叉 Categories API + Products + Orders。";
303
+ readonly params: readonly [{
304
+ readonly name: "start_date";
305
+ readonly description: "起始日期 YYYY-MM-DD";
306
+ readonly default: null;
307
+ readonly hasDefault: false;
308
+ readonly kind: "string";
309
+ readonly optional: false;
310
+ }, {
311
+ readonly name: "end_date";
312
+ readonly description: "結束日期 YYYY-MM-DD";
313
+ readonly default: null;
314
+ readonly hasDefault: false;
315
+ readonly kind: "string";
316
+ readonly optional: false;
317
+ }, {
318
+ readonly name: "channel";
319
+ readonly description: "通路篩選";
320
+ readonly default: "all";
321
+ readonly hasDefault: true;
322
+ readonly kind: "enum";
323
+ readonly optional: false;
324
+ readonly enum: readonly ["online", "pos", "all"];
325
+ }];
326
+ readonly docEndpoints: readonly [];
327
+ readonly operations: readonly [{
328
+ readonly kind: "api_get";
329
+ readonly method: "GET";
330
+ readonly endpointKey: "categories";
331
+ readonly params: "{'per_page': 50}";
332
+ }, {
333
+ readonly kind: "fetch_all_pages";
334
+ readonly method: "GET";
335
+ readonly endpointKey: "products";
336
+ }, {
337
+ readonly kind: "fetch_all_pages";
338
+ readonly method: "GET";
339
+ readonly endpointKey: "orders_search";
340
+ readonly params: "params";
341
+ }];
342
+ readonly sourceLocation: {
343
+ readonly line: 316;
344
+ readonly endLine: 411;
345
+ };
346
+ }, {
347
+ readonly module: "tools/analytics_tools.py";
348
+ readonly name: "get_promotion_analysis";
349
+ readonly write: false;
350
+ readonly description: "分析促銷活動效果:各活動的使用次數、折扣類型、狀態分佈。可搭配銷售數據評估促銷 ROI。";
351
+ readonly params: readonly [{
352
+ readonly name: "status";
353
+ readonly description: "活動狀態篩選";
354
+ readonly default: "all";
355
+ readonly hasDefault: true;
356
+ readonly kind: "enum";
357
+ readonly optional: false;
358
+ readonly enum: readonly ["active", "inactive", "hidden", "all"];
359
+ }, {
360
+ readonly name: "discount_type";
361
+ readonly description: "折扣類型篩選(amount/percentage/free_shipping/addon)";
362
+ readonly default: null;
363
+ readonly hasDefault: true;
364
+ readonly kind: "string";
365
+ readonly optional: true;
366
+ }];
367
+ readonly docEndpoints: readonly [];
368
+ readonly operations: readonly [{
369
+ readonly kind: "fetch_all_pages";
370
+ readonly method: "GET";
371
+ readonly endpointKey: "promotions";
372
+ }];
373
+ readonly sourceLocation: {
374
+ readonly line: 418;
375
+ readonly endLine: 474;
376
+ };
377
+ }, {
378
+ readonly module: "tools/analytics_tools.py";
379
+ readonly name: "get_refund_by_store";
380
+ readonly write: false;
381
+ readonly description: "依門市/通路分析退貨退款分佈。\n\n【用途】取得指定時間區間內的退貨單,並依關聯訂單的門市/通路分群,\n計算各門市的退貨筆數、退款金額、最常被退貨的商品,協助評估各通路退貨狀況。\n【呼叫的 Shopline API】\n- GET /v1/return_orders(退貨單列表)\n- GET /v1/orders/{order_id}(取得關聯訂單的通路資訊)\n【回傳結構】dict 含 period、total_return_orders、stores(各門市退貨統計)。";
382
+ readonly params: readonly [{
383
+ readonly name: "start_date";
384
+ readonly description: "起始日期 YYYY-MM-DD";
385
+ readonly default: null;
386
+ readonly hasDefault: false;
387
+ readonly kind: "string";
388
+ readonly optional: false;
389
+ }, {
390
+ readonly name: "end_date";
391
+ readonly description: "結束日期 YYYY-MM-DD";
392
+ readonly default: null;
393
+ readonly hasDefault: false;
394
+ readonly kind: "string";
395
+ readonly optional: false;
396
+ }];
397
+ readonly docEndpoints: readonly [{
398
+ readonly method: "GET";
399
+ readonly path: "/v1/return_orders";
400
+ }, {
401
+ readonly method: "GET";
402
+ readonly path: "/v1/orders/{order_id}";
403
+ }];
404
+ readonly operations: readonly [{
405
+ readonly kind: "fetch_all_pages";
406
+ readonly method: "GET";
407
+ readonly endpointKey: "return_orders";
408
+ readonly params: "params";
409
+ }, {
410
+ readonly kind: "api_get";
411
+ readonly method: "GET";
412
+ readonly endpointKey: "order_detail";
413
+ readonly path_params: "{'order_id': oid}";
414
+ }];
415
+ readonly sourceLocation: {
416
+ readonly line: 481;
417
+ readonly endLine: 563;
418
+ };
419
+ }, {
420
+ readonly module: "tools/analytics_tools.py";
421
+ readonly name: "get_stock_transfer_suggestions";
422
+ readonly write: false;
423
+ readonly description: "自動產生跨倉庫庫存調撥建議。\n\n【用途】逐商品查詢各倉庫庫存,若同商品在不同倉庫之間的庫存差距過大\n(差值 >= min_stock_diff),則建議從庫存多的倉庫調撥到庫存少的倉庫。\n僅分析前 30 個商品以避免 API 速率限制。\n【呼叫的 Shopline API】\n- GET /v1/products(商品列表)\n- GET /v1/products/{product_id}/stocks(各倉庫庫存)\n- GET /v1/warehouses(倉庫名稱對照)\n【回傳結構】dict 含 products_analyzed、suggestions_count、suggestions 列表。";
424
+ readonly params: readonly [{
425
+ readonly name: "min_stock_diff";
426
+ readonly description: "倉庫間庫存差距門檻,差距 >= 此值才建議調撥";
427
+ readonly default: 10;
428
+ readonly hasDefault: true;
429
+ readonly kind: "integer";
430
+ readonly optional: false;
431
+ }];
432
+ readonly docEndpoints: readonly [{
433
+ readonly method: "GET";
434
+ readonly path: "/v1/products";
435
+ }, {
436
+ readonly method: "GET";
437
+ readonly path: "/v1/products/{product_id}/stocks";
438
+ }, {
439
+ readonly method: "GET";
440
+ readonly path: "/v1/warehouses";
441
+ }];
442
+ readonly operations: readonly [{
443
+ readonly kind: "api_get";
444
+ readonly method: "GET";
445
+ readonly endpointKey: "warehouses";
446
+ readonly params: "{'per_page': 50}";
447
+ }, {
448
+ readonly kind: "fetch_all_pages";
449
+ readonly method: "GET";
450
+ readonly endpointKey: "products";
451
+ }, {
452
+ readonly kind: "api_get";
453
+ readonly method: "GET";
454
+ readonly endpointKey: "product_stocks";
455
+ readonly path_params: "{'product_id': pid}";
456
+ }];
457
+ readonly sourceLocation: {
458
+ readonly line: 570;
459
+ readonly endLine: 651;
460
+ };
461
+ }, {
462
+ readonly module: "tools/analytics_tools.py";
463
+ readonly name: "get_promotion_roi";
464
+ readonly write: false;
465
+ readonly description: "交叉比對促銷活動與銷售數據,計算各活動的 ROI。\n\n【用途】取得指定時間區間內活躍的促銷活動,並比對訂單中的 promotion_items,\n統計每個活動帶來的訂單數、營業額、折扣金額,計算平均每單折扣與折扣占比。\n【呼叫的 Shopline API】\n- GET /v1/promotions(促銷活動列表)\n- GET /v1/orders/search(訂單查詢)\n【回傳結構】dict 含 period、total_promotions、promotions(各活動 ROI 明細)。";
466
+ readonly params: readonly [{
467
+ readonly name: "start_date";
468
+ readonly description: "起始日期 YYYY-MM-DD";
469
+ readonly default: null;
470
+ readonly hasDefault: false;
471
+ readonly kind: "string";
472
+ readonly optional: false;
473
+ }, {
474
+ readonly name: "end_date";
475
+ readonly description: "結束日期 YYYY-MM-DD";
476
+ readonly default: null;
477
+ readonly hasDefault: false;
478
+ readonly kind: "string";
479
+ readonly optional: false;
480
+ }];
481
+ readonly docEndpoints: readonly [{
482
+ readonly method: "GET";
483
+ readonly path: "/v1/promotions";
484
+ }, {
485
+ readonly method: "GET";
486
+ readonly path: "/v1/orders/search";
487
+ }];
488
+ readonly operations: readonly [{
489
+ readonly kind: "fetch_all_pages";
490
+ readonly method: "GET";
491
+ readonly endpointKey: "promotions";
492
+ }, {
493
+ readonly kind: "fetch_all_pages";
494
+ readonly method: "GET";
495
+ readonly endpointKey: "orders_search";
496
+ readonly params: "params";
497
+ }];
498
+ readonly sourceLocation: {
499
+ readonly line: 658;
500
+ readonly endLine: 760;
501
+ };
502
+ }, {
503
+ readonly module: "tools/analytics_tools.py";
504
+ readonly name: "get_customer_lifecycle";
505
+ readonly write: false;
506
+ readonly description: "比較兩個時間區間的 RFM 分群遷移,分析客戶生命週期變化。\n\n【用途】分別計算兩個時段的客戶 RFM 分群,然後比較客戶在兩期之間的分群遷移,\n找出升級(segment 改善)、流失(segment 退步)、新增、消失的客戶,\n產出分群遷移矩陣,協助制定客戶經營策略。\n【呼叫的 Shopline API】\n- GET /v1/orders/search(兩個時段各查詢一次)\n【回傳結構】dict 含 period1、period2、segment_migration、upgrade_count、churn_count、new_count、lost_count。";
507
+ readonly params: readonly [{
508
+ readonly name: "period1_start";
509
+ readonly description: "第一期起始日期 YYYY-MM-DD";
510
+ readonly default: null;
511
+ readonly hasDefault: false;
512
+ readonly kind: "string";
513
+ readonly optional: false;
514
+ }, {
515
+ readonly name: "period1_end";
516
+ readonly description: "第一期結束日期 YYYY-MM-DD";
517
+ readonly default: null;
518
+ readonly hasDefault: false;
519
+ readonly kind: "string";
520
+ readonly optional: false;
521
+ }, {
522
+ readonly name: "period2_start";
523
+ readonly description: "第二期起始日期 YYYY-MM-DD";
524
+ readonly default: null;
525
+ readonly hasDefault: false;
526
+ readonly kind: "string";
527
+ readonly optional: false;
528
+ }, {
529
+ readonly name: "period2_end";
530
+ readonly description: "第二期結束日期 YYYY-MM-DD";
531
+ readonly default: null;
532
+ readonly hasDefault: false;
533
+ readonly kind: "string";
534
+ readonly optional: false;
535
+ }, {
536
+ readonly name: "r_days";
537
+ readonly description: "Recency 門檻天數(最近消費 ≤ 此值為高 R)";
538
+ readonly default: 30;
539
+ readonly hasDefault: true;
540
+ readonly kind: "integer";
541
+ readonly optional: false;
542
+ }, {
543
+ readonly name: "f_threshold";
544
+ readonly description: "Frequency 門檻(消費 ≥ 此值為高 F)";
545
+ readonly default: 2;
546
+ readonly hasDefault: true;
547
+ readonly kind: "integer";
548
+ readonly optional: false;
549
+ }, {
550
+ readonly name: "m_threshold";
551
+ readonly description: "Monetary 門檻金額(累計 ≥ 此值為高 M)";
552
+ readonly default: 5000;
553
+ readonly hasDefault: true;
554
+ readonly kind: "number";
555
+ readonly optional: false;
556
+ }];
557
+ readonly docEndpoints: readonly [{
558
+ readonly method: "GET";
559
+ readonly path: "/v1/orders/search";
560
+ }];
561
+ readonly operations: readonly [{
562
+ readonly kind: "fetch_all_pages";
563
+ readonly method: "GET";
564
+ readonly endpointKey: "orders_search";
565
+ readonly params: "params";
566
+ }];
567
+ readonly sourceLocation: {
568
+ readonly line: 767;
569
+ readonly endLine: 934;
570
+ };
571
+ }, {
572
+ readonly module: "tools/analytics_tools.py";
573
+ readonly name: "get_slow_movers";
574
+ readonly write: false;
575
+ readonly description: "找出庫存高但銷量低的滯銷商品。\n\n【用途】交叉比對商品庫存與銷售數據,計算每個商品的日均銷量與可售天數(days_of_supply),\n標記 days_of_supply 超過門檻或零銷售的商品為滯銷品,協助清倉決策。\n【呼叫的 Shopline API】\n- GET /v1/products(商品列表含庫存)\n- GET /v1/orders/search(銷售數據)\n【回傳結構】dict 含 period、period_days、total_products、slow_movers(滯銷商品列表)。";
576
+ readonly params: readonly [{
577
+ readonly name: "start_date";
578
+ readonly description: "分析區間起始 YYYY-MM-DD";
579
+ readonly default: null;
580
+ readonly hasDefault: false;
581
+ readonly kind: "string";
582
+ readonly optional: false;
583
+ }, {
584
+ readonly name: "end_date";
585
+ readonly description: "分析區間結束 YYYY-MM-DD";
586
+ readonly default: null;
587
+ readonly hasDefault: false;
588
+ readonly kind: "string";
589
+ readonly optional: false;
590
+ }, {
591
+ readonly name: "days_threshold";
592
+ readonly description: "可售天數門檻,超過此值視為滯銷";
593
+ readonly default: 30;
594
+ readonly hasDefault: true;
595
+ readonly kind: "integer";
596
+ readonly optional: false;
597
+ }];
598
+ readonly docEndpoints: readonly [{
599
+ readonly method: "GET";
600
+ readonly path: "/v1/products";
601
+ }, {
602
+ readonly method: "GET";
603
+ readonly path: "/v1/orders/search";
604
+ }];
605
+ readonly operations: readonly [{
606
+ readonly kind: "fetch_all_pages";
607
+ readonly method: "GET";
608
+ readonly endpointKey: "products";
609
+ }, {
610
+ readonly kind: "fetch_all_pages";
611
+ readonly method: "GET";
612
+ readonly endpointKey: "orders_search";
613
+ readonly params: "params";
614
+ }];
615
+ readonly sourceLocation: {
616
+ readonly line: 941;
617
+ readonly endLine: 1036;
618
+ };
619
+ }, {
620
+ readonly module: "tools/category_tools.py";
621
+ readonly name: "get_category_tree";
622
+ readonly write: false;
623
+ readonly description: "取得所有商品分類並組成樹狀結構。\n\n【用途】\n瀏覽商店的完整分類層級,了解分類架構與父子關係。\n可用於確認分類 ID、名稱,再搭配 get_category_detail 取得個別分類詳情,\n或搭配商品工具按分類篩選商品。\n\n【呼叫的 Shopline API】\n- GET /v1/categories\n\n【回傳結構】\ndict 含 total, tree[](樹狀), flat[](扁平列表)。\n每個節點包含 id, name, parent_id, children[](僅在 tree 中)。";
624
+ readonly params: readonly [];
625
+ readonly docEndpoints: readonly [{
626
+ readonly method: "GET";
627
+ readonly path: "/v1/categories";
628
+ }];
629
+ readonly operations: readonly [{
630
+ readonly kind: "fetch_all_pages";
631
+ readonly method: "GET";
632
+ readonly endpointKey: "categories";
633
+ }];
634
+ readonly sourceLocation: {
635
+ readonly line: 16;
636
+ readonly endLine: 58;
637
+ };
638
+ }, {
639
+ readonly module: "tools/category_tools.py";
640
+ readonly name: "get_category_detail";
641
+ readonly write: false;
642
+ readonly description: "取得單一商品分類的完整詳情。\n\n【用途】\n查詢特定分類的名稱、描述、父分類等完整資訊。\n適合在已知分類 ID 的情況下取得詳細欄位。\n\n【呼叫的 Shopline API】\n- GET /v1/categories/{category_id}\n\n【回傳結構】\ndict 包含 id, name, parent_id, description, position, created_at, updated_at。";
643
+ readonly params: readonly [{
644
+ readonly name: "category_id";
645
+ readonly description: "分類 ID(由 get_category_tree 回傳的 id 欄位)";
646
+ readonly default: null;
647
+ readonly hasDefault: false;
648
+ readonly kind: "string";
649
+ readonly optional: false;
650
+ }];
651
+ readonly docEndpoints: readonly [{
652
+ readonly method: "GET";
653
+ readonly path: "/v1/categories/{category_id}";
654
+ }];
655
+ readonly operations: readonly [{
656
+ readonly kind: "api_get";
657
+ readonly method: "GET";
658
+ readonly endpointKey: "category_detail";
659
+ readonly path_params: "{'category_id': category_id}";
660
+ }];
661
+ readonly sourceLocation: {
662
+ readonly line: 62;
663
+ readonly endLine: 89;
664
+ };
665
+ }, {
666
+ readonly module: "tools/channel_tools.py";
667
+ readonly name: "list_channels";
668
+ readonly write: false;
669
+ readonly description: "取得商店所有銷售渠道清單。\n\n【用途】\n查看商店目前開啟的銷售渠道,例如線上商店、POS、\nFacebook、Instagram 等。適合了解多渠道銷售佈局,\n或做渠道業績分析前的渠道資料確認。\n\n注意:此端點在部分 token 權限下可能回傳 403 或 422,\n渠道資訊亦可從訂單的 channel.created_by_channel_name\n欄位取得。\n\n【呼叫的 Shopline API】\n- GET /v1/channels\n\n【回傳結構】\ndict 含 total, channels[]。\n每個 channel 包含 id, name, channel_type, enabled,\ncreated_at 等。";
670
+ readonly params: readonly [];
671
+ readonly docEndpoints: readonly [{
672
+ readonly method: "GET";
673
+ readonly path: "/v1/channels";
674
+ }];
675
+ readonly operations: readonly [{
676
+ readonly kind: "api_get";
677
+ readonly method: "GET";
678
+ readonly endpointKey: "channels";
679
+ }];
680
+ readonly sourceLocation: {
681
+ readonly line: 13;
682
+ readonly endLine: 49;
683
+ };
684
+ }, {
685
+ readonly module: "tools/channel_tools.py";
686
+ readonly name: "get_channel_detail";
687
+ readonly write: false;
688
+ readonly description: "取得指定銷售渠道的詳細資訊。\n\n【用途】\n查詢單一銷售渠道的完整設定,包含渠道類型、狀態、\n連結設定等。適合確認特定渠道的詳細配置。\n\n注意:此端點在部分 token 權限下可能回傳 403 或 422。\n\n【呼叫的 Shopline API】\n- GET /v1/channels/{channel_id}\n\n【回傳結構】\ndict 含渠道詳細欄位:id, name, channel_type, enabled,\ncreated_at, updated_at 等。";
689
+ readonly params: readonly [{
690
+ readonly name: "channel_id";
691
+ readonly description: "";
692
+ readonly default: null;
693
+ readonly hasDefault: false;
694
+ readonly kind: "string";
695
+ readonly optional: false;
696
+ }];
697
+ readonly docEndpoints: readonly [{
698
+ readonly method: "GET";
699
+ readonly path: "/v1/channels/{channel_id}";
700
+ }];
701
+ readonly operations: readonly [{
702
+ readonly kind: "api_get";
703
+ readonly method: "GET";
704
+ readonly endpointKey: "channel_detail";
705
+ readonly path_params: "{'channel_id': channel_id}";
706
+ }];
707
+ readonly sourceLocation: {
708
+ readonly line: 53;
709
+ readonly endLine: 79;
710
+ };
711
+ }, {
712
+ readonly module: "tools/conversation_tools.py";
713
+ readonly name: "list_conversations";
714
+ readonly write: false;
715
+ readonly description: "取得客服對話列表。\n\n【用途】\n瀏覽所有客服對話的摘要清單,了解目前進行中或歷史的客服溝通狀況。\n可依此清單篩選需要進一步查閱訊息內容的對話,再用 get_conversation_messages\n取得完整聊天記錄。\n\n【呼叫的 Shopline API】\n- GET /v1/conversations\n\n【回傳結構】\ndict 含 total_found, returned, conversations[]。\n每個 conversation 包含 id, platform(通訊平台), status(對話狀態),\ncreated_at。";
716
+ readonly params: readonly [{
717
+ readonly name: "max_results";
718
+ readonly description: "最多回傳筆數";
719
+ readonly default: 50;
720
+ readonly hasDefault: true;
721
+ readonly kind: "integer";
722
+ readonly optional: false;
723
+ }];
724
+ readonly docEndpoints: readonly [{
725
+ readonly method: "GET";
726
+ readonly path: "/v1/conversations";
727
+ }];
728
+ readonly operations: readonly [{
729
+ readonly kind: "fetch_all_pages";
730
+ readonly method: "GET";
731
+ readonly endpointKey: "conversations";
732
+ }];
733
+ readonly sourceLocation: {
734
+ readonly line: 16;
735
+ readonly endLine: 50;
736
+ };
737
+ }, {
738
+ readonly module: "tools/conversation_tools.py";
739
+ readonly name: "get_conversation_messages";
740
+ readonly write: false;
741
+ readonly description: "取得指定對話的完整訊息記錄。\n\n【用途】\n查閱特定客服對話的所有聊天訊息,適用於了解客戶問題脈絡、審核客服回應品質,\n或追蹤訂單相關諮詢的處理進度。對話 ID 從 list_conversations 取得。\n\n【呼叫的 Shopline API】\n- GET /v1/conversations/{conversation_id}/messages\n\n【回傳結構】\ndict 含 conversation_id, total_found, returned, messages[]。\n每個 message 包含 id, sender_type(發送者類型:customer/staff),\ncontent(訊息內容), message_type, created_at。";
742
+ readonly params: readonly [{
743
+ readonly name: "conversation_id";
744
+ readonly description: "對話 ID(由 list_conversations 回傳的 id 欄位)";
745
+ readonly default: null;
746
+ readonly hasDefault: false;
747
+ readonly kind: "string";
748
+ readonly optional: false;
749
+ }, {
750
+ readonly name: "max_results";
751
+ readonly description: "最多回傳訊息筆數";
752
+ readonly default: 50;
753
+ readonly hasDefault: true;
754
+ readonly kind: "integer";
755
+ readonly optional: false;
756
+ }];
757
+ readonly docEndpoints: readonly [{
758
+ readonly method: "GET";
759
+ readonly path: "/v1/conversations/{conversation_id}/messages";
760
+ }];
761
+ readonly operations: readonly [{
762
+ readonly kind: "fetch_all_pages";
763
+ readonly method: "GET";
764
+ readonly endpointKey: "conversation_messages";
765
+ readonly path_params: "path_params";
766
+ }];
767
+ readonly sourceLocation: {
768
+ readonly line: 54;
769
+ readonly endLine: 95;
770
+ };
771
+ }, {
772
+ readonly module: "tools/custom_field_tools.py";
773
+ readonly name: "list_custom_fields";
774
+ readonly write: false;
775
+ readonly description: "取得商店定義的客戶自訂欄位清單。\n\n【用途】\n查看商店在客戶資料上設定了哪些額外自訂欄位(如生日、偏好、備註等)。\n用於了解客戶資料結構或分析資料完整度。\n\n【呼叫的 Shopline API】\n- GET /v1/custom_fields\n\n【回傳結構】\ndict 含 total, fields[]。\n每個 field 包含 id, name, type, options 等。";
776
+ readonly params: readonly [];
777
+ readonly docEndpoints: readonly [{
778
+ readonly method: "GET";
779
+ readonly path: "/v1/custom_fields";
780
+ }];
781
+ readonly operations: readonly [{
782
+ readonly kind: "api_get";
783
+ readonly method: "GET";
784
+ readonly endpointKey: "custom_fields";
785
+ }];
786
+ readonly sourceLocation: {
787
+ readonly line: 13;
788
+ readonly endLine: 44;
789
+ };
790
+ }, {
791
+ readonly module: "tools/customer_group_tools.py";
792
+ readonly name: "list_customer_groups";
793
+ readonly write: false;
794
+ readonly description: "取得客戶群組列表,支援依名稱搜尋。\n\n【用途】\n瀏覽或搜尋已建立的客戶群組(分群)。可用於確認客戶標籤分群策略、\n取得群組 ID 後進一步查詢群組成員。\n\n【呼叫的 Shopline API】\n- GET /v1/customer-groups(無搜尋條件時)\n- GET /v1/customer-groups/search(有搜尋條件時)\n\n【回傳結構】\ndict 含 total_found, returned, groups[]。\n每個 group 包含 id, name, customers_count, created_at。";
795
+ readonly params: readonly [{
796
+ readonly name: "search_keyword";
797
+ readonly description: "群組名稱搜尋關鍵字";
798
+ readonly default: null;
799
+ readonly hasDefault: true;
800
+ readonly kind: "string";
801
+ readonly optional: true;
802
+ }, {
803
+ readonly name: "max_results";
804
+ readonly description: "最多回傳筆數";
805
+ readonly default: 50;
806
+ readonly hasDefault: true;
807
+ readonly kind: "integer";
808
+ readonly optional: false;
809
+ }];
810
+ readonly docEndpoints: readonly [{
811
+ readonly method: "GET";
812
+ readonly path: "/v1/customer-groups";
813
+ }, {
814
+ readonly method: "GET";
815
+ readonly path: "/v1/customer-groups/search";
816
+ }];
817
+ readonly operations: readonly [{
818
+ readonly kind: "api_get";
819
+ readonly method: "GET";
820
+ readonly endpointKey: "customer_groups_search";
821
+ readonly params: "params";
822
+ }, {
823
+ readonly kind: "fetch_all_pages";
824
+ readonly method: "GET";
825
+ readonly endpointKey: "customer_groups";
826
+ }];
827
+ readonly sourceLocation: {
828
+ readonly line: 16;
829
+ readonly endLine: 56;
830
+ };
831
+ }, {
832
+ readonly module: "tools/customer_group_tools.py";
833
+ readonly name: "get_customer_group_members";
834
+ readonly write: false;
835
+ readonly description: "取得指定客戶群組中的所有客戶 ID 列表。\n\n【用途】\n查詢特定群組包含哪些客戶。回傳客戶 ID 列表,可搭配 get_customer_profile 取得個別客戶詳情。\n\n【呼叫的 Shopline API】\n- GET /v1/customer-groups/{group_id}/customers\n\n【回傳結構】\ndict 含 group_id, total_members, customer_ids[]。";
836
+ readonly params: readonly [{
837
+ readonly name: "group_id";
838
+ readonly description: "客戶群組 ID(由 list_customer_groups 回傳)";
839
+ readonly default: null;
840
+ readonly hasDefault: false;
841
+ readonly kind: "string";
842
+ readonly optional: false;
843
+ }];
844
+ readonly docEndpoints: readonly [{
845
+ readonly method: "GET";
846
+ readonly path: "/v1/customer-groups/{group_id}/customers";
847
+ }];
848
+ readonly operations: readonly [{
849
+ readonly kind: "api_get";
850
+ readonly method: "GET";
851
+ readonly endpointKey: "customer_group_customers";
852
+ readonly path_params: "{'group_id': group_id}";
853
+ }];
854
+ readonly sourceLocation: {
855
+ readonly line: 60;
856
+ readonly endLine: 81;
857
+ };
858
+ }, {
859
+ readonly module: "tools/customer_tools.py";
860
+ readonly name: "list_customers";
861
+ readonly write: false;
862
+ readonly description: "取得客戶列表,支援依關鍵字搜尋客戶。\n\n【用途】\n查詢特定客戶或瀏覽客戶清單。可用姓名、email、電話搜尋。\n若要取得單一客戶的完整資訊(含儲值金、點數、等級),請改用 get_customer_profile。\n\n【呼叫的 Shopline API】\n- GET /v1/customers(無搜尋條件時)\n- GET /v1/customers/search(有搜尋條件時)\n\n【回傳結構】\ndict 含 total_found, returned, customers[]。\n每個 customer 包含 id, name, email, phone, tags, created_at。";
863
+ readonly params: readonly [{
864
+ readonly name: "search_keyword";
865
+ readonly description: "搜尋關鍵字(姓名、email、電話)";
866
+ readonly default: null;
867
+ readonly hasDefault: true;
868
+ readonly kind: "string";
869
+ readonly optional: true;
870
+ }, {
871
+ readonly name: "max_results";
872
+ readonly description: "最多回傳筆數";
873
+ readonly default: 50;
874
+ readonly hasDefault: true;
875
+ readonly kind: "integer";
876
+ readonly optional: false;
877
+ }];
878
+ readonly docEndpoints: readonly [{
879
+ readonly method: "GET";
880
+ readonly path: "/v1/customers";
881
+ }, {
882
+ readonly method: "GET";
883
+ readonly path: "/v1/customers/search";
884
+ }];
885
+ readonly operations: readonly [{
886
+ readonly kind: "api_get";
887
+ readonly method: "GET";
888
+ readonly endpointKey: "customers_search";
889
+ readonly params: "params";
890
+ }, {
891
+ readonly kind: "fetch_all_pages";
892
+ readonly method: "GET";
893
+ readonly endpointKey: "customers";
894
+ }];
895
+ readonly sourceLocation: {
896
+ readonly line: 18;
897
+ readonly endLine: 64;
898
+ };
899
+ }, {
900
+ readonly module: "tools/customer_tools.py";
901
+ readonly name: "get_customer_profile";
902
+ readonly write: false;
903
+ readonly description: "取得單一客戶的完整輪廓(基本資料 + 儲值金紀錄 + 會員點數 + 會員等級變動 + 優惠券)。\n\n【用途】\n回答「這位客戶是誰、消費狀況、會員狀態」等完整客戶概況問題。適合客服\n場景或個別會員分析。若要批次分析客戶行為請改用 get_rfm_analysis。\n\n【呼叫的 Shopline API】\n- GET /v1/customers/{customer_id}\n- GET /v1/customers/{customer_id}/store-credit-history\n- GET /v1/customers/{customer_id}/member-points\n- GET /v1/customers/{customer_id}/membership-tier-history\n- GET /v1/customers/{customer_id}/promotions\n\n【回傳結構】\ndict 包含 profile / store_credits / member_points / tier_history / promotions 五大區塊。\n金額皆為 float (TWD)。";
904
+ readonly params: readonly [{
905
+ readonly name: "customer_id";
906
+ readonly description: "客戶內部 ID(由 list_customers 回傳的 id 欄位)";
907
+ readonly default: null;
908
+ readonly hasDefault: false;
909
+ readonly kind: "string";
910
+ readonly optional: false;
911
+ }];
912
+ readonly docEndpoints: readonly [{
913
+ readonly method: "GET";
914
+ readonly path: "/v1/customers/{customer_id}";
915
+ }, {
916
+ readonly method: "GET";
917
+ readonly path: "/v1/customers/{customer_id}/store-credit-history";
918
+ }, {
919
+ readonly method: "GET";
920
+ readonly path: "/v1/customers/{customer_id}/member-points";
921
+ }, {
922
+ readonly method: "GET";
923
+ readonly path: "/v1/customers/{customer_id}/membership-tier-history";
924
+ }, {
925
+ readonly method: "GET";
926
+ readonly path: "/v1/customers/{customer_id}/promotions";
927
+ }];
928
+ readonly operations: readonly [{
929
+ readonly kind: "api_get";
930
+ readonly method: "GET";
931
+ readonly endpointKey: "customer_detail";
932
+ readonly path_params: "path_params";
933
+ }, {
934
+ readonly kind: "api_get";
935
+ readonly method: "GET";
936
+ readonly endpointKey: "customer_store_credit_history";
937
+ readonly path_params: "path_params";
938
+ }, {
939
+ readonly kind: "api_get";
940
+ readonly method: "GET";
941
+ readonly endpointKey: "customer_member_points";
942
+ readonly path_params: "path_params";
943
+ }, {
944
+ readonly kind: "api_get";
945
+ readonly method: "GET";
946
+ readonly endpointKey: "customer_membership_tier_history";
947
+ readonly path_params: "path_params";
948
+ }, {
949
+ readonly kind: "api_get";
950
+ readonly method: "GET";
951
+ readonly endpointKey: "customer_promotions";
952
+ readonly path_params: "path_params";
953
+ }];
954
+ readonly sourceLocation: {
955
+ readonly line: 68;
956
+ readonly endLine: 168;
957
+ };
958
+ }, {
959
+ readonly module: "tools/delivery_option_tools.py";
960
+ readonly name: "list_delivery_options";
961
+ readonly write: false;
962
+ readonly description: "取得商店啟用的配送方式清單。\n\n【用途】\n查看商店目前設定的所有配送方式,例如宅配、超商取貨、\n門市自取等。適合確認可用配送渠道或分析訂單配送偏好。\n\n【呼叫的 Shopline API】\n- GET /v1/delivery_options\n\n【回傳結構】\ndict 含 total, delivery_options[]。\n每個 delivery_option 包含 id, name, delivery_type,\nenabled, position, price, created_at 等。";
963
+ readonly params: readonly [];
964
+ readonly docEndpoints: readonly [{
965
+ readonly method: "GET";
966
+ readonly path: "/v1/delivery_options";
967
+ }];
968
+ readonly operations: readonly [{
969
+ readonly kind: "api_get";
970
+ readonly method: "GET";
971
+ readonly endpointKey: "delivery_options";
972
+ }];
973
+ readonly sourceLocation: {
974
+ readonly line: 13;
975
+ readonly endLine: 46;
976
+ };
977
+ }, {
978
+ readonly module: "tools/delivery_option_tools.py";
979
+ readonly name: "get_delivery_option_detail";
980
+ readonly write: false;
981
+ readonly description: "取得指定配送方式的詳細資訊。\n\n【用途】\n查詢單一配送方式的完整設定,包含費率規則、地區限制、\n重量限制等。適合確認特定配送方式的詳細條件。\n\n【呼叫的 Shopline API】\n- GET /v1/delivery_options/{delivery_option_id}\n\n【回傳結構】\ndict 含配送方式詳細欄位:id, name, delivery_type,\nenabled, price, weight_limit, regions, created_at 等。";
982
+ readonly params: readonly [{
983
+ readonly name: "delivery_option_id";
984
+ readonly description: "";
985
+ readonly default: null;
986
+ readonly hasDefault: false;
987
+ readonly kind: "string";
988
+ readonly optional: false;
989
+ }];
990
+ readonly docEndpoints: readonly [{
991
+ readonly method: "GET";
992
+ readonly path: "/v1/delivery_options/{delivery_option_id}";
993
+ }];
994
+ readonly operations: readonly [{
995
+ readonly kind: "api_get";
996
+ readonly method: "GET";
997
+ readonly endpointKey: "delivery_option_detail";
998
+ readonly path_params: "{'delivery_option_id': delivery_option_id}";
999
+ }];
1000
+ readonly sourceLocation: {
1001
+ readonly line: 50;
1002
+ readonly endLine: 81;
1003
+ };
1004
+ }, {
1005
+ readonly module: "tools/delivery_option_tools.py";
1006
+ readonly name: "get_delivery_time_slots";
1007
+ readonly write: false;
1008
+ readonly description: "取得指定配送方式的可用時段清單。\n\n【用途】\n查詢特定配送方式的預約時段設定,例如到府配送的時間選項。\n適合確認預約配送時段或分析客戶配送時段偏好。\n\n【呼叫的 Shopline API】\n- GET /v1/delivery_options/{delivery_option_id}/time_slots\n\n【回傳結構】\ndict 含 delivery_option_id, total, time_slots[]。\n每個 time_slot 包含 id, day, start_time, end_time, enabled 等。";
1009
+ readonly params: readonly [{
1010
+ readonly name: "delivery_option_id";
1011
+ readonly description: "";
1012
+ readonly default: null;
1013
+ readonly hasDefault: false;
1014
+ readonly kind: "string";
1015
+ readonly optional: false;
1016
+ }];
1017
+ readonly docEndpoints: readonly [{
1018
+ readonly method: "GET";
1019
+ readonly path: "/v1/delivery_options/{delivery_option_id}/time_slots";
1020
+ }];
1021
+ readonly operations: readonly [{
1022
+ readonly kind: "api_get";
1023
+ readonly method: "GET";
1024
+ readonly endpointKey: "delivery_option_time_slots";
1025
+ readonly path_params: "{'delivery_option_id': delivery_option_id}";
1026
+ }];
1027
+ readonly sourceLocation: {
1028
+ readonly line: 85;
1029
+ readonly endLine: 120;
1030
+ };
1031
+ }, {
1032
+ readonly module: "tools/flash_price_tools.py";
1033
+ readonly name: "list_flash_price_campaigns";
1034
+ readonly write: false;
1035
+ readonly description: "取得快閃價格活動列表。\n\n【用途】\n瀏覽商店所有快閃特賣(限時特價)活動,了解活動名稱、狀態與時間範圍。\n可取得 campaign_id 後進一步呼叫 get_flash_price_campaign_detail 查詢完整詳情。\n\n【呼叫的 Shopline API】\n- GET /v1/flash_price_campaigns\n\n【回傳結構】\ndict 含 total_found, returned, items[]。\n每筆包含 id, title, status, start_at, end_at, created_at。";
1036
+ readonly params: readonly [{
1037
+ readonly name: "max_results";
1038
+ readonly description: "最多回傳筆數";
1039
+ readonly default: 50;
1040
+ readonly hasDefault: true;
1041
+ readonly kind: "integer";
1042
+ readonly optional: false;
1043
+ }];
1044
+ readonly docEndpoints: readonly [{
1045
+ readonly method: "GET";
1046
+ readonly path: "/v1/flash_price_campaigns";
1047
+ }];
1048
+ readonly operations: readonly [{
1049
+ readonly kind: "fetch_all_pages";
1050
+ readonly method: "GET";
1051
+ readonly endpointKey: "flash_price_campaigns";
1052
+ }];
1053
+ readonly sourceLocation: {
1054
+ readonly line: 16;
1055
+ readonly endLine: 50;
1056
+ };
1057
+ }, {
1058
+ readonly module: "tools/flash_price_tools.py";
1059
+ readonly name: "get_flash_price_campaign_detail";
1060
+ readonly write: false;
1061
+ readonly description: "取得單一快閃價格活動的完整詳情。\n\n【用途】\n查詢特定快閃特賣活動的折扣規則、適用商品與時間設定等完整資訊。\n適合在已知 campaign_id 的情況下取得所有欄位。\n\n【呼叫的 Shopline API】\n- GET /v1/flash_price_campaigns/{campaign_id}\n\n【回傳結構】\ndict 包含 id, title, status, discount_type, discount_value,\nproducts, start_at, end_at, created_at, updated_at 等完整欄位。";
1062
+ readonly params: readonly [{
1063
+ readonly name: "campaign_id";
1064
+ readonly description: "快閃價格活動 ID(由 list_flash_price_campaigns 回傳的 id 欄位)";
1065
+ readonly default: null;
1066
+ readonly hasDefault: false;
1067
+ readonly kind: "string";
1068
+ readonly optional: false;
1069
+ }];
1070
+ readonly docEndpoints: readonly [{
1071
+ readonly method: "GET";
1072
+ readonly path: "/v1/flash_price_campaigns/{campaign_id}";
1073
+ }];
1074
+ readonly operations: readonly [{
1075
+ readonly kind: "api_get";
1076
+ readonly method: "GET";
1077
+ readonly endpointKey: "flash_price_campaign_detail";
1078
+ readonly path_params: "{'campaign_id': campaign_id}";
1079
+ }];
1080
+ readonly sourceLocation: {
1081
+ readonly line: 54;
1082
+ readonly endLine: 84;
1083
+ };
1084
+ }, {
1085
+ readonly module: "tools/gift_tools.py";
1086
+ readonly name: "list_gifts";
1087
+ readonly write: false;
1088
+ readonly description: "取得贈品列表,支援依關鍵字搜尋。\n\n【用途】\n瀏覽或搜尋商店所有贈品設定,了解贈品名稱、庫存與適用條件。\n若提供搜尋關鍵字則呼叫搜尋端點,否則列出所有贈品。\n\n【呼叫的 Shopline API】\n- GET /v1/gifts(無搜尋條件時)\n- GET /v1/gifts/search(有搜尋條件時)\n\n【回傳結構】\ndict 含 total_found, returned, items[]。\n每筆包含 id, name, sku, quantity, status, created_at。";
1089
+ readonly params: readonly [{
1090
+ readonly name: "search_keyword";
1091
+ readonly description: "搜尋關鍵字(贈品名稱)";
1092
+ readonly default: null;
1093
+ readonly hasDefault: true;
1094
+ readonly kind: "string";
1095
+ readonly optional: true;
1096
+ }, {
1097
+ readonly name: "max_results";
1098
+ readonly description: "最多回傳筆數";
1099
+ readonly default: 50;
1100
+ readonly hasDefault: true;
1101
+ readonly kind: "integer";
1102
+ readonly optional: false;
1103
+ }];
1104
+ readonly docEndpoints: readonly [{
1105
+ readonly method: "GET";
1106
+ readonly path: "/v1/gifts";
1107
+ }, {
1108
+ readonly method: "GET";
1109
+ readonly path: "/v1/gifts/search";
1110
+ }];
1111
+ readonly operations: readonly [{
1112
+ readonly kind: "api_get";
1113
+ readonly method: "GET";
1114
+ readonly endpointKey: "gifts_search";
1115
+ readonly params: "params";
1116
+ }, {
1117
+ readonly kind: "fetch_all_pages";
1118
+ readonly method: "GET";
1119
+ readonly endpointKey: "gifts";
1120
+ }];
1121
+ readonly sourceLocation: {
1122
+ readonly line: 16;
1123
+ readonly endLine: 59;
1124
+ };
1125
+ }, {
1126
+ readonly module: "tools/member_point_tools.py";
1127
+ readonly name: "list_member_point_rules";
1128
+ readonly write: false;
1129
+ readonly description: "取得商店的會員點數規則設定。\n\n【用途】\n查看商店設定的點數回饋規則(消費回饋比例、點數到期規則等)。\n用於分析會員忠誠度計畫或對照客戶點數異動。\n\n【呼叫的 Shopline API】\n- GET /v1/member_point_rules\n\n【回傳結構】\ndict 含 total, rules[]。\n每條規則含 id, name, type, value, conditions 等。";
1130
+ readonly params: readonly [];
1131
+ readonly docEndpoints: readonly [{
1132
+ readonly method: "GET";
1133
+ readonly path: "/v1/member_point_rules";
1134
+ }];
1135
+ readonly operations: readonly [{
1136
+ readonly kind: "api_get";
1137
+ readonly method: "GET";
1138
+ readonly endpointKey: "member_point_rules";
1139
+ }];
1140
+ readonly sourceLocation: {
1141
+ readonly line: 13;
1142
+ readonly endLine: 45;
1143
+ };
1144
+ }, {
1145
+ readonly module: "tools/membership_tier_tools.py";
1146
+ readonly name: "list_membership_tiers";
1147
+ readonly write: false;
1148
+ readonly description: "取得商店的所有會員等級定義。\n\n【用途】\n查看商店設定了哪些會員等級、升等門檻、各等級權益。\n用於分析會員結構或確認等級設定。\n\n【呼叫的 Shopline API】\n- GET /v1/membership_tiers\n\n【回傳結構】\ndict 含 total, tiers[]。\n每個 tier 包含 id, name, threshold, benefits 等。";
1149
+ readonly params: readonly [];
1150
+ readonly docEndpoints: readonly [{
1151
+ readonly method: "GET";
1152
+ readonly path: "/v1/membership_tiers";
1153
+ }];
1154
+ readonly operations: readonly [{
1155
+ readonly kind: "api_get";
1156
+ readonly method: "GET";
1157
+ readonly endpointKey: "membership_tiers";
1158
+ }];
1159
+ readonly sourceLocation: {
1160
+ readonly line: 15;
1161
+ readonly endLine: 46;
1162
+ };
1163
+ }, {
1164
+ readonly module: "tools/membership_tier_tools.py";
1165
+ readonly name: "get_customer_tier_history";
1166
+ readonly write: false;
1167
+ readonly description: "取得指定客戶的會員等級變動歷程。\n\n【用途】\n追蹤客戶會員等級升降紀錄,了解是升等還是降級、原因為何。\n搭配 list_membership_tiers 對照等級名稱。\n\n【呼叫的 Shopline API】\n- GET /v1/customers/{customer_id}/membership-tier-history\n\n【回傳結構】\ndict 含 customer_id, total_changes, history[]。\n每筆含 from_tier, to_tier, reason, created_at。";
1168
+ readonly params: readonly [{
1169
+ readonly name: "customer_id";
1170
+ readonly description: "客戶內部 ID";
1171
+ readonly default: null;
1172
+ readonly hasDefault: false;
1173
+ readonly kind: "string";
1174
+ readonly optional: false;
1175
+ }];
1176
+ readonly docEndpoints: readonly [{
1177
+ readonly method: "GET";
1178
+ readonly path: "/v1/customers/{customer_id}/membership-tier-history";
1179
+ }];
1180
+ readonly operations: readonly [{
1181
+ readonly kind: "api_get";
1182
+ readonly method: "GET";
1183
+ readonly endpointKey: "customer_membership_tier_history";
1184
+ readonly path_params: "{'customer_id': customer_id}";
1185
+ }];
1186
+ readonly sourceLocation: {
1187
+ readonly line: 50;
1188
+ readonly endLine: 83;
1189
+ };
1190
+ }, {
1191
+ readonly module: "tools/merchant_tools.py";
1192
+ readonly name: "list_merchants";
1193
+ readonly write: false;
1194
+ readonly description: "取得所有商家清單。\n\n【用途】\n查看此 API token 可存取的商家帳號列表。\n適合多商家環境下確認可操作的商家範圍。\n\n【呼叫的 Shopline API】\n- GET /v1/merchants\n\n【回傳結構】\ndict 含 total, merchants[]。\n每個 merchant 包含 id, name, handle, currency, locale, created_at 等。";
1195
+ readonly params: readonly [];
1196
+ readonly docEndpoints: readonly [{
1197
+ readonly method: "GET";
1198
+ readonly path: "/v1/merchants";
1199
+ }];
1200
+ readonly operations: readonly [{
1201
+ readonly kind: "api_get";
1202
+ readonly method: "GET";
1203
+ readonly endpointKey: "merchants";
1204
+ }];
1205
+ readonly sourceLocation: {
1206
+ readonly line: 13;
1207
+ readonly endLine: 45;
1208
+ };
1209
+ }, {
1210
+ readonly module: "tools/merchant_tools.py";
1211
+ readonly name: "get_merchant_detail";
1212
+ readonly write: false;
1213
+ readonly description: "取得指定商家的詳細資訊。\n\n【用途】\n查詢單一商家的完整設定資訊,包含聯絡資訊、幣別、語系等。\n適合確認特定商家設定或做資料核對。\n\n【呼叫的 Shopline API】\n- GET /v1/merchants/{merchant_id}\n\n【回傳結構】\ndict 含商家詳細欄位:id, name, handle, currency, locale,\ncountry, email, phone, address, created_at 等。";
1214
+ readonly params: readonly [{
1215
+ readonly name: "merchant_id";
1216
+ readonly description: "";
1217
+ readonly default: null;
1218
+ readonly hasDefault: false;
1219
+ readonly kind: "string";
1220
+ readonly optional: false;
1221
+ }];
1222
+ readonly docEndpoints: readonly [{
1223
+ readonly method: "GET";
1224
+ readonly path: "/v1/merchants/{merchant_id}";
1225
+ }];
1226
+ readonly operations: readonly [{
1227
+ readonly kind: "api_get";
1228
+ readonly method: "GET";
1229
+ readonly endpointKey: "merchant_detail";
1230
+ readonly path_params: "{'merchant_id': merchant_id}";
1231
+ }];
1232
+ readonly sourceLocation: {
1233
+ readonly line: 49;
1234
+ readonly endLine: 79;
1235
+ };
1236
+ }, {
1237
+ readonly module: "tools/order_delivery_tools.py";
1238
+ readonly name: "get_order_delivery";
1239
+ readonly write: false;
1240
+ readonly description: "取得單一配送單的完整資訊,包含物流狀態、追蹤編號及收件地址。\n\n【用途】\n查詢特定出貨單的配送狀態與物流詳情,適用於追蹤包裹、確認收件資料,\n或協助客服處理配送相關問題。配送單 ID 通常來自 get_order_detail 回傳的\n出貨資訊(shipments / deliveries 欄位)。\n\n【呼叫的 Shopline API】\n- GET /v1/order_deliveries/{delivery_id}\n\n【回傳結構】\ndict 包含:\n- id:配送單 ID\n- status:配送狀態(如 pending, shipped, delivered)\n- tracking_number:物流追蹤編號\n- tracking_url:物流追蹤連結\n- carrier:物流商名稱\n- shipping_address:收件地址(含姓名、電話、地址欄位)\n- line_items[]:出貨品項(商品名稱、數量)\n- created_at, updated_at";
1241
+ readonly params: readonly [{
1242
+ readonly name: "delivery_id";
1243
+ readonly description: "配送單 ID(通常由訂單明細中的 delivery_id 欄位取得)";
1244
+ readonly default: null;
1245
+ readonly hasDefault: false;
1246
+ readonly kind: "string";
1247
+ readonly optional: false;
1248
+ }];
1249
+ readonly docEndpoints: readonly [{
1250
+ readonly method: "GET";
1251
+ readonly path: "/v1/order_deliveries/{delivery_id}";
1252
+ }];
1253
+ readonly operations: readonly [{
1254
+ readonly kind: "api_get";
1255
+ readonly method: "GET";
1256
+ readonly endpointKey: "order_delivery_detail";
1257
+ readonly path_params: "path_params";
1258
+ }];
1259
+ readonly sourceLocation: {
1260
+ readonly line: 16;
1261
+ readonly endLine: 76;
1262
+ };
1263
+ }, {
1264
+ readonly module: "tools/order_tools.py";
1265
+ readonly name: "query_orders";
1266
+ readonly write: false;
1267
+ readonly description: "依時間區間、訂單狀態、通路來源查詢訂單列表。回傳精簡的訂單摘要。\n\n【呼叫的 Shopline API】\n- GET /v1/orders/search\n- GET /v1/orders";
1268
+ readonly params: readonly [{
1269
+ readonly name: "start_date";
1270
+ readonly description: "起始日期 YYYY-MM-DD";
1271
+ readonly default: null;
1272
+ readonly hasDefault: false;
1273
+ readonly kind: "string";
1274
+ readonly optional: false;
1275
+ }, {
1276
+ readonly name: "end_date";
1277
+ readonly description: "結束日期 YYYY-MM-DD";
1278
+ readonly default: null;
1279
+ readonly hasDefault: false;
1280
+ readonly kind: "string";
1281
+ readonly optional: false;
1282
+ }, {
1283
+ readonly name: "status";
1284
+ readonly description: "訂單狀態篩選";
1285
+ readonly default: null;
1286
+ readonly hasDefault: true;
1287
+ readonly kind: "enum";
1288
+ readonly optional: true;
1289
+ readonly enum: readonly ["pending", "confirmed", "completed", "cancelled"];
1290
+ }, {
1291
+ readonly name: "channel";
1292
+ readonly description: "通路篩選: online=線上官網, pos=實體門市, all=全部";
1293
+ readonly default: "all";
1294
+ readonly hasDefault: true;
1295
+ readonly kind: "enum";
1296
+ readonly optional: false;
1297
+ readonly enum: readonly ["online", "pos", "all"];
1298
+ }, {
1299
+ readonly name: "store_name";
1300
+ readonly description: "門市名稱篩選(如:松菸誠品、新光A11)";
1301
+ readonly default: null;
1302
+ readonly hasDefault: true;
1303
+ readonly kind: "string";
1304
+ readonly optional: true;
1305
+ }, {
1306
+ readonly name: "max_results";
1307
+ readonly description: "最多回傳筆數";
1308
+ readonly default: 100;
1309
+ readonly hasDefault: true;
1310
+ readonly kind: "integer";
1311
+ readonly optional: false;
1312
+ }];
1313
+ readonly docEndpoints: readonly [{
1314
+ readonly method: "GET";
1315
+ readonly path: "/v1/orders/search";
1316
+ }, {
1317
+ readonly method: "GET";
1318
+ readonly path: "/v1/orders";
1319
+ }];
1320
+ readonly operations: readonly [{
1321
+ readonly kind: "fetch_all_pages";
1322
+ readonly method: "GET";
1323
+ readonly endpointKey: "orders_search";
1324
+ readonly params: "params";
1325
+ }];
1326
+ readonly sourceLocation: {
1327
+ readonly line: 28;
1328
+ readonly endLine: 97;
1329
+ };
1330
+ }, {
1331
+ readonly module: "tools/order_tools.py";
1332
+ readonly name: "get_sales_summary";
1333
+ readonly write: false;
1334
+ readonly description: "取得指定時間區間的銷售摘要:營業額、訂單數、客單價、件單價、折扣總額等核心指標。支援依通路/門市篩選。";
1335
+ readonly params: readonly [{
1336
+ readonly name: "start_date";
1337
+ readonly description: "起始日期 YYYY-MM-DD";
1338
+ readonly default: null;
1339
+ readonly hasDefault: false;
1340
+ readonly kind: "string";
1341
+ readonly optional: false;
1342
+ }, {
1343
+ readonly name: "end_date";
1344
+ readonly description: "結束日期 YYYY-MM-DD";
1345
+ readonly default: null;
1346
+ readonly hasDefault: false;
1347
+ readonly kind: "string";
1348
+ readonly optional: false;
1349
+ }, {
1350
+ readonly name: "status";
1351
+ readonly description: "訂單狀態";
1352
+ readonly default: "completed";
1353
+ readonly hasDefault: true;
1354
+ readonly kind: "string";
1355
+ readonly optional: false;
1356
+ }, {
1357
+ readonly name: "channel";
1358
+ readonly description: "通路篩選";
1359
+ readonly default: "all";
1360
+ readonly hasDefault: true;
1361
+ readonly kind: "enum";
1362
+ readonly optional: false;
1363
+ readonly enum: readonly ["online", "pos", "all"];
1364
+ }, {
1365
+ readonly name: "store_name";
1366
+ readonly description: "門市名稱篩選";
1367
+ readonly default: null;
1368
+ readonly hasDefault: true;
1369
+ readonly kind: "string";
1370
+ readonly optional: true;
1371
+ }];
1372
+ readonly docEndpoints: readonly [];
1373
+ readonly operations: readonly [{
1374
+ readonly kind: "fetch_all_pages";
1375
+ readonly method: "GET";
1376
+ readonly endpointKey: "orders_search";
1377
+ readonly params: "params";
1378
+ }];
1379
+ readonly sourceLocation: {
1380
+ readonly line: 104;
1381
+ readonly endLine: 198;
1382
+ };
1383
+ }, {
1384
+ readonly module: "tools/order_tools.py";
1385
+ readonly name: "get_top_products";
1386
+ readonly write: false;
1387
+ readonly description: "取得指定時間區間的商品銷售排行榜(依銷量或營業額排序),或滯銷商品清單。";
1388
+ readonly params: readonly [{
1389
+ readonly name: "start_date";
1390
+ readonly description: "起始日期 YYYY-MM-DD";
1391
+ readonly default: null;
1392
+ readonly hasDefault: false;
1393
+ readonly kind: "string";
1394
+ readonly optional: false;
1395
+ }, {
1396
+ readonly name: "end_date";
1397
+ readonly description: "結束日期 YYYY-MM-DD";
1398
+ readonly default: null;
1399
+ readonly hasDefault: false;
1400
+ readonly kind: "string";
1401
+ readonly optional: false;
1402
+ }, {
1403
+ readonly name: "top_n";
1404
+ readonly description: "顯示前 N 名";
1405
+ readonly default: 20;
1406
+ readonly hasDefault: true;
1407
+ readonly kind: "integer";
1408
+ readonly optional: false;
1409
+ }, {
1410
+ readonly name: "sort_by";
1411
+ readonly description: "排序依據";
1412
+ readonly default: "revenue";
1413
+ readonly hasDefault: true;
1414
+ readonly kind: "enum";
1415
+ readonly optional: false;
1416
+ readonly enum: readonly ["quantity", "revenue"];
1417
+ }, {
1418
+ readonly name: "channel";
1419
+ readonly description: "通路篩選";
1420
+ readonly default: "all";
1421
+ readonly hasDefault: true;
1422
+ readonly kind: "enum";
1423
+ readonly optional: false;
1424
+ readonly enum: readonly ["online", "pos", "all"];
1425
+ }];
1426
+ readonly docEndpoints: readonly [];
1427
+ readonly operations: readonly [{
1428
+ readonly kind: "fetch_all_pages";
1429
+ readonly method: "GET";
1430
+ readonly endpointKey: "orders_search";
1431
+ readonly params: "params";
1432
+ }];
1433
+ readonly sourceLocation: {
1434
+ readonly line: 205;
1435
+ readonly endLine: 268;
1436
+ };
1437
+ }, {
1438
+ readonly module: "tools/order_tools.py";
1439
+ readonly name: "get_sales_trend";
1440
+ readonly write: false;
1441
+ readonly description: "取得銷售趨勢數據,支援每日/每週/每月粒度,可用於繪製趨勢圖。";
1442
+ readonly params: readonly [{
1443
+ readonly name: "start_date";
1444
+ readonly description: "起始日期 YYYY-MM-DD";
1445
+ readonly default: null;
1446
+ readonly hasDefault: false;
1447
+ readonly kind: "string";
1448
+ readonly optional: false;
1449
+ }, {
1450
+ readonly name: "end_date";
1451
+ readonly description: "結束日期 YYYY-MM-DD";
1452
+ readonly default: null;
1453
+ readonly hasDefault: false;
1454
+ readonly kind: "string";
1455
+ readonly optional: false;
1456
+ }, {
1457
+ readonly name: "granularity";
1458
+ readonly description: "時間粒度";
1459
+ readonly default: "daily";
1460
+ readonly hasDefault: true;
1461
+ readonly kind: "enum";
1462
+ readonly optional: false;
1463
+ readonly enum: readonly ["daily", "weekly", "monthly"];
1464
+ }, {
1465
+ readonly name: "channel";
1466
+ readonly description: "通路篩選";
1467
+ readonly default: "all";
1468
+ readonly hasDefault: true;
1469
+ readonly kind: "enum";
1470
+ readonly optional: false;
1471
+ readonly enum: readonly ["online", "pos", "all"];
1472
+ }];
1473
+ readonly docEndpoints: readonly [];
1474
+ readonly operations: readonly [{
1475
+ readonly kind: "fetch_all_pages";
1476
+ readonly method: "GET";
1477
+ readonly endpointKey: "orders_search";
1478
+ readonly params: "params";
1479
+ }];
1480
+ readonly sourceLocation: {
1481
+ readonly line: 275;
1482
+ readonly endLine: 333;
1483
+ };
1484
+ }, {
1485
+ readonly module: "tools/order_tools.py";
1486
+ readonly name: "get_channel_comparison";
1487
+ readonly write: false;
1488
+ readonly description: "比較各門市/通路的同期業績:營業額、訂單數、客單價等。支援線上 vs 門市,或門市之間的比較。";
1489
+ readonly params: readonly [{
1490
+ readonly name: "start_date";
1491
+ readonly description: "起始日期 YYYY-MM-DD";
1492
+ readonly default: null;
1493
+ readonly hasDefault: false;
1494
+ readonly kind: "string";
1495
+ readonly optional: false;
1496
+ }, {
1497
+ readonly name: "end_date";
1498
+ readonly description: "結束日期 YYYY-MM-DD";
1499
+ readonly default: null;
1500
+ readonly hasDefault: false;
1501
+ readonly kind: "string";
1502
+ readonly optional: false;
1503
+ }];
1504
+ readonly docEndpoints: readonly [];
1505
+ readonly operations: readonly [{
1506
+ readonly kind: "fetch_all_pages";
1507
+ readonly method: "GET";
1508
+ readonly endpointKey: "orders_search";
1509
+ readonly params: "params";
1510
+ }];
1511
+ readonly sourceLocation: {
1512
+ readonly line: 340;
1513
+ readonly endLine: 391;
1514
+ };
1515
+ }, {
1516
+ readonly module: "tools/order_tools.py";
1517
+ readonly name: "get_order_detail";
1518
+ readonly write: false;
1519
+ readonly description: "取得單筆訂單的完整資訊,包含商品明細、付款、物流、折扣等。";
1520
+ readonly params: readonly [{
1521
+ readonly name: "order_id";
1522
+ readonly description: "訂單內部 ID(由 query_orders 回傳的 id 欄位,非 order_number)";
1523
+ readonly default: null;
1524
+ readonly hasDefault: false;
1525
+ readonly kind: "string";
1526
+ readonly optional: false;
1527
+ }];
1528
+ readonly docEndpoints: readonly [];
1529
+ readonly operations: readonly [{
1530
+ readonly kind: "api_get";
1531
+ readonly method: "GET";
1532
+ readonly endpointKey: "order_detail";
1533
+ readonly path_params: "{'order_id': order_id}";
1534
+ }];
1535
+ readonly sourceLocation: {
1536
+ readonly line: 398;
1537
+ readonly endLine: 455;
1538
+ };
1539
+ }, {
1540
+ readonly module: "tools/order_tools.py";
1541
+ readonly name: "get_refund_summary";
1542
+ readonly write: false;
1543
+ readonly description: "取得指定時間區間的退貨退款統計:退款金額、退貨筆數、退貨率、退貨商品明細。支援計算淨營收。";
1544
+ readonly params: readonly [{
1545
+ readonly name: "start_date";
1546
+ readonly description: "起始日期 YYYY-MM-DD";
1547
+ readonly default: null;
1548
+ readonly hasDefault: false;
1549
+ readonly kind: "string";
1550
+ readonly optional: false;
1551
+ }, {
1552
+ readonly name: "end_date";
1553
+ readonly description: "結束日期 YYYY-MM-DD";
1554
+ readonly default: null;
1555
+ readonly hasDefault: false;
1556
+ readonly kind: "string";
1557
+ readonly optional: false;
1558
+ }];
1559
+ readonly docEndpoints: readonly [];
1560
+ readonly operations: readonly [{
1561
+ readonly kind: "fetch_all_pages";
1562
+ readonly method: "GET";
1563
+ readonly endpointKey: "return_orders";
1564
+ readonly params: "params";
1565
+ }];
1566
+ readonly sourceLocation: {
1567
+ readonly line: 462;
1568
+ readonly endLine: 513;
1569
+ };
1570
+ }, {
1571
+ readonly module: "tools/order_tools.py";
1572
+ readonly name: "get_archived_orders";
1573
+ readonly write: false;
1574
+ readonly description: "【用途】查詢已封存(archived)的歷史訂單列表,適合調閱長期歸檔的舊訂單資料。\n\n【呼叫的 Shopline API】\n- GET /v1/orders/archived\n\n【回傳結構】\n{\n \"total_found\": int, # 符合條件的總筆數\n \"returned\": int, # 實際回傳筆數\n \"orders\": [ # 精簡訂單列表\n {\n \"id\": str,\n \"order_number\": str,\n \"status\": str,\n \"channel\": str, # \"POS\" 或 \"線上\"\n \"store_name\": str,\n \"total\": float,\n \"subtotal\": float,\n \"discount\": float,\n \"payment_type\": str,\n \"payment_status\": str,\n \"delivery_type\": str,\n \"delivery_status\": str,\n \"customer_name\": str,\n \"items_count\": int,\n \"created_at\": str,\n }\n ]\n}";
1575
+ readonly params: readonly [{
1576
+ readonly name: "start_date";
1577
+ readonly description: "起始日期 YYYY-MM-DD";
1578
+ readonly default: null;
1579
+ readonly hasDefault: false;
1580
+ readonly kind: "string";
1581
+ readonly optional: false;
1582
+ }, {
1583
+ readonly name: "end_date";
1584
+ readonly description: "結束日期 YYYY-MM-DD";
1585
+ readonly default: null;
1586
+ readonly hasDefault: false;
1587
+ readonly kind: "string";
1588
+ readonly optional: false;
1589
+ }, {
1590
+ readonly name: "max_results";
1591
+ readonly description: "最多回傳筆數";
1592
+ readonly default: 100;
1593
+ readonly hasDefault: true;
1594
+ readonly kind: "integer";
1595
+ readonly optional: false;
1596
+ }];
1597
+ readonly docEndpoints: readonly [{
1598
+ readonly method: "GET";
1599
+ readonly path: "/v1/orders/archived";
1600
+ }];
1601
+ readonly operations: readonly [{
1602
+ readonly kind: "fetch_all_pages";
1603
+ readonly method: "GET";
1604
+ readonly endpointKey: "orders_archived";
1605
+ readonly params: "params";
1606
+ }];
1607
+ readonly sourceLocation: {
1608
+ readonly line: 520;
1609
+ readonly endLine: 592;
1610
+ };
1611
+ }, {
1612
+ readonly module: "tools/order_tools.py";
1613
+ readonly name: "get_order_labels";
1614
+ readonly write: false;
1615
+ readonly description: "【用途】取得指定訂單的配送標籤資訊,可用於列印物流面單或查詢寄件單號。\n\n【呼叫的 Shopline API】\n- GET /v1/orders/{order_id}/labels\n\n【回傳結構】\nAPI 原始回應,通常包含:\n{\n \"labels\": [\n {\n \"tracking_number\": str, # 物流追蹤號碼\n \"carrier\": str, # 物流商名稱\n \"label_url\": str, # 標籤列印 URL\n ...\n }\n ]\n}";
1616
+ readonly params: readonly [{
1617
+ readonly name: "order_id";
1618
+ readonly description: "訂單內部 ID(由 query_orders 回傳的 id 欄位,非 order_number)";
1619
+ readonly default: null;
1620
+ readonly hasDefault: false;
1621
+ readonly kind: "string";
1622
+ readonly optional: false;
1623
+ }];
1624
+ readonly docEndpoints: readonly [{
1625
+ readonly method: "GET";
1626
+ readonly path: "/v1/orders/{order_id}/labels";
1627
+ }];
1628
+ readonly operations: readonly [{
1629
+ readonly kind: "api_get";
1630
+ readonly method: "GET";
1631
+ readonly endpointKey: "order_labels";
1632
+ readonly path_params: "{'order_id': order_id}";
1633
+ }];
1634
+ readonly sourceLocation: {
1635
+ readonly line: 599;
1636
+ readonly endLine: 622;
1637
+ };
1638
+ }, {
1639
+ readonly module: "tools/order_tools.py";
1640
+ readonly name: "get_order_tags";
1641
+ readonly write: false;
1642
+ readonly description: "【用途】取得指定訂單上附加的所有標籤,可用於分類管理或篩選特殊訂單。\n\n【呼叫的 Shopline API】\n- GET /v1/orders/{order_id}/tags\n\n【回傳結構】\n{\n \"order_id\": str, # 查詢的訂單 ID\n \"tags\": list, # 標籤列表(字串陣列)\n}";
1643
+ readonly params: readonly [{
1644
+ readonly name: "order_id";
1645
+ readonly description: "訂單內部 ID(由 query_orders 回傳的 id 欄位,非 order_number)";
1646
+ readonly default: null;
1647
+ readonly hasDefault: false;
1648
+ readonly kind: "string";
1649
+ readonly optional: false;
1650
+ }];
1651
+ readonly docEndpoints: readonly [{
1652
+ readonly method: "GET";
1653
+ readonly path: "/v1/orders/{order_id}/tags";
1654
+ }];
1655
+ readonly operations: readonly [{
1656
+ readonly kind: "api_get";
1657
+ readonly method: "GET";
1658
+ readonly endpointKey: "order_tags";
1659
+ readonly path_params: "{'order_id': order_id}";
1660
+ }];
1661
+ readonly sourceLocation: {
1662
+ readonly line: 629;
1663
+ readonly endLine: 651;
1664
+ };
1665
+ }, {
1666
+ readonly module: "tools/order_tools.py";
1667
+ readonly name: "get_order_action_logs";
1668
+ readonly write: false;
1669
+ readonly description: "【用途】取得指定訂單的所有操作歷程紀錄,包含狀態變更、人員操作、時間戳記等,適合稽核追蹤。\n\n【呼叫的 Shopline API】\n- GET /v1/orders/{order_id}/action-logs\n\n【回傳結構】\n{\n \"order_id\": str, # 查詢的訂單 ID\n \"total\": int, # 歷程總筆數\n \"logs\": [ # 操作歷程列表\n {\n \"action\": str, # 操作類型(如 status_changed, payment_updated)\n \"operator\": str, # 操作人員\n \"created_at\": str, # 操作時間\n ... # 其他欄位依 API 回應而定\n }\n ]\n}";
1670
+ readonly params: readonly [{
1671
+ readonly name: "order_id";
1672
+ readonly description: "訂單內部 ID(由 query_orders 回傳的 id 欄位,非 order_number)";
1673
+ readonly default: null;
1674
+ readonly hasDefault: false;
1675
+ readonly kind: "string";
1676
+ readonly optional: false;
1677
+ }];
1678
+ readonly docEndpoints: readonly [{
1679
+ readonly method: "GET";
1680
+ readonly path: "/v1/orders/{order_id}/action-logs";
1681
+ }];
1682
+ readonly operations: readonly [{
1683
+ readonly kind: "api_get";
1684
+ readonly method: "GET";
1685
+ readonly endpointKey: "order_action_logs";
1686
+ readonly path_params: "{'order_id': order_id}";
1687
+ }];
1688
+ readonly sourceLocation: {
1689
+ readonly line: 658;
1690
+ readonly endLine: 689;
1691
+ };
1692
+ }, {
1693
+ readonly module: "tools/order_tools.py";
1694
+ readonly name: "get_order_transactions";
1695
+ readonly write: false;
1696
+ readonly description: "【用途】取得指定訂單的所有付款交易紀錄,包含付款金額、交易狀態、付款方式等,適合對帳與財務核查。\n\n【呼叫的 Shopline API】\n- GET /v1/orders/{order_id}/transactions\n\n【回傳結構】\n{\n \"order_id\": str, # 查詢的訂單 ID\n \"total\": int, # 交易筆數\n \"transactions\": [ # 交易列表\n {\n \"id\": str, # 交易 ID\n \"kind\": str, # 交易類型(sale, refund, void 等)\n \"status\": str, # 交易狀態\n \"amount\": float, # 交易金額(TWD)\n \"gateway\": str, # 付款閘道\n \"created_at\": str, # 交易時間\n ... # 其他欄位依 API 回應而定\n }\n ]\n}";
1697
+ readonly params: readonly [{
1698
+ readonly name: "order_id";
1699
+ readonly description: "訂單內部 ID(由 query_orders 回傳的 id 欄位,非 order_number)";
1700
+ readonly default: null;
1701
+ readonly hasDefault: false;
1702
+ readonly kind: "string";
1703
+ readonly optional: false;
1704
+ }];
1705
+ readonly docEndpoints: readonly [{
1706
+ readonly method: "GET";
1707
+ readonly path: "/v1/orders/{order_id}/transactions";
1708
+ }];
1709
+ readonly operations: readonly [{
1710
+ readonly kind: "api_get";
1711
+ readonly method: "GET";
1712
+ readonly endpointKey: "order_transactions";
1713
+ readonly path_params: "{'order_id': order_id}";
1714
+ }];
1715
+ readonly sourceLocation: {
1716
+ readonly line: 696;
1717
+ readonly endLine: 739;
1718
+ };
1719
+ }, {
1720
+ readonly module: "tools/payment_tools.py";
1721
+ readonly name: "list_payments";
1722
+ readonly write: false;
1723
+ readonly description: "取得商店啟用的付款方式清單。\n\n【用途】\n查看商店目前設定的付款方式,例如信用卡、ATM 轉帳、\n貨到付款、第三方支付等。適合確認可用付款渠道或做訂單\n付款方式分析的參考。\n\n【呼叫的 Shopline API】\n- GET /v1/payments\n\n【回傳結構】\ndict 含 total, payments[]。\n每個 payment 包含 id, name, payment_type, enabled,\nposition, created_at 等。";
1724
+ readonly params: readonly [];
1725
+ readonly docEndpoints: readonly [{
1726
+ readonly method: "GET";
1727
+ readonly path: "/v1/payments";
1728
+ }];
1729
+ readonly operations: readonly [{
1730
+ readonly kind: "api_get";
1731
+ readonly method: "GET";
1732
+ readonly endpointKey: "payments";
1733
+ }];
1734
+ readonly sourceLocation: {
1735
+ readonly line: 13;
1736
+ readonly endLine: 46;
1737
+ };
1738
+ }, {
1739
+ readonly module: "tools/product_tools.py";
1740
+ readonly name: "get_product_list";
1741
+ readonly write: false;
1742
+ readonly description: "取得商品列表,含 SKU 變體、價格、品牌、庫存數量等資訊。\n\n【呼叫的 Shopline API】\n- GET /v1/products\n- GET /v1/products/search";
1743
+ readonly params: readonly [{
1744
+ readonly name: "keyword";
1745
+ readonly description: "商品名稱關鍵字搜尋";
1746
+ readonly default: null;
1747
+ readonly hasDefault: true;
1748
+ readonly kind: "string";
1749
+ readonly optional: true;
1750
+ }, {
1751
+ readonly name: "brand";
1752
+ readonly description: "品牌篩選";
1753
+ readonly default: null;
1754
+ readonly hasDefault: true;
1755
+ readonly kind: "string";
1756
+ readonly optional: true;
1757
+ }, {
1758
+ readonly name: "max_results";
1759
+ readonly description: "最多回傳筆數";
1760
+ readonly default: 50;
1761
+ readonly hasDefault: true;
1762
+ readonly kind: "integer";
1763
+ readonly optional: false;
1764
+ }];
1765
+ readonly docEndpoints: readonly [{
1766
+ readonly method: "GET";
1767
+ readonly path: "/v1/products";
1768
+ }, {
1769
+ readonly method: "GET";
1770
+ readonly path: "/v1/products/search";
1771
+ }];
1772
+ readonly operations: readonly [{
1773
+ readonly kind: "fetch_all_pages";
1774
+ readonly method: "GET";
1775
+ readonly endpointKey: "products";
1776
+ }];
1777
+ readonly sourceLocation: {
1778
+ readonly line: 22;
1779
+ readonly endLine: 82;
1780
+ };
1781
+ }, {
1782
+ readonly module: "tools/product_tools.py";
1783
+ readonly name: "get_product_variants";
1784
+ readonly write: false;
1785
+ readonly description: "取得特定商品的所有 SKU 變體明細,含尺寸×顏色的庫存矩陣。\n\n【呼叫的 Shopline API】\n- GET /v1/products/{product_id}";
1786
+ readonly params: readonly [{
1787
+ readonly name: "product_id";
1788
+ readonly description: "商品 ID";
1789
+ readonly default: null;
1790
+ readonly hasDefault: false;
1791
+ readonly kind: "string";
1792
+ readonly optional: false;
1793
+ }];
1794
+ readonly docEndpoints: readonly [{
1795
+ readonly method: "GET";
1796
+ readonly path: "/v1/products/{product_id}";
1797
+ }];
1798
+ readonly operations: readonly [{
1799
+ readonly kind: "fetch_all_pages";
1800
+ readonly method: "GET";
1801
+ readonly endpointKey: "products";
1802
+ }];
1803
+ readonly sourceLocation: {
1804
+ readonly line: 89;
1805
+ readonly endLine: 137;
1806
+ };
1807
+ }, {
1808
+ readonly module: "tools/product_tools.py";
1809
+ readonly name: "get_inventory_overview";
1810
+ readonly write: false;
1811
+ readonly description: "取得全商品庫存總覽:總庫存數量、庫存品項數、缺貨品項數等。從商品 variations 的 quantity 欄位計算。";
1812
+ readonly params: readonly [{
1813
+ readonly name: "brand";
1814
+ readonly description: "品牌篩選";
1815
+ readonly default: null;
1816
+ readonly hasDefault: true;
1817
+ readonly kind: "string";
1818
+ readonly optional: true;
1819
+ }];
1820
+ readonly docEndpoints: readonly [];
1821
+ readonly operations: readonly [{
1822
+ readonly kind: "fetch_all_pages";
1823
+ readonly method: "GET";
1824
+ readonly endpointKey: "products";
1825
+ }];
1826
+ readonly sourceLocation: {
1827
+ readonly line: 144;
1828
+ readonly endLine: 223;
1829
+ };
1830
+ }, {
1831
+ readonly module: "tools/product_tools.py";
1832
+ readonly name: "get_low_stock_alerts";
1833
+ readonly write: false;
1834
+ readonly description: "取得低庫存或缺貨的 SKU 清單,可自訂庫存門檻值。";
1835
+ readonly params: readonly [{
1836
+ readonly name: "threshold";
1837
+ readonly description: "庫存低於此值即警示";
1838
+ readonly default: 5;
1839
+ readonly hasDefault: true;
1840
+ readonly kind: "integer";
1841
+ readonly optional: false;
1842
+ }];
1843
+ readonly docEndpoints: readonly [];
1844
+ readonly operations: readonly [{
1845
+ readonly kind: "fetch_all_pages";
1846
+ readonly method: "GET";
1847
+ readonly endpointKey: "products";
1848
+ }];
1849
+ readonly sourceLocation: {
1850
+ readonly line: 230;
1851
+ readonly endLine: 261;
1852
+ };
1853
+ }, {
1854
+ readonly module: "tools/product_tools.py";
1855
+ readonly name: "get_warehouses";
1856
+ readonly write: false;
1857
+ readonly description: "取得所有倉庫/門市據點列表。";
1858
+ readonly params: readonly [];
1859
+ readonly docEndpoints: readonly [];
1860
+ readonly operations: readonly [{
1861
+ readonly kind: "api_get";
1862
+ readonly method: "GET";
1863
+ readonly endpointKey: "warehouses";
1864
+ readonly params: "{'per_page': 50}";
1865
+ }];
1866
+ readonly sourceLocation: {
1867
+ readonly line: 268;
1868
+ readonly endLine: 283;
1869
+ };
1870
+ }, {
1871
+ readonly module: "tools/product_tools.py";
1872
+ readonly name: "get_stock_by_warehouse";
1873
+ readonly write: false;
1874
+ readonly description: "取得商品在各倉庫/門市的庫存分佈矩陣。可查詢單一商品或全部商品的各倉庫庫存。";
1875
+ readonly params: readonly [{
1876
+ readonly name: "product_id";
1877
+ readonly description: "商品 ID(不填則查詢全部商品,但較慢)";
1878
+ readonly default: null;
1879
+ readonly hasDefault: true;
1880
+ readonly kind: "string";
1881
+ readonly optional: true;
1882
+ }, {
1883
+ readonly name: "warehouse_id";
1884
+ readonly description: "倉庫 ID 篩選(僅看特定倉庫)";
1885
+ readonly default: null;
1886
+ readonly hasDefault: true;
1887
+ readonly kind: "string";
1888
+ readonly optional: true;
1889
+ }];
1890
+ readonly docEndpoints: readonly [];
1891
+ readonly operations: readonly [{
1892
+ readonly kind: "api_get";
1893
+ readonly method: "GET";
1894
+ readonly endpointKey: "warehouses";
1895
+ readonly params: "{'per_page': 50}";
1896
+ }, {
1897
+ readonly kind: "api_get";
1898
+ readonly method: "GET";
1899
+ readonly endpointKey: "product_stocks";
1900
+ readonly path_params: "{'product_id': product_id}";
1901
+ }, {
1902
+ readonly kind: "fetch_all_pages";
1903
+ readonly method: "GET";
1904
+ readonly endpointKey: "products";
1905
+ }, {
1906
+ readonly kind: "api_get";
1907
+ readonly method: "GET";
1908
+ readonly endpointKey: "product_stocks";
1909
+ readonly path_params: "{'product_id': p['id']}";
1910
+ }];
1911
+ readonly sourceLocation: {
1912
+ readonly line: 290;
1913
+ readonly endLine: 365;
1914
+ };
1915
+ }, {
1916
+ readonly module: "tools/product_tools.py";
1917
+ readonly name: "get_locked_inventory";
1918
+ readonly write: false;
1919
+ readonly description: "【用途】\n取得目前被鎖定(預留)的庫存商品清單,協助分析哪些 SKU 有待出貨的預留數量。\n\n【呼叫的 Shopline API】\n- GET /v1/products/locked-inventory\n\n【回傳結構】\n- total: 鎖定庫存的 SKU 總筆數\n- items: 每筆含 product_title、sku、locked_quantity";
1920
+ readonly params: readonly [];
1921
+ readonly docEndpoints: readonly [{
1922
+ readonly method: "GET";
1923
+ readonly path: "/v1/products/locked-inventory";
1924
+ }];
1925
+ readonly operations: readonly [{
1926
+ readonly kind: "api_get";
1927
+ readonly method: "GET";
1928
+ readonly endpointKey: "products_locked_inventory";
1929
+ }];
1930
+ readonly sourceLocation: {
1931
+ readonly line: 372;
1932
+ readonly endLine: 398;
1933
+ };
1934
+ }, {
1935
+ readonly module: "tools/product_tools.py";
1936
+ readonly name: "list_purchase_orders";
1937
+ readonly write: false;
1938
+ readonly description: "【用途】\n取得 POS 採購單列表,用於了解進貨狀況與採購歷史。\n\n【呼叫的 Shopline API】\n- GET /v1/pos/purchase_orders\n\n【回傳結構】\n- total_found: 查詢到的採購單總數\n- returned: 實際回傳筆數\n- purchase_orders: 每筆含 id、status、total、created_at";
1939
+ readonly params: readonly [{
1940
+ readonly name: "max_results";
1941
+ readonly description: "最多回傳筆數";
1942
+ readonly default: 50;
1943
+ readonly hasDefault: true;
1944
+ readonly kind: "integer";
1945
+ readonly optional: false;
1946
+ }];
1947
+ readonly docEndpoints: readonly [{
1948
+ readonly method: "GET";
1949
+ readonly path: "/v1/pos/purchase_orders";
1950
+ }];
1951
+ readonly operations: readonly [{
1952
+ readonly kind: "fetch_all_pages";
1953
+ readonly method: "GET";
1954
+ readonly endpointKey: "purchase_orders";
1955
+ }];
1956
+ readonly sourceLocation: {
1957
+ readonly line: 405;
1958
+ readonly endLine: 436;
1959
+ };
1960
+ }, {
1961
+ readonly module: "tools/product_tools.py";
1962
+ readonly name: "get_purchase_order_detail";
1963
+ readonly write: false;
1964
+ readonly description: "【用途】\n取得單一 POS 採購單的完整明細,含採購品項、數量、金額等資訊。\n\n【呼叫的 Shopline API】\n- GET /v1/pos/purchase_orders/{purchase_order_id}\n\n【回傳結構】\n- id、status、created_at、total\n- items: 每筆含 product_title、sku、quantity、unit_cost";
1965
+ readonly params: readonly [{
1966
+ readonly name: "purchase_order_id";
1967
+ readonly description: "採購單 ID";
1968
+ readonly default: null;
1969
+ readonly hasDefault: false;
1970
+ readonly kind: "string";
1971
+ readonly optional: false;
1972
+ }];
1973
+ readonly docEndpoints: readonly [{
1974
+ readonly method: "GET";
1975
+ readonly path: "/v1/pos/purchase_orders/{purchase_order_id}";
1976
+ }];
1977
+ readonly operations: readonly [{
1978
+ readonly kind: "api_get";
1979
+ readonly method: "GET";
1980
+ readonly endpointKey: "purchase_order_detail";
1981
+ readonly path_params: "{'purchase_order_id': purchase_order_id}";
1982
+ }];
1983
+ readonly sourceLocation: {
1984
+ readonly line: 443;
1985
+ readonly endLine: 476;
1986
+ };
1987
+ }, {
1988
+ readonly module: "tools/promotion_tools.py";
1989
+ readonly name: "list_promotions";
1990
+ readonly write: false;
1991
+ readonly description: "取得促銷活動列表,支援依狀態篩選。\n\n【用途】\n瀏覽商店目前所有促銷活動,了解進行中、已排程或已結束的促銷。\n可用於分析促銷策略,或取得 promotion_id 後進一步查詢詳情。\n\n【呼叫的 Shopline API】\n- GET /v1/promotions\n\n【回傳結構】\ndict 含 total_found, returned, items[]。\n每筆包含 id, title, status, discount_type, start_at, end_at。";
1992
+ readonly params: readonly [{
1993
+ readonly name: "status";
1994
+ readonly description: "促銷狀態篩選,例如 'active'、'inactive'、'scheduled'";
1995
+ readonly default: null;
1996
+ readonly hasDefault: true;
1997
+ readonly kind: "string";
1998
+ readonly optional: true;
1999
+ }, {
2000
+ readonly name: "max_results";
2001
+ readonly description: "最多回傳筆數";
2002
+ readonly default: 50;
2003
+ readonly hasDefault: true;
2004
+ readonly kind: "integer";
2005
+ readonly optional: false;
2006
+ }];
2007
+ readonly docEndpoints: readonly [{
2008
+ readonly method: "GET";
2009
+ readonly path: "/v1/promotions";
2010
+ }];
2011
+ readonly operations: readonly [{
2012
+ readonly kind: "fetch_all_pages";
2013
+ readonly method: "GET";
2014
+ readonly endpointKey: "promotions";
2015
+ readonly params: "params";
2016
+ }];
2017
+ readonly sourceLocation: {
2018
+ readonly line: 16;
2019
+ readonly endLine: 57;
2020
+ };
2021
+ }, {
2022
+ readonly module: "tools/promotion_tools.py";
2023
+ readonly name: "get_promotion_detail";
2024
+ readonly write: false;
2025
+ readonly description: "取得單一促銷活動的完整詳情。\n\n【用途】\n查詢特定促銷活動的折扣規則、適用商品、使用限制等完整資訊。\n適合在已知 promotion_id 的情況下取得所有欄位。\n\n【呼叫的 Shopline API】\n- GET /v1/promotions/{promotion_id}\n\n【回傳結構】\ndict 包含 id, title, status, discount_type, discount_value,\ntarget_type, conditions, start_at, end_at, created_at, updated_at 等完整欄位。";
2026
+ readonly params: readonly [{
2027
+ readonly name: "promotion_id";
2028
+ readonly description: "促銷活動 ID(由 list_promotions 或 search_promotions 回傳的 id 欄位)";
2029
+ readonly default: null;
2030
+ readonly hasDefault: false;
2031
+ readonly kind: "string";
2032
+ readonly optional: false;
2033
+ }];
2034
+ readonly docEndpoints: readonly [{
2035
+ readonly method: "GET";
2036
+ readonly path: "/v1/promotions/{promotion_id}";
2037
+ }];
2038
+ readonly operations: readonly [{
2039
+ readonly kind: "api_get";
2040
+ readonly method: "GET";
2041
+ readonly endpointKey: "promotion_detail";
2042
+ readonly path_params: "{'promotion_id': promotion_id}";
2043
+ }];
2044
+ readonly sourceLocation: {
2045
+ readonly line: 61;
2046
+ readonly endLine: 96;
2047
+ };
2048
+ }, {
2049
+ readonly module: "tools/promotion_tools.py";
2050
+ readonly name: "search_promotions";
2051
+ readonly write: false;
2052
+ readonly description: "依關鍵字搜尋促銷活動。\n\n【用途】\n快速找到特定名稱的促銷活動,例如搜尋「週年慶」、「黑五」等。\n搜尋結果含 id 可進一步呼叫 get_promotion_detail 取得完整資訊。\n\n【呼叫的 Shopline API】\n- GET /v1/promotions/search\n\n【回傳結構】\ndict 含 total_found, returned, items[]。\n每筆包含 id, title, status, discount_type, start_at, end_at。";
2053
+ readonly params: readonly [{
2054
+ readonly name: "keyword";
2055
+ readonly description: "搜尋關鍵字(促銷名稱)";
2056
+ readonly default: null;
2057
+ readonly hasDefault: false;
2058
+ readonly kind: "string";
2059
+ readonly optional: false;
2060
+ }, {
2061
+ readonly name: "max_results";
2062
+ readonly description: "最多回傳筆數";
2063
+ readonly default: 50;
2064
+ readonly hasDefault: true;
2065
+ readonly kind: "integer";
2066
+ readonly optional: false;
2067
+ }];
2068
+ readonly docEndpoints: readonly [{
2069
+ readonly method: "GET";
2070
+ readonly path: "/v1/promotions/search";
2071
+ }];
2072
+ readonly operations: readonly [{
2073
+ readonly kind: "api_get";
2074
+ readonly method: "GET";
2075
+ readonly endpointKey: "promotions_search";
2076
+ readonly params: "params";
2077
+ }];
2078
+ readonly sourceLocation: {
2079
+ readonly line: 100;
2080
+ readonly endLine: 137;
2081
+ };
2082
+ }, {
2083
+ readonly module: "tools/return_order_tools.py";
2084
+ readonly name: "list_return_orders";
2085
+ readonly write: false;
2086
+ readonly description: "取得退貨單列表,可依建立日期區間篩選。\n\n【用途】\n查詢特定時段內的退貨申請清單,了解退貨狀況與數量。提供退貨單的摘要資訊\n(含狀態、對應原始訂單、退款金額及退貨品項數)。若需取得單一退貨單的完整\n品項明細,請改用 get_return_order_detail。\n\n注意:analytics_tools 中的 get_refund_summary 也使用同一端點,但以彙總分析\n為目的;本工具提供的是原始列表檢視,適合逐筆查閱退貨紀錄。\n\n【呼叫的 Shopline API】\n- GET /v1/return_orders\n\n【回傳結構】\ndict 含 total_found, returned, return_orders[]。\n每個 return_order 包含 id, status, order_id, total(TWD float),\nitems_count, created_at。";
2087
+ readonly params: readonly [{
2088
+ readonly name: "start_date";
2089
+ readonly description: "查詢起始日期(ISO 8601 格式,如 2024-01-01T00:00:00Z)";
2090
+ readonly default: null;
2091
+ readonly hasDefault: true;
2092
+ readonly kind: "string";
2093
+ readonly optional: true;
2094
+ }, {
2095
+ readonly name: "end_date";
2096
+ readonly description: "查詢結束日期(ISO 8601 格式,如 2024-12-31T23:59:59Z)";
2097
+ readonly default: null;
2098
+ readonly hasDefault: true;
2099
+ readonly kind: "string";
2100
+ readonly optional: true;
2101
+ }, {
2102
+ readonly name: "max_results";
2103
+ readonly description: "最多回傳筆數";
2104
+ readonly default: 100;
2105
+ readonly hasDefault: true;
2106
+ readonly kind: "integer";
2107
+ readonly optional: false;
2108
+ }];
2109
+ readonly docEndpoints: readonly [{
2110
+ readonly method: "GET";
2111
+ readonly path: "/v1/return_orders";
2112
+ }];
2113
+ readonly operations: readonly [{
2114
+ readonly kind: "fetch_all_pages";
2115
+ readonly method: "GET";
2116
+ readonly endpointKey: "return_orders";
2117
+ readonly params: "params";
2118
+ }];
2119
+ readonly sourceLocation: {
2120
+ readonly line: 16;
2121
+ readonly endLine: 66;
2122
+ };
2123
+ }, {
2124
+ readonly module: "tools/return_order_tools.py";
2125
+ readonly name: "get_return_order_detail";
2126
+ readonly write: false;
2127
+ readonly description: "取得單一退貨單的完整明細,包含所有退貨品項。\n\n【用途】\n查閱特定退貨申請的完整資訊:退貨原因、每件退貨商品(商品名稱、數量、退款\n金額)、物流狀態及客戶聯絡資料。適合客服處理個案或審核退貨申請時使用。\n\n【呼叫的 Shopline API】\n- GET /v1/return_orders/{return_order_id}\n\n【回傳結構】\ndict 包含退貨單基本資訊(id, status, reason, order_id, created_at)、\n金額摘要(total, refund_amount,皆為 TWD float)及 line_items[]。\n每個 line_item 包含 product_name, variant_title, quantity, price。";
2128
+ readonly params: readonly [{
2129
+ readonly name: "return_order_id";
2130
+ readonly description: "退貨單 ID(由 list_return_orders 回傳的 id 欄位)";
2131
+ readonly default: null;
2132
+ readonly hasDefault: false;
2133
+ readonly kind: "string";
2134
+ readonly optional: false;
2135
+ }];
2136
+ readonly docEndpoints: readonly [{
2137
+ readonly method: "GET";
2138
+ readonly path: "/v1/return_orders/{return_order_id}";
2139
+ }];
2140
+ readonly operations: readonly [{
2141
+ readonly kind: "api_get";
2142
+ readonly method: "GET";
2143
+ readonly endpointKey: "return_order_detail";
2144
+ readonly path_params: "path_params";
2145
+ }];
2146
+ readonly sourceLocation: {
2147
+ readonly line: 70;
2148
+ readonly endLine: 112;
2149
+ };
2150
+ }, {
2151
+ readonly module: "tools/review_tools.py";
2152
+ readonly name: "list_product_reviews";
2153
+ readonly write: false;
2154
+ readonly description: "取得商品評價列表。\n\n【用途】\n瀏覽所有商品評價的摘要清單,了解顧客對商品的整體評分與回饋。可用於監控\n評價品質、找出評分偏低的商品,或追蹤近期新增的評論。若需查看單一評價的\n完整內容(含圖片、店家回覆等),請改用 get_product_review_detail。\n\n【呼叫的 Shopline API】\n- GET /v1/product_review_comments\n\n【回傳結構】\ndict 含 total_found, returned, reviews[]。\n每個 review 包含 id, product_id, product_name(多語系翻譯優先取中文),\nrating(評分,通常 1-5), content(評價內容摘要), created_at。";
2155
+ readonly params: readonly [{
2156
+ readonly name: "max_results";
2157
+ readonly description: "最多回傳筆數";
2158
+ readonly default: 50;
2159
+ readonly hasDefault: true;
2160
+ readonly kind: "integer";
2161
+ readonly optional: false;
2162
+ }];
2163
+ readonly docEndpoints: readonly [{
2164
+ readonly method: "GET";
2165
+ readonly path: "/v1/product_review_comments";
2166
+ }];
2167
+ readonly operations: readonly [{
2168
+ readonly kind: "fetch_all_pages";
2169
+ readonly method: "GET";
2170
+ readonly endpointKey: "product_review_comments";
2171
+ }];
2172
+ readonly sourceLocation: {
2173
+ readonly line: 16;
2174
+ readonly endLine: 55;
2175
+ };
2176
+ }, {
2177
+ readonly module: "tools/review_tools.py";
2178
+ readonly name: "get_product_review_detail";
2179
+ readonly write: false;
2180
+ readonly description: "取得單一商品評價的完整內容,包含圖片與店家回覆。\n\n【用途】\n查閱特定評價的詳細資料:完整評論文字、評分、附圖、顧客資訊及店家回覆。\n適用於客服處理評價問題、追蹤店家回應進度,或人工審核評價內容。\n\n【呼叫的 Shopline API】\n- GET /v1/product_review_comments/{comment_id}\n\n【回傳結構】\ndict 包含:\n- id:評價 ID\n- product_id / product_name:商品資訊\n- rating:評分(通常 1–5)\n- content:完整評論文字\n- images[]:附圖 URL 列表\n- reviewer_name:評價者姓名\n- status:評價審核狀態(如 published, pending)\n- reply:店家回覆內容(若有)\n- created_at, updated_at";
2181
+ readonly params: readonly [{
2182
+ readonly name: "comment_id";
2183
+ readonly description: "評價 ID(由 list_product_reviews 回傳的 id 欄位)";
2184
+ readonly default: null;
2185
+ readonly hasDefault: false;
2186
+ readonly kind: "string";
2187
+ readonly optional: false;
2188
+ }];
2189
+ readonly docEndpoints: readonly [{
2190
+ readonly method: "GET";
2191
+ readonly path: "/v1/product_review_comments/{comment_id}";
2192
+ }];
2193
+ readonly operations: readonly [{
2194
+ readonly kind: "api_get";
2195
+ readonly method: "GET";
2196
+ readonly endpointKey: "product_review_comment_detail";
2197
+ readonly path_params: "path_params";
2198
+ }];
2199
+ readonly sourceLocation: {
2200
+ readonly line: 59;
2201
+ readonly endLine: 113;
2202
+ };
2203
+ }, {
2204
+ readonly module: "tools/settings_tools.py";
2205
+ readonly name: "get_app_settings";
2206
+ readonly write: false;
2207
+ readonly description: "取得商店應用程式設定。\n\n【用途】\n查詢商店層級的應用程式設定,包含功能開關、主題設定等。\n適合確認商店目前的功能啟用狀態。\n\n注意:此端點已被 Shopline 標記為 deprecated(已棄用),\n但仍可使用,涵蓋以求完整性。建議優先使用其他設定端點\n取得最新商店資訊。\n\n【呼叫的 Shopline API】\n- GET /v1/settings/app\n\n【回傳結構】\ndict 含 settings,包含各應用程式層級設定欄位。\n實際欄位依商店設定而定。";
2208
+ readonly params: readonly [];
2209
+ readonly docEndpoints: readonly [{
2210
+ readonly method: "GET";
2211
+ readonly path: "/v1/settings/app";
2212
+ }];
2213
+ readonly operations: readonly [{
2214
+ readonly kind: "api_get";
2215
+ readonly method: "GET";
2216
+ readonly endpointKey: "settings_app";
2217
+ }];
2218
+ readonly sourceLocation: {
2219
+ readonly line: 13;
2220
+ readonly endLine: 36;
2221
+ };
2222
+ }, {
2223
+ readonly module: "tools/staff_tools.py";
2224
+ readonly name: "get_staff_permissions";
2225
+ readonly write: false;
2226
+ readonly description: "取得指定員工的權限設定。\n\n【用途】\n查詢特定員工帳號在商店後台的存取權限範圍,\n例如可操作的功能模組及操作層級。適合確認員工\n權限配置或排查存取問題。\n\n【呼叫的 Shopline API】\n- GET /v1/staffs/{staff_id}/permissions\n\n【回傳結構】\ndict 含 staff_id, permissions[]。\n每個 permission 包含 resource, actions 等,\n描述該員工可操作的資源與動作。";
2227
+ readonly params: readonly [{
2228
+ readonly name: "staff_id";
2229
+ readonly description: "";
2230
+ readonly default: null;
2231
+ readonly hasDefault: false;
2232
+ readonly kind: "string";
2233
+ readonly optional: false;
2234
+ }];
2235
+ readonly docEndpoints: readonly [{
2236
+ readonly method: "GET";
2237
+ readonly path: "/v1/staffs/{staff_id}/permissions";
2238
+ }];
2239
+ readonly operations: readonly [{
2240
+ readonly kind: "api_get";
2241
+ readonly method: "GET";
2242
+ readonly endpointKey: "staff_permissions";
2243
+ readonly path_params: "{'staff_id': staff_id}";
2244
+ }];
2245
+ readonly sourceLocation: {
2246
+ readonly line: 13;
2247
+ readonly endLine: 38;
2248
+ };
2249
+ }, {
2250
+ readonly module: "tools/store_credit_tools.py";
2251
+ readonly name: "list_store_credits";
2252
+ readonly write: false;
2253
+ readonly description: "取得所有客戶的儲值金餘額列表。\n\n【用途】\n瀏覽客戶儲值金餘額概況,了解儲值金發放與使用狀況。\n可用於計算儲值金負債、找出高餘額客戶。\n\n【呼叫的 Shopline API】\n- GET /v1/user_credits\n\n【回傳結構】\ndict 含 total_found, returned, total_balance, credits[]。\n每個 credit 包含 customer_id, balance (TWD float)。";
2254
+ readonly params: readonly [{
2255
+ readonly name: "max_results";
2256
+ readonly description: "最多回傳筆數";
2257
+ readonly default: 50;
2258
+ readonly hasDefault: true;
2259
+ readonly kind: "integer";
2260
+ readonly optional: false;
2261
+ }];
2262
+ readonly docEndpoints: readonly [{
2263
+ readonly method: "GET";
2264
+ readonly path: "/v1/user_credits";
2265
+ }];
2266
+ readonly operations: readonly [{
2267
+ readonly kind: "fetch_all_pages";
2268
+ readonly method: "GET";
2269
+ readonly endpointKey: "user_credits";
2270
+ }];
2271
+ readonly sourceLocation: {
2272
+ readonly line: 16;
2273
+ readonly endLine: 50;
2274
+ };
2275
+ }, {
2276
+ readonly module: "tools/subscription_tools.py";
2277
+ readonly name: "list_product_subscriptions";
2278
+ readonly write: false;
2279
+ readonly description: "取得商品訂閱列表。\n\n【用途】\n瀏覽所有商品訂閱紀錄,了解客戶訂閱哪些商品、訂閱狀態與週期設定。\n可取得 subscription_id 後進一步呼叫 get_product_subscription_detail 查詢完整詳情。\n適合分析訂閱收入與客戶留存率。\n\n【呼叫的 Shopline API】\n- GET /v1/product_subscriptions\n\n【回傳結構】\ndict 含 total_found, returned, items[]。\n每筆包含 id, customer_id, product_id, status, frequency, next_billing_at, created_at。";
2280
+ readonly params: readonly [{
2281
+ readonly name: "max_results";
2282
+ readonly description: "最多回傳筆數";
2283
+ readonly default: 50;
2284
+ readonly hasDefault: true;
2285
+ readonly kind: "integer";
2286
+ readonly optional: false;
2287
+ }];
2288
+ readonly docEndpoints: readonly [{
2289
+ readonly method: "GET";
2290
+ readonly path: "/v1/product_subscriptions";
2291
+ }];
2292
+ readonly operations: readonly [{
2293
+ readonly kind: "fetch_all_pages";
2294
+ readonly method: "GET";
2295
+ readonly endpointKey: "product_subscriptions";
2296
+ }];
2297
+ readonly sourceLocation: {
2298
+ readonly line: 16;
2299
+ readonly endLine: 54;
2300
+ };
2301
+ }, {
2302
+ readonly module: "tools/subscription_tools.py";
2303
+ readonly name: "get_product_subscription_detail";
2304
+ readonly write: false;
2305
+ readonly description: "取得單一商品訂閱的完整詳情。\n\n【用途】\n查詢特定訂閱紀錄的完整資訊,包含客戶、商品、付款方式、配送設定與\n訂閱週期等所有欄位。適合客服場景或個別訂閱狀態確認。\n\n【呼叫的 Shopline API】\n- GET /v1/product_subscriptions/{subscription_id}\n\n【回傳結構】\ndict 包含 id, customer_id, product_id, variant_id, status, frequency,\nfrequency_unit, price (TWD), shipping_address, payment_method,\nnext_billing_at, created_at, updated_at 等完整欄位。";
2306
+ readonly params: readonly [{
2307
+ readonly name: "subscription_id";
2308
+ readonly description: "商品訂閱 ID(由 list_product_subscriptions 回傳的 id 欄位)";
2309
+ readonly default: null;
2310
+ readonly hasDefault: false;
2311
+ readonly kind: "string";
2312
+ readonly optional: false;
2313
+ }];
2314
+ readonly docEndpoints: readonly [{
2315
+ readonly method: "GET";
2316
+ readonly path: "/v1/product_subscriptions/{subscription_id}";
2317
+ }];
2318
+ readonly operations: readonly [{
2319
+ readonly kind: "api_get";
2320
+ readonly method: "GET";
2321
+ readonly endpointKey: "product_subscription_detail";
2322
+ readonly path_params: "{'subscription_id': subscription_id}";
2323
+ }];
2324
+ readonly sourceLocation: {
2325
+ readonly line: 58;
2326
+ readonly endLine: 94;
2327
+ };
2328
+ }, {
2329
+ readonly module: "tools/tax_tools.py";
2330
+ readonly name: "list_taxes";
2331
+ readonly write: false;
2332
+ readonly description: "取得商店設定的稅率清單。\n\n【用途】\n查看商店目前設定的稅率規則,例如營業稅、消費稅等。\n適合確認稅率設定或在財務分析時核對稅務規則。\n\n【呼叫的 Shopline API】\n- GET /v1/taxes\n\n【回傳結構】\ndict 含 total, taxes[]。\n每個 tax 包含 id, name, rate, included_in_price,\ncountry, region, created_at 等。";
2333
+ readonly params: readonly [];
2334
+ readonly docEndpoints: readonly [{
2335
+ readonly method: "GET";
2336
+ readonly path: "/v1/taxes";
2337
+ }];
2338
+ readonly operations: readonly [{
2339
+ readonly kind: "api_get";
2340
+ readonly method: "GET";
2341
+ readonly endpointKey: "taxes";
2342
+ }];
2343
+ readonly sourceLocation: {
2344
+ readonly line: 13;
2345
+ readonly endLine: 47;
2346
+ };
2347
+ }, {
2348
+ readonly module: "tools/token_tools.py";
2349
+ readonly name: "get_token_info";
2350
+ readonly write: false;
2351
+ readonly description: "取得目前 API Token 的資訊與授權範圍。\n\n【用途】\n查詢此 API Token 的詳細資訊,包含所屬商家、\n授權的 scope(權限範圍)以及有效期限等。\n適合排查 API 存取問題、確認 token 是否擁有\n所需的操作權限。\n\n【呼叫的 Shopline API】\n- GET /v1/token/info\n\n【回傳結構】\ndict 含 token_info,包含 merchant_id, scopes[],\nexpires_at, created_at 等欄位。";
2352
+ readonly params: readonly [];
2353
+ readonly docEndpoints: readonly [{
2354
+ readonly method: "GET";
2355
+ readonly path: "/v1/token/info";
2356
+ }];
2357
+ readonly operations: readonly [{
2358
+ readonly kind: "api_get";
2359
+ readonly method: "GET";
2360
+ readonly endpointKey: "token_info";
2361
+ }];
2362
+ readonly sourceLocation: {
2363
+ readonly line: 13;
2364
+ readonly endLine: 34;
2365
+ };
2366
+ }, {
2367
+ readonly module: "tools/writes/category_writes.py";
2368
+ readonly name: "create_category";
2369
+ readonly write: true;
2370
+ readonly description: "[WRITE] 建立新商品分類。\n\n【用途】\n在 Shopline 商店中建立新的商品分類,可指定父分類以建立層級結構。\n\n【呼叫的 Shopline API】\n- POST /v1/categories\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, category: dict。\n\n【副作用】\n- 在商店分類列表中新增一筆分類記錄\n- 若 parent_id 不存在,API 可能回傳錯誤";
2371
+ readonly params: readonly [{
2372
+ readonly name: "category_data";
2373
+ readonly description: "分類資料,例如 {\"name\": \"夏季新品\", \"parent_id\": null}";
2374
+ readonly default: null;
2375
+ readonly hasDefault: false;
2376
+ readonly kind: "object";
2377
+ readonly optional: false;
2378
+ }];
2379
+ readonly docEndpoints: readonly [{
2380
+ readonly method: "POST";
2381
+ readonly path: "/v1/categories";
2382
+ }];
2383
+ readonly operations: readonly [{
2384
+ readonly kind: "api_post";
2385
+ readonly method: "POST";
2386
+ readonly endpointKey: "category_create";
2387
+ readonly json_body: "category_data";
2388
+ }];
2389
+ readonly sourceLocation: {
2390
+ readonly line: 15;
2391
+ readonly endLine: 43;
2392
+ };
2393
+ }, {
2394
+ readonly module: "tools/writes/category_writes.py";
2395
+ readonly name: "update_category";
2396
+ readonly write: true;
2397
+ readonly description: "[WRITE] 更新商品分類資料。\n\n【用途】\n修改分類名稱、排序、父分類等屬性。僅傳入要修改的欄位,未傳入的欄位不會被覆蓋。\n\n【呼叫的 Shopline API】\n- PUT /v1/categories/{category_id}\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 分類資料變更立即生效,影響前台分類導覽顯示\n- 不可復原,但可再次呼叫此工具覆蓋";
2398
+ readonly params: readonly [{
2399
+ readonly name: "category_id";
2400
+ readonly description: "分類 ID";
2401
+ readonly default: null;
2402
+ readonly hasDefault: false;
2403
+ readonly kind: "string";
2404
+ readonly optional: false;
2405
+ }, {
2406
+ readonly name: "category_data";
2407
+ readonly description: "要更新的分類欄位,例如 {\"name\": \"冬季特賣\"}";
2408
+ readonly default: null;
2409
+ readonly hasDefault: false;
2410
+ readonly kind: "object";
2411
+ readonly optional: false;
2412
+ }];
2413
+ readonly docEndpoints: readonly [{
2414
+ readonly method: "PUT";
2415
+ readonly path: "/v1/categories/{category_id}";
2416
+ }];
2417
+ readonly operations: readonly [{
2418
+ readonly kind: "api_put";
2419
+ readonly method: "PUT";
2420
+ readonly endpointKey: "category_update";
2421
+ readonly json_body: "category_data";
2422
+ readonly path_params: "{'category_id': category_id}";
2423
+ }];
2424
+ readonly sourceLocation: {
2425
+ readonly line: 47;
2426
+ readonly endLine: 72;
2427
+ };
2428
+ }, {
2429
+ readonly module: "tools/writes/category_writes.py";
2430
+ readonly name: "delete_category";
2431
+ readonly write: true;
2432
+ readonly description: "[WRITE] 刪除商品分類。\n\n【用途】\n從 Shopline 商店中永久刪除指定分類。適合清除已停用或錯誤建立的分類。\n\n【呼叫的 Shopline API】\n- DELETE /v1/categories/{category_id}\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 永久刪除分類記錄,不可復原\n- 原本屬於此分類的商品將解除分類關聯,商品本身不會被刪除\n- 若有子分類,子分類的父分類關聯可能一併受影響(視 Shopline 實作而定)";
2433
+ readonly params: readonly [{
2434
+ readonly name: "category_id";
2435
+ readonly description: "分類 ID";
2436
+ readonly default: null;
2437
+ readonly hasDefault: false;
2438
+ readonly kind: "string";
2439
+ readonly optional: false;
2440
+ }];
2441
+ readonly docEndpoints: readonly [{
2442
+ readonly method: "DELETE";
2443
+ readonly path: "/v1/categories/{category_id}";
2444
+ }];
2445
+ readonly operations: readonly [{
2446
+ readonly kind: "api_delete";
2447
+ readonly method: "DELETE";
2448
+ readonly endpointKey: "category_delete";
2449
+ readonly path_params: "{'category_id': category_id}";
2450
+ }];
2451
+ readonly sourceLocation: {
2452
+ readonly line: 76;
2453
+ readonly endLine: 100;
2454
+ };
2455
+ }, {
2456
+ readonly module: "tools/writes/conversation_writes.py";
2457
+ readonly name: "send_order_message";
2458
+ readonly write: true;
2459
+ readonly description: "[WRITE] 發送與特定訂單相關的對話訊息。\n\n【用途】\n針對指定訂單發送訊息給買家,適用於出貨通知、客服回覆、訂單異常說明等場景。\n\n【呼叫的 Shopline API】\n- POST /v1/conversations/order-messages\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, conversation: dict。\n\n【副作用】\n- 在買家的對話收件匣中新增一則訊息,買家可即時收到通知\n- 訊息送出後無法撤回或修改";
2460
+ readonly params: readonly [{
2461
+ readonly name: "message_data";
2462
+ readonly description: "訊息資料,例如 {\"order_id\": \"ORD123\", \"message\": \"您的訂單已出貨,請注意查收!\", \"sender_type\": \"merchant\"}";
2463
+ readonly default: null;
2464
+ readonly hasDefault: false;
2465
+ readonly kind: "object";
2466
+ readonly optional: false;
2467
+ }];
2468
+ readonly docEndpoints: readonly [{
2469
+ readonly method: "POST";
2470
+ readonly path: "/v1/conversations/order-messages";
2471
+ }];
2472
+ readonly operations: readonly [{
2473
+ readonly kind: "api_post";
2474
+ readonly method: "POST";
2475
+ readonly endpointKey: "conversation_order_message";
2476
+ readonly json_body: "message_data";
2477
+ }];
2478
+ readonly sourceLocation: {
2479
+ readonly line: 15;
2480
+ readonly endLine: 47;
2481
+ };
2482
+ }, {
2483
+ readonly module: "tools/writes/conversation_writes.py";
2484
+ readonly name: "send_shop_message";
2485
+ readonly write: true;
2486
+ readonly description: "[WRITE] 發送一般商店對話訊息。\n\n【用途】\n對客戶發送非特定訂單的通用訊息,適用於行銷通知、活動公告、客服主動聯繫等場景。\n\n【呼叫的 Shopline API】\n- POST /v1/conversations/shop-messages\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, conversation: dict。\n\n【副作用】\n- 在客戶的對話收件匣中新增一則商店訊息,客戶可即時收到通知\n- 訊息送出後無法撤回或修改\n- 大量發送時請注意 Shopline 的訊息頻率限制,以避免觸發反垃圾機制";
2487
+ readonly params: readonly [{
2488
+ readonly name: "message_data";
2489
+ readonly description: "訊息資料,例如 {\"customer_id\": \"CUST456\", \"message\": \"感謝您的支持,本週特惠活動開始囉!\", \"sender_type\": \"merchant\"}";
2490
+ readonly default: null;
2491
+ readonly hasDefault: false;
2492
+ readonly kind: "object";
2493
+ readonly optional: false;
2494
+ }];
2495
+ readonly docEndpoints: readonly [{
2496
+ readonly method: "POST";
2497
+ readonly path: "/v1/conversations/shop-messages";
2498
+ }];
2499
+ readonly operations: readonly [{
2500
+ readonly kind: "api_post";
2501
+ readonly method: "POST";
2502
+ readonly endpointKey: "conversation_shop_message";
2503
+ readonly json_body: "message_data";
2504
+ }];
2505
+ readonly sourceLocation: {
2506
+ readonly line: 51;
2507
+ readonly endLine: 84;
2508
+ };
2509
+ }, {
2510
+ readonly module: "tools/writes/customer_writes.py";
2511
+ readonly name: "create_customer";
2512
+ readonly write: true;
2513
+ readonly description: "[WRITE] 建立新客戶。\n\n【用途】\n在 Shopline 商店中建立新的客戶記錄。適合客服手動建檔或批次匯入場景。\n\n【呼叫的 Shopline API】\n- POST /v1/customers\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, customer: dict。\n\n【副作用】\n- 在商店客戶列表中新增一筆客戶\n- 如果 email 或 phone 已存在,可能會失敗(Shopline 可能不允許重複)";
2514
+ readonly params: readonly [{
2515
+ readonly name: "name";
2516
+ readonly description: "客戶姓名";
2517
+ readonly default: null;
2518
+ readonly hasDefault: false;
2519
+ readonly kind: "string";
2520
+ readonly optional: false;
2521
+ }, {
2522
+ readonly name: "email";
2523
+ readonly description: "Email";
2524
+ readonly default: null;
2525
+ readonly hasDefault: true;
2526
+ readonly kind: "string";
2527
+ readonly optional: true;
2528
+ }, {
2529
+ readonly name: "phone";
2530
+ readonly description: "電話";
2531
+ readonly default: null;
2532
+ readonly hasDefault: true;
2533
+ readonly kind: "string";
2534
+ readonly optional: true;
2535
+ }, {
2536
+ readonly name: "gender";
2537
+ readonly description: "性別 (male/female/other)";
2538
+ readonly default: null;
2539
+ readonly hasDefault: true;
2540
+ readonly kind: "string";
2541
+ readonly optional: true;
2542
+ }, {
2543
+ readonly name: "birthday";
2544
+ readonly description: "生日 YYYY-MM-DD";
2545
+ readonly default: null;
2546
+ readonly hasDefault: true;
2547
+ readonly kind: "string";
2548
+ readonly optional: true;
2549
+ }, {
2550
+ readonly name: "tags";
2551
+ readonly description: "標籤列表";
2552
+ readonly default: null;
2553
+ readonly hasDefault: true;
2554
+ readonly kind: "array";
2555
+ readonly optional: true;
2556
+ }];
2557
+ readonly docEndpoints: readonly [{
2558
+ readonly method: "POST";
2559
+ readonly path: "/v1/customers";
2560
+ }];
2561
+ readonly operations: readonly [{
2562
+ readonly kind: "api_post";
2563
+ readonly method: "POST";
2564
+ readonly endpointKey: "customer_create";
2565
+ readonly json_body: "body";
2566
+ }];
2567
+ readonly sourceLocation: {
2568
+ readonly line: 16;
2569
+ readonly endLine: 62;
2570
+ };
2571
+ }, {
2572
+ readonly module: "tools/writes/customer_writes.py";
2573
+ readonly name: "update_customer";
2574
+ readonly write: true;
2575
+ readonly description: "[WRITE] 更新客戶基本資料。\n\n【用途】\n修改客戶姓名、聯絡方式、生日等基本資料。僅傳入要修改的欄位,未傳入的欄位不會被覆蓋。\n\n【呼叫的 Shopline API】\n- PUT /v1/customers/{customer_id}\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 修改客戶資料,變更立即生效\n- 不可復原(無版本歷史),但可再次呼叫此工具覆蓋";
2576
+ readonly params: readonly [{
2577
+ readonly name: "customer_id";
2578
+ readonly description: "客戶內部 ID";
2579
+ readonly default: null;
2580
+ readonly hasDefault: false;
2581
+ readonly kind: "string";
2582
+ readonly optional: false;
2583
+ }, {
2584
+ readonly name: "name";
2585
+ readonly description: "新姓名";
2586
+ readonly default: null;
2587
+ readonly hasDefault: true;
2588
+ readonly kind: "string";
2589
+ readonly optional: true;
2590
+ }, {
2591
+ readonly name: "email";
2592
+ readonly description: "新 Email";
2593
+ readonly default: null;
2594
+ readonly hasDefault: true;
2595
+ readonly kind: "string";
2596
+ readonly optional: true;
2597
+ }, {
2598
+ readonly name: "phone";
2599
+ readonly description: "新電話";
2600
+ readonly default: null;
2601
+ readonly hasDefault: true;
2602
+ readonly kind: "string";
2603
+ readonly optional: true;
2604
+ }, {
2605
+ readonly name: "gender";
2606
+ readonly description: "性別 (male/female/other)";
2607
+ readonly default: null;
2608
+ readonly hasDefault: true;
2609
+ readonly kind: "string";
2610
+ readonly optional: true;
2611
+ }, {
2612
+ readonly name: "birthday";
2613
+ readonly description: "生日 YYYY-MM-DD";
2614
+ readonly default: null;
2615
+ readonly hasDefault: true;
2616
+ readonly kind: "string";
2617
+ readonly optional: true;
2618
+ }];
2619
+ readonly docEndpoints: readonly [{
2620
+ readonly method: "PUT";
2621
+ readonly path: "/v1/customers/{customer_id}";
2622
+ }];
2623
+ readonly operations: readonly [{
2624
+ readonly kind: "api_put";
2625
+ readonly method: "PUT";
2626
+ readonly endpointKey: "customer_update";
2627
+ readonly json_body: "body";
2628
+ readonly path_params: "{'customer_id': customer_id}";
2629
+ }];
2630
+ readonly sourceLocation: {
2631
+ readonly line: 66;
2632
+ readonly endLine: 109;
2633
+ };
2634
+ }, {
2635
+ readonly module: "tools/writes/customer_writes.py";
2636
+ readonly name: "delete_customer";
2637
+ readonly write: true;
2638
+ readonly description: "[WRITE] 刪除客戶。\n\n【用途】\n從 Shopline 商店中刪除客戶記錄。通常用於清除測試資料或 GDPR 合規需求。\n\n【呼叫的 Shopline API】\n- DELETE /v1/customers/{customer_id}\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 永久刪除客戶記錄,不可復原\n- 客戶相關的訂單紀錄可能仍保留(取決於 Shopline 實作)";
2639
+ readonly params: readonly [{
2640
+ readonly name: "customer_id";
2641
+ readonly description: "客戶內部 ID";
2642
+ readonly default: null;
2643
+ readonly hasDefault: false;
2644
+ readonly kind: "string";
2645
+ readonly optional: false;
2646
+ }];
2647
+ readonly docEndpoints: readonly [{
2648
+ readonly method: "DELETE";
2649
+ readonly path: "/v1/customers/{customer_id}";
2650
+ }];
2651
+ readonly operations: readonly [{
2652
+ readonly kind: "api_delete";
2653
+ readonly method: "DELETE";
2654
+ readonly endpointKey: "customer_delete";
2655
+ readonly path_params: "{'customer_id': customer_id}";
2656
+ }];
2657
+ readonly sourceLocation: {
2658
+ readonly line: 113;
2659
+ readonly endLine: 136;
2660
+ };
2661
+ }, {
2662
+ readonly module: "tools/writes/customer_writes.py";
2663
+ readonly name: "update_customer_tags";
2664
+ readonly write: true;
2665
+ readonly description: "[WRITE] 設定客戶標籤(覆蓋現有標籤)。\n\n【用途】\n為客戶設定標籤,常用於行銷分群、VIP 標記等。注意:會覆蓋客戶現有的所有標籤。\n\n【呼叫的 Shopline API】\n- PUT /v1/customers/{customer_id}/tags\n- POST /v1/customers/{customer_id}/tags\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 覆蓋客戶的所有現有標籤為新的標籤列表\n- 若要新增標籤而非覆蓋,請先用 get_customer_profile 取得現有標籤再合併";
2666
+ readonly params: readonly [{
2667
+ readonly name: "customer_id";
2668
+ readonly description: "客戶內部 ID";
2669
+ readonly default: null;
2670
+ readonly hasDefault: false;
2671
+ readonly kind: "string";
2672
+ readonly optional: false;
2673
+ }, {
2674
+ readonly name: "tags";
2675
+ readonly description: "標籤列表(會取代現有標籤)";
2676
+ readonly default: null;
2677
+ readonly hasDefault: false;
2678
+ readonly kind: "array";
2679
+ readonly optional: false;
2680
+ }];
2681
+ readonly docEndpoints: readonly [{
2682
+ readonly method: "PUT";
2683
+ readonly path: "/v1/customers/{customer_id}/tags";
2684
+ }, {
2685
+ readonly method: "POST";
2686
+ readonly path: "/v1/customers/{customer_id}/tags";
2687
+ }];
2688
+ readonly operations: readonly [{
2689
+ readonly kind: "api_put";
2690
+ readonly method: "PUT";
2691
+ readonly endpointKey: "customer_tags";
2692
+ readonly json_body: "{'tags': tags}";
2693
+ readonly path_params: "{'customer_id': customer_id}";
2694
+ }];
2695
+ readonly sourceLocation: {
2696
+ readonly line: 140;
2697
+ readonly endLine: 166;
2698
+ };
2699
+ }, {
2700
+ readonly module: "tools/writes/customer_writes.py";
2701
+ readonly name: "update_customer_store_credits";
2702
+ readonly write: true;
2703
+ readonly description: "[WRITE] 調整客戶儲值金餘額。\n\n【用途】\n增加或扣除客戶儲值金,常用於儲值金充值、退款補償、活動贈送等場景。\n\n【呼叫的 Shopline API】\n- PUT /v1/customers/{customer_id}/store-credits\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 客戶儲值金餘額立即變動\n- 異動紀錄會寫入客戶的儲值金歷史(可透過 get_customer_profile 查看)\n- 扣除後如餘額不足,API 可能回傳錯誤";
2704
+ readonly params: readonly [{
2705
+ readonly name: "customer_id";
2706
+ readonly description: "客戶內部 ID";
2707
+ readonly default: null;
2708
+ readonly hasDefault: false;
2709
+ readonly kind: "string";
2710
+ readonly optional: false;
2711
+ }, {
2712
+ readonly name: "amount";
2713
+ readonly description: "調整金額(正數=增加,負數=扣除)";
2714
+ readonly default: null;
2715
+ readonly hasDefault: false;
2716
+ readonly kind: "number";
2717
+ readonly optional: false;
2718
+ }, {
2719
+ readonly name: "note";
2720
+ readonly description: "調整備註/原因";
2721
+ readonly default: null;
2722
+ readonly hasDefault: true;
2723
+ readonly kind: "string";
2724
+ readonly optional: true;
2725
+ }];
2726
+ readonly docEndpoints: readonly [{
2727
+ readonly method: "PUT";
2728
+ readonly path: "/v1/customers/{customer_id}/store-credits";
2729
+ }];
2730
+ readonly operations: readonly [{
2731
+ readonly kind: "api_put";
2732
+ readonly method: "PUT";
2733
+ readonly endpointKey: "customer_store_credits_update";
2734
+ readonly json_body: "body";
2735
+ readonly path_params: "{'customer_id': customer_id}";
2736
+ }];
2737
+ readonly sourceLocation: {
2738
+ readonly line: 170;
2739
+ readonly endLine: 201;
2740
+ };
2741
+ }, {
2742
+ readonly module: "tools/writes/customer_writes.py";
2743
+ readonly name: "adjust_customer_member_points";
2744
+ readonly write: true;
2745
+ readonly description: "[WRITE] 調整客戶會員點數。\n\n【用途】\n增加或扣除客戶會員點數,常用於手動補點、活動贈點、客訴補償等場景。\n\n【呼叫的 Shopline API】\n- PUT /v1/customers/{customer_id}/member-points\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 客戶點數餘額立即變動\n- 異動紀錄會寫入客戶的點數歷史(可透過 get_customer_profile 查看)\n- 扣除後如點數不足,API 可能回傳錯誤";
2746
+ readonly params: readonly [{
2747
+ readonly name: "customer_id";
2748
+ readonly description: "客戶內部 ID";
2749
+ readonly default: null;
2750
+ readonly hasDefault: false;
2751
+ readonly kind: "string";
2752
+ readonly optional: false;
2753
+ }, {
2754
+ readonly name: "points";
2755
+ readonly description: "調整點數(正數=增加,負數=扣除)";
2756
+ readonly default: null;
2757
+ readonly hasDefault: false;
2758
+ readonly kind: "integer";
2759
+ readonly optional: false;
2760
+ }, {
2761
+ readonly name: "note";
2762
+ readonly description: "調整備註/原因";
2763
+ readonly default: null;
2764
+ readonly hasDefault: true;
2765
+ readonly kind: "string";
2766
+ readonly optional: true;
2767
+ }];
2768
+ readonly docEndpoints: readonly [{
2769
+ readonly method: "PUT";
2770
+ readonly path: "/v1/customers/{customer_id}/member-points";
2771
+ }];
2772
+ readonly operations: readonly [{
2773
+ readonly kind: "api_put";
2774
+ readonly method: "PUT";
2775
+ readonly endpointKey: "customer_member_points_update";
2776
+ readonly json_body: "body";
2777
+ readonly path_params: "{'customer_id': customer_id}";
2778
+ }];
2779
+ readonly sourceLocation: {
2780
+ readonly line: 205;
2781
+ readonly endLine: 236;
2782
+ };
2783
+ }, {
2784
+ readonly module: "tools/writes/delivery_option_writes.py";
2785
+ readonly name: "update_pickup_store";
2786
+ readonly write: true;
2787
+ readonly description: "[WRITE] 更新配送選項的自取門市資訊。\n\n【用途】\n修改指定配送選項下的自取門市(Pickup Store)資訊,例如更新門市名稱、地址、電話、營業時間等。\n適合門市資訊異動時同步更新 Shopline 的自取門市設定。\n\n【呼叫的 Shopline API】\n- PUT /v1/delivery_options/{delivery_option_id}/pickup_store\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 修改指定配送選項下的自取門市資訊,變更立即生效\n- 顧客於結帳頁選擇自取時將看到更新後的門市資訊\n- 不可復原,但可再次呼叫此工具覆蓋";
2788
+ readonly params: readonly [{
2789
+ readonly name: "delivery_option_id";
2790
+ readonly description: "配送選項 ID";
2791
+ readonly default: null;
2792
+ readonly hasDefault: false;
2793
+ readonly kind: "string";
2794
+ readonly optional: false;
2795
+ }, {
2796
+ readonly name: "pickup_store_data";
2797
+ readonly description: "自取門市資料,例如:{\"store_name\": \"台北信義門市\", \"address\": \"台北市信義區...\", \"phone\": \"02-1234-5678\", \"business_hours\": \"10:00-22:00\"}";
2798
+ readonly default: null;
2799
+ readonly hasDefault: false;
2800
+ readonly kind: "object";
2801
+ readonly optional: false;
2802
+ }];
2803
+ readonly docEndpoints: readonly [{
2804
+ readonly method: "PUT";
2805
+ readonly path: "/v1/delivery_options/{delivery_option_id}/pickup_store";
2806
+ }];
2807
+ readonly operations: readonly [{
2808
+ readonly kind: "api_put";
2809
+ readonly method: "PUT";
2810
+ readonly endpointKey: "delivery_option_pickup_store";
2811
+ readonly json_body: "pickup_store_data";
2812
+ readonly path_params: "{'delivery_option_id': delivery_option_id}";
2813
+ }];
2814
+ readonly sourceLocation: {
2815
+ readonly line: 15;
2816
+ readonly endLine: 50;
2817
+ };
2818
+ }, {
2819
+ readonly module: "tools/writes/gift_writes.py";
2820
+ readonly name: "create_gift";
2821
+ readonly write: true;
2822
+ readonly description: "[WRITE] 建立新贈品。\n\n【用途】\n在 Shopline 商店中建立一個新的贈品記錄,可搭配促銷活動使用。\n\n【呼叫的 Shopline API】\n- POST /v1/gifts\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, gift: dict。\n\n【副作用】\n- 在商店贈品列表中新增一筆記錄\n- 贈品建立後可透過促銷規則設定觸發條件";
2823
+ readonly params: readonly [{
2824
+ readonly name: "gift_data";
2825
+ readonly description: "贈品資料,例如 {name, sku, quantity, ...}";
2826
+ readonly default: null;
2827
+ readonly hasDefault: false;
2828
+ readonly kind: "object";
2829
+ readonly optional: false;
2830
+ }];
2831
+ readonly docEndpoints: readonly [{
2832
+ readonly method: "POST";
2833
+ readonly path: "/v1/gifts";
2834
+ }];
2835
+ readonly operations: readonly [{
2836
+ readonly kind: "api_post";
2837
+ readonly method: "POST";
2838
+ readonly endpointKey: "gift_create";
2839
+ readonly json_body: "gift_data";
2840
+ }];
2841
+ readonly sourceLocation: {
2842
+ readonly line: 15;
2843
+ readonly endLine: 40;
2844
+ };
2845
+ }, {
2846
+ readonly module: "tools/writes/gift_writes.py";
2847
+ readonly name: "update_gift";
2848
+ readonly write: true;
2849
+ readonly description: "[WRITE] 更新贈品資料。\n\n【用途】\n修改指定贈品的名稱、數量、圖片等欄位。僅傳入要修改的欄位。\n\n【呼叫的 Shopline API】\n- PATCH /v1/gifts/{gift_id}\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 修改指定贈品的資料,變更立即生效\n- 不可復原,但可再次呼叫此工具覆蓋";
2850
+ readonly params: readonly [{
2851
+ readonly name: "gift_id";
2852
+ readonly description: "贈品 ID";
2853
+ readonly default: null;
2854
+ readonly hasDefault: false;
2855
+ readonly kind: "string";
2856
+ readonly optional: false;
2857
+ }, {
2858
+ readonly name: "gift_data";
2859
+ readonly description: "要更新的贈品欄位,例如 {name, quantity, ...}";
2860
+ readonly default: null;
2861
+ readonly hasDefault: false;
2862
+ readonly kind: "object";
2863
+ readonly optional: false;
2864
+ }];
2865
+ readonly docEndpoints: readonly [{
2866
+ readonly method: "PATCH";
2867
+ readonly path: "/v1/gifts/{gift_id}";
2868
+ }];
2869
+ readonly operations: readonly [{
2870
+ readonly kind: "api_patch";
2871
+ readonly method: "PATCH";
2872
+ readonly endpointKey: "gift_update";
2873
+ readonly json_body: "gift_data";
2874
+ readonly path_params: "{'gift_id': gift_id}";
2875
+ }];
2876
+ readonly sourceLocation: {
2877
+ readonly line: 44;
2878
+ readonly endLine: 71;
2879
+ };
2880
+ }, {
2881
+ readonly module: "tools/writes/gift_writes.py";
2882
+ readonly name: "update_gift_quantity_by_sku";
2883
+ readonly write: true;
2884
+ readonly description: "[WRITE] 依 SKU 更新贈品庫存數量。\n\n【用途】\n直接以 SKU 為索引更新贈品庫存數量,適合批次庫存同步場景。\n\n【呼叫的 Shopline API】\n- PATCH /v1/gifts/quantity-by-sku\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 指定 SKU 的贈品庫存數量將被覆蓋為新值\n- 庫存變動立即生效,影響贈品可用性";
2885
+ readonly params: readonly [{
2886
+ readonly name: "sku";
2887
+ readonly description: "贈品 SKU 編號";
2888
+ readonly default: null;
2889
+ readonly hasDefault: false;
2890
+ readonly kind: "string";
2891
+ readonly optional: false;
2892
+ }, {
2893
+ readonly name: "quantity";
2894
+ readonly description: "新的庫存數量(絕對值,非差異)";
2895
+ readonly default: null;
2896
+ readonly hasDefault: false;
2897
+ readonly kind: "integer";
2898
+ readonly optional: false;
2899
+ }];
2900
+ readonly docEndpoints: readonly [{
2901
+ readonly method: "PATCH";
2902
+ readonly path: "/v1/gifts/quantity-by-sku";
2903
+ }];
2904
+ readonly operations: readonly [{
2905
+ readonly kind: "api_patch";
2906
+ readonly method: "PATCH";
2907
+ readonly endpointKey: "gift_quantity_by_sku";
2908
+ readonly json_body: "{'sku': sku, 'quantity': quantity}";
2909
+ }];
2910
+ readonly sourceLocation: {
2911
+ readonly line: 75;
2912
+ readonly endLine: 99;
2913
+ };
2914
+ }, {
2915
+ readonly module: "tools/writes/gift_writes.py";
2916
+ readonly name: "create_addon_product";
2917
+ readonly write: true;
2918
+ readonly description: "[WRITE] 建立新加購商品。\n\n【用途】\n在 Shopline 商店中建立一個新的加購商品(Addon Product),可於結帳時讓顧客選購。\n\n【呼叫的 Shopline API】\n- POST /v1/addon_products\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, addon_product: dict。\n\n【副作用】\n- 在商店加購商品列表中新增一筆記錄\n- 建立後需於促銷或商品設定中啟用才會顯示給顧客";
2919
+ readonly params: readonly [{
2920
+ readonly name: "addon_data";
2921
+ readonly description: "加購商品資料,例如 {name, sku, price, quantity, ...}";
2922
+ readonly default: null;
2923
+ readonly hasDefault: false;
2924
+ readonly kind: "object";
2925
+ readonly optional: false;
2926
+ }];
2927
+ readonly docEndpoints: readonly [{
2928
+ readonly method: "POST";
2929
+ readonly path: "/v1/addon_products";
2930
+ }];
2931
+ readonly operations: readonly [{
2932
+ readonly kind: "api_post";
2933
+ readonly method: "POST";
2934
+ readonly endpointKey: "addon_product_create";
2935
+ readonly json_body: "addon_data";
2936
+ }];
2937
+ readonly sourceLocation: {
2938
+ readonly line: 103;
2939
+ readonly endLine: 128;
2940
+ };
2941
+ }, {
2942
+ readonly module: "tools/writes/gift_writes.py";
2943
+ readonly name: "update_addon_product";
2944
+ readonly write: true;
2945
+ readonly description: "[WRITE] 更新加購商品資料。\n\n【用途】\n修改指定加購商品的名稱、價格、圖片等欄位。僅傳入要修改的欄位。\n\n【呼叫的 Shopline API】\n- PUT /v1/addon_products/{addon_product_id}\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 修改指定加購商品的資料,變更立即生效\n- 不可復原,但可再次呼叫此工具覆蓋";
2946
+ readonly params: readonly [{
2947
+ readonly name: "addon_product_id";
2948
+ readonly description: "加購商品 ID";
2949
+ readonly default: null;
2950
+ readonly hasDefault: false;
2951
+ readonly kind: "string";
2952
+ readonly optional: false;
2953
+ }, {
2954
+ readonly name: "addon_data";
2955
+ readonly description: "要更新的加購商品欄位,例如 {name, price, ...}";
2956
+ readonly default: null;
2957
+ readonly hasDefault: false;
2958
+ readonly kind: "object";
2959
+ readonly optional: false;
2960
+ }];
2961
+ readonly docEndpoints: readonly [{
2962
+ readonly method: "PUT";
2963
+ readonly path: "/v1/addon_products/{addon_product_id}";
2964
+ }];
2965
+ readonly operations: readonly [{
2966
+ readonly kind: "api_put";
2967
+ readonly method: "PUT";
2968
+ readonly endpointKey: "addon_product_update";
2969
+ readonly json_body: "addon_data";
2970
+ readonly path_params: "{'addon_product_id': addon_product_id}";
2971
+ }];
2972
+ readonly sourceLocation: {
2973
+ readonly line: 132;
2974
+ readonly endLine: 160;
2975
+ };
2976
+ }, {
2977
+ readonly module: "tools/writes/gift_writes.py";
2978
+ readonly name: "update_addon_product_quantity";
2979
+ readonly write: true;
2980
+ readonly description: "[WRITE] 更新加購商品庫存數量。\n\n【用途】\n直接以 ID 更新指定加購商品的庫存數量。\n\n【呼叫的 Shopline API】\n- PUT /v1/addon_products/{addon_product_id}/quantity\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 指定加購商品的庫存數量將被覆蓋為新值\n- 庫存變動立即生效";
2981
+ readonly params: readonly [{
2982
+ readonly name: "addon_product_id";
2983
+ readonly description: "加購商品 ID";
2984
+ readonly default: null;
2985
+ readonly hasDefault: false;
2986
+ readonly kind: "string";
2987
+ readonly optional: false;
2988
+ }, {
2989
+ readonly name: "quantity";
2990
+ readonly description: "新的庫存數量(絕對值,非差異)";
2991
+ readonly default: null;
2992
+ readonly hasDefault: false;
2993
+ readonly kind: "integer";
2994
+ readonly optional: false;
2995
+ }];
2996
+ readonly docEndpoints: readonly [{
2997
+ readonly method: "PUT";
2998
+ readonly path: "/v1/addon_products/{addon_product_id}/quantity";
2999
+ }];
3000
+ readonly operations: readonly [{
3001
+ readonly kind: "api_put";
3002
+ readonly method: "PUT";
3003
+ readonly endpointKey: "addon_product_quantity";
3004
+ readonly json_body: "{'quantity': quantity}";
3005
+ readonly path_params: "{'addon_product_id': addon_product_id}";
3006
+ }];
3007
+ readonly sourceLocation: {
3008
+ readonly line: 164;
3009
+ readonly endLine: 189;
3010
+ };
3011
+ }, {
3012
+ readonly module: "tools/writes/gift_writes.py";
3013
+ readonly name: "update_addon_product_quantity_by_sku";
3014
+ readonly write: true;
3015
+ readonly description: "[WRITE] 依 SKU 更新加購商品庫存數量。\n\n【用途】\n直接以 SKU 為索引更新加購商品庫存數量,適合批次庫存同步場景。\n\n【呼叫的 Shopline API】\n- PUT /v1/addon_products/sku/quantity\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 指定 SKU 的加購商品庫存數量將被覆蓋為新值\n- 庫存變動立即生效";
3016
+ readonly params: readonly [{
3017
+ readonly name: "sku";
3018
+ readonly description: "加購商品 SKU 編號";
3019
+ readonly default: null;
3020
+ readonly hasDefault: false;
3021
+ readonly kind: "string";
3022
+ readonly optional: false;
3023
+ }, {
3024
+ readonly name: "quantity";
3025
+ readonly description: "新的庫存數量(絕對值,非差異)";
3026
+ readonly default: null;
3027
+ readonly hasDefault: false;
3028
+ readonly kind: "integer";
3029
+ readonly optional: false;
3030
+ }];
3031
+ readonly docEndpoints: readonly [{
3032
+ readonly method: "PUT";
3033
+ readonly path: "/v1/addon_products/sku/quantity";
3034
+ }];
3035
+ readonly operations: readonly [{
3036
+ readonly kind: "api_put";
3037
+ readonly method: "PUT";
3038
+ readonly endpointKey: "addon_product_sku_quantity";
3039
+ readonly json_body: "{'sku': sku, 'quantity': quantity}";
3040
+ }];
3041
+ readonly sourceLocation: {
3042
+ readonly line: 193;
3043
+ readonly endLine: 217;
3044
+ };
3045
+ }, {
3046
+ readonly module: "tools/writes/media_writes.py";
3047
+ readonly name: "upload_media";
3048
+ readonly write: true;
3049
+ readonly description: "[WRITE] 上傳媒體檔案至 Shopline。\n\n【用途】\n上傳圖片或其他媒體檔案至 Shopline 媒體庫,上傳後可取得媒體 ID 供商品圖片等用途使用。\n注意:Shopline API 可能需要 multipart/form-data,本工具目前以 JSON body 傳送,\n若 API 回傳格式錯誤,請改用 multipart 上傳方式。\n\n【呼叫的 Shopline API】\n- POST /v1/media\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, media: dict。\n\n【副作用】\n- 在 Shopline 媒體庫中新增一筆媒體記錄\n- 上傳的檔案將佔用商店的媒體儲存空間";
3050
+ readonly params: readonly [{
3051
+ readonly name: "media_data";
3052
+ readonly description: "媒體上傳資料。可能需要包含 file_url(遠端 URL)或 base64 編碼的檔案內容,視 Shopline API 支援的格式而定。範例:{\"file_url\": \"https://your-cdn.shoplineapp.com/image.jpg\", \"type\": \"image\"}";
3053
+ readonly default: null;
3054
+ readonly hasDefault: false;
3055
+ readonly kind: "object";
3056
+ readonly optional: false;
3057
+ }];
3058
+ readonly docEndpoints: readonly [{
3059
+ readonly method: "POST";
3060
+ readonly path: "/v1/media";
3061
+ }];
3062
+ readonly operations: readonly [{
3063
+ readonly kind: "api_post";
3064
+ readonly method: "POST";
3065
+ readonly endpointKey: "media_create";
3066
+ readonly json_body: "media_data";
3067
+ }];
3068
+ readonly sourceLocation: {
3069
+ readonly line: 15;
3070
+ readonly endLine: 48;
3071
+ };
3072
+ }, {
3073
+ readonly module: "tools/writes/media_writes.py";
3074
+ readonly name: "create_metafield";
3075
+ readonly write: true;
3076
+ readonly description: "[WRITE] 建立商家應用元欄位(App Metafield)。\n\n【用途】\n為商家建立自定義的元欄位,用於儲存應用程式所需的額外商家設定或資料。\n\n【呼叫的 Shopline API】\n- POST /merchants/current/app-metafields\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, metafield: dict。\n\n【副作用】\n- 在商家的應用元欄位中新增一筆記錄\n- 相同 namespace + key 組合若已存在,可能會失敗或覆蓋(取決於 Shopline 實作)";
3077
+ readonly params: readonly [{
3078
+ readonly name: "metafield_data";
3079
+ readonly description: "元欄位資料,例如:{\"namespace\": \"my_app\", \"key\": \"custom_key\", \"value\": \"custom_value\", \"value_type\": \"string\"}";
3080
+ readonly default: null;
3081
+ readonly hasDefault: false;
3082
+ readonly kind: "object";
3083
+ readonly optional: false;
3084
+ }];
3085
+ readonly docEndpoints: readonly [{
3086
+ readonly method: "POST";
3087
+ readonly path: "/merchants/current/app-metafields";
3088
+ }];
3089
+ readonly operations: readonly [{
3090
+ readonly kind: "api_post";
3091
+ readonly method: "POST";
3092
+ readonly endpointKey: "metafield_create";
3093
+ readonly json_body: "metafield_data";
3094
+ }];
3095
+ readonly sourceLocation: {
3096
+ readonly line: 52;
3097
+ readonly endLine: 82;
3098
+ };
3099
+ }, {
3100
+ readonly module: "tools/writes/merchant_writes.py";
3101
+ readonly name: "update_merchant";
3102
+ readonly write: true;
3103
+ readonly description: "[WRITE] 更新商家基本資料。\n\n【用途】\n修改指定商家的名稱、聯絡資訊、地址等基本設定。僅傳入要修改的欄位,未傳入的欄位不會被覆蓋。\n適合商家資料異動(如搬遷、更名)時同步更新 Shopline 商家設定。\n\n【呼叫的 Shopline API】\n- PUT /v1/merchants/{merchant_id}\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 修改商家資料,變更立即生效\n- 商家名稱等資訊可能顯示於顧客可見的頁面(如收據、通知 Email)\n- 不可復原,但可再次呼叫此工具覆蓋";
3104
+ readonly params: readonly [{
3105
+ readonly name: "merchant_id";
3106
+ readonly description: "商家 ID";
3107
+ readonly default: null;
3108
+ readonly hasDefault: false;
3109
+ readonly kind: "string";
3110
+ readonly optional: false;
3111
+ }, {
3112
+ readonly name: "merchant_data";
3113
+ readonly description: "要更新的商家欄位,例如:{\"name\": \"我的商店\", \"email\": \"shop@yourstore.com\", \"phone\": \"02-1234-5678\", \"address\": \"台北市...\"}";
3114
+ readonly default: null;
3115
+ readonly hasDefault: false;
3116
+ readonly kind: "object";
3117
+ readonly optional: false;
3118
+ }];
3119
+ readonly docEndpoints: readonly [{
3120
+ readonly method: "PUT";
3121
+ readonly path: "/v1/merchants/{merchant_id}";
3122
+ }];
3123
+ readonly operations: readonly [{
3124
+ readonly kind: "api_put";
3125
+ readonly method: "PUT";
3126
+ readonly endpointKey: "merchant_update";
3127
+ readonly json_body: "merchant_data";
3128
+ readonly path_params: "{'merchant_id': merchant_id}";
3129
+ }];
3130
+ readonly sourceLocation: {
3131
+ readonly line: 15;
3132
+ readonly endLine: 50;
3133
+ };
3134
+ }, {
3135
+ readonly module: "tools/writes/order_delivery_writes.py";
3136
+ readonly name: "update_order_delivery";
3137
+ readonly write: true;
3138
+ readonly description: "[WRITE] 更新訂單配送資訊。\n\n【用途】\n修改指定訂單配送記錄的物流資訊,例如更新追蹤號碼、物流公司、配送狀態等。\n適合整合第三方物流系統後回寫配送狀態。\n\n【呼叫的 Shopline API】\n- PUT /v1/order_deliveries/{delivery_id}\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 修改訂單配送記錄,變更立即生效\n- 狀態變更可能觸發 Shopline 的自動通知(如寄送出貨通知 Email 給顧客)\n- 不可復原,但可再次呼叫此工具覆蓋";
3139
+ readonly params: readonly [{
3140
+ readonly name: "delivery_id";
3141
+ readonly description: "訂單配送記錄 ID";
3142
+ readonly default: null;
3143
+ readonly hasDefault: false;
3144
+ readonly kind: "string";
3145
+ readonly optional: false;
3146
+ }, {
3147
+ readonly name: "delivery_data";
3148
+ readonly description: "要更新的配送欄位,例如:{\"tracking_number\": \"123456\", \"carrier\": \"黑貓宅急便\", \"status\": \"shipped\"}";
3149
+ readonly default: null;
3150
+ readonly hasDefault: false;
3151
+ readonly kind: "object";
3152
+ readonly optional: false;
3153
+ }];
3154
+ readonly docEndpoints: readonly [{
3155
+ readonly method: "PUT";
3156
+ readonly path: "/v1/order_deliveries/{delivery_id}";
3157
+ }];
3158
+ readonly operations: readonly [{
3159
+ readonly kind: "api_put";
3160
+ readonly method: "PUT";
3161
+ readonly endpointKey: "order_delivery_update";
3162
+ readonly json_body: "delivery_data";
3163
+ readonly path_params: "{'delivery_id': delivery_id}";
3164
+ }];
3165
+ readonly sourceLocation: {
3166
+ readonly line: 15;
3167
+ readonly endLine: 50;
3168
+ };
3169
+ }, {
3170
+ readonly module: "tools/writes/order_writes.py";
3171
+ readonly name: "cancel_order";
3172
+ readonly write: true;
3173
+ readonly description: "[WRITE] 取消訂單。\n\n【用途】\n取消指定訂單,適用於客戶要求取消、庫存不足或付款問題等場景。\n\n【呼叫的 Shopline API】\n- POST /v1/orders/{order_id}/cancel\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 訂單狀態變更為已取消,操作不可逆\n- 若訂單已出貨,可能無法取消(取決於 Shopline 規則)\n- 已付款訂單取消後需另行退款";
3174
+ readonly params: readonly [{
3175
+ readonly name: "order_id";
3176
+ readonly description: "訂單 ID";
3177
+ readonly default: null;
3178
+ readonly hasDefault: false;
3179
+ readonly kind: "string";
3180
+ readonly optional: false;
3181
+ }, {
3182
+ readonly name: "reason";
3183
+ readonly description: "取消原因(選填)";
3184
+ readonly default: null;
3185
+ readonly hasDefault: true;
3186
+ readonly kind: "string";
3187
+ readonly optional: true;
3188
+ }];
3189
+ readonly docEndpoints: readonly [{
3190
+ readonly method: "POST";
3191
+ readonly path: "/v1/orders/{order_id}/cancel";
3192
+ }];
3193
+ readonly operations: readonly [{
3194
+ readonly kind: "api_post";
3195
+ readonly method: "POST";
3196
+ readonly endpointKey: "order_cancel";
3197
+ readonly json_body: "body";
3198
+ readonly path_params: "{'order_id': order_id}";
3199
+ }];
3200
+ readonly sourceLocation: {
3201
+ readonly line: 17;
3202
+ readonly endLine: 50;
3203
+ };
3204
+ }, {
3205
+ readonly module: "tools/writes/order_writes.py";
3206
+ readonly name: "execute_order_shipment";
3207
+ readonly write: true;
3208
+ readonly description: "[WRITE] 執行訂單出貨。\n\n【用途】\n將指定訂單標記為已出貨,觸發 Shopline 出貨流程,適用於倉庫確認出貨後的狀態更新。\n\n【呼叫的 Shopline API】\n- POST /v1/orders/{order_id}/shipment\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 訂單出貨狀態更新為已出貨\n- 可能觸發客戶出貨通知(取決於商店設定)\n- 訂單需處於可出貨狀態,否則 API 會回傳錯誤";
3209
+ readonly params: readonly [{
3210
+ readonly name: "order_id";
3211
+ readonly description: "訂單 ID";
3212
+ readonly default: null;
3213
+ readonly hasDefault: false;
3214
+ readonly kind: "string";
3215
+ readonly optional: false;
3216
+ }];
3217
+ readonly docEndpoints: readonly [{
3218
+ readonly method: "POST";
3219
+ readonly path: "/v1/orders/{order_id}/shipment";
3220
+ }];
3221
+ readonly operations: readonly [{
3222
+ readonly kind: "api_post";
3223
+ readonly method: "POST";
3224
+ readonly endpointKey: "order_shipment";
3225
+ readonly json_body: "{}";
3226
+ readonly path_params: "{'order_id': order_id}";
3227
+ }];
3228
+ readonly sourceLocation: {
3229
+ readonly line: 54;
3230
+ readonly endLine: 81;
3231
+ };
3232
+ }, {
3233
+ readonly module: "tools/writes/order_writes.py";
3234
+ readonly name: "bulk_execute_shipment";
3235
+ readonly write: true;
3236
+ readonly description: "[WRITE] 批次執行多訂單出貨。\n\n【用途】\n一次性將多筆訂單標記為已出貨,提升倉庫作業效率,適用於每日批量出貨場景。\n\n【呼叫的 Shopline API】\n- POST /v1/orders/shipment/bulk\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, order_ids: list。\n\n【副作用】\n- 所有指定訂單的出貨狀態批次更新為已出貨\n- 部分訂單若無法出貨,API 可能整批失敗或回傳各別結果(取決於 Shopline 實作)\n- 可能觸發多封客戶出貨通知";
3237
+ readonly params: readonly [{
3238
+ readonly name: "order_ids";
3239
+ readonly description: "訂單 ID 列表,批次出貨";
3240
+ readonly default: null;
3241
+ readonly hasDefault: false;
3242
+ readonly kind: "array";
3243
+ readonly optional: false;
3244
+ }];
3245
+ readonly docEndpoints: readonly [{
3246
+ readonly method: "POST";
3247
+ readonly path: "/v1/orders/shipment/bulk";
3248
+ }];
3249
+ readonly operations: readonly [{
3250
+ readonly kind: "api_post";
3251
+ readonly method: "POST";
3252
+ readonly endpointKey: "orders_shipment_bulk";
3253
+ readonly json_body: "body";
3254
+ }];
3255
+ readonly sourceLocation: {
3256
+ readonly line: 85;
3257
+ readonly endLine: 112;
3258
+ };
3259
+ }, {
3260
+ readonly module: "tools/writes/order_writes.py";
3261
+ readonly name: "split_order";
3262
+ readonly write: true;
3263
+ readonly description: "[WRITE] 拆分訂單為多個子出貨單。\n\n【用途】\n將一筆訂單拆分為多個子單,適用於商品分批到貨或不同倉庫分開出貨的場景。\nsplit_config 為字典,內容依 Shopline API 規格定義各子單。\n\n【呼叫的 Shopline API】\n- POST /v1/orders/{order_id}/split\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 原訂單被拆分為多個子訂單,原訂單狀態可能變更\n- 操作通常不可逆,請確認拆單設定正確後再執行\n- 已出貨的訂單無法拆單";
3264
+ readonly params: readonly [{
3265
+ readonly name: "order_id";
3266
+ readonly description: "訂單 ID";
3267
+ readonly default: null;
3268
+ readonly hasDefault: false;
3269
+ readonly kind: "string";
3270
+ readonly optional: false;
3271
+ }, {
3272
+ readonly name: "split_config";
3273
+ readonly description: "拆單設定,包含各子單的商品與配送資訊";
3274
+ readonly default: null;
3275
+ readonly hasDefault: false;
3276
+ readonly kind: "object";
3277
+ readonly optional: false;
3278
+ }];
3279
+ readonly docEndpoints: readonly [{
3280
+ readonly method: "POST";
3281
+ readonly path: "/v1/orders/{order_id}/split";
3282
+ }];
3283
+ readonly operations: readonly [{
3284
+ readonly kind: "api_post";
3285
+ readonly method: "POST";
3286
+ readonly endpointKey: "order_split";
3287
+ readonly json_body: "split_config";
3288
+ readonly path_params: "{'order_id': order_id}";
3289
+ }];
3290
+ readonly sourceLocation: {
3291
+ readonly line: 116;
3292
+ readonly endLine: 145;
3293
+ };
3294
+ }, {
3295
+ readonly module: "tools/writes/order_writes.py";
3296
+ readonly name: "update_order";
3297
+ readonly write: true;
3298
+ readonly description: "[WRITE] 更新訂單欄位。\n\n【用途】\n修改訂單的可編輯欄位(如備註、配送地址等)。僅傳入要修改的欄位,未傳入欄位不受影響。\n\n【呼叫的 Shopline API】\n- PATCH /v1/orders/{order_id}\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 訂單資料立即變更,不可復原(可再次呼叫此工具覆蓋)\n- 部分欄位(如金額)可能受限於訂單狀態而無法修改";
3299
+ readonly params: readonly [{
3300
+ readonly name: "order_id";
3301
+ readonly description: "訂單 ID";
3302
+ readonly default: null;
3303
+ readonly hasDefault: false;
3304
+ readonly kind: "string";
3305
+ readonly optional: false;
3306
+ }, {
3307
+ readonly name: "fields";
3308
+ readonly description: "要更新的欄位與值,以字典形式傳入";
3309
+ readonly default: null;
3310
+ readonly hasDefault: false;
3311
+ readonly kind: "object";
3312
+ readonly optional: false;
3313
+ }];
3314
+ readonly docEndpoints: readonly [{
3315
+ readonly method: "PATCH";
3316
+ readonly path: "/v1/orders/{order_id}";
3317
+ }];
3318
+ readonly operations: readonly [{
3319
+ readonly kind: "api_patch";
3320
+ readonly method: "PATCH";
3321
+ readonly endpointKey: "order_update";
3322
+ readonly json_body: "fields";
3323
+ readonly path_params: "{'order_id': order_id}";
3324
+ }];
3325
+ readonly sourceLocation: {
3326
+ readonly line: 149;
3327
+ readonly endLine: 181;
3328
+ };
3329
+ }, {
3330
+ readonly module: "tools/writes/order_writes.py";
3331
+ readonly name: "update_order_status";
3332
+ readonly write: true;
3333
+ readonly description: "[WRITE] 更新訂單狀態(支援同時更新多種狀態)。\n\n【用途】\n分別或同時更新訂單的主狀態、配送狀態、付款狀態。\n僅傳入非 None 的參數,每個非 None 參數會各自呼叫一支 API。\n\n【呼叫的 Shopline API】\n- PATCH /v1/orders/{order_id}/status(若 status 非 None)\n- PATCH /v1/orders/{order_id}/delivery-status(若 delivery_status 非 None)\n- PATCH /v1/orders/{order_id}/payment-status(若 payment_status 非 None)\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, updated_fields: list。\n\n【副作用】\n- 訂單狀態立即變更,影響前台顯示與後台報表\n- 狀態變更可能觸發客戶通知(取決於商店設定)\n- 非法的狀態值或不合法的狀態轉換會導致 API 回傳錯誤";
3334
+ readonly params: readonly [{
3335
+ readonly name: "order_id";
3336
+ readonly description: "訂單 ID";
3337
+ readonly default: null;
3338
+ readonly hasDefault: false;
3339
+ readonly kind: "string";
3340
+ readonly optional: false;
3341
+ }, {
3342
+ readonly name: "status";
3343
+ readonly description: "訂單狀態(如 confirmed / cancelled)";
3344
+ readonly default: null;
3345
+ readonly hasDefault: true;
3346
+ readonly kind: "string";
3347
+ readonly optional: true;
3348
+ }, {
3349
+ readonly name: "delivery_status";
3350
+ readonly description: "配送狀態(如 shipped / delivered)";
3351
+ readonly default: null;
3352
+ readonly hasDefault: true;
3353
+ readonly kind: "string";
3354
+ readonly optional: true;
3355
+ }, {
3356
+ readonly name: "payment_status";
3357
+ readonly description: "付款狀態(如 paid / unpaid)";
3358
+ readonly default: null;
3359
+ readonly hasDefault: true;
3360
+ readonly kind: "string";
3361
+ readonly optional: true;
3362
+ }];
3363
+ readonly docEndpoints: readonly [{
3364
+ readonly method: "PATCH";
3365
+ readonly path: "/v1/orders/{order_id}/status";
3366
+ }, {
3367
+ readonly method: "PATCH";
3368
+ readonly path: "/v1/orders/{order_id}/delivery-status";
3369
+ }, {
3370
+ readonly method: "PATCH";
3371
+ readonly path: "/v1/orders/{order_id}/payment-status";
3372
+ }];
3373
+ readonly operations: readonly [{
3374
+ readonly kind: "api_patch";
3375
+ readonly method: "PATCH";
3376
+ readonly endpointKey: "order_status";
3377
+ readonly json_body: "{'status': status}";
3378
+ readonly path_params: "{'order_id': order_id}";
3379
+ }, {
3380
+ readonly kind: "api_patch";
3381
+ readonly method: "PATCH";
3382
+ readonly endpointKey: "order_delivery_status";
3383
+ readonly json_body: "{'delivery_status': delivery_status}";
3384
+ readonly path_params: "{'order_id': order_id}";
3385
+ }, {
3386
+ readonly kind: "api_patch";
3387
+ readonly method: "PATCH";
3388
+ readonly endpointKey: "order_payment_status";
3389
+ readonly json_body: "{'payment_status': payment_status}";
3390
+ readonly path_params: "{'order_id': order_id}";
3391
+ }];
3392
+ readonly sourceLocation: {
3393
+ readonly line: 185;
3394
+ readonly endLine: 245;
3395
+ };
3396
+ }, {
3397
+ readonly module: "tools/writes/order_writes.py";
3398
+ readonly name: "update_order_tags";
3399
+ readonly write: true;
3400
+ readonly description: "[WRITE] 設定訂單標籤(覆蓋現有標籤)。\n\n【用途】\n為訂單設定標籤,常用於訂單分類、優先處理標記、客服備註分群等場景。\n注意:會覆蓋訂單現有的所有標籤。\n\n【呼叫的 Shopline API】\n- PATCH /v1/orders/{order_id}/tags\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 覆蓋訂單的所有現有標籤為新的標籤列表\n- 若要新增標籤而非覆蓋,請先用 get_order_detail 取得現有標籤再合併";
3401
+ readonly params: readonly [{
3402
+ readonly name: "order_id";
3403
+ readonly description: "訂單 ID";
3404
+ readonly default: null;
3405
+ readonly hasDefault: false;
3406
+ readonly kind: "string";
3407
+ readonly optional: false;
3408
+ }, {
3409
+ readonly name: "tags";
3410
+ readonly description: "標籤列表(會取代現有標籤)";
3411
+ readonly default: null;
3412
+ readonly hasDefault: false;
3413
+ readonly kind: "array";
3414
+ readonly optional: false;
3415
+ }];
3416
+ readonly docEndpoints: readonly [{
3417
+ readonly method: "PATCH";
3418
+ readonly path: "/v1/orders/{order_id}/tags";
3419
+ }];
3420
+ readonly operations: readonly [{
3421
+ readonly kind: "api_patch";
3422
+ readonly method: "PATCH";
3423
+ readonly endpointKey: "order_tags_update";
3424
+ readonly json_body: "{'tags': tags}";
3425
+ readonly path_params: "{'order_id': order_id}";
3426
+ }];
3427
+ readonly sourceLocation: {
3428
+ readonly line: 249;
3429
+ readonly endLine: 275;
3430
+ };
3431
+ }, {
3432
+ readonly module: "tools/writes/order_writes.py";
3433
+ readonly name: "create_order";
3434
+ readonly write: true;
3435
+ readonly description: "[WRITE] 建立新訂單。\n\n【用途】\n在 Shopline 商店中手動建立新訂單,適用於電話訂購、客服補單、線下訂單轉入等場景。\norder_data 需包含 Shopline 建立訂單 API 所需的完整欄位。\n\n【呼叫的 Shopline API】\n- POST /v1/orders\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, order: dict。\n\n【副作用】\n- 在商店訂單列表中新增一筆訂單\n- 可能觸發庫存扣減(取決於訂單內容與商店設定)\n- 可能觸發客戶訂單確認通知(取決於商店設定)\n- 建立後訂單立即生效,需確認資料正確再執行";
3436
+ readonly params: readonly [{
3437
+ readonly name: "order_data";
3438
+ readonly description: "完整訂單資料,依 Shopline API 規格傳入所有必要欄位";
3439
+ readonly default: null;
3440
+ readonly hasDefault: false;
3441
+ readonly kind: "object";
3442
+ readonly optional: false;
3443
+ }];
3444
+ readonly docEndpoints: readonly [{
3445
+ readonly method: "POST";
3446
+ readonly path: "/v1/orders";
3447
+ }];
3448
+ readonly operations: readonly [{
3449
+ readonly kind: "api_post";
3450
+ readonly method: "POST";
3451
+ readonly endpointKey: "order_create";
3452
+ readonly json_body: "order_data";
3453
+ }];
3454
+ readonly sourceLocation: {
3455
+ readonly line: 279;
3456
+ readonly endLine: 308;
3457
+ };
3458
+ }, {
3459
+ readonly module: "tools/writes/product_writes.py";
3460
+ readonly name: "create_product";
3461
+ readonly write: true;
3462
+ readonly description: "[WRITE] 建立新商品。\n\n【用途】\n在 Shopline 商店中建立一筆新的商品記錄。product_data 為完整的商品 body,\n應依 Shopline Open API 規格組裝(含名稱、描述、售價、SKU 等)。\n\n【呼叫的 Shopline API】\n- POST /v1/products\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, product: dict。\n\n【副作用】\n- 商品立即在商店後台可見\n- 若 SKU 或 barcode 重複,API 可能回傳錯誤\n- 新商品預設狀態取決於 product_data 內的 status 欄位";
3463
+ readonly params: readonly [{
3464
+ readonly name: "product_data";
3465
+ readonly description: "完整商品建立資料,依 Shopline API 規格傳入(含 title、description、price 等欄位)";
3466
+ readonly default: null;
3467
+ readonly hasDefault: false;
3468
+ readonly kind: "object";
3469
+ readonly optional: false;
3470
+ }];
3471
+ readonly docEndpoints: readonly [{
3472
+ readonly method: "POST";
3473
+ readonly path: "/v1/products";
3474
+ }];
3475
+ readonly operations: readonly [{
3476
+ readonly kind: "api_post";
3477
+ readonly method: "POST";
3478
+ readonly endpointKey: "product_create";
3479
+ readonly json_body: "product_data";
3480
+ }];
3481
+ readonly sourceLocation: {
3482
+ readonly line: 17;
3483
+ readonly endLine: 44;
3484
+ };
3485
+ }, {
3486
+ readonly module: "tools/writes/product_writes.py";
3487
+ readonly name: "update_product";
3488
+ readonly write: true;
3489
+ readonly description: "[WRITE] 更新商品基本資料。\n\n【用途】\n修改現有商品的名稱、描述、分類、狀態等欄位。僅傳入要修改的欄位,\n未傳入的欄位不會被覆蓋。\n\n【呼叫的 Shopline API】\n- PUT /v1/products/{product_id}\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 商品資料變更立即生效,前台同步更新\n- 不可復原(無版本歷史),但可再次呼叫此工具覆蓋";
3490
+ readonly params: readonly [{
3491
+ readonly name: "product_id";
3492
+ readonly description: "商品內部 ID";
3493
+ readonly default: null;
3494
+ readonly hasDefault: false;
3495
+ readonly kind: "string";
3496
+ readonly optional: false;
3497
+ }, {
3498
+ readonly name: "product_data";
3499
+ readonly description: "要更新的商品欄位(僅需傳入要修改的欄位)";
3500
+ readonly default: null;
3501
+ readonly hasDefault: false;
3502
+ readonly kind: "object";
3503
+ readonly optional: false;
3504
+ }];
3505
+ readonly docEndpoints: readonly [{
3506
+ readonly method: "PUT";
3507
+ readonly path: "/v1/products/{product_id}";
3508
+ }];
3509
+ readonly operations: readonly [{
3510
+ readonly kind: "api_put";
3511
+ readonly method: "PUT";
3512
+ readonly endpointKey: "product_update";
3513
+ readonly json_body: "product_data";
3514
+ readonly path_params: "{'product_id': product_id}";
3515
+ }];
3516
+ readonly sourceLocation: {
3517
+ readonly line: 48;
3518
+ readonly endLine: 76;
3519
+ };
3520
+ }, {
3521
+ readonly module: "tools/writes/product_writes.py";
3522
+ readonly name: "delete_product";
3523
+ readonly write: true;
3524
+ readonly description: "[WRITE] 刪除商品。\n\n【用途】\n從 Shopline 商店中永久刪除商品記錄。通常用於清除下架商品或測試資料。\n\n【呼叫的 Shopline API】\n- DELETE /v1/products/{product_id}\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 永久刪除商品,不可復原\n- 商品相關的訂單行項目記錄可能仍保留(取決於 Shopline 實作)\n- 刪除後前台立即下架";
3525
+ readonly params: readonly [{
3526
+ readonly name: "product_id";
3527
+ readonly description: "商品內部 ID";
3528
+ readonly default: null;
3529
+ readonly hasDefault: false;
3530
+ readonly kind: "string";
3531
+ readonly optional: false;
3532
+ }];
3533
+ readonly docEndpoints: readonly [{
3534
+ readonly method: "DELETE";
3535
+ readonly path: "/v1/products/{product_id}";
3536
+ }];
3537
+ readonly operations: readonly [{
3538
+ readonly kind: "api_delete";
3539
+ readonly method: "DELETE";
3540
+ readonly endpointKey: "product_delete";
3541
+ readonly path_params: "{'product_id': product_id}";
3542
+ }];
3543
+ readonly sourceLocation: {
3544
+ readonly line: 80;
3545
+ readonly endLine: 104;
3546
+ };
3547
+ }, {
3548
+ readonly module: "tools/writes/product_writes.py";
3549
+ readonly name: "update_product_quantity";
3550
+ readonly write: true;
3551
+ readonly description: "[WRITE] 更新商品庫存數量(無變體商品)。\n\n【用途】\n直接設定無變體商品的庫存數量。適用於盤點後調整庫存或手動補貨場景。\n若商品有變體,請改用 update_variation_quantity。\n\n【呼叫的 Shopline API】\n- PUT /v1/products/{product_id}/quantity\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 庫存數量立即更新,影響前台可購買數量\n- 若設為 0 且商品設定不允許超賣,前台將顯示缺貨";
3552
+ readonly params: readonly [{
3553
+ readonly name: "product_id";
3554
+ readonly description: "商品內部 ID";
3555
+ readonly default: null;
3556
+ readonly hasDefault: false;
3557
+ readonly kind: "string";
3558
+ readonly optional: false;
3559
+ }, {
3560
+ readonly name: "quantity";
3561
+ readonly description: "新庫存數量(絕對值,非增減量)";
3562
+ readonly default: null;
3563
+ readonly hasDefault: false;
3564
+ readonly kind: "integer";
3565
+ readonly optional: false;
3566
+ }];
3567
+ readonly docEndpoints: readonly [{
3568
+ readonly method: "PUT";
3569
+ readonly path: "/v1/products/{product_id}/quantity";
3570
+ }];
3571
+ readonly operations: readonly [{
3572
+ readonly kind: "api_put";
3573
+ readonly method: "PUT";
3574
+ readonly endpointKey: "product_quantity";
3575
+ readonly json_body: "{'quantity': quantity}";
3576
+ readonly path_params: "{'product_id': product_id}";
3577
+ }];
3578
+ readonly sourceLocation: {
3579
+ readonly line: 108;
3580
+ readonly endLine: 134;
3581
+ };
3582
+ }, {
3583
+ readonly module: "tools/writes/product_writes.py";
3584
+ readonly name: "update_product_price";
3585
+ readonly write: true;
3586
+ readonly description: "[WRITE] 更新商品售價(無變體商品)。\n\n【用途】\n直接設定無變體商品的售價。適用於調價、促銷結束恢復原價等場景。\n若商品有變體,請改用 update_variation_price。\n\n【呼叫的 Shopline API】\n- PUT /v1/products/{product_id}/price\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 售價立即更新,前台同步顯示新價格\n- 不影響進行中的訂單(訂單成立時已鎖定價格)";
3587
+ readonly params: readonly [{
3588
+ readonly name: "product_id";
3589
+ readonly description: "商品內部 ID";
3590
+ readonly default: null;
3591
+ readonly hasDefault: false;
3592
+ readonly kind: "string";
3593
+ readonly optional: false;
3594
+ }, {
3595
+ readonly name: "price";
3596
+ readonly description: "新售價(TWD)";
3597
+ readonly default: null;
3598
+ readonly hasDefault: false;
3599
+ readonly kind: "number";
3600
+ readonly optional: false;
3601
+ }];
3602
+ readonly docEndpoints: readonly [{
3603
+ readonly method: "PUT";
3604
+ readonly path: "/v1/products/{product_id}/price";
3605
+ }];
3606
+ readonly operations: readonly [{
3607
+ readonly kind: "api_put";
3608
+ readonly method: "PUT";
3609
+ readonly endpointKey: "product_price";
3610
+ readonly json_body: "{'price': price}";
3611
+ readonly path_params: "{'product_id': product_id}";
3612
+ }];
3613
+ readonly sourceLocation: {
3614
+ readonly line: 138;
3615
+ readonly endLine: 164;
3616
+ };
3617
+ }, {
3618
+ readonly module: "tools/writes/product_writes.py";
3619
+ readonly name: "create_product_variation";
3620
+ readonly write: true;
3621
+ readonly description: "[WRITE] 為商品新增變體。\n\n【用途】\n在現有商品下建立新的規格變體(如顏色、尺寸等)。variation_data 應依\nShopline Open API 規格組裝,含 SKU、價格、庫存等欄位。\n\n【呼叫的 Shopline API】\n- POST /v1/products/{product_id}/variations\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, variation: dict。\n\n【副作用】\n- 變體立即加入商品,前台可供選擇\n- 若 SKU 重複,API 可能回傳錯誤";
3622
+ readonly params: readonly [{
3623
+ readonly name: "product_id";
3624
+ readonly description: "商品內部 ID";
3625
+ readonly default: null;
3626
+ readonly hasDefault: false;
3627
+ readonly kind: "string";
3628
+ readonly optional: false;
3629
+ }, {
3630
+ readonly name: "variation_data";
3631
+ readonly description: "變體資料(含 SKU、價格、庫存、規格選項等)";
3632
+ readonly default: null;
3633
+ readonly hasDefault: false;
3634
+ readonly kind: "object";
3635
+ readonly optional: false;
3636
+ }];
3637
+ readonly docEndpoints: readonly [{
3638
+ readonly method: "POST";
3639
+ readonly path: "/v1/products/{product_id}/variations";
3640
+ }];
3641
+ readonly operations: readonly [{
3642
+ readonly kind: "api_post";
3643
+ readonly method: "POST";
3644
+ readonly endpointKey: "product_variations_create";
3645
+ readonly json_body: "variation_data";
3646
+ readonly path_params: "{'product_id': product_id}";
3647
+ }];
3648
+ readonly sourceLocation: {
3649
+ readonly line: 168;
3650
+ readonly endLine: 196;
3651
+ };
3652
+ }, {
3653
+ readonly module: "tools/writes/product_writes.py";
3654
+ readonly name: "update_product_variation";
3655
+ readonly write: true;
3656
+ readonly description: "[WRITE] 更新商品變體資料。\n\n【用途】\n修改特定商品變體的 SKU、規格選項、狀態等欄位。僅傳入要修改的欄位,\n未傳入的欄位不會被覆蓋。\n\n【呼叫的 Shopline API】\n- PUT /v1/products/{product_id}/variations/{variation_id}\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 變體資料變更立即生效,前台同步更新\n- 不可復原(無版本歷史),但可再次呼叫此工具覆蓋";
3657
+ readonly params: readonly [{
3658
+ readonly name: "product_id";
3659
+ readonly description: "商品內部 ID";
3660
+ readonly default: null;
3661
+ readonly hasDefault: false;
3662
+ readonly kind: "string";
3663
+ readonly optional: false;
3664
+ }, {
3665
+ readonly name: "variation_id";
3666
+ readonly description: "變體內部 ID";
3667
+ readonly default: null;
3668
+ readonly hasDefault: false;
3669
+ readonly kind: "string";
3670
+ readonly optional: false;
3671
+ }, {
3672
+ readonly name: "variation_data";
3673
+ readonly description: "要更新的變體欄位(僅需傳入要修改的欄位)";
3674
+ readonly default: null;
3675
+ readonly hasDefault: false;
3676
+ readonly kind: "object";
3677
+ readonly optional: false;
3678
+ }];
3679
+ readonly docEndpoints: readonly [{
3680
+ readonly method: "PUT";
3681
+ readonly path: "/v1/products/{product_id}/variations/{variation_id}";
3682
+ }];
3683
+ readonly operations: readonly [{
3684
+ readonly kind: "api_put";
3685
+ readonly method: "PUT";
3686
+ readonly endpointKey: "product_variation_update";
3687
+ readonly json_body: "variation_data";
3688
+ readonly path_params: "{'product_id': product_id, 'variation_id': variation_id}";
3689
+ }];
3690
+ readonly sourceLocation: {
3691
+ readonly line: 200;
3692
+ readonly endLine: 230;
3693
+ };
3694
+ }, {
3695
+ readonly module: "tools/writes/product_writes.py";
3696
+ readonly name: "delete_product_variation";
3697
+ readonly write: true;
3698
+ readonly description: "[WRITE] 刪除商品變體。\n\n【用途】\n從商品中永久刪除指定的規格變體。適用於停售特定規格或清理錯誤變體。\n\n【呼叫的 Shopline API】\n- DELETE /v1/products/{product_id}/variations/{variation_id}\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 永久刪除變體,不可復原\n- 若該變體為商品唯一變體,刪除後商品可能無法購買\n- 刪除後前台立即移除該規格選項";
3699
+ readonly params: readonly [{
3700
+ readonly name: "product_id";
3701
+ readonly description: "商品內部 ID";
3702
+ readonly default: null;
3703
+ readonly hasDefault: false;
3704
+ readonly kind: "string";
3705
+ readonly optional: false;
3706
+ }, {
3707
+ readonly name: "variation_id";
3708
+ readonly description: "變體內部 ID";
3709
+ readonly default: null;
3710
+ readonly hasDefault: false;
3711
+ readonly kind: "string";
3712
+ readonly optional: false;
3713
+ }];
3714
+ readonly docEndpoints: readonly [{
3715
+ readonly method: "DELETE";
3716
+ readonly path: "/v1/products/{product_id}/variations/{variation_id}";
3717
+ }];
3718
+ readonly operations: readonly [{
3719
+ readonly kind: "api_delete";
3720
+ readonly method: "DELETE";
3721
+ readonly endpointKey: "product_variation_delete";
3722
+ readonly path_params: "{'product_id': product_id, 'variation_id': variation_id}";
3723
+ }];
3724
+ readonly sourceLocation: {
3725
+ readonly line: 234;
3726
+ readonly endLine: 260;
3727
+ };
3728
+ }, {
3729
+ readonly module: "tools/writes/product_writes.py";
3730
+ readonly name: "update_variation_quantity";
3731
+ readonly write: true;
3732
+ readonly description: "[WRITE] 更新商品變體庫存數量。\n\n【用途】\n直接設定特定變體的庫存數量。適用於盤點後調整庫存或手動補貨場景。\n若要批次更新多個 SKU 庫存,可改用 bulk_update_quantities。\n\n【呼叫的 Shopline API】\n- PUT /v1/products/{product_id}/variations/{variation_id}/quantity\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 庫存數量立即更新,影響前台可購買數量\n- 若設為 0 且商品設定不允許超賣,前台將顯示缺貨";
3733
+ readonly params: readonly [{
3734
+ readonly name: "product_id";
3735
+ readonly description: "商品內部 ID";
3736
+ readonly default: null;
3737
+ readonly hasDefault: false;
3738
+ readonly kind: "string";
3739
+ readonly optional: false;
3740
+ }, {
3741
+ readonly name: "variation_id";
3742
+ readonly description: "變體內部 ID";
3743
+ readonly default: null;
3744
+ readonly hasDefault: false;
3745
+ readonly kind: "string";
3746
+ readonly optional: false;
3747
+ }, {
3748
+ readonly name: "quantity";
3749
+ readonly description: "新庫存數量(絕對值,非增減量)";
3750
+ readonly default: null;
3751
+ readonly hasDefault: false;
3752
+ readonly kind: "integer";
3753
+ readonly optional: false;
3754
+ }];
3755
+ readonly docEndpoints: readonly [{
3756
+ readonly method: "PUT";
3757
+ readonly path: "/v1/products/{product_id}/variations/{variation_id}/quantity";
3758
+ }];
3759
+ readonly operations: readonly [{
3760
+ readonly kind: "api_put";
3761
+ readonly method: "PUT";
3762
+ readonly endpointKey: "product_variation_quantity";
3763
+ readonly json_body: "{'quantity': quantity}";
3764
+ readonly path_params: "{'product_id': product_id, 'variation_id': variation_id}";
3765
+ }];
3766
+ readonly sourceLocation: {
3767
+ readonly line: 264;
3768
+ readonly endLine: 291;
3769
+ };
3770
+ }, {
3771
+ readonly module: "tools/writes/product_writes.py";
3772
+ readonly name: "update_variation_price";
3773
+ readonly write: true;
3774
+ readonly description: "[WRITE] 更新商品變體售價。\n\n【用途】\n直接設定特定變體的售價。適用於個別規格調價、限時特價等場景。\n\n【呼叫的 Shopline API】\n- PUT /v1/products/{product_id}/variations/{variation_id}/price\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 售價立即更新,前台同步顯示新價格\n- 不影響進行中的訂單(訂單成立時已鎖定價格)";
3775
+ readonly params: readonly [{
3776
+ readonly name: "product_id";
3777
+ readonly description: "商品內部 ID";
3778
+ readonly default: null;
3779
+ readonly hasDefault: false;
3780
+ readonly kind: "string";
3781
+ readonly optional: false;
3782
+ }, {
3783
+ readonly name: "variation_id";
3784
+ readonly description: "變體內部 ID";
3785
+ readonly default: null;
3786
+ readonly hasDefault: false;
3787
+ readonly kind: "string";
3788
+ readonly optional: false;
3789
+ }, {
3790
+ readonly name: "price";
3791
+ readonly description: "新售價(TWD)";
3792
+ readonly default: null;
3793
+ readonly hasDefault: false;
3794
+ readonly kind: "number";
3795
+ readonly optional: false;
3796
+ }];
3797
+ readonly docEndpoints: readonly [{
3798
+ readonly method: "PUT";
3799
+ readonly path: "/v1/products/{product_id}/variations/{variation_id}/price";
3800
+ }];
3801
+ readonly operations: readonly [{
3802
+ readonly kind: "api_put";
3803
+ readonly method: "PUT";
3804
+ readonly endpointKey: "product_variation_price";
3805
+ readonly json_body: "{'price': price}";
3806
+ readonly path_params: "{'product_id': product_id, 'variation_id': variation_id}";
3807
+ }];
3808
+ readonly sourceLocation: {
3809
+ readonly line: 295;
3810
+ readonly endLine: 321;
3811
+ };
3812
+ }, {
3813
+ readonly module: "tools/writes/product_writes.py";
3814
+ readonly name: "update_product_tags";
3815
+ readonly write: true;
3816
+ readonly description: "[WRITE] 設定商品標籤(覆蓋現有標籤)。\n\n【用途】\n為商品設定標籤,常用於商品分群、促銷標記、SEO 分類等。\n注意:此操作會覆蓋商品現有的所有標籤。\n\n【呼叫的 Shopline API】\n- POST /v1/products/{product_id}/tags\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 覆蓋商品的所有現有標籤為新的標籤列表\n- 若要新增標籤而非覆蓋,請先用 get_product_list 取得現有標籤再合併後傳入";
3817
+ readonly params: readonly [{
3818
+ readonly name: "product_id";
3819
+ readonly description: "商品內部 ID";
3820
+ readonly default: null;
3821
+ readonly hasDefault: false;
3822
+ readonly kind: "string";
3823
+ readonly optional: false;
3824
+ }, {
3825
+ readonly name: "tags";
3826
+ readonly description: "標籤列表(會取代現有標籤)";
3827
+ readonly default: null;
3828
+ readonly hasDefault: false;
3829
+ readonly kind: "array";
3830
+ readonly optional: false;
3831
+ }];
3832
+ readonly docEndpoints: readonly [{
3833
+ readonly method: "POST";
3834
+ readonly path: "/v1/products/{product_id}/tags";
3835
+ }];
3836
+ readonly operations: readonly [{
3837
+ readonly kind: "api_post";
3838
+ readonly method: "POST";
3839
+ readonly endpointKey: "product_tags";
3840
+ readonly json_body: "{'tags': tags}";
3841
+ readonly path_params: "{'product_id': product_id}";
3842
+ }];
3843
+ readonly sourceLocation: {
3844
+ readonly line: 325;
3845
+ readonly endLine: 351;
3846
+ };
3847
+ }, {
3848
+ readonly module: "tools/writes/product_writes.py";
3849
+ readonly name: "add_product_images";
3850
+ readonly write: true;
3851
+ readonly description: "[WRITE] 為商品新增圖片。\n\n【用途】\n上傳圖片 URL 至商品相簿,圖片會被加入到現有圖片之後。\n適用於新增商品展示圖、情境圖等。\n\n【呼叫的 Shopline API】\n- POST /v1/products/{product_id}/images\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, images: list。\n\n【副作用】\n- 圖片加入商品相簿,前台立即可見\n- 圖片 URL 必須為公開可存取的連結,Shopline 將下載並儲存\n- 圖片數量上限取決於 Shopline 商店方案設定";
3852
+ readonly params: readonly [{
3853
+ readonly name: "product_id";
3854
+ readonly description: "商品內部 ID";
3855
+ readonly default: null;
3856
+ readonly hasDefault: false;
3857
+ readonly kind: "string";
3858
+ readonly optional: false;
3859
+ }, {
3860
+ readonly name: "image_urls";
3861
+ readonly description: "圖片 URL 列表(公開可存取的圖片連結)";
3862
+ readonly default: null;
3863
+ readonly hasDefault: false;
3864
+ readonly kind: "array";
3865
+ readonly optional: false;
3866
+ }];
3867
+ readonly docEndpoints: readonly [{
3868
+ readonly method: "POST";
3869
+ readonly path: "/v1/products/{product_id}/images";
3870
+ }];
3871
+ readonly operations: readonly [{
3872
+ readonly kind: "api_post";
3873
+ readonly method: "POST";
3874
+ readonly endpointKey: "product_images";
3875
+ readonly json_body: "{'image_urls': image_urls}";
3876
+ readonly path_params: "{'product_id': product_id}";
3877
+ }];
3878
+ readonly sourceLocation: {
3879
+ readonly line: 355;
3880
+ readonly endLine: 384;
3881
+ };
3882
+ }, {
3883
+ readonly module: "tools/writes/product_writes.py";
3884
+ readonly name: "delete_product_images";
3885
+ readonly write: true;
3886
+ readonly description: "[WRITE] 刪除商品圖片。\n\n【用途】\n從商品相簿中刪除指定圖片。適用於移除過時圖片或錯誤上傳的圖片。\n\n【呼叫的 Shopline API】\n- DELETE /v1/products/{product_id}/images\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 永久刪除指定圖片,不可復原\n- 若被刪除的圖片為商品主圖,商品主圖將自動替換為相簿中下一張圖片";
3887
+ readonly params: readonly [{
3888
+ readonly name: "product_id";
3889
+ readonly description: "商品內部 ID";
3890
+ readonly default: null;
3891
+ readonly hasDefault: false;
3892
+ readonly kind: "string";
3893
+ readonly optional: false;
3894
+ }, {
3895
+ readonly name: "image_ids";
3896
+ readonly description: "要刪除的圖片 ID 列表";
3897
+ readonly default: null;
3898
+ readonly hasDefault: false;
3899
+ readonly kind: "array";
3900
+ readonly optional: false;
3901
+ }];
3902
+ readonly docEndpoints: readonly [{
3903
+ readonly method: "DELETE";
3904
+ readonly path: "/v1/products/{product_id}/images";
3905
+ }];
3906
+ readonly operations: readonly [{
3907
+ readonly kind: "api_delete";
3908
+ readonly method: "DELETE";
3909
+ readonly endpointKey: "product_images";
3910
+ readonly json_body: "{'image_ids': image_ids}";
3911
+ readonly path_params: "{'product_id': product_id}";
3912
+ }];
3913
+ readonly sourceLocation: {
3914
+ readonly line: 388;
3915
+ readonly endLine: 413;
3916
+ };
3917
+ }, {
3918
+ readonly module: "tools/writes/product_writes.py";
3919
+ readonly name: "bulk_update_quantities";
3920
+ readonly write: true;
3921
+ readonly description: "[WRITE] 批次更新多個 SKU 的庫存數量。\n\n【用途】\n一次更新多個商品或變體的庫存,適用於盤點後大批調整、進貨入庫等場景。\n比逐一呼叫 update_product_quantity / update_variation_quantity 更有效率。\n\n【呼叫的 Shopline API】\n- PUT /v1/products/bulk-update-quantities\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, updated_count: int。\n\n【副作用】\n- 所有 SKU 的庫存數量立即更新,影響前台可購買數量\n- 若某 SKU 不存在,API 可能略過或回傳錯誤(取決於 Shopline 實作)\n- 建議先確認 SKU 正確後再執行批次操作";
3922
+ readonly params: readonly [{
3923
+ readonly name: "updates";
3924
+ readonly description: "庫存更新列表,每筆為 {sku: str, quantity: int},以 SKU 識別商品/變體";
3925
+ readonly default: null;
3926
+ readonly hasDefault: false;
3927
+ readonly kind: "array";
3928
+ readonly optional: false;
3929
+ }];
3930
+ readonly docEndpoints: readonly [{
3931
+ readonly method: "PUT";
3932
+ readonly path: "/v1/products/bulk-update-quantities";
3933
+ }];
3934
+ readonly operations: readonly [{
3935
+ readonly kind: "api_put";
3936
+ readonly method: "PUT";
3937
+ readonly endpointKey: "products_bulk_quantities";
3938
+ readonly json_body: "{'updates': updates}";
3939
+ }];
3940
+ readonly sourceLocation: {
3941
+ readonly line: 417;
3942
+ readonly endLine: 445;
3943
+ };
3944
+ }, {
3945
+ readonly module: "tools/writes/product_writes.py";
3946
+ readonly name: "bulk_assign_categories";
3947
+ readonly write: true;
3948
+ readonly description: "[WRITE] 批次將多個商品指派至指定分類。\n\n【用途】\n一次將多個商品加入一或多個分類,適用於新季商品上架分類、重新整理分類結構等場景。\n比逐一更新商品分類更有效率。\n\n【呼叫的 Shopline API】\n- POST /v1/products/bulk-assign-categories\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, product_count: int, category_count: int。\n\n【副作用】\n- 商品與分類的關聯立即生效,前台分類頁面同步更新\n- 此操作為新增關聯(非覆蓋),商品原有的分類不會被移除\n- 若商品或分類 ID 不存在,API 可能略過或回傳錯誤";
3949
+ readonly params: readonly [{
3950
+ readonly name: "product_ids";
3951
+ readonly description: "商品 ID 列表";
3952
+ readonly default: null;
3953
+ readonly hasDefault: false;
3954
+ readonly kind: "array";
3955
+ readonly optional: false;
3956
+ }, {
3957
+ readonly name: "category_ids";
3958
+ readonly description: "要指派的分類 ID 列表";
3959
+ readonly default: null;
3960
+ readonly hasDefault: false;
3961
+ readonly kind: "array";
3962
+ readonly optional: false;
3963
+ }];
3964
+ readonly docEndpoints: readonly [{
3965
+ readonly method: "POST";
3966
+ readonly path: "/v1/products/bulk-assign-categories";
3967
+ }];
3968
+ readonly operations: readonly [{
3969
+ readonly kind: "api_post";
3970
+ readonly method: "POST";
3971
+ readonly endpointKey: "products_bulk_categories";
3972
+ readonly json_body: "{'product_ids': product_ids, 'category_ids': category_ids}";
3973
+ }];
3974
+ readonly sourceLocation: {
3975
+ readonly line: 449;
3976
+ readonly endLine: 478;
3977
+ };
3978
+ }, {
3979
+ readonly module: "tools/writes/promotion_writes.py";
3980
+ readonly name: "create_promotion";
3981
+ readonly write: true;
3982
+ readonly description: "[WRITE] 建立新促銷活動。\n\n【用途】\n在 Shopline 商店中建立新的促銷活動,例如折扣碼、買一送一、滿額折扣等。\n\n【呼叫的 Shopline API】\n- POST /v1/promotions\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, promotion: dict。\n\n【副作用】\n- 在商店促銷列表中新增一筆促銷活動,活動狀態依 promotion_data 設定而定\n- 若活動設定為立即啟用,消費者即可使用該促銷\n- 促銷規則設定後如需修改,請使用 update_promotion";
3983
+ readonly params: readonly [{
3984
+ readonly name: "promotion_data";
3985
+ readonly description: "促銷活動資料(參考 Shopline promotion 物件結構)";
3986
+ readonly default: null;
3987
+ readonly hasDefault: false;
3988
+ readonly kind: "object";
3989
+ readonly optional: false;
3990
+ }];
3991
+ readonly docEndpoints: readonly [{
3992
+ readonly method: "POST";
3993
+ readonly path: "/v1/promotions";
3994
+ }];
3995
+ readonly operations: readonly [{
3996
+ readonly kind: "api_post";
3997
+ readonly method: "POST";
3998
+ readonly endpointKey: "promotion_create";
3999
+ readonly json_body: "promotion_data";
4000
+ }];
4001
+ readonly sourceLocation: {
4002
+ readonly line: 20;
4003
+ readonly endLine: 47;
4004
+ };
4005
+ }, {
4006
+ readonly module: "tools/writes/promotion_writes.py";
4007
+ readonly name: "update_promotion";
4008
+ readonly write: true;
4009
+ readonly description: "[WRITE] 更新既有促銷活動。\n\n【用途】\n修改已建立的促銷活動內容,例如調整折扣金額、有效期限、適用條件等。\n\n【呼叫的 Shopline API】\n- PUT /v1/promotions/{promotion_id}\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 修改立即生效,已在結帳流程中的消費者可能受影響\n- 不可復原(無版本歷史),但可再次呼叫此工具覆蓋";
4010
+ readonly params: readonly [{
4011
+ readonly name: "promotion_id";
4012
+ readonly description: "促銷活動 ID";
4013
+ readonly default: null;
4014
+ readonly hasDefault: false;
4015
+ readonly kind: "string";
4016
+ readonly optional: false;
4017
+ }, {
4018
+ readonly name: "promotion_data";
4019
+ readonly description: "要更新的促銷活動欄位(僅傳入需修改的欄位)";
4020
+ readonly default: null;
4021
+ readonly hasDefault: false;
4022
+ readonly kind: "object";
4023
+ readonly optional: false;
4024
+ }];
4025
+ readonly docEndpoints: readonly [{
4026
+ readonly method: "PUT";
4027
+ readonly path: "/v1/promotions/{promotion_id}";
4028
+ }];
4029
+ readonly operations: readonly [{
4030
+ readonly kind: "api_put";
4031
+ readonly method: "PUT";
4032
+ readonly endpointKey: "promotion_update";
4033
+ readonly json_body: "promotion_data";
4034
+ readonly path_params: "{'promotion_id': promotion_id}";
4035
+ }];
4036
+ readonly sourceLocation: {
4037
+ readonly line: 51;
4038
+ readonly endLine: 83;
4039
+ };
4040
+ }, {
4041
+ readonly module: "tools/writes/promotion_writes.py";
4042
+ readonly name: "delete_promotion";
4043
+ readonly write: true;
4044
+ readonly description: "[WRITE] 刪除促銷活動。\n\n【用途】\n永久刪除指定的促銷活動。通常用於清除過期、測試或錯誤建立的活動。\n\n【呼叫的 Shopline API】\n- DELETE /v1/promotions/{promotion_id}\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 永久刪除該促銷活動,不可復原\n- 刪除後消費者無法再使用與該活動相關的折扣碼或優惠\n- 已套用該促銷的歷史訂單不受影響";
4045
+ readonly params: readonly [{
4046
+ readonly name: "promotion_id";
4047
+ readonly description: "促銷活動 ID";
4048
+ readonly default: null;
4049
+ readonly hasDefault: false;
4050
+ readonly kind: "string";
4051
+ readonly optional: false;
4052
+ }];
4053
+ readonly docEndpoints: readonly [{
4054
+ readonly method: "DELETE";
4055
+ readonly path: "/v1/promotions/{promotion_id}";
4056
+ }];
4057
+ readonly operations: readonly [{
4058
+ readonly kind: "api_delete";
4059
+ readonly method: "DELETE";
4060
+ readonly endpointKey: "promotion_delete";
4061
+ readonly path_params: "{'promotion_id': promotion_id}";
4062
+ }];
4063
+ readonly sourceLocation: {
4064
+ readonly line: 87;
4065
+ readonly endLine: 111;
4066
+ };
4067
+ }, {
4068
+ readonly module: "tools/writes/promotion_writes.py";
4069
+ readonly name: "send_coupon";
4070
+ readonly write: true;
4071
+ readonly description: "[WRITE] 發送優惠券給指定客戶。\n\n【用途】\n主動將優惠券發送給特定客戶,常用於行銷活動、客戶回饋、CRM 觸發場景。\n\n【呼叫的 Shopline API】\n- POST /v1/coupons/send\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, result: dict。\n\n【副作用】\n- 優惠券發送後,目標客戶帳號中將出現對應的優惠券\n- 依優惠券設定,可能有數量限制;若庫存不足,API 會回傳錯誤\n- 部分類型的優惠券一旦發送,無法收回";
4072
+ readonly params: readonly [{
4073
+ readonly name: "coupon_data";
4074
+ readonly description: "優惠券發送資料,通常包含 coupon_id 與目標客戶識別資訊";
4075
+ readonly default: null;
4076
+ readonly hasDefault: false;
4077
+ readonly kind: "object";
4078
+ readonly optional: false;
4079
+ }];
4080
+ readonly docEndpoints: readonly [{
4081
+ readonly method: "POST";
4082
+ readonly path: "/v1/coupons/send";
4083
+ }];
4084
+ readonly operations: readonly [{
4085
+ readonly kind: "api_post";
4086
+ readonly method: "POST";
4087
+ readonly endpointKey: "coupon_send";
4088
+ readonly json_body: "coupon_data";
4089
+ }];
4090
+ readonly sourceLocation: {
4091
+ readonly line: 119;
4092
+ readonly endLine: 146;
4093
+ };
4094
+ }, {
4095
+ readonly module: "tools/writes/promotion_writes.py";
4096
+ readonly name: "redeem_coupon";
4097
+ readonly write: true;
4098
+ readonly description: "[WRITE] 核銷(使用)優惠券。\n\n【用途】\n在結帳或特定場景下核銷優惠券,將優惠券標記為已使用狀態。\n適合 POS 場景或 API 整合的結帳流程。\n\n【呼叫的 Shopline API】\n- POST /v1/coupons/redeem\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, result: dict。\n\n【副作用】\n- 優惠券狀態變更為已使用,不可再次使用(一次性優惠券)\n- 核銷紀錄會寫入系統,影響促銷統計報告\n- 操作通常不可逆,請確認核銷對象與條件正確";
4099
+ readonly params: readonly [{
4100
+ readonly name: "coupon_data";
4101
+ readonly description: "優惠券核銷資料,通常包含 coupon_code 與訂單或客戶識別資訊";
4102
+ readonly default: null;
4103
+ readonly hasDefault: false;
4104
+ readonly kind: "object";
4105
+ readonly optional: false;
4106
+ }];
4107
+ readonly docEndpoints: readonly [{
4108
+ readonly method: "POST";
4109
+ readonly path: "/v1/coupons/redeem";
4110
+ }];
4111
+ readonly operations: readonly [{
4112
+ readonly kind: "api_post";
4113
+ readonly method: "POST";
4114
+ readonly endpointKey: "coupon_redeem";
4115
+ readonly json_body: "coupon_data";
4116
+ }];
4117
+ readonly sourceLocation: {
4118
+ readonly line: 150;
4119
+ readonly endLine: 178;
4120
+ };
4121
+ }, {
4122
+ readonly module: "tools/writes/promotion_writes.py";
4123
+ readonly name: "claim_coupon";
4124
+ readonly write: true;
4125
+ readonly description: "[WRITE] 客戶領取優惠券。\n\n【用途】\n代表客戶領取(claim)一張優惠券,將優惠券綁定至該客戶帳號。\n適合兌換碼場景或 API 整合的會員領券流程。\n\n【呼叫的 Shopline API】\n- POST /v1/coupons/claim\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, result: dict。\n\n【副作用】\n- 優惠券與指定客戶綁定,消費者帳號中可看到此優惠券\n- 若優惠券已達領取上限或已過期,API 會回傳錯誤\n- 同一張優惠券通常每位客戶只能領取一次(依設定而異)";
4126
+ readonly params: readonly [{
4127
+ readonly name: "coupon_data";
4128
+ readonly description: "優惠券領取資料,通常包含 coupon_code 與客戶識別資訊";
4129
+ readonly default: null;
4130
+ readonly hasDefault: false;
4131
+ readonly kind: "object";
4132
+ readonly optional: false;
4133
+ }];
4134
+ readonly docEndpoints: readonly [{
4135
+ readonly method: "POST";
4136
+ readonly path: "/v1/coupons/claim";
4137
+ }];
4138
+ readonly operations: readonly [{
4139
+ readonly kind: "api_post";
4140
+ readonly method: "POST";
4141
+ readonly endpointKey: "coupon_claim";
4142
+ readonly json_body: "coupon_data";
4143
+ }];
4144
+ readonly sourceLocation: {
4145
+ readonly line: 182;
4146
+ readonly endLine: 210;
4147
+ };
4148
+ }, {
4149
+ readonly module: "tools/writes/promotion_writes.py";
4150
+ readonly name: "create_flash_price_campaign";
4151
+ readonly write: true;
4152
+ readonly description: "[WRITE] 建立快閃價格活動。\n\n【用途】\n建立限時特價活動(Flash Sale),在指定時段內將商品調整為特定價格。\n適合節慶特賣、清倉、限時搶購等場景。\n\n【呼叫的 Shopline API】\n- POST /v1/flash_price_campaigns\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, campaign: dict。\n\n【副作用】\n- 活動建立後,依設定的開始時間自動啟用特價\n- 活動期間,符合條件的商品會顯示特價,影響商店前台的價格呈現\n- 若活動時段與其他促銷重疊,需確認優先規則";
4153
+ readonly params: readonly [{
4154
+ readonly name: "campaign_data";
4155
+ readonly description: "快閃價格活動資料(參考 Shopline flash_price_campaign 物件結構)";
4156
+ readonly default: null;
4157
+ readonly hasDefault: false;
4158
+ readonly kind: "object";
4159
+ readonly optional: false;
4160
+ }];
4161
+ readonly docEndpoints: readonly [{
4162
+ readonly method: "POST";
4163
+ readonly path: "/v1/flash_price_campaigns";
4164
+ }];
4165
+ readonly operations: readonly [{
4166
+ readonly kind: "api_post";
4167
+ readonly method: "POST";
4168
+ readonly endpointKey: "flash_price_campaign_create";
4169
+ readonly json_body: "campaign_data";
4170
+ }];
4171
+ readonly sourceLocation: {
4172
+ readonly line: 218;
4173
+ readonly endLine: 246;
4174
+ };
4175
+ }, {
4176
+ readonly module: "tools/writes/promotion_writes.py";
4177
+ readonly name: "update_flash_price_campaign";
4178
+ readonly write: true;
4179
+ readonly description: "[WRITE] 更新快閃價格活動。\n\n【用途】\n修改已建立的快閃價格活動,例如調整特價金額、活動時段或適用商品範圍。\n\n【呼叫的 Shopline API】\n- PUT /v1/flash_price_campaigns/{campaign_id}\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 修改立即生效;若活動正在進行中,前台價格即時更新\n- 不可復原(無版本歷史),但可再次呼叫此工具覆蓋";
4180
+ readonly params: readonly [{
4181
+ readonly name: "campaign_id";
4182
+ readonly description: "快閃價格活動 ID";
4183
+ readonly default: null;
4184
+ readonly hasDefault: false;
4185
+ readonly kind: "string";
4186
+ readonly optional: false;
4187
+ }, {
4188
+ readonly name: "campaign_data";
4189
+ readonly description: "要更新的活動欄位(僅傳入需修改的欄位)";
4190
+ readonly default: null;
4191
+ readonly hasDefault: false;
4192
+ readonly kind: "object";
4193
+ readonly optional: false;
4194
+ }];
4195
+ readonly docEndpoints: readonly [{
4196
+ readonly method: "PUT";
4197
+ readonly path: "/v1/flash_price_campaigns/{campaign_id}";
4198
+ }];
4199
+ readonly operations: readonly [{
4200
+ readonly kind: "api_put";
4201
+ readonly method: "PUT";
4202
+ readonly endpointKey: "flash_price_campaign_update";
4203
+ readonly json_body: "campaign_data";
4204
+ readonly path_params: "{'campaign_id': campaign_id}";
4205
+ }];
4206
+ readonly sourceLocation: {
4207
+ readonly line: 250;
4208
+ readonly endLine: 282;
4209
+ };
4210
+ }, {
4211
+ readonly module: "tools/writes/promotion_writes.py";
4212
+ readonly name: "delete_flash_price_campaign";
4213
+ readonly write: true;
4214
+ readonly description: "[WRITE] 刪除快閃價格活動。\n\n【用途】\n永久刪除指定的快閃價格活動。用於清除已結束、取消或錯誤建立的活動。\n\n【呼叫的 Shopline API】\n- DELETE /v1/flash_price_campaigns/{campaign_id}\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 永久刪除該活動,不可復原\n- 若活動正在進行中,刪除後商品立即恢復原價\n- 歷史訂單中已套用的特價不受影響";
4215
+ readonly params: readonly [{
4216
+ readonly name: "campaign_id";
4217
+ readonly description: "快閃價格活動 ID";
4218
+ readonly default: null;
4219
+ readonly hasDefault: false;
4220
+ readonly kind: "string";
4221
+ readonly optional: false;
4222
+ }];
4223
+ readonly docEndpoints: readonly [{
4224
+ readonly method: "DELETE";
4225
+ readonly path: "/v1/flash_price_campaigns/{campaign_id}";
4226
+ }];
4227
+ readonly operations: readonly [{
4228
+ readonly kind: "api_delete";
4229
+ readonly method: "DELETE";
4230
+ readonly endpointKey: "flash_price_campaign_delete";
4231
+ readonly path_params: "{'campaign_id': campaign_id}";
4232
+ }];
4233
+ readonly sourceLocation: {
4234
+ readonly line: 286;
4235
+ readonly endLine: 311;
4236
+ };
4237
+ }, {
4238
+ readonly module: "tools/writes/promotion_writes.py";
4239
+ readonly name: "create_affiliate_campaign";
4240
+ readonly write: true;
4241
+ readonly description: "[WRITE] 建立聯盟行銷活動。\n\n【用途】\n建立聯盟行銷(Affiliate)活動,設定推薦獎勵規則,讓推廣夥伴(聯盟會員)\n透過分享連結或代碼帶來訂單並獲得佣金。\n\n【呼叫的 Shopline API】\n- POST /v1/affiliate_campaigns\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, campaign: dict。\n\n【副作用】\n- 活動建立後,可將活動連結或代碼分發給聯盟夥伴\n- 活動啟用後,透過聯盟連結產生的訂單將自動計算佣金\n- 請確認佣金規則與結算方式設定正確,避免財務損失";
4242
+ readonly params: readonly [{
4243
+ readonly name: "campaign_data";
4244
+ readonly description: "聯盟行銷活動資料(參考 Shopline affiliate_campaign 物件結構)";
4245
+ readonly default: null;
4246
+ readonly hasDefault: false;
4247
+ readonly kind: "object";
4248
+ readonly optional: false;
4249
+ }];
4250
+ readonly docEndpoints: readonly [{
4251
+ readonly method: "POST";
4252
+ readonly path: "/v1/affiliate_campaigns";
4253
+ }];
4254
+ readonly operations: readonly [{
4255
+ readonly kind: "api_post";
4256
+ readonly method: "POST";
4257
+ readonly endpointKey: "affiliate_campaign_create";
4258
+ readonly json_body: "campaign_data";
4259
+ }];
4260
+ readonly sourceLocation: {
4261
+ readonly line: 319;
4262
+ readonly endLine: 347;
4263
+ };
4264
+ }, {
4265
+ readonly module: "tools/writes/promotion_writes.py";
4266
+ readonly name: "update_affiliate_campaign";
4267
+ readonly write: true;
4268
+ readonly description: "[WRITE] 更新聯盟行銷活動。\n\n【用途】\n修改已建立的聯盟行銷活動,例如調整佣金比例、活動期限或適用條件。\n\n【呼叫的 Shopline API】\n- PUT /v1/affiliate_campaigns/{campaign_id}\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 修改立即生效;佣金規則調整後,新訂單將套用新規則\n- 已產生的佣金紀錄不受影響(依各活動的歷史快照而定)\n- 不可復原(無版本歷史),但可再次呼叫此工具覆蓋";
4269
+ readonly params: readonly [{
4270
+ readonly name: "campaign_id";
4271
+ readonly description: "聯盟行銷活動 ID";
4272
+ readonly default: null;
4273
+ readonly hasDefault: false;
4274
+ readonly kind: "string";
4275
+ readonly optional: false;
4276
+ }, {
4277
+ readonly name: "campaign_data";
4278
+ readonly description: "要更新的活動欄位(僅傳入需修改的欄位)";
4279
+ readonly default: null;
4280
+ readonly hasDefault: false;
4281
+ readonly kind: "object";
4282
+ readonly optional: false;
4283
+ }];
4284
+ readonly docEndpoints: readonly [{
4285
+ readonly method: "PUT";
4286
+ readonly path: "/v1/affiliate_campaigns/{campaign_id}";
4287
+ }];
4288
+ readonly operations: readonly [{
4289
+ readonly kind: "api_put";
4290
+ readonly method: "PUT";
4291
+ readonly endpointKey: "affiliate_campaign_update";
4292
+ readonly json_body: "campaign_data";
4293
+ readonly path_params: "{'campaign_id': campaign_id}";
4294
+ }];
4295
+ readonly sourceLocation: {
4296
+ readonly line: 351;
4297
+ readonly endLine: 384;
4298
+ };
4299
+ }, {
4300
+ readonly module: "tools/writes/promotion_writes.py";
4301
+ readonly name: "delete_affiliate_campaign";
4302
+ readonly write: true;
4303
+ readonly description: "[WRITE] 刪除聯盟行銷活動。\n\n【用途】\n永久刪除指定的聯盟行銷活動。用於清除已結束、取消或錯誤建立的活動。\n\n【呼叫的 Shopline API】\n- DELETE /v1/affiliate_campaigns/{campaign_id}\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 永久刪除該活動,不可復原\n- 刪除後聯盟夥伴的推廣連結或代碼將失效,無法再追蹤新訂單\n- 已累積的佣金紀錄與歷史訂單資料不受影響(依 Shopline 實作而定)";
4304
+ readonly params: readonly [{
4305
+ readonly name: "campaign_id";
4306
+ readonly description: "聯盟行銷活動 ID";
4307
+ readonly default: null;
4308
+ readonly hasDefault: false;
4309
+ readonly kind: "string";
4310
+ readonly optional: false;
4311
+ }];
4312
+ readonly docEndpoints: readonly [{
4313
+ readonly method: "DELETE";
4314
+ readonly path: "/v1/affiliate_campaigns/{campaign_id}";
4315
+ }];
4316
+ readonly operations: readonly [{
4317
+ readonly kind: "api_delete";
4318
+ readonly method: "DELETE";
4319
+ readonly endpointKey: "affiliate_campaign_delete";
4320
+ readonly path_params: "{'campaign_id': campaign_id}";
4321
+ }];
4322
+ readonly sourceLocation: {
4323
+ readonly line: 388;
4324
+ readonly endLine: 413;
4325
+ };
4326
+ }, {
4327
+ readonly module: "tools/writes/purchase_order_writes.py";
4328
+ readonly name: "create_purchase_order";
4329
+ readonly write: true;
4330
+ readonly description: "[WRITE] 建立新採購單。\n\n【用途】\n在 Shopline POS 系統中建立一筆新的採購單,用於記錄向供應商進貨的資訊。\n\n【呼叫的 Shopline API】\n- POST /v1/pos/purchase_orders\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, purchase_order: dict。\n\n【副作用】\n- 在 POS 採購單列表中新增一筆記錄\n- 採購單建立後可進行後續入庫確認操作";
4331
+ readonly params: readonly [{
4332
+ readonly name: "purchase_order_data";
4333
+ readonly description: "採購單資料,例如 {supplier_id, items: [{sku, quantity, cost}, ...], ...}";
4334
+ readonly default: null;
4335
+ readonly hasDefault: false;
4336
+ readonly kind: "object";
4337
+ readonly optional: false;
4338
+ }];
4339
+ readonly docEndpoints: readonly [{
4340
+ readonly method: "POST";
4341
+ readonly path: "/v1/pos/purchase_orders";
4342
+ }];
4343
+ readonly operations: readonly [{
4344
+ readonly kind: "api_post";
4345
+ readonly method: "POST";
4346
+ readonly endpointKey: "purchase_order_create";
4347
+ readonly json_body: "purchase_order_data";
4348
+ }];
4349
+ readonly sourceLocation: {
4350
+ readonly line: 16;
4351
+ readonly endLine: 43;
4352
+ };
4353
+ }, {
4354
+ readonly module: "tools/writes/purchase_order_writes.py";
4355
+ readonly name: "delete_purchase_orders";
4356
+ readonly write: true;
4357
+ readonly description: "[WRITE] 批次刪除採購單。\n\n【用途】\n一次刪除一或多筆 POS 採購單記錄,適合清除測試資料或作廢錯誤採購單。\n\n【呼叫的 Shopline API】\n- DELETE /v1/pos/purchase_orders\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 永久刪除指定的採購單記錄,不可復原\n- 若採購單已執行入庫操作,刪除可能受限(取決於 Shopline 實作)";
4358
+ readonly params: readonly [{
4359
+ readonly name: "purchase_order_ids";
4360
+ readonly description: "要刪除的採購單 ID 列表(可批次刪除多筆)";
4361
+ readonly default: null;
4362
+ readonly hasDefault: false;
4363
+ readonly kind: "array";
4364
+ readonly optional: false;
4365
+ }];
4366
+ readonly docEndpoints: readonly [{
4367
+ readonly method: "DELETE";
4368
+ readonly path: "/v1/pos/purchase_orders";
4369
+ }];
4370
+ readonly operations: readonly [];
4371
+ readonly sourceLocation: {
4372
+ readonly line: 47;
4373
+ readonly endLine: 79;
4374
+ };
4375
+ }, {
4376
+ readonly module: "tools/writes/return_order_writes.py";
4377
+ readonly name: "create_return_order";
4378
+ readonly write: true;
4379
+ readonly description: "[WRITE] 建立退貨/退款申請單。\n\n【用途】\n針對指定訂單建立退貨或退款申請,適用於客服處理退換貨流程。\n\n【呼叫的 Shopline API】\n- POST /v1/return_orders\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, return_order: dict。\n\n【副作用】\n- 在系統中建立退貨/退款申請記錄,狀態為待審核\n- 觸發退貨流程,可能影響庫存預留與財務帳務(視 Shopline 退貨處理設定)\n- 若訂單不符退貨條件(如已超過退貨期限),API 可能回傳錯誤";
4380
+ readonly params: readonly [{
4381
+ readonly name: "return_order_data";
4382
+ readonly description: "退貨單資料,例如 {\"order_id\": \"ORD123\", \"reason\": \"商品瑕疵\", \"items\": [{\"line_item_id\": \"LI001\", \"quantity\": 1}]}";
4383
+ readonly default: null;
4384
+ readonly hasDefault: false;
4385
+ readonly kind: "object";
4386
+ readonly optional: false;
4387
+ }];
4388
+ readonly docEndpoints: readonly [{
4389
+ readonly method: "POST";
4390
+ readonly path: "/v1/return_orders";
4391
+ }];
4392
+ readonly operations: readonly [{
4393
+ readonly kind: "api_post";
4394
+ readonly method: "POST";
4395
+ readonly endpointKey: "return_order_create";
4396
+ readonly json_body: "return_order_data";
4397
+ }];
4398
+ readonly sourceLocation: {
4399
+ readonly line: 15;
4400
+ readonly endLine: 48;
4401
+ };
4402
+ }, {
4403
+ readonly module: "tools/writes/return_order_writes.py";
4404
+ readonly name: "update_return_order";
4405
+ readonly write: true;
4406
+ readonly description: "[WRITE] 更新退貨單狀態或資料。\n\n【用途】\n修改退貨單的審核狀態、退款金額、備註等資料,適用於客服審核退貨申請流程。\n\n【呼叫的 Shopline API】\n- PUT /v1/return_orders/{return_order_id}\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 退貨單資料變更立即生效\n- 若將狀態更新為「已退款」,可能觸發實際退款動作並影響財務帳務\n- 不可復原,請謹慎確認狀態變更";
4407
+ readonly params: readonly [{
4408
+ readonly name: "return_order_id";
4409
+ readonly description: "退貨單 ID";
4410
+ readonly default: null;
4411
+ readonly hasDefault: false;
4412
+ readonly kind: "string";
4413
+ readonly optional: false;
4414
+ }, {
4415
+ readonly name: "return_order_data";
4416
+ readonly description: "要更新的退貨單欄位,例如 {\"status\": \"approved\", \"note\": \"已確認退款\"}";
4417
+ readonly default: null;
4418
+ readonly hasDefault: false;
4419
+ readonly kind: "object";
4420
+ readonly optional: false;
4421
+ }];
4422
+ readonly docEndpoints: readonly [{
4423
+ readonly method: "PUT";
4424
+ readonly path: "/v1/return_orders/{return_order_id}";
4425
+ }];
4426
+ readonly operations: readonly [{
4427
+ readonly kind: "api_put";
4428
+ readonly method: "PUT";
4429
+ readonly endpointKey: "return_order_update";
4430
+ readonly json_body: "return_order_data";
4431
+ readonly path_params: "{'return_order_id': return_order_id}";
4432
+ }];
4433
+ readonly sourceLocation: {
4434
+ readonly line: 52;
4435
+ readonly endLine: 80;
4436
+ };
4437
+ }, {
4438
+ readonly module: "tools/writes/review_writes.py";
4439
+ readonly name: "create_product_review";
4440
+ readonly write: true;
4441
+ readonly description: "[WRITE] 建立單筆商品評論。\n\n【用途】\n為指定商品建立一筆顧客評論,適用於客服代為補登評論或匯入歷史評論資料。\n\n【呼叫的 Shopline API】\n- POST /v1/product_review_comments\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, review: dict。\n\n【副作用】\n- 在商品評論列表中新增一筆評論,依商店設定可能立即公開或待審核\n- 影響商品的平均評分顯示";
4442
+ readonly params: readonly [{
4443
+ readonly name: "review_data";
4444
+ readonly description: "評論資料,例如 {\"product_id\": \"P001\", \"rating\": 5, \"content\": \"品質很好!\", \"reviewer_name\": \"王小明\"}";
4445
+ readonly default: null;
4446
+ readonly hasDefault: false;
4447
+ readonly kind: "object";
4448
+ readonly optional: false;
4449
+ }];
4450
+ readonly docEndpoints: readonly [{
4451
+ readonly method: "POST";
4452
+ readonly path: "/v1/product_review_comments";
4453
+ }];
4454
+ readonly operations: readonly [{
4455
+ readonly kind: "api_post";
4456
+ readonly method: "POST";
4457
+ readonly endpointKey: "product_review_comment_create";
4458
+ readonly json_body: "review_data";
4459
+ }];
4460
+ readonly sourceLocation: {
4461
+ readonly line: 16;
4462
+ readonly endLine: 48;
4463
+ };
4464
+ }, {
4465
+ readonly module: "tools/writes/review_writes.py";
4466
+ readonly name: "bulk_create_product_reviews";
4467
+ readonly write: true;
4468
+ readonly description: "[WRITE] 批次建立多筆商品評論。\n\n【用途】\n一次性批次建立多筆商品評論,適用於大量匯入歷史評論或促銷活動後的評論補登。\n\n【呼叫的 Shopline API】\n- POST /v1/product_review_comments/bulk\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, result: dict。\n\n【副作用】\n- 批次在商品評論列表中新增多筆評論\n- 依商店設定,評論可能立即公開或待審核\n- 影響相關商品的平均評分顯示\n- 部分評論若格式錯誤,整批可能失敗或僅失敗該筆(視 API 實作而定)";
4469
+ readonly params: readonly [{
4470
+ readonly name: "reviews";
4471
+ readonly description: "評論資料列表,每筆格式同 create_product_review,例如 [{\"product_id\": \"P001\", \"rating\": 5, \"content\": \"讚!\"}]";
4472
+ readonly default: null;
4473
+ readonly hasDefault: false;
4474
+ readonly kind: "array";
4475
+ readonly optional: false;
4476
+ }];
4477
+ readonly docEndpoints: readonly [{
4478
+ readonly method: "POST";
4479
+ readonly path: "/v1/product_review_comments/bulk";
4480
+ }];
4481
+ readonly operations: readonly [{
4482
+ readonly kind: "api_post";
4483
+ readonly method: "POST";
4484
+ readonly endpointKey: "product_review_comments_bulk_create";
4485
+ readonly json_body: "{'comments': reviews}";
4486
+ }];
4487
+ readonly sourceLocation: {
4488
+ readonly line: 52;
4489
+ readonly endLine: 85;
4490
+ };
4491
+ }, {
4492
+ readonly module: "tools/writes/review_writes.py";
4493
+ readonly name: "update_product_review";
4494
+ readonly write: true;
4495
+ readonly description: "[WRITE] 更新單筆商品評論。\n\n【用途】\n修改評論內容、審核狀態、評分等資料,適用於客服審核或編輯不當評論。\n\n【呼叫的 Shopline API】\n- PATCH /v1/product_review_comments/{comment_id}\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 評論資料變更立即生效\n- 若變更評分,商品平均評分將同步更新\n- 不可復原,但可再次呼叫此工具覆蓋";
4496
+ readonly params: readonly [{
4497
+ readonly name: "comment_id";
4498
+ readonly description: "評論 ID";
4499
+ readonly default: null;
4500
+ readonly hasDefault: false;
4501
+ readonly kind: "string";
4502
+ readonly optional: false;
4503
+ }, {
4504
+ readonly name: "review_data";
4505
+ readonly description: "要更新的評論欄位,例如 {\"status\": \"published\", \"content\": \"修改後的評論\"}";
4506
+ readonly default: null;
4507
+ readonly hasDefault: false;
4508
+ readonly kind: "object";
4509
+ readonly optional: false;
4510
+ }];
4511
+ readonly docEndpoints: readonly [{
4512
+ readonly method: "PATCH";
4513
+ readonly path: "/v1/product_review_comments/{comment_id}";
4514
+ }];
4515
+ readonly operations: readonly [{
4516
+ readonly kind: "api_patch";
4517
+ readonly method: "PATCH";
4518
+ readonly endpointKey: "product_review_comment_update";
4519
+ readonly json_body: "review_data";
4520
+ readonly path_params: "{'comment_id': comment_id}";
4521
+ }];
4522
+ readonly sourceLocation: {
4523
+ readonly line: 89;
4524
+ readonly endLine: 117;
4525
+ };
4526
+ }, {
4527
+ readonly module: "tools/writes/review_writes.py";
4528
+ readonly name: "bulk_update_product_reviews";
4529
+ readonly write: true;
4530
+ readonly description: "[WRITE] 批次更新多筆商品評論。\n\n【用途】\n一次性批次審核或修改多筆評論狀態,適用於管理員批次公開或隱藏評論。\n\n【呼叫的 Shopline API】\n- PATCH /v1/product_review_comments\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, result: dict。\n\n【副作用】\n- 批次更新多筆評論,變更立即生效\n- 若有評論狀態變更,相關商品的平均評分可能同步更新\n- 部分評論若 id 不存在,整批可能失敗或僅失敗該筆(視 API 實作而定)";
4531
+ readonly params: readonly [{
4532
+ readonly name: "updates";
4533
+ readonly description: "批次更新資料列表,每筆須含 id 欄位,例如 [{\"id\": \"C001\", \"status\": \"published\"}, {\"id\": \"C002\", \"status\": \"hidden\"}]";
4534
+ readonly default: null;
4535
+ readonly hasDefault: false;
4536
+ readonly kind: "array";
4537
+ readonly optional: false;
4538
+ }];
4539
+ readonly docEndpoints: readonly [{
4540
+ readonly method: "PATCH";
4541
+ readonly path: "/v1/product_review_comments";
4542
+ }];
4543
+ readonly operations: readonly [{
4544
+ readonly kind: "api_patch";
4545
+ readonly method: "PATCH";
4546
+ readonly endpointKey: "product_review_comments_bulk_update";
4547
+ readonly json_body: "{'comments': updates}";
4548
+ }];
4549
+ readonly sourceLocation: {
4550
+ readonly line: 121;
4551
+ readonly endLine: 153;
4552
+ };
4553
+ }, {
4554
+ readonly module: "tools/writes/review_writes.py";
4555
+ readonly name: "delete_product_review";
4556
+ readonly write: true;
4557
+ readonly description: "[WRITE] 刪除單筆商品評論。\n\n【用途】\n從 Shopline 商店中永久刪除指定評論,適用於移除違規、惡意或測試用評論。\n\n【呼叫的 Shopline API】\n- DELETE /v1/product_review_comments/{comment_id}\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str。\n\n【副作用】\n- 永久刪除評論記錄,不可復原\n- 商品的評論總數與平均評分將同步更新";
4558
+ readonly params: readonly [{
4559
+ readonly name: "comment_id";
4560
+ readonly description: "評論 ID";
4561
+ readonly default: null;
4562
+ readonly hasDefault: false;
4563
+ readonly kind: "string";
4564
+ readonly optional: false;
4565
+ }];
4566
+ readonly docEndpoints: readonly [{
4567
+ readonly method: "DELETE";
4568
+ readonly path: "/v1/product_review_comments/{comment_id}";
4569
+ }];
4570
+ readonly operations: readonly [{
4571
+ readonly kind: "api_delete";
4572
+ readonly method: "DELETE";
4573
+ readonly endpointKey: "product_review_comment_delete";
4574
+ readonly path_params: "{'comment_id': comment_id}";
4575
+ }];
4576
+ readonly sourceLocation: {
4577
+ readonly line: 157;
4578
+ readonly endLine: 181;
4579
+ };
4580
+ }, {
4581
+ readonly module: "tools/writes/review_writes.py";
4582
+ readonly name: "bulk_delete_product_reviews";
4583
+ readonly write: true;
4584
+ readonly description: "[WRITE] 批次刪除多筆商品評論。\n\n【用途】\n一次性永久刪除多筆評論,適用於批次清除測試資料或大量違規評論。\n\n【呼叫的 Shopline API】\n- DELETE /v1/product_review_comments\n\n【回傳結構】\ndict 含 success: bool, resource_id: str, message: str, deleted_count: int。\n\n【副作用】\n- 永久刪除多筆評論記錄,不可復原\n- 相關商品的評論總數與平均評分將同步更新\n- 部分 id 若不存在,整批可能失敗或僅失敗該筆(視 API 實作而定)";
4585
+ readonly params: readonly [{
4586
+ readonly name: "comment_ids";
4587
+ readonly description: "要刪除的評論 ID 列表,例如 [\"C001\", \"C002\", \"C003\"]";
4588
+ readonly default: null;
4589
+ readonly hasDefault: false;
4590
+ readonly kind: "array";
4591
+ readonly optional: false;
4592
+ }];
4593
+ readonly docEndpoints: readonly [{
4594
+ readonly method: "DELETE";
4595
+ readonly path: "/v1/product_review_comments";
4596
+ }];
4597
+ readonly operations: readonly [{
4598
+ readonly kind: "api_delete";
4599
+ readonly method: "DELETE";
4600
+ readonly endpointKey: "product_review_comments_bulk_delete";
4601
+ readonly params: "{'ids': comment_ids}";
4602
+ }];
4603
+ readonly sourceLocation: {
4604
+ readonly line: 185;
4605
+ readonly endLine: 214;
4606
+ };
4607
+ }];