@devvit/public-api 0.11.10 → 0.11.11-next-2025-03-18-8a91fd0df.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/public-api.d.ts CHANGED
@@ -39,6 +39,7 @@ import _m0 from 'protobufjs/minimal.js';
39
39
  import { Observable } from 'rxjs';
40
40
  import { OrderResultStatus as OrderResultStatus_2 } from '../../../../../payments.js';
41
41
  import { RealtimeSubscriptionStatus as RealtimeSubscriptionStatus_2 } from '../../../../../index.js';
42
+ import { RunAs as RunAs_2 } from '../common/common_msg.js';
42
43
  import { SetCustomPostPreviewRequest_BodyType as SetCustomPostPreviewRequest_BodyType_2 } from './linksandcomments_msg.js';
43
44
  import { SubredditRating as SubredditRating_2 } from '../../../reddit/v2alpha/subredditv2.js';
44
45
  import { SubredditType as SubredditType_3 } from '../../../reddit/v2alpha/subredditv2.js';
@@ -3425,6 +3426,8 @@ declare interface CommentRequest {
3425
3426
  * @example "t3_abc123"
3426
3427
  */
3427
3428
  thingId: string;
3429
+ /** Indicates who the Comment should be created as */
3430
+ runAs: RunAs;
3428
3431
  }
3429
3432
 
3430
3433
  declare const CommentRequest: {
@@ -13702,11 +13705,13 @@ declare const LinksAndCommentsDefinition: {
13702
13705
  richtextJson?: string | undefined;
13703
13706
  text?: string;
13704
13707
  thingId?: string;
13708
+ runAs?: RunAs_2;
13705
13709
  } | undefined): CommentRequest;
13706
13710
  fromPartial(object: {
13707
13711
  richtextJson?: string | undefined;
13708
13712
  text?: string;
13709
13713
  thingId?: string;
13714
+ runAs?: RunAs_2;
13710
13715
  }): CommentRequest;
13711
13716
  };
13712
13717
  readonly requestStream: false;
@@ -14092,11 +14097,13 @@ declare const LinksAndCommentsDefinition: {
14092
14097
  richtextJson?: string | undefined;
14093
14098
  text?: string;
14094
14099
  thingId?: string;
14100
+ runAs?: RunAs_2;
14095
14101
  } | undefined): CommentRequest;
14096
14102
  fromPartial(object: {
14097
14103
  richtextJson?: string | undefined;
14098
14104
  text?: string;
14099
14105
  thingId?: string;
14106
+ runAs?: RunAs_2;
14100
14107
  }): CommentRequest;
14101
14108
  };
14102
14109
  readonly requestStream: false;
