Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,491 changes: 4,324 additions & 167 deletions bundled.json

Large diffs are not rendered by default.

104 changes: 104 additions & 0 deletions schema/bulk-job.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
BulkJob:
type: object
properties:
_id:
type: string
description: "Internal MongoDB ID"
example: "64a1b2c3d4e5f6g7h8i9j0k1"
jobId:
type: string
description: "Unique identifier for the bulk job (same as _id)"
example: "64a1b2c3d4e5f6g7h8i9j0k1"
networkId:
type: string
description: "Network ID the job belongs to"
example: "network-abc123"
userId:
type: string
description: "User ID of the admin who initiated the job"
example: "user-xyz789"
fileId:
type: string
description: "ID of the uploaded CSV file"
example: "file-123456"
status:
type: string
description: "Current status of the bulk job"
enum:
- pending
- running
- done
example: "pending"
entityType:
type: string
description: "Type of entity being processed"
enum:
- product
example: "product"
operation:
type: string
description: "Operation to perform on the entities"
enum:
- insert
- update
example: "insert"
summary:
$ref: "#/BulkJobSummary"
createdAt:
type: string
format: date-time
description: "Timestamp when the job was created"
example: "2024-01-15T10:30:00.000Z"
updatedAt:
type: string
format: date-time
description: "Timestamp when the job was last updated"
example: "2024-01-15T10:35:00.000Z"
expiredAt:
type: string
format: date-time
description: "Timestamp when the job will expire (for pending jobs)"
example: "2024-01-18T10:30:00.000Z"

BulkJobSummary:
type: object
description: "Summary of bulk job processing results"
properties:
totalRows:
type: integer
description: "Total number of rows in the CSV file"
example: 100
processedRows:
type: integer
description: "Number of rows processed so far"
example: 100
successfulRows:
type: integer
description: "Number of rows processed successfully"
example: 95
failedRows:
type: integer
description: "Number of rows that failed processing"
example: 5
errorReportFileId:
type: string
description: "File ID of the error report (if any failures occurred)"
example: "file-error-report-123"
metadata:
type: object
description: "Additional metadata about the job"
additionalProperties: true
processingStartedAt:
type: string
format: date-time
description: "Timestamp when processing started"
example: "2024-01-15T10:30:30.000Z"
processingCompletedAt:
type: string
format: date-time
description: "Timestamp when processing completed"
example: "2024-01-15T10:35:30.000Z"
processingDurationMs:
type: integer
description: "Duration of processing in milliseconds"
example: 300000
80 changes: 80 additions & 0 deletions schema/product.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
Product:
type: object
properties:
_id:
type: string
description: "Internal MongoDB ID"
example: "64a1b2c3d4e5f6g7h8i9j0k1"
productId:
type: string
description: "Unique identifier for the product"
example: "prod-12345"
networkId:
type: string
description: "Network ID the product belongs to"
example: "network-abc123"
productName:
type: string
description: "Name of the product"
example: "Premium Headphones"
productUrl:
type: string
format: uri
description: "URL to the product page"
example: "https://example.com/products/premium-headphones"
status:
type: string
description: "Product status"
enum:
- active
- archived
example: "active"
price:
type: number
description: "Product price"
example: 99.99
currency:
type: string
description: "ISO 4217 currency code"
example: "USD"
thumbnailUrl:
type: string
format: uri
description: "URL to the product thumbnail image"
example: "https://example.com/images/headphones-thumb.jpg"
thumbnailMode:
type: string
description: "How the thumbnail should be displayed"
enum:
- fit
- fill
example: "fit"
importSource:
type: string
description: "How the product was imported"
enum:
- manual
- csv
example: "manual"
createdBy:
type: string
description: "User ID who created the product"
example: "user-xyz789"
updatedBy:
type: string
description: "User ID who last updated the product"
example: "user-xyz789"
createdAt:
type: string
format: date-time
description: "Timestamp when the product was created"
example: "2024-01-15T10:30:00.000Z"
updatedAt:
type: string
format: date-time
description: "Timestamp when the product was last updated"
example: "2024-01-15T10:30:00.000Z"
isDeleted:
type: boolean
description: "Whether the product is deleted"
example: false
19 changes: 19 additions & 0 deletions swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,23 @@ paths:
$ref: "./v1/invitation/index.yaml#/count"
/api/v1/invitations/{invitationId}/resend:
$ref: "./v1/invitation/index.yaml#/invitationId-resend"
# Product
/api/v1/products:
$ref: "./v1/product/index.yaml#/root"
/api/v1/products/{productId}:
$ref: "./v1/product/index.yaml#/productId"
/api/v1/products/search:
$ref: "./v1/product/index.yaml#/search"
/api/v1/products/count:
$ref: "./v1/product/index.yaml#/count"
/api/v1/products/list:
$ref: "./v1/product/index.yaml#/list"
/api/v1/products/bulk/sample:
$ref: "./v1/product/index.yaml#/bulk-sample"
/api/v1/products/bulk/jobs:
$ref: "./v1/product/index.yaml#/bulk-jobs"
/api/v1/products/bulk/jobs/{jobId}:
$ref: "./v1/product/index.yaml#/bulk-jobs-jobId"
/api/v1/me/following-feeds:
$ref: "./v1/following-feed/index.yaml#/root"
/api/v3/content-feeds:
Expand Down Expand Up @@ -344,6 +361,8 @@ paths:
$ref: "./v3/network-setting/index.yaml#/security-configs"
/api/v3/network-settings/push-notification:
$ref: "./v3/network-setting/index.yaml#/push-notification"
/api/v3/network-settings/product:
$ref: "./v3/network-setting/index.yaml#/product"
/v1/notification:
$ref: "./v1/notification/index.yaml#/root"
/api/v1/notification-tray:
Expand Down
Loading