Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 64 additions & 38 deletions data/specs/api/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1392,6 +1392,12 @@ components:
type: string
x-struct: null
x-validate: null
name:
description: An optional name for the object.
nullable: true
type: string
x-struct: null
x-validate: null
preferences:
$ref: '#/components/schemas/InlinePreferenceSetRequest'
timezone:
Expand Down Expand Up @@ -1663,6 +1669,12 @@ components:
type: string
x-struct: null
x-validate: null
name:
description: An optional name for the object.
nullable: true
type: string
x-struct: null
x-validate: null
preferences:
description: An optional set of [preferences](/concepts/preferences) for the object.
oneOf:
Expand Down Expand Up @@ -2827,6 +2839,12 @@ components:
type: string
x-struct: null
x-validate: null
name:
description: An optional name for the tenant.
nullable: true
type: string
x-struct: null
x-validate: null
preferences:
description: The preferences for the tenant.
oneOf:
Expand Down Expand Up @@ -4038,6 +4056,12 @@ components:
type: string
x-struct: null
x-validate: null
name:
description: An optional name for the object.
nullable: true
type: string
x-struct: null
x-validate: null
preferences:
description: An optional set of [preferences](/concepts/preferences) for the object.
oneOf:
Expand Down Expand Up @@ -5622,6 +5646,12 @@ components:
- $ref: '#/components/schemas/InlineChannelDataRequest'
x-struct: null
x-validate: null
name:
description: An optional name for the tenant.
nullable: true
type: string
x-struct: null
x-validate: null
settings:
description: The settings for the tenant. Includes branding and preference set.
properties:
Expand Down Expand Up @@ -6903,6 +6933,7 @@ paths:
});

