@livepreso/api 6.47.0 → 6.48.0

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.
Files changed (58) hide show
  1. package/.rush/temp/shrinkwrap-deps.json +1 -1
  2. package/CHANGELOG.json +12 -0
  3. package/CHANGELOG.md +8 -1
  4. package/cjs/collections/dispatches.js +1 -0
  5. package/cjs/collections/dispatches.js.map +1 -1
  6. package/cjs/collections/signing-backends.js +28 -0
  7. package/cjs/collections/signing-backends.js.map +1 -0
  8. package/cjs/collections.js +13 -0
  9. package/cjs/collections.js.map +1 -1
  10. package/cjs/models/activity-item.js +1 -2
  11. package/cjs/models/activity-item.js.map +1 -1
  12. package/cjs/models/base.js +55 -6
  13. package/cjs/models/base.js.map +1 -1
  14. package/cjs/models/deck-tags.js +3 -0
  15. package/cjs/models/deck-tags.js.map +1 -1
  16. package/cjs/models/deck-version.js +0 -13
  17. package/cjs/models/deck-version.js.map +1 -1
  18. package/cjs/models/dispatch.js +14 -1
  19. package/cjs/models/dispatch.js.map +1 -1
  20. package/cjs/models/hosted-preso.js +5 -1
  21. package/cjs/models/hosted-preso.js.map +1 -1
  22. package/cjs/models/refresh-request.js +0 -24
  23. package/cjs/models/refresh-request.js.map +1 -1
  24. package/cjs/models/signing-backend.js +39 -0
  25. package/cjs/models/signing-backend.js.map +1 -0
  26. package/cjs/models/signing-request.js +4 -4
  27. package/cjs/models/signing-request.js.map +1 -1
  28. package/cjs/models/snapshot.js +0 -24
  29. package/cjs/models/snapshot.js.map +1 -1
  30. package/cjs/models/user.js +11 -9
  31. package/cjs/models/user.js.map +1 -1
  32. package/cjs/models.js +13 -0
  33. package/cjs/models.js.map +1 -1
  34. package/cjs/presentation/presentation-section.spec.js +12 -12
  35. package/cjs/presentation/presentation-section.spec.js.map +1 -1
  36. package/cjs/presentation/presentation-slide.spec.js +11 -11
  37. package/cjs/presentation/presentation-slide.spec.js.map +1 -1
  38. package/cjs/presentation/presentation-subslide.spec.js +11 -11
  39. package/cjs/presentation/presentation-subslide.spec.js.map +1 -1
  40. package/package.json +1 -1
  41. package/src/collections/dispatches.js +1 -0
  42. package/src/collections/signing-backends.js +18 -0
  43. package/src/collections.js +1 -0
  44. package/src/models/activity-item.js +1 -2
  45. package/src/models/base.js +19 -0
  46. package/src/models/deck-tags.js +4 -0
  47. package/src/models/deck-version.js +0 -9
  48. package/src/models/dispatch.js +14 -1
  49. package/src/models/hosted-preso.js +4 -0
  50. package/src/models/refresh-request.js +0 -15
  51. package/src/models/signing-backend.js +29 -0
  52. package/src/models/signing-request.js +3 -4
  53. package/src/models/snapshot.js +0 -15
  54. package/src/models/user.js +9 -10
  55. package/src/models.js +1 -0
  56. package/src/presentation/presentation-section.spec.js +12 -13
  57. package/src/presentation/presentation-slide.spec.js +11 -12
  58. package/src/presentation/presentation-subslide.spec.js +11 -11
