@drawbridge/drawbridge-utils 0.0.25 → 0.0.26

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/cdn.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Build a DigitalOcean Spaces CDN URL with a cache-busting query string.
2
2
  // `asset` is any object with a `sizes` map. `size` is the sizes key (e.g.
3
- // '100x100', 'original', 'hsl'). `timestamp` is required — without it the
3
+ // '100x100', 'original', 'hls'). `timestamp` is required — without it the
4
4
  // URL would never change across uploads and the CDN/browser would serve a
5
5
  // stale asset. Pass the asset's own `updatedAt` when it has one, or the
6
6
  // parent document's `updatedAt` for embedded assets like `user.image`.
package/dist/cdn.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Build a DigitalOcean Spaces CDN URL with a cache-busting query string.
2
2
  // `asset` is any object with a `sizes` map. `size` is the sizes key (e.g.
3
- // '100x100', 'original', 'hsl'). `timestamp` is required — without it the
3
+ // '100x100', 'original', 'hls'). `timestamp` is required — without it the
4
4
  // URL would never change across uploads and the CDN/browser would serve a
5
5
  // stale asset. Pass the asset's own `updatedAt` when it has one, or the
6
6
  // parent document's `updatedAt` for embedded assets like `user.image`.
package/dist/index.cjs CHANGED
@@ -52,11 +52,6 @@ var font = {
52
52
  weight: "regular"
53
53
  };
54
54
  var constants_default = {
55
- action: {
56
- usage: {
57
- actions: 0
58
- }
59
- },
60
55
  brand: {
61
56
  style: {
62
57
  body: font,
@@ -179,6 +174,11 @@ var constants_default = {
179
174
  users: 0
180
175
  }
181
176
  },
177
+ step: {
178
+ usage: {
179
+ actions: 0
180
+ }
181
+ },
182
182
  template: {
183
183
  page: {
184
184
  style: {
package/dist/index.d.cts CHANGED
@@ -8,11 +8,6 @@ const font = {
8
8
  };
9
9
 
10
10
  var constantsData = {
11
- action : {
12
- usage : {
13
- actions : 0
14
- }
15
- },
16
11
  brand : {
17
12
  style : {
18
13
  body : font,
@@ -135,6 +130,11 @@ var constantsData = {
135
130
  users : 0
136
131
  }
137
132
  },
133
+ step : {
134
+ usage : {
135
+ actions : 0
136
+ }
137
+ },
138
138
  template : {
139
139
  page : {
140
140
  style : {
package/dist/index.d.ts CHANGED
@@ -8,11 +8,6 @@ const font = {
8
8
  };
9
9
 
10
10
  var constantsData = {
11
- action : {
12
- usage : {
13
- actions : 0
14
- }
15
- },
16
11
  brand : {
17
12
  style : {
18
13
  body : font,
@@ -135,6 +130,11 @@ var constantsData = {
135
130
  users : 0
136
131
  }
137
132
  },
133
+ step : {
134
+ usage : {
135
+ actions : 0
136
+ }
137
+ },
138
138
  template : {
139
139
  page : {
140
140
  style : {
package/dist/index.js CHANGED
@@ -9,11 +9,6 @@ var font = {
9
9
  weight: "regular"
10
10
  };
11
11
  var constants_default = {
12
- action: {
13
- usage: {
14
- actions: 0
15
- }
16
- },
17
12
  brand: {
18
13
  style: {
19
14
  body: font,
@@ -136,6 +131,11 @@ var constants_default = {
136
131
  users: 0
137
132
  }
138
133
  },
134
+ step: {
135
+ usage: {
136
+ actions: 0
137
+ }
138
+ },
139
139
  template: {
140
140
  page: {
141
141
  style: {
package/dist/shopify.cjs CHANGED
@@ -175,6 +175,7 @@ var resolveConnectionSettings = async ({ connection, controller }) => {
175
175
  };
176
176
  };
177
177
  var refreshAdminToken = async ({ connection, controller }) => {
178
+ var _a;
178
179
  const credential = await controller.get({
179
180
  collection: "credential",
180
181
  query: {
@@ -186,7 +187,7 @@ var refreshAdminToken = async ({ connection, controller }) => {
186
187
  }
187
188
  ;
188
189
  const settings = decrypt(credential.settings);
189
- const { identifier: domain } = credential;
190
+ const domain = (_a = credential.provider) == null ? void 0 : _a.id;
190
191
  const { refreshToken } = settings;
191
192
  const data = await shopifyOAuthFetch(
192
193
  `https://${domain}/admin/oauth/access_token`,
@@ -186,7 +186,7 @@ const refreshAdminToken = async ({ connection, controller }) => {
186
186
 
187
187
  }
188
188
  const settings = decrypt( credential.settings );
189
- const { identifier : domain } = credential;
189
+ const domain = credential.provider?.id;
190
190
  const { refreshToken } = settings;
191
191
 
192
192
  const data = await shopifyOAuthFetch(
package/dist/shopify.d.ts CHANGED
@@ -186,7 +186,7 @@ const refreshAdminToken = async ({ connection, controller }) => {
186
186
 
187
187
  }
188
188
  const settings = decrypt( credential.settings );
189
- const { identifier : domain } = credential;
189
+ const domain = credential.provider?.id;
190
190
  const { refreshToken } = settings;
191
191
 
192
192
  const data = await shopifyOAuthFetch(
package/dist/shopify.js CHANGED
@@ -101,6 +101,7 @@ var resolveConnectionSettings = async ({ connection, controller }) => {
101
101
  };
102
102
  };
103
103
  var refreshAdminToken = async ({ connection, controller }) => {
104
+ var _a;
104
105
  const credential = await controller.get({
105
106
  collection: "credential",
106
107
  query: {
@@ -112,7 +113,7 @@ var refreshAdminToken = async ({ connection, controller }) => {
112
113
  }
113
114
  ;
114
115
  const settings = decrypt(credential.settings);
115
- const { identifier: domain } = credential;
116
+ const domain = (_a = credential.provider) == null ? void 0 : _a.id;
116
117
  const { refreshToken } = settings;
117
118
  const data = await shopifyOAuthFetch(
118
119
  `https://${domain}/admin/oauth/access_token`,
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "dependencies": {
4
+ "@drawbridge/drawbridge-agents": "0.0.9",
4
5
  "axios": "1.16.0",
5
6
  "currency-codes": "2.2.0",
6
7
  "nanoid": "3.3.8",
@@ -87,9 +88,9 @@
87
88
  "access": "public"
88
89
  },
89
90
  "scripts": {
90
- "sync": ". \"$HOME/.nvm/nvm.sh\" && nvm use && npm prune && npm install",
91
+ "sync": ". \"$HOME/.nvm/nvm.sh\" && nvm use && npm prune && npm install && npx drawbridge-agents-sync",
91
92
  "build": "tsup && npm publish"
92
93
  },
93
94
  "types": "dist/index.d.ts",
94
- "version": "0.0.25"
95
+ "version": "0.0.26"
95
96
  }