@burdenoff/cli-sdk 2026.1201.1 → 2026.1202.1
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.
- package/dist/chunk-BGNPGKJM.js +1 -0
- package/dist/{chunk-ASSY2L5R.js → chunk-E6F56R4K.js} +3 -3
- package/dist/chunk-N7EXKGE2.js +34 -0
- package/dist/core/index.cjs +9 -9
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +9 -9
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{module-BNVKV_pI.d.ts → module-DWSAfs3k.d.cts} +20 -19
- package/dist/{module-BNVKV_pI.d.cts → module-DWSAfs3k.d.ts} +20 -19
- package/dist/modules/adaptercloud/index.cjs +38 -38
- package/dist/modules/adaptercloud/index.d.cts +1 -1
- package/dist/modules/adaptercloud/index.d.ts +1 -1
- package/dist/modules/adaptercloud/index.js +2 -2
- package/dist/modules/artistrybase/index.cjs +50 -50
- package/dist/modules/artistrybase/index.d.cts +1 -1
- package/dist/modules/artistrybase/index.d.ts +1 -1
- package/dist/modules/artistrybase/index.js +2 -2
- package/dist/modules/assethandler/index.cjs +32 -32
- package/dist/modules/assethandler/index.d.cts +1 -1
- package/dist/modules/assethandler/index.d.ts +1 -1
- package/dist/modules/assethandler/index.js +2 -2
- package/dist/modules/atheletebridge/index.cjs +34 -34
- package/dist/modules/atheletebridge/index.d.cts +1 -1
- package/dist/modules/atheletebridge/index.d.ts +1 -1
- package/dist/modules/atheletebridge/index.js +2 -2
- package/dist/modules/auth/index.cjs +34 -34
- package/dist/modules/auth/index.d.cts +1 -1
- package/dist/modules/auth/index.d.ts +1 -1
- package/dist/modules/auth/index.js +4 -4
- package/dist/modules/billing/index.cjs +18 -18
- package/dist/modules/billing/index.d.cts +1 -1
- package/dist/modules/billing/index.d.ts +1 -1
- package/dist/modules/billing/index.js +2 -2
- package/dist/modules/brainyrich/index.cjs +45 -45
- package/dist/modules/brainyrich/index.d.cts +1 -1
- package/dist/modules/brainyrich/index.d.ts +1 -1
- package/dist/modules/brainyrich/index.js +2 -2
- package/dist/modules/buildmyiq/index.cjs +32 -32
- package/dist/modules/buildmyiq/index.d.cts +1 -1
- package/dist/modules/buildmyiq/index.d.ts +1 -1
- package/dist/modules/buildmyiq/index.js +2 -2
- package/dist/modules/channels/index.cjs +12 -12
- package/dist/modules/channels/index.d.cts +1 -1
- package/dist/modules/channels/index.d.ts +1 -1
- package/dist/modules/channels/index.js +2 -2
- package/dist/modules/collabkin/index.cjs +34 -34
- package/dist/modules/collabkin/index.d.cts +1 -1
- package/dist/modules/collabkin/index.d.ts +1 -1
- package/dist/modules/collabkin/index.js +2 -2
- package/dist/modules/comradecircle/index.cjs +41 -41
- package/dist/modules/comradecircle/index.d.cts +1 -1
- package/dist/modules/comradecircle/index.d.ts +1 -1
- package/dist/modules/comradecircle/index.js +2 -2
- package/dist/modules/conversations/index.cjs +32 -32
- package/dist/modules/conversations/index.d.cts +1 -1
- package/dist/modules/conversations/index.d.ts +1 -1
- package/dist/modules/conversations/index.js +2 -2
- package/dist/modules/coolandlovely/index.cjs +41 -41
- package/dist/modules/coolandlovely/index.d.cts +1 -1
- package/dist/modules/coolandlovely/index.d.ts +1 -1
- package/dist/modules/coolandlovely/index.js +2 -2
- package/dist/modules/cosmicintersection/index.cjs +43 -43
- package/dist/modules/cosmicintersection/index.d.cts +1 -1
- package/dist/modules/cosmicintersection/index.d.ts +1 -1
- package/dist/modules/cosmicintersection/index.js +2 -2
- package/dist/modules/crewfoundry/index.cjs +70 -70
- package/dist/modules/crewfoundry/index.d.cts +1 -1
- package/dist/modules/crewfoundry/index.d.ts +1 -1
- package/dist/modules/crewfoundry/index.js +2 -2
- package/dist/modules/devportal/index.cjs +23 -23
- package/dist/modules/devportal/index.d.cts +1 -1
- package/dist/modules/devportal/index.d.ts +1 -1
- package/dist/modules/devportal/index.js +2 -2
- package/dist/modules/ecoimpacthub/index.cjs +41 -41
- package/dist/modules/ecoimpacthub/index.d.cts +1 -1
- package/dist/modules/ecoimpacthub/index.d.ts +1 -1
- package/dist/modules/ecoimpacthub/index.js +2 -2
- package/dist/modules/eventfullymanaged/index.cjs +92 -92
- package/dist/modules/eventfullymanaged/index.d.cts +1 -1
- package/dist/modules/eventfullymanaged/index.d.ts +1 -1
- package/dist/modules/eventfullymanaged/index.js +2 -2
- package/dist/modules/export/index.cjs +14 -14
- package/dist/modules/export/index.d.cts +1 -1
- package/dist/modules/export/index.d.ts +1 -1
- package/dist/modules/export/index.js +2 -2
- package/dist/modules/files/index.cjs +11 -11
- package/dist/modules/files/index.d.cts +1 -1
- package/dist/modules/files/index.d.ts +1 -1
- package/dist/modules/files/index.js +2 -2
- package/dist/modules/fluidgrids/index.cjs +29 -29
- package/dist/modules/fluidgrids/index.d.cts +1 -1
- package/dist/modules/fluidgrids/index.d.ts +1 -1
- package/dist/modules/fluidgrids/index.js +3 -3
- package/dist/modules/ggnomad/index.cjs +21 -21
- package/dist/modules/ggnomad/index.d.cts +1 -1
- package/dist/modules/ggnomad/index.d.ts +1 -1
- package/dist/modules/ggnomad/index.js +2 -2
- package/dist/modules/govcitizenhub/index.cjs +35 -35
- package/dist/modules/govcitizenhub/index.d.cts +1 -1
- package/dist/modules/govcitizenhub/index.d.ts +1 -1
- package/dist/modules/govcitizenhub/index.js +2 -2
- package/dist/modules/groups/index.cjs +12 -12
- package/dist/modules/groups/index.d.cts +1 -1
- package/dist/modules/groups/index.d.ts +1 -1
- package/dist/modules/groups/index.js +2 -2
- package/dist/modules/headshotmarketing/index.cjs +165 -165
- package/dist/modules/headshotmarketing/index.d.cts +1 -1
- package/dist/modules/headshotmarketing/index.d.ts +1 -1
- package/dist/modules/headshotmarketing/index.js +2 -2
- package/dist/modules/health/index.d.cts +1 -1
- package/dist/modules/health/index.d.ts +1 -1
- package/dist/modules/hookmovies/index.cjs +43 -43
- package/dist/modules/hookmovies/index.d.cts +1 -1
- package/dist/modules/hookmovies/index.d.ts +1 -1
- package/dist/modules/hookmovies/index.js +2 -2
- package/dist/modules/housingvista/index.cjs +24 -24
- package/dist/modules/housingvista/index.d.cts +1 -1
- package/dist/modules/housingvista/index.d.ts +1 -1
- package/dist/modules/housingvista/index.js +2 -2
- package/dist/modules/integrations/index.cjs +27 -27
- package/dist/modules/integrations/index.d.cts +1 -1
- package/dist/modules/integrations/index.d.ts +1 -1
- package/dist/modules/integrations/index.js +2 -2
- package/dist/modules/intelwatchtower/index.cjs +37 -37
- package/dist/modules/intelwatchtower/index.d.cts +1 -1
- package/dist/modules/intelwatchtower/index.d.ts +1 -1
- package/dist/modules/intelwatchtower/index.js +2 -2
- package/dist/modules/kadaikodi/index.cjs +26 -26
- package/dist/modules/kadaikodi/index.d.cts +1 -1
- package/dist/modules/kadaikodi/index.d.ts +1 -1
- package/dist/modules/kadaikodi/index.js +2 -2
- package/dist/modules/labsofscience/index.cjs +44 -44
- package/dist/modules/labsofscience/index.d.cts +1 -1
- package/dist/modules/labsofscience/index.d.ts +1 -1
- package/dist/modules/labsofscience/index.js +2 -2
- package/dist/modules/manufacturedops/index.cjs +36 -36
- package/dist/modules/manufacturedops/index.d.cts +1 -1
- package/dist/modules/manufacturedops/index.d.ts +1 -1
- package/dist/modules/manufacturedops/index.js +2 -2
- package/dist/modules/movethewheels/index.cjs +78 -78
- package/dist/modules/movethewheels/index.d.cts +1 -1
- package/dist/modules/movethewheels/index.d.ts +1 -1
- package/dist/modules/movethewheels/index.js +2 -2
- package/dist/modules/mybodyshield/index.cjs +36 -36
- package/dist/modules/mybodyshield/index.d.cts +1 -1
- package/dist/modules/mybodyshield/index.d.ts +1 -1
- package/dist/modules/mybodyshield/index.js +2 -2
- package/dist/modules/notifications/index.cjs +5 -5
- package/dist/modules/notifications/index.d.cts +1 -1
- package/dist/modules/notifications/index.d.ts +1 -1
- package/dist/modules/notifications/index.js +1 -1
- package/dist/modules/organizations/index.cjs +5 -5
- package/dist/modules/organizations/index.d.cts +1 -1
- package/dist/modules/organizations/index.d.ts +1 -1
- package/dist/modules/organizations/index.js +1 -1
- package/dist/modules/planmagnet/index.cjs +272 -272
- package/dist/modules/planmagnet/index.d.cts +1 -1
- package/dist/modules/planmagnet/index.d.ts +1 -1
- package/dist/modules/planmagnet/index.js +2 -2
- package/dist/modules/products/index.cjs +19 -19
- package/dist/modules/products/index.d.cts +1 -1
- package/dist/modules/products/index.d.ts +1 -1
- package/dist/modules/products/index.js +2 -2
- package/dist/modules/proserviceworld/index.cjs +24 -24
- package/dist/modules/proserviceworld/index.d.cts +1 -1
- package/dist/modules/proserviceworld/index.d.ts +1 -1
- package/dist/modules/proserviceworld/index.js +2 -2
- package/dist/modules/rbac/index.cjs +8 -8
- package/dist/modules/rbac/index.d.cts +1 -1
- package/dist/modules/rbac/index.d.ts +1 -1
- package/dist/modules/rbac/index.js +2 -2
- package/dist/modules/sandbox/index.cjs +39 -39
- package/dist/modules/sandbox/index.d.cts +1 -1
- package/dist/modules/sandbox/index.d.ts +1 -1
- package/dist/modules/sandbox/index.js +1 -1
- package/dist/modules/scheduler/index.cjs +25 -25
- package/dist/modules/scheduler/index.d.cts +1 -1
- package/dist/modules/scheduler/index.d.ts +1 -1
- package/dist/modules/scheduler/index.js +2 -2
- package/dist/modules/security/index.cjs +14 -14
- package/dist/modules/security/index.d.cts +1 -1
- package/dist/modules/security/index.d.ts +1 -1
- package/dist/modules/security/index.js +2 -2
- package/dist/modules/semanticfed/index.cjs +44 -44
- package/dist/modules/semanticfed/index.d.cts +1 -1
- package/dist/modules/semanticfed/index.d.ts +1 -1
- package/dist/modules/semanticfed/index.js +1 -1
- package/dist/modules/semanticfed-sql/index.cjs +4 -4
- package/dist/modules/semanticfed-sql/index.d.cts +1 -1
- package/dist/modules/semanticfed-sql/index.d.ts +1 -1
- package/dist/modules/semanticfed-sql/index.js +1 -1
- package/dist/modules/store/index.cjs +21 -21
- package/dist/modules/store/index.d.cts +1 -1
- package/dist/modules/store/index.d.ts +1 -1
- package/dist/modules/store/index.js +2 -2
- package/dist/modules/subscriberbot/index.cjs +41 -41
- package/dist/modules/subscriberbot/index.d.cts +1 -1
- package/dist/modules/subscriberbot/index.d.ts +1 -1
- package/dist/modules/subscriberbot/index.js +2 -2
- package/dist/modules/support/index.cjs +8 -8
- package/dist/modules/support/index.d.cts +1 -1
- package/dist/modules/support/index.d.ts +1 -1
- package/dist/modules/support/index.js +2 -2
- package/dist/modules/tags/index.cjs +10 -10
- package/dist/modules/tags/index.d.cts +1 -1
- package/dist/modules/tags/index.d.ts +1 -1
- package/dist/modules/tags/index.js +2 -2
- package/dist/modules/technospam/index.cjs +44 -44
- package/dist/modules/technospam/index.d.cts +1 -1
- package/dist/modules/technospam/index.d.ts +1 -1
- package/dist/modules/technospam/index.js +2 -2
- package/dist/modules/theculturepost/index.cjs +32 -32
- package/dist/modules/theculturepost/index.d.cts +1 -1
- package/dist/modules/theculturepost/index.d.ts +1 -1
- package/dist/modules/theculturepost/index.js +2 -2
- package/dist/modules/theglobalfuel/index.cjs +30 -30
- package/dist/modules/theglobalfuel/index.d.cts +1 -1
- package/dist/modules/theglobalfuel/index.d.ts +1 -1
- package/dist/modules/theglobalfuel/index.js +2 -2
- package/dist/modules/timecampus/index.cjs +69 -69
- package/dist/modules/timecampus/index.d.cts +1 -1
- package/dist/modules/timecampus/index.d.ts +1 -1
- package/dist/modules/timecampus/index.js +4 -4
- package/dist/modules/tours/index.cjs +4 -4
- package/dist/modules/tours/index.d.cts +1 -1
- package/dist/modules/tours/index.d.ts +1 -1
- package/dist/modules/tours/index.js +2 -2
- package/dist/modules/vibecontrols/index.cjs +460 -460
- package/dist/modules/vibecontrols/index.d.cts +1 -1
- package/dist/modules/vibecontrols/index.d.ts +1 -1
- package/dist/modules/vibecontrols/index.js +5 -5
- package/dist/modules/workspaces/index.cjs +16 -16
- package/dist/modules/workspaces/index.d.cts +1 -1
- package/dist/modules/workspaces/index.d.ts +1 -1
- package/dist/modules/workspaces/index.js +2 -2
- package/package.json +6 -1
- package/dist/chunk-3ZVMC2AF.js +0 -1
- package/dist/chunk-ZT6KOG7N.js +0 -34
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var c=class extends Error{exitCode;hint;constructor(n,t){super(n),this.name="CliUserError",this.exitCode=t?.exitCode??1,this.hint=t?.hint;}},y=class extends c{constructor(n,t){super(n,{exitCode:2,hint:t?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},g=class extends Error{cause;constructor(n,t){super(n),this.name="CliInternalError",this.cause=t;}};function L(r){if(r instanceof y||r instanceof c)return r;let n=w(r)&&w(r.response)?r.response:void 0,t=n?.errors,e=Array.isArray(t)?t[0]:void 0,p=(w(e)&&w(e.extensions)?e.extensions:void 0)?.code,I=n?.status;return p==="UNAUTHENTICATED"||I===401?new y("Authentication required."):p==="FORBIDDEN"||I===403?new c("Permission denied."):p==="BAD_USER_INPUT"||p==="GRAPHQL_VALIDATION_FAILED"||I===400?new c("Invalid request. Check the command arguments."):p==="NOT_FOUND"||I===404?new c("Requested resource was not found."):p==="RATE_LIMITED"||p==="TOO_MANY_REQUESTS"||I===429?new c("Request limit reached. Try again later."):new g("The request could not be completed. Try again later.")}var k=class extends Error{response;constructor(n,t){super(n),this.name="GqlRequestError",this.response=t;}};function w(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}var O=null;function x(r){O=r;}function b(){if(!O)throw new g("vibecontrols module helpers used before setHelpersContext was called");return O}function Nt(){let r=b();if(!r.auth.isAuthenticated())throw new y("Authentication required.",{hint:`Run \`${r.productName} auth login\` to authenticate.`})}async function a(r,n){return Nt(),b().gql.workspace.request(r,n)}async function A(r,n){return b().gql.workspaceAuthOnly.request(r,n)}function i(r){throw r instanceof y||r instanceof c||r instanceof g?r:r instanceof k||r!==null&&typeof r=="object"&&"response"in r?L(r):new g("The command could not be completed. Try again later.")}function s(r,n,t){b().output.formatAndOutput(r,n,t);}function d(r){b().output.printSuccess(r);}function m(r,n){return b().output.truncate(r,n)}var S=`
|
|
2
2
|
query CooGetBrand($id: ID!) {
|
|
3
3
|
cooBrand(id: $id) {
|
|
4
4
|
id name handle tagline bio status isFeatured aesthetics tags websiteUrl
|
|
5
5
|
logo { id } cover { id } createdAt updatedAt workspaceId
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
`,
|
|
8
|
+
`,R=`
|
|
9
9
|
query CooListBrands($featured: Boolean, $status: CooBrandStatus, $pagination: PaginationInput) {
|
|
10
10
|
cooListBrands(featured: $featured, status: $status, pagination: $pagination) {
|
|
11
11
|
items {
|
|
@@ -14,63 +14,63 @@
|
|
|
14
14
|
pageInfo { cursor hasMore }
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
`,
|
|
17
|
+
`,D=`
|
|
18
18
|
mutation CooCreateBrand($input: CooCreateBrandInput!) {
|
|
19
19
|
cooCreateBrand(input: $input) {
|
|
20
20
|
id name handle tagline bio status isFeatured aesthetics tags websiteUrl
|
|
21
21
|
logo { id } cover { id } createdAt
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
`,$=`
|
|
25
25
|
mutation CooUpdateBrand($id: ID!, $input: CooUpdateBrandInput!) {
|
|
26
26
|
cooUpdateBrand(id: $id, input: $input) {
|
|
27
27
|
id name handle tagline bio status isFeatured aesthetics tags websiteUrl
|
|
28
28
|
logo { id } cover { id } updatedAt
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,P=`
|
|
32
32
|
mutation CooTransitionBrand($id: ID!, $status: CooBrandStatus!) {
|
|
33
33
|
cooTransitionBrand(id: $id, status: $status) {
|
|
34
34
|
id name handle status updatedAt
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
`,
|
|
37
|
+
`,_=`
|
|
38
38
|
mutation CooArchiveBrand($id: ID!) {
|
|
39
39
|
cooArchiveBrand(id: $id)
|
|
40
40
|
}
|
|
41
|
-
`,
|
|
41
|
+
`,N=`
|
|
42
42
|
query CooGetCollection($id: ID!) {
|
|
43
43
|
cooCollection(id: $id) {
|
|
44
44
|
id name description season status brandId tags
|
|
45
45
|
cover { id } publishAt endAt createdAt updatedAt workspaceId
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
`,F=`
|
|
49
49
|
query CooListCollections($brandId: ID, $status: CooCollectionStatus) {
|
|
50
50
|
cooListCollections(brandId: $brandId, status: $status) {
|
|
51
51
|
items { id name description season status brandId tags publishAt endAt createdAt }
|
|
52
52
|
pageInfo { cursor hasMore }
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
`,
|
|
55
|
+
`,U=`
|
|
56
56
|
mutation CooCreateCollection($input: CooCreateCollectionInput!) {
|
|
57
57
|
cooCreateCollection(input: $input) {
|
|
58
58
|
id name description season status brandId tags publishAt endAt createdAt
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
`,
|
|
61
|
+
`,B=`
|
|
62
62
|
mutation CooUpdateCollection($id: ID!, $input: CooUpdateCollectionInput!) {
|
|
63
63
|
cooUpdateCollection(id: $id, input: $input) {
|
|
64
64
|
id name description season status brandId tags publishAt endAt updatedAt
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
`,
|
|
67
|
+
`,W=`
|
|
68
68
|
mutation CooPublishCollection($id: ID!) {
|
|
69
69
|
cooPublishCollection(id: $id) {
|
|
70
70
|
id name status publishAt updatedAt
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
`,
|
|
73
|
+
`,q=`
|
|
74
74
|
query CooGetStyleItem($id: ID!) {
|
|
75
75
|
cooStyleItem(id: $id) {
|
|
76
76
|
id name sku category status brandId collectionId price currency
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
createdAt updatedAt workspaceId
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
`,
|
|
81
|
+
`,G=`
|
|
82
82
|
query CooListStyleItems(
|
|
83
83
|
$brandId: ID
|
|
84
84
|
$category: CooStyleCategory
|
|
@@ -99,32 +99,32 @@
|
|
|
99
99
|
pageInfo { cursor hasMore }
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
`,
|
|
102
|
+
`,M=`
|
|
103
103
|
mutation CooCreateStyleItem($input: CooCreateStyleItemInput!) {
|
|
104
104
|
cooCreateStyleItem(input: $input) {
|
|
105
105
|
id name sku category status brandId collectionId price currency
|
|
106
106
|
colours sizes materials description tags createdAt
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
`,
|
|
109
|
+
`,z=`
|
|
110
110
|
mutation CooUpdateStyleItem($id: ID!, $input: CooUpdateStyleItemInput!) {
|
|
111
111
|
cooUpdateStyleItem(id: $id, input: $input) {
|
|
112
112
|
id name sku category status brandId collectionId price currency
|
|
113
113
|
colours sizes materials description tags updatedAt
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
`,
|
|
116
|
+
`,H=`
|
|
117
117
|
mutation CooArchiveStyleItem($id: ID!) {
|
|
118
118
|
cooArchiveStyleItem(id: $id)
|
|
119
119
|
}
|
|
120
|
-
`,
|
|
120
|
+
`,K=`
|
|
121
121
|
query CooGetCollaboration($id: ID!) {
|
|
122
122
|
cooCollaboration(id: $id) {
|
|
123
123
|
id title status role brandId creatorId collectionId compensation currency
|
|
124
124
|
brief startDate endDate publishedAt tags createdAt updatedAt workspaceId
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
`,
|
|
127
|
+
`,j=`
|
|
128
128
|
query CooListCollaborations($brandId: ID, $creatorId: ID, $status: CooCollaborationStatus) {
|
|
129
129
|
cooListCollaborations(brandId: $brandId, creatorId: $creatorId, status: $status) {
|
|
130
130
|
items {
|
|
@@ -134,20 +134,20 @@
|
|
|
134
134
|
pageInfo { cursor hasMore }
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
`,
|
|
137
|
+
`,V=`
|
|
138
138
|
mutation CooCreateCollaboration($input: CooCreateCollaborationInput!) {
|
|
139
139
|
cooCreateCollaboration(input: $input) {
|
|
140
140
|
id title status role brandId creatorId collectionId compensation currency
|
|
141
141
|
brief startDate endDate tags createdAt
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
`,
|
|
144
|
+
`,Y=`
|
|
145
145
|
mutation CooTransitionCollaboration($id: ID!, $status: CooCollaborationStatus!) {
|
|
146
146
|
cooTransitionCollaboration(id: $id, status: $status) {
|
|
147
147
|
id title status publishedAt updatedAt
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
`,
|
|
150
|
+
`,J=`
|
|
151
151
|
query CooGetLook($id: ID!) {
|
|
152
152
|
cooLook(id: $id) {
|
|
153
153
|
id title caption occasion visibility isFeatured likeCount saveCount authorId
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
createdAt updatedAt workspaceId
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
`,
|
|
161
|
+
`,Q=`
|
|
162
162
|
query CooListLooks(
|
|
163
163
|
$authorId: ID
|
|
164
164
|
$featured: Boolean
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
pageInfo { cursor hasMore }
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
`,
|
|
181
|
+
`,X=`
|
|
182
182
|
mutation CooCreateLook($input: CooCreateLookInput!) {
|
|
183
183
|
cooCreateLook(input: $input) {
|
|
184
184
|
id title caption occasion visibility isFeatured authorId collaborationId tags
|
|
@@ -186,29 +186,29 @@
|
|
|
186
186
|
createdAt
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
`,
|
|
189
|
+
`,Z=`
|
|
190
190
|
mutation CooUpdateLook($id: ID!, $input: CooUpdateLookInput!) {
|
|
191
191
|
cooUpdateLook(id: $id, input: $input) {
|
|
192
192
|
id title caption occasion visibility tags updatedAt
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
`,
|
|
195
|
+
`,tt=`
|
|
196
196
|
mutation CooPublishLook($id: ID!) {
|
|
197
197
|
cooPublishLook(id: $id) {
|
|
198
198
|
id title visibility publishedAt updatedAt
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
`,
|
|
201
|
+
`,et=`
|
|
202
202
|
mutation CooLikeLook($id: ID!) {
|
|
203
203
|
cooLikeLook(id: $id) {
|
|
204
204
|
id title likeCount updatedAt
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
`,
|
|
207
|
+
`,ot=`
|
|
208
208
|
mutation CooDeleteLook($id: ID!) {
|
|
209
209
|
cooDeleteLook(id: $id)
|
|
210
210
|
}
|
|
211
|
-
`,
|
|
211
|
+
`,nt=`
|
|
212
212
|
query CooGetLookbook($id: ID!) {
|
|
213
213
|
cooLookbook(id: $id) {
|
|
214
214
|
id name description visibility ownerId profileId
|
|
@@ -218,30 +218,30 @@
|
|
|
218
218
|
createdAt updatedAt workspaceId
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
|
-
`,
|
|
221
|
+
`,rt=`
|
|
222
222
|
query CooListLookbooks($ownerId: ID) {
|
|
223
223
|
cooListLookbooks(ownerId: $ownerId) {
|
|
224
224
|
items { id name description visibility ownerId profileId tags createdAt }
|
|
225
225
|
pageInfo { cursor hasMore }
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
`,
|
|
228
|
+
`,it=`
|
|
229
229
|
mutation CooCreateLookbook($input: CooCreateLookbookInput!) {
|
|
230
230
|
cooCreateLookbook(input: $input) {
|
|
231
231
|
id name description visibility ownerId profileId tags createdAt
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
`,
|
|
234
|
+
`,st=`
|
|
235
235
|
mutation CooAddLookbookEntry($input: CooAddLookbookEntryInput!) {
|
|
236
236
|
cooAddLookbookEntry(input: $input) {
|
|
237
237
|
id lookbookId lookId styleItemId note position createdAt workspaceId
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
`,
|
|
240
|
+
`,at=`
|
|
241
241
|
mutation CooRemoveLookbookEntry($id: ID!) {
|
|
242
242
|
cooRemoveLookbookEntry(id: $id)
|
|
243
243
|
}
|
|
244
|
-
`,
|
|
244
|
+
`,ct=`
|
|
245
245
|
query CooListWardrobeItems($category: CooStyleCategory, $source: CooWardrobeSource) {
|
|
246
246
|
cooListWardrobeItems(category: $category, source: $source) {
|
|
247
247
|
items {
|
|
@@ -251,45 +251,45 @@
|
|
|
251
251
|
pageInfo { cursor hasMore }
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
`,
|
|
254
|
+
`,dt=`
|
|
255
255
|
mutation CooCreateWardrobeItem($input: CooCreateWardrobeItemInput!) {
|
|
256
256
|
cooCreateWardrobeItem(input: $input) {
|
|
257
257
|
id name brandName category colour size source styleItemId notes
|
|
258
258
|
tags timesWorn createdAt workspaceId
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
|
-
`,
|
|
261
|
+
`,ut=`
|
|
262
262
|
mutation CooUpdateWardrobeItem($id: ID!, $input: CooUpdateWardrobeItemInput!) {
|
|
263
263
|
cooUpdateWardrobeItem(id: $id, input: $input) {
|
|
264
264
|
id name brandName category colour size source notes tags updatedAt
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
|
-
`,
|
|
267
|
+
`,lt=`
|
|
268
268
|
mutation CooLogWardrobeWear($id: ID!) {
|
|
269
269
|
cooLogWardrobeWear(id: $id) {
|
|
270
270
|
id name timesWorn lastWornAt updatedAt
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
|
-
`,
|
|
273
|
+
`,pt=`
|
|
274
274
|
mutation CooRemoveWardrobeItem($id: ID!) {
|
|
275
275
|
cooRemoveWardrobeItem(id: $id)
|
|
276
276
|
}
|
|
277
|
-
`,
|
|
277
|
+
`,mt=`
|
|
278
278
|
query CooMyStyleProfile {
|
|
279
279
|
cooMyStyleProfile {
|
|
280
280
|
id displayName bio visibility ownerId favouriteBrands palette
|
|
281
281
|
stylePreferences sizes createdAt updatedAt workspaceId
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
|
-
`,
|
|
284
|
+
`,gt=`
|
|
285
285
|
mutation CooUpsertStyleProfile($input: CooUpsertStyleProfileInput!) {
|
|
286
286
|
cooUpsertStyleProfile(input: $input) {
|
|
287
287
|
id displayName bio visibility ownerId favouriteBrands palette
|
|
288
288
|
stylePreferences sizes updatedAt
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
|
-
`,
|
|
291
|
+
`,ft=`
|
|
292
292
|
query CooHealth {
|
|
293
293
|
cooHealth
|
|
294
294
|
}
|
|
295
|
-
`;function k(r,n){try{return JSON.parse(n)}catch{throw new d(`--${r} must be valid JSON`)}}function g(r){let n=Number.parseInt(r,10);if(Number.isNaN(n))throw new d(`Expected an integer but got "${r}"`);return n}function I(r){let n=Number.parseFloat(r);if(Number.isNaN(n))throw new d(`Expected a number but got "${r}"`);return n}function u(r){return r.split(",").map(n=>n.trim()).filter(n=>n.length>0)}function pt(r){let n=r.command("brands").description("Coolandlovely brand storefronts");n.command("list").description("List brand storefronts").option("--status <s>","Filter by brand status").option("--featured","Only featured brands").option("--limit <n>","Page size",g,50).option("--offset <n>","Offset",g,0).option("--cursor <c>","Pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(v,{status:t.status?t.status.toUpperCase():void 0,featured:t.featured?!0:void 0,pagination:{limit:t.limit,offset:t.offset,cursor:t.cursor}});s(t,e.cooListBrands.items,{headers:["ID","Name","Handle","Status","Featured"],rows:e.cooListBrands.items.map(o=>[p(o.id,12),o.name,o.handle,o.status,o.isFeatured?"yes":"no"])});}catch(e){i(e);}}),n.command("get").description("Get a brand by id").argument("<id>","Brand ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(A,{id:t});if(!o.cooBrand)throw new d(`Brand ${t} not found`);s(e,o.cooBrand);}catch(o){i(o);}}),n.command("create").description("Create a brand storefront").requiredOption("--name <name>","Brand name").requiredOption("--handle <handle>","Unique storefront handle").option("--tagline <s>","Tagline").option("--bio <s>","Bio").option("--website-url <url>","Website URL").option("--logo-file <id>","Logo File ID (wspace-files-svc)").option("--cover-file <id>","Cover File ID (wspace-files-svc)").option("--aesthetics <csv>","Comma-separated aesthetics").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,handle:t.handle};t.tagline&&(e.tagline=t.tagline),t.bio&&(e.bio=t.bio),t.websiteUrl&&(e.websiteUrl=t.websiteUrl),t.logoFile&&(e.logoFileId=t.logoFile),t.coverFile&&(e.coverFileId=t.coverFile),t.aesthetics&&(e.aesthetics=u(t.aesthetics)),t.tags&&(e.tags=u(t.tags));let o=await a(T,{input:e});c(`Brand created: ${o.cooCreateBrand.name}`),s(t,o.cooCreateBrand);}catch(e){i(e);}}),n.command("update").description("Update a brand storefront").argument("<id>","Brand ID").option("--name <name>","Brand name").option("--tagline <s>","Tagline").option("--bio <s>","Bio").option("--website-url <url>","Website URL").option("--logo-file <id>","Logo File ID").option("--cover-file <id>","Cover File ID").option("--featured <bool>","true|false",t=>t==="true").option("--aesthetics <csv>","Comma-separated aesthetics").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.name&&(o.name=e.name),e.tagline!==void 0&&(o.tagline=e.tagline),e.bio!==void 0&&(o.bio=e.bio),e.websiteUrl!==void 0&&(o.websiteUrl=e.websiteUrl),e.logoFile&&(o.logoFileId=e.logoFile),e.coverFile&&(o.coverFileId=e.coverFile),e.featured!==void 0&&(o.isFeatured=e.featured),e.aesthetics&&(o.aesthetics=u(e.aesthetics)),e.tags&&(o.tags=u(e.tags)),!Object.keys(o).length)throw new d("No updates specified");let m=await a(x,{id:t,input:o});c("Brand updated"),s(e,m.cooUpdateBrand);}catch(o){i(o);}}),n.command("transition").description("Advance a brand through its publish lifecycle").argument("<id>","Brand ID").requiredOption("--status <s>","DRAFT|PENDING_REVIEW|PUBLISHED|SUSPENDED|ARCHIVED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(S,{id:t,status:e.status.toUpperCase()});c(`Brand status set to ${o.cooTransitionBrand.status}`),s(e,o.cooTransitionBrand);}catch(o){i(o);}}),n.command("archive").description("Archive a brand storefront").argument("<id>","Brand ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(R,{id:t});c(`Brand archived: ${o.cooArchiveBrand}`),s(e,{archived:o.cooArchiveBrand});}catch(o){i(o);}});}function mt(r){let n=r.command("collections").description("Coolandlovely seasonal collections");n.command("list").description("List collections").option("--brand <id>","Filter by brand ID").option("--status <s>","Filter by collection status").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a($,{brandId:t.brand,status:t.status?t.status.toUpperCase():void 0});s(t,e.cooListCollections.items,{headers:["ID","Name","Season","Status","Brand"],rows:e.cooListCollections.items.map(o=>[p(o.id,12),o.name,o.season,o.status,p(o.brandId,12)])});}catch(e){i(e);}}),n.command("get").description("Get a collection by id").argument("<id>","Collection ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(D,{id:t});if(!o.cooCollection)throw new d(`Collection ${t} not found`);s(e,o.cooCollection);}catch(o){i(o);}}),n.command("create").description("Create a collection").requiredOption("--brand <id>","Brand ID").requiredOption("--name <name>","Collection name").option("--description <s>","Description").option("--season <s>","ALL_SEASON|SPRING|SUMMER|AUTUMN|WINTER|RESORT").option("--cover-file <id>","Cover File ID").option("--publish-at <iso>","Scheduled publish date (ISO 8601)").option("--end-at <iso>","End date (ISO 8601)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={brandId:t.brand,name:t.name};t.description&&(e.description=t.description),t.season&&(e.season=t.season.toUpperCase()),t.coverFile&&(e.coverFileId=t.coverFile),t.publishAt&&(e.publishAt=t.publishAt),t.endAt&&(e.endAt=t.endAt),t.tags&&(e.tags=u(t.tags));let o=await a(P,{input:e});c(`Collection created: ${o.cooCreateCollection.name}`),s(t,o.cooCreateCollection);}catch(e){i(e);}}),n.command("update").description("Update a collection").argument("<id>","Collection ID").option("--name <name>","Collection name").option("--description <s>","Description").option("--season <s>","ALL_SEASON|SPRING|SUMMER|AUTUMN|WINTER|RESORT").option("--cover-file <id>","Cover File ID").option("--publish-at <iso>","Scheduled publish date (ISO 8601)").option("--end-at <iso>","End date (ISO 8601)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.name&&(o.name=e.name),e.description!==void 0&&(o.description=e.description),e.season&&(o.season=e.season.toUpperCase()),e.coverFile&&(o.coverFileId=e.coverFile),e.publishAt&&(o.publishAt=e.publishAt),e.endAt&&(o.endAt=e.endAt),e.tags&&(o.tags=u(e.tags)),!Object.keys(o).length)throw new d("No updates specified");let m=await a(_,{id:t,input:o});c("Collection updated"),s(e,m.cooUpdateCollection);}catch(o){i(o);}}),n.command("publish").description("Publish a collection (go live)").argument("<id>","Collection ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(N,{id:t});c(`Collection published: ${o.cooPublishCollection.status}`),s(e,o.cooPublishCollection);}catch(o){i(o);}});}function gt(r){let n=r.command("style-items").description("Coolandlovely style items (catalog products)");n.command("list").description("List style items").option("--brand <id>","Filter by brand ID").option("--collection <id>","Filter by collection ID").option("--category <c>","Filter by category").option("--status <s>","Filter by status").option("--limit <n>","Page size",g,50).option("--offset <n>","Offset",g,0).option("--cursor <c>","Pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(U,{brandId:t.brand,collectionId:t.collection,category:t.category?t.category.toUpperCase():void 0,status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset,cursor:t.cursor}});s(t,e.cooListStyleItems.items,{headers:["ID","Name","Category","Status","Price"],rows:e.cooListStyleItems.items.map(o=>[p(o.id,12),o.name,o.category,o.status,`${o.price} ${o.currency}`])});}catch(e){i(e);}}),n.command("get").description("Get a style item by id").argument("<id>","Style item ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(F,{id:t});if(!o.cooStyleItem)throw new d(`Style item ${t} not found`);s(e,o.cooStyleItem);}catch(o){i(o);}}),n.command("create").description("Create a style item").requiredOption("--brand <id>","Brand ID").requiredOption("--name <name>","Item name").option("--category <c>","Category").option("--collection <id>","Collection ID").option("--description <s>","Description").option("--sku <sku>","SKU").option("--price <n>","Price",I).option("--currency <c>","Currency code").option("--image-file <id>","Image File ID").option("--colours <csv>","Comma-separated colours").option("--sizes <csv>","Comma-separated sizes").option("--materials <csv>","Comma-separated materials").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={brandId:t.brand,name:t.name};t.category&&(e.category=t.category.toUpperCase()),t.collection&&(e.collectionId=t.collection),t.description&&(e.description=t.description),t.sku&&(e.sku=t.sku),t.price!==void 0&&(e.price=t.price),t.currency&&(e.currency=t.currency),t.imageFile&&(e.imageFileId=t.imageFile),t.colours&&(e.colours=u(t.colours)),t.sizes&&(e.sizes=u(t.sizes)),t.materials&&(e.materials=u(t.materials)),t.tags&&(e.tags=u(t.tags));let o=await a(W,{input:e});c(`Style item created: ${o.cooCreateStyleItem.name}`),s(t,o.cooCreateStyleItem);}catch(e){i(e);}}),n.command("update").description("Update a style item").argument("<id>","Style item ID").option("--name <name>","Item name").option("--category <c>","Category").option("--collection <id>","Collection ID").option("--description <s>","Description").option("--sku <sku>","SKU").option("--price <n>","Price",I).option("--currency <c>","Currency code").option("--image-file <id>","Image File ID").option("--colours <csv>","Comma-separated colours").option("--sizes <csv>","Comma-separated sizes").option("--materials <csv>","Comma-separated materials").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.name&&(o.name=e.name),e.category&&(o.category=e.category.toUpperCase()),e.collection&&(o.collectionId=e.collection),e.description!==void 0&&(o.description=e.description),e.sku!==void 0&&(o.sku=e.sku),e.price!==void 0&&(o.price=e.price),e.currency&&(o.currency=e.currency),e.imageFile&&(o.imageFileId=e.imageFile),e.colours&&(o.colours=u(e.colours)),e.sizes&&(o.sizes=u(e.sizes)),e.materials&&(o.materials=u(e.materials)),e.tags&&(o.tags=u(e.tags)),!Object.keys(o).length)throw new d("No updates specified");let m=await a(B,{id:t,input:o});c("Style item updated"),s(e,m.cooUpdateStyleItem);}catch(o){i(o);}}),n.command("archive").description("Archive (retire) a style item").argument("<id>","Style item ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(q,{id:t});c(`Style item archived: ${o.cooArchiveStyleItem}`),s(e,{archived:o.cooArchiveStyleItem});}catch(o){i(o);}});}function ft(r){let n=r.command("collaborations").description("Coolandlovely brand \u2194 creator collaborations");n.command("list").description("List collaborations").option("--brand <id>","Filter by brand ID").option("--creator <id>","Filter by creator ID").option("--status <s>","Filter by status").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(G,{brandId:t.brand,creatorId:t.creator,status:t.status?t.status.toUpperCase():void 0});s(t,e.cooListCollaborations.items,{headers:["ID","Title","Status","Role","Brand","Creator"],rows:e.cooListCollaborations.items.map(o=>[p(o.id,12),o.title,o.status,o.role,p(o.brandId,12),p(o.creatorId,12)])});}catch(e){i(e);}}),n.command("get").description("Get a collaboration by id").argument("<id>","Collaboration ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(M,{id:t});if(!o.cooCollaboration)throw new d(`Collaboration ${t} not found`);s(e,o.cooCollaboration);}catch(o){i(o);}}),n.command("create").description("Create a collaboration").requiredOption("--brand <id>","Brand ID").requiredOption("--creator <id>","Creator user ID").requiredOption("--title <title>","Collaboration title").option("--brief <s>","Brief").option("--collection <id>","Collection ID").option("--role <r>","CREATOR|STYLIST|PHOTOGRAPHER|BRAND").option("--compensation <n>","Compensation",I).option("--currency <c>","Currency code").option("--start-date <iso>","Start date (ISO 8601)").option("--end-date <iso>","End date (ISO 8601)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={brandId:t.brand,creatorId:t.creator,title:t.title};t.brief&&(e.brief=t.brief),t.collection&&(e.collectionId=t.collection),t.role&&(e.role=t.role.toUpperCase()),t.compensation!==void 0&&(e.compensation=t.compensation),t.currency&&(e.currency=t.currency),t.startDate&&(e.startDate=t.startDate),t.endDate&&(e.endDate=t.endDate),t.tags&&(e.tags=u(t.tags));let o=await a(z,{input:e});c(`Collaboration created: ${o.cooCreateCollaboration.title}`),s(t,o.cooCreateCollaboration);}catch(e){i(e);}}),n.command("transition").description("Advance a collaboration through its lifecycle").argument("<id>","Collaboration ID").requiredOption("--status <s>","PROPOSED|ACCEPTED|DECLINED|IN_PROGRESS|PUBLISHED|CANCELLED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(K,{id:t,status:e.status.toUpperCase()});c(`Collaboration status set to ${o.cooTransitionCollaboration.status}`),s(e,o.cooTransitionCollaboration);}catch(o){i(o);}});}function yt(r){let n=r.command("looks").description("Coolandlovely styled looks");n.command("list").description("List looks").option("--author <id>","Filter by author ID").option("--occasion <o>","Filter by occasion").option("--featured","Only featured looks").option("--limit <n>","Page size",g,50).option("--offset <n>","Offset",g,0).option("--cursor <c>","Pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(j,{authorId:t.author,occasion:t.occasion?t.occasion.toUpperCase():void 0,featured:t.featured?!0:void 0,pagination:{limit:t.limit,offset:t.offset,cursor:t.cursor}});s(t,e.cooListLooks.items,{headers:["ID","Title","Occasion","Visibility","Likes","Featured"],rows:e.cooListLooks.items.map(o=>[p(o.id,12),o.title,o.occasion,o.visibility,String(o.likeCount??0),o.isFeatured?"yes":"no"])});}catch(e){i(e);}}),n.command("get").description("Get a look by id").argument("<id>","Look ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(H,{id:t});if(!o.cooLook)throw new d(`Look ${t} not found`);s(e,o.cooLook);}catch(o){i(o);}}),n.command("create").description("Create a look").requiredOption("--title <title>","Look title").option("--caption <s>","Caption").option("--collaboration <id>","Collaboration ID").option("--image-file <id>","Image File ID").option("--occasion <o>","EVERYDAY|WORK|EVENING|PARTY|WEDDING_GUEST|VACATION|ACTIVE|OTHER").option("--visibility <v>","PUBLIC|FOLLOWERS|PRIVATE").option("--items <json>","Look items JSON array: [{ styleItemId, position?, styling? }]").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={title:t.title};if(t.caption&&(e.caption=t.caption),t.collaboration&&(e.collaborationId=t.collaboration),t.imageFile&&(e.imageFileId=t.imageFile),t.occasion&&(e.occasion=t.occasion.toUpperCase()),t.visibility&&(e.visibility=t.visibility.toUpperCase()),t.items){let m=k("items",t.items);if(!Array.isArray(m))throw new d("--items must be a JSON array");e.items=m;}t.tags&&(e.tags=u(t.tags));let o=await a(V,{input:e});c(`Look created: ${o.cooCreateLook.title}`),s(t,o.cooCreateLook);}catch(e){i(e);}}),n.command("update").description("Update a look").argument("<id>","Look ID").option("--title <title>","Look title").option("--caption <s>","Caption").option("--image-file <id>","Image File ID").option("--occasion <o>","Occasion").option("--visibility <v>","PUBLIC|FOLLOWERS|PRIVATE").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.title&&(o.title=e.title),e.caption!==void 0&&(o.caption=e.caption),e.imageFile&&(o.imageFileId=e.imageFile),e.occasion&&(o.occasion=e.occasion.toUpperCase()),e.visibility&&(o.visibility=e.visibility.toUpperCase()),e.tags&&(o.tags=u(e.tags)),!Object.keys(o).length)throw new d("No updates specified");let m=await a(Y,{id:t,input:o});c("Look updated"),s(e,m.cooUpdateLook);}catch(o){i(o);}}),n.command("publish").description("Publish a look").argument("<id>","Look ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(J,{id:t});c(`Look published: ${o.cooPublishLook.title}`),s(e,o.cooPublishLook);}catch(o){i(o);}}),n.command("like").description("Like a published look").argument("<id>","Look ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(Q,{id:t});c(`Look liked (likes: ${o.cooLikeLook.likeCount??0})`),s(e,o.cooLikeLook);}catch(o){i(o);}}),n.command("delete").description("Delete a look").argument("<id>","Look ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(X,{id:t});c(`Look deleted: ${o.cooDeleteLook}`),s(e,{deleted:o.cooDeleteLook});}catch(o){i(o);}});}function Ct(r){let n=r.command("lookbooks").description("Coolandlovely curated lookbooks");n.command("list").description("List lookbooks").option("--owner <id>","Filter by owner ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(tt,{ownerId:t.owner});s(t,e.cooListLookbooks.items,{headers:["ID","Name","Visibility","Owner"],rows:e.cooListLookbooks.items.map(o=>[p(o.id,12),o.name,o.visibility,p(o.ownerId,12)])});}catch(e){i(e);}}),n.command("get").description("Get a lookbook by id").argument("<id>","Lookbook ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(Z,{id:t});if(!o.cooLookbook)throw new d(`Lookbook ${t} not found`);s(e,o.cooLookbook);}catch(o){i(o);}}),n.command("create").description("Create a lookbook").requiredOption("--name <name>","Lookbook name").option("--description <s>","Description").option("--cover-file <id>","Cover File ID").option("--visibility <v>","PUBLIC|FOLLOWERS|PRIVATE").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name};t.description&&(e.description=t.description),t.coverFile&&(e.coverFileId=t.coverFile),t.visibility&&(e.visibility=t.visibility.toUpperCase()),t.tags&&(e.tags=u(t.tags));let o=await a(et,{input:e});c(`Lookbook created: ${o.cooCreateLookbook.name}`),s(t,o.cooCreateLookbook);}catch(e){i(e);}}),n.command("add-entry").description("Add an entry (look or style item) to a lookbook").requiredOption("--lookbook <id>","Lookbook ID").option("--look <id>","Look ID to add").option("--style-item <id>","Style item ID to add").option("--note <s>","Note").option("--position <n>","Position",g).option("-f, --format <format>","Output format").action(async t=>{try{let e={lookbookId:t.lookbook};t.look&&(e.lookId=t.look),t.styleItem&&(e.styleItemId=t.styleItem),t.note&&(e.note=t.note),t.position!==void 0&&(e.position=t.position);let o=await a(ot,{input:e});c(`Lookbook entry added: ${o.cooAddLookbookEntry.id}`),s(t,o.cooAddLookbookEntry);}catch(e){i(e);}}),n.command("remove-entry").description("Remove an entry from a lookbook").argument("<id>","Lookbook entry ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(nt,{id:t});c(`Lookbook entry removed: ${o.cooRemoveLookbookEntry}`),s(e,{removed:o.cooRemoveLookbookEntry});}catch(o){i(o);}});}function bt(r){let n=r.command("wardrobe").description("Coolandlovely digital wardrobe (the shopper's own pieces)");n.command("list").description("List wardrobe items").option("--category <c>","Filter by category").option("--source <s>","Filter by source").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(rt,{category:t.category?t.category.toUpperCase():void 0,source:t.source?t.source.toUpperCase():void 0});s(t,e.cooListWardrobeItems.items,{headers:["ID","Name","Category","Source","Times Worn"],rows:e.cooListWardrobeItems.items.map(o=>[p(o.id,12),o.name,o.category,o.source,String(o.timesWorn??0)])});}catch(e){i(e);}}),n.command("create").description("Add an item to the wardrobe").requiredOption("--name <name>","Item name").option("--brand-name <s>","Brand name (free text)").option("--category <c>","Category").option("--colour <s>","Colour").option("--size <s>","Size").option("--source <s>","OWNED|PURCHASED_ON_PLATFORM|GIFTED|WISHLIST").option("--style-item <id>","Linked style item ID").option("--image-file <id>","Image File ID").option("--notes <s>","Notes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name};t.brandName&&(e.brandName=t.brandName),t.category&&(e.category=t.category.toUpperCase()),t.colour&&(e.colour=t.colour),t.size&&(e.size=t.size),t.source&&(e.source=t.source.toUpperCase()),t.styleItem&&(e.styleItemId=t.styleItem),t.imageFile&&(e.imageFileId=t.imageFile),t.notes&&(e.notes=t.notes),t.tags&&(e.tags=u(t.tags));let o=await a(it,{input:e});c(`Wardrobe item added: ${o.cooCreateWardrobeItem.name}`),s(t,o.cooCreateWardrobeItem);}catch(e){i(e);}}),n.command("update").description("Update a wardrobe item").argument("<id>","Wardrobe item ID").option("--name <name>","Item name").option("--brand-name <s>","Brand name (free text)").option("--category <c>","Category").option("--colour <s>","Colour").option("--size <s>","Size").option("--source <s>","OWNED|PURCHASED_ON_PLATFORM|GIFTED|WISHLIST").option("--image-file <id>","Image File ID").option("--notes <s>","Notes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.name&&(o.name=e.name),e.brandName!==void 0&&(o.brandName=e.brandName),e.category&&(o.category=e.category.toUpperCase()),e.colour!==void 0&&(o.colour=e.colour),e.size!==void 0&&(o.size=e.size),e.source&&(o.source=e.source.toUpperCase()),e.imageFile&&(o.imageFileId=e.imageFile),e.notes!==void 0&&(o.notes=e.notes),e.tags&&(o.tags=u(e.tags)),!Object.keys(o).length)throw new d("No updates specified");let m=await a(st,{id:t,input:o});c("Wardrobe item updated"),s(e,m.cooUpdateWardrobeItem);}catch(o){i(o);}}),n.command("wear").description("Log that the shopper wore a wardrobe piece").argument("<id>","Wardrobe item ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(at,{id:t});c(`Wear logged (times worn: ${o.cooLogWardrobeWear.timesWorn??0})`),s(e,o.cooLogWardrobeWear);}catch(o){i(o);}}),n.command("remove").description("Remove a wardrobe item").argument("<id>","Wardrobe item ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(ct,{id:t});c(`Wardrobe item removed: ${o.cooRemoveWardrobeItem}`),s(e,{removed:o.cooRemoveWardrobeItem});}catch(o){i(o);}});}function It(r){let n=r.command("profile").description("Coolandlovely shopper style profile (self-scoped)");n.command("get").description("Show the calling shopper's own style profile").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(dt);if(!e.cooMyStyleProfile)throw new d("No style profile yet. Run `profile upsert` to create one.");s(t,e.cooMyStyleProfile);}catch(e){i(e);}}),n.command("upsert").description("Create or update the calling shopper style profile").option("--display-name <s>","Display name").option("--bio <s>","Bio").option("--visibility <v>","PUBLIC|FOLLOWERS|PRIVATE").option("--favourite-brands <csv>","Comma-separated favourite brands").option("--palette <csv>","Comma-separated colour palette").option("--style-preferences <csv>","Comma-separated style preferences").option("--sizes <json>",'Sizes JSON (e.g. {"tops":"M","shoes":"8"})').option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.displayName&&(e.displayName=t.displayName),t.bio!==void 0&&(e.bio=t.bio),t.visibility&&(e.visibility=t.visibility.toUpperCase()),t.favouriteBrands&&(e.favouriteBrands=u(t.favouriteBrands)),t.palette&&(e.palette=u(t.palette)),t.stylePreferences&&(e.stylePreferences=u(t.stylePreferences)),t.sizes&&(e.sizes=k("sizes",t.sizes));let o=await a(ut,{input:e});c("Style profile saved"),s(t,o.cooUpsertStyleProfile);}catch(e){i(e);}});}function kt(r){r.command("health").description("Coolandlovely service health check (public)").option("-f, --format <format>","Output format").action(async n=>{try{let t=await w(lt);c(t.cooHealth),s(n,{health:t.cooHealth});}catch(t){i(t);}});}var $t={id:"coolandlovely",version:"1.0.0",displayName:"Coolandlovely",dependsOn:["auth","workspaces"],register(r,n){O(n);let t=r.command("coolandlovely").description("Coolandlovely fashion & lifestyle platform");pt(t),mt(t),gt(t),ft(t),yt(t),Ct(t),bt(t),It(t),kt(t);}},xo=$t;module.exports=xo;
|
|
295
|
+
`;function E(r,n){try{return JSON.parse(n)}catch{throw new c(`--${r} must be valid JSON`)}}function f(r){let n=Number.parseInt(r,10);if(Number.isNaN(n))throw new c(`Expected an integer but got "${r}"`);return n}function h(r){let n=Number.parseFloat(r);if(Number.isNaN(n))throw new c(`Expected a number but got "${r}"`);return n}function u(r){return r.split(",").map(n=>n.trim()).filter(n=>n.length>0)}function yt(r){let n=r.command("brands").description("Coolandlovely brand storefronts");n.command("list").description("List brand storefronts").option("--status <s>","Filter by brand status").option("--featured","Only featured brands").option("--limit <n>","Page size",f,50).option("--offset <n>","Offset",f,0).option("--cursor <c>","Pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(R,{status:t.status?t.status.toUpperCase():void 0,featured:t.featured?!0:void 0,pagination:{limit:t.limit,offset:t.offset,cursor:t.cursor}});s(t,e.cooListBrands.items,{headers:["ID","Name","Handle","Status","Featured"],rows:e.cooListBrands.items.map(o=>[m(o.id,12),o.name,o.handle,o.status,o.isFeatured?"yes":"no"])});}catch(e){i(e);}}),n.command("get").description("Get a brand by id").argument("<id>","Brand ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(S,{id:t});if(!o.cooBrand)throw new c(`Brand ${t} not found`);s(e,o.cooBrand);}catch(o){i(o);}}),n.command("create").description("Create a brand storefront").requiredOption("--name <name>","Brand name").requiredOption("--handle <handle>","Unique storefront handle").option("--tagline <s>","Tagline").option("--bio <s>","Bio").option("--website-url <url>","Website URL").option("--logo-file <id>","Logo File ID (wspace-files-svc)").option("--cover-file <id>","Cover File ID (wspace-files-svc)").option("--aesthetics <csv>","Comma-separated aesthetics").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,handle:t.handle};t.tagline&&(e.tagline=t.tagline),t.bio&&(e.bio=t.bio),t.websiteUrl&&(e.websiteUrl=t.websiteUrl),t.logoFile&&(e.logoFileId=t.logoFile),t.coverFile&&(e.coverFileId=t.coverFile),t.aesthetics&&(e.aesthetics=u(t.aesthetics)),t.tags&&(e.tags=u(t.tags));let o=await a(D,{input:e});d(`Brand created: ${o.cooCreateBrand.name}`),s(t,o.cooCreateBrand);}catch(e){i(e);}}),n.command("update").description("Update a brand storefront").argument("<id>","Brand ID").option("--name <name>","Brand name").option("--tagline <s>","Tagline").option("--bio <s>","Bio").option("--website-url <url>","Website URL").option("--logo-file <id>","Logo File ID").option("--cover-file <id>","Cover File ID").option("--featured <bool>","true|false",t=>t==="true").option("--aesthetics <csv>","Comma-separated aesthetics").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.name&&(o.name=e.name),e.tagline!==void 0&&(o.tagline=e.tagline),e.bio!==void 0&&(o.bio=e.bio),e.websiteUrl!==void 0&&(o.websiteUrl=e.websiteUrl),e.logoFile&&(o.logoFileId=e.logoFile),e.coverFile&&(o.coverFileId=e.coverFile),e.featured!==void 0&&(o.isFeatured=e.featured),e.aesthetics&&(o.aesthetics=u(e.aesthetics)),e.tags&&(o.tags=u(e.tags)),!Object.keys(o).length)throw new c("No updates specified");let p=await a($,{id:t,input:o});d("Brand updated"),s(e,p.cooUpdateBrand);}catch(o){i(o);}}),n.command("transition").description("Advance a brand through its publish lifecycle").argument("<id>","Brand ID").requiredOption("--status <s>","DRAFT|PENDING_REVIEW|PUBLISHED|SUSPENDED|ARCHIVED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(P,{id:t,status:e.status.toUpperCase()});d(`Brand status set to ${o.cooTransitionBrand.status}`),s(e,o.cooTransitionBrand);}catch(o){i(o);}}),n.command("archive").description("Archive a brand storefront").argument("<id>","Brand ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(_,{id:t});d(`Brand archived: ${o.cooArchiveBrand}`),s(e,{archived:o.cooArchiveBrand});}catch(o){i(o);}});}function Ct(r){let n=r.command("collections").description("Coolandlovely seasonal collections");n.command("list").description("List collections").option("--brand <id>","Filter by brand ID").option("--status <s>","Filter by collection status").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(F,{brandId:t.brand,status:t.status?t.status.toUpperCase():void 0});s(t,e.cooListCollections.items,{headers:["ID","Name","Season","Status","Brand"],rows:e.cooListCollections.items.map(o=>[m(o.id,12),o.name,o.season,o.status,m(o.brandId,12)])});}catch(e){i(e);}}),n.command("get").description("Get a collection by id").argument("<id>","Collection ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(N,{id:t});if(!o.cooCollection)throw new c(`Collection ${t} not found`);s(e,o.cooCollection);}catch(o){i(o);}}),n.command("create").description("Create a collection").requiredOption("--brand <id>","Brand ID").requiredOption("--name <name>","Collection name").option("--description <s>","Description").option("--season <s>","ALL_SEASON|SPRING|SUMMER|AUTUMN|WINTER|RESORT").option("--cover-file <id>","Cover File ID").option("--publish-at <iso>","Scheduled publish date (ISO 8601)").option("--end-at <iso>","End date (ISO 8601)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={brandId:t.brand,name:t.name};t.description&&(e.description=t.description),t.season&&(e.season=t.season.toUpperCase()),t.coverFile&&(e.coverFileId=t.coverFile),t.publishAt&&(e.publishAt=t.publishAt),t.endAt&&(e.endAt=t.endAt),t.tags&&(e.tags=u(t.tags));let o=await a(U,{input:e});d(`Collection created: ${o.cooCreateCollection.name}`),s(t,o.cooCreateCollection);}catch(e){i(e);}}),n.command("update").description("Update a collection").argument("<id>","Collection ID").option("--name <name>","Collection name").option("--description <s>","Description").option("--season <s>","ALL_SEASON|SPRING|SUMMER|AUTUMN|WINTER|RESORT").option("--cover-file <id>","Cover File ID").option("--publish-at <iso>","Scheduled publish date (ISO 8601)").option("--end-at <iso>","End date (ISO 8601)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.name&&(o.name=e.name),e.description!==void 0&&(o.description=e.description),e.season&&(o.season=e.season.toUpperCase()),e.coverFile&&(o.coverFileId=e.coverFile),e.publishAt&&(o.publishAt=e.publishAt),e.endAt&&(o.endAt=e.endAt),e.tags&&(o.tags=u(e.tags)),!Object.keys(o).length)throw new c("No updates specified");let p=await a(B,{id:t,input:o});d("Collection updated"),s(e,p.cooUpdateCollection);}catch(o){i(o);}}),n.command("publish").description("Publish a collection (go live)").argument("<id>","Collection ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(W,{id:t});d(`Collection published: ${o.cooPublishCollection.status}`),s(e,o.cooPublishCollection);}catch(o){i(o);}});}function bt(r){let n=r.command("style-items").description("Coolandlovely style items (catalog products)");n.command("list").description("List style items").option("--brand <id>","Filter by brand ID").option("--collection <id>","Filter by collection ID").option("--category <c>","Filter by category").option("--status <s>","Filter by status").option("--limit <n>","Page size",f,50).option("--offset <n>","Offset",f,0).option("--cursor <c>","Pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(G,{brandId:t.brand,collectionId:t.collection,category:t.category?t.category.toUpperCase():void 0,status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset,cursor:t.cursor}});s(t,e.cooListStyleItems.items,{headers:["ID","Name","Category","Status","Price"],rows:e.cooListStyleItems.items.map(o=>[m(o.id,12),o.name,o.category,o.status,`${o.price} ${o.currency}`])});}catch(e){i(e);}}),n.command("get").description("Get a style item by id").argument("<id>","Style item ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(q,{id:t});if(!o.cooStyleItem)throw new c(`Style item ${t} not found`);s(e,o.cooStyleItem);}catch(o){i(o);}}),n.command("create").description("Create a style item").requiredOption("--brand <id>","Brand ID").requiredOption("--name <name>","Item name").option("--category <c>","Category").option("--collection <id>","Collection ID").option("--description <s>","Description").option("--sku <sku>","SKU").option("--price <n>","Price",h).option("--currency <c>","Currency code").option("--image-file <id>","Image File ID").option("--colours <csv>","Comma-separated colours").option("--sizes <csv>","Comma-separated sizes").option("--materials <csv>","Comma-separated materials").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={brandId:t.brand,name:t.name};t.category&&(e.category=t.category.toUpperCase()),t.collection&&(e.collectionId=t.collection),t.description&&(e.description=t.description),t.sku&&(e.sku=t.sku),t.price!==void 0&&(e.price=t.price),t.currency&&(e.currency=t.currency),t.imageFile&&(e.imageFileId=t.imageFile),t.colours&&(e.colours=u(t.colours)),t.sizes&&(e.sizes=u(t.sizes)),t.materials&&(e.materials=u(t.materials)),t.tags&&(e.tags=u(t.tags));let o=await a(M,{input:e});d(`Style item created: ${o.cooCreateStyleItem.name}`),s(t,o.cooCreateStyleItem);}catch(e){i(e);}}),n.command("update").description("Update a style item").argument("<id>","Style item ID").option("--name <name>","Item name").option("--category <c>","Category").option("--collection <id>","Collection ID").option("--description <s>","Description").option("--sku <sku>","SKU").option("--price <n>","Price",h).option("--currency <c>","Currency code").option("--image-file <id>","Image File ID").option("--colours <csv>","Comma-separated colours").option("--sizes <csv>","Comma-separated sizes").option("--materials <csv>","Comma-separated materials").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.name&&(o.name=e.name),e.category&&(o.category=e.category.toUpperCase()),e.collection&&(o.collectionId=e.collection),e.description!==void 0&&(o.description=e.description),e.sku!==void 0&&(o.sku=e.sku),e.price!==void 0&&(o.price=e.price),e.currency&&(o.currency=e.currency),e.imageFile&&(o.imageFileId=e.imageFile),e.colours&&(o.colours=u(e.colours)),e.sizes&&(o.sizes=u(e.sizes)),e.materials&&(o.materials=u(e.materials)),e.tags&&(o.tags=u(e.tags)),!Object.keys(o).length)throw new c("No updates specified");let p=await a(z,{id:t,input:o});d("Style item updated"),s(e,p.cooUpdateStyleItem);}catch(o){i(o);}}),n.command("archive").description("Archive (retire) a style item").argument("<id>","Style item ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(H,{id:t});d(`Style item archived: ${o.cooArchiveStyleItem}`),s(e,{archived:o.cooArchiveStyleItem});}catch(o){i(o);}});}function It(r){let n=r.command("collaborations").description("Coolandlovely brand \u2194 creator collaborations");n.command("list").description("List collaborations").option("--brand <id>","Filter by brand ID").option("--creator <id>","Filter by creator ID").option("--status <s>","Filter by status").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(j,{brandId:t.brand,creatorId:t.creator,status:t.status?t.status.toUpperCase():void 0});s(t,e.cooListCollaborations.items,{headers:["ID","Title","Status","Role","Brand","Creator"],rows:e.cooListCollaborations.items.map(o=>[m(o.id,12),o.title,o.status,o.role,m(o.brandId,12),m(o.creatorId,12)])});}catch(e){i(e);}}),n.command("get").description("Get a collaboration by id").argument("<id>","Collaboration ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(K,{id:t});if(!o.cooCollaboration)throw new c(`Collaboration ${t} not found`);s(e,o.cooCollaboration);}catch(o){i(o);}}),n.command("create").description("Create a collaboration").requiredOption("--brand <id>","Brand ID").requiredOption("--creator <id>","Creator user ID").requiredOption("--title <title>","Collaboration title").option("--brief <s>","Brief").option("--collection <id>","Collection ID").option("--role <r>","CREATOR|STYLIST|PHOTOGRAPHER|BRAND").option("--compensation <n>","Compensation",h).option("--currency <c>","Currency code").option("--start-date <iso>","Start date (ISO 8601)").option("--end-date <iso>","End date (ISO 8601)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={brandId:t.brand,creatorId:t.creator,title:t.title};t.brief&&(e.brief=t.brief),t.collection&&(e.collectionId=t.collection),t.role&&(e.role=t.role.toUpperCase()),t.compensation!==void 0&&(e.compensation=t.compensation),t.currency&&(e.currency=t.currency),t.startDate&&(e.startDate=t.startDate),t.endDate&&(e.endDate=t.endDate),t.tags&&(e.tags=u(t.tags));let o=await a(V,{input:e});d(`Collaboration created: ${o.cooCreateCollaboration.title}`),s(t,o.cooCreateCollaboration);}catch(e){i(e);}}),n.command("transition").description("Advance a collaboration through its lifecycle").argument("<id>","Collaboration ID").requiredOption("--status <s>","PROPOSED|ACCEPTED|DECLINED|IN_PROGRESS|PUBLISHED|CANCELLED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(Y,{id:t,status:e.status.toUpperCase()});d(`Collaboration status set to ${o.cooTransitionCollaboration.status}`),s(e,o.cooTransitionCollaboration);}catch(o){i(o);}});}function kt(r){let n=r.command("looks").description("Coolandlovely styled looks");n.command("list").description("List looks").option("--author <id>","Filter by author ID").option("--occasion <o>","Filter by occasion").option("--featured","Only featured looks").option("--limit <n>","Page size",f,50).option("--offset <n>","Offset",f,0).option("--cursor <c>","Pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(Q,{authorId:t.author,occasion:t.occasion?t.occasion.toUpperCase():void 0,featured:t.featured?!0:void 0,pagination:{limit:t.limit,offset:t.offset,cursor:t.cursor}});s(t,e.cooListLooks.items,{headers:["ID","Title","Occasion","Visibility","Likes","Featured"],rows:e.cooListLooks.items.map(o=>[m(o.id,12),o.title,o.occasion,o.visibility,String(o.likeCount??0),o.isFeatured?"yes":"no"])});}catch(e){i(e);}}),n.command("get").description("Get a look by id").argument("<id>","Look ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(J,{id:t});if(!o.cooLook)throw new c(`Look ${t} not found`);s(e,o.cooLook);}catch(o){i(o);}}),n.command("create").description("Create a look").requiredOption("--title <title>","Look title").option("--caption <s>","Caption").option("--collaboration <id>","Collaboration ID").option("--image-file <id>","Image File ID").option("--occasion <o>","EVERYDAY|WORK|EVENING|PARTY|WEDDING_GUEST|VACATION|ACTIVE|OTHER").option("--visibility <v>","PUBLIC|FOLLOWERS|PRIVATE").option("--items <json>","Look items JSON array: [{ styleItemId, position?, styling? }]").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={title:t.title};if(t.caption&&(e.caption=t.caption),t.collaboration&&(e.collaborationId=t.collaboration),t.imageFile&&(e.imageFileId=t.imageFile),t.occasion&&(e.occasion=t.occasion.toUpperCase()),t.visibility&&(e.visibility=t.visibility.toUpperCase()),t.items){let p=E("items",t.items);if(!Array.isArray(p))throw new c("--items must be a JSON array");e.items=p;}t.tags&&(e.tags=u(t.tags));let o=await a(X,{input:e});d(`Look created: ${o.cooCreateLook.title}`),s(t,o.cooCreateLook);}catch(e){i(e);}}),n.command("update").description("Update a look").argument("<id>","Look ID").option("--title <title>","Look title").option("--caption <s>","Caption").option("--image-file <id>","Image File ID").option("--occasion <o>","Occasion").option("--visibility <v>","PUBLIC|FOLLOWERS|PRIVATE").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.title&&(o.title=e.title),e.caption!==void 0&&(o.caption=e.caption),e.imageFile&&(o.imageFileId=e.imageFile),e.occasion&&(o.occasion=e.occasion.toUpperCase()),e.visibility&&(o.visibility=e.visibility.toUpperCase()),e.tags&&(o.tags=u(e.tags)),!Object.keys(o).length)throw new c("No updates specified");let p=await a(Z,{id:t,input:o});d("Look updated"),s(e,p.cooUpdateLook);}catch(o){i(o);}}),n.command("publish").description("Publish a look").argument("<id>","Look ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(tt,{id:t});d(`Look published: ${o.cooPublishLook.title}`),s(e,o.cooPublishLook);}catch(o){i(o);}}),n.command("like").description("Like a published look").argument("<id>","Look ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(et,{id:t});d(`Look liked (likes: ${o.cooLikeLook.likeCount??0})`),s(e,o.cooLikeLook);}catch(o){i(o);}}),n.command("delete").description("Delete a look").argument("<id>","Look ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(ot,{id:t});d(`Look deleted: ${o.cooDeleteLook}`),s(e,{deleted:o.cooDeleteLook});}catch(o){i(o);}});}function ht(r){let n=r.command("lookbooks").description("Coolandlovely curated lookbooks");n.command("list").description("List lookbooks").option("--owner <id>","Filter by owner ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(rt,{ownerId:t.owner});s(t,e.cooListLookbooks.items,{headers:["ID","Name","Visibility","Owner"],rows:e.cooListLookbooks.items.map(o=>[m(o.id,12),o.name,o.visibility,m(o.ownerId,12)])});}catch(e){i(e);}}),n.command("get").description("Get a lookbook by id").argument("<id>","Lookbook ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(nt,{id:t});if(!o.cooLookbook)throw new c(`Lookbook ${t} not found`);s(e,o.cooLookbook);}catch(o){i(o);}}),n.command("create").description("Create a lookbook").requiredOption("--name <name>","Lookbook name").option("--description <s>","Description").option("--cover-file <id>","Cover File ID").option("--visibility <v>","PUBLIC|FOLLOWERS|PRIVATE").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name};t.description&&(e.description=t.description),t.coverFile&&(e.coverFileId=t.coverFile),t.visibility&&(e.visibility=t.visibility.toUpperCase()),t.tags&&(e.tags=u(t.tags));let o=await a(it,{input:e});d(`Lookbook created: ${o.cooCreateLookbook.name}`),s(t,o.cooCreateLookbook);}catch(e){i(e);}}),n.command("add-entry").description("Add an entry (look or style item) to a lookbook").requiredOption("--lookbook <id>","Lookbook ID").option("--look <id>","Look ID to add").option("--style-item <id>","Style item ID to add").option("--note <s>","Note").option("--position <n>","Position",f).option("-f, --format <format>","Output format").action(async t=>{try{let e={lookbookId:t.lookbook};t.look&&(e.lookId=t.look),t.styleItem&&(e.styleItemId=t.styleItem),t.note&&(e.note=t.note),t.position!==void 0&&(e.position=t.position);let o=await a(st,{input:e});d(`Lookbook entry added: ${o.cooAddLookbookEntry.id}`),s(t,o.cooAddLookbookEntry);}catch(e){i(e);}}),n.command("remove-entry").description("Remove an entry from a lookbook").argument("<id>","Lookbook entry ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(at,{id:t});d(`Lookbook entry removed: ${o.cooRemoveLookbookEntry}`),s(e,{removed:o.cooRemoveLookbookEntry});}catch(o){i(o);}});}function wt(r){let n=r.command("wardrobe").description("Coolandlovely digital wardrobe (the shopper's own pieces)");n.command("list").description("List wardrobe items").option("--category <c>","Filter by category").option("--source <s>","Filter by source").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(ct,{category:t.category?t.category.toUpperCase():void 0,source:t.source?t.source.toUpperCase():void 0});s(t,e.cooListWardrobeItems.items,{headers:["ID","Name","Category","Source","Times Worn"],rows:e.cooListWardrobeItems.items.map(o=>[m(o.id,12),o.name,o.category,o.source,String(o.timesWorn??0)])});}catch(e){i(e);}}),n.command("create").description("Add an item to the wardrobe").requiredOption("--name <name>","Item name").option("--brand-name <s>","Brand name (free text)").option("--category <c>","Category").option("--colour <s>","Colour").option("--size <s>","Size").option("--source <s>","OWNED|PURCHASED_ON_PLATFORM|GIFTED|WISHLIST").option("--style-item <id>","Linked style item ID").option("--image-file <id>","Image File ID").option("--notes <s>","Notes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name};t.brandName&&(e.brandName=t.brandName),t.category&&(e.category=t.category.toUpperCase()),t.colour&&(e.colour=t.colour),t.size&&(e.size=t.size),t.source&&(e.source=t.source.toUpperCase()),t.styleItem&&(e.styleItemId=t.styleItem),t.imageFile&&(e.imageFileId=t.imageFile),t.notes&&(e.notes=t.notes),t.tags&&(e.tags=u(t.tags));let o=await a(dt,{input:e});d(`Wardrobe item added: ${o.cooCreateWardrobeItem.name}`),s(t,o.cooCreateWardrobeItem);}catch(e){i(e);}}),n.command("update").description("Update a wardrobe item").argument("<id>","Wardrobe item ID").option("--name <name>","Item name").option("--brand-name <s>","Brand name (free text)").option("--category <c>","Category").option("--colour <s>","Colour").option("--size <s>","Size").option("--source <s>","OWNED|PURCHASED_ON_PLATFORM|GIFTED|WISHLIST").option("--image-file <id>","Image File ID").option("--notes <s>","Notes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.name&&(o.name=e.name),e.brandName!==void 0&&(o.brandName=e.brandName),e.category&&(o.category=e.category.toUpperCase()),e.colour!==void 0&&(o.colour=e.colour),e.size!==void 0&&(o.size=e.size),e.source&&(o.source=e.source.toUpperCase()),e.imageFile&&(o.imageFileId=e.imageFile),e.notes!==void 0&&(o.notes=e.notes),e.tags&&(o.tags=u(e.tags)),!Object.keys(o).length)throw new c("No updates specified");let p=await a(ut,{id:t,input:o});d("Wardrobe item updated"),s(e,p.cooUpdateWardrobeItem);}catch(o){i(o);}}),n.command("wear").description("Log that the shopper wore a wardrobe piece").argument("<id>","Wardrobe item ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(lt,{id:t});d(`Wear logged (times worn: ${o.cooLogWardrobeWear.timesWorn??0})`),s(e,o.cooLogWardrobeWear);}catch(o){i(o);}}),n.command("remove").description("Remove a wardrobe item").argument("<id>","Wardrobe item ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(pt,{id:t});d(`Wardrobe item removed: ${o.cooRemoveWardrobeItem}`),s(e,{removed:o.cooRemoveWardrobeItem});}catch(o){i(o);}});}function Et(r){let n=r.command("profile").description("Coolandlovely shopper style profile (self-scoped)");n.command("get").description("Show the calling shopper's own style profile").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(mt);if(!e.cooMyStyleProfile)throw new c("No style profile yet. Run `profile upsert` to create one.");s(t,e.cooMyStyleProfile);}catch(e){i(e);}}),n.command("upsert").description("Create or update the calling shopper style profile").option("--display-name <s>","Display name").option("--bio <s>","Bio").option("--visibility <v>","PUBLIC|FOLLOWERS|PRIVATE").option("--favourite-brands <csv>","Comma-separated favourite brands").option("--palette <csv>","Comma-separated colour palette").option("--style-preferences <csv>","Comma-separated style preferences").option("--sizes <json>",'Sizes JSON (e.g. {"tops":"M","shoes":"8"})').option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.displayName&&(e.displayName=t.displayName),t.bio!==void 0&&(e.bio=t.bio),t.visibility&&(e.visibility=t.visibility.toUpperCase()),t.favouriteBrands&&(e.favouriteBrands=u(t.favouriteBrands)),t.palette&&(e.palette=u(t.palette)),t.stylePreferences&&(e.stylePreferences=u(t.stylePreferences)),t.sizes&&(e.sizes=E("sizes",t.sizes));let o=await a(gt,{input:e});d("Style profile saved"),s(t,o.cooUpsertStyleProfile);}catch(e){i(e);}});}function Lt(r){r.command("health").description("Coolandlovely service health check (public)").option("-f, --format <format>","Output format").action(async n=>{try{let t=await A(ft);d(t.cooHealth),s(n,{health:t.cooHealth});}catch(t){i(t);}});}var Ft={id:"coolandlovely",version:"1.0.0",displayName:"Coolandlovely",dependsOn:["auth","workspaces"],register(r,n){x(n);let t=r.command("coolandlovely").description("Coolandlovely fashion & lifestyle platform");yt(t),Ct(t),bt(t),It(t),kt(t),ht(t),wt(t),Et(t),Lt(t);}},$o=Ft;module.exports=$o;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,b as b$1,i,r,h as h$1,k as k$1,d}from'../../chunk-
|
|
1
|
+
import {a,b as b$1,i,r,h as h$1,k as k$1,d}from'../../chunk-BGNPGKJM.js';import {j as j$1}from'../../chunk-N7EXKGE2.js';var k=`
|
|
2
2
|
query CooGetBrand($id: ID!) {
|
|
3
3
|
cooBrand(id: $id) {
|
|
4
4
|
id name handle tagline bio status isFeatured aesthetics tags websiteUrl
|
|
@@ -292,4 +292,4 @@ import {a,b as b$1,i,r,h as h$1,k as k$1,d}from'../../chunk-3ZVMC2AF.js';import
|
|
|
292
292
|
query CooHealth {
|
|
293
293
|
cooHealth
|
|
294
294
|
}
|
|
295
|
-
`;function b(d,i){try{return JSON.parse(i)}catch{throw new q$1(`--${d} must be valid JSON`)}}function f(d){let i=Number.parseInt(d,10);if(Number.isNaN(i))throw new q$1(`Expected an integer but got "${d}"`);return i}function y(d){let i=Number.parseFloat(d);if(Number.isNaN(i))throw new q$1(`Expected a number but got "${d}"`);return i}function c(d){return d.split(",").map(i=>i.trim()).filter(i=>i.length>0)}function st(d){let i$1=d.command("brands").description("Coolandlovely brand storefronts");i$1.command("list").description("List brand storefronts").option("--status <s>","Filter by brand status").option("--featured","Only featured brands").option("--limit <n>","Page size",f,50).option("--offset <n>","Offset",f,0).option("--cursor <c>","Pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let o=await b$1(O,{status:t.status?t.status.toUpperCase():void 0,featured:t.featured?!0:void 0,pagination:{limit:t.limit,offset:t.offset,cursor:t.cursor}});i(t,o.cooListBrands.items,{headers:["ID","Name","Handle","Status","Featured"],rows:o.cooListBrands.items.map(e=>[r(e.id,12),e.name,e.handle,e.status,e.isFeatured?"yes":"no"])});}catch(o){h$1(o);}}),i$1.command("get").description("Get a brand by id").argument("<id>","Brand ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(k,{id:t});if(!e.cooBrand)throw new q$1(`Brand ${t} not found`);i(o,e.cooBrand);}catch(e){h$1(e);}}),i$1.command("create").description("Create a brand storefront").requiredOption("--name <name>","Brand name").requiredOption("--handle <handle>","Unique storefront handle").option("--tagline <s>","Tagline").option("--bio <s>","Bio").option("--website-url <url>","Website URL").option("--logo-file <id>","Logo File ID (wspace-files-svc)").option("--cover-file <id>","Cover File ID (wspace-files-svc)").option("--aesthetics <csv>","Comma-separated aesthetics").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let o={name:t.name,handle:t.handle};t.tagline&&(o.tagline=t.tagline),t.bio&&(o.bio=t.bio),t.websiteUrl&&(o.websiteUrl=t.websiteUrl),t.logoFile&&(o.logoFileId=t.logoFile),t.coverFile&&(o.coverFileId=t.coverFile),t.aesthetics&&(o.aesthetics=c(t.aesthetics)),t.tags&&(o.tags=c(t.tags));let e=await b$1(h,{input:o});k$1(`Brand created: ${e.cooCreateBrand.name}`),i(t,e.cooCreateBrand);}catch(o){h$1(o);}}),i$1.command("update").description("Update a brand storefront").argument("<id>","Brand ID").option("--name <name>","Brand name").option("--tagline <s>","Tagline").option("--bio <s>","Bio").option("--website-url <url>","Website URL").option("--logo-file <id>","Logo File ID").option("--cover-file <id>","Cover File ID").option("--featured <bool>","true|false",t=>t==="true").option("--aesthetics <csv>","Comma-separated aesthetics").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e={};if(o.name&&(e.name=o.name),o.tagline!==void 0&&(e.tagline=o.tagline),o.bio!==void 0&&(e.bio=o.bio),o.websiteUrl!==void 0&&(e.websiteUrl=o.websiteUrl),o.logoFile&&(e.logoFileId=o.logoFile),o.coverFile&&(e.coverFileId=o.coverFile),o.featured!==void 0&&(e.isFeatured=o.featured),o.aesthetics&&(e.aesthetics=c(o.aesthetics)),o.tags&&(e.tags=c(o.tags)),!Object.keys(e).length)throw new q$1("No updates specified");let p=await b$1(E,{id:t,input:e});k$1("Brand updated"),i(o,p.cooUpdateBrand);}catch(e){h$1(e);}}),i$1.command("transition").description("Advance a brand through its publish lifecycle").argument("<id>","Brand ID").requiredOption("--status <s>","DRAFT|PENDING_REVIEW|PUBLISHED|SUSPENDED|ARCHIVED").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(A,{id:t,status:o.status.toUpperCase()});k$1(`Brand status set to ${e.cooTransitionBrand.status}`),i(o,e.cooTransitionBrand);}catch(e){h$1(e);}}),i$1.command("archive").description("Archive a brand storefront").argument("<id>","Brand ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(w,{id:t});k$1(`Brand archived: ${e.cooArchiveBrand}`),i(o,{archived:e.cooArchiveBrand});}catch(e){h$1(e);}});}function ct(d){let i$1=d.command("collections").description("Coolandlovely seasonal collections");i$1.command("list").description("List collections").option("--brand <id>","Filter by brand ID").option("--status <s>","Filter by collection status").option("-f, --format <format>","Output format").action(async t=>{try{let o=await b$1(S,{brandId:t.brand,status:t.status?t.status.toUpperCase():void 0});i(t,o.cooListCollections.items,{headers:["ID","Name","Season","Status","Brand"],rows:o.cooListCollections.items.map(e=>[r(e.id,12),e.name,e.season,e.status,r(e.brandId,12)])});}catch(o){h$1(o);}}),i$1.command("get").description("Get a collection by id").argument("<id>","Collection ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(R,{id:t});if(!e.cooCollection)throw new q$1(`Collection ${t} not found`);i(o,e.cooCollection);}catch(e){h$1(e);}}),i$1.command("create").description("Create a collection").requiredOption("--brand <id>","Brand ID").requiredOption("--name <name>","Collection name").option("--description <s>","Description").option("--season <s>","ALL_SEASON|SPRING|SUMMER|AUTUMN|WINTER|RESORT").option("--cover-file <id>","Cover File ID").option("--publish-at <iso>","Scheduled publish date (ISO 8601)").option("--end-at <iso>","End date (ISO 8601)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let o={brandId:t.brand,name:t.name};t.description&&(o.description=t.description),t.season&&(o.season=t.season.toUpperCase()),t.coverFile&&(o.coverFileId=t.coverFile),t.publishAt&&(o.publishAt=t.publishAt),t.endAt&&(o.endAt=t.endAt),t.tags&&(o.tags=c(t.tags));let e=await b$1(D,{input:o});k$1(`Collection created: ${e.cooCreateCollection.name}`),i(t,e.cooCreateCollection);}catch(o){h$1(o);}}),i$1.command("update").description("Update a collection").argument("<id>","Collection ID").option("--name <name>","Collection name").option("--description <s>","Description").option("--season <s>","ALL_SEASON|SPRING|SUMMER|AUTUMN|WINTER|RESORT").option("--cover-file <id>","Cover File ID").option("--publish-at <iso>","Scheduled publish date (ISO 8601)").option("--end-at <iso>","End date (ISO 8601)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e={};if(o.name&&(e.name=o.name),o.description!==void 0&&(e.description=o.description),o.season&&(e.season=o.season.toUpperCase()),o.coverFile&&(e.coverFileId=o.coverFile),o.publishAt&&(e.publishAt=o.publishAt),o.endAt&&(e.endAt=o.endAt),o.tags&&(e.tags=c(o.tags)),!Object.keys(e).length)throw new q$1("No updates specified");let p=await b$1(v,{id:t,input:e});k$1("Collection updated"),i(o,p.cooUpdateCollection);}catch(e){h$1(e);}}),i$1.command("publish").description("Publish a collection (go live)").argument("<id>","Collection ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(T,{id:t});k$1(`Collection published: ${e.cooPublishCollection.status}`),i(o,e.cooPublishCollection);}catch(e){h$1(e);}});}function dt(d){let i$1=d.command("style-items").description("Coolandlovely style items (catalog products)");i$1.command("list").description("List style items").option("--brand <id>","Filter by brand ID").option("--collection <id>","Filter by collection ID").option("--category <c>","Filter by category").option("--status <s>","Filter by status").option("--limit <n>","Page size",f,50).option("--offset <n>","Offset",f,0).option("--cursor <c>","Pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let o=await b$1(B,{brandId:t.brand,collectionId:t.collection,category:t.category?t.category.toUpperCase():void 0,status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset,cursor:t.cursor}});i(t,o.cooListStyleItems.items,{headers:["ID","Name","Category","Status","Price"],rows:o.cooListStyleItems.items.map(e=>[r(e.id,12),e.name,e.category,e.status,`${e.price} ${e.currency}`])});}catch(o){h$1(o);}}),i$1.command("get").description("Get a style item by id").argument("<id>","Style item ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1($,{id:t});if(!e.cooStyleItem)throw new q$1(`Style item ${t} not found`);i(o,e.cooStyleItem);}catch(e){h$1(e);}}),i$1.command("create").description("Create a style item").requiredOption("--brand <id>","Brand ID").requiredOption("--name <name>","Item name").option("--category <c>","Category").option("--collection <id>","Collection ID").option("--description <s>","Description").option("--sku <sku>","SKU").option("--price <n>","Price",y).option("--currency <c>","Currency code").option("--image-file <id>","Image File ID").option("--colours <csv>","Comma-separated colours").option("--sizes <csv>","Comma-separated sizes").option("--materials <csv>","Comma-separated materials").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let o={brandId:t.brand,name:t.name};t.category&&(o.category=t.category.toUpperCase()),t.collection&&(o.collectionId=t.collection),t.description&&(o.description=t.description),t.sku&&(o.sku=t.sku),t.price!==void 0&&(o.price=t.price),t.currency&&(o.currency=t.currency),t.imageFile&&(o.imageFileId=t.imageFile),t.colours&&(o.colours=c(t.colours)),t.sizes&&(o.sizes=c(t.sizes)),t.materials&&(o.materials=c(t.materials)),t.tags&&(o.tags=c(t.tags));let e=await b$1(U,{input:o});k$1(`Style item created: ${e.cooCreateStyleItem.name}`),i(t,e.cooCreateStyleItem);}catch(o){h$1(o);}}),i$1.command("update").description("Update a style item").argument("<id>","Style item ID").option("--name <name>","Item name").option("--category <c>","Category").option("--collection <id>","Collection ID").option("--description <s>","Description").option("--sku <sku>","SKU").option("--price <n>","Price",y).option("--currency <c>","Currency code").option("--image-file <id>","Image File ID").option("--colours <csv>","Comma-separated colours").option("--sizes <csv>","Comma-separated sizes").option("--materials <csv>","Comma-separated materials").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e={};if(o.name&&(e.name=o.name),o.category&&(e.category=o.category.toUpperCase()),o.collection&&(e.collectionId=o.collection),o.description!==void 0&&(e.description=o.description),o.sku!==void 0&&(e.sku=o.sku),o.price!==void 0&&(e.price=o.price),o.currency&&(e.currency=o.currency),o.imageFile&&(e.imageFileId=o.imageFile),o.colours&&(e.colours=c(o.colours)),o.sizes&&(e.sizes=c(o.sizes)),o.materials&&(e.materials=c(o.materials)),o.tags&&(e.tags=c(o.tags)),!Object.keys(e).length)throw new q$1("No updates specified");let p=await b$1(_,{id:t,input:e});k$1("Style item updated"),i(o,p.cooUpdateStyleItem);}catch(e){h$1(e);}}),i$1.command("archive").description("Archive (retire) a style item").argument("<id>","Style item ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(N,{id:t});k$1(`Style item archived: ${e.cooArchiveStyleItem}`),i(o,{archived:e.cooArchiveStyleItem});}catch(e){h$1(e);}});}function mt(d){let i$1=d.command("collaborations").description("Coolandlovely brand \u2194 creator collaborations");i$1.command("list").description("List collaborations").option("--brand <id>","Filter by brand ID").option("--creator <id>","Filter by creator ID").option("--status <s>","Filter by status").option("-f, --format <format>","Output format").action(async t=>{try{let o=await b$1(P,{brandId:t.brand,creatorId:t.creator,status:t.status?t.status.toUpperCase():void 0});i(t,o.cooListCollaborations.items,{headers:["ID","Title","Status","Role","Brand","Creator"],rows:o.cooListCollaborations.items.map(e=>[r(e.id,12),e.title,e.status,e.role,r(e.brandId,12),r(e.creatorId,12)])});}catch(o){h$1(o);}}),i$1.command("get").description("Get a collaboration by id").argument("<id>","Collaboration ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(F,{id:t});if(!e.cooCollaboration)throw new q$1(`Collaboration ${t} not found`);i(o,e.cooCollaboration);}catch(e){h$1(e);}}),i$1.command("create").description("Create a collaboration").requiredOption("--brand <id>","Brand ID").requiredOption("--creator <id>","Creator user ID").requiredOption("--title <title>","Collaboration title").option("--brief <s>","Brief").option("--collection <id>","Collection ID").option("--role <r>","CREATOR|STYLIST|PHOTOGRAPHER|BRAND").option("--compensation <n>","Compensation",y).option("--currency <c>","Currency code").option("--start-date <iso>","Start date (ISO 8601)").option("--end-date <iso>","End date (ISO 8601)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let o={brandId:t.brand,creatorId:t.creator,title:t.title};t.brief&&(o.brief=t.brief),t.collection&&(o.collectionId=t.collection),t.role&&(o.role=t.role.toUpperCase()),t.compensation!==void 0&&(o.compensation=t.compensation),t.currency&&(o.currency=t.currency),t.startDate&&(o.startDate=t.startDate),t.endDate&&(o.endDate=t.endDate),t.tags&&(o.tags=c(t.tags));let e=await b$1(W,{input:o});k$1(`Collaboration created: ${e.cooCreateCollaboration.title}`),i(t,e.cooCreateCollaboration);}catch(o){h$1(o);}}),i$1.command("transition").description("Advance a collaboration through its lifecycle").argument("<id>","Collaboration ID").requiredOption("--status <s>","PROPOSED|ACCEPTED|DECLINED|IN_PROGRESS|PUBLISHED|CANCELLED").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(x,{id:t,status:o.status.toUpperCase()});k$1(`Collaboration status set to ${e.cooTransitionCollaboration.status}`),i(o,e.cooTransitionCollaboration);}catch(e){h$1(e);}});}function lt(d){let i$1=d.command("looks").description("Coolandlovely styled looks");i$1.command("list").description("List looks").option("--author <id>","Filter by author ID").option("--occasion <o>","Filter by occasion").option("--featured","Only featured looks").option("--limit <n>","Page size",f,50).option("--offset <n>","Offset",f,0).option("--cursor <c>","Pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let o=await b$1(z,{authorId:t.author,occasion:t.occasion?t.occasion.toUpperCase():void 0,featured:t.featured?!0:void 0,pagination:{limit:t.limit,offset:t.offset,cursor:t.cursor}});i(t,o.cooListLooks.items,{headers:["ID","Title","Occasion","Visibility","Likes","Featured"],rows:o.cooListLooks.items.map(e=>[r(e.id,12),e.title,e.occasion,e.visibility,String(e.likeCount??0),e.isFeatured?"yes":"no"])});}catch(o){h$1(o);}}),i$1.command("get").description("Get a look by id").argument("<id>","Look ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(M,{id:t});if(!e.cooLook)throw new q$1(`Look ${t} not found`);i(o,e.cooLook);}catch(e){h$1(e);}}),i$1.command("create").description("Create a look").requiredOption("--title <title>","Look title").option("--caption <s>","Caption").option("--collaboration <id>","Collaboration ID").option("--image-file <id>","Image File ID").option("--occasion <o>","EVERYDAY|WORK|EVENING|PARTY|WEDDING_GUEST|VACATION|ACTIVE|OTHER").option("--visibility <v>","PUBLIC|FOLLOWERS|PRIVATE").option("--items <json>","Look items JSON array: [{ styleItemId, position?, styling? }]").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let o={title:t.title};if(t.caption&&(o.caption=t.caption),t.collaboration&&(o.collaborationId=t.collaboration),t.imageFile&&(o.imageFileId=t.imageFile),t.occasion&&(o.occasion=t.occasion.toUpperCase()),t.visibility&&(o.visibility=t.visibility.toUpperCase()),t.items){let p=b("items",t.items);if(!Array.isArray(p))throw new q$1("--items must be a JSON array");o.items=p;}t.tags&&(o.tags=c(t.tags));let e=await b$1(K,{input:o});k$1(`Look created: ${e.cooCreateLook.title}`),i(t,e.cooCreateLook);}catch(o){h$1(o);}}),i$1.command("update").description("Update a look").argument("<id>","Look ID").option("--title <title>","Look title").option("--caption <s>","Caption").option("--image-file <id>","Image File ID").option("--occasion <o>","Occasion").option("--visibility <v>","PUBLIC|FOLLOWERS|PRIVATE").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e={};if(o.title&&(e.title=o.title),o.caption!==void 0&&(e.caption=o.caption),o.imageFile&&(e.imageFileId=o.imageFile),o.occasion&&(e.occasion=o.occasion.toUpperCase()),o.visibility&&(e.visibility=o.visibility.toUpperCase()),o.tags&&(e.tags=c(o.tags)),!Object.keys(e).length)throw new q$1("No updates specified");let p=await b$1(G,{id:t,input:e});k$1("Look updated"),i(o,p.cooUpdateLook);}catch(e){h$1(e);}}),i$1.command("publish").description("Publish a look").argument("<id>","Look ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(q,{id:t});k$1(`Look published: ${e.cooPublishLook.title}`),i(o,e.cooPublishLook);}catch(e){h$1(e);}}),i$1.command("like").description("Like a published look").argument("<id>","Look ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(H,{id:t});k$1(`Look liked (likes: ${e.cooLikeLook.likeCount??0})`),i(o,e.cooLikeLook);}catch(e){h$1(e);}}),i$1.command("delete").description("Delete a look").argument("<id>","Look ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(Y,{id:t});k$1(`Look deleted: ${e.cooDeleteLook}`),i(o,{deleted:e.cooDeleteLook});}catch(e){h$1(e);}});}function pt(d){let i$1=d.command("lookbooks").description("Coolandlovely curated lookbooks");i$1.command("list").description("List lookbooks").option("--owner <id>","Filter by owner ID").option("-f, --format <format>","Output format").action(async t=>{try{let o=await b$1(j,{ownerId:t.owner});i(t,o.cooListLookbooks.items,{headers:["ID","Name","Visibility","Owner"],rows:o.cooListLookbooks.items.map(e=>[r(e.id,12),e.name,e.visibility,r(e.ownerId,12)])});}catch(o){h$1(o);}}),i$1.command("get").description("Get a lookbook by id").argument("<id>","Lookbook ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(V,{id:t});if(!e.cooLookbook)throw new q$1(`Lookbook ${t} not found`);i(o,e.cooLookbook);}catch(e){h$1(e);}}),i$1.command("create").description("Create a lookbook").requiredOption("--name <name>","Lookbook name").option("--description <s>","Description").option("--cover-file <id>","Cover File ID").option("--visibility <v>","PUBLIC|FOLLOWERS|PRIVATE").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let o={name:t.name};t.description&&(o.description=t.description),t.coverFile&&(o.coverFileId=t.coverFile),t.visibility&&(o.visibility=t.visibility.toUpperCase()),t.tags&&(o.tags=c(t.tags));let e=await b$1(J,{input:o});k$1(`Lookbook created: ${e.cooCreateLookbook.name}`),i(t,e.cooCreateLookbook);}catch(o){h$1(o);}}),i$1.command("add-entry").description("Add an entry (look or style item) to a lookbook").requiredOption("--lookbook <id>","Lookbook ID").option("--look <id>","Look ID to add").option("--style-item <id>","Style item ID to add").option("--note <s>","Note").option("--position <n>","Position",f).option("-f, --format <format>","Output format").action(async t=>{try{let o={lookbookId:t.lookbook};t.look&&(o.lookId=t.look),t.styleItem&&(o.styleItemId=t.styleItem),t.note&&(o.note=t.note),t.position!==void 0&&(o.position=t.position);let e=await b$1(Q,{input:o});k$1(`Lookbook entry added: ${e.cooAddLookbookEntry.id}`),i(t,e.cooAddLookbookEntry);}catch(o){h$1(o);}}),i$1.command("remove-entry").description("Remove an entry from a lookbook").argument("<id>","Lookbook entry ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(X,{id:t});k$1(`Lookbook entry removed: ${e.cooRemoveLookbookEntry}`),i(o,{removed:e.cooRemoveLookbookEntry});}catch(e){h$1(e);}});}function ut(d){let i$1=d.command("wardrobe").description("Coolandlovely digital wardrobe (the shopper's own pieces)");i$1.command("list").description("List wardrobe items").option("--category <c>","Filter by category").option("--source <s>","Filter by source").option("-f, --format <format>","Output format").action(async t=>{try{let o=await b$1(Z,{category:t.category?t.category.toUpperCase():void 0,source:t.source?t.source.toUpperCase():void 0});i(t,o.cooListWardrobeItems.items,{headers:["ID","Name","Category","Source","Times Worn"],rows:o.cooListWardrobeItems.items.map(e=>[r(e.id,12),e.name,e.category,e.source,String(e.timesWorn??0)])});}catch(o){h$1(o);}}),i$1.command("create").description("Add an item to the wardrobe").requiredOption("--name <name>","Item name").option("--brand-name <s>","Brand name (free text)").option("--category <c>","Category").option("--colour <s>","Colour").option("--size <s>","Size").option("--source <s>","OWNED|PURCHASED_ON_PLATFORM|GIFTED|WISHLIST").option("--style-item <id>","Linked style item ID").option("--image-file <id>","Image File ID").option("--notes <s>","Notes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let o={name:t.name};t.brandName&&(o.brandName=t.brandName),t.category&&(o.category=t.category.toUpperCase()),t.colour&&(o.colour=t.colour),t.size&&(o.size=t.size),t.source&&(o.source=t.source.toUpperCase()),t.styleItem&&(o.styleItemId=t.styleItem),t.imageFile&&(o.imageFileId=t.imageFile),t.notes&&(o.notes=t.notes),t.tags&&(o.tags=c(t.tags));let e=await b$1(tt,{input:o});k$1(`Wardrobe item added: ${e.cooCreateWardrobeItem.name}`),i(t,e.cooCreateWardrobeItem);}catch(o){h$1(o);}}),i$1.command("update").description("Update a wardrobe item").argument("<id>","Wardrobe item ID").option("--name <name>","Item name").option("--brand-name <s>","Brand name (free text)").option("--category <c>","Category").option("--colour <s>","Colour").option("--size <s>","Size").option("--source <s>","OWNED|PURCHASED_ON_PLATFORM|GIFTED|WISHLIST").option("--image-file <id>","Image File ID").option("--notes <s>","Notes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e={};if(o.name&&(e.name=o.name),o.brandName!==void 0&&(e.brandName=o.brandName),o.category&&(e.category=o.category.toUpperCase()),o.colour!==void 0&&(e.colour=o.colour),o.size!==void 0&&(e.size=o.size),o.source&&(e.source=o.source.toUpperCase()),o.imageFile&&(e.imageFileId=o.imageFile),o.notes!==void 0&&(e.notes=o.notes),o.tags&&(e.tags=c(o.tags)),!Object.keys(e).length)throw new q$1("No updates specified");let p=await b$1(ot,{id:t,input:e});k$1("Wardrobe item updated"),i(o,p.cooUpdateWardrobeItem);}catch(e){h$1(e);}}),i$1.command("wear").description("Log that the shopper wore a wardrobe piece").argument("<id>","Wardrobe item ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(et,{id:t});k$1(`Wear logged (times worn: ${e.cooLogWardrobeWear.timesWorn??0})`),i(o,e.cooLogWardrobeWear);}catch(e){h$1(e);}}),i$1.command("remove").description("Remove a wardrobe item").argument("<id>","Wardrobe item ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(it,{id:t});k$1(`Wardrobe item removed: ${e.cooRemoveWardrobeItem}`),i(o,{removed:e.cooRemoveWardrobeItem});}catch(e){h$1(e);}});}function gt(d){let i$1=d.command("profile").description("Coolandlovely shopper style profile (self-scoped)");i$1.command("get").description("Show the calling shopper's own style profile").option("-f, --format <format>","Output format").action(async t=>{try{let o=await b$1(rt);if(!o.cooMyStyleProfile)throw new q$1("No style profile yet. Run `profile upsert` to create one.");i(t,o.cooMyStyleProfile);}catch(o){h$1(o);}}),i$1.command("upsert").description("Create or update the calling shopper style profile").option("--display-name <s>","Display name").option("--bio <s>","Bio").option("--visibility <v>","PUBLIC|FOLLOWERS|PRIVATE").option("--favourite-brands <csv>","Comma-separated favourite brands").option("--palette <csv>","Comma-separated colour palette").option("--style-preferences <csv>","Comma-separated style preferences").option("--sizes <json>",'Sizes JSON (e.g. {"tops":"M","shoes":"8"})').option("-f, --format <format>","Output format").action(async t=>{try{let o={};t.displayName&&(o.displayName=t.displayName),t.bio!==void 0&&(o.bio=t.bio),t.visibility&&(o.visibility=t.visibility.toUpperCase()),t.favouriteBrands&&(o.favouriteBrands=c(t.favouriteBrands)),t.palette&&(o.palette=c(t.palette)),t.stylePreferences&&(o.stylePreferences=c(t.stylePreferences)),t.sizes&&(o.sizes=b("sizes",t.sizes));let e=await b$1(nt,{input:o});k$1("Style profile saved"),i(t,e.cooUpsertStyleProfile);}catch(o){h$1(o);}});}function ft(d$1){d$1.command("health").description("Coolandlovely service health check (public)").option("-f, --format <format>","Output format").action(async i$1=>{try{let t=await d(at);k$1(t.cooHealth),i(i$1,{health:t.cooHealth});}catch(t){h$1(t);}});}var It={id:"coolandlovely",version:"1.0.0",displayName:"Coolandlovely",dependsOn:["auth","workspaces"],register(d,i){a(i);let t=d.command("coolandlovely").description("Coolandlovely fashion & lifestyle platform");st(t),ct(t),dt(t),mt(t),lt(t),pt(t),ut(t),gt(t),ft(t);}},ao=It;export{ao as default};
|
|
295
|
+
`;function b(d,i){try{return JSON.parse(i)}catch{throw new j$1(`--${d} must be valid JSON`)}}function f(d){let i=Number.parseInt(d,10);if(Number.isNaN(i))throw new j$1(`Expected an integer but got "${d}"`);return i}function y(d){let i=Number.parseFloat(d);if(Number.isNaN(i))throw new j$1(`Expected a number but got "${d}"`);return i}function c(d){return d.split(",").map(i=>i.trim()).filter(i=>i.length>0)}function st(d){let i$1=d.command("brands").description("Coolandlovely brand storefronts");i$1.command("list").description("List brand storefronts").option("--status <s>","Filter by brand status").option("--featured","Only featured brands").option("--limit <n>","Page size",f,50).option("--offset <n>","Offset",f,0).option("--cursor <c>","Pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let o=await b$1(O,{status:t.status?t.status.toUpperCase():void 0,featured:t.featured?!0:void 0,pagination:{limit:t.limit,offset:t.offset,cursor:t.cursor}});i(t,o.cooListBrands.items,{headers:["ID","Name","Handle","Status","Featured"],rows:o.cooListBrands.items.map(e=>[r(e.id,12),e.name,e.handle,e.status,e.isFeatured?"yes":"no"])});}catch(o){h$1(o);}}),i$1.command("get").description("Get a brand by id").argument("<id>","Brand ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(k,{id:t});if(!e.cooBrand)throw new j$1(`Brand ${t} not found`);i(o,e.cooBrand);}catch(e){h$1(e);}}),i$1.command("create").description("Create a brand storefront").requiredOption("--name <name>","Brand name").requiredOption("--handle <handle>","Unique storefront handle").option("--tagline <s>","Tagline").option("--bio <s>","Bio").option("--website-url <url>","Website URL").option("--logo-file <id>","Logo File ID (wspace-files-svc)").option("--cover-file <id>","Cover File ID (wspace-files-svc)").option("--aesthetics <csv>","Comma-separated aesthetics").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let o={name:t.name,handle:t.handle};t.tagline&&(o.tagline=t.tagline),t.bio&&(o.bio=t.bio),t.websiteUrl&&(o.websiteUrl=t.websiteUrl),t.logoFile&&(o.logoFileId=t.logoFile),t.coverFile&&(o.coverFileId=t.coverFile),t.aesthetics&&(o.aesthetics=c(t.aesthetics)),t.tags&&(o.tags=c(t.tags));let e=await b$1(h,{input:o});k$1(`Brand created: ${e.cooCreateBrand.name}`),i(t,e.cooCreateBrand);}catch(o){h$1(o);}}),i$1.command("update").description("Update a brand storefront").argument("<id>","Brand ID").option("--name <name>","Brand name").option("--tagline <s>","Tagline").option("--bio <s>","Bio").option("--website-url <url>","Website URL").option("--logo-file <id>","Logo File ID").option("--cover-file <id>","Cover File ID").option("--featured <bool>","true|false",t=>t==="true").option("--aesthetics <csv>","Comma-separated aesthetics").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e={};if(o.name&&(e.name=o.name),o.tagline!==void 0&&(e.tagline=o.tagline),o.bio!==void 0&&(e.bio=o.bio),o.websiteUrl!==void 0&&(e.websiteUrl=o.websiteUrl),o.logoFile&&(e.logoFileId=o.logoFile),o.coverFile&&(e.coverFileId=o.coverFile),o.featured!==void 0&&(e.isFeatured=o.featured),o.aesthetics&&(e.aesthetics=c(o.aesthetics)),o.tags&&(e.tags=c(o.tags)),!Object.keys(e).length)throw new j$1("No updates specified");let p=await b$1(E,{id:t,input:e});k$1("Brand updated"),i(o,p.cooUpdateBrand);}catch(e){h$1(e);}}),i$1.command("transition").description("Advance a brand through its publish lifecycle").argument("<id>","Brand ID").requiredOption("--status <s>","DRAFT|PENDING_REVIEW|PUBLISHED|SUSPENDED|ARCHIVED").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(A,{id:t,status:o.status.toUpperCase()});k$1(`Brand status set to ${e.cooTransitionBrand.status}`),i(o,e.cooTransitionBrand);}catch(e){h$1(e);}}),i$1.command("archive").description("Archive a brand storefront").argument("<id>","Brand ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(w,{id:t});k$1(`Brand archived: ${e.cooArchiveBrand}`),i(o,{archived:e.cooArchiveBrand});}catch(e){h$1(e);}});}function ct(d){let i$1=d.command("collections").description("Coolandlovely seasonal collections");i$1.command("list").description("List collections").option("--brand <id>","Filter by brand ID").option("--status <s>","Filter by collection status").option("-f, --format <format>","Output format").action(async t=>{try{let o=await b$1(S,{brandId:t.brand,status:t.status?t.status.toUpperCase():void 0});i(t,o.cooListCollections.items,{headers:["ID","Name","Season","Status","Brand"],rows:o.cooListCollections.items.map(e=>[r(e.id,12),e.name,e.season,e.status,r(e.brandId,12)])});}catch(o){h$1(o);}}),i$1.command("get").description("Get a collection by id").argument("<id>","Collection ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(R,{id:t});if(!e.cooCollection)throw new j$1(`Collection ${t} not found`);i(o,e.cooCollection);}catch(e){h$1(e);}}),i$1.command("create").description("Create a collection").requiredOption("--brand <id>","Brand ID").requiredOption("--name <name>","Collection name").option("--description <s>","Description").option("--season <s>","ALL_SEASON|SPRING|SUMMER|AUTUMN|WINTER|RESORT").option("--cover-file <id>","Cover File ID").option("--publish-at <iso>","Scheduled publish date (ISO 8601)").option("--end-at <iso>","End date (ISO 8601)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let o={brandId:t.brand,name:t.name};t.description&&(o.description=t.description),t.season&&(o.season=t.season.toUpperCase()),t.coverFile&&(o.coverFileId=t.coverFile),t.publishAt&&(o.publishAt=t.publishAt),t.endAt&&(o.endAt=t.endAt),t.tags&&(o.tags=c(t.tags));let e=await b$1(D,{input:o});k$1(`Collection created: ${e.cooCreateCollection.name}`),i(t,e.cooCreateCollection);}catch(o){h$1(o);}}),i$1.command("update").description("Update a collection").argument("<id>","Collection ID").option("--name <name>","Collection name").option("--description <s>","Description").option("--season <s>","ALL_SEASON|SPRING|SUMMER|AUTUMN|WINTER|RESORT").option("--cover-file <id>","Cover File ID").option("--publish-at <iso>","Scheduled publish date (ISO 8601)").option("--end-at <iso>","End date (ISO 8601)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e={};if(o.name&&(e.name=o.name),o.description!==void 0&&(e.description=o.description),o.season&&(e.season=o.season.toUpperCase()),o.coverFile&&(e.coverFileId=o.coverFile),o.publishAt&&(e.publishAt=o.publishAt),o.endAt&&(e.endAt=o.endAt),o.tags&&(e.tags=c(o.tags)),!Object.keys(e).length)throw new j$1("No updates specified");let p=await b$1(v,{id:t,input:e});k$1("Collection updated"),i(o,p.cooUpdateCollection);}catch(e){h$1(e);}}),i$1.command("publish").description("Publish a collection (go live)").argument("<id>","Collection ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(T,{id:t});k$1(`Collection published: ${e.cooPublishCollection.status}`),i(o,e.cooPublishCollection);}catch(e){h$1(e);}});}function dt(d){let i$1=d.command("style-items").description("Coolandlovely style items (catalog products)");i$1.command("list").description("List style items").option("--brand <id>","Filter by brand ID").option("--collection <id>","Filter by collection ID").option("--category <c>","Filter by category").option("--status <s>","Filter by status").option("--limit <n>","Page size",f,50).option("--offset <n>","Offset",f,0).option("--cursor <c>","Pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let o=await b$1(B,{brandId:t.brand,collectionId:t.collection,category:t.category?t.category.toUpperCase():void 0,status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset,cursor:t.cursor}});i(t,o.cooListStyleItems.items,{headers:["ID","Name","Category","Status","Price"],rows:o.cooListStyleItems.items.map(e=>[r(e.id,12),e.name,e.category,e.status,`${e.price} ${e.currency}`])});}catch(o){h$1(o);}}),i$1.command("get").description("Get a style item by id").argument("<id>","Style item ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1($,{id:t});if(!e.cooStyleItem)throw new j$1(`Style item ${t} not found`);i(o,e.cooStyleItem);}catch(e){h$1(e);}}),i$1.command("create").description("Create a style item").requiredOption("--brand <id>","Brand ID").requiredOption("--name <name>","Item name").option("--category <c>","Category").option("--collection <id>","Collection ID").option("--description <s>","Description").option("--sku <sku>","SKU").option("--price <n>","Price",y).option("--currency <c>","Currency code").option("--image-file <id>","Image File ID").option("--colours <csv>","Comma-separated colours").option("--sizes <csv>","Comma-separated sizes").option("--materials <csv>","Comma-separated materials").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let o={brandId:t.brand,name:t.name};t.category&&(o.category=t.category.toUpperCase()),t.collection&&(o.collectionId=t.collection),t.description&&(o.description=t.description),t.sku&&(o.sku=t.sku),t.price!==void 0&&(o.price=t.price),t.currency&&(o.currency=t.currency),t.imageFile&&(o.imageFileId=t.imageFile),t.colours&&(o.colours=c(t.colours)),t.sizes&&(o.sizes=c(t.sizes)),t.materials&&(o.materials=c(t.materials)),t.tags&&(o.tags=c(t.tags));let e=await b$1(U,{input:o});k$1(`Style item created: ${e.cooCreateStyleItem.name}`),i(t,e.cooCreateStyleItem);}catch(o){h$1(o);}}),i$1.command("update").description("Update a style item").argument("<id>","Style item ID").option("--name <name>","Item name").option("--category <c>","Category").option("--collection <id>","Collection ID").option("--description <s>","Description").option("--sku <sku>","SKU").option("--price <n>","Price",y).option("--currency <c>","Currency code").option("--image-file <id>","Image File ID").option("--colours <csv>","Comma-separated colours").option("--sizes <csv>","Comma-separated sizes").option("--materials <csv>","Comma-separated materials").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e={};if(o.name&&(e.name=o.name),o.category&&(e.category=o.category.toUpperCase()),o.collection&&(e.collectionId=o.collection),o.description!==void 0&&(e.description=o.description),o.sku!==void 0&&(e.sku=o.sku),o.price!==void 0&&(e.price=o.price),o.currency&&(e.currency=o.currency),o.imageFile&&(e.imageFileId=o.imageFile),o.colours&&(e.colours=c(o.colours)),o.sizes&&(e.sizes=c(o.sizes)),o.materials&&(e.materials=c(o.materials)),o.tags&&(e.tags=c(o.tags)),!Object.keys(e).length)throw new j$1("No updates specified");let p=await b$1(_,{id:t,input:e});k$1("Style item updated"),i(o,p.cooUpdateStyleItem);}catch(e){h$1(e);}}),i$1.command("archive").description("Archive (retire) a style item").argument("<id>","Style item ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(N,{id:t});k$1(`Style item archived: ${e.cooArchiveStyleItem}`),i(o,{archived:e.cooArchiveStyleItem});}catch(e){h$1(e);}});}function mt(d){let i$1=d.command("collaborations").description("Coolandlovely brand \u2194 creator collaborations");i$1.command("list").description("List collaborations").option("--brand <id>","Filter by brand ID").option("--creator <id>","Filter by creator ID").option("--status <s>","Filter by status").option("-f, --format <format>","Output format").action(async t=>{try{let o=await b$1(P,{brandId:t.brand,creatorId:t.creator,status:t.status?t.status.toUpperCase():void 0});i(t,o.cooListCollaborations.items,{headers:["ID","Title","Status","Role","Brand","Creator"],rows:o.cooListCollaborations.items.map(e=>[r(e.id,12),e.title,e.status,e.role,r(e.brandId,12),r(e.creatorId,12)])});}catch(o){h$1(o);}}),i$1.command("get").description("Get a collaboration by id").argument("<id>","Collaboration ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(F,{id:t});if(!e.cooCollaboration)throw new j$1(`Collaboration ${t} not found`);i(o,e.cooCollaboration);}catch(e){h$1(e);}}),i$1.command("create").description("Create a collaboration").requiredOption("--brand <id>","Brand ID").requiredOption("--creator <id>","Creator user ID").requiredOption("--title <title>","Collaboration title").option("--brief <s>","Brief").option("--collection <id>","Collection ID").option("--role <r>","CREATOR|STYLIST|PHOTOGRAPHER|BRAND").option("--compensation <n>","Compensation",y).option("--currency <c>","Currency code").option("--start-date <iso>","Start date (ISO 8601)").option("--end-date <iso>","End date (ISO 8601)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let o={brandId:t.brand,creatorId:t.creator,title:t.title};t.brief&&(o.brief=t.brief),t.collection&&(o.collectionId=t.collection),t.role&&(o.role=t.role.toUpperCase()),t.compensation!==void 0&&(o.compensation=t.compensation),t.currency&&(o.currency=t.currency),t.startDate&&(o.startDate=t.startDate),t.endDate&&(o.endDate=t.endDate),t.tags&&(o.tags=c(t.tags));let e=await b$1(W,{input:o});k$1(`Collaboration created: ${e.cooCreateCollaboration.title}`),i(t,e.cooCreateCollaboration);}catch(o){h$1(o);}}),i$1.command("transition").description("Advance a collaboration through its lifecycle").argument("<id>","Collaboration ID").requiredOption("--status <s>","PROPOSED|ACCEPTED|DECLINED|IN_PROGRESS|PUBLISHED|CANCELLED").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(x,{id:t,status:o.status.toUpperCase()});k$1(`Collaboration status set to ${e.cooTransitionCollaboration.status}`),i(o,e.cooTransitionCollaboration);}catch(e){h$1(e);}});}function lt(d){let i$1=d.command("looks").description("Coolandlovely styled looks");i$1.command("list").description("List looks").option("--author <id>","Filter by author ID").option("--occasion <o>","Filter by occasion").option("--featured","Only featured looks").option("--limit <n>","Page size",f,50).option("--offset <n>","Offset",f,0).option("--cursor <c>","Pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let o=await b$1(z,{authorId:t.author,occasion:t.occasion?t.occasion.toUpperCase():void 0,featured:t.featured?!0:void 0,pagination:{limit:t.limit,offset:t.offset,cursor:t.cursor}});i(t,o.cooListLooks.items,{headers:["ID","Title","Occasion","Visibility","Likes","Featured"],rows:o.cooListLooks.items.map(e=>[r(e.id,12),e.title,e.occasion,e.visibility,String(e.likeCount??0),e.isFeatured?"yes":"no"])});}catch(o){h$1(o);}}),i$1.command("get").description("Get a look by id").argument("<id>","Look ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(M,{id:t});if(!e.cooLook)throw new j$1(`Look ${t} not found`);i(o,e.cooLook);}catch(e){h$1(e);}}),i$1.command("create").description("Create a look").requiredOption("--title <title>","Look title").option("--caption <s>","Caption").option("--collaboration <id>","Collaboration ID").option("--image-file <id>","Image File ID").option("--occasion <o>","EVERYDAY|WORK|EVENING|PARTY|WEDDING_GUEST|VACATION|ACTIVE|OTHER").option("--visibility <v>","PUBLIC|FOLLOWERS|PRIVATE").option("--items <json>","Look items JSON array: [{ styleItemId, position?, styling? }]").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let o={title:t.title};if(t.caption&&(o.caption=t.caption),t.collaboration&&(o.collaborationId=t.collaboration),t.imageFile&&(o.imageFileId=t.imageFile),t.occasion&&(o.occasion=t.occasion.toUpperCase()),t.visibility&&(o.visibility=t.visibility.toUpperCase()),t.items){let p=b("items",t.items);if(!Array.isArray(p))throw new j$1("--items must be a JSON array");o.items=p;}t.tags&&(o.tags=c(t.tags));let e=await b$1(K,{input:o});k$1(`Look created: ${e.cooCreateLook.title}`),i(t,e.cooCreateLook);}catch(o){h$1(o);}}),i$1.command("update").description("Update a look").argument("<id>","Look ID").option("--title <title>","Look title").option("--caption <s>","Caption").option("--image-file <id>","Image File ID").option("--occasion <o>","Occasion").option("--visibility <v>","PUBLIC|FOLLOWERS|PRIVATE").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e={};if(o.title&&(e.title=o.title),o.caption!==void 0&&(e.caption=o.caption),o.imageFile&&(e.imageFileId=o.imageFile),o.occasion&&(e.occasion=o.occasion.toUpperCase()),o.visibility&&(e.visibility=o.visibility.toUpperCase()),o.tags&&(e.tags=c(o.tags)),!Object.keys(e).length)throw new j$1("No updates specified");let p=await b$1(G,{id:t,input:e});k$1("Look updated"),i(o,p.cooUpdateLook);}catch(e){h$1(e);}}),i$1.command("publish").description("Publish a look").argument("<id>","Look ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(q,{id:t});k$1(`Look published: ${e.cooPublishLook.title}`),i(o,e.cooPublishLook);}catch(e){h$1(e);}}),i$1.command("like").description("Like a published look").argument("<id>","Look ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(H,{id:t});k$1(`Look liked (likes: ${e.cooLikeLook.likeCount??0})`),i(o,e.cooLikeLook);}catch(e){h$1(e);}}),i$1.command("delete").description("Delete a look").argument("<id>","Look ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(Y,{id:t});k$1(`Look deleted: ${e.cooDeleteLook}`),i(o,{deleted:e.cooDeleteLook});}catch(e){h$1(e);}});}function pt(d){let i$1=d.command("lookbooks").description("Coolandlovely curated lookbooks");i$1.command("list").description("List lookbooks").option("--owner <id>","Filter by owner ID").option("-f, --format <format>","Output format").action(async t=>{try{let o=await b$1(j,{ownerId:t.owner});i(t,o.cooListLookbooks.items,{headers:["ID","Name","Visibility","Owner"],rows:o.cooListLookbooks.items.map(e=>[r(e.id,12),e.name,e.visibility,r(e.ownerId,12)])});}catch(o){h$1(o);}}),i$1.command("get").description("Get a lookbook by id").argument("<id>","Lookbook ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(V,{id:t});if(!e.cooLookbook)throw new j$1(`Lookbook ${t} not found`);i(o,e.cooLookbook);}catch(e){h$1(e);}}),i$1.command("create").description("Create a lookbook").requiredOption("--name <name>","Lookbook name").option("--description <s>","Description").option("--cover-file <id>","Cover File ID").option("--visibility <v>","PUBLIC|FOLLOWERS|PRIVATE").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let o={name:t.name};t.description&&(o.description=t.description),t.coverFile&&(o.coverFileId=t.coverFile),t.visibility&&(o.visibility=t.visibility.toUpperCase()),t.tags&&(o.tags=c(t.tags));let e=await b$1(J,{input:o});k$1(`Lookbook created: ${e.cooCreateLookbook.name}`),i(t,e.cooCreateLookbook);}catch(o){h$1(o);}}),i$1.command("add-entry").description("Add an entry (look or style item) to a lookbook").requiredOption("--lookbook <id>","Lookbook ID").option("--look <id>","Look ID to add").option("--style-item <id>","Style item ID to add").option("--note <s>","Note").option("--position <n>","Position",f).option("-f, --format <format>","Output format").action(async t=>{try{let o={lookbookId:t.lookbook};t.look&&(o.lookId=t.look),t.styleItem&&(o.styleItemId=t.styleItem),t.note&&(o.note=t.note),t.position!==void 0&&(o.position=t.position);let e=await b$1(Q,{input:o});k$1(`Lookbook entry added: ${e.cooAddLookbookEntry.id}`),i(t,e.cooAddLookbookEntry);}catch(o){h$1(o);}}),i$1.command("remove-entry").description("Remove an entry from a lookbook").argument("<id>","Lookbook entry ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(X,{id:t});k$1(`Lookbook entry removed: ${e.cooRemoveLookbookEntry}`),i(o,{removed:e.cooRemoveLookbookEntry});}catch(e){h$1(e);}});}function ut(d){let i$1=d.command("wardrobe").description("Coolandlovely digital wardrobe (the shopper's own pieces)");i$1.command("list").description("List wardrobe items").option("--category <c>","Filter by category").option("--source <s>","Filter by source").option("-f, --format <format>","Output format").action(async t=>{try{let o=await b$1(Z,{category:t.category?t.category.toUpperCase():void 0,source:t.source?t.source.toUpperCase():void 0});i(t,o.cooListWardrobeItems.items,{headers:["ID","Name","Category","Source","Times Worn"],rows:o.cooListWardrobeItems.items.map(e=>[r(e.id,12),e.name,e.category,e.source,String(e.timesWorn??0)])});}catch(o){h$1(o);}}),i$1.command("create").description("Add an item to the wardrobe").requiredOption("--name <name>","Item name").option("--brand-name <s>","Brand name (free text)").option("--category <c>","Category").option("--colour <s>","Colour").option("--size <s>","Size").option("--source <s>","OWNED|PURCHASED_ON_PLATFORM|GIFTED|WISHLIST").option("--style-item <id>","Linked style item ID").option("--image-file <id>","Image File ID").option("--notes <s>","Notes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let o={name:t.name};t.brandName&&(o.brandName=t.brandName),t.category&&(o.category=t.category.toUpperCase()),t.colour&&(o.colour=t.colour),t.size&&(o.size=t.size),t.source&&(o.source=t.source.toUpperCase()),t.styleItem&&(o.styleItemId=t.styleItem),t.imageFile&&(o.imageFileId=t.imageFile),t.notes&&(o.notes=t.notes),t.tags&&(o.tags=c(t.tags));let e=await b$1(tt,{input:o});k$1(`Wardrobe item added: ${e.cooCreateWardrobeItem.name}`),i(t,e.cooCreateWardrobeItem);}catch(o){h$1(o);}}),i$1.command("update").description("Update a wardrobe item").argument("<id>","Wardrobe item ID").option("--name <name>","Item name").option("--brand-name <s>","Brand name (free text)").option("--category <c>","Category").option("--colour <s>","Colour").option("--size <s>","Size").option("--source <s>","OWNED|PURCHASED_ON_PLATFORM|GIFTED|WISHLIST").option("--image-file <id>","Image File ID").option("--notes <s>","Notes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e={};if(o.name&&(e.name=o.name),o.brandName!==void 0&&(e.brandName=o.brandName),o.category&&(e.category=o.category.toUpperCase()),o.colour!==void 0&&(e.colour=o.colour),o.size!==void 0&&(e.size=o.size),o.source&&(e.source=o.source.toUpperCase()),o.imageFile&&(e.imageFileId=o.imageFile),o.notes!==void 0&&(e.notes=o.notes),o.tags&&(e.tags=c(o.tags)),!Object.keys(e).length)throw new j$1("No updates specified");let p=await b$1(ot,{id:t,input:e});k$1("Wardrobe item updated"),i(o,p.cooUpdateWardrobeItem);}catch(e){h$1(e);}}),i$1.command("wear").description("Log that the shopper wore a wardrobe piece").argument("<id>","Wardrobe item ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(et,{id:t});k$1(`Wear logged (times worn: ${e.cooLogWardrobeWear.timesWorn??0})`),i(o,e.cooLogWardrobeWear);}catch(e){h$1(e);}}),i$1.command("remove").description("Remove a wardrobe item").argument("<id>","Wardrobe item ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await b$1(it,{id:t});k$1(`Wardrobe item removed: ${e.cooRemoveWardrobeItem}`),i(o,{removed:e.cooRemoveWardrobeItem});}catch(e){h$1(e);}});}function gt(d){let i$1=d.command("profile").description("Coolandlovely shopper style profile (self-scoped)");i$1.command("get").description("Show the calling shopper's own style profile").option("-f, --format <format>","Output format").action(async t=>{try{let o=await b$1(rt);if(!o.cooMyStyleProfile)throw new j$1("No style profile yet. Run `profile upsert` to create one.");i(t,o.cooMyStyleProfile);}catch(o){h$1(o);}}),i$1.command("upsert").description("Create or update the calling shopper style profile").option("--display-name <s>","Display name").option("--bio <s>","Bio").option("--visibility <v>","PUBLIC|FOLLOWERS|PRIVATE").option("--favourite-brands <csv>","Comma-separated favourite brands").option("--palette <csv>","Comma-separated colour palette").option("--style-preferences <csv>","Comma-separated style preferences").option("--sizes <json>",'Sizes JSON (e.g. {"tops":"M","shoes":"8"})').option("-f, --format <format>","Output format").action(async t=>{try{let o={};t.displayName&&(o.displayName=t.displayName),t.bio!==void 0&&(o.bio=t.bio),t.visibility&&(o.visibility=t.visibility.toUpperCase()),t.favouriteBrands&&(o.favouriteBrands=c(t.favouriteBrands)),t.palette&&(o.palette=c(t.palette)),t.stylePreferences&&(o.stylePreferences=c(t.stylePreferences)),t.sizes&&(o.sizes=b("sizes",t.sizes));let e=await b$1(nt,{input:o});k$1("Style profile saved"),i(t,e.cooUpsertStyleProfile);}catch(o){h$1(o);}});}function ft(d$1){d$1.command("health").description("Coolandlovely service health check (public)").option("-f, --format <format>","Output format").action(async i$1=>{try{let t=await d(at);k$1(t.cooHealth),i(i$1,{health:t.cooHealth});}catch(t){h$1(t);}});}var It={id:"coolandlovely",version:"1.0.0",displayName:"Coolandlovely",dependsOn:["auth","workspaces"],register(d,i){a(i);let t=d.command("coolandlovely").description("Coolandlovely fashion & lifestyle platform");st(t),ct(t),dt(t),mt(t),lt(t),pt(t),ut(t),gt(t),ft(t);}},ao=It;export{ao as default};
|