const tenant = await client.tenants.set('id', {
name: 'Jurassic Park',
settings: {
branding: {
icon_url: 'https://example.com/trex_silhouette_icon.png',
Expand All @@ -6922,6 +6953,7 @@ paths:
)
tenant = client.tenants.set(
id="id",
name="Jurassic Park",
settings={
"branding": {
"icon_url": "https://example.com/trex_silhouette_icon.png",
Expand Down Expand Up @@ -6951,6 +6983,7 @@ paths:
context.TODO(),
"id",
knock.TenantSetParams{
Name: knock.F("Jurassic Park"),
Settings: knock.F(knock.TenantSetParamsSettings{
Branding: knock.F(knock.TenantSetParamsSettingsBranding{
IconURL: knock.F("https://example.com/trex_silhouette_icon.png"),
Expand Down Expand Up @@ -7082,6 +7115,15 @@ paths:
type: string
x-struct: null
x-validate: null
- 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.
example: en-US
in: query
name: locale
required: false
schema:
type: string
x-struct: null
x-validate: null
- description: The cursor to fetch entries after.
in: query
name: after
Expand Down Expand Up @@ -9892,7 +9934,7 @@ paths:
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
knock.UserSetChannelDataParams{
ChannelDataRequest: knock.ChannelDataRequestParam{
Data: knock.F[knock.ChannelDataRequestDataUnionParam](knock.ChannelDataRequestDataPushChannelDataTokensOnlyParam{
Data: knock.F[knock.ChannelDataRequestDataUnionParam](knock.PushChannelDataTokensOnlyParam{
Tokens: knock.F([]string{"push_token_1"}),
}),
},
Expand Down Expand Up @@ -11446,7 +11488,7 @@ paths:
Email: knock.F[knock.PreferenceSetChannelTypesEmailUnionParam](shared.UnionBool(true)),
}),
Channels: knock.F(map[string]knock.PreferenceSetRequestChannelsUnionParam{
"2f641633-95d3-4555-9222-9f1eb7888a80": knock.PreferenceSetRequestChannelsPreferenceSetChannelSettingParam{
"2f641633-95d3-4555-9222-9f1eb7888a80": knock.PreferenceSetChannelSettingParam{
Conditions: knock.F([]shared.ConditionParam{shared.ConditionParam{
Argument: knock.F("US"),
Operator: knock.F(shared.ConditionOperatorEqualTo),
Expand Down Expand Up @@ -12767,6 +12809,7 @@ paths:
const object = await client.objects.set('collection', 'id', {
channel_data: { '97c5837d-c65c-4d54-aa39-080eeb81c69d': { tokens: ['push_token_123'] } },
locale: 'en-US',
name: 'My product',
preferences: {
default: {
channel_types: { email: true },
Expand All @@ -12792,6 +12835,7 @@ paths:
}
},
locale="en-US",
name="My product",
preferences={
"default": {
"channel_types": {
Expand Down Expand Up @@ -12831,11 +12875,12 @@ paths:
"id",
knock.ObjectSetParams{
ChannelData: knock.F(knock.InlineChannelDataRequestParam{
"97c5837d-c65c-4d54-aa39-080eeb81c69d": knock.InlineChannelDataRequestItemPushChannelDataTokensOnlyParam{
"97c5837d-c65c-4d54-aa39-080eeb81c69d": knock.PushChannelDataTokensOnlyParam{
Tokens: knock.F([]string{"push_token_123"}),
},
}),
Locale: knock.F("en-US"),
Name: knock.F("My product"),
Preferences: knock.F(knock.InlinePreferenceSetRequestParam{
"default": knock.PreferenceSetRequestParam{
ChannelTypes: knock.F(knock.PreferenceSetChannelTypesParam{
Expand Down Expand Up @@ -13658,7 +13703,7 @@ paths:
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
knock.ObjectSetChannelDataParams{
ChannelDataRequest: knock.ChannelDataRequestParam{
Data: knock.F[knock.ChannelDataRequestDataUnionParam](knock.ChannelDataRequestDataPushChannelDataTokensOnlyParam{
Data: knock.F[knock.ChannelDataRequestDataUnionParam](knock.PushChannelDataTokensOnlyParam{
Tokens: knock.F([]string{"push_token_1"}),
}),
},
Expand Down Expand Up @@ -16790,7 +16835,9 @@ paths:
apiKey: 'My API Key',
});

const bulkOperation = await client.tenants.bulk.set({ tenants: ['[object Object]'] });
const bulkOperation = await client.tenants.bulk.set({
tenants: [{ id: 'tenant_1', name: 'Acme Corp, Inc.' }],
});

console.log(bulkOperation.id);
python: |-
Expand All @@ -16800,7 +16847,10 @@ paths:
api_key="My API Key",
)
bulk_operation = client.tenants.bulk.set(
tenants=["[object Object]"],
tenants=[{
"id": "tenant_1",
"name": "Acme Corp, Inc.",
}],
)
print(bulk_operation.id)
go: |
Expand All @@ -16812,15 +16862,17 @@ paths:

"github.com/knocklabs/knock-go"
"github.com/knocklabs/knock-go/option"
"github.com/knocklabs/knock-go/shared"
)

func main() {
client := knock.NewClient(
option.WithAPIKey("My API Key"),
)
bulkOperation, err := client.Tenants.Bulk.Set(context.TODO(), knock.TenantBulkSetParams{
Tenants: knock.F([]knock.InlineTenantRequestUnionParam{shared.UnionString("[object Object]")}),
Tenants: knock.F([]knock.InlineTenantRequestUnionParam{knock.TenantRequestParam{
ID: knock.F("tenant_1"),
Name: knock.F("Acme Corp, Inc."),
}}),
})
if err != nil {
panic(err.Error())
Expand All @@ -16832,7 +16884,7 @@ paths:

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

bulk_operation = knock.tenants.bulk.set(tenants: ["string"])
bulk_operation = knock.tenants.bulk.set(tenants: [{id: "tenant_1"}])

puts(bulk_operation)
/v1/objects/{collection}/{object_id}/preferences/{id}:
Expand Down Expand Up @@ -18217,23 +18269,7 @@ paths:
});

const bulkOperation = await client.objects.bulk.set('collection', {
objects: [
{
id: 'project_1',
name: {
'0': 'M',
'1': 'y',
'2': ' ',
'3': 'p',
'4': 'r',
'5': 'o',
'6': 'j',
'7': 'e',
'8': 'c',
'9': 't',
},
},
],
objects: [{ id: 'project_1', name: 'My project' }],
});

console.log(bulkOperation.id);
Expand All @@ -18247,18 +18283,7 @@ paths:
collection="collection",
objects=[{
"id": "project_1",
"name": {
"0": "M",
"1": "y",
"2": " ",
"3": "p",
"4": "r",
"5": "o",
"6": "j",
"7": "e",
"8": "c",
"9": "t",
},
"name": "My project",
}],
)
print(bulk_operation.id)
Expand All @@ -18283,6 +18308,7 @@ paths:
knock.ObjectBulkSetParams{
Objects: knock.F([]knock.ObjectBulkSetParamsObject{knock.ObjectBulkSetParamsObject{
ID: knock.F("project_1"),
Name: knock.F("My project"),
}}),
},
)
Expand Down
Loading