Skip to content

Commit 56e62fd

Browse files
chore: update switchboard openapi spec (#1205)
* chore: update switchboard openapi spec to v0.1.1250 * chore: update switchboard openapi spec to v0.1.1251
1 parent 6f6a063 commit 56e62fd

File tree

1 file changed

+64
-38
lines changed

1 file changed

+64
-38
lines changed

data/specs/api/openapi.yml

Lines changed: 64 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,6 +1392,12 @@ components:
13921392
type: string
13931393
x-struct: null
13941394
x-validate: null
1395+
name:
1396+
description: An optional name for the object.
1397+
nullable: true
1398+
type: string
1399+
x-struct: null
1400+
x-validate: null
13951401
preferences:
13961402
$ref: '#/components/schemas/InlinePreferenceSetRequest'
13971403
timezone:
@@ -1663,6 +1669,12 @@ components:
16631669
type: string
16641670
x-struct: null
16651671
x-validate: null
1672+
name:
1673+
description: An optional name for the object.
1674+
nullable: true
1675+
type: string
1676+
x-struct: null
1677+
x-validate: null
16661678
preferences:
16671679
description: An optional set of [preferences](/concepts/preferences) for the object.
16681680
oneOf:
@@ -2827,6 +2839,12 @@ components:
28272839
type: string
28282840
x-struct: null
28292841
x-validate: null
2842+
name:
2843+
description: An optional name for the tenant.
2844+
nullable: true
2845+
type: string
2846+
x-struct: null
2847+
x-validate: null
28302848
preferences:
28312849
description: The preferences for the tenant.
28322850
oneOf:
@@ -4038,6 +4056,12 @@ components:
40384056
type: string
40394057
x-struct: null
40404058
x-validate: null
4059+
name:
4060+
description: An optional name for the object.
4061+
nullable: true
4062+
type: string
4063+
x-struct: null
4064+
x-validate: null
40414065
preferences:
40424066
description: An optional set of [preferences](/concepts/preferences) for the object.
40434067
oneOf:
@@ -5622,6 +5646,12 @@ components:
56225646
- $ref: '#/components/schemas/InlineChannelDataRequest'
56235647
x-struct: null
56245648
x-validate: null
5649+
name:
5650+
description: An optional name for the tenant.
5651+
nullable: true
5652+
type: string
5653+
x-struct: null
5654+
x-validate: null
56255655
settings:
56265656
description: The settings for the tenant. Includes branding and preference set.
56275657
properties:
@@ -6903,6 +6933,7 @@ paths:
69036933
});
69046934

