diff --git a/data/specs/api/openapi.yml b/data/specs/api/openapi.yml index d3bfb792b..767f8887d 100644 --- a/data/specs/api/openapi.yml +++ b/data/specs/api/openapi.yml @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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', @@ -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", @@ -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"), @@ -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 @@ -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"}), }), }, @@ -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), @@ -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 }, @@ -12792,6 +12835,7 @@ paths: } }, locale="en-US", + name="My product", preferences={ "default": { "channel_types": { @@ -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{ @@ -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"}), }), }, @@ -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: |- @@ -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: | @@ -16812,7 +16862,6 @@ paths: "github.com/knocklabs/knock-go" "github.com/knocklabs/knock-go/option" - "github.com/knocklabs/knock-go/shared" ) func main() { @@ -16820,7 +16869,10 @@ paths: 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()) @@ -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}: @@ -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); @@ -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) @@ -18283,6 +18308,7 @@ paths: knock.ObjectBulkSetParams{ Objects: knock.F([]knock.ObjectBulkSetParamsObject{knock.ObjectBulkSetParamsObject{ ID: knock.F("project_1"), + Name: knock.F("My project"), }}), }, )