samva 0.30.0 → 0.31.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.
@@ -1063,7 +1063,7 @@ export declare class Conversations {
1063
1063
  /**
1064
1064
  * List conversations
1065
1065
  *
1066
- * Returns conversation summaries, most recently active first, filterable by status, channel, contact, and creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. A conversation that gains activity while you page moves ahead of the cursor, so a walk lists each conversation at most once. Read a conversation's contacts, metadata, and resolution with `GET /v1/conversations/{id}`.
1066
+ * Returns conversation summaries, most recently active first, filterable by status, channel, contact, mailbox, and creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. A conversation that gains activity while you page moves ahead of the cursor, so a walk lists each conversation at most once. Read a conversation's contacts, metadata, and resolution with `GET /v1/conversations/{id}`.
1067
1067
  */
1068
1068
  static list<ThrowOnError extends boolean = false>(parameters?: {
1069
1069
  limit?: number | null | undefined;
@@ -1071,6 +1071,7 @@ export declare class Conversations {
1071
1071
  status?: "active" | "waiting" | "resolved" | "escalated" | "archived" | null | undefined;
1072
1072
  channel?: "email" | null | undefined;
1073
1073
  contactId?: ContactId | null | undefined;
1074
+ mailboxId?: MailboxId | null | undefined;
1074
1075
  after?: string | null | undefined;
1075
1076
  before?: string | null | undefined;
1076
1077
  }, options?: Options<never, ThrowOnError>): RequestResult<ConversationsListResponses, ConversationsListErrors, ThrowOnError>;
@@ -3240,7 +3240,7 @@ var Conversations = class {
3240
3240
  /**
3241
3241
  * List conversations
3242
3242
  *
3243
- * Returns conversation summaries, most recently active first, filterable by status, channel, contact, and creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. A conversation that gains activity while you page moves ahead of the cursor, so a walk lists each conversation at most once. Read a conversation's contacts, metadata, and resolution with `GET /v1/conversations/{id}`.
3243
+ * Returns conversation summaries, most recently active first, filterable by status, channel, contact, mailbox, and creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. A conversation that gains activity while you page moves ahead of the cursor, so a walk lists each conversation at most once. Read a conversation's contacts, metadata, and resolution with `GET /v1/conversations/{id}`.
3244
3244
  */
3245
3245
  static list(parameters, options) {
3246
3246
  const params = buildClientParams([parameters], [{ args: [
@@ -3264,6 +3264,10 @@ var Conversations = class {
3264
3264
  in: "query",
3265
3265
  key: "contactId"
3266
3266
  },
3267
+ {
3268
+ in: "query",
3269
+ key: "mailboxId"
3270
+ },
3267
3271
  {
3268
3272
  in: "query",
3269
3273
  key: "after"
@@ -9020,6 +9020,7 @@ export type ConversationsListData = {
9020
9020
  status?: "active" | "waiting" | "resolved" | "escalated" | "archived" | null | undefined;
9021
9021
  channel?: "email" | null | undefined;
9022
9022
  contactId?: ContactId | null | undefined;
9023
+ mailboxId?: MailboxId | null | undefined;
9023
9024
  after?: string | null | undefined;
9024
9025
  before?: string | null | undefined;
9025
9026
  };
@@ -4,6 +4,7 @@ export declare const list: ((input?: {
4
4
  readonly status?: "active" | "archived" | "escalated" | "resolved" | "waiting" | null | undefined;
5
5
  readonly channel?: "email" | null | undefined;
6
6
  readonly contactId?: string | null | undefined;
7
+ readonly mailboxId?: string | null | undefined;
7
8
  readonly after?: string | null | undefined;
8
9
  readonly before?: string | null | undefined;
9
10
  } | undefined, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"conversationsList">) & {
@@ -13,6 +14,7 @@ export declare const list: ((input?: {
13
14
  readonly status?: "active" | "archived" | "escalated" | "resolved" | "waiting" | null | undefined;
14
15
  readonly channel?: "email" | null | undefined;
15
16
  readonly contactId?: string | null | undefined;
17
+ readonly mailboxId?: string | null | undefined;
16
18
  readonly after?: string | null | undefined;
17
19
  readonly before?: string | null | undefined;
18
20
  } | undefined) => import("effect/Stream").Stream<{
@@ -39,6 +41,7 @@ export declare const list: ((input?: {
39
41
  readonly status?: "active" | "archived" | "escalated" | "resolved" | "waiting" | null | undefined;
40
42
  readonly channel?: "email" | null | undefined;
41
43
  readonly contactId?: string | null | undefined;
44
+ readonly mailboxId?: string | null | undefined;
42
45
  readonly after?: string | null | undefined;
43
46
  readonly before?: string | null | undefined;
44
47
  } | undefined) => import("effect/Stream").Stream<{
@@ -1,6 +1,6 @@
1
1
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
2
2
  import * as Schema from "effect/Schema";
3
- import { ApiKeySecurityMiddleware, ContactId, ConversationId, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, JsonValue, MessagePage, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared";
3
+ import { ApiKeySecurityMiddleware, ContactId, ConversationId, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, JsonValue, MailboxId, MessagePage, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared";
4
4
  export type UnknownRecord = {
5
5
  readonly [x: string]: JsonValue;
6
6
  };
@@ -188,6 +188,7 @@ export type ConversationsListQuery = {
188
188
  readonly status?: "active" | "waiting" | "resolved" | "escalated" | "archived" | null;
189
189
  readonly channel?: "email" | null;
190
190
  readonly contactId?: ContactId | null;
191
+ readonly mailboxId?: MailboxId | null;
191
192
  readonly after?: string | null;
192
193
  readonly before?: string | null;
193
194
  };
@@ -197,6 +198,7 @@ export declare const ConversationsListQuery: Schema.Struct<{
197
198
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>, Schema.Null]>>;
198
199
  readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"email">, Schema.Null]>>;
199
200
  readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
201
+ readonly mailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>>;
200
202
  readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
201
203
  readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
202
204
  }>;
@@ -1995,6 +1997,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
1995
1997
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>, Schema.Null]>>;
1996
1998
  readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"email">, Schema.Null]>>;
1997
1999
  readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
2000
+ readonly mailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>>;
1998
2001
  readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1999
2002
  readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2000
2003
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
@@ -1,4 +1,4 @@
1
- import { ApiKeySecurityMiddleware, ContactId, ConversationId, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, JsonValue, MessagePage, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared.js";
1
+ import { ApiKeySecurityMiddleware, ContactId, ConversationId, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, JsonValue, MailboxId, MessagePage, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared.js";
2
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
3
3
  import * as Schema from "effect/Schema";
4
4
  // src/effect/generated/conversations.ts
@@ -119,6 +119,7 @@ const ConversationsListQuery = /* @__PURE__ */ (() => Schema.Struct({
119
119
  ]), Schema.Null])),
120
120
  channel: Schema.optionalKey(Schema.Union([Schema.Literal("email"), Schema.Null])),
121
121
  contactId: Schema.optionalKey(Schema.Union([ContactId, Schema.Null])),
122
+ mailboxId: Schema.optionalKey(Schema.Union([MailboxId, Schema.Null])),
122
123
  after: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
123
124
  before: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
124
125
  }))();
@@ -313,7 +314,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
313
314
  ConversationsList500,
314
315
  ConversationsList504.pipe(HttpApiSchema.status(504))
315
316
  ]
316
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.list").annotate(OpenApi.Summary, "List conversations").annotate(OpenApi.Description, "Returns conversation summaries, most recently active first, filterable by status, channel, contact, and creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. A conversation that gains activity while you page moves ahead of the cursor, so a walk lists each conversation at most once. Read a conversation's contacts, metadata, and resolution with `GET /v1/conversations/{id}`."), HttpApiEndpoint.post("conversationsCreate", "/v1/conversations", {
317
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.list").annotate(OpenApi.Summary, "List conversations").annotate(OpenApi.Description, "Returns conversation summaries, most recently active first, filterable by status, channel, contact, mailbox, and creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. A conversation that gains activity while you page moves ahead of the cursor, so a walk lists each conversation at most once. Read a conversation's contacts, metadata, and resolution with `GET /v1/conversations/{id}`."), HttpApiEndpoint.post("conversationsCreate", "/v1/conversations", {
317
318
  payload: ConversationsCreateRequestJson,
318
319
  success: ConversationsCreate201.pipe(HttpApiSchema.status(201)),
319
320
  error: [
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.30.0";
2
+ var version = "0.31.0";
3
3
  export { version };
4
4
 
5
5
  //# sourceMappingURL=package.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "samva",
3
- "version": "0.30.0",
3
+ "version": "0.31.0",
4
4
  "description": "TypeScript SDK for the Samva email API",
5
5
  "keywords": [
6
6
  "api-client",
@@ -232,7 +232,7 @@
232
232
  "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"
233
233
  },
234
234
  "dependencies": {
235
- "@samva/webhooks": "0.30.0"
235
+ "@samva/webhooks": "0.31.0"
236
236
  },
237
237
  "devDependencies": {
238
238
  "@effect/openapi-generator": "4.0.6",