69056935
const tenant = await client.tenants.set('id', {
6936+
name: 'Jurassic Park',
69066937
settings: {
69076938
branding: {
69086939
icon_url: 'https://example.com/trex_silhouette_icon.png',
@@ -6922,6 +6953,7 @@ paths:
69226953
)
69236954
tenant = client.tenants.set(
69246955
id="id",
6956+
name="Jurassic Park",
69256957
settings={
69266958
"branding": {
69276959
"icon_url": "https://example.com/trex_silhouette_icon.png",
@@ -6951,6 +6983,7 @@ paths:
69516983
context.TODO(),
69526984
"id",
69536985
knock.TenantSetParams{
6986+
Name: knock.F("Jurassic Park"),
69546987
Settings: knock.F(knock.TenantSetParamsSettings{
69556988
Branding: knock.F(knock.TenantSetParamsSettingsBranding{
69566989
IconURL: knock.F("https://example.com/trex_silhouette_icon.png"),
@@ -7082,6 +7115,15 @@ paths:
70827115
type: string
70837116
x-struct: null
70847117
x-validate: null
7118+
- description: The locale to render the feed items in. Must be in the IETF 5646 format (e.g. `en-US`). When not provided, will default to the locale that the feed items were rendered in. Only available for enterprise plan customers using custom translations.
7119+
example: en-US
7120+
in: query
7121+
name: locale
7122+
required: false
7123+
schema:
7124+
type: string
7125+
x-struct: null
7126+
x-validate: null
70857127
- description: The cursor to fetch entries after.
70867128
in: query
70877129
name: after
@@ -9892,7 +9934,7 @@ paths:
98929934
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
98939935
knock.UserSetChannelDataParams{
98949936
ChannelDataRequest: knock.ChannelDataRequestParam{
9895-
Data: knock.F[knock.ChannelDataRequestDataUnionParam](knock.ChannelDataRequestDataPushChannelDataTokensOnlyParam{
9937+
Data: knock.F[knock.ChannelDataRequestDataUnionParam](knock.PushChannelDataTokensOnlyParam{
98969938
Tokens: knock.F([]string{"push_token_1"}),
98979939
}),
98989940
},
@@ -11446,7 +11488,7 @@ paths:
1144611488
Email: knock.F[knock.PreferenceSetChannelTypesEmailUnionParam](shared.UnionBool(true)),
1144711489
}),
1144811490
Channels: knock.F(map[string]knock.PreferenceSetRequestChannelsUnionParam{
11449-
"2f641633-95d3-4555-9222-9f1eb7888a80": knock.PreferenceSetRequestChannelsPreferenceSetChannelSettingParam{
11491+
"2f641633-95d3-4555-9222-9f1eb7888a80": knock.PreferenceSetChannelSettingParam{
1145011492
Conditions: knock.F([]shared.ConditionParam{shared.ConditionParam{
1145111493
Argument: knock.F("US"),
1145211494
Operator: knock.F(shared.ConditionOperatorEqualTo),
@@ -12767,6 +12809,7 @@ paths:
1276712809
const object = await client.objects.set('collection', 'id', {
1276812810
channel_data: { '97c5837d-c65c-4d54-aa39-080eeb81c69d': { tokens: ['push_token_123'] } },
1276912811
locale: 'en-US',
12812+
name: 'My product',
1277012813
preferences: {
1277112814
default: {
1277212815
channel_types: { email: true },
@@ -12792,6 +12835,7 @@ paths:
1279212835
}
1279312836
},
1279412837
locale="en-US",
12838+
name="My product",
1279512839
preferences={
1279612840
"default": {
1279712841
"channel_types": {
@@ -12831,11 +12875,12 @@ paths:
1283112875
"id",
1283212876
knock.ObjectSetParams{
1283312877
ChannelData: knock.F(knock.InlineChannelDataRequestParam{
12834-
"97c5837d-c65c-4d54-aa39-080eeb81c69d": knock.InlineChannelDataRequestItemPushChannelDataTokensOnlyParam{
12878+
"97c5837d-c65c-4d54-aa39-080eeb81c69d": knock.PushChannelDataTokensOnlyParam{
1283512879
Tokens: knock.F([]string{"push_token_123"}),
1283612880
},
1283712881
}),
1283812882
Locale: knock.F("en-US"),
12883+
Name: knock.F("My product"),
1283912884
Preferences: knock.F(knock.InlinePreferenceSetRequestParam{
1284012885
"default": knock.PreferenceSetRequestParam{
1284112886
ChannelTypes: knock.F(knock.PreferenceSetChannelTypesParam{
@@ -13658,7 +13703,7 @@ paths:
1365813703
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
1365913704
knock.ObjectSetChannelDataParams{
1366013705
ChannelDataRequest: knock.ChannelDataRequestParam{
13661-
Data: knock.F[knock.ChannelDataRequestDataUnionParam](knock.ChannelDataRequestDataPushChannelDataTokensOnlyParam{
13706+
Data: knock.F[knock.ChannelDataRequestDataUnionParam](knock.PushChannelDataTokensOnlyParam{
1366213707
Tokens: knock.F([]string{"push_token_1"}),
1366313708
}),
1366413709
},
@@ -16790,7 +16835,9 @@ paths:
1679016835
apiKey: 'My API Key',
1679116836
});
1679216837

16793-
const bulkOperation = await client.tenants.bulk.set({ tenants: ['[object Object]'] });
16838+
const bulkOperation = await client.tenants.bulk.set({
16839+
tenants: [{ id: 'tenant_1', name: 'Acme Corp, Inc.' }],
16840+
});
1679416841

1679516842
console.log(bulkOperation.id);
1679616843
python: |-
@@ -16800,7 +16847,10 @@ paths:
1680016847
api_key="My API Key",
1680116848
)
1680216849
bulk_operation = client.tenants.bulk.set(
16803-
tenants=["[object Object]"],
16850+
tenants=[{
16851+
"id": "tenant_1",
16852+
"name": "Acme Corp, Inc.",
16853+
}],
1680416854
)
1680516855
print(bulk_operation.id)
1680616856
go: |
@@ -16812,15 +16862,17 @@ paths:
1681216862

1681316863
"github.com/knocklabs/knock-go"
1681416864
"github.com/knocklabs/knock-go/option"
16815-
"github.com/knocklabs/knock-go/shared"
1681616865
)
1681716866

1681816867
func main() {
1681916868
client := knock.NewClient(
1682016869
option.WithAPIKey("My API Key"),
1682116870
)
1682216871
bulkOperation, err := client.Tenants.Bulk.Set(context.TODO(), knock.TenantBulkSetParams{
16823-
Tenants: knock.F([]knock.InlineTenantRequestUnionParam{shared.UnionString("[object Object]")}),
16872+
Tenants: knock.F([]knock.InlineTenantRequestUnionParam{knock.TenantRequestParam{
16873+
ID: knock.F("tenant_1"),
16874+
Name: knock.F("Acme Corp, Inc."),
16875+
}}),
1682416876
})
1682516877
if err != nil {
1682616878
panic(err.Error())
@@ -16832,7 +16884,7 @@ paths:
1683216884

1683316885
knock = Knockapi::Client.new(api_key: "My API Key")
1683416886

16835-
bulk_operation = knock.tenants.bulk.set(tenants: ["string"])
16887+
bulk_operation = knock.tenants.bulk.set(tenants: [{id: "tenant_1"}])
1683616888

1683716889
puts(bulk_operation)
1683816890
/v1/objects/{collection}/{object_id}/preferences/{id}:
@@ -18217,23 +18269,7 @@ paths:
1821718269
});
1821818270

1821918271
const bulkOperation = await client.objects.bulk.set('collection', {
18220-
objects: [
18221-
{
18222-
id: 'project_1',
18223-
name: {
18224-
'0': 'M',
18225-
'1': 'y',
18226-
'2': ' ',
18227-
'3': 'p',
18228-
'4': 'r',
18229-
'5': 'o',
18230-
'6': 'j',
18231-
'7': 'e',
18232-
'8': 'c',
18233-
'9': 't',
18234-
},
18235-
},
18236-
],
18272+
objects: [{ id: 'project_1', name: 'My project' }],
1823718273
});
1823818274

1823918275
console.log(bulkOperation.id);
@@ -18247,18 +18283,7 @@ paths:
1824718283
collection="collection",
1824818284
objects=[{
1824918285
"id": "project_1",
18250-
"name": {
18251-
"0": "M",
18252-
"1": "y",
18253-
"2": " ",
18254-
"3": "p",
18255-
"4": "r",
18256-
"5": "o",
18257-
"6": "j",
18258-
"7": "e",
18259-
"8": "c",
18260-
"9": "t",
18261-
},
18286+
"name": "My project",
1826218287
}],
1826318288
)
1826418289
print(bulk_operation.id)
@@ -18283,6 +18308,7 @@ paths:
1828318308
knock.ObjectBulkSetParams{
1828418309
Objects: knock.F([]knock.ObjectBulkSetParamsObject{knock.ObjectBulkSetParamsObject{
1828518310
ID: knock.F("project_1"),
18311+
Name: knock.F("My project"),
1828618312
}}),
1828718313
},
1828818314
)

0 commit comments

Comments
 (0)