@37signals/basecamp 0.18.0 → 0.20.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.
Files changed (94) hide show
  1. package/README.md +94 -2
  2. package/dist/client.d.ts +6 -6
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +11 -7
  5. package/dist/client.js.map +1 -1
  6. package/dist/download.js +1 -1
  7. package/dist/errors.d.ts +10 -1
  8. package/dist/errors.d.ts.map +1 -1
  9. package/dist/errors.js +42 -13
  10. package/dist/errors.js.map +1 -1
  11. package/dist/generated/metadata.d.ts +1 -2
  12. package/dist/generated/metadata.d.ts.map +1 -1
  13. package/dist/generated/metadata.js +47 -1
  14. package/dist/generated/metadata.js.map +1 -1
  15. package/dist/generated/metadata.ts +48 -3
  16. package/dist/generated/openapi-stripped.json +816 -60
  17. package/dist/generated/path-mapping.d.ts.map +1 -1
  18. package/dist/generated/path-mapping.js +7 -4
  19. package/dist/generated/path-mapping.js.map +1 -1
  20. package/dist/generated/path-mapping.ts +8 -5
  21. package/dist/generated/person-id-sites.d.ts +2 -0
  22. package/dist/generated/person-id-sites.d.ts.map +1 -0
  23. package/dist/generated/person-id-sites.js +689 -0
  24. package/dist/generated/person-id-sites.js.map +1 -0
  25. package/dist/generated/person-id-sites.ts +690 -0
  26. package/dist/generated/schema.d.ts +643 -12
  27. package/dist/generated/services/event-feed.d.ts +92 -0
  28. package/dist/generated/services/event-feed.d.ts.map +1 -0
  29. package/dist/generated/services/event-feed.js +80 -0
  30. package/dist/generated/services/event-feed.js.map +1 -0
  31. package/dist/generated/services/event-feed.ts +153 -0
  32. package/dist/generated/services/gauges.d.ts +7 -3
  33. package/dist/generated/services/gauges.d.ts.map +1 -1
  34. package/dist/generated/services/gauges.js +4 -1
  35. package/dist/generated/services/gauges.js.map +1 -1
  36. package/dist/generated/services/gauges.ts +10 -3
  37. package/dist/generated/services/index.d.ts +1 -1
  38. package/dist/generated/services/index.d.ts.map +1 -1
  39. package/dist/generated/services/index.js +1 -1
  40. package/dist/generated/services/index.js.map +1 -1
  41. package/dist/generated/services/index.ts +1 -1
  42. package/dist/generated/services/lineup.d.ts +13 -0
  43. package/dist/generated/services/lineup.d.ts.map +1 -1
  44. package/dist/generated/services/lineup.js +18 -0
  45. package/dist/generated/services/lineup.js.map +1 -1
  46. package/dist/generated/services/lineup.ts +26 -0
  47. package/dist/index.d.ts +7 -4
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +12 -6
  50. package/dist/index.js.map +1 -1
  51. package/dist/person-id.d.ts +133 -0
  52. package/dist/person-id.d.ts.map +1 -0
  53. package/dist/person-id.js +163 -0
  54. package/dist/person-id.js.map +1 -0
  55. package/dist/retry.d.ts +2 -1
  56. package/dist/retry.d.ts.map +1 -1
  57. package/dist/retry.js +21 -11
  58. package/dist/retry.js.map +1 -1
  59. package/dist/services/base.d.ts +35 -0
  60. package/dist/services/base.d.ts.map +1 -1
  61. package/dist/services/base.js +387 -55
  62. package/dist/services/base.js.map +1 -1
  63. package/dist/services/comments-extensions.d.ts +89 -0
  64. package/dist/services/comments-extensions.d.ts.map +1 -0
  65. package/dist/services/comments-extensions.js +166 -0
  66. package/dist/services/comments-extensions.js.map +1 -0
  67. package/dist/services/mentions.d.ts +255 -0
  68. package/dist/services/mentions.d.ts.map +1 -0
  69. package/dist/services/mentions.js +1431 -0
  70. package/dist/services/mentions.js.map +1 -0
  71. package/dist/services/merge-safe.d.ts +13 -5
  72. package/dist/services/merge-safe.d.ts.map +1 -1
  73. package/dist/services/merge-safe.js +71 -13
  74. package/dist/services/merge-safe.js.map +1 -1
  75. package/dist/services/recordings-extensions.d.ts +354 -0
  76. package/dist/services/recordings-extensions.d.ts.map +1 -0
  77. package/dist/services/recordings-extensions.js +1940 -0
  78. package/dist/services/recordings-extensions.js.map +1 -0
  79. package/package.json +4 -4
  80. package/src/generated/metadata.ts +48 -3
  81. package/src/generated/openapi-stripped.json +816 -60
  82. package/src/generated/path-mapping.ts +8 -5
  83. package/src/generated/person-id-sites.ts +690 -0
  84. package/src/generated/schema.d.ts +643 -12
  85. package/src/generated/services/event-feed.ts +153 -0
  86. package/src/generated/services/gauges.ts +10 -3
  87. package/src/generated/services/index.ts +1 -1
  88. package/src/generated/services/lineup.ts +26 -0
  89. package/dist/generated/services/automation.d.ts +0 -25
  90. package/dist/generated/services/automation.d.ts.map +0 -1
  91. package/dist/generated/services/automation.js +0 -33
  92. package/dist/generated/services/automation.js.map +0 -1
  93. package/dist/generated/services/automation.ts +0 -49
  94. package/src/generated/services/automation.ts +0 -49
package/dist/index.d.ts CHANGED
@@ -48,7 +48,9 @@ export { TodosetsService, type Todoset, } from "./generated/services/todosets.js
48
48
  export { HillChartsService, type UpdateSettingsHillChartRequest, } from "./generated/services/hill-charts.js";
