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
113 changes: 93 additions & 20 deletions data/specs/api/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7368,7 +7368,10 @@ paths:
apiKey: process.env['KNOCK_API_KEY'], // This is the default and can be omitted
});

const response = await client.users.feeds.getSettings('user_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
const response = await client.users.feeds.getSettings(
'user_id',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
);

console.log(response.features);
python: |-
Expand Down Expand Up @@ -8570,8 +8573,16 @@ paths:
body: "Limited spots available for today's behind-the-scenes DNA extraction demonstration.",
title: 'DNA Lab Tour Available',
},
data: { next_time: '14:30', spots_left: 8, tour_id: 'dna_lab_tour' },
metadata: { cta: 'Reserve Spot', theme: 'amber', type: 'banner' },
data: {
next_time: '14:30',
spots_left: 8,
tour_id: 'dna_lab_tour',
},
metadata: {
cta: 'Reserve Spot',
theme: 'amber',
type: 'banner',
},
tenant: 'ingen_isla_nublar',
});

Expand Down Expand Up @@ -9960,7 +9971,10 @@ paths:
apiKey: process.env['KNOCK_API_KEY'], // This is the default and can be omitted
});

const channelData = await client.users.getChannelData('user_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
const channelData = await client.users.getChannelData(
'user_id',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
);

console.log(channelData.channel_id);
python: |-
Expand Down Expand Up @@ -10061,9 +10075,11 @@ paths:
apiKey: process.env['KNOCK_API_KEY'], // This is the default and can be omitted
});

const channelData = await client.users.setChannelData('user_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
data: { tokens: ['push_token_1'] },
});
const channelData = await client.users.setChannelData(
'user_id',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
{ data: { tokens: ['push_token_1'] } },
);

console.log(channelData.channel_id);
python: |-
Expand Down Expand Up @@ -11578,11 +11594,20 @@ paths:
const bulkOperation = await client.users.bulk.setPreferences({
preferences: {
__persistence_strategy__: 'merge',
categories: { marketing: false, transactional: { channel_types: { email: false } } },
categories: {
marketing: false,
transactional: { channel_types: { email: false } },
},
channel_types: { email: true },
channels: {
'2f641633-95d3-4555-9222-9f1eb7888a80': {
conditions: [{ argument: 'US', operator: 'equal_to', variable: 'recipient.country_code' }],
conditions: [
{
argument: 'US',
operator: 'equal_to',
variable: 'recipient.country_code',
},
],
},
'aef6e715-df82-4ab6-b61e-b743e249f7b6': true,
},
Expand Down Expand Up @@ -11786,7 +11811,10 @@ paths:
apiKey: process.env['KNOCK_API_KEY'], // This is the default and can be omitted
});

const response = await client.users.guides.getChannel('user_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
const response = await client.users.guides.getChannel(
'user_id',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
);

console.log(response.guide_group_display_logs);
python: |-
Expand Down Expand Up @@ -11869,7 +11897,9 @@ paths:
apiKey: process.env['KNOCK_API_KEY'], // This is the default and can be omitted
});

const schedules = await client.schedules.delete({ schedule_ids: ['123e4567-e89b-12d3-a456-426614174000'] });
const schedules = await client.schedules.delete({
schedule_ids: ['123e4567-e89b-12d3-a456-426614174000'],
});

console.log(schedules);
python: |-
Expand Down Expand Up @@ -12373,7 +12403,13 @@ paths:
});

const bulkOperation = await client.objects.bulk.addSubscriptions('projects', {
subscriptions: [{ id: 'project-1', properties: null, recipients: [{ id: 'user_1' }] }],
subscriptions: [
{
id: 'project-1',
properties: null,
recipients: [{ id: 'user_1' }],
},
],
});

console.log(bulkOperation.id);
Expand Down Expand Up @@ -12576,7 +12612,14 @@ paths:
});

const bulkOperation = await client.users.bulk.identify({
users: [{ email: 'jane@ingen.net', id: 'user_1', name: 'Jane Doe', timezone: 'America/New_York' }],
users: [
{
email: 'jane@ingen.net',
id: 'user_1',
name: 'Jane Doe',
timezone: 'America/New_York',
},
],
});

console.log(bulkOperation.id);
Expand Down Expand Up @@ -13649,7 +13692,11 @@ paths:
apiKey: process.env['KNOCK_API_KEY'], // This is the default and can be omitted
});

await client.objects.unsetChannelData('collection', 'object_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
await client.objects.unsetChannelData(
'collection',
'object_id',
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
);
python: |-
import os
from knockapi import Knock
Expand Down Expand Up @@ -14132,7 +14179,12 @@ paths:
});

await client.audiences.addMembers('key', {
members: [{ tenant: 'ingen_isla_nublar', user: { id: 'dr_sattler' } }],
members: [
{
tenant: 'ingen_isla_nublar',
user: { id: 'dr_sattler' },
},
],
});
python: |-
import os
Expand Down Expand Up @@ -16716,7 +16768,10 @@ paths:
apiKey: process.env['KNOCK_API_KEY'], // This is the default and can be omitted
});

await client.workflows.cancel('key', { cancellation_key: 'cancel-workflow-123', recipients: ['jhammond'] });
await client.workflows.cancel('key', {
cancellation_key: 'cancel-workflow-123',
recipients: ['jhammond'],
});
python: |-
import os
from knockapi import Knock
Expand Down Expand Up @@ -17431,11 +17486,20 @@ paths:

const preferenceSet = await client.objects.setPreferences('collection', 'object_id', 'default', {
__persistence_strategy__: 'merge',
categories: { marketing: false, transactional: { channel_types: { email: false } } },
categories: {
marketing: false,
transactional: { channel_types: { email: false } },
},
channel_types: { email: true },
channels: {
'2f641633-95d3-4555-9222-9f1eb7888a80': {
conditions: [{ argument: 'US', operator: 'equal_to', variable: 'recipient.country_code' }],
conditions: [
{
argument: 'US',
operator: 'equal_to',
variable: 'recipient.country_code',
},
],
},
'aef6e715-df82-4ab6-b61e-b743e249f7b6': true,
},
Expand Down Expand Up @@ -17933,11 +17997,20 @@ paths:

const preferenceSet = await client.users.setPreferences('user_id', 'default', {
__persistence_strategy__: 'merge',
categories: { marketing: false, transactional: { channel_types: { email: false } } },
categories: {
marketing: false,
transactional: { channel_types: { email: false } },
},
channel_types: { email: true },
channels: {
'2f641633-95d3-4555-9222-9f1eb7888a80': {
conditions: [{ argument: 'US', operator: 'equal_to', variable: 'recipient.country_code' }],
conditions: [
{
argument: 'US',
operator: 'equal_to',
variable: 'recipient.country_code',
},
],
},
'aef6e715-df82-4ab6-b61e-b743e249f7b6': true,
},
Expand Down
Loading