@outlit/tools 2.4.0 → 2.5.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
@@ -79,6 +79,7 @@ module.exports = __toCommonJS(src_exports);
79
79
  var contractVersion = 1;
80
80
  var publicToolNames = [
81
81
  "outlit_list_customers",
82
+ "outlit_list_crm_fields",
82
83
  "outlit_list_users",
83
84
  "outlit_list_workspace_users",
84
85
  "outlit_get_customer",
@@ -137,10 +138,11 @@ var publicToolContracts = {
137
138
  "commandVersion": 1,
138
139
  "ownerDomain": "customers",
139
140
  "title": "List Customers",
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.",
141
+ "description": "Browse and filter customers. Use this to find customers by billing status, activity recency, revenue, name, or their CRM and support tool fields (crm; crmFields returns those fields' values on each customer, e.g. segment and health across the book; use outlit_list_crm_fields to find keys and values). 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.",
141
142
  "annotations": {
142
143
  "readOnlyHint": true,
143
144
  "destructiveHint": false,
145
+ "idempotentHint": true,
144
146
  "openWorldHint": false
145
147
  },
146
148
  "inputSchema": {
@@ -185,15 +187,20 @@ var publicToolContracts = {
185
187
  ]
186
188
  },
187
189
  "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.",
190
+ "description": "Minimum ARR, in arr.amount's units per year (1200000 is $12,000 for a customer billed in USD). Each customer is compared in its own currency, never converted: pass arrCurrency to compare one currency. Customers whose ARR is unknown never match.",
189
191
  "type": "number",
190
192
  "minimum": 0
191
193
  },
192
194
  "arrBelow": {
193
- "description": "Maximum ARR, in arr.amount's units per year. Customers whose ARR is unknown never match.",
195
+ "description": "Maximum ARR, in arr.amount's units per year, compared in each customer's own currency like arrAbove. Customers whose ARR is unknown never match.",
194
196
  "type": "number",
195
197
  "minimum": 0
196
198
  },
199
+ "arrCurrency": {
200
+ "description": "Only customers whose ARR is in this ISO 4217 currency, such as USD. Outlit never converts ARR between currencies, so use this to rank or bound ARR within one currency.",
201
+ "type": "string",
202
+ "pattern": "^[A-Za-z]{3}$"
203
+ },
197
204
  "mrrAbove": {
198
205
  "description": "Deprecated: use arrAbove.",
199
206
  "type": "number",
@@ -245,6 +252,120 @@ var publicToolContracts = {
245
252
  "description": "Filter customers by whether they have an owner",
246
253
  "type": "boolean"
247
254
  },
255
+ "crm": {
256
+ "description": "Filter by fields of the customer's CRM and support tool accounts, such as segment, health or stage; use outlit_list_crm_fields to find keys and values. All filters must hold; each holds when any linked account meets it. eq and in compare text ignoring case; gte and lte compare numbers, or ISO dates, never text. A multi-value field matches when any of its values does.",
257
+ "maxItems": 10,
258
+ "type": "array",
259
+ "items": {
260
+ "type": "object",
261
+ "properties": {
262
+ "field": {
263
+ "type": "object",
264
+ "properties": {
265
+ "provider": {
266
+ "type": "string",
267
+ "enum": [
268
+ "hubspot",
269
+ "salesforce",
270
+ "attio",
271
+ "pylon"
272
+ ]
273
+ },
274
+ "key": {
275
+ "type": "string",
276
+ "minLength": 1,
277
+ "maxLength": 191,
278
+ "description": "The field's key (API name) in that system, as outlit_list_crm_fields lists it."
279
+ }
280
+ },
281
+ "required": [
282
+ "provider",
283
+ "key"
284
+ ]
285
+ },
286
+ "op": {
287
+ "type": "string",
288
+ "enum": [
289
+ "eq",
290
+ "in",
291
+ "gte",
292
+ "lte"
293
+ ]
294
+ },
295
+ "value": {
296
+ "anyOf": [
297
+ {
298
+ "anyOf": [
299
+ {
300
+ "type": "string",
301
+ "maxLength": 500
302
+ },
303
+ {
304
+ "type": "number"
305
+ },
306
+ {
307
+ "type": "boolean"
308
+ }
309
+ ]
310
+ },
311
+ {
312
+ "minItems": 1,
313
+ "maxItems": 50,
314
+ "type": "array",
315
+ "items": {
316
+ "anyOf": [
317
+ {
318
+ "type": "string",
319
+ "maxLength": 500
320
+ },
321
+ {
322
+ "type": "number"
323
+ },
324
+ {
325
+ "type": "boolean"
326
+ }
327
+ ]
328
+ }
329
+ }
330
+ ]
331
+ }
332
+ },
333
+ "required": [
334
+ "field",
335
+ "op",
336
+ "value"
337
+ ]
338
+ }
339
+ },
340
+ "crmFields": {
341
+ "description": "CRM and support tool account fields to return on each customer, as crm; use outlit_list_crm_fields to find keys.",
342
+ "maxItems": 5,
343
+ "type": "array",
344
+ "items": {
345
+ "type": "object",
346
+ "properties": {
347
+ "provider": {
348
+ "type": "string",
349
+ "enum": [
350
+ "hubspot",
351
+ "salesforce",
352
+ "attio",
353
+ "pylon"
354
+ ]
355
+ },
356
+ "key": {
357
+ "type": "string",
358
+ "minLength": 1,
359
+ "maxLength": 191,
360
+ "description": "The field's key (API name) in that system, as outlit_list_crm_fields lists it."
361
+ }
362
+ },
363
+ "required": [
364
+ "provider",
365
+ "key"
366
+ ]
367
+ }
368
+ },
248
369
  "limit": {
249
370
  "description": "Results per page (max 1000)",
250
371
  "default": 50,
@@ -257,7 +378,7 @@ var publicToolContracts = {
257
378
  "type": "string"
258
379
  },
259
380
  "orderBy": {
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.",
381
+ "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, and compares amounts across currencies without converting them; arrCurrencies in the response says when that happened.",
261
382
  "default": "last_activity_at",
262
383
  "type": "string",
263
384
  "enum": [
@@ -427,6 +548,66 @@ var publicToolContracts = {
427
548
  "type": "null"
428
549
  }
429
550
  ]
551
+ },
552
+ "crm": {
553
+ "description": "With crmFields: each asked-for field, in the order asked.",
554
+ "type": "array",
555
+ "items": {
556
+ "type": "object",
557
+ "properties": {
558
+ "field": {
559
+ "type": "object",
560
+ "properties": {
561
+ "provider": {
562
+ "type": "string",
563
+ "enum": [
564
+ "hubspot",
565
+ "salesforce",
566
+ "attio",
567
+ "pylon"
568
+ ]
569
+ },
570
+ "key": {
571
+ "type": "string",
572
+ "minLength": 1,
573
+ "maxLength": 191,
574
+ "description": "The field's key (API name) in that system, as outlit_list_crm_fields lists it."
575
+ }
576
+ },
577
+ "required": [
578
+ "provider",
579
+ "key"
580
+ ],
581
+ "additionalProperties": false
582
+ },
583
+ "label": {
584
+ "type": "string"
585
+ },
586
+ "values": {
587
+ "type": "array",
588
+ "items": {
589
+ "anyOf": [
590
+ {
591
+ "type": "string"
592
+ },
593
+ {
594
+ "type": "number"
595
+ },
596
+ {
597
+ "type": "boolean"
598
+ }
599
+ ]
600
+ },
601
+ "description": "The field's values across the customer's linked accounts in that system, without duplicates; a multi-value field's values are listed one by one. Empty when no linked account has one."
602
+ }
603
+ },
604
+ "required": [
605
+ "field",
606
+ "label",
607
+ "values"
608
+ ],
609
+ "additionalProperties": false
610
+ }
430
611
  }
431
612
  },
432
613
  "required": [
@@ -473,6 +654,180 @@ var publicToolContracts = {
473
654
  "total"
474
655
  ],
475
656
  "additionalProperties": false
657
+ },
658
+ "arrCurrencies": {
659
+ "description": "Present when the call ordered or bounded by ARR: the ARR currencies among all matched customers. With more than one, amounts were compared as if they were the same unit, so a ranking mixes currencies; pass arrCurrency to rank within one.",
660
+ "type": "array",
661
+ "items": {
662
+ "type": "string"
663
+ }
664
+ }
665
+ },
666
+ "required": [
667
+ "items",
668
+ "pagination"
669
+ ],
670
+ "additionalProperties": false
671
+ }
672
+ },
673
+ "outlit_list_crm_fields": {
674
+ "toolName": "outlit_list_crm_fields",
675
+ "commandId": "crm_field.list",
676
+ "commandVersion": 1,
677
+ "ownerDomain": "customers",
678
+ "title": "List CRM Fields",
679
+ "description": "List the account fields the workspace's CRM and support tools hold (segment, health, stage, owner and custom fields), with each field's label, type, picklist options, the values customers' linked accounts hold, and how many accounts hold one. Use it to find the field and values for outlit_list_customers' crm filter and crmFields, for questions across many customers; for one customer's fields use outlit_get_customer with include crm.",
680
+ "annotations": {
681
+ "readOnlyHint": true,
682
+ "destructiveHint": false,
683
+ "idempotentHint": true,
684
+ "openWorldHint": false
685
+ },
686
+ "inputSchema": {
687
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
688
+ "type": "object",
689
+ "properties": {
690
+ "provider": {
691
+ "description": "Only this system's fields",
692
+ "type": "string",
693
+ "enum": [
694
+ "hubspot",
695
+ "salesforce",
696
+ "attio",
697
+ "pylon"
698
+ ]
699
+ },
700
+ "search": {
701
+ "description": "Only fields whose key or label contains this text, ignoring case",
702
+ "type": "string",
703
+ "maxLength": 100
704
+ },
705
+ "limit": {
706
+ "description": "Fields per page (max 50)",
707
+ "default": 20,
708
+ "type": "integer",
709
+ "minimum": 1,
710
+ "maximum": 50
711
+ },
712
+ "cursor": {
713
+ "description": "Pagination cursor from previous response",
714
+ "type": "string"
715
+ }
716
+ }
717
+ },
718
+ "outputSchema": {
719
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
720
+ "type": "object",
721
+ "properties": {
722
+ "items": {
723
+ "type": "array",
724
+ "items": {
725
+ "type": "object",
726
+ "properties": {
727
+ "field": {
728
+ "type": "object",
729
+ "properties": {
730
+ "provider": {
731
+ "type": "string",
732
+ "enum": [
733
+ "hubspot",
734
+ "salesforce",
735
+ "attio",
736
+ "pylon"
737
+ ]
738
+ },
739
+ "key": {
740
+ "type": "string",
741
+ "minLength": 1,
742
+ "maxLength": 191,
743
+ "description": "The field's key (API name) in that system, as outlit_list_crm_fields lists it."
744
+ }
745
+ },
746
+ "required": [
747
+ "provider",
748
+ "key"
749
+ ],
750
+ "additionalProperties": false,
751
+ "description": "Pass this as-is to outlit_list_customers' crm filter or crmFields."
752
+ },
753
+ "label": {
754
+ "type": "string"
755
+ },
756
+ "type": {
757
+ "type": "string",
758
+ "description": "The field's type in that system, as it names it."
759
+ },
760
+ "options": {
761
+ "anyOf": [
762
+ {
763
+ "type": "array",
764
+ "items": {
765
+ "type": "string"
766
+ }
767
+ },
768
+ {
769
+ "type": "null"
770
+ }
771
+ ],
772
+ "description": "A picklist's choices as that system defines them; null for other fields."
773
+ },
774
+ "observedValues": {
775
+ "type": "array",
776
+ "items": {
777
+ "anyOf": [
778
+ {
779
+ "type": "string"
780
+ },
781
+ {
782
+ "type": "number"
783
+ },
784
+ {
785
+ "type": "boolean"
786
+ }
787
+ ]
788
+ },
789
+ "description": "Up to 20 of the values the customers' linked accounts hold, most common first, a multi-value field's values one by one."
790
+ },
791
+ "accounts": {
792
+ "type": "integer",
793
+ "minimum": 0,
794
+ "maximum": 9007199254740991,
795
+ "description": "How many accounts linked to customers hold a value."
796
+ }
797
+ },
798
+ "required": [
799
+ "field",
800
+ "label",
801
+ "type",
802
+ "options",
803
+ "observedValues",
804
+ "accounts"
805
+ ],
806
+ "additionalProperties": false
807
+ }
808
+ },
809
+ "pagination": {
810
+ "type": "object",
811
+ "properties": {
812
+ "hasMore": {
813
+ "type": "boolean"
814
+ },
815
+ "nextCursor": {
816
+ "anyOf": [
817
+ {
818
+ "type": "string"
819
+ },
820
+ {
821
+ "type": "null"
822
+ }
823
+ ]
824
+ }
825
+ },
826
+ "required": [
827
+ "hasMore",
828
+ "nextCursor"
829
+ ],
830
+ "additionalProperties": false
476
831
  }
477
832
  },
478
833
  "required": [
@@ -488,10 +843,11 @@ var publicToolContracts = {
488
843
  "commandVersion": 1,
489
844
  "ownerDomain": "users",
490
845
  "title": "List Users",
491
- "description": "Browse and filter users. Use this to find users by journey stage, activity recency, customer, or email/name. Returns a paginated list with activity info and each user's sources: where Outlit found them (CRM, support tool, product analytics, Slack) and the calls, meetings, emails, tickets and Slack threads they took part in.",
846
+ "description": "Browse and filter users. Use this to find users by journey stage, activity recency, customer, or email/name. Returns a paginated list with activity info and each user's sources: where Outlit found them (CRM, support tool, product analytics, Slack) and the calls, meetings, emails, tickets and Slack threads they took part in. Pass include crm to add each user's contact records in the CRM and support tool with their own fields (job title, lead status, custom fields) as stored there, which can be hundreds, so request it only when needed.",
492
847
  "annotations": {
493
848
  "readOnlyHint": true,
494
849
  "destructiveHint": false,
850
+ "idempotentHint": true,
495
851
  "openWorldHint": false
496
852
  },
497
853
  "inputSchema": {
@@ -580,6 +936,25 @@ var publicToolContracts = {
580
936
  "asc",
581
937
  "desc"
582
938
  ]
939
+ },
940
+ "include": {
941
+ "description": "Additional data to include for each user. crm adds the user's contact records in the CRM and support tool with their own fields (job title, lead status, custom fields) as stored there; request it only when needed.",
942
+ "type": "array",
943
+ "items": {
944
+ "type": "string",
945
+ "enum": [
946
+ "crm"
947
+ ]
948
+ }
949
+ },
950
+ "crmFields": {
951
+ "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.",
952
+ "maxItems": 100,
953
+ "type": "array",
954
+ "items": {
955
+ "type": "string",
956
+ "maxLength": 191
957
+ }
583
958
  }
584
959
  }
585
960
  },
@@ -723,23 +1098,108 @@ var publicToolContracts = {
723
1098
  {
724
1099
  "type": "string"
725
1100
  },
726
- {
727
- "type": "null"
1101
+ {
1102
+ "type": "null"
1103
+ }
1104
+ ],
1105
+ "description": "The latest conversation; null for records."
1106
+ }
1107
+ },
1108
+ "required": [
1109
+ "system",
1110
+ "kind",
1111
+ "count",
1112
+ "firstSeenAt",
1113
+ "lastSeenAt"
1114
+ ],
1115
+ "additionalProperties": false
1116
+ },
1117
+ "description": "Where Outlit found this person: the systems that hold a record of them and the conversations they took part in. Empty when Outlit has no source recorded; absent from servers that predate it."
1118
+ },
1119
+ "crm": {
1120
+ "description": "With include crm: the contact records in the CRM and support tool that this user is linked to, one entry each, with the contact's own fields as stored there. Empty when the user has no linked contact; null when the read is bound to a past point in time. Absent unless requested, when the section is not enabled for the workspace, or when the size limit left no room for this user (then ask for fewer users or crmFields). The size limit is shared by all users in the response.",
1121
+ "anyOf": [
1122
+ {
1123
+ "type": "array",
1124
+ "items": {
1125
+ "type": "object",
1126
+ "properties": {
1127
+ "provider": {
1128
+ "type": "string",
1129
+ "description": "The system that holds the contact: hubspot, salesforce, attio or pylon."
1130
+ },
1131
+ "connectionId": {
1132
+ "type": "string",
1133
+ "description": "The Outlit integration connection the contact syncs through."
1134
+ },
1135
+ "contactId": {
1136
+ "type": "string",
1137
+ "description": "The contact's id in that system."
1138
+ },
1139
+ "fields": {
1140
+ "type": "array",
1141
+ "items": {
1142
+ "type": "object",
1143
+ "properties": {
1144
+ "key": {
1145
+ "type": "string",
1146
+ "description": "The field's API name or slug in that system."
1147
+ },
1148
+ "label": {
1149
+ "type": "string",
1150
+ "description": "The field's name in that system's UI; the key when unknown."
1151
+ },
1152
+ "value": {
1153
+ "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."
1154
+ },
1155
+ "custom": {
1156
+ "type": "boolean",
1157
+ "description": "True for a field the customer's team added to that system."
1158
+ }
1159
+ },
1160
+ "required": [
1161
+ "key",
1162
+ "label",
1163
+ "value",
1164
+ "custom"
1165
+ ],
1166
+ "additionalProperties": false
1167
+ },
1168
+ "description": "The contact's non-empty fields, sorted by key."
1169
+ },
1170
+ "omittedFields": {
1171
+ "description": "Keys of fields left out so the response stays within its size limit, as many as fit. Ask for them with crmFields.",
1172
+ "type": "array",
1173
+ "items": {
1174
+ "type": "string"
1175
+ }
1176
+ },
1177
+ "omittedFieldCount": {
1178
+ "description": "How many fields were left out, including any not named in omittedFields.",
1179
+ "type": "integer",
1180
+ "minimum": 0,
1181
+ "maximum": 9007199254740991
728
1182
  }
1183
+ },
1184
+ "required": [
1185
+ "provider",
1186
+ "connectionId",
1187
+ "contactId",
1188
+ "fields"
729
1189
  ],
730
- "description": "The latest conversation; null for records."
1190
+ "additionalProperties": false
731
1191
  }
732
1192
  },
733
- "required": [
734
- "system",
735
- "kind",
736
- "count",
737
- "firstSeenAt",
738
- "lastSeenAt"
739
- ],
740
- "additionalProperties": false
741
- },
742
- "description": "Where Outlit found this person: the systems that hold a record of them and the conversations they took part in. Empty when Outlit has no source recorded; absent from servers that predate it."
1193
+ {
1194
+ "type": "null"
1195
+ }
1196
+ ]
1197
+ },
1198
+ "omittedCrmContacts": {
1199
+ "description": "With include crm: how many of this user's linked contacts are left out of crm so the response stays within its size limit. Absent when none are.",
1200
+ "type": "integer",
1201
+ "minimum": 1,
1202
+ "maximum": 9007199254740991
743
1203
  },