49
49
  export { PeopleService, type Person, type UpdateProjectAccessPeopleRequest, type UpdateProjectClientAccessPeopleRequest, } from "./generated/services/people.js";
50
50
  export { MessagesService, type Message, type CreateMessageRequest, type UpdateMessageRequest, } from "./generated/services/messages.js";
51
- export { CommentsService, type Comment, type CreateCommentRequest, type UpdateCommentRequest, } from "./generated/services/comments.js";
51
+ export { CommentsService, type MentionPeopleSource, } from "./services/comments-extensions.js";
52
+ export { type Comment, type CreateCommentRequest, type UpdateCommentRequest, } from "./generated/services/comments.js";
53
+ export { mentionedPersonIds, readMentions, personIdFromSGID, mentionMarkup, withMentions, } from "./services/mentions.js";
52
54
  export { CampfiresService, type Campfire, type CampfireLine, type Chatbot, type CreateChatbotCampfireRequest, type UpdateChatbotCampfireRequest, type CreateLineCampfireRequest, } from "./generated/services/campfires.js";
53
55
  export { CardTablesService, type CardTable, } from "./generated/services/card-tables.js";
54
56
  export { type Card, type CreateCardRequest, type UpdateVerbatimCardRequest, type MoveCardRequest, } from "./generated/services/cards.js";
@@ -70,6 +72,7 @@ export { verifyWebhookSignature, signWebhookPayload } from "./webhooks/verify.js
70
72
  export { parseEventKind, WebhookEventKind, type WebhookEvent, type WebhookDelivery, type WebhookDeliveryRequest, type WebhookDeliveryResponse, type WebhookCopy, } from "./webhooks/events.js";
71
73
  export { createNodeHandler, type NodeHandlerOptions } from "./webhooks/adapters/node-http.js";
72
74
  export { BookmarksService, type Bookmark, type BookmarkStatus, type ListMyBookmarksBookmarkOptions, } from "./generated/services/bookmarks.js";
75
+ export { EventFeedService, type PollEventsEventFeedOptions, type PollInboxEventFeedOptions, } from "./generated/services/event-feed.js";
73
76
  export { BubbleUpsService, type CreateBubbleUpBubbleUpRequest, } from "./generated/services/bubble-ups.js";
74
77
  export { FoldersService, type Folder, type FolderWithProjects, type CreateFolderFolderRequest, type UpdateFolderFolderRequest, } from "./generated/services/folders.js";
75
78
  export { DraftsService, type Draft, type ListMyDraftsDraftOptions, } from "./generated/services/drafts.js";
@@ -92,10 +95,10 @@ export { TimelineService, type TimelineEvent, } from "./generated/services/timel
92
95
  export { EverythingService, type EverythingFile, type BucketTodosGroup, type BucketCardsGroup, type EverythingMessagesEverythingOptions, type EverythingCommentsEverythingOptions, type EverythingCheckinsEverythingOptions, type EverythingForwardsEverythingOptions, type EverythingFilesEverythingOptions, type EverythingOpenTodosEverythingOptions, type EverythingCompletedTodosEverythingOptions, type EverythingUnassignedTodosEverythingOptions, type EverythingNoDueDateTodosEverythingOptions, type EverythingOpenCardsEverythingOptions, type EverythingCompletedCardsEverythingOptions, type EverythingUnassignedCardsEverythingOptions, type EverythingNoDueDateCardsEverythingOptions, type EverythingNotNowCardsEverythingOptions, } from "./generated/services/everything.js";
93
96
  export { SearchService, type SearchSearchOptions, } from "./generated/services/search.js";
94
97
  export { ReportsService, type PersonProgressReportOptions, } from "./generated/services/reports.js";
95
- export { RecordingsService, type Recording, type ListRecordingOptions, } from "./generated/services/recordings.js";
98
+ export { RecordingsService, RecordingSummaryError, RecordingRoutingError, UnresolvedRecordingError, CampfireDiscoveryIncompleteError, BucketMismatchError, summarizableRecordingTypes, summarizableEventTypes, CAMPFIRE_INDEX_TTL_MS, MAX_CAMPFIRE_CANDIDATES, MAX_CAMPFIRE_LISTING, type RecordingRef, type RecordingSummary, type RecordingSummaryErrorKind, type RecordingReadSources, } from "./services/recordings-extensions.js";
99
+ export { type Recording, type ListRecordingOptions, } from "./generated/services/recordings.js";
96
100
  export { TemplatesService, type Template, type ListTemplateOptions, type CreateTemplateRequest, type UpdateTemplateRequest, type CreateProjectTemplateRequest, type CreateLibraryCopyTemplateRequest, } from "./generated/services/templates.js";
97
- export { LineupService, type CreateLineupRequest, type UpdateLineupRequest, } from "./generated/services/lineup.js";
98
- export { AutomationService, type LineupMarker, } from "./generated/services/automation.js";
101
+ export { LineupService, type LineupMarker, type CreateLineupRequest, type UpdateLineupRequest, } from "./generated/services/lineup.js";
99
102
  export { TodolistGroupsService, type CreateTodolistGroupRequest, } from "./generated/services/todolist-groups.js";
100
103
  export { ToolsService, type Tool, } from "./generated/services/tools.js";
101
104
  export { BoostsService, type Boost, type ListForRecordingBoostOptions, type CreateForRecordingBoostRequest, type ListForEventBoostOptions, type CreateForEventBoostRequest, } from "./generated/services/boosts.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,OAAO,EACL,oBAAoB,EACpB,OAAO,EACP,WAAW,EACX,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,SAAS,GACf,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,KAAK,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAG/E,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGzD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,KAAK,QAAQ,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACrG,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM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GACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,kBAAkB,EAClB,KAAK,kBAAkB,GACxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,eAAe,EACf,KAAK,gBAAgB,GACtB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,uBAAuB,EACvB,KAAK,uBAAuB,GAC7B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,KAAK,YAAY,GAClB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,YAAY,EACZ,aAAa,EACb,KAAK,IAAI,GACV,MAAM,iBAAiB,CAAC;AAMzB,OAAO,EACL,aAAa,EACb,mBAAmB,GACpB,MAAM,eAAe,CAAC;AAGvB,YAAY,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC"}
