@aptly-as/types 1.6.1 → 1.6.2

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/core/app.d.ts CHANGED
@@ -1,5 +1,13 @@
1
1
  import { AptlyScope } from './scope';
2
2
  import { AptlyApp, AptlyOrganization, AptlyOrganizationAppConfig } from '../models';
3
+ export declare enum AptlyAppSandbox {
4
+ AllowForms = "allow-forms",
5
+ AllowPopups = "allow-popups",
6
+ AllowScripts = "allow-scripts",
7
+ AllowSameOrigin = "allow-same-origin",
8
+ AllowPointerLock = "allow-pointer-lock",
9
+ AllowTopNavigation = "allow-top-navigation"
10
+ }
3
11
  export interface AptlyAppJWT {
4
12
  exp: number;
5
13
  }
package/core/app.js CHANGED
@@ -1,3 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AptlyAppSandbox = void 0;
4
+ var AptlyAppSandbox;
5
+ (function (AptlyAppSandbox) {
6
+ AptlyAppSandbox["AllowForms"] = "allow-forms";
7
+ AptlyAppSandbox["AllowPopups"] = "allow-popups";
8
+ AptlyAppSandbox["AllowScripts"] = "allow-scripts";
9
+ AptlyAppSandbox["AllowSameOrigin"] = "allow-same-origin";
10
+ AptlyAppSandbox["AllowPointerLock"] = "allow-pointer-lock";
11
+ AptlyAppSandbox["AllowTopNavigation"] = "allow-top-navigation";
12
+ })(AptlyAppSandbox = exports.AptlyAppSandbox || (exports.AptlyAppSandbox = {}));
3
13
  //# sourceMappingURL=app.js.map
