@calmlens/sdk 0.7.0 → 0.8.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.
@@ -2979,6 +2979,109 @@ declare const EVENT_TYPE_INFO: {
2979
2979
  lastError: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
2980
2980
  }, zod.core.$strip>;
2981
2981
  };
2982
+ readonly "appeal.submitted": {
2983
+ id: "appeal.submitted";
2984
+ name: string;
2985
+ description: string;
2986
+ category: EventCategory;
2987
+ severity: EventSeverity;
2988
+ /** Whether the in-app connector (notification bell) subscribes to the type by default. */
2989
+ notify: boolean;
2990
+ fields: {
2991
+ appealId: EventFieldDefinition<zod.ZodString>;
2992
+ subjectType: EventFieldDefinition<zod.ZodEnum<{
2993
+ post: "post";
2994
+ "reported-post": "reported-post";
2995
+ "reported-user": "reported-user";
2996
+ user: "user";
2997
+ }>>;
2998
+ subjectId: EventFieldDefinition<zod.ZodString>;
2999
+ };
3000
+ /** Example data, used for synthetic test sends (`createSampleEvent`). */
3001
+ example: NoInfer<{
3002
+ appealId: string;
3003
+ subjectType: "post" | "reported-post" | "reported-user" | "user";
3004
+ subjectId: string;
3005
+ }>;
3006
+ factInfo: {
3007
+ label: string;
3008
+ description: string;
3009
+ display: EventFieldDisplay;
3010
+ /** Kept in the data but left out of rendered messages (usually an ID shown by another field). */
3011
+ hidden?: boolean;
3012
+ schema: zod.ZodType<unknown, unknown, zod.core.$ZodTypeInternals<unknown, unknown>>;
3013
+ key: string;
3014
+ }[];
3015
+ values: zod.ZodObject<{
3016
+ appealId: zod.ZodString;
3017
+ subjectType: zod.ZodEnum<{
3018
+ post: "post";
3019
+ "reported-post": "reported-post";
3020
+ "reported-user": "reported-user";
3021
+ user: "user";
3022
+ }>;
3023
+ subjectId: zod.ZodString;
3024
+ }, zod.core.$strip>;
3025
+ };
3026
+ readonly "appeal.resolved": {
3027
+ id: "appeal.resolved";
3028
+ name: string;
3029
+ description: string;
3030
+ category: EventCategory;
3031
+ severity: EventSeverity;
3032
+ /** Whether the in-app connector (notification bell) subscribes to the type by default. */
3033
+ notify: boolean;
3034
+ fields: {
3035
+ appealId: EventFieldDefinition<zod.ZodString>;
3036
+ subjectType: EventFieldDefinition<zod.ZodEnum<{
3037
+ post: "post";
3038
+ "reported-post": "reported-post";
3039
+ "reported-user": "reported-user";
3040
+ user: "user";
3041
+ }>>;
3042
+ subjectId: EventFieldDefinition<zod.ZodString>;
3043
+ decision: EventFieldDefinition<zod.ZodEnum<{
3044
+ overturned: "overturned";
3045
+ upheld: "upheld";
3046
+ }>>;
3047
+ action: EventFieldDefinition<zod.ZodString>;
3048
+ appliedToAsset: EventFieldDefinition<zod.ZodBoolean>;
3049
+ };
3050
+ /** Example data, used for synthetic test sends (`createSampleEvent`). */
3051
+ example: NoInfer<{
3052
+ appealId: string;
3053
+ subjectType: "post" | "reported-post" | "reported-user" | "user";
3054
+ subjectId: string;
3055
+ decision: "overturned" | "upheld";
3056
+ action: string;
3057
+ appliedToAsset: boolean;
3058
+ }>;
3059
+ factInfo: {
3060
+ label: string;
3061
+ description: string;
3062
+ display: EventFieldDisplay;
3063
+ /** Kept in the data but left out of rendered messages (usually an ID shown by another field). */
3064
+ hidden?: boolean;
3065
+ schema: zod.ZodType<unknown, unknown, zod.core.$ZodTypeInternals<unknown, unknown>>;
3066
+ key: string;
3067
+ }[];
3068
+ values: zod.ZodObject<{
3069
+ appealId: zod.ZodString;
3070
+ subjectType: zod.ZodEnum<{
3071
+ post: "post";
3072
+ "reported-post": "reported-post";
3073
+ "reported-user": "reported-user";
3074
+ user: "user";
3075
+ }>;
3076
+ subjectId: zod.ZodString;
3077
+ decision: zod.ZodEnum<{
3078
+ overturned: "overturned";
3079
+ upheld: "upheld";
3080
+ }>;
3081
+ action: zod.ZodString;
3082
+ appliedToAsset: zod.ZodBoolean;
3083
+ }, zod.core.$strip>;
3084
+ };
2982
3085
  };