package/dist/index.js CHANGED
@@ -60,7 +60,13 @@ export { HillChartsService, } from "./generated/services/hill-charts.js";
60
60
  export { PeopleService, } from "./generated/services/people.js";
61
61
  // Communication services - generated
62
62
  export { MessagesService, } from "./generated/services/messages.js";
63
- export { CommentsService, } from "./generated/services/comments.js";
63
+ // The plain name belongs to the mention composites (SPEC §18, Appendix F);
64
+ // everything else on the service is the generated surface.
65
+ export { CommentsService, } from "./services/comments-extensions.js";
66
+ // Mention helpers over Basecamp rich text: the read side describes what a text
67
+ // says it mentions, the write side renders a mention from a person the API
68
+ // returned. See src/services/mentions.ts for the trust boundary between them.
69
+ export { mentionedPersonIds, readMentions, personIdFromSGID, mentionMarkup, withMentions, } from "./services/mentions.js";
64
70
  export { CampfiresService, } from "./generated/services/campfires.js";
65
71
  // Card services (kanban boards) - generated
66
72
  export { CardTablesService, } from "./generated/services/card-tables.js";
@@ -84,7 +90,7 @@ export { ClientApprovalsService, } from "./generated/services/client-approvals.j
84
90
  export { ClientCorrespondencesService, } from "./generated/services/client-correspondences.js";
85
91
  export { ClientRepliesService, } from "./generated/services/client-replies.js";
86
92
  export { ClientVisibilityService, } from "./generated/services/client-visibility.js";
87
- // Automation services - generated
93
+ // Webhooks service - generated
88
94
  export { WebhooksService, } from "./generated/services/webhooks.js";
89
95
  // Webhook Receiving Infrastructure (hand-written, uses generated types)
90
96
  export { WebhookReceiver, WebhookVerificationError, } from "./webhooks/handler.js";
@@ -92,6 +98,7 @@ export { verifyWebhookSignature, signWebhookPayload } from "./webhooks/verify.js
92
98
  export { parseEventKind, WebhookEventKind, } from "./webhooks/events.js";
93
99
  export { createNodeHandler } from "./webhooks/adapters/node-http.js";
94
100
  export { BookmarksService, } from "./generated/services/bookmarks.js";
101
+ export { EventFeedService, } from "./generated/services/event-feed.js";
95
102
  export { BubbleUpsService, } from "./generated/services/bubble-ups.js";
96
103
  export { FoldersService, } from "./generated/services/folders.js";
97
104
  export { DraftsService, } from "./generated/services/drafts.js";
@@ -118,14 +125,13 @@ export { EverythingService, } from "./generated/services/everything.js";
118
125
  // Search & Reports services - generated
119
126
  export { SearchService, } from "./generated/services/search.js";
120
127
  export { ReportsService, } from "./generated/services/reports.js";
121
- // Recording services - generated
122
- export { RecordingsService, } from "./generated/services/recordings.js";
128
+ // Recording services - generated, plus the summarize composite
129
+ // (SPEC §18, Appendix F) that the plain service name carries.
130
+ export { RecordingsService, RecordingSummaryError, RecordingRoutingError, UnresolvedRecordingError, CampfireDiscoveryIncompleteError, BucketMismatchError, summarizableRecordingTypes, summarizableEventTypes, CAMPFIRE_INDEX_TTL_MS, MAX_CAMPFIRE_CANDIDATES, MAX_CAMPFIRE_LISTING, } from "./services/recordings-extensions.js";
123
131
  // Templates service - generated
124
132
  export { TemplatesService, } from "./generated/services/templates.js";
125
133
  // Lineup service - generated
126
134
  export { LineupService, } from "./generated/services/lineup.js";
127
- // Automation service - generated
128
- export { AutomationService, } from "./generated/services/automation.js";
129
135
  // Organization services - generated
130
136
  //