@@ -15329,7 +15336,13 @@ declare const LinksAndCommentsDefinition: {
15329
15336
  encode(message: ReportRequest, writer?: _m0.Writer): _m0.Writer;
15330
15337
  decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ReportRequest;
15331
15338
  fromJSON(object: any): ReportRequest;
15332
- toJSON(message: ReportRequest): unknown;
15339
+ toJSON(message: ReportRequest): unknown; /**
15340
+ * Toggle Contest Mode for a Post's comments
15341
+ *
15342
+ * Contest Mode randomizes the sort order and hides the vote score for comments
15343
+ *
15344
+ * @see {@link https://www.reddit.com/dev/api#POST_api_set_contest_mode}
15345
+ */
15333
15346
  create(base?: {
15334
15347
  additionalInfo?: string | undefined;
15335
15348
  customText?: string | undefined;
@@ -16135,6 +16148,11 @@ declare const LinksAndCommentsDefinition: {
16135
16148
  crosspostFullname?: string | undefined;
16136
16149
  richtextFallback?: string | undefined;
16137
16150
  imageUrls?: any[] | undefined;
16151
+ runAs?: RunAs_2;
16152
+ userGeneratedContent?: {
16153
+ text?: string;
16154
+ imageUrls?: string[];
16155
+ } | undefined;
16138
16156
  } | undefined): SubmitRequest;
16139
16157
  fromPartial(object: {
16140
16158
  collectionId?: string | undefined;
@@ -16153,6 +16171,11 @@ declare const LinksAndCommentsDefinition: {
16153
16171
  crosspostFullname?: string | undefined;
16154
16172
  richtextFallback?: string | undefined;
16155
16173
  imageUrls?: any[] | undefined;
16174
+ runAs?: RunAs_2;
16175
+ userGeneratedContent?: {
16176
+ text?: string;
16177
+ imageUrls?: string[];
16178
+ } | undefined;
16156
16179
  }): SubmitRequest;
16157
16180
  };
16158
16181
  readonly requestStream: false;
@@ -16220,6 +16243,11 @@ declare const LinksAndCommentsDefinition: {
16220
16243
  crosspostFullname?: string | undefined;
16221
16244
  richtextFallback?: string | undefined;
16222
16245
  imageUrls?: any[] | undefined;
16246
+ runAs?: RunAs_2;
16247
+ userGeneratedContent?: {
16248
+ text?: string;
16249
+ imageUrls?: string[];
16250
+ } | undefined;
16223
16251
  } | undefined): SubmitRequest;
16224
16252
  fromPartial(object: {
16225
16253
  collectionId?: string | undefined;
@@ -16238,6 +16266,11 @@ declare const LinksAndCommentsDefinition: {
16238
16266
  crosspostFullname?: string | undefined;
16239
16267
  richtextFallback?: string | undefined;
16240
16268
  imageUrls?: any[] | undefined;
16269
+ runAs?: RunAs_2;
16270
+ userGeneratedContent?: {
16271
+ text?: string;
16272
+ imageUrls?: string[];
16273
+ } | undefined;
16241
16274
  }): SubmitRequest;
16242
16275
  };
16243
16276
  readonly requestStream: false;
@@ -36463,8 +36496,11 @@ declare namespace protos {
36463
36496
  Modlog,
36464
36497
  ModlogServiceName,
36465
36498
  ModlogClientImpl,
36499
+ runAsFromJSON,
36500
+ runAsToJSON,
36466
36501
  apiClientConfig_BodyTypeFromJSON,
36467
36502
  apiClientConfig_BodyTypeToJSON,
36503
+ RunAs,
36468
36504
  Listing_2 as Listing,
36469
36505
  Listing_ListingData,
36470
36506
  WrappedRedditObject,
@@ -36482,6 +36518,7 @@ declare namespace protos {
36482
36518
  WrappedUserObject,
36483
36519
  ApiClientConfig,
36484
36520
  ApiClientConfig_BodyType,
36521
+ UserGeneratedContent,
36485
36522
  ClearFlairTemplatesRequest,
36486
36523
  DeleteFlairRequest,
36487
36524
  DeleteFlairTemplateRequest,
@@ -41474,6 +41511,17 @@ declare interface Rpc_9 {
41474
41511
  request(service: string, method: string, data: Uint8Array, metadata?: Metadata): Promise<Uint8Array>;
41475
41512
  }
41476
41513
 
41514
+ /** Indicates who the request should be made on behalf of. Currently, only 'APP' or 'USER' types are supported. */
41515
+ declare enum RunAs {
41516
+ APP = 0,
41517
+ USER = 1,
41518
+ UNRECOGNIZED = -1
41519
+ }
41520
+
41521
+ declare function runAsFromJSON(object: any): RunAs;
41522
+
41523
+ declare function runAsToJSON(object: RunAs): number;
41524
+
41477
41525
  /**
41478
41526
  * Schedule a new job to run at a specific time or on a cron schedule
41479
41527
  * @param job The job to schedule
@@ -42997,6 +43045,10 @@ declare interface SubmitRequest {
42997
43045
  richtextFallback?: string | undefined;
42998
43046
  /** If `kind` is "image" this must be set to the images URLs */
42999
43047
  imageUrls?: Array<any> | undefined;
43048
+ /** Indicates who the Post should be submited as */
43049
+ runAs: RunAs;
43050
+ /** The UserGeneratedContent attached to the Post */
43051
+ userGeneratedContent?: UserGeneratedContent | undefined;
43000
43052
  }
43001
43053
 
43002
43054
  declare const SubmitRequest: {
@@ -51385,6 +51437,24 @@ declare const UserFlairV2: {
51385
51437
  fromPartial(object: DeepPartial_19<UserFlairV2>): UserFlairV2;
51386
51438
  };
51387
51439
 
51440
+ /** Represents data on the user's content submission */
51441
+ declare interface UserGeneratedContent {
51442
+ /** The text body of the content */
51443
+ text: string;
51444
+ /** The imageUrls attached to the content, if any */
51445
+ imageUrls: string[];
51446
+ }
51447
+
51448
+ declare const UserGeneratedContent: {
51449
+ $type: "devvit.plugin.redditapi.common.UserGeneratedContent";
51450
+ encode(message: UserGeneratedContent, writer?: _m0.Writer): _m0.Writer;
51451
+ decode(input: _m0.Reader | Uint8Array, length?: number): UserGeneratedContent;
51452
+ fromJSON(object: any): UserGeneratedContent;
51453
+ toJSON(message: UserGeneratedContent): unknown;
51454
+ create(base?: DeepPartial_9<UserGeneratedContent>): UserGeneratedContent;
51455
+ fromPartial(object: DeepPartial_9<UserGeneratedContent>): UserGeneratedContent;
51456
+ };
51457
+
51388
51458
  declare type UserLink = {
51389
51459
  e: typeof USER_LINK_ELEMENT;
51390
51460
  t: string;
@@ -53307,6 +53377,8 @@ export declare type UseWebViewResult<To extends JSONValue = JSONValue> = {
53307
53377
  postMessage(message: To): void;
53308
53378
  /** Initiate a request for the web view to open */
53309
53379
  mount(): void;
53380
+ /** Initiate a request for the web view to be closed */
53381
+ unmount(): void;
53310
53382
  };
53311
53383
 
53312
53384
  export declare type ValidatedBooleanField = Prettify<ValidatedFormField<BooleanField, boolean>>;