2983
3086
  type EventType = keyof typeof EVENT_TYPE_INFO;
2984
3087
  type EventTypeInfo<TType extends EventType = EventType> = (typeof EVENT_TYPE_INFO)[TType];
@@ -3022,6 +3125,8 @@ declare const EVENT_SCHEMA: zod.ZodObject<{
3022
3125
  projectId: zod.ZodString;
3023
3126
  userId: zod.ZodOptional<zod.ZodNullable<zod.ZodPipe<zod.ZodString, zod.ZodTransform<string, string>>>>;
3024
3127
  type: zod.ZodEnum<{
3128
+ "appeal.resolved": "appeal.resolved";
3129
+ "appeal.submitted": "appeal.submitted";
3025
3130
  "asset.approved": "asset.approved";
3026
3131
  "asset.classified": "asset.classified";
3027
3132
  "asset.failed": "asset.failed";
package/cjs/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as GetEventsResponse, B as EventFactValues, C as UpdateAssetOptions, D as GetAssetChildrenResponse, E as VerifyWebhookSignatureOptions, F as Folder, G as AssetStatus, H as EventSeverity, I as Event, J as MetadataItem, K as AssetType, L as TypedEvent, M as RequestErrorCode, O as GetAssetResponse, P as Lens, R as EventCategory, S as SubmitAssetOptions, T as UploadAssetPartOptions, U as EventType, V as EventFacts, W as Asset, Y as ProcessingOptions, _ as MultipartUploadOptions, a as CreateAssetSignedUrlOptions, b as RetrieveAssetOptions, c as EnsureLensOptions, d as ListAssetChildrenOptions, f as ListAssetsOptions, g as MoveFolderOptions, h as MoveAssetOptions, i as CdnServeOptions, j as PostAssetSignedUrlResponse, k as GetAssetsPageResponse, l as EnsureLensesOptions, m as ModerateTextOptions, n as CalmLensClientOptions, o as CreateFolderOptions, p as ListEventsOptions, q as AssetVisibility, r as CdnAssetUrlOptions, s as CreateMultipartUploadPartOptions, t as AssetContentOptions, u as FolderIdOptions, v as MultipartUploadPartOptions, w as UpdateFolderOptions, x as RetryAssetOptions, y as RequestOptions, z as EventFact } from "./CalmLensTypes-BpmT60j-.js";
1
+ import { A as GetEventsResponse, B as EventFactValues, C as UpdateAssetOptions, D as GetAssetChildrenResponse, E as VerifyWebhookSignatureOptions, F as Folder, G as AssetStatus, H as EventSeverity, I as Event, J as MetadataItem, K as AssetType, L as TypedEvent, M as RequestErrorCode, O as GetAssetResponse, P as Lens, R as EventCategory, S as SubmitAssetOptions, T as UploadAssetPartOptions, U as EventType, V as EventFacts, W as Asset, Y as ProcessingOptions, _ as MultipartUploadOptions, a as CreateAssetSignedUrlOptions, b as RetrieveAssetOptions, c as EnsureLensOptions, d as ListAssetChildrenOptions, f as ListAssetsOptions, g as MoveFolderOptions, h as MoveAssetOptions, i as CdnServeOptions, j as PostAssetSignedUrlResponse, k as GetAssetsPageResponse, l as EnsureLensesOptions, m as ModerateTextOptions, n as CalmLensClientOptions, o as CreateFolderOptions, p as ListEventsOptions, q as AssetVisibility, r as CdnAssetUrlOptions, s as CreateMultipartUploadPartOptions, t as AssetContentOptions, u as FolderIdOptions, v as MultipartUploadPartOptions, w as UpdateFolderOptions, x as RetryAssetOptions, y as RequestOptions, z as EventFact } from "./CalmLensTypes-B7hr0SBv.js";
2
2
  import * as zod from "zod";
3
3
  //#region ../shared/src/AssetSearch.d.ts
4
4
  declare const ASSET_SEARCH_QUERY_SCHEMA: zod.ZodObject<{
package/cjs/testing.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as GetEventsResponse, C as UpdateAssetOptions, D as GetAssetChildrenResponse, F as Folder, G as AssetStatus, N as AssetBinaryPayloadInput, O as GetAssetResponse, P as Lens, S as SubmitAssetOptions, T as UploadAssetPartOptions, W as Asset, a as CreateAssetSignedUrlOptions, b as RetrieveAssetOptions, c as EnsureLensOptions, d as ListAssetChildrenOptions, f as ListAssetsOptions, g as MoveFolderOptions, h as MoveAssetOptions, i as CdnServeOptions, j as PostAssetSignedUrlResponse, k as GetAssetsPageResponse, l as EnsureLensesOptions, m as ModerateTextOptions, n as CalmLensClientOptions, o as CreateFolderOptions, p as ListEventsOptions, r as CdnAssetUrlOptions, u as FolderIdOptions, w as UpdateFolderOptions, x as RetryAssetOptions } from "./CalmLensTypes-BpmT60j-.js";
1
+ import { A as GetEventsResponse, C as UpdateAssetOptions, D as GetAssetChildrenResponse, F as Folder, G as AssetStatus, N as AssetBinaryPayloadInput, O as GetAssetResponse, P as Lens, S as SubmitAssetOptions, T as UploadAssetPartOptions, W as Asset, a as CreateAssetSignedUrlOptions, b as RetrieveAssetOptions, c as EnsureLensOptions, d as ListAssetChildrenOptions, f as ListAssetsOptions, g as MoveFolderOptions, h as MoveAssetOptions, i as CdnServeOptions, j as PostAssetSignedUrlResponse, k as GetAssetsPageResponse, l as EnsureLensesOptions, m as ModerateTextOptions, n as CalmLensClientOptions, o as CreateFolderOptions, p as ListEventsOptions, r as CdnAssetUrlOptions, u as FolderIdOptions, w as UpdateFolderOptions, x as RetryAssetOptions } from "./CalmLensTypes-B7hr0SBv.js";
2
2
  import * as zod from "zod";
3
3
  //#region ../shared/src/Permissions.d.ts
4
4
  declare const GRANT_SCHEMA: zod.ZodObject<{
@@ -2979,6 +2979,109 @@ declare const EVENT_TYPE_INFO: {
2979
2979
  lastError: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
2980
2980
  }, zod.core.$strip>;
2981
2981
  };
2982
+ readonly "appeal.submitted": {
2983
+ id: "appeal.submitted";
2984
+ name: string;
2985
+ description: string;
2986
+ category: EventCategory;
2987
+ severity: EventSeverity;
2988
+ /** Whether the in-app connector (notification bell) subscribes to the type by default. */
2989
+ notify: boolean;
2990
+ fields: {
2991
+ appealId: EventFieldDefinition<zod.ZodString>;
2992
+ subjectType: EventFieldDefinition<zod.ZodEnum<{
2993
+ post: "post";
2994
+ "reported-post": "reported-post";
2995
+ "reported-user": "reported-user";
2996
+ user: "user";
2997
+ }>>;
2998
+ subjectId: EventFieldDefinition<zod.ZodString>;
2999
+ };
3000
+ /** Example data, used for synthetic test sends (`createSampleEvent`). */
3001
+ example: NoInfer<{
3002
+ appealId: string;
3003
+ subjectType: "post" | "reported-post" | "reported-user" | "user";
3004
+ subjectId: string;
3005
+ }>;
3006
+ factInfo: {
3007
+ label: string;
3008
+ description: string;
3009
+ display: EventFieldDisplay;
3010
+ /** Kept in the data but left out of rendered messages (usually an ID shown by another field). */
3011
+ hidden?: boolean;
3012
+ schema: zod.ZodType<unknown, unknown, zod.core.$ZodTypeInternals<unknown, unknown>>;
3013
+ key: string;
3014
+ }[];
3015
+ values: zod.ZodObject<{
3016
+ appealId: zod.ZodString;
3017
+ subjectType: zod.ZodEnum<{
3018
+ post: "post";
3019
+ "reported-post": "reported-post";
3020
+ "reported-user": "reported-user";
3021
+ user: "user";
3022
+ }>;
3023
+ subjectId: zod.ZodString;
3024
+ }, zod.core.$strip>;
3025
+ };
3026
+ readonly "appeal.resolved": {
3027
+ id: "appeal.resolved";
3028
+ name: string;
3029
+ description: string;
3030
+ category: EventCategory;
3031
+ severity: EventSeverity;
3032
+ /** Whether the in-app connector (notification bell) subscribes to the type by default. */
3033
+ notify: boolean;
3034
+ fields: {
3035
+ appealId: EventFieldDefinition<zod.ZodString>;
3036
+ subjectType: EventFieldDefinition<zod.ZodEnum<{
3037
+ post: "post";
3038
+ "reported-post": "reported-post";
3039
+ "reported-user": "reported-user";
3040
+ user: "user";
3041
+ }>>;
3042
+ subjectId: EventFieldDefinition<zod.ZodString>;
3043
+ decision: EventFieldDefinition<zod.ZodEnum<{
3044
+ overturned: "overturned";
3045
+ upheld: "upheld";
3046
+ }>>;
3047
+ action: EventFieldDefinition<zod.ZodString>;
3048
+ appliedToAsset: EventFieldDefinition<zod.ZodBoolean>;
3049
+ };
3050
+ /** Example data, used for synthetic test sends (`createSampleEvent`). */
3051
+ example: NoInfer<{
3052
+ appealId: string;
3053
+ subjectType: "post" | "reported-post" | "reported-user" | "user";
3054
+ subjectId: string;
3055
+ decision: "overturned" | "upheld";
3056
+ action: string;
3057
+ appliedToAsset: boolean;
3058
+ }>;
3059
+ factInfo: {
3060
+ label: string;
3061
+ description: string;
3062
+ display: EventFieldDisplay;
3063
+ /** Kept in the data but left out of rendered messages (usually an ID shown by another field). */
3064
+ hidden?: boolean;
3065
+ schema: zod.ZodType<unknown, unknown, zod.core.$ZodTypeInternals<unknown, unknown>>;
3066
+ key: string;
3067
+ }[];
3068
+ values: zod.ZodObject<{
3069
+ appealId: zod.ZodString;
3070
+ subjectType: zod.ZodEnum<{
3071
+ post: "post";
3072
+ "reported-post": "reported-post";
3073
+ "reported-user": "reported-user";
3074
+ user: "user";
3075
+ }>;
3076
+ subjectId: zod.ZodString;
3077
+ decision: zod.ZodEnum<{
3078
+ overturned: "overturned";
3079
+ upheld: "upheld";
3080
+ }>;
3081
+ action: zod.ZodString;
3082
+ appliedToAsset: zod.ZodBoolean;
3083
+ }, zod.core.$strip>;
3084
+ };
2982
3085
  };
