Skip to content

Commit 2d6b2ce

Browse files
authored
Update lib-openapi.json and regenerate libs (#1828)
… for documentation improvements.
2 parents 2710f41 + a89306d commit 2d6b2ce

File tree

19 files changed

+1039
-237
lines changed

19 files changed

+1039
-237
lines changed

csharp/Svix/Environment.cs

+4-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ public EnvironmentOut Export(EnvironmentExportOptions? options = null)
8585

8686
/// <summary>
8787
/// Import a configuration into the active organization.
88-
/// It doesn't delete anything, only adds/updates what was passed to it.
88+
///
89+
/// It doesn't delete anything, only adds / updates what was passed to it.
8990
/// </summary>
9091
public async Task<bool> ImportAsync(
9192
EnvironmentIn environmentIn,
@@ -116,7 +117,8 @@ public async Task<bool> ImportAsync(
116117

117118
/// <summary>
118119
/// Import a configuration into the active organization.
119-
/// It doesn't delete anything, only adds/updates what was passed to it.
120+
///
121+
/// It doesn't delete anything, only adds / updates what was passed to it.
120122
/// </summary>
121123
public bool Import(EnvironmentIn environmentIn, EnvironmentImportOptions? options = null)
122124
{

csharp/Svix/Message.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,9 @@ public MessageOut Create(
284284
}
285285

286286
/// <summary>
287-
/// Purge all message content for the application.
288-
///
289287
/// Delete all message payloads for the application.
288+
///
289+
/// This operation is only available in the <a href="https://svix.com/pricing" target="_blank">Enterprise</a> plan.
290290
/// </summary>
291291
public async Task<ExpungeAllContentsOut> ExpungeAllContentsAsync(
292292
string appId,
@@ -315,9 +315,9 @@ public async Task<ExpungeAllContentsOut> ExpungeAllContentsAsync(
315315
}
316316

317317
/// <summary>
318-
/// Purge all message content for the application.
319-
///
320318
/// Delete all message payloads for the application.
319+
///
320+
/// This operation is only available in the <a href="https://svix.com/pricing" target="_blank">Enterprise</a> plan.
321321
/// </summary>
322322
public ExpungeAllContentsOut ExpungeAllContents(
323323
string appId,

java/lib/src/main/java/com/svix/api/Environment.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,18 @@ public EnvironmentOut export(final EnvironmentExportOptions options)
3939
}
4040

4141
/**
42-
* Import a configuration into the active organization. It doesn't delete anything, only
43-
* adds/updates what was passed to it.
42+
* Import a configuration into the active organization.
43+
*
44+
* <p>It doesn't delete anything, only adds / updates what was passed to it.
4445
*/
4546
public void import_(final EnvironmentIn environmentIn) throws IOException, ApiException {
4647
this.import_(environmentIn, new EnvironmentImportOptions());
4748
}
4849

4950
/**
50-
* Import a configuration into the active organization. It doesn't delete anything, only
51-
* adds/updates what was passed to it.
51+
* Import a configuration into the active organization.
52+
*
53+
* <p>It doesn't delete anything, only adds / updates what was passed to it.
5254
*/
5355
public void import_(final EnvironmentIn environmentIn, final EnvironmentImportOptions options)
5456
throws IOException, ApiException {

java/lib/src/main/java/com/svix/api/Message.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -161,19 +161,21 @@ public MessageOut create(
161161
}
162162

163163
/**
164-
* Purge all message content for the application.
164+
* Delete all message payloads for the application.
165165
*
166-
* <p>Delete all message payloads for the application.
166+
* <p>This operation is only available in the <a href="https://svix.com/pricing"
167+
* target="_blank">Enterprise</a> plan.
167168
*/
168169
public ExpungeAllContentsOut expungeAllContents(final String appId)
169170
throws IOException, ApiException {
170171
return this.expungeAllContents(appId, new MessageExpungeAllContentsOptions());
171172
}
172173

173174
/**
174-
* Purge all message content for the application.
175+
* Delete all message payloads for the application.
175176
*
176-
* <p>Delete all message payloads for the application.
177+
* <p>This operation is only available in the <a href="https://svix.com/pricing"
178+
* target="_blank">Enterprise</a> plan.
177179
*/
178180
public ExpungeAllContentsOut expungeAllContents(
179181
final String appId, final MessageExpungeAllContentsOptions options)

javascript/src/api/environment.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ export class Environment {
2525

2626
/**
2727
* Import a configuration into the active organization.
28-
* It doesn't delete anything, only adds/updates what was passed to it.
28+
*
29+
* It doesn't delete anything, only adds / updates what was passed to it.
2930
*/
3031
public import(
3132
environmentIn: EnvironmentIn,

javascript/src/api/message.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ export class Message {
108108
}
109109

110110
/**
111-
* Purge all message content for the application.
112-
*
113111
* Delete all message payloads for the application.
112+
*
113+
* This operation is only available in the <a href="https://svix.com/pricing" target="_blank">Enterprise</a> plan.
114114
*/
115115
public expungeAllContents(
116116
appId: string,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
// this file is @generated
2+
import {
3+
PollingEndpointConsumerSeekIn,
4+
PollingEndpointConsumerSeekInSerializer,
5+
} from "../models/pollingEndpointConsumerSeekIn";
6+
import {
7+
PollingEndpointConsumerSeekOut,
8+
PollingEndpointConsumerSeekOutSerializer,
9+
} from "../models/pollingEndpointConsumerSeekOut";
10+
import {
11+
PollingEndpointOut,
12+
PollingEndpointOutSerializer,
13+
} from "../models/pollingEndpointOut";
14+
import { HttpMethod, SvixRequest, SvixRequestContext } from "../request";
15+
16+
export interface EventsPublicConsumerOptions {
17+
/** Limit the number of returned items */
18+
limit?: number;
19+
/** The iterator returned from a prior invocation */
20+
iterator?: string | null;
21+
/** Filters messages sent with this event type (optional). */
22+
eventType?: string;
23+
/** Filters messages sent with this channel (optional). */
24+
channel?: string;
25+
}
26+
27+
export interface EventsPublicConsumerSeekOptions {
28+
idempotencyKey?: string;
29+
}
30+
31+
export class EventsPublic {
32+
public constructor(private readonly requestCtx: SvixRequestContext) {}
33+
34+
/**
35+
* Reads the stream of created messages for an application, filtered on the Sink's event types and
36+
* Channels, using server-managed iterator tracking.
37+
*/
38+
public consumer(
39+
appId: string,
40+
sinkId: string,
41+
consumerId: string,
42+
options?: EventsPublicConsumerOptions
43+
): Promise<PollingEndpointOut> {
44+
const request = new SvixRequest(
45+
HttpMethod.GET,
46+
"/api/v1/app/{app_id}/poller/{sink_id}/consumer/{consumer_id}"
47+
);
48+
49+
request.setPathParam("app_id", appId);
50+
request.setPathParam("sink_id", sinkId);
51+
request.setPathParam("consumer_id", consumerId);
52+
request.setQueryParam("limit", options?.limit);
53+
request.setQueryParam("iterator", options?.iterator);
54+
request.setQueryParam("event_type", options?.eventType);
55+
request.setQueryParam("channel", options?.channel);
56+
57+
return request.send(this.requestCtx, PollingEndpointOutSerializer._fromJsonObject);
58+
}
59+
60+
/** Sets the starting offset for the consumer of a polling endpoint. */
61+
public consumerSeek(
62+
appId: string,
63+
sinkId: string,
64+
consumerId: string,
65+
pollingEndpointConsumerSeekIn: PollingEndpointConsumerSeekIn,
66+
options?: EventsPublicConsumerSeekOptions
67+
): Promise<PollingEndpointConsumerSeekOut> {
68+
const request = new SvixRequest(
69+
HttpMethod.POST,
70+
"/api/v1/app/{app_id}/poller/{sink_id}/consumer/{consumer_id}/seek"
71+
);
72+
73+
request.setPathParam("app_id", appId);
74+
request.setPathParam("sink_id", sinkId);
75+
request.setPathParam("consumer_id", consumerId);
76+
request.setHeaderParam("idempotency-key", options?.idempotencyKey);
77+
request.setBody(
78+
PollingEndpointConsumerSeekInSerializer._toJsonObject(pollingEndpointConsumerSeekIn)
79+
);
80+
81+
return request.send(
82+
this.requestCtx,
83+
PollingEndpointConsumerSeekOutSerializer._fromJsonObject
84+
);
85+
}
86+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// this file is @generated
2+
/* eslint @typescript-eslint/no-explicit-any: 0 */
3+
4+
export interface PollingEndpointConsumerSeekIn {
5+
after: Date;
6+
}
7+
8+
export const PollingEndpointConsumerSeekInSerializer = {
9+
_fromJsonObject(object: any): PollingEndpointConsumerSeekIn {
10+
return {
11+
after: new Date(object["after"]),
12+
};
13+
},
14+
15+
_toJsonObject(self: PollingEndpointConsumerSeekIn): any {
16+
return {
17+
after: self.after,
18+
};
19+
},
20+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// this file is @generated
2+
/* eslint @typescript-eslint/no-explicit-any: 0 */
3+
4+
export interface PollingEndpointConsumerSeekOut {
5+
iterator: string;
6+
}
7+
8+
export const PollingEndpointConsumerSeekOutSerializer = {
9+
_fromJsonObject(object: any): PollingEndpointConsumerSeekOut {
10+
return {
11+
iterator: object["iterator"],
12+
};
13+
},
14+
15+
_toJsonObject(self: PollingEndpointConsumerSeekOut): any {
16+
return {
17+
iterator: self.iterator,
18+
};
19+
},
20+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// this file is @generated
2+
/* eslint @typescript-eslint/no-explicit-any: 0 */
3+
4+
/** The MessageOut equivalent of polling endpoint */
5+
export interface PollingEndpointMessageOut {
6+
/** List of free-form identifiers that endpoints can filter by */
7+
channels?: string[] | null;
8+
/** Optional unique identifier for the message */
9+
eventId?: string | null;
10+
/** The event type's name */
11+
eventType: string;
12+
headers?: { [key: string]: string } | null;
13+
/** The Message's ID. */
14+
id: string;
15+
payload: any;
16+
tags?: string[] | null;
17+
timestamp: Date;
18+
}
19+
20+
export const PollingEndpointMessageOutSerializer = {
21+
_fromJsonObject(object: any): PollingEndpointMessageOut {
22+
return {
23+
channels: object["channels"],
24+
eventId: object["eventId"],
25+
eventType: object["eventType"],
26+
headers: object["headers"],
27+
id: object["id"],
28+
payload: object["payload"],
29+
tags: object["tags"],
30+
timestamp: new Date(object["timestamp"]),
31+
};
32+
},
33+
34+
_toJsonObject(self: PollingEndpointMessageOut): any {
35+
return {
36+
channels: self.channels,
37+
eventId: self.eventId,
38+
eventType: self.eventType,
39+
headers: self.headers,
40+
id: self.id,
41+
payload: self.payload,
42+
tags: self.tags,
43+
timestamp: self.timestamp,
44+
};
45+
},
46+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// this file is @generated
2+
/* eslint @typescript-eslint/no-explicit-any: 0 */
3+
import {
4+
PollingEndpointMessageOut,
5+
PollingEndpointMessageOutSerializer,
6+
} from "./pollingEndpointMessageOut";
7+
8+
export interface PollingEndpointOut {
9+
data: PollingEndpointMessageOut[];
10+
done: boolean;
11+
iterator: string;
12+
}
13+
14+
export const PollingEndpointOutSerializer = {
15+
_fromJsonObject(object: any): PollingEndpointOut {
16+
return {
17+
data: object["data"].map((item: PollingEndpointMessageOut) =>
18+
PollingEndpointMessageOutSerializer._fromJsonObject(item)
19+
),
20+
done: object["done"],
21+
iterator: object["iterator"],
22+
};
23+
},
24+
25+
_toJsonObject(self: PollingEndpointOut): any {
26+
return {
27+
data: self.data.map((item) =>
28+
PollingEndpointMessageOutSerializer._toJsonObject(item)
29+
),
30+
done: self.done,
31+
iterator: self.iterator,
32+
};
33+
},
34+
};

kotlin/lib/src/main/kotlin/Environment.kt

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ class Environment(private val client: SvixHttpClient) {
2525
}
2626

2727
/**
28-
* Import a configuration into the active organization. It doesn't delete anything, only
29-
* adds/updates what was passed to it.
28+
* Import a configuration into the active organization.
29+
*
30+
* It doesn't delete anything, only adds / updates what was passed to it.
3031
*/
3132
suspend fun import(
3233
environmentIn: EnvironmentIn,

kotlin/lib/src/main/kotlin/Message.kt

+3-2
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,10 @@ class Message(private val client: SvixHttpClient) {
133133
}
134134

135135
/**
136-
* Purge all message content for the application.
137-
*
138136
* Delete all message payloads for the application.
137+
*
138+
* This operation is only available in the <a href="https://svix.com/pricing"
139+
* target="_blank">Enterprise</a> plan.
139140
*/
140141
suspend fun expungeAllContents(
141142
appId: String,

0 commit comments

Comments
 (0)