@mstuercke/pulumi-modules 1.2.4 → 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.
Files changed (42) hide show
  1. package/dist/clerk/Clerk.d.ts +27 -0
  2. package/dist/clerk/Clerk.js +88 -0
  3. package/dist/clerk/index.d.ts +5 -0
  4. package/dist/clerk/index.js +5 -0
  5. package/dist/index.d.ts +4 -0
  6. package/dist/index.js +3 -0
  7. package/package.json +21 -5
  8. package/sdks/clerk/.gitattributes +1 -0
  9. package/sdks/clerk/README.md +3 -0
  10. package/sdks/clerk/allowlistIdentifier.ts +121 -0
  11. package/sdks/clerk/apiKey.ts +254 -0
  12. package/sdks/clerk/application.ts +182 -0
  13. package/sdks/clerk/applicationSettings.ts +171 -0
  14. package/sdks/clerk/blocklistIdentifier.ts +114 -0
  15. package/sdks/clerk/config/index.ts +5 -0
  16. package/sdks/clerk/config/vars.ts +34 -0
  17. package/sdks/clerk/domain.ts +154 -0
  18. package/sdks/clerk/getApplication.ts +42 -0
  19. package/sdks/clerk/index.ts +213 -0
  20. package/sdks/clerk/instanceConfig.ts +128 -0
  21. package/sdks/clerk/instanceDomain.ts +129 -0
  22. package/sdks/clerk/jwtTemplate.ts +190 -0
  23. package/sdks/clerk/machine.ts +127 -0
  24. package/sdks/clerk/oauthApplication.ts +228 -0
  25. package/sdks/clerk/organization.ts +190 -0
  26. package/sdks/clerk/organizationDomain.ts +166 -0
  27. package/sdks/clerk/organizationMembership.ts +148 -0
  28. package/sdks/clerk/organizationPermission.ts +142 -0
  29. package/sdks/clerk/organizationRole.ts +156 -0
  30. package/sdks/clerk/package.json +26 -0
  31. package/sdks/clerk/provider.ts +76 -0
  32. package/sdks/clerk/redirectUrl.ts +104 -0
  33. package/sdks/clerk/roleSet.ts +197 -0
  34. package/sdks/clerk/samlConnection.ts +361 -0
  35. package/sdks/clerk/scripts/postinstall.js +20 -0
  36. package/sdks/clerk/svixWebhook.ts +77 -0
  37. package/sdks/clerk/tsconfig.json +53 -0
  38. package/sdks/clerk/types/index.ts +13 -0
  39. package/sdks/clerk/types/input.ts +59 -0
  40. package/sdks/clerk/types/output.ts +79 -0
  41. package/sdks/clerk/user.ts +458 -0
  42. package/sdks/clerk/utilities.ts +107 -0
