@devvit/public-api 0.11.0-next-2024-08-15-37b3f7371.0 → 0.11.0-next-2024-08-20-4ebb1a01f.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"ui-request-handler.d.ts","sourceRoot":"","sources":["../../../src/devvit/internals/ui-request-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,QAAQ,EAAoB,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACxF,OAAO,EAAwB,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAgB7D,wBAAgB,WAAW,CACzB,SAAS,EAAE,GAAG,CAAC,iBAAiB,GAC/B,CAAC,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,KAAK,OAAO,CAAC,UAAU,CAAC,CAK7D;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAK9D"}
1
+ {"version":3,"file":"ui-request-handler.d.ts","sourceRoot":"","sources":["../../../src/devvit/internals/ui-request-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,QAAQ,EAAoB,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACxF,OAAO,EAAwB,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAqB7D,wBAAgB,WAAW,CACzB,SAAS,EAAE,GAAG,CAAC,iBAAiB,GAC/B,CAAC,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,KAAK,OAAO,CAAC,UAAU,CAAC,CAW7D;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAK9D"}
@@ -2,6 +2,7 @@ import { CustomPostDefinition, UIResponse } from '@devvit/protos';
2
2
  import { Devvit } from '../Devvit.js';
3
3
  import { BlocksHandler } from './blocks/handler/BlocksHandler.js';
4
4
  import { extendDevvitPrototype } from './helpers/extendDevvitPrototype.js';
5
+ import { makeUpgradeAppComponent, parseDevvitUserAgent, shouldShowUpgradeAppScreen, } from './upgrade-app-shim.js';
5
6
  /**
6
7
  * Extend me to add new surfaces to Devvit.
7
8
  */
@@ -14,6 +15,11 @@ const UIComponentBindings = [
14
15
  ];
15
16
  export function makeHandler(component) {
16
17
  return async (req, metadata) => {
18
+ const parsedUserAgent = parseDevvitUserAgent(metadata['devvit-user-agent']?.values?.[0] ?? '');
19
+ if (parsedUserAgent && shouldShowUpgradeAppScreen(parsedUserAgent)) {
20
+ const handler = new BlocksHandler(makeUpgradeAppComponent(parsedUserAgent.platform));
21
+ return UIResponse.fromJSON(await handler.handle(req, metadata));
22
+ }
17
23
  const handler = new BlocksHandler(component);
18
24
  return UIResponse.fromJSON(await handler.handle(req, metadata));
19
25
  };
@@ -0,0 +1,29 @@
1
+ /** @jsx Devvit.createElement */
2
+ /** @jsxFrag Devvit.Fragment */
3
+ import { Devvit } from '../Devvit.js';
4
+ export type ParsedDevvitUserAgent = {
5
+ company: 'Reddit';
6
+ platform: 'iOS';
7
+ rawVersion: string;
8
+ versionNumber: number;
9
+ } | {
10
+ company: 'Reddit';
11
+ platform: 'Android';
12
+ rawVersion: string;
13
+ versionNumber: number;
14
+ } | {
15
+ company: 'Reddit';
16
+ platform: 'Shreddit';
17
+ rawVersion: string;
18
+ } | {
19
+ company: 'Reddit';
20
+ platform: 'Play';
21
+ rawVersion: string;
22
+ };
23
+ export declare const parseDevvitUserAgent: (input: string) => ParsedDevvitUserAgent | undefined;
24
+ export declare const shouldShowUpgradeAppScreen: (parsedDevvitUserAgent: ParsedDevvitUserAgent | undefined) => boolean;
25
+ export declare const UpgradeAppComponent: Devvit.BlockComponent<{
26
+ platform: ParsedDevvitUserAgent['platform'];
27
+ }>;
28
+ export declare const makeUpgradeAppComponent: (platform: ParsedDevvitUserAgent['platform']) => () => JSX.Element;
29
+ //# sourceMappingURL=upgrade-app-shim.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upgrade-app-shim.d.ts","sourceRoot":"","sources":["../../../src/devvit/internals/upgrade-app-shim.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,+BAA+B;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,MAAM,MAAM,qBAAqB,GAC7B;IACE,OAAO,EAAE,QAAQ,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACvB,GACD;IACE,OAAO,EAAE,QAAQ,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACvB,GACD;IACE,OAAO,EAAE,QAAQ,CAAC;IAClB,QAAQ,EAAE,UAAU,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB,GACD;IACE,OAAO,EAAE,QAAQ,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAON,eAAO,MAAM,oBAAoB,UAAW,MAAM,KAAG,qBAAqB,GAAG,SA8D5E,CAAC;AAEF,eAAO,MAAM,0BAA0B,0BACd,qBAAqB,GAAG,SAAS,KACvD,OAmBF,CAAC;AAkBF,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,cAAc,CAAC;IACtD,QAAQ,EAAE,qBAAqB,CAAC,UAAU,CAAC,CAAC;CAC7C,CA8BA,CAAC;AAKF,eAAO,MAAM,uBAAuB,aAAc,qBAAqB,CAAC,UAAU,CAAC,sBAElF,CAAC"}
@@ -0,0 +1,109 @@
1
+ /** @jsx Devvit.createElement */
2
+ /** @jsxFrag Devvit.Fragment */
3
+ import { Devvit } from '../Devvit.js';
4
+ const getVersionNumberFromRawVersion = (rawVersion) => {
5
+ const versionNumber = Number(rawVersion.trim().split('.').pop());
6
+ return isNaN(versionNumber) ? undefined : versionNumber;
7
+ };
8
+ export const parseDevvitUserAgent = (input) => {
9
+ const [company, platform, rawVersion] = input.trim().split(';');
10
+ if (!company || !platform || !rawVersion) {
11
+ console.warn(`Received a malformed devvit-user-agent! Received: '${input}'`);
12
+ return;
13
+ }
14
+ if (company !== 'Reddit') {
15
+ console.warn(`Received unknown company name in user agent! Received: '${input}'`);
16
+ return;
17
+ }
18
+ if (platform === 'iOS') {
19
+ const versionNumber = getVersionNumberFromRawVersion(rawVersion);
20
+ if (versionNumber === undefined) {
21
+ console.warn(`Could not parse version number from user agent! Received: '${input}'`);
22
+ return;
23
+ }
24
+ return {
25
+ company: 'Reddit',
26
+ platform: 'iOS',
27
+ rawVersion,
28
+ versionNumber,
29
+ };
30
+ }
31
+ if (platform === 'Android') {
32
+ const versionNumber = getVersionNumberFromRawVersion(rawVersion);
33
+ if (versionNumber === undefined) {
34
+ console.warn(`Could not parse version number from user agent! Received: '${input}'`);
35
+ return;
36
+ }
37
+ return {
38
+ company: 'Reddit',
39
+ platform: 'Android',
40
+ rawVersion,
41
+ versionNumber,
42
+ };
43
+ }
44
+ if (platform === 'Shreddit') {
45
+ return {
46
+ company: 'Reddit',
47
+ platform: 'Shreddit',
48
+ rawVersion,
49
+ };
50
+ }
51
+ if (platform === 'Play') {
52
+ return {
53
+ company: 'Reddit',
54
+ platform: 'Play',
55
+ rawVersion,
56
+ };
57
+ }
58
+ console.warn(`Received unknown platform:`, platform);
59
+ };
60
+ export const shouldShowUpgradeAppScreen = (parsedDevvitUserAgent) => {
61
+ // If we couldn't parse, default to trying to render the app
62
+ if (!parsedDevvitUserAgent) {
63
+ console.warn(`Could not parse devvit-user-agent! Received: '${JSON.stringify(parsedDevvitUserAgent)}'`);
64
+ return false;
65
+ }
66
+ if (parsedDevvitUserAgent.platform === 'Android') {
67
+ return parsedDevvitUserAgent.versionNumber < 1819908;
68
+ }
69
+ if (parsedDevvitUserAgent.platform === 'iOS') {
70
+ return parsedDevvitUserAgent.versionNumber < 614940;
71
+ }
72
+ // Default to trying to render since we couldn't explicitly get the version number
73
+ return false;
74
+ };
75
+ const getUpgradeLinkForPlatform = (platform) => {
76
+ switch (platform) {
77
+ case 'Android':
78
+ return 'https://play.google.com/store/apps/details?id=com.reddit.frontpage';
79
+ case 'iOS':
80
+ return 'https://apps.apple.com/us/app/reddit/id1064216828';
81
+ case 'Play':
82
+ case 'Shreddit':
83
+ break;
84
+ default:
85
+ console.error(`No upgrade link for platform: ${platform}`);
86
+ }
87
+ };
88
+ export const UpgradeAppComponent = ({ platform }, context) => {
89
+ return (Devvit.createElement("blocks", null,
90
+ Devvit.createElement("vstack", { alignment: "middle center", height: 100, width: 100 },
91
+ Devvit.createElement("vstack", { maxWidth: '300px', gap: "large", alignment: "middle center" },
92
+ Devvit.createElement("vstack", { gap: "medium", alignment: "middle center" },
93
+ Devvit.createElement("image", { imageHeight: 100, imageWidth: 100, url: "https://i.redd.it/p1vmc5ulmpib1.png" }),
94
+ Devvit.createElement("text", { size: "large", weight: "bold", wrap: true, alignment: "center" }, "Uh oh, the app you're trying to use requires the latest version of Reddit. Please upgrade your app to continue.")),
95
+ Devvit.createElement("hstack", { alignment: "middle center" },
96
+ Devvit.createElement("button", { onPress: () => {
97
+ const upgradeLink = getUpgradeLinkForPlatform(platform);
98
+ if (upgradeLink) {
99
+ context.ui.navigateTo(upgradeLink);
100
+ }
101
+ else {
102
+ console.warn(`No upgrade link found for platform:`, platform);
103
+ }
104
+ } }, "Upgrade"))))));
105
+ };
106
+ // A builder to make a component so that we don't have to rename `ui-request.handler.ts` to `.tsx`
107
+ // Not that there's really anything wrong with that, but I like the separation of concerns since
108
+ // we also has to set the pragma at the top of files that use Devvit-y stuff
109
+ export const makeUpgradeAppComponent = (platform) => () => (Devvit.createElement(UpgradeAppComponent, { platform: platform }));
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upgrade-app-shim.test.d.ts","sourceRoot":"","sources":["../../../src/devvit/internals/upgrade-app-shim.test.ts"],"names":[],"mappings":""}
package/meta.json CHANGED
@@ -8547,7 +8547,7 @@
8547
8547
  "format": "esm"
8548
8548
  },
8549
8549
  "../protos/dist/types/devvit/payments/v1alpha/product.js": {
8550
- "bytes": 14853,
8550
+ "bytes": 18854,
8551
8551
  "imports": [
8552
8552
  {
8553
8553
  "path": "../../node_modules/protobufjs/minimal.js",
@@ -12544,8 +12544,19 @@
12544
12544
  ],
12545
12545
  "format": "esm"
12546
12546
  },
12547
+ "src/devvit/internals/upgrade-app-shim.tsx": {
12548
+ "bytes": 5078,
12549
+ "imports": [
12550
+ {
12551
+ "path": "src/devvit/Devvit.ts",
12552
+ "kind": "import-statement",
12553
+ "original": "../Devvit.js"
12554
+ }
12555
+ ],
12556
+ "format": "esm"
12557
+ },
12547
12558
  "src/devvit/internals/ui-request-handler.ts": {
12548
- "bytes": 1280,
12559
+ "bytes": 1746,
12549
12560
  "imports": [
12550
12561
  {
12551
12562
  "path": "../protos/dist/index.js",
@@ -12566,6 +12577,11 @@
12566
12577
  "path": "src/devvit/internals/helpers/extendDevvitPrototype.ts",
12567
12578
  "kind": "import-statement",
12568
12579
  "original": "./helpers/extendDevvitPrototype.js"
12580
+ },
12581
+ {
12582
+ "path": "src/devvit/internals/upgrade-app-shim.tsx",
12583
+ "kind": "import-statement",
12584
+ "original": "./upgrade-app-shim.js"
12569
12585
  }
12570
12586
  ],
12571
12587
  "format": "esm"
@@ -14053,7 +14069,7 @@
14053
14069
  "bytesInOutput": 29854
14054
14070
  },
14055
14071
  "../protos/dist/types/devvit/payments/v1alpha/product.js": {
14056
- "bytesInOutput": 13356
14072
+ "bytesInOutput": 16812
14057
14073
  },
14058
14074
  "../protos/dist/types/devvit/payments/v1alpha/common.js": {
14059
14075
  "bytesInOutput": 1229
@@ -14448,8 +14464,11 @@
14448
14464
  "src/devvit/internals/blocks/handler/BlocksHandler.ts": {
14449
14465
  "bytesInOutput": 14957
14450
14466
  },
14467
+ "src/devvit/internals/upgrade-app-shim.tsx": {
14468
+ "bytesInOutput": 4017
14469
+ },
14451
14470
  "src/devvit/internals/ui-request-handler.ts": {
14452
- "bytesInOutput": 645
14471
+ "bytesInOutput": 1000
14453
14472
  },
14454
14473
  "src/devvit/Devvit.ts": {
14455
14474
  "bytesInOutput": 18680
@@ -14530,7 +14549,7 @@
14530
14549
  "bytesInOutput": 370
14531
14550
  }
14532
14551
  },
14533
- "bytes": 14848869
14552
+ "bytes": 14875397
14534
14553
  }
14535
14554
  }
