Skip to content

Commit aa71144

Browse files
authored
Add subscriptions to recording creation (messages, documents, uploads, schedule entries) (#145)
* Add subscriptions field to Smithy spec for 4 recording create operations Add `subscriptions: PersonIdList` to CreateMessageInput, CreateDocumentInput, CreateUploadInput, and CreateScheduleEntryInput. Add third pass to enhance-openapi-go-types.sh that marks subscriptions arrays in Create*RequestContent schemas as pointer (`*[]int64`), enabling three-state semantics: nil (server default), empty (subscribe nobody), populated (specific people). Update provenance dates. * Regenerate all derived artifacts from updated Smithy spec Run full generation pipeline: smithy-build, url-routes, provenance-sync, go generate, ts-generate, ts-generate-services, rb-generate, rb-generate-services, kt-generate-services, swift-generate. Adds subscriptions field to generated Create* request types across all SDKs. Also picks up accumulated Smithy model changes: required field annotations now correctly propagate, changing several response schema fields from optional to required. * Adapt Go wrappers and Swift tests to regenerated types Replace derefInt64() calls with direct field access where generated response types changed Id fields from *int64 to int64 (now required). Update Swift test calls to match regenerated service signatures that no longer include projectId parameter. * Add subscriptions to Go create wrappers with tests across all SDKs Wire subscriptions (*[]int64) through Go hand-written wrappers for messages, documents, uploads, and schedule entries. Three-state pointer semantics: nil omits field (server default), &[]int64{} subscribes nobody, &[]int64{1,2} subscribes specific people. Add tests: - Go: marshal with IDs, marshal empty array, nil omission - TypeScript: MSW body assertion for all 4 create operations - Ruby: assert_requested body matching for all 4 create operations * Fix bc3 provenance revision to match upstream HEAD * Add nil and empty subscription tests for document and upload create requests * Add nil/empty subscription tests for schedule entries; fix id_count metric
1 parent 10a72ef commit aa71144

File tree

104 files changed

+2628
-2012
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+2628
-2012
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"bc3_api": {
33
"revision": "f7413a2717ced5e38f1ca215cbd95e9d74b02db3",
4-
"date": "2026-02-07"
4+
"date": "2026-03-03"
55
},
66
"bc3": {
7-
"revision": "37be1c9481c88845c02ac8e4b95319b8d29ad460",
8-
"date": "2026-02-07"
7+
"revision": "477bf59f25189351f93572c58985f33e36fdbc1b",
8+
"date": "2026-03-03"
99
}
1010
}

go/pkg/basecamp/boosts.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,11 @@ func boostFromGenerated(gb generated.Boost) Boost {
263263
CreatedAt: gb.CreatedAt,
264264
}
265265

266-
b.ID = derefInt64(gb.Id)
266+
b.ID = gb.Id
267267