@@ -0,0 +1,18 @@
1
+ import "../models/signing-backend.js";
2
+
3
+ import { BaseCollection } from "./base.js";
4
+ import { register } from "../state-register.js";
5
+
6
+ /**
7
+ * @constructor
8
+ * @alias collections.SigningBackendCollection
9
+ * @extends collections.BaseCollection
10
+ * @see models.SigningBackend
11
+ */
12
+ export const SigningBackendCollection = BaseCollection.extend(
13
+ /** @lends collections.SigningBackendCollection# */ {
14
+ model: "SigningBackendModel",
15
+ },
16
+ );
17
+
18
+ register("SigningBackendCollection", SigningBackendCollection);
@@ -28,6 +28,7 @@ export * from "./collections/packs";
28
28
  export * from "./collections/presets";
29
29
  export * from "./collections/section-selections";
30
30
  export * from "./collections/sections";
31
+ export * from "./collections/signing-backends";
31
32
  export * from "./collections/signing-requests";
32
33
  export * from "./collections/signers";
33
34
  export * from "./collections/slide-selections";
@@ -44,9 +44,8 @@ export const ActivityItemModel = BaseModel.extend(
44
44
  status: "string",
45
45
  concluded_date: "date",
46
46
  signed_document: "string",
47
- original_document: "string",
48
47
  cancellation_reason: "string",
49
- requested_by_contact: "boolean",
48
+ created_by_contact: "boolean",
50
49
  },
51
50
 
52
51
  children: {
@@ -3,6 +3,7 @@ import { DATE_FORMAT_T, removeMultiByteChars } from "../utils.js";
3
3
  import { Api } from "../api.js";
4
4
  import Collection from "ampersand-rest-collection";
5
5
  import Model from "ampersand-model";
6
+ import Promise from "bluebird";
6
7
  import SuperAgentRequest from "superagent-bluebird-promise";
7
8
  import _ from "lodash";
8
9
  import dedent from "dedent-js";
@@ -666,6 +667,24 @@ export const BaseModel = Model.extend(
666
667
  return Api.getResourceURL(this.modelName);
667
668
  },
668
669
 
670
+ async waitForReady(opts = {}, attempts = 20) {
671
+ if (attempts === 0) {
672
+ return Promise.reject();
673
+ }
674
+ return this.fetch(opts).then(() => {
675
+ if (!this.creation_status) {
676
+ return Promise.reject(new Error("No creation_status key found"));
677
+ }
678
+
679
+ if (["ready", "failed"].indexOf(this.creation_status) > -1) {
680
+ return Promise.resolve();
681
+ }
682
+ return Promise.delay(1000).then(() =>
683
+ this.waitForReady(opts, attempts - 1),
684
+ );
685
+ });
686
+ },
687
+
669
688
  sync() {
670
689
  return sync.apply(this, arguments);
671
690
  },
@@ -47,6 +47,10 @@ export const DeckTagsModel = BaseModel.extend(
47
47
  },
48
48
  );
49
49
 
50
+ DeckTagsModel.tags = {
51
+ SIGNING: "has-signing",
52
+ };
53
+
50
54
  DeckTagsModel.canBeEmpty = true;
51
55
 
52
56
  register("DeckTagsModel", DeckTagsModel);
@@ -204,15 +204,6 @@ export const DeckVersionModel = BaseModel.extend(
204
204
  });
205
205
  },
206
206
 
