shred-api-client 2.3.7-rc.0 → 2.3.7
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/index.d.ts +72 -101
- package/dist/index.js +45 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -896,8 +896,6 @@ declare const PreferencesSchema: z.ZodObject<{
|
|
|
896
896
|
declare const TenantSchema: z.ZodObject<{
|
|
897
897
|
id: z.ZodString;
|
|
898
898
|
name: z.ZodString;
|
|
899
|
-
industry: z.ZodString;
|
|
900
|
-
description: z.ZodString;
|
|
901
899
|
isActive: z.ZodBoolean;
|
|
902
900
|
isSubscriptionActive: z.ZodBoolean;
|
|
903
901
|
preferences: z.ZodObject<{
|
|
@@ -1105,51 +1103,9 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
1105
1103
|
subscriptionItemId: string;
|
|
1106
1104
|
} | undefined;
|
|
1107
1105
|
}>>>;
|
|
1108
|
-
assets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1109
|
-
assetId: z.ZodString;
|
|
1110
|
-
fileName: z.ZodString;
|
|
1111
|
-
extension: z.ZodString;
|
|
1112
|
-
fileSize: z.ZodNumber;
|
|
1113
|
-
assetUrl: z.ZodString;
|
|
1114
|
-
thumbnailUrl: z.ZodString;
|
|
1115
|
-
type: z.ZodString;
|
|
1116
|
-
duration: z.ZodOptional<z.ZodNumber>;
|
|
1117
|
-
progress: z.ZodOptional<z.ZodNumber>;
|
|
1118
|
-
error: z.ZodOptional<z.ZodString>;
|
|
1119
|
-
authorId: z.ZodString;
|
|
1120
|
-
uploadedAt: z.ZodNumber;
|
|
1121
|
-
}, "strip", z.ZodTypeAny, {
|
|
1122
|
-
type: string;
|
|
1123
|
-
assetId: string;
|
|
1124
|
-
fileName: string;
|
|
1125
|
-
extension: string;
|
|
1126
|
-
fileSize: number;
|
|
1127
|
-
assetUrl: string;
|
|
1128
|
-
thumbnailUrl: string;
|
|
1129
|
-
authorId: string;
|
|
1130
|
-
uploadedAt: number;
|
|
1131
|
-
error?: string | undefined;
|
|
1132
|
-
duration?: number | undefined;
|
|
1133
|
-
progress?: number | undefined;
|
|
1134
|
-
}, {
|
|
1135
|
-
type: string;
|
|
1136
|
-
assetId: string;
|
|
1137
|
-
fileName: string;
|
|
1138
|
-
extension: string;
|
|
1139
|
-
fileSize: number;
|
|
1140
|
-
assetUrl: string;
|
|
1141
|
-
thumbnailUrl: string;
|
|
1142
|
-
authorId: string;
|
|
1143
|
-
uploadedAt: number;
|
|
1144
|
-
error?: string | undefined;
|
|
1145
|
-
duration?: number | undefined;
|
|
1146
|
-
progress?: number | undefined;
|
|
1147
|
-
}>, "many">>;
|
|
1148
1106
|
}, "strip", z.ZodTypeAny, {
|
|
1149
1107
|
id: string;
|
|
1150
|
-
description: string;
|
|
1151
1108
|
name: string;
|
|
1152
|
-
industry: string;
|
|
1153
1109
|
isActive: boolean;
|
|
1154
1110
|
isSubscriptionActive: boolean;
|
|
1155
1111
|
preferences: {
|
|
@@ -1205,25 +1161,9 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
1205
1161
|
subscriptionItemId: string;
|
|
1206
1162
|
} | undefined;
|
|
1207
1163
|
} | undefined;
|
|
1208
|
-
assets?: {
|
|
1209
|
-
type: string;
|
|
1210
|
-
assetId: string;
|
|
1211
|
-
fileName: string;
|
|
1212
|
-
extension: string;
|
|
1213
|
-
fileSize: number;
|
|
1214
|
-
assetUrl: string;
|
|
1215
|
-
thumbnailUrl: string;
|
|
1216
|
-
authorId: string;
|
|
1217
|
-
uploadedAt: number;
|
|
1218
|
-
error?: string | undefined;
|
|
1219
|
-
duration?: number | undefined;
|
|
1220
|
-
progress?: number | undefined;
|
|
1221
|
-
}[] | undefined;
|
|
1222
1164
|
}, {
|
|
1223
1165
|
id: string;
|
|
1224
|
-
description: string;
|
|
1225
1166
|
name: string;
|
|
1226
|
-
industry: string;
|
|
1227
1167
|
isActive: boolean;
|
|
1228
1168
|
isSubscriptionActive: boolean;
|
|
1229
1169
|
preferences: {
|
|
@@ -1279,22 +1219,39 @@ declare const TenantSchema: z.ZodObject<{
|
|
|
1279
1219
|
subscriptionItemId: string;
|
|
1280
1220
|
} | undefined;
|
|
1281
1221
|
} | undefined;
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1222
|
+
}>;
|
|
1223
|
+
declare const SummarySchema: z.ZodObject<{
|
|
1224
|
+
tenantId: z.ZodString;
|
|
1225
|
+
subscriptions: z.ZodNumber;
|
|
1226
|
+
users: z.ZodNumber;
|
|
1227
|
+
}, "strip", z.ZodTypeAny, {
|
|
1228
|
+
users: number;
|
|
1229
|
+
tenantId: string;
|
|
1230
|
+
subscriptions: number;
|
|
1231
|
+
}, {
|
|
1232
|
+
users: number;
|
|
1233
|
+
tenantId: string;
|
|
1234
|
+
subscriptions: number;
|
|
1235
|
+
}>;
|
|
1236
|
+
declare const MemberSchema: z.ZodObject<{
|
|
1237
|
+
name: z.ZodString;
|
|
1238
|
+
email: z.ZodString;
|
|
1239
|
+
pictureUrl: z.ZodString;
|
|
1240
|
+
isActive: z.ZodBoolean;
|
|
1241
|
+
}, "strip", z.ZodTypeAny, {
|
|
1242
|
+
email: string;
|
|
1243
|
+
pictureUrl: string;
|
|
1244
|
+
name: string;
|
|
1245
|
+
isActive: boolean;
|
|
1246
|
+
}, {
|
|
1247
|
+
email: string;
|
|
1248
|
+
pictureUrl: string;
|
|
1249
|
+
name: string;
|
|
1250
|
+
isActive: boolean;
|
|
1296
1251
|
}>;
|
|
1297
1252
|
type Tenant = z.infer<typeof TenantSchema>;
|
|
1253
|
+
type Member = z.infer<typeof MemberSchema>;
|
|
1254
|
+
type Summary = z.infer<typeof SummarySchema>;
|
|
1298
1255
|
type Preferences = z.infer<typeof PreferencesSchema>;
|
|
1299
1256
|
|
|
1300
1257
|
interface IAPI$7 {
|
|
@@ -1302,6 +1259,8 @@ interface IAPI$7 {
|
|
|
1302
1259
|
create: (tenant: Tenant, context: Context) => Promise<boolean>;
|
|
1303
1260
|
list: (context: Context) => Promise<Tenant[]>;
|
|
1304
1261
|
getTenant: (context: Context, tenantId?: string) => Promise<Tenant | null>;
|
|
1262
|
+
getSummaries: (context: Context) => Promise<Summary[]>;
|
|
1263
|
+
getMembers: (context: Context, tenantId: string) => Promise<Member[]>;
|
|
1305
1264
|
update: (tenantId: string, data: Pick<Tenant, "preferences">, context: Context) => Promise<boolean>;
|
|
1306
1265
|
}
|
|
1307
1266
|
declare const Endpoints$6: {
|
|
@@ -1329,13 +1288,25 @@ declare const Endpoints$6: {
|
|
|
1329
1288
|
uri: string;
|
|
1330
1289
|
method: string;
|
|
1331
1290
|
};
|
|
1291
|
+
Summaries: {
|
|
1292
|
+
uri: string;
|
|
1293
|
+
method: string;
|
|
1294
|
+
};
|
|
1295
|
+
Members: {
|
|
1296
|
+
uri: string;
|
|
1297
|
+
method: string;
|
|
1298
|
+
};
|
|
1332
1299
|
};
|
|
1333
1300
|
|
|
1301
|
+
type index$8_Member = Member;
|
|
1302
|
+
declare const index$8_MemberSchema: typeof MemberSchema;
|
|
1334
1303
|
type index$8_Preferences = Preferences;
|
|
1335
1304
|
declare const index$8_PreferencesSchema: typeof PreferencesSchema;
|
|
1305
|
+
type index$8_Summary = Summary;
|
|
1306
|
+
declare const index$8_SummarySchema: typeof SummarySchema;
|
|
1336
1307
|
declare const index$8_TenantSchema: typeof TenantSchema;
|
|
1337
1308
|
declare namespace index$8 {
|
|
1338
|
-
export { Endpoints$6 as Endpoints, type Tenant as Entity, type IAPI$7 as IAPI, type index$8_Preferences as Preferences, index$8_PreferencesSchema as PreferencesSchema, index$8_TenantSchema as TenantSchema };
|
|
1309
|
+
export { Endpoints$6 as Endpoints, type Tenant as Entity, type IAPI$7 as IAPI, type index$8_Member as Member, index$8_MemberSchema as MemberSchema, type index$8_Preferences as Preferences, index$8_PreferencesSchema as PreferencesSchema, type index$8_Summary as Summary, index$8_SummarySchema as SummarySchema, index$8_TenantSchema as TenantSchema };
|
|
1339
1310
|
}
|
|
1340
1311
|
|
|
1341
1312
|
declare const TrackParamSchema: z.ZodObject<{
|
|
@@ -1635,7 +1606,19 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
1635
1606
|
}[];
|
|
1636
1607
|
submitTimestamp: number;
|
|
1637
1608
|
tenantId?: string | undefined;
|
|
1609
|
+
editorId?: string | undefined;
|
|
1638
1610
|
thumbnailUrl?: string | undefined;
|
|
1611
|
+
finalVideoId?: string | undefined;
|
|
1612
|
+
feedback?: {
|
|
1613
|
+
criteria: {
|
|
1614
|
+
id: string;
|
|
1615
|
+
label: string;
|
|
1616
|
+
score: number;
|
|
1617
|
+
comment?: string | undefined;
|
|
1618
|
+
}[];
|
|
1619
|
+
comment?: string | undefined;
|
|
1620
|
+
} | undefined;
|
|
1621
|
+
captionSuggestion?: string | undefined;
|
|
1639
1622
|
assets?: {
|
|
1640
1623
|
type: string;
|
|
1641
1624
|
assetId: string;
|
|
@@ -1650,18 +1633,6 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
1650
1633
|
duration?: number | undefined;
|
|
1651
1634
|
progress?: number | undefined;
|
|
1652
1635
|
}[] | undefined;
|
|
1653
|
-
editorId?: string | undefined;
|
|
1654
|
-
finalVideoId?: string | undefined;
|
|
1655
|
-
feedback?: {
|
|
1656
|
-
criteria: {
|
|
1657
|
-
id: string;
|
|
1658
|
-
label: string;
|
|
1659
|
-
score: number;
|
|
1660
|
-
comment?: string | undefined;
|
|
1661
|
-
}[];
|
|
1662
|
-
comment?: string | undefined;
|
|
1663
|
-
} | undefined;
|
|
1664
|
-
captionSuggestion?: string | undefined;
|
|
1665
1636
|
isFree?: boolean | undefined;
|
|
1666
1637
|
}, {
|
|
1667
1638
|
id: string;
|
|
@@ -1682,7 +1653,19 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
1682
1653
|
}[];
|
|
1683
1654
|
submitTimestamp: number;
|
|
1684
1655
|
tenantId?: string | undefined;
|
|
1656
|
+
editorId?: string | undefined;
|
|
1685
1657
|
thumbnailUrl?: string | undefined;
|
|
1658
|
+
finalVideoId?: string | undefined;
|
|
1659
|
+
feedback?: {
|
|
1660
|
+
criteria: {
|
|
1661
|
+
id: string;
|
|
1662
|
+
label: string;
|
|
1663
|
+
score: number;
|
|
1664
|
+
comment?: string | undefined;
|
|
1665
|
+
}[];
|
|
1666
|
+
comment?: string | undefined;
|
|
1667
|
+
} | undefined;
|
|
1668
|
+
captionSuggestion?: string | undefined;
|
|
1686
1669
|
assets?: {
|
|
1687
1670
|
type: string;
|
|
1688
1671
|
assetId: string;
|
|
@@ -1697,18 +1680,6 @@ declare const ProjectSchema: z.ZodObject<{
|
|
|
1697
1680
|
duration?: number | undefined;
|
|
1698
1681
|
progress?: number | undefined;
|
|
1699
1682
|
}[] | undefined;
|
|
1700
|
-
editorId?: string | undefined;
|
|
1701
|
-
finalVideoId?: string | undefined;
|
|
1702
|
-
feedback?: {
|
|
1703
|
-
criteria: {
|
|
1704
|
-
id: string;
|
|
1705
|
-
label: string;
|
|
1706
|
-
score: number;
|
|
1707
|
-
comment?: string | undefined;
|
|
1708
|
-
}[];
|
|
1709
|
-
comment?: string | undefined;
|
|
1710
|
-
} | undefined;
|
|
1711
|
-
captionSuggestion?: string | undefined;
|
|
1712
1683
|
isFree?: boolean | undefined;
|
|
1713
1684
|
}>;
|
|
1714
1685
|
type ProjectCreation = Pick<Project, "title" | "instructions" | "captionStyle" | "assets">;
|
|
@@ -1909,8 +1880,8 @@ declare const GoalSchema: z.ZodObject<{
|
|
|
1909
1880
|
}, "strip", z.ZodTypeAny, {
|
|
1910
1881
|
id: string;
|
|
1911
1882
|
createdAt: number;
|
|
1912
|
-
progress: number;
|
|
1913
1883
|
editorId: string;
|
|
1884
|
+
progress: number;
|
|
1914
1885
|
target: number;
|
|
1915
1886
|
isoWeek: string;
|
|
1916
1887
|
dailyMilestones: {
|
|
@@ -1922,8 +1893,8 @@ declare const GoalSchema: z.ZodObject<{
|
|
|
1922
1893
|
}, {
|
|
1923
1894
|
id: string;
|
|
1924
1895
|
createdAt: number;
|
|
1925
|
-
progress: number;
|
|
1926
1896
|
editorId: string;
|
|
1897
|
+
progress: number;
|
|
1927
1898
|
target: number;
|
|
1928
1899
|
isoWeek: string;
|
|
1929
1900
|
dailyMilestones: {
|
package/dist/index.js
CHANGED
|
@@ -4661,6 +4661,29 @@ var TenantAPI = class {
|
|
|
4661
4661
|
);
|
|
4662
4662
|
return data;
|
|
4663
4663
|
}
|
|
4664
|
+
async getMembers(context, tenantId) {
|
|
4665
|
+
const endpointData = tenant_exports.Endpoints.Members;
|
|
4666
|
+
const uri = endpointData.uri.replace(":tenantId", tenantId);
|
|
4667
|
+
const data = await this.clientHTTP.makeRequest(
|
|
4668
|
+
this.env,
|
|
4669
|
+
uri,
|
|
4670
|
+
endpointData.method,
|
|
4671
|
+
null,
|
|
4672
|
+
context
|
|
4673
|
+
);
|
|
4674
|
+
return data;
|
|
4675
|
+
}
|
|
4676
|
+
async getSummaries(context) {
|
|
4677
|
+
const endpoint = tenant_exports.Endpoints.Summaries;
|
|
4678
|
+
const data = await this.clientHTTP.makeRequest(
|
|
4679
|
+
this.env,
|
|
4680
|
+
endpoint.uri,
|
|
4681
|
+
endpoint.method,
|
|
4682
|
+
null,
|
|
4683
|
+
context
|
|
4684
|
+
);
|
|
4685
|
+
return data;
|
|
4686
|
+
}
|
|
4664
4687
|
};
|
|
4665
4688
|
var Tenant_api_default = TenantAPI;
|
|
4666
4689
|
|
|
@@ -5795,7 +5818,9 @@ var Endpoints7 = {
|
|
|
5795
5818
|
var tenant_exports = {};
|
|
5796
5819
|
__export(tenant_exports, {
|
|
5797
5820
|
Endpoints: () => Endpoints8,
|
|
5821
|
+
MemberSchema: () => MemberSchema,
|
|
5798
5822
|
PreferencesSchema: () => PreferencesSchema,
|
|
5823
|
+
SummarySchema: () => SummarySchema,
|
|
5799
5824
|
TenantSchema: () => TenantSchema
|
|
5800
5825
|
});
|
|
5801
5826
|
|
|
@@ -5862,8 +5887,6 @@ var PreferencesSchema = external_exports.object({
|
|
|
5862
5887
|
var TenantSchema = external_exports.object({
|
|
5863
5888
|
id: external_exports.string(),
|
|
5864
5889
|
name: external_exports.string(),
|
|
5865
|
-
industry: external_exports.string(),
|
|
5866
|
-
description: external_exports.string(),
|
|
5867
5890
|
isActive: external_exports.boolean(),
|
|
5868
5891
|
isSubscriptionActive: external_exports.boolean(),
|
|
5869
5892
|
preferences: PreferencesSchema,
|
|
@@ -5876,8 +5899,18 @@ var TenantSchema = external_exports.object({
|
|
|
5876
5899
|
defaultCoupomCode: external_exports.string().optional(),
|
|
5877
5900
|
allowedProducts: external_exports.array(external_exports.string()).optional(),
|
|
5878
5901
|
useOwnScripts: external_exports.boolean().optional(),
|
|
5879
|
-
subscription: external_exports.optional(external_exports.lazy(() => SubscriptionSchema))
|
|
5880
|
-
|
|
5902
|
+
subscription: external_exports.optional(external_exports.lazy(() => SubscriptionSchema))
|
|
5903
|
+
});
|
|
5904
|
+
var SummarySchema = external_exports.object({
|
|
5905
|
+
tenantId: external_exports.string(),
|
|
5906
|
+
subscriptions: external_exports.number(),
|
|
5907
|
+
users: external_exports.number()
|
|
5908
|
+
});
|
|
5909
|
+
var MemberSchema = external_exports.object({
|
|
5910
|
+
name: external_exports.string(),
|
|
5911
|
+
email: external_exports.string(),
|
|
5912
|
+
pictureUrl: external_exports.string(),
|
|
5913
|
+
isActive: external_exports.boolean()
|
|
5881
5914
|
});
|
|
5882
5915
|
|
|
5883
5916
|
// src/model/tenant/Tenant.api.ts
|
|
@@ -5905,6 +5938,14 @@ var Endpoints8 = {
|
|
|
5905
5938
|
ListAll: {
|
|
5906
5939
|
uri: "/tenants/list",
|
|
5907
5940
|
method: "GET"
|
|
5941
|
+
},
|
|
5942
|
+
Summaries: {
|
|
5943
|
+
uri: "/tenants/summary/",
|
|
5944
|
+
method: "GET"
|
|
5945
|
+
},
|
|
5946
|
+
Members: {
|
|
5947
|
+
uri: "/tenants/:tenantId/members",
|
|
5948
|
+
method: "GET"
|
|
5908
5949
|
}
|
|
5909
5950
|
};
|
|
5910
5951
|
|