@devvit/payments 0.12.3-next-2025-11-13-19-52-46-828ca4f76.0 → 0.12.3-next-2025-11-17-14-13-05-c85a5f760.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.
@@ -4,6 +4,7 @@ import type { OrderResultEvent } from '@devvit/protos/json/devvit/ui/effect_type
4
4
  *
5
5
  * @param skuOrSkus - The SKU, or an array of SKUs, to purchase
6
6
  * @param metadata - Optional, custom metadata attached to this purchase
7
+ * @experimental - This is not finalized yet, may not work, and may change.
7
8
  */
8
9
  export declare function purchase(skuOrSkus: string | string[], metadata?: {
9
10
  [key: string]: string;
@@ -1 +1 @@
1
- {"version":3,"file":"purchase.d.ts","sourceRoot":"","sources":["../../src/client/purchase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oEAAoE,CAAC;AAI3G;;;;;GAKG;AACH,wBAAsB,QAAQ,CAC5B,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,EAC5B,QAAQ,CAAC,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GACnC,OAAO,CAAC,gBAAgB,CAAC,CAsB3B"}
1
+ {"version":3,"file":"purchase.d.ts","sourceRoot":"","sources":["../../src/client/purchase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oEAAoE,CAAC;AAI3G;;;;;;GAMG;AACH,wBAAsB,QAAQ,CAC5B,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,EAC5B,QAAQ,CAAC,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GACnC,OAAO,CAAC,gBAAgB,CAAC,CAsB3B"}
@@ -5,6 +5,7 @@ import { emitEffect } from '@devvit/shared-types/client/emit-effect.js';
5
5
  *
6
6
  * @param skuOrSkus - The SKU, or an array of SKUs, to purchase
7
7
  * @param metadata - Optional, custom metadata attached to this purchase
8
+ * @experimental - This is not finalized yet, may not work, and may change.
8
9
  */
9
10
  export async function purchase(skuOrSkus, metadata) {
10
11
  const id = crypto.randomUUID();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devvit/payments",
3
- "version": "0.12.3-next-2025-11-13-19-52-46-828ca4f76.0",
3
+ "version": "0.12.3-next-2025-11-17-14-13-05-c85a5f760.0",
4
4
  "license": "BSD-3-Clause",
5
5
  "repository": {
6
6
  "type": "git",
@@ -44,15 +44,15 @@
44
44
  },
45
45
  "types": "./dist/index.d.ts",
46
46
  "dependencies": {
47
- "@devvit/protos": "0.12.3-next-2025-11-13-19-52-46-828ca4f76.0",
48
- "@devvit/public-api": "0.12.3-next-2025-11-13-19-52-46-828ca4f76.0",
49
- "@devvit/server": "0.12.3-next-2025-11-13-19-52-46-828ca4f76.0",
50
- "@devvit/shared-types": "0.12.3-next-2025-11-13-19-52-46-828ca4f76.0"
47
+ "@devvit/protos": "0.12.3-next-2025-11-17-14-13-05-c85a5f760.0",
48
+ "@devvit/public-api": "0.12.3-next-2025-11-17-14-13-05-c85a5f760.0",
49
+ "@devvit/server": "0.12.3-next-2025-11-17-14-13-05-c85a5f760.0",
50
+ "@devvit/shared-types": "0.12.3-next-2025-11-17-14-13-05-c85a5f760.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@ampproject/filesize": "4.3.0",
54
- "@devvit/repo-tools": "0.12.3-next-2025-11-13-19-52-46-828ca4f76.0",
55
- "@devvit/tsconfig": "0.12.3-next-2025-11-13-19-52-46-828ca4f76.0",
54
+ "@devvit/repo-tools": "0.12.3-next-2025-11-17-14-13-05-c85a5f760.0",
55
+ "@devvit/tsconfig": "0.12.3-next-2025-11-17-14-13-05-c85a5f760.0",
56
56
  "esbuild": "0.25.9",
57
57
  "eslint": "9.11.1",
58
58
  "typescript": "5.8.3",
@@ -65,5 +65,5 @@
65
65
  }
66
66
  },
67
67
  "source": "./src/index.ts",
68
- "gitHead": "b8516bf63b3437227240f3dbe0109aac69ced892"
68
+ "gitHead": "d6b2099fc657c233145a5aea310707b94b3f1401"
69
69
  }
@@ -1,12 +1,30 @@
1
1
  import { type AcknowledgeOrderDeliveryResponse, type GetOrdersRequest, type GetOrdersResponse, type GetProductsRequest, type GetProductsResponse } from '@devvit/protos/types/devvit/plugin/payments/v1alpha/payments.js';
2
2
  type RequiredGetOrderFields = 'limit';
3
3
  export type GetOrdersFilters = Partial<Omit<GetOrdersRequest, RequiredGetOrderFields>> & Pick<GetOrdersRequest, RequiredGetOrderFields>;
4
+ /**
5
+ * @experimental - This is not finalized yet, may not work, and may change.
6
+ */
4
7
  export declare class PaymentsClient {
5
8
  #private;
9
+ /**
10
+ * @param filters - Filters to apply to the products query.
11
+ * @experimental - This is not finalized yet, may not work, and may change.
12
+ */
6
13
  getProducts(filters?: Partial<GetProductsRequest>): Promise<GetProductsResponse>;
14
+ /**
15
+ * @param filters - Filters to apply to the orders query.
16
+ * @experimental - This is not finalized yet, may not work, and may change.
17
+ */
7
18
  getOrders(filters: GetOrdersFilters): Promise<GetOrdersResponse>;
19
+ /**
20
+ * @param orderId - The ID of the order to acknowledge delivery for.
21
+ * @experimental - This is not finalized yet, may not work, and may change.
22
+ */
8
23
  acknowledgeOrderDelivery(orderId: string): Promise<AcknowledgeOrderDeliveryResponse>;
9
24
  }
25
+ /**
26
+ * @experimental - This is not finalized yet, may not work, and may change.
27
+ */
10
28
  export declare const payments: PaymentsClient;
11
29
  export {};
12
30
  //# sourceMappingURL=PaymentsClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaymentsClient.d.ts","sourceRoot":"","sources":["../../src/server/PaymentsClient.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,gCAAgC,EACrC,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EAGzB,MAAM,iEAAiE,CAAC;AAIzE,KAAK,sBAAsB,GAAG,OAA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@@ -14,11 +14,18 @@ import { OrderStatus } from '@devvit/protos/json/devvit/payments/v1alpha/order.j
14
14
  import { PaymentsServiceDefinition, } from '@devvit/protos/types/devvit/plugin/payments/v1alpha/payments.js';
15
15
  import { context } from '@devvit/server';
16
16
  import { getDevvitConfig } from '@devvit/shared-types/server/get-devvit-config.js';
17
+ /**
18
+ * @experimental - This is not finalized yet, may not work, and may change.
19
+ */
17
20
  export class PaymentsClient {
18
21
  constructor() {
19
22
  _PaymentsClient_instances.add(this);
20
23
  _PaymentsClient_pluginCache.set(this, void 0);
21
24
  }
25
+ /**
26
+ * @param filters - Filters to apply to the products query.
27
+ * @experimental - This is not finalized yet, may not work, and may change.
28
+ */
22
29
  getProducts(filters = {}) {
23
30
  return __classPrivateFieldGet(this, _PaymentsClient_instances, "a", _PaymentsClient_plugin_get).GetProducts({
24
31
  // Defaults
@@ -28,6 +35,10 @@ export class PaymentsClient {
28
35
  ...filters,
29
36
  }, context.metadata);
30
37
  }
38
+ /**
39
+ * @param filters - Filters to apply to the orders query.
40
+ * @experimental - This is not finalized yet, may not work, and may change.
41
+ */
31
42
  getOrders(filters) {
32
43
  return __classPrivateFieldGet(this, _PaymentsClient_instances, "a", _PaymentsClient_plugin_get).GetOrders({
33
44
  // Defaults
@@ -40,6 +51,10 @@ export class PaymentsClient {
40
51
  ...filters,
41
52
  }, context.metadata);
42
53
  }
54
+ /**
55
+ * @param orderId - The ID of the order to acknowledge delivery for.
56
+ * @experimental - This is not finalized yet, may not work, and may change.
57
+ */
43
58
  acknowledgeOrderDelivery(orderId) {
44
59
  return __classPrivateFieldGet(this, _PaymentsClient_instances, "a", _PaymentsClient_plugin_get).AcknowledgeOrderDelivery({ orderId }, context.metadata);
45
60
  }
@@ -47,4 +62,7 @@ export class PaymentsClient {
47
62
  _PaymentsClient_pluginCache = new WeakMap(), _PaymentsClient_instances = new WeakSet(), _PaymentsClient_plugin_get = function _PaymentsClient_plugin_get() {
48
63
  return (__classPrivateFieldSet(this, _PaymentsClient_pluginCache, __classPrivateFieldGet(this, _PaymentsClient_pluginCache, "f") ?? getDevvitConfig().use(PaymentsServiceDefinition), "f"));
49
64
  };
65
+ /**
66
+ * @experimental - This is not finalized yet, may not work, and may change.
67
+ */
50
68
  export const payments = new PaymentsClient();