samva 0.43.0 → 0.43.1

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.
@@ -755,6 +755,7 @@ const PolicyDecision = /* @__PURE__ */ (() => Schema.Struct({
755
755
  scopes: Schema.Array(Schema.Struct({
756
756
  kind: Schema.Union([
757
757
  Schema.Literal("organization"),
758
+ Schema.Literal("integration"),
758
759
  Schema.Literal("mailbox"),
759
760
  Schema.Literal("agent"),
760
761
  Schema.Literal("apiKey")
@@ -765,6 +766,7 @@ const PolicyDecision = /* @__PURE__ */ (() => Schema.Struct({
765
766
  scope: Schema.Struct({
766
767
  kind: Schema.Union([
767
768
  Schema.Literal("organization"),
769
+ Schema.Literal("integration"),
768
770
  Schema.Literal("mailbox"),
769
771
  Schema.Literal("agent"),
770
772
  Schema.Literal("apiKey")
@@ -808,7 +808,7 @@ var MessagesGroup = class extends HttpApiGroup.make("Messages").add(HttpApiEndpo
808
808
  MessagesSend503.pipe(HttpApiSchema.status(503)),
809
809
  MessagesSend504.pipe(HttpApiSchema.status(504))
810
810
  ]
811
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "messages.send").annotate(OpenApi.Summary, "Send a message").annotate(OpenApi.Description, "Sends a message on the requested channel and returns its receipt (id, status, and why it waits when it does) with a 201 Created status. Requires `messages:create` or the send permission of the channel it sends on, such as `email:send`. `channel` selects the payload variant. Email and WhatsApp sends are available. Repeating an identical request with the same optional `Idempotency-Key` header returns the original receipt; reusing the key for different content returns a conflict."), HttpApiEndpoint.get("messagesGet", "/v1/messages/:id", {
811
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "messages.send").annotate(OpenApi.Summary, "Send a message").annotate(OpenApi.Description, "An email send whose namespace has no sending setup returns ValidationError: share the sender domain with namespaces, or use a sender owned by that namespace. Sending setup that has stopped after failure returns ValidationError; restart or reconcile the domain's sending setup. Setup still in progress returns ConflictError. Sends a message on the requested channel and returns its receipt (id, status, and why it waits when it does) with a 201 Created status. Requires `messages:create` or the send permission of the channel it sends on, such as `email:send`. `channel` selects the payload variant. Email and WhatsApp sends are available. Repeating an identical request with the same optional `Idempotency-Key` header returns the original receipt; reusing the key for different content returns a conflict."), HttpApiEndpoint.get("messagesGet", "/v1/messages/:id", {
812
812
  params: MessagesGetPathParams,
813
813
  success: MessagesGet200,
814
814
  error: [
@@ -253,7 +253,7 @@ var ScheduledMessagesGroup = class extends HttpApiGroup.make("Scheduled Messages
253
253
  ScheduledMessagesCreate502.pipe(HttpApiSchema.status(502)),
254
254
  ScheduledMessagesCreate504.pipe(HttpApiSchema.status(504))
255
255
  ]
256
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "scheduledMessages.create").annotate(OpenApi.Summary, "Schedule a message").annotate(OpenApi.Description, "Schedules a message for dispatch at the absolute ISO-8601 timestamp supplied in scheduledFor. Requires `messages:create` or the send permission of the channel it sends on, such as `email:send`. The send payload is the same channel union the immediate send accepts, with each channel's content checked at schedule time so a send that could never render fails now rather than hours later: email and WhatsApp schedules are available. Optional timezone is validated IANA display metadata only and never changes the execution instant."), HttpApiEndpoint.get("scheduledMessagesGet", "/v1/messages/scheduled/:id", {
256
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "scheduledMessages.create").annotate(OpenApi.Summary, "Schedule a message").annotate(OpenApi.Description, "Schedules a message for dispatch at the absolute ISO-8601 timestamp supplied in scheduledFor. Requires `messages:create` or the send permission of the channel it sends on, such as `email:send`. The send payload is the same channel union the immediate send accepts, with each channel's content checked at schedule time so a send that could never render fails now rather than hours later: email and WhatsApp schedules are available. Email schedules placed explicitly in a namespace require its sending setup to be ready: ValidationError means share the sender domain with namespaces or use a sender owned by that namespace. Setup that has stopped after failure also returns ValidationError and requires restarting or reconciling the domain's sending setup. ConflictError means setup is still in progress. Optional timezone is validated IANA display metadata only and never changes the execution instant."), HttpApiEndpoint.get("scheduledMessagesGet", "/v1/messages/scheduled/:id", {
257
257
  params: ScheduledMessagesGetPathParams,
258
258
  success: ScheduledMessagesGet200,
259
259
  error: [
@@ -1960,12 +1960,12 @@ export type MailboxActionDecision = {
1960
1960
  readonly outcome: "allow" | "hold" | "refuse";
1961
1961
  readonly reason: string;
1962
1962
  readonly scopes: ReadonlyArray<{
1963
- readonly kind: "organization" | "mailbox" | "agent" | "apiKey";
1963
+ readonly kind: "organization" | "integration" | "mailbox" | "agent" | "apiKey";
1964
1964
  readonly id: string;
1965
1965
  }>;
1966
1966
  readonly rule?: {
1967
1967
  readonly scope: {
1968
- readonly kind: "organization" | "mailbox" | "agent" | "apiKey";
1968
+ readonly kind: "organization" | "integration" | "mailbox" | "agent" | "apiKey";
1969
1969
  readonly id: string;
1970
1970
  };
1971
1971
  readonly index: number;
@@ -1996,12 +1996,12 @@ export declare const MailboxActionDecision: Schema.Struct<{
1996
1996
  readonly outcome: Schema.Union<readonly [Schema.Literal<"allow">, Schema.Literal<"hold">, Schema.Literal<"refuse">]>;
1997
1997
  readonly reason: Schema.String;
1998
1998
  readonly scopes: Schema.$Array<Schema.Struct<{
1999
- readonly kind: Schema.Union<readonly [Schema.Literal<"organization">, Schema.Literal<"mailbox">, Schema.Literal<"agent">, Schema.Literal<"apiKey">]>;
1999
+ readonly kind: Schema.Union<readonly [Schema.Literal<"organization">, Schema.Literal<"integration">, Schema.Literal<"mailbox">, Schema.Literal<"agent">, Schema.Literal<"apiKey">]>;
2000
2000
  readonly id: Schema.String;
2001
2001
  }>>;
2002
2002
  readonly rule: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
2003
2003
  readonly scope: Schema.Struct<{
2004
- readonly kind: Schema.Union<readonly [Schema.Literal<"organization">, Schema.Literal<"mailbox">, Schema.Literal<"agent">, Schema.Literal<"apiKey">]>;
2004
+ readonly kind: Schema.Union<readonly [Schema.Literal<"organization">, Schema.Literal<"integration">, Schema.Literal<"mailbox">, Schema.Literal<"agent">, Schema.Literal<"apiKey">]>;
2005
2005
  readonly id: Schema.String;
2006
2006
  }>;
2007
2007
  readonly index: Schema.Finite;
@@ -3073,12 +3073,12 @@ export declare const MailboxSendReceipt: Schema.Struct<{
3073
3073
  readonly outcome: Schema.Union<readonly [Schema.Literal<"allow">, Schema.Literal<"hold">, Schema.Literal<"refuse">]>;
3074
3074
  readonly reason: Schema.String;
3075
3075
  readonly scopes: Schema.$Array<Schema.Struct<{
3076
- readonly kind: Schema.Union<readonly [Schema.Literal<"organization">, Schema.Literal<"mailbox">, Schema.Literal<"agent">, Schema.Literal<"apiKey">]>;
3076
+ readonly kind: Schema.Union<readonly [Schema.Literal<"organization">, Schema.Literal<"integration">, Schema.Literal<"mailbox">, Schema.Literal<"agent">, Schema.Literal<"apiKey">]>;
3077
3077
  readonly id: Schema.String;
3078
3078
  }>>;
3079
3079
  readonly rule: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
3080
3080
  readonly scope: Schema.Struct<{
3081
- readonly kind: Schema.Union<readonly [Schema.Literal<"organization">, Schema.Literal<"mailbox">, Schema.Literal<"agent">, Schema.Literal<"apiKey">]>;
3081
+ readonly kind: Schema.Union<readonly [Schema.Literal<"organization">, Schema.Literal<"integration">, Schema.Literal<"mailbox">, Schema.Literal<"agent">, Schema.Literal<"apiKey">]>;
3082
3082
  readonly id: Schema.String;
3083
3083
  }>;
3084
3084
  readonly index: Schema.Finite;
@@ -3725,12 +3725,12 @@ declare const MailboxSendRefusedError_base: Schema.Class<MailboxSendRefusedError
3725
3725
  readonly outcome: Schema.Union<readonly [Schema.Literal<"allow">, Schema.Literal<"hold">, Schema.Literal<"refuse">]>;
3726
3726
  readonly reason: Schema.String;
3727
3727
  readonly scopes: Schema.$Array<Schema.Struct<{
3728
- readonly kind: Schema.Union<readonly [Schema.Literal<"organization">, Schema.Literal<"mailbox">, Schema.Literal<"agent">, Schema.Literal<"apiKey">]>;
3728
+ readonly kind: Schema.Union<readonly [Schema.Literal<"organization">, Schema.Literal<"integration">, Schema.Literal<"mailbox">, Schema.Literal<"agent">, Schema.Literal<"apiKey">]>;
3729
3729
  readonly id: Schema.String;
3730
3730
  }>>;
3731
3731
  readonly rule: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
3732
3732
  readonly scope: Schema.Struct<{
3733
- readonly kind: Schema.Union<readonly [Schema.Literal<"organization">, Schema.Literal<"mailbox">, Schema.Literal<"agent">, Schema.Literal<"apiKey">]>;
3733
+ readonly kind: Schema.Union<readonly [Schema.Literal<"organization">, Schema.Literal<"integration">, Schema.Literal<"mailbox">, Schema.Literal<"agent">, Schema.Literal<"apiKey">]>;
3734
3734
  readonly id: Schema.String;
3735
3735
  }>;
3736
3736
  readonly index: Schema.Finite;
@@ -3822,12 +3822,12 @@ declare const MailboxSendConflictError_base: Schema.Class<MailboxSendConflictErr
3822
3822
  readonly outcome: Schema.Union<readonly [Schema.Literal<"allow">, Schema.Literal<"hold">, Schema.Literal<"refuse">]>;
3823
3823
  readonly reason: Schema.String;
3824
3824
  readonly scopes: Schema.$Array<Schema.Struct<{
3825
- readonly kind: Schema.Union<readonly [Schema.Literal<"organization">, Schema.Literal<"mailbox">, Schema.Literal<"agent">, Schema.Literal<"apiKey">]>;
3825
+ readonly kind: Schema.Union<readonly [Schema.Literal<"organization">, Schema.Literal<"integration">, Schema.Literal<"mailbox">, Schema.Literal<"agent">, Schema.Literal<"apiKey">]>;
3826
3826
  readonly id: Schema.String;
3827
3827
  }>>;
3828
3828
  readonly rule: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
3829
3829
  readonly scope: Schema.Struct<{
3830
- readonly kind: Schema.Union<readonly [Schema.Literal<"organization">, Schema.Literal<"mailbox">, Schema.Literal<"agent">, Schema.Literal<"apiKey">]>;
3830
+ readonly kind: Schema.Union<readonly [Schema.Literal<"organization">, Schema.Literal<"integration">, Schema.Literal<"mailbox">, Schema.Literal<"agent">, Schema.Literal<"apiKey">]>;
3831
3831
  readonly id: Schema.String;
3832
3832
  }>;
3833
3833
  readonly index: Schema.Finite;
@@ -1217,6 +1217,7 @@ const MailboxActionDecision = /* @__PURE__ */ (() => Schema.Struct({
1217
1217
  scopes: Schema.Array(Schema.Struct({
1218
1218
  kind: Schema.Union([
1219
1219
  Schema.Literal("organization"),
1220
+ Schema.Literal("integration"),
1220
1221
  Schema.Literal("mailbox"),
1221
1222
  Schema.Literal("agent"),
1222
1223
  Schema.Literal("apiKey")
@@ -1227,6 +1228,7 @@ const MailboxActionDecision = /* @__PURE__ */ (() => Schema.Struct({
1227
1228
  scope: Schema.Struct({
1228
1229
  kind: Schema.Union([
1229
1230
  Schema.Literal("organization"),
1231
+ Schema.Literal("integration"),
1230
1232
  Schema.Literal("mailbox"),
1231
1233
  Schema.Literal("agent"),
1232
1234
  Schema.Literal("apiKey")
@@ -406,12 +406,12 @@ export declare const getNeedsYou: ((input?: {
406
406
  readonly outcome: "allow" | "hold" | "refuse";
407
407
  readonly reason: string;
408
408
  readonly scopes: readonly {
409
- readonly kind: "agent" | "apiKey" | "mailbox" | "organization";
409
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
410
410
  readonly id: string;
411
411
  }[];
412
412
  readonly rule?: {
413
413
  readonly scope: {
414
- readonly kind: "agent" | "apiKey" | "mailbox" | "organization";
414
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
415
415
  readonly id: string;
416
416
  };
417
417
  readonly index: number;
@@ -590,12 +590,12 @@ export declare const getNeedsYou: ((input?: {
590
590
  readonly outcome: "allow" | "hold" | "refuse";
591
591
  readonly reason: string;
592
592
  readonly scopes: readonly {
593
- readonly kind: "agent" | "apiKey" | "mailbox" | "organization";
593
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
594
594
  readonly id: string;
595
595
  }[];
596
596
  readonly rule?: {
597
597
  readonly scope: {
598
- readonly kind: "agent" | "apiKey" | "mailbox" | "organization";
598
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
599
599
  readonly id: string;
600
600
  };
601
601
  readonly index: number;
@@ -1566,12 +1566,12 @@ export declare const listActions: ((input: {
1566
1566
  readonly outcome: "allow" | "hold" | "refuse";
1567
1567
  readonly reason: string;
1568
1568
  readonly scopes: readonly {
1569
- readonly kind: "agent" | "apiKey" | "mailbox" | "organization";
1569
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
1570
1570
  readonly id: string;
1571
1571
  }[];
1572
1572
  readonly rule?: {
1573
1573
  readonly scope: {
1574
- readonly kind: "agent" | "apiKey" | "mailbox" | "organization";
1574
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
1575
1575
  readonly id: string;
1576
1576
  };
1577
1577
  readonly index: number;
@@ -1637,12 +1637,12 @@ export declare const listActions: ((input: {
1637
1637
  readonly outcome: "allow" | "hold" | "refuse";
1638
1638
  readonly reason: string;
1639
1639
  readonly scopes: readonly {
1640
- readonly kind: "agent" | "apiKey" | "mailbox" | "organization";
1640
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
1641
1641
  readonly id: string;
1642
1642
  }[];
1643
1643
  readonly rule?: {
1644
1644
  readonly scope: {
1645
- readonly kind: "agent" | "apiKey" | "mailbox" | "organization";
1645
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
1646
1646
  readonly id: string;
1647
1647
  };
1648
1648
  readonly index: number;
@@ -1747,12 +1747,12 @@ export declare const listActions: ((input: {
1747
1747
  readonly outcome: "allow" | "hold" | "refuse";
1748
1748
  readonly reason: string;
1749
1749
  readonly scopes: readonly {
1750
- readonly kind: "agent" | "apiKey" | "mailbox" | "organization";
1750
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
1751
1751
  readonly id: string;
1752
1752
  }[];
1753
1753
  readonly rule?: {
1754
1754
  readonly scope: {
1755
- readonly kind: "agent" | "apiKey" | "mailbox" | "organization";
1755
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
1756
1756
  readonly id: string;
1757
1757
  };
1758
1758
  readonly index: number;
@@ -1854,12 +1854,12 @@ export declare const listActions: ((input: {
1854
1854
  readonly outcome: "allow" | "hold" | "refuse";
1855
1855
  readonly reason: string;
1856
1856
  readonly scopes: readonly {
1857
- readonly kind: "agent" | "apiKey" | "mailbox" | "organization";
1857
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
1858
1858
  readonly id: string;
1859
1859
  }[];
1860
1860
  readonly rule?: {
1861
1861
  readonly scope: {
1862
- readonly kind: "agent" | "apiKey" | "mailbox" | "organization";
1862
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
1863
1863
  readonly id: string;
1864
1864
  };
1865
1865
  readonly index: number;
@@ -1925,12 +1925,12 @@ export declare const listActions: ((input: {
1925
1925
  readonly outcome: "allow" | "hold" | "refuse";
1926
1926
  readonly reason: string;
1927
1927
  readonly scopes: readonly {
1928
- readonly kind: "agent" | "apiKey" | "mailbox" | "organization";
1928
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
1929
1929
  readonly id: string;
1930
1930
  }[];
1931
1931
  readonly rule?: {
1932
1932
  readonly scope: {
1933
- readonly kind: "agent" | "apiKey" | "mailbox" | "organization";
1933
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
1934
1934
  readonly id: string;
1935
1935
  };
1936
1936
  readonly index: number;
@@ -2035,12 +2035,12 @@ export declare const listActions: ((input: {
2035
2035
  readonly outcome: "allow" | "hold" | "refuse";
2036
2036
  readonly reason: string;
2037
2037
  readonly scopes: readonly {
2038
- readonly kind: "agent" | "apiKey" | "mailbox" | "organization";
2038
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
2039
2039
  readonly id: string;
2040
2040
  }[];
2041
2041
  readonly rule?: {
2042
2042
  readonly scope: {
2043
- readonly kind: "agent" | "apiKey" | "mailbox" | "organization";
2043
+ readonly kind: "agent" | "apiKey" | "integration" | "mailbox" | "organization";
2044
2044
  readonly id: string;
2045
2045
  };
2046
2046
  readonly index: number;
@@ -66,7 +66,7 @@ export type ActionDecision = {
66
66
  } | undefined;
67
67
  };
68
68
  type PolicyScope = {
69
- readonly kind: "organization" | "mailbox" | "agent" | "apiKey";
69
+ readonly kind: "organization" | "integration" | "mailbox" | "agent" | "apiKey";
70
70
  readonly id: string;
71
71
  };
72
72
  export type CampaignAttribution = {
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.43.0";
2
+ var version = "0.43.1";
3
3
  export { version };
4
4
 
5
5
  //# sourceMappingURL=package.js.map
@@ -797,6 +797,7 @@ const payloadSchemas = {
797
797
  type: "string",
798
798
  enum: [
799
799
  "organization",
800
+ "integration",
800
801
  "mailbox",
801
802
  "agent",
802
803
  "apiKey"
@@ -821,6 +822,7 @@ const payloadSchemas = {
821
822
  type: "string",
822
823
  enum: [
823
824
  "organization",
825
+ "integration",
824
826
  "mailbox",
825
827
  "agent",
826
828
  "apiKey"
@@ -1264,6 +1266,7 @@ const payloadSchemas = {
1264
1266
  type: "string",
1265
1267
  enum: [
1266
1268
  "organization",
1269
+ "integration",
1267
1270
  "mailbox",
1268
1271
  "agent",
1269
1272
  "apiKey"
@@ -1288,6 +1291,7 @@ const payloadSchemas = {
1288
1291
  type: "string",
1289
1292
  enum: [
1290
1293
  "organization",
1294
+ "integration",
1291
1295
  "mailbox",
1292
1296
  "agent",
1293
1297
  "apiKey"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "samva",
3
- "version": "0.43.0",
3
+ "version": "0.43.1",
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.43.0"
240
+ "@samva/webhooks": "0.43.1"
241
241
  },
242
242
  "devDependencies": {
243
243
  "@effect/openapi-generator": "^4.1.2",