@devvit/public-api 0.11.0-next-2024-07-24-919ab41f5.0 → 0.11.0-next-2024-07-24-c05ad243f.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -632,7 +632,7 @@ export declare class RedditAPIClient {
632
632
  * @param options - Options for the request
633
633
  * @param options.subreddit - The name of the subreddit to add the mod note to. e.g. 'memes'
634
634
  * @param options.user - The username of the user to add the mod note to. e.g. 'spez'
635
- * @param options.redditId - The ID of the comment or post to add the mod note to. e.g. 't3_1234'
635
+ * @param options.redditId - (optional) The ID of the comment or post to add the mod note to. e.g. 't3_1234'
636
636
  * @param options.label - The label of the mod note. e.g. 'SPAM_WARNING'
637
637
  * @param options.note - The text of the mod note.
638
638
  * @returns A Promise that resolves if the mod note was successfully added.
@@ -805,7 +805,7 @@ export class RedditAPIClient {
805
805
  * @param options - Options for the request
806
806
  * @param options.subreddit - The name of the subreddit to add the mod note to. e.g. 'memes'
807
807
  * @param options.user - The username of the user to add the mod note to. e.g. 'spez'
808
- * @param options.redditId - The ID of the comment or post to add the mod note to. e.g. 't3_1234'
808
+ * @param options.redditId - (optional) The ID of the comment or post to add the mod note to. e.g. 't3_1234'
809
809
  * @param options.label - The label of the mod note. e.g. 'SPAM_WARNING'
810
810
  * @param options.note - The text of the mod note.
811
811
  * @returns A Promise that resolves if the mod note was successfully added.
@@ -813,7 +813,7 @@ export class RedditAPIClient {
813
813
  addModNote(options) {
814
814
  const req = {
815
815
  ...options,
816
- redditId: asTID(options.redditId),
816
+ redditId: options.redditId ? asTID(options.redditId) : undefined,
817
817
  };
818
818
  return ModNote.add(req, __classPrivateFieldGet(this, _RedditAPIClient_metadata, "f"));
819
819
  }
@@ -33,7 +33,7 @@ export type GetModNotesOptions = Prettify<Pick<GetNotesRequest, 'subreddit' | 'u
33
33
  filter?: ModNoteType;
34
34
  } & Pick<ListingFetchOptions, 'limit' | 'before'>>;
35
35
  export type CreateModNoteOptions = Prettify<PostNotesRequest & {
36
- redditId: T1ID | T3ID;
36
+ redditId?: T1ID | T3ID;
37
37
  label: UserNoteLabel;
38
38
  }>;
39
39
  export type DeleteNotesOptions = Prettify<DeleteNotesRequest>;
@@ -1 +1 @@
1
- {"version":3,"file":"ModNote.d.ts","sourceRoot":"","sources":["../../../../src/apis/reddit/models/ModNote.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EAGf,gBAAgB,EAChB,sBAAsB,EACvB,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAG1E,OAAO,KAAK,EAAE,mBAAmB,EAAwB,MAAM,cAAc,CAAC;AAE9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,UAAU,GACV,SAAS,GACT,KAAK,GACL,MAAM,GACN,QAAQ,GACR,MAAM,GACN,gBAAgB,GAChB,YAAY,GACZ,KAAK,CAAC;AAEV,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,WAAW,GACX,KAAK,GACL,eAAe,GACf,cAAc,GACd,YAAY,GACZ,mBAAmB,GACnB,cAAc,CAAC;AAoBnB,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC7B,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE;QACR,EAAE,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;QACtB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAC3B,CAAC;IACF,IAAI,EAAE;QACJ,EAAE,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;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AG,IAAI,CAAC,mBAAmB,EAAE,OAAO,GAAG,QAAQ,CAAC,CAClD,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CACzC,gBAAgB,GAAG;IACjB,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,KAAK,EAAE,aAAa,CAAC;CACtB,CACF,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC,kBAAkB,CAAC,CAAC;AAE9D,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC,sBAAsB,CAAC,CAAC;AAErE,qBAAa,OAAO;;CAoHnB"}
package/meta.json CHANGED
@@ -11455,7 +11455,7 @@
11455
11455
  "format": "esm"
11456
11456
  },
11457
11457
  "src/apis/reddit/RedditAPIClient.ts": {
11458
- "bytes": 55774,
11458
+ "bytes": 55816,
11459
11459
  "imports": [
11460
11460
  {
11461
11461
  "path": "../shared-types/dist/Header.js",
@@ -12669,7 +12669,7 @@
12669
12669
  "format": "esm"
12670
12670
  },
12671
12671
  "src/apis/reddit/models/ModNote.ts": {
12672
- "bytes": 6442,
12672
+ "bytes": 6443,
12673
12673
  "imports": [
12674
12674
  {
12675
12675
  "path": "../shared-types/dist/NonNull.js",
@@ -14307,7 +14307,7 @@
14307
14307
  "bytesInOutput": 345
14308
14308
  },
14309
14309
  "src/apis/reddit/RedditAPIClient.ts": {
14310
- "bytesInOutput": 50183
14310
+ "bytesInOutput": 50222
14311
14311
  },
14312
14312
  "src/apis/redis/RedisClient.ts": {
14313
14313
  "bytesInOutput": 17916
@@ -14508,7 +14508,7 @@
14508
14508
  "bytesInOutput": 4358
14509
14509
  }
14510
14510
  },
14511
- "bytes": 15030071
14511
+ "bytes": 15030190
14512
14512
  }
14513
14513
  }
14514
14514
  }
package/meta.min.json CHANGED
@@ -2784,7 +2784,7 @@
2784
2784
  "format": "esm"
2785
2785
  },
2786
2786
  "src/apis/reddit/RedditAPIClient.ts": {
2787
- "bytes": 55774,
2787
+ "bytes": 55816,
2788
2788
  "imports": [
2789
2789
  {
2790
2790
  "path": "../shared-types/dist/Header.js",
@@ -3998,7 +3998,7 @@
3998
3998
  "format": "esm"
3999
3999
  },
4000
4000
  "src/apis/reddit/models/ModNote.ts": {
4001
- "bytes": 6442,
4001
+ "bytes": 6443,
4002
4002
  "imports": [
4003
4003
  {
4004
4004
  "path": "../shared-types/dist/NonNull.js",
@@ -4716,7 +4716,7 @@
4716
4716
  "imports": [],
4717
4717
  "exports": [],
4718
4718
  "inputs": {},
4719
- "bytes": 1181597
4719
+ "bytes": 1181656
4720
4720
  },
4721
4721
  "dist/public-api.min.js": {
4722
4722
  "imports": [
@@ -5335,7 +5335,7 @@
5335
5335
  "bytesInOutput": 154
5336
5336
  },
5337
5337
  "src/apis/reddit/RedditAPIClient.ts": {
5338
- "bytesInOutput": 6909
5338
+ "bytesInOutput": 6927
5339
5339
  },
5340
5340
  "src/apis/redis/RedisClient.ts": {
5341
5341
  "bytesInOutput": 8745
@@ -5527,7 +5527,7 @@
5527
5527
  "bytesInOutput": 2083
5528
5528
  }
5529
5529
  },
5530
- "bytes": 250880
5530
+ "bytes": 250898
5531
5531
  }
5532
5532
  }
5533
5533
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devvit/public-api",
3
- "version": "0.11.0-next-2024-07-24-919ab41f5.0",
3
+ "version": "0.11.0-next-2024-07-24-c05ad243f.0",
4
4
  "license": "BSD-3-Clause",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,8 +30,8 @@
30
30
  },
31
31
  "types": "./index.d.ts",
32
32
  "dependencies": {
33
- "@devvit/protos": "0.11.0-next-2024-07-24-919ab41f5.0",
34
- "@devvit/shared-types": "0.11.0-next-2024-07-24-919ab41f5.0",
33
+ "@devvit/protos": "0.11.0-next-2024-07-24-c05ad243f.0",
34
+ "@devvit/shared-types": "0.11.0-next-2024-07-24-c05ad243f.0",
35
35
  "base64-js": "1.5.1",
36
36
  "clone-deep": "4.0.1",
37
37
  "core-js": "3.27.2",
@@ -39,9 +39,9 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "@ampproject/filesize": "4.3.0",
42
- "@devvit/eslint-config": "0.11.0-next-2024-07-24-919ab41f5.0",
43
- "@devvit/repo-tools": "0.11.0-next-2024-07-24-919ab41f5.0",
44
- "@devvit/tsconfig": "0.11.0-next-2024-07-24-919ab41f5.0",
42
+ "@devvit/eslint-config": "0.11.0-next-2024-07-24-c05ad243f.0",
43
+ "@devvit/repo-tools": "0.11.0-next-2024-07-24-c05ad243f.0",
44
+ "@devvit/tsconfig": "0.11.0-next-2024-07-24-c05ad243f.0",
45
45
  "@microsoft/api-extractor": "7.41.0",
46
46
  "@reddit/faceplate-ui": "11.3.3",
47
47
  "@types/clone-deep": "4.0.1",
@@ -64,5 +64,5 @@
64
64
  }
65
65
  },
66
66
  "source": "./src/index.ts",
67
- "gitHead": "e966605bac9112be583a0da1dd7ed18f24da1e7e"
67
+ "gitHead": "b170d05e209f6dec4ea7c56f7ef2f811dec4dab0"
68
68
  }
package/public-api.d.ts CHANGED
@@ -6560,7 +6560,7 @@ export declare type CreateFlairTemplateOptions = {
6560
6560
  };
6561
6561
 
6562
6562
  export declare type CreateModNoteOptions = Prettify<PostNotesRequest & {
6563
- redditId: T1ID | T3ID;
6563
+ redditId?: T1ID | T3ID;
6564
6564
  label: UserNoteLabel;
6565
6565
  }>;
6566
6566
 
@@ -44208,7 +44208,7 @@ export declare class RedditAPIClient {
44208
44208
  * @param options - Options for the request
44209
44209
  * @param options.subreddit - The name of the subreddit to add the mod note to. e.g. 'memes'
44210
44210
  * @param options.user - The username of the user to add the mod note to. e.g. 'spez'
44211
- * @param options.redditId - The ID of the comment or post to add the mod note to. e.g. 't3_1234'
44211
+ * @param options.redditId - (optional) The ID of the comment or post to add the mod note to. e.g. 't3_1234'
44212
44212
  * @param options.label - The label of the mod note. e.g. 'SPAM_WARNING'
44213
44213
  * @param options.note - The text of the mod note.
44214
44214
  * @returns A Promise that resolves if the mod note was successfully added.