@@ -0,0 +1,190 @@
1
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
2
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
3
+
4
+ import * as pulumi from "@pulumi/pulumi";
5
+ import * as utilities from "./utilities";
6
+
7
+ export class Organization extends pulumi.CustomResource {
8
+ /**
9
+ * Get an existing Organization resource's state with the given name, ID, and optional extra
10
+ * properties used to qualify the lookup.
11
+ *
12
+ * @param name The _unique_ name of the resulting resource.
13
+ * @param id The _unique_ provider ID of the resource to lookup.
14
+ * @param state Any extra arguments used during the lookup.
15
+ * @param opts Optional settings to control the behavior of the CustomResource.
16
+ */
17
+ public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: OrganizationState, opts?: pulumi.CustomResourceOptions): Organization {
18
+ return new Organization(name, <any>state, { ...opts, id: id });
19
+ }
20
+
21
+ /** @internal */
22
+ public static readonly __pulumiType = 'clerk:index/organization:Organization';
23
+
24
+ /**
25
+ * Returns true if the given object is an instance of Organization. This is designed to work even
26
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
27
+ */
28
+ public static isInstance(obj: any): obj is Organization {
29
+ if (obj === undefined || obj === null) {
30
+ return false;
31
+ }
32
+ return obj['__pulumiType'] === Organization.__pulumiType;
33
+ }
34
+
35
+ /**
36
+ * Whether administrators can delete the organization.
37
+ */
38
+ declare public readonly adminDeleteEnabled: pulumi.Output<boolean>;
39
+ /**
40
+ * Timestamp when the organization was created.
41
+ */
42
+ declare public /*out*/ readonly createdAt: pulumi.Output<string>;
43
+ /**
44
+ * ID of the user who creates the organization. The user becomes an admin member. Only settable at creation time.
45
+ */
46
+ declare public readonly createdBy: pulumi.Output<string | undefined>;
47
+ /**
48
+ * Maximum number of memberships allowed for the organization.
49
+ */
50
+ declare public readonly maxAllowedMemberships: pulumi.Output<number>;
51
+ /**
52
+ * Name of the organization.
53
+ */
54
+ declare public readonly name: pulumi.Output<string>;
55
+ /**
56
+ * Private metadata as a JSON string. Only accessible from the backend.
57
+ */
58
+ declare public readonly privateMetadata: pulumi.Output<string | undefined>;
59
+ /**
60
+ * Public metadata as a JSON string. Accessible from both the frontend and backend.
61
+ */
62
+ declare public readonly publicMetadata: pulumi.Output<string | undefined>;
63
+ /**
64
+ * URL-friendly identifier for the organization. Auto-generated from name if not provided. Requires "Enable organization
65
+ * slugs" to be turned on in the Clerk Dashboard under Configure > Organization settings.
66
+ */
67
+ declare public readonly slug: pulumi.Output<string>;
68
+ /**
69
+ * Timestamp when the organization was last updated.
70
+ */
71
+ declare public /*out*/ readonly updatedAt: pulumi.Output<string>;
72
+
73
+ /**
74
+ * Create a Organization resource with the given unique name, arguments, and options.
75
+ *
76
+ * @param name The _unique_ name of the resource.
77
+ * @param args The arguments to use to populate this resource's properties.
78
+ * @param opts A bag of options that control this resource's behavior.
79
+ */
80
+ constructor(name: string, args?: OrganizationArgs, opts?: pulumi.CustomResourceOptions)
81
+ constructor(name: string, argsOrState?: OrganizationArgs | OrganizationState, opts?: pulumi.CustomResourceOptions) {
82
+ let resourceInputs: pulumi.Inputs = {};
83
+ opts = opts || {};
84
+ if (opts.id) {
85
+ const state = argsOrState as OrganizationState | undefined;
86
+ resourceInputs["adminDeleteEnabled"] = state?.adminDeleteEnabled;
87
+ resourceInputs["createdAt"] = state?.createdAt;
88
+ resourceInputs["createdBy"] = state?.createdBy;
89
+ resourceInputs["maxAllowedMemberships"] = state?.maxAllowedMemberships;
90
+ resourceInputs["name"] = state?.name;
91
+ resourceInputs["privateMetadata"] = state?.privateMetadata;
92
+ resourceInputs["publicMetadata"] = state?.publicMetadata;
93
+ resourceInputs["slug"] = state?.slug;
94
+ resourceInputs["updatedAt"] = state?.updatedAt;
95
+ } else {
96
+ const args = argsOrState as OrganizationArgs | undefined;
97
+ resourceInputs["adminDeleteEnabled"] = args?.adminDeleteEnabled;
98
+ resourceInputs["createdBy"] = args?.createdBy;
99
+ resourceInputs["maxAllowedMemberships"] = args?.maxAllowedMemberships;
100
+ resourceInputs["name"] = args?.name;
101
+ resourceInputs["privateMetadata"] = args?.privateMetadata ? pulumi.secret(args.privateMetadata) : undefined;
102
+ resourceInputs["publicMetadata"] = args?.publicMetadata;
103
+ resourceInputs["slug"] = args?.slug;
104
+ resourceInputs["createdAt"] = undefined /*out*/;
105
+ resourceInputs["updatedAt"] = undefined /*out*/;
106
+ }
107
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
108
+ const secretOpts = { additionalSecretOutputs: ["privateMetadata"] };
109
+ opts = pulumi.mergeOptions(opts, secretOpts);
110
+ super(Organization.__pulumiType, name, resourceInputs, opts, false /*dependency*/, utilities.getPackage());
111
+ }
112
+ }
113
+
114
+ /**
115
+ * Input properties used for looking up and filtering Organization resources.
116
+ */
117
+ export interface OrganizationState {
118
+ /**
119
+ * Whether administrators can delete the organization.
120
+ */
121
+ adminDeleteEnabled?: pulumi.Input<boolean | undefined>;
122
+ /**
123
+ * Timestamp when the organization was created.
124
+ */
125
+ createdAt?: pulumi.Input<string | undefined>;
126
+ /**
127
+ * ID of the user who creates the organization. The user becomes an admin member. Only settable at creation time.
128
+ */
129
+ createdBy?: pulumi.Input<string | undefined>;
130
+ /**
131
+ * Maximum number of memberships allowed for the organization.
132
+ */
133
+ maxAllowedMemberships?: pulumi.Input<number | undefined>;
134
+ /**
135
+ * Name of the organization.
136
+ */
137
+ name?: pulumi.Input<string | undefined>;
138
+ /**
139
+ * Private metadata as a JSON string. Only accessible from the backend.
140
+ */
141
+ privateMetadata?: pulumi.Input<string | undefined>;
142
+ /**
143
+ * Public metadata as a JSON string. Accessible from both the frontend and backend.
144
+ */
145
+ publicMetadata?: pulumi.Input<string | undefined>;
146
+ /**
147
+ * URL-friendly identifier for the organization. Auto-generated from name if not provided. Requires "Enable organization
148
+ * slugs" to be turned on in the Clerk Dashboard under Configure > Organization settings.
149
+ */
150
+ slug?: pulumi.Input<string | undefined>;
151
+ /**
152
+ * Timestamp when the organization was last updated.
153
+ */
154
+ updatedAt?: pulumi.Input<string | undefined>;
155
+ }
156
+
157
+ /**
158
+ * The set of arguments for constructing a Organization resource.
159
+ */
160
+ export interface OrganizationArgs {
161
+ /**
162
+ * Whether administrators can delete the organization.
163
+ */
164
+ adminDeleteEnabled?: pulumi.Input<boolean | undefined>;
165
+ /**
166
+ * ID of the user who creates the organization. The user becomes an admin member. Only settable at creation time.
167
+ */
168
+ createdBy?: pulumi.Input<string | undefined>;
169
+ /**
170
+ * Maximum number of memberships allowed for the organization.
171
+ */
172
+ maxAllowedMemberships?: pulumi.Input<number | undefined>;
173
+ /**
174
+ * Name of the organization.
175
+ */
176
+ name?: pulumi.Input<string | undefined>;
177
+ /**
178
+ * Private metadata as a JSON string. Only accessible from the backend.
179
+ */
180
+ privateMetadata?: pulumi.Input<string | undefined>;
181
+ /**
182
+ * Public metadata as a JSON string. Accessible from both the frontend and backend.
183
+ */
184
+ publicMetadata?: pulumi.Input<string | undefined>;
185
+ /**
186
+ * URL-friendly identifier for the organization. Auto-generated from name if not provided. Requires "Enable organization
187
+ * slugs" to be turned on in the Clerk Dashboard under Configure > Organization settings.
188
+ */
189
+ slug?: pulumi.Input<string | undefined>;
190
+ }
@@ -0,0 +1,166 @@
1
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
2
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
3
+
4
+ import * as pulumi from "@pulumi/pulumi";
5
+ import * as utilities from "./utilities";
6
+
7
+ export class OrganizationDomain extends pulumi.CustomResource {
8
+ /**
9
+ * Get an existing OrganizationDomain resource's state with the given name, ID, and optional extra
10
+ * properties used to qualify the lookup.
11
+ *
12
+ * @param name The _unique_ name of the resulting resource.
13
+ * @param id The _unique_ provider ID of the resource to lookup.
14
+ * @param state Any extra arguments used during the lookup.
15
+ * @param opts Optional settings to control the behavior of the CustomResource.
16
+ */
17
+ public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: OrganizationDomainState, opts?: pulumi.CustomResourceOptions): OrganizationDomain {
18
+ return new OrganizationDomain(name, <any>state, { ...opts, id: id });
19
+ }
20
+
21
+ /** @internal */
22
+ public static readonly __pulumiType = 'clerk:index/organizationDomain:OrganizationDomain';
23
+
24
+ /**
25
+ * Returns true if the given object is an instance of OrganizationDomain. This is designed to work even
26
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
27
+ */
28
+ public static isInstance(obj: any): obj is OrganizationDomain {
29
+ if (obj === undefined || obj === null) {
30
+ return false;
31
+ }
32
+ return obj['__pulumiType'] === OrganizationDomain.__pulumiType;
33
+ }
34
+
35
+ /**
36
+ * Email address used for domain affiliation.
37
+ */
38
+ declare public /*out*/ readonly affiliationEmailAddress: pulumi.Output<string>;
39
+ /**
40
+ * Timestamp when the domain was created.
41
+ */
42
+ declare public /*out*/ readonly createdAt: pulumi.Output<string>;
43
+ /**
44
+ * Enrollment mode for the domain (e.g. automatic_invitation, automatic_suggestion, manual_invitation).
45
+ */
46
+ declare public readonly enrollmentMode: pulumi.Output<string>;
47
+ /**
48
+ * The domain name (e.g. example.com).
49
+ */
50
+ declare public readonly name: pulumi.Output<string>;
51
+ /**
52
+ * ID of the organization.
53
+ */
54
+ declare public readonly organizationId: pulumi.Output<string>;
55
+ /**
56
+ * Timestamp when the domain was last updated.
57
+ */
58
+ declare public /*out*/ readonly updatedAt: pulumi.Output<string>;
59
+ /**
60
+ * Current verification status of the domain.
61
+ */
62
+ declare public /*out*/ readonly verificationStatus: pulumi.Output<string>;
63
+ /**
64
+ * Whether the domain should be verified. Only settable at creation time.
65
+ */
66
+ declare public readonly verified: pulumi.Output<boolean | undefined>;
67
+
68
+ /**
69
+ * Create a OrganizationDomain resource with the given unique name, arguments, and options.
70
+ *
71
+ * @param name The _unique_ name of the resource.
72
+ * @param args The arguments to use to populate this resource's properties.
73
+ * @param opts A bag of options that control this resource's behavior.
74
+ */
75
+ constructor(name: string, args: OrganizationDomainArgs, opts?: pulumi.CustomResourceOptions)
76
+ constructor(name: string, argsOrState?: OrganizationDomainArgs | OrganizationDomainState, opts?: pulumi.CustomResourceOptions) {
77
+ let resourceInputs: pulumi.Inputs = {};
78
+ opts = opts || {};
79
+ if (opts.id) {
80
+ const state = argsOrState as OrganizationDomainState | undefined;
81
+ resourceInputs["affiliationEmailAddress"] = state?.affiliationEmailAddress;
82
+ resourceInputs["createdAt"] = state?.createdAt;
83
+ resourceInputs["enrollmentMode"] = state?.enrollmentMode;
84
+ resourceInputs["name"] = state?.name;
85
+ resourceInputs["organizationId"] = state?.organizationId;
86
+ resourceInputs["updatedAt"] = state?.updatedAt;
87
+ resourceInputs["verificationStatus"] = state?.verificationStatus;
88
+ resourceInputs["verified"] = state?.verified;
89
+ } else {
90
+ const args = argsOrState as OrganizationDomainArgs | undefined;
91
+ if (args?.organizationId === undefined && !opts.urn) {
92
+ throw new Error("Missing required property 'organizationId'");
93
+ }
94
+ resourceInputs["enrollmentMode"] = args?.enrollmentMode;
95
+ resourceInputs["name"] = args?.name;
96
+ resourceInputs["organizationId"] = args?.organizationId;
97
+ resourceInputs["verified"] = args?.verified;
98
+ resourceInputs["affiliationEmailAddress"] = undefined /*out*/;
99
+ resourceInputs["createdAt"] = undefined /*out*/;
100
+ resourceInputs["updatedAt"] = undefined /*out*/;
101
+ resourceInputs["verificationStatus"] = undefined /*out*/;
102
+ }
103
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
104
+ super(OrganizationDomain.__pulumiType, name, resourceInputs, opts, false /*dependency*/, utilities.getPackage());
105
+ }
106
+ }
107
+
108
+ /**
109
+ * Input properties used for looking up and filtering OrganizationDomain resources.
110
+ */
111
+ export interface OrganizationDomainState {
112
+ /**
113
+ * Email address used for domain affiliation.
114
+ */
115
+ affiliationEmailAddress?: pulumi.Input<string | undefined>;
116
+ /**
117
+ * Timestamp when the domain was created.
118
+ */
119
+ createdAt?: pulumi.Input<string | undefined>;
120
+ /**
121
+ * Enrollment mode for the domain (e.g. automatic_invitation, automatic_suggestion, manual_invitation).
122
+ */
123
+ enrollmentMode?: pulumi.Input<string | undefined>;
124
+ /**
125
+ * The domain name (e.g. example.com).
126
+ */
127
+ name?: pulumi.Input<string | undefined>;
128
+ /**
129
+ * ID of the organization.
130
+ */
131
+ organizationId?: pulumi.Input<string | undefined>;
132
+ /**
133
+ * Timestamp when the domain was last updated.
134
+ */
135
+ updatedAt?: pulumi.Input<string | undefined>;
136
+ /**
137
+ * Current verification status of the domain.
138
+ */
139
+ verificationStatus?: pulumi.Input<string | undefined>;
140
+ /**
141
+ * Whether the domain should be verified. Only settable at creation time.
142
+ */
143
+ verified?: pulumi.Input<boolean | undefined>;
144
+ }
145
+
146
+ /**
147
+ * The set of arguments for constructing a OrganizationDomain resource.
148
+ */
149
+ export interface OrganizationDomainArgs {
150
+ /**
151
+ * Enrollment mode for the domain (e.g. automatic_invitation, automatic_suggestion, manual_invitation).
152
+ */
153
+ enrollmentMode?: pulumi.Input<string | undefined>;
154
+ /**
155
+ * The domain name (e.g. example.com).
156
+ */
157
+ name?: pulumi.Input<string | undefined>;
158
+ /**
159
+ * ID of the organization.
160
+ */
161
+ organizationId: pulumi.Input<string>;
162
+ /**
163
+ * Whether the domain should be verified. Only settable at creation time.
164
+ */
165
+ verified?: pulumi.Input<boolean | undefined>;
166
+ }
@@ -0,0 +1,148 @@
1
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
2
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
3
+
4
+ import * as pulumi from "@pulumi/pulumi";
5
+ import * as utilities from "./utilities";
6
+
7
+ export class OrganizationMembership extends pulumi.CustomResource {
8
+ /**
9
+ * Get an existing OrganizationMembership resource's state with the given name, ID, and optional extra
10
+ * properties used to qualify the lookup.
11
+ *
12
+ * @param name The _unique_ name of the resulting resource.
13
+ * @param id The _unique_ provider ID of the resource to lookup.
14
+ * @param state Any extra arguments used during the lookup.
15
+ * @param opts Optional settings to control the behavior of the CustomResource.
16
+ */
17
+ public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: OrganizationMembershipState, opts?: pulumi.CustomResourceOptions): OrganizationMembership {
18
+ return new OrganizationMembership(name, <any>state, { ...opts, id: id });
19
+ }
20
+
21
+ /** @internal */
22
+ public static readonly __pulumiType = 'clerk:index/organizationMembership:OrganizationMembership';
23
+
24
+ /**
25
+ * Returns true if the given object is an instance of OrganizationMembership. This is designed to work even
26
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
27
+ */
28
+ public static isInstance(obj: any): obj is OrganizationMembership {
29
+ if (obj === undefined || obj === null) {
30
+ return false;
31
+ }
32
+ return obj['__pulumiType'] === OrganizationMembership.__pulumiType;
33
+ }
34
+
35
+ /**
36
+ * Timestamp when the membership was created.
37
+ */
38
+ declare public /*out*/ readonly createdAt: pulumi.Output<string>;
39
+ /**
40
+ * ID of the organization.
41
+ */
42
+ declare public readonly organizationId: pulumi.Output<string>;
43
+ /**
44
+ * Role key to assign to the member (e.g. org:admin, org:member).
45
+ */
46
+ declare public readonly role: pulumi.Output<string>;
47
+ /**
48
+ * Display name of the assigned role.
49
+ */
50
+ declare public /*out*/ readonly roleName: pulumi.Output<string>;
51
+ /**
52
+ * Timestamp when the membership was last updated.
53
+ */
54
+ declare public /*out*/ readonly updatedAt: pulumi.Output<string>;
55
+ /**
56
+ * ID of the user to add as a member.
57
+ */
58
+ declare public readonly userId: pulumi.Output<string>;
59
+
60
+ /**
61
+ * Create a OrganizationMembership resource with the given unique name, arguments, and options.
62
+ *
63
+ * @param name The _unique_ name of the resource.
64
+ * @param args The arguments to use to populate this resource's properties.
65
+ * @param opts A bag of options that control this resource's behavior.
66
+ */
67
+ constructor(name: string, args: OrganizationMembershipArgs, opts?: pulumi.CustomResourceOptions)
68
+ constructor(name: string, argsOrState?: OrganizationMembershipArgs | OrganizationMembershipState, opts?: pulumi.CustomResourceOptions) {
69
+ let resourceInputs: pulumi.Inputs = {};
70
+ opts = opts || {};
71
+ if (opts.id) {
72
+ const state = argsOrState as OrganizationMembershipState | undefined;
73
+ resourceInputs["createdAt"] = state?.createdAt;
74
+ resourceInputs["organizationId"] = state?.organizationId;
75
+ resourceInputs["role"] = state?.role;
76
+ resourceInputs["roleName"] = state?.roleName;
77
+ resourceInputs["updatedAt"] = state?.updatedAt;
78
+ resourceInputs["userId"] = state?.userId;
79
+ } else {
80
+ const args = argsOrState as OrganizationMembershipArgs | undefined;
81
+ if (args?.organizationId === undefined && !opts.urn) {
82
+ throw new Error("Missing required property 'organizationId'");
83
+ }
84
+ if (args?.role === undefined && !opts.urn) {
85
+ throw new Error("Missing required property 'role'");
86
+ }
87
+ if (args?.userId === undefined && !opts.urn) {
88
+ throw new Error("Missing required property 'userId'");
89
+ }
90
+ resourceInputs["organizationId"] = args?.organizationId;
91
+ resourceInputs["role"] = args?.role;
92
+ resourceInputs["userId"] = args?.userId;
93
+ resourceInputs["createdAt"] = undefined /*out*/;
94
+ resourceInputs["roleName"] = undefined /*out*/;
95
+ resourceInputs["updatedAt"] = undefined /*out*/;
96
+ }
97
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
98
+ super(OrganizationMembership.__pulumiType, name, resourceInputs, opts, false /*dependency*/, utilities.getPackage());
99
+ }
100
+ }
101
+
102
+ /**
103
+ * Input properties used for looking up and filtering OrganizationMembership resources.
104
+ */
105
+ export interface OrganizationMembershipState {
106
+ /**
107
+ * Timestamp when the membership was created.
108
+ */
109
+ createdAt?: pulumi.Input<string | undefined>;
110
+ /**
111
+ * ID of the organization.
112
+ */
113
+ organizationId?: pulumi.Input<string | undefined>;
114
+ /**
115
+ * Role key to assign to the member (e.g. org:admin, org:member).
116
+ */
117
+ role?: pulumi.Input<string | undefined>;
118
+ /**
119
+ * Display name of the assigned role.
120
+ */
121
+ roleName?: pulumi.Input<string | undefined>;
122
+ /**
123
+ * Timestamp when the membership was last updated.
124
+ */
125
+ updatedAt?: pulumi.Input<string | undefined>;
126
+ /**
127
+ * ID of the user to add as a member.
128
+ */
129
+ userId?: pulumi.Input<string | undefined>;
130
+ }
131
+
132
+ /**
133
+ * The set of arguments for constructing a OrganizationMembership resource.
134
+ */
135
+ export interface OrganizationMembershipArgs {
136
+ /**
137
+ * ID of the organization.
138
+ */
139
+ organizationId: pulumi.Input<string>;
140
+ /**
141
+ * Role key to assign to the member (e.g. org:admin, org:member).
142
+ */
143
+ role: pulumi.Input<string>;
144
+ /**
145
+ * ID of the user to add as a member.
146
+ */
147
+ userId: pulumi.Input<string>;
148
+ }
@@ -0,0 +1,142 @@
1
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
2
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
3
+
4
+ import * as pulumi from "@pulumi/pulumi";
5
+ import * as utilities from "./utilities";
6
+
7
+ export class OrganizationPermission extends pulumi.CustomResource {
8
+ /**
9
+ * Get an existing OrganizationPermission resource's state with the given name, ID, and optional extra
10
+ * properties used to qualify the lookup.
11
+ *
12
+ * @param name The _unique_ name of the resulting resource.
13
+ * @param id The _unique_ provider ID of the resource to lookup.
14
+ * @param state Any extra arguments used during the lookup.
15
+ * @param opts Optional settings to control the behavior of the CustomResource.
16
+ */
17
+ public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: OrganizationPermissionState, opts?: pulumi.CustomResourceOptions): OrganizationPermission {
18
+ return new OrganizationPermission(name, <any>state, { ...opts, id: id });
19
+ }
20
+
21
+ /** @internal */
22
+ public static readonly __pulumiType = 'clerk:index/organizationPermission:OrganizationPermission';
23
+
24
+ /**
25
+ * Returns true if the given object is an instance of OrganizationPermission. This is designed to work even
26
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
27
+ */
28
+ public static isInstance(obj: any): obj is OrganizationPermission {
29
+ if (obj === undefined || obj === null) {
30
+ return false;
31
+ }
32
+ return obj['__pulumiType'] === OrganizationPermission.__pulumiType;
33
+ }
34
+
35
+ /**
36
+ * Timestamp when the permission was created.
37
+ */
38
+ declare public /*out*/ readonly createdAt: pulumi.Output<string>;
39
+ /**
40
+ * Description of what the permission allows.
41
+ */
42
+ declare public readonly description: pulumi.Output<string | undefined>;
43
+ /**
44
+ * Unique key for the permission (e.g. org:posts:create).
45
+ */
46
+ declare public readonly key: pulumi.Output<string>;
47
+ /**
48
+ * Display name of the permission.
49
+ */
50
+ declare public readonly name: pulumi.Output<string>;
51
+ /**
52
+ * Type of the permission (system or user).
53
+ */
54
+ declare public /*out*/ readonly type: pulumi.Output<string>;
55
+ /**
56
+ * Timestamp when the permission was last updated.
57
+ */
58
+ declare public /*out*/ readonly updatedAt: pulumi.Output<string>;
59
+
60
+ /**
61
+ * Create a OrganizationPermission resource with the given unique name, arguments, and options.
62
+ *
63
+ * @param name The _unique_ name of the resource.
64
+ * @param args The arguments to use to populate this resource's properties.
65
+ * @param opts A bag of options that control this resource's behavior.
66
+ */
67
+ constructor(name: string, args: OrganizationPermissionArgs, opts?: pulumi.CustomResourceOptions)
68
+ constructor(name: string, argsOrState?: OrganizationPermissionArgs | OrganizationPermissionState, opts?: pulumi.CustomResourceOptions) {
69
+ let resourceInputs: pulumi.Inputs = {};
70
+ opts = opts || {};
71
+ if (opts.id) {
72
+ const state = argsOrState as OrganizationPermissionState | undefined;
73
+ resourceInputs["createdAt"] = state?.createdAt;
74
+ resourceInputs["description"] = state?.description;
75
+ resourceInputs["key"] = state?.key;
76
+ resourceInputs["name"] = state?.name;
77
+ resourceInputs["type"] = state?.type;
78
+ resourceInputs["updatedAt"] = state?.updatedAt;
79
+ } else {
80
+ const args = argsOrState as OrganizationPermissionArgs | undefined;
81
+ if (args?.key === undefined && !opts.urn) {
82
+ throw new Error("Missing required property 'key'");
83
+ }
84
+ resourceInputs["description"] = args?.description;
85
+ resourceInputs["key"] = args?.key;
86
+ resourceInputs["name"] = args?.name;
87
+ resourceInputs["createdAt"] = undefined /*out*/;
88
+ resourceInputs["type"] = undefined /*out*/;
89
+ resourceInputs["updatedAt"] = undefined /*out*/;
90
+ }
91
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
92
+ super(OrganizationPermission.__pulumiType, name, resourceInputs, opts, false /*dependency*/, utilities.getPackage());
93
+ }
94
+ }
95
+
96
+ /**
97
+ * Input properties used for looking up and filtering OrganizationPermission resources.
98
+ */
99
+ export interface OrganizationPermissionState {
100
+ /**
101
+ * Timestamp when the permission was created.
102
+ */
103
+ createdAt?: pulumi.Input<string | undefined>;
104
+ /**
105
+ * Description of what the permission allows.
106
+ */
107
+ description?: pulumi.Input<string | undefined>;
108
+ /**
109
+ * Unique key for the permission (e.g. org:posts:create).
110
+ */
111
+ key?: pulumi.Input<string | undefined>;
112
+ /**
113
+ * Display name of the permission.
114
+ */
115
+ name?: pulumi.Input<string | undefined>;
116
+ /**
117
+ * Type of the permission (system or user).
118
+ */
119
+ type?: pulumi.Input<string | undefined>;
120
+ /**
121
+ * Timestamp when the permission was last updated.
122
+ */
123
+ updatedAt?: pulumi.Input<string | undefined>;
124
+ }
125
+
126
+ /**
127
+ * The set of arguments for constructing a OrganizationPermission resource.
128
+ */
129
+ export interface OrganizationPermissionArgs {
130
+ /**
131
+ * Description of what the permission allows.
132
+ */
133
+ description?: pulumi.Input<string | undefined>;
134
+ /**
135
+ * Unique key for the permission (e.g. org:posts:create).
136
+ */
137
+ key: pulumi.Input<string>;
138
+ /**
139
+ * Display name of the permission.
140
+ */
141
+ name?: pulumi.Input<string | undefined>;
142
+ }