@ingram-cloud/pulumi 1.1.0 → 1.3.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.
package/README.md CHANGED
@@ -121,6 +121,29 @@ const bookkeeper = new ic.IcAgent("bookkeeper", {
121
121
  > keep it as the app's migration script. New smiths attach at birth in app code.
122
122
  > Pulumi does not own per-smith runtime state.
123
123
 
124
+ ### IcWebPage (declare in the APP repo)
125
+
126
+ A **hosted page** — a private, shareable web page that runs an agent (a `web`
127
+ deployment). Each visitor gets their own smith; the 128-bit `dep_` id in the URL is
128
+ the privacy boundary, with an optional shared `password` on top. Point it at an
129
+ `IcAgent` and read back `pageUrl` — the link to hand out.
130
+
131
+ ```ts
132
+ const page = new ic.IcWebPage("docs-page", {
133
+ ...conn,
134
+ agentId: curator.agentId,
135
+ title: "Ingram Cloud docs assistant",
136
+ greeting: "Ask me anything about Ingram Cloud.",
137
+ // password: "optional-shared-secret",
138
+ });
139
+
140
+ export const pageUrl = page.pageUrl; // https://cloud.ingram.tech/hosted/dep_…
141
+ ```
142
+
143
+ > The API has no update path for a web deployment's title/greeting/password, so a
144
+ > change to any of those (or to `agentId`) **replaces** the page and mints a fresh
145
+ > `pageUrl`. The agent's instructions change on the `IcAgent`, not here.
146
+
124
147
  ### IcMcpServer, IcOauthProvider, IcTelegramBot, IcWhatsAppConfig, IcEmail, IcWebhook, IcModelKey (declare in INFRA)
125
148
 
126
149
  ```ts
@@ -161,6 +161,10 @@ export interface IcOauthProviderArgs {
161
161
  clientSecret?: pulumi.Input<string>;
162
162
  tokenUri?: pulumi.Input<string>;
163
163
  scopesAllowed?: pulumi.Input<string[]>;
164
+ /** Delegated connector consent (#123): the connector OAuth authorize
165
+ * endpoint 302s end-users to this tenant-hosted page (`?request_id=…`)
166
+ * instead of rendering the built-in connect-token page. */
167
+ authorizeUrl?: pulumi.Input<string>;
164
168
  }
165
169
  export declare class IcOauthProvider extends pulumi.dynamic.Resource {
166
170
  constructor(name: string, args: IcOauthProviderArgs, opts?: pulumi.CustomResourceOptions);
@@ -248,3 +252,20 @@ export declare class IcProjectToken extends pulumi.dynamic.Resource {
248
252
  readonly tokenId: pulumi.Output<string>;
249
253
  constructor(name: string, args: IcProjectTokenArgs, opts?: pulumi.CustomResourceOptions);
250
254
  }
255
+ export interface IcWebPageArgs {
256
+ baseUrl: pulumi.Input<string>;
257
+ token: pulumi.Input<string>;
258
+ /** The `agt_…` id this page runs. Typically an `IcAgent().agentId`. */
259
+ agentId: pulumi.Input<string>;
260
+ title?: pulumi.Input<string>;
261
+ greeting?: pulumi.Input<string>;
262
+ /** Optional shared password gating the page. */
263
+ password?: pulumi.Input<string>;
264
+ }
265
+ export declare class IcWebPage extends pulumi.dynamic.Resource {
266
+ /** The `dep_…` deployment id (same as `.id`, exposed for convenience). */
267
+ readonly deploymentId: pulumi.Output<string>;
268
+ /** The shareable page URL (e.g. `https://cloud.ingram.tech/hosted/dep_…`). */
269
+ readonly pageUrl: pulumi.Output<string>;
270
+ constructor(name: string, args: IcWebPageArgs, opts?: pulumi.CustomResourceOptions);
271
+ }
package/dist/resources.js CHANGED
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.IcProjectToken = exports.IcProject = exports.IcModelKey = exports.IcWebhook = exports.IcEmail = exports.IcWhatsAppConfig = exports.IcOauthProvider = exports.IcTelegramBot = exports.IcMcpServer = exports.IcAgent = exports.IC_API_VERSION = void 0;
36
+ exports.IcWebPage = exports.IcProjectToken = exports.IcProject = exports.IcModelKey = exports.IcWebhook = exports.IcEmail = exports.IcWhatsAppConfig = exports.IcOauthProvider = exports.IcTelegramBot = exports.IcMcpServer = exports.IcAgent = exports.IC_API_VERSION = void 0;
37
37
  /**
38
38
  * Ingram Cloud /v1 tenant configuration as Pulumi dynamic resources.
39
39
  *
@@ -558,6 +558,7 @@ const oauthProviderResource = makePutResource({
558
558
  ...(i.clientSecret !== undefined ? { client_secret: i.clientSecret } : {}),
559
559
  token_uri: i.tokenUri,
560
560
  scopes_allowed: i.scopesAllowed,
561
+ authorize_url: i.authorizeUrl,
561
562
  }),
562
563
  diff: {
563
564
  replaceKeys: ["provider"],
@@ -566,6 +567,7 @@ const oauthProviderResource = makePutResource({
566
567
  "clientId",
567
568
  "clientSecret",
568
569
  "tokenUri",
570
+ "authorizeUrl",
569
571
  "token",
570
572
  "baseUrl",
571
573
  ],
@@ -581,6 +583,7 @@ class IcOauthProvider extends pulumi.dynamic.Resource {
581
583
  clientSecret: undefined,
582
584
  tokenUri: undefined,
583
585
  scopesAllowed: undefined,
586
+ authorizeUrl: undefined,
584
587
  ...args,
585
588
  }, { ...opts, additionalSecretOutputs: ["token", "clientSecret"] });
586
589
  }
@@ -799,3 +802,53 @@ class IcProjectToken extends pulumi.dynamic.Resource {
799
802
  }
800
803
  }
801
804
  exports.IcProjectToken = IcProjectToken;
805
+ const webPageProvider = {
806
+ async create(i) {
807
+ const body = {
808
+ target: { type: "agent", id: i.agentId },
809
+ kind: "web",
810
+ provider_metadata: {
811
+ ...(i.title ? { title: i.title } : {}),
812
+ ...(i.greeting ? { greeting: i.greeting } : {}),
813
+ },
814
+ };
815
+ if (i.password)
816
+ body.secrets = { password: i.password };
817
+ const res = await icRequest(i.baseUrl, i.token, "POST", "/v1/deployments", body);
818
+ return {
819
+ id: res.id,
820
+ outs: { ...i, deploymentId: res.id, pageUrl: res.page_url },
821
+ };
822
+ },
823
+ async update(_id, olds, news) {
824
+ // No web-metadata PATCH on the API — diff marks every field as a replace, so
825
+ // this path is only reached for a no-op refresh. Carry outputs forward.
826
+ return { outs: { ...news, deploymentId: _id, pageUrl: olds.pageUrl } };
827
+ },
828
+ async delete(id, props) {
829
+ await icRequest(props.baseUrl, props.token, "DELETE", `/v1/deployments/${id}`);
830
+ },
831
+ async diff(_id, olds, news) {
832
+ return simpleDiff(olds, news, {
833
+ replaceKeys: ["agentId", "title", "greeting", "password"],
834
+ });
835
+ },
836
+ async read(id, props) {
837
+ return read404(() => icRequest(props.baseUrl, props.token, "GET", `/v1/deployments/${id}`), (dep) => ({
838
+ id,
839
+ props: {
840
+ ...props,
841
+ title: dep.provider_metadata?.title,
842
+ greeting: dep.provider_metadata?.greeting,
843
+ deploymentId: id,
844
+ pageUrl: dep.page_url,
845
+ },
846
+ }));
847
+ },
848
+ };
849
+ class IcWebPage extends pulumi.dynamic.Resource {
850
+ constructor(name, args, opts) {
851
+ super(webPageProvider, name, { deploymentId: undefined, pageUrl: undefined, ...args }, { ...opts, additionalSecretOutputs: ["token", "password"] });
852
+ }
853
+ }
854
+ exports.IcWebPage = IcWebPage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ingram-cloud/pulumi",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "description": "Pulumi dynamic resources for the Ingram Cloud /v1 API — projects, project tokens, agents, MCP servers, channels, webhooks, model keys.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://cloud.ingram.tech",
@@ -28,11 +28,11 @@
28
28
  "@pulumi/pulumi": "^3.0.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@ingram-tech/oxlint-config": "^0.2.1",
32
- "@pulumi/pulumi": "^3.0.0",
33
- "@types/node": "^25.0.0",
34
- "oxfmt": "^0.54.0",
35
- "oxlint": "^1.70.0",
36
- "typescript": "^6.0.0"
31
+ "@ingram-tech/oxlint-config": "^0.2.2",
32
+ "@pulumi/pulumi": "^3.251.0",
33
+ "@types/node": "^26.1.1",
34
+ "oxfmt": "^0.58.0",
35
+ "oxlint": "^1.73.0",
36
+ "typescript": "^7.0.2"
37
37
  }
38
38
  }