744
1204
  "relationshipRole": {
745
1205
  "anyOf": [
@@ -848,6 +1308,7 @@ var publicToolContracts = {
848
1308
  "annotations": {
849
1309
  "readOnlyHint": true,
850
1310
  "destructiveHint": false,
1311
+ "idempotentHint": true,
851
1312
  "openWorldHint": false
852
1313
  },
853
1314
  "inputSchema": {
@@ -1036,10 +1497,11 @@ var publicToolContracts = {
1036
1497
  "commandVersion": 1,
1037
1498
  "ownerDomain": "customers",
1038
1499
  "title": "Get Customer",
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.",
1500
+ "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, lifecycle, owner and custom fields) as stored and the contacts associated with each account; request it when the question is about how that system classifies the account (its stage, segment, health or owner) or who the account's contacts are, and pass crmFields to read only some fields, since an account can carry hundreds; or links: the id of every record in another system linked to the customer (billing customers, CRM and support accounts, product analytics groups, Slack channels). With both users and crm, each user also carries crm: their contact records there, with their own fields. 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). lifetimeRevenueCurrency names lifetimeRevenue's currency.",
1040
1501
  "annotations": {
1041
1502
  "readOnlyHint": true,
1042
1503
  "destructiveHint": false,
1504
+ "idempotentHint": true,
1043
1505
  "openWorldHint": false
1044
1506
  },
1045
1507
  "inputSchema": {
@@ -1064,7 +1526,8 @@ var publicToolContracts = {
1064
1526
  "behaviorMetrics",
1065
1527
  "enrichment",
1066
1528
  "renewal",
1067
- "crm"
1529
+ "crm",
1530
+ "links"
1068
1531
  ]
1069
1532
  }
1070
1533
  },
@@ -1079,8 +1542,16 @@ var publicToolContracts = {
1079
1542
  "90d"
1080
1543
  ]
1081
1544
  },
1545
+ "subscriptions": {
1546
+ "description": "With include revenue only: which subscriptions revenue.subscriptions lists. live (the default when omitted) lists the ones that bill now; all adds canceled ones with endedAt (the 20 most recently ended), for questions like whether a canceled subscription was replaced or why a customer has two billing records.",
1547
+ "type": "string",
1548
+ "enum": [
1549
+ "live",
1550
+ "all"
1551
+ ]
1552
+ },
1082
1553
  "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.",
1554
+ "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. Applies to the accounts and to the users' contacts.",
1084
1555
  "maxItems": 100,
1085
1556
  "type": "array",
1086
1557
  "items": {
@@ -1322,6 +1793,91 @@ var publicToolContracts = {
1322
1793
  },
1323
1794
  "description": "Where Outlit found this person: the systems that hold a record of them and the conversations they took part in. Empty when Outlit has no source recorded; absent from servers that predate it."
1324
1795
  },
1796
+ "crm": {
1797
+ "description": "With include crm: the contact records in the CRM and support tool that this user is linked to, one entry each, with the contact's own fields as stored there. Empty when the user has no linked contact; null when the read is bound to a past point in time. Absent unless requested, when the section is not enabled for the workspace, or when the size limit left no room for this user (then ask for fewer users or crmFields). The size limit is shared by all users in the response.",
1798
+ "anyOf": [
1799
+ {
1800
+ "type": "array",
1801
+ "items": {
1802
+ "type": "object",
1803
+ "properties": {
1804
+ "provider": {
1805
+ "type": "string",
1806
+ "description": "The system that holds the contact: hubspot, salesforce, attio or pylon."
1807
+ },
1808
+ "connectionId": {
1809
+ "type": "string",
1810
+ "description": "The Outlit integration connection the contact syncs through."
1811
+ },
1812
+ "contactId": {
1813
+ "type": "string",
1814
+ "description": "The contact's id in that system."
1815
+ },
1816
+ "fields": {
1817
+ "type": "array",
1818
+ "items": {
1819
+ "type": "object",
1820
+ "properties": {
1821
+ "key": {
1822
+ "type": "string",
1823
+ "description": "The field's API name or slug in that system."
1824
+ },
1825
+ "label": {
1826
+ "type": "string",
1827
+ "description": "The field's name in that system's UI; the key when unknown."
1828
+ },
1829
+ "value": {
1830
+ "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."
1831
+ },
1832
+ "custom": {
1833
+ "type": "boolean",
1834
+ "description": "True for a field the customer's team added to that system."
1835
+ }
1836
+ },
1837
+ "required": [
1838
+ "key",
1839
+ "label",
1840
+ "value",
1841
+ "custom"
1842
+ ],
1843
+ "additionalProperties": false
1844
+ },
1845
+ "description": "The contact's non-empty fields, sorted by key."
1846
+ },
1847
+ "omittedFields": {
1848
+ "description": "Keys of fields left out so the response stays within its size limit, as many as fit. Ask for them with crmFields.",
1849
+ "type": "array",
1850
+ "items": {
1851
+ "type": "string"
1852
+ }
1853
+ },
1854
+ "omittedFieldCount": {
1855
+ "description": "How many fields were left out, including any not named in omittedFields.",
1856
+ "type": "integer",
1857
+ "minimum": 0,
1858
+ "maximum": 9007199254740991
1859
+ }
1860
+ },
1861
+ "required": [
1862
+ "provider",
1863
+ "connectionId",
1864
+ "contactId",
1865
+ "fields"
1866
+ ],
1867
+ "additionalProperties": false
1868
+ }
1869
+ },
1870
+ {
1871
+ "type": "null"
1872
+ }
1873
+ ]
1874
+ },
1875
+ "omittedCrmContacts": {
1876
+ "description": "With include crm: how many of this user's linked contacts are left out of crm so the response stays within its size limit. Absent when none are.",
1877
+ "type": "integer",
1878
+ "minimum": 1,
1879
+ "maximum": 9007199254740991
1880
+ },
1325
1881
  "relationshipRole": {
1326
1882
  "anyOf": [
1327
1883
  {
@@ -1457,43 +2013,363 @@ var publicToolContracts = {
1457
2013
  {
1458
2014
  "type": "null"
1459
2015
  }
1460
- ],
1461
- "description": "Invoiced in the last 12 months."
2016
+ ],
2017
+ "description": "Invoice charges outside any subscription (one-time invoice items, leaving out setup, onboarding and implementation fees and prorations) whose service period began in the last 12 months. Subscription charges are never in it, so it is not the customer's total invoiced."
2018
+ }
2019
+ },
2020
+ "required": [
2021
+ "subscriptions",
2022
+ "usage",
2023
+ "invoicedLast12Months"
2024
+ ],
2025
+ "additionalProperties": false,
2026
+ "description": "What amount was counted from, in the same units: the larger of subscriptions plus usage, and invoicedLast12Months. A part is null when unknown or not applicable."
2027
+ }
2028
+ },
2029
+ "required": [
2030
+ "amount",
2031
+ "currency",
2032
+ "estimated",
2033
+ "lifecycle",
2034
+ "parts"
2035
+ ],
2036
+ "additionalProperties": false
2037
+ },
2038
+ {
2039
+ "type": "null"
2040
+ }
2041
+ ],
2042
+ "description": "Null when the app shows no ARR for this customer."
2043
+ },
2044
+ "lifetimeRevenue": {
2045
+ "type": "number",
2046
+ "description": "Lifetime revenue in the billing provider's units for lifetimeRevenueCurrency, 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."
2047
+ },
2048
+ "lifetimeRevenueCurrency": {
2049
+ "description": "ISO currency code of lifetimeRevenue; null when nothing has been paid or the currency is unknown.",
2050
+ "anyOf": [
2051
+ {
2052
+ "type": "string"
2053
+ },
2054
+ {
2055
+ "type": "null"
2056
+ }
2057
+ ]
2058
+ },
2059
+ "activeSubscriptions": {
2060
+ "type": "integer",
2061
+ "minimum": 0,
2062
+ "maximum": 9007199254740991,
2063
+ "description": "Subscriptions that bill now: active, trialing or past due. billingStatus says whether payments are behind."
2064
+ },
2065
+ "subscriptions": {
2066
+ "description": "The customer's live subscriptions in the billing provider (active, past due, paused or trialing) with every item, including items an invoice skips in a given cycle. With input subscriptions all, canceled subscriptions follow the live ones, most recently ended first (at most 20). Absent when unavailable.",
2067
+ "type": "array",
2068
+ "items": {
2069
+ "type": "object",
2070
+ "properties": {
2071
+ "id": {
2072
+ "type": "string",
2073
+ "description": "The billing provider's subscription id (sub_...)."
2074
+ },
2075
+ "status": {
2076
+ "type": "string",
2077
+ "description": "The provider's own status: active, past_due, paused or trialing, and with subscriptions all also canceled."
2078
+ },
2079
+ "paused": {
2080
+ "type": "boolean",
2081
+ "description": "Collection is paused."
2082
+ },
2083
+ "currentPeriodEnd": {
2084
+ "anyOf": [
2085
+ {
2086
+ "type": "string",
2087
+ "format": "date-time",
2088
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
2089
+ },
2090
+ {
2091
+ "type": "null"
2092
+ }
2093
+ ],
2094
+ "description": "End of the current billing period. With items on different intervals it is the shortest interval's period, not the term."
2095
+ },
2096
+ "cancelAtPeriodEnd": {
2097
+ "anyOf": [
2098
+ {
2099
+ "type": "boolean"
2100
+ },
2101
+ {
2102
+ "type": "null"
2103
+ }
2104
+ ],
2105
+ "description": "The subscription is set to end at currentPeriodEnd instead of renewing. Null when unknown: Outlit's stored billing data predates it, and cancelAt is then null too."
2106
+ },
2107
+ "cancelAt": {
2108
+ "anyOf": [
2109
+ {
2110
+ "type": "string",
2111
+ "format": "date-time",
2112
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
2113
+ },
2114
+ {
2115
+ "type": "null"
2116
+ }
2117
+ ],
2118
+ "description": "When a scheduled cancellation ends the subscription; null when none is scheduled or unknown."
2119
+ },
2120
+ "items": {
2121
+ "type": "array",
2122
+ "items": {
2123
+ "type": "object",
2124
+ "properties": {
2125
+ "productId": {
2126
+ "anyOf": [
2127
+ {
2128
+ "type": "string"
2129
+ },
2130
+ {
2131
+ "type": "null"
2132
+ }
2133
+ ],
2134
+ "description": "The billing provider's product id (prod_...)."
2135
+ },
2136
+ "productName": {
2137
+ "anyOf": [
2138
+ {
2139
+ "type": "string"
2140
+ },
2141
+ {
2142
+ "type": "null"
2143
+ }
2144
+ ],
2145
+ "description": "The product's name in the billing provider; null when Outlit has not synced it."
2146
+ },
2147
+ "priceId": {
2148
+ "anyOf": [
2149
+ {
2150
+ "type": "string"
2151
+ },
2152
+ {
2153
+ "type": "null"
2154
+ }
2155
+ ],
2156
+ "description": "The billing provider's price id (price_...)."
2157
+ },
2158
+ "quantity": {
2159
+ "anyOf": [
2160
+ {
2161
+ "type": "number"
2162
+ },
2163
+ {
2164
+ "type": "null"
2165
+ }
2166
+ ],
2167
+ "description": "Units (seats) on a licensed item; null when unset."
2168
+ },
2169
+ "unitAmount": {
2170
+ "anyOf": [
2171
+ {
2172
+ "type": "number"
2173
+ },
2174
+ {
2175
+ "type": "null"
2176
+ }
2177
+ ],
2178
+ "description": "List price per unit for one billing interval, in the same units as arr.amount; null when the price has no single unit amount (tiers)."
2179
+ },
2180
+ "currency": {
2181
+ "type": "string",
2182
+ "description": "ISO currency code of unitAmount."
2183
+ },
2184
+ "interval": {
2185
+ "anyOf": [
2186
+ {
2187
+ "type": "string",
2188
+ "enum": [
2189
+ "day",
2190
+ "week",
2191
+ "month",
2192
+ "year"
2193
+ ]
2194
+ },
2195
+ {
2196
+ "type": "null"
2197
+ }
2198
+ ]
2199
+ },
2200
+ "intervalCount": {
2201
+ "anyOf": [
2202
+ {
2203
+ "type": "number"
2204
+ },
2205
+ {
2206
+ "type": "null"
2207
+ }
2208
+ ],
2209
+ "description": "Billing intervals per charge, e.g. 3 months."
2210
+ },
2211
+ "usageType": {
2212
+ "anyOf": [
2213
+ {
2214
+ "type": "string",
2215
+ "enum": [
2216
+ "licensed",
2217
+ "metered"
2218
+ ]
2219
+ },
2220
+ {
2221
+ "type": "null"
2222
+ }
2223
+ ],
2224
+ "description": "licensed bills a fixed quantity; metered bills reported usage."
2225
+ },
2226
+ "billingScheme": {
2227
+ "anyOf": [
2228
+ {
2229
+ "type": "string",
2230
+ "enum": [
2231
+ "per_unit",
2232
+ "tiered"
2233
+ ]
2234
+ },
2235
+ {
2236
+ "type": "null"
2237
+ }
2238
+ ]
1462
2239
  }
1463
2240
  },
1464
2241
  "required": [
1465
- "subscriptions",
1466
- "usage",
1467
- "invoicedLast12Months"
2242
+ "productId",
2243
+ "productName",
2244
+ "priceId",
2245
+ "quantity",
2246
+ "unitAmount",
2247
+ "currency",
2248
+ "interval",
2249
+ "intervalCount",
2250
+ "usageType",
2251
+ "billingScheme"
1468
2252
  ],
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
- }
2253
+ "additionalProperties": false
2254
+ },
2255
+ "description": "Every item on the subscription. Empty for a canceled one, whose stored snapshot lists no items."
1472
2256
  },
1473
- "required": [
1474
- "amount",
1475
- "currency",
1476
- "estimated",
1477
- "lifecycle",
1478
- "parts"
1479
- ],
1480
- "additionalProperties": false
2257
+ "billingAccountId": {
2258
+ "anyOf": [
2259
+ {
2260
+ "type": "string"
2261
+ },
2262
+ {
2263
+ "type": "null"
2264
+ }
2265
+ ],
2266
+ "description": "The Stripe customer id (cus_...) the subscription bills through; null when unknown. Match it against revenue.billingAccounts."
2267
+ },
2268
+ "endedAt": {
2269
+ "anyOf": [
2270
+ {
2271
+ "type": "string",
2272
+ "format": "date-time",
2273
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
2274
+ },
2275
+ {
2276
+ "type": "null"
2277
+ }
2278
+ ],
2279
+ "description": "When the subscription ended; null while it is live."
2280
+ }
1481
2281
  },
1482
- {
1483
- "type": "null"
1484
- }
1485
- ],
1486
- "description": "Null when the app shows no ARR for this customer."
2282
+ "required": [
2283
+ "id",
2284
+ "status",
2285
+ "paused",
2286
+ "currentPeriodEnd",
2287
+ "cancelAtPeriodEnd",
2288
+ "cancelAt",
2289
+ "items",
2290
+ "billingAccountId",
2291
+ "endedAt"
2292
+ ],
2293
+ "additionalProperties": false
2294
+ }
1487
2295
  },
