samva 0.38.0 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client/sdk.gen.d.ts
CHANGED
|
@@ -2080,7 +2080,7 @@ export declare class Topics {
|
|
|
2080
2080
|
/**
|
|
2081
2081
|
* Set topic subscriptions
|
|
2082
2082
|
*
|
|
2083
|
-
* Upserts explicit subscribed or unsubscribed status for one channel. Each contact is named by ID, email, or phone. New addresses create contacts in the topic's namespace. Repeating the same status is idempotent.
|
|
2083
|
+
* Upserts explicit subscribed or unsubscribed status for one channel. Each contact is named by ID, email, or phone. New addresses create contacts in the topic's namespace. Repeating the same status is idempotent. On email, setting subscribed never overrides a contact's explicit unsubscribe: those contacts are counted in kept, and only the recipient can resubscribe them.
|
|
2084
2084
|
*/
|
|
2085
2085
|
static setSubscriptions<ThrowOnError extends boolean = false>(parameters: {
|
|
2086
2086
|
id: TopicId;
|
package/dist/client/sdk.gen.js
CHANGED
|
@@ -6342,7 +6342,7 @@ var Topics = class {
|
|
|
6342
6342
|
/**
|
|
6343
6343
|
* Set topic subscriptions
|
|
6344
6344
|
*
|
|
6345
|
-
* Upserts explicit subscribed or unsubscribed status for one channel. Each contact is named by ID, email, or phone. New addresses create contacts in the topic's namespace. Repeating the same status is idempotent.
|
|
6345
|
+
* Upserts explicit subscribed or unsubscribed status for one channel. Each contact is named by ID, email, or phone. New addresses create contacts in the topic's namespace. Repeating the same status is idempotent. On email, setting subscribed never overrides a contact's explicit unsubscribe: those contacts are counted in kept, and only the recipient can resubscribe them.
|
|
6346
6346
|
*/
|
|
6347
6347
|
static setSubscriptions(parameters, options) {
|
|
6348
6348
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -2304,6 +2304,10 @@ export type TopicFormCreatePayload = {
|
|
|
2304
2304
|
};
|
|
2305
2305
|
export type TopicSetSubscriptionsResult = {
|
|
2306
2306
|
updated: number;
|
|
2307
|
+
/**
|
|
2308
|
+
* Email contacts left unsubscribed because they explicitly unsubscribed from this topic. Only the recipient can resubscribe them, through the preference page or double opt-in.
|
|
2309
|
+
*/
|
|
2310
|
+
kept: number;
|
|
2307
2311
|
};
|
|
2308
2312
|
export type TopicSetSubscriptionsPayload = {
|
|
2309
2313
|
contacts: Array<TopicContactRef>;
|
|
@@ -31,9 +31,11 @@ export declare const TopicSubscriptionCounts: Schema.Struct<{
|
|
|
31
31
|
}>;
|
|
32
32
|
export type TopicSetSubscriptionsResult = {
|
|
33
33
|
readonly updated: number;
|
|
34
|
+
readonly kept: number;
|
|
34
35
|
};
|
|
35
36
|
export declare const TopicSetSubscriptionsResult: Schema.Struct<{
|
|
36
37
|
readonly updated: Schema.Finite;
|
|
38
|
+
readonly kept: Schema.Finite;
|
|
37
39
|
}>;
|
|
38
40
|
export type TopicSubscription = {
|
|
39
41
|
readonly contactId: ContactId;
|
|
@@ -536,6 +538,7 @@ export declare const TopicsSetSubscriptionsRequestJson: Schema.Struct<{
|
|
|
536
538
|
export type TopicsSetSubscriptions200 = TopicSetSubscriptionsResult;
|
|
537
539
|
export declare const TopicsSetSubscriptions200: Schema.Struct<{
|
|
538
540
|
readonly updated: Schema.Finite;
|
|
541
|
+
readonly kept: Schema.Finite;
|
|
539
542
|
}>;
|
|
540
543
|
export type TopicsSetSubscriptions400 = MalformedRequestError;
|
|
541
544
|
export declare const TopicsSetSubscriptions400: typeof MalformedRequestError;
|
|
@@ -1488,6 +1491,7 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
|
|
|
1488
1491
|
readonly source: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1489
1492
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1490
1493
|
readonly updated: Schema.Finite;
|
|
1494
|
+
readonly kept: Schema.Finite;
|
|
1491
1495
|
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<BillingProviderError, {
|
|
1492
1496
|
readonly _tag: "BillingProviderError";
|
|
1493
1497
|
readonly message: string;
|
|
@@ -16,7 +16,10 @@ const TopicSubscriptionCounts = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
16
16
|
unsubscribed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
|
|
17
17
|
})
|
|
18
18
|
}).annotate({ identifier: "TopicSubscriptionCounts" }))();
|
|
19
|
-
const TopicSetSubscriptionsResult = /* @__PURE__ */ (() => Schema.Struct({
|
|
19
|
+
const TopicSetSubscriptionsResult = /* @__PURE__ */ (() => Schema.Struct({
|
|
20
|
+
updated: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
21
|
+
kept: Schema.Finite.annotate({ description: "Email contacts left unsubscribed because they explicitly unsubscribed from this topic. Only the recipient can resubscribe them, through the preference page or double opt-in." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
|
|
22
|
+
}).annotate({ identifier: "TopicSetSubscriptionsResult" }))();
|
|
20
23
|
const TopicSubscription = /* @__PURE__ */ (() => Schema.Struct({
|
|
21
24
|
contactId: ContactId,
|
|
22
25
|
channel: Schema.Union([
|
|
@@ -298,7 +301,7 @@ var TopicsGroup = class extends HttpApiGroup.make("Topics").add(HttpApiEndpoint.
|
|
|
298
301
|
TopicsSetSubscriptions502.pipe(HttpApiSchema.status(502)),
|
|
299
302
|
TopicsSetSubscriptions504.pipe(HttpApiSchema.status(504))
|
|
300
303
|
]
|
|
301
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topics.setSubscriptions").annotate(OpenApi.Summary, "Set topic subscriptions").annotate(OpenApi.Description, "Upserts explicit subscribed or unsubscribed status for one channel. Each contact is named by ID, email, or phone. New addresses create contacts in the topic's namespace. Repeating the same status is idempotent."), HttpApiEndpoint.get("topicsCheckSubscription", "/v1/topics/check", {
|
|
304
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topics.setSubscriptions").annotate(OpenApi.Summary, "Set topic subscriptions").annotate(OpenApi.Description, "Upserts explicit subscribed or unsubscribed status for one channel. Each contact is named by ID, email, or phone. New addresses create contacts in the topic's namespace. Repeating the same status is idempotent. On email, setting subscribed never overrides a contact's explicit unsubscribe: those contacts are counted in kept, and only the recipient can resubscribe them."), HttpApiEndpoint.get("topicsCheckSubscription", "/v1/topics/check", {
|
|
302
305
|
query: TopicsCheckSubscriptionQuery,
|
|
303
306
|
success: TopicsCheckSubscription200,
|
|
304
307
|
error: [
|
package/dist/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "samva",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.0",
|
|
4
4
|
"description": "TypeScript SDK for the Samva email and WhatsApp API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api-client",
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
"typecheck": "effect-tsgo tsrs --noEmit && effect-tsgo tsrs --noEmit -p codegen/tsconfig.json && effect-tsgo tsrs --noEmit -p tests/tsconfig.json && effect-tsgo tsrs --noEmit --project tests/parity/tsconfig.json"
|
|
238
238
|
},
|
|
239
239
|
"dependencies": {
|
|
240
|
-
"@samva/webhooks": "0.
|
|
240
|
+
"@samva/webhooks": "0.39.0"
|
|
241
241
|
},
|
|
242
242
|
"devDependencies": {
|
|
243
243
|
"@effect/openapi-generator": "^4.1.2",
|