fmode-ng 0.0.86 → 0.0.87

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.
@@ -62,3 +62,21 @@ export interface jimengI_vOptions {
62
62
  * @returns 返回ImagineWork作品任务Parse对象
63
63
  */
64
64
  export declare function getJimengImg(params: jimengImgOptions): Promise<Parse.Object<Parse.Attributes>>;
65
+ /**
66
+ * 即梦创建文生视频
67
+ * @param params 视频参数
68
+ * @returns 返回ImagineWork作品任务Parse对象
69
+ */
70
+ export declare function getJimengT_v(params: jimengT_vOptions): Promise<any>;
71
+ /**
72
+ * 即梦创建图生视频
73
+ * @param params 视频参数
74
+ * @returns 返回ImagineWork作品任务Parse对象
75
+ */
76
+ export declare function getJimengI_v(params: jimengI_vOptions): Promise<any>;
77
+ /**
78
+ * 即梦获取视频
79
+ * @param params 接口参数 {workId?,taskId?,video_by:text/img}
80
+ * @returns 返回ImagineWork作品任务Parse对象
81
+ */
82
+ export declare function getJimengV_data(params: any): Promise<any>;
@@ -3,6 +3,7 @@ import { NovaCloudService } from '../../../nova-cloud/nova-cloud.service';
3
3
  import Parse from "parse";
4
4
  import { NovaUploadService } from '../../../storage/service-upload/nova-upload.service';
5
5
  import { DalleOptions, jimengImgOptions } from './imagine-func';
6
+ import { ToastController } from '@ionic/angular';
6
7
  import * as i0 from "@angular/core";
7
8
  export interface StableDiffusionOptions {
8
9
  prompt: string;
@@ -62,10 +63,11 @@ export declare class ImagineService {
62
63
  private http;
63
64
  private ncloud;
64
65
  private uploadServ;
66
+ private toastCtrl;
65
67
  /**
66
68
  * 图片生成接口主机地址
67
69
  */
68
- constructor(http: HttpClient, ncloud: NovaCloudService, uploadServ: NovaUploadService);
70
+ constructor(http: HttpClient, ncloud: NovaCloudService, uploadServ: NovaUploadService, toastCtrl: ToastController);
69
71
  /**
70
72
  * DALL-E-3 图片生成函数
71
73
  * @description
@@ -117,6 +119,24 @@ export declare class ImagineService {
117
119
  * @param options 图像参数
118
120
  */
119
121
  getJimengImg(options: jimengImgOptions): Promise<void>;
122
+ /**
123
+ * 即梦视频生成函数
124
+ * @param options 图像参数
125
+ * @param type 类型 文生视频无需填写,图生视频填'i_v'
126
+ * @returns
127
+ */
128
+ getJimengVideo(options: any, type?: any): Promise<void>;
129
+ /**
130
+ * 即梦视频请求结果
131
+ * @param video_by 获取类型:文生视频/图生视频 'text'|'img'
132
+ * @param workId 作品id
133
+ */
134
+ getJimengVideoData(video_by: 'text' | 'img', workId: any): Promise<any>;
135
+ /**
136
+ * 提示
137
+ * @param msg 提示语
138
+ */
139
+ setToast(msg: any): Promise<void>;
120
140
  static ɵfac: i0.ɵɵFactoryDeclaration<ImagineService, never>;
121
141
  static ɵprov: i0.ɵɵInjectableDeclaration<ImagineService>;
122
142
  }
@@ -1,2 +1,3 @@
1
1
  export * from "./agent";
2
2
  export * from "./voice";
3
+ export * from "./parse";
@@ -0,0 +1,54 @@
1
+ type ACL = Record<string, {
2
+ read: boolean;
3
+ write: boolean;
4
+ }>;
5
+ type Pointer = {
6
+ __type: 'Pointer';
7
+ className: string;
8
+ objectId: string;
9
+ };
10
+ type File = {
11
+ __type: 'File';
12
+ name: string;
13
+ url: string;
14
+ };
15
+ type Relation = {
16
+ __type: 'Relation';
17
+ className: string;
18
+ };
19
+ export declare class FmodeObject {
20
+ static _instance: any | null;
21
+ static bindInstance(instance: any): void;
22
+ className: string;
23
+ id?: string;
24
+ createdAt?: Date;
25
+ updatedAt?: Date;
26
+ ACL?: ACL;
27
+ data: Record<string, any>;
28
+ constructor(className: string);
29
+ static extend(className: string): typeof FmodeObject;
30
+ toPointer(): Pointer;
31
+ toJSON(): Record<string, any>;
32
+ get(key: string): any;
33
+ set(key: string | Record<string, any>, value?: any): this;
34
+ unset(key: string): this;
35
+ increment(key: string, amount?: number): this;
36
+ add(key: string, items: any[]): this;
37
+ addUnique(key: string, items: any[]): this;
38
+ remove(key: string, items: any[]): this;
39
+ save(options?: {
40
+ useMasterKey?: boolean;
41
+ }): Promise<this>;
42
+ destroy(options?: {
43
+ useMasterKey?: boolean;
44
+ }): Promise<void>;
45
+ static create<T extends FmodeObject>(className: string, attributes: Record<string, any>, options?: {
46
+ useMasterKey?: boolean;
47
+ }): Promise<T>;
48
+ static fetchAll<T extends FmodeObject>(objects: T[], options?: {
49
+ useMasterKey?: boolean;
50
+ }): Promise<T[]>;
51
+ relation(key: string): Relation;
52
+ static fromFile(name: string, data: Blob | File | any, type?: string): Promise<File>;
53
+ }
54
+ export {};
@@ -0,0 +1,131 @@
1
+ import { FmodeObject } from './fmode.object';
2
+ type QueryConditions = {
3
+ $lt?: any;
4
+ $lte?: any;
5
+ $gt?: any;
6
+ $gte?: any;
7
+ $ne?: any;
8
+ $in?: any[];
9
+ $nin?: any[];
10
+ $exists?: boolean;
11
+ $select?: any;
12
+ $dontSelect?: any;
13
+ $all?: any[];
14
+ $regex?: RegExp | string;
15
+ $text?: {
16
+ $search: string;
17
+ $caseSensitive?: boolean;
18
+ $diacriticSensitive?: boolean;
19
+ };
20
+ $nearSphere?: any;
21
+ $within?: any;
22
+ $maxDistance?: number;
23
+ $or?: QueryConditions[];
24
+ $and?: QueryConditions[];
25
+ [key: string]: any;
26
+ };
27
+ export declare class FmodeQuery<T extends FmodeObject = FmodeObject> {
28
+ private static _instance;
29
+ static bindInstance(instance: any): void;
30
+ private static get instance();
31
+ className: string;
32
+ where: QueryConditions;
33
+ _include: string[];
34
+ _select: string[];
35
+ _limit?: number;
36
+ _skip?: number;
37
+ _order?: string[];
38
+ _count: boolean;
39
+ _keys?: string;
40
+ _readPreference?: string;
41
+ _includeReadPreference?: string;
42
+ _subqueryReadPreference?: string;
43
+ _explain?: boolean;
44
+ _hint?: any;
45
+ _maxTimeMS?: number;
46
+ _tracing?: boolean;
47
+ _localDatastore?: boolean;
48
+ _sessionToken?: string;
49
+ _context?: any;
50
+ constructor(className: string | {
51
+ new (): T;
52
+ });
53
+ equalTo(key: string, value: any): this;
54
+ notEqualTo(key: string, value: any): this;
55
+ lessThan(key: string, value: any): this;
56
+ lessThanOrEqualTo(key: string, value: any): this;
57
+ greaterThan(key: string, value: any): this;
58
+ greaterThanOrEqualTo(key: string, value: any): this;
59
+ containedIn(key: string, values: any[]): this;
60
+ notContainedIn(key: string, values: any[]): this;
61
+ exists(key: string): this;
62
+ doesNotExist(key: string): this;
63
+ containsAll(key: string, values: any[]): this;
64
+ contains(key: string, substring: string): this;
65
+ startsWith(key: string, prefix: string): this;
66
+ endsWith(key: string, suffix: string): this;
67
+ matches(key: string, regex: RegExp, modifiers?: string): this;
68
+ matchesQuery(key: string, query: FmodeQuery): this;
69
+ doesNotMatchQuery(key: string, query: FmodeQuery): this;
70
+ matchesKeyInQuery(key: string, queryKey: string, query: FmodeQuery): this;
71
+ doesNotMatchKeyInQuery(key: string, queryKey: string, query: FmodeQuery): this;
72
+ near(key: string, point: {
73
+ latitude: number;
74
+ longitude: number;
75
+ }): this;
76
+ withinRadians(key: string, point: {
77
+ latitude: number;
78
+ longitude: number;
79
+ }, distance: number): this;
80
+ withinMiles(key: string, point: {
81
+ latitude: number;
82
+ longitude: number;
83
+ }, distance: number): this;
84
+ withinKilometers(key: string, point: {
85
+ latitude: number;
86
+ longitude: number;
87
+ }, distance: number): this;
88
+ withinGeoBox(key: string, southwest: {
89
+ latitude: number;
90
+ longitude: number;
91
+ }, northeast: {
92
+ latitude: number;
93
+ longitude: number;
94
+ }): this;
95
+ polygonContains(key: string, points: Array<{
96
+ latitude: number;
97
+ longitude: number;
98
+ }>): this;
99
+ include(...keys: string[]): this;
100
+ select(...keys: string[]): this;
101
+ limit(count: number): this;
102
+ skip(count: number): this;
103
+ ascending(...keys: string[]): this;
104
+ descending(...keys: string[]): this;
105
+ addAscending(...keys: string[]): this;
106
+ addDescending(...keys: string[]): this;
107
+ readPreference(pref: string): this;
108
+ includeReadPreference(pref: string): this;
109
+ subqueryReadPreference(pref: string): this;
110
+ hint(hint: any): this;
111
+ maxTimeMS(ms: number): this;
112
+ explain(explain?: boolean): this;
113
+ withCount(withCount?: boolean): this;
114
+ find(options?: {
115
+ useMasterKey?: boolean;
116
+ }): Promise<T[]>;
117
+ first(options?: {
118
+ useMasterKey?: boolean;
119
+ }): Promise<T | null>;
120
+ get(objectId: string, options?: {
121
+ useMasterKey?: boolean;
122
+ }): Promise<T>;
123
+ count(options?: {
124
+ useMasterKey?: boolean;
125
+ }): Promise<number>;
126
+ private _buildQueryParams;
127
+ subscribe(): EventTarget;
128
+ or: <T_1 extends FmodeObject>(...queries: FmodeQuery<T_1>[]) => FmodeQuery<T_1>;
129
+ and: <T_1 extends FmodeObject>(...queries: FmodeQuery<T_1>[]) => FmodeQuery<T_1>;
130
+ }
131
+ export {};
@@ -0,0 +1,36 @@
1
+ import { FmodeObject } from './fmode.object';
2
+ export declare class FmodeUser extends FmodeObject {
3
+ static _instance: any | null;
4
+ static bindInstance(instance: any): void;
5
+ private static get instance();
6
+ sessionToken?: string;
7
+ email?: string;
8
+ username?: string;
9
+ password?: string;
10
+ constructor(attributes?: Record<string, any>);
11
+ static signUp(username: string, password: string, attrs?: Record<string, any>): Promise<FmodeUser>;
12
+ static logIn(username: string, password: string): Promise<FmodeUser>;
13
+ static logOut(): Promise<void>;
14
+ static become(sessionToken: string): Promise<FmodeUser>;
15
+ static requestPasswordReset(email: string): Promise<void>;
16
+ private static _currentUser;
17
+ private static _unsafeCurrentUserEnabled;
18
+ static get currentUser(): FmodeUser | null;
19
+ static enableUnsafeCurrentUser(): void;
20
+ static disableUnsafeCurrentUser(): void;
21
+ static current(): Promise<FmodeUser | null>;
22
+ static currentAsync: typeof FmodeUser.current;
23
+ private static _clearCurrentUser;
24
+ signUp(attrs?: Record<string, any>): Promise<this>;
25
+ logIn(): Promise<this>;
26
+ fetch(): Promise<this>;
27
+ private _saveToCache;
28
+ private _restoreFromCache;
29
+ toJSON(): Record<string, any>;
30
+ save(options?: {
31
+ useMasterKey?: boolean;
32
+ }): Promise<this>;
33
+ destroy(options?: {
34
+ useMasterKey?: boolean;
35
+ }): Promise<void>;
36
+ }
@@ -0,0 +1,23 @@
1
+ import { FmodeObject } from './fmode.object';
2
+ import { FmodeQuery } from './fmode.query';
3
+ import { FmodeUser } from './fmode.user';
4
+ import { FmodeConfig, FmodeInitOptions } from './types';
5
+ declare class FmodeParse {
6
+ config: FmodeConfig;
7
+ private static _instances;
8
+ private static _defaultInstance;
9
+ readonly Object: typeof FmodeObject;
10
+ readonly Query: typeof FmodeQuery;
11
+ readonly User: typeof FmodeUser;
12
+ private constructor();
13
+ static initialize(config: string | FmodeInitOptions): FmodeParse;
14
+ static with(configName: string): FmodeParse;
15
+ get serverURL(): string;
16
+ get appId(): string;
17
+ }
18
+ declare const defaultExport: typeof FmodeParse & {
19
+ Object: typeof FmodeObject;
20
+ Query: typeof FmodeQuery;
21
+ User: typeof FmodeUser;
22
+ };
23
+ export { FmodeParse as default, defaultExport as FmodeParse };
@@ -0,0 +1,8 @@
1
+ export interface FmodeConfig {
2
+ appId: string;
3
+ serverURL: string;
4
+ masterKey?: string;
5
+ }
6
+ export interface FmodeInitOptions extends FmodeConfig {
7
+ configName?: string;
8
+ }
@@ -62,7 +62,7 @@ export declare class EditUploadComponent implements OnInit {
62
62
  }[];
63
63
  qiniuConf: any;
64
64
  getUptoken(): Promise<any>;
65
- checkFileType(url: string): "video" | "image" | "file";
65
+ checkFileType(url: string): "file" | "video" | "image";
66
66
  upable(): boolean;
67
67
  imgShowing: boolean;
68
68
  fileUrl: string;
@@ -12,7 +12,7 @@ export declare class CompUserAvatarComponent implements OnInit {
12
12
  ngOnInit(): void;
13
13
  ngOnChanges(): void;
14
14
  refresh(): Promise<void>;
15
- getType(): "avatar" | "text" | "icon";
15
+ getType(): "text" | "avatar" | "icon";
16
16
  static ɵfac: i0.ɵɵFactoryDeclaration<CompUserAvatarComponent, never>;
17
17
  static ɵcmp: i0.ɵɵComponentDeclaration<CompUserAvatarComponent, "app-comp-user-avatar", never, { "user": { "alias": "user"; "required": false; }; }, {}, never, never, true, never>;
18
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmode-ng",
3
- "version": "0.0.86",
3
+ "version": "0.0.87",
4
4
  "author": "未来全栈",
5
5
  "license": "COPYRIGHT © 未来飞马 未来全栈 www.fmode.cn All RIGHTS RESERVED",
6
6
  "peerDependencies": {