268-
if derefInt64(gb.Booster.Id) != 0 || gb.Booster.Name != "" {
268+
if gb.Booster.Id != 0 || gb.Booster.Name != "" {
269269
b.Booster = &Person{
270-
ID: derefInt64(gb.Booster.Id),
270+
ID: gb.Booster.Id,
271271
Name: gb.Booster.Name,
272272
EmailAddress: gb.Booster.EmailAddress,
273273
AvatarURL: gb.Booster.AvatarUrl,
@@ -276,9 +276,9 @@ func boostFromGenerated(gb generated.Boost) Boost {
276276
}
277277
}
278278

279-
if derefInt64(gb.Recording.Id) != 0 || gb.Recording.Title != "" {
279+
if gb.Recording.Id != 0 || gb.Recording.Title != "" {
280280
b.Recording = &Parent{
281-
ID: derefInt64(gb.Recording.Id),
281+
ID: gb.Recording.Id,
282282
Title: gb.Recording.Title,
283283
Type: gb.Recording.Type,
284284
URL: gb.Recording.Url,

go/pkg/basecamp/campfires.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -546,19 +546,19 @@ func campfireFromGenerated(gc generated.Campfire) Campfire {
546546
UpdatedAt: gc.UpdatedAt,
547547
}
548548

549-
c.ID = derefInt64(gc.Id)
549+
c.ID = gc.Id
550550

551-
if derefInt64(gc.Bucket.Id) != 0 || gc.Bucket.Name != "" {
551+
if gc.Bucket.Id != 0 || gc.Bucket.Name != "" {
552552
c.Bucket = &Bucket{
553-
ID: derefInt64(gc.Bucket.Id),
553+
ID: gc.Bucket.Id,
554554
Name: gc.Bucket.Name,
555555
Type: gc.Bucket.Type,
556556
}
557557
}
558558

559-
if derefInt64(gc.Creator.Id) != 0 || gc.Creator.Name != "" {
559+
if gc.Creator.Id != 0 || gc.Creator.Name != "" {
560560
c.Creator = &Person{
561-
ID: derefInt64(gc.Creator.Id),
561+
ID: gc.Creator.Id,
562562
Name: gc.Creator.Name,
563563
EmailAddress: gc.Creator.EmailAddress,
564564
AvatarURL: gc.Creator.AvatarUrl,
@@ -586,29 +586,29 @@ func campfireLineFromGenerated(gl generated.CampfireLine) CampfireLine {
586586
BoostsCount: int(gl.BoostsCount),
587587
}
588588

589-
l.ID = derefInt64(gl.Id)
589+
l.ID = gl.Id
590590

591-
if derefInt64(gl.Parent.Id) != 0 || gl.Parent.Title != "" {
591+
if gl.Parent.Id != 0 || gl.Parent.Title != "" {
592592
l.Parent = &Parent{
593-
ID: derefInt64(gl.Parent.Id),
593+
ID: gl.Parent.Id,
594594
Title: gl.Parent.Title,
595595
Type: gl.Parent.Type,
596596
URL: gl.Parent.Url,
597597
AppURL: gl.Parent.AppUrl,
598598
}
599599
}
600600

601-
if derefInt64(gl.Bucket.Id) != 0 || gl.Bucket.Name != "" {
601+
if gl.Bucket.Id != 0 || gl.Bucket.Name != "" {
602602
l.Bucket = &Bucket{
603-
ID: derefInt64(gl.Bucket.Id),
603+
ID: gl.Bucket.Id,
604604
Name: gl.Bucket.Name,
605605
Type: gl.Bucket.Type,
606606
}
607607
}
608608

609-
if derefInt64(gl.Creator.Id) != 0 || gl.Creator.Name != "" {
609+
if gl.Creator.Id != 0 || gl.Creator.Name != "" {
610610
l.Creator = &Person{
611-
ID: derefInt64(gl.Creator.Id),
611+
ID: gl.Creator.Id,
612612
Name: gl.Creator.Name,
613613
EmailAddress: gl.Creator.EmailAddress,
614614
AvatarURL: gl.Creator.AvatarUrl,
@@ -632,7 +632,7 @@ func chatbotFromGenerated(gc generated.Chatbot) Chatbot {
632632
UpdatedAt: gc.UpdatedAt,
633633
}
634634

635-
c.ID = derefInt64(gc.Id)
635+
c.ID = gc.Id
636636

637637
return c
638638
}

go/pkg/basecamp/cards.go

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,21 +1127,21 @@ func cardTableFromGenerated(gc generated.CardTable) CardTable {
11271127
UpdatedAt: gc.UpdatedAt,
11281128
}
11291129

1130-
if derefInt64(gc.Id) != 0 {
1131-
ct.ID = derefInt64(gc.Id)
1130+
if gc.Id != 0 {
1131+
ct.ID = gc.Id
11321132
}
11331133

1134-
if derefInt64(gc.Bucket.Id) != 0 || gc.Bucket.Name != "" {
1134+
if gc.Bucket.Id != 0 || gc.Bucket.Name != "" {
11351135
ct.Bucket = &Bucket{
1136-
ID: derefInt64(gc.Bucket.Id),
1136+
ID: gc.Bucket.Id,
11371137
Name: gc.Bucket.Name,
11381138
Type: gc.Bucket.Type,
11391139
}
11401140
}
11411141

1142-
if derefInt64(gc.Creator.Id) != 0 || gc.Creator.Name != "" {
1142+
if gc.Creator.Id != 0 || gc.Creator.Name != "" {
11431143
ct.Creator = &Person{
1144-
ID: derefInt64(gc.Creator.Id),
1144+
ID: gc.Creator.Id,
11451145
Name: gc.Creator.Name,
11461146
EmailAddress: gc.Creator.EmailAddress,
11471147
AvatarURL: gc.Creator.AvatarUrl,
@@ -1188,31 +1188,31 @@ func cardColumnFromGenerated(gc generated.CardColumn) CardColumn {
11881188
UpdatedAt: gc.UpdatedAt,
11891189
}
11901190

1191-
if derefInt64(gc.Id) != 0 {
1192-
cc.ID = derefInt64(gc.Id)
1191+
if gc.Id != 0 {
1192+
cc.ID = gc.Id
11931193
}
11941194

1195-
if derefInt64(gc.Parent.Id) != 0 || gc.Parent.Title != "" {
1195+
if gc.Parent.Id != 0 || gc.Parent.Title != "" {
11961196
cc.Parent = &Parent{
1197-
ID: derefInt64(gc.Parent.Id),
1197+
ID: gc.Parent.Id,
11981198
Title: gc.Parent.Title,
11991199
Type: gc.Parent.Type,
12001200
URL: gc.Parent.Url,
12011201
AppURL: gc.Parent.AppUrl,
12021202
}
12031203
}
12041204

1205-
if derefInt64(gc.Bucket.Id) != 0 || gc.Bucket.Name != "" {
1205+
if gc.Bucket.Id != 0 || gc.Bucket.Name != "" {
12061206
cc.Bucket = &Bucket{
1207-
ID: derefInt64(gc.Bucket.Id),
1207+
ID: gc.Bucket.Id,
12081208
Name: gc.Bucket.Name,
12091209
Type: gc.Bucket.Type,
12101210
}
12111211
}
12121212

1213-
if derefInt64(gc.Creator.Id) != 0 || gc.Creator.Name != "" {
1213+
if gc.Creator.Id != 0 || gc.Creator.Name != "" {
12141214
cc.Creator = &Person{
1215-
ID: derefInt64(gc.Creator.Id),
1215+
ID: gc.Creator.Id,
12161216
Name: gc.Creator.Name,
12171217
EmailAddress: gc.Creator.EmailAddress,
12181218
AvatarURL: gc.Creator.AvatarUrl,
@@ -1255,8 +1255,8 @@ func cardFromGenerated(gc generated.Card) Card {
12551255
UpdatedAt: gc.UpdatedAt,
12561256
}
12571257

1258-
if derefInt64(gc.Id) != 0 {
1259-
c.ID = derefInt64(gc.Id)
1258+
if gc.Id != 0 {
1259+
c.ID = gc.Id
12601260
}
12611261

12621262
// Handle due_on - it's types.Date in generated, string in SDK
@@ -1269,27 +1269,27 @@ func cardFromGenerated(gc generated.Card) Card {
12691269
c.CompletedAt = &gc.CompletedAt
12701270
}
12711271

1272-
if derefInt64(gc.Parent.Id) != 0 || gc.Parent.Title != "" {
1272+
if gc.Parent.Id != 0 || gc.Parent.Title != "" {
12731273
c.Parent = &Parent{
1274-
ID: derefInt64(gc.Parent.Id),
1274+
ID: gc.Parent.Id,
12751275
Title: gc.Parent.Title,
12761276
Type: gc.Parent.Type,
12771277
URL: gc.Parent.Url,
12781278
AppURL: gc.Parent.AppUrl,
12791279
}
12801280
}
12811281

1282-
if derefInt64(gc.Bucket.Id) != 0 || gc.Bucket.Name != "" {
1282+
if gc.Bucket.Id != 0 || gc.Bucket.Name != "" {
12831283
c.Bucket = &Bucket{
1284-
ID: derefInt64(gc.Bucket.Id),
1284+
ID: gc.Bucket.Id,
12851285
Name: gc.Bucket.Name,
12861286
Type: gc.Bucket.Type,
12871287
}
12881288
}
12891289

1290-
if derefInt64(gc.Creator.Id) != 0 || gc.Creator.Name != "" {
1290+
if gc.Creator.Id != 0 || gc.Creator.Name != "" {
12911291
c.Creator = &Person{
1292-
ID: derefInt64(gc.Creator.Id),
1292+
ID: gc.Creator.Id,
12931293
Name: gc.Creator.Name,
12941294
EmailAddress: gc.Creator.EmailAddress,
12951295
AvatarURL: gc.Creator.AvatarUrl,
@@ -1298,9 +1298,9 @@ func cardFromGenerated(gc generated.Card) Card {
12981298
}
12991299
}
13001300

1301-
if derefInt64(gc.Completer.Id) != 0 || gc.Completer.Name != "" {
1301+
if gc.Completer.Id != 0 || gc.Completer.Name != "" {
13021302
c.Completer = &Person{
1303-
ID: derefInt64(gc.Completer.Id),
1303+
ID: gc.Completer.Id,
13041304
Name: gc.Completer.Name,
13051305
EmailAddress: gc.Completer.EmailAddress,
13061306
AvatarURL: gc.Completer.AvatarUrl,
@@ -1350,8 +1350,8 @@ func cardStepFromGenerated(gs generated.CardStep) CardStep {
13501350
UpdatedAt: gs.UpdatedAt,
13511351
}
13521352

1353-
if derefInt64(gs.Id) != 0 {
1354-
s.ID = derefInt64(gs.Id)
1353+
if gs.Id != 0 {
1354+
s.ID = gs.Id
13551355
}
13561356

13571357
// Handle due_on - it's types.Date in generated, string in SDK
@@ -1364,27 +1364,27 @@ func cardStepFromGenerated(gs generated.CardStep) CardStep {
13641364
s.CompletedAt = &gs.CompletedAt
13651365
}
13661366

1367-
if derefInt64(gs.Parent.Id) != 0 || gs.Parent.Title != "" {
1367+
if gs.Parent.Id != 0 || gs.Parent.Title != "" {
13681368
s.Parent = &Parent{
1369-
ID: derefInt64(gs.Parent.Id),
1369+
ID: gs.Parent.Id,
13701370
Title: gs.Parent.Title,
13711371
Type: gs.Parent.Type,
13721372
URL: gs.Parent.Url,
13731373
AppURL: gs.Parent.AppUrl,
13741374
}
13751375
}
13761376

1377-
if derefInt64(gs.Bucket.Id) != 0 || gs.Bucket.Name != "" {
1377+
if gs.Bucket.Id != 0 || gs.Bucket.Name != "" {
13781378
s.Bucket = &Bucket{
1379-
ID: derefInt64(gs.Bucket.Id),
1379+
ID: gs.Bucket.Id,
13801380
Name: gs.Bucket.Name,
13811381
Type: gs.Bucket.Type,
13821382
}
13831383
}
13841384

1385-
if derefInt64(gs.Creator.Id) != 0 || gs.Creator.Name != "" {
1385+
if gs.Creator.Id != 0 || gs.Creator.Name != "" {
13861386
s.Creator = &Person{
1387-
ID: derefInt64(gs.Creator.Id),
1387+
ID: gs.Creator.Id,
13881388
Name: gs.Creator.Name,
13891389
EmailAddress: gs.Creator.EmailAddress,
13901390
AvatarURL: gs.Creator.AvatarUrl,
@@ -1393,9 +1393,9 @@ func cardStepFromGenerated(gs generated.CardStep) CardStep {
13931393
}
13941394
}
13951395

1396-
if derefInt64(gs.Completer.Id) != 0 || gs.Completer.Name != "" {
1396+
if gs.Completer.Id != 0 || gs.Completer.Name != "" {
13971397
s.Completer = &Person{
1398-
ID: derefInt64(gs.Completer.Id),
1398+
ID: gs.Completer.Id,
13991399
Name: gs.Completer.Name,
14001400
EmailAddress: gs.Completer.EmailAddress,
14011401
AvatarURL: gs.Completer.AvatarUrl,

0 commit comments

Comments
 (0)