14536
14555
  }
package/meta.min.json CHANGED
@@ -3873,8 +3873,19 @@
3873
3873
  ],
3874
3874
  "format": "esm"
3875
3875
  },
3876
+ "src/devvit/internals/upgrade-app-shim.tsx": {
3877
+ "bytes": 5078,
3878
+ "imports": [
3879
+ {
3880
+ "path": "src/devvit/Devvit.ts",
3881
+ "kind": "import-statement",
3882
+ "original": "../Devvit.js"
3883
+ }
3884
+ ],
3885
+ "format": "esm"
3886
+ },
3876
3887
  "src/devvit/internals/ui-request-handler.ts": {
3877
- "bytes": 1280,
3888
+ "bytes": 1746,
3878
3889
  "imports": [
3879
3890
  {
3880
3891
  "path": "@devvit/protos",
@@ -3895,6 +3906,11 @@
3895
3906
  "path": "src/devvit/internals/helpers/extendDevvitPrototype.ts",
3896
3907
  "kind": "import-statement",
3897
3908
  "original": "./helpers/extendDevvitPrototype.js"
3909
+ },
3910
+ {
3911
+ "path": "src/devvit/internals/upgrade-app-shim.tsx",
3912
+ "kind": "import-statement",
3913
+ "original": "./upgrade-app-shim.js"
3898
3914
  }
3899
3915
  ],
3900
3916
  "format": "esm"
@@ -4738,7 +4754,7 @@
4738
4754
  "imports": [],
4739
4755
  "exports": [],
4740
4756
  "inputs": {},
4741
- "bytes": 1206177
4757
+ "bytes": 1214341
4742
4758
  },
