@pintahub/database-schemas 4.6.0 → 4.6.2

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.
@@ -2,7 +2,8 @@
2
2
  "permissions": {
3
3
  "allow": [
4
4
  "Bash(git add:*)",
5
- "Bash(git commit:*)"
5
+ "Bash(git commit:*)",
6
+ "Bash(git push:*)"
6
7
  ]
7
8
  }
8
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pintahub/database-schemas",
3
- "version": "4.6.0",
3
+ "version": "4.6.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/schemas/Payout.js CHANGED
@@ -2,7 +2,7 @@ const {Schema} = require('mongoose')
2
2
  const MoneyObject = require('./MoneyObject')
3
3
 
4
4
 
5
- /** Payment payout from payment provider */
5
+ /** Payment payout synced from Shopify */
6
6
  const Payout = new Schema({
7
7
  /** @ref Store */
8
8
  store: {
@@ -11,7 +11,7 @@ const Payout = new Schema({
11
11
  required: true,
12
12
  },
13
13
 
14
- /** Payout ID from payment provider */
14
+ /** Shopify payout ID */
15
15
  id: {
16
16
  type: String,
17
17
  trim: true,
@@ -44,7 +44,7 @@ const Payout = new Schema({
44
44
  lowercase: true,
45
45
  },
46
46
 
47
- /** Last sync from payment provider */
47
+ /** Last sync from Shopify */
48
48
  synced_at: {
49
49
  type: Date,
50
50
  default: Date.now,
@@ -38,6 +38,7 @@ const ProductReport = new Schema({
38
38
 
39
39
  /**
40
40
  * Report status:
41
+ * - draft: report saved but not yet submitted
41
42
  * - pending: awaiting review
42
43
  * - resolved: action taken (product removed/modified)
43
44
  * - dismissed: report rejected as invalid
@@ -45,9 +46,9 @@ const ProductReport = new Schema({
45
46
  status: {
46
47
  type: String,
47
48
  trim: true,
48
- default: 'pending',
49
+ default: 'draft',
49
50
  index: true,
50
- enum: ['pending', 'resolved', 'dismissed'],
51
+ enum: ['draft', 'pending', 'resolved', 'dismissed'],
51
52
  },
52
53
 
53
54
  /** Detailed description of the violation */
@@ -75,6 +76,18 @@ const ProductReport = new Schema({
75
76
  trim: true,
76
77
  },
77
78
 
79
+ /** Reporter's IP address */
80
+ ip: {
81
+ type: String,
82
+ trim: true,
83
+ },
84
+
85
+ /** Reporter's browser user agent string */
86
+ user_agent: {
87
+ type: String,
88
+ trim: true,
89
+ },
90
+
78
91
  /** Admin notes on how the report was resolved */
79
92
  resolution_note: {
80
93
  type: String,
package/schemas/Store.js CHANGED
@@ -9,7 +9,7 @@ const Store = new Schema({
9
9
  trim: true,
10
10
  },
11
11
 
12
- /** Store subdomain (e.g. 'mystore' for mystore.pintahub.com) */
12
+ /** Shopify subdomain (e.g. 'storeabc' for storeabc.myshopify.com) */
13
13
  subdomain: {
14
14
  type: String,
15
15
  trim: true,
@@ -30,7 +30,7 @@ const Store = new Schema({
30
30
  index: true,
31
31
  },
32
32
 
33
- /** Checkout page domain */
33
+ /** Shopify checkout domain (e.g. 'checkout.primary_domain.com') */
34
34
  checkout_domain: {
35
35
  type: String,
36
36
  trim: true,
@@ -59,7 +59,7 @@ const Store = new Schema({
59
59
  type: Schema.Types.ObjectId,
60
60
  },
61
61
 
62
- /** Maintenance mode message (null = not in maintenance) */
62
+ /** Set to 'on' to enable store maintenance mode */
63
63
  maintenance_mode: {
64
64
  type: String,
65
65
  trim: true
@@ -11,7 +11,7 @@ const DMCASetting = new Schema({
11
11
  trim: true
12
12
  },
13
13
 
14
- /** DMCA badge/certificate URL */
14
+ /** DMCA page path on the store, e.g. '/pages/dmca' */
15
15
  url: {
16
16
  type: String,
17
17
  trim: true,