1488
- "lifetimeRevenue": {
1489
- "type": "number",
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."
2296
+ "billingAccounts": {
2297
+ "description": "Every Stripe customer behind this customer, including ones on customers merged into it, sorted by id. Absent when it can't be read.",
2298
+ "type": "array",
2299
+ "items": {
2300
+ "type": "object",
2301
+ "properties": {
2302
+ "provider": {
2303
+ "type": "string",
2304
+ "const": "stripe"
2305
+ },
2306
+ "id": {
2307
+ "type": "string"
2308
+ }
2309
+ },
2310
+ "required": [
2311
+ "provider",
2312
+ "id"
2313
+ ],
2314
+ "additionalProperties": false
2315
+ }
1491
2316
  },
1492
- "activeSubscriptions": {
1493
- "type": "integer",
1494
- "minimum": 0,
1495
- "maximum": 9007199254740991,
1496
- "description": "Subscriptions that bill now: active, trialing or past due. billingStatus says whether payments are behind."
2317
+ "overdueInvoices": {
2318
+ "description": "Open invoices past their due date that still owe money, oldest due first (at most 20). Empty when none is overdue; absent when unavailable.",
2319
+ "maxItems": 20,
2320
+ "type": "array",
2321
+ "items": {
2322
+ "type": "object",
2323
+ "properties": {
2324
+ "id": {
2325
+ "type": "string",
2326
+ "description": "The invoice id (in_...); read it with outlit_get_source INVOICE."
2327
+ },
2328
+ "number": {
2329
+ "anyOf": [
2330
+ {
2331
+ "type": "string"
2332
+ },
2333
+ {
2334
+ "type": "null"
2335
+ }
2336
+ ]
2337
+ },
2338
+ "amountRemaining": {
2339
+ "type": "number",
2340
+ "description": "Still owed, in the billing provider's minor units for currency."
2341
+ },
2342
+ "currency": {
2343
+ "anyOf": [
2344
+ {
2345
+ "type": "string"
2346
+ },
2347
+ {
2348
+ "type": "null"
2349
+ }
2350
+ ]
2351
+ },
2352
+ "dueDate": {
2353
+ "type": "string",
2354
+ "format": "date-time",
2355
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
2356
+ },
2357
+ "daysOverdue": {
2358
+ "type": "integer",
2359
+ "minimum": 0,
2360
+ "maximum": 9007199254740991
2361
+ }
2362
+ },
2363
+ "required": [
2364
+ "id",
2365
+ "number",
2366
+ "amountRemaining",
2367
+ "currency",
2368
+ "dueDate",
2369
+ "daysOverdue"
2370
+ ],
2371
+ "additionalProperties": false
2372
+ }
1497
2373
  }
1498
2374
  },
1499
2375
  "required": [
@@ -2031,7 +2907,7 @@ var publicToolContracts = {
2031
2907
  ]
2032
2908
  },
2033
2909
  "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.",
2910
+ "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 and its associated contacts. 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
2911
  "anyOf": [
2036
2912
  {
2037
2913
  "type": "array",
@@ -2110,6 +2986,75 @@ var publicToolContracts = {
2110
2986
  ],
2111
2987
  "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
2988
  },
2989
+ "contacts": {
2990
+ "type": "array",
2991
+ "items": {
2992
+ "type": "object",
2993
+ "properties": {
2994
+ "contactId": {
2995
+ "type": "string",
2996
+ "description": "The contact's id in that system."
2997
+ },
2998
+ "name": {
2999
+ "anyOf": [
3000
+ {
3001
+ "type": "string"
3002
+ },
3003
+ {
3004
+ "type": "null"
3005
+ }
3006
+ ]
3007
+ },
3008
+ "email": {
3009
+ "anyOf": [
3010
+ {
3011
+ "type": "string"
3012
+ },
3013
+ {
3014
+ "type": "null"
3015
+ }
3016
+ ]
3017
+ },
3018
+ "title": {
3019
+ "anyOf": [
3020
+ {
3021
+ "type": "string"
3022
+ },
3023
+ {
3024
+ "type": "null"
3025
+ }
3026
+ ],
3027
+ "description": "The contact's job title there."
3028
+ },
3029
+ "userId": {
3030
+ "anyOf": [
3031
+ {
3032
+ "type": "string"
3033
+ },
3034
+ {
3035
+ "type": "null"
3036
+ }
3037
+ ],
3038
+ "description": "The id of this customer's user with that contact or email; null when the person is not one of its users, for example someone on another email domain."
3039
+ }
3040
+ },
3041
+ "required": [
3042
+ "contactId",
3043
+ "name",
3044
+ "email",
3045
+ "title",
3046
+ "userId"
3047
+ ],
3048
+ "additionalProperties": false
3049
+ },
3050
+ "description": "The contacts that system associates with the account, whatever their email domain, most recently modified first, at most 25."
3051
+ },
3052
+ "omittedContactCount": {
3053
+ "description": "How many more associated contacts there are beyond those listed.",
3054
+ "type": "integer",
3055
+ "minimum": 1,
3056
+ "maximum": 9007199254740991
3057
+ },
2113
3058
  "fields": {
2114
3059
  "type": "array",
2115
3060
  "items": {
@@ -2162,6 +3107,7 @@ var publicToolContracts = {
2162
3107
  "name",
2163
3108
  "owner",
2164
3109
  "recordUpdatedAt",
3110
+ "contacts",
2165
3111
  "fields"
2166
3112
  ],
2167
3113
  "additionalProperties": false
@@ -2171,6 +3117,90 @@ var publicToolContracts = {
2171
3117
  "type": "null"
2172
3118
  }
2173
3119
  ]
3120
+ },
3121
+ "links": {
3122
+ "description": "Every record in another system linked to this customer, including records still held by customers merged into it: billing customers, CRM and support accounts, product analytics groups and accounts, Slack channels and the product's own customer id. A record is listed only when its id in that system is known. Use it to tell whether two customers share a record, or to name the record to look up in that system; for a CRM account's own fields use include crm. Ordered by kind, provider and id. Null when the read is bound to a past point in time.",
3123
+ "anyOf": [
3124
+ {
3125
+ "type": "object",
3126
+ "properties": {
3127
+ "records": {
3128
+ "type": "array",
3129
+ "items": {
3130
+ "type": "object",
3131
+ "properties": {
3132
+ "kind": {
3133
+ "type": "string",
3134
+ "enum": [
3135
+ "billing_customer",
3136
+ "crm_account",
3137
+ "support_account",
3138
+ "analytics_group",
3139
+ "analytics_account",
3140
+ "slack_channel",
3141
+ "slack_workspace",
3142
+ "external_organization"
3143
+ ],
3144
+ "description": "What the record is: a billing customer (such as a Stripe customer), a CRM or support account, a product analytics group or account, a Slack channel or workspace, or the customer's id in the product's own sign-up system."
3145
+ },
3146
+ "provider": {
3147
+ "anyOf": [
3148
+ {
3149
+ "type": "string"
3150
+ },
3151
+ {
3152
+ "type": "null"
3153
+ }
3154
+ ],
3155
+ "description": "The system that holds the record, such as stripe, hubspot or posthog; null when unknown."
3156
+ },
3157
+ "id": {
3158
+ "type": "string",
3159
+ "description": "The record's id in that system, such as a Stripe customer id (cus_...)."
3160
+ },
3161
+ "connectionId": {
3162
+ "anyOf": [
3163
+ {
3164
+ "type": "string"
3165
+ },
3166
+ {
3167
+ "type": "null"
3168
+ }
3169
+ ],
3170
+ "description": "The Outlit integration connection the record came through; null when none names it."
3171
+ },
3172
+ "linkedAt": {
3173
+ "type": "string",
3174
+ "description": "When Outlit linked the record to this customer, ISO 8601. Outlit's own time, not a fact about the customer."
3175
+ }
3176
+ },
3177
+ "required": [
3178
+ "kind",
3179
+ "provider",
3180
+ "id",
3181
+ "connectionId",
3182
+ "linkedAt"
3183
+ ],
3184
+ "additionalProperties": false
3185
+ }
3186
+ },
3187
+ "omitted": {
3188
+ "type": "integer",
3189
+ "minimum": 0,
3190
+ "maximum": 9007199254740991,
3191
+ "description": "How many more linked records exist beyond the first 50, which are left out."
3192
+ }
3193
+ },
3194
+ "required": [
3195
+ "records",
3196
+ "omitted"
3197
+ ],
3198
+ "additionalProperties": false
3199
+ },
3200
+ {
3201
+ "type": "null"
3202
+ }
3203
+ ]
2174
3204
  }
2175
3205
  },
2176
3206
  "required": [
@@ -2189,6 +3219,7 @@ var publicToolContracts = {
2189
3219
  "annotations": {
2190
3220
  "readOnlyHint": true,
2191
3221
  "destructiveHint": false,
3222
+ "idempotentHint": true,
2192
3223
  "openWorldHint": false
2193
3224
  },
2194
3225
  "inputSchema": {
@@ -2345,6 +3376,7 @@ var publicToolContracts = {
2345
3376
  "annotations": {
2346
3377
  "readOnlyHint": false,
2347
3378
  "destructiveHint": false,
3379
+ "idempotentHint": false,
2348
3380
  "openWorldHint": false
2349
3381
  },
2350
3382
  "inputSchema": {
@@ -2405,7 +3437,8 @@ var publicToolContracts = {
2405
3437
  "description": "Share a customer with an active workspace member as a Viewer or Editor. The customer ID must be exact.",
2406
3438
  "annotations": {
2407
3439
  "readOnlyHint": false,
2408
- "destructiveHint": false,
3440
+ "destructiveHint": true,
3441
+ "idempotentHint": true,
2409
3442
  "openWorldHint": false
2410
3443
  },
2411
3444
  "inputSchema": {
@@ -2491,7 +3524,8 @@ var publicToolContracts = {
2491
3524
  "description": "Change an existing customer collaborator between Viewer and Editor.",
2492
3525
  "annotations": {
2493
3526
  "readOnlyHint": false,
2494
- "destructiveHint": false,
3527
+ "destructiveHint": true,
3528
+ "idempotentHint": true,
2495
3529
  "openWorldHint": false
2496
3530
  },
2497
3531
  "inputSchema": {
@@ -2578,6 +3612,7 @@ var publicToolContracts = {
2578
3612
  "annotations": {
2579
3613
  "readOnlyHint": false,
2580
3614
  "destructiveHint": true,
3615
+ "idempotentHint": true,
2581
3616
  "openWorldHint": false
2582
3617
  },
2583
3618
  "inputSchema": {
@@ -2628,6 +3663,7 @@ var publicToolContracts = {
2628
3663
  "annotations": {
2629
3664
  "readOnlyHint": true,
2630
3665
  "destructiveHint": false,
3666
+ "idempotentHint": true,
2631
3667
  "openWorldHint": false
2632
3668
  },
2633
3669
  "inputSchema": {
@@ -2998,6 +4034,7 @@ var publicToolContracts = {
2998
4034
  "annotations": {
2999
4035
  "readOnlyHint": true,
3000
4036
  "destructiveHint": false,
4037
+ "idempotentHint": true,
3001
4038
  "openWorldHint": false
3002
4039
  },
3003
4040
  "inputSchema": {
@@ -3670,6 +4707,7 @@ var publicToolContracts = {
3670
4707
  "annotations": {
3671
4708
  "readOnlyHint": true,
3672
4709
  "destructiveHint": false,
4710
+ "idempotentHint": true,
3673
4711
  "openWorldHint": false
3674
4712
  },
3675
4713
  "inputSchema": {
@@ -4176,10 +5214,11 @@ var publicToolContracts = {
4176
5214
  "commandVersion": 1,
4177
5215
  "ownerDomain": "customer-context",
4178
5216
  "title": "Get Source",
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).",
5217
+ "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). The lines are what that invoice billed for its period, not the subscription's item set: a yearly item is absent from its monthly invoices, and a metered item with no usage may be absent too. For a CRM opportunity (sourceType OPPORTUNITY) the record also lists the deal's own CRM fields as record.fields (each with key, label, value and custom, custom fields included) when the workspace has the CRM fields enabled; record.omittedFields names any left out to keep the response small.",
4180
5218
  "annotations": {
4181
5219
  "readOnlyHint": true,
4182
5220
  "destructiveHint": false,
5221
+ "idempotentHint": true,
4183
5222
  "openWorldHint": false
4184
5223
  },
4185
5224
  "inputSchema": {
@@ -4569,6 +5608,7 @@ var publicToolContracts = {
4569
5608
  "annotations": {
4570
5609
  "readOnlyHint": true,
4571
5610
  "destructiveHint": false,
5611
+ "idempotentHint": true,
4572
5612
  "openWorldHint": false
4573
5613
  },
4574
5614
  "inputSchema": {
@@ -5021,6 +6061,7 @@ var publicToolContracts = {
5021
6061
  "annotations": {
5022
6062
  "readOnlyHint": true,
5023
6063
  "destructiveHint": false,
6064
+ "idempotentHint": true,
5024
6065
  "openWorldHint": false
5025
6066
  },
5026
6067
  "inputSchema": {
@@ -5889,6 +6930,7 @@ var publicToolContracts = {
5889
6930
  "annotations": {
5890
6931
  "readOnlyHint": true,
5891
6932
  "destructiveHint": false,
6933
+ "idempotentHint": true,
5892
6934
  "openWorldHint": false
5893
6935
  },
5894
6936
  "inputSchema": {
@@ -5973,6 +7015,7 @@ var publicToolContracts = {
5973
7015
  "annotations": {
5974
7016
  "readOnlyHint": true,
5975
7017
  "destructiveHint": false,
7018
+ "idempotentHint": true,
5976
7019
  "openWorldHint": false
5977
7020
  },
5978
7021
  "inputSchema": {
@@ -6182,6 +7225,7 @@ var publicToolContracts = {
6182
7225
  "annotations": {
6183
7226
  "readOnlyHint": true,
6184
7227
  "destructiveHint": false,
7228
+ "idempotentHint": true,
6185
7229
  "openWorldHint": false
6186
7230
  },
6187
7231
  "inputSchema": {
@@ -6566,6 +7610,7 @@ var publicToolContracts = {
6566
7610
  "annotations": {
6567
7611
  "readOnlyHint": true,
6568
7612
  "destructiveHint": false,
7613
+ "idempotentHint": true,
6569
7614
  "openWorldHint": false
6570
7615
  },
6571
7616
  "inputSchema": {
@@ -6956,6 +8001,7 @@ var publicToolContracts = {
6956
8001
  "annotations": {
6957
8002
  "readOnlyHint": false,
6958
8003
  "destructiveHint": false,
8004
+ "idempotentHint": false,
6959
8005
  "openWorldHint": true
6960
8006
  },
6961
8007
  "inputSchema": {
@@ -7365,6 +8411,7 @@ var publicToolContracts = {
7365
8411
  "annotations": {
7366
8412
  "readOnlyHint": false,
7367
8413
  "destructiveHint": false,
8414
+ "idempotentHint": true,
7368
8415
  "openWorldHint": true
7369
8416
  },
7370
8417
  "inputSchema": {
@@ -7769,6 +8816,7 @@ var publicToolContracts = {
7769
8816
  "annotations": {
7770
8817
  "readOnlyHint": false,
7771
8818
  "destructiveHint": false,
8819
+ "idempotentHint": true,
7772
8820
  "openWorldHint": true
7773
8821
  },
7774
8822
  "inputSchema": {
@@ -8159,6 +9207,7 @@ var publicToolContracts = {
8159
9207
  "annotations": {
8160
9208
  "readOnlyHint": false,
8161
9209
  "destructiveHint": false,
9210
+ "idempotentHint": true,
8162
9211
  "openWorldHint": false
8163
9212
  },
8164
9213
  "inputSchema": {
@@ -8549,6 +9598,7 @@ var publicToolContracts = {
8549
9598
  "annotations": {
8550
9599
  "readOnlyHint": false,
8551
9600
  "destructiveHint": true,
9601
+ "idempotentHint": true,
8552
9602
  "openWorldHint": false
8553
9603
  },
8554
9604
  "inputSchema": {
@@ -8607,6 +9657,7 @@ var publicToolContracts = {
8607
9657
  "annotations": {
8608
9658
  "readOnlyHint": false,
8609
9659
  "destructiveHint": false,
9660
+ "idempotentHint": false,
8610
9661
  "openWorldHint": false
8611
9662
  },
8612
9663
  "inputSchema": {
@@ -8666,6 +9717,7 @@ var publicToolContracts = {
8666
9717
  "annotations": {
8667
9718
  "readOnlyHint": true,
8668
9719
  "destructiveHint": false,
9720
+ "idempotentHint": true,
8669
9721
  "openWorldHint": false
8670
9722
  },
8671
9723
  "inputSchema": {
@@ -8763,6 +9815,7 @@ var publicToolContracts = {
8763
9815
  "annotations": {
8764
9816
  "readOnlyHint": false,
8765
9817
  "destructiveHint": false,
9818
+ "idempotentHint": false,
8766
9819
  "openWorldHint": true
8767
9820
  },
8768
9821
  "inputSchema": {
@@ -8852,6 +9905,7 @@ var publicToolContracts = {
8852
9905
  "annotations": {
8853
9906
  "readOnlyHint": true,
8854
9907
  "destructiveHint": false,
9908
+ "idempotentHint": true,
8855
9909
  "openWorldHint": false
8856
9910
  },
8857
9911
  "inputSchema": {
@@ -8912,6 +9966,7 @@ var publicToolContracts = {
8912
9966
  "annotations": {
8913
9967
  "readOnlyHint": true,
8914
9968
  "destructiveHint": false,
9969
+ "idempotentHint": true,
8915
9970
  "openWorldHint": false
8916
9971
  },
8917
9972
  "inputSchema": {
@@ -9014,6 +10069,7 @@ var publicToolContracts = {
9014
10069
  "annotations": {
9015
10070
  "readOnlyHint": false,
9016
10071
  "destructiveHint": false,
10072
+ "idempotentHint": false,
9017
10073
  "openWorldHint": true
9018
10074
  },
9019
10075
  "inputSchema": {
@@ -10063,6 +11119,7 @@ var publicToolContracts = {
10063
11119
  "annotations": {
10064
11120
  "readOnlyHint": true,
10065
11121
  "destructiveHint": false,
11122
+ "idempotentHint": true,
10066
11123
  "openWorldHint": false
10067
11124
  },
10068
11125
  "inputSchema": {
@@ -10113,6 +11170,7 @@ var publicToolContracts = {
10113
11170
  "annotations": {
10114
11171
  "readOnlyHint": true,
10115
11172
  "destructiveHint": false,
11173
+ "idempotentHint": true,
10116
11174
  "openWorldHint": false
10117
11175
  },
10118
11176
  "inputSchema": {
@@ -10310,6 +11368,7 @@ var publicToolContracts = {
10310
11368
  "annotations": {
10311
11369
  "readOnlyHint": false,
10312
11370
  "destructiveHint": false,
11371
+ "idempotentHint": true,
10313
11372
  "openWorldHint": false
10314
11373
  },
10315
11374
  "inputSchema": {
@@ -10380,6 +11439,7 @@ var publicToolContracts = {
10380
11439
  "annotations": {
10381
11440
  "readOnlyHint": true,
10382
11441
  "destructiveHint": false,
11442
+ "idempotentHint": true,
10383
11443
  "openWorldHint": false
10384
11444
  },
10385
11445
  "inputSchema": {
@@ -10444,6 +11504,7 @@ var publicToolContracts = {
10444
11504
  "annotations": {
10445
11505
  "readOnlyHint": false,
10446
11506
  "destructiveHint": false,
11507
+ "idempotentHint": true,
10447
11508
  "openWorldHint": false
10448
11509
  },
10449
11510
  "inputSchema": {
@@ -10534,6 +11595,7 @@ var publicToolContracts = {
10534
11595
  "annotations": {
10535
11596
  "readOnlyHint": true,
10536
11597
  "destructiveHint": false,
11598
+ "idempotentHint": true,
10537
11599
  "openWorldHint": false
10538
11600
  },
10539
11601
  "inputSchema": {
@@ -11089,6 +12151,7 @@ var publicToolContracts = {
11089
12151
  "annotations": {
11090
12152
  "readOnlyHint": false,
11091
12153
  "destructiveHint": false,
12154
+ "idempotentHint": true,
11092
12155
  "openWorldHint": false
11093
12156
  },
11094
12157
  "inputSchema": {
@@ -11410,6 +12473,7 @@ var publicToolContracts = {
11410
12473
  "annotations": {
11411
12474
  "readOnlyHint": false,
11412
12475
  "destructiveHint": true,
12476
+ "idempotentHint": true,
11413
12477
  "openWorldHint": false
11414
12478
  },
11415
12479
  "inputSchema": {
@@ -11475,6 +12539,7 @@ var publicToolContracts = {
11475
12539
  "annotations": {
11476
12540
  "readOnlyHint": true,
11477
12541
  "destructiveHint": false,
12542
+ "idempotentHint": true,
11478
12543
  "openWorldHint": false
11479
12544
  },
11480
12545
  "inputSchema": {
@@ -12668,6 +13733,7 @@ var publicToolContracts = {
12668
13733
  "annotations": {
12669
13734
  "readOnlyHint": true,
12670
13735
  "destructiveHint": false,
13736
+ "idempotentHint": true,
12671
13737
  "openWorldHint": false
12672
13738
  },
12673
13739
  "inputSchema": {
@@ -13107,6 +14173,7 @@ var publicToolContracts = {
13107
14173
  "annotations": {
13108
14174
  "readOnlyHint": true,
13109
14175
  "destructiveHint": false,
14176
+ "idempotentHint": true,
13110
14177
  "openWorldHint": false
13111
14178
  },
13112
14179
  "inputSchema": {
@@ -13434,6 +14501,7 @@ var publicToolContracts = {
13434
14501
  "annotations": {
13435
14502
  "readOnlyHint": true,
13436
14503
  "destructiveHint": false,
14504
+ "idempotentHint": true,
13437
14505
  "openWorldHint": false
13438
14506
  },
13439
14507
  "inputSchema": {
@@ -13872,6 +14940,7 @@ var publicToolContracts = {
13872
14940
  "annotations": {
13873
14941
  "readOnlyHint": true,
13874
14942
  "destructiveHint": false,
14943
+ "idempotentHint": true,
13875
14944
  "openWorldHint": false
13876
14945
  },
13877
14946
  "inputSchema": {
@@ -14274,6 +15343,7 @@ var publicToolContracts = {
14274
15343
  "annotations": {
14275
15344
  "readOnlyHint": true,
14276
15345
  "destructiveHint": false,
15346
+ "idempotentHint": true,
14277
15347
  "openWorldHint": false
14278
15348
  },
14279
15349
  "inputSchema": {
@@ -14822,6 +15892,7 @@ var publicToolContracts = {
14822
15892
  "annotations": {
14823
15893
  "readOnlyHint": false,
14824
15894
  "destructiveHint": false,
15895
+ "idempotentHint": false,
14825
15896
  "openWorldHint": false
14826
15897
  },
14827
15898
  "inputSchema": {
@@ -14949,6 +16020,7 @@ var publicToolContracts = {
14949
16020
  "annotations": {
14950
16021
  "readOnlyHint": false,
14951
16022
  "destructiveHint": false,
16023
+ "idempotentHint": false,
14952
16024
  "openWorldHint": false
14953
16025
  },
14954
16026
  "inputSchema": {
@@ -15016,6 +16088,7 @@ var publicToolContracts = {
15016
16088
  "annotations": {
15017
16089
  "readOnlyHint": true,
15018
16090
  "destructiveHint": false,
16091
+ "idempotentHint": true,
15019
16092
  "openWorldHint": false
15020
16093
  },
15021
16094
  "inputSchema": {
@@ -15225,6 +16298,7 @@ var publicToolContracts = {
15225
16298
  "annotations": {
15226
16299
  "readOnlyHint": true,
15227
16300
  "destructiveHint": false,
16301
+ "idempotentHint": true,
15228
16302
  "openWorldHint": false
15229
16303
  },
15230
16304
  "inputSchema": {
@@ -16354,6 +17428,7 @@ var publicToolContracts = {
16354
17428
  "annotations": {
16355
17429
  "readOnlyHint": false,
16356
17430
  "destructiveHint": false,
17431
+ "idempotentHint": true,
16357
17432
  "openWorldHint": false
16358
17433
  },
16359
17434
  "inputSchema": {
@@ -16406,6 +17481,7 @@ var publicToolContracts = {
16406
17481
  "annotations": {
16407
17482
  "readOnlyHint": false,
16408
17483
  "destructiveHint": true,
17484
+ "idempotentHint": true,
16409
17485
  "openWorldHint": false
16410
17486
  },
16411
17487
  "inputSchema": {
@@ -16635,6 +17711,7 @@ var publicToolContracts = {
16635
17711
  "annotations": {
16636
17712
  "readOnlyHint": true,
16637
17713
  "destructiveHint": false,
17714
+ "idempotentHint": true,
16638
17715
  "openWorldHint": false
16639
17716
  },
16640
17717
  "inputSchema": {
@@ -16746,6 +17823,7 @@ var publicOpenApiTransports = [
16746
17823
  var consumerToolPolicies = {
16747
17824
  "default": [
16748
17825
  "outlit_list_customers",
17826
+ "outlit_list_crm_fields",
16749
17827
  "outlit_list_users",
16750
17828
  "outlit_get_customer",
16751
17829
  "outlit_get_timeline",
@@ -16757,6 +17835,7 @@ var consumerToolPolicies = {
16757
17835
  ],
16758
17836
  "analytical": [
16759
17837
  "outlit_list_customers",
17838
+ "outlit_list_crm_fields",
16760
17839
  "outlit_list_users",
16761
17840
  "outlit_get_customer",
16762
17841
  "outlit_get_timeline",
@@ -16770,6 +17849,7 @@ var consumerToolPolicies = {
16770
17849
  ],
16771
17850
  "pi": [
16772
17851
  "outlit_list_customers",
17852
+ "outlit_list_crm_fields",
16773
17853
  "outlit_list_users",
16774
17854
  "outlit_list_workspace_users",
16775
17855
  "outlit_get_customer",
@@ -16823,6 +17903,7 @@ var consumerToolPolicies = {
16823
17903
  ],
16824
17904
  "cli": [
16825
17905
  "outlit_list_customers",
17906
+ "outlit_list_crm_fields",
16826
17907
  "outlit_list_users",
16827
17908
  "outlit_list_workspace_users",
16828
17909
  "outlit_get_customer",
@@ -17460,6 +18541,14 @@ var toolGatewayErrorSchema = {
17460
18541
  "path": {
17461
18542
  "type": "string",
17462
18543
  "maxLength": 200
18544
+ },
18545
+ "validValues": {
18546
+ "maxItems": 30,
18547
+ "type": "array",
18548
+ "items": {
18549
+ "type": "string",
18550
+ "maxLength": 100
18551
+ }
17463
18552
  }
17464
18553
  },
17465
18554
  "required": [
@@ -17468,6 +18557,37 @@ var toolGatewayErrorSchema = {
17468
18557
  ],
17469
18558
  "additionalProperties": false
17470
18559
  }
18560
+ },
18561
+ "next": {
18562
+ "type": "object",
18563
+ "properties": {
18564
+ "instruction": {
18565
+ "type": "string",
18566
+ "minLength": 1,
18567
+ "maxLength": 300
18568
+ },
18569
+ "tool": {
18570
+ "type": "string",
18571
+ "maxLength": 100,
18572
+ "pattern": "^outlit_[a-z0-9_]+$"
18573
+ },
18574
+ "input": {
18575
+ "type": "object",
18576
+ "propertyNames": {
18577
+ "type": "string"
18578
+ },
18579
+ "additionalProperties": {}
18580
+ }
18581
+ },
18582
+ "required": [
18583
+ "instruction"
18584
+ ],
18585
+ "additionalProperties": false
18586
+ },
18587
+ "missingPermission": {
18588
+ "type": "string",
18589
+ "minLength": 1,
18590
+ "maxLength": 100
17471
18591
  }
17472
18592
  },
17473
18593
  "required": [
@@ -18372,7 +19492,8 @@ var customerIncludeSections = [
18372
19492
  "behaviorMetrics",
18373
19493
  "enrichment",
18374
19494
  "renewal",
18375
- "crm"
19495
+ "crm",
19496
+ "links"
18376
19497
  ];
18377
19498
  var customerSourceTypes = [
18378
19499
  "EMAIL",
@@ -18451,7 +19572,7 @@ var schemaTables = [
18451
19572
  "users",
18452
19573
  "revenue"
18453
19574
  ];
18454
- var sdkConsumerContractHash = "b77a1b10fd174c041e1ae2c6fa7dfec1b049dc32053dd4e5ccb9a86123311ff8";
19575
+ var sdkConsumerContractHash = "696da531a576098a4d673bf7c25188769d15b1cb096fd60a8431aeb515648510";
18455
19576
 
18456
19577
  // src/contracts.ts
18457
19578
  var publicToolNameSet = new Set(publicToolNames);
@@ -18578,14 +19699,23 @@ function createOutlitClient(options) {
18578
19699
  }
18579
19700
  function parseGatewayError(text) {
18580
19701
  try {
18581
- const value = JSON.parse(text);
18582
- if (matchesGeneratedJsonSchema(value, toolGatewayErrorSchema)) {
19702
+ const value = withoutUnknownEnvelopeFields(JSON.parse(text));
19703
+ if (matchesGeneratedJsonSchema(value, toolGatewayErrorSchema) && // The generated schema can't carry Core's per-code rule for this field.
19704
+ (value.missingPermission === void 0 || value.code === "TOOL_CALL_FORBIDDEN")) {
18583
19705
  return value;
18584
19706
  }
18585
19707
  } catch {
18586
19708
  }
18587
19709
  return void 0;
18588
19710
  }
19711
+ function withoutUnknownEnvelopeFields(value) {
19712
+ if (typeof value !== "object" || value === null || Array.isArray(value)) return value;
19713
+ return Object.fromEntries(
19714
+ Object.entries(value).filter(
19715
+ ([property]) => Object.hasOwn(toolGatewayErrorSchema.properties, property)
19716
+ )
19717
+ );
19718
+ }
18589
19719
  function matchesGeneratedJsonSchema(value, schema) {
18590
19720
  if (Object.hasOwn(schema, "const") && !Object.is(schema.const, value)) {
18591
19721
  return false;