samva 0.55.0 → 0.56.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 +13 -4
- package/dist/client/sdk.gen.js +32 -1
- package/dist/client/types.gen.d.ts +66 -6
- package/dist/effect/descriptors/whats-app.d.ts +10 -0
- package/dist/effect/descriptors/whats-app.js +10 -0
- package/dist/effect/generated/shared.d.ts +4 -4
- package/dist/effect/generated/shared.js +2 -0
- package/dist/effect/generated/template-registrations.d.ts +9 -0
- package/dist/effect/generated/template-registrations.js +2 -1
- package/dist/effect/generated/webhooks.d.ts +19 -19
- package/dist/effect/generated/webhooks.js +4 -0
- package/dist/effect/generated/whats-app.d.ts +176 -1
- package/dist/effect/generated/whats-app.js +33 -3
- package/dist/effect/generated-metadata.d.ts +6 -0
- package/dist/effect/generated-metadata.js +1 -0
- package/dist/effect/webhooks.d.ts +4 -4
- package/dist/effect/whatsapp.d.ts +6 -0
- package/dist/effect/whatsapp.js +3 -1
- package/dist/package.json.js +1 -1
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +5 -0
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as EffectBrand from "effect/Brand";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
|
-
import { ApiKeySecurityMiddleware, BillingProviderError, CampaignId, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, JourneyId, MalformedRequestError, MessageDeliveryId, NamespaceId, PaymentRequiredError, ResourceNotFoundError, TemplateId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError, __SamvaRuntimeNonEmptySensitiveString, __SamvaRuntimeSensitiveString } from "./shared.js";
|
|
4
|
+
import { ApiKeySecurityMiddleware, BillingProviderError, CampaignId, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, JourneyId, MalformedRequestError, MessageDeliveryId, NamespaceId, OrganizationId, PaymentRequiredError, ResourceNotFoundError, TemplateId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError, __SamvaRuntimeNonEmptySensitiveString, __SamvaRuntimeSensitiveString } from "./shared.js";
|
|
5
5
|
export type WhatsAppServiceWindowId = string & EffectBrand.Brand<"WhatsAppServiceWindowId">;
|
|
6
6
|
export declare const WhatsAppServiceWindowId: Schema.brand<Schema.String, "WhatsAppServiceWindowId">;
|
|
7
7
|
export type MoneyAmount = {
|
|
@@ -144,6 +144,7 @@ export type WhatsappListBusinessAccounts200 = {
|
|
|
144
144
|
readonly historySyncStatus: "requested" | "importing" | "completed" | "declined" | null;
|
|
145
145
|
readonly historySyncProgress: number | null;
|
|
146
146
|
readonly isActive: boolean;
|
|
147
|
+
readonly releasedAt?: string;
|
|
147
148
|
readonly createdAt: string;
|
|
148
149
|
readonly updatedAt: string;
|
|
149
150
|
}>;
|
|
@@ -179,6 +180,7 @@ export declare const WhatsappListBusinessAccounts200: Schema.Struct<{
|
|
|
179
180
|
readonly historySyncStatus: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"requested">, Schema.Literal<"importing">, Schema.Literal<"completed">, Schema.Literal<"declined">]>, Schema.Null]>;
|
|
180
181
|
readonly historySyncProgress: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
|
|
181
182
|
readonly isActive: Schema.Boolean;
|
|
183
|
+
readonly releasedAt: Schema.optionalKey<Schema.String>;
|
|
182
184
|
readonly createdAt: Schema.String;
|
|
183
185
|
readonly updatedAt: Schema.String;
|
|
184
186
|
}>>;
|
|
@@ -237,6 +239,7 @@ export type WhatsappConnectBusinessAccount201 = {
|
|
|
237
239
|
readonly historySyncStatus: "requested" | "importing" | "completed" | "declined" | null;
|
|
238
240
|
readonly historySyncProgress: number | null;
|
|
239
241
|
readonly isActive: boolean;
|
|
242
|
+
readonly releasedAt?: string;
|
|
240
243
|
readonly createdAt: string;
|
|
241
244
|
readonly updatedAt: string;
|
|
242
245
|
};
|
|
@@ -269,6 +272,7 @@ export declare const WhatsappConnectBusinessAccount201: Schema.Struct<{
|
|
|
269
272
|
readonly historySyncStatus: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"requested">, Schema.Literal<"importing">, Schema.Literal<"completed">, Schema.Literal<"declined">]>, Schema.Null]>;
|
|
270
273
|
readonly historySyncProgress: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
|
|
271
274
|
readonly isActive: Schema.Boolean;
|
|
275
|
+
readonly releasedAt: Schema.optionalKey<Schema.String>;
|
|
272
276
|
readonly createdAt: Schema.String;
|
|
273
277
|
readonly updatedAt: Schema.String;
|
|
274
278
|
}>;
|
|
@@ -327,6 +331,7 @@ export type WhatsappGetBusinessAccount200 = {
|
|
|
327
331
|
readonly historySyncStatus: "requested" | "importing" | "completed" | "declined" | null;
|
|
328
332
|
readonly historySyncProgress: number | null;
|
|
329
333
|
readonly isActive: boolean;
|
|
334
|
+
readonly releasedAt?: string;
|
|
330
335
|
readonly createdAt: string;
|
|
331
336
|
readonly updatedAt: string;
|
|
332
337
|
};
|
|
@@ -359,6 +364,7 @@ export declare const WhatsappGetBusinessAccount200: Schema.Struct<{
|
|
|
359
364
|
readonly historySyncStatus: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"requested">, Schema.Literal<"importing">, Schema.Literal<"completed">, Schema.Literal<"declined">]>, Schema.Null]>;
|
|
360
365
|
readonly historySyncProgress: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
|
|
361
366
|
readonly isActive: Schema.Boolean;
|
|
367
|
+
readonly releasedAt: Schema.optionalKey<Schema.String>;
|
|
362
368
|
readonly createdAt: Schema.String;
|
|
363
369
|
readonly updatedAt: Schema.String;
|
|
364
370
|
}>;
|
|
@@ -445,6 +451,7 @@ export type WhatsappUpdateBusinessAccount200 = {
|
|
|
445
451
|
readonly historySyncStatus: "requested" | "importing" | "completed" | "declined" | null;
|
|
446
452
|
readonly historySyncProgress: number | null;
|
|
447
453
|
readonly isActive: boolean;
|
|
454
|
+
readonly releasedAt?: string;
|
|
448
455
|
readonly createdAt: string;
|
|
449
456
|
readonly updatedAt: string;
|
|
450
457
|
};
|
|
@@ -477,6 +484,7 @@ export declare const WhatsappUpdateBusinessAccount200: Schema.Struct<{
|
|
|
477
484
|
readonly historySyncStatus: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"requested">, Schema.Literal<"importing">, Schema.Literal<"completed">, Schema.Literal<"declined">]>, Schema.Null]>;
|
|
478
485
|
readonly historySyncProgress: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
|
|
479
486
|
readonly isActive: Schema.Boolean;
|
|
487
|
+
readonly releasedAt: Schema.optionalKey<Schema.String>;
|
|
480
488
|
readonly createdAt: Schema.String;
|
|
481
489
|
readonly updatedAt: Schema.String;
|
|
482
490
|
}>;
|
|
@@ -494,6 +502,40 @@ export type WhatsappUpdateBusinessAccount500 = InternalError;
|
|
|
494
502
|
export declare const WhatsappUpdateBusinessAccount500: typeof InternalError;
|
|
495
503
|
export type WhatsappUpdateBusinessAccount504 = GatewayTimeoutError;
|
|
496
504
|
export declare const WhatsappUpdateBusinessAccount504: typeof GatewayTimeoutError;
|
|
505
|
+
export type WhatsappReleaseBusinessAccountPathParams = {
|
|
506
|
+
readonly accountId: WhatsAppBusinessAccountId;
|
|
507
|
+
};
|
|
508
|
+
export declare const WhatsappReleaseBusinessAccountPathParams: Schema.Struct<{
|
|
509
|
+
readonly accountId: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
|
|
510
|
+
}>;
|
|
511
|
+
export type WhatsappReleaseBusinessAccountRequestJson = {
|
|
512
|
+
readonly targetOrganizationId: OrganizationId;
|
|
513
|
+
};
|
|
514
|
+
export declare const WhatsappReleaseBusinessAccountRequestJson: Schema.Struct<{
|
|
515
|
+
readonly targetOrganizationId: Schema.brand<Schema.String, "OrganizationId">;
|
|
516
|
+
}>;
|
|
517
|
+
export type WhatsappReleaseBusinessAccount200 = {
|
|
518
|
+
readonly success: true;
|
|
519
|
+
};
|
|
520
|
+
export declare const WhatsappReleaseBusinessAccount200: Schema.Struct<{
|
|
521
|
+
readonly success: Schema.Literal<true>;
|
|
522
|
+
}>;
|
|
523
|
+
export type WhatsappReleaseBusinessAccount400 = MalformedRequestError;
|
|
524
|
+
export declare const WhatsappReleaseBusinessAccount400: typeof MalformedRequestError;
|
|
525
|
+
export type WhatsappReleaseBusinessAccount401 = UnauthorizedError;
|
|
526
|
+
export declare const WhatsappReleaseBusinessAccount401: typeof UnauthorizedError;
|
|
527
|
+
export type WhatsappReleaseBusinessAccount403 = ForbiddenError;
|
|
528
|
+
export declare const WhatsappReleaseBusinessAccount403: typeof ForbiddenError;
|
|
529
|
+
export type WhatsappReleaseBusinessAccount404 = ResourceNotFoundError;
|
|
530
|
+
export declare const WhatsappReleaseBusinessAccount404: typeof ResourceNotFoundError;
|
|
531
|
+
export type WhatsappReleaseBusinessAccount409 = ConflictError;
|
|
532
|
+
export declare const WhatsappReleaseBusinessAccount409: typeof ConflictError;
|
|
533
|
+
export type WhatsappReleaseBusinessAccount422 = ValidationError;
|
|
534
|
+
export declare const WhatsappReleaseBusinessAccount422: typeof ValidationError;
|
|
535
|
+
export type WhatsappReleaseBusinessAccount500 = InternalError;
|
|
536
|
+
export declare const WhatsappReleaseBusinessAccount500: typeof InternalError;
|
|
537
|
+
export type WhatsappReleaseBusinessAccount504 = GatewayTimeoutError;
|
|
538
|
+
export declare const WhatsappReleaseBusinessAccount504: typeof GatewayTimeoutError;
|
|
497
539
|
export type WhatsappSetDefaultBusinessAccountPathParams = {
|
|
498
540
|
readonly accountId: WhatsAppBusinessAccountId;
|
|
499
541
|
};
|
|
@@ -529,6 +571,7 @@ export type WhatsappSetDefaultBusinessAccount200 = {
|
|
|
529
571
|
readonly historySyncStatus: "requested" | "importing" | "completed" | "declined" | null;
|
|
530
572
|
readonly historySyncProgress: number | null;
|
|
531
573
|
readonly isActive: boolean;
|
|
574
|
+
readonly releasedAt?: string;
|
|
532
575
|
readonly createdAt: string;
|
|
533
576
|
readonly updatedAt: string;
|
|
534
577
|
};
|
|
@@ -561,6 +604,7 @@ export declare const WhatsappSetDefaultBusinessAccount200: Schema.Struct<{
|
|
|
561
604
|
readonly historySyncStatus: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"requested">, Schema.Literal<"importing">, Schema.Literal<"completed">, Schema.Literal<"declined">]>, Schema.Null]>;
|
|
562
605
|
readonly historySyncProgress: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
|
|
563
606
|
readonly isActive: Schema.Boolean;
|
|
607
|
+
readonly releasedAt: Schema.optionalKey<Schema.String>;
|
|
564
608
|
readonly createdAt: Schema.String;
|
|
565
609
|
readonly updatedAt: Schema.String;
|
|
566
610
|
}>;
|
|
@@ -843,6 +887,7 @@ declare const WhatsAppGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp", HttpApiE
|
|
|
843
887
|
readonly historySyncStatus: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"requested">, Schema.Literal<"importing">, Schema.Literal<"completed">, Schema.Literal<"declined">]>, Schema.Null]>;
|
|
844
888
|
readonly historySyncProgress: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
|
|
845
889
|
readonly isActive: Schema.Boolean;
|
|
890
|
+
readonly releasedAt: Schema.optionalKey<Schema.String>;
|
|
846
891
|
readonly createdAt: Schema.String;
|
|
847
892
|
readonly updatedAt: Schema.String;
|
|
848
893
|
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof InternalError, typeof CredentialsError]> | Schema.Union<readonly [typeof WhatsAppChannelError, typeof BillingProviderError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
@@ -1124,6 +1169,7 @@ declare const WhatsAppGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp", HttpApiE
|
|
|
1124
1169
|
readonly historySyncStatus: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"requested">, Schema.Literal<"importing">, Schema.Literal<"completed">, Schema.Literal<"declined">]>, Schema.Null]>;
|
|
1125
1170
|
readonly historySyncProgress: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
|
|
1126
1171
|
readonly isActive: Schema.Boolean;
|
|
1172
|
+
readonly releasedAt: Schema.optionalKey<Schema.String>;
|
|
1127
1173
|
readonly createdAt: Schema.String;
|
|
1128
1174
|
readonly updatedAt: Schema.String;
|
|
1129
1175
|
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
@@ -1789,6 +1835,7 @@ declare const WhatsAppGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp", HttpApiE
|
|
|
1789
1835
|
readonly historySyncStatus: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"requested">, Schema.Literal<"importing">, Schema.Literal<"completed">, Schema.Literal<"declined">]>, Schema.Null]>;
|
|
1790
1836
|
readonly historySyncProgress: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
|
|
1791
1837
|
readonly isActive: Schema.Boolean;
|
|
1838
|
+
readonly releasedAt: Schema.optionalKey<Schema.String>;
|
|
1792
1839
|
readonly createdAt: Schema.String;
|
|
1793
1840
|
readonly updatedAt: Schema.String;
|
|
1794
1841
|
}>>;
|
|
@@ -1873,6 +1920,132 @@ declare const WhatsAppGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp", HttpApiE
|
|
|
1873
1920
|
readonly _tag: Schema.tag<"ValidationError">;
|
|
1874
1921
|
readonly message: Schema.String;
|
|
1875
1922
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1923
|
+
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"whatsappReleaseBusinessAccount", "POST", "/v1/whatsapp/business-accounts/:accountId/release", Schema.toCodecStringTree<Schema.Struct<{
|
|
1924
|
+
readonly accountId: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
|
|
1925
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1926
|
+
readonly targetOrganizationId: Schema.brand<Schema.String, "OrganizationId">;
|
|
1927
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1928
|
+
readonly success: Schema.Literal<true>;
|
|
1929
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
1930
|
+
readonly _tag: "ConflictError";
|
|
1931
|
+
readonly message: string;
|
|
1932
|
+
readonly resource: string;
|
|
1933
|
+
readonly id?: string | null;
|
|
1934
|
+
}, readonly [Schema.Struct<{
|
|
1935
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
1936
|
+
readonly message: Schema.String;
|
|
1937
|
+
readonly resource: Schema.String;
|
|
1938
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1939
|
+
}>], {
|
|
1940
|
+
readonly _tag: "ConflictError";
|
|
1941
|
+
readonly message: string;
|
|
1942
|
+
readonly resource: string;
|
|
1943
|
+
readonly id?: string | null;
|
|
1944
|
+
}>, Schema.Struct<{
|
|
1945
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
1946
|
+
readonly message: Schema.String;
|
|
1947
|
+
readonly resource: Schema.String;
|
|
1948
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1949
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
1950
|
+
readonly _tag: "ForbiddenError";
|
|
1951
|
+
readonly message: string;
|
|
1952
|
+
}, readonly [Schema.Struct<{
|
|
1953
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1954
|
+
readonly message: Schema.String;
|
|
1955
|
+
}>], {
|
|
1956
|
+
readonly _tag: "ForbiddenError";
|
|
1957
|
+
readonly message: string;
|
|
1958
|
+
}>, Schema.Struct<{
|
|
1959
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1960
|
+
readonly message: Schema.String;
|
|
1961
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
1962
|
+
readonly _tag: "GatewayTimeoutError";
|
|
1963
|
+
readonly message: string;
|
|
1964
|
+
readonly retryAfterSeconds: number;
|
|
1965
|
+
}, readonly [Schema.Struct<{
|
|
1966
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1967
|
+
readonly message: Schema.String;
|
|
1968
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1969
|
+
}>], {
|
|
1970
|
+
readonly _tag: "GatewayTimeoutError";
|
|
1971
|
+
readonly message: string;
|
|
1972
|
+
readonly retryAfterSeconds: number;
|
|
1973
|
+
}>, Schema.Struct<{
|
|
1974
|
+
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
1975
|
+
readonly message: Schema.String;
|
|
1976
|
+
readonly retryAfterSeconds: Schema.Finite;
|
|
1977
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
|
|
1978
|
+
readonly _tag: "MalformedRequestError";
|
|
1979
|
+
readonly message: string;
|
|
1980
|
+
readonly fields: {
|
|
1981
|
+
readonly [x: string]: readonly string[];
|
|
1982
|
+
};
|
|
1983
|
+
}, readonly [Schema.Struct<{
|
|
1984
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
1985
|
+
readonly message: Schema.String;
|
|
1986
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
1987
|
+
}>], {
|
|
1988
|
+
readonly _tag: "MalformedRequestError";
|
|
1989
|
+
readonly message: string;
|
|
1990
|
+
readonly fields: {
|
|
1991
|
+
readonly [x: string]: readonly string[];
|
|
1992
|
+
};
|
|
1993
|
+
}>, Schema.Struct<{
|
|
1994
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
1995
|
+
readonly message: Schema.String;
|
|
1996
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
1997
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
1998
|
+
readonly _tag: "ResourceNotFoundError";
|
|
1999
|
+
readonly resource: string;
|
|
2000
|
+
readonly id: string;
|
|
2001
|
+
readonly message: string;
|
|
2002
|
+
}, readonly [Schema.Struct<{
|
|
2003
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
2004
|
+
readonly resource: Schema.String;
|
|
2005
|
+
readonly id: Schema.String;
|
|
2006
|
+
readonly message: Schema.String;
|
|
2007
|
+
}>], {
|
|
2008
|
+
readonly _tag: "ResourceNotFoundError";
|
|
2009
|
+
readonly resource: string;
|
|
2010
|
+
readonly id: string;
|
|
2011
|
+
readonly message: string;
|
|
2012
|
+
}>, Schema.Struct<{
|
|
2013
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
2014
|
+
readonly resource: Schema.String;
|
|
2015
|
+
readonly id: Schema.String;
|
|
2016
|
+
readonly message: Schema.String;
|
|
2017
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
2018
|
+
readonly _tag: "UnauthorizedError";
|
|
2019
|
+
readonly message: string;
|
|
2020
|
+
}, readonly [Schema.Struct<{
|
|
2021
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
2022
|
+
readonly message: Schema.String;
|
|
2023
|
+
}>], {
|
|
2024
|
+
readonly _tag: "UnauthorizedError";
|
|
2025
|
+
readonly message: string;
|
|
2026
|
+
}>, Schema.Struct<{
|
|
2027
|
+
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
2028
|
+
readonly message: Schema.String;
|
|
2029
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
2030
|
+
readonly _tag: "ValidationError";
|
|
2031
|
+
readonly message: string;
|
|
2032
|
+
readonly fields?: {
|
|
2033
|
+
readonly [x: string]: readonly string[];
|
|
2034
|
+
} | null;
|
|
2035
|
+
}, readonly [Schema.Struct<{
|
|
2036
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
2037
|
+
readonly message: Schema.String;
|
|
2038
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
2039
|
+
}>], {
|
|
2040
|
+
readonly _tag: "ValidationError";
|
|
2041
|
+
readonly message: string;
|
|
2042
|
+
readonly fields?: {
|
|
2043
|
+
readonly [x: string]: readonly string[];
|
|
2044
|
+
} | null;
|
|
2045
|
+
}>, Schema.Struct<{
|
|
2046
|
+
readonly _tag: Schema.tag<"ValidationError">;
|
|
2047
|
+
readonly message: Schema.String;
|
|
2048
|
+
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1876
2049
|
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"whatsappSetDefaultBusinessAccount", "POST", "/v1/whatsapp/business-accounts/:accountId/set-default", Schema.toCodecStringTree<Schema.Struct<{
|
|
1877
2050
|
readonly accountId: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
|
|
1878
2051
|
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
@@ -1904,6 +2077,7 @@ declare const WhatsAppGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp", HttpApiE
|
|
|
1904
2077
|
readonly historySyncStatus: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"requested">, Schema.Literal<"importing">, Schema.Literal<"completed">, Schema.Literal<"declined">]>, Schema.Null]>;
|
|
1905
2078
|
readonly historySyncProgress: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
|
|
1906
2079
|
readonly isActive: Schema.Boolean;
|
|
2080
|
+
readonly releasedAt: Schema.optionalKey<Schema.String>;
|
|
1907
2081
|
readonly createdAt: Schema.String;
|
|
1908
2082
|
readonly updatedAt: Schema.String;
|
|
1909
2083
|
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
@@ -2178,6 +2352,7 @@ declare const WhatsAppGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp", HttpApiE
|
|
|
2178
2352
|
readonly historySyncStatus: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"requested">, Schema.Literal<"importing">, Schema.Literal<"completed">, Schema.Literal<"declined">]>, Schema.Null]>;
|
|
2179
2353
|
readonly historySyncProgress: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
|
|
2180
2354
|
readonly isActive: Schema.Boolean;
|
|
2355
|
+
readonly releasedAt: Schema.optionalKey<Schema.String>;
|
|
2181
2356
|
readonly createdAt: Schema.String;
|
|
2182
2357
|
readonly updatedAt: Schema.String;
|
|
2183
2358
|
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NonEmptySensitiveString, SensitiveString } from "../runtime.js";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
|
-
import { ApiKeySecurityMiddleware, BillingProviderError, CampaignId, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, JourneyId, MalformedRequestError, MessageDeliveryId, NamespaceId, PaymentRequiredError, ResourceNotFoundError, TemplateId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError } from "./shared.js";
|
|
4
|
+
import { ApiKeySecurityMiddleware, BillingProviderError, CampaignId, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, JourneyId, MalformedRequestError, MessageDeliveryId, NamespaceId, OrganizationId, PaymentRequiredError, ResourceNotFoundError, TemplateId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError } from "./shared.js";
|
|
5
5
|
// src/effect/generated/whats-app.ts
|
|
6
6
|
const WhatsAppServiceWindowId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^wasw_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
7
7
|
expected: "a string matching the RegExp ^wasw_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
@@ -107,6 +107,7 @@ const WhatsappListBusinessAccounts200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
107
107
|
]), Schema.Null]),
|
|
108
108
|
historySyncProgress: Schema.Union([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(100).annotate({ expected: "a value less than or equal to 100" })), Schema.Null]),
|
|
109
109
|
isActive: Schema.Boolean,
|
|
110
|
+
releasedAt: Schema.optionalKey(Schema.String),
|
|
110
111
|
createdAt: Schema.String,
|
|
111
112
|
updatedAt: Schema.String
|
|
112
113
|
})),
|
|
@@ -177,6 +178,7 @@ const WhatsappConnectBusinessAccount201 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
177
178
|
]), Schema.Null]),
|
|
178
179
|
historySyncProgress: Schema.Union([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(100).annotate({ expected: "a value less than or equal to 100" })), Schema.Null]),
|
|
179
180
|
isActive: Schema.Boolean,
|
|
181
|
+
releasedAt: Schema.optionalKey(Schema.String),
|
|
180
182
|
createdAt: Schema.String,
|
|
181
183
|
updatedAt: Schema.String
|
|
182
184
|
}))();
|
|
@@ -244,6 +246,7 @@ const WhatsappGetBusinessAccount200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
244
246
|
]), Schema.Null]),
|
|
245
247
|
historySyncProgress: Schema.Union([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(100).annotate({ expected: "a value less than or equal to 100" })), Schema.Null]),
|
|
246
248
|
isActive: Schema.Boolean,
|
|
249
|
+
releasedAt: Schema.optionalKey(Schema.String),
|
|
247
250
|
createdAt: Schema.String,
|
|
248
251
|
updatedAt: Schema.String
|
|
249
252
|
}))();
|
|
@@ -321,6 +324,7 @@ const WhatsappUpdateBusinessAccount200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
321
324
|
]), Schema.Null]),
|
|
322
325
|
historySyncProgress: Schema.Union([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(100).annotate({ expected: "a value less than or equal to 100" })), Schema.Null]),
|
|
323
326
|
isActive: Schema.Boolean,
|
|
327
|
+
releasedAt: Schema.optionalKey(Schema.String),
|
|
324
328
|
createdAt: Schema.String,
|
|
325
329
|
updatedAt: Schema.String
|
|
326
330
|
}))();
|
|
@@ -331,6 +335,17 @@ const WhatsappUpdateBusinessAccount404 = ResourceNotFoundError;
|
|
|
331
335
|
const WhatsappUpdateBusinessAccount422 = ValidationError;
|
|
332
336
|
const WhatsappUpdateBusinessAccount500 = InternalError;
|
|
333
337
|
const WhatsappUpdateBusinessAccount504 = GatewayTimeoutError;
|
|
338
|
+
const WhatsappReleaseBusinessAccountPathParams = /* @__PURE__ */ (() => Schema.Struct({ accountId: WhatsAppBusinessAccountId }))();
|
|
339
|
+
const WhatsappReleaseBusinessAccountRequestJson = /* @__PURE__ */ (() => Schema.Struct({ targetOrganizationId: OrganizationId }))();
|
|
340
|
+
const WhatsappReleaseBusinessAccount200 = /* @__PURE__ */ (() => Schema.Struct({ success: Schema.Literal(true) }))();
|
|
341
|
+
const WhatsappReleaseBusinessAccount400 = MalformedRequestError;
|
|
342
|
+
const WhatsappReleaseBusinessAccount401 = UnauthorizedError;
|
|
343
|
+
const WhatsappReleaseBusinessAccount403 = ForbiddenError;
|
|
344
|
+
const WhatsappReleaseBusinessAccount404 = ResourceNotFoundError;
|
|
345
|
+
const WhatsappReleaseBusinessAccount409 = ConflictError;
|
|
346
|
+
const WhatsappReleaseBusinessAccount422 = ValidationError;
|
|
347
|
+
const WhatsappReleaseBusinessAccount500 = InternalError;
|
|
348
|
+
const WhatsappReleaseBusinessAccount504 = GatewayTimeoutError;
|
|
334
349
|
const WhatsappSetDefaultBusinessAccountPathParams = /* @__PURE__ */ (() => Schema.Struct({ accountId: WhatsAppBusinessAccountId }))();
|
|
335
350
|
const WhatsappSetDefaultBusinessAccount200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
336
351
|
id: WhatsAppBusinessAccountId,
|
|
@@ -385,6 +400,7 @@ const WhatsappSetDefaultBusinessAccount200 = /* @__PURE__ */ (() => Schema.Struc
|
|
|
385
400
|
]), Schema.Null]),
|
|
386
401
|
historySyncProgress: Schema.Union([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(100).annotate({ expected: "a value less than or equal to 100" })), Schema.Null]),
|
|
387
402
|
isActive: Schema.Boolean,
|
|
403
|
+
releasedAt: Schema.optionalKey(Schema.String),
|
|
388
404
|
createdAt: Schema.String,
|
|
389
405
|
updatedAt: Schema.String
|
|
390
406
|
}))();
|
|
@@ -563,7 +579,21 @@ var WhatsAppGroup = class extends HttpApiGroup.make("WhatsApp").add(HttpApiEndpo
|
|
|
563
579
|
WhatsappUpdateBusinessAccount500,
|
|
564
580
|
WhatsappUpdateBusinessAccount504.pipe(HttpApiSchema.status(504))
|
|
565
581
|
]
|
|
566
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.updateBusinessAccount").annotate(OpenApi.Summary, "Update a WhatsApp business account").annotate(OpenApi.Description, "Updates the display name or webhook settings of a connected WhatsApp business account."), HttpApiEndpoint.post("
|
|
582
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.updateBusinessAccount").annotate(OpenApi.Summary, "Update a WhatsApp business account").annotate(OpenApi.Description, "Updates the display name or webhook settings of a connected WhatsApp business account."), HttpApiEndpoint.post("whatsappReleaseBusinessAccount", "/v1/whatsapp/business-accounts/:accountId/release", {
|
|
583
|
+
params: WhatsappReleaseBusinessAccountPathParams,
|
|
584
|
+
payload: WhatsappReleaseBusinessAccountRequestJson,
|
|
585
|
+
success: WhatsappReleaseBusinessAccount200,
|
|
586
|
+
error: [
|
|
587
|
+
WhatsappReleaseBusinessAccount400.pipe(HttpApiSchema.status(400)),
|
|
588
|
+
WhatsappReleaseBusinessAccount401.pipe(HttpApiSchema.status(401)),
|
|
589
|
+
WhatsappReleaseBusinessAccount403.pipe(HttpApiSchema.status(403)),
|
|
590
|
+
WhatsappReleaseBusinessAccount404.pipe(HttpApiSchema.status(404)),
|
|
591
|
+
WhatsappReleaseBusinessAccount409.pipe(HttpApiSchema.status(409)),
|
|
592
|
+
WhatsappReleaseBusinessAccount422.pipe(HttpApiSchema.status(422)),
|
|
593
|
+
WhatsappReleaseBusinessAccount500,
|
|
594
|
+
WhatsappReleaseBusinessAccount504.pipe(HttpApiSchema.status(504))
|
|
595
|
+
]
|
|
596
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.releaseBusinessAccount").annotate(OpenApi.Summary, "Release a WhatsApp number to another organization").annotate(OpenApi.Description, "Reserves a disconnected WhatsApp number for the named Samva organization. The recipient claims it through fresh Meta Embedded Signup for the same WhatsApp Business Account, Meta phone number ID, and E.164 number. The old account remains in history and cannot reconnect."), HttpApiEndpoint.post("whatsappSetDefaultBusinessAccount", "/v1/whatsapp/business-accounts/:accountId/set-default", {
|
|
567
597
|
params: WhatsappSetDefaultBusinessAccountPathParams,
|
|
568
598
|
success: WhatsappSetDefaultBusinessAccount200,
|
|
569
599
|
error: [
|
|
@@ -647,6 +677,6 @@ var WhatsAppGroup = class extends HttpApiGroup.make("WhatsApp").add(HttpApiEndpo
|
|
|
647
677
|
WhatsappGetTemplateStats504.pipe(HttpApiSchema.status(504))
|
|
648
678
|
]
|
|
649
679
|
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsapp.getTemplateStats").annotate(OpenApi.Summary, "Get WhatsApp template stats").annotate(OpenApi.Description, "Returns sent, delivered, read, and failed counts and Meta's estimated cost for each WhatsApp template, split by what sent it: a campaign, a journey step, or a direct send. Filter by template, campaign, journey, or the time the message was created.")).annotate(OpenApi.Description, "WhatsApp Cloud API messaging, service windows, and business accounts") {};
|
|
650
|
-
export { MoneyAmount, WhatsAppGroup, WhatsAppServiceWindowId, WhatsAppTemplateStats, WhatsAppTemplateStatsRow, WhatsAppTemplateStatsSource, WhatsappConnectBusinessAccount201, WhatsappConnectBusinessAccount400, WhatsappConnectBusinessAccount401, WhatsappConnectBusinessAccount402, WhatsappConnectBusinessAccount403, WhatsappConnectBusinessAccount404, WhatsappConnectBusinessAccount409, WhatsappConnectBusinessAccount422, WhatsappConnectBusinessAccount500, WhatsappConnectBusinessAccount502, WhatsappConnectBusinessAccount504, WhatsappConnectBusinessAccountRequestJson, WhatsappDisconnectBusinessAccount200, WhatsappDisconnectBusinessAccount400, WhatsappDisconnectBusinessAccount401, WhatsappDisconnectBusinessAccount403, WhatsappDisconnectBusinessAccount404, WhatsappDisconnectBusinessAccount422, WhatsappDisconnectBusinessAccount500, WhatsappDisconnectBusinessAccount504, WhatsappDisconnectBusinessAccountPathParams, WhatsappGetBusinessAccount200, WhatsappGetBusinessAccount400, WhatsappGetBusinessAccount401, WhatsappGetBusinessAccount403, WhatsappGetBusinessAccount404, WhatsappGetBusinessAccount422, WhatsappGetBusinessAccount500, WhatsappGetBusinessAccount504, WhatsappGetBusinessAccountPathParams, WhatsappGetMediaDownloadUrl200, WhatsappGetMediaDownloadUrl400, WhatsappGetMediaDownloadUrl401, WhatsappGetMediaDownloadUrl403, WhatsappGetMediaDownloadUrl404, WhatsappGetMediaDownloadUrl422, WhatsappGetMediaDownloadUrl500, WhatsappGetMediaDownloadUrl504, WhatsappGetMediaDownloadUrlPathParams, WhatsappGetServiceWindowBilling200, WhatsappGetServiceWindowBilling400, WhatsappGetServiceWindowBilling401, WhatsappGetServiceWindowBilling403, WhatsappGetServiceWindowBilling404, WhatsappGetServiceWindowBilling422, WhatsappGetServiceWindowBilling500, WhatsappGetServiceWindowBilling504, WhatsappGetServiceWindowBillingQuery, WhatsappGetServiceWindowStatus200, WhatsappGetServiceWindowStatus400, WhatsappGetServiceWindowStatus401, WhatsappGetServiceWindowStatus403, WhatsappGetServiceWindowStatus404, WhatsappGetServiceWindowStatus422, WhatsappGetServiceWindowStatus500, WhatsappGetServiceWindowStatus504, WhatsappGetServiceWindowStatusQuery, WhatsappGetStats200, WhatsappGetStats400, WhatsappGetStats401, WhatsappGetStats403, WhatsappGetStats422, WhatsappGetStats500, WhatsappGetStats504, WhatsappGetStatsQuery, WhatsappGetTemplateStats200, WhatsappGetTemplateStats400, WhatsappGetTemplateStats401, WhatsappGetTemplateStats403, WhatsappGetTemplateStats422, WhatsappGetTemplateStats500, WhatsappGetTemplateStats504, WhatsappGetTemplateStatsQuery, WhatsappListBusinessAccounts200, WhatsappListBusinessAccounts400, WhatsappListBusinessAccounts401, WhatsappListBusinessAccounts403, WhatsappListBusinessAccounts422, WhatsappListBusinessAccounts500, WhatsappListBusinessAccounts504, WhatsappListBusinessAccountsQuery, WhatsappSetDefaultBusinessAccount200, WhatsappSetDefaultBusinessAccount400, WhatsappSetDefaultBusinessAccount401, WhatsappSetDefaultBusinessAccount403, WhatsappSetDefaultBusinessAccount404, WhatsappSetDefaultBusinessAccount422, WhatsappSetDefaultBusinessAccount500, WhatsappSetDefaultBusinessAccount504, WhatsappSetDefaultBusinessAccountPathParams, WhatsappSyncAccountStatus200, WhatsappSyncAccountStatus400, WhatsappSyncAccountStatus401, WhatsappSyncAccountStatus403, WhatsappSyncAccountStatus404, WhatsappSyncAccountStatus422, WhatsappSyncAccountStatus500, WhatsappSyncAccountStatus502, WhatsappSyncAccountStatus504, WhatsappSyncAccountStatusPathParams, WhatsappUpdateBusinessAccount200, WhatsappUpdateBusinessAccount400, WhatsappUpdateBusinessAccount401, WhatsappUpdateBusinessAccount403, WhatsappUpdateBusinessAccount404, WhatsappUpdateBusinessAccount422, WhatsappUpdateBusinessAccount500, WhatsappUpdateBusinessAccount504, WhatsappUpdateBusinessAccountPathParams, WhatsappUpdateBusinessAccountRequestJson };
|
|
680
|
+
export { MoneyAmount, WhatsAppGroup, WhatsAppServiceWindowId, WhatsAppTemplateStats, WhatsAppTemplateStatsRow, WhatsAppTemplateStatsSource, WhatsappConnectBusinessAccount201, WhatsappConnectBusinessAccount400, WhatsappConnectBusinessAccount401, WhatsappConnectBusinessAccount402, WhatsappConnectBusinessAccount403, WhatsappConnectBusinessAccount404, WhatsappConnectBusinessAccount409, WhatsappConnectBusinessAccount422, WhatsappConnectBusinessAccount500, WhatsappConnectBusinessAccount502, WhatsappConnectBusinessAccount504, WhatsappConnectBusinessAccountRequestJson, WhatsappDisconnectBusinessAccount200, WhatsappDisconnectBusinessAccount400, WhatsappDisconnectBusinessAccount401, WhatsappDisconnectBusinessAccount403, WhatsappDisconnectBusinessAccount404, WhatsappDisconnectBusinessAccount422, WhatsappDisconnectBusinessAccount500, WhatsappDisconnectBusinessAccount504, WhatsappDisconnectBusinessAccountPathParams, WhatsappGetBusinessAccount200, WhatsappGetBusinessAccount400, WhatsappGetBusinessAccount401, WhatsappGetBusinessAccount403, WhatsappGetBusinessAccount404, WhatsappGetBusinessAccount422, WhatsappGetBusinessAccount500, WhatsappGetBusinessAccount504, WhatsappGetBusinessAccountPathParams, WhatsappGetMediaDownloadUrl200, WhatsappGetMediaDownloadUrl400, WhatsappGetMediaDownloadUrl401, WhatsappGetMediaDownloadUrl403, WhatsappGetMediaDownloadUrl404, WhatsappGetMediaDownloadUrl422, WhatsappGetMediaDownloadUrl500, WhatsappGetMediaDownloadUrl504, WhatsappGetMediaDownloadUrlPathParams, WhatsappGetServiceWindowBilling200, WhatsappGetServiceWindowBilling400, WhatsappGetServiceWindowBilling401, WhatsappGetServiceWindowBilling403, WhatsappGetServiceWindowBilling404, WhatsappGetServiceWindowBilling422, WhatsappGetServiceWindowBilling500, WhatsappGetServiceWindowBilling504, WhatsappGetServiceWindowBillingQuery, WhatsappGetServiceWindowStatus200, WhatsappGetServiceWindowStatus400, WhatsappGetServiceWindowStatus401, WhatsappGetServiceWindowStatus403, WhatsappGetServiceWindowStatus404, WhatsappGetServiceWindowStatus422, WhatsappGetServiceWindowStatus500, WhatsappGetServiceWindowStatus504, WhatsappGetServiceWindowStatusQuery, WhatsappGetStats200, WhatsappGetStats400, WhatsappGetStats401, WhatsappGetStats403, WhatsappGetStats422, WhatsappGetStats500, WhatsappGetStats504, WhatsappGetStatsQuery, WhatsappGetTemplateStats200, WhatsappGetTemplateStats400, WhatsappGetTemplateStats401, WhatsappGetTemplateStats403, WhatsappGetTemplateStats422, WhatsappGetTemplateStats500, WhatsappGetTemplateStats504, WhatsappGetTemplateStatsQuery, WhatsappListBusinessAccounts200, WhatsappListBusinessAccounts400, WhatsappListBusinessAccounts401, WhatsappListBusinessAccounts403, WhatsappListBusinessAccounts422, WhatsappListBusinessAccounts500, WhatsappListBusinessAccounts504, WhatsappListBusinessAccountsQuery, WhatsappReleaseBusinessAccount200, WhatsappReleaseBusinessAccount400, WhatsappReleaseBusinessAccount401, WhatsappReleaseBusinessAccount403, WhatsappReleaseBusinessAccount404, WhatsappReleaseBusinessAccount409, WhatsappReleaseBusinessAccount422, WhatsappReleaseBusinessAccount500, WhatsappReleaseBusinessAccount504, WhatsappReleaseBusinessAccountPathParams, WhatsappReleaseBusinessAccountRequestJson, WhatsappSetDefaultBusinessAccount200, WhatsappSetDefaultBusinessAccount400, WhatsappSetDefaultBusinessAccount401, WhatsappSetDefaultBusinessAccount403, WhatsappSetDefaultBusinessAccount404, WhatsappSetDefaultBusinessAccount422, WhatsappSetDefaultBusinessAccount500, WhatsappSetDefaultBusinessAccount504, WhatsappSetDefaultBusinessAccountPathParams, WhatsappSyncAccountStatus200, WhatsappSyncAccountStatus400, WhatsappSyncAccountStatus401, WhatsappSyncAccountStatus403, WhatsappSyncAccountStatus404, WhatsappSyncAccountStatus422, WhatsappSyncAccountStatus500, WhatsappSyncAccountStatus502, WhatsappSyncAccountStatus504, WhatsappSyncAccountStatusPathParams, WhatsappUpdateBusinessAccount200, WhatsappUpdateBusinessAccount400, WhatsappUpdateBusinessAccount401, WhatsappUpdateBusinessAccount403, WhatsappUpdateBusinessAccount404, WhatsappUpdateBusinessAccount422, WhatsappUpdateBusinessAccount500, WhatsappUpdateBusinessAccount504, WhatsappUpdateBusinessAccountPathParams, WhatsappUpdateBusinessAccountRequestJson };
|
|
651
681
|
|
|
652
682
|
//# sourceMappingURL=whats-app.js.map
|
|
@@ -2896,6 +2896,12 @@ export declare const SamvaOperations: {
|
|
|
2896
2896
|
readonly idempotent: false;
|
|
2897
2897
|
readonly paginated: false;
|
|
2898
2898
|
};
|
|
2899
|
+
readonly whatsappReleaseBusinessAccount: {
|
|
2900
|
+
readonly group: "WhatsApp";
|
|
2901
|
+
readonly method: "POST";
|
|
2902
|
+
readonly idempotent: false;
|
|
2903
|
+
readonly paginated: false;
|
|
2904
|
+
};
|
|
2899
2905
|
readonly whatsappSetDefaultBusinessAccount: {
|
|
2900
2906
|
readonly group: "WhatsApp";
|
|
2901
2907
|
readonly method: "POST";
|
|
@@ -1619,6 +1619,7 @@ const SamvaOperations = {
|
|
|
1619
1619
|
whatsappGetBusinessAccount: operationMetadata154,
|
|
1620
1620
|
whatsappDisconnectBusinessAccount: operationMetadata155,
|
|
1621
1621
|
whatsappUpdateBusinessAccount: operationMetadata156,
|
|
1622
|
+
whatsappReleaseBusinessAccount: operationMetadata153,
|
|
1622
1623
|
whatsappSetDefaultBusinessAccount: operationMetadata153,
|
|
1623
1624
|
whatsappSyncAccountStatus: operationMetadata153,
|
|
1624
1625
|
whatsappFlowsList: operationMetadata157,
|
|
@@ -2,7 +2,7 @@ export { CreateWebhookPayload as CreatePayload, TestWebhookPayload as TestPayloa
|
|
|
2
2
|
export declare const create: (input: {
|
|
3
3
|
readonly name: string;
|
|
4
4
|
readonly url: string;
|
|
5
|
-
readonly eventTypes: readonly ("contact.consent_changed" | "contact.created" | "contact.deleted" | "contact.resubscribed" | "contact.subscribed" | "contact.unsubscribed" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.updated" | "domain.updated" | "domain.warming.updated" | "email.sending.paused" | "email.sending.resumed" | "flow.registration.updated" | "journey.webhook" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.delivered" | "mailbox.message.discarded" | "mailbox.message.failed" | "mailbox.message.read" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.message.spam" | "mailbox.thread.deleted" | "message.bounced" | "message.clicked" | "message.complained" | "message.delivered" | "message.failed" | "message.opened" | "message.read" | "message.received" | "message.sent" | "template.registration.updated" | "webhook.created" | "webhook.deleted" | "webhook.test" | "webhook.updated" | "whatsapp.number.connected")[];
|
|
5
|
+
readonly eventTypes: readonly ("contact.consent_changed" | "contact.created" | "contact.deleted" | "contact.resubscribed" | "contact.subscribed" | "contact.unsubscribed" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.updated" | "domain.updated" | "domain.warming.updated" | "email.sending.paused" | "email.sending.resumed" | "flow.registration.updated" | "journey.webhook" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.delivered" | "mailbox.message.discarded" | "mailbox.message.failed" | "mailbox.message.read" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.message.spam" | "mailbox.thread.deleted" | "message.bounced" | "message.clicked" | "message.complained" | "message.delivered" | "message.failed" | "message.opened" | "message.read" | "message.received" | "message.sent" | "template.registration.updated" | "webhook.created" | "webhook.deleted" | "webhook.test" | "webhook.updated" | "whatsapp.number.connected" | "whatsapp.number.updated")[];
|
|
6
6
|
readonly channels?: readonly ("email" | "sms" | "whatsapp")[] | null | undefined;
|
|
7
7
|
readonly mailboxIds?: readonly string[] | null | undefined;
|
|
8
8
|
readonly namespaceId?: string | null | undefined;
|
|
@@ -29,7 +29,7 @@ export declare const list: ((input?: {
|
|
|
29
29
|
readonly id: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
30
30
|
readonly name: string;
|
|
31
31
|
readonly url: string;
|
|
32
|
-
readonly eventTypes: readonly ("contact.consent_changed" | "contact.created" | "contact.deleted" | "contact.resubscribed" | "contact.subscribed" | "contact.unsubscribed" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.updated" | "domain.updated" | "domain.warming.updated" | "email.sending.paused" | "email.sending.resumed" | "flow.registration.updated" | "journey.webhook" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.delivered" | "mailbox.message.discarded" | "mailbox.message.failed" | "mailbox.message.read" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.message.spam" | "mailbox.thread.deleted" | "message.bounced" | "message.clicked" | "message.complained" | "message.delivered" | "message.failed" | "message.opened" | "message.read" | "message.received" | "message.sent" | "template.registration.updated" | "webhook.created" | "webhook.deleted" | "webhook.test" | "webhook.updated" | "whatsapp.number.connected")[];
|
|
32
|
+
readonly eventTypes: readonly ("contact.consent_changed" | "contact.created" | "contact.deleted" | "contact.resubscribed" | "contact.subscribed" | "contact.unsubscribed" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.updated" | "domain.updated" | "domain.warming.updated" | "email.sending.paused" | "email.sending.resumed" | "flow.registration.updated" | "journey.webhook" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.delivered" | "mailbox.message.discarded" | "mailbox.message.failed" | "mailbox.message.read" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.message.spam" | "mailbox.thread.deleted" | "message.bounced" | "message.clicked" | "message.complained" | "message.delivered" | "message.failed" | "message.opened" | "message.read" | "message.received" | "message.sent" | "template.registration.updated" | "webhook.created" | "webhook.deleted" | "webhook.test" | "webhook.updated" | "whatsapp.number.connected" | "whatsapp.number.updated")[];
|
|
33
33
|
readonly channels: readonly ("email" | "sms" | "whatsapp")[] | null;
|
|
34
34
|
readonly mailboxIds: readonly (string & import("effect/Brand").Brand<"MailboxId">)[] | null;
|
|
35
35
|
readonly namespaceId: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
|
|
@@ -59,7 +59,7 @@ export declare const list: ((input?: {
|
|
|
59
59
|
readonly id: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
60
60
|
readonly name: string;
|
|
61
61
|
readonly url: string;
|
|
62
|
-
readonly eventTypes: readonly ("contact.consent_changed" | "contact.created" | "contact.deleted" | "contact.resubscribed" | "contact.subscribed" | "contact.unsubscribed" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.updated" | "domain.updated" | "domain.warming.updated" | "email.sending.paused" | "email.sending.resumed" | "flow.registration.updated" | "journey.webhook" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.delivered" | "mailbox.message.discarded" | "mailbox.message.failed" | "mailbox.message.read" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.message.spam" | "mailbox.thread.deleted" | "message.bounced" | "message.clicked" | "message.complained" | "message.delivered" | "message.failed" | "message.opened" | "message.read" | "message.received" | "message.sent" | "template.registration.updated" | "webhook.created" | "webhook.deleted" | "webhook.test" | "webhook.updated" | "whatsapp.number.connected")[];
|
|
62
|
+
readonly eventTypes: readonly ("contact.consent_changed" | "contact.created" | "contact.deleted" | "contact.resubscribed" | "contact.subscribed" | "contact.unsubscribed" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.updated" | "domain.updated" | "domain.warming.updated" | "email.sending.paused" | "email.sending.resumed" | "flow.registration.updated" | "journey.webhook" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.delivered" | "mailbox.message.discarded" | "mailbox.message.failed" | "mailbox.message.read" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.message.spam" | "mailbox.thread.deleted" | "message.bounced" | "message.clicked" | "message.complained" | "message.delivered" | "message.failed" | "message.opened" | "message.read" | "message.received" | "message.sent" | "template.registration.updated" | "webhook.created" | "webhook.deleted" | "webhook.test" | "webhook.updated" | "whatsapp.number.connected" | "whatsapp.number.updated")[];
|
|
63
63
|
readonly channels: readonly ("email" | "sms" | "whatsapp")[] | null;
|
|
64
64
|
readonly mailboxIds: readonly (string & import("effect/Brand").Brand<"MailboxId">)[] | null;
|
|
65
65
|
readonly namespaceId: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
|
|
@@ -85,7 +85,7 @@ export declare const update: (input: {
|
|
|
85
85
|
readonly id: string;
|
|
86
86
|
readonly name?: string | null | undefined;
|
|
87
87
|
readonly url?: string | null | undefined;
|
|
88
|
-
readonly eventTypes?: readonly ("contact.consent_changed" | "contact.created" | "contact.deleted" | "contact.resubscribed" | "contact.subscribed" | "contact.unsubscribed" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.updated" | "domain.updated" | "domain.warming.updated" | "email.sending.paused" | "email.sending.resumed" | "flow.registration.updated" | "journey.webhook" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.delivered" | "mailbox.message.discarded" | "mailbox.message.failed" | "mailbox.message.read" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.message.spam" | "mailbox.thread.deleted" | "message.bounced" | "message.clicked" | "message.complained" | "message.delivered" | "message.failed" | "message.opened" | "message.read" | "message.received" | "message.sent" | "template.registration.updated" | "webhook.created" | "webhook.deleted" | "webhook.test" | "webhook.updated" | "whatsapp.number.connected")[] | null | undefined;
|
|
88
|
+
readonly eventTypes?: readonly ("contact.consent_changed" | "contact.created" | "contact.deleted" | "contact.resubscribed" | "contact.subscribed" | "contact.unsubscribed" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.updated" | "domain.updated" | "domain.warming.updated" | "email.sending.paused" | "email.sending.resumed" | "flow.registration.updated" | "journey.webhook" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.delivered" | "mailbox.message.discarded" | "mailbox.message.failed" | "mailbox.message.read" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.message.spam" | "mailbox.thread.deleted" | "message.bounced" | "message.clicked" | "message.complained" | "message.delivered" | "message.failed" | "message.opened" | "message.read" | "message.received" | "message.sent" | "template.registration.updated" | "webhook.created" | "webhook.deleted" | "webhook.test" | "webhook.updated" | "whatsapp.number.connected" | "whatsapp.number.updated")[] | null | undefined;
|
|
89
89
|
readonly channels?: readonly ("email" | "sms" | "whatsapp")[] | null | undefined;
|
|
90
90
|
readonly mailboxIds?: readonly string[] | null | undefined;
|
|
91
91
|
readonly namespaceId?: string | null | undefined;
|
|
@@ -62,6 +62,7 @@ export declare const listBusinessAccounts: ((input?: {
|
|
|
62
62
|
readonly historySyncStatus: "completed" | "declined" | "importing" | "requested" | null;
|
|
63
63
|
readonly historySyncProgress: number | null;
|
|
64
64
|
readonly isActive: boolean;
|
|
65
|
+
readonly releasedAt?: string;
|
|
65
66
|
readonly createdAt: string;
|
|
66
67
|
readonly updatedAt: string;
|
|
67
68
|
}[];
|
|
@@ -102,6 +103,7 @@ export declare const listBusinessAccounts: ((input?: {
|
|
|
102
103
|
readonly historySyncStatus: "completed" | "declined" | "importing" | "requested" | null;
|
|
103
104
|
readonly historySyncProgress: number | null;
|
|
104
105
|
readonly isActive: boolean;
|
|
106
|
+
readonly releasedAt?: string;
|
|
105
107
|
readonly createdAt: string;
|
|
106
108
|
readonly updatedAt: string;
|
|
107
109
|
}, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
|
|
@@ -123,6 +125,10 @@ export declare const updateBusinessAccount: (input: {
|
|
|
123
125
|
export declare const disconnectBusinessAccount: (input: {
|
|
124
126
|
readonly accountId: string;
|
|
125
127
|
}, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"whatsappDisconnectBusinessAccount">;
|
|
128
|
+
export declare const releaseBusinessAccount: (input: {
|
|
129
|
+
readonly accountId: string;
|
|
130
|
+
readonly targetOrganizationId: string;
|
|
131
|
+
}, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"whatsappReleaseBusinessAccount">;
|
|
126
132
|
export declare const setDefaultBusinessAccount: (input: {
|
|
127
133
|
readonly accountId: string;
|
|
128
134
|
}, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"whatsappSetDefaultBusinessAccount">;
|
package/dist/effect/whatsapp.js
CHANGED
|
@@ -13,6 +13,7 @@ var whatsapp_exports = /* @__PURE__ */ __exportAll({
|
|
|
13
13
|
getStats: () => getStats,
|
|
14
14
|
getTemplateStats: () => getTemplateStats,
|
|
15
15
|
listBusinessAccounts: () => listBusinessAccounts,
|
|
16
|
+
releaseBusinessAccount: () => releaseBusinessAccount,
|
|
16
17
|
setDefaultBusinessAccount: () => setDefaultBusinessAccount,
|
|
17
18
|
syncAccountStatus: () => syncAccountStatus,
|
|
18
19
|
updateBusinessAccount: () => updateBusinessAccount
|
|
@@ -28,8 +29,9 @@ const connectBusinessAccount = /* @__PURE__ */ make("whatsappConnectBusinessAcco
|
|
|
28
29
|
const getBusinessAccount = /* @__PURE__ */ make("whatsappGetBusinessAccount");
|
|
29
30
|
const updateBusinessAccount = /* @__PURE__ */ make("whatsappUpdateBusinessAccount");
|
|
30
31
|
const disconnectBusinessAccount = /* @__PURE__ */ make("whatsappDisconnectBusinessAccount");
|
|
32
|
+
const releaseBusinessAccount = /* @__PURE__ */ make("whatsappReleaseBusinessAccount");
|
|
31
33
|
const setDefaultBusinessAccount = /* @__PURE__ */ make("whatsappSetDefaultBusinessAccount");
|
|
32
34
|
const syncAccountStatus = /* @__PURE__ */ make("whatsappSyncAccountStatus");
|
|
33
|
-
export { connectBusinessAccount, disconnectBusinessAccount, getBusinessAccount, getMediaDownloadUrl, getServiceWindowBilling, getServiceWindowStatus, getStats, getTemplateStats, listBusinessAccounts, setDefaultBusinessAccount, syncAccountStatus, updateBusinessAccount, whatsapp_exports };
|
|
35
|
+
export { connectBusinessAccount, disconnectBusinessAccount, getBusinessAccount, getMediaDownloadUrl, getServiceWindowBilling, getServiceWindowStatus, getStats, getTemplateStats, listBusinessAccounts, releaseBusinessAccount, setDefaultBusinessAccount, syncAccountStatus, updateBusinessAccount, whatsapp_exports };
|
|
34
36
|
|
|
35
37
|
//# sourceMappingURL=whatsapp.js.map
|
package/dist/package.json.js
CHANGED