207
- waitForReady() {
208
- return this.fetch().then(() => {
209
- if (["created", "failed"].indexOf(this.creation_status) > -1) {
210
- return Promise.resolve();
211
- }
212
- return Promise.delay(1000).then(() => this.waitForReady());
213
- });
214
- },
215
-
216
207
  getRootAssetUrl() {
217
208
  const indexAsset = this._retrieveURL(this.index_asset);
218
209
  return (
@@ -5,6 +5,7 @@ import "../collections/contacts.js";
5
5
  import "../collections/uploads.js";
6
6
 
7
7
  import { BaseModel } from "./base.js";
8
+ import { HostedPresoModel } from "./hosted-preso.js";
8
9
  import _ from "lodash";
9
10
  import { register } from "../state-register.js";
10
11
 
@@ -24,7 +25,6 @@ export const DispatchModel = BaseModel.extend(
24
25
  /**
25
26
  * @property {string} additional_recipients
26
27
  * @property {number} content_id
27
- * @property {string} content_ct
28
28
  * @property {date} created_date
29
29
  * @property {date} content_expires_at
30
30
  * @property {string} creation_state
@@ -83,6 +83,19 @@ export const DispatchModel = BaseModel.extend(
83
83
  attachment_set: "UploadCollection",
84
84
  },
85
85
 
86
+ derived: {
87
+ contentModel: {
88
+ deps: ["generate_content", "content"],
89
+ fn: function () {
90
+ if (this.generate_content === "preso_view") {
91
+ return new HostedPresoModel(this.content);
92
+ }
93
+
94
+ return null;
95
+ },
96
+ },
97
+ },
98
+
86
99
  toServer() {
87
100
  const data = this.serialize();
88
101
  if (this.contact_set) {
@@ -20,12 +20,16 @@ export const HostedPresoModel = BaseModel.extend(
20
20
  * @property {date} modified_date
21
21
  * @property {string} shortcode
22
22
  * @property {date} do_sync
23
+ * @property {string} bundle_mode
24
+ * @property {string} point_in_time_policy
23
25
  */
24
26
  props: {
25
27
  created_date: "date",
26
28
  modified_date: "date",
27
29
  shortcode: "string",
28
30
  do_sync: "boolean",
31
+ bundle_mode: "string",
32
+ point_in_time_policy: "string",
29
33
  },
30
34
 
31
35
  /**
@@ -2,7 +2,6 @@ import "./customer.js";
2
2
  import "./user.js";
3
3
 
4
4
  import { BaseModel } from "./base.js";
5
- import Promise from "bluebird";
6
5
  import { register } from "../state-register.js";
7
6
 
8
7
  /**
@@ -26,20 +25,6 @@ export const RefreshRequestModel = BaseModel.extend(
26
25
  user: "UserModel",
27
26
  },
28
27
 
29
- waitForReady(opts = {}, attempts = 20) {
30
- if (attempts === 0) {
31
- return Promise.reject();
32
- }
33
- return this.fetch(opts).then(() => {
34
- if (["ready", "failed"].indexOf(this.creation_status) > -1) {
35
- return Promise.resolve();
36
- }
37
- return Promise.delay(1000).then(() =>
38
- this.waitForReady(opts, attempts - 1),
39
- );
40
- });
41
- },
42
-
43
28
  toServer() {
44
29
  if (this.isNew()) {
45
30
  return {
@@ -0,0 +1,29 @@
1
+ import { BaseModel } from "./base.js";
2
+ import { register } from "../state-register.js";
3
+
4
+ /**
5
+ * @constructor
6
+ * @alias models.SigningBackendModel
7
+ * @extends models.BaseModel
8
+ */
9
+ export const SigningBackendModel = BaseModel.extend(
10
+ /** @lends models.SigningBackendModel# */ {
11
+ modelName: "signing-backend-list",
12
+ detailType: "string",
13
+
14
+ /**
15
+ * @property {string} key
16
+ * @property {string} title
17
+ * @property {array} errors
18
+ * @property {string} setup_url
19
+ */
20
+ props: {
21
+ key: "string",
22
+ title: "string",
23
+ errors: "array",
24
+ setup_url: "string",
25
+ },
26
+ },
27
+ );
28
+
29
+ register("SigningBackendModel", SigningBackendModel);
@@ -1,10 +1,9 @@
1
1
  import "./customer.js";
2
+ import "../collections/signers.js";
2
3
 
3
4
  import { BaseModel } from "./base.js";
4
5
  import { register } from "../state-register.js";
5
6
 
6
- import "../collections/signers.js";
7
-
8
7
  /**
9
8
  * @constructor
10
9
  * @alias models.SigningRequestModel
@@ -44,11 +43,11 @@ export const SigningRequestModel = BaseModel.extend(
44
43
 
45
44
  /**
46
45
  * @property {models.SnapshotModel} snapshot
47
- * @property {models.UserModel} requested_by
46
+ * @property {models.UserModel} created_by
48
47
  */
49
48
  children: {
50
49
  snapshot: "SnapshotModel",
51
- requested_by: "UserModel",
50
+ created_by: "UserModel",
52
51
  },
53
52
  },
54
53
  );
@@ -1,7 +1,6 @@
1
1
  import "./appointment.js";
2
2
 
3
3
  import { BaseModel } from "./base.js";
4
- import Promise from "bluebird";
5
4
  import { register } from "../state-register.js";
6
5
  import { sanitizeBase64 } from "../utils.js";
7
6
 
@@ -35,20 +34,6 @@ export const SnapshotModel = BaseModel.extend(
35
34
  appointment: "AppointmentModel",
36
35
  },
37
36
 
38
- waitForReady(opts = {}, attempts = 20) {
39
- if (attempts === 0) {
40
- return Promise.reject();
41
- }
42
- return this.fetch(opts).then(() => {
43
- if (["ready", "failed"].indexOf(this.creation_status) > -1) {
44
- return Promise.resolve();
45
- }
46
- return Promise.delay(1000).then(() =>
47
- this.waitForReady(opts, attempts - 1),
48
- );
49
- });
50
- },
51
-
52
37
  toServer() {
53
38
  const data = {
54
39
  context: JSON.stringify(
@@ -3,7 +3,9 @@ import "../collections/groups.js";
3
3
  import "../collections/teams.js";
4
4
 
5
5
  import { Api } from "../api.js";
6
+ import { Auth } from "../auth.js";
6
7
  import { BaseModel } from "./base.js";
8
+ import SuperAgentRequest from "superagent-bluebird-promise";
7
9
  import { register } from "../state-register.js";
8
10
 
9
11
  /**
@@ -187,17 +189,14 @@ export const UserModel = BaseModel.extend(
187
189
  },
188
190
  },
189
191
 
190
- fetchHQLogin() {
191
- const resourceURL = Api.getResourceURL("hq-authorized-link");
192
- const preventCachingID = Number(Date.now());
192
+ fetchJwtLogin(redirectURL = null) {
193
+ const authURL = Api.getResourceURL("hq-authorized-link");
193
194
 
194
- // This will return a cached response if we don't have a random ID
195
- // attached.
196
- return this.fetch({ url: `${resourceURL}?_=${preventCachingID}` }).then(
197
- ({ url }) => {
198
- return url;
199
- },
200
- );
195
+ return SuperAgentRequest("GET", authURL)
196
+ .set(Auth.headers)
197
+ .then((resp) => {
198
+ return resp.body.url + (redirectURL ? `&next=${redirectURL}` : "");
199
+ });
201
200
  },
202
201
 
203
202
  fetch() {
package/src/models.js CHANGED
@@ -44,6 +44,7 @@ export * from "./models/room";
44
44
  export * from "./models/salesforce-lookup.js";
45
45
  export * from "./models/section";
46
46
  export * from "./models/section-selection";
47
+ export * from "./models/signing-backend";
47
48
  export * from "./models/signing-request";
48
49
  export * from "./models/signer";
49
50
  export * from "./models/slide";
@@ -9,7 +9,7 @@ describe("#createFromSection", () => {
9
9
  return {
10
10
  adjunctslide_limit: 0,
11
11
  created_date: "2021-07-19T01:17:59.522119Z",
12
- deckversion: "https://staging-test.salespreso.com/api/deckversions/408/",
12
+ deckversion: "/api/deckversions/408/",
13
13
  description: "",
14
14
  enabled: true,
15
15
  id: 1728,
@@ -28,7 +28,7 @@ describe("#createFromSection", () => {
28
28
  id: 148115,
29
29
  modified_date: "2021-07-19T01:17:58.068507Z",
30
30
  orig_path: "sections/agenda",
31
- pack: "https://staging-test.salespreso.com/api/packs/409/",
31
+ pack: "/api/packs/409/",
32
32
  url: "https://staging-test-cdn.salespreso.com/media/pack/409/assets/sections/agenda/index.html",
33
33
  },
34
34
  key: "agenda",
@@ -38,7 +38,7 @@ describe("#createFromSection", () => {
38
38
  slide_set: [],
39
39
  tags: [],
40
40
  title: "Agenda",
41
- url: "https://staging-test.salespreso.com/api/sections/1728/",
41
+ url: "/api/sections/1728/",
42
42
  };
43
43
  };
44
44
 
@@ -128,19 +128,18 @@ describe("#createFromAdjunctSection", () => {
128
128
  id: 148204,
129
129
  modified_date: "2021-07-22T04:57:32.977790Z",
130
130
  orig_path: "templates/test-template/foo",
131
- pack: "https://staging-test.salespreso.com/api/packs/410/",
131
+ pack: "/api/packs/410/",
132
132
  url: "https://staging-test-cdn.salespreso.com/media/pack/410/assets/sections/test-deck/slides/slide-key/index.html",
133
133
  },
134
134
  };
135
135
 
136
136
  return {
137
137
  adjunct: "/api/adjuncts/7470/",
138
- appointment: "https://staging-test.salespreso.com/api/appointments/2422/",
138
+ appointment: "/api/appointments/2422/",
139
139
  created_by_autoadjunct: true,
140
140
  created_date: "2021-09-20T01:57:55.125224Z",
141
- creator_autoadjunct:
142
- "https://staging-test.salespreso.com/api/autoadjuncts/545/",
143
- deckversion: "https://staging-test.salespreso.com/api/deckversions/408/",
141
+ creator_autoadjunct: "/api/autoadjuncts/545/",
142
+ deckversion: "/api/deckversions/408/",
144
143
  deleted: false,
145
144
  enabled: true,
146
145
  html_content:
@@ -161,7 +160,7 @@ describe("#createFromAdjunctSection", () => {
161
160
  tags: [],
162
161
  template: includeTemplate ? template : null,
163
162
  title: "Five",
164
- url: "https://staging-test.salespreso.com/api/adjunctsections/1737/",
163
+ url: "/api/adjunctsections/1737/",
165
164
  };
166
165
  };
167
166
 
@@ -277,7 +276,7 @@ describe("#createFromImpostorSection", () => {
277
276
  id: 153400,
278
277
  modified_date: "2021-09-20T02:59:02.361528Z",
279
278
  orig_path: "sections/test-deck/slides/agenda",
280
- pack: "https://staging-test.salespreso.com/api/packs/427/",
279
+ pack: "/api/packs/427/",
281
280
  url: "https://staging-test-cdn.salespreso.com/media/pack/427/assets/sections/test-deck/slides/agenda/index.html",
282
281
  },
283
282
  key: "agenda",
@@ -293,7 +292,7 @@ describe("#createFromImpostorSection", () => {
293
292
  subslide_set: [],
294
293
  tags: ["section-header"],
295
294
  title: "Agenda",
296
- url: "https://staging-test.salespreso.com/api/slides/23898/",
295
+ url: "/api/slides/23898/",
297
296
  };
298
297
  };
299
298
 
@@ -381,7 +380,7 @@ describe("#createFromAutoAdjunct", () => {
381
380
  return {
382
381
  after_key: "autoadjunct-i-am-template-section",
383
382
  created_date: "2021-09-16T04:25:54.459641Z",
384
- deck: "https://staging-test.salespreso.com/api/decks/6/",
383
+ deck: "/api/decks/6/",
385
384
  enabled: true,
386
385
  id: 545,
387
386
  image_128:
@@ -402,7 +401,7 @@ describe("#createFromAutoAdjunct", () => {
402
401
  tags: [],
403
402
  team: null,
404
403
  template: null,
405
- url: "https://staging-test.salespreso.com/api/autoadjuncts/545/",
404
+ url: "/api/autoadjuncts/545/",
406
405
  };
407
406
  };
408
407
 
@@ -19,18 +19,18 @@ describe("#createFromSlide", () => {
19
19
  id: 148204,
20
20
  modified_date: "2021-07-22T04:57:32.977790Z",
21
21
  orig_path: "sections/test-deck/slides/slide-key",
22
- pack: "https://staging-test.salespreso.com/api/packs/410/",
22
+ pack: "/api/packs/410/",
23
23
  url: "https://staging-test-cdn.salespreso.com/media/pack/410/assets/sections/test-deck/slides/slide-key/index.html",
24
24
  },
25
25
  key: "slide-key",
26
26
  modified_date: "2021-07-22T05:03:07.778106Z",
27
27
  namespaced_key: "test-deck/slide-key",
28
- section: "https://staging-test.salespreso.com/api/sections/1738/",
28
+ section: "/api/sections/1738/",
29
29
  sequence: 13,
30
30
  subslide_set: [],
31
31
  tags: [],
32
32
  title: "Digital Transformation",
33
- url: "https://staging-test.salespreso.com/api/slides/23219/",
33
+ url: "/api/slides/23219/",
34
34
  };
35
35
  };
36
36
 
@@ -111,18 +111,17 @@ describe("#createFromAdjunctSlide", () => {
111
111
  id: 148204,
112
112
  modified_date: "2021-07-22T04:57:32.977790Z",
113
113
  orig_path: "templates/test-template/foo",
114
- pack: "https://staging-test.salespreso.com/api/packs/410/",
114
+ pack: "/api/packs/410/",
115
115
  url: "https://staging-test-cdn.salespreso.com/media/pack/410/assets/sections/test-deck/slides/slide-key/index.html",
116
116
  },
117
117
  };
118
118
 
119
119
  return {
120
- adjunct: "https://staging-test.salespreso.com/api/adjuncts/7457/",
121
- appointment: "https://staging-test.salespreso.com/api/appointments/2426/",
120
+ adjunct: "/api/adjuncts/7457/",
121
+ appointment: "/api/appointments/2426/",
122
122
  created_by_autoadjunct: true,
123
123
  created_date: "2021-09-20T05:34:45.267698Z",
124
- creator_autoadjunct:
125
- "https://staging-test.salespreso.com/api/autoadjuncts/541/",
124
+ creator_autoadjunct: "/api/autoadjuncts/541/",
126
125
  deleted: false,
127
126
  enabled: true,
128
127
  html_content:
@@ -139,12 +138,12 @@ describe("#createFromAdjunctSlide", () => {
139
138
  image_original:
140
139
  "https://staging-test-cdn.salespreso.com/media/autoadjunct/123.png",
141
140
  modified_date: "2021-09-20T05:34:45.267703Z",
142
- section: "https://staging-test.salespreso.com/api/sections/1755/",
141
+ section: "/api/sections/1755/",
143
142
  sequence: 3,
144
143
  tags: [],
145
144
  template: includeTemplate ? template : null,
146
145
  title: "Six",
147
- url: "https://staging-test.salespreso.com/api/adjunctslides/10529/",
146
+ url: "/api/adjunctslides/10529/",
148
147
  };
149
148
  };
150
149
 
@@ -232,7 +231,7 @@ describe("#createFromAutoAdjunct", () => {
232
231
  return {
233
232
  after_key: "test-deck/industry_insights",
234
233
  created_date: "2021-08-02T00:28:41.992805Z",
235
- deck: "https://staging-test.salespreso.com/api/decks/4/",
234
+ deck: "/api/decks/4/",
236
235
  enabled: true,
237
236
  id: 525,
238
237
  image_128:
@@ -253,7 +252,7 @@ describe("#createFromAutoAdjunct", () => {
253
252
  tags: [],
254
253
  team: null,
255
254
  template: null,
256
- url: "https://staging-test.salespreso.com/api/autoadjuncts/525/",
255
+ url: "/api/autoadjuncts/525/",
257
256
  };
258
257
  };
259
258
 
@@ -18,17 +18,17 @@ describe("#createFromSubSlide", () => {
18
18
  id: 7836,
19
19
  modified_date: "2020-07-20T03:25:15.530717Z",
20
20
  orig_path: "sections/test-deck/slides/why_myob_vision",
21
- pack: "http://bleh/api/packs/17/",
22
- url: "http://bleh/media/pack/17/assets/sections/test-deck/slides/why_myob_vision/index.html",
21
+ pack: "/api/packs/17/",
22
+ url: "/media/pack/17/assets/sections/test-deck/slides/why_myob_vision/index.html",
23
23
  },
24
24
  key: "subslide-1",
25
25
  modified_date: "2020-07-20T03:25:49.393305Z",
26
26
  namespaced_key: "test-deck/why_myob_vision/subslide-1",
27
27
  sequence: 0,
28
- slide: "http://bleh/api/slides/1273/",
28
+ slide: "/api/slides/1273/",
29
29
  tags: [],
30
30
  title: "",
31
- url: "http://bleh/api/subslides/458/",
31
+ url: "/api/subslides/458/",
32
32
  };
33
33
 
34
34
  it("should create a presentation subslide", async () => {
@@ -69,8 +69,8 @@ describe("#createFromSubSlide", () => {
69
69
 
70
70
  describe("#createFromAdjunctSubSlide", () => {
71
71
  const adjunctSubSlideJSON = {
72
- adjunct: "http://bleh/api/adjuncts/531/",
73
- appointment: "http://bleh/api/appointments/72/",
72
+ adjunct: "/api/adjuncts/531/",
73
+ appointment: "/api/appointments/72/",
74
74
  created_by_autoadjunct: false,
75
75
  created_date: "2021-02-05T05:33:11.820566Z",
76
76
  creator_autoadjunct: null,
@@ -86,11 +86,11 @@ describe("#createFromAdjunctSubSlide", () => {
86
86
  image_original: null,
87
87
  modified_date: "2021-02-05T05:33:11.820593Z",
88
88
  sequence: 2,
89
- slide: "http://bleh/api/slides/1319/",
89
+ slide: "/api/slides/1319/",
90
90
  tags: [],
91
91
  template: null,
92
92
  title: "addition-1",
93
- url: "http://bleh/api/adjunctsubslides/562/",
93
+ url: "/api/adjunctsubslides/562/",
94
94
  };
95
95
 
96
96
  it("should create a presentation subslide", async () => {
@@ -106,7 +106,7 @@ describe("#createFromAdjunctSubSlide", () => {
106
106
  // aren't included in the output of presentationSub.toJSON()
107
107
  const expected = {
108
108
  id: 23,
109
- adjunct: "http://bleh/api/adjuncts/531/",
109
+ adjunct: "/api/adjuncts/531/",
110
110
  adjunctID: 562,
111
111
  html_content:
112
112
  "<section class='content subslide bg-white'>hi i'm the first subslide</section>",
@@ -156,12 +156,12 @@ describe("#createFromSlide", () => {
156
156
  key: "why_myob_vision",
157
157
  modified_date: "2020-07-20T03:25:47.983098Z",
158
158
  namespaced_key: "test-deck/why_myob_vision",
159
- section: "http://bleh/api/sections/13/",
159
+ section: "/api/sections/13/",
160
160
  sequence: 12,
161
161
  subslide_set: [],
162
162
  tags: [],
163
163
  title: "Why MYOB",
164
- url: "http://bleh/api/slides/1273/",
164
+ url: "/api/slides/1273/",
165
165
  };
166
166
 
167
167
  it("should create a presentation subslide", async () => {