@outlit/tools 2.3.0 → 2.4.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.
package/dist/index.cjs CHANGED
@@ -53,6 +53,7 @@ __export(src_exports, {
53
53
  isOutlitToolsApiError: () => isOutlitToolsApiError,
54
54
  isPublicToolName: () => isPublicToolName,
55
55
  matchesGeneratedJsonSchema: () => matchesGeneratedJsonSchema,
56
+ normalizeCustomerSourceToolInput: () => normalizeCustomerSourceToolInput,
56
57
  normalizeCustomerSourceType: () => normalizeCustomerSourceType,
57
58
  piToolNames: () => piToolNames,
58
59
  publicOpenApiTransports: () => publicOpenApiTransports,
@@ -136,7 +137,7 @@ var publicToolContracts = {
136
137
  "commandVersion": 1,
137
138
  "ownerDomain": "customers",
138
139
  "title": "List Customers",
139
- "description": "Browse and filter customers. Use this to find customers by billing status, activity recency, revenue, or name. Returns a paginated list with summary info (MRR, last activity, status). currentMrr is in the billing provider's units for the customer's currency, which the result doesn't name. For USD, EUR, GBP and CAD this is cents: divide by 100 (e.g. 1234500 is $12,345 MRR, USD). Other currencies follow the provider's amount rules. ARR is 12 \xD7 currentMrr in the same units.",
140
+ "description": "Browse and filter customers. Use this to find customers by billing status, activity recency, revenue, or name. Returns a paginated list with summary info (ARR, last activity, status). arr is the annualized revenue run rate, the same figure the Outlit app shows, with its currency: amount is in the billing provider's units for that currency (for USD, EUR, GBP and CAD this is cents: divide by 100, e.g. 1200000 is $12,000 ARR, USD; other currencies follow the provider's amount rules). arr is null when the app shows none, and amount is 0 for a churned, paused or trialing customer.",
140
141
  "annotations": {
141
142
  "readOnlyHint": true,
142
143
  "destructiveHint": false,
@@ -183,13 +184,23 @@ var publicToolContracts = {
183
184
  "90d"
184
185
  ]
185
186
  },
187
+ "arrAbove": {
188
+ "description": "Minimum ARR, in arr.amount's units per year (1200000 is $12,000 for a customer billed in USD). Customers whose ARR is unknown never match.",
189
+ "type": "number",
190
+ "minimum": 0
191
+ },
192
+ "arrBelow": {
193
+ "description": "Maximum ARR, in arr.amount's units per year. Customers whose ARR is unknown never match.",
194
+ "type": "number",
195
+ "minimum": 0
196
+ },
186
197
  "mrrAbove": {
187
- "description": "Minimum MRR, in currentMrr's units (10000 is $100 for a customer billed in USD)",
198
+ "description": "Deprecated: use arrAbove.",
188
199
  "type": "number",
189
200
  "minimum": 0
190
201
  },
191
202
  "mrrBelow": {
192
- "description": "Maximum MRR, in currentMrr's units",
203
+ "description": "Deprecated: use arrBelow.",
193
204
  "type": "number",
194
205
  "minimum": 0
195
206
  },
@@ -246,13 +257,14 @@ var publicToolContracts = {
246
257
  "type": "string"
247
258
  },
248
259
  "orderBy": {
249
- "description": "Field to order results by",
260
+ "description": "Field to order results by: last_activity_at, first_seen_at, name, arr_cents. arr_cents puts customers whose ARR is unknown last when descending.",
250
261
  "default": "last_activity_at",
251
262
  "type": "string",
252
263
  "enum": [
253
264
  "last_activity_at",
254
265
  "first_seen_at",
255
266
  "name",
267
+ "arr_cents",
256
268
  "mrr_cents"
257
269
  ]
258
270
  },
@@ -344,24 +356,38 @@ var publicToolContracts = {
344
356
  "minimum": 0,
345
357
  "maximum": 9007199254740991
346
358
  },
347
- "currentMrr": {
359
+ "arr": {
348
360
  "anyOf": [
349
361
  {
350
- "type": "number"
362
+ "type": "object",
363
+ "properties": {
364
+ "amount": {
365
+ "type": "integer",
366
+ "minimum": 0,
367
+ "maximum": 9007199254740991,
368
+ "description": "Annualized revenue run rate, the same ARR figure the Outlit app shows: an integer in the billing provider's units for `currency`. For USD, EUR, GBP and CAD this is cents: divide by 100 (e.g. 1234500 is $12,345, USD). Other currencies follow the provider's amount rules (Stripe's currency docs), so don't assume a divisor for them. 0 for a churned, paused or trialing customer."
369
+ },
370
+ "currency": {
371
+ "type": "string",
372
+ "description": "ISO currency code of amount."
373
+ },
374
+ "estimated": {
375
+ "type": "boolean",
376
+ "description": "The amount includes a usage or per-seat estimate, shown as ~ in the app."
377
+ }
378
+ },
379
+ "required": [
380
+ "amount",
381
+ "currency",
382
+ "estimated"
383
+ ],
384
+ "additionalProperties": false
351
385
  },
352
386
  {
353
387
  "type": "null"
354
388
  }
355
389
  ],
356
- "description": "Monthly recurring revenue as an integer amount in the billing provider's units for the customer's currency, which this result doesn't name. For USD, EUR, GBP and CAD this is cents: divide by 100 (e.g. 1234500 is $12,345, USD). Other currencies follow the provider's amount rules (Stripe's currency docs), so don't assume a divisor for them. ARR is 12 \xD7 this value in the same units. Null unless mrrCalculationStatus is calculated."
357
- },
358
- "mrrCalculationStatus": {
359
- "type": "string",
360
- "enum": [
361
- "calculated",
362
- "mixed_currency",
363
- "unavailable"
364
- ]
390
+ "description": "Null when the app shows no ARR for this customer."
365
391
  },
366
392
  "owner": {
367
393
  "anyOf": [
@@ -412,8 +438,7 @@ var publicToolContracts = {
412
438
  "firstSeenAt",
413
439
  "lastActivityAt",
414
440
  "contactCount",
415
- "currentMrr",
416
- "mrrCalculationStatus",
441
+ "arr",
417
442
  "owner",
418
443
  "daysSinceActivity"
419
444
  ],
@@ -1011,7 +1036,7 @@ var publicToolContracts = {
1011
1036
  "commandVersion": 1,
1012
1037
  "ownerDomain": "customers",
1013
1038
  "title": "Get Customer",
1014
- "description": "Get full details for a single customer. Optionally include users (each with their sources: where Outlit found them and the conversations they took part in), revenue, recent activity, engagement metrics, or company enrichment. Revenue amounts (currentMrr, lifetimeRevenue) are in the billing provider's units for the customer's currency, which the result doesn't name. For USD, EUR, GBP and CAD these are cents: divide by 100 (e.g. 1234500 is $12,345, USD). Other currencies follow the provider's amount rules. ARR is 12 \xD7 currentMrr in the same units.",
1039
+ "description": "Get full details for a single customer. Optionally include users (each with their sources: where Outlit found them and the conversations they took part in), revenue, recent activity, engagement metrics, company enrichment, the renewal date and its source, or crm: the CRM and support tool accounts linked to the customer with their own fields (segment, health, stage, owner and custom fields) as stored, which can be hundreds so request it only when needed. Revenue includes arr, the annualized revenue run rate, exactly as the customer page shows it, with its currency, whether it is an estimate, the revenue lifecycle and the parts it is counted from; amounts are in the billing provider's units for that currency (for USD, EUR, GBP and CAD these are cents: divide by 100, e.g. 1234500 is $12,345, USD; other currencies follow the provider's amount rules). lifetimeRevenue does not name its currency.",
1015
1040
  "annotations": {
1016
1041
  "readOnlyHint": true,
1017
1042
  "destructiveHint": false,
@@ -1037,7 +1062,9 @@ var publicToolContracts = {
1037
1062
  "revenue",
1038
1063
  "recentTimeline",
1039
1064
  "behaviorMetrics",
1040
- "enrichment"
1065
+ "enrichment",
1066
+ "renewal",
1067
+ "crm"
1041
1068
  ]
1042
1069
  }
1043
1070
  },
@@ -1051,6 +1078,15 @@ var publicToolContracts = {
1051
1078
  "30d",
1052
1079
  "90d"
1053
1080
  ]
1081
+ },
1082
+ "crmFields": {
1083
+ "description": "With include crm only: the CRM fields to return, by key or label (case is ignored), for example the keys an earlier response listed in omittedFields. Send [] (the default) for every field.",
1084
+ "maxItems": 100,
1085
+ "type": "array",
1086
+ "items": {
1087
+ "type": "string",
1088
+ "maxLength": 191
1089
+ }
1054
1090
  }
1055
1091
  },
1056
1092
  "required": [
@@ -1345,38 +1381,123 @@ var publicToolContracts = {
1345
1381
  "revenue": {
1346
1382
  "type": "object",
1347
1383
  "properties": {
1348
- "currentMrr": {
1384
+ "arr": {
1349
1385
  "anyOf": [
1350
1386
  {
1351
- "type": "number"
1387
+ "type": "object",
1388
+ "properties": {
1389
+ "amount": {
1390
+ "type": "integer",
1391
+ "minimum": 0,
1392
+ "maximum": 9007199254740991,
1393
+ "description": "Annualized revenue run rate, the same ARR figure the customer page shows: an integer in the billing provider's units for `currency`. For USD, EUR, GBP and CAD this is cents: divide by 100 (e.g. 1234500 is $12,345, USD). Other currencies follow the provider's amount rules (Stripe's currency docs), so don't assume a divisor for them. 0 for a churned, paused or trialing customer."
1394
+ },
1395
+ "currency": {
1396
+ "type": "string",
1397
+ "description": "ISO currency code of amount and parts."
1398
+ },
1399
+ "estimated": {
1400
+ "type": "boolean",
1401
+ "description": "The amount includes a usage or per-seat estimate, shown as ~ in the app."
1402
+ },
1403
+ "lifecycle": {
1404
+ "anyOf": [
1405
+ {
1406
+ "type": "string",
1407
+ "enum": [
1408
+ "active",
1409
+ "past_due",
1410
+ "paused",
1411
+ "churned",
1412
+ "trialing"
1413
+ ]
1414
+ },
1415
+ {
1416
+ "type": "null"
1417
+ }
1418
+ ],
1419
+ "description": "The customer's revenue state; null when unknown."
1420
+ },
1421
+ "parts": {
1422
+ "type": "object",
1423
+ "properties": {
1424
+ "subscriptions": {
1425
+ "anyOf": [
1426
+ {
1427
+ "type": "integer",
1428
+ "minimum": -9007199254740991,
1429
+ "maximum": 9007199254740991
1430
+ },
1431
+ {
1432
+ "type": "null"
1433
+ }
1434
+ ],
1435
+ "description": "Active subscriptions at list price, annualized."
1436
+ },
1437
+ "usage": {
1438
+ "anyOf": [
1439
+ {
1440
+ "type": "integer",
1441
+ "minimum": -9007199254740991,
1442
+ "maximum": 9007199254740991
1443
+ },
1444
+ {
1445
+ "type": "null"
1446
+ }
1447
+ ],
1448
+ "description": "Annualized usage estimate."
1449
+ },
1450
+ "invoicedLast12Months": {
1451
+ "anyOf": [
1452
+ {
1453
+ "type": "integer",
1454
+ "minimum": -9007199254740991,
1455
+ "maximum": 9007199254740991
1456
+ },
1457
+ {
1458
+ "type": "null"
1459
+ }
1460
+ ],
1461
+ "description": "Invoiced in the last 12 months."
1462
+ }
1463
+ },
1464
+ "required": [
1465
+ "subscriptions",
1466
+ "usage",
1467
+ "invoicedLast12Months"
1468
+ ],
1469
+ "additionalProperties": false,
1470
+ "description": "What amount was counted from, in the same units: the larger of subscriptions plus usage, and invoiced in the last 12 months. A part is null when unknown or not applicable."
1471
+ }
1472
+ },
1473
+ "required": [
1474
+ "amount",
1475
+ "currency",
1476
+ "estimated",
1477
+ "lifecycle",
1478
+ "parts"
1479
+ ],
1480
+ "additionalProperties": false
1352
1481
  },
1353
1482
  {
1354
1483
  "type": "null"
1355
1484
  }
1356
1485
  ],
1357
- "description": "Monthly recurring revenue as an integer amount in the billing provider's units for the customer's currency, which this result doesn't name. For USD, EUR, GBP and CAD this is cents: divide by 100 (e.g. 1234500 is $12,345, USD). Other currencies follow the provider's amount rules (Stripe's currency docs), so don't assume a divisor for them. ARR is 12 \xD7 this value in the same units. Null unless mrrCalculationStatus is calculated."
1358
- },
1359
- "mrrCalculationStatus": {
1360
- "type": "string",
1361
- "enum": [
1362
- "calculated",
1363
- "mixed_currency",
1364
- "unavailable"
1365
- ]
1486
+ "description": "Null when the app shows no ARR for this customer."
1366
1487
  },
1367
1488
  "lifetimeRevenue": {
1368
1489
  "type": "number",
1369
- "description": "Lifetime revenue in the billing provider's units for the currency it was billed in, like currentMrr: cents for USD, EUR, GBP and CAD, so divide by 100. Other currencies follow the provider's amount rules, so don't assume a divisor for them."
1490
+ "description": "Lifetime revenue in the billing provider's units for the currency it was billed in, like arr.amount: cents for USD, EUR, GBP and CAD, so divide by 100. Other currencies follow the provider's amount rules, so don't assume a divisor for them."
1370
1491
  },
1371
1492
  "activeSubscriptions": {
1372
1493
  "type": "integer",
1373
1494
  "minimum": 0,
1374
- "maximum": 9007199254740991
1495
+ "maximum": 9007199254740991,
1496
+ "description": "Subscriptions that bill now: active, trialing or past due. billingStatus says whether payments are behind."
1375
1497
  }
1376
1498
  },
1377
1499
  "required": [
1378
- "currentMrr",
1379
- "mrrCalculationStatus",
1500
+ "arr",
1380
1501
  "lifetimeRevenue",
1381
1502
  "activeSubscriptions"
1382
1503
  ],
@@ -1877,6 +1998,179 @@ var publicToolContracts = {
1877
1998
  "error"
1878
1999
  ],
1879
2000
  "additionalProperties": false
2001
+ },
2002
+ "renewal": {
2003
+ "description": "The renewal date the customer page shows, with its source; null when the customer has none",
2004
+ "anyOf": [
2005
+ {
2006
+ "type": "object",
2007
+ "properties": {
2008
+ "date": {
2009
+ "type": "string",
2010
+ "description": "Renewal date, YYYY-MM-DD"
2011
+ },
2012
+ "source": {
2013
+ "type": "string",
2014
+ "enum": [
2015
+ "outlit",
2016
+ "crm",
2017
+ "billing"
2018
+ ],
2019
+ "description": "Where the date comes from: set in Outlit, a CRM opportunity, or the billing period of a yearly subscription"
2020
+ }
2021
+ },
2022
+ "required": [
2023
+ "date",
2024
+ "source"
2025
+ ],
2026
+ "additionalProperties": false
2027
+ },
2028
+ {
2029
+ "type": "null"
2030
+ }
2031
+ ]
2032
+ },
2033
+ "crm": {
2034
+ "description": "The CRM and support tool accounts linked to this customer, one entry each, with the account's own fields (segment, health, stage, owner and custom fields) as stored there. Opt-in because an account can carry hundreds of fields. Absent when the section is not enabled for the workspace; null when the read is bound to a past point in time.",
2035
+ "anyOf": [
2036
+ {
2037
+ "type": "array",
2038
+ "items": {
2039
+ "type": "object",
2040
+ "properties": {
2041
+ "provider": {
2042
+ "type": "string",
2043
+ "description": "The system that holds the account: hubspot, salesforce, attio or pylon."
2044
+ },
2045
+ "connectionId": {
2046
+ "type": "string",
2047
+ "description": "The Outlit integration connection the account syncs through."
2048
+ },
2049
+ "accountId": {
2050
+ "type": "string",
2051
+ "description": "The account's id in that system."
2052
+ },
2053
+ "name": {
2054
+ "anyOf": [
2055
+ {
2056
+ "type": "string"
2057
+ },
2058
+ {
2059
+ "type": "null"
2060
+ }
2061
+ ],
2062
+ "description": "The account's name in that system."
2063
+ },
2064
+ "owner": {
2065
+ "anyOf": [
2066
+ {
2067
+ "type": "object",
2068
+ "properties": {
2069
+ "name": {
2070
+ "anyOf": [
2071
+ {
2072
+ "type": "string"
2073
+ },
2074
+ {
2075
+ "type": "null"
2076
+ }
2077
+ ]
2078
+ },
2079
+ "email": {
2080
+ "anyOf": [
2081
+ {
2082
+ "type": "string"
2083
+ },
2084
+ {
2085
+ "type": "null"
2086
+ }
2087
+ ]
2088
+ }
2089
+ },
2090
+ "required": [
2091
+ "name",
2092
+ "email"
2093
+ ],
2094
+ "additionalProperties": false
2095
+ },
2096
+ {
2097
+ "type": "null"
2098
+ }
2099
+ ],
2100
+ "description": "The account owner as that system records it; null when it records none. Not Outlit's customer owner."
2101
+ },
2102
+ "recordUpdatedAt": {
2103
+ "anyOf": [
2104
+ {
2105
+ "type": "string"
2106
+ },
2107
+ {
2108
+ "type": "null"
2109
+ }
2110
+ ],
2111
+ "description": "When that system last modified the account, ISO 8601. A Salesforce formula field can change without moving it, so such a value may lag until the account next changes."
2112
+ },
2113
+ "fields": {
2114
+ "type": "array",
2115
+ "items": {
2116
+ "type": "object",
2117
+ "properties": {
2118
+ "key": {
2119
+ "type": "string",
2120
+ "description": "The field's API name or slug in that system."
2121
+ },
2122
+ "label": {
2123
+ "type": "string",
2124
+ "description": "The field's name in that system's UI; the key when unknown."
2125
+ },
2126
+ "value": {
2127
+ "description": "The value as that system stores it: a string, number, boolean, array, or for Attio its value objects. A picklist holds the option's stored value, not its label."
2128
+ },
2129
+ "custom": {
2130
+ "type": "boolean",
2131
+ "description": "True for a field the customer's team added to that system."
2132
+ }
2133
+ },
2134
+ "required": [
2135
+ "key",
2136
+ "label",
2137
+ "value",
2138
+ "custom"
2139
+ ],
2140
+ "additionalProperties": false
2141
+ },
2142
+ "description": "The account's non-empty fields, sorted by key."
2143
+ },
2144
+ "omittedFields": {
2145
+ "description": "Keys of fields left out so the response stays within its size limit, as many as fit. Ask for them with crmFields.",
2146
+ "type": "array",
2147
+ "items": {
2148
+ "type": "string"
2149
+ }
2150
+ },
2151
+ "omittedFieldCount": {
2152
+ "description": "How many fields were left out, including any not named in omittedFields.",
2153
+ "type": "integer",
2154
+ "minimum": 0,
2155
+ "maximum": 9007199254740991
2156
+ }
2157
+ },
2158
+ "required": [
2159
+ "provider",
2160
+ "connectionId",
2161
+ "accountId",
2162
+ "name",
2163
+ "owner",
2164
+ "recordUpdatedAt",
2165
+ "fields"
2166
+ ],
2167
+ "additionalProperties": false
2168
+ }
2169
+ },
2170
+ {
2171
+ "type": "null"
2172
+ }
2173
+ ]
1880
2174
  }
1881
2175
  },
1882
2176
  "required": [
@@ -2743,6 +3037,7 @@ var publicToolContracts = {
2743
3037
  "OPPORTUNITY",
2744
3038
  "SLACK",
2745
3039
  "PERSON_PROFILE",
3040
+ "INVOICE",
2746
3041
  "CRM",
2747
3042
  "CRM_OPPORTUNITY"
2748
3043
  ]
@@ -2968,7 +3263,8 @@ var publicToolContracts = {
2968
3263
  "SUPPORT_TICKET",
2969
3264
  "OPPORTUNITY",
2970
3265
  "SLACK",
2971
- "PERSON_PROFILE"
3266
+ "PERSON_PROFILE",
3267
+ "INVOICE"
2972
3268
  ]
2973
3269
  },
2974
3270
  "sourceId": {
@@ -3029,7 +3325,8 @@ var publicToolContracts = {
3029
3325
  "SUPPORT_TICKET",
3030
3326
  "OPPORTUNITY",
3031
3327
  "SLACK",
3032
- "PERSON_PROFILE"
3328
+ "PERSON_PROFILE",
3329
+ "INVOICE"
3033
3330
  ]
3034
3331
  },
3035
3332
  {
@@ -3240,7 +3537,8 @@ var publicToolContracts = {
3240
3537
  "SUPPORT_TICKET",
3241
3538
  "OPPORTUNITY",
3242
3539
  "SLACK",
3243
- "PERSON_PROFILE"
3540
+ "PERSON_PROFILE",
3541
+ "INVOICE"
3244
3542
  ]
3245
3543
  },
3246
3544
  {
@@ -3507,7 +3805,8 @@ var publicToolContracts = {
3507
3805
  "SUPPORT_TICKET",
3508
3806
  "OPPORTUNITY",
3509
3807
  "SLACK",
3510
- "PERSON_PROFILE"
3808
+ "PERSON_PROFILE",
3809
+ "INVOICE"
3511
3810
  ]
3512
3811
  },
3513
3812
  "sourceId": {
@@ -3568,7 +3867,8 @@ var publicToolContracts = {
3568
3867
  "SUPPORT_TICKET",
3569
3868
  "OPPORTUNITY",
3570
3869
  "SLACK",
3571
- "PERSON_PROFILE"
3870
+ "PERSON_PROFILE",
3871
+ "INVOICE"
3572
3872
  ]
3573
3873
  },
3574
3874
  {
@@ -3779,7 +4079,8 @@ var publicToolContracts = {
3779
4079
  "SUPPORT_TICKET",
3780
4080
  "OPPORTUNITY",
3781
4081
  "SLACK",
3782
- "PERSON_PROFILE"
4082
+ "PERSON_PROFILE",
4083
+ "INVOICE"
3783
4084
  ]
3784
4085
  },
3785
4086
  {
@@ -3875,7 +4176,7 @@ var publicToolContracts = {
3875
4176
  "commandVersion": 1,
3876
4177
  "ownerDomain": "customer-context",
3877
4178
  "title": "Get Source",
3878
- "description": "Get one exact source record by generic sourceType and sourceId. Use this when you already know the concrete underlying source you want to inspect.",
4179
+ "description": "Get one exact source record by generic sourceType and sourceId. Use this when you already know the concrete underlying source you want to inspect. For a Stripe invoice use sourceType INVOICE (STRIPE_INVOICE is accepted) with the Stripe invoice id (in_...): the record lists every stored line item, with amounts in the billing provider's minor units for the invoice's currency (cents for USD, EUR, GBP and CAD; other currencies follow the provider's amount rules).",
3879
4180
  "annotations": {
3880
4181
  "readOnlyHint": true,
3881
4182
  "destructiveHint": false,
@@ -3895,8 +4196,10 @@ var publicToolContracts = {
3895
4196
  "OPPORTUNITY",
3896
4197
  "SLACK",
3897
4198
  "PERSON_PROFILE",
4199
+ "INVOICE",
3898
4200
  "CRM",
3899
4201
  "CRM_OPPORTUNITY",
4202
+ "STRIPE_INVOICE",
3900
4203
  "EXTRACTED"
3901
4204
  ]
3902
4205
  },
@@ -3936,7 +4239,8 @@ var publicToolContracts = {
3936
4239
  "SUPPORT_TICKET",
3937
4240
  "OPPORTUNITY",
3938
4241
  "SLACK",
3939
- "PERSON_PROFILE"
4242
+ "PERSON_PROFILE",
4243
+ "INVOICE"
3940
4244
  ]
3941
4245
  },
3942
4246
  "sourceId": {
@@ -4121,7 +4425,8 @@ var publicToolContracts = {
4121
4425
  "SUPPORT_TICKET",
4122
4426
  "OPPORTUNITY",
4123
4427
  "SLACK",
4124
- "PERSON_PROFILE"
4428
+ "PERSON_PROFILE",
4429
+ "INVOICE"
4125
4430
  ]
4126
4431
  },
4127
4432
  "sourceId": {
@@ -4260,7 +4565,7 @@ var publicToolContracts = {
4260
4565
  "commandVersion": 1,
4261
4566
  "ownerDomain": "customer-context",
4262
4567
  "title": "List Sources",
4263
- "description": "List concrete source records deterministically. Use this instead of semantic search when you need enumerated calls, emails, calendar events, support tickets, Slack conversations, or opportunities.",
4568
+ "description": "List concrete source records deterministically. Use this instead of semantic search when you need enumerated calls, emails, calendar events, support tickets, Slack conversations, or opportunities. Invoices are listed only when you pass sourceType INVOICE with a customer, newest first.",
4264
4569
  "annotations": {
4265
4570
  "readOnlyHint": true,
4266
4571
  "destructiveHint": false,
@@ -4281,8 +4586,10 @@ var publicToolContracts = {
4281
4586
  "OPPORTUNITY",
4282
4587
  "SLACK",
4283
4588
  "PERSON_PROFILE",
4589
+ "INVOICE",
4284
4590
  "CRM",
4285
- "CRM_OPPORTUNITY"
4591
+ "CRM_OPPORTUNITY",
4592
+ "STRIPE_INVOICE"
4286
4593
  ]
4287
4594
  },
4288
4595
  "customer": {
@@ -4353,7 +4660,8 @@ var publicToolContracts = {
4353
4660
  "SUPPORT_TICKET",
4354
4661
  "OPPORTUNITY",
4355
4662
  "SLACK",
4356
- "PERSON_PROFILE"
4663
+ "PERSON_PROFILE",
4664
+ "INVOICE"
4357
4665
  ]
4358
4666
  },
4359
4667
  "sourceId": {
@@ -4538,7 +4846,8 @@ var publicToolContracts = {
4538
4846
  "SUPPORT_TICKET",
4539
4847
  "OPPORTUNITY",
4540
4848
  "SLACK",
4541
- "PERSON_PROFILE"
4849
+ "PERSON_PROFILE",
4850
+ "INVOICE"
4542
4851
  ]
4543
4852
  },
4544
4853
  "sourceId": {
@@ -4768,6 +5077,7 @@ var publicToolContracts = {
4768
5077
  "OPPORTUNITY",
4769
5078
  "SLACK",
4770
5079
  "PERSON_PROFILE",
5080
+ "INVOICE",
4771
5081
  "CRM",
4772
5082
  "CRM_OPPORTUNITY"
4773
5083
  ]
@@ -5014,7 +5324,8 @@ var publicToolContracts = {
5014
5324
  "SUPPORT_TICKET",
5015
5325
  "OPPORTUNITY",
5016
5326
  "SLACK",
5017
- "PERSON_PROFILE"
5327
+ "PERSON_PROFILE",
5328
+ "INVOICE"
5018
5329
  ]
5019
5330
  },
5020
5331
  "sourceId": {
@@ -5075,7 +5386,8 @@ var publicToolContracts = {
5075
5386
  "SUPPORT_TICKET",
5076
5387
  "OPPORTUNITY",
5077
5388
  "SLACK",
5078
- "PERSON_PROFILE"
5389
+ "PERSON_PROFILE",
5390
+ "INVOICE"
5079
5391
  ]
5080
5392
  },
5081
5393
  {
@@ -5286,7 +5598,8 @@ var publicToolContracts = {
5286
5598
  "SUPPORT_TICKET",
5287
5599
  "OPPORTUNITY",
5288
5600
  "SLACK",
5289
- "PERSON_PROFILE"
5601
+ "PERSON_PROFILE",
5602
+ "INVOICE"
5290
5603
  ]
5291
5604
  },
5292
5605
  {
@@ -5404,7 +5717,8 @@ var publicToolContracts = {
5404
5717
  "SUPPORT_TICKET",
5405
5718
  "OPPORTUNITY",
5406
5719
  "SLACK",
5407
- "PERSON_PROFILE"
5720
+ "PERSON_PROFILE",
5721
+ "INVOICE"
5408
5722
  ]
5409
5723
  },
5410
5724
  "sourceId": {
@@ -5571,7 +5885,7 @@ var publicToolContracts = {
5571
5885
  "commandVersion": 1,
5572
5886
  "ownerDomain": "analytics",
5573
5887
  "title": "Run SQL Query",
5574
- "description": "Execute read-only SQL queries against your analytics views.\n\nAvailable views:\n- activity: Customer activity events (event_name, event_type, event_channel, customer_id, occurred_at, properties, ...)\n- customers: Customer attributes (customer_id, domain, name, billing_status, plan, mrr_cents, traits, ...)\n- users: User attributes (user_id, email, name, customer_id, traits, ...)\n- revenue: Revenue snapshots over time (customer_id, snapshot_date, mrr_cents, ...)\n\nAll queries are automatically filtered to your organization's data.\nOnly SELECT queries are allowed.\nProperties and traits are JSON strings; inspect schemas and examples before filtering nested values.\n\nExample queries:\n- SELECT event_name, count(*) FROM activity GROUP BY 1 ORDER BY 2 DESC LIMIT 10\n- SELECT billing_status, sum(mrr_cents)/100 as mrr FROM customers GROUP BY 1\n- SELECT * FROM activity WHERE customer_id = 'cust_123' ORDER BY occurred_at DESC LIMIT 50",
5888
+ "description": "Execute read-only SQL queries against your analytics views.\n\nAvailable views:\n- activity: Customer activity events (event_name, event_type, event_channel, customer_id, occurred_at, properties, ...)\n- customers: Customer attributes (customer_id, domain, name, billing_status, plan, arr_cents (the revenue number: annualized, in arr_currency's units), arr_currency, traits, ...; mrr_cents and mrr_status are deprecated, use arr_cents)\n- users: User attributes (user_id, email, name, customer_id, traits, ...)\n- revenue: Revenue snapshots over time (customer_id, snapshot_date, mrr_cents, ...)\n\nAll queries are automatically filtered to your organization's data.\nOnly SELECT queries are allowed.\nProperties and traits are JSON strings; inspect schemas and examples before filtering nested values.\n\nExample queries:\n- SELECT event_name, count(*) FROM activity GROUP BY 1 ORDER BY 2 DESC LIMIT 10\n- SELECT billing_status, sum(arr_cents)/100 AS arr FROM customers WHERE arr_currency = 'USD' GROUP BY 1\n- SELECT * FROM activity WHERE customer_id = 'cust_123' ORDER BY occurred_at DESC LIMIT 50",
5575
5889
  "annotations": {
5576
5890
  "readOnlyHint": true,
5577
5891
  "destructiveHint": false,
@@ -8696,7 +9010,7 @@ var publicToolContracts = {
8696
9010
  "commandVersion": 1,
8697
9011
  "ownerDomain": "integrations",
8698
9012
  "title": "Set Up Integration",
8699
- "description": "Continue integration setup through validated credentials, safe configuration, or a trusted browser handoff.",
9013
+ "description": "Continue integration setup through validated credentials, safe configuration, or a trusted browser handoff. For a connected Stripe account, an optional stripe_renewal_date_field step names the subscription metadata key that holds renewal dates.",
8700
9014
  "annotations": {
8701
9015
  "readOnlyHint": false,
8702
9016
  "destructiveHint": false,
@@ -8834,6 +9148,32 @@ var publicToolContracts = {
8834
9148
  "connectionMode": {
8835
9149
  "type": "string",
8836
9150
  "const": "oauth"
9151
+ },
9152
+ "configuration": {
9153
+ "type": "object",
9154
+ "properties": {
9155
+ "kind": {
9156
+ "type": "string",
9157
+ "const": "stripe_renewal_date_field"
9158
+ },
9159
+ "key": {
9160
+ "anyOf": [
9161
+ {
9162
+ "type": "string",
9163
+ "minLength": 1,
9164
+ "maxLength": 40
9165
+ },
9166
+ {
9167
+ "type": "null"
9168
+ }
9169
+ ]
9170
+ }
9171
+ },
9172
+ "required": [
9173
+ "kind",
9174
+ "key"
9175
+ ],
9176
+ "additionalProperties": false
8837
9177
  }
8838
9178
  },
8839
9179
  "required": [
@@ -8865,6 +9205,32 @@ var publicToolContracts = {
8865
9205
  "apiKey"
8866
9206
  ],
8867
9207
  "additionalProperties": false
9208
+ },
9209
+ "configuration": {
9210
+ "type": "object",
9211
+ "properties": {
9212
+ "kind": {
9213
+ "type": "string",
9214
+ "const": "stripe_renewal_date_field"
9215
+ },
9216
+ "key": {
9217
+ "anyOf": [
9218
+ {
9219
+ "type": "string",
9220
+ "minLength": 1,
9221
+ "maxLength": 40
9222
+ },
9223
+ {
9224
+ "type": "null"
9225
+ }
9226
+ ]
9227
+ }
9228
+ },
9229
+ "required": [
9230
+ "kind",
9231
+ "key"
9232
+ ],
9233
+ "additionalProperties": false
8868
9234
  }
8869
9235
  },
8870
9236
  "required": [
@@ -9567,6 +9933,69 @@ var publicToolContracts = {
9567
9933
  "preview"
9568
9934
  ],
9569
9935
  "additionalProperties": false
9936
+ },
9937
+ {
9938
+ "type": "object",
9939
+ "properties": {
9940
+ "kind": {
9941
+ "type": "string",
9942
+ "const": "stripe_renewal_date_field"
9943
+ },
9944
+ "selectedKey": {
9945
+ "anyOf": [
9946
+ {
9947
+ "type": "string"
9948
+ },
9949
+ {
9950
+ "type": "null"
9951
+ }
9952
+ ]
9953
+ },
9954
+ "liveSubscriptionCount": {
9955
+ "type": "integer",
9956
+ "minimum": 0,
9957
+ "maximum": 9007199254740991
9958
+ },
9959
+ "keys": {
9960
+ "type": "array",
9961
+ "items": {
9962
+ "type": "object",
9963
+ "properties": {
9964
+ "key": {
9965
+ "type": "string"
9966
+ },
9967
+ "subscriptionCount": {
9968
+ "type": "integer",
9969
+ "minimum": 0,
9970
+ "maximum": 9007199254740991
9971
+ },
9972
+ "sampleDate": {
9973
+ "anyOf": [
9974
+ {
9975
+ "type": "string"
9976
+ },
9977
+ {
9978
+ "type": "null"
9979
+ }
9980
+ ]
9981
+ }
9982
+ },
9983
+ "required": [
9984
+ "key",
9985
+ "subscriptionCount",
9986
+ "sampleDate"
9987
+ ],
9988
+ "additionalProperties": false
9989
+ }
9990
+ }
9991
+ },
9992
+ "required": [
9993
+ "kind",
9994
+ "selectedKey",
9995
+ "liveSubscriptionCount",
9996
+ "keys"
9997
+ ],
9998
+ "additionalProperties": false
9570
9999
  }
9571
10000
  ]
9572
10001
  },
@@ -17934,14 +18363,16 @@ var customerListOrderFields = [
17934
18363
  "last_activity_at",
17935
18364
  "first_seen_at",
17936
18365
  "name",
17937
- "mrr_cents"
18366
+ "arr_cents"
17938
18367
  ];
17939
18368
  var customerIncludeSections = [
17940
18369
  "users",
17941
18370
  "revenue",
17942
18371
  "recentTimeline",
17943
18372
  "behaviorMetrics",
17944
- "enrichment"
18373
+ "enrichment",
18374
+ "renewal",
18375
+ "crm"
17945
18376
  ];
17946
18377
  var customerSourceTypes = [
17947
18378
  "EMAIL",
@@ -17950,7 +18381,8 @@ var customerSourceTypes = [
17950
18381
  "SUPPORT_TICKET",
17951
18382
  "OPPORTUNITY",
17952
18383
  "SLACK",
17953
- "PERSON_PROFILE"
18384
+ "PERSON_PROFILE",
18385
+ "INVOICE"
17954
18386
  ];
17955
18387
  var customerSourceTypeAliasMap = {
17956
18388
  "CRM": "OPPORTUNITY",
@@ -17968,6 +18400,7 @@ var customerSourceTypeInputs = [
17968
18400
  "OPPORTUNITY",
17969
18401
  "SLACK",
17970
18402
  "PERSON_PROFILE",
18403
+ "INVOICE",
17971
18404
  "CRM",
17972
18405
  "CRM_OPPORTUNITY"
17973
18406
  ];
@@ -18018,7 +18451,7 @@ var schemaTables = [
18018
18451
  "users",
18019
18452
  "revenue"
18020
18453
  ];
18021
- var sdkConsumerContractHash = "9409f42bc10034b8afef6a3ca3597fbe8ae9fa8ed8846f1e7b4b0b6a4320c31c";
18454
+ var sdkConsumerContractHash = "b77a1b10fd174c041e1ae2c6fa7dfec1b049dc32053dd4e5ccb9a86123311ff8";
18022
18455
 
18023
18456
  // src/contracts.ts
18024
18457
  var publicToolNameSet = new Set(publicToolNames);
@@ -18035,6 +18468,16 @@ function normalizeCustomerSourceType(value) {
18035
18468
  if (customerSourceTypeSet.has(normalized)) return normalized;
18036
18469
  return customerSourceTypeAliasMap[normalized] ?? null;
18037
18470
  }
18471
+ var customerSourceToolInputAliasMap = {
18472
+ STRIPE_INVOICE: "INVOICE"
18473
+ };
18474
+ function normalizeCustomerSourceToolInput(value) {
18475
+ const normalized = normalizeCustomerSourceType(value);
18476
+ if (normalized) return normalized;
18477
+ const key = value.trim().toUpperCase();
18478
+ if (!Object.hasOwn(customerSourceToolInputAliasMap, key)) return null;
18479
+ return customerSourceToolInputAliasMap[key];
18480
+ }
18038
18481
  function resolveCustomerContextSearchInput(value) {
18039
18482
  if (!value.query) return { ok: false, message: "A query argument is required" };
18040
18483
  const normalizedQuery = value.query.trim();
@@ -18254,6 +18697,7 @@ var sqlToolNames = analyticalToolNames.filter(
18254
18697
  isOutlitToolsApiError,
18255
18698
  isPublicToolName,
18256
18699
  matchesGeneratedJsonSchema,
18700
+ normalizeCustomerSourceToolInput,
18257
18701
  normalizeCustomerSourceType,
18258
18702
  piToolNames,
18259
18703
  publicOpenApiTransports,