4743
4759
  "dist/public-api.min.js": {
4744
4760
  "imports": [
@@ -5430,7 +5446,7 @@
5430
5446
  "bytesInOutput": 1418
5431
5447
  },
5432
5448
  "src/devvit/internals/ui-request-handler.ts": {
5433
- "bytesInOutput": 313
5449
+ "bytesInOutput": 445
5434
5450
  },
5435
5451
  "src/devvit/internals/blocks/handler/UIClient.ts": {
5436
5452
  "bytesInOutput": 967
@@ -5474,6 +5490,9 @@
5474
5490
  "src/devvit/internals/blocks/handler/BlocksHandler.ts": {
5475
5491
  "bytesInOutput": 6864
5476
5492
  },
5493
+ "src/devvit/internals/upgrade-app-shim.tsx": {
5494
+ "bytesInOutput": 2170
5495
+ },
5477
5496
  "src/apis/reddit/helpers/makeGettersEnumerable.ts": {
5478
5497
  "bytesInOutput": 166
5479
5498
  },
@@ -5550,7 +5569,7 @@
5550
5569
  "bytesInOutput": 178
5551
5570
  }
5552
5571
  },
5553
- "bytes": 258242
5572
+ "bytes": 260544
5554
5573
  }
5555
5574
  }
5556
5575
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devvit/public-api",
3
- "version": "0.11.0-next-2024-08-15-37b3f7371.0",
3
+ "version": "0.11.0-next-2024-08-20-4ebb1a01f.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-08-15-37b3f7371.0",
34
- "@devvit/shared-types": "0.11.0-next-2024-08-15-37b3f7371.0",
33
+ "@devvit/protos": "0.11.0-next-2024-08-20-4ebb1a01f.0",
34
+ "@devvit/shared-types": "0.11.0-next-2024-08-20-4ebb1a01f.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-08-15-37b3f7371.0",
43
- "@devvit/repo-tools": "0.11.0-next-2024-08-15-37b3f7371.0",
44
- "@devvit/tsconfig": "0.11.0-next-2024-08-15-37b3f7371.0",
42
+ "@devvit/eslint-config": "0.11.0-next-2024-08-20-4ebb1a01f.0",
43
+ "@devvit/repo-tools": "0.11.0-next-2024-08-20-4ebb1a01f.0",
44
+ "@devvit/tsconfig": "0.11.0-next-2024-08-20-4ebb1a01f.0",
45
45
  "@microsoft/api-extractor": "7.41.0",
