@burdenoff/cli-sdk 2026.627.5 → 2026.629.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/modules/adaptercloud/index.cjs +308 -0
- package/dist/modules/adaptercloud/index.d.cts +7 -0
- package/dist/modules/adaptercloud/index.d.ts +7 -0
- package/dist/modules/adaptercloud/index.js +308 -0
- package/dist/modules/atheletebridge/index.cjs +276 -0
- package/dist/modules/atheletebridge/index.d.cts +7 -0
- package/dist/modules/atheletebridge/index.d.ts +7 -0
- package/dist/modules/atheletebridge/index.js +276 -0
- package/dist/modules/coolandlovely/index.cjs +282 -0
- package/dist/modules/coolandlovely/index.d.cts +7 -0
- package/dist/modules/coolandlovely/index.d.ts +7 -0
- package/dist/modules/coolandlovely/index.js +282 -0
- package/dist/modules/hookmovies/index.cjs +304 -0
- package/dist/modules/hookmovies/index.d.cts +7 -0
- package/dist/modules/hookmovies/index.d.ts +7 -0
- package/dist/modules/hookmovies/index.js +304 -0
- package/dist/modules/labsofscience/index.cjs +343 -0
- package/dist/modules/labsofscience/index.d.cts +7 -0
- package/dist/modules/labsofscience/index.d.ts +7 -0
- package/dist/modules/labsofscience/index.js +343 -0
- package/dist/modules/subscriberbot/index.cjs +325 -0
- package/dist/modules/subscriberbot/index.d.cts +7 -0
- package/dist/modules/subscriberbot/index.d.ts +7 -0
- package/dist/modules/subscriberbot/index.js +325 -0
- package/package.json +1 -1
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var d=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 d{constructor(n,t){super(n,{exitCode:2,hint:t?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},C=class extends Error{cause;constructor(n,t){super(n),this.name="CliInternalError",this.cause=t;}};var h=null;function O(r){h=r;}function b(){if(!h)throw new C("vibecontrols module helpers used before setHelpersContext was called");return h}function Dt(){let r=b();if(!r.auth.isAuthenticated())throw new y(`Authentication required. Run \`${r.productName} auth login\`.`)}async function a(r,n){return Dt(),b().gql.workspace.request(r,n)}async function w(r,n){return b().gql.workspaceAuthOnly.request(r,n)}function i(r){let n=r instanceof Error?r.message:String(r);throw new d(n)}function s(r,n,t){b().output.formatAndOutput(r,n,t);}function c(r){b().output.printSuccess(r);}function p(r,n){return b().output.truncate(r,n)}var A=`
|
|
2
|
+
query CooGetBrand($id: ID!) {
|
|
3
|
+
cooBrand(id: $id) {
|
|
4
|
+
id name handle tagline bio status isFeatured aesthetics tags websiteUrl
|
|
5
|
+
logo { id } cover { id } createdAt updatedAt workspaceId
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
`,v=`
|
|
9
|
+
query CooListBrands($featured: Boolean, $status: CooBrandStatus, $pagination: PaginationInput) {
|
|
10
|
+
cooListBrands(featured: $featured, status: $status, pagination: $pagination) {
|
|
11
|
+
items {
|
|
12
|
+
id name handle status isFeatured tagline tags createdAt
|
|
13
|
+
}
|
|
14
|
+
pageInfo { cursor hasMore }
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
`,T=`
|
|
18
|
+
mutation CooCreateBrand($input: CooCreateBrandInput!) {
|
|
19
|
+
cooCreateBrand(input: $input) {
|
|
20
|
+
id name handle tagline bio status isFeatured aesthetics tags websiteUrl
|
|
21
|
+
logo { id } cover { id } createdAt
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
`,x=`
|
|
25
|
+
mutation CooUpdateBrand($id: ID!, $input: CooUpdateBrandInput!) {
|
|
26
|
+
cooUpdateBrand(id: $id, input: $input) {
|
|
27
|
+
id name handle tagline bio status isFeatured aesthetics tags websiteUrl
|
|
28
|
+
logo { id } cover { id } updatedAt
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`,S=`
|
|
32
|
+
mutation CooTransitionBrand($id: ID!, $status: CooBrandStatus!) {
|
|
33
|
+
cooTransitionBrand(id: $id, status: $status) {
|
|
34
|
+
id name handle status updatedAt
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
`,R=`
|
|
38
|
+
mutation CooArchiveBrand($id: ID!) {
|
|
39
|
+
cooArchiveBrand(id: $id)
|
|
40
|
+
}
|
|
41
|
+
`,D=`
|
|
42
|
+
query CooGetCollection($id: ID!) {
|
|
43
|
+
cooCollection(id: $id) {
|
|
44
|
+
id name description season status brandId tags
|
|
45
|
+
cover { id } publishAt endAt createdAt updatedAt workspaceId
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
`,$=`
|
|
49
|
+
query CooListCollections($brandId: ID, $status: CooCollectionStatus) {
|
|
50
|
+
cooListCollections(brandId: $brandId, status: $status) {
|
|
51
|
+
id name description season status brandId tags publishAt endAt createdAt
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
`,_=`
|
|
55
|
+
mutation CooCreateCollection($input: CooCreateCollectionInput!) {
|
|
56
|
+
cooCreateCollection(input: $input) {
|
|
57
|
+
id name description season status brandId tags publishAt endAt createdAt
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
`,P=`
|
|
61
|
+
mutation CooUpdateCollection($id: ID!, $input: CooUpdateCollectionInput!) {
|
|
62
|
+
cooUpdateCollection(id: $id, input: $input) {
|
|
63
|
+
id name description season status brandId tags publishAt endAt updatedAt
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
`,N=`
|
|
67
|
+
mutation CooPublishCollection($id: ID!) {
|
|
68
|
+
cooPublishCollection(id: $id) {
|
|
69
|
+
id name status publishAt updatedAt
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
`,F=`
|
|
73
|
+
query CooGetStyleItem($id: ID!) {
|
|
74
|
+
cooStyleItem(id: $id) {
|
|
75
|
+
id name sku category status brandId collectionId price currency
|
|
76
|
+
colours sizes materials description image { id } tags
|
|
77
|
+
createdAt updatedAt workspaceId
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
`,U=`
|
|
81
|
+
query CooListStyleItems(
|
|
82
|
+
$brandId: ID
|
|
83
|
+
$category: CooStyleCategory
|
|
84
|
+
$collectionId: ID
|
|
85
|
+
$status: CooStyleItemStatus
|
|
86
|
+
$pagination: PaginationInput
|
|
87
|
+
) {
|
|
88
|
+
cooListStyleItems(
|
|
89
|
+
brandId: $brandId
|
|
90
|
+
category: $category
|
|
91
|
+
collectionId: $collectionId
|
|
92
|
+
status: $status
|
|
93
|
+
pagination: $pagination
|
|
94
|
+
) {
|
|
95
|
+
items {
|
|
96
|
+
id name sku category status brandId price currency tags createdAt
|
|
97
|
+
}
|
|
98
|
+
pageInfo { cursor hasMore }
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
`,B=`
|
|
102
|
+
mutation CooCreateStyleItem($input: CooCreateStyleItemInput!) {
|
|
103
|
+
cooCreateStyleItem(input: $input) {
|
|
104
|
+
id name sku category status brandId collectionId price currency
|
|
105
|
+
colours sizes materials description tags createdAt
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
`,W=`
|
|
109
|
+
mutation CooUpdateStyleItem($id: ID!, $input: CooUpdateStyleItemInput!) {
|
|
110
|
+
cooUpdateStyleItem(id: $id, input: $input) {
|
|
111
|
+
id name sku category status brandId collectionId price currency
|
|
112
|
+
colours sizes materials description tags updatedAt
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
`,q=`
|
|
116
|
+
mutation CooArchiveStyleItem($id: ID!) {
|
|
117
|
+
cooArchiveStyleItem(id: $id)
|
|
118
|
+
}
|
|
119
|
+
`,M=`
|
|
120
|
+
query CooGetCollaboration($id: ID!) {
|
|
121
|
+
cooCollaboration(id: $id) {
|
|
122
|
+
id title status role brandId creatorId collectionId compensation currency
|
|
123
|
+
brief startDate endDate publishedAt tags createdAt updatedAt workspaceId
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
`,G=`
|
|
127
|
+
query CooListCollaborations($brandId: ID, $creatorId: ID, $status: CooCollaborationStatus) {
|
|
128
|
+
cooListCollaborations(brandId: $brandId, creatorId: $creatorId, status: $status) {
|
|
129
|
+
id title status role brandId creatorId compensation currency
|
|
130
|
+
startDate endDate createdAt
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
`,z=`
|
|
134
|
+
mutation CooCreateCollaboration($input: CooCreateCollaborationInput!) {
|
|
135
|
+
cooCreateCollaboration(input: $input) {
|
|
136
|
+
id title status role brandId creatorId collectionId compensation currency
|
|
137
|
+
brief startDate endDate tags createdAt
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
`,K=`
|
|
141
|
+
mutation CooTransitionCollaboration($id: ID!, $status: CooCollaborationStatus!) {
|
|
142
|
+
cooTransitionCollaboration(id: $id, status: $status) {
|
|
143
|
+
id title status publishedAt updatedAt
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
`,H=`
|
|
147
|
+
query CooGetLook($id: ID!) {
|
|
148
|
+
cooLook(id: $id) {
|
|
149
|
+
id title caption occasion visibility isFeatured likeCount saveCount
|
|
150
|
+
authorId collaborationId image { id } tags publishedAt
|
|
151
|
+
items { id styleItemId position styling }
|
|
152
|
+
createdAt updatedAt workspaceId
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
`,j=`
|
|
156
|
+
query CooListLooks(
|
|
157
|
+
$authorId: ID
|
|
158
|
+
$featured: Boolean
|
|
159
|
+
$occasion: CooLookOccasion
|
|
160
|
+
$pagination: PaginationInput
|
|
161
|
+
) {
|
|
162
|
+
cooListLooks(
|
|
163
|
+
authorId: $authorId
|
|
164
|
+
featured: $featured
|
|
165
|
+
occasion: $occasion
|
|
166
|
+
pagination: $pagination
|
|
167
|
+
) {
|
|
168
|
+
items {
|
|
169
|
+
id title occasion visibility isFeatured likeCount saveCount
|
|
170
|
+
authorId tags createdAt
|
|
171
|
+
}
|
|
172
|
+
pageInfo { cursor hasMore }
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
`,V=`
|
|
176
|
+
mutation CooCreateLook($input: CooCreateLookInput!) {
|
|
177
|
+
cooCreateLook(input: $input) {
|
|
178
|
+
id title caption occasion visibility isFeatured authorId collaborationId
|
|
179
|
+
tags items { id styleItemId position styling } createdAt
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
`,Y=`
|
|
183
|
+
mutation CooUpdateLook($id: ID!, $input: CooUpdateLookInput!) {
|
|
184
|
+
cooUpdateLook(id: $id, input: $input) {
|
|
185
|
+
id title caption occasion visibility tags updatedAt
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
`,J=`
|
|
189
|
+
mutation CooPublishLook($id: ID!) {
|
|
190
|
+
cooPublishLook(id: $id) {
|
|
191
|
+
id title visibility publishedAt updatedAt
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
`,Q=`
|
|
195
|
+
mutation CooLikeLook($id: ID!) {
|
|
196
|
+
cooLikeLook(id: $id) {
|
|
197
|
+
id title likeCount updatedAt
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
`,X=`
|
|
201
|
+
mutation CooDeleteLook($id: ID!) {
|
|
202
|
+
cooDeleteLook(id: $id)
|
|
203
|
+
}
|
|
204
|
+
`,Z=`
|
|
205
|
+
query CooGetLookbook($id: ID!) {
|
|
206
|
+
cooLookbook(id: $id) {
|
|
207
|
+
id name description visibility ownerId profileId cover { id } tags
|
|
208
|
+
entries { id lookId styleItemId note position }
|
|
209
|
+
createdAt updatedAt workspaceId
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
`,tt=`
|
|
213
|
+
query CooListLookbooks($ownerId: ID) {
|
|
214
|
+
cooListLookbooks(ownerId: $ownerId) {
|
|
215
|
+
id name description visibility ownerId profileId tags createdAt
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
`,ot=`
|
|
219
|
+
mutation CooCreateLookbook($input: CooCreateLookbookInput!) {
|
|
220
|
+
cooCreateLookbook(input: $input) {
|
|
221
|
+
id name description visibility ownerId profileId tags createdAt
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
`,et=`
|
|
225
|
+
mutation CooAddLookbookEntry($input: CooAddLookbookEntryInput!) {
|
|
226
|
+
cooAddLookbookEntry(input: $input) {
|
|
227
|
+
id lookbookId lookId styleItemId note position createdAt workspaceId
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
`,nt=`
|
|
231
|
+
mutation CooRemoveLookbookEntry($id: ID!) {
|
|
232
|
+
cooRemoveLookbookEntry(id: $id)
|
|
233
|
+
}
|
|
234
|
+
`,rt=`
|
|
235
|
+
query CooListWardrobeItems($category: CooStyleCategory, $source: CooWardrobeSource) {
|
|
236
|
+
cooListWardrobeItems(category: $category, source: $source) {
|
|
237
|
+
id name brandName category colour size source styleItemId
|
|
238
|
+
timesWorn lastWornAt tags createdAt
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
`,it=`
|
|
242
|
+
mutation CooCreateWardrobeItem($input: CooCreateWardrobeItemInput!) {
|
|
243
|
+
cooCreateWardrobeItem(input: $input) {
|
|
244
|
+
id name brandName category colour size source styleItemId notes
|
|
245
|
+
tags timesWorn createdAt workspaceId
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
`,st=`
|
|
249
|
+
mutation CooUpdateWardrobeItem($id: ID!, $input: CooUpdateWardrobeItemInput!) {
|
|
250
|
+
cooUpdateWardrobeItem(id: $id, input: $input) {
|
|
251
|
+
id name brandName category colour size source notes tags updatedAt
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
`,at=`
|
|
255
|
+
mutation CooLogWardrobeWear($id: ID!) {
|
|
256
|
+
cooLogWardrobeWear(id: $id) {
|
|
257
|
+
id name timesWorn lastWornAt updatedAt
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
`,ct=`
|
|
261
|
+
mutation CooRemoveWardrobeItem($id: ID!) {
|
|
262
|
+
cooRemoveWardrobeItem(id: $id)
|
|
263
|
+
}
|
|
264
|
+
`,dt=`
|
|
265
|
+
query CooMyStyleProfile {
|
|
266
|
+
cooMyStyleProfile {
|
|
267
|
+
id displayName bio visibility ownerId favouriteBrands palette
|
|
268
|
+
stylePreferences sizes createdAt updatedAt workspaceId
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
`,lt=`
|
|
272
|
+
mutation CooUpsertStyleProfile($input: CooUpsertStyleProfileInput!) {
|
|
273
|
+
cooUpsertStyleProfile(input: $input) {
|
|
274
|
+
id displayName bio visibility ownerId favouriteBrands palette
|
|
275
|
+
stylePreferences sizes updatedAt
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
`,ut=`
|
|
279
|
+
query CooHealth {
|
|
280
|
+
cooHealth
|
|
281
|
+
}
|
|
282
|
+
`;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 l(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 o=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,o.cooListBrands.items,{headers:["ID","Name","Handle","Status","Featured"],rows:o.cooListBrands.items.map(e=>[p(e.id,12),e.name,e.handle,e.status,e.isFeatured?"yes":"no"])});}catch(o){i(o);}}),n.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 a(A,{id:t});if(!e.cooBrand)throw new d(`Brand ${t} not found`);s(o,e.cooBrand);}catch(e){i(e);}}),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 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=l(t.aesthetics)),t.tags&&(o.tags=l(t.tags));let e=await a(T,{input:o});c(`Brand created: ${e.cooCreateBrand.name}`),s(t,e.cooCreateBrand);}catch(o){i(o);}}),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,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=l(o.aesthetics)),o.tags&&(e.tags=l(o.tags)),!Object.keys(e).length)throw new d("No updates specified");let m=await a(x,{id:t,input:e});c("Brand updated"),s(o,m.cooUpdateBrand);}catch(e){i(e);}}),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,o)=>{try{let e=await a(S,{id:t,status:o.status.toUpperCase()});c(`Brand status set to ${e.cooTransitionBrand.status}`),s(o,e.cooTransitionBrand);}catch(e){i(e);}}),n.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 a(R,{id:t});c(`Brand archived: ${e.cooArchiveBrand}`),s(o,{archived:e.cooArchiveBrand});}catch(e){i(e);}});}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 o=await a($,{brandId:t.brand,status:t.status?t.status.toUpperCase():void 0});s(t,o.cooListCollections,{headers:["ID","Name","Season","Status","Brand"],rows:o.cooListCollections.map(e=>[p(e.id,12),e.name,e.season,e.status,p(e.brandId,12)])});}catch(o){i(o);}}),n.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 a(D,{id:t});if(!e.cooCollection)throw new d(`Collection ${t} not found`);s(o,e.cooCollection);}catch(e){i(e);}}),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 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=l(t.tags));let e=await a(_,{input:o});c(`Collection created: ${e.cooCreateCollection.name}`),s(t,e.cooCreateCollection);}catch(o){i(o);}}),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,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=l(o.tags)),!Object.keys(e).length)throw new d("No updates specified");let m=await a(P,{id:t,input:e});c("Collection updated"),s(o,m.cooUpdateCollection);}catch(e){i(e);}}),n.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 a(N,{id:t});c(`Collection published: ${e.cooPublishCollection.status}`),s(o,e.cooPublishCollection);}catch(e){i(e);}});}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 o=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,o.cooListStyleItems.items,{headers:["ID","Name","Category","Status","Price"],rows:o.cooListStyleItems.items.map(e=>[p(e.id,12),e.name,e.category,e.status,`${e.price} ${e.currency}`])});}catch(o){i(o);}}),n.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 a(F,{id:t});if(!e.cooStyleItem)throw new d(`Style item ${t} not found`);s(o,e.cooStyleItem);}catch(e){i(e);}}),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 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=l(t.colours)),t.sizes&&(o.sizes=l(t.sizes)),t.materials&&(o.materials=l(t.materials)),t.tags&&(o.tags=l(t.tags));let e=await a(B,{input:o});c(`Style item created: ${e.cooCreateStyleItem.name}`),s(t,e.cooCreateStyleItem);}catch(o){i(o);}}),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,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=l(o.colours)),o.sizes&&(e.sizes=l(o.sizes)),o.materials&&(e.materials=l(o.materials)),o.tags&&(e.tags=l(o.tags)),!Object.keys(e).length)throw new d("No updates specified");let m=await a(W,{id:t,input:e});c("Style item updated"),s(o,m.cooUpdateStyleItem);}catch(e){i(e);}}),n.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 a(q,{id:t});c(`Style item archived: ${e.cooArchiveStyleItem}`),s(o,{archived:e.cooArchiveStyleItem});}catch(e){i(e);}});}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 o=await a(G,{brandId:t.brand,creatorId:t.creator,status:t.status?t.status.toUpperCase():void 0});s(t,o.cooListCollaborations,{headers:["ID","Title","Status","Role","Brand","Creator"],rows:o.cooListCollaborations.map(e=>[p(e.id,12),e.title,e.status,e.role,p(e.brandId,12),p(e.creatorId,12)])});}catch(o){i(o);}}),n.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 a(M,{id:t});if(!e.cooCollaboration)throw new d(`Collaboration ${t} not found`);s(o,e.cooCollaboration);}catch(e){i(e);}}),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 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=l(t.tags));let e=await a(z,{input:o});c(`Collaboration created: ${e.cooCreateCollaboration.title}`),s(t,e.cooCreateCollaboration);}catch(o){i(o);}}),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,o)=>{try{let e=await a(K,{id:t,status:o.status.toUpperCase()});c(`Collaboration status set to ${e.cooTransitionCollaboration.status}`),s(o,e.cooTransitionCollaboration);}catch(e){i(e);}});}function Ct(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 o=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,o.cooListLooks.items,{headers:["ID","Title","Occasion","Visibility","Likes","Featured"],rows:o.cooListLooks.items.map(e=>[p(e.id,12),e.title,e.occasion,e.visibility,String(e.likeCount??0),e.isFeatured?"yes":"no"])});}catch(o){i(o);}}),n.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 a(H,{id:t});if(!e.cooLook)throw new d(`Look ${t} not found`);s(o,e.cooLook);}catch(e){i(e);}}),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 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 m=k("items",t.items);if(!Array.isArray(m))throw new d("--items must be a JSON array");o.items=m;}t.tags&&(o.tags=l(t.tags));let e=await a(V,{input:o});c(`Look created: ${e.cooCreateLook.title}`),s(t,e.cooCreateLook);}catch(o){i(o);}}),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,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=l(o.tags)),!Object.keys(e).length)throw new d("No updates specified");let m=await a(Y,{id:t,input:e});c("Look updated"),s(o,m.cooUpdateLook);}catch(e){i(e);}}),n.command("publish").description("Publish a look").argument("<id>","Look ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await a(J,{id:t});c(`Look published: ${e.cooPublishLook.title}`),s(o,e.cooPublishLook);}catch(e){i(e);}}),n.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 a(Q,{id:t});c(`Look liked (likes: ${e.cooLikeLook.likeCount??0})`),s(o,e.cooLikeLook);}catch(e){i(e);}}),n.command("delete").description("Delete a look").argument("<id>","Look ID").option("-f, --format <format>","Output format").action(async(t,o)=>{try{let e=await a(X,{id:t});c(`Look deleted: ${e.cooDeleteLook}`),s(o,{deleted:e.cooDeleteLook});}catch(e){i(e);}});}function yt(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 o=await a(tt,{ownerId:t.owner});s(t,o.cooListLookbooks,{headers:["ID","Name","Visibility","Owner"],rows:o.cooListLookbooks.map(e=>[p(e.id,12),e.name,e.visibility,p(e.ownerId,12)])});}catch(o){i(o);}}),n.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 a(Z,{id:t});if(!e.cooLookbook)throw new d(`Lookbook ${t} not found`);s(o,e.cooLookbook);}catch(e){i(e);}}),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 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=l(t.tags));let e=await a(ot,{input:o});c(`Lookbook created: ${e.cooCreateLookbook.name}`),s(t,e.cooCreateLookbook);}catch(o){i(o);}}),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 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 a(et,{input:o});c(`Lookbook entry added: ${e.cooAddLookbookEntry.id}`),s(t,e.cooAddLookbookEntry);}catch(o){i(o);}}),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,o)=>{try{let e=await a(nt,{id:t});c(`Lookbook entry removed: ${e.cooRemoveLookbookEntry}`),s(o,{removed:e.cooRemoveLookbookEntry});}catch(e){i(e);}});}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 o=await a(rt,{category:t.category?t.category.toUpperCase():void 0,source:t.source?t.source.toUpperCase():void 0});s(t,o.cooListWardrobeItems,{headers:["ID","Name","Category","Source","Times Worn"],rows:o.cooListWardrobeItems.map(e=>[p(e.id,12),e.name,e.category,e.source,String(e.timesWorn??0)])});}catch(o){i(o);}}),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 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=l(t.tags));let e=await a(it,{input:o});c(`Wardrobe item added: ${e.cooCreateWardrobeItem.name}`),s(t,e.cooCreateWardrobeItem);}catch(o){i(o);}}),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,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=l(o.tags)),!Object.keys(e).length)throw new d("No updates specified");let m=await a(st,{id:t,input:e});c("Wardrobe item updated"),s(o,m.cooUpdateWardrobeItem);}catch(e){i(e);}}),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,o)=>{try{let e=await a(at,{id:t});c(`Wear logged (times worn: ${e.cooLogWardrobeWear.timesWorn??0})`),s(o,e.cooLogWardrobeWear);}catch(e){i(e);}}),n.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 a(ct,{id:t});c(`Wardrobe item removed: ${e.cooRemoveWardrobeItem}`),s(o,{removed:e.cooRemoveWardrobeItem});}catch(e){i(e);}});}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 o=await a(dt);if(!o.cooMyStyleProfile)throw new d("No style profile yet. Run `profile upsert` to create one.");s(t,o.cooMyStyleProfile);}catch(o){i(o);}}),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 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=l(t.favouriteBrands)),t.palette&&(o.palette=l(t.palette)),t.stylePreferences&&(o.stylePreferences=l(t.stylePreferences)),t.sizes&&(o.sizes=k("sizes",t.sizes));let e=await a(lt,{input:o});c("Style profile saved"),s(t,e.cooUpsertStyleProfile);}catch(o){i(o);}});}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(ut);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),Ct(t),yt(t),bt(t),It(t),kt(t);}},ve=$t;module.exports=ve;
|