package/core/app.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"app.js","sourceRoot":"","sources":["app.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"app.js","sourceRoot":"","sources":["app.ts"],"names":[],"mappings":";;;AAGA,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,6CAA0B,CAAA;IAC1B,+CAA4B,CAAA;IAC5B,iDAA8B,CAAA;IAC9B,wDAAqC,CAAA;IACrC,0DAAuC,CAAA;IACvC,8DAA2C,CAAA;AAC7C,CAAC,EAPW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAO1B"}
package/core/app.ts CHANGED
@@ -1,6 +1,15 @@
1
1
  import { AptlyScope } from './scope';
2
2
  import { AptlyApp, AptlyOrganization, AptlyOrganizationAppConfig } from '../models';
3
3
 
4
+ export enum AptlyAppSandbox {
5
+ AllowForms = 'allow-forms',
6
+ AllowPopups = 'allow-popups',
7
+ AllowScripts = 'allow-scripts',
8
+ AllowSameOrigin = 'allow-same-origin',
9
+ AllowPointerLock = 'allow-pointer-lock',
10
+ AllowTopNavigation = 'allow-top-navigation',
11
+ }
12
+
4
13
  export interface AptlyAppJWT {
5
14
  exp: number;
6
15
  }
@@ -1,13 +1,13 @@
1
1
  export declare enum AptlyWebhookType {
2
- ProjectCreated = "as.aptly.project.created",
3
- ProjectUpdated = "as.aptly.project.updated",
4
- UnitCreated = "as.aptly.unit.created",
5
- UnitUpdated = "as.aptly.unit.updated",
6
- UnitMessageNew = "as.aptly.unit.message.new",
7
- UnitMessageReply = "as.aptly.unit.message.reply",
8
- UnitOrderSigned = "as.aptly.unit.order.signed",
9
- OrganizationAppUpdated = "as.aptly.organization.app.updated",
10
- OrganizationAppDeleted = "as.aptly.organization.app.deleted"
2
+ ProjectCreated = "aptly.project.created",
3
+ ProjectUpdated = "aptly.project.updated",
4
+ UnitCreated = "aptly.unit.created",
5
+ UnitUpdated = "aptly.unit.updated",
6
+ UnitMessageNew = "aptly.unit.message.new",
7
+ UnitMessageReply = "aptly.unit.message.reply",
8
+ UnitOrderSigned = "aptly.unit.order.signed",
9
+ OrganizationAppUpdated = "aptly.organization.app.updated",
10
+ OrganizationAppDeleted = "aptly.organization.app.deleted"
11
11
  }
12
12
  export declare enum AptlyWebhookStatus {
13
13
  Active = "active",
package/enums/webhook.js CHANGED
@@ -3,15 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AptlyWebhookEventStatus = exports.AptlyWebhookStatus = exports.AptlyWebhookType = void 0;
4
4
  var AptlyWebhookType;
5
5
  (function (AptlyWebhookType) {
6
- AptlyWebhookType["ProjectCreated"] = "as.aptly.project.created";
7
- AptlyWebhookType["ProjectUpdated"] = "as.aptly.project.updated";
8
- AptlyWebhookType["UnitCreated"] = "as.aptly.unit.created";
9
- AptlyWebhookType["UnitUpdated"] = "as.aptly.unit.updated";
10
- AptlyWebhookType["UnitMessageNew"] = "as.aptly.unit.message.new";
11
- AptlyWebhookType["UnitMessageReply"] = "as.aptly.unit.message.reply";
12
- AptlyWebhookType["UnitOrderSigned"] = "as.aptly.unit.order.signed";
13
- AptlyWebhookType["OrganizationAppUpdated"] = "as.aptly.organization.app.updated";
14
- AptlyWebhookType["OrganizationAppDeleted"] = "as.aptly.organization.app.deleted";
6
+ AptlyWebhookType["ProjectCreated"] = "aptly.project.created";
7
+ AptlyWebhookType["ProjectUpdated"] = "aptly.project.updated";
8
+ AptlyWebhookType["UnitCreated"] = "aptly.unit.created";
9
+ AptlyWebhookType["UnitUpdated"] = "aptly.unit.updated";
10
+ AptlyWebhookType["UnitMessageNew"] = "aptly.unit.message.new";
11
+ AptlyWebhookType["UnitMessageReply"] = "aptly.unit.message.reply";
12
+ AptlyWebhookType["UnitOrderSigned"] = "aptly.unit.order.signed";
13
+ AptlyWebhookType["OrganizationAppUpdated"] = "aptly.organization.app.updated";
14
+ AptlyWebhookType["OrganizationAppDeleted"] = "aptly.organization.app.deleted";
15
15
  })(AptlyWebhookType = exports.AptlyWebhookType || (exports.AptlyWebhookType = {}));
16
16
  var AptlyWebhookStatus;
17
17
  (function (AptlyWebhookStatus) {
@@ -1 +1 @@
1
- {"version":3,"file":"webhook.js","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":";;;AACA,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,+DAA2C,CAAA;IAC3C,+DAA2C,CAAA;IAC3C,yDAAqC,CAAA;IACrC,yDAAqC,CAAA;IACrC,gEAA4C,CAAA;IAC5C,oEAAgD,CAAA;IAChD,kEAA8C,CAAA;IAC9C,gFAA4D,CAAA;IAC5D,gFAA4D,CAAA;AAC9D,CAAC,EAVW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAU3B;AAED,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,uCAAiB,CAAA;IACjB,uCAAiB,CAAA;AACnB,CAAC,EAHW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAG7B;AAED,IAAY,uBAKX;AALD,WAAY,uBAAuB;IACjC,sCAAW,CAAA;IACX,kDAAuB,CAAA;IACvB,0CAAe,CAAA;IACf,4CAAiB,CAAA;AACnB,CAAC,EALW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAKlC"}
1
+ {"version":3,"file":"webhook.js","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":";;;AACA,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,4DAAwC,CAAA;IACxC,4DAAwC,CAAA;IACxC,sDAAkC,CAAA;IAClC,sDAAkC,CAAA;IAClC,6DAAyC,CAAA;IACzC,iEAA6C,CAAA;IAC7C,+DAA2C,CAAA;IAC3C,6EAAyD,CAAA;IACzD,6EAAyD,CAAA;AAC3D,CAAC,EAVW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAU3B;AAED,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,uCAAiB,CAAA;IACjB,uCAAiB,CAAA;AACnB,CAAC,EAHW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAG7B;AAED,IAAY,uBAKX;AALD,WAAY,uBAAuB;IACjC,sCAAW,CAAA;IACX,kDAAuB,CAAA;IACvB,0CAAe,CAAA;IACf,4CAAiB,CAAA;AACnB,CAAC,EALW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAKlC"}
package/enums/webhook.ts CHANGED
@@ -1,14 +1,14 @@
1
1
 
2
2
  export enum AptlyWebhookType {
3
- ProjectCreated = 'as.aptly.project.created',
4
- ProjectUpdated = 'as.aptly.project.updated',
5
- UnitCreated = 'as.aptly.unit.created',
6
- UnitUpdated = 'as.aptly.unit.updated',
7
- UnitMessageNew = 'as.aptly.unit.message.new',
8
- UnitMessageReply = 'as.aptly.unit.message.reply',
9
- UnitOrderSigned = 'as.aptly.unit.order.signed',
10
- OrganizationAppUpdated = 'as.aptly.organization.app.updated',
11
- OrganizationAppDeleted = 'as.aptly.organization.app.deleted',
3
+ ProjectCreated = 'aptly.project.created',
4
+ ProjectUpdated = 'aptly.project.updated',
5
+ UnitCreated = 'aptly.unit.created',
6
+ UnitUpdated = 'aptly.unit.updated',
7
+ UnitMessageNew = 'aptly.unit.message.new',
8
+ UnitMessageReply = 'aptly.unit.message.reply',
9
+ UnitOrderSigned = 'aptly.unit.order.signed',
10
+ OrganizationAppUpdated = 'aptly.organization.app.updated',
11
+ OrganizationAppDeleted = 'aptly.organization.app.deleted',
12
12
  }
13
13
 
14
14
  export enum AptlyWebhookStatus {
package/models/app.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AptlyBaseSchema } from './extends';
2
2
  import { AptlyWebhookType } from '../enums';
3
- import { AptlyField, AptlyPermissionModel } from '../core';
3
+ import { AptlyAppSandbox, AptlyField, AptlyPermissionModel } from '../core';
4
4
  import { AptlyMediaSrcSchema } from './media';
5
5
  export declare type AptlyApp = AptlyAppSchema<string, string>;
6
6
  export interface AptlyAppSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'archived'> {
@@ -14,7 +14,7 @@ export interface AptlyAppSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>
14
14
  settings: AptlyAppSettingSchema<ID>[];
15
15
  webhooks: AptlyAppWebhookSchema<ID>[];
16
16
  proxies: AptlyAppProxySchema<ID>[];
17
- injections: AptlyAppInjectionSchema<ID>[];
17
+ menus: AptlyAppMenuSchema<ID, DATE>[];
18
18
  }
19
19
  export declare type AptlyAppSetting = AptlyAppSettingSchema<string>;
20
20
  export interface AptlyAppSettingSchema<ID> extends AptlyField {
@@ -46,18 +46,18 @@ export declare enum AptlyProjectInjection {
46
46
  }
47
47
  export declare type AptlyAppInjectionMenu = `organization-${AptlyOrganizationInjection}` | `project-${AptlyProjectInjection}`;
48
48
  export declare enum AptlyAppInjectionType {
49
- Iframe = "iframe",
50
- Script = "script"
49
+ Iframe = "iframe"
51
50
  }
52
- export declare type AptlyAppInjection = AptlyAppInjectionSchema<string>;
53
- export interface AptlyAppInjectionSchema<ID> {
51
+ export declare type AptlyAppMenu = AptlyAppMenuSchema<string, string>;
52
+ export interface AptlyAppMenuSchema<ID, DATE> {
54
53
  _id: ID;
55
54
  type: AptlyAppInjectionType;
56
- menu: AptlyAppInjectionMenu;
55
+ menu: AptlyAppInjectionMenu[];
57
56
  model: AptlyPermissionModel;
58
57
  label: string;
59
- icon?: string;
58
+ icon?: AptlyMediaSrcSchema<ID, DATE>;
60
59
  src: string;
60
+ sandbox: AptlyAppSandbox[];
61
61
  }
62
62
  export interface AptlyAppProxySchema<ID> {
63
63
  _id: ID;
package/models/app.js CHANGED
@@ -23,6 +23,5 @@ var AptlyProjectInjection;
23
23
  var AptlyAppInjectionType;
24
24
  (function (AptlyAppInjectionType) {
25
25
  AptlyAppInjectionType["Iframe"] = "iframe";
26
- AptlyAppInjectionType["Script"] = "script";
27
26
  })(AptlyAppInjectionType = exports.AptlyAppInjectionType || (exports.AptlyAppInjectionType = {}));
28
27
  //# sourceMappingURL=app.js.map
package/models/app.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"app.js","sourceRoot":"","sources":["app.ts"],"names":[],"mappings":";;;AAiCA,IAAY,0BAOX;AAPD,WAAY,0BAA0B;IACpC,uCAAS,CAAA;IACT,iDAAmB,CAAA;IACnB,iDAAmB,CAAA;IACnB,mDAAqB,CAAA;IACrB,iDAAmB,CAAA;IACnB,6CAAe,CAAA;AACjB,CAAC,EAPW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAOrC;AAED,IAAY,qBAQX;AARD,WAAY,qBAAqB;IAC/B,kCAAS,CAAA;IACT,4CAAmB,CAAA;IACnB,8CAAqB,CAAA;IACrB,4CAAmB,CAAA;IACnB,4CAAmB,CAAA;IACnB,4CAAmB,CAAA;IACnB,wCAAe,CAAA;AACjB,CAAC,EARW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAQhC;AAID,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;IACjB,0CAAiB,CAAA;AACnB,CAAC,EAHW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAGhC"}
1
+ {"version":3,"file":"app.js","sourceRoot":"","sources":["app.ts"],"names":[],"mappings":";;;AAiCA,IAAY,0BAOX;AAPD,WAAY,0BAA0B;IACpC,uCAAS,CAAA;IACT,iDAAmB,CAAA;IACnB,iDAAmB,CAAA;IACnB,mDAAqB,CAAA;IACrB,iDAAmB,CAAA;IACnB,6CAAe,CAAA;AACjB,CAAC,EAPW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAOrC;AAED,IAAY,qBAQX;AARD,WAAY,qBAAqB;IAC/B,kCAAS,CAAA;IACT,4CAAmB,CAAA;IACnB,8CAAqB,CAAA;IACrB,4CAAmB,CAAA;IACnB,4CAAmB,CAAA;IACnB,4CAAmB,CAAA;IACnB,wCAAe,CAAA;AACjB,CAAC,EARW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAQhC;AAID,IAAY,qBAEX;AAFD,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;AACnB,CAAC,EAFW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAEhC"}
package/models/app.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AptlyBaseSchema } from './extends';
2
2
  import { AptlyWebhookType } from '../enums';
3
- import { AptlyField, AptlyPermissionModel } from '../core';
3
+ import { AptlyAppSandbox, AptlyField, AptlyPermissionModel } from '../core';
4
4
  import { AptlyMediaSrcSchema } from './media';
5
5
 
6
6
  export type AptlyApp = AptlyAppSchema<string, string>;
@@ -15,7 +15,7 @@ export interface AptlyAppSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>
15
15
  settings: AptlyAppSettingSchema<ID>[];
16
16
  webhooks: AptlyAppWebhookSchema<ID>[];
17
17
  proxies: AptlyAppProxySchema<ID>[];
18
- injections: AptlyAppInjectionSchema<ID>[]
18
+ menus: AptlyAppMenuSchema<ID, DATE>[]
19
19
  }
20
20
 
21
21
  export type AptlyAppSetting = AptlyAppSettingSchema<string>;
@@ -54,18 +54,18 @@ export type AptlyAppInjectionMenu = `organization-${AptlyOrganizationInjection}`
54
54
 
55
55
  export enum AptlyAppInjectionType {
56
56
  Iframe = 'iframe',
57
- Script = 'script',
58
57
  }
59
58
 
60
- export type AptlyAppInjection = AptlyAppInjectionSchema<string>;
61
- export interface AptlyAppInjectionSchema<ID> {
59
+ export type AptlyAppMenu = AptlyAppMenuSchema<string, string>;
60
+ export interface AptlyAppMenuSchema<ID, DATE> {
62
61
  _id: ID;
63
62
  type: AptlyAppInjectionType;
64
- menu: AptlyAppInjectionMenu;
63
+ menu: AptlyAppInjectionMenu[];
65
64
  model: AptlyPermissionModel;
66
65
  label: string;
67
- icon?: string;
66
+ icon?: AptlyMediaSrcSchema<ID, DATE>;
68
67
  src: string;
68
+ sandbox: AptlyAppSandbox[];
69
69
  }
70
70
 
71
71
  export interface AptlyAppProxySchema<ID> {
@@ -69,3 +69,8 @@ export interface AptlyProductVariantSchema<ID, DATE> {
69
69
  height?: string;
70
70
  length?: string;
71
71
  }
72
+ export declare type AptlyProductImport = AptlyProductImportSchema<string, string>;
73
+ export interface AptlyProductImportSchema<ID, DATE> extends Partial<Omit<AptlyProductSchema<ID, DATE>, 'images' | 'documents'>> {
74
+ images: string[];
75
+ documents: string[];
76
+ }
package/models/product.ts CHANGED
@@ -75,3 +75,8 @@ export interface AptlyProductVariantSchema<ID, DATE> {
75
75
  length?: string;
76
76
  }
77
77
 
78
+ export type AptlyProductImport = AptlyProductImportSchema<string, string>;
79
+ export interface AptlyProductImportSchema<ID, DATE> extends Partial<Omit<AptlyProductSchema<ID, DATE>, 'images' | 'documents'>> {
80
+ images: string[];
81
+ documents: string[];
82
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aptly-as/types",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "Aptly types and enums",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",