2983
3086
  type EventType = keyof typeof EVENT_TYPE_INFO;
2984
3087
  type EventTypeInfo<TType extends EventType = EventType> = (typeof EVENT_TYPE_INFO)[TType];
@@ -3022,6 +3125,8 @@ declare const EVENT_SCHEMA: zod.ZodObject<{
3022
3125
  projectId: zod.ZodString;
3023
3126
  userId: zod.ZodOptional<zod.ZodNullable<zod.ZodPipe<zod.ZodString, zod.ZodTransform<string, string>>>>;
3024
3127
  type: zod.ZodEnum<{
3128
+ "appeal.resolved": "appeal.resolved";
3129
+ "appeal.submitted": "appeal.submitted";
3025
3130
  "asset.approved": "asset.approved";
3026
3131
  "asset.classified": "asset.classified";
3027
3132
  "asset.failed": "asset.failed";
package/esm/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as GetEventsResponse, B as EventFactValues, C as UpdateAssetOptions, D as GetAssetChildrenResponse, E as VerifyWebhookSignatureOptions, F as Folder, G as AssetStatus, H as EventSeverity, I as Event, J as MetadataItem, K as AssetType, L as TypedEvent, M as RequestErrorCode, O as GetAssetResponse, P as Lens, R as EventCategory, S as SubmitAssetOptions, T as UploadAssetPartOptions, U as EventType, V as EventFacts, W as Asset, Y as ProcessingOptions, _ as MultipartUploadOptions, a as CreateAssetSignedUrlOptions, b as RetrieveAssetOptions, c as EnsureLensOptions, d as ListAssetChildrenOptions, f as ListAssetsOptions, g as MoveFolderOptions, h as MoveAssetOptions, i as CdnServeOptions, j as PostAssetSignedUrlResponse, k as GetAssetsPageResponse, l as EnsureLensesOptions, m as ModerateTextOptions, n as CalmLensClientOptions, o as CreateFolderOptions, p as ListEventsOptions, q as AssetVisibility, r as CdnAssetUrlOptions, s as CreateMultipartUploadPartOptions, t as AssetContentOptions, u as FolderIdOptions, v as MultipartUploadPartOptions, w as UpdateFolderOptions, x as RetryAssetOptions, y as RequestOptions, z as EventFact } from "./CalmLensTypes-BpmT60j-.js";
1
+ import { A as GetEventsResponse, B as EventFactValues, C as UpdateAssetOptions, D as GetAssetChildrenResponse, E as VerifyWebhookSignatureOptions, F as Folder, G as AssetStatus, H as EventSeverity, I as Event, J as MetadataItem, K as AssetType, L as TypedEvent, M as RequestErrorCode, O as GetAssetResponse, P as Lens, R as EventCategory, S as SubmitAssetOptions, T as UploadAssetPartOptions, U as EventType, V as EventFacts, W as Asset, Y as ProcessingOptions, _ as MultipartUploadOptions, a as CreateAssetSignedUrlOptions, b as RetrieveAssetOptions, c as EnsureLensOptions, d as ListAssetChildrenOptions, f as ListAssetsOptions, g as MoveFolderOptions, h as MoveAssetOptions, i as CdnServeOptions, j as PostAssetSignedUrlResponse, k as GetAssetsPageResponse, l as EnsureLensesOptions, m as ModerateTextOptions, n as CalmLensClientOptions, o as CreateFolderOptions, p as ListEventsOptions, q as AssetVisibility, r as CdnAssetUrlOptions, s as CreateMultipartUploadPartOptions, t as AssetContentOptions, u as FolderIdOptions, v as MultipartUploadPartOptions, w as UpdateFolderOptions, x as RetryAssetOptions, y as RequestOptions, z as EventFact } from "./CalmLensTypes-B7hr0SBv.js";
2
2
  import * as zod from "zod";
3
3
  //#region ../shared/src/AssetSearch.d.ts
4
4
  declare const ASSET_SEARCH_QUERY_SCHEMA: zod.ZodObject<{
package/esm/testing.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as GetEventsResponse, C as UpdateAssetOptions, D as GetAssetChildrenResponse, F as Folder, G as AssetStatus, N as AssetBinaryPayloadInput, O as GetAssetResponse, P as Lens, S as SubmitAssetOptions, T as UploadAssetPartOptions, W as Asset, a as CreateAssetSignedUrlOptions, b as RetrieveAssetOptions, c as EnsureLensOptions, d as ListAssetChildrenOptions, f as ListAssetsOptions, g as MoveFolderOptions, h as MoveAssetOptions, i as CdnServeOptions, j as PostAssetSignedUrlResponse, k as GetAssetsPageResponse, l as EnsureLensesOptions, m as ModerateTextOptions, n as CalmLensClientOptions, o as CreateFolderOptions, p as ListEventsOptions, r as CdnAssetUrlOptions, u as FolderIdOptions, w as UpdateFolderOptions, x as RetryAssetOptions } from "./CalmLensTypes-BpmT60j-.js";
1
+ import { A as GetEventsResponse, C as UpdateAssetOptions, D as GetAssetChildrenResponse, F as Folder, G as AssetStatus, N as AssetBinaryPayloadInput, O as GetAssetResponse, P as Lens, S as SubmitAssetOptions, T as UploadAssetPartOptions, W as Asset, a as CreateAssetSignedUrlOptions, b as RetrieveAssetOptions, c as EnsureLensOptions, d as ListAssetChildrenOptions, f as ListAssetsOptions, g as MoveFolderOptions, h as MoveAssetOptions, i as CdnServeOptions, j as PostAssetSignedUrlResponse, k as GetAssetsPageResponse, l as EnsureLensesOptions, m as ModerateTextOptions, n as CalmLensClientOptions, o as CreateFolderOptions, p as ListEventsOptions, r as CdnAssetUrlOptions, u as FolderIdOptions, w as UpdateFolderOptions, x as RetryAssetOptions } from "./CalmLensTypes-B7hr0SBv.js";
2
2
  import * as zod from "zod";
3
3
  //#region ../shared/src/Permissions.d.ts
4
4
  declare const GRANT_SCHEMA: zod.ZodObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calmlens/sdk",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/Censkh/CalmLens.git",