131
137
  // No `TodolistGroup` type: #544 consolidated it and `TodolistOrGroup` into the
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file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6B;AAC7B,OAAO,EACL,aAAa,GAMd,MAAM,gCAAgC,CAAC;AAExC,8BAA8B;AAC9B,OAAO,EACL,cAAc,GACf,MAAM,iCAAiC,CAAC;AAEzC,6BAA6B;AAC7B,OAAO,EACL,aAAa,GACd,MAAM,gCAAgC,CAAC;AAExC,qCAAqC;AACrC,OAAO,EACL,oBAAoB,GACrB,MAAM,wCAAwC,CAAC;AAEhD,uCAAuC;AACvC,OAAO,EACL,sBAAsB,GAEvB,MAAM,0CAA0C,CAAC;AAElD,sBAAsB;AACtB,OAAO,EACL,SAAS,GAEV,MAAM,iBAAiB,CAAC;AAqBzB,kEAAkE;AAClE,OAAO,EACL,QAAQ,EACR,yBAAyB,EACzB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,GAGnB,MAAM,sBAAsB,CAAC;AAE9B,wCAAwC;AACxC,OAAO,EACL,0BAA0B,EAC1B,eAAe,EACf,sBAAsB,GAIvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,kBAAkB,GAEnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,eAAe,GAEhB,MAAM,0BAA0B,CAAC;AAElC,2DAA2D;AAC3D,OAAO,EACL,uBAAuB,GAExB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,cAAc,GAEf,MAAM,qBAAqB,CAAC;AAE7B,iBAAiB;AACjB,OAAO,EACL,YAAY,EACZ,aAAa,GAEd,MAAM,iBAAiB,CAAC;AAEzB,gFAAgF;AAChF,qBAAqB;AACrB,gFAAgF;AAEhF,OAAO,EACL,aAAa,EACb,mBAAmB,GACpB,MAAM,eAAe,CAAC"}
@@ -0,0 +1,133 @@
1
+ /**
2
+ * Go's `strconv.ParseInt(s, 10, 64)` over a person id, written out.
3
+ *
4
+ * Three places in this SDK turn a person id that arrived as a JSON STRING into
5
+ * a number, and they answer to the same Go line: the pre-decode normalizer in
6
+ * `services/base.ts` stands where `coercePersonID` stands
7
+ * (`go/pkg/basecamp/normalize.go:45`), and the read-side comparison in
8
+ * `services/mentions.ts` and the merge-safe id-list guard in
9
+ * `services/merge-safe.ts` stand where `FlexibleInt64` stands
10
+ * (`go/pkg/types/flexible_int64.go:34`). All of them call
11
+ * {@link scanPersonId}, so the rule cannot drift into rules that disagree about
12
+ * the same string.
13
+ *
14
+ * Do not reach for `Number()`, `parseInt()`, or a `^-?\d+$` test in their place.
15
+ * Each is wrong in a direction that matters and the three are wrong differently:
16
+ * `Number()` accepts `"1e3"`, `"0x10"`, `"12.0"` and `" 7"`, all of which Go
17
+ * refuses; `parseInt()` accepts a trailing tail, so `"7x"` reads 7; and the
18
+ * regex refuses the leading `+` Go accepts, which is how `"+7"` became a system
19
+ * actor. What none of them can do at all is the thing this file exists for —
20
+ * tell Go's two refusals apart. See {@link PersonIdScan}.
21
+ */
22
+ /**
23
+ * What `strconv.ParseInt(s, 10, 64)` answered: a value, or WHICH WAY it refused.
24
+ *
25
+ * Keeping the two refusals apart is the whole point, because Go does two
26
+ * different things with them and no single "is this a number?" predicate can
27
+ * separate them. A SYNTAX error reads as `0` — Go's non-numeric sentinel, the
28
+ * id of a `LocalPerson` (`"basecamp"`, `"campfire"`) — while a RANGE error is
29
+ * raised and fails the read (`go/pkg/types/flexible_int64.go:43` against `:46`;
30
+ * `go/pkg/basecamp/normalize.go:62-63` against `:66-67`). Which one you get
31
+ * depends on where in the string the first disqualifying byte sits, so it
32
+ * cannot be recovered after the fact from a yes/no answer.
33
+ *
34
+ * `value` is a `bigint` because Go's answer is an `int64` and a JS `number` is
35
+ * not one. Rounding it here would erase, inside the scan, the very distinction
36
+ * each caller has to make a decision about — see {@link personIdNumber}.
37
+ */
38
+ export type PersonIdScan = {
39
+ readonly kind: "value";
40
+ readonly value: bigint;
41
+ } | {
42
+ readonly kind: "syntax";
43
+ } | {
44
+ readonly kind: "range";
45
+ };
46
+ /**
47
+ * `strconv.ParseInt(text, 10, 64)`, scan order included.
48
+ *
49
+ * The grammar is one optional ASCII sign, then one or more ASCII digits, and
50
+ * nothing else:
51
+ *
52
+ * - A leading `+` is ACCEPTED, and a `^-?\d+$` regex is exactly the port defect
53
+ * this replaces — `"+7"` is 7, not a sentinel.
54
+ * - No whitespace of any kind, because Go trims none: `" 7"`, `"7 "`, `"\t7"`
55
+ * are syntax errors and read `0`.
56
+ * - Leading zeros carry no meaning at base 10, so `"007"` is 7 and `"010"` is
57
+ * TEN, not eight. (`ParseInt` only reads a prefix as a base when `base` is 0,
58
+ * which is why `"0x10"` is a syntax error here rather than 16.)
59
+ * - `_` is a digit separator only at base 0, so `"1_0"` is a syntax error.
60
+ * - ASCII `0`-`9` and nothing else: a fullwidth `7`, an Arabic-Indic `٧` and a
61
+ * Bengali `৭` are not digits, however `\p{Nd}`-aware a regex engine is. This
62
+ * scans UTF-16 units rather than code points on purpose — every unit of a
63
+ * non-ASCII character is outside `0x30..0x39`, including a lone surrogate, so
64
+ * the first one refuses exactly where Go's byte scan refuses.
65
+ *
66
+ * The subtlety that earns the hand-rolled loop: `ParseUint` checks the
67
+ * magnitude INSIDE the scan and returns `ErrRange` the moment the accumulator
68
+ * would overflow `uint64`, before it ever looks at the rest of the string. The
69
+ * first disqualifying byte wins, and the bound it wins against is u64, not i64.
70
+ * So `"18446744073709551616x"` is a RANGE error, which fails the read, while
71
+ * `"18446744073709551615x"` — one digit smaller — is a SYNTAX error, which
72
+ * reads `0`. Testing the whole string for well-formedness first and only then
73
+ * checking the magnitude gets that pair backwards, which is the second defect
74
+ * this replaces.
75
+ *
76
+ * This is NOT the rule the gid parser applies to the person id in
77
+ * `gid://bc3/Person/<id>`. That one walks the bytes and refuses anything
78
+ * outside `0..=9` BEFORE it parses (`go/pkg/basecamp/mentions.go:252-256`),
79
+ * so it rejects the leading `+` this one accepts, and then refuses `id <= 0`.
80
+ * Both rules live in this SDK: `personIdFromSGID` in `services/mentions.ts`
81
+ * carries that digit walk, and it is CORRECT to, because the reference has that
82
+ * shape at that site — a `+`-tolerant gid parser is the `+77` defect PR #886
83
+ * closed. The same shape was wrong here only because the Go lines governing
84
+ * these two sites have no pre-walk. Two sites, two rules, deliberately: do not
85
+ * hoist either into the other, in either direction.
86
+ */
87
+ export declare function scanPersonId(text: string): PersonIdScan;
88
+ /**
89
+ * The id Go read, as a JS `number` — or `undefined` when a `number` cannot hold
90
+ * it.
91
+ *
92
+ * This is the port's one unclosable gap, and the only judgment call in this
93
+ * file. `ParseInt` read a REAL PERSON here: `"9007199254740993"` is an id, not
94
+ * a refusal. A `number` cannot carry it — past `Number.MAX_SAFE_INTEGER` two
95
+ * distinct int64s land on the same double, so `9007199254740993` would be
96
+ * handed to the caller as `9007199254740992`, a different person — and the
97
+ * SDK's whole surface types every id as `number`. `conformance/tests/
98
+ * integer-precision.json` records the same constraint for the JSON-number path
99
+ * in as many words: returning bigint would break the number-typed API surface.
100
+ * So there is no value this can return, and TypeScript has no runtime decoder
101
+ * downstream to perform Go's RANGE refusal on its behalf. Whatever is chosen, a
102
+ * caller sees it. Three directions were available:
103
+ *
104
+ * - **Write `0` and a `system_label`** — what the normalizer did before this
105
+ * file existed. That is Go's NON-NUMERIC sentinel: the id of `LocalPerson`,
106
+ * `"basecamp"`, `"campfire"`. It takes a real person, hands back the system
107
+ * actor, and says nothing — in the exact shape a caller is meant to trust. A
108
+ * wrong id that looks right is the one outcome nothing downstream can defend
109
+ * against, and it is the defect this work exists to remove.
110
+ * - **Throw** — refuses a response Go reads fine, and refuses ALL of it. One
111
+ * unrepresentable id in one embedded person would discard every other record
112
+ * in the body, including the 99 people that were perfectly readable, and it
113
+ * would do so from inside a normalizer that runs over every response. The id
114
+ * is safe; everything beside it pays.
115
+ * - **Say "unreadable"** — what this returns, and what each site then resolves
116
+ * locally with the treatment the measured table already assigns to a RANGE
117
+ * refusal. The normalizer LEAVES THE STRING in place: nothing is rounded,
118
+ * nothing is invented, the digits survive verbatim for a caller that can hold
119
+ * them, and `typeof person.id === "string"` is a check a caller can actually
120
+ * make. The reader returns `undefined`, and `mentionMarkup` refuses to write
121
+ * a mention it cannot verify. Both are refusals of the ID, not of the
122
+ * response.
123
+ *
124
+ * `personIdValue` in `services/mentions.ts` already answered it this way before
125
+ * the two sites shared a rule, which settles the consistency question in the
126
+ * same direction: the normalizer joins the reader.
127
+ *
128
+ * This is a RESIDUAL DIVERGENCE and is recorded as one, not a fix. Over the
129
+ * measured corpus, the 11 rows whose value falls outside ±(2^53 - 1) still
130
+ * disagree with Go at both sites, and will until the SDK's ids become `bigint`.
131
+ */
132
+ export declare function personIdNumber(value: bigint): number | undefined;
133
+ //# sourceMappingURL=person-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"person-id.d.ts","sourceRoot":"","sources":["../src/person-id.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,YAAY,GACpB;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAClD;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GAC3B;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAgB/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAkCvD;AAKD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGhE"}
@@ -0,0 +1,163 @@
1
+ /**
2
+ * Go's `strconv.ParseInt(s, 10, 64)` over a person id, written out.
3
+ *
4
+ * Three places in this SDK turn a person id that arrived as a JSON STRING into
5
+ * a number, and they answer to the same Go line: the pre-decode normalizer in
6
+ * `services/base.ts` stands where `coercePersonID` stands
7
+ * (`go/pkg/basecamp/normalize.go:45`), and the read-side comparison in
8
+ * `services/mentions.ts` and the merge-safe id-list guard in
9
+ * `services/merge-safe.ts` stand where `FlexibleInt64` stands
10
+ * (`go/pkg/types/flexible_int64.go:34`). All of them call
11
+ * {@link scanPersonId}, so the rule cannot drift into rules that disagree about
12
+ * the same string.
13
+ *
14
+ * Do not reach for `Number()`, `parseInt()`, or a `^-?\d+$` test in their place.
15
+ * Each is wrong in a direction that matters and the three are wrong differently:
16
+ * `Number()` accepts `"1e3"`, `"0x10"`, `"12.0"` and `" 7"`, all of which Go
17
+ * refuses; `parseInt()` accepts a trailing tail, so `"7x"` reads 7; and the
18
+ * regex refuses the leading `+` Go accepts, which is how `"+7"` became a system
19
+ * actor. What none of them can do at all is the thing this file exists for —
20
+ * tell Go's two refusals apart. See {@link PersonIdScan}.
21
+ */
22
+ const SYNTAX = { kind: "syntax" };
23
+ const RANGE = { kind: "range" };
24
+ const ZERO = 0x30;
25
+ const NINE = 0x39;
26
+ const PLUS = 0x2b;
27
+ const MINUS = 0x2d;
28
+ /** `ParseUint`'s bound: the magnitude is checked against u64, not i64. */
29
+ const U64_MAX = 18446744073709551615n;
30
+ /** `ParseInt`'s own bounds, applied to what `ParseUint` returned. */
31
+ const I64_MAX = 9223372036854775807n;
32
+ const I64_MIN_MAGNITUDE = 9223372036854775808n;
33
+ /**
34
+ * `strconv.ParseInt(text, 10, 64)`, scan order included.
35
+ *
36
+ * The grammar is one optional ASCII sign, then one or more ASCII digits, and
37
+ * nothing else:
38
+ *
39
+ * - A leading `+` is ACCEPTED, and a `^-?\d+$` regex is exactly the port defect
40
+ * this replaces — `"+7"` is 7, not a sentinel.
41
+ * - No whitespace of any kind, because Go trims none: `" 7"`, `"7 "`, `"\t7"`
42
+ * are syntax errors and read `0`.
43
+ * - Leading zeros carry no meaning at base 10, so `"007"` is 7 and `"010"` is
44
+ * TEN, not eight. (`ParseInt` only reads a prefix as a base when `base` is 0,
45
+ * which is why `"0x10"` is a syntax error here rather than 16.)
46
+ * - `_` is a digit separator only at base 0, so `"1_0"` is a syntax error.
47
+ * - ASCII `0`-`9` and nothing else: a fullwidth `7`, an Arabic-Indic `٧` and a
48
+ * Bengali `৭` are not digits, however `\p{Nd}`-aware a regex engine is. This
49
+ * scans UTF-16 units rather than code points on purpose — every unit of a
50
+ * non-ASCII character is outside `0x30..0x39`, including a lone surrogate, so
51
+ * the first one refuses exactly where Go's byte scan refuses.
52
+ *
53
+ * The subtlety that earns the hand-rolled loop: `ParseUint` checks the
54
+ * magnitude INSIDE the scan and returns `ErrRange` the moment the accumulator
55
+ * would overflow `uint64`, before it ever looks at the rest of the string. The
56
+ * first disqualifying byte wins, and the bound it wins against is u64, not i64.
57
+ * So `"18446744073709551616x"` is a RANGE error, which fails the read, while
58
+ * `"18446744073709551615x"` — one digit smaller — is a SYNTAX error, which
59
+ * reads `0`. Testing the whole string for well-formedness first and only then
60
+ * checking the magnitude gets that pair backwards, which is the second defect
61
+ * this replaces.
62
+ *
63
+ * This is NOT the rule the gid parser applies to the person id in
64
+ * `gid://bc3/Person/<id>`. That one walks the bytes and refuses anything
65
+ * outside `0..=9` BEFORE it parses (`go/pkg/basecamp/mentions.go:252-256`),
66
+ * so it rejects the leading `+` this one accepts, and then refuses `id <= 0`.
67
+ * Both rules live in this SDK: `personIdFromSGID` in `services/mentions.ts`
68
+ * carries that digit walk, and it is CORRECT to, because the reference has that
69
+ * shape at that site — a `+`-tolerant gid parser is the `+77` defect PR #886
70
+ * closed. The same shape was wrong here only because the Go lines governing
71
+ * these two sites have no pre-walk. Two sites, two rules, deliberately: do not
72
+ * hoist either into the other, in either direction.
73
+ */
74
+ export function scanPersonId(text) {
75
+ let index = 0;
76
+ let negative = false;
77
+ if (text.length > 0) {
78
+ const sign = text.charCodeAt(0);
79
+ if (sign === PLUS || sign === MINUS) {
80
+ negative = sign === MINUS;
81
+ index = 1;
82
+ }
83
+ }
84
+ // An empty digit run is a syntax error: `""`, `"+"`, `"-"`.
85
+ if (index === text.length)
86
+ return SYNTAX;
87
+ // `ParseUint`'s loop, unit for unit.
88
+ let magnitude = 0n;
89
+ for (; index < text.length; index++) {
90
+ const code = text.charCodeAt(index);
91
+ if (code < ZERO || code > NINE)
92
+ return SYNTAX;
93
+ magnitude = magnitude * 10n + BigInt(code - ZERO);
94
+ // Go returns here, mid-scan, without reading what follows.
95
+ if (magnitude > U64_MAX)
96
+ return RANGE;
97
+ }
98
+ // `ParseInt`'s own bound, applied to what `ParseUint` returned. `-2^63` fits
99
+ // and `+2^63` does not, so the two signs have different bounds.
100
+ if (negative) {
101
+ if (magnitude > I64_MIN_MAGNITUDE)
102
+ return RANGE;
103
+ // `-0n` is not a thing in BigInt, so `"-0"` yields `0n` and, through
104
+ // `personIdNumber`, `+0` — where `Number("-0")` yielded `-0`, which
105
+ // `Object.is` separates from the `0` Go reads.
106
+ return { kind: "value", value: -magnitude };
107
+ }
108
+ if (magnitude > I64_MAX)
109
+ return RANGE;
110
+ return { kind: "value", value: magnitude };
111
+ }
112
+ const MIN_SAFE = BigInt(Number.MIN_SAFE_INTEGER);
113
+ const MAX_SAFE = BigInt(Number.MAX_SAFE_INTEGER);
114
+ /**
115
+ * The id Go read, as a JS `number` — or `undefined` when a `number` cannot hold
116
+ * it.
117
+ *
118
+ * This is the port's one unclosable gap, and the only judgment call in this
119
+ * file. `ParseInt` read a REAL PERSON here: `"9007199254740993"` is an id, not
120
+ * a refusal. A `number` cannot carry it — past `Number.MAX_SAFE_INTEGER` two
121
+ * distinct int64s land on the same double, so `9007199254740993` would be
122
+ * handed to the caller as `9007199254740992`, a different person — and the
123
+ * SDK's whole surface types every id as `number`. `conformance/tests/
124
+ * integer-precision.json` records the same constraint for the JSON-number path
125
+ * in as many words: returning bigint would break the number-typed API surface.
126
+ * So there is no value this can return, and TypeScript has no runtime decoder
127
+ * downstream to perform Go's RANGE refusal on its behalf. Whatever is chosen, a
128
+ * caller sees it. Three directions were available:
129
+ *
130
+ * - **Write `0` and a `system_label`** — what the normalizer did before this
131
+ * file existed. That is Go's NON-NUMERIC sentinel: the id of `LocalPerson`,
132
+ * `"basecamp"`, `"campfire"`. It takes a real person, hands back the system
133
+ * actor, and says nothing — in the exact shape a caller is meant to trust. A
134
+ * wrong id that looks right is the one outcome nothing downstream can defend
135
+ * against, and it is the defect this work exists to remove.
136
+ * - **Throw** — refuses a response Go reads fine, and refuses ALL of it. One
137
+ * unrepresentable id in one embedded person would discard every other record
138
+ * in the body, including the 99 people that were perfectly readable, and it
139
+ * would do so from inside a normalizer that runs over every response. The id
140
+ * is safe; everything beside it pays.
141
+ * - **Say "unreadable"** — what this returns, and what each site then resolves
142
+ * locally with the treatment the measured table already assigns to a RANGE
143
+ * refusal. The normalizer LEAVES THE STRING in place: nothing is rounded,
144
+ * nothing is invented, the digits survive verbatim for a caller that can hold
145
+ * them, and `typeof person.id === "string"` is a check a caller can actually
146
+ * make. The reader returns `undefined`, and `mentionMarkup` refuses to write
147
+ * a mention it cannot verify. Both are refusals of the ID, not of the
148
+ * response.
149
+ *
150
+ * `personIdValue` in `services/mentions.ts` already answered it this way before
151
+ * the two sites shared a rule, which settles the consistency question in the
152
+ * same direction: the normalizer joins the reader.
153
+ *
154
+ * This is a RESIDUAL DIVERGENCE and is recorded as one, not a fix. Over the
155
+ * measured corpus, the 11 rows whose value falls outside ±(2^53 - 1) still
156
+ * disagree with Go at both sites, and will until the SDK's ids become `bigint`.
157
+ */
158
+ export function personIdNumber(value) {
159
+ if (value < MIN_SAFE || value > MAX_SAFE)
160
+ return undefined;
161
+ return Number(value);
162
+ }
163
+ //# sourceMappingURL=person-id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"person-id.js","sourceRoot":"","sources":["../src/person-id.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAuBH,MAAM,MAAM,GAAiB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAChD,MAAM,KAAK,GAAiB,EA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C3D,IAAI,SAAS,GAAG,OAAO;YAAE,OAAO,KAAK,CAAC;IACxC,CAAC;IAED,6EAA6E;IAC7E,gEAAgE;IAChE,IAAI,QAAQ,EAAE,CAAC;QACb,IAAI,SAAS,GAAG,iBAAiB;YAAE,OAAO,KAAK,CAAC;QAChD,qEAAqE;QACrE,oEAAoE;QACpE,+CAA+C;QAC/C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,SAAS,EAAE,CAAC;IAC9C,CAAC;IACD,IAAI,SAAS,GAAG,OAAO;QAAE,OAAO,KAAK,CAAC;IACtC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;AAC7C,CAAC;AAED,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;AACjD,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,IAAI,KAAK,GAAG,QAAQ,IAAI,KAAK,GAAG,QAAQ;QAAE,OAAO,SAAS,CAAC;IAC3D,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"}
package/dist/retry.d.ts CHANGED
@@ -82,7 +82,8 @@ export declare class TerminalRetryError extends Error {
82
82
  *
83
83
  * `config.maxAttempts` is a total attempt count — the caller passes the
84
84
  * effective budget (e.g. 1 when retry is disabled). Status retry is gated on
85
- * the declared `retryOn` set; 429 honors Retry-After. Transport errors retry
85
+ * the declared `retryOn` set, honoring Retry-After at every status in it.
86
+ * Transport errors retry
86
87
  * on the same budget, except aborts, which are terminal no matter what the
87
88
  * budget says: a caller cancellation must not re-send, and a request-timeout
88
89
  * budget is shared by every attempt and backoff — once it fires, a retry
@@ -1 +1 @@
1
- {"version":3,"file":"retry.d.ts","sourceRoot":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I,CAAC;IAC/D,kFAAkF;IAClF,QAAQ,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACtE;AAED;;;;;GAKG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;IAC/B,QAAQ,CAAC,MAAM,EAAE,OAAO;gBAAf,MAAM,EAAE,OAAO;CAIrC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,CAAC,EACnD,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,SAAS,EACf,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,GAC1B,OAAO,CAAC,QAAQ,CAAC,CAmGnB;AAwCD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC,EAC/B,OAAO,EAAE,MAAM,GACd,MAAM,CAyBR;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAMlF;AAED;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBrE"}
package/dist/retry.js CHANGED
@@ -7,7 +7,7 @@
7
7
  * emission via `RetryEmit`.
8
8
  */
9
9
  // errors.ts imports nothing, so this edge introduces no cycle.
10
- import { parseRetryAfter } from "./errors.js";
10
+ import { errorFromParsedBody, parseRetryAfter } from "./errors.js";
11
11
  /** Default retry config used when no operation-specific config is available */
12
12
  export const DEFAULT_RETRY_CONFIG = {
13
13
  maxAttempts: 3,
@@ -80,7 +80,8 @@ export class TerminalRetryError extends Error {
80
80
  *
81
81
  * `config.maxAttempts` is a total attempt count — the caller passes the
82
82
  * effective budget (e.g. 1 when retry is disabled). Status retry is gated on
83
- * the declared `retryOn` set; 429 honors Retry-After. Transport errors retry
83
+ * the declared `retryOn` set, honoring Retry-After at every status in it.
84
+ * Transport errors retry
84
85
  * on the same budget, except aborts, which are terminal no matter what the
85
86
  * budget says: a caller cancellation must not re-send, and a request-timeout
86
87
  * budget is shared by every attempt and backoff — once it fires, a retry
@@ -132,18 +133,27 @@ export async function executeWithRetry(makeAttempt, config, emit, signal) {
132
133
  if (!config.retryOn.includes(response.status) || attempt >= config.maxAttempts) {
133
134
  return response;
134
135
  }
135
- // For 429, respect Retry-After; otherwise back off. The header goes through
136
- // errors.ts's parseRetryAfter — the single SPEC §6 implementation — rather
137
- // than a local parseInt: 0, a negative value and an unparseable one all
138
- // come back undefined and fall through to backoff, where the local copy
139
- // this replaced turned them into a zero or negative sleep.
140
- const retryAfterSeconds = response.status === 429
141
- ? parseRetryAfter(response.headers.get("Retry-After"))
142
- : undefined;
136
+ // A Retry-After the origin sent replaces the backoff at EVERY status this
137
+ // branch reaches — the status already passed the declared retryOn gate,
138
+ // and SPEC §6 "Retry-After Honouring" derives honouring from retry
139
+ // eligibility rather than from a status list (a 429-only gate here left a
140
+ // 503 carrying `Retry-After: 120` backing off ~1s). The header goes
141
+ // through errors.ts's parseRetryAfter — the single SPEC §6 implementation
142
+ // — rather than a local parseInt: 0, a negative value and an unparseable
143
+ // one all come back undefined and fall through to backoff, where the local
144
+ // copy this replaced turned them into a zero or negative sleep.
145
+ const retryAfterSeconds = parseRetryAfter(response.headers.get("Retry-After"));
143
146
  const delay = retryAfterSeconds !== undefined
144
147
  ? timerSafeDelayMs(retryAfterSeconds)
145
148
  : calculateBackoffDelay(config, attempt - 1);
146
- const statusError = new Error(`HTTP ${response.status}: ${response.statusText || "Request failed"}`);
149
+ // SPEC §7 step 3i: the error handed to onRetry is the status-mapped
150
+ // BasecampError, so a hook sees the same httpStatus and retryAfter the
151
+ // terminal error would carry — the parsed value that governs this very
152
+ // sleep, handed over rather than parsed again, so an HTTP-date crossing
153
+ // a second boundary between the two cannot make the hook's number
154
+ // differ from the wait. Built from the status and headers alone: the
155
+ // body is being discarded below, and the mapper needs none of it.
156
+ const statusError = errorFromParsedBody(response, null, response.headers.get("X-Request-Id") ?? undefined, retryAfterSeconds);
147
157
  // End the failed attempt before sleeping, so a slow backoff cannot leave
148
158
  // an attempt open, then announce the upcoming one.
149
159
  emit.finalize({ statusCode: response.status });
package/dist/retry.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,+DAA+D;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAY9C,+EAA+E;AAC/E,MAAM,CAAC,MAAM,oBAAoB,GAAgB;IAC/C,WAAW,EAAE,CAAC;IACd,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,aAAa;IACtB,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;CACpB,CAAC;AAEF,yDAAyD;AACzD,MAAM,CAAC,MAAM,eAAe,GAAgB;IAC1C,WAAW,EAAE,CAAC;IACd,WAAW,EAAE,CAAC;IACd,OAAO,EAAE,UAAU;IACnB,OAAO,EAAE,EAAE;CACZ,CAAC;AAEF,MAAM,aAAa,GAAG,GAAG,CAAC;AAE1B;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,cAAc,GAAG,aAAa,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,gBAAgB,CAAC,iBAAyB;IACxD,OAAO,IAAI,CAAC,GAAG,CAAC,iBAAiB,GAAG,IAAI,EAAE,cAAc,CAAC,CAAC;AAC5D,CAAC;AAmBD;;;;;GAKG;AACH,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IACtB;IAArB,YAAqB,MAAe;QACl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C,KAAK,CAAC,CAAC;YACpB,MAAM,CAAC,MAAO,CAAC,MAAe,CAAC,CAAC;QAClC,CAAC,CAAC;QACF,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;YAC5B,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAC9C,OAAO,EAAE,CAAC;QACZ,CAAC,EAAE,EAAE,CAAC,CAAC;QACP,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -38,6 +38,41 @@ export interface FetchResponse<T> {
38
38
  error?: unknown;
39
39
  response: Response;
40
40
  }
41
+ /**
42
+ * The keys Go's positional pass finds a person under, with the shape each holds.
43
+ *
44
+ * These are `normalizeEmbeddedPersonIds`'s two (`go/pkg/basecamp/normalize.go:83-104`)
45
+ * and nothing else, and the pass runs only on {@link EMBEDDED_PERSON_SERVICES}.
46
+ * `tests/services/person-id-normalization.test.ts` pins both halves.
47
+ *
48
+ * THIS REPLACED A WIDER SET, and the reason is worth keeping. Go has two ways a
49
+ * person id becomes a number: this normalizer, on the wrapper paths whose
50
+ * `basecamp.Person.ID` is a plain `int64`; and its decoder, because
51
+ * `generated.Person.Id` is `types.FlexibleInt64`, so every other `Person`-typed
52
+ * field converts at read time. TypeScript has no decoder, so the set was
53
+ * briefly widened to all twelve keys the spec types as `Person` — `assignees`,
54
+ * `subscribers`, `completion_subscribers` among them — to stand in for both.
55
+ *
56
+ * The derivation was right and the application was not. The keys were matched
57
+ * by NAME at any depth in every response, and a name that is `Person`-valued on
58
+ * one schema is not on every other: `creator`, `participants`, `assignees` and
59
+ * `person` also hold people whose id is a plain `int64` in the reference
60
+ * (`UpcomingSchedulePerson`, `MyAssignmentAssignee`, `OutOfOfficePerson`). A
61
+ * string there is a decode error in Go, and this turned it into the system
62
+ * actor. See {@link normalizeEmbeddedPersonIds} for the six sites.
63
+ *
64
+ * The arity is honoured because Go's type assertions carry it: the wrapper pass
65
+ * asserts `.(map[string]any)` for the creator and `[]any` for participants
66
+ * (`:85-95`), so a `creator` that is not an object is not a person.
67
+ */
68
+ export declare const EMBEDDED_PERSON_KEYS: ReadonlyMap<string, "object" | "array">;
69
+ /**
70
+ * Abstract base class for all Basecamp API services.
71
+ *
72
+ * Services extend this class to inherit common functionality
73
+ * for making API requests, handling errors, and integrating
74
+ * with the hooks system.
75
+ */
41
76
  export declare abstract class BaseService {
42
77
  #private;
43
78
  /** The underlying openapi-fetch client */