46
46
  "@reddit/faceplate-ui": "16.1.0",
47
47
  "@types/clone-deep": "4.0.1",
@@ -64,5 +64,5 @@
64
64
  }
65
65
  },
66
66
  "source": "./src/index.ts",
67
- "gitHead": "156b2a2bb88b3b2334de9a96130eece59660b933"
67
+ "gitHead": "5fc4461855bfebaafcbfefd06e09d8fb93dd2bb3"
68
68
  }
package/public-api.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { AccountingType as AccountingType_2 } from '../../payments/v1alpha/product.js';
1
2
  import { BanInfo_BanInfoAction as BanInfo_BanInfoAction_2 } from '../../../reddit/common.js';
2
3
  import { BlockActionType as BlockActionType_2 } from '../../../../../index.js';
3
4
  import { BlockAnimationDirection as BlockAnimationDirection_2 } from '../../../../../index.js';
@@ -326,6 +327,22 @@ declare const AccountDelete: {
326
327
  fromPartial(object: DeepPartial_74<AccountDelete>): AccountDelete;
327
328
  };
328
329
 
330
+ declare enum AccountingType {
331
+ ACCOUNTING_TYPE_UNSPECIFIED = 0,
332
+ /** ACCOUNTING_TYPE_INSTANT - Used immediately as it is purchased. */
333
+ ACCOUNTING_TYPE_INSTANT = 1,
334
+ /** ACCOUNTING_TYPE_DURABLE - It grants access indefinitely. */
335
+ ACCOUNTING_TYPE_DURABLE = 2,
336
+ /** ACCOUNTING_TYPE_CONSUMABLE - User can use the good at any time in the future but it is gone once it's used. */
337
+ ACCOUNTING_TYPE_CONSUMABLE = 3,
338
+ /** ACCOUNTING_TYPE_VALID_FOR_1D - Consumed over a fixed period of time. */
339
+ ACCOUNTING_TYPE_VALID_FOR_1D = 4,
340
+ ACCOUNTING_TYPE_VALID_FOR_7D = 5,
341
+ ACCOUNTING_TYPE_VALID_FOR_30D = 6,
342
+ ACCOUNTING_TYPE_VALID_FOR_1Y = 7,
343
+ UNRECOGNIZED = -1
344
+ }
345
+
329
346
  /**
330
347
  * Subclasses are expected to call config.init(), provides(), and uses(). It
331
348
  * is erroneous to not override the constructor. Override, invoke
@@ -3390,6 +3407,7 @@ declare const BuildPackDefinition: {
3390
3407
  } | undefined;
3391
3408
  environment?: Environment_2;
3392
3409
  description?: string;
3410
+ accountingType?: AccountingType_2;
3393
3411
  productMetadata?: {
3394
3412
  [x: string]: string | undefined;
3395
3413
  };
@@ -3495,6 +3513,7 @@ declare const BuildPackDefinition: {
3495
3513
  } | undefined;
3496
3514
  environment?: Environment_2;
3497
3515
  description?: string;
3516
+ accountingType?: AccountingType_2;
3498
3517
  productMetadata?: {
3499
3518
  [x: string]: string | undefined;
3500
3519
  };
@@ -3657,6 +3676,7 @@ declare const BuildPackDefinition: {
3657
3676
  } | undefined;
3658
3677
  environment?: Environment_2;
3659
3678
  description?: string;
3679
+ accountingType?: AccountingType_2;
3660
3680
  productMetadata?: {
3661
3681
  [x: string]: string | undefined;
3662
3682
  };
@@ -3762,6 +3782,7 @@ declare const BuildPackDefinition: {
3762
3782
  } | undefined;
3763
3783
  environment?: Environment_2;
3764
3784
  description?: string;
3785
+ accountingType?: AccountingType_2;
3765
3786
  productMetadata?: {
3766
3787
  [x: string]: string | undefined;
3767
3788
  };
@@ -17046,6 +17067,7 @@ declare const LinkerDefinition: {
17046
17067
  } | undefined;
17047
17068
  environment?: Environment_2;
17048
17069
  description?: string;
17070
+ accountingType?: AccountingType_2;
17049
17071
  productMetadata?: {
17050
17072
  [x: string]: string | undefined;
17051
17073
  };
@@ -17129,6 +17151,7 @@ declare const LinkerDefinition: {
17129
17151
  } | undefined;
17130
17152
  environment?: Environment_2;
17131
17153
  description?: string;
17154
+ accountingType?: AccountingType_2;
17132
17155
  productMetadata?: {
17133
17156
  [x: string]: string | undefined;
17134
17157
  };
@@ -41654,6 +41677,7 @@ declare const ProducerDefinition: {
41654
41677
 
41655
41678
  declare const ProducerServiceName = "devvit.actor.producer.Producer";
41656
41679
 
41680
+ /** Mapping from payments API Product : https://github.snooguts.net/reddit/reddit-service-pay-api/blob/main/api/protos/reddit/xpaymentsplatform/payapi/v1/common.proto#L7 */
41657
41681
  declare interface Product {
41658
41682
  /** the developer defined identifer for the product */
41659
41683
  sku: string;
@@ -41665,6 +41689,8 @@ declare interface Product {
41665
41689
  environment: Environment;
41666
41690
  /** Human-readable description of the product */
41667
41691
  description: string;
41692
+ /** the accounting treatment of the product */
41693
+ accountingType: AccountingType;
41668
41694
  /** tags associated with the product */
41669
41695
  productMetadata: {
41670
41696
  [key: string]: string;
@@ -47712,6 +47738,7 @@ declare const ResolverDefinition: {
47712
47738
  } | undefined;
47713
47739
  environment?: Environment_2;
47714
47740
  description?: string;
47741
+ accountingType?: AccountingType_2;
47715
47742
  productMetadata?: {
47716
47743
  [x: string]: string | undefined;
47717
47744
  };
@@ -47795,6 +47822,7 @@ declare const ResolverDefinition: {
47795
47822
  } | undefined;
47796
47823
  environment?: Environment_2;
47797
47824
  description?: string;
47825
+ accountingType?: AccountingType_2;
47798
47826
  productMetadata?: {
47799
47827
  [x: string]: string